NES DCM glitch cleanup
-Implemenet for player 2 -make sure only happens on NTSC
This commit is contained in:
parent
ab1a22bf31
commit
9aee377d66
|
@ -576,8 +576,9 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
{
|
{
|
||||||
// special hardware glitch case
|
// special hardware glitch case
|
||||||
ret_spec = read_joyport(addr);
|
ret_spec = read_joyport(addr);
|
||||||
if (do_the_reread)
|
if (do_the_reread && ppu.region==PPU.Region.NTSC)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine("collision 1");
|
||||||
ret_spec = read_joyport(addr);
|
ret_spec = read_joyport(addr);
|
||||||
do_the_reread = false;
|
do_the_reread = false;
|
||||||
}
|
}
|
||||||
|
@ -585,22 +586,28 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||||
|
|
||||||
}
|
}
|
||||||
case 0x4017:
|
case 0x4017:
|
||||||
|
if (_isVS)
|
||||||
{
|
{
|
||||||
if (_isVS)
|
byte ret = 0;
|
||||||
|
ret = read_joyport(0x4017);
|
||||||
|
ret &= 1;
|
||||||
|
|
||||||
|
ret = (byte)(ret | (VS_dips[2] << 2) | (VS_dips[3] << 3) | (VS_dips[4] << 4) | (VS_dips[5] << 5) | (VS_dips[6] << 6) | (VS_dips[7] << 7));
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// special hardware glitch case
|
||||||
|
ret_spec = read_joyport(addr);
|
||||||
|
if (do_the_reread && ppu.region == PPU.Region.NTSC)
|
||||||
{
|
{
|
||||||
byte ret = 0;
|
Console.WriteLine("collision 2");
|
||||||
ret = read_joyport(0x4017);
|
ret_spec = read_joyport(addr);
|
||||||
ret &= 1;
|
do_the_reread = false;
|
||||||
|
|
||||||
ret = (byte)(ret | (VS_dips[2] << 2) | (VS_dips[3] << 3) | (VS_dips[4] << 4) | (VS_dips[5] << 5) | (VS_dips[6] << 6) | (VS_dips[7] << 7));
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return read_joyport(addr);
|
|
||||||
}
|
}
|
||||||
|
return ret_spec;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
//Console.WriteLine("read register: {0:x4}", addr);
|
//Console.WriteLine("read register: {0:x4}", addr);
|
||||||
|
|
Loading…
Reference in New Issue