From 6e0d9df98477f539d9577a39892ca14ad56aee9d Mon Sep 17 00:00:00 2001 From: skidau Date: Fri, 8 May 2015 05:06:13 +0000 Subject: [PATCH] Fixed the battery saving in Pokemon FireRed git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1404 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/gba/GBAinline.h | 5 +++-- src/wx/panel.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gba/GBAinline.h b/src/gba/GBAinline.h index f10d460b..90ab21f9 100644 --- a/src/gba/GBAinline.h +++ b/src/gba/GBAinline.h @@ -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: diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index fa3e84f0..c5d5e17d 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -9,7 +9,7 @@ #include "../gba/agbprint.h" #include "../sdl/text.h" #include "filters.h" -#include "../../svnrev.h" +#include "../../version.h" int emulating;