NESHawk - add minimal support for board UNIF_UNL-CC-21
This commit is contained in:
parent
cb7f49d94c
commit
631249f08a
|
@ -645,6 +645,7 @@
|
|||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_BMC-T-262.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_UNL-AX5705.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_UNL-CC-21.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_UNL-EDU2000.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UxROM.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
|
|
@ -37,7 +37,6 @@ namespace BizHawk.Emulation.Cores.Nintendo.NES
|
|||
{
|
||||
base.SyncState(ser);
|
||||
ser.Sync("reg", ref _reg);
|
||||
|
||||
}
|
||||
|
||||
public override byte ReadPPU(int addr)
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
using BizHawk.Common;
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
public class UNIF_UNL_EDU2000 : NES.NESBoardBase
|
||||
{
|
||||
private int _reg;
|
||||
|
||||
private int _prgMask32;
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "UNIF_UNL-EDU2000":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
_prgMask32 = Cart.prg_size / 32 - 1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
base.SyncState(ser);
|
||||
ser.Sync("reg", ref _reg);
|
||||
}
|
||||
|
||||
public override void WritePRG(int addr, byte value)
|
||||
{
|
||||
_reg = value;
|
||||
}
|
||||
|
||||
public override byte ReadPRG(int addr)
|
||||
{
|
||||
return ROM[((_reg & _prgMask32) * 0x8000) + (addr & 0x7FFF)];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue