bus/nes: Added support for a couple Chinese unlicensed carts. (#8195)

Software list items promoted to working (nes.xml)
---------------------------------------
Fāngkuài Zǒngdòngyuán (China)
Korean Igo (Korea)
Ninja Ryukenden (China)
This commit is contained in:
0kmg 2021-07-12 07:23:44 -08:00 committed by GitHub
parent 13ec17f884
commit adffe506b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 257 additions and 32 deletions

View File

@ -62148,22 +62148,6 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
<software name="drmario2" supported="no">
<description>Dr. Mario II</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="unl_eh8813a" />
<feature name="pcb" value="UNL-EH8813A" />
<dataarea name="chr" size="131072">
<rom name="dr. mario ii (unl)[u].chr" size="131072" crc="6b10fa72" sha1="d0b498e61ce66ee9584567c3e3dcdf7c00c2f3ae" offset="00000" status="baddump" />
</dataarea>
<dataarea name="prg" size="262144">
<rom name="dr. mario ii (unl)[u].prg" size="262144" crc="6be58daa" sha1="c4b9ee3dfe756f73e70d6d8e9197cebc0bda0698" offset="00000" status="baddump" />
</dataarea>
</part>
</software>
<software name="dbparty">
<description>Dragon Ball 4 in 1 (Asia)</description>
<year>19??</year>
@ -62442,6 +62426,31 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
<!-- from cah4e3 -->
<software name="drmario2">
<description>Fāngkuài Zǒngdòngyuán (China)</description>
<year>1996</year>
<publisher>Waixing?</publisher>
<info name="serial" value="EH009"/>
<info name="alt_title" value="方塊總動員"/>
<part name="cart" interface="nes_cart">
<feature name="slot" value="unl_eh8813a" />
<feature name="pcb" value="UNL-EH8813A" />
<dataarea name="chr" size="131072">
<rom name="dr. mario ii (unl)[u].chr" size="131072" crc="6b10fa72" sha1="d0b498e61ce66ee9584567c3e3dcdf7c00c2f3ae" offset="00000" status="baddump" />
</dataarea>
<dataarea name="prg" size="131072">
<rom name="dr. mario ii (unl)[u].prg" size="131072" crc="2df21b64" sha1="4c2bbeafcc1c4e684a7820a3d575a6d7a3e3d9b6" offset="00000" status="baddump" />
</dataarea>
<dipswitch name="Menu type" tag="DSW" mask="3">
<dipvalue name="2-in-1" value="0" default="yes"/>
<dipvalue name="8-in-1" value="1"/>
<dipvalue name="9-in-1" value="2"/>
<dipvalue name="2-in-1 (alt)" value="3"/>
</dipswitch>
</part>
</software>
<software name="felixh">
<description>Felix The Cat (Asia)</description>
<year>1998</year>
@ -62934,9 +62943,9 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</software>
<!-- nointro & cah4e3 -->
<software name="koreaigo" supported="no">
<description>Korean Igo (Kor)</description>
<year>199?</year>
<software name="koreaigo">
<description>Korean Igo (Korea)</description>
<year>1993</year>
<publisher>DreamTech</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="dreamtech01" />
@ -65618,8 +65627,8 @@ All musics were removed in this game.
</part>
</software>
<software name="nryukendc" cloneof="shadwarr" supported="no">
<description>Ninja Ryukenden (Chi)</description>
<software name="nryukendc" cloneof="shadwarr">
<description>Ninja Ryukenden (China)</description>
<year>19??</year>
<publisher>&lt;unknown&gt;</publisher>
<part name="cart" interface="nes_cart">

View File

@ -285,7 +285,9 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("unl_whero", NES_WHERO); // mapper 27
device.option_add_internal("unl_43272", NES_43272); // used in Gaau Hok Gwong Cheung
device.option_add_internal("tf1201", NES_TF1201);
device.option_add_internal("unl_cfight", NES_CITYFIGHT); // used by City Fighter IV
device.option_add_internal("unl_cfight", NES_CITYFIGHT); // used by City Fighter IV
device.option_add_internal("ninjaryu", NES_NINJARYU); // used by Ninja Ryukenden Chinese
device.option_add_internal("unl_eh8813a", NES_EH8813A); // used by Dr. Mario II
device.option_add_internal("zemina", NES_ZEMINA); // mapper 190 - Magic Kid GooGoo
// misc bootleg boards
device.option_add_internal("ax5705", NES_AX5705);
@ -410,7 +412,6 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("unrom512", NES_UNROM512);
device.option_add_internal("2a03pur", NES_2A03PURITANS);
// other unsupported...
device.option_add_internal("ninjaryu", NES_NROM); // mapper 111 - UNSUPPORTED
device.option_add_internal("unl_dance", NES_NROM); // UNSUPPORTED
device.option_add_internal("onebus", NES_NROM); // UNSUPPORTED
device.option_add_internal("pec586", NES_NROM); // UNSUPPORTED
@ -418,7 +419,6 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("bmc_f15", NES_NROM); // UNSUPPORTED
device.option_add_internal("bmc_hp898f", NES_NROM); // UNSUPPORTED
device.option_add_internal("bmc_8in1", NES_NROM); // UNSUPPORTED
device.option_add_internal("unl_eh8813a", NES_NROM); // UNSUPPORTED
device.option_add_internal("unl_158b", NES_NROM); // UNSUPPORTED
device.option_add_internal("unl_drgnfgt", NES_NROM); // UNSUPPORTED
// are there dumps of games with these boards?

View File

@ -142,7 +142,8 @@ static const nes_mmc mmc_list[] =
{ 108, UNL_LH28_LH54 }, // 108 has 4 variant boards
// 109 Unused
// 110 Unused
// 111 Ninja Ryuukenden Chinese? - Unsupported
// 111 GTROM 512 + Flash, currently unsupported
// Old mapper 111: Ninja Ryukenden Chinese - currently supported in software list only
{ 112, NTDEC_ASDER },
{ 113, HES_BOARD },
{ 114, SUPERGAME_LIONKING },

View File

@ -315,6 +315,8 @@ static const nes_pcb pcb_list[] =
{ "unl_43272", UNL_43272 },
{ "tf1201", UNL_TF1201 },
{ "unl_cfight", UNL_CITYFIGHT },
{ "ninjaryu", UNL_NINJARYU },
{ "unl_eh8813a", UNL_EH8813A }, // Dr. Mario II
{ "nocash_nochr", NOCASH_NOCHR },
{ "action53", UNL_ACTION53 },
{ "cufrom", UNL_CUFROM },
@ -324,7 +326,6 @@ static const nes_pcb pcb_list[] =
{ "ffe4", FFE4_BOARD },
{ "ffe8", FFE8_BOARD },
{ "8237a", UNSUPPORTED_BOARD },
{ "ninjaryu", UNSUPPORTED_BOARD },
{ "unl_dance", UNSUPPORTED_BOARD },
{ "bmc_hik_kof", UNSUPPORTED_BOARD },
{ "onebus", UNSUPPORTED_BOARD },
@ -335,7 +336,6 @@ static const nes_pcb pcb_list[] =
{ "bmc_f15", UNSUPPORTED_BOARD }, // 150-in-1 Unchained Melody
{ "bmc_hp898f", UNSUPPORTED_BOARD }, // Primasoft 9999999-in-1
{ "bmc_8in1", UNSUPPORTED_BOARD }, // Super 8-in-1 (Incl. Rockin' Kats)
{ "unl_eh8813a", UNSUPPORTED_BOARD }, // Dr. Mario II
{ "unl_158b", UNSUPPORTED_BOARD }, // Blood of Jurassic
{ "unl_drgnfgt", UNSUPPORTED_BOARD }, // Dragon Fighter by Flying Star
{ "test", TEST_BOARD },

View File

@ -107,7 +107,7 @@ enum
UNL_SF3, UNL_RACERMATE, UNL_EDU2K,
UNL_STUDYNGAME, UNL_603_5052, UNL_H2288, UNL_2708,
UNL_MALISB, UNL_AC08, UNL_A9746, UNL_WORLDHERO,
UNL_43272, UNL_TF1201, UNL_CITYFIGHT, UNL_RT01,
UNL_43272, UNL_TF1201, UNL_CITYFIGHT, UNL_NINJARYU, UNL_EH8813A, UNL_RT01,
/* Bootleg boards */
BTL_SMB2JA, BTL_MARIOBABY, BTL_AISENSHINICOL, BTL_TOBIDASE,
BTL_SMB2JB, BTL_09034A, BTL_SMB3, BTL_SBROS11, BTL_DRAGONNINJA,

View File

@ -49,6 +49,8 @@ DEFINE_DEVICE_TYPE(NES_WHERO, nes_whero_device, "nes_whero", "
DEFINE_DEVICE_TYPE(NES_43272, nes_43272_device, "nes_43272", "NES Cart UNL-43272 PCB")
DEFINE_DEVICE_TYPE(NES_TF1201, nes_tf1201_device, "nes_tf1201", "NES Cart UNL-TF1201 PCB")
DEFINE_DEVICE_TYPE(NES_CITYFIGHT, nes_cityfight_device, "nes_cityfight", "NES Cart City Fighter PCB")
DEFINE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device, "nes_ninjaryu", "NES Cart Ninja Ryukenden Chinese PCB")
DEFINE_DEVICE_TYPE(NES_EH8813A, nes_eh8813a_device, "nes_eh8813a", "NES Cart UNL-EH8813A PCB")
nes_agci_device::nes_agci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@ -126,6 +128,16 @@ nes_cityfight_device::nes_cityfight_device(const machine_config &mconfig, const
{
}
nes_ninjaryu_device::nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_NINJARYU, tag, owner, clock)
{
}
nes_eh8813a_device::nes_eh8813a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_nrom_device(mconfig, NES_EH8813A, tag, owner, clock), m_dipsetting(0), m_latch(0)
{
}
@ -405,6 +417,41 @@ void nes_cityfight_device::pcb_reset()
m_irq_count = 0;
}
void nes_ninjaryu_device::device_start()
{
common_start();
save_item(NAME(m_reg));
}
void nes_ninjaryu_device::pcb_reset()
{
m_reg[0] = 0x0f;
m_reg[1] = m_reg[2] = m_reg[3] = 0;
set_nt_mirroring(PPU_MIRROR_HORZ);
update_prg();
update_chr();
}
void nes_eh8813a_device::device_start()
{
common_start();
save_item(NAME(m_dipsetting));
save_item(NAME(m_latch));
}
void nes_eh8813a_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
prg16_89ab(0);
prg16_89ab(m_prg_chunks - 1);
chr8(0, m_chr_source);
set_nt_mirroring(PPU_MIRROR_VERT);
m_dipsetting = 0; // no means to adjust cart DIPs - unimplemented
m_latch = 0;
}
/*-------------------------------------------------
@ -571,7 +618,7 @@ void nes_futuremedia_device::write_h(offs_t offset, uint8_t data)
break;
case 0x5000:
set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
break;
case 0x4001:
@ -903,7 +950,7 @@ void nes_mk2_device::write_m(offs_t offset, uint8_t data)
/*-------------------------------------------------
UNL-WOLRDHERO board emulation
UNL-WORLDHERO board emulation
iNES:
@ -1069,7 +1116,7 @@ void nes_tf1201_device::write_h(offs_t offset, uint8_t data)
update_prg();
break;
case 0x1000:
set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
break;
case 0x1001:
m_swap = data & 0x03;
@ -1219,6 +1266,127 @@ void nes_cityfight_device::write_h(offs_t offset, uint8_t data)
}
/*-------------------------------------------------
UNL-NINJARYU
Games: Ninja Ryukenden Chinese
This board is mentioned on the NesDev page describing
mapper 111, which used to be assigned to this. It has
registers similar to MMC1 but without the need to write to
them serially. The one existing game has 256K CHR, so this
must have at least 1 more bit for CHR banking. Other differences?
In MAME: Preliminary supported.
-------------------------------------------------*/
void nes_ninjaryu_device::update_prg()
{
if (!BIT(m_reg[0], 3))
prg32((m_reg[3] >> 1) & 0x07); // 32K mode
else if (BIT(m_reg[0], 2))
{
prg16_89ab(m_reg[3] & 0x0f);
prg16_cdef(m_prg_chunks - 1); // 16K mode fixed last bank
}
else
{
prg16_89ab(0); // 16K mode fixed first bank
prg16_cdef(m_reg[3] & 0x0f);
}
}
void nes_ninjaryu_device::update_chr()
{
if (BIT(m_reg[0], 4))
{
chr4_0(m_reg[1], CHRROM);
chr4_4(m_reg[2], CHRROM);
}
else
chr8(m_reg[1] >> 1, CHRROM);
}
void nes_ninjaryu_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("unl_ninjaryu write_h, offset: %04x, data: %02x\n", offset, data));
m_reg[(offset >> 13) & 0x03] = data & 0x3f;
switch (offset & 0x6000)
{
case 0x0000:
switch (data & 0x03)
{
case 0x00: set_nt_mirroring(PPU_MIRROR_LOW); break;
case 0x01: set_nt_mirroring(PPU_MIRROR_HIGH); break;
case 0x02: set_nt_mirroring(PPU_MIRROR_VERT); break;
case 0x03: set_nt_mirroring(PPU_MIRROR_HORZ); break;
}
update_prg();
update_chr();
break;
case 0x2000:
case 0x4000:
update_chr();
break;
case 0x6000:
update_prg();
break;
}
}
/*-------------------------------------------------
UNL-EH8813A
Games: Dr. Mario II
Board is used in multicarts other than this? "BY ES"
in pause menu suggests this may be by Waixing. Title
menus change with DIP settings (currently unimplemented),
but it is unclear if PCB has switch or solder pads or...?
NES 2.0: mapper 519
In MAME: Preliminary supported.
-------------------------------------------------*/
void nes_eh8813a_device::write_h(offs_t offset, uint8_t data)
{
LOG_MMC(("unl_eh8813a write_h, offset: %04x, data: %02x\n", offset, data));
if (BIT(offset, 8))
return;
chr8(data & 0x7f, m_chr_source);
set_nt_mirroring(BIT(data, 7) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
uint8_t bank = offset & 0x3f;
if (BIT(offset, 7))
{
prg16_89ab(bank);
prg16_cdef(bank);
}
else
prg32(bank >> 1);
m_latch = BIT(offset, 6);
}
uint8_t nes_eh8813a_device::read_h(offs_t offset)
{
LOG_MMC(("unl_eh8813a read_h, offset: %04x\n", offset));
if (m_latch)
offset = (offset & 0xfff0) | m_dipsetting;
return hi_access_rom(offset);
}
#ifdef UNUSED_FUNCTION
/*-------------------------------------------------

View File

@ -349,6 +349,51 @@ private:
};
// ======================> nes_ninjaryu_device
class nes_ninjaryu_device : public nes_nrom_device
{
public:
// construction/destruction
nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
private:
void update_prg();
void update_chr();
uint8_t m_reg[4];
};
// ======================> nes_eh8813a_device
class nes_eh8813a_device : public nes_nrom_device
{
public:
// construction/destruction
nes_eh8813a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
virtual uint8_t read_h(offs_t offset) override;
virtual void write_h(offs_t offset, uint8_t data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
private:
uint8_t m_dipsetting, m_latch;
};
#ifdef UNUSED_FUNCTION
// ======================> nes_fujiya_device
@ -390,6 +435,8 @@ DECLARE_DEVICE_TYPE(NES_WHERO, nes_whero_device)
DECLARE_DEVICE_TYPE(NES_43272, nes_43272_device)
DECLARE_DEVICE_TYPE(NES_TF1201, nes_tf1201_device)
DECLARE_DEVICE_TYPE(NES_CITYFIGHT, nes_cityfight_device)
DECLARE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device)
DECLARE_DEVICE_TYPE(NES_EH8813A, nes_eh8813a_device)
//DECLARE_DEVICE_TYPE(NES_FUJIYA, nes_fujiya_device)
#endif // MAME_BUS_NES_PIRATE_H

View File

@ -75,7 +75,7 @@ void nes_state::machine_start()
|| m_cartslot->get_pcb_id() == BANDAI_DATACH || m_cartslot->get_pcb_id() == BANDAI_KARAOKE || m_cartslot->get_pcb_id() == UNL_2A03PURITANS || m_cartslot->get_pcb_id() == AVE_MAXI15 || m_cartslot->get_pcb_id() == BTL_PALTHENA
|| m_cartslot->get_pcb_id() == KAISER_KS7010 || m_cartslot->get_pcb_id() == KAISER_KS7022 || m_cartslot->get_pcb_id() == KAISER_KS7030 || m_cartslot->get_pcb_id() == KAISER_KS7031 || m_cartslot->get_pcb_id() == KAISER_KS7037 || m_cartslot->get_pcb_id() == KAISER_KS7057 || m_cartslot->get_pcb_id() == BMC_VT5201
|| m_cartslot->get_pcb_id() == UNL_LH32 || m_cartslot->get_pcb_id() == UNL_LH10 || m_cartslot->get_pcb_id() == UNL_2708 || m_cartslot->get_pcb_id() == UNL_RT01
|| m_cartslot->get_pcb_id() == UNL_43272 || m_cartslot->get_pcb_id() == BMC_G63IN1 || m_cartslot->get_pcb_id() == BMC_8157
|| m_cartslot->get_pcb_id() == UNL_43272 || m_cartslot->get_pcb_id() == UNL_EH8813A || m_cartslot->get_pcb_id() == BMC_G63IN1 || m_cartslot->get_pcb_id() == BMC_8157
|| m_cartslot->get_pcb_id() == BMC_GOLD150 || m_cartslot->get_pcb_id() == BMC_CH001
|| m_cartslot->get_pcb_id() == BMC_70IN1 || m_cartslot->get_pcb_id() == BMC_800IN1)
{