GBA: Show log when rom uses SRAM of FLASH save types
Log should only show once during the first write to SRAM or FLASH address using flashSaveDecide()
This commit is contained in:
parent
90bc79f299
commit
009c09ef4a
|
@ -164,13 +164,20 @@ void flashSaveDecide(uint32_t address, uint8_t byte)
|
|||
if (saveType == 1)
|
||||
return;
|
||||
|
||||
// log("Deciding save type %08x\n", address);
|
||||
if (address == 0x0e005555) {
|
||||
saveType = 3;
|
||||
cpuSaveGameFunc = flashWrite;
|
||||
} else {
|
||||
saveType = 2;
|
||||
cpuSaveGameFunc = sramWrite;
|
||||
if (cpuSramEnabled && cpuFlashEnabled) {
|
||||
// log("Deciding save type %08x\n", address);
|
||||
if (address == 0x0e005555) {
|
||||
saveType = 3;
|
||||
cpuSramEnabled = false;
|
||||
cpuSaveGameFunc = flashWrite;
|
||||
} else {
|
||||
saveType = 2;
|
||||
cpuFlashEnabled = false;
|
||||
cpuSaveGameFunc = sramWrite;
|
||||
}
|
||||
|
||||
log("%s emulation is enabled by writing to: $%08x : %02x\n",
|
||||
cpuSramEnabled ? "SRAM" : "FLASH", address, byte);
|
||||
}
|
||||
|
||||
(*cpuSaveGameFunc)(address, byte);
|
||||
|
|
|
@ -67,6 +67,11 @@ extern uint8_t biosProtected[4];
|
|||
|
||||
extern void (*cpuSaveGameFunc)(uint32_t, uint8_t);
|
||||
|
||||
extern bool cpuSramEnabled;
|
||||
extern bool cpuFlashEnabled;
|
||||
extern bool cpuEEPROMEnabled;
|
||||
extern bool cpuEEPROMSensorEnabled;
|
||||
|
||||
#ifdef BKPT_SUPPORT
|
||||
extern uint8_t freezeWorkRAM[0x40000];
|
||||
extern uint8_t freezeInternalRAM[0x8000];
|
||||
|
|
Loading…
Reference in New Issue