diff options
author | 0kmg <9137159+0kmg@users.noreply.github.com> | 2021-09-12 07:01:06 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-12 11:01:06 -0400 |
commit | af65adbdd602abb61b03529995009eca9960248d (patch) | |
tree | 9a083f60d49a43d57c842c0fbecf8e4d07d971c2 /src/devices/bus/nes | |
parent | f71d4683b87f3a1a655ae2f2c2ac2076f19e5bd7 (diff) |
bus/nes: Added support for HP-898F board and related multicarts. (#8533)
New working software list additions (nes.xml)
-----------------------------------
4 in 1 (0203) [Consolethinks]
80 in 1 (KD-6096) [Consolethinks]
4 in 1 (0207) [Consolethinks, MrNorbert1994]
4 in 1 (0210) [Consolethinks, MrNorbert1994]
9999999 in 1 (KD-6037-B) [Consolethinks, MrNorbert1994]
Olympic 2000 1000000 in 1 [Consolethinks, MrNorbert1994]
Software list items promoted to working (nes.xml)
---------------------------------------
Prima Soft 9999999-in-1 (02 8807870-3)
Diffstat (limited to 'src/devices/bus/nes')
-rw-r--r-- | src/devices/bus/nes/multigame.cpp | 49 | ||||
-rw-r--r-- | src/devices/bus/nes/multigame.h | 14 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_carts.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_ines.hxx | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_pcb.hxx | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.h | 2 |
6 files changed, 67 insertions, 4 deletions
diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index 916889a3b73..759c517a247 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -53,6 +53,7 @@ DEFINE_DEVICE_TYPE(NES_BMC_GB63, nes_bmc_gb63_device, "nes_bmc_gb63" 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_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") DEFINE_DEVICE_TYPE(NES_BMC_K3046, nes_bmc_k3046_device, "nes_bmc_k3046", "NES Cart BMC K-3046 PCB") @@ -240,6 +241,11 @@ nes_bmc_gkcxin1_device::nes_bmc_gkcxin1_device(const machine_config &mconfig, co { } +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) +{ +} + nes_bmc_k3036_device::nes_bmc_k3036_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_K3036, tag, owner, clock) { @@ -1911,6 +1917,49 @@ void nes_bmc_gkcxin1_device::write_h(offs_t offset, u8 data) /*------------------------------------------------- + Board HP-898F + + Games: Prima soft 9999999 in 1 and others + + NES 2.0: mapper 319 + + In MAME: Supported. + + TODO: Mirroring is clearly incorrect for Ninja-kun + on 4 in 1 (0207). Is this an error on the original + cart or should there really be a variant device? + + -------------------------------------------------*/ + +u8 nes_bmc_hp898f_device::read_l(offs_t offset) +{ + LOG_MMC(("bmc_hp898f read_l, offset: %04x\n", offset)); + + offset += 0x100; + if (offset & 0x1000) + return 0; // FIXME: some carts read jumpers that change menu + + return get_open_bus(); +} + +void nes_bmc_hp898f_device::write_m(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_hp898f write_m, offset: %04x, data: %02x\n", offset, data)); + + if (offset & 0x04) + { + u8 bank = bitswap<3>(data, 4, 3, 5); + u8 mode = BIT(data, 6); + prg16_89ab(bank & ~mode); + prg16_cdef(bank | mode); + set_nt_mirroring(BIT(data, 7) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); + } + else + chr8(data >> 4, CHRROM); +} + +/*------------------------------------------------- + BMC-K-3036 Games: 35 in 1 diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index 5e2509b4b5a..df73fa302d9 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -473,6 +473,19 @@ public: }; +// ======================> nes_bmc_hp898f_device + +class nes_bmc_hp898f_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_bmc_hp898f_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); + + virtual u8 read_l(offs_t offset) override; + virtual void write_m(offs_t offset, u8 data) override; +}; + + // ======================> nes_bmc_k3036_device class nes_bmc_k3036_device : public nes_nrom_device @@ -1205,6 +1218,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_GB63, nes_bmc_gb63_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_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) DECLARE_DEVICE_TYPE(NES_BMC_K3046, nes_bmc_k3046_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index b9fa1d7d87c..1b85ef7347a 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -381,6 +381,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_hp898f", NES_BMC_HP898F); device.option_add_internal("bmc_k1029", NES_BMC_K1029); device.option_add_internal("bmc_k3006", NES_BMC_K3006); device.option_add_internal("bmc_k3036", NES_BMC_K3036); @@ -456,7 +457,6 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("onebus", NES_NROM); // UNSUPPORTED device.option_add_internal("pec586", NES_NROM); // UNSUPPORTED device.option_add_internal("coolboy", NES_NROM); // UNSUPPORTED - device.option_add_internal("bmc_hp898f", 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? diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index b154057dfd6..c68ea5b628c 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -354,7 +354,7 @@ static const nes_mmc mmc_list[] = // 316 Unused // 317 Unused // 318 Unused - // 319 HP-898F (has different bank order than UNIF!) and KD-7/9-E boards + { 319, BMC_HP898F }, { 320, BMC_830425C }, // 321 duplicate of 287? // 322 BMC-K-3033 35-in-1, related to mc_35? diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index ce780f60646..d35c726e88c 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -266,6 +266,7 @@ static const nes_pcb pcb_list[] = { "bmc_gka", BMC_GKA }, { "bmc_gkb", BMC_GKB }, { "bmc_gkcxin1", BMC_GKCXIN1 }, + { "bmc_hp898f", BMC_HP898F }, { "bmc_k1029", BMC_K1029 }, { "bmc_k3006", BMC_K3006 }, { "bmc_k3036", BMC_K3036 }, @@ -373,7 +374,6 @@ static const nes_pcb pcb_list[] = { "btl_900218", UNSUPPORTED_BOARD }, // pirate The Lord of King, to be emulated soon { "a9746", UNSUPPORTED_BOARD }, { "pec586", UNSUPPORTED_BOARD }, - { "bmc_hp898f", UNSUPPORTED_BOARD }, // Primasoft 9999999-in-1 { "unl_158b", UNSUPPORTED_BOARD }, // Blood of Jurassic { "unl_drgnfgt", UNSUPPORTED_BOARD }, // Dragon Fighter by Flying Star { "test", TEST_BOARD }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index 6d6d40b23ac..3868884971c 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_70IN1, BMC_500IN1, BMC_800IN1, BMC_1200IN1, - BMC_GKA, BMC_GKB, BMC_GKCXIN1, BMC_VT5201, BMC_BENSHIENG, + 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, |