NES - fixes to mapper 226

This commit is contained in:
adelikat 2012-07-19 02:56:43 +00:00
parent fb841bc764
commit 876007c502
1 changed files with 6 additions and 6 deletions

View File

@ -47,7 +47,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
+---------------+---------------+ +---------------+---------------+
*/ */
public int prg_page; public byte prg_page;
public bool prg_mode; public bool prg_mode;
public override bool Configure(NES.EDetectionOrigin origin) public override bool Configure(NES.EDetectionOrigin origin)
@ -59,7 +59,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
default: default:
return false; return false;
} }
prg_page = 0;
prg_mode = false; prg_mode = false;
return true; return true;
} }
@ -75,7 +75,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
{ {
if (addr == 0) if (addr == 0)
{ {
prg_page = (value & 0x1F) + (value >> 7 << 5); prg_page = (byte)((value & 0x1F) + ((value & 0x80) >> 2));
prg_mode = value.Bit(5); prg_mode = value.Bit(5);
if (value.Bit(6)) if (value.Bit(6))
@ -87,9 +87,9 @@ namespace BizHawk.Emulation.Consoles.Nintendo
SetMirrorType(EMirrorType.Horizontal); SetMirrorType(EMirrorType.Horizontal);
} }
} }
else else if ((addr & 0x01) > 0)
{ {
prg_page += (value & 0x1) << 7; prg_page |= (byte)((value & 0x1) << 6);
} }
} }