diff options
Diffstat (limited to 'src/mame/machine/mathbox.c')
-rw-r--r-- | src/mame/machine/mathbox.c | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/mame/machine/mathbox.c b/src/mame/machine/mathbox.c index b1363ecb47a..01323775554 100644 --- a/src/mame/machine/mathbox.c +++ b/src/mame/machine/mathbox.c @@ -55,7 +55,7 @@ INLINE mathbox_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == MATHBOX); - return (mathbox_state *)downcast<legacy_device_base *>(device)->token(); + return (mathbox_state *)downcast<mathbox_device *>(device)->token(); } @@ -360,4 +360,40 @@ DEVICE_GET_INFO( mathbox ) } -DEFINE_LEGACY_DEVICE(MATHBOX, mathbox); +const device_type MATHBOX = &device_creator<mathbox_device>; + +mathbox_device::mathbox_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, MATHBOX, "MATHBOX", tag, owner, clock) +{ + m_token = global_alloc_array_clear(UINT8, sizeof(mathbox_state)); +} + +//------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void mathbox_device::device_config_complete() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void mathbox_device::device_start() +{ + DEVICE_START_NAME( mathbox )(this); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void mathbox_device::device_reset() +{ + DEVICE_RESET_NAME( mathbox )(this); +} + + |