// license:BSD-3-Clause // copyright-holders:Olivier Galibert #include "emu.h" #include "wpc_out.h" DEFINE_DEVICE_TYPE(WPC_OUT, wpc_out_device, "wpc_out", "Williams Pinball Controller Output Control") wpc_out_device::wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, WPC_OUT, tag, owner, clock) { names = nullptr; } wpc_out_device::~wpc_out_device() { } void wpc_out_device::set_names(const char *const *_names) { names = _names; } void wpc_out_device::set_handler(handler_t cb) { handler_cb = cb; } void wpc_out_device::set_gi_count(int _count) { gi_count = _count; } void wpc_out_device::gi_update() { attotime now = machine().time(); attotime delta = now - previous_gi_update; uint32_t delta_us = delta.as_ticks(1e6); for(int i=0; iadjust(attotime::from_hz(10), 0, attotime::from_hz(10)); } void wpc_out_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) { gi_update(); for(int i=0; i