diff options
Diffstat (limited to 'src/devices/machine/z8536.h')
-rw-r--r-- | src/devices/machine/z8536.h | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/src/devices/machine/z8536.h b/src/devices/machine/z8536.h index e307ea09069..7f046ad3f49 100644 --- a/src/devices/machine/z8536.h +++ b/src/devices/machine/z8536.h @@ -77,28 +77,28 @@ public: auto pc_rd_cb() { return m_read_pc.bind(); } auto pc_wr_cb() { return m_write_pc.bind(); } - DECLARE_WRITE_LINE_MEMBER( pa0_w ) { external_port_w(PORT_A, 0, state); } - DECLARE_WRITE_LINE_MEMBER( pa1_w ) { external_port_w(PORT_A, 1, state); } - DECLARE_WRITE_LINE_MEMBER( pa2_w ) { external_port_w(PORT_A, 2, state); } - DECLARE_WRITE_LINE_MEMBER( pa3_w ) { external_port_w(PORT_A, 3, state); } - DECLARE_WRITE_LINE_MEMBER( pa4_w ) { external_port_w(PORT_A, 4, state); } - DECLARE_WRITE_LINE_MEMBER( pa5_w ) { external_port_w(PORT_A, 5, state); } - DECLARE_WRITE_LINE_MEMBER( pa6_w ) { external_port_w(PORT_A, 6, state); } - DECLARE_WRITE_LINE_MEMBER( pa7_w ) { external_port_w(PORT_A, 7, state); } - - DECLARE_WRITE_LINE_MEMBER( pb0_w ) { external_port_w(PORT_B, 0, state); } - DECLARE_WRITE_LINE_MEMBER( pb1_w ) { external_port_w(PORT_B, 1, state); } - DECLARE_WRITE_LINE_MEMBER( pb2_w ) { external_port_w(PORT_B, 2, state); } - DECLARE_WRITE_LINE_MEMBER( pb3_w ) { external_port_w(PORT_B, 3, state); } - DECLARE_WRITE_LINE_MEMBER( pb4_w ) { external_port_w(PORT_B, 4, state); } - DECLARE_WRITE_LINE_MEMBER( pb5_w ) { external_port_w(PORT_B, 5, state); } - DECLARE_WRITE_LINE_MEMBER( pb6_w ) { external_port_w(PORT_B, 6, state); } - DECLARE_WRITE_LINE_MEMBER( pb7_w ) { external_port_w(PORT_B, 7, state); } - - DECLARE_WRITE_LINE_MEMBER( pc0_w ) { external_port_w(PORT_C, 0, state); } - DECLARE_WRITE_LINE_MEMBER( pc1_w ) { external_port_w(PORT_C, 1, state); } - DECLARE_WRITE_LINE_MEMBER( pc2_w ) { external_port_w(PORT_C, 2, state); } - DECLARE_WRITE_LINE_MEMBER( pc3_w ) { external_port_w(PORT_C, 3, state); } + void pa0_w(int state) { external_port_w(PORT_A, 0, state); } + void pa1_w(int state) { external_port_w(PORT_A, 1, state); } + void pa2_w(int state) { external_port_w(PORT_A, 2, state); } + void pa3_w(int state) { external_port_w(PORT_A, 3, state); } + void pa4_w(int state) { external_port_w(PORT_A, 4, state); } + void pa5_w(int state) { external_port_w(PORT_A, 5, state); } + void pa6_w(int state) { external_port_w(PORT_A, 6, state); } + void pa7_w(int state) { external_port_w(PORT_A, 7, state); } + + void pb0_w(int state) { external_port_w(PORT_B, 0, state); } + void pb1_w(int state) { external_port_w(PORT_B, 1, state); } + void pb2_w(int state) { external_port_w(PORT_B, 2, state); } + void pb3_w(int state) { external_port_w(PORT_B, 3, state); } + void pb4_w(int state) { external_port_w(PORT_B, 4, state); } + void pb5_w(int state) { external_port_w(PORT_B, 5, state); } + void pb6_w(int state) { external_port_w(PORT_B, 6, state); } + void pb7_w(int state) { external_port_w(PORT_B, 7, state); } + + void pc0_w(int state) { external_port_w(PORT_C, 0, state); } + void pc1_w(int state) { external_port_w(PORT_C, 1, state); } + void pc2_w(int state) { external_port_w(PORT_C, 2, state); } + void pc3_w(int state) { external_port_w(PORT_C, 3, state); } int intack_r(); @@ -109,11 +109,12 @@ protected: // device-level overrides virtual void device_start() override; virtual void device_reset() override; - virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; + + TIMER_CALLBACK_MEMBER(advance_counters); bool is_reset() const { return (m_register[MASTER_INTERRUPT_CONTROL] & MICR_RESET) != 0; } - enum + enum : int { TIMER_1 = 0, TIMER_2, @@ -121,7 +122,7 @@ protected: }; // ports - enum + enum : int { PORT_A = 0, PORT_B, @@ -369,15 +370,15 @@ protected: void write_register(offs_t offset, u8 data); void write_register(offs_t offset, u8 data, u8 mask); - bool counter_enabled(device_timer_id id); - bool counter_external_output(device_timer_id id); - bool counter_external_count(device_timer_id id); - bool counter_external_trigger(device_timer_id id); - bool counter_external_gate(device_timer_id id); - bool counter_gated(device_timer_id id); - void count(device_timer_id id); - void trigger(device_timer_id id); - void gate(device_timer_id id, int state); + bool counter_enabled(int id); + bool counter_external_output(int id); + bool counter_external_count(int id); + bool counter_external_trigger(int id); + bool counter_external_gate(int id); + bool counter_gated(int id); + void count(int id); + void trigger(int id); + void gate(int id, int state); void match_pattern(int port); void external_port_w(int port, int bit, int state); |