pce: fix a crash when a HuCard accessing invalid addresses would venture into TurboCD ports (namely, Rastan Saga)
This commit is contained in:
parent
0cb222f20e
commit
a76ea9c520
|
@ -43,6 +43,9 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
|
|
||||||
void WriteCD(int addr, byte value)
|
void WriteCD(int addr, byte value)
|
||||||
{
|
{
|
||||||
|
if (!TurboCD && !BramEnabled)
|
||||||
|
return; // flee if no turboCD hooked up
|
||||||
|
|
||||||
switch (addr & 0x1FFF)
|
switch (addr & 0x1FFF)
|
||||||
{
|
{
|
||||||
case 0x1800: // SCSI Drive Control Line
|
case 0x1800: // SCSI Drive Control Line
|
||||||
|
@ -184,6 +187,9 @@ namespace BizHawk.Emulation.Consoles.TurboGrafx
|
||||||
|
|
||||||
public byte ReadCD(int addr)
|
public byte ReadCD(int addr)
|
||||||
{
|
{
|
||||||
|
if (!TurboCD && !BramEnabled)
|
||||||
|
return 0xFF; //bail if no TurboCD.
|
||||||
|
|
||||||
byte returnValue = 0;
|
byte returnValue = 0;
|
||||||
short sample;
|
short sample;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue