diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/cpu/hmcs40/hmcs40.cpp | 12 | ||||
-rw-r--r-- | src/devices/cpu/hmcs40/hmcs40.h | 6 | ||||
-rw-r--r-- | src/devices/cpu/m6800/m6801.cpp | 12 | ||||
-rw-r--r-- | src/devices/cpu/m6800/m6801.h | 4 | ||||
-rw-r--r-- | src/devices/cpu/m6805/m68705.cpp | 8 | ||||
-rw-r--r-- | src/devices/cpu/m6805/m68705.h | 4 | ||||
-rw-r--r-- | src/devices/cpu/m6805/m68hc05.cpp | 8 | ||||
-rw-r--r-- | src/devices/cpu/m6805/m68hc05.h | 4 | ||||
-rw-r--r-- | src/devices/cpu/z180/hd647180x.cpp | 12 | ||||
-rw-r--r-- | src/devices/cpu/z180/hd647180x.h | 4 | ||||
-rw-r--r-- | src/devices/cpu/z80/tmpz84c015.cpp | 9 | ||||
-rw-r--r-- | src/devices/cpu/z80/tmpz84c015.h | 2 |
12 files changed, 40 insertions, 45 deletions
diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp index 42e1ca45ef8..33ee981e512 100644 --- a/src/devices/cpu/hmcs40/hmcs40.cpp +++ b/src/devices/cpu/hmcs40/hmcs40.cpp @@ -94,8 +94,8 @@ hmcs40_cpu_device::hmcs40_cpu_device(const machine_config &mconfig, device_type , m_family(family) , m_polarity(polarity) , m_stack_levels(stack_levels) - , m_read_r{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}} - , m_write_r{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}} + , m_read_r(*this) + , m_write_r(*this) , m_read_d(*this) , m_write_d(*this) { @@ -206,12 +206,8 @@ void hmcs40_cpu_device::device_start() reset_prescaler(); // resolve callbacks - for (int i = 0; i < 8; i++) - { - m_read_r[i].resolve_safe(m_polarity & 0xf); - m_write_r[i].resolve_safe(); - } - + m_read_r.resolve_all_safe(m_polarity & 0xf); + m_write_r.resolve_all_safe(); m_read_d.resolve_safe(m_polarity); m_write_d.resolve_safe(); diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h index 78203849835..ffc480395f4 100644 --- a/src/devices/cpu/hmcs40/hmcs40.h +++ b/src/devices/cpu/hmcs40/hmcs40.h @@ -175,9 +175,9 @@ protected: u8 m_r[8]; // R outputs state u16 m_d; // D pins state - // i/o handlers - devcb_read8 m_read_r[8]; - devcb_write8 m_write_r[8]; + // I/O handlers + devcb_read8::array<8> m_read_r; + devcb_write8::array<8> m_write_r; devcb_read16 m_read_d; devcb_write16 m_write_d; diff --git a/src/devices/cpu/m6800/m6801.cpp b/src/devices/cpu/m6800/m6801.cpp index ffc6e7a9f49..3bd7aef34f5 100644 --- a/src/devices/cpu/m6800/m6801.cpp +++ b/src/devices/cpu/m6800/m6801.cpp @@ -279,8 +279,8 @@ m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, const char *ta m6801_cpu_device::m6801_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, const op_func *insn, const uint8_t *cycles, address_map_constructor internal) : m6800_cpu_device(mconfig, type, tag, owner, clock, insn, cycles, internal) - , m_in_port_func{{*this}, {*this}, {*this}, {*this}} - , m_out_port_func{{*this}, {*this}, {*this}, {*this}} + , m_in_port_func(*this) + , m_out_port_func(*this) , m_out_sc2_func(*this) , m_out_sertx_func(*this) { @@ -701,10 +701,10 @@ void m6801_cpu_device::execute_set_input(int irqline, int state) void m6801_cpu_device::device_resolve_objects() { - for (auto &cb : m_in_port_func) - cb.resolve_safe(0xff); - for (auto &cb : m_out_port_func) - cb.resolve_safe(); + m6800_cpu_device::device_resolve_objects(); + + m_in_port_func.resolve_all_safe(0xff); + m_out_port_func.resolve_all_safe(); m_out_sc2_func.resolve_safe(); m_out_sertx_func.resolve_safe(); } diff --git a/src/devices/cpu/m6800/m6801.h b/src/devices/cpu/m6800/m6801.h index efc12e13b34..190c799fe5d 100644 --- a/src/devices/cpu/m6800/m6801.h +++ b/src/devices/cpu/m6800/m6801.h @@ -78,8 +78,8 @@ protected: void m6803_mem(address_map &map); - devcb_read8 m_in_port_func[4]; - devcb_write8 m_out_port_func[4]; + devcb_read8::array<4> m_in_port_func; + devcb_write8::array<4> m_out_port_func; devcb_write_line m_out_sc2_func; devcb_write_line m_out_sertx_func; diff --git a/src/devices/cpu/m6805/m68705.cpp b/src/devices/cpu/m6805/m68705.cpp index 84b24978430..b006727904f 100644 --- a/src/devices/cpu/m6805/m68705.cpp +++ b/src/devices/cpu/m6805/m68705.cpp @@ -221,8 +221,8 @@ m6805_hmos_device::m6805_hmos_device(machine_config const &mconfig, char const * , m_port_input{ 0xff, 0xff, 0xff, 0xff } , m_port_latch{ 0xff, 0xff, 0xff, 0xff } , m_port_ddr{ 0x00, 0x00, 0x00, 0x00 } - , m_port_cb_r{ { *this },{ *this },{ *this },{ *this } } - , m_port_cb_w{ { *this },{ *this },{ *this },{ *this } } + , m_port_cb_r(*this) + , m_port_cb_w(*this) , m_ram_size(ram_size) { } @@ -412,8 +412,8 @@ void m6805_hmos_device::device_start() // initialise digital I/O for (u8 &input : m_port_input) input = 0xff; - for (devcb_read8 &cb : m_port_cb_r) cb.resolve(); - for (devcb_write8 &cb : m_port_cb_w) cb.resolve_safe(); + m_port_cb_r.resolve_all(); + m_port_cb_w.resolve_all_safe(); add_port_latch_state<0>(); add_port_latch_state<1>(); diff --git a/src/devices/cpu/m6805/m68705.h b/src/devices/cpu/m6805/m68705.h index 00c906fd24f..c9f7b9fe571 100644 --- a/src/devices/cpu/m6805/m68705.h +++ b/src/devices/cpu/m6805/m68705.h @@ -207,8 +207,8 @@ private: u8 m_port_input[PORT_COUNT]; u8 m_port_latch[PORT_COUNT]; u8 m_port_ddr[PORT_COUNT]; - devcb_read8 m_port_cb_r[PORT_COUNT]; - devcb_write8 m_port_cb_w[PORT_COUNT]; + devcb_read8::array<PORT_COUNT> m_port_cb_r; + devcb_write8::array<PORT_COUNT> m_port_cb_w; // miscellaneous register enum mr_mask : u8 diff --git a/src/devices/cpu/m6805/m68hc05.cpp b/src/devices/cpu/m6805/m68hc05.cpp index 362c297da8e..3f986845708 100644 --- a/src/devices/cpu/m6805/m68hc05.cpp +++ b/src/devices/cpu/m6805/m68hc05.cpp @@ -144,8 +144,8 @@ m68hc05_device::m68hc05_device( type, { s_hc_ops, s_hc_cycles, addr_width, 0x00ff, 0x00c0, vector_mask, M68HC05_VECTOR_SWI }, internal_map) - , m_port_cb_r{ *this, *this, *this, *this } - , m_port_cb_w{ *this, *this, *this, *this } + , m_port_cb_r(*this) + , m_port_cb_w(*this) , m_port_bits{ 0xff, 0xff, 0xff, 0xff } , m_port_interrupt{ 0x00, 0x00, 0x00, 0x00 } , m_port_input{ 0xff, 0xff, 0xff, 0xff } @@ -446,8 +446,8 @@ void m68hc05_device::device_start() m6805_base_device::device_start(); // resolve callbacks - for (devcb_read8 &cb : m_port_cb_r) cb.resolve(); - for (devcb_write8 &cb : m_port_cb_w) cb.resolve_safe(); + m_port_cb_r.resolve_all(); + m_port_cb_w.resolve_all_safe(); m_tcmp_cb.resolve_safe(); // save digital I/O diff --git a/src/devices/cpu/m6805/m68hc05.h b/src/devices/cpu/m6805/m68hc05.h index b853c95df95..e817d414314 100644 --- a/src/devices/cpu/m6805/m68hc05.h +++ b/src/devices/cpu/m6805/m68hc05.h @@ -149,8 +149,8 @@ private: u8 copcr_cm() const { return m_copcr & 0x03; } // digital I/O - devcb_read8 m_port_cb_r[PORT_COUNT]; - devcb_write8 m_port_cb_w[PORT_COUNT]; + devcb_read8::array<PORT_COUNT> m_port_cb_r; + devcb_write8::array<PORT_COUNT> m_port_cb_w; u8 m_port_bits[PORT_COUNT]; u8 m_port_interrupt[PORT_COUNT]; u8 m_port_input[PORT_COUNT]; diff --git a/src/devices/cpu/z180/hd647180x.cpp b/src/devices/cpu/z180/hd647180x.cpp index 15bf3961d23..2311cd7b2ec 100644 --- a/src/devices/cpu/z180/hd647180x.cpp +++ b/src/devices/cpu/z180/hd647180x.cpp @@ -34,8 +34,8 @@ DEFINE_DEVICE_TYPE(HD647180X, hd647180x_device, "hd647180x", "Hitachi HD647180X hd647180x_device::hd647180x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : z180_device(mconfig, HD647180X, tag, owner, clock, true, address_map_constructor(FUNC(hd647180x_device::prom_map), this)) - , m_port_input_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}, {*this}} - , m_port_output_cb{{*this}, {*this}, {*this}, {*this}, {*this}, {*this}} + , m_port_input_cb(*this) + , m_port_output_cb(*this) , m_data_config("data", ENDIANNESS_LITTLE, 8, 9, 0, address_map_constructor(FUNC(hd647180x_device::ram_map), this)) { // arbitrary initial states @@ -275,10 +275,10 @@ void hd647180x_device::z180_internal_port_write(uint8_t port, uint8_t data) void hd647180x_device::device_resolve_objects() { - for (auto &cb : m_port_input_cb) - cb.resolve_safe(0xff); - for (auto &cb : m_port_output_cb) - cb.resolve_safe(); + z180_device::device_resolve_objects(); + + m_port_input_cb.resolve_all_safe(0xff); + m_port_output_cb.resolve_all_safe(); } void hd647180x_device::device_start() diff --git a/src/devices/cpu/z180/hd647180x.h b/src/devices/cpu/z180/hd647180x.h index 0221a614794..e0d6d3ec1f0 100644 --- a/src/devices/cpu/z180/hd647180x.h +++ b/src/devices/cpu/z180/hd647180x.h @@ -62,8 +62,8 @@ private: void ram_map(address_map &map); // port callbacks - devcb_read8 m_port_input_cb[7]; - devcb_write8 m_port_output_cb[6]; + devcb_read8::array<7> m_port_input_cb; + devcb_write8::array<6> m_port_output_cb; // internal RAM space address_space_config m_data_config; diff --git a/src/devices/cpu/z80/tmpz84c015.cpp b/src/devices/cpu/z80/tmpz84c015.cpp index a6a0f773adb..1828907b99a 100644 --- a/src/devices/cpu/z80/tmpz84c015.cpp +++ b/src/devices/cpu/z80/tmpz84c015.cpp @@ -26,8 +26,8 @@ void tmpz84c015_device::tmpz84c015_internal_io_map(address_map &map) } -tmpz84c015_device::tmpz84c015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) - : z80_device(mconfig, TMPZ84C015, tag, owner, clock), +tmpz84c015_device::tmpz84c015_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : + z80_device(mconfig, TMPZ84C015, tag, owner, clock), m_io_space_config( "io", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(tmpz84c015_device::tmpz84c015_internal_io_map), this)), m_ctc(*this, "tmpz84c015_ctc"), m_sio(*this, "tmpz84c015_sio"), @@ -51,7 +51,7 @@ tmpz84c015_device::tmpz84c015_device(const machine_config &mconfig, const char * m_out_rxdrqb_cb(*this), m_out_txdrqb_cb(*this), - m_zc_cb{ {*this}, {*this}, {*this}, {*this} }, + m_zc_cb(*this), m_in_pa_cb(*this), m_out_pa_cb(*this), @@ -97,8 +97,7 @@ void tmpz84c015_device::device_start() m_out_rxdrqb_cb.resolve_safe(); m_out_txdrqb_cb.resolve_safe(); - for (unsigned i = 0; i < 4; i++) - m_zc_cb[i].resolve_safe(); + m_zc_cb.resolve_all_safe(); m_in_pa_cb.resolve_safe(0); m_out_pa_cb.resolve_safe(); diff --git a/src/devices/cpu/z80/tmpz84c015.h b/src/devices/cpu/z80/tmpz84c015.h index 100a2743a71..1e6fdfda735 100644 --- a/src/devices/cpu/z80/tmpz84c015.h +++ b/src/devices/cpu/z80/tmpz84c015.h @@ -151,7 +151,7 @@ private: devcb_write_line m_out_rxdrqb_cb; devcb_write_line m_out_txdrqb_cb; - devcb_write_line m_zc_cb[4]; + devcb_write_line::array<4> m_zc_cb; devcb_read8 m_in_pa_cb; devcb_write8 m_out_pa_cb; |