diff options
| author | 2021-07-08 17:41:56 -0800 | |
|---|---|---|
| committer | 2021-07-09 11:41:56 +1000 | |
| commit | 482e61ae440ef26396d1dbea6dbeb2a1dcb57053 (patch) | |
| tree | 5ad03bc65937284f404f9263e50b35df0158b54d | |
| parent | ee61e4074b41dec22bdb2225efcfcfbb9c1ea410 (diff) | |
bus/nes: Fixed broken graphics for mapper 226 (two pirate multicarts). (#8266)
* Fixes the menu in mc_s42 so you can actually tell what you are selecting.
* Fixes mc_76 so the screen refreshes when returning to main menu from submenus.
* Fixes graphics glitches too numerous to list (anything with scrolling was heavily glitched to unplayable).
| -rw-r--r-- | hash/nes.xml | 11 | ||||
| -rw-r--r-- | src/devices/bus/nes/multigame.cpp | 51 | ||||
| -rw-r--r-- | src/devices/bus/nes/multigame.h | 2 |
3 files changed, 20 insertions, 44 deletions
diff --git a/hash/nes.xml b/hash/nes.xml index 9ef8f2568f0..61baf0ea31b 100644 --- a/hash/nes.xml +++ b/hash/nes.xml @@ -79718,12 +79718,11 @@ be better to redump them properly. --> <software name="mc_76"> <description>76 in 1</description> - <year>19??</year> - <publisher><pirate></publisher> + <year>1990</year> + <publisher>Tsang Hai</publisher> <part name="cart" interface="nes_cart"> <feature name="slot" value="bmc_76in1" /> <feature name="pcb" value="BMC-76IN1" /> - <feature name="mirroring" value="vertical" /> <dataarea name="prg" size="2097152"> <rom name="76 in 1.prg" size="2097152" crc="147733df" sha1="39499923c8970b089e359ac256e71fb75ae3c0de" offset="00000" status="baddump" /> </dataarea> @@ -80885,15 +80884,15 @@ to check why this is different --> </part> </software> - <software name="mc_s42" supported="partial"> - <description>Super 42 in 1 - 22 Games</description> + <software name="mc_s42"> + <description>Super 42 in 1</description> <year>19??</year> <publisher><pirate></publisher> <part name="cart" interface="nes_cart"> <feature name="slot" value="bmc_s42in1" /> <feature name="pcb" value="BMC-SUPER42IN1" /> <dataarea name="prg" size="1048576"> - <rom name="super 42 in 1 - 22 games.prg" size="1048576" crc="c9f92bd9" sha1="6060eb360b9b4ae7aca024c00ace5b472371d721" offset="00000" status="baddump" /> + <rom name="super 42 in 1.prg" size="1048576" crc="c9f92bd9" sha1="6060eb360b9b4ae7aca024c00ace5b472371d721" offset="00000" status="baddump" /> </dataarea> <!-- 8k VRAM on cartridge --> <dataarea name="vram" size="8192"> diff --git a/src/devices/bus/nes/multigame.cpp b/src/devices/bus/nes/multigame.cpp index 3a78dee027a..c368e0a2cc2 100644 --- a/src/devices/bus/nes/multigame.cpp +++ b/src/devices/bus/nes/multigame.cpp @@ -253,7 +253,7 @@ 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_nrom_device(mconfig, NES_BMC_76IN1, tag, owner, clock), m_latch1(0), m_latch2(0) + : nes_nrom_device(mconfig, NES_BMC_76IN1, tag, owner, clock) { } @@ -822,18 +822,15 @@ void nes_bmc_72in1_device::pcb_reset() void nes_bmc_76in1_device::device_start() { common_start(); - save_item(NAME(m_latch1)); - save_item(NAME(m_latch2)); + save_item(NAME(m_reg)); } void nes_bmc_76in1_device::pcb_reset() { - m_chr_source = m_vrom_chunks ? CHRROM : CHRRAM; prg32(0); - chr8(0, m_chr_source); + chr8(0, CHRRAM); - m_latch1 = 0; - m_latch2 = 0; + m_reg[0] = m_reg[1] = 0; } void nes_bmc_110in1_device::device_start() @@ -2154,48 +2151,28 @@ void nes_bmc_72in1_device::write_h(offs_t offset, uint8_t data) /*------------------------------------------------- - BMC-76IN1 + BMC-76IN1, BMC-SUPER42IN1 Unknown Bootleg Multigame Board Games: 76 in 1, Super 42 in 1 iNES: mapper 226 - In MESS: Supported. + In MAME: Supported. -------------------------------------------------*/ -// does this work for super42in1 as well?!? -void nes_bmc_76in1_device::write_h(offs_t offset, uint8_t data) +void nes_bmc_76in1_device::write_h(offs_t offset, u8 data) { - int hi_bank; - int size_16; - int bank; - 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); - if (offset & 0x01) - m_latch2 = data; - else - m_latch1 = data; - - set_nt_mirroring(BIT(m_latch1, 6) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); - - hi_bank = m_latch1 & 0x01; - size_16 = m_latch1 & 0x20; - bank = ((m_latch1 & 0x1e) >> 1) | ((m_latch1 & 0x80) >> 3) | ((m_latch2 & 0x01) << 5); - - if (size_16) - { - bank <<= 1; - if (hi_bank) - bank ++; - - prg16_89ab(bank); - prg16_cdef(bank); - } - else - prg32(bank); + 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); } /*------------------------------------------------- diff --git a/src/devices/bus/nes/multigame.h b/src/devices/bus/nes/multigame.h index 51db3e9f821..0192e6bdfc1 100644 --- a/src/devices/bus/nes/multigame.h +++ b/src/devices/bus/nes/multigame.h @@ -713,7 +713,7 @@ protected: virtual void device_start() override; private: - uint8_t m_latch1, m_latch2; + uint8_t m_reg[2]; }; |
