diff options
Diffstat (limited to 'src/devices/bus/nes/mmc1_clones.cpp')
-rw-r--r-- | src/devices/bus/nes/mmc1_clones.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
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) |