From cdd5ad20456b12f6d6fe65eb7805652ac23efcea Mon Sep 17 00:00:00 2001 From: 0kmg <9137159+0kmg@users.noreply.github.com> Date: Fri, 8 Oct 2021 04:02:16 -0800 Subject: bus/nes: Added support for GN-91B and NC-20MB multicart boards. (#8672) New working software list additions (nes.xml) ----------------------------------- 2 in 1 (GN-91B) [Consolethinks, Nikolka] 20 in 1 (CA-006) [Consolethinks, Nikolka] 2 in 1 (VT-2037) [Consolethinks, Nikolka] 2 in 1 (VT-2038) [Consolethinks, Nikolka] Super 2 in 1 (WQ 2047) [Consolethinks, Nikolka] --- hash/nes.xml | 87 +++++++++++++++++++++++++++++++++++++ src/devices/bus/nes/multigame.cpp | 91 +++++++++++++++++++++++++++++++++------ src/devices/bus/nes/multigame.h | 38 +++++++++++++++- src/devices/bus/nes/nes_carts.cpp | 2 + src/devices/bus/nes/nes_ines.hxx | 4 +- src/devices/bus/nes/nes_pcb.hxx | 2 + src/devices/bus/nes/nes_slot.h | 5 ++- 7 files changed, 210 insertions(+), 19 deletions(-) diff --git a/hash/nes.xml b/hash/nes.xml index d5755a13f25..50c01537ccf 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -79192,6 +79192,22 @@ be better to redump them properly. --> + + + 2 in 1 (GN-91B) + 19?? + <pirate> + + + + + + + + + + + 2 in 1 1996 Super HIK Gold Card (NT-803) 19?? @@ -79226,6 +79242,60 @@ be better to redump them properly. --> + + 2 in 1 (VT-2037) + 199? + <pirate> + + + + + + + + + + + + + + + + 2 in 1 (VT-2038) + 199? + <pirate> + + + + + + + + + + + + + + + + Super 2 in 1 (WQ 2047) + 1998 + <pirate> + + + + + + + + + + + + + + ASDER 20 in 1 @@ -79303,6 +79373,22 @@ be better to redump them properly. --> + + 20 in 1 (CA-006) + 19?? + <pirate> + + + + + + + + + + + + 200 in 1 - Elfland 1992 @@ -81553,6 +81639,7 @@ be better to redump them properly. --> + 8 in 1 (ET40, 821242c) 19?? diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index 48ea16fbcc1..78dd2265f9a 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -8,6 +8,10 @@ Here we emulate several PCBs used in multigame pirate carts (not MMC-3 based) + TODO: Investigate further Gunsmoke on mc_8et40 and mc_2gn91. Both exhibit the + same bug where enemies/barrels don't appear until they are halfway down the + screen. They are both almost the same minor hack of the US release. + ***********************************************************************************************************/ @@ -53,6 +57,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device, "nes_bmc_ctc09 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") DEFINE_DEVICE_TYPE(NES_BMC_GKCXIN1, nes_bmc_gkcxin1_device, "nes_bmc_gkcxin1", "NES Cart BMC GKCXIN1 PCB") +DEFINE_DEVICE_TYPE(NES_BMC_GN91B, nes_bmc_gn91b_device, "nes_bmc_gn91b", "NES Cart BMC GN-91B PCB") DEFINE_DEVICE_TYPE(NES_BMC_HP898F, nes_bmc_hp898f_device, "nes_bmc_hp898f", "NES Cart BMC HP-898F PCB") DEFINE_DEVICE_TYPE(NES_BMC_K1029, nes_bmc_k1029_device, "nes_bmc_k1029", "NES Cart BMC K-1029 PCB") DEFINE_DEVICE_TYPE(NES_BMC_K3036, nes_bmc_k3036_device, "nes_bmc_k3036", "NES Cart BMC K-3036 PCB") @@ -90,6 +95,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_GOLD260, nes_bmc_gold260_device, "nes_bmc_gold2 DEFINE_DEVICE_TYPE(NES_BMC_TH22913, nes_bmc_th22913_device, "nes_bmc_th22913", "NES Cart BMC TH2291-3 PCB") DEFINE_DEVICE_TYPE(NES_BMC_4IN1RESET, nes_bmc_4in1reset_device, "nes_bmc_4in1reset", "NES Cart BMC 4 in 1 (Reset Based) PCB") DEFINE_DEVICE_TYPE(NES_BMC_42IN1RESET, nes_bmc_42in1reset_device, "nes_bmc_42in1reset", "NES Cart BMC 42 in 1 (Reset Based) PCB") +DEFINE_DEVICE_TYPE(NES_BMC_NC20MB, nes_bmc_nc20mb_device, "nes_bmc_nc20mb", "NES Cart BMC NC-20MB PCB") DEFINE_DEVICE_TYPE(NES_BMC_LC160, nes_bmc_lc160_device, "nes_bmc_lc160", "NES Cart BMC Little Com 160 PCB") @@ -241,6 +247,11 @@ nes_bmc_gkcxin1_device::nes_bmc_gkcxin1_device(const machine_config &mconfig, co { } +nes_bmc_gn91b_device::nes_bmc_gn91b_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, NES_BMC_GN91B, tag, owner, clock), m_latch(0) +{ +} + nes_bmc_hp898f_device::nes_bmc_hp898f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_HP898F, tag, owner, clock) { @@ -413,8 +424,18 @@ nes_bmc_4in1reset_device::nes_bmc_4in1reset_device(const machine_config &mconfig { } +nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, type, tag, owner, clock), m_latch(0), m_mirror_flip(type == NES_BMC_NC20MB) +{ +} + nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) - : nes_nrom_device(mconfig, NES_BMC_42IN1RESET, tag, owner, clock), m_latch(0) + : nes_bmc_42in1reset_device(mconfig, NES_BMC_42IN1RESET, tag, owner, clock) +{ +} + +nes_bmc_nc20mb_device::nes_bmc_nc20mb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_bmc_42in1reset_device(mconfig, NES_BMC_NC20MB, tag, owner, clock) { } @@ -744,6 +765,21 @@ void nes_bmc_gka_device::pcb_reset() m_reg[0] = m_reg[1] = 0; } +void nes_bmc_gn91b_device::device_start() +{ + common_start(); + save_item(NAME(m_latch)); +} + +void nes_bmc_gn91b_device::pcb_reset() +{ + prg16_89ab(0); + prg16_cdef(7); + chr8(0, CHRRAM); + + m_latch = 0; +} + void nes_bmc_k3036_device::pcb_reset() { prg16_89ab(0); @@ -1411,10 +1447,6 @@ void nes_a65as_device::write_h(offs_t offset, uint8_t data) In MAME: Supported. - TODO: Gunsmoke on 8-in-1 (ET40) has invisible sprites - that suddenly appear closer to the bottom of the screen. - Mirroring is correct, so is this a bug on the cartridge? - -------------------------------------------------*/ void nes_t262_device::write_h(offs_t offset, u8 data) @@ -1887,6 +1919,32 @@ void nes_bmc_gkcxin1_device::write_h(offs_t offset, u8 data) chr8(offset & 0x07, CHRROM); } +/*------------------------------------------------- + + Board BMC-GN-91B + + Unknown Bootleg Multigame Board + Games: 2 in 1 + + NES 2.0: mapper 431 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_gn91b_device::write_h(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_gn91b write_h, offset: %04x, data: %02x\n", offset, data)); + + if (offset < 0x4000) + { + m_latch = (offset & 0x10) >> 1; + prg16_cdef(m_latch | 0x07); + set_nt_mirroring(m_latch ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); + } + prg16_89ab(m_latch | (data & 0x07)); +} + /*------------------------------------------------- Board HP-898F @@ -2970,17 +3028,22 @@ uint8_t nes_bmc_gold150_device::read_h(offs_t offset) /*------------------------------------------------- - BMC-42IN1RESETBASED + BMC-42IN1RESETBASED, BMC-NC-20MB - Unknown Bootleg Multigame Board - Games: 42 (22 + 20) in 1 + Games: 42 (22 + 20) in 1, 20 in 1 (CA-006) + + Here we implement two nearly identical mappers. The + NC-20MB board does not have the reset latch and its + mirroring bit is inverted from the 42 in 1. - There is an identical dump identified as SUPER22GAMES - that supposedly selected between the two menus by - dip switch. It's not clear which, if any, variants of - this cart exist, nor if this is really reset-based. + There is an identical dump of the 42 in 1 identified + as SUPER22GAMES that supposedly selected between the + two menus via dip switch. It's not clear which, if + any, variants of this cart exist, nor if this is + really reset-based. iNES: mapper 233 + NES 2.0: mapper 433 In MAME: Supported. @@ -2995,8 +3058,8 @@ void nes_bmc_42in1reset_device::write_h(offs_t offset, u8 data) prg16_89ab(bank & ~mode); prg16_cdef(bank | mode); - // some sources say there are 1-screen modes, but this works as is - set_nt_mirroring(BIT(data, 6) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); + // some sources say there are 1-screen modes for 42-in-1, but this works as is + set_nt_mirroring(BIT(data, 6) ^ m_mirror_flip ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); } /*------------------------------------------------- diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index a5577e3341c..c4c19f4de7d 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -469,6 +469,27 @@ public: }; +// ======================> nes_bmc_gn91b_device + +class nes_bmc_gn91b_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_bmc_gn91b_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_hp898f_device class nes_bmc_hp898f_device : public nes_nrom_device @@ -1056,11 +1077,24 @@ public: virtual void pcb_reset() override; protected: + // construction/destruction + nes_bmc_42in1reset_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); + // device-level overrides virtual void device_start() override; private: - u8 m_latch; + u8 m_latch, m_mirror_flip; +}; + + +// ======================> nes_bmc_nc20mb_device + +class nes_bmc_nc20mb_device : public nes_bmc_42in1reset_device +{ +public: + // construction/destruction + nes_bmc_nc20mb_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); }; @@ -1192,6 +1226,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_CTC09, nes_bmc_ctc09_device) DECLARE_DEVICE_TYPE(NES_BMC_GKA, nes_bmc_gka_device) DECLARE_DEVICE_TYPE(NES_BMC_GKB, nes_bmc_gkb_device) DECLARE_DEVICE_TYPE(NES_BMC_GKCXIN1, nes_bmc_gkcxin1_device) +DECLARE_DEVICE_TYPE(NES_BMC_GN91B, nes_bmc_gn91b_device) DECLARE_DEVICE_TYPE(NES_BMC_HP898F, nes_bmc_hp898f_device) DECLARE_DEVICE_TYPE(NES_BMC_K1029, nes_bmc_k1029_device) DECLARE_DEVICE_TYPE(NES_BMC_K3036, nes_bmc_k3036_device) @@ -1228,6 +1263,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_GOLD150, nes_bmc_gold150_device) DECLARE_DEVICE_TYPE(NES_BMC_GOLD260, nes_bmc_gold260_device) DECLARE_DEVICE_TYPE(NES_BMC_4IN1RESET, nes_bmc_4in1reset_device) DECLARE_DEVICE_TYPE(NES_BMC_42IN1RESET, nes_bmc_42in1reset_device) +DECLARE_DEVICE_TYPE(NES_BMC_NC20MB, nes_bmc_nc20mb_device) DECLARE_DEVICE_TYPE(NES_BMC_LC160, nes_bmc_lc160_device) DECLARE_DEVICE_TYPE(NES_BMC_TH22913, nes_bmc_th22913_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index 1a9ba571c45..5b8e5d03fbd 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -387,6 +387,7 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_gka", NES_BMC_GKA); device.option_add_internal("bmc_gkb", NES_BMC_GKB); device.option_add_internal("bmc_gkcxin1", NES_BMC_GKCXIN1); + device.option_add_internal("bmc_gn91b", NES_BMC_GN91B); device.option_add_internal("bmc_hp898f", NES_BMC_HP898F); device.option_add_internal("bmc_k1029", NES_BMC_K1029); device.option_add_internal("bmc_k3006", NES_BMC_K3006); @@ -426,6 +427,7 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_th22913", NES_BMC_TH22913); // mapper 63 device.option_add_internal("bmc_reset4", NES_BMC_4IN1RESET); // mapper 60 with 64k prg and 32k chr device.option_add_internal("bmc_reset42", NES_BMC_42IN1RESET); // mapper 233 + device.option_add_internal("bmc_nc20mb", NES_BMC_NC20MB); device.option_add_internal("bmc_lc160", NES_BMC_LC160); device.option_add_internal("resetsxrom", NES_RESETSXROM); // misc multigame cart MMC3 clone boards diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index 01da0d79db4..ed4f49034ae 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -466,9 +466,9 @@ static const nes_mmc mmc_list[] = // 428 a couple multicarts // 429 Unused // 430 Unused - // 431 Realtec GN-91B + { 431, BMC_GN91B }, // 432 Realtec 8090 - // 433 NC-20MB 20 in 1 (CA-006) + { 433, BMC_NC20MB }, // 434 S-009 { 435, NTDEC_2746 }, // 436...442 Unused diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index e9287db7d0e..56cc5f4adfc 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -268,6 +268,7 @@ static const nes_pcb pcb_list[] = { "bmc_gka", BMC_GKA }, { "bmc_gkb", BMC_GKB }, { "bmc_gkcxin1", BMC_GKCXIN1 }, + { "bmc_gn91b", BMC_GN91B }, { "bmc_hp898f", BMC_HP898F }, { "bmc_k1029", BMC_K1029 }, { "bmc_k3006", BMC_K3006 }, @@ -334,6 +335,7 @@ static const nes_pcb pcb_list[] = { "bmc_th22913", BMC_TH22913 }, { "bmc_reset4", BMC_4IN1RESET }, { "bmc_reset42", BMC_42IN1RESET }, + { "bmc_nc20mb", BMC_NC20MB }, { "bmc_lc160", BMC_LITTLECOM160 }, { "jncota_kt1001", JNCOTA_KT1001 }, { "jyc_a", JYCOMPANY_A }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index d36d1ffc0af..cd29cd78633 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -94,10 +94,11 @@ enum BMC_72IN1, BMC_SUPER_42IN1, BMC_76IN1, 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_GKA, BMC_GKB, BMC_GKCXIN1, BMC_GN91B, + BMC_HP898F, BMC_VT5201, BMC_BENSHIENG, BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_830928C, BMC_850437C, BMC_970630C, - BMC_N32_4IN1, BMC_NT639, BMC_NTD_03, + BMC_N32_4IN1, BMC_NC20MB, BMC_NT639, BMC_NTD_03, BMC_EL860947C, BMC_EL861121C, BMC_FK23C, BMC_FK23CA, BMC_JY820845C, BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146, BMC_2751, BMC_8157, BMC_00202650, -- cgit v1.2.3