nes: unif mapper "BMC-NovelDiamond9999999in1". possibly also INES mapper 54, but i've only seen this game in unif form. One game: "Multi-Game Pirate Carts.7z|Novel Diamond 999999-in-1 [U][p1][!].unf"
This commit is contained in:
parent
41d401c60a
commit
b2db264eed
|
@ -237,6 +237,7 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Consoles\Nintendo\NES\Boards\NanJing.cs" />
|
<Compile Include="Consoles\Nintendo\NES\Boards\NanJing.cs" />
|
||||||
<Compile Include="Consoles\Nintendo\NES\Boards\NES-EVENT.cs" />
|
<Compile Include="Consoles\Nintendo\NES\Boards\NES-EVENT.cs" />
|
||||||
|
<Compile Include="Consoles\Nintendo\NES\Boards\NovelDiamond.cs" />
|
||||||
<Compile Include="Consoles\Nintendo\NES\Boards\NROM.cs">
|
<Compile Include="Consoles\Nintendo\NES\Boards\NROM.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|
|
@ -0,0 +1,55 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace BizHawk.Emulation.Consoles.Nintendo
|
||||||
|
{
|
||||||
|
public class NovelDiamond : NES.NESBoardBase
|
||||||
|
{
|
||||||
|
int prg;
|
||||||
|
int chr;
|
||||||
|
|
||||||
|
public override bool Configure(NES.EDetectionOrigin origin)
|
||||||
|
{
|
||||||
|
switch (Cart.board_type)
|
||||||
|
{
|
||||||
|
case "MAPPER054": // ??
|
||||||
|
case "UNIF_BMC-NovelDiamond9999999in1": // works
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AssertPrg(128);
|
||||||
|
AssertChr(64);
|
||||||
|
SetMirrorType(Cart.pad_h, Cart.pad_v);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override byte ReadPPU(int addr)
|
||||||
|
{
|
||||||
|
if (addr < 0x2000)
|
||||||
|
return VROM[addr | chr << 13];
|
||||||
|
else
|
||||||
|
return base.ReadPPU(addr);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override byte ReadPRG(int addr)
|
||||||
|
{
|
||||||
|
return ROM[addr | prg << 15];
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void WritePRG(int addr, byte value)
|
||||||
|
{
|
||||||
|
prg = addr & 3;
|
||||||
|
chr = addr & 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void SyncState(Serializer ser)
|
||||||
|
{
|
||||||
|
base.SyncState(ser);
|
||||||
|
ser.Sync("prg", ref prg);
|
||||||
|
ser.Sync("chr", ref chr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue