NesHawk - Support board UNIF_UNL-43272
This commit is contained in:
parent
96f0fcb7a8
commit
06e1472166
|
@ -767,6 +767,7 @@
|
|||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_BMC-WS.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_BMCFK23C.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_BTL-Mario1-MALEE2.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_UNL-43272.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" />
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
public sealed class UNIF_UNL_43272 : NES.NESBoardBase
|
||||
{
|
||||
private int latche;
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "UNIF_UNL-43272":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
ser.Sync("latche", ref latche);
|
||||
base.SyncState(ser);
|
||||
}
|
||||
|
||||
public override void WritePRG(int addr, byte value)
|
||||
{
|
||||
latche = addr & 65535;
|
||||
}
|
||||
|
||||
public override byte ReadPRG(int addr)
|
||||
{
|
||||
int bank = (latche & 0x38) >> 3;
|
||||
return ROM[(bank << 15) + addr];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue