diff options
Diffstat (limited to 'src/devices/machine/z80pio.h')
-rw-r--r-- | src/devices/machine/z80pio.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/devices/machine/z80pio.h b/src/devices/machine/z80pio.h index a448fd9d502..6b0b6b13def 100644 --- a/src/devices/machine/z80pio.h +++ b/src/devices/machine/z80pio.h @@ -58,6 +58,7 @@ public: // construction/destruction z80pio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); + // configuration helpers auto out_int_callback() { return m_out_int_cb.bind(); } auto in_pa_callback() { return m_in_pa_cb.bind(); } auto out_pa_callback() { return m_out_pa_cb.bind(); } @@ -66,14 +67,13 @@ public: auto out_pb_callback() { return m_out_pb_cb.bind(); } auto out_brdy_callback() { return m_out_brdy_cb.bind(); } - // I/O line access int rdy(int which) { return m_port[which].rdy(); } void strobe(int which, bool state) { m_port[which].strobe(state); } - DECLARE_READ_LINE_MEMBER( rdy_a ) { return rdy(PORT_A); } - DECLARE_READ_LINE_MEMBER( rdy_b ) { return rdy(PORT_B); } - DECLARE_WRITE_LINE_MEMBER( strobe_a ) { strobe(PORT_A, state); } - DECLARE_WRITE_LINE_MEMBER( strobe_b ) { strobe(PORT_B, state); } + int rdy_a() { return rdy(PORT_A); } + int rdy_b() { return rdy(PORT_B); } + void strobe_a(int state) { strobe(PORT_A, state); } + void strobe_b(int state) { strobe(PORT_B, state); } // control register I/O uint8_t control_read(); @@ -97,22 +97,22 @@ public: uint8_t port_b_read() { return port_read(PORT_B); } void port_a_write(uint8_t data) { port_write(PORT_A, data); } void port_b_write(uint8_t data) { port_write(PORT_B, data); } - DECLARE_WRITE_LINE_MEMBER( pa0_w ) { port_write(PORT_A, 0, state); } - DECLARE_WRITE_LINE_MEMBER( pa1_w ) { port_write(PORT_A, 1, state); } - DECLARE_WRITE_LINE_MEMBER( pa2_w ) { port_write(PORT_A, 2, state); } - DECLARE_WRITE_LINE_MEMBER( pa3_w ) { port_write(PORT_A, 3, state); } - DECLARE_WRITE_LINE_MEMBER( pa4_w ) { port_write(PORT_A, 4, state); } - DECLARE_WRITE_LINE_MEMBER( pa5_w ) { port_write(PORT_A, 5, state); } - DECLARE_WRITE_LINE_MEMBER( pa6_w ) { port_write(PORT_A, 6, state); } - DECLARE_WRITE_LINE_MEMBER( pa7_w ) { port_write(PORT_A, 7, state); } - DECLARE_WRITE_LINE_MEMBER( pb0_w ) { port_write(PORT_B, 0, state); } - DECLARE_WRITE_LINE_MEMBER( pb1_w ) { port_write(PORT_B, 1, state); } - DECLARE_WRITE_LINE_MEMBER( pb2_w ) { port_write(PORT_B, 2, state); } - DECLARE_WRITE_LINE_MEMBER( pb3_w ) { port_write(PORT_B, 3, state); } - DECLARE_WRITE_LINE_MEMBER( pb4_w ) { port_write(PORT_B, 4, state); } - DECLARE_WRITE_LINE_MEMBER( pb5_w ) { port_write(PORT_B, 5, state); } - DECLARE_WRITE_LINE_MEMBER( pb6_w ) { port_write(PORT_B, 6, state); } - DECLARE_WRITE_LINE_MEMBER( pb7_w ) { port_write(PORT_B, 7, state); } + void pa0_w(int state) { port_write(PORT_A, 0, state); } + void pa1_w(int state) { port_write(PORT_A, 1, state); } + void pa2_w(int state) { port_write(PORT_A, 2, state); } + void pa3_w(int state) { port_write(PORT_A, 3, state); } + void pa4_w(int state) { port_write(PORT_A, 4, state); } + void pa5_w(int state) { port_write(PORT_A, 5, state); } + void pa6_w(int state) { port_write(PORT_A, 6, state); } + void pa7_w(int state) { port_write(PORT_A, 7, state); } + void pb0_w(int state) { port_write(PORT_B, 0, state); } + void pb1_w(int state) { port_write(PORT_B, 1, state); } + void pb2_w(int state) { port_write(PORT_B, 2, state); } + void pb3_w(int state) { port_write(PORT_B, 3, state); } + void pb4_w(int state) { port_write(PORT_B, 4, state); } + void pb5_w(int state) { port_write(PORT_B, 5, state); } + void pb6_w(int state) { port_write(PORT_B, 6, state); } + void pb7_w(int state) { port_write(PORT_B, 7, state); } // standard read/write, with C/D in bit 1, B/A in bit 0 u8 read(offs_t offset); @@ -151,8 +151,8 @@ private: }; // device-level overrides - virtual void device_start() override; - virtual void device_reset() override; + virtual void device_start() override ATTR_COLD; + virtual void device_reset() override ATTR_COLD; // device_z80daisy_interface overrides virtual int z80daisy_irq_state() override; @@ -196,9 +196,9 @@ private: int m_mode; // mode register int m_next_control_word; // next control word - uint8_t m_input; // input latch - uint8_t m_output; // output latch - uint8_t m_ior; // input/output register + uint8_t m_input; // input latch + uint8_t m_output; // output latch + uint8_t m_ior; // input/output register bool m_rdy; // ready bool m_stb; // strobe @@ -206,14 +206,14 @@ private: bool m_ie; // interrupt enabled bool m_ip; // interrupt pending bool m_ius; // interrupt under service - uint8_t m_icw; // interrupt control word - uint8_t m_vector; // interrupt vector - uint8_t m_mask; // interrupt mask + uint8_t m_icw; // interrupt control word + uint8_t m_vector; // interrupt vector + uint8_t m_mask; // interrupt mask bool m_match; // logic equation match }; // internal state - pio_port m_port[2]; + pio_port m_port[2]; devcb_write_line m_out_int_cb; devcb_read8 m_in_pa_cb; |