From 8c15e470421a243df590205b8ca9494ada75c694 Mon Sep 17 00:00:00 2001 From: hap Date: Tue, 3 Oct 2023 11:42:35 +0200 Subject: bridgeb: remove unnneeded assert, ktmnt2: add clarity check for sample 0 --- src/mame/fidelity/bridgeb.cpp | 8 ++------ src/mame/handheld/hh_sm510.cpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mame/fidelity/bridgeb.cpp b/src/mame/fidelity/bridgeb.cpp index 3eb4bb01fa6..0feb9ca276f 100644 --- a/src/mame/fidelity/bridgeb.cpp +++ b/src/mame/fidelity/bridgeb.cpp @@ -110,11 +110,8 @@ void bridgeb_state::update_digits(offs_t offset, u16 data) void bridgeb_state::digit_w(offs_t offset, u8 data) { - assert(offset >= 0x2000); - // write to one DL1414 digit - offset = (offset >> 11 & 0xf) - 4; - m_dl1414[offset >> 2]->bus_w(offset & 3, data); + m_dl1414[(offset >> 13) % 3]->bus_w(offset >> 11 & 3, data); } @@ -165,8 +162,7 @@ void bridgeb_state::main_map(address_map &map) { map(0x0000, 0x3fff).rom(); map(0x6000, 0x63ff).mirror(0x1c00).ram(); - map(0x8000, 0xffff).w(FUNC(bridgeb_state::digit_w)); - map(0x8000, 0x9fff).unmapw(); + map(0xa000, 0xffff).w(FUNC(bridgeb_state::digit_w)); } void bridgeb_state::main_io(address_map &map) diff --git a/src/mame/handheld/hh_sm510.cpp b/src/mame/handheld/hh_sm510.cpp index 0229f756103..b1015da6ca6 100644 --- a/src/mame/handheld/hh_sm510.cpp +++ b/src/mame/handheld/hh_sm510.cpp @@ -5522,7 +5522,7 @@ void ktmnt2_state::sound_w(u8 data) if (sample == 0) m_samples->stop(0); } - else + else if (sample != 0) { sample--; if (sample < m_samples->samples() && strncmp(m_samples->names()[sample + 1], "none", 4)) -- cgit v1.2.3