summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author 0kmg <9137159+0kmg@users.noreply.github.com>2022-04-06 14:15:30 -0800
committer GitHub <noreply@github.com>2022-04-06 18:15:30 -0400
commite65b7309898f9f0a2571221e8652ae187faa6ca8 (patch)
tree3647c07f6b47968f5d7b67b6fc80e2cefe0bc6cf
parent9abd5faf4c153970d9b9d6905a0a1b681af899de (diff)
bus/nes: Added support for multicart board DS-9-27. (#9525)
New working software list additions (nes.xml) ----------------------------------- Gàishì 190 in 1 [Consolethinks]
-rw-r--r--hash/nes.xml20
-rw-r--r--src/devices/bus/nes/multigame.cpp91
-rw-r--r--src/devices/bus/nes/multigame.h23
-rw-r--r--src/devices/bus/nes/nes_carts.cpp1
-rw-r--r--src/devices/bus/nes/nes_ines.hxx8
-rw-r--r--src/devices/bus/nes/nes_pcb.hxx1
-rw-r--r--src/devices/bus/nes/nes_slot.h2
-rw-r--r--src/mame/machine/nes.cpp1
8 files changed, 145 insertions, 2 deletions
diff --git a/hash/nes.xml b/hash/nes.xml
index bfda46a5473..9668bb0c9dc 100644
--- a/hash/nes.xml
+++ b/hash/nes.xml
@@ -81184,6 +81184,26 @@ be better to redump them properly. -->
</part>
</software>
+ <software name="mc_190a">
+ <description>Gàishì 190 in 1</description>
+ <year>1992</year>
+ <publisher>&lt;pirate&gt;</publisher>
+ <info name="alt_title" value="1992 蓋世 190-in-1"/>
+ <part name="cart" interface="nes_cart">
+ <feature name="slot" value="bmc_ds927" />
+ <feature name="pcb_model" value="DS-9-27" />
+ <dataarea name="prg" size="1048576">
+ <rom name="190-in-1.prg" size="1048576" crc="ef212a73" sha1="8667ab8e727dc340ba082097ca906e85424e7cd3" />
+ </dataarea>
+ <!-- 8k VRAM on cartridge -->
+ <dataarea name="vram" size="8192">
+ </dataarea>
+ <!-- 8k WRAM on cartridge -->
+ <dataarea name="wram" size="8192">
+ </dataarea>
+ </part>
+ </software>
+
<software name="mc_1500">
<description>1500 in 1</description>
<year>199?</year>
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp
index 5f3d7ea6724..58d6cc25624 100644
--- a/src/devices/bus/nes/multigame.cpp
+++ b/src/devices/bus/nes/multigame.cpp
@@ -56,6 +56,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_970630C, nes_bmc_970630c_device, "nes_bmc_97063
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")
DEFINE_DEVICE_TYPE(NES_BMC_CTC12IN1, nes_bmc_ctc12in1_device, "nes_bmc_ctc12in1", "NES Cart BMC CTC-12IN1 PCB")
+DEFINE_DEVICE_TYPE(NES_BMC_DS927, nes_bmc_ds927_device, "nes_bmc_ds927", "NES Cart BMC DS-9-27 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_FAM250, nes_bmc_fam250_device, "nes_bmc_fam250", "NES Cart BMC FAM250 PCB")
DEFINE_DEVICE_TYPE(NES_BMC_GKA, nes_bmc_gka_device, "nes_bmc_gka", "NES Cart BMC GK-A PCB")
DEFINE_DEVICE_TYPE(NES_BMC_GKB, nes_bmc_gkb_device, "nes_bmc_gkb", "NES Cart BMC GK-B PCB")
@@ -239,6 +240,11 @@ nes_bmc_ctc09_device::nes_bmc_ctc09_device(const machine_config &mconfig, const
{
}
+nes_bmc_ds927_device::nes_bmc_ds927_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
+ : nes_nrom_device(mconfig, NES_BMC_DS927, tag, owner, clock), m_latch(0), m_mode(0)
+{
+}
+
nes_bmc_gka_device::nes_bmc_gka_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
: nes_nrom_device(mconfig, NES_BMC_GKA, tag, owner, clock)
{
@@ -761,6 +767,24 @@ void nes_bmc_ctc09_device::pcb_reset()
// contents?). Soft reset can similarly crash the main menu (BTANB?).
}
+void nes_bmc_ds927_device::device_start()
+{
+ common_start();
+ save_item(NAME(m_latch));
+ save_item(NAME(m_mode));
+}
+
+void nes_bmc_ds927_device::pcb_reset()
+{
+ assert(m_prgram.size() >= 0x2000);
+
+ prg16_89ab(0);
+ prg16_cdef(0);
+
+ m_latch = 0;
+ m_mode = 0;
+}
+
void nes_bmc_gka_device::device_start()
{
common_start();
@@ -1860,6 +1884,73 @@ void nes_bmc_ctc09_device::write_h(offs_t offset, u8 data)
/*-------------------------------------------------
+ Board DS-9-27
+
+ Games: 190 in 1
+
+ Bizarro board of mostly simple games that has
+ 8K of WRAM that is mappable, with mirroring in
+ NROM128 mode, to anywhere in upper memory.
+
+ NES 2.0: mapper 452
+
+ In MAME: Supported.
+
+ -------------------------------------------------*/
+
+u8 nes_bmc_ds927_device::read_h(offs_t offset)
+{
+// LOG_MMC(("bmc_ds927 read_h, offset: %04x\n", offset));
+
+ int bits = m_mode == 1 ? 1 : 2;
+
+ if (BIT(offset, 13, bits) == BIT(m_latch, 4, bits))
+ return m_prgram[offset & 0x1fff];
+
+ return hi_access_rom(offset);
+}
+
+void nes_bmc_ds927_device::write_h(offs_t offset, u8 data)
+{
+ LOG_MMC(("bmc_ds927 write_h, offset: %04x, data: %02x\n", offset, data));
+
+ if (offset < 0x6000)
+ {
+ m_latch = data;
+ m_mode = bitswap<2>(data, 3, 1);
+
+ int bank = BIT(offset, 1, 7);
+
+ switch (m_mode)
+ {
+ case 0:
+ prg16_89ab(bank >> 1);
+ prg16_cdef(0);
+ break;
+ case 1:
+ for (int i = 0; i < 4; i++)
+ prg8_x(i, bank);
+ break;
+ case 2:
+ case 3:
+ prg8_89(bank);
+ prg8_ab(bank | 1);
+ prg8_cd(bank | 2);
+ prg8_ef(bank | 3 | (data & 0x04));
+ break;
+ }
+ }
+
+ set_nt_mirroring(BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT);
+
+ int bits = m_mode == 1 ? 1 : 2;
+
+ if (BIT(offset, 13, bits) == BIT(m_latch, 4, bits))
+ m_prgram[offset & 0x1fff] = data;
+}
+
+/*-------------------------------------------------
+
Board BMC-GKA
Unknown Bootleg Multigame Board
diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h
index 13139b6201b..afe126e5b7b 100644
--- a/src/devices/bus/nes/multigame.h
+++ b/src/devices/bus/nes/multigame.h
@@ -397,6 +397,28 @@ public:
};
+// ======================> nes_bmc_ds927_device
+
+class nes_bmc_ds927_device : public nes_nrom_device
+{
+public:
+ // construction/destruction
+ nes_bmc_ds927_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock);
+
+ virtual u8 read_h(offs_t offset) 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;
+
+private:
+ u8 m_latch, m_mode;
+};
+
+
// ======================> nes_bmc_gka_device
class nes_bmc_gka_device : public nes_nrom_device
@@ -1322,6 +1344,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_970630C, nes_bmc_970630c_device)
DECLARE_DEVICE_TYPE(NES_NTD03, nes_ntd03_device)
DECLARE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device)
DECLARE_DEVICE_TYPE(NES_BMC_CTC12IN1, nes_bmc_ctc12in1_device)
+DECLARE_DEVICE_TYPE(NES_BMC_DS927, nes_bmc_ds927_device)
DECLARE_DEVICE_TYPE(NES_BMC_FAM250, nes_bmc_fam250_device)
DECLARE_DEVICE_TYPE(NES_BMC_GKA, nes_bmc_gka_device)
DECLARE_DEVICE_TYPE(NES_BMC_GKB, nes_bmc_gkb_device)
diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp
index ebdb8ad17a0..93cca5a75f6 100644
--- a/src/devices/bus/nes/nes_carts.cpp
+++ b/src/devices/bus/nes/nes_carts.cpp
@@ -398,6 +398,7 @@ void nes_cart(device_slot_interface &device)
device.option_add_internal("ntd03", NES_NTD03);
device.option_add_internal("bmc_ctc09", NES_BMC_CTC09);
device.option_add_internal("bmc_ctc12in1", NES_BMC_CTC12IN1);
+ device.option_add_internal("bmc_ds927", NES_BMC_DS927);
device.option_add_internal("bmc_fam250", NES_BMC_FAM250);
device.option_add_internal("bmc_gka", NES_BMC_GKA);
device.option_add_internal("bmc_gkb", NES_BMC_GKB);
diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx
index c84f6114933..b7cdca3fa35 100644
--- a/src/devices/bus/nes/nes_ines.hxx
+++ b/src/devices/bus/nes/nes_ines.hxx
@@ -483,7 +483,13 @@ static const nes_mmc mmc_list[] =
// 445 DG574B MMC3-compatible multicart
// 446 Mindkids SMD172B_FPGA board
// 447 VRC4-based KL-06 multicart
- // 448...511 Unused
+ // 448 VRC4-based 830768C multicart
+ // 449 Super Games King multicart
+ // 450 VRC2-based YY841157C multicart
+ // 451 homebrew Haratyler HP/MP
+ { 452, BMC_DS927 },
+ // 453 Realtec 8042
+ // 454...511 Unused
// 512 probably the correct MMC3 clone for chuugokt in nes.xml
{ 513, SACHEN_SA9602B },
// 514 seems to be for skaraok, currently set to UNKNOWN in nes.xml
diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx
index 9c59cc4d973..d409d81969c 100644
--- a/src/devices/bus/nes/nes_pcb.hxx
+++ b/src/devices/bus/nes/nes_pcb.hxx
@@ -278,6 +278,7 @@ static const nes_pcb pcb_list[] =
{ "ntd03", BMC_NTD_03 },
{ "bmc_ctc09", BMC_CTC09 },
{ "bmc_ctc12in1", BMC_CTC_12IN1 },
+ { "bmc_ds927", BMC_DS927 },
{ "bmc_fam250", BMC_FAM250 },
{ "bmc_gka", BMC_GKA },
{ "bmc_gkb", BMC_GKB },
diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h
index b919a135fda..95ae301ce1f 100644
--- a/src/devices/bus/nes/nes_slot.h
+++ b/src/devices/bus/nes/nes_slot.h
@@ -95,7 +95,7 @@ enum
BMC_72IN1, BMC_SUPER_42IN1, BMC_76IN1,
BMC_31IN1, BMC_22GAMES, BMC_20IN1, BMC_5IN1_1993,
BMC_70IN1, BMC_500IN1, BMC_800IN1, BMC_1200IN1,
- BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_GN91B, BMC_GOLD260,
+ BMC_DS927, BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_GN91B, BMC_GOLD260,
BMC_HP898F, BMC_VT5201, BMC_BENSHIENG,
BMC_CTC09, BMC_CTC_12IN1, BMC_60311C, BMC_80013B, BMC_810544C, BMC_82AB,
BMC_830425C, BMC_830506C, BMC_830928C, BMC_850437C, BMC_891227, BMC_970630C,
diff --git a/src/mame/machine/nes.cpp b/src/mame/machine/nes.cpp
index 8dcb8fdc968..4f0b747e77d 100644
--- a/src/mame/machine/nes.cpp
+++ b/src/mame/machine/nes.cpp
@@ -89,6 +89,7 @@ void nes_state::machine_start()
BMC_800IN1,
BMC_8157,
BMC_970630C,
+ BMC_DS927,
BMC_KC885,
BMC_TELETUBBIES,
BMC_VT5201,