support unif board BTL-MARIO1-MALEE2, supposedly mapper 55

This commit is contained in:
adelikat 2016-10-19 08:05:57 -05:00
parent b3081f490b
commit 44ca7683c4
2 changed files with 42 additions and 2 deletions

View File

@ -705,7 +705,7 @@
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper254.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\MMC3.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\NES-QJ.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Pocahontas.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Pocahontas.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\RexSoftSL1632.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\TQROM.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\TLSROM.cs" />
@ -762,6 +762,7 @@
<Compile Include="Consoles\Nintendo\NES\Boards\UNIF\UNIF_BMC-T-262.cs" />
<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-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" />
@ -1188,4 +1189,4 @@
<Target Name="AfterBuild">
</Target>
-->
</Project>
</Project>

View File

@ -0,0 +1,39 @@
namespace BizHawk.Emulation.Cores.Nintendo.NES
{
public sealed class Mapper055 : NES.NESBoardBase
{
public override bool Configure(NES.EDetectionOrigin origin)
{
switch (Cart.board_type)
{
case "MAPPER055": // Nestopia calls this mapper 55, I know of no dumps with the designation though
case "UNIF_BTL-MARIO1-MALEE2":
break;
default:
return false;
}
WRAM = new byte[0x800];
SetMirrorType(EMirrorType.Vertical);
return true;
}
public override byte ReadWRAM(int addr)
{
if (addr < 0x1000)
{
return ROM[0x8000 + (addr & 0x7FF)];
}
return WRAM[(addr & 0x7FF)];
}
public override void WriteWRAM(int addr, byte value)
{
if (addr >= 0x1000)
{
WRAM[(addr & 0x7FF)] = value;
}
}
}
}