diff options
| author | 2022-10-16 08:58:21 +0100 | |
|---|---|---|
| committer | 2022-10-16 09:58:21 +0200 | |
| commit | c209b455ff8dbcc9543d9bb4ee4e691499644f7f (patch) | |
| tree | b945ccb4349b38e998964230d58fca28dd2f7ca6 /src/devices/machine/ticket.cpp | |
| parent | 385b0efe1b1ffe7df971b3bf4f835c5ec27c2b11 (diff) | |
mpu4.cpp, ticket.cpp Added proper hopper communications to ticket.cpp (#10404)
* Clones promoted to working
----------------------------
The Crystal Maze (v1.3 alt) (MPU4 Video)
* ticket.cpp: Add a devcb_line for output handling to communicate with hardware
mpu4.cpp: Fixed hopper hookup to use the ticket dispense handler
* mpu4.cpp Updated base map to remove DUART hack
Diffstat (limited to 'src/devices/machine/ticket.cpp')
| -rw-r--r-- | src/devices/machine/ticket.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/devices/machine/ticket.cpp b/src/devices/machine/ticket.cpp index f5dba9ef6d7..cdc0385827d 100644 --- a/src/devices/machine/ticket.cpp +++ b/src/devices/machine/ticket.cpp @@ -54,6 +54,7 @@ ticket_dispenser_device::ticket_dispenser_device(const machine_config &mconfig, , m_power(0) , m_timer(nullptr) , m_output(*this, tag) // TODO: change to "tag:status" + , m_dispense_handler(*this) // TODO: can we use m_output for this? { } @@ -141,6 +142,8 @@ void ticket_dispenser_device::device_start() m_output.resolve(); + m_dispense_handler.resolve_safe(); + save_item(NAME(m_status)); save_item(NAME(m_power)); } @@ -181,6 +184,10 @@ TIMER_CALLBACK_MEMBER(ticket_dispenser_device::update_output_state) // update output status m_output = m_status == m_ticketdispensed; + if (m_hopper_type) + { + m_dispense_handler(m_status); + } // if we just dispensed, increment global count if (m_status == m_ticketdispensed) { |
