diff options
Diffstat (limited to 'src/emu/sound/upd7759.c')
-rw-r--r-- | src/emu/sound/upd7759.c | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/src/emu/sound/upd7759.c b/src/emu/sound/upd7759.c index 7f611dc3ef9..7061d8a2540 100644 --- a/src/emu/sound/upd7759.c +++ b/src/emu/sound/upd7759.c @@ -224,7 +224,7 @@ INLINE upd7759_state *get_safe_token(device_t *device) { assert(device != NULL); assert(device->type() == UPD7759); - return (upd7759_state *)downcast<legacy_device_base *>(device)->token(); + return (upd7759_state *)downcast<upd7759_device *>(device)->token(); } @@ -767,4 +767,51 @@ DEVICE_GET_INFO( upd7759 ) } -DEFINE_LEGACY_SOUND_DEVICE(UPD7759, upd7759); +const device_type UPD7759 = &device_creator<upd7759_device>; + +upd7759_device::upd7759_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, UPD7759, "UPD7759", tag, owner, clock), + device_sound_interface(mconfig, *this) +{ + m_token = global_alloc_array_clear(UINT8, sizeof(upd7759_state)); +} + +//------------------------------------------------- +// device_config_complete - perform any +// operations now that the configuration is +// complete +//------------------------------------------------- + +void upd7759_device::device_config_complete() +{ +} + +//------------------------------------------------- +// device_start - device-specific startup +//------------------------------------------------- + +void upd7759_device::device_start() +{ + DEVICE_START_NAME( upd7759 )(this); +} + +//------------------------------------------------- +// device_reset - device-specific reset +//------------------------------------------------- + +void upd7759_device::device_reset() +{ + DEVICE_RESET_NAME( upd7759 )(this); +} + +//------------------------------------------------- +// sound_stream_update - handle a stream update +//------------------------------------------------- + +void upd7759_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) +{ + // should never get here + fatalerror("sound_stream_update called; not applicable to legacy sound devices\n"); +} + + |