Mercurial > vba-clojure
annotate src/gba/Sram.cpp @ 551:b69a3dba8045
condensed gameboy program into a contigous sequence of bytes.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 30 Aug 2012 11:19:52 -0500 |
parents | f9f4f1b99eed |
children |
rev | line source |
---|---|
rlm@1 | 1 #include "../common/System.h" |
rlm@1 | 2 #include "Flash.h" |
rlm@1 | 3 #include "Sram.h" |
rlm@1 | 4 |
rlm@1 | 5 u8 sramRead(u32 address) |
rlm@1 | 6 { |
rlm@1 | 7 return flashSaveMemory[address & 0xFFFF]; |
rlm@1 | 8 } |
rlm@1 | 9 |
rlm@1 | 10 void sramWrite(u32 address, u8 byte) |
rlm@1 | 11 { |
rlm@1 | 12 flashSaveMemory[address & 0xFFFF] = byte; |
rlm@1 | 13 systemSaveUpdateCounter = SYSTEM_SAVE_UPDATED; |
rlm@1 | 14 } |
rlm@1 | 15 |