VS updates
-support for 2c05 which swaps regs 2000 and 2001
This commit is contained in:
parent
33c522e363
commit
35ac71f350
|
@ -39,6 +39,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
public bool _iskeyboard = false;
|
||||
//variable set when VS system games are running
|
||||
public bool _isVS = false;
|
||||
//some VS games have a ppu that switches 2000 and 2001, so keep trcak of that
|
||||
public bool _isVS2c05 = false;
|
||||
//since prg reg for VS System is set in the controller regs, it is convenient to have it here
|
||||
//instead of in the board
|
||||
public byte VS_chr_reg;
|
||||
|
@ -917,6 +919,8 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
{
|
||||
if (cart.DB_GameInfo.Hash == "C145803B5FEE71172A890606A44C6D5DF6D2FA8F" // VS Star Luster
|
||||
|| cart.DB_GameInfo.Hash == "E0572DA111D05BF622EC137DF8A658F7B0687DDF" // VS Battle City
|
||||
|| cart.DB_GameInfo.Hash == "D232F7BE509E3B745D9E9803DA945C3FABA37A70" // VS Ninja Jajamurru Kun
|
||||
|
||||
|
||||
)
|
||||
SetPalette(Palettes.palette_2c03_2c05);
|
||||
|
|
|
@ -611,9 +611,25 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
byte ret_spec;
|
||||
switch (addr)
|
||||
{
|
||||
case 0: return read_2000(); case 1: return read_2001(); case 2: return read_2002(); case 3: return read_2003();
|
||||
case 4: return read_2004(); case 5: return read_2005(); case 6: return read_2006();
|
||||
|
||||
case 0:
|
||||
{
|
||||
if (nes._isVS2c05)
|
||||
return read_2001();
|
||||
else
|
||||
return read_2000();
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if (nes._isVS2c05)
|
||||
return read_2000();
|
||||
else
|
||||
return read_2001();
|
||||
}
|
||||
case 2: return read_2002();
|
||||
case 3: return read_2003();
|
||||
case 4: return read_2004();
|
||||
case 5: return read_2005();
|
||||
case 6: return read_2006();
|
||||
case 7:
|
||||
{
|
||||
if (double_2007_read>0)
|
||||
|
@ -653,8 +669,24 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
|
||||
switch (addr)
|
||||
{
|
||||
case 0: write_2000(value); break; case 1: write_2001(value); break; case 2: write_2002(value); break; case 3: write_2003(value); break;
|
||||
case 4: write_2004(value); break; case 5: write_2005(value); break; case 6: write_2006(value); break; case 7: write_2007(value); break;
|
||||
case 0:
|
||||
if (nes._isVS2c05)
|
||||
write_2001(value);
|
||||
else
|
||||
write_2000(value);
|
||||
break;
|
||||
case 1:
|
||||
if (nes._isVS2c05)
|
||||
write_2000(value);
|
||||
else
|
||||
write_2001(value);
|
||||
break;
|
||||
case 2: write_2002(value); break;
|
||||
case 3: write_2003(value); break;
|
||||
case 4: write_2004(value); break;
|
||||
case 5: write_2005(value); break;
|
||||
case 6: write_2006(value); break;
|
||||
case 7: write_2007(value); break;
|
||||
default: throw new InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue