diff --git a/hash/nes.xml b/hash/nes.xml index 65bebe025c5..4025572b55f 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -80228,10 +80228,11 @@ be better to redump them properly. --> - + 42 in 1 (Reset Switch) 19?? - <unknown> + <pirate> + @@ -81964,26 +81965,6 @@ to check why this is different --> - - Super 22 in 1 - 19?? - <pirate> - - - - - - - - - - - - - - - - Super 24 in 1 @@ -82269,7 +82250,7 @@ to check why this is different --> 19?? <pirate> - + diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index 179b2297765..18ae4573048 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -87,7 +87,6 @@ DEFINE_DEVICE_TYPE(NES_BMC_1200IN1, nes_bmc_1200in1_device, "nes_bmc_1200i DEFINE_DEVICE_TYPE(NES_BMC_GOLD150, nes_bmc_gold150_device, "nes_bmc_gold150", "NES Cart BMC Golden 150 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_GOLD260, nes_bmc_gold260_device, "nes_bmc_gold260", "NES Cart BMC Golden 260 in 1 PCB") DEFINE_DEVICE_TYPE(NES_BMC_TH22913, nes_bmc_th22913_device, "nes_bmc_th22913", "NES Cart BMC TH2291-3 PCB") -DEFINE_DEVICE_TYPE(NES_BMC_SUPER22, nes_bmc_super22_device, "nes_bmc_super22", "NES Cart BMC Super 22 Games 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_LC160, nes_bmc_lc160_device, "nes_bmc_lc160", "NES Cart BMC Little Com 160 PCB") @@ -363,12 +362,12 @@ nes_bmc_72in1_device::nes_bmc_72in1_device(const machine_config &mconfig, const { } -nes_bmc_76in1_device::nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_76in1_device::nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_76IN1, tag, owner, clock) { } -nes_bmc_150in1_device::nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_150in1_device::nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_150IN1, tag, owner, clock) { } @@ -398,17 +397,12 @@ nes_bmc_gold260_device::nes_bmc_gold260_device(const machine_config &mconfig, co { } -nes_bmc_super22_device::nes_bmc_super22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : nes_nrom_device(mconfig, NES_BMC_SUPER22, tag, owner, clock) -{ -} - -nes_bmc_4in1reset_device::nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +nes_bmc_4in1reset_device::nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) : nes_nrom_device(mconfig, NES_BMC_4IN1RESET, tag, owner, clock), m_latch(0) { } -nes_bmc_42in1reset_device::nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) +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) { } @@ -976,17 +970,11 @@ void nes_bmc_76in1_device::pcb_reset() m_reg[0] = m_reg[1] = 0; } -void nes_bmc_150in1_device::device_start() -{ - common_start(); -} - void nes_bmc_150in1_device::pcb_reset() { - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg16_89ab(0); prg16_cdef(0); - chr8(0, m_chr_source); + chr8(0, CHRROM); } void nes_bmc_800in1_device::device_start() @@ -1049,54 +1037,35 @@ void nes_bmc_gold260_device::pcb_reset() chr8(0, m_chr_source); } -void nes_bmc_super22_device::device_start() -{ - common_start(); -} - -void nes_bmc_super22_device::pcb_reset() -{ - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; - prg32(0); - chr8(0, m_chr_source); -} - - // This PCB is fully emulated here :) void nes_bmc_4in1reset_device::device_start() { common_start(); - m_latch = -1; + m_latch = 3; save_item(NAME(m_latch)); } void nes_bmc_4in1reset_device::pcb_reset() { - m_latch++; - m_latch &= 3; - chr8(m_latch, CHRROM); + m_latch = (m_latch + 1) & 3; prg16_89ab(m_latch); prg16_cdef(m_latch); + chr8(m_latch, CHRROM); } void nes_bmc_42in1reset_device::device_start() { common_start(); - m_latch = -1; - save_item(NAME(m_reg)); + m_latch = 0x20; + save_item(NAME(m_latch)); } void nes_bmc_42in1reset_device::pcb_reset() { - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; - m_latch++; - m_latch &= 1; - chr8(0, m_chr_source); - prg32(m_latch << 4); - - m_reg[0] = 0; - m_reg[1] = 0; + m_latch ^= 0x20; + prg32(m_latch >> 1); + chr8(0, CHRRAM); } void nes_vram_protect_device::device_start() @@ -2672,13 +2641,13 @@ void nes_bmc_76in1_device::write_h(offs_t offset, u8 data) { LOG_MMC(("bmc_76in1 write_h, offset: %04x, data: %02x\n", offset, data)); m_reg[offset & 0x01] = data; - set_nt_mirroring(BIT(m_reg[0], 6) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); - u8 bank = (m_reg[1] << 6) | ((m_reg[0] & 0x80) >> 2) | (m_reg[0] & 0x1f); - u8 mode_16k = BIT(m_reg[0], 5); - bank &= 0x7e | mode_16k; - prg16_89ab(bank); - prg16_cdef(bank | !mode_16k); + u8 bank = m_reg[1] << 6 | (m_reg[0] & 0x80) >> 2 | (m_reg[0] & 0x1f); + u8 mode = !BIT(m_reg[0], 5); + prg16_89ab(bank & ~mode); + prg16_cdef(bank | mode); + + set_nt_mirroring(BIT(m_reg[0], 6) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ); } /*------------------------------------------------- @@ -2690,20 +2659,20 @@ void nes_bmc_76in1_device::write_h(offs_t offset, u8 data) iNES: mapper 202 - In MESS: Supported. + In MAME: Supported. -------------------------------------------------*/ -void nes_bmc_150in1_device::write_h(offs_t offset, uint8_t data) +void nes_bmc_150in1_device::write_h(offs_t offset, u8 data) { - int bank = (offset >> 1) & 0x07; - LOG_MMC(("bmc_150in1 write_h, offset: %04x, data: %02x\n", offset, data)); - prg16_89ab(bank); - prg16_cdef(bank + (((bank & 0x06) == 0x06) ? 1 : 0)); - chr8(bank, CHRROM); + u8 bank = (offset >> 1) & 0x07; + u8 mode = (bank & 0x06) == 0x06; + prg16_89ab(bank & ~mode); + prg16_cdef(bank | mode); + chr8(bank, CHRROM); set_nt_mirroring(BIT(offset, 0) ? PPU_MIRROR_HORZ: PPU_MIRROR_VERT); } @@ -2915,57 +2884,20 @@ uint8_t nes_bmc_gold150_device::read_h(offs_t offset) return hi_access_rom(offset); } -/*------------------------------------------------- - - BMC-SUPER22GAMES - - Unknown Bootleg Multigame Board - Games: - - iNES: - - is there a dsw to access the higher banks above 0x20? - - In MESS: Preliminary Supported. - - -------------------------------------------------*/ - -void nes_bmc_super22_device::write_h(offs_t offset, uint8_t data) -{ - LOG_MMC(("bmc_super22 write_h, offset: %04x, data: %02x\n", offset, data)); - - if (data & 0x20) - { - prg16_89ab(data & 0x1f); - prg16_cdef(data & 0x1f); - } - else - prg32((data & 0x1f) >> 1); - - switch (data & 0xc0) - { - case 0x00: set_nt_mirroring(PPU_MIRROR_LOW); break; - case 0x40: set_nt_mirroring(PPU_MIRROR_VERT); break; - case 0x80: set_nt_mirroring(PPU_MIRROR_HORZ); break; - case 0xc0: set_nt_mirroring(PPU_MIRROR_HIGH); break; - } -} - - /*------------------------------------------------- BMC-RESETBASED4IN1 Unknown Bootleg Multigame Board - Games: + Games: 4 in 1 (several of them) - iNES: + iNES: mapper 60 No need to use handlers. At reset the banks change and so does the game. - In MESS: Preliminary Supported. + In MAME: Supported. -------------------------------------------------*/ @@ -2974,33 +2906,30 @@ void nes_bmc_super22_device::write_h(offs_t offset, uint8_t data) BMC-42IN1RESETBASED Unknown Bootleg Multigame Board + Games: 42 (22 + 20) in 1 - Games: + 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. - iNES: + iNES: mapper 233 - In MESS: Preliminary Supported. + In MAME: Supported. -------------------------------------------------*/ -void nes_bmc_42in1reset_device::write_h(offs_t offset, uint8_t data) +void nes_bmc_42in1reset_device::write_h(offs_t offset, u8 data) { - int bank; LOG_MMC(("bmc_42in1reset write_h, offset: %04x, data: %02x\n", offset, data)); - m_reg[offset & 1] = data; - bank = (m_reg[0] & 0x1f) | (m_latch << 5) | ((m_reg[1] & 1) << 6); - - if (!(m_reg[0] & 0x20)) - prg32(bank >> 1); - else - { - prg16_89ab(bank); - prg16_cdef(bank); - } - - set_nt_mirroring(BIT(offset, 6) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); + u8 bank = m_latch | (data & 0x1f); + u8 mode = !BIT(data, 5); + 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); } /*------------------------------------------------- diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index d8eaf82b82e..51cfb3be3d9 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -883,9 +883,9 @@ class nes_bmc_76in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_76in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual void write_h(offs_t offset, uint8_t data) override; + virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; @@ -894,7 +894,7 @@ protected: virtual void device_start() override; private: - uint8_t m_reg[2]; + u8 m_reg[2]; }; @@ -904,15 +904,11 @@ class nes_bmc_150in1_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_150in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual void write_h(offs_t offset, uint8_t data) 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; }; @@ -924,7 +920,7 @@ public: // construction/destruction nes_bmc_500in1_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual void write_h(offs_t offset, uint8_t data) override; + virtual void write_h(offs_t offset, u8 data) override; }; @@ -1013,31 +1009,13 @@ protected: }; -// ======================> nes_bmc_super22_device - -class nes_bmc_super22_device : public nes_nrom_device -{ -public: - // construction/destruction - nes_bmc_super22_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - - virtual void write_h(offs_t offset, uint8_t data) override; - - virtual void pcb_reset() override; - -protected: - // device-level overrides - virtual void device_start() override; -}; - - // ======================> nes_bmc_4in1reset_device class nes_bmc_4in1reset_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_4in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); virtual void pcb_reset() override; @@ -1046,7 +1024,7 @@ protected: virtual void device_start() override; private: - int m_latch; + u8 m_latch; }; @@ -1056,9 +1034,9 @@ class nes_bmc_42in1reset_device : public nes_nrom_device { public: // construction/destruction - nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_bmc_42in1reset_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - virtual void write_h(offs_t offset, uint8_t data) override; + virtual void write_h(offs_t offset, u8 data) override; virtual void pcb_reset() override; @@ -1067,8 +1045,7 @@ protected: virtual void device_start() override; private: - int m_latch; - uint8_t m_reg[2]; + u8 m_latch; }; @@ -1233,7 +1210,6 @@ DECLARE_DEVICE_TYPE(NES_BMC_800IN1, nes_bmc_800in1_device) DECLARE_DEVICE_TYPE(NES_BMC_1200IN1, nes_bmc_1200in1_device) 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_SUPER22, nes_bmc_super22_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_LC160, nes_bmc_lc160_device) diff --git a/src/devices/bus/nes/nes_carts.cpp b/src/devices/bus/nes/nes_carts.cpp index c2903ca0f6e..e4fd93c2ddb 100644 --- a/src/devices/bus/nes/nes_carts.cpp +++ b/src/devices/bus/nes/nes_carts.cpp @@ -410,7 +410,6 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_70in1", NES_BMC_70IN1); // mapper 236 device.option_add_internal("bmc_72in1", NES_BMC_72IN1); device.option_add_internal("bmc_76in1", NES_BMC_76IN1); - device.option_add_internal("bmc_s42in1", NES_BMC_76IN1); device.option_add_internal("bmc_150in1", NES_BMC_150IN1); device.option_add_internal("bmc_190in1", NES_BMC_190IN1); device.option_add_internal("bmc_500in1", NES_BMC_500IN1); @@ -419,9 +418,8 @@ void nes_cart(device_slot_interface &device) device.option_add_internal("bmc_gold150", NES_BMC_GOLD150); // mapper 235 with 2M PRG device.option_add_internal("bmc_gold260", NES_BMC_GOLD260); // mapper 235 with 4M PRG device.option_add_internal("bmc_th22913", NES_BMC_TH22913); // mapper 63 - device.option_add_internal("bmc_s22games", NES_BMC_SUPER22); // mapper 233 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 226? or 233? + device.option_add_internal("bmc_reset42", NES_BMC_42IN1RESET); // mapper 233 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 ec8468c3173..cd5d373c36e 100644 --- a/src/devices/bus/nes/nes_ines.hxx +++ b/src/devices/bus/nes/nes_ines.hxx @@ -266,7 +266,7 @@ static const nes_mmc mmc_list[] = { 230, BMC_22GAMES }, { 231, BMC_20IN1 }, { 232, CAMERICA_BF9096 }, - { 233, BMC_SUPER22 }, + { 233, BMC_42IN1RESET }, { 234, AVE_MAXI15 }, { 235, BMC_GOLD150 }, // 235 Golden Game x-in-1 - Unsupported // 236 Game 800-in-1 - Unsupported, Realtec boards 8031 and 8155 diff --git a/src/devices/bus/nes/nes_pcb.hxx b/src/devices/bus/nes/nes_pcb.hxx index abd5ebecff6..e2253dc3321 100644 --- a/src/devices/bus/nes/nes_pcb.hxx +++ b/src/devices/bus/nes/nes_pcb.hxx @@ -291,7 +291,6 @@ static const nes_pcb pcb_list[] = { "bmc_70in1", BMC_70IN1 }, { "bmc_72in1", BMC_72IN1 }, { "bmc_76in1", BMC_76IN1 }, - { "bmc_s42in1", BMC_76IN1 }, { "bmc_150in1", BMC_150IN1 }, { "bmc_190in1", BMC_190IN1 }, { "bmc_500in1", BMC_500IN1 }, @@ -330,7 +329,6 @@ static const nes_pcb pcb_list[] = { "bmc_gold150", BMC_GOLD150 }, { "bmc_gold260", BMC_GOLD260 }, { "bmc_th22913", BMC_TH22913 }, - { "bmc_s22games", BMC_SUPER22 }, { "bmc_reset4", BMC_4IN1RESET }, { "bmc_reset42", BMC_42IN1RESET }, { "bmc_lc160", BMC_LITTLECOM160 }, diff --git a/src/devices/bus/nes/nes_slot.h b/src/devices/bus/nes/nes_slot.h index 13876e45ae1..c9cb6873549 100644 --- a/src/devices/bus/nes/nes_slot.h +++ b/src/devices/bus/nes/nes_slot.h @@ -101,7 +101,7 @@ enum BMC_FCGENJIN_8IN1, BMC_FK23C, BMC_FK23CA, BMC_JY820845C, BMC_PJOY84, BMC_TH22913, BMC_11160, BMC_G146, BMC_2751, BMC_8157, BMC_820720C, BMC_830118C, BMC_830832C, BMC_841101C, - BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_SUPER22, + BMC_411120C, BMC_GOLD150, BMC_GOLD260, BMC_12IN1, BMC_4IN1RESET, BMC_42IN1RESET, BMC_LITTLECOM160, BMC_CTC09, BMC_K1029, BMC_K3006, BMC_K3036, BMC_K3046, BMC_SA005A, BMC_TJ03, BMC_RESETSXROM, BMC_RESETTXROM0, BMC_RESETTXROM1, BMC_RESETTXROM2, BMC_TECHLINE9IN1,