bus/nes: Added support for 820720C and JY820845C multicarts.

New working software list additions (nes.xml)
-----------------------------------
1993 Super HiK 8 in 1 (G-002) [NewRisingSun]
7 in 1 1993 Chess Series (JY-015) [Consolethinks, NewRisingSun]
This commit is contained in:
0kmg 2021-09-13 02:30:23 -08:00
parent e30ee3c9a2
commit e37c964756
9 changed files with 265 additions and 10 deletions

View File

@ -51820,6 +51820,24 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx
</part>
</software>
<software name="mc_7jy15">
<description>7 in 1 1993 Chess Series (JY-015)</description>
<year>1993</year>
<publisher>J.Y. Company</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_jy820845c" />
<dataarea name="prg" size="524288">
<rom name="7-in-1 1993 chess series (jy-015).prg" size="524288" crc="031145a4" sha1="8e3ac6091b56f1232b215ff71570511f73a5f60a" status="baddump" />
</dataarea>
<dataarea name="chr" size="131072">
<rom name="7-in-1 1993 chess series (jy-015).chr" size="131072" crc="9161bb42" sha1="948b1ffcc923de38dd1b60c69a189ca807571e17" status="baddump" />
</dataarea>
<!-- 8k WRAM on cartridge -->
<dataarea name="wram" size="8192">
</dataarea>
</part>
</software>
<software name="mc_4jy18">
<description>1996 Super HiK 4 in 1 (JY-018)</description>
<year>1996</year>
@ -82520,6 +82538,24 @@ to check why this is different -->
</part>
</software>
<software name="mc_sh8g2">
<description>1993 Super HiK 8 in 1 (G-002)</description>
<year>1993</year>
<publisher>&lt;pirate&gt;</publisher>
<part name="cart" interface="nes_cart">
<feature name="slot" value="bmc_820720c" />
<dataarea name="prg" size="1048576">
<rom name="1993 super hik 8-in-1 (g-002).prg" size="1048576" crc="7d53f79d" sha1="7bbd6ba60be45977a4b7f354619bf80132d594a4" status="baddump" />
</dataarea>
<dataarea name="chr" size="524288">
<rom name="1993 super hik 8-in-1 (g-002).chr" size="524288" crc="aed5ac3c" sha1="342f804a753fbcaccebd0094f151183b62356dd1" status="baddump" />
</dataarea>
<!-- 8k VRAM on cartridge -->
<dataarea name="vram" size="8192">
</dataarea>
</part>
</software>
<software name="mc_stv2">
<description>Super TV Game 2 in 1 (VT-414 PCB)</description>
<year>19??</year>

View File

@ -28,11 +28,17 @@
// constructor
//-------------------------------------------------
DEFINE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device, "nes_ninjaryu", "NES Cart Ninja Ryukenden Chinese PCB")
DEFINE_DEVICE_TYPE(NES_RESETSXROM, nes_resetsxrom_device, "nes_resetsxrom", "NES Cart BMC RESET-SXROM PCB")
DEFINE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device, "nes_txc_22110", "NES Cart TXC 01-22110-000 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_JY820845C, nes_bmc_jy820845c_device, "nes_bmc_jy820845c", "NES Cart BMC JY820845C PCB")
DEFINE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device, "nes_ninjaryu", "NES Cart Ninja Ryukenden Chinese PCB")
DEFINE_DEVICE_TYPE(NES_RESETSXROM, nes_resetsxrom_device, "nes_resetsxrom", "NES Cart BMC RESET-SXROM PCB")
DEFINE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device, "nes_txc_22110", "NES Cart TXC 01-22110-000 PCB")
nes_bmc_jy820845c_device::nes_bmc_jy820845c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_sxrom_device(mconfig, NES_BMC_JY820845C, tag, owner, clock), m_latch0(0), m_mode(0)
{
}
nes_ninjaryu_device::nes_ninjaryu_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_sxrom_device(mconfig, NES_NINJARYU, tag, owner, clock)
{
@ -50,6 +56,22 @@ nes_txc_22110_device::nes_txc_22110_device(const machine_config &mconfig, const
void nes_bmc_jy820845c_device::device_start()
{
nes_sxrom_device::device_start();
save_item(NAME(m_latch0));
save_item(NAME(m_mode));
}
void nes_bmc_jy820845c_device::pcb_reset()
{
nes_sxrom_device::pcb_reset();
m_latch0 = 0;
m_mode = 0;
update_banks();
}
void nes_resetsxrom_device::device_start()
{
nes_sxrom_device::device_start();
@ -115,6 +137,57 @@ void nes_ninjaryu_device::write_h(offs_t offset, u8 data)
-------------------------------------------------*/
/*-------------------------------------------------
BMC-JY820845C
Games: 7 in 1 1993 Chess Series (JY-015)
MMC1 clone with banking for multigame menu.
NES 2.0: mapper 550
In MAME: Supported.
-------------------------------------------------*/
void nes_bmc_jy820845c_device::update_banks() // used by menu and MHROM games
{
prg32((m_mode & 0x07) << 1 | BIT(m_latch0, 4));
chr8((m_mode & 0x06) << 1 | (m_latch0 & 0x03), CHRROM);
}
void nes_bmc_jy820845c_device::write_m(offs_t offset, u8 data)
{
LOG_MMC(("bmc_jy820845c write_m, offset: %04x, data: %02x\n", offset, data));
nes_sxrom_device::write_m(offset, data); // register overlaid on WRAM
if (offset >= 0x1000 && !BIT(m_mode, 3))
{
m_mode = offset & 0x0f;
if ((m_mode & 0x06) == 0x06) // MMC1 mode
{
set_prg();
set_chr();
}
else
update_banks();
}
}
void nes_bmc_jy820845c_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_jy820845c write_h, offset: %04x, data: %02x\n", offset, data));
m_latch0 = data;
if ((m_mode & 0x06) == 0x06)
nes_sxrom_device::write_h(offset, data);
else
update_banks();
}
/*-------------------------------------------------
BMC-RESET-SXROM

View File

@ -8,6 +8,32 @@
#include "mmc1.h"
// ======================> nes_bmc_jy820845c_device
class nes_bmc_jy820845c_device : public nes_sxrom_device
{
public:
// construction/destruction
nes_bmc_jy820845c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_m(offs_t offset, u8 data) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void set_prg() override { nes_sxrom_device::set_prg(0x18, 0x07); }
virtual void set_chr() override { nes_sxrom_device::set_chr(0x18, 0x07); }
private:
void update_banks();
u8 m_latch0, m_mode;
};
// ======================> nes_ninjaryu_device
class nes_ninjaryu_device : public nes_sxrom_device
@ -73,8 +99,9 @@ private:
// device type definition
DECLARE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device)
DECLARE_DEVICE_TYPE(NES_RESETSXROM, nes_resetsxrom_device)
DECLARE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device)
DECLARE_DEVICE_TYPE(NES_BMC_JY820845C, nes_bmc_jy820845c_device)
DECLARE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device)
DECLARE_DEVICE_TYPE(NES_RESETSXROM, nes_resetsxrom_device)
DECLARE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device)
#endif // MAME_BUS_NES_MMC1_CLONES_H

View File

@ -73,6 +73,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_GN45, nes_bmc_gn45_device, "nes_bmc_gn45",
DEFINE_DEVICE_TYPE(NES_BMC_GOLD7IN1, nes_bmc_gold7in1_device, "nes_bmc_gold7in1", "NES Cart BMC Golden 7 in 1 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_K3006, nes_bmc_k3006_device, "nes_bmc_k3006", "NES Cart BMC K-3006 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_411120C, nes_bmc_411120c_device, "nes_bmc_411120c", "NES Cart BMC 411120C PCB")
DEFINE_DEVICE_TYPE(NES_BMC_820720C, nes_bmc_820720c_device, "nes_bmc_820720c", "NES Cart BMC 820720C PCB")
DEFINE_DEVICE_TYPE(NES_BMC_830118C, nes_bmc_830118c_device, "nes_bmc_830118c", "NES Cart BMC 830118C PCB")
DEFINE_DEVICE_TYPE(NES_BMC_830832C, nes_bmc_830832c_device, "nes_bmc_830832c", "NES Cart BMC 830832C PCB")
DEFINE_DEVICE_TYPE(NES_BMC_841101C, nes_bmc_841101c_device, "nes_bmc_841101c", "NES Cart BMC 841101C PCB")
@ -325,6 +326,11 @@ nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, co
{
}
nes_bmc_820720c_device::nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_txrom_device(mconfig, NES_BMC_820720C, tag, owner, clock), m_reg(0)
{
}
nes_bmc_830118c_device::nes_bmc_830118c_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: nes_txrom_device(mconfig, NES_BMC_830118C, tag, owner, clock), m_reg(0)
{
@ -752,6 +758,20 @@ void nes_bmc_411120c_device::pcb_reset()
mmc3_common_initialize(0x0f, 0x7f, 0);
}
void nes_bmc_820720c_device::device_start()
{
mmc3_start();
save_item(NAME(m_reg));
}
void nes_bmc_820720c_device::pcb_reset()
{
m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
m_reg = 0;
mmc3_common_initialize(0x0f, 0xff, 0);
}
void nes_bmc_830118c_device::device_start()
{
mmc3_start();
@ -2633,6 +2653,75 @@ void nes_bmc_411120c_device::write_m(offs_t offset, u8 data)
}
}
/*-------------------------------------------------
BMC-820720C
Games: 1993 Super HiK 8 in 1 (G-002)
MMC3 clone with banking for multigame menu.
NES 2.0: mapper 393
In MAME: Supported.
-------------------------------------------------*/
void nes_bmc_820720c_device::set_prg(int prg_base, int prg_mask)
{
switch (m_reg >> 4)
{
case 0: // MMC3 mode
case 1:
nes_txrom_device::set_prg(prg_base, prg_mask);
break;
case 2: // BNROM mode
prg32((prg_base | (m_mmc_prg_bank[BIT(m_latch, 6) << 1] & prg_mask)) >> 2);
break;
case 3: // UNROM mode
prg16_89ab(m_prg_base >> 1);
prg16_cdef(m_prg_base >> 1 | 0x07);
break;
}
}
void nes_bmc_820720c_device::set_chr(u8 chr, int chr_base, int chr_mask)
{
if (BIT(m_reg, 3))
chr8(0, CHRRAM);
else
nes_txrom_device::set_chr(chr, chr_base, chr_mask);
}
void nes_bmc_820720c_device::write_m(offs_t offset, u8 data)
{
LOG_MMC(("bmc_820720c write_m, offset: %04x, data: %02x\n", offset, data));
if ((m_wram_protect & 0xc0) == 0x80)
{
m_reg = offset & 0x3f;
m_prg_base = (m_reg & 0x07) << 4;
set_prg(m_prg_base, m_prg_mask);
m_chr_base = (m_reg & 0x01) << 8;
set_chr(m_chr_source, m_chr_base, m_chr_mask);
}
}
void nes_bmc_820720c_device::write_h(offs_t offset, u8 data)
{
LOG_MMC(("bmc_820720c write_h, offset: %04x, data: %02x\n", offset, data));
txrom_write(offset, data); // MMC3 regs always written (for mirroring in non-MMC3 modes)
if ((m_reg & 0x30) == 0x30) // UNROM mode
{
prg16_89ab(m_prg_base >> 1 | (data & 0x07));
prg16_cdef(m_prg_base >> 1 | 0x07);
}
}
/*-------------------------------------------------
BMC-830118C

View File

@ -833,6 +833,31 @@ private:
};
// ======================> nes_bmc_820720c_device
class nes_bmc_820720c_device : public nes_txrom_device
{
public:
// construction/destruction
nes_bmc_820720c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
virtual void write_m(offs_t offset, u8 data) override;
virtual void write_h(offs_t offset, u8 data) override;
virtual void pcb_reset() override;
protected:
// device-level overrides
virtual void device_start() override;
virtual void set_prg(int prg_base, int prg_mask) override;
virtual void set_chr(u8 chr, int chr_base, int chr_mask) override;
private:
u8 m_reg;
};
// ======================> nes_bmc_830118c_device
class nes_bmc_830118c_device : public nes_txrom_device
@ -973,6 +998,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_GN45, nes_bmc_gn45_device)
DECLARE_DEVICE_TYPE(NES_BMC_GOLD7IN1, nes_bmc_gold7in1_device)
DECLARE_DEVICE_TYPE(NES_BMC_K3006, nes_bmc_k3006_device)
DECLARE_DEVICE_TYPE(NES_BMC_411120C, nes_bmc_411120c_device)
DECLARE_DEVICE_TYPE(NES_BMC_820720C, nes_bmc_820720c_device)
DECLARE_DEVICE_TYPE(NES_BMC_830118C, nes_bmc_830118c_device)
DECLARE_DEVICE_TYPE(NES_BMC_830832C, nes_bmc_830832c_device)
DECLARE_DEVICE_TYPE(NES_BMC_841101C, nes_bmc_841101c_device)

View File

@ -374,6 +374,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("bmc_810544c", NES_BMC_810544C);
device.option_add_internal("bmc_830425c", NES_BMC_830425C);
device.option_add_internal("bmc_850437c", NES_BMC_850437C);
device.option_add_internal("bmc_jy820845c", NES_BMC_JY820845C);
device.option_add_internal("n32_4in1", NES_N32_4IN1);
device.option_add_internal("ntd03", NES_NTD03);
device.option_add_internal("bmc_ctc09", NES_BMC_CTC09);
@ -443,6 +444,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("bmc_gn45", NES_BMC_GN45);
device.option_add_internal("bmc_gold7in1", NES_BMC_GOLD7IN1);
device.option_add_internal("bmc_411120c", NES_BMC_411120C);
device.option_add_internal("bmc_820720c", NES_BMC_820720C);
device.option_add_internal("bmc_830118c", NES_BMC_830118C);
device.option_add_internal("bmc_830832c", NES_BMC_830832C);
device.option_add_internal("bmc_841101c", NES_BMC_841101C);

View File

@ -428,7 +428,7 @@ static const nes_mmc mmc_list[] =
// 390 variant of mapper 236?
// 391 BS-110 MMC3 clone
// 392 8-in-1 variant of mc_sv16
// 393 820720C multicart
{ 393, BMC_820720C },
// 394 Realtec HSK007 multicart
// 395 Realtec 8210 multicarts
{ 396, BMC_850437C },
@ -510,7 +510,7 @@ static const nes_mmc mmc_list[] =
// 547 Konami QTa adapter games
// { 548, BTL_CTC15 }, // Almana no Kiseki alt FDS conversion (dump available?)
{ 549, KAISER_KS7016B }, // Meikyuu Jiin Dababa alt FDS conversion
// 550 JY-015 multicart
{ 550, BMC_JY820845C },
// 551 variant of mapper 178, likely shenghuo, jingkzx, xiaokecq, zgfyun in nes.xml
// 552 TAITO_X1_017, this is a correction of mapper 82. We should drop 82 and only support the accurate dumps of 552?
{ 553, SACHEN_3013 }, // Dong Dong Nao 1

View File

@ -259,6 +259,7 @@ static const nes_pcb pcb_list[] =
{ "bmc_810544c", BMC_810544C },
{ "bmc_830425c", BMC_830425C },
{ "bmc_850437c", BMC_850437C },
{ "bmc_jy820845c", BMC_JY820845C },
{ "n32_4in1", BMC_N32_4IN1 },
{ "ntd03", BMC_NTD_03 },
{ "bmc_ctc09", BMC_CTC09 },
@ -320,6 +321,7 @@ static const nes_pcb pcb_list[] =
{ "bmc_gn45", BMC_GN45 },
{ "bmc_gold7in1", BMC_GOLD_7IN1 },
{ "bmc_411120c", BMC_411120C },
{ "bmc_820720c", BMC_820720C },
{ "bmc_830118c", BMC_830118C },
{ "bmc_830832c", BMC_830832C },
{ "bmc_841101c", BMC_841101C },

View File

@ -98,9 +98,9 @@ enum
BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_HP898F, BMC_VT5201, BMC_BENSHIENG,
BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_850437C,
BMC_N32_4IN1, BMC_NT639, BMC_NTD_03, BMC_G63IN1,
BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA,
BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA, BMC_JY820845C,
BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146,
BMC_2751, BMC_8157, BMC_830118C, BMC_830832C, BMC_841101C,
BMC_2751, BMC_8157, BMC_820720C, BMC_830118C, BMC_830832C, BMC_841101C,
BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_SUPER22,
BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160, BMC_CTC09,
BMC_K1029, BMC_K3006, BMC_K3036, BMC_K3046, BMC_SA005A, BMC_TJ03,