diff options
author | 2021-12-21 10:22:15 -0900 | |
---|---|---|
committer | 2021-12-21 14:22:15 -0500 | |
commit | 616e60e26e9d9f06d43f7884414d3cd48f44b0f4 (patch) | |
tree | ff75697611b5ef264350bc02bfb3c0ea62ff0495 | |
parent | d1e6531f50909b9442bc08611aadbf44a00a0560 (diff) |
bus/nes: Added support for multicart board JY012005. (#9022)
New working software list additions (nes.xml)
-----------------------------------
1998 Super HiK 8 in 1 (JY-021B) [MLX]
-rw-r--r-- | hash/nes.xml | 15 | ||||
-rw-r--r-- | src/devices/bus/nes/mmc1_clones.cpp | 55 | ||||
-rw-r--r-- | src/devices/bus/nes/mmc1_clones.h | 25 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_carts.cpp | 1 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_ines.hxx | 2 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_pcb.hxx | 1 | ||||
-rw-r--r-- | src/devices/bus/nes/nes_slot.h | 4 |
7 files changed, 100 insertions, 3 deletions
diff --git a/hash/nes.xml b/hash/nes.xml index f5a25cddbce..41b7f75523b 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -52137,6 +52137,21 @@ preliminary proto for the PAL version, still running on NTSC systems) or the gfx </part> </software> + <software name="mc_8j21b"> + <description>1998 Super HiK 8 in 1 (JY-021B)</description> + <year>1998</year> + <publisher>J.Y. Company</publisher> + <part name="cart" interface="nes_cart"> + <feature name="slot" value="bmc_jy012005" /> + <dataarea name="prg" size="1048576"> + <rom name="1998 super hik 8-in-1 (jy-021b).prg" size="1048576" crc="aa1aeece" sha1="c1fe5436d90619106e898a53d33201ca1e00dd16" status="baddump" /> + </dataarea> + <dataarea name="chr" size="1048576"> + <rom name="1998 super hik 8-in-1 (jy-021b).chr" size="1048576" crc="36ea5a43" sha1="bec2c0ba847d3b67d5c3e2b9b669093b7389cd38" status="baddump" /> + </dataarea> + </part> + </software> + <software name="mc_4jy22"> <description>1995 Super HiK 4 in 1 (JY-022)</description> <year>1995</year> diff --git a/src/devices/bus/nes/mmc1_clones.cpp b/src/devices/bus/nes/mmc1_clones.cpp index 9f37d3cac74..2694384d2de 100644 --- a/src/devices/bus/nes/mmc1_clones.cpp +++ b/src/devices/bus/nes/mmc1_clones.cpp @@ -28,6 +28,7 @@ // constructor //------------------------------------------------- +DEFINE_DEVICE_TYPE(NES_BMC_JY012005, nes_bmc_jy012005_device, "nes_bmc_jy012005", "NES Cart BMC JY012005 PCB") DEFINE_DEVICE_TYPE(NES_BMC_JY820845C, nes_bmc_jy820845c_device, "nes_bmc_jy820845c", "NES Cart BMC JY820845C PCB") DEFINE_DEVICE_TYPE(NES_FARID_SLROM, nes_farid_slrom_device, "nes_farid_slrom", "NES Cart Farid SLROM 8 in 1 PCB") DEFINE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device, "nes_ninjaryu", "NES Cart Ninja Ryukenden Chinese PCB") @@ -36,6 +37,11 @@ DEFINE_DEVICE_TYPE(NES_SRPG_5IN1, nes_srpg5in1_device, "nes_srpg5in1", DEFINE_DEVICE_TYPE(NES_TXC_22110, nes_txc_22110_device, "nes_txc_22110", "NES Cart TXC 01-22110-000 PCB") +nes_bmc_jy012005_device::nes_bmc_jy012005_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_sxrom_device(mconfig, NES_BMC_JY012005, tag, owner, clock), m_latch0(0) +{ +} + 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) { @@ -68,6 +74,18 @@ nes_txc_22110_device::nes_txc_22110_device(const machine_config &mconfig, const +void nes_bmc_jy012005_device::device_start() +{ + nes_sxrom_device::device_start(); + save_item(NAME(m_latch0)); +} + +void nes_bmc_jy012005_device::pcb_reset() +{ + m_latch0 = 0; + nes_sxrom_device::pcb_reset(); +} + void nes_bmc_jy820845c_device::device_start() { nes_sxrom_device::device_start(); @@ -179,6 +197,43 @@ void nes_ninjaryu_device::write_h(offs_t offset, u8 data) /*------------------------------------------------- + BMC-JY012005 + + Games: 1998 Super HiK 8 in 1 (JY-021B) + + MMC1 clone with banking for multigame menu. + + NES 2.0: mapper 404 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_jy012005_device::set_prg() +{ + u8 mode = !BIT(m_latch0, 6); + nes_sxrom_device::set_prg((m_latch0 & 0x07 & ~mode) << 3, mode << 3 | 0x07); +} + +void nes_bmc_jy012005_device::set_chr() +{ + nes_sxrom_device::set_chr((m_latch0 & 0x07) << 5, 0x1f); +} + +void nes_bmc_jy012005_device::write_m(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_jy012005 write_m, offset: %04x, data: %02x\n", offset, data)); + + if (!BIT(m_latch0, 7)) // outer bank lock + { + m_latch0 = data; + set_prg(); + set_chr(); + } +} + +/*------------------------------------------------- + BMC-JY820845C Games: 7 in 1 1993 Chess Series (JY-015) diff --git a/src/devices/bus/nes/mmc1_clones.h b/src/devices/bus/nes/mmc1_clones.h index a20e1169ef4..c1806c62206 100644 --- a/src/devices/bus/nes/mmc1_clones.h +++ b/src/devices/bus/nes/mmc1_clones.h @@ -8,6 +8,30 @@ #include "mmc1.h" +// ======================> nes_bmc_jy012005_device + +class nes_bmc_jy012005_device : public nes_sxrom_device +{ +public: + // construction/destruction + nes_bmc_jy012005_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() override; + virtual void set_chr() override; + +private: + u8 m_latch0; +}; + + // ======================> nes_bmc_jy820845c_device class nes_bmc_jy820845c_device : public nes_sxrom_device @@ -149,6 +173,7 @@ private: // device type definition +DECLARE_DEVICE_TYPE(NES_BMC_JY012005, nes_bmc_jy012005_device) DECLARE_DEVICE_TYPE(NES_BMC_JY820845C, nes_bmc_jy820845c_device) DECLARE_DEVICE_TYPE(NES_FARID_SLROM, nes_farid_slrom_device) DECLARE_DEVICE_TYPE(NES_NINJARYU, nes_ninjaryu_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index 04cd8e3cdc3..729d6e4a51c 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_830928c", NES_BMC_830928C); device.option_add_internal("bmc_850437c", NES_BMC_850437C); device.option_add_internal("bmc_970630c", NES_BMC_970630C); + device.option_add_internal("bmc_jy012005", NES_BMC_JY012005); device.option_add_internal("bmc_jy820845c", NES_BMC_JY820845C); device.option_add_internal("srpg_5in1", NES_SRPG_5IN1); device.option_add_internal("n32_4in1", NES_N32_4IN1); diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index ba2250d7ae4..4a5496a39a9 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -439,7 +439,7 @@ static const nes_mmc mmc_list[] = // 401 Super 19-in-1 VIP 19, not in nes.xml? // 402 22-in-1 Olympic Games, not in nes.xml? // 403 Tetris Family 19-in-1 that only works on Famiclones with 6502's BCD mode - // 404 JY-021B multicart, not in nes.xml? + { 404, BMC_JY012005 }, // 405 UMC UM6578 NES-on-a-chip games...PnPs? // 406 homebrew game Haradius Zero // 407 VT03 PnP diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index 0bbb342430f..8bed49c9257 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -267,6 +267,7 @@ static const nes_pcb pcb_list[] = { "bmc_830928c", BMC_830928C }, { "bmc_850437c", BMC_850437C }, { "bmc_970630c", BMC_970630C }, + { "bmc_jy012005", BMC_JY012005 }, { "bmc_jy820845c", BMC_JY820845C }, { "srpg_5in1", BMC_SRPG_5IN1 }, { "n32_4in1", BMC_N32_4IN1 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index b678f70a1d4..df06c894daf 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -100,8 +100,8 @@ enum BMC_60311C, BMC_80013B, BMC_810544C, BMC_830425C, BMC_830506C, BMC_830928C, BMC_850437C, BMC_970630C, BMC_N32_4IN1, BMC_NC20MB, BMC_NT639, BMC_NTD_03, BMC_SRPG_5IN1, - BMC_EL860947C, BMC_EL861121C, BMC_FK23C, BMC_FK23CA, BMC_JY820845C, - BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146, + BMC_EL860947C, BMC_EL861121C, BMC_FK23C, BMC_FK23CA, BMC_JY012005, + BMC_JY820845C, BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146, BMC_2751, BMC_8157, BMC_00202650, BMC_411120C, BMC_810305C, BMC_820720C, BMC_830118C, BMC_830832C, BMC_YY841101C, BMC_YY841155C, |