aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/apumem.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/apumem.h b/source/apumem.h
index c021e41..f39ff92 100644
--- a/source/apumem.h
+++ b/source/apumem.h
@@ -62,13 +62,16 @@ static INLINE void S9xAPUSetByteZ(uint8_t byte, uint8_t Address)
static INLINE uint8_t S9xAPUGetByte(uint32_t Address)
{
+ bool zero;
+ uint8_t t;
+
Address &= 0xffff;
if (Address == 0xf3)
return S9xGetAPUDSP();
- bool zero = (Address >= 0xfd && Address <= 0xff);
- uint8_t t = IAPU.RAM [Address];
+ zero = (Address >= 0xfd && Address <= 0xff);
+ t = IAPU.RAM [Address];
if (zero || (Address >= 0xf4 && Address <= 0xf7))
{