// license:BSD-3-Clause // copyright-holders:Olivier Galibert #include "emu.h" #include "wpc_out.h" const device_type WPC_OUT = &device_creator; wpc_out_device::wpc_out_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, WPC_OUT, "Williams Pinball Controller Output Control", tag, owner, clock, "wpc_out", __FILE__) { 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 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