diff --git a/hash/nes.xml b/hash/nes.xml index af7b7e973e3..c150f105a91 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -78150,6 +78150,21 @@ be better to redump them properly. --> + + 11 in 1 (A-042) + 19?? + <pirate> + + + + + + + + + + + 11 in 1 Ball Series 19?? @@ -79268,6 +79283,7 @@ be better to redump them properly. --> + 4 in 1 (D-010) 19?? @@ -80306,6 +80322,21 @@ be better to redump them properly. --> + + 1994 Super HiK 6 in 1 (A-017) + 1994 + <pirate> + + + + + + + + + + + Super HiK 6 in 1 (A-030) 199? @@ -80321,7 +80352,7 @@ be better to redump them properly. --> - + 6 in 1 (ET40, 840726c, 43-203) 19?? <unknown> @@ -80869,8 +80900,7 @@ be better to redump them properly. --> - - + 8 in 1 (ET40, 821242c) 19?? <unknown> diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index decded4f6c7..916889a3b73 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -150,8 +150,8 @@ nes_a65as_device::nes_a65as_device(const machine_config &mconfig, const char *ta { } -nes_t262_device::nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : nes_nrom_device(mconfig, NES_T262, tag, owner, clock), m_latch1(0), m_latch2(0) +nes_t262_device::nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) + : nes_nrom_device(mconfig, NES_T262, tag, owner, clock), m_latch(0) { } @@ -547,19 +547,16 @@ void nes_a65as_device::pcb_reset() void nes_t262_device::device_start() { common_start(); - save_item(NAME(m_latch1)); - save_item(NAME(m_latch2)); + save_item(NAME(m_latch)); } void nes_t262_device::pcb_reset() { - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg16_89ab(0); prg16_cdef(7); - chr8(0, m_chr_source); + chr8(0, CHRRAM); - m_latch1 = 0; - m_latch2 = 0; + m_latch = 0; } void nes_novel1_device::device_start() @@ -1446,34 +1443,42 @@ void nes_a65as_device::write_h(offs_t offset, uint8_t data) Board BMC-T-262 - Games: 4-in-1 (D-010), 8-in-1 (A-020) + Games: 4-in-1 (D-010), 8-in-1 (A-020), and others - In MESS: Supported + NES 2.0: mapper 265 + + In MAME: Supported. + + TODO: Gunsmoke on 8-in-1 (ET40) has invisible sprites + that suddenly appear closer to the bottom of the screen. + Mirroring is correct, so is this a bug on the cartridge? -------------------------------------------------*/ -void nes_t262_device::write_h(offs_t offset, uint8_t data) +void nes_t262_device::write_h(offs_t offset, u8 data) { - uint8_t mmc_helper; LOG_MMC(("t262 write_h, offset: %04x, data: %02x\n", offset, data)); - if (m_latch2 || offset == 0) + if (!BIT(m_latch, 13)) { - m_latch1 = (m_latch1 & 0x38) | (data & 0x07); - prg16_89ab(m_latch1); + m_latch = offset; + set_nt_mirroring(BIT(m_latch, 1) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); } - else + + u8 bank = (m_latch & 0x300) >> 3 | (m_latch & 0x60) >> 2 | (data & 0x07); // NesDev shows the high bit here, but is it correct? So far no cart is large enough to use this. + u8 mode = BIT(m_latch, 0); + if (BIT(m_latch, 7)) // NROM mode { - m_latch2 = 1; - set_nt_mirroring(BIT(data, 1) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); - mmc_helper = ((offset >> 3) & 0x20) | ((offset >> 2) & 0x18); - m_latch1 = mmc_helper | (m_latch1 & 0x07); - prg16_89ab(m_latch1); - prg16_cdef(mmc_helper | 0x07); + prg16_89ab(bank & ~mode); + prg16_cdef(bank | mode); + } + else // UNROM mode + { + prg16_89ab(bank); + prg16_cdef(bank | 0x07); } } - /*------------------------------------------------- BMC-NOVELDIAMOND and BMC-999999in1 @@ -1507,7 +1512,6 @@ void nes_novel2_device::write_h(offs_t offset, uint8_t data) chr8(offset >> 3, CHRROM); } - /*------------------------------------------------- Board UNL-STUDYNGAME diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index 83ff5fbf5ef..5e2509b4b5a 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -161,9 +161,9 @@ class nes_t262_device : public nes_nrom_device { public: // construction/destruction - nes_t262_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + nes_t262_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; @@ -172,7 +172,7 @@ protected: virtual void device_start() override; private: - uint8_t m_latch1, m_latch2; + u16 m_latch; };