From 7aad252b347fe055d533e413b7273028936794ac Mon Sep 17 00:00:00 2001 From: Tauwasser Date: Sat, 15 Jul 2017 06:17:28 +0200 Subject: [PATCH] Gameboy v8 (#2477) Miscellaneous Game Boy changes: * gameboy: add Super Chinese Land 1.2.3' to MBC1 Collection check code * gameboy: fix MMM01 zero-adjust logic for ROM bank New working software list additions -------------------------------- * gameboy.xml: Sachen 4 in 1 (Euro, 4B-003) [Tauwasser] --- hash/gameboy.xml | 14 +++++++++++++- src/devices/bus/gameboy/gb_slot.cpp | 4 +++- src/devices/bus/gameboy/mbc.cpp | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/hash/gameboy.xml b/hash/gameboy.xml index aa74fddd3a6..12513bd76e7 100644 --- a/hash/gameboy.xml +++ b/hash/gameboy.xml @@ -7,7 +7,6 @@ - Shanghai Pocket by Sunsoft: are serial and release date correct or do they refer to the GBC version? Undumped pirate carts: - - 4B-003: Sachen 4-in-1 version 3 (Taiwan's Mahjong, Japan's Mahjong, Hong Kong's Mahjong, Store Tris) - GOWIN carts (see below the list of known games) --> @@ -24950,6 +24949,19 @@ + + + 4 in 1 (Euro, 4B-003) + 19?? + Sachen + + + + + + + + diff --git a/src/devices/bus/gameboy/gb_slot.cpp b/src/devices/bus/gameboy/gb_slot.cpp index 3b2cdb0b1f7..74a6a605a4a 100644 --- a/src/devices/bus/gameboy/gb_slot.cpp +++ b/src/devices/bus/gameboy/gb_slot.cpp @@ -480,9 +480,11 @@ bool gb_cart_slot_device_base::is_mbc1col_game(const uint8_t *ROM, uint32_t len) "MORTALKOMBAT DUO", /* Mortal Kombat I & II US */ "MORTALKOMBATI&II", + /* Super Chinese Land 1,2,3' */ + "SUPERCHINESE 123" }; - const uint8_t rows = sizeof(internal_names) / sizeof(internal_names[0]); + const uint8_t rows = ARRAY_LENGTH(internal_names); for (uint8_t i = 0x00; i < rows; ++i) { if (0 == memcmp(&ROM[0x134], &internal_names[i][0], name_length)) diff --git a/src/devices/bus/gameboy/mbc.cpp b/src/devices/bus/gameboy/mbc.cpp index 5f867933516..de71f483779 100644 --- a/src/devices/bus/gameboy/mbc.cpp +++ b/src/devices/bus/gameboy/mbc.cpp @@ -720,7 +720,7 @@ WRITE8_MEMBER(gb_rom_m161_device::write_bank) READ8_MEMBER(gb_rom_mmm01_device::read_rom) { - uint16_t romb = m_romb & ~m_romb_nwe; + uint16_t romb = m_romb & ~(0x1e0 | m_romb_nwe); uint16_t romb_base = m_romb & (0x1e0 | m_romb_nwe); uint8_t ramb_masked = ((offset & 0x4000) | m_mode ? m_ramb : m_ramb & ~0x03);