summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/ticket.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/ticket.h')
-rw-r--r--src/devices/machine/ticket.h39
1 files changed, 4 insertions, 35 deletions
diff --git a/src/devices/machine/ticket.h b/src/devices/machine/ticket.h
index 797fac5bd4e..b4d6d90d623 100644
--- a/src/devices/machine/ticket.h
+++ b/src/devices/machine/ticket.h
@@ -17,21 +17,9 @@
// GLOBAL VARIABLES
//**************************************************************************
-// device type definition
DECLARE_DEVICE_TYPE(TICKET_DISPENSER, ticket_dispenser_device)
DECLARE_DEVICE_TYPE(HOPPER, hopper_device)
-//**************************************************************************
-// CONSTANTS
-//**************************************************************************
-
-const uint8_t TICKET_MOTOR_ACTIVE_LOW = 0; /* Ticket motor is triggered by D7=0 */
-const uint8_t TICKET_MOTOR_ACTIVE_HIGH = 1; /* Ticket motor is triggered by D7=1 */
-
-const uint8_t TICKET_STATUS_ACTIVE_LOW = 0; /* Ticket is done dispensing when D7=0 */
-const uint8_t TICKET_STATUS_ACTIVE_HIGH = 1; /* Ticket is done dispensing when D7=1 */
-
-
//**************************************************************************
// TYPE DEFINITIONS
@@ -43,24 +31,16 @@ class ticket_dispenser_device : public device_t
{
public:
// construction/destruction
- ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, const attotime &period, uint8_t motor_sense, uint8_t status_sense)
+ ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, const attotime &period)
: ticket_dispenser_device(mconfig, tag, owner)
{
set_period(period);
- set_senses(motor_sense, status_sense, false);
}
ticket_dispenser_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
virtual ~ticket_dispenser_device();
// inline configuration helpers
void set_period(const attotime &period) { m_period = period; }
- void set_senses(uint8_t motor_sense, uint8_t status_sense, bool hopper_type)
- {
- m_motor_sense = motor_sense;
- m_status_sense = status_sense;
- m_hopper_type = hopper_type;
- }
-
auto dispense_handler() { return m_dispense_handler.bind(); }
// read/write handlers
@@ -71,22 +51,15 @@ protected:
ticket_dispenser_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock = 0);
// device-level overrides
- virtual void device_start() override;
- virtual void device_reset() override;
+ virtual void device_start() override ATTR_COLD;
+ virtual void device_reset() override ATTR_COLD;
TIMER_CALLBACK_MEMBER(update_output_state);
// configuration state
- uint8_t m_motor_sense;
- uint8_t m_status_sense;
attotime m_period;
bool m_hopper_type;
- // active state
- bool m_motoron;
- bool m_ticketdispensed;
- bool m_ticketnotdispensed;
-
bool m_status;
bool m_power;
emu_timer *m_timer;
@@ -98,16 +71,12 @@ class hopper_device : public ticket_dispenser_device
{
public:
// construction/destruction
- hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, const attotime &period, uint8_t motor_sense, uint8_t status_sense)
+ hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, const attotime &period)
: hopper_device(mconfig, tag, owner)
{
set_period(period);
- set_senses(motor_sense, status_sense, true);
}
hopper_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0);
-
-private:
-
};
#endif // MAME_MACHINE_TICKET_H