leland: no need to check for scanline>0 for partial updates (update_partial already checks if scanline is out of bounds)

This commit is contained in:
hap 2025-02-24 18:28:11 +01:00
parent ab1224c744
commit 456e2e3154
2 changed files with 7 additions and 17 deletions

View File

@ -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);
}

View File

@ -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);