NES - change sunsoft3 to sunsoft2

This commit is contained in:
andres.delikat 2011-09-20 23:50:04 +00:00
parent cb4c2a56d1
commit 56c4d8f39e
2 changed files with 12 additions and 4 deletions

View File

@ -117,7 +117,7 @@
</Compile>
<Compile Include="Consoles\Nintendo\NES\Boards\PxROM.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft1.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft3.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft2.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\Sunsoft4.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\SxROM.cs">
<SubType>Code</SubType>

View File

@ -4,19 +4,18 @@ using System.Diagnostics;
namespace BizHawk.Emulation.Consoles.Nintendo
{
class Sunsoft3 : NES.NESBoardBase
class Sunsoft2 : NES.NESBoardBase
{
int chr;
int prg_bank_mask_16k;
byte prg_bank_16k;
ByteBuffer prg_banks_16k = new ByteBuffer(2);
//TODO: savestate & dispose
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "SUNSOFT-3":
case "SUNSOFT-2":
break;
default:
return false;
@ -27,10 +26,19 @@ namespace BizHawk.Emulation.Consoles.Nintendo
return true;
}
public override void Dispose()
{
prg_banks_16k.Dispose();
base.Dispose();
}
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
ser.Sync("chr", ref chr);
ser.Sync("prg_bank_mask_16k", ref prg_bank_mask_16k);
ser.Sync("prg_bank_16k", ref prg_bank_16k);
ser.Sync("prg_banks_16k", ref prg_banks_16k);
}
void SyncPRG()