From 2021a6e1f43c9b8f29468e7236a942d70da7e787 Mon Sep 17 00:00:00 2001 From: hap Date: Thu, 24 Oct 2024 18:22:10 +0200 Subject: sigmab98: fix regression with hopper motor --- src/mame/ausnz/excali64.cpp | 1 + src/mame/sigma/sigmab98.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mame/ausnz/excali64.cpp b/src/mame/ausnz/excali64.cpp index bfb4debae96..294a2b61e66 100644 --- a/src/mame/ausnz/excali64.cpp +++ b/src/mame/ausnz/excali64.cpp @@ -629,6 +629,7 @@ void excali64_state::excali64(machine_config &config) /* Devices */ CASSETTE(config, m_cass); m_cass->add_route(ALL_OUTPUTS, "mono", 0.05); + m_cass->set_default_state(CASSETTE_STOPPED | CASSETTE_MOTOR_ENABLED | CASSETTE_SPEAKER_ENABLED); WD2793(config, m_fdc, 16_MHz_XTAL / 8); m_fdc->drq_wr_callback().set(m_dma, FUNC(z80dma_device::rdy_w)); diff --git a/src/mame/sigma/sigmab98.cpp b/src/mame/sigma/sigmab98.cpp index b70371b5a16..0be46abc470 100644 --- a/src/mame/sigma/sigmab98.cpp +++ b/src/mame/sigma/sigmab98.cpp @@ -786,7 +786,7 @@ void sigmab98_state::c6_w(uint8_t data) // 02 hopper motor on (active low)? void sigmab98_state::c8_w(uint8_t data) { - m_hopper->motor_w(~data >> 1 & data & 1); + m_hopper->motor_w((!(data & 0x02) && (data & 0x01)) ? 1 : 0); m_c8 = data; show_outputs(); @@ -877,7 +877,7 @@ void lufykzku_state::lufykzku_c8_w(uint8_t data) { // bit 0? on payout button // bit 1? when ending payment - m_hopper->motor_w(( (data & 0x01) && !(data & 0x02)) ? 0 : 1); + m_hopper->motor_w(((data & 0x01) && !(data & 0x02)) ? 1 : 0); m_dsw_shifter[0]->shift_load_w(BIT(data, 4)); m_dsw_shifter[1]->shift_load_w(BIT(data, 4)); @@ -998,7 +998,7 @@ void sammymdl_state::leds_w(uint8_t data) // 01 hopper motor on (active low)? void sammymdl_state::hopper_w(uint8_t data) { - m_hopper->motor_w((!(data & 0x01) && (data & 0x02)) ? 0 : 1); + m_hopper->motor_w((!(data & 0x01) && (data & 0x02)) ? 1 : 0); m_out[2] = data; show_3_outputs(); @@ -1062,8 +1062,8 @@ void sammymdl_state::gocowboy_leds_w(uint8_t data) // 10 hopper enable? // 20 hopper motor on (active low)? - m_hopper_small->motor_w((!(data & 0x20) && (data & 0x10)) ? 0 : 1); - m_hopper_large->motor_w((!(data & 0x80) && (data & 0x40)) ? 0 : 1); + m_hopper_small->motor_w((!(data & 0x20) && (data & 0x10)) ? 1 : 0); + m_hopper_large->motor_w((!(data & 0x80) && (data & 0x40)) ? 1 : 0); m_out[1] = data; show_3_outputs(); -- cgit v1.2.3