From 456e2e31545e5b6133d82bd3f5e2b1c8d5241a8d Mon Sep 17 00:00:00 2001 From: hap Date: Mon, 24 Feb 2025 18:28:11 +0100 Subject: [PATCH] leland: no need to check for scanline>0 for partial updates (update_partial already checks if scanline is out of bounds) --- src/mame/cinematronics/leland_m.cpp | 8 +++----- src/mame/cinematronics/leland_v.cpp | 16 ++++------------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/src/mame/cinematronics/leland_m.cpp b/src/mame/cinematronics/leland_m.cpp index 3cdd5eb2fff..89a13031290 100644 --- a/src/mame/cinematronics/leland_m.cpp +++ b/src/mame/cinematronics/leland_m.cpp @@ -34,12 +34,10 @@ #define VERBOSE LOG_WARN #include "logmacro.h" + + /* Internal routines */ - - - - /************************************* * * Generic dial encoding @@ -105,7 +103,6 @@ u8 leland_state::cerberus_dial_2_r() * *************************************/ - void leland_state::alleymas_joystick_kludge(u8 data) { /* catch the case where they clear this memory location at PC $1827 and change */ @@ -859,6 +856,7 @@ void ataxx_state::ataxx_battery_ram_w(offs_t offset, u8 data) } else if ((m_master_bank & 0x30) == 0x20) { + m_screen->update_partial(m_screen->vpos() - 1); m_ataxx_qram[((m_master_bank & 0xc0) << 8) | offset] = data; m_tilemap->mark_tile_dirty(((m_master_bank & 0x80) << 8) | offset); } diff --git a/src/mame/cinematronics/leland_v.cpp b/src/mame/cinematronics/leland_v.cpp index 622cceb29cb..13318af892d 100644 --- a/src/mame/cinematronics/leland_v.cpp +++ b/src/mame/cinematronics/leland_v.cpp @@ -154,9 +154,7 @@ void ataxx_state::video_start() void leland_state::scroll_w(offs_t offset, u8 data) { - int scanline = m_screen->vpos(); - if (scanline > 0) - m_screen->update_partial(scanline - 1); + m_screen->update_partial(m_screen->vpos() - 1); /* adjust the proper scroll value */ switch (offset) @@ -185,12 +183,10 @@ void leland_state::scroll_w(offs_t offset, u8 data) void leland_state::gfx_port_w(u8 data) { - int scanline = m_screen->vpos(); - if (scanline > 0) - m_screen->update_partial(scanline - 1); - if (m_gfxbank != data) { + m_screen->update_partial(m_screen->vpos() - 1); + m_gfxbank = data; m_tilemap->mark_all_dirty(); } @@ -274,11 +270,7 @@ void leland_state::vram_port_w(offs_t offset, u8 data, int num) int inc = (offset >> 2) & 2; int trans = (offset >> 4) & num; - /* don't fully understand why this is needed. Isn't the - video RAM just one big RAM? */ - int scanline = m_screen->vpos(); - if (scanline > 0) - m_screen->update_partial(scanline - 1); + m_screen->update_partial(m_screen->vpos() - 1); if (addr >= 0xf000) LOGMASKED(LOG_COMM, "%s:%s comm write %04X = %02X\n", machine().describe_context(), num ? "slave" : "master", addr, data);