From df59686cbb04db57bbe6c3453a04130155992bdf Mon Sep 17 00:00:00 2001 From: beirich Date: Sat, 26 May 2012 20:21:00 +0000 Subject: [PATCH] Fix crash in PCE Coryoon when attempting to access disabled TurboCD ports --- BizHawk.Emulation/Consoles/PC Engine/TurboCD.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BizHawk.Emulation/Consoles/PC Engine/TurboCD.cs b/BizHawk.Emulation/Consoles/PC Engine/TurboCD.cs index ed65d9e8b9..b31ecc63f7 100644 --- a/BizHawk.Emulation/Consoles/PC Engine/TurboCD.cs +++ b/BizHawk.Emulation/Consoles/PC Engine/TurboCD.cs @@ -45,6 +45,8 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx { if (!TurboCD && !BramEnabled) return; // flee if no turboCD hooked up + if (!TurboCD && addr != 0x1FF807) + return; // only bram port available unless full TurobCD mode. switch (addr & 0x1FFF) { @@ -189,6 +191,8 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx { if (!TurboCD && !BramEnabled) return 0xFF; //bail if no TurboCD. + if (!TurboCD && addr != 0x1FF803) // only allow access to $1803 unless full TurboCD mode. + return 0xFF; byte returnValue = 0; short sample;