diff --git a/src/devices/bus/cgenie/parallel/joystick.cpp b/src/devices/bus/cgenie/parallel/joystick.cpp index de520ba0669..0971226d8e0 100644 --- a/src/devices/bus/cgenie/parallel/joystick.cpp +++ b/src/devices/bus/cgenie/parallel/joystick.cpp @@ -95,8 +95,8 @@ ioport_constructor cgenie_joystick_device::device_input_ports() const cgenie_joystick_device::cgenie_joystick_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, CGENIE_JOYSTICK, "Joystick Interface EG2013", tag, owner, clock, "cgenie_joystick", __FILE__), device_parallel_interface(mconfig, *this), - m_joy(*this, "JOY"), - m_keypad(*this, "KEYPAD"), + m_joy(*this, "JOY.%u", 0), + m_keypad(*this, "KEYPAD.%u", 0), m_select(0) { } diff --git a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp index 6320a35868a..dddd93093b8 100644 --- a/src/devices/bus/intv_ctrl/ecs_ctrl.cpp +++ b/src/devices/bus/intv_ctrl/ecs_ctrl.cpp @@ -279,10 +279,10 @@ ioport_constructor intvecs_keybd_device::device_input_ports() const return INPUT_PORTS_NAME( intvecs_keybd ); } -intvecs_keybd_device::intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, ECS_KEYBD, "Mattel Intellivision ECS Keyboard", tag, owner, clock, "intvecs_keybd", __FILE__), - device_intvecs_control_port_interface(mconfig, *this), - m_keybd(*this, "ROW") +intvecs_keybd_device::intvecs_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, ECS_KEYBD, "Mattel Intellivision ECS Keyboard", tag, owner, clock, "intvecs_keybd", __FILE__) + , device_intvecs_control_port_interface(mconfig, *this) + , m_keybd(*this, "ROW.%u", 0) { } @@ -415,7 +415,7 @@ ioport_constructor intvecs_synth_device::device_input_ports() const intvecs_synth_device::intvecs_synth_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, ECS_SYNTH, "Mattel Intellivision ECS Synthetizer", tag, owner, clock, "intvecs_synth", __FILE__), device_intvecs_control_port_interface(mconfig, *this), - m_synth(*this, "SYNTH") + m_synth(*this, "SYNTH.%u", 0) { } diff --git a/src/devices/bus/msx_cart/msx_audio_kb.cpp b/src/devices/bus/msx_cart/msx_audio_kb.cpp index d9304613ca7..23349c383db 100644 --- a/src/devices/bus/msx_cart/msx_audio_kb.cpp +++ b/src/devices/bus/msx_cart/msx_audio_kb.cpp @@ -52,8 +52,9 @@ public: : device_t(mconfig, MSX_AUDIO_KB_HXMU901, "Toshiba HXMU901", tag, owner, clock, "hxmu901", __FILE__) , msx_audio_kb_port_interface(mconfig, *this) , m_row(0) - , m_keyboard(*this, "KEY") - { }; + , m_keyboard(*this, "KEY.%u", 0) + { + } virtual ioport_constructor device_input_ports() const override; @@ -182,8 +183,8 @@ public: : device_t(mconfig, MSX_AUDIO_KB_NMS1160, "Philips NMS-1160", tag, owner, clock, "nms1160", __FILE__) , msx_audio_kb_port_interface(mconfig, *this) , m_row(0) - , m_keyboard(*this, "KEY") - { }; + , m_keyboard(*this, "KEY.%u", 0) + { } virtual ioport_constructor device_input_ports() const override; diff --git a/src/devices/bus/neogeo_ctrl/mahjong.cpp b/src/devices/bus/neogeo_ctrl/mahjong.cpp index 5a58daf6bee..ed55fefc1b0 100644 --- a/src/devices/bus/neogeo_ctrl/mahjong.cpp +++ b/src/devices/bus/neogeo_ctrl/mahjong.cpp @@ -93,17 +93,15 @@ ioport_constructor neogeo_mjctrl_device::device_input_ports() const // neogeo_joystick_device - constructor //------------------------------------------------- -neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source): - device_t(mconfig, type, name, tag, owner, clock, shortname, source), - device_neogeo_control_port_interface(mconfig, *this), - m_mjpanel(*this, "MJ") +neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source) + : device_t(mconfig, type, name, tag, owner, clock, shortname, source) + , device_neogeo_control_port_interface(mconfig, *this) + , m_mjpanel(*this, "MJ.%u", 0) { } -neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, NEOGEO_MJCTRL_AC, "SNK Neo Geo Arcade Mahjong panel", tag, owner, clock, "neogeo_mjac", __FILE__), - device_neogeo_control_port_interface(mconfig, *this), - m_mjpanel(*this, "MJ") +neogeo_mjctrl_ac_device::neogeo_mjctrl_ac_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : neogeo_mjctrl_ac_device(mconfig, NEOGEO_MJCTRL_AC, "SNK Neo Geo Arcade Mahjong panel", tag, owner, clock, "neogeo_mjac", __FILE__) { } diff --git a/src/devices/bus/nes_ctrl/fckeybrd.cpp b/src/devices/bus/nes_ctrl/fckeybrd.cpp index 2381933041c..b4c6dde6033 100644 --- a/src/devices/bus/nes_ctrl/fckeybrd.cpp +++ b/src/devices/bus/nes_ctrl/fckeybrd.cpp @@ -144,11 +144,13 @@ machine_config_constructor nes_fckeybrd_device::device_mconfig_additions() const // nes_fckeybrd_device - constructor //------------------------------------------------- -nes_fckeybrd_device::nes_fckeybrd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, NES_FCKEYBOARD, "Nintendo Family Computer Keyboard Component", tag, owner, clock, "nes_fckeybrd", __FILE__), - device_nes_control_port_interface(mconfig, *this), - m_cassette(*this, "tape"), - m_kbd(*this, "FCKEY"), m_fck_scan(0), m_fck_mode(0) +nes_fckeybrd_device::nes_fckeybrd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, NES_FCKEYBOARD, "Nintendo Family Computer Keyboard Component", tag, owner, clock, "nes_fckeybrd", __FILE__) + , device_nes_control_port_interface(mconfig, *this) + , m_cassette(*this, "tape") + , m_kbd(*this, "FCKEY.%u", 0) + , m_fck_scan(0) + , m_fck_mode(0) { } diff --git a/src/devices/bus/nes_ctrl/ftrainer.cpp b/src/devices/bus/nes_ctrl/ftrainer.cpp index 506418d4446..93edab2425a 100644 --- a/src/devices/bus/nes_ctrl/ftrainer.cpp +++ b/src/devices/bus/nes_ctrl/ftrainer.cpp @@ -83,10 +83,11 @@ ioport_constructor nes_ftrainer_device::device_input_ports() const // nes_ftrainer_device - constructor //------------------------------------------------- -nes_ftrainer_device::nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, NES_FTRAINER, "Bandai Family Trainer", tag, owner, clock, "nes_famtrain", __FILE__), - device_nes_control_port_interface(mconfig, *this), - m_trainer(*this, "FT_COL"), m_row_scan(0) +nes_ftrainer_device::nes_ftrainer_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, NES_FTRAINER, "Bandai Family Trainer", tag, owner, clock, "nes_famtrain", __FILE__) + , device_nes_control_port_interface(mconfig, *this) + , m_trainer(*this, "FT_COL.%u", 0) + , m_row_scan(0) { } diff --git a/src/devices/bus/nes_ctrl/mjpanel.cpp b/src/devices/bus/nes_ctrl/mjpanel.cpp index 8a4710c2c88..988c54f11d1 100644 --- a/src/devices/bus/nes_ctrl/mjpanel.cpp +++ b/src/devices/bus/nes_ctrl/mjpanel.cpp @@ -69,10 +69,11 @@ ioport_constructor nes_mjpanel_device::device_input_ports() const // nes_mjpanel_device - constructor //------------------------------------------------- -nes_mjpanel_device::nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, NES_MJPANEL, "Famicom Mahjong Panel", tag, owner, clock, "nes_mjpanel", __FILE__), - device_nes_control_port_interface(mconfig, *this), - m_panel(*this, "MJPANEL"), m_latch(0) +nes_mjpanel_device::nes_mjpanel_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, NES_MJPANEL, "Famicom Mahjong Panel", tag, owner, clock, "nes_mjpanel", __FILE__) + , device_nes_control_port_interface(mconfig, *this) + , m_panel(*this, "MJPANEL.%u", 0) + , m_latch(0) { } diff --git a/src/devices/bus/nes_ctrl/suborkey.cpp b/src/devices/bus/nes_ctrl/suborkey.cpp index 13f8bb72481..3341887c761 100644 --- a/src/devices/bus/nes_ctrl/suborkey.cpp +++ b/src/devices/bus/nes_ctrl/suborkey.cpp @@ -160,10 +160,12 @@ ioport_constructor nes_suborkey_device::device_input_ports() const // nes_suborkey_device - constructor //------------------------------------------------- -nes_suborkey_device::nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : - device_t(mconfig, NES_SUBORKEYBOARD, "Subor FC Keyboard", tag, owner, clock, "nes_suborkey", __FILE__), - device_nes_control_port_interface(mconfig, *this), - m_kbd(*this, "SUBOR"), m_fck_scan(0), m_fck_mode(0) +nes_suborkey_device::nes_suborkey_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) + : device_t(mconfig, NES_SUBORKEYBOARD, "Subor FC Keyboard", tag, owner, clock, "nes_suborkey", __FILE__) + , device_nes_control_port_interface(mconfig, *this) + , m_kbd(*this, "SUBOR.%u", 0) + , m_fck_scan(0) + , m_fck_mode(0) { } diff --git a/src/devices/bus/sat_ctrl/keybd.cpp b/src/devices/bus/sat_ctrl/keybd.cpp index 54fa2d5722c..91c3f438f6d 100644 --- a/src/devices/bus/sat_ctrl/keybd.cpp +++ b/src/devices/bus/sat_ctrl/keybd.cpp @@ -208,7 +208,7 @@ ioport_constructor saturn_keybd_device::device_input_ports() const saturn_keybd_device::saturn_keybd_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SATURN_KEYBD, "Sega Saturn Keyboard", tag, owner, clock, "saturn_keybd", __FILE__), device_saturn_control_port_interface(mconfig, *this), - m_key(*this, "KEY"), + m_key(*this, "KEY.%u", 0), m_key_s1(*this, "KEYS_1") { m_ctrl_id = 0x34; diff --git a/src/emu/devfind.h b/src/emu/devfind.h index d4a7a7defa9..5d0ecce94ed 100644 --- a/src/emu/devfind.h +++ b/src/emu/devfind.h @@ -19,16 +19,6 @@ #define FINDER_DUMMY_TAG "finder_dummy_tag" -//************************************************************************** -// IOPORT ARRAY MACROS -//************************************************************************** - -// these macros can be used to initialize an ioport_array with -// individual port names, instead of a base name + numeric suffix - -#define IOPORT_ARRAY_MEMBER(name) const char * const name[] = -#define DECLARE_IOPORT_ARRAY(name) static const char * const name[] - //************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -285,19 +275,6 @@ private: { } - template - array_finder_base(device_t &base, char const *tag, indices) - : m_tag{ util::string_format("%s.%u", tag, V)... } - , m_array{ { base, m_tag[V].c_str() }... } - { - } - - template - array_finder_base(device_t &base, char const *const tags[], indices) - : m_array{ { base, tags[V] }... } - { - } - template array_finder_base(device_t &base, std::array const &tags, indices) : m_array{ { base, tags[V] }... } @@ -306,8 +283,6 @@ private: protected: template array_finder_base(device_t &base, F const &fmt, unsigned start) : array_finder_base(base, fmt, start, index_range()) { } - array_finder_base(device_t &base, char const *tag) : array_finder_base(base, tag, index_range()) { } - array_finder_base(device_t &base, char const *const tags[]) : array_finder_base(base, tags, index_range()) { } array_finder_base(device_t &base, std::array const &tags) : array_finder_base(base, tags, index_range()) { } std::string m_tag[Count]; @@ -333,16 +308,6 @@ public: { } - ioport_array_finder(device_t &base, const char *basetag) - : array_finder_base, Count>(base, basetag) - { - } - - ioport_array_finder(device_t &base, char const *const tags[]) - : array_finder_base, Count>(base, tags) - { - } - ioport_array_finder(device_t &base, std::array const &tags) : array_finder_base, Count>(base, tags) { @@ -355,8 +320,6 @@ class optional_ioport_array: public ioport_array_finder { public: template optional_ioport_array(device_t &base, F const &fmt, unsigned start) : ioport_array_finder(base, fmt, start) { } - optional_ioport_array(device_t &base, char const *basetag) : ioport_array_finder(base, basetag) { } - optional_ioport_array(device_t &base, char const *const tags[]) : ioport_array_finder(base, tags) { } optional_ioport_array(device_t &base, std::array const &tags) : ioport_array_finder(base, tags) { } }; @@ -366,8 +329,6 @@ class required_ioport_array: public ioport_array_finder { public: template required_ioport_array(device_t &base, F const &fmt, unsigned start) : ioport_array_finder(base, fmt, start) { } - required_ioport_array(device_t &base, char const *basetag) : ioport_array_finder(base, basetag) { } - required_ioport_array(device_t &base, char const *const tags[]) : ioport_array_finder(base, tags) { } required_ioport_array(device_t &base, std::array const &tags) : ioport_array_finder(base, tags) { } }; @@ -513,16 +474,6 @@ public: { } - shared_ptr_array_finder(device_t &base, const char *basetag) - : array_finder_base, Count>(base, basetag) - { - } - - shared_ptr_array_finder(device_t &base, char const *const tags[]) - : array_finder_base, Count>(base, tags) - { - } - shared_ptr_array_finder(device_t &base, std::array const &tags) : array_finder_base, Count>(base, tags) { @@ -535,8 +486,6 @@ class optional_shared_ptr_array : public shared_ptr_array_finder optional_shared_ptr_array(device_t &base, F const &fmt, unsigned start) : shared_ptr_array_finder(base, fmt, start) { } - optional_shared_ptr_array(device_t &base, char const *basetag) : shared_ptr_array_finder(base, basetag) { } - optional_shared_ptr_array(device_t &base, char const *const tags[]) : shared_ptr_array_finder(base, tags) { } optional_shared_ptr_array(device_t &base, std::array const &tags) : shared_ptr_array_finder(base, tags) { } }; @@ -546,8 +495,6 @@ class required_shared_ptr_array : public shared_ptr_array_finder required_shared_ptr_array(device_t &base, F const &fmt, unsigned start) : shared_ptr_array_finder(base, fmt, start) { } - required_shared_ptr_array(device_t &base, char const *basetag) : shared_ptr_array_finder(base, basetag) { } - required_shared_ptr_array(device_t &base, char const *const tags[]) : shared_ptr_array_finder(base, tags) { } required_shared_ptr_array(device_t &base, std::array const &tags) : shared_ptr_array_finder(base, tags) { } }; diff --git a/src/emu/device.cpp b/src/emu/device.cpp index 6bc7ff40345..1480f30a6f1 100644 --- a/src/emu/device.cpp +++ b/src/emu/device.cpp @@ -934,4 +934,4 @@ const std::vector &device_t::rom_region_vector() const m_rom_entries = rom_build_entries(device_rom_region()); } return m_rom_entries; -} \ No newline at end of file +} diff --git a/src/mame/drivers/alphasma.cpp b/src/mame/drivers/alphasma.cpp index 024d103ef96..7d239676a02 100644 --- a/src/mame/drivers/alphasma.cpp +++ b/src/mame/drivers/alphasma.cpp @@ -23,16 +23,17 @@ class alphasmart_state : public driver_device { public: alphasmart_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_lcdc0(*this, "ks0066_0"), - m_lcdc1(*this, "ks0066_1"), - m_nvram(*this, "nvram"), - m_ram(*this, RAM_TAG), - m_rambank(*this, "rambank"), - m_keyboard(*this, "COL"), - m_battery_status(*this, "BATTERY") - { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_lcdc0(*this, "ks0066_0") + , m_lcdc1(*this, "ks0066_1") + , m_nvram(*this, "nvram") + , m_ram(*this, RAM_TAG) + , m_rambank(*this, "rambank") + , m_keyboard(*this, "COL.%u", 0) + , m_battery_status(*this, "BATTERY") + { + } required_device m_maincpu; required_device m_lcdc0; @@ -69,9 +70,10 @@ class asma2k_state : public alphasmart_state { public: asma2k_state(const machine_config &mconfig, device_type type, const char *tag) - : alphasmart_state(mconfig, type, tag), - m_intram(*this, "internal_ram") - { } + : alphasmart_state(mconfig, type, tag) + , m_intram(*this, "internal_ram") + { + } required_shared_ptr m_intram; diff --git a/src/mame/drivers/apf.cpp b/src/mame/drivers/apf.cpp index 70e67d66cfe..983fb96665b 100644 --- a/src/mame/drivers/apf.cpp +++ b/src/mame/drivers/apf.cpp @@ -101,8 +101,8 @@ public: , m_fdc(*this, "fdc") , m_floppy0(*this, "fdc:0") , m_floppy1(*this, "fdc:1") - , m_joy(*this, "joy") - , m_key(*this, "key") + , m_joy(*this, "joy.%u", 0) + , m_key(*this, "key.%u", 0) , m_p_videoram(*this, "videoram") { } diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp index 00aa5357c19..a100df2e52e 100644 --- a/src/mame/drivers/astrocde.cpp +++ b/src/mame/drivers/astrocde.cpp @@ -234,8 +234,6 @@ WRITE8_MEMBER(astrocde_state::seawolf2_sound_2_w)// Port 41 * *************************************/ -IOPORT_ARRAY_MEMBER(astrocde_state::trackball_inputs) { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" }; - CUSTOM_INPUT_MEMBER(astrocde_state::ebases_trackball_r) { return m_trackball[m_input_select]->read(); @@ -441,8 +439,6 @@ READ8_MEMBER(astrocde_state::demndrgn_io_r) } -IOPORT_ARRAY_MEMBER(astrocde_state::joystick_inputs) { "MOVEX", "MOVEY" }; - CUSTOM_INPUT_MEMBER(astrocde_state::demndragn_joystick_r) { diff --git a/src/mame/drivers/atari_s1.cpp b/src/mame/drivers/atari_s1.cpp index a6a5506e0b1..0d2c201631f 100644 --- a/src/mame/drivers/atari_s1.cpp +++ b/src/mame/drivers/atari_s1.cpp @@ -65,7 +65,7 @@ public: , m_maincpu(*this, "maincpu") , m_p_ram(*this, "ram") , m_dac(*this, "dac") - , m_switch(*this, "SWITCH") + , m_switch(*this, "SWITCH.%u", 0) { } DECLARE_READ8_MEMBER(m1080_r); diff --git a/src/mame/drivers/bbcbc.cpp b/src/mame/drivers/bbcbc.cpp index 1dbba2c5346..4e8922d6e6d 100644 --- a/src/mame/drivers/bbcbc.cpp +++ b/src/mame/drivers/bbcbc.cpp @@ -44,7 +44,7 @@ public: m_maincpu(*this, "maincpu"), m_pio(*this, "z80pio"), m_cart(*this, "cartslot"), - m_buttons(*this, "BUTTONS") + m_buttons(*this, "BUTTONS.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/drivers/bcs3.cpp b/src/mame/drivers/bcs3.cpp index ab44bf58d47..1ec29d103f5 100644 --- a/src/mame/drivers/bcs3.cpp +++ b/src/mame/drivers/bcs3.cpp @@ -65,7 +65,7 @@ public: , m_p_chargen(*this, "chargen") , m_p_videoram(*this, "videoram") , m_cass(*this, "cassette") - , m_io_keyboard(*this, "KEY") + , m_io_keyboard(*this, "KEY.%u", 0) { } DECLARE_READ8_MEMBER(keyboard_r); diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp index a8675045a6d..f2d84abc5d4 100644 --- a/src/mame/drivers/bnstars.cpp +++ b/src/mame/drivers/bnstars.cpp @@ -108,14 +108,14 @@ public: m_ms32_bg1_ram(*this, "bg1_ram"), m_ms32_roz0_ram(*this, "roz0_ram"), m_ms32_roz1_ram(*this, "roz1_ram"), - m_ms32_roz_ctrl(*this, "roz_ctrl"), + m_ms32_roz_ctrl(*this, "roz_ctrl.%u", 0), m_ms32_spram(*this, "spram"), m_ms32_tx0_scroll(*this, "tx0_scroll"), m_ms32_bg0_scroll(*this, "bg0_scroll"), m_ms32_tx1_scroll(*this, "tx1_scroll"), m_ms32_bg1_scroll(*this, "bg1_scroll"), - m_p1_keys(*this, "P1KEY"), - m_p2_keys(*this, "P2KEY") { } + m_p1_keys(*this, "P1KEY.%u", 0), + m_p2_keys(*this, "P2KEY.%u", 0) { } tilemap_t *m_ms32_tx_tilemap[2]; tilemap_t *m_ms32_bg_tilemap[2]; diff --git a/src/mame/drivers/br8641.cpp b/src/mame/drivers/br8641.cpp index 1f54962d112..6dcde233d1e 100644 --- a/src/mame/drivers/br8641.cpp +++ b/src/mame/drivers/br8641.cpp @@ -39,7 +39,7 @@ public: , m_pio2(*this, "pio2") , m_pio3(*this, "pio3") , m_ctc(*this, "ctc") - , m_io_keyboard(*this, "KEY") + , m_io_keyboard(*this, "KEY.%u", 0) , m_beep(*this, "beeper") { } diff --git a/src/mame/drivers/cc40.cpp b/src/mame/drivers/cc40.cpp index 1fc89f3da77..f3500bcabbd 100644 --- a/src/mame/drivers/cc40.cpp +++ b/src/mame/drivers/cc40.cpp @@ -92,7 +92,7 @@ public: m_maincpu(*this, "maincpu"), m_dac(*this, "dac"), m_cart(*this, "cartslot"), - m_key_matrix(*this, "IN"), + m_key_matrix(*this, "IN.%u", 0), m_battery_inp(*this, "BATTERY") { m_sysram[0] = nullptr; diff --git a/src/mame/drivers/cgenie.cpp b/src/mame/drivers/cgenie.cpp index 940d9c93809..6756cf3c3dc 100644 --- a/src/mame/drivers/cgenie.cpp +++ b/src/mame/drivers/cgenie.cpp @@ -42,7 +42,7 @@ public: m_char_rom(*this, "gfx1"), m_color_ram(*this, "colorram"), m_font_ram(*this, "fontram"), - m_keyboard(*this, "KEY"), + m_keyboard(*this, "KEY.%u", 0), m_palette(nullptr), m_control(0xff), m_rs232_rx(1), diff --git a/src/mame/drivers/csplayh5.cpp b/src/mame/drivers/csplayh5.cpp index e0751176d6f..3f320093d01 100644 --- a/src/mame/drivers/csplayh5.cpp +++ b/src/mame/drivers/csplayh5.cpp @@ -46,7 +46,7 @@ public: m_dac1(*this, "dac1"), m_dac2(*this, "dac2"), m_soundlatch(*this, "soundlatch"), - m_key(*this, "KEY"), + m_key(*this, "KEY.%u", 0), m_region_maincpu(*this, "maincpu"), m_region_audiocpu(*this, "audiocpu"), m_bank1(*this, "bank1") diff --git a/src/mame/drivers/excali64.cpp b/src/mame/drivers/excali64.cpp index d8b807c0384..1786233ea9d 100644 --- a/src/mame/drivers/excali64.cpp +++ b/src/mame/drivers/excali64.cpp @@ -56,7 +56,7 @@ public: , m_maincpu(*this, "maincpu") , m_cass(*this, "cassette") , m_crtc(*this, "crtc") - , m_io_keyboard(*this, "KEY") + , m_io_keyboard(*this, "KEY.%u", 0) , m_dma(*this, "dma") , m_u12(*this, "u12") , m_centronics(*this, "centronics") diff --git a/src/mame/drivers/fc100.cpp b/src/mame/drivers/fc100.cpp index ba151b0dbdb..cacf5042f5b 100644 --- a/src/mame/drivers/fc100.cpp +++ b/src/mame/drivers/fc100.cpp @@ -58,7 +58,7 @@ public: , m_cart(*this, "cartslot") , m_uart(*this, "uart") , m_centronics(*this, "centronics") - , m_keyboard(*this, "KEY") + , m_keyboard(*this, "KEY.%u", 0) { } DECLARE_READ8_MEMBER(mc6847_videoram_r); diff --git a/src/mame/drivers/flicker.cpp b/src/mame/drivers/flicker.cpp index 09947a0f2e6..01709ec85cf 100644 --- a/src/mame/drivers/flicker.cpp +++ b/src/mame/drivers/flicker.cpp @@ -31,7 +31,7 @@ public: , m_maincpu(*this, "maincpu") , m_testport(*this, "TEST") , m_coinport(*this, "COIN") - , m_switch(*this, "SWITCH") + , m_switch(*this, "SWITCH.%u", 0) { } DECLARE_WRITE8_MEMBER(port00_w); diff --git a/src/mame/drivers/fp1100.cpp b/src/mame/drivers/fp1100.cpp index 3a8980a3f39..7067b5e3c96 100644 --- a/src/mame/drivers/fp1100.cpp +++ b/src/mame/drivers/fp1100.cpp @@ -73,7 +73,7 @@ public: , m_subcpu(*this, "sub") , m_crtc(*this, "crtc") , m_p_videoram(*this, "videoram") - , m_keyboard(*this, "KEY") + , m_keyboard(*this, "KEY.%u", 0) , m_beep(*this, "beeper") , m_centronics(*this, "centronics") , m_cass(*this, "cassette") diff --git a/src/mame/drivers/funkball.cpp b/src/mame/drivers/funkball.cpp index cc1f47098f0..8ad6ae5b66f 100644 --- a/src/mame/drivers/funkball.cpp +++ b/src/mame/drivers/funkball.cpp @@ -85,12 +85,12 @@ class funkball_state : public pcat_base_state { public: funkball_state(const machine_config &mconfig, device_type type, const char *tag) - : pcat_base_state(mconfig, type, tag), - m_voodoo(*this, "voodoo_0"), - m_unk_ram(*this, "unk_ram"), - m_flashbank(*this, "flashbank"), - m_terminal(*this, "terminal"), - m_inputs(*this, "IN") + : pcat_base_state(mconfig, type, tag) + , m_voodoo(*this, "voodoo_0") + , m_unk_ram(*this, "unk_ram") + , m_flashbank(*this, "flashbank") + , m_terminal(*this, "terminal") + , m_inputs(*this, "IN.%u", 0) { } UINT8 m_funkball_config_reg_sel; diff --git a/src/mame/drivers/g627.cpp b/src/mame/drivers/g627.cpp index e96509a1703..f80c09fc544 100644 --- a/src/mame/drivers/g627.cpp +++ b/src/mame/drivers/g627.cpp @@ -52,8 +52,8 @@ public: g627_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_switch(*this, "SWITCH") - , m_testipt(*this, "TEST") + , m_switch(*this, "SWITCH.%u", 0) + , m_testipt(*this, "TEST.%u", 0) { } DECLARE_DRIVER_INIT(v115); diff --git a/src/mame/drivers/glasgow.cpp b/src/mame/drivers/glasgow.cpp index 5dd6ae65a3c..18e2d1fc5cd 100644 --- a/src/mame/drivers/glasgow.cpp +++ b/src/mame/drivers/glasgow.cpp @@ -54,7 +54,7 @@ public: : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_beep(*this, "beeper") - , m_keyboard(*this, "LINE") + , m_keyboard(*this, "LINE.%u", 0) { } DECLARE_WRITE16_MEMBER(glasgow_lcd_w); diff --git a/src/mame/drivers/gticlub.cpp b/src/mame/drivers/gticlub.cpp index f163feedce1..2342a7a3cd1 100644 --- a/src/mame/drivers/gticlub.cpp +++ b/src/mame/drivers/gticlub.cpp @@ -264,7 +264,10 @@ public: m_analog1(*this, "AN1"), m_analog2(*this, "AN2"), m_analog3(*this, "AN3"), - m_ports(*this, ports) { } + m_ports(*this, { { "IN0", "IN1", "IN2", "IN3" } }) + { + } + // TODO: Needs verification on real hardware static const int m_sound_timer_usec = 2400; @@ -291,8 +294,6 @@ public: required_ioport_array<4> m_ports; - DECLARE_IOPORT_ARRAY(ports); - DECLARE_WRITE32_MEMBER(paletteram32_w); DECLARE_READ32_MEMBER(gticlub_k001604_tile_r); DECLARE_WRITE32_MEMBER(gticlub_k001604_tile_w); @@ -394,8 +395,6 @@ WRITE32_MEMBER(gticlub_state::gticlub_k001604_reg_w) /******************************************************************/ -IOPORT_ARRAY_MEMBER(gticlub_state::ports) { "IN0", "IN1", "IN2", "IN3" }; - READ8_MEMBER(gticlub_state::sysreg_r) { switch (offset) diff --git a/src/mame/drivers/gts1.cpp b/src/mame/drivers/gts1.cpp index ffed197ba3c..9d9be7fcfb6 100644 --- a/src/mame/drivers/gts1.cpp +++ b/src/mame/drivers/gts1.cpp @@ -87,7 +87,7 @@ public: gts1_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_switches(*this, "X") + , m_switches(*this, "X.%u", 0) { } DECLARE_DRIVER_INIT(gts1); diff --git a/src/mame/drivers/gts3.cpp b/src/mame/drivers/gts3.cpp index 8c093ecc786..25e96b38a96 100644 --- a/src/mame/drivers/gts3.cpp +++ b/src/mame/drivers/gts3.cpp @@ -43,7 +43,7 @@ public: , m_maincpu(*this, "maincpu") , m_u4(*this, "u4") , m_u5(*this, "u5") - , m_switches(*this, "X") + , m_switches(*this, "X.%u", 0) { } DECLARE_DRIVER_INIT(gts3); diff --git a/src/mame/drivers/gts3a.cpp b/src/mame/drivers/gts3a.cpp index 0b47eef16b2..3f61560b649 100644 --- a/src/mame/drivers/gts3a.cpp +++ b/src/mame/drivers/gts3a.cpp @@ -33,7 +33,7 @@ public: , m_dmdcpu(*this, "dmdcpu") , m_u4(*this, "u4") , m_u5(*this, "u5") - , m_switches(*this, "X") + , m_switches(*this, "X.%u", 0) { } DECLARE_DRIVER_INIT(gts3a); diff --git a/src/mame/drivers/harddriv.cpp b/src/mame/drivers/harddriv.cpp index 42f77304737..1ce2fe985e4 100644 --- a/src/mame/drivers/harddriv.cpp +++ b/src/mame/drivers/harddriv.cpp @@ -393,8 +393,8 @@ harddriv_state::harddriv_state(const machine_config &mconfig, const char *tag, d m_in0(*this, "IN0"), m_sw1(*this, "SW1"), m_a80000(*this, "a80000"), - m_8badc(*this, "8BADC"), - m_12badc(*this, "12BADC"), + m_8badc(*this, "8BADC.%u", 0), + m_12badc(*this, "12BADC.%u", 0), m_irq_state(0), m_gsp_irq_state(0), m_msp_irq_state(0), diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp index 6de25264e24..0968a9e2501 100644 --- a/src/mame/drivers/hh_cop400.cpp +++ b/src/mame/drivers/hh_cop400.cpp @@ -35,7 +35,7 @@ public: hh_cop400_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_display_wait(33), m_display_maxy(1), diff --git a/src/mame/drivers/hh_hmcs40.cpp b/src/mame/drivers/hh_hmcs40.cpp index 9f086994c4a..0dd69aebcb3 100644 --- a/src/mame/drivers/hh_hmcs40.cpp +++ b/src/mame/drivers/hh_hmcs40.cpp @@ -106,7 +106,7 @@ public: m_audiocpu(*this, "audiocpu"), m_soundlatch(*this, "soundlatch"), m_soundlatch2(*this, "soundlatch2"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_display_wait(33), m_display_maxy(1), diff --git a/src/mame/drivers/hh_melps4.cpp b/src/mame/drivers/hh_melps4.cpp index 41c87f78879..e1315a3ede4 100644 --- a/src/mame/drivers/hh_melps4.cpp +++ b/src/mame/drivers/hh_melps4.cpp @@ -21,7 +21,7 @@ public: hh_melps4_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_display_wait(33), m_display_maxy(1), diff --git a/src/mame/drivers/hh_pic16.cpp b/src/mame/drivers/hh_pic16.cpp index be87d71a741..342c833b2f8 100644 --- a/src/mame/drivers/hh_pic16.cpp +++ b/src/mame/drivers/hh_pic16.cpp @@ -37,7 +37,7 @@ public: hh_pic16_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_display_wait(33), m_display_maxy(1), diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index f775a1751dd..0a3b5263a30 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -23,7 +23,7 @@ public: hh_sm510_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_inp_lines(0) { } diff --git a/src/mame/drivers/inder.cpp b/src/mame/drivers/inder.cpp index f09012c0fe8..8fd63d52e04 100644 --- a/src/mame/drivers/inder.cpp +++ b/src/mame/drivers/inder.cpp @@ -49,7 +49,7 @@ public: , m_7a(*this, "7a") , m_9a(*this, "9a") , m_9b(*this, "9b") - , m_switches(*this, "SW") + , m_switches(*this, "SW.%u", 0) { } DECLARE_READ8_MEMBER(ppic_r); diff --git a/src/mame/drivers/itech8.cpp b/src/mame/drivers/itech8.cpp index f0b6dc351ed..04e290ef237 100644 --- a/src/mame/drivers/itech8.cpp +++ b/src/mame/drivers/itech8.cpp @@ -518,8 +518,6 @@ -IOPORT_ARRAY_MEMBER(itech8_state::analog_inputs) { "AN_C", "AN_D", "AN_E", "AN_F" }; - /************************************* * * Interrupt handling diff --git a/src/mame/drivers/itt3030.cpp b/src/mame/drivers/itt3030.cpp index 7bd8017e813..de73beedcd9 100644 --- a/src/mame/drivers/itt3030.cpp +++ b/src/mame/drivers/itt3030.cpp @@ -216,10 +216,10 @@ public: , m_floppy0(*this, "fdc:0") , m_floppy1(*this, "fdc:1") , m_beep(*this, "beeper") - , m_keyrows(*this, "ROW") - , m_vram(*this, "vram"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette") + , m_keyrows(*this, "ROW.%u", 0) + , m_vram(*this, "vram") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") { } // devices diff --git a/src/mame/drivers/k28.cpp b/src/mame/drivers/k28.cpp index 51ad5e805e8..6bca21060f5 100644 --- a/src/mame/drivers/k28.cpp +++ b/src/mame/drivers/k28.cpp @@ -37,7 +37,7 @@ public: m_tms6100(*this, "tms6100"), m_speech(*this, "speech"), m_onbutton_timer(*this, "on_button"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_display_wait(33), m_display_maxy(1), m_display_maxx(0) diff --git a/src/mame/drivers/mk14.cpp b/src/mame/drivers/mk14.cpp index cad69c70201..3411a853443 100644 --- a/src/mame/drivers/mk14.cpp +++ b/src/mame/drivers/mk14.cpp @@ -47,7 +47,7 @@ public: mk14_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_keyboard(*this, "X") + , m_keyboard(*this, "X.%u", 0) , m_cass(*this, "cassette") , m_dac(*this, "dac") { } diff --git a/src/mame/drivers/mstation.cpp b/src/mame/drivers/mstation.cpp index b7c1ac7af09..9adf896ade6 100644 --- a/src/mame/drivers/mstation.cpp +++ b/src/mame/drivers/mstation.cpp @@ -38,14 +38,15 @@ class mstation_state : public driver_device { public: mstation_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_bankdev1(*this, "bank0"), - m_bankdev2(*this, "bank1"), - m_keyboard(*this, "LINE"), - m_nvram(*this, "nvram") - { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_ram(*this, RAM_TAG) + , m_bankdev1(*this, "bank0") + , m_bankdev2(*this, "bank1") + , m_keyboard(*this, "LINE.%u", 0) + , m_nvram(*this, "nvram") + { + } required_device m_maincpu; required_device m_ram; diff --git a/src/mame/drivers/namcona1.cpp b/src/mame/drivers/namcona1.cpp index 84dbf3cd748..ee2f1a0fe25 100644 --- a/src/mame/drivers/namcona1.cpp +++ b/src/mame/drivers/namcona1.cpp @@ -662,8 +662,6 @@ WRITE8_MEMBER(namcona1_state::port6_w) m_mcu_port6 = data; } -IOPORT_ARRAY_MEMBER(namcona1_state::muxed_inputs) { "P4", "DSW", "P1", "P2" }; - READ8_MEMBER(namcona1_state::port7_r) { if ((m_mcu_port6 & 0x80) == 0) diff --git a/src/mame/drivers/namcos23.cpp b/src/mame/drivers/namcos23.cpp index dd55ada577c..10d0688f4d5 100644 --- a/src/mame/drivers/namcos23.cpp +++ b/src/mame/drivers/namcos23.cpp @@ -1427,7 +1427,7 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette"), m_generic_paletteram_32(*this, "paletteram"), - m_adc_ports(*this, "ADC") + m_adc_ports(*this, "ADC.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/drivers/nascom1.cpp b/src/mame/drivers/nascom1.cpp index 9633a388d76..4618cc2be06 100644 --- a/src/mame/drivers/nascom1.cpp +++ b/src/mame/drivers/nascom1.cpp @@ -50,7 +50,7 @@ public: m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), m_videoram(*this, "videoram"), - m_keyboard(*this, "KEY") + m_keyboard(*this, "KEY.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/drivers/nokia_3310.cpp b/src/mame/drivers/nokia_3310.cpp index cc1c60b093b..997f20c236b 100644 --- a/src/mame/drivers/nokia_3310.cpp +++ b/src/mame/drivers/nokia_3310.cpp @@ -30,7 +30,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_pcd8544(*this, "pcd8544"), - m_keypad(*this, "COL"), + m_keypad(*this, "COL.%u", 0), m_pwr(*this, "PWR") { } diff --git a/src/mame/drivers/novag6502.cpp b/src/mame/drivers/novag6502.cpp index 6a69fe42485..0baa21200b8 100644 --- a/src/mame/drivers/novag6502.cpp +++ b/src/mame/drivers/novag6502.cpp @@ -33,7 +33,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_beeper(*this, "beeper"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_display_wait(33), m_display_maxy(1), m_display_maxx(0) diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp index c206427343b..e3b4e65ea48 100644 --- a/src/mame/drivers/odyssey2.cpp +++ b/src/mame/drivers/odyssey2.cpp @@ -28,8 +28,8 @@ public: m_maincpu(*this, "maincpu"), m_i8244(*this, "i8244"), m_cart(*this, "cartslot"), - m_keyboard(*this, "KEY"), - m_joysticks(*this, "JOY") { } + m_keyboard(*this, "KEY.%u", 0), + m_joysticks(*this, "JOY.%u", 0) { } required_device m_maincpu; required_device m_i8244; diff --git a/src/mame/drivers/pasopia.cpp b/src/mame/drivers/pasopia.cpp index 99b91514e16..c7ed456691b 100644 --- a/src/mame/drivers/pasopia.cpp +++ b/src/mame/drivers/pasopia.cpp @@ -31,7 +31,7 @@ public: , m_pio(*this, "z80pio") , m_crtc(*this, "crtc") , m_palette(*this, "palette") - , m_keyboard(*this, "KEY") + , m_keyboard(*this, "KEY.%u", 0) { } DECLARE_WRITE8_MEMBER(pasopia_ctrl_w); diff --git a/src/mame/drivers/pasopia7.cpp b/src/mame/drivers/pasopia7.cpp index d96e490d972..2bb9a3ae3ea 100644 --- a/src/mame/drivers/pasopia7.cpp +++ b/src/mame/drivers/pasopia7.cpp @@ -49,7 +49,7 @@ public: , m_sn1(*this, "sn1") , m_sn2(*this, "sn2") , m_palette(*this, "palette") - , m_keyboard(*this, "KEY") + , m_keyboard(*this, "KEY.%u", 0) { } DECLARE_READ8_MEMBER(vram_r); diff --git a/src/mame/drivers/pc1500.cpp b/src/mame/drivers/pc1500.cpp index 930b83a0be6..6d55dca0ede 100644 --- a/src/mame/drivers/pc1500.cpp +++ b/src/mame/drivers/pc1500.cpp @@ -23,12 +23,14 @@ class pc1500_state : public driver_device { public: pc1500_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_rtc(*this, "upd1990a"), - m_lcd_data(*this, "lcd_data"), - m_keyboard(*this, "KEY"), - m_io_on(*this, "ON") { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_rtc(*this, "upd1990a") + , m_lcd_data(*this, "lcd_data") + , m_keyboard(*this, "KEY,%u", 0) + , m_io_on(*this, "ON") + { + } required_device m_maincpu; required_device m_rtc; diff --git a/src/mame/drivers/pegasus.cpp b/src/mame/drivers/pegasus.cpp index 2b57f9fb6cc..4a760e80320 100644 --- a/src/mame/drivers/pegasus.cpp +++ b/src/mame/drivers/pegasus.cpp @@ -62,7 +62,7 @@ public: , m_exp_0c(*this, "exp0c") , m_exp_0d(*this, "exp0d") , m_p_videoram(*this, "videoram") - , m_io_keyboard(*this, "KEY") + , m_io_keyboard(*this, "KEY.%u", 0) { } DECLARE_READ8_MEMBER(pegasus_keyboard_r); diff --git a/src/mame/drivers/peyper.cpp b/src/mame/drivers/peyper.cpp index 5d06d1e5b7b..dd21ceabfd9 100644 --- a/src/mame/drivers/peyper.cpp +++ b/src/mame/drivers/peyper.cpp @@ -44,7 +44,7 @@ public: peyper_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_switch(*this, "SWITCH") + , m_switch(*this, "SWITCH.%u", 0) { } DECLARE_READ8_MEMBER(sw_r); diff --git a/src/mame/drivers/play_1.cpp b/src/mame/drivers/play_1.cpp index 62d45e15730..fcc833718b9 100644 --- a/src/mame/drivers/play_1.cpp +++ b/src/mame/drivers/play_1.cpp @@ -32,7 +32,7 @@ public: play_1_state(const machine_config &mconfig, device_type type, const char *tag) : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_dips(*this, "X") + , m_dips(*this, "X.%u", 0) , m_monotone(*this, "monotone") { } diff --git a/src/mame/drivers/play_2.cpp b/src/mame/drivers/play_2.cpp index a48db4c1b8b..025fcbf41f5 100644 --- a/src/mame/drivers/play_2.cpp +++ b/src/mame/drivers/play_2.cpp @@ -45,7 +45,7 @@ public: , m_4013b(*this, "4013b") , m_1863(*this, "1863") , m_aysnd1(*this, "aysnd1") - , m_keyboard(*this, "X") + , m_keyboard(*this, "X.%u", 0) { } DECLARE_WRITE8_MEMBER(port01_w); diff --git a/src/mame/drivers/play_3.cpp b/src/mame/drivers/play_3.cpp index 0602da10355..52bd977472e 100644 --- a/src/mame/drivers/play_3.cpp +++ b/src/mame/drivers/play_3.cpp @@ -65,7 +65,7 @@ public: , m_4013b(*this, "4013b") , m_aysnd1(*this, "aysnd1") , m_aysnd2(*this, "aysnd2") - , m_keyboard(*this, "X") + , m_keyboard(*this, "X.%u", 0) { } DECLARE_WRITE8_MEMBER(port01_w); diff --git a/src/mame/drivers/prestige.cpp b/src/mame/drivers/prestige.cpp index 2f96452e14c..a47d5335187 100644 --- a/src/mame/drivers/prestige.cpp +++ b/src/mame/drivers/prestige.cpp @@ -90,17 +90,17 @@ class prestige_state : public driver_device { public: prestige_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_cart(*this, "cartslot"), - m_keyboard(*this, "KEY"), - m_cart_type(*this, "CART_TYPE"), - m_bank1(*this, "bank1"), - m_bank2(*this, "bank2"), - m_bank3(*this, "bank3"), - m_bank4(*this, "bank4"), - m_bank5(*this, "bank5") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_ram(*this, RAM_TAG) + , m_cart(*this, "cartslot") + , m_keyboard(*this, "KEY.%u", 0) + , m_cart_type(*this, "CART_TYPE") + , m_bank1(*this, "bank1") + , m_bank2(*this, "bank2") + , m_bank3(*this, "bank3") + , m_bank4(*this, "bank4") + , m_bank5(*this, "bank5") { } required_device m_maincpu; diff --git a/src/mame/drivers/rabbit.cpp b/src/mame/drivers/rabbit.cpp index 82e8889a079..6148388db41 100644 --- a/src/mame/drivers/rabbit.cpp +++ b/src/mame/drivers/rabbit.cpp @@ -106,7 +106,7 @@ public: m_viewregs7(*this, "viewregs7"), m_viewregs9(*this, "viewregs9"), m_viewregs10(*this, "viewregs10"), - m_tilemap_regs(*this, "tilemap_regs"), + m_tilemap_regs(*this, "tilemap_regs.%u", 0), m_spriteregs(*this, "spriteregs"), m_blitterregs(*this, "blitterregs"), m_spriteram(*this, "spriteram") { } diff --git a/src/mame/drivers/rex6000.cpp b/src/mame/drivers/rex6000.cpp index c91af48b9e1..9de79b0adeb 100644 --- a/src/mame/drivers/rex6000.cpp +++ b/src/mame/drivers/rex6000.cpp @@ -126,9 +126,10 @@ class oz750_state : public rex6000_state { public: oz750_state(const machine_config &mconfig, device_type type, const char *tag) - : rex6000_state(mconfig, type, tag), - m_keyboard(*this, "COL") - { } + : rex6000_state(mconfig, type, tag) + , m_keyboard(*this, "COL.%u", 0) + { + } optional_ioport_array<10> m_keyboard; diff --git a/src/mame/drivers/scv.cpp b/src/mame/drivers/scv.cpp index 4daaab4ef13..535cb1caf10 100644 --- a/src/mame/drivers/scv.cpp +++ b/src/mame/drivers/scv.cpp @@ -23,7 +23,7 @@ public: m_maincpu(*this, "maincpu"), m_upd1771c(*this, "upd1771c"), m_cart(*this, "cartslot"), - m_pa(*this, "PA"), + m_pa(*this, "PA.%u", 0), m_pc0(*this, "PC0"), m_charrom(*this, "charrom") { } diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp index 00fbcaa3bcc..6e8233bdd21 100644 --- a/src/mame/drivers/segaorun.cpp +++ b/src/mame/drivers/segaorun.cpp @@ -678,8 +678,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(segaorun_state::bankmotor_update) // for Out Run //------------------------------------------------- -IOPORT_ARRAY_MEMBER( segaorun_state::digital_ports ) { "SERVICE", "UNKNOWN", "COINAGE", "DSW" }; - READ16_MEMBER( segaorun_state::outrun_custom_io_r ) { offset &= 0x7f/2; diff --git a/src/mame/drivers/segaybd.cpp b/src/mame/drivers/segaybd.cpp index 98b99e80cdc..c20dccc7c7d 100644 --- a/src/mame/drivers/segaybd.cpp +++ b/src/mame/drivers/segaybd.cpp @@ -114,9 +114,6 @@ WRITE16_MEMBER( segaybd_state::analog_w ) // io_chip_r - handle reads from the I/O chip //------------------------------------------------- -IOPORT_ARRAY_MEMBER( segaybd_state::digital_ports ) -{ "P1", "GENERAL", "LIMITSW", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" }; - READ16_MEMBER( segaybd_state::io_chip_r ) { offset &= 0x1f/2; diff --git a/src/mame/drivers/sidearms.cpp b/src/mame/drivers/sidearms.cpp index a5beb5cc756..5b929909c4a 100644 --- a/src/mame/drivers/sidearms.cpp +++ b/src/mame/drivers/sidearms.cpp @@ -63,9 +63,7 @@ WRITE8_MEMBER(sidearms_state::bankswitch_w) } -/* Turtle Ship input ports are rotated 90 degrees */ -IOPORT_ARRAY_MEMBER(sidearms_state::ports) { "SYSTEM", "P1", "P2", "DSW0", "DSW1" }; - +// Turtle Ship input ports are rotated 90 degrees READ8_MEMBER(sidearms_state::turtship_ports_r) { int res = 0; diff --git a/src/mame/drivers/spc1000.cpp b/src/mame/drivers/spc1000.cpp index e29615835a4..fb459f55955 100644 --- a/src/mame/drivers/spc1000.cpp +++ b/src/mame/drivers/spc1000.cpp @@ -154,7 +154,7 @@ public: , m_cass(*this, "cassette") , m_ram(*this, RAM_TAG) , m_p_videoram(*this, "videoram") - , m_io_kb(*this, "LINE") + , m_io_kb(*this, "LINE.%u", 0) , m_io_joy(*this, "JOY") , m_centronics(*this, "centronics") {} diff --git a/src/mame/drivers/spc1500.cpp b/src/mame/drivers/spc1500.cpp index dad393b34bf..f41e6c36766 100644 --- a/src/mame/drivers/spc1500.cpp +++ b/src/mame/drivers/spc1500.cpp @@ -245,7 +245,7 @@ public: , m_ram(*this, RAM_TAG) , m_p_videoram(*this, "videoram") , m_pcgram(*this, "pcgram") - , m_io_kb(*this, "LINE") + , m_io_kb(*this, "LINE.%u", 0) , m_io_joy(*this, "JOY") , m_dipsw(*this, "DIP_SWITCH") , m_centronics(*this, "centronics") diff --git a/src/mame/drivers/spectra.cpp b/src/mame/drivers/spectra.cpp index 6d406d3e41f..a5d5d4011b1 100644 --- a/src/mame/drivers/spectra.cpp +++ b/src/mame/drivers/spectra.cpp @@ -47,7 +47,7 @@ public: : genpin_class(mconfig, type, tag) , m_maincpu(*this, "maincpu") , m_snsnd(*this, "snsnd") - , m_switch(*this, "SWITCH") + , m_switch(*this, "SWITCH.%u", 0) , m_p_ram(*this, "nvram") { } diff --git a/src/mame/drivers/spinb.cpp b/src/mame/drivers/spinb.cpp index 54afecedbf3..299341ec5a8 100644 --- a/src/mame/drivers/spinb.cpp +++ b/src/mame/drivers/spinb.cpp @@ -50,7 +50,7 @@ public: , m_msm_m(*this, "msm_m") , m_ic5a(*this, "ic5a") , m_ic5m(*this, "ic5m") - , m_switches(*this, "SW") + , m_switches(*this, "SW.%u", 0) { } DECLARE_WRITE8_MEMBER(p1_w); diff --git a/src/mame/drivers/spyhuntertec.cpp b/src/mame/drivers/spyhuntertec.cpp index d8c51804c36..42e424eccb0 100644 --- a/src/mame/drivers/spyhuntertec.cpp +++ b/src/mame/drivers/spyhuntertec.cpp @@ -31,7 +31,7 @@ public: m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), m_analog_timer(*this, "analog_timer"), - m_analog_input(*this, "AN"), + m_analog_input(*this, "AN.%u", 0), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), m_spriteram2(*this, "spriteram2"), diff --git a/src/mame/drivers/srmp5.cpp b/src/mame/drivers/srmp5.cpp index 0f792f7337e..4428d46f1a3 100644 --- a/src/mame/drivers/srmp5.cpp +++ b/src/mame/drivers/srmp5.cpp @@ -67,15 +67,16 @@ class srmp5_state : public driver_device { public: srmp5_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_maincpu(*this,"maincpu"), - m_subcpu(*this, "sub"), - m_chrrom(*this, "chr"), - m_keys(*this, "KEY"), - m_chrbank(0) - { } + : driver_device(mconfig, type, tag) + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_maincpu(*this,"maincpu") + , m_subcpu(*this, "sub") + , m_chrrom(*this, "chr") + , m_keys(*this, "KEY.%u", 0) + , m_chrbank(0) + { + } required_device m_gfxdecode; required_device m_palette; required_device m_maincpu; diff --git a/src/mame/drivers/svi318.cpp b/src/mame/drivers/svi318.cpp index 5dfc0fee2f3..e3085d278d2 100644 --- a/src/mame/drivers/svi318.cpp +++ b/src/mame/drivers/svi318.cpp @@ -56,7 +56,7 @@ public: m_cassette(*this, "cassette"), m_cart_rom(*this, "cartslot"), m_expander(*this, "exp"), - m_keyboard(*this, "KEY"), + m_keyboard(*this, "KEY.%u", 0), m_buttons(*this, "BUTTONS"), m_intvdp(0), m_intexp(0), m_romdis(1), m_ramdis(1), diff --git a/src/mame/drivers/techno.cpp b/src/mame/drivers/techno.cpp index aee9672af63..a5722c273d0 100644 --- a/src/mame/drivers/techno.cpp +++ b/src/mame/drivers/techno.cpp @@ -25,7 +25,7 @@ public: techno_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag) , m_maincpu(*this, "maincpu") - , m_switch(*this, "SWITCH") + , m_switch(*this, "SWITCH.%u", 0) { } DECLARE_READ16_MEMBER(key_r); diff --git a/src/mame/drivers/thayers.cpp b/src/mame/drivers/thayers.cpp index 35310d792e3..24af4bd9c50 100644 --- a/src/mame/drivers/thayers.cpp +++ b/src/mame/drivers/thayers.cpp @@ -43,11 +43,13 @@ public: }; thayers_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_pr7820(*this, "laserdisc"), - m_ldv1000(*this, "ldv1000"), - m_maincpu(*this, "maincpu"), - m_row(*this, "ROW") { } + : driver_device(mconfig, type, tag) + , m_pr7820(*this, "laserdisc") + , m_ldv1000(*this, "ldv1000") + , m_maincpu(*this, "maincpu") + , m_row(*this, "ROW.%u", 0) + { + } optional_device m_pr7820; optional_device m_ldv1000; diff --git a/src/mame/drivers/ti74.cpp b/src/mame/drivers/ti74.cpp index cce5f176663..1594b129afe 100644 --- a/src/mame/drivers/ti74.cpp +++ b/src/mame/drivers/ti74.cpp @@ -88,7 +88,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_cart(*this, "cartslot"), - m_key_matrix(*this, "IN"), + m_key_matrix(*this, "IN.%u", 0), m_battery_inp(*this, "BATTERY") { } diff --git a/src/mame/drivers/tmmjprd.cpp b/src/mame/drivers/tmmjprd.cpp index 6569102851e..0043e846fde 100644 --- a/src/mame/drivers/tmmjprd.cpp +++ b/src/mame/drivers/tmmjprd.cpp @@ -45,7 +45,7 @@ public: m_eeprom(*this, "eeprom"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_tilemap_regs(*this, "tilemap_regs"), + m_tilemap_regs(*this, "tilemap_regs.%u", 0), m_spriteregs(*this, "spriteregs"), m_spriteram(*this, "spriteram") { } diff --git a/src/mame/drivers/tvc.cpp b/src/mame/drivers/tvc.cpp index f9cffa8ee09..319923a350c 100644 --- a/src/mame/drivers/tvc.cpp +++ b/src/mame/drivers/tvc.cpp @@ -39,15 +39,15 @@ class tvc_state : public driver_device { public: tvc_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_ram(*this, RAM_TAG), - m_sound(*this, "custom"), - m_cassette(*this, "cassette"), - m_cart(*this, "cartslot"), - m_centronics(*this, CENTRONICS_TAG), - m_palette(*this, "palette"), - m_keyboard(*this, "LINE") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_ram(*this, RAM_TAG) + , m_sound(*this, "custom") + , m_cassette(*this, "cassette") + , m_cart(*this, "cartslot") + , m_centronics(*this, CENTRONICS_TAG) + , m_palette(*this, "palette") + , m_keyboard(*this, "LINE.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/drivers/unkhorse.cpp b/src/mame/drivers/unkhorse.cpp index b702af0fd8f..af9d234c11a 100644 --- a/src/mame/drivers/unkhorse.cpp +++ b/src/mame/drivers/unkhorse.cpp @@ -31,7 +31,7 @@ public: : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), m_speaker(*this, "speaker"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_vram(*this, "vram") { } diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp index 6dde2254705..36f5054bb44 100644 --- a/src/mame/drivers/vegas.cpp +++ b/src/mame/drivers/vegas.cpp @@ -465,7 +465,7 @@ public: m_rombase(*this, "rombase"), m_dcs(*this, "dcs"), m_ioasic(*this, "ioasic"), - m_io_analog(*this, "AN") + m_io_analog(*this, "AN.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/drivers/warpwarp.cpp b/src/mame/drivers/warpwarp.cpp index c3a05368098..ff642caf1f8 100644 --- a/src/mame/drivers/warpwarp.cpp +++ b/src/mame/drivers/warpwarp.cpp @@ -150,8 +150,6 @@ INTERRUPT_GEN_MEMBER(warpwarp_state::vblank_irq) device.execute().set_input_line(0, ASSERT_LINE); } -IOPORT_ARRAY_MEMBER(warpwarp_state::portnames) { "SW0", "SW1", "DSW2", "PLACEHOLDER" }; // "IN1" & "IN2" are read separately when offset==3 - /* B&W Games I/O */ READ8_MEMBER(warpwarp_state::geebee_in_r) { diff --git a/src/mame/drivers/wpc_dcs.cpp b/src/mame/drivers/wpc_dcs.cpp index daff3ed55d0..1b7dff30a28 100644 --- a/src/mame/drivers/wpc_dcs.cpp +++ b/src/mame/drivers/wpc_dcs.cpp @@ -17,15 +17,15 @@ class wpc_dcs_state : public driver_device { public: wpc_dcs_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - maincpu(*this, "maincpu"), - dcs(*this, "dcs"), - rombank(*this, "rombank"), - mainram(*this, "mainram"), - nvram(*this, "nvram"), - lamp(*this, "lamp"), - out(*this, "out"), - swarray(*this, "SW") + : driver_device(mconfig, type, tag) + , maincpu(*this, "maincpu") + , dcs(*this, "dcs") + , rombank(*this, "rombank") + , mainram(*this, "mainram") + , nvram(*this, "nvram") + , lamp(*this, "lamp") + , out(*this, "out") + , swarray(*this, "SW.%u", 0) { } DECLARE_WRITE8_MEMBER(bank_w); diff --git a/src/mame/drivers/zac_2.cpp b/src/mame/drivers/zac_2.cpp index f9f67ff6685..a3f827e5bc8 100644 --- a/src/mame/drivers/zac_2.cpp +++ b/src/mame/drivers/zac_2.cpp @@ -16,10 +16,10 @@ class zac_2_state : public driver_device { public: zac_2_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_p_ram(*this, "ram"), - m_row(*this, "ROW") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_p_ram(*this, "ram") + , m_row(*this, "ROW.%u", 0) { } DECLARE_READ8_MEMBER(ctrl_r); diff --git a/src/mame/includes/ac1.h b/src/mame/includes/ac1.h index b127b882a2b..2765876f5fe 100644 --- a/src/mame/includes/ac1.h +++ b/src/mame/includes/ac1.h @@ -16,12 +16,12 @@ class ac1_state : public driver_device { public: ac1_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cassette(*this, "cassette"), - m_maincpu(*this, "maincpu"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_io_line(*this, "LINE") + : driver_device(mconfig, type, tag) + , m_cassette(*this, "cassette") + , m_maincpu(*this, "maincpu") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_io_line(*this, "LINE.%u", 0) { } DECLARE_DRIVER_INIT(ac1); diff --git a/src/mame/includes/amstrad.h b/src/mame/includes/amstrad.h index ce09d777428..92f2b4fe747 100644 --- a/src/mame/includes/amstrad.h +++ b/src/mame/includes/amstrad.h @@ -156,8 +156,8 @@ public: m_bank14(*this, "bank14"), m_bank15(*this, "bank15"), m_bank16(*this, "bank16"), - m_io_kbrow(*this, "kbrow"), - m_io_analog(*this, "analog"), + m_io_kbrow(*this, "kbrow.%u", 0), + m_io_analog(*this, "analog.%u", 0), m_io_mouse1(*this,"mouse_input1"), m_io_mouse2(*this,"mouse_input2"), m_io_mouse3(*this,"mouse_input3"), diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h index a3581e6c331..f2eb4d0a750 100644 --- a/src/mame/includes/astrocde.h +++ b/src/mame/includes/astrocde.h @@ -56,8 +56,8 @@ public: m_p2_knob(*this, "P2_KNOB"), m_p3_knob(*this, "P3_KNOB"), m_p4_knob(*this, "P4_KNOB"), - m_trackball(*this, trackball_inputs), - m_joystick(*this, joystick_inputs), + m_trackball(*this, { { "TRACKX2", "TRACKY2", "TRACKX1", "TRACKY1" } }), + m_joystick(*this, { { "MOVEX", "MOVEY" } }), m_interrupt_scanline(0xff) { } @@ -84,9 +84,7 @@ public: optional_ioport m_p2_knob; optional_ioport m_p3_knob; optional_ioport m_p4_knob; - DECLARE_IOPORT_ARRAY(trackball_inputs); optional_ioport_array<4> m_trackball; - DECLARE_IOPORT_ARRAY(joystick_inputs); optional_ioport_array<2> m_joystick; UINT8 m_video_config; diff --git a/src/mame/includes/atari400.h b/src/mame/includes/atari400.h index ed899fc5386..ae5805880e1 100644 --- a/src/mame/includes/atari400.h +++ b/src/mame/includes/atari400.h @@ -24,14 +24,14 @@ class atari_common_state : public driver_device { public: atari_common_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_gtia(*this, "gtia"), - m_antic(*this, "antic"), - m_keyboard(*this, "keyboard"), - m_keypad(*this, "keypad"), - m_djoy_b(*this, "djoy_b"), - m_fake(*this, "fake") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_gtia(*this, "gtia") + , m_antic(*this, "antic") + , m_keyboard(*this, "keyboard.%u", 0) + , m_keypad(*this, "keypad.%u", 0) + , m_djoy_b(*this, "djoy_b") + , m_fake(*this, "fake") { } virtual void video_start() override; diff --git a/src/mame/includes/bfm_sc4.h b/src/mame/includes/bfm_sc4.h index a0506d1f4ef..b2867fd6be3 100644 --- a/src/mame/includes/bfm_sc4.h +++ b/src/mame/includes/bfm_sc4.h @@ -123,17 +123,17 @@ class sc4_state : public bfm_sc45_state { public: sc4_state(const machine_config &mconfig, device_type type, const char *tag) - : bfm_sc45_state(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_cpuregion(*this, "maincpu"), - m_nvram(*this, "nvram"), - m_reel1(*this, "reel1"), - m_reel2(*this, "reel2"), - m_reel3(*this, "reel3"), - m_reel4(*this, "reel4"), - m_reel5(*this, "reel5"), - m_reel6(*this, "reel6"), - m_io_ports(*this, {"IN-0", "IN-1", "IN-2", "IN-3", "IN-4", "IN-5", "IN-6", "IN-7", "IN-8", "IN-9", "IN-10", "IN-11"}) + : bfm_sc45_state(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_cpuregion(*this, "maincpu") + , m_nvram(*this, "nvram") + , m_reel1(*this, "reel1") + , m_reel2(*this, "reel2") + , m_reel3(*this, "reel3") + , m_reel4(*this, "reel4") + , m_reel5(*this, "reel5") + , m_reel6(*this, "reel6") + , m_io_ports(*this, "IN-%u", 0) { m_chk41addr = -1; m_dochk41 = false; diff --git a/src/mame/includes/bladestl.h b/src/mame/includes/bladestl.h index d2d83602a54..4d8f9d084f1 100644 --- a/src/mame/includes/bladestl.h +++ b/src/mame/includes/bladestl.h @@ -29,7 +29,7 @@ public: m_filter3(*this, "filter3"), m_gfxdecode(*this, "gfxdecode"), m_soundlatch(*this, "soundlatch"), - m_trackball(*this, "TRACKBALL"), + m_trackball(*this, "TRACKBALL.%u", 0), m_rombank(*this, "rombank") { } required_device m_maincpu; diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h index cc0533ce479..680c1b7a6ea 100644 --- a/src/mame/includes/cave.h +++ b/src/mame/includes/cave.h @@ -33,24 +33,24 @@ class cave_state : public driver_device { public: cave_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_videoregs(*this, "videoregs"), - m_vram(*this, "vram"), - m_vctrl(*this, "vctrl"), - m_spriteram(*this, "spriteram"), - m_spriteram_2(*this, "spriteram_2"), - m_paletteram(*this, "paletteram"), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_oki(*this, "oki"), - m_int_timer(*this, "int_timer"), - m_int_timer_left(*this, "int_timer_left"), - m_int_timer_right(*this, "int_timer_right"), - m_eeprom(*this, "eeprom"), - m_gfxdecode(*this, "gfxdecode"), - m_screen(*this, "screen"), - m_palette(*this, "palette"), - m_soundlatch(*this, "soundlatch") { } + : driver_device(mconfig, type, tag) + , m_videoregs(*this, "videoregs.%u", 0) + , m_vram(*this, "vram.%u", 0) + , m_vctrl(*this, "vctrl.%u", 0) + , m_spriteram(*this, "spriteram.%u", 0) + , m_spriteram_2(*this, "spriteram_2.%u", 0) + , m_paletteram(*this, "paletteram.%u", 0) + , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") + , m_oki(*this, "oki") + , m_int_timer(*this, "int_timer") + , m_int_timer_left(*this, "int_timer_left") + , m_int_timer_right(*this, "int_timer_right") + , m_eeprom(*this, "eeprom") + , m_gfxdecode(*this, "gfxdecode") + , m_screen(*this, "screen") + , m_palette(*this, "palette") + , m_soundlatch(*this, "soundlatch") { } /* memory pointers */ optional_shared_ptr_array m_videoregs; diff --git a/src/mame/includes/cischeat.h b/src/mame/includes/cischeat.h index 9a2a4e8c3e5..120d20a712a 100644 --- a/src/mame/includes/cischeat.h +++ b/src/mame/includes/cischeat.h @@ -14,9 +14,9 @@ public: cischeat_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_vregs(*this, "vregs"), - m_scrollram(*this, "scrollram"), + m_scrollram(*this, "scrollram.%u", 0), m_ram(*this, "ram"), - m_roadram(*this, "roadram"), + m_roadram(*this, "roadram.%u", 0), m_f1gpstr2_ioready(*this, "ioready"), m_maincpu(*this, "maincpu"), m_cpu1(*this, "cpu1"), diff --git a/src/mame/includes/crvision.h b/src/mame/includes/crvision.h index 53cdc1fc7a4..1ee6fbabab6 100644 --- a/src/mame/includes/crvision.h +++ b/src/mame/includes/crvision.h @@ -40,10 +40,10 @@ public: m_cart(*this, "cartslot"), m_cent_data_out(*this, "cent_data_out"), m_ram(*this, RAM_TAG), - m_inp_pa0(*this, "PA0"), - m_inp_pa1(*this, "PA1"), - m_inp_pa2(*this, "PA2"), - m_inp_pa3(*this, "PA3") + m_inp_pa0(*this, "PA0.%u", 0), + m_inp_pa1(*this, "PA1.%u", 0), + m_inp_pa2(*this, "PA2.%u", 0), + m_inp_pa3(*this, "PA3.%u", 0) { } required_device m_maincpu; @@ -82,10 +82,10 @@ class laser2001_state : public crvision_state { public: laser2001_state(const machine_config &mconfig, device_type type, const char *tag) - : crvision_state(mconfig, type, tag), - m_centronics(*this, CENTRONICS_TAG), - m_inp_y(*this, "Y"), - m_inp_joy(*this, "JOY") + : crvision_state(mconfig, type, tag) + , m_centronics(*this, CENTRONICS_TAG) + , m_inp_y(*this, "Y.%u", 0) + , m_inp_joy(*this, "JOY.%u", 0) { } required_device m_centronics; diff --git a/src/mame/includes/cybiko.h b/src/mame/includes/cybiko.h index b941d8736a2..f9558a42643 100644 --- a/src/mame/includes/cybiko.h +++ b/src/mame/includes/cybiko.h @@ -36,15 +36,15 @@ class cybiko_state : public driver_device { public: cybiko_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_crtc(*this, "hd66421"), - m_speaker(*this, "speaker"), - m_rtc(*this, "rtc"), - m_ram(*this, RAM_TAG), - m_flash1(*this, "flash1"), - m_nvram(*this, "nvram"), - m_input(*this, "A") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_crtc(*this, "hd66421") + , m_speaker(*this, "speaker") + , m_rtc(*this, "rtc") + , m_ram(*this, RAM_TAG) + , m_flash1(*this, "flash1") + , m_nvram(*this, "nvram") + , m_input(*this, "A.%u", 0) { } DECLARE_WRITE16_MEMBER(serflash_w); diff --git a/src/mame/includes/electron.h b/src/mame/includes/electron.h index fbd7aa283e9..c2cba4fdcfd 100644 --- a/src/mame/includes/electron.h +++ b/src/mame/includes/electron.h @@ -75,7 +75,7 @@ public: m_cassette(*this, "cassette"), m_beeper(*this, "beeper"), m_cart(*this, "cartslot"), - m_keybd(*this, "LINE"), + m_keybd(*this, "LINE.%u", 0), m_exp(*this, "exp") { } diff --git a/src/mame/includes/eti660.h b/src/mame/includes/eti660.h index 783f46eb414..ee2c660db4a 100644 --- a/src/mame/includes/eti660.h +++ b/src/mame/includes/eti660.h @@ -35,7 +35,7 @@ public: , m_cti(*this, CDP1864_TAG) , m_pia(*this, MC6821_TAG) , m_cassette(*this, "cassette") - , m_io_keyboard(*this, "KEY") + , m_io_keyboard(*this, "KEY.%u", 0) , m_special(*this, "SPECIAL") { } diff --git a/src/mame/includes/fidelz80.h b/src/mame/includes/fidelz80.h index 56d17e7339f..d7dd2558b1d 100644 --- a/src/mame/includes/fidelz80.h +++ b/src/mame/includes/fidelz80.h @@ -20,7 +20,7 @@ public: fidelz80base_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speech(*this, "speech"), m_speech_rom(*this, "speech"), m_speaker(*this, "speaker"), diff --git a/src/mame/includes/fuukifg2.h b/src/mame/includes/fuukifg2.h index cd051d90c28..5a1a6ff9a02 100644 --- a/src/mame/includes/fuukifg2.h +++ b/src/mame/includes/fuukifg2.h @@ -25,7 +25,7 @@ public: m_palette(*this, "palette"), m_fuukivid(*this, "fuukivid"), m_soundlatch(*this, "soundlatch"), - m_vram(*this, "vram"), + m_vram(*this, "vram.%u", 0), m_vregs(*this, "vregs"), m_unknown(*this, "unknown"), m_priority(*this, "priority") diff --git a/src/mame/includes/fuukifg3.h b/src/mame/includes/fuukifg3.h index 90af6ad1893..af16b939df4 100644 --- a/src/mame/includes/fuukifg3.h +++ b/src/mame/includes/fuukifg3.h @@ -28,7 +28,7 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette"), m_fuukivid(*this, "fuukivid"), - m_vram(*this, "vram"), + m_vram(*this, "vram.%u", 0), m_vregs(*this, "vregs"), m_priority(*this, "priority"), m_tilebank(*this, "tilebank") diff --git a/src/mame/includes/galpani2.h b/src/mame/includes/galpani2.h index a4697d9775e..5ae94e9e026 100644 --- a/src/mame/includes/galpani2.h +++ b/src/mame/includes/galpani2.h @@ -17,10 +17,10 @@ public: m_palette(*this, "palette"), m_bg15palette(*this, "bgpalette"), m_bg8palette(*this, "bg8palette"), - m_bg8(*this, "bg8"), - m_palette_val(*this, "palette"), - m_bg8_scrollx(*this, "bg8_scrollx"), - m_bg8_scrolly(*this, "bg8_scrolly"), + m_bg8(*this, "bg8.%u", 0), + m_palette_val(*this, "palette.%u", 0), + m_bg8_scrollx(*this, "bg8_scrollx.%u", 0), + m_bg8_scrolly(*this, "bg8_scrolly.%u", 0), m_bg15(*this, "bg15"), m_ram(*this, "ram"), m_ram2(*this, "ram2"), diff --git a/src/mame/includes/gamecom.h b/src/mame/includes/gamecom.h index 89492f6c90b..b6f494918f6 100644 --- a/src/mame/includes/gamecom.h +++ b/src/mame/includes/gamecom.h @@ -231,8 +231,9 @@ public: , m_io_in0(*this, "IN0") , m_io_in1(*this, "IN1") , m_io_in2(*this, "IN2") - , m_io_grid(*this, "GRID") - { } + , m_io_grid(*this, "GRID.%u", 0) + { + } DECLARE_READ8_MEMBER( gamecom_internal_r ); DECLARE_READ8_MEMBER( gamecom_pio_r ); diff --git a/src/mame/includes/hec2hrp.h b/src/mame/includes/hec2hrp.h index c30b7bfccd3..7db213d0443 100644 --- a/src/mame/includes/hec2hrp.h +++ b/src/mame/includes/hec2hrp.h @@ -83,7 +83,7 @@ public: m_palette(*this, "palette"), m_videoram(*this,"videoram"), m_hector_videoram(*this,"hector_videoram") , - m_keyboard(*this, "KEY"), + m_keyboard(*this, "KEY.%u", 0), m_minidisc_fdc(*this, "wd179x"), m_floppy0(*this, "wd179x:0") {} diff --git a/src/mame/includes/hh_tms1k.h b/src/mame/includes/hh_tms1k.h index 2e3f806ba20..96c26f4eac6 100644 --- a/src/mame/includes/hh_tms1k.h +++ b/src/mame/includes/hh_tms1k.h @@ -26,7 +26,7 @@ public: hh_tms1k_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_display_wait(33), m_display_maxy(1), diff --git a/src/mame/includes/hh_ucom4.h b/src/mame/includes/hh_ucom4.h index 31bfab8fbad..a50bc1087ff 100644 --- a/src/mame/includes/hh_ucom4.h +++ b/src/mame/includes/hh_ucom4.h @@ -22,7 +22,7 @@ public: hh_ucom4_state(const machine_config &mconfig, device_type type, const char *tag) : driver_device(mconfig, type, tag), m_maincpu(*this, "maincpu"), - m_inp_matrix(*this, "IN"), + m_inp_matrix(*this, "IN.%u", 0), m_speaker(*this, "speaker"), m_display_wait(33), m_display_maxy(1), diff --git a/src/mame/includes/huebler.h b/src/mame/includes/huebler.h index 12c27b9b04d..dcb8a05f3c3 100644 --- a/src/mame/includes/huebler.h +++ b/src/mame/includes/huebler.h @@ -23,18 +23,18 @@ class amu880_state : public driver_device { public: amu880_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_cassette(*this, "cassette"), - m_z80sio(*this, Z80SIO_TAG), - m_palette(*this, "palette"), - m_kb_rom(*this, "keyboard"), - m_char_rom(*this, "chargen"), - m_video_ram(*this, "video_ram"), - m_key_row(*this, {"Y0", "Y1", "Y2", "Y3", "Y4", "Y5", "Y6", "Y7", "Y8", "Y9", "Y10", "Y11", "Y12", "Y13", "Y14", "Y15"}), - m_special(*this, "SPECIAL"), - m_key_d6(0), - m_key_d7(0), - m_key_a8(1) + : driver_device(mconfig, type, tag) + , m_cassette(*this, "cassette") + , m_z80sio(*this, Z80SIO_TAG) + , m_palette(*this, "palette") + , m_kb_rom(*this, "keyboard") + , m_char_rom(*this, "chargen") + , m_video_ram(*this, "video_ram") + , m_key_row(*this, "Y%u", 0) + , m_special(*this, "SPECIAL") + , m_key_d6(0) + , m_key_d7(0) + , m_key_a8(1) { } required_device m_cassette; diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h index 2e35ffd95ad..6ef343869db 100644 --- a/src/mame/includes/itech8.h +++ b/src/mame/includes/itech8.h @@ -25,7 +25,7 @@ public: m_tlc34076(*this, "tlc34076"), m_screen(*this, "screen"), m_ticket(*this, "ticket"), - m_an(*this, analog_inputs), + m_an(*this, { { "AN_C", "AN_D", "AN_E", "AN_F" } }), m_fakex(*this, "FAKEX"), m_fakey(*this, "FAKEY"), m_visarea(0, 0, 0, 0) { } @@ -46,7 +46,6 @@ public: required_device m_tlc34076; required_device m_screen; required_device m_ticket; - DECLARE_IOPORT_ARRAY(analog_inputs); optional_ioport_array<4> m_an; optional_ioport m_fakex; optional_ioport m_fakey; diff --git a/src/mame/includes/lordgun.h b/src/mame/includes/lordgun.h index e54834a5f21..cd9f39f9a5a 100644 --- a/src/mame/includes/lordgun.h +++ b/src/mame/includes/lordgun.h @@ -33,9 +33,9 @@ public: m_priority_ram(*this, "priority_ram"), m_scrollram(*this, "scrollram"), m_spriteram(*this, "spriteram"), - m_vram(*this, "vram"), - m_scroll_x(*this, "scroll_x"), - m_scroll_y(*this, "scroll_y") { } + m_vram(*this, "vram.%u", 0), + m_scroll_x(*this, "scroll_x.%u", 0), + m_scroll_y(*this, "scroll_y.%u", 0) { } required_device m_maincpu; required_device m_soundcpu; diff --git a/src/mame/includes/mbee.h b/src/mame/includes/mbee.h index 57ae0501ec0..f92ee66477b 100644 --- a/src/mame/includes/mbee.h +++ b/src/mame/includes/mbee.h @@ -52,8 +52,8 @@ public: , m_telcom(*this, "telcom") , m_basic(*this, "basic") , m_io_x7(*this, "X.7") - , m_io_oldkb(*this, "X") - , m_io_newkb(*this, "Y") + , m_io_oldkb(*this, "X.%u", 0) + , m_io_newkb(*this, "Y.%u", 0) , m_io_config(*this, "CONFIG") , m_screen(*this, "screen") { } diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h index 7e2d0c5ce32..bc253fb5acd 100644 --- a/src/mame/includes/megasys1.h +++ b/src/mame/includes/megasys1.h @@ -26,7 +26,7 @@ public: : driver_device(mconfig, type, tag), m_vregs(*this, "vregs"), m_objectram(*this, "objectram"), - m_scrollram(*this, "scrollram"), + m_scrollram(*this, "scrollram.%u", 0), m_ram(*this, "ram"), m_maincpu(*this, "maincpu"), m_audiocpu(*this, "audiocpu"), diff --git a/src/mame/includes/midwunit.h b/src/mame/includes/midwunit.h index 04e808763b9..1b6c447227d 100644 --- a/src/mame/includes/midwunit.h +++ b/src/mame/includes/midwunit.h @@ -16,7 +16,7 @@ public: m_midway_serial_pic(*this, "serial_pic"), m_nvram(*this, "nvram"), m_mainram(*this, "mainram"), - m_ports(*this, wunit_ports) + m_ports(*this, { { "IN0", "IN1", "DSW", "IN2" } }) { } required_device m_midway_serial_pic; @@ -24,8 +24,6 @@ public: required_shared_ptr m_mainram; required_ioport_array<4> m_ports; - DECLARE_IOPORT_ARRAY(wunit_ports); - UINT8 m_cmos_write_enable; UINT16 m_iodata[8]; UINT8 m_ioshuffle[16]; diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h index cdc61bfe2bf..14f49304044 100644 --- a/src/mame/includes/midyunit.h +++ b/src/mame/includes/midyunit.h @@ -44,19 +44,22 @@ public: }; midyunit_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_audiocpu(*this, "audiocpu"), - m_oki(*this, "oki"), - m_palette(*this, "palette"), - m_narc_sound(*this, "narcsnd"), - m_cvsd_sound(*this, "cvsd"), - m_adpcm_sound(*this, "adpcm"), - m_soundlatch(*this, "soundlatch"), - m_generic_paletteram_16(*this, "paletteram"), - m_gfx_rom(*this, "gfx_rom", 16), - m_mainram(*this, "mainram"), - m_ports(*this, ports) { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_audiocpu(*this, "audiocpu") + , m_oki(*this, "oki") + , m_palette(*this, "palette") + , m_narc_sound(*this, "narcsnd") + , m_cvsd_sound(*this, "cvsd") + , m_adpcm_sound(*this, "adpcm") + , m_soundlatch(*this, "soundlatch") + , m_generic_paletteram_16(*this, "paletteram") + , m_gfx_rom(*this, "gfx_rom", 16) + , m_mainram(*this, "mainram") + , m_ports(*this, { { "IN0", "IN1", "IN2", "DSW", "UNK0", "UNK1" } }) + { + } + required_device m_maincpu; optional_device m_audiocpu; @@ -72,8 +75,6 @@ public: required_shared_ptr m_mainram; optional_ioport_array<6> m_ports; - DECLARE_IOPORT_ARRAY(ports); - std::unique_ptr m_cmos_ram; UINT32 m_cmos_page; UINT16 m_prot_result; diff --git a/src/mame/includes/mjkjidai.h b/src/mame/includes/mjkjidai.h index d3b2946bb2c..feada46baa3 100644 --- a/src/mame/includes/mjkjidai.h +++ b/src/mame/includes/mjkjidai.h @@ -15,7 +15,7 @@ public: m_palette(*this, "palette"), m_adpcmrom(*this, "adpcm"), m_videoram(*this, "videoram"), - m_row(*this, "ROW") { } + m_row(*this, "ROW.%u", 0) { } required_device m_maincpu; required_device m_msm; diff --git a/src/mame/includes/model1.h b/src/mame/includes/model1.h index 62cb80d9c6e..08dea48e30a 100644 --- a/src/mame/includes/model1.h +++ b/src/mame/includes/model1.h @@ -34,8 +34,8 @@ public: , m_paletteram16(*this, "palette") , m_palette(*this, "palette") , m_tiles(*this, "tile") - , m_analog_ports(*this, "AN") - , m_digital_ports(*this, "IN") + , m_analog_ports(*this, "AN.%u", 0) + , m_digital_ports(*this, "IN.%u", 0) { } diff --git a/src/mame/includes/namcona1.h b/src/mame/includes/namcona1.h index 17b4b79009f..23f411a7914 100644 --- a/src/mame/includes/namcona1.h +++ b/src/mame/includes/namcona1.h @@ -36,7 +36,7 @@ public: m_screen(*this, "screen"), m_palette(*this, "palette"), m_c140(*this, "c140"), - m_muxed_inputs(*this, muxed_inputs), + m_muxed_inputs(*this, { { "P4", "DSW", "P1", "P2" } }), m_io_p3(*this, "P3"), m_workram(*this,"workram"), m_vreg(*this,"vreg"), @@ -54,7 +54,6 @@ public: required_device m_palette; required_device m_c140; - DECLARE_IOPORT_ARRAY(muxed_inputs); required_ioport_array<4> m_muxed_inputs; required_ioport m_io_p3; diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index 8247f51dd4c..a42e31bf5eb 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -199,7 +199,7 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_adc_ports(*this, "ADC"), + m_adc_ports(*this, "ADC.%u", 0), m_p1(*this, "P1"), m_p2(*this, "P2"), m_mcup5a(*this, "MCUP5A"), diff --git a/src/mame/includes/orao.h b/src/mame/includes/orao.h index 9707d6019f1..3fbb3ea2d81 100644 --- a/src/mame/includes/orao.h +++ b/src/mame/includes/orao.h @@ -21,7 +21,7 @@ public: m_maincpu(*this, "maincpu"), m_speaker(*this, "speaker"), m_cassette(*this, "cassette"), - m_line(*this, "LINE"), + m_line(*this, "LINE.%u", 0), m_beep(0) { } diff --git a/src/mame/includes/p2000t.h b/src/mame/includes/p2000t.h index 93ec179ea73..c2a04d3e1aa 100644 --- a/src/mame/includes/p2000t.h +++ b/src/mame/includes/p2000t.h @@ -19,13 +19,15 @@ class p2000t_state : public driver_device { public: p2000t_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_speaker(*this, "speaker"), - m_gfxdecode(*this, "gfxdecode"), - m_palette(*this, "palette"), - m_videoram(*this, "videoram"), - m_keyboard(*this, "KEY") { } + : driver_device(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_speaker(*this, "speaker") + , m_gfxdecode(*this, "gfxdecode") + , m_palette(*this, "palette") + , m_videoram(*this, "videoram") + , m_keyboard(*this, "KEY.%u", 0) + { + } required_device m_maincpu; required_device m_speaker; diff --git a/src/mame/includes/pc8401a.h b/src/mame/includes/pc8401a.h index e7f63d2cad4..4bc7f9aa5ba 100644 --- a/src/mame/includes/pc8401a.h +++ b/src/mame/includes/pc8401a.h @@ -36,18 +36,18 @@ class pc8401a_state : public driver_device { public: pc8401a_state(const machine_config &mconfig, device_type type, const char *tag) - : driver_device(mconfig, type, tag), - m_maincpu(*this, Z80_TAG), - m_rtc(*this, UPD1990A_TAG), - m_lcdc(*this, SED1330_TAG), - m_crtc(*this, MC6845_TAG), - m_screen_lcd(*this, SCREEN_TAG), - m_cart(*this, "cartslot"), - m_io_cart(*this, "io_cart"), - m_ram(*this, RAM_TAG), - m_rom(*this, Z80_TAG), - m_crt_ram(*this, "crt_ram"), - m_io_y(*this, "Y") + : driver_device(mconfig, type, tag) + , m_maincpu(*this, Z80_TAG) + , m_rtc(*this, UPD1990A_TAG) + , m_lcdc(*this, SED1330_TAG) + , m_crtc(*this, MC6845_TAG) + , m_screen_lcd(*this, SCREEN_TAG) + , m_cart(*this, "cartslot") + , m_io_cart(*this, "io_cart") + , m_ram(*this, RAM_TAG) + , m_rom(*this, Z80_TAG) + , m_crt_ram(*this, "crt_ram") + , m_io_y(*this, "Y.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/includes/pce.h b/src/mame/includes/pce.h index 4eb38e8e4ac..424e6a21135 100644 --- a/src/mame/includes/pce.h +++ b/src/mame/includes/pce.h @@ -41,8 +41,8 @@ public: m_huc6260(*this, "huc6260"), m_cartslot(*this, "cartslot"), m_cd(*this, "pce_cd"), - m_joy(*this, "JOY_P"), - m_joy6b(*this, "JOY6B_P"), + m_joy(*this, "JOY_P.%u", 0), + m_joy6b(*this, "JOY6B_P.%u", 0), m_joy_type(*this, "JOY_TYPE"), m_a_card(*this, "A_CARD") { } diff --git a/src/mame/includes/pdp1.h b/src/mame/includes/pdp1.h index c1745369736..ec8367108fa 100644 --- a/src/mame/includes/pdp1.h +++ b/src/mame/includes/pdp1.h @@ -247,7 +247,7 @@ public: m_tstadd(*this, "TSTADD"), m_twdmsb(*this, "TWDMSB"), m_twdlsb(*this, "TWDLSB"), - m_twr(*this, "TWR"), + m_twr(*this, "TWR.%u", 0), m_cfg(*this, "CFG"), m_io_lightpen(*this, "LIGHTPEN"), m_lightx(*this, "LIGHTX"), diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h index 6005905e38a..2ab63aaf69a 100644 --- a/src/mame/includes/psikyo4.h +++ b/src/mame/includes/psikyo4.h @@ -30,7 +30,7 @@ public: m_palette2(*this, "rpalette"), m_lscreen(*this, "lscreen"), m_rscreen(*this, "rscreen"), - m_keys(*this, "KEY") + m_keys(*this, "KEY.%u", 0) { } /* memory pointers */ diff --git a/src/mame/includes/segaorun.h b/src/mame/includes/segaorun.h index 5e7ff05144b..55881c35bf8 100644 --- a/src/mame/includes/segaorun.h +++ b/src/mame/includes/segaorun.h @@ -38,8 +38,8 @@ public: m_segaic16road(*this, "segaic16road"), m_soundlatch(*this, "soundlatch"), m_bankmotor_timer(*this, "bankmotor"), - m_digital_ports(*this, digital_ports), - m_adc_ports(*this, "ADC"), + m_digital_ports(*this, { { "SERVICE", "UNKNOWN", "COINAGE", "DSW" } }), + m_adc_ports(*this, "ADC.%u", 0), m_workram(*this, "workram"), m_custom_map(nullptr), m_shangon_video(false), @@ -131,7 +131,6 @@ protected: optional_device m_bankmotor_timer; // input ports - DECLARE_IOPORT_ARRAY(digital_ports); required_ioport_array<4> m_digital_ports; optional_ioport_array<8> m_adc_ports; diff --git a/src/mame/includes/segaybd.h b/src/mame/includes/segaybd.h index 9666c1fce23..42538b57b69 100644 --- a/src/mame/includes/segaybd.h +++ b/src/mame/includes/segaybd.h @@ -22,25 +22,25 @@ class segaybd_state : public sega_16bit_common_base public: // construction/destruction segaybd_state(const machine_config &mconfig, device_type type, const char *tag) - : sega_16bit_common_base(mconfig, type, tag), - m_maincpu(*this, "maincpu"), - m_subx(*this, "subx"), - m_suby(*this, "suby"), - m_soundcpu(*this, "soundcpu"), - m_linkcpu(*this, "linkcpu"), - m_watchdog(*this, "watchdog"), - m_bsprites(*this, "bsprites"), - m_ysprites(*this, "ysprites"), - m_segaic16vid(*this, "segaic16vid"), - m_soundlatch(*this, "soundlatch"), - m_digital_ports(*this, digital_ports), - m_adc_ports(*this, "ADC"), - m_pdrift_bank(0), - m_scanline_timer(nullptr), - m_irq2_scanline(0), - m_timer_irq_state(0), - m_vblank_irq_state(0), - m_tmp_bitmap(512, 512) + : sega_16bit_common_base(mconfig, type, tag) + , m_maincpu(*this, "maincpu") + , m_subx(*this, "subx") + , m_suby(*this, "suby") + , m_soundcpu(*this, "soundcpu") + , m_linkcpu(*this, "linkcpu") + , m_watchdog(*this, "watchdog") + , m_bsprites(*this, "bsprites") + , m_ysprites(*this, "ysprites") + , m_segaic16vid(*this, "segaic16vid") + , m_soundlatch(*this, "soundlatch") + , m_digital_ports(*this, { { "P1", "GENERAL", "LIMITSW", "PORTD", "PORTE", "DSW", "COINAGE", "PORTH" } }) + , m_adc_ports(*this, "ADC.%u", 0) + , m_pdrift_bank(0) + , m_scanline_timer(nullptr) + , m_irq2_scanline(0) + , m_timer_irq_state(0) + , m_vblank_irq_state(0) + , m_tmp_bitmap(512, 512) { memset(m_analog_data, 0, sizeof(m_analog_data)); memset(m_misc_io_data, 0, sizeof(m_misc_io_data)); @@ -117,7 +117,6 @@ protected: required_device m_soundlatch; // input ports - DECLARE_IOPORT_ARRAY(digital_ports); required_ioport_array<8> m_digital_ports; optional_ioport_array<6> m_adc_ports; diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h index 074a4a2a327..ace6f82982f 100644 --- a/src/mame/includes/seibuspi.h +++ b/src/mame/includes/seibuspi.h @@ -29,7 +29,7 @@ public: m_oki2(*this, "oki2"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_key(*this, "KEY"), + m_key(*this, "KEY.%u", 0), m_special(*this, "SPECIAL") { } diff --git a/src/mame/includes/sidearms.h b/src/mame/includes/sidearms.h index bd82050f486..cbf6dbd9fee 100644 --- a/src/mame/includes/sidearms.h +++ b/src/mame/includes/sidearms.h @@ -16,7 +16,9 @@ public: m_bg_scrolly(*this, "bg_scrolly"), m_videoram(*this, "videoram"), m_colorram(*this, "colorram"), - m_ports(*this, ports) { } + m_ports(*this, { { "SYSTEM", "P1", "P2", "DSW0", "DSW1" } }) + { + } required_device m_maincpu; required_device m_audiocpu; @@ -29,7 +31,6 @@ public: required_shared_ptr m_videoram; required_shared_ptr m_colorram; - DECLARE_IOPORT_ARRAY(ports); optional_ioport_array<5> m_ports; int m_gameid; diff --git a/src/mame/includes/sorcerer.h b/src/mame/includes/sorcerer.h index fcc64a275df..c3be02dcfe2 100644 --- a/src/mame/includes/sorcerer.h +++ b/src/mame/includes/sorcerer.h @@ -67,7 +67,7 @@ public: , m_ram(*this, RAM_TAG) , m_iop_config(*this, "CONFIG") , m_iop_vs(*this, "VS") - , m_iop_x(*this, "X") + , m_iop_x(*this, "X.%u", 0) { } DECLARE_READ8_MEMBER(sorcerer_fc_r); diff --git a/src/mame/includes/ssystem3.h b/src/mame/includes/ssystem3.h index 79a5e7d4591..63eb87cff8d 100644 --- a/src/mame/includes/ssystem3.h +++ b/src/mame/includes/ssystem3.h @@ -47,7 +47,7 @@ public: , m_palette(*this, "palette") , m_via6522_0(*this, "via6522_0") , m_configuration(*this, "Configuration") - , m_matrix(*this, "matrix") + , m_matrix(*this, "matrix.%u", 0) { } DECLARE_DRIVER_INIT(ssystem3); diff --git a/src/mame/includes/super80.h b/src/mame/includes/super80.h index f200c0524b6..3c5f3ad4be6 100644 --- a/src/mame/includes/super80.h +++ b/src/mame/includes/super80.h @@ -38,7 +38,7 @@ public: , m_cent_data_out(*this, "cent_data_out") , m_io_dsw(*this, "DSW") , m_io_config(*this, "CONFIG") - , m_io_keyboard(*this, "KEY") + , m_io_keyboard(*this, "KEY.%u", 0) , m_crtc(*this, "crtc") , m_dma(*this, "dma") , m_fdc (*this, "fdc") diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h index dca3d296a27..7c4f2afe9bf 100644 --- a/src/mame/includes/taito_f3.h +++ b/src/mame/includes/taito_f3.h @@ -64,8 +64,8 @@ public: m_palette(*this, "palette"), m_f3_ram(*this,"f3_ram"), m_paletteram32(*this, "paletteram"), - m_input(*this, "IN"), - m_dial(*this, "DIAL"), + m_input(*this, "IN.%u", 0), + m_dial(*this, "DIAL.%u", 0), m_eepromin(*this, "EEPROMIN") { } diff --git a/src/mame/includes/taitojc.h b/src/mame/includes/taitojc.h index f334077dddb..6164f2d6f64 100644 --- a/src/mame/includes/taitojc.h +++ b/src/mame/includes/taitojc.h @@ -27,7 +27,7 @@ public: m_gfxdecode(*this, "gfxdecode"), m_screen(*this, "screen"), m_palette(*this, "palette"), - m_analog_ports(*this, "AN"), + m_analog_ports(*this, "AN.%u", 0), m_tc0780fpa(*this, "tc0780fpa") { m_mcu_output = 0; diff --git a/src/mame/includes/thomson.h b/src/mame/includes/thomson.h index f8047501e7c..92ddeba8327 100644 --- a/src/mame/includes/thomson.h +++ b/src/mame/includes/thomson.h @@ -126,7 +126,7 @@ public: m_io_vconfig(*this, "vconfig"), m_io_mconfig(*this, "mconfig"), m_io_fconfig(*this, "fconfig"), - m_io_keyboard(*this, "keyboard"), + m_io_keyboard(*this, "keyboard.%u", 0), m_vrambank(*this, THOM_VRAM_BANK), m_cartbank(*this, THOM_CART_BANK), m_rambank(*this, THOM_RAM_BANK), diff --git a/src/mame/includes/twin16.h b/src/mame/includes/twin16.h index 1a3bc02fd73..12cc3ba158e 100644 --- a/src/mame/includes/twin16.h +++ b/src/mame/includes/twin16.h @@ -20,7 +20,7 @@ public: m_spriteram(*this, "spriteram"), m_gfxrombank(*this, "gfxrombank"), m_fixram(*this, "fixram"), - m_videoram(*this, "videoram"), + m_videoram(*this, "videoram.%u", 0), m_zipram(*this, "zipram"), m_sprite_gfx_ram(*this, "sprite_gfx_ram"), m_gfxrom(*this, "gfxrom") { } diff --git a/src/mame/includes/tx0.h b/src/mame/includes/tx0.h index 8b96e52ff65..0295f3250df 100644 --- a/src/mame/includes/tx0.h +++ b/src/mame/includes/tx0.h @@ -139,7 +139,7 @@ public: m_palette(*this, "palette"), m_crt(*this, "crt"), m_csw(*this, "CSW"), - m_twr(*this, "TWR") + m_twr(*this, "TWR.%u", 0) { } tx0_tape_reader_t m_tape_reader; diff --git a/src/mame/includes/vector06.h b/src/mame/includes/vector06.h index e6bf99fa7da..97336947f89 100644 --- a/src/mame/includes/vector06.h +++ b/src/mame/includes/vector06.h @@ -42,7 +42,7 @@ public: m_bank3(*this, "bank3"), m_bank4(*this, "bank4"), m_region_maincpu(*this, "maincpu"), - m_line(*this, "LINE"), + m_line(*this, "LINE.%u", 0), m_reset(*this, "RESET") { } diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h index 0b50cb491ee..544d98a94c8 100644 --- a/src/mame/includes/vicdual.h +++ b/src/mame/includes/vicdual.h @@ -32,7 +32,7 @@ public: m_in2(*this, "IN2"), m_coinage(*this, "COINAGE"), m_color_bw(*this, "COLOR_BW"), - m_fake_lives(*this, "FAKE_LIVES") + m_fake_lives(*this, "FAKE_LIVES.%u", 0) { } required_device m_maincpu; diff --git a/src/mame/includes/vixen.h b/src/mame/includes/vixen.h index 0091d3ee9d8..48834ef315c 100644 --- a/src/mame/includes/vixen.h +++ b/src/mame/includes/vixen.h @@ -43,7 +43,7 @@ public: m_sync_rom(*this, "video"), m_char_rom(*this, "chargen"), m_video_ram(*this, "video_ram"), - m_key(*this, "KEY"), + m_key(*this, "KEY.%u", 0), m_cmd_d1(0), m_fdint(0), m_vsync(0), diff --git a/src/mame/includes/warpwarp.h b/src/mame/includes/warpwarp.h index 109e5e873f1..ca798ea698c 100644 --- a/src/mame/includes/warpwarp.h +++ b/src/mame/includes/warpwarp.h @@ -23,7 +23,7 @@ public: m_dsw1(*this, "DSW1"), m_volin1(*this, "VOLIN1"), m_volin2(*this, "VOLIN2"), - m_ports(*this, portnames) + m_ports(*this, { { "SW0", "SW1", "DSW2", "PLACEHOLDER" } }) // "IN1" & "IN2" are read separately when offset==3 { } required_device m_maincpu; @@ -39,7 +39,6 @@ public: optional_ioport m_dsw1; optional_ioport m_volin1; optional_ioport m_volin2; - DECLARE_IOPORT_ARRAY(portnames); optional_ioport_array<4> m_ports; int m_geebee_bgw; diff --git a/src/mame/includes/zaccaria.h b/src/mame/includes/zaccaria.h index 6bcfa72798d..0e30444b671 100644 --- a/src/mame/includes/zaccaria.h +++ b/src/mame/includes/zaccaria.h @@ -16,7 +16,7 @@ public: , m_attributesram(*this, "attributesram") , m_spriteram(*this, "spriteram") , m_spriteram2(*this, "spriteram2") - , m_dsw_port(*this, "DSW") + , m_dsw_port(*this, "DSW.%u", 0) { } DECLARE_READ8_MEMBER(dsw_r); diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h index 54983f6c2e4..a16373d38ba 100644 --- a/src/mame/includes/zaxxon.h +++ b/src/mame/includes/zaxxon.h @@ -16,7 +16,7 @@ public: m_samples(*this, "samples"), m_gfxdecode(*this, "gfxdecode"), m_palette(*this, "palette"), - m_dials(*this, "DIAL"), + m_dials(*this, "DIAL.%u", 0), m_videoram(*this, "videoram"), m_spriteram(*this, "spriteram"), m_colorram(*this, "colorram"), diff --git a/src/mame/machine/dmv_keyb.cpp b/src/mame/machine/dmv_keyb.cpp index 4f4c3d618e1..48af0593f83 100644 --- a/src/mame/machine/dmv_keyb.cpp +++ b/src/mame/machine/dmv_keyb.cpp @@ -208,9 +208,9 @@ ioport_constructor dmv_keyboard_device::device_input_ports() const //------------------------------------------------- dmv_keyboard_device::dmv_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, DMV_KEYBOARD, "Decision Mate V Keyboard", tag, owner, clock, "dmv_keyboard", __FILE__), - m_maincpu(*this, "mcu"), - m_keyboard(*this, "COL") + : device_t(mconfig, DMV_KEYBOARD, "Decision Mate V Keyboard", tag, owner, clock, "dmv_keyboard", __FILE__) + , m_maincpu(*this, "mcu") + , m_keyboard(*this, "COL.%u", 0) { } diff --git a/src/mame/machine/m24_kbd.cpp b/src/mame/machine/m24_kbd.cpp index f98da2dd409..758a29c2edf 100644 --- a/src/mame/machine/m24_kbd.cpp +++ b/src/mame/machine/m24_kbd.cpp @@ -211,11 +211,11 @@ ioport_constructor m24_keyboard_device::device_input_ports() const } m24_keyboard_device::m24_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, M24_KEYBOARD, "Olivetti M24 Keyboard", tag, owner, clock, "m24_kbd", __FILE__), - m_rows(*this, "ROW"), - m_mousebtn(*this, "MOUSEBTN"), - m_out_data(*this), - m_mcu(*this, "mcu") + : device_t(mconfig, M24_KEYBOARD, "Olivetti M24 Keyboard", tag, owner, clock, "m24_kbd", __FILE__) + , m_rows(*this, "ROW.%u", 0) + , m_mousebtn(*this, "MOUSEBTN") + , m_out_data(*this) + , m_mcu(*this, "mcu") { } diff --git a/src/mame/machine/midwunit.cpp b/src/mame/machine/midwunit.cpp index 98b1f02efe2..4ae8a44fe86 100644 --- a/src/mame/machine/midwunit.cpp +++ b/src/mame/machine/midwunit.cpp @@ -113,8 +113,6 @@ WRITE16_MEMBER(midwunit_state::midwunit_io_w) * *************************************/ -IOPORT_ARRAY_MEMBER(midwunit_state::wunit_ports) { "IN0", "IN1", "DSW", "IN2" }; - READ16_MEMBER(midwunit_state::midwunit_io_r) { /* apply I/O shuffling */ diff --git a/src/mame/machine/midyunit.cpp b/src/mame/machine/midyunit.cpp index 8c18d64fecb..e3a00f1047a 100644 --- a/src/mame/machine/midyunit.cpp +++ b/src/mame/machine/midyunit.cpp @@ -112,8 +112,6 @@ READ16_MEMBER(midyunit_state::midyunit_protection_r) * *************************************/ -IOPORT_ARRAY_MEMBER(midyunit_state::ports) { "IN0", "IN1", "IN2", "DSW", "UNK0", "UNK1" }; - READ16_MEMBER(midyunit_state::midyunit_input_r) { return m_ports[offset]->read(); diff --git a/src/mame/machine/pcd_kbd.cpp b/src/mame/machine/pcd_kbd.cpp index 25c7eabb981..6b4e0078b00 100644 --- a/src/mame/machine/pcd_kbd.cpp +++ b/src/mame/machine/pcd_kbd.cpp @@ -222,10 +222,10 @@ ioport_constructor pcd_keyboard_device::device_input_ports() const } pcd_keyboard_device::pcd_keyboard_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) - : device_t(mconfig, PCD_KEYBOARD, "PC-D Keyboard", tag, owner, clock, "pcd_kbd", __FILE__), - m_rows(*this, "ROW"), - m_p1(0), - m_out_tx_handler(*this) + : device_t(mconfig, PCD_KEYBOARD, "PC-D Keyboard", tag, owner, clock, "pcd_kbd", __FILE__) + , m_rows(*this, "ROW.%u", 0) + , m_p1(0) + , m_out_tx_handler(*this) { } diff --git a/src/mame/machine/wpc_pic.cpp b/src/mame/machine/wpc_pic.cpp index 353454fb7a1..9fdd0404684 100644 --- a/src/mame/machine/wpc_pic.cpp +++ b/src/mame/machine/wpc_pic.cpp @@ -8,7 +8,7 @@ const device_type WPC_PIC = &device_creator; wpc_pic_device::wpc_pic_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, WPC_PIC, "Williams Pinball Controller PIC Security", tag, owner, clock, "wpc_pic", __FILE__), - swarray(*this, ":SW") + swarray(*this, ":SW.%u", 0) { serial = "000 000000 00000 000"; }