NESHawk - add unf board UNIF_DREAMTECH01, (Korean Igo (Unl))
This commit is contained in:
parent
dd973d03fc
commit
f044790202
|
@ -681,6 +681,7 @@
|
|||
<Compile Include="Consoles\Nintendo\NES\PPU.regs.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\PPU.run.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Unif.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\UNIF\UNIF-DREAMTECH01.cs" />
|
||||
<Compile Include="Consoles\Nintendo\QuickNES\LibQuickNES.cs" />
|
||||
<Compile Include="Consoles\Nintendo\QuickNES\Nes_NTSC_Colors.cs" />
|
||||
<Compile Include="Consoles\Nintendo\QuickNES\QuickNES.cs" />
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
public class UNIF_DREAMTECH01 : NES.NESBoardBase
|
||||
{
|
||||
// Korean Igo (Unl) [U][!]
|
||||
private int reg;
|
||||
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "UNIF_DREAMTECH01":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
ser.Sync("reg", ref reg);
|
||||
base.SyncState(ser);
|
||||
}
|
||||
|
||||
public override void WriteEXP(int addr, byte value)
|
||||
{
|
||||
if (addr == 0x1020)
|
||||
{
|
||||
reg = value & 0x07;
|
||||
}
|
||||
}
|
||||
|
||||
public override byte ReadPRG(int addr)
|
||||
{
|
||||
int bank = addr < 0x4000 ? reg : 8;
|
||||
return ROM[(bank << 14) + (addr & 0x3FFF)];
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue