diff src/gba/Sram.cpp @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/gba/Sram.cpp	Sat Mar 03 10:31:27 2012 -0600
     1.3 @@ -0,0 +1,15 @@
     1.4 +#include "../common/System.h"
     1.5 +#include "Flash.h"
     1.6 +#include "Sram.h"
     1.7 +
     1.8 +u8 sramRead(u32 address)
     1.9 +{
    1.10 +	return flashSaveMemory[address & 0xFFFF];
    1.11 +}
    1.12 +
    1.13 +void sramWrite(u32 address, u8 byte)
    1.14 +{
    1.15 +	flashSaveMemory[address & 0xFFFF] = byte;
    1.16 +	systemSaveUpdateCounter = SYSTEM_SAVE_UPDATED;
    1.17 +}
    1.18 +