nes-support mapper 182

This commit is contained in:
zeromus 2012-03-09 04:30:46 +00:00
parent f592fc3748
commit cf5dcb1cd5
4 changed files with 70 additions and 3 deletions

View File

@ -125,6 +125,7 @@
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper049.cs" /> <Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper049.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper095.cs" /> <Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper095.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper115.cs" /> <Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper115.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper182.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper206.cs" /> <Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper206.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\MMC3_family.cs" /> <Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\MMC3_family.cs" />
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\NES-QJ.cs" /> <Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\NES-QJ.cs" />

View File

@ -95,12 +95,12 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
164 Pirate Junk - Started 164 Pirate Junk - Started
165 Pirate Junk 165 Pirate Junk
180 Misc (J) Complete (but we don't implement the crazy climber controller) 180 Misc (J) Complete (but we don't implement the crazy climber controller)
182 MMC3Variant Nothing 182 MMC3Variant Decent
184 Sunsoft-1 Complete 184 Sunsoft-1 Complete
185 Misc (J) Complete 185 Misc (J) Complete
189 MMC3Variant Nothing 189 MMC3Variant Nothing
191 Pirate Junk 191 Pirate Junk (mmc3 variant)
192 Pirate Junk 192 Pirate Junk (mmc3 variant)
193 Unlicensed Junk - Started 193 Unlicensed Junk - Started
194 Pirate Junk 194 Pirate Junk
200 Multicart Junk 200 Multicart Junk

View File

@ -0,0 +1,65 @@
using System;
using System.IO;
using System.Diagnostics;
namespace BizHawk.Emulation.Consoles.Nintendo
{
public class Mapper182 : MMC3Board_Base
{
public override bool Configure(NES.EDetectionOrigin origin)
{
//analyze board type
switch (Cart.board_type)
{
case "MAPPER182":
break;
default:
return false;
}
BaseSetup();
return true;
}
public override void WritePRG(int addr, byte value)
{
addr += 0x8000;
switch (addr & 0xE001)
{
case 0x8000: break; //?
case 0x8001: base.WritePRG(0xA000,value); break;
case 0xA000:
value = (byte)scramble_A000(value);
base.WritePRG(0x8000,value);
break;
case 0xA001: break; //?
case 0xC000: base.WritePRG(0x8001, value); break;
case 0xC001:
base.WritePRG(0xC000, value);
base.WritePRG(0xC001, value);
break;
default:
base.WritePRG(addr, value);
break;
}
}
static byte[] scramble_table = new byte[] { 0, 3, 1, 5, 6, 7, 2, 4 };
static int scramble_A000(byte val)
{
return (val & ~0x7) | scramble_table[val & 0x7];
}
public override void SyncState(Serializer ser)
{
base.SyncState(ser);
}
public override void WriteWRAM(int addr, byte value)
{
base.WriteWRAM(addr, value);
}
}
}

View File

@ -106,6 +106,7 @@ static string ClassifyTable = @"
79 -1 -1 -1 -1 AVE-NINA-06; Blackjack (U) 79 -1 -1 -1 -1 AVE-NINA-06; Blackjack (U)
113 -1 -1 -1 -1 AVE-NINA-06; ??? 113 -1 -1 -1 -1 AVE-NINA-06; ???
115 -1 -1 -1 -1 MAPPER115 115 -1 -1 -1 -1 MAPPER115
182 -1 -1 -1 -1 MAPPER182
232 -1 -1 -1 -1 CAMERICA-ALGQ; Quattro Adventure 232 -1 -1 -1 -1 CAMERICA-ALGQ; Quattro Adventure
240 -1 -1 -1 -1 MAPPER240 240 -1 -1 -1 -1 MAPPER240
"; ";