vbagx/source/vba/gba/Sram.cpp

22 lines
428 B
C++
Raw Permalink Normal View History

2009-01-08 08:35:44 +01:00
#include "GBA.h"
2008-09-23 01:00:10 +02:00
#include "Globals.h"
#include "Flash.h"
#include "Sram.h"
u8 sramRead(u32 address)
{
return flashSaveMemory[address & 0xFFFF];
}
void sramDelayedWrite(u32 address, u8 byte)
{
saveType = 1;
cpuSaveGameFunc = sramWrite;
sramWrite(address, byte);
}
void sramWrite(u32 address, u8 byte)
{
flashSaveMemory[address & 0xFFFF] = byte;
systemSaveUpdateCounter = SYSTEM_SAVE_UPDATED;
}