diff options
author | 0kmg <9137159+0kmg@users.noreply.github.com> | 2021-09-27 18:59:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-28 12:59:23 +1000 |
commit | bb492c0dba7d1c5edd06966cf2d620de53036467 (patch) | |
tree | 1552e5272704a60b9d9376ef19f4e6104118c615 | |
parent | fba640eb41bce428bdd3c855968d271a56959e64 (diff) |
bus/nes: Added support for Y2K 420 in 1. (#8622)
New working software list additions (nes.xml)
-----------------------------------
Y2K 420 in 1 [BootGod]
-rw-r--r-- | hash/nes.xml | 15 | ||||
-rw-r--r-- | src/devices/bus/nes/multigame.cpp | 67 | ||||
-rw-r--r-- | src/devices/bus/nes/multigame.h | 23 | ||||
-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 | 2 | ||||
-rw-r--r-- | src/mame/machine/nes.cpp | 1 |
8 files changed, 109 insertions, 3 deletions
diff --git a/hash/nes.xml b/hash/nes.xml index bdcff4f5fc1..2c778b2f9c7 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -80344,6 +80344,21 @@ be better to redump them properly. --> </part> </software> + <software name="mc_420y2"> + <description>Y2K 420 in 1</description> + <year>19??</year> + <publisher><pirate></publisher> + <part name="cart" interface="nes_cart"> + <feature name="slot" value="bmc_420y2k" /> + <dataarea name="prg" size="1048576"> + <rom name="teletubbies y2k (420-in-1).prg" size="1048576" crc="272709b9" sha1="fd795bdb46dbd15b3252500d2a9787c8acc6ba20" status="baddump" /> + </dataarea> + <!-- 8k VRAM on cartridge --> + <dataarea name="vram" size="8192"> + </dataarea> + </part> + </software> + <software name="mc_45" supported="partial"> <description>45 in 1 (JY-120A)</description> <year>19??</year> diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index bb4d6d90ac0..71793333747 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -66,7 +66,8 @@ DEFINE_DEVICE_TYPE(NES_BMC_HIK300, nes_bmc_hik300_device, "nes_bmc_hik30 DEFINE_DEVICE_TYPE(NES_BMC_S700, nes_bmc_s700_device, "nes_bmc_s700", "NES Cart BMC Super 700 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_BALL11, nes_bmc_ball11_device, "nes_bmc_ball11", "NES Cart BMC Ball 11 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_22GAMES, nes_bmc_22games_device, "nes_bmc_22games", "NES Cart BMC 22 Games PCB") -DEFINE_DEVICE_TYPE(NES_BMC_64Y2K, nes_bmc_64y2k_device, "nes_bmc_64y2k", "NES Cart BMC 64 in 1 Y2K PCB") +DEFINE_DEVICE_TYPE(NES_BMC_64Y2K, nes_bmc_64y2k_device, "nes_bmc_64y2k", "NES Cart BMC Y2K 64 in 1 PCB") +DEFINE_DEVICE_TYPE(NES_BMC_420Y2K, nes_bmc_420y2k_device, "nes_bmc_420y2k", "NES Cart BMC Y2K 420 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_12IN1, nes_bmc_12in1_device, "nes_bmc_12in1", "NES Cart BMC 12 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_20IN1, nes_bmc_20in1_device, "nes_bmc_20in1", "NES Cart BMC 20 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_21IN1, nes_bmc_21in1_device, "nes_bmc_21in1", "NES Cart BMC 21 in 1 PCB") @@ -305,6 +306,11 @@ nes_bmc_64y2k_device::nes_bmc_64y2k_device(const machine_config &mconfig, const { } +nes_bmc_420y2k_device::nes_bmc_420y2k_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, NES_BMC_420Y2K, tag, owner, clock), m_latch(0), m_reg(0) +{ +} + nes_bmc_12in1_device::nes_bmc_12in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : nes_nrom_device(mconfig, NES_BMC_12IN1, tag, owner, clock) { @@ -824,6 +830,23 @@ void nes_bmc_64y2k_device::pcb_reset() set_nt_mirroring(PPU_MIRROR_VERT); } +void nes_bmc_420y2k_device::device_start() +{ + common_start(); + save_item(NAME(m_latch)); + save_item(NAME(m_reg)); +} + +void nes_bmc_420y2k_device::pcb_reset() +{ + prg16_89ab(0); + prg16_cdef(7); + chr8(0, CHRRAM); + + m_latch = 0; + m_reg = 0; +} + void nes_bmc_12in1_device::device_start() { common_start(); @@ -2228,6 +2251,48 @@ void nes_bmc_64y2k_device::write_h(offs_t offset, uint8_t data) /*------------------------------------------------- + Board BMC-TELETUBBIES + (name assigned by BootGod who said the board has + no markings, a glop top, and an 8K VRAM chip) + + Games: Y2K 420 in 1 + + iNES: mapper 237 + + In MAME: Supported. + + -------------------------------------------------*/ + +void nes_bmc_420y2k_device::write_h(offs_t offset, u8 data) +{ + LOG_MMC(("bmc_420y2k write_h, offset: %04x, data: %02x\n", offset, data)); + + if (BIT(m_latch, 1)) // lock bit + m_reg = (m_reg & ~0x07) | (data & 0x07); + else + { + m_latch = offset; + m_reg = data; + } + + u8 bank = BIT(m_latch, 2) << 5 | (m_reg & 0x1f); + u8 mode = BIT(m_reg, 6); + prg16_89ab(bank & ~mode); // strangely for UNROM games it DOESN'T ignore the NROM mode bit + prg16_cdef(bank | (BIT(m_reg, 7) ? mode : 0x07)); + + set_nt_mirroring(BIT(m_reg, 5) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); +} + +u8 nes_bmc_420y2k_device::read_h(offs_t offset) +{ + LOG_MMC(("bmc_420y2k read_h, offset: %04x\n", offset)); + // latch bit 0 is only used to determine the menu, and the behavior of + // this cart seems hardwired to OR $02 (ORing $00-$03 allows four menus) + return hi_access_rom(offset | (m_latch & 1) << 1); +} + +/*------------------------------------------------- + BMC-12IN1 Unknown Bootleg Multigame Board diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index 54056689f5b..6dfbed4ee7e 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -672,6 +672,28 @@ private: }; +// ======================> nes_bmc_420y2k_device + +class nes_bmc_420y2k_device : public nes_nrom_device +{ +public: + // construction/destruction + nes_bmc_420y2k_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_reg; +}; + + // ======================> nes_bmc_12in1_device class nes_bmc_12in1_device : public nes_nrom_device @@ -1141,6 +1163,7 @@ DECLARE_DEVICE_TYPE(NES_BMC_S700, nes_bmc_s700_device) DECLARE_DEVICE_TYPE(NES_BMC_BALL11, nes_bmc_ball11_device) DECLARE_DEVICE_TYPE(NES_BMC_22GAMES, nes_bmc_22games_device) DECLARE_DEVICE_TYPE(NES_BMC_64Y2K, nes_bmc_64y2k_device) +DECLARE_DEVICE_TYPE(NES_BMC_420Y2K, nes_bmc_420y2k_device) DECLARE_DEVICE_TYPE(NES_BMC_12IN1, nes_bmc_12in1_device) DECLARE_DEVICE_TYPE(NES_BMC_20IN1, nes_bmc_20in1_device) DECLARE_DEVICE_TYPE(NES_BMC_21IN1, nes_bmc_21in1_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index e7eab6a1166..8237cb0bca0 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -401,6 +401,7 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_ball11", NES_BMC_BALL11); device.option_add_internal("bmc_22games", NES_BMC_22GAMES); device.option_add_internal("bmc_64y2k", NES_BMC_64Y2K); + device.option_add_internal("bmc_420y2k", NES_BMC_420Y2K); device.option_add_internal("bmc_12in1", NES_BMC_12IN1); device.option_add_internal("bmc_20in1", NES_BMC_20IN1); device.option_add_internal("bmc_21in1", NES_BMC_21IN1); diff --git a/src/devices/bus/nes/nes_ines.hxx b/src/devices/bus/nes/nes_ines.hxx index a028aafdbae..6f31c9abbe0 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -270,7 +270,7 @@ static const nes_mmc mmc_list[] = { 234, AVE_MAXI15 }, { 235, BMC_GOLD150 }, // 235 Golden Game x-in-1 - Unsupported { 236, BMC_70IN1 }, - // 237 Teletubbies 420-in-1 multicart. Dump available? + { 237, BMC_TELETUBBIES }, { 238, UNL_603_5052 }, // 239 Unused { 240, CNE_SHLZ }, diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index abf0dfc1aae..799f17a15b6 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[] = { "bmc_ball11", BMC_BALLGAMES_11IN1 }, { "bmc_22games", BMC_22GAMES }, { "bmc_64y2k", BMC_64IN1NR }, + { "bmc_420y2k", BMC_TELETUBBIES }, { "bmc_12in1", BMC_12IN1 }, { "bmc_20in1", BMC_20IN1 }, { "bmc_21in1", BMC_21IN1 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index 23057b9c6c5..fc4459c458a 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -86,7 +86,7 @@ enum TXC_MJBLOCK, TXC_STRIKEW, TXC_TW, // Multigame Carts BMC_64IN1NR, BMC_190IN1, BMC_A65AS, BMC_A88S1, BMC_F15, - BMC_GN45, BMC_HIK8IN1, BMC_S24IN1SC03, BMC_T262, + BMC_GN45, BMC_HIK8IN1, BMC_S24IN1SC03, BMC_T262, BMC_TELETUBBIES, BMC_WS, BMC_SUPERBIG_7IN1, BMC_SUPERHIK_4IN1, BMC_BALLGAMES_11IN1, BMC_MARIOPARTY_7IN1, BMC_GOLD_7IN1, BMC_SUPER_700IN1, BMC_FAMILY_4646, BMC_36IN1, BMC_21IN1, BMC_150IN1, BMC_35IN1, BMC_64IN1, diff --git a/src/mame/machine/nes.cpp b/src/mame/machine/nes.cpp index 29831ada9a8..2f4e29e5323 100644 --- a/src/mame/machine/nes.cpp +++ b/src/mame/machine/nes.cpp @@ -80,6 +80,7 @@ void nes_state::machine_start() BMC_800IN1, BMC_8157, BMC_GOLD150, + BMC_TELETUBBIES, BMC_VT5201, BTL_PALTHENA, CAMERICA_ALADDIN, |