Fixed the battery saving in Pokemon FireRed

This commit is contained in:
skidau 2015-05-08 05:06:13 +00:00
parent 590b59c92c
commit 535bf04f58
2 changed files with 4 additions and 3 deletions

View File

@ -406,6 +406,9 @@ static inline u8 CPUReadByte(u32 address)
goto unreadable;
case 14:
case 15:
if (cpuSramEnabled | cpuFlashEnabled)
return flashRead(address);
switch(address & 0x00008f00) {
case 0x8200:
return systemGetSensorX() & 255;
@ -416,8 +419,6 @@ static inline u8 CPUReadByte(u32 address)
case 0x8500:
return systemGetSensorY() >> 8;
}
if (cpuSramEnabled | cpuFlashEnabled)
return flashRead(address);
// default
default:
unreadable:

View File

@ -9,7 +9,7 @@
#include "../gba/agbprint.h"
#include "../sdl/text.h"
#include "filters.h"
#include "../../svnrev.h"
#include "../../version.h"
int emulating;