nes-add some crappy mmc3 multicart mappers
This commit is contained in:
parent
8e829faa03
commit
ed9de010c0
|
@ -116,6 +116,8 @@
|
|||
<Compile Include="Consoles\Nintendo\NES\Boards\Mapper078.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\DRROM.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\HKROM.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\Mapper044.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\Mapper206.cs" />
|
||||
<Compile Include="Consoles\Nintendo\NES\Boards\MMC3_family\MMC3_family.cs" />
|
||||
|
|
|
@ -38,12 +38,12 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
|
|||
032 Irem_G101 Complete
|
||||
033 Taito Complete
|
||||
034 Misc Complete
|
||||
044 Multicart Junk
|
||||
044 Multicart Complete
|
||||
045 Multicart Junk
|
||||
046 Multicart Junk
|
||||
047 MMC3Multi Decent
|
||||
048 MMC3Variant Decent
|
||||
049 Multicart Junk
|
||||
049 Multicart Complete
|
||||
050 Pirate Junk
|
||||
052 Multicart Junk
|
||||
057 Multicart Junk
|
||||
|
@ -67,7 +67,7 @@ Open bus and bus conflict emulation is not considered complete or thorough in an
|
|||
077 Misc (J) Complete
|
||||
078 Misc Complete
|
||||
079 NINA-06 Complete
|
||||
080 Misc (J) Nothing
|
||||
080 Misc (J) Good
|
||||
082 Misc (J) Nothing
|
||||
085 VRC7 Decent (no OPL sound)
|
||||
086 Misc (J) Decent (no sound)
|
||||
|
|
|
@ -173,6 +173,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
//wram enable/protect
|
||||
wram_write_protect = value.Bit(6);
|
||||
wram_enable = value.Bit(7);
|
||||
Console.WriteLine("wram_write_protect={0},wram_enable={1}", wram_write_protect, wram_enable);
|
||||
break;
|
||||
case 0x4000: //$C000 - IRQ Reload value
|
||||
irq_reload = value;
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Nintendo
|
||||
{
|
||||
//http://wiki.nesdev.com/w/index.php/INES_Mapper_044
|
||||
public class Mapper044 : MMC3Board_Base
|
||||
{
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
//analyze board type
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "MAPPER044":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseSetup();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
base.SyncState(ser);
|
||||
ser.Sync("block_select", ref block_select);
|
||||
}
|
||||
|
||||
int block_select;
|
||||
|
||||
public override void WritePRG(int addr, byte value)
|
||||
{
|
||||
base.WritePRG(addr, value);
|
||||
|
||||
switch (addr & 0x6001)
|
||||
{
|
||||
case 0x2001: //$A001
|
||||
block_select = value & 0x7;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static readonly int[] PRG_AND = new int[] {0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0f };
|
||||
static readonly int[] PRG_OR = new int[] { 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x60 };
|
||||
static readonly int[] CHR_AND = new int[] { 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7f };
|
||||
static readonly int[] CHR_OR = new int[] { 0x000, 0x080, 0x100, 0x180, 0x200, 0x280, 0x300, 0x300 };
|
||||
|
||||
protected override int Get_PRGBank_8K(int addr)
|
||||
{
|
||||
int bank_8k = mapper.Get_PRGBank_8K(addr);
|
||||
return (bank_8k & PRG_AND[block_select]) | PRG_OR[block_select];
|
||||
}
|
||||
|
||||
protected override int Get_CHRBank_1K(int addr)
|
||||
{
|
||||
int bank_1k = base.Get_CHRBank_1K(addr);
|
||||
return (bank_1k & CHR_AND[block_select]) | CHR_OR[block_select];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace BizHawk.Emulation.Consoles.Nintendo
|
||||
{
|
||||
//http://wiki.nesdev.com/w/index.php/INES_Mapper_044
|
||||
public class Mapper049 : MMC3Board_Base
|
||||
{
|
||||
public override bool Configure(NES.EDetectionOrigin origin)
|
||||
{
|
||||
//analyze board type
|
||||
switch (Cart.board_type)
|
||||
{
|
||||
case "MAPPER049":
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
BaseSetup();
|
||||
block = prg = 0;
|
||||
mode = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
base.SyncState(ser);
|
||||
ser.Sync("block", ref block);
|
||||
ser.Sync("prg", ref prg);
|
||||
ser.Sync("mode", ref mode);
|
||||
}
|
||||
|
||||
int block, prg;
|
||||
bool mode;
|
||||
|
||||
public override void WriteWRAM(int addr, byte value)
|
||||
{
|
||||
if (!mmc3.wram_enable || mmc3.wram_write_protect) return;
|
||||
mode = value.Bit(0);
|
||||
prg = (value >> 4) & 3;
|
||||
block = (value >> 6) & 3;
|
||||
Console.WriteLine("val={3}, addr={4}, prg={0},mode={1},block={2}", prg, mode, block, value, addr);
|
||||
base.WriteWRAM(addr, value);
|
||||
}
|
||||
|
||||
|
||||
protected override int Get_PRGBank_8K(int addr)
|
||||
{
|
||||
if (mode)
|
||||
return (mapper.Get_PRGBank_8K(addr)&0xF) + block * (128 / 8);
|
||||
int block_offset = addr >> 13;
|
||||
return prg * 4 + block_offset;
|
||||
}
|
||||
|
||||
protected override int Get_CHRBank_1K(int addr)
|
||||
{
|
||||
return (base.Get_CHRBank_1K(addr)&0x7F) + block * 128;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -12,7 +12,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
|
|||
public partial class NES : IEmulator
|
||||
{
|
||||
//hardware/state
|
||||
protected MOS6502 cpu;
|
||||
public MOS6502 cpu;
|
||||
int cpu_accumulate; //cpu timekeeper
|
||||
public PPU ppu;
|
||||
public APU apu;
|
||||
|
|
|
@ -95,6 +95,8 @@ static string ClassifyTable = @"
|
|||
7 256 0 8 8 NES-AOROM; battletoads
|
||||
11 -1 -1 -1 -1 Discrete_74x377-FLEX; Bible Adventures (U) ?
|
||||
13 32 0 8 16 NES-CPROM; videomation
|
||||
44 -1 -1 -1 -1 MAPPER044
|
||||
49 -1 -1 -1 -1 MAPPER049
|
||||
65 -1 -1 -1 -1 IREM-H3001-FLEX; //Ai Sensei No Oshiete - Watashi No Hoshi (J).nes
|
||||
66 64 16 8 0 NES-MHROM; super mario bros / duck hunt
|
||||
66 128 32 8 0 NES-GNROM; gumshoe
|
||||
|
|
Loading…
Reference in New Issue