summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/bus/iq151/staper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/bus/iq151/staper.cpp')
-rw-r--r--src/devices/bus/iq151/staper.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/devices/bus/iq151/staper.cpp b/src/devices/bus/iq151/staper.cpp
index 37379f590f8..63a365282d0 100644
--- a/src/devices/bus/iq151/staper.cpp
+++ b/src/devices/bus/iq151/staper.cpp
@@ -52,8 +52,15 @@ iq151_staper_device::iq151_staper_device(const machine_config &mconfig, const ch
void iq151_staper_device::device_start()
{
- m_printer_timer = timer_alloc(TIMER_PRINTER);
- m_printer_timer->reset();
+ m_printer_timer = timer_alloc(FUNC(iq151_staper_device::pc2_low_tick), this);
+}
+
+//-------------------------------------------------
+// device_reset - device-specific reset
+//-------------------------------------------------
+
+void iq151_staper_device::device_reset()
+{
}
//-------------------------------------------------
@@ -71,13 +78,12 @@ void iq151_staper_device::device_add_mconfig(machine_config &config)
}
//-------------------------------------------------
-// device_timer - handler timer events
+// pc2_low_tick - lower PPI Port C bit 2
//-------------------------------------------------
-void iq151_staper_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
+TIMER_CALLBACK_MEMBER(iq151_staper_device::pc2_low_tick)
{
- if (id == TIMER_PRINTER)
- m_ppi->pc2_w(0);
+ m_ppi->pc2_w(0);
}
@@ -106,13 +112,13 @@ void iq151_staper_device::io_write(offs_t offset, uint8_t data)
// I8255 interface
//**************************************************************************
-READ8_MEMBER( iq151_staper_device::ppi_porta_r )
+uint8_t iq151_staper_device::ppi_porta_r()
{
// TODO: paper tape reader input
return 0;
}
-WRITE8_MEMBER( iq151_staper_device::ppi_portb_w )
+void iq151_staper_device::ppi_portb_w(uint8_t data)
{
if (m_ppi_portc & 0x80)
{
@@ -128,7 +134,7 @@ WRITE8_MEMBER( iq151_staper_device::ppi_portb_w )
}
}
-WRITE8_MEMBER( iq151_staper_device::ppi_portc_w )
+void iq151_staper_device::ppi_portc_w(uint8_t data)
{
/*
x--- ---- printer select