sigmab98: fix regression with hopper motor

This commit is contained in:
hap 2024-10-24 18:22:10 +02:00
parent 68008cfb34
commit 2021a6e1f4
2 changed files with 6 additions and 5 deletions

View File

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

View File

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