NESHawk: add in a new mapper for chinese pokemon
This commit is contained in:
parent
365fa1eb41
commit
eec1711b0f
|
@ -306,6 +306,12 @@ sha1:17473C223453D2D80FCB9DCFA317947287DC5C52 Xing He Zhan Shi (China) (Unl) NE
|
|||
sha1:B1C74236FD17FAB4AB9AA6AB28E38864C66D6255 Pocahontus (UNL) NES board=MAPPER182;PRG=256;CHR=256;WRAM=8;PAD_H=1
|
||||
sha1:5FA23F88432006DCF6874EA36E9E7DA8934427BE Super Donkey Kong (Unl) NES board=MAPPER182;PRG=128;CHR=128;WRAM=8;PAD_H=1
|
||||
sha1:8A7DAB8B78DA1C5EA159BA9EEC00FF97742245F1 B Super Donkey Kong (Unl) [b1] NES board=MAPPER182;PRG=128;CHR=128;WRAM=8;PAD_H=1
|
||||
sha1:CA7F528C5AD73596961CFCE30194592FDBCF4505 Pokemon Platinum Alt title 2 (KT-008 PCB)(Ch)[!].nes NES board=MMC3_Pokemon
|
||||
sha1:6668AF3F57BB776629AB512E87C202614ABF41CA Pokemon Platinum Alt title 1 (KT-008 PCB)(Ch)[!].nes NES board=MMC3_Pokemon
|
||||
sha1:5010EA0CD5E94B9E2F13A9C1E03AF66FFBD09832 Pokemon Platinum (KT-008 PCB)(Ch)[!].nes NES board=MMC3_Pokemon
|
||||
sha1:B11D65F508AD5E72274F049F6DDAEFC6188250FC Pokemon HeartGold (KT-008 PCB)(Ch)[!].nes NES board=MMC3_Pokemon
|
||||
sha1:EB97C94DDA0EC647418B05C4E2CAB61CA0AF0380 Kou Dai Guai Shou - Fei Cui Ban (C) [KT-1063].nes NES board=MMC3_Pokemon
|
||||
sha1:82323E1CD27EC434843AA1B44E3D89A09860F430 White Jade Version (China) (Unl) [CHS](0834).nes NES board=MMC3_Pokemon
|
||||
|
||||
;wrong vram info
|
||||
sha1:32D71DD6C5A8D78A918FE1B9D6D6C4A570D9652D Oeka Kids Anpanman no Hiragana Daisuki (J) NES board=MAPPER096;VRAM=32
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
using BizHawk.Common;
|
||||
|
||||
namespace BizHawk.Emulation.Cores.Nintendo.NES
|
||||
{
|
||||
internal sealed class MMC_Pokemon : MMC3Board_Base
|
||||
{
|
||||
// unsure if this is represented in any other mapper (it doesn't appear to be.)
|
||||
// the games have a register at 0x5000 that swaps out 512K banks that the MMC3 references.
|
||||
// unclear if it is readable or has mirrors etc
|
||||
|
||||
public byte prg_reg;
|
||||
|
||||
public override bool Configure(EDetectionOrigin origin)
|
||||
{
|
||||
//analyze board type
|
||||
switch (Cart.BoardType)
|
||||
{
|
||||
case "MMC3_Pokemon":
|
||||
break;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
prg_reg = 0;
|
||||
BaseSetup();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override int Get_PRGBank_8K(int addr)
|
||||
{
|
||||
int bank_8k = addr >> 13;
|
||||
bank_8k = mmc3.prg_regs_8k[bank_8k];
|
||||
bank_8k |= prg_reg;
|
||||
return bank_8k;
|
||||
}
|
||||
|
||||
public override void WriteExp(int addr, byte value)
|
||||
{
|
||||
if (addr == 0x1000) { prg_reg = (byte)(value != 0 ? 0x40 : 0); }
|
||||
}
|
||||
|
||||
public override void SyncState(Serializer ser)
|
||||
{
|
||||
ser.Sync(nameof(prg_reg), ref prg_reg);
|
||||
|
||||
base.SyncState(ser);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue