From 01c732defa2ff7ef9512e121d541d2405b3c18cd Mon Sep 17 00:00:00 2001 From: AJR Date: Thu, 30 Mar 2017 01:44:32 -0400 Subject: isa8_device: Provide proper unitmask for address spaces of any data width (nw) screen_device: Guard against assert failure on partial updates starting from incomplete first line (nw) --- src/devices/bus/isa/isa.h | 6 +++++- src/emu/screen.cpp | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h index 2eddae32015..4ba5b764d24 100644 --- a/src/devices/bus/isa/isa.h +++ b/src/devices/bus/isa/isa.h @@ -215,7 +215,11 @@ public: } void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); - template void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), int bits = 8, uint64_t unitmask = 0xffffffffffffffffU) + template void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), int bits = 8) + { + m_iospace->install_device(addrstart, addrend, device, map, bits, 0xffffffffffffffffU >> (64 - m_iospace->data_width())); + } + template void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), int bits, uint64_t unitmask) { m_iospace->install_device(addrstart, addrend, device, map, bits, unitmask); } diff --git a/src/emu/screen.cpp b/src/emu/screen.cpp index ea523836ba0..8b4bcfa0cff 100644 --- a/src/emu/screen.cpp +++ b/src/emu/screen.cpp @@ -1235,9 +1235,12 @@ void screen_device::update_now() // if the line before us was incomplete, we must do it in two pieces if (m_partial_scan_hpos > 0) { - s32 save_scan = m_partial_scan_hpos; - update_partial(current_vpos - 2); - m_partial_scan_hpos = save_scan; + if (current_vpos > 1) + { + s32 save_scan = m_partial_scan_hpos; + update_partial(current_vpos - 2); + m_partial_scan_hpos = save_scan; + } // now finish the previous partial scanline int scanline = current_vpos - 1; -- cgit v1.2.3