From a37329883533067c08b006cdd11a80e4e911c206 Mon Sep 17 00:00:00 2001 From: hap Date: Sat, 23 Dec 2023 17:32:58 +0100 Subject: neogeo_v: remove unused mem_mask --- src/mame/midway/astrohome.cpp | 2 +- src/mame/neogeo/neogeo.h | 2 +- src/mame/neogeo/neogeo_v.cpp | 17 +++++++---------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/mame/midway/astrohome.cpp b/src/mame/midway/astrohome.cpp index a4ccc7bb1aa..0ce209be5f7 100644 --- a/src/mame/midway/astrohome.cpp +++ b/src/mame/midway/astrohome.cpp @@ -145,7 +145,7 @@ static INPUT_PORTS_START( astrocde ) PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(u8"\u2191 PAUSE / \\") PORT_CODE(KEYCODE_PGUP) // U+2191 = ↑ PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("MS 8 D E F TO") PORT_CODE(KEYCODE_S) PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("8 5 P Q R RETN") PORT_CODE(KEYCODE_8) - PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(u8"5 2 \u2190 ' \u2192 LINE") PORT_CODE(KEYCODE_5) // U+2190 = ←, // U+2192 = → + PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME(u8"5 2 \u2190 ' \u2192 LINE") PORT_CODE(KEYCODE_5) // U+2190 = ←, U+2192 = → PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("2 0 < \" > INPUT") PORT_CODE(KEYCODE_2) PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("0 RED Shift") PORT_CODE(KEYCODE_0) PORT_BIT(0xc0, IP_ACTIVE_HIGH, IPT_UNUSED) diff --git a/src/mame/neogeo/neogeo.h b/src/mame/neogeo/neogeo.h index 9e1e97f4184..7b47e36c0fb 100644 --- a/src/mame/neogeo/neogeo.h +++ b/src/mame/neogeo/neogeo.h @@ -82,7 +82,7 @@ protected: void audio_cpu_enable_nmi_w(offs_t offset, uint8_t data); uint16_t unmapped_r(address_space &space); uint16_t paletteram_r(offs_t offset); - void paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void paletteram_w(offs_t offset, uint16_t data); uint16_t video_register_r(address_space &space, offs_t offset, uint16_t mem_mask = ~0); void video_register_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/neogeo/neogeo_v.cpp b/src/mame/neogeo/neogeo_v.cpp index 7bb9b9d8322..e6eebf71909 100644 --- a/src/mame/neogeo/neogeo_v.cpp +++ b/src/mame/neogeo/neogeo_v.cpp @@ -94,7 +94,7 @@ uint16_t neogeo_base_state::paletteram_r(offs_t offset) } -void neogeo_base_state::paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask) +void neogeo_base_state::paletteram_w(offs_t offset, uint16_t data) { offset += m_palette_bank; m_paletteram[offset] = data; @@ -177,9 +177,6 @@ uint32_t neogeo_base_state::screen_update(screen_device &screen, bitmap_rgb32 &b uint16_t neogeo_base_state::get_video_control() { - uint16_t ret; - uint16_t v_counter; - /* The format of this very important location is: AAAA AAAA A??? BCCC @@ -201,13 +198,13 @@ uint16_t neogeo_base_state::get_video_control() C animation counter lower 3 bits */ - /* the vertical counter chain goes from 0xf8 - 0x1ff */ - v_counter = m_screen->vpos() + 0x100; + // the vertical counter chain goes from 0xf8 - 0x1ff + uint16_t v_counter = m_screen->vpos() + 0x100; if (v_counter >= 0x200) v_counter = v_counter - NEOGEO_VTOTAL; - ret = (v_counter << 7) | (m_sprgen->neogeo_get_auto_animation_counter() & 0x0007); + uint16_t ret = (v_counter << 7) | (m_sprgen->neogeo_get_auto_animation_counter() & 0x0007); if (VERBOSE) logerror("%s: video_control read (%04x)\n", machine().describe_context(), ret); @@ -230,7 +227,7 @@ uint16_t neogeo_base_state::video_register_r(address_space &space, offs_t offset { uint16_t ret; - /* accessing the LSB only is not mapped */ + // accessing the LSB only is not mapped if (mem_mask == 0x00ff) ret = unmapped_r(space) & 0x00ff; else @@ -251,10 +248,10 @@ uint16_t neogeo_base_state::video_register_r(address_space &space, offs_t offset void neogeo_base_state::video_register_w(offs_t offset, uint16_t data, uint16_t mem_mask) { - /* accessing the LSB only is not mapped */ + // accessing the LSB only is not mapped if (mem_mask != 0x00ff) { - /* accessing the MSB only stores same data in MSB and LSB */ + // accessing the MSB only stores same data in MSB and LSB if (mem_mask == 0xff00) data = (data & 0xff00) | (data >> 8); -- cgit v1.2.3