summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author ajrhacker <ajrhacker@users.noreply.github.com>2021-09-18 10:48:54 -0400
committer GitHub <noreply@github.com>2021-09-18 10:48:54 -0400
commit40c382bdbcb8a337fcaf9a7855a9ca483adc6161 (patch)
tree9e22044b6a278b84537067ebde70348e6e494252
parent079300de6d5a2f92231a20fdade2645772e1b6d2 (diff)
parent3f7fe14addcdca95653a71755ff3025b7221554b (diff)
Merge pull request #8584 from 0kmg/nes-mappers-382,392
bus/nes: Added support for two more multicarts.
-rw-r--r--hash/nes.xml40
-rw-r--r--src/devices/bus/nes/mmc3_clones.cpp70
-rw-r--r--src/devices/bus/nes/mmc3_clones.h25
-rw-r--r--src/devices/bus/nes/multigame.cpp57
-rw-r--r--src/devices/bus/nes/multigame.h22
-rw-r--r--src/devices/bus/nes/nes_carts.cpp2
-rw-r--r--src/devices/bus/nes/nes_ines.hxx4
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx2
-rw-r--r--src/devices/bus/nes/nes_slot.h5
9 files changed, 222 insertions, 5 deletions
diff --git a/hash/nes.xml b/hash/nes.xml
index 912d6bee346..91f4ead3e79 100644
--- a/hash/nes.xml
+++ b/hash/nes.xml
@@ -81111,6 +81111,29 @@ be better to redump them properly. -->
</part>
</software>
+<!-- All games work except Ninja Gaiden 2 which has the same issues as the set nryuken2 -->
+ <software name="mc_8sv" supported="partial">
+ <description>Super 8 in 1 (Supervision menu)</description>
+ <year>199?</year>
+ <publisher>&lt;pirate&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="bmc_00202650" />
+ <feature name="pcb_model" value="00202650" />
+ <dataarea name="prg" size="1081344">
+ <rom name="u2.prg" size="524288" crc="f9b3b492" sha1="dfb64f4d2b8336d1ea5d304461b4c049a6dab018" offset="0x000000" />
+ <rom name="u3.prg" size="524288" crc="f1a344a8" sha1="7311d1f107085b33208084cad7bde9047aa23903" offset="0x080000" />
+ <rom name="u1.prg" size="32768" crc="0336a65a" sha1="a3cc32158e3997b12e38988dcc6295c0610e9009" offset="0x100000" />
+ </dataarea>
+ <dataarea name="chr" size="1048576">
+ <rom name="u10.prg" size="524288" crc="05c893e1" sha1="c9f1648eab7ec1b8d226dfae3dd2a0cab1daaf29" offset="0x000000" />
+ <rom name="u4.prg" size="524288" crc="688e9442" sha1="b7d293358ffca7ec8b9398b1a78abe98ef56522f" offset="0x080000" />
+ </dataarea>
+ <!-- 8k VRAM on cartridge -->
+ <dataarea name="vram" size="8192">
+ </dataarea>
+ </part>
+ </software>
+
<software name="mc_80" supported="no">
<description>80 in 1</description>
<year>19??</year>
@@ -81224,6 +81247,23 @@ be better to redump them properly. -->
</part>
</software>
+<!-- All games work except Journey to the West which has the same issues as the set jwest -->
+ <software name="mc_9jw" supported="partial">
+ <description>9 in 1 (Journey to the West)</description>
+ <year>199?</year>
+ <publisher>&lt;pirate&gt;</publisher>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="bmc_830928c" />
+ <feature name="pcb_model" value="830928C" />
+ <dataarea name="prg" size="1048576">
+ <rom name="9-in-1.prg" size="1048576" crc="c41b19ac" sha1="ca6a70dff922864e53cfd37689b073c647b67097" status="baddump" />
+ </dataarea>
+ <!-- 8k VRAM on cartridge -->
+ <dataarea name="vram" size="8192">
+ </dataarea>
+ </part>
+ </software>
+
<software name="mc_9king" supported="partial">
<description>9 in 1 King001</description>
<year>19??</year>
diff --git a/src/devices/bus/nes/mmc3_clones.cpp b/src/devices/bus/nes/mmc3_clones.cpp
index 4ab3aa8b6ec..7f272e15828 100644
--- a/src/devices/bus/nes/mmc3_clones.cpp
+++ b/src/devices/bus/nes/mmc3_clones.cpp
@@ -72,6 +72,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_F15, nes_bmc_f15_device, "nes_bmc_f15",
DEFINE_DEVICE_TYPE(NES_BMC_GN45, nes_bmc_gn45_device, "nes_bmc_gn45", "NES Cart BMC GN-45 PCB")
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_00202650, nes_bmc_00202650_device, "nes_bmc_00202650", "NES Cart BMC 00202650 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")
@@ -321,6 +322,11 @@ nes_bmc_k3006_device::nes_bmc_k3006_device(const machine_config &mconfig, const
{
}
+nes_bmc_00202650_device::nes_bmc_00202650_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_txrom_device(mconfig, NES_BMC_00202650, tag, owner, clock), m_mmc3_mode(false)
+{
+}
+
nes_bmc_411120c_device::nes_bmc_411120c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_txrom_device(mconfig, NES_BMC_411120C, tag, owner, clock), m_reg(0)
{
@@ -744,6 +750,24 @@ void nes_bmc_k3006_device::pcb_reset()
prg16_cdef(0);
}
+void nes_bmc_00202650_device::device_start()
+{
+ mmc3_start();
+ save_item(NAME(m_mmc3_mode));
+}
+
+void nes_bmc_00202650_device::pcb_reset()
+{
+ m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM;
+
+ m_mmc3_mode = false;
+ mmc3_common_initialize(0x0f, 0x7f, 0);
+
+ // PCB has an extra 32KB boot menu chip, only the menu uses the CHRRAM
+ prg32((m_prg_chunks >> 1) - 1);
+ chr8(0, CHRRAM);
+}
+
void nes_bmc_411120c_device::device_start()
{
mmc3_start();
@@ -2616,6 +2640,52 @@ void nes_bmc_k3006_device::write_m(offs_t offset, u8 data)
/*-------------------------------------------------
+ BMC-00202650
+
+ Games: 8 in 1
+
+ MMC3 clone with banking for multigame menu.
+
+ NES 2.0: mapper 392
+
+ In MAME: Supported.
+
+ TODO: Soft reset does work for some games some of the
+ time. Seems to be caused by main RAM contents. Does
+ this happen on hardware?
+
+ -------------------------------------------------*/
+
+void nes_bmc_00202650_device::set_prg(int prg_base, int prg_mask)
+{
+ if (m_mmc3_mode)
+ nes_txrom_device::set_prg(prg_base, prg_mask);
+}
+
+void nes_bmc_00202650_device::set_chr(u8 chr, int chr_base, int chr_mask)
+{
+ if (m_mmc3_mode)
+ nes_txrom_device::set_chr(chr, chr_base, chr_mask);
+}
+
+void nes_bmc_00202650_device::write_m(offs_t offset, u8 data)
+{
+ LOG_MMC(("bmc_00202650 write_m, offset: %04x, data: %02x\n", offset, data));
+
+ if (!m_mmc3_mode)
+ {
+ m_mmc3_mode = BIT(data, 4);
+
+ m_prg_base = (data & 0x07) << 4;
+ set_prg(m_prg_base, m_prg_mask);
+
+ m_chr_base = m_prg_base << 3;
+ set_chr(m_chr_source, m_chr_base, m_chr_mask);
+ }
+}
+
+/*-------------------------------------------------
+
BMC-411120C, BMC-810849-C
Games: 4 in 1, 19 in 1
diff --git a/src/devices/bus/nes/mmc3_clones.h b/src/devices/bus/nes/mmc3_clones.h
index ce2a01b91eb..ba86ed4ab2d 100644
--- a/src/devices/bus/nes/mmc3_clones.h
+++ b/src/devices/bus/nes/mmc3_clones.h
@@ -811,6 +811,30 @@ public:
};
+// ======================> nes_bmc_00202650_device
+
+class nes_bmc_00202650_device : public nes_txrom_device
+{
+public:
+ // construction/destruction
+ nes_bmc_00202650_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 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:
+ bool m_mmc3_mode;
+};
+
+
// ======================> nes_bmc_411120c_device
class nes_bmc_411120c_device : public nes_txrom_device
@@ -997,6 +1021,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_F15, nes_bmc_f15_device)
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_00202650, nes_bmc_00202650_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)
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp
index 1bca4da8c9f..05f0b9e1aef 100644
--- a/src/devices/bus/nes/multigame.cpp
+++ b/src/devices/bus/nes/multigame.cpp
@@ -44,6 +44,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_60311C, nes_bmc_60311c_device, "nes_bmc_60311
DEFINE_DEVICE_TYPE(NES_BMC_80013B, nes_bmc_80013b_device, "nes_bmc_80013b", "NES Cart BMC 80013-B PCB")
DEFINE_DEVICE_TYPE(NES_BMC_810544C, nes_bmc_810544c_device, "nes_bmc_810544c", "NES Cart BMC 810544-C-A1 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_830425C, nes_bmc_830425c_device, "nes_bmc_830425c", "NES Cart BMC 830425C-4391T PCB")
+DEFINE_DEVICE_TYPE(NES_BMC_830928C, nes_bmc_830928c_device, "nes_bmc_830928c", "NES Cart BMC 830928C PCB")
DEFINE_DEVICE_TYPE(NES_BMC_850437C, nes_bmc_850437c_device, "nes_bmc_850437c", "NES Cart BMC 850437C PCB")
DEFINE_DEVICE_TYPE(NES_NTD03, nes_ntd03_device, "nes_ntd03", "NES Cart NTD-03 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device, "nes_bmc_ctc09", "NES Cart BMC CTC-09 PCB")
@@ -193,6 +194,11 @@ nes_bmc_830425c_device::nes_bmc_830425c_device(const machine_config &mconfig, co
{
}
+nes_bmc_830928c_device::nes_bmc_830928c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_nrom_device(mconfig, NES_BMC_830928C, tag, owner, clock), m_latch(0)
+{
+}
+
nes_bmc_850437c_device::nes_bmc_850437c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_850437C, tag, owner, clock)
{
@@ -627,6 +633,21 @@ void nes_bmc_830425c_device::pcb_reset()
m_latch = 0;
}
+void nes_bmc_830928c_device::device_start()
+{
+ common_start();
+ save_item(NAME(m_latch));
+}
+
+void nes_bmc_830928c_device::pcb_reset()
+{
+ prg16_89ab(0);
+ prg16_cdef(7);
+ chr8(0, CHRRAM);
+
+ m_latch = 0;
+}
+
void nes_bmc_850437c_device::device_start()
{
common_start();
@@ -1527,7 +1548,6 @@ void nes_bmc_810544c_device::write_h(offs_t offset, u8 data)
chr8(offset & 0x0f, CHRROM);
}
-
/*-------------------------------------------------
BMC-830425C-4391T
@@ -1555,6 +1575,41 @@ void nes_bmc_830425c_device::write_h(offs_t offset, u8 data)
/*-------------------------------------------------
+ BMC-830928C
+
+ Games: 9 in 1
+
+ NES 2.0: mapper 382
+
+ In MAME: Supported.
+
+ -------------------------------------------------*/
+
+void nes_bmc_830928c_device::write_h(offs_t offset, u8 data)
+{
+ LOG_MMC(("bmc_830928c write_h, offset: %04x, data: %02x\n", offset, data));
+
+ // this pcb is subject to bus conflict
+ data = account_bus_conflict(offset, data);
+
+ if (!BIT(m_latch, 5))
+ {
+ m_latch = offset & 0x3f;
+ set_nt_mirroring(BIT(m_latch, 4) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+ }
+
+ u8 outer = (m_latch & 0x07) << 3;
+ if (BIT(m_latch, 3)) // BNROM mode
+ prg32(outer >> 1 | (data & 0x03));
+ else // UNROM mode
+ {
+ prg16_89ab(outer | (data & 0x07));
+ prg16_cdef(outer | 7);
+ }
+}
+
+/*-------------------------------------------------
+
BMC-850437C
Games: Super 8-in-1 (JY-050 rev0, JY-085, JY-086)
diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h
index 5d7f2838988..f2381ed955b 100644
--- a/src/devices/bus/nes/multigame.h
+++ b/src/devices/bus/nes/multigame.h
@@ -306,6 +306,27 @@ private:
};
+// ======================> nes_bmc_830928c_device
+
+class nes_bmc_830928c_device : public nes_nrom_device
+{
+public:
+ // construction/destruction
+ nes_bmc_830928c_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+ virtual void write_h(offs_t offset, u8 data) override;
+
+ virtual void pcb_reset() override;
+
+protected:
+ // device-level overrides
+ virtual void device_start() override;
+
+private:
+ u8 m_latch;
+};
+
+
// ======================> nes_bmc_850437c_device
class nes_bmc_850437c_device : public nes_nrom_device
@@ -1126,6 +1147,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_60311C, nes_bmc_60311c_device)
DECLARE_DEVICE_TYPE(NES_BMC_80013B, nes_bmc_80013b_device)
DECLARE_DEVICE_TYPE(NES_BMC_810544C, nes_bmc_810544c_device)
DECLARE_DEVICE_TYPE(NES_BMC_830425C, nes_bmc_830425c_device)
+DECLARE_DEVICE_TYPE(NES_BMC_830928C, nes_bmc_830928c_device)
DECLARE_DEVICE_TYPE(NES_BMC_850437C, nes_bmc_850437c_device)
DECLARE_DEVICE_TYPE(NES_NTD03, nes_ntd03_device)
DECLARE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device)
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index ac1ee9ef844..873f62c5616 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -371,6 +371,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("bmc_60311c", NES_BMC_60311C);
device.option_add_internal("bmc_80013b", NES_BMC_80013B);
device.option_add_internal("bmc_810544c", NES_BMC_810544C);
+ device.option_add_internal("bmc_830928c", NES_BMC_830928C);
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);
@@ -440,6 +441,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("bmc_f15", NES_BMC_F15);
device.option_add_internal("bmc_gn45", NES_BMC_GN45);
device.option_add_internal("bmc_gold7in1", NES_BMC_GOLD7IN1);
+ device.option_add_internal("bmc_00202650", NES_BMC_00202650);
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);
diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx
index b98f3ac5284..f7a1790b210 100644
--- a/src/devices/bus/nes/nes_ines.hxx
+++ b/src/devices/bus/nes/nes_ines.hxx
@@ -417,7 +417,7 @@ static const nes_mmc mmc_list[] =
// 379 35-in-1 multicart, similar to mapper 38
// 380 970630C multicart
{ 381, UNL_KN42 }, // 2-in-1 Big Nose games
- // 382 830928C 5-in-1 and 9-in-1 multicarts
+ { 382, BMC_830928C },
// 383 JY-014 multicart
// 384 4-in-1 VRC4 clone with Crisis Force
// 385 NTDEC 2779 5-in-1, not in nes.xml?
@@ -427,7 +427,7 @@ static const nes_mmc mmc_list[] =
{ 389, CALTRON_9IN1 },
// 390 variant of mapper 236?
// 391 BS-110 MMC3 clone
- // 392 8-in-1 variant of mc_sv16
+ { 392, BMC_00202650 },
{ 393, BMC_820720C },
// 394 Realtec HSK007 multicart
// 395 Realtec 8210 multicarts
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index ae24bc1e7e0..f57614e27b4 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -257,6 +257,7 @@ static const nes_pcb pcb_list[] =
{ "bmc_80013b", BMC_80013B },
{ "bmc_810544c", BMC_810544C },
{ "bmc_830425c", BMC_830425C },
+ { "bmc_830928c", BMC_830928C },
{ "bmc_850437c", BMC_850437C },
{ "bmc_jy820845c", BMC_JY820845C },
{ "n32_4in1", BMC_N32_4IN1 },
@@ -318,6 +319,7 @@ static const nes_pcb pcb_list[] =
{ "bmc_f15", BMC_F15 },
{ "bmc_gn45", BMC_GN45 },
{ "bmc_gold7in1", BMC_GOLD_7IN1 },
+ { "bmc_00202650", BMC_00202650 },
{ "bmc_411120c", BMC_411120C },
{ "bmc_820720c", BMC_820720C },
{ "bmc_830118c", BMC_830118C },
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index ac5a12889b2..4fddd287a5b 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -96,11 +96,12 @@ enum
BMC_31IN1, BMC_22GAMES, BMC_20IN1,
BMC_70IN1, BMC_500IN1, BMC_800IN1, BMC_1200IN1,
BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_HP898F, BMC_VT5201, BMC_BENSHIENG,
- BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_850437C,
+ BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_830928C, BMC_850437C,
BMC_N32_4IN1, BMC_NT639, BMC_NTD_03, BMC_G63IN1,
BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA, BMC_JY820845C,
BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146,
- BMC_2751, BMC_8157, BMC_820720C, BMC_830118C, BMC_830832C, BMC_841101C,
+ BMC_2751, BMC_8157, BMC_00202650,
+ BMC_820720C, BMC_830118C, BMC_830832C, BMC_841101C,
BMC_411120C, BMC_GOLD150, BMC_GOLD260,
BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160, BMC_CTC09,
BMC_K1029, BMC_K3006, BMC_K3036, BMC_K3046, BMC_SA005A, BMC_TJ03,