From 3bd647b78977c31324ddfbc0f08c2be2b3ba9968 Mon Sep 17 00:00:00 2001 From: "Adrian.Conlon" Date: Thu, 7 Sep 2017 20:11:57 +0100 Subject: [PATCH] Correct a couple of memory map elements. Signed-off-by: Adrian.Conlon --- LR35902/inc/GameBoyBus.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/LR35902/inc/GameBoyBus.h b/LR35902/inc/GameBoyBus.h index 79148ea..66372f5 100644 --- a/LR35902/inc/GameBoyBus.h +++ b/LR35902/inc/GameBoyBus.h @@ -221,8 +221,10 @@ namespace EightBit { return m_lowInternalRam.reference(address - 0xc000); if (address < 0xfe00) return m_lowInternalRam.reference(address - 0xe000); // Low internal RAM mirror - if (address < 0xff00) + if (address < 0xfea0) return m_oamRam.reference(address - 0xfe00); + if (address < 0xff00) + return placeDATA(0); if (address < 0xff80) return m_ioPorts.reference(address - 0xff00); return m_highInternalRam.reference(address - 0xff80);