diff options
Diffstat (limited to 'src/mame/drivers/sigmab98.cpp')
-rw-r--r-- | src/mame/drivers/sigmab98.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mame/drivers/sigmab98.cpp b/src/mame/drivers/sigmab98.cpp index 5f8259a8c2e..c26dcf49347 100644 --- a/src/mame/drivers/sigmab98.cpp +++ b/src/mame/drivers/sigmab98.cpp @@ -139,10 +139,7 @@ public: m_eeprom(*this, "eeprom"), m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_hopper(*this, "hopper"), - m_hopper_small(*this, "hopper_small"), - m_hopper_large(*this, "hopper_large") + m_palette(*this, "palette") { } required_device<cpu_device> m_maincpu; @@ -157,9 +154,6 @@ public: std::vector<uint8_t> m_paletteram; required_device<screen_device> m_screen; required_device<palette_device> m_palette; - optional_device<ticket_dispenser_device> m_hopper; - optional_device<ticket_dispenser_device> m_hopper_small; - optional_device<ticket_dispenser_device> m_hopper_large; std::unique_ptr<bitmap_ind16> m_sprite_bitmap; @@ -907,7 +901,7 @@ WRITE8_MEMBER(sigmab98_state::c6_w) // 02 hopper motor on (active low)? WRITE8_MEMBER(sigmab98_state::c8_w) { - m_hopper->motor_w((!(data & 0x02) && (data & 0x01)) ? 0 : 1); + machine().device<ticket_dispenser_device>("hopper")->write(space, 0, (!(data & 0x02) && (data & 0x01)) ? 0x00 : 0x80); m_c8 = data; show_outputs(); @@ -1222,7 +1216,7 @@ WRITE8_MEMBER(sigmab98_state::sammymdl_leds_w) // 01 hopper motor on (active low)? WRITE8_MEMBER(sigmab98_state::sammymdl_hopper_w) { - m_hopper->motor_w((!(data & 0x01) && (data & 0x02)) ? 0 : 1); + machine().device<ticket_dispenser_device>("hopper")->write(space, 0, (!(data & 0x01) && (data & 0x02)) ? 0x00 : 0x80); m_out[2] = data; show_3_outputs(); @@ -1232,7 +1226,7 @@ READ8_MEMBER(sigmab98_state::sammymdl_coin_hopper_r) { uint8_t ret = ioport("COIN")->read(); -// if ( !m_hopper->read(0) ) +// if ( !machine().device<ticket_dispenser_device>("hopper")->read(0) ) // ret &= ~0x01; return ret; @@ -1547,8 +1541,8 @@ WRITE8_MEMBER(sigmab98_state::gocowboy_leds_w) // 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); + machine().device<ticket_dispenser_device>("hopper_small")->write(space, 0, (!(data & 0x20) && (data & 0x10)) ? 0x00 : 0x80); + machine().device<ticket_dispenser_device>("hopper_large")->write(space, 0, (!(data & 0x80) && (data & 0x40)) ? 0x00 : 0x80); m_out[1] = data; show_3_outputs(); |