From dc26fcd1bb2589dd256d813ddae69aedafe16374 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 16 Sep 2024 00:47:44 +1000 Subject: emu/ioport.h: Got rid of [DECLARE_]CUSTOM_INPUT_MEMBR - it's just obfuscation at this point. --- src/devices/bus/abckb/abc99.cpp | 4 ++-- src/devices/bus/abckb/abc99.h | 4 ++-- src/devices/bus/amiga/keyboard/mitsumi.cpp | 2 +- src/devices/bus/coleco/controller/hand.cpp | 2 +- src/devices/bus/coleco/controller/hand.h | 2 +- src/devices/bus/coleco/controller/sac.cpp | 2 +- src/devices/bus/coleco/controller/sac.h | 2 +- src/devices/bus/mackbd/keyboard.cpp | 8 +++---- src/devices/bus/mackbd/pluskbd.cpp | 2 +- src/devices/bus/spectrum/beta.h | 2 +- src/devices/machine/sensorboard.h | 8 +++---- src/devices/video/pc_vga_paradise.cpp | 8 +++---- src/devices/video/pc_vga_paradise.h | 8 +++---- src/emu/ioport.h | 4 ---- src/mame/acorn/aristmk5.cpp | 8 +++---- src/mame/amiga/alg.cpp | 4 ++-- src/mame/amiga/amiga.cpp | 6 +++--- src/mame/amiga/amiga.h | 4 ++-- src/mame/amiga/amiga_m.cpp | 2 +- src/mame/amiga/arsystems.cpp | 4 ++-- src/mame/amiga/cubo.cpp | 4 ++-- src/mame/appliedconcepts/ggm.cpp | 4 ++-- src/mame/atari/jedi.cpp | 4 ++-- src/mame/atari/mhavoc.cpp | 4 ++-- src/mame/atari/quizshow.cpp | 4 ++-- src/mame/atari/starshp1.cpp | 8 +++---- src/mame/atari/tempest.cpp | 8 +++---- src/mame/capcom/kenseim.cpp | 8 +++---- src/mame/casio/ctk2000.cpp | 2 +- src/mame/casio/ctk551.cpp | 10 ++++----- src/mame/casio/cz230s.cpp | 12 +++++------ src/mame/casio/ld50.cpp | 4 ++-- src/mame/casio/pickytlk.cpp | 4 ++-- src/mame/casio/sk1.cpp | 4 ++-- src/mame/dataeast/astrof.cpp | 6 +++--- src/mame/dataeast/astrof.h | 6 +++--- src/mame/dataeast/tumbleb.cpp | 2 +- src/mame/dataeast/tumbleb.h | 2 +- src/mame/dynax/ddenlovr.cpp | 12 +++++------ src/mame/edevices/fantland.cpp | 2 +- src/mame/edevices/fantland.h | 2 +- src/mame/excellent/lastbank.cpp | 4 ++-- src/mame/exidy/exidy.cpp | 16 +++++++------- src/mame/exidy/exidy440.cpp | 2 +- src/mame/exidy/exidy440.h | 2 +- src/mame/galaxian/galaxian.cpp | 6 +++--- src/mame/galaxian/galaxian.h | 6 +++--- src/mame/galaxian/galaxold.cpp | 2 +- src/mame/galaxian/galaxold.h | 2 +- src/mame/galaxian/scramble.h | 2 +- src/mame/galaxian/scramble_m.cpp | 2 +- src/mame/gottlieb/gottlieb.cpp | 8 +++---- src/mame/handheld/hh_cop400.cpp | 4 ++-- src/mame/handheld/hh_tms1k.cpp | 4 ++-- src/mame/ice/lethalj.cpp | 2 +- src/mame/ice/lethalj.h | 2 +- src/mame/igs/igs_m027.cpp | 4 ++-- src/mame/igt/peplus.cpp | 4 ++-- src/mame/itech/itech8.cpp | 2 +- src/mame/itech/itech8.h | 2 +- src/mame/jaleco/bnstars.cpp | 4 ++-- src/mame/jaleco/cischeat.cpp | 8 +++---- src/mame/jaleco/cischeat.h | 8 +++---- src/mame/jaleco/ddayjlc.cpp | 4 ++-- src/mame/jaleco/exerion.cpp | 4 ++-- src/mame/jaleco/homerun.cpp | 4 ++-- src/mame/jaleco/ms32.cpp | 2 +- src/mame/jaleco/ms32.h | 2 +- src/mame/jaleco/tetrisp2.cpp | 2 +- src/mame/jaleco/tetrisp2.h | 2 +- src/mame/kaneko/suprnova.cpp | 2 +- src/mame/kaneko/suprnova.h | 2 +- src/mame/konami/crimfght.cpp | 4 ++-- src/mame/konami/konamigv.cpp | 4 ++-- src/mame/konami/konamigx.cpp | 2 +- src/mame/konami/konamigx.h | 2 +- src/mame/konami/ksys573.cpp | 4 ++-- src/mame/konami/piratesh.cpp | 8 +++---- src/mame/konami/qdrmfgp.cpp | 4 ++-- src/mame/midw8080/8080bw.cpp | 8 +++---- src/mame/midw8080/8080bw.h | 8 +++---- src/mame/midw8080/mw8080bw.cpp | 34 +++++++++++++++--------------- src/mame/midw8080/mw8080bw.h | 34 +++++++++++++++--------------- src/mame/midway/astrocde.cpp | 4 ++-- src/mame/midway/astrocde.h | 4 ++-- src/mame/midway/atlantis.cpp | 2 +- src/mame/midway/balsente.h | 2 +- src/mame/midway/balsente_m.cpp | 2 +- src/mame/midway/midvunit.cpp | 2 +- src/mame/midway/midvunit.h | 2 +- src/mame/midway/midyunit.cpp | 2 +- src/mame/midway/midyunit.h | 2 +- src/mame/midway/midzeus.cpp | 8 +++---- src/mame/midway/mw18w.cpp | 4 ++-- src/mame/midway/seattle.cpp | 12 +++++------ src/mame/midway/vegas.cpp | 20 +++++++++--------- src/mame/midway/williams.cpp | 2 +- src/mame/midway/williams.h | 6 +++--- src/mame/midway/wmg.cpp | 4 ++-- src/mame/misc/enigma2.cpp | 8 +++---- src/mame/misc/epos.cpp | 2 +- src/mame/misc/imolagp.cpp | 4 ++-- src/mame/misc/jaminator.cpp | 10 ++++----- src/mame/misc/katosmedz80.cpp | 4 ++-- src/mame/misc/ssingles.cpp | 4 ++-- src/mame/misc/vamphalf.cpp | 4 ++-- src/mame/namco/namcoio_gearbox.cpp | 2 +- src/mame/namco/namcoio_gearbox.h | 2 +- src/mame/namco/wacky_gator.cpp | 8 +++---- src/mame/nec/pc9801.cpp | 2 +- src/mame/nec/pc9801.h | 2 +- src/mame/neogeo/neogeo.cpp | 6 +++--- src/mame/neogeo/neogeo.h | 6 +++--- src/mame/novag/vip.cpp | 2 +- src/mame/olympia/lbeach.cpp | 4 ++-- src/mame/omori/battlex.cpp | 4 ++-- src/mame/pacman/pacman.cpp | 2 +- src/mame/pacman/pacman.h | 2 +- src/mame/pc/calchase.cpp | 4 ++-- src/mame/phoenix/phoenix.h | 2 +- src/mame/phoenix/phoenix_v.cpp | 2 +- src/mame/pinball/flicker.cpp | 4 ++-- src/mame/pinball/icecold.cpp | 4 ++-- src/mame/pinball/peyper.cpp | 4 ++-- src/mame/promat/gstream.cpp | 4 ++-- src/mame/psikyo/psikyo4.cpp | 4 ++-- src/mame/psikyo/psikyo4.h | 4 ++-- src/mame/rare/kinst.cpp | 2 +- src/mame/sanritsu/mjkjidai.cpp | 4 ++-- src/mame/sega/model2.cpp | 2 +- src/mame/sega/model2.h | 2 +- src/mame/sega/naomi.cpp | 6 +++--- src/mame/sega/naomi.h | 6 +++--- src/mame/sega/segajw.cpp | 4 ++-- src/mame/sega/segaorun.cpp | 2 +- src/mame/sega/segaorun.h | 2 +- src/mame/sega/segas16a.cpp | 6 +++--- src/mame/sega/segas16a.h | 6 +++--- src/mame/sega/segas16b.cpp | 6 +++--- src/mame/sega/segas16b.h | 6 +++--- src/mame/sega/sg1000.cpp | 2 +- src/mame/sega/shtzone.cpp | 8 +++---- src/mame/sega/stactics.cpp | 4 ++-- src/mame/sega/system1.cpp | 4 ++-- src/mame/sega/system1.h | 4 ++-- src/mame/sega/turbo.cpp | 2 +- src/mame/sega/turbo.h | 2 +- src/mame/sega/zaxxon.cpp | 2 +- src/mame/sega/zaxxon.h | 2 +- src/mame/seibu/seibuspi.cpp | 2 +- src/mame/seibu/seibuspi.h | 2 +- src/mame/seta/downtown.cpp | 8 +++---- src/mame/seta/seta.cpp | 6 +++--- src/mame/snk/snk.cpp | 10 ++++----- src/mame/snk/snk.h | 10 ++++----- src/mame/snk/snk6502.cpp | 2 +- src/mame/snk/snk6502.h | 2 +- src/mame/taito/arkanoid.h | 2 +- src/mame/taito/arkanoid_m.cpp | 2 +- src/mame/taito/buggychl.cpp | 4 ++-- src/mame/taito/crbaloon.cpp | 2 +- src/mame/taito/crbaloon.h | 2 +- src/mame/taito/cyclemb.cpp | 4 ++-- src/mame/taito/opwolf.cpp | 8 +++---- src/mame/taito/superqix.cpp | 2 +- src/mame/taito/superqix.h | 2 +- src/mame/taito/taito_f3.cpp | 6 +++--- src/mame/taito/taito_f3.h | 6 +++--- src/mame/taito/taito_z.cpp | 6 +++--- src/mame/taito/taito_z.h | 6 +++--- src/mame/taito/taitosj.cpp | 4 ++-- src/mame/taito/taitosj.h | 4 ++-- src/mame/taito/topspeed.cpp | 8 +++---- src/mame/tch/littlerb.cpp | 4 ++-- src/mame/technos/ddragon3.cpp | 4 ++-- src/mame/technos/ddragon3.h | 4 ++-- src/mame/technos/renegade.cpp | 4 ++-- src/mame/technos/xain.cpp | 2 +- src/mame/technos/xain.h | 2 +- src/mame/tvgames/spg110.cpp | 4 ++-- src/mame/tvgames/spg2xx.cpp | 4 ++-- src/mame/tvgames/spg2xx.h | 4 ++-- src/mame/universal/ladybug.cpp | 8 +++---- src/mame/upl/nova2001.cpp | 2 +- src/mame/upl/nova2001.h | 2 +- src/mame/ussr/istrebiteli.cpp | 4 ++-- src/mame/ussr/special_gambl.cpp | 2 +- src/mame/valadon/bagman.cpp | 2 +- src/mame/valadon/bagman.h | 2 +- src/mame/venture/suprridr.cpp | 4 ++-- src/mame/vsystem/rpunch.cpp | 2 +- src/mame/vsystem/tail2nos.cpp | 4 ++-- src/mame/yamaha/ymdx100.cpp | 2 +- src/mame/yamaha/ympsr150.cpp | 12 +++++------ src/mame/yamaha/ympsr60.cpp | 2 +- src/mame/zaccaria/zac1b1120.cpp | 2 +- 196 files changed, 445 insertions(+), 449 deletions(-) diff --git a/src/devices/bus/abckb/abc99.cpp b/src/devices/bus/abckb/abc99.cpp index a515ce5c8b0..68b5410e4bc 100644 --- a/src/devices/bus/abckb/abc99.cpp +++ b/src/devices/bus/abckb/abc99.cpp @@ -184,7 +184,7 @@ INPUT_CHANGED_MEMBER( abc99_device::keyboard_reset ) // INPUT_PORTS( abc99 ) //------------------------------------------------- -CUSTOM_INPUT_MEMBER( abc99_device::cursor_x4_r ) +ioport_value abc99_device::cursor_x4_r() { u8 cursor = m_cursor->read(); u8 data = 0; @@ -205,7 +205,7 @@ CUSTOM_INPUT_MEMBER( abc99_device::cursor_x4_r ) return data; } -CUSTOM_INPUT_MEMBER( abc99_device::cursor_x6_r ) +ioport_value abc99_device::cursor_x6_r() { u8 cursor = m_cursor->read(); u8 data = 0; diff --git a/src/devices/bus/abckb/abc99.h b/src/devices/bus/abckb/abc99.h index 8f47aa1c6e7..501c2d9065e 100644 --- a/src/devices/bus/abckb/abc99.h +++ b/src/devices/bus/abckb/abc99.h @@ -33,8 +33,8 @@ public: // construction/destruction abc99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_CUSTOM_INPUT_MEMBER( cursor_x4_r ); - DECLARE_CUSTOM_INPUT_MEMBER( cursor_x6_r ); + ioport_value cursor_x4_r(); + ioport_value cursor_x6_r(); DECLARE_INPUT_CHANGED_MEMBER( keyboard_reset ); diff --git a/src/devices/bus/amiga/keyboard/mitsumi.cpp b/src/devices/bus/amiga/keyboard/mitsumi.cpp index 0e6f219192d..53577c3a35d 100644 --- a/src/devices/bus/amiga/keyboard/mitsumi.cpp +++ b/src/devices/bus/amiga/keyboard/mitsumi.cpp @@ -117,7 +117,7 @@ public: return m_kdat_in ^ 0x01U; } - CUSTOM_INPUT_MEMBER(cols_r) + ioport_value cols_r() { ioport_value result(0xffU); for (unsigned i = 0U; m_rows.size() > i; ++i) diff --git a/src/devices/bus/coleco/controller/hand.cpp b/src/devices/bus/coleco/controller/hand.cpp index d5e4d72b6bc..4456cabf4fe 100644 --- a/src/devices/bus/coleco/controller/hand.cpp +++ b/src/devices/bus/coleco/controller/hand.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(COLECO_HAND_CONTROLLER, coleco_hand_controller_device, "coleco_hand", "ColecoVision Hand Controller") -CUSTOM_INPUT_MEMBER( coleco_hand_controller_device::keypad_r ) +ioport_value coleco_hand_controller_device::keypad_r() { uint8_t data = 0xf; uint16_t keypad = m_io_keypad->read(); diff --git a/src/devices/bus/coleco/controller/hand.h b/src/devices/bus/coleco/controller/hand.h index f65ad709106..50a18c598e9 100644 --- a/src/devices/bus/coleco/controller/hand.h +++ b/src/devices/bus/coleco/controller/hand.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual ioport_constructor device_input_ports() const override; - DECLARE_CUSTOM_INPUT_MEMBER( keypad_r ); + ioport_value keypad_r(); protected: // device-level overrides diff --git a/src/devices/bus/coleco/controller/sac.cpp b/src/devices/bus/coleco/controller/sac.cpp index 7621897c78d..5860cefcc8b 100644 --- a/src/devices/bus/coleco/controller/sac.cpp +++ b/src/devices/bus/coleco/controller/sac.cpp @@ -18,7 +18,7 @@ DEFINE_DEVICE_TYPE(COLECO_SUPER_ACTION_CONTROLLER, coleco_super_action_controller_device, "coleco_sac", "ColecoVision Super Action Controller") -CUSTOM_INPUT_MEMBER( coleco_super_action_controller_device::keypad_r ) +ioport_value coleco_super_action_controller_device::keypad_r() { uint8_t data = 0xf; uint16_t keypad = m_io_keypad->read(); diff --git a/src/devices/bus/coleco/controller/sac.h b/src/devices/bus/coleco/controller/sac.h index 20078e33ef7..5e5be1193f5 100644 --- a/src/devices/bus/coleco/controller/sac.h +++ b/src/devices/bus/coleco/controller/sac.h @@ -31,7 +31,7 @@ public: // optional information overrides virtual ioport_constructor device_input_ports() const override; - DECLARE_CUSTOM_INPUT_MEMBER( keypad_r ); + ioport_value keypad_r(); DECLARE_INPUT_CHANGED_MEMBER( slider_w ); protected: diff --git a/src/devices/bus/mackbd/keyboard.cpp b/src/devices/bus/mackbd/keyboard.cpp index 5b3cca18b21..388bbc1f349 100644 --- a/src/devices/bus/mackbd/keyboard.cpp +++ b/src/devices/bus/mackbd/keyboard.cpp @@ -235,7 +235,7 @@ template class peripheral_base : public device_t, public device_mac_keyboard_interface { public: - CUSTOM_INPUT_MEMBER(columns_r) + ioport_value columns_r() { ioport_value result(make_bitmask(Rows)); for (unsigned i = 0U; Rows > i; ++i) @@ -247,7 +247,7 @@ public: return result ^ make_bitmask(Rows); } - CUSTOM_INPUT_MEMBER(host_data_r) + ioport_value host_data_r() { return m_host_data_in ^ 0x01; } @@ -402,12 +402,12 @@ protected: class keypad_base : public peripheral_base<3> { public: - CUSTOM_INPUT_MEMBER(keyboard_clock_r) + ioport_value keyboard_clock_r() { return m_keyboard_clock_in ^ 0x01; } - CUSTOM_INPUT_MEMBER(keyboard_data_r) + ioport_value keyboard_data_r() { return m_keyboard_data_in ^ 0x01; } diff --git a/src/devices/bus/mackbd/pluskbd.cpp b/src/devices/bus/mackbd/pluskbd.cpp index 64ceb3fb93b..225906069fb 100644 --- a/src/devices/bus/mackbd/pluskbd.cpp +++ b/src/devices/bus/mackbd/pluskbd.cpp @@ -107,7 +107,7 @@ ROM_END class keyboard_base : public device_t, public device_mac_keyboard_interface { public: - CUSTOM_INPUT_MEMBER(host_data_r) + ioport_value host_data_r() { return m_host_data_in ^ 0x01; } diff --git a/src/devices/bus/spectrum/beta.h b/src/devices/bus/spectrum/beta.h index 3dac22f95d3..22afe752ee9 100644 --- a/src/devices/bus/spectrum/beta.h +++ b/src/devices/bus/spectrum/beta.h @@ -144,7 +144,7 @@ public: spectrum_gamma_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); spectrum_gamma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_CUSTOM_INPUT_MEMBER(busy_r) { return !m_centronics_busy; } + ioport_value busy_r() { return !m_centronics_busy; } protected: virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/machine/sensorboard.h b/src/devices/machine/sensorboard.h index 3d5596f0f82..90347f31843 100644 --- a/src/devices/machine/sensorboard.h +++ b/src/devices/machine/sensorboard.h @@ -76,10 +76,10 @@ public: DECLARE_INPUT_CHANGED_MEMBER(ui_init); DECLARE_INPUT_CHANGED_MEMBER(ui_refresh) { refresh(); } - DECLARE_CUSTOM_INPUT_MEMBER(check_sensor_busy) { return (m_sensorpos == -1) ? 0 : 1; } - DECLARE_CUSTOM_INPUT_MEMBER(check_bs_mask) { return m_bs_mask; } - DECLARE_CUSTOM_INPUT_MEMBER(check_ss_mask) { return m_ss_mask; } - DECLARE_CUSTOM_INPUT_MEMBER(check_ui_enabled) { return m_ui_enabled; } + ioport_value check_sensor_busy() { return (m_sensorpos == -1) ? 0 : 1; } + ioport_value check_bs_mask() { return m_bs_mask; } + ioport_value check_ss_mask() { return m_ss_mask; } + ioport_value check_ui_enabled() { return m_ui_enabled; } protected: // device-level overrides diff --git a/src/devices/video/pc_vga_paradise.cpp b/src/devices/video/pc_vga_paradise.cpp index 008e061ca54..5b5ac35c385 100644 --- a/src/devices/video/pc_vga_paradise.cpp +++ b/src/devices/video/pc_vga_paradise.cpp @@ -329,10 +329,10 @@ void wd90c00_vga_device::device_reset() m_pr15 = 0; } -CUSTOM_INPUT_MEMBER(wd90c00_vga_device::egasw1_r) { return BIT(m_pr11, 4); } -CUSTOM_INPUT_MEMBER(wd90c00_vga_device::egasw2_r) { return BIT(m_pr11, 5); } -CUSTOM_INPUT_MEMBER(wd90c00_vga_device::egasw3_r) { return BIT(m_pr11, 6); } -CUSTOM_INPUT_MEMBER(wd90c00_vga_device::egasw4_r) { return BIT(m_pr11, 7); } +ioport_value wd90c00_vga_device::egasw1_r() { return BIT(m_pr11, 4); } +ioport_value wd90c00_vga_device::egasw2_r() { return BIT(m_pr11, 5); } +ioport_value wd90c00_vga_device::egasw3_r() { return BIT(m_pr11, 6); } +ioport_value wd90c00_vga_device::egasw4_r() { return BIT(m_pr11, 7); } static INPUT_PORTS_START(paradise_vga_sense) PORT_START("VGA_SENSE") diff --git a/src/devices/video/pc_vga_paradise.h b/src/devices/video/pc_vga_paradise.h index 74359a2390d..af5cac19003 100644 --- a/src/devices/video/pc_vga_paradise.h +++ b/src/devices/video/pc_vga_paradise.h @@ -62,10 +62,10 @@ public: auto read_cnf12_callback() { return m_cnf12_read_cb.bind(); } // NOTE: these are internal shadows, for the input sense. - CUSTOM_INPUT_MEMBER(egasw4_r); - CUSTOM_INPUT_MEMBER(egasw3_r); - CUSTOM_INPUT_MEMBER(egasw2_r); - CUSTOM_INPUT_MEMBER(egasw1_r); + ioport_value egasw4_r(); + ioport_value egasw3_r(); + ioport_value egasw2_r(); + ioport_value egasw1_r(); protected: wd90c00_vga_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/emu/ioport.h b/src/emu/ioport.h index bbff70db21d..1c45f1bc516 100644 --- a/src/emu/ioport.h +++ b/src/emu/ioport.h @@ -1097,10 +1097,6 @@ private: #define UCHAR_MAMEKEY(code) (UCHAR_MAMEKEY_BEGIN + ITEM_ID_##code) -// macro for a read callback function (PORT_CUSTOM) -#define CUSTOM_INPUT_MEMBER(name) ioport_value name() -#define DECLARE_CUSTOM_INPUT_MEMBER(name) ioport_value name() - // macro for port write callback functions (PORT_CHANGED) #define INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, u32 param, ioport_value oldval, ioport_value newval) #define DECLARE_INPUT_CHANGED_MEMBER(name) void name(ioport_field &field, u32 param, ioport_value oldval, ioport_value newval) diff --git a/src/mame/acorn/aristmk5.cpp b/src/mame/acorn/aristmk5.cpp index 21471f13b18..bb0da8237bf 100644 --- a/src/mame/acorn/aristmk5.cpp +++ b/src/mame/acorn/aristmk5.cpp @@ -782,8 +782,8 @@ public: void init_aristmk5(); INPUT_CHANGED_MEMBER(coin_start); - CUSTOM_INPUT_MEMBER(coin_r); - CUSTOM_INPUT_MEMBER(coin_usa_r); + ioport_value coin_r(); + ioport_value coin_usa_r(); int hopper_r(); private: @@ -1283,7 +1283,7 @@ int aristmk5_state::hopper_r() return (m_hopper_test && !m_hopper->line_r()) ? 0 : 1; } -CUSTOM_INPUT_MEMBER(aristmk5_state::coin_usa_r) +ioport_value aristmk5_state::coin_usa_r() { // ---x Coin Acceptor // --x- Credit Sense @@ -1313,7 +1313,7 @@ CUSTOM_INPUT_MEMBER(aristmk5_state::coin_usa_r) return data; } -CUSTOM_INPUT_MEMBER(aristmk5_state::coin_r) +ioport_value aristmk5_state::coin_r() { uint8_t data = 0x01; diff --git a/src/mame/amiga/alg.cpp b/src/mame/amiga/alg.cpp index 14e1401aeb9..74eb266fd70 100644 --- a/src/mame/amiga/alg.cpp +++ b/src/mame/amiga/alg.cpp @@ -70,7 +70,7 @@ public: , m_triggers(*this, "TRIGGERS") { } - DECLARE_CUSTOM_INPUT_MEMBER(lightgun_pos_r); + ioport_value lightgun_pos_r(); int lightgun_trigger_r(); int lightgun_holster_r(); @@ -167,7 +167,7 @@ void alg_state::potgo_w(uint16_t data) } -CUSTOM_INPUT_MEMBER(alg_state::lightgun_pos_r) +ioport_value alg_state::lightgun_pos_r() { int x = 0, y = 0; diff --git a/src/mame/amiga/amiga.cpp b/src/mame/amiga/amiga.cpp index b85916308c9..7e966189393 100644 --- a/src/mame/amiga/amiga.cpp +++ b/src/mame/amiga/amiga.cpp @@ -576,7 +576,7 @@ public: void handle_joystick_cia(u8 pra, u8 dra); u16 handle_joystick_potgor(u16 potgor); - DECLARE_CUSTOM_INPUT_MEMBER( cd32_input ); + ioport_value cd32_input(); template int cd32_sel_mirror_input(); void init_pal(); @@ -1165,7 +1165,7 @@ u16 cd32_state::handle_joystick_potgor(u16 potgor) return potgor; } -CUSTOM_INPUT_MEMBER( cd32_state::cd32_input ) +ioport_value cd32_state::cd32_input() { return handle_joystick_potgor(m_potgo_value) >> 8; } @@ -1495,7 +1495,7 @@ void a4000_state::a4000t_mem(address_map &map) //************************************************************************** template -CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert ) +ioport_value amiga_state::amiga_joystick_convert() { uint8_t bits = m_joy_ports[P].read_safe(0xff); diff --git a/src/mame/amiga/amiga.h b/src/mame/amiga/amiga.h index 2ecbe1d877d..517bd85d3f2 100644 --- a/src/mame/amiga/amiga.h +++ b/src/mame/amiga/amiga.h @@ -442,8 +442,8 @@ public: TIMER_CALLBACK_MEMBER( blitter_process_callback ); void update_irqs(); - template DECLARE_CUSTOM_INPUT_MEMBER( amiga_joystick_convert ); - DECLARE_CUSTOM_INPUT_MEMBER( floppy_drive_status ); + template ioport_value amiga_joystick_convert(); + ioport_value floppy_drive_status(); void m68k_reset(int state); void kbreset_w(int state); diff --git a/src/mame/amiga/amiga_m.cpp b/src/mame/amiga/amiga_m.cpp index 15f1739aea0..6f5c074bb53 100644 --- a/src/mame/amiga/amiga_m.cpp +++ b/src/mame/amiga/amiga_m.cpp @@ -1048,7 +1048,7 @@ void amiga_state::gayle_cia_w(offs_t offset, uint16_t data, uint16_t mem_mask) cia_w(offset, data, mem_mask); } -CUSTOM_INPUT_MEMBER( amiga_state::floppy_drive_status ) +ioport_value amiga_state::floppy_drive_status() { return m_fdc->ciaapra_r(); } diff --git a/src/mame/amiga/arsystems.cpp b/src/mame/amiga/arsystems.cpp index 53cf48f1100..4f8de48a7e1 100644 --- a/src/mame/amiga/arsystems.cpp +++ b/src/mame/amiga/arsystems.cpp @@ -90,7 +90,7 @@ public: void init_dlta(); void init_argh(); - template DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r); + template ioport_value coin_counter_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback); protected: @@ -167,7 +167,7 @@ void arcadia_amiga_state::arcadia_cia_0_portb_w(uint8_t data) *************************************/ template -CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r) +ioport_value arcadia_amiga_state::coin_counter_r() { /* return coin counter values */ return m_coin_counter[Coin] & 3; diff --git a/src/mame/amiga/cubo.cpp b/src/mame/amiga/cubo.cpp index 9a31cb65c42..981411dc6a4 100644 --- a/src/mame/amiga/cubo.cpp +++ b/src/mame/amiga/cubo.cpp @@ -343,7 +343,7 @@ public: void handle_joystick_cia(uint8_t pra, uint8_t dra); uint16_t handle_joystick_potgor(uint16_t potgor); - DECLARE_CUSTOM_INPUT_MEMBER(cubo_input); + ioport_value cubo_input(); template int cd32_sel_mirror_input(); void akiko_int_w(int state); @@ -537,7 +537,7 @@ uint16_t cubo_state::handle_joystick_potgor(uint16_t potgor) return potgor; } -CUSTOM_INPUT_MEMBER( cubo_state::cubo_input ) +ioport_value cubo_state::cubo_input() { return handle_joystick_potgor(m_potgo_value) >> 8; } diff --git a/src/mame/appliedconcepts/ggm.cpp b/src/mame/appliedconcepts/ggm.cpp index dd32bc8e0b1..3eeeafb40cb 100644 --- a/src/mame/appliedconcepts/ggm.cpp +++ b/src/mame/appliedconcepts/ggm.cpp @@ -95,7 +95,7 @@ public: DECLARE_INPUT_CHANGED_MEMBER(reset_switch) { update_reset(newval); } DECLARE_INPUT_CHANGED_MEMBER(overlay_switch) { update_overlay(); } - DECLARE_CUSTOM_INPUT_MEMBER(overlay_r); + ioport_value overlay_r(); protected: virtual void machine_start() override; @@ -190,7 +190,7 @@ void ggm_state::update_reset(ioport_value state) Keypad Overlay *******************************************************************************/ -CUSTOM_INPUT_MEMBER(ggm_state::overlay_r) +ioport_value ggm_state::overlay_r() { u8 data = m_inputs[5]->read() & 0xf; return (data == 0xf) ? m_overlay : data; diff --git a/src/mame/atari/jedi.cpp b/src/mame/atari/jedi.cpp index 77052798d9c..bee56f30b3c 100644 --- a/src/mame/atari/jedi.cpp +++ b/src/mame/atari/jedi.cpp @@ -164,7 +164,7 @@ public: m_mainbank(*this, "mainbank") { } - DECLARE_CUSTOM_INPUT_MEMBER(audio_comm_stat_0c01_r); + ioport_value audio_comm_stat_0c01_r(); void jedi(machine_config &config); protected: @@ -264,7 +264,7 @@ u8 jedi_state::audio_comm_stat_r() } -CUSTOM_INPUT_MEMBER(jedi_state::audio_comm_stat_0c01_r) +ioport_value jedi_state::audio_comm_stat_0c01_r() { return (m_soundlatch->pending_r() << 1) | m_sacklatch->pending_r(); } diff --git a/src/mame/atari/mhavoc.cpp b/src/mame/atari/mhavoc.cpp index b1764b07f93..fa6edde0787 100644 --- a/src/mame/atari/mhavoc.cpp +++ b/src/mame/atari/mhavoc.cpp @@ -277,7 +277,7 @@ public: void mhavoc(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(coin_service_r); + ioport_value coin_service_r(); int gamma_rcvd_r(); int gamma_xmtd_r(); int alpha_rcvd_r(); @@ -557,7 +557,7 @@ void alphaone_state::rom_banksel_w(uint8_t data) * *************************************/ -CUSTOM_INPUT_MEMBER(mhavoc_state::coin_service_r) +ioport_value mhavoc_state::coin_service_r() { return (m_player_1 ? m_service : m_coin)->read() & 0x03; } diff --git a/src/mame/atari/quizshow.cpp b/src/mame/atari/quizshow.cpp index c17b385c2c8..8b2f2200b34 100644 --- a/src/mame/atari/quizshow.cpp +++ b/src/mame/atari/quizshow.cpp @@ -58,7 +58,7 @@ public: m_lamps(*this, "lamp%u", 0U) { } - DECLARE_CUSTOM_INPUT_MEMBER(tape_headpos_r); + ioport_value tape_headpos_r(); DECLARE_INPUT_CHANGED_MEMBER(category_select); void init_quizshow(); void quizshow(machine_config &config); @@ -271,7 +271,7 @@ void quizshow_state::mem_map(address_map &map) ***************************************************************************/ -CUSTOM_INPUT_MEMBER(quizshow_state::tape_headpos_r) +ioport_value quizshow_state::tape_headpos_r() { return 1 << m_tape_head_pos; } diff --git a/src/mame/atari/starshp1.cpp b/src/mame/atari/starshp1.cpp index 0f676d253f6..1ec2c49b17a 100644 --- a/src/mame/atari/starshp1.cpp +++ b/src/mame/atari/starshp1.cpp @@ -71,8 +71,8 @@ public: void starshp1(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(analog_r); - DECLARE_CUSTOM_INPUT_MEMBER(collision_latch_r); + ioport_value analog_r(); + ioport_value collision_latch_r(); protected: virtual void machine_start() override; @@ -562,7 +562,7 @@ void starshp1_state::collision_reset_w(uint8_t data) } -CUSTOM_INPUT_MEMBER(starshp1_state::analog_r) +ioport_value starshp1_state::analog_r() { int val = 0; @@ -586,7 +586,7 @@ CUSTOM_INPUT_MEMBER(starshp1_state::analog_r) } -CUSTOM_INPUT_MEMBER(starshp1_state::collision_latch_r) +ioport_value starshp1_state::collision_latch_r() { return m_collision_latch & 0x0f; } diff --git a/src/mame/atari/tempest.cpp b/src/mame/atari/tempest.cpp index 226d9a5f6ae..94b7ea49cec 100644 --- a/src/mame/atari/tempest.cpp +++ b/src/mame/atari/tempest.cpp @@ -322,8 +322,8 @@ public: void tempest(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(tempest_knob_r); - DECLARE_CUSTOM_INPUT_MEMBER(tempest_buttons_r); + ioport_value tempest_knob_r(); + ioport_value tempest_buttons_r(); int clock_r(); protected: @@ -385,12 +385,12 @@ void tempest_state::wdclr_w(uint8_t data) * *************************************/ -CUSTOM_INPUT_MEMBER(tempest_state::tempest_knob_r) +ioport_value tempest_state::tempest_knob_r() { return (m_player_select == 0) ? m_knob_p1->read() : m_knob_p2->read(); } -CUSTOM_INPUT_MEMBER(tempest_state::tempest_buttons_r) +ioport_value tempest_state::tempest_buttons_r() { return (m_player_select == 0) ? m_buttons_p1->read() : m_buttons_p2->read(); } diff --git a/src/mame/capcom/kenseim.cpp b/src/mame/capcom/kenseim.cpp index fdfa8d119b2..e0f3ec336ff 100644 --- a/src/mame/capcom/kenseim.cpp +++ b/src/mame/capcom/kenseim.cpp @@ -178,8 +178,8 @@ public: void init_kenseim(); - DECLARE_CUSTOM_INPUT_MEMBER(cmd_1234_r); - DECLARE_CUSTOM_INPUT_MEMBER(cmd_5678_r); + ioport_value cmd_1234_r(); + ioport_value cmd_5678_r(); int cmd_9_r(); int cmd_req_r(); int cmd_LVm_r(); @@ -374,12 +374,12 @@ void kenseim_state::cpu_portc_w(uint8_t data) /* 68k side COMMS reads */ -CUSTOM_INPUT_MEMBER(kenseim_state::cmd_1234_r) +ioport_value kenseim_state::cmd_1234_r() { return (m_to_68k_cmd_low & 0x0f) >> 0; } -CUSTOM_INPUT_MEMBER(kenseim_state::cmd_5678_r) +ioport_value kenseim_state::cmd_5678_r() { return (m_to_68k_cmd_low & 0xf0) >> 4; } diff --git a/src/mame/casio/ctk2000.cpp b/src/mame/casio/ctk2000.cpp index 5dbbba1479b..a5bf0673459 100644 --- a/src/mame/casio/ctk2000.cpp +++ b/src/mame/casio/ctk2000.cpp @@ -48,7 +48,7 @@ public: void ctk2000(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(lcd_r) { return m_lcdc->db_r() >> 4; } + ioport_value lcd_r() { return m_lcdc->db_r() >> 4; } void lcd_w(int state) { m_lcdc->db_w(state << 4); } void apo_w(int state); diff --git a/src/mame/casio/ctk551.cpp b/src/mame/casio/ctk551.cpp index ba830d5003e..fabde372a96 100644 --- a/src/mame/casio/ctk551.cpp +++ b/src/mame/casio/ctk551.cpp @@ -230,7 +230,7 @@ public: void pwm_row_w(int state) { m_pwm->write_my(state); } void pwm_col_w(int state) { m_pwm->write_mx(state ^ 0xff); } - DECLARE_CUSTOM_INPUT_MEMBER(lcd_r) { return m_lcdc->db_r() >> 4; } + ioport_value lcd_r() { return m_lcdc->db_r() >> 4; } void lcd_w(int state) { m_lcd_data = state << 4; @@ -241,7 +241,7 @@ public: // (and even those don't always have them wired the same way - // in some cases they're not even all connected to the same port) template - DECLARE_CUSTOM_INPUT_MEMBER(lcd_bit_r) { return BIT(m_lcdc->db_r(), Bit); } + ioport_value lcd_bit_r() { return BIT(m_lcdc->db_r(), Bit); } template void lcd_bit_w(int state) { @@ -252,13 +252,13 @@ public: // handle the 4-position mode switch // some models treat this as 3 modes plus power off, // while others have 4 modes and move power to a separate button instead - DECLARE_CUSTOM_INPUT_MEMBER(switch_r) { return m_switch; } + ioport_value switch_r() { return m_switch; } DECLARE_INPUT_CHANGED_MEMBER(switch_w); DECLARE_INPUT_CHANGED_MEMBER(power_w); DECLARE_INPUT_CHANGED_MEMBER(switch_power_w); void inputs_w(int state) { m_input_sel = state; } - DECLARE_CUSTOM_INPUT_MEMBER(inputs_r); + ioport_value inputs_r(); void dsp_data_w(uint8_t data); void dsp_cmd_w(uint8_t cmd); @@ -331,7 +331,7 @@ INPUT_CHANGED_MEMBER(ctk551_state::switch_power_w) } } -CUSTOM_INPUT_MEMBER(ctk551_state::inputs_r) +ioport_value ctk551_state::inputs_r() { uint8_t result = 0xff; for (unsigned i = 0U; i < m_inputs.size(); i++) diff --git a/src/mame/casio/cz230s.cpp b/src/mame/casio/cz230s.cpp index 0a695e6495e..40859e4e5ef 100644 --- a/src/mame/casio/cz230s.cpp +++ b/src/mame/casio/cz230s.cpp @@ -69,17 +69,17 @@ public: void keys_w(int state) { m_key_sel = state; } void keys_mux_w(int state) { m_key_mux = state; } - template DECLARE_CUSTOM_INPUT_MEMBER(keys_row_r); + template ioport_value keys_row_r(); template u8 keys_analog_r(); DECLARE_INPUT_CHANGED_MEMBER(rhythm_w); - template DECLARE_CUSTOM_INPUT_MEMBER(rhythm_r) { return m_rhythm >> Bit; } + template ioport_value rhythm_r() { return m_rhythm >> Bit; } DECLARE_INPUT_CHANGED_MEMBER(mode_w); - DECLARE_CUSTOM_INPUT_MEMBER(mode_r) { return m_mode; } + ioport_value mode_r() { return m_mode; } void cassette_w(int state); void cassette_motor_w(int state); - DECLARE_CUSTOM_INPUT_MEMBER(cassette_r); + ioport_value cassette_r(); protected: virtual void machine_start() override; @@ -491,7 +491,7 @@ u8 cz230s_state::keys_r() /**************************************************************************/ template -CUSTOM_INPUT_MEMBER(cz230s_state::keys_row_r) +ioport_value cz230s_state::keys_row_r() { u8 data = 0xff; @@ -536,7 +536,7 @@ void cz230s_state::cassette_motor_w(int state) } /**************************************************************************/ -CUSTOM_INPUT_MEMBER(cz230s_state::cassette_r) +ioport_value cz230s_state::cassette_r() { return m_cassette->input() > 0 ? 0 : 1; } diff --git a/src/mame/casio/ld50.cpp b/src/mame/casio/ld50.cpp index f68bd04523b..424e8afc5a8 100644 --- a/src/mame/casio/ld50.cpp +++ b/src/mame/casio/ld50.cpp @@ -74,7 +74,7 @@ public: void ld50(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(dial_r); + ioport_value dial_r(); private: u8 port0_r(); @@ -239,7 +239,7 @@ void ld50_state::port3_w(u8 data) } } -CUSTOM_INPUT_MEMBER(ld50_state::dial_r) +ioport_value ld50_state::dial_r() { // return the dial position as a 2-bit gray code const u8 val = m_dial->read(); diff --git a/src/mame/casio/pickytlk.cpp b/src/mame/casio/pickytlk.cpp index 31257d70a5f..1078856ff9a 100644 --- a/src/mame/casio/pickytlk.cpp +++ b/src/mame/casio/pickytlk.cpp @@ -65,7 +65,7 @@ public: void pickytlk(machine_config &config); DECLARE_CROSSHAIR_MAPPER_MEMBER(pen_y_mapper); - DECLARE_CUSTOM_INPUT_MEMBER(pen_y_rescale_r); + ioport_value pen_y_rescale_r(); ioport_value pen_target_r(); private: @@ -155,7 +155,7 @@ CROSSHAIR_MAPPER_MEMBER(pickytlk_state::pen_y_mapper) return (float) pen_y_rescale_r() / 0xff; } -CUSTOM_INPUT_MEMBER(pickytlk_state::pen_y_rescale_r) +ioport_value pickytlk_state::pen_y_rescale_r() { /* There are two distinct areas that can be interacted with the pen: diff --git a/src/mame/casio/sk1.cpp b/src/mame/casio/sk1.cpp index 50a9c93d9c4..bf21e496dc8 100644 --- a/src/mame/casio/sk1.cpp +++ b/src/mame/casio/sk1.cpp @@ -45,8 +45,8 @@ public: template DECLARE_INPUT_CHANGED_MEMBER(sw_function); template DECLARE_INPUT_CHANGED_MEMBER(sw_mode); - DECLARE_CUSTOM_INPUT_MEMBER(function_in) { return m_sw_function; } - DECLARE_CUSTOM_INPUT_MEMBER(mode_in) { return m_sw_mode; } + ioport_value function_in() { return m_sw_function; } + ioport_value mode_in() { return m_sw_mode; } private: void sk1_memory(address_map &map); diff --git a/src/mame/dataeast/astrof.cpp b/src/mame/dataeast/astrof.cpp index b627cfb8e9e..f30bac1997c 100644 --- a/src/mame/dataeast/astrof.cpp +++ b/src/mame/dataeast/astrof.cpp @@ -124,13 +124,13 @@ INPUT_CHANGED_MEMBER(astrof_state::service_coin_inserted) } -CUSTOM_INPUT_MEMBER(astrof_state::astrof_p1_controls_r) +ioport_value astrof_state::astrof_p1_controls_r() { return ioport("P1")->read(); } -CUSTOM_INPUT_MEMBER(astrof_state::astrof_p2_controls_r) +ioport_value astrof_state::astrof_p2_controls_r() { uint32_t ret; @@ -146,7 +146,7 @@ CUSTOM_INPUT_MEMBER(astrof_state::astrof_p2_controls_r) } -CUSTOM_INPUT_MEMBER(astrof_state::tomahawk_controls_r) +ioport_value astrof_state::tomahawk_controls_r() { uint32_t ret; diff --git a/src/mame/dataeast/astrof.h b/src/mame/dataeast/astrof.h index 16ff6d6dc57..85d5021f092 100644 --- a/src/mame/dataeast/astrof.h +++ b/src/mame/dataeast/astrof.h @@ -40,9 +40,9 @@ public: void spfghmk2_audio(machine_config &config); void tomahawk_audio(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(astrof_p1_controls_r); - DECLARE_CUSTOM_INPUT_MEMBER(astrof_p2_controls_r); - DECLARE_CUSTOM_INPUT_MEMBER(tomahawk_controls_r); + ioport_value astrof_p1_controls_r(); + ioport_value astrof_p2_controls_r(); + ioport_value tomahawk_controls_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); DECLARE_INPUT_CHANGED_MEMBER(service_coin_inserted); diff --git a/src/mame/dataeast/tumbleb.cpp b/src/mame/dataeast/tumbleb.cpp index 33029a57e07..45a0780e3e1 100644 --- a/src/mame/dataeast/tumbleb.cpp +++ b/src/mame/dataeast/tumbleb.cpp @@ -1112,7 +1112,7 @@ static INPUT_PORTS_START( metlsavr ) PORT_DIPSETTING( 0x0000, "80 Seconds" ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(tumbleb_state::suprtrio_prot_latch_r) +ioport_value tumbleb_state::suprtrio_prot_latch_r() { return m_suprtrio_prot_latch; } diff --git a/src/mame/dataeast/tumbleb.h b/src/mame/dataeast/tumbleb.h index 8dd2c4b3b5c..daf6a91315e 100644 --- a/src/mame/dataeast/tumbleb.h +++ b/src/mame/dataeast/tumbleb.h @@ -70,7 +70,7 @@ public: void init_magipur(); void init_carket(); - DECLARE_CUSTOM_INPUT_MEMBER(suprtrio_prot_latch_r); + ioport_value suprtrio_prot_latch_r(); protected: /* memory pointers */ diff --git a/src/mame/dynax/ddenlovr.cpp b/src/mame/dynax/ddenlovr.cpp index f4acc3d2113..38658c65fc3 100644 --- a/src/mame/dynax/ddenlovr.cpp +++ b/src/mame/dynax/ddenlovr.cpp @@ -213,9 +213,9 @@ public: void init_rongrong(); int blitter_irq_r(); - DECLARE_CUSTOM_INPUT_MEMBER(ddenlovj_blitter_r); - DECLARE_CUSTOM_INPUT_MEMBER(nettoqc_special_r); - DECLARE_CUSTOM_INPUT_MEMBER(mjflove_blitter_r); + ioport_value ddenlovj_blitter_r(); + ioport_value nettoqc_special_r(); + ioport_value mjflove_blitter_r(); protected: auto blitter_irq() { return m_blitter_irq_handler.bind(); } @@ -2094,7 +2094,7 @@ void ddenlovr_state::ddenlovj_coincounter_w(uint8_t data) // data & 0x80 ? } -CUSTOM_INPUT_MEMBER(ddenlovr_state::ddenlovj_blitter_r) +ioport_value ddenlovr_state::ddenlovj_blitter_r() { return m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00; // bit 4 = 1 -> blitter busy } @@ -2226,7 +2226,7 @@ void ddenlovr_state::ddenlovr_map(address_map &map) } -CUSTOM_INPUT_MEMBER(ddenlovr_state::nettoqc_special_r) +ioport_value ddenlovr_state::nettoqc_special_r() { return m_ddenlovr_blitter_irq_flag ? 0x03 : 0x00; } @@ -3921,7 +3921,7 @@ uint8_t ddenlovr_state::mjflove_keyb_r(offs_t offset) return val; } -CUSTOM_INPUT_MEMBER(ddenlovr_state::mjflove_blitter_r) +ioport_value ddenlovr_state::mjflove_blitter_r() { // bit 7 = 1 -> blitter busy // bit 6 = 0 -> VBLANK? diff --git a/src/mame/edevices/fantland.cpp b/src/mame/edevices/fantland.cpp index e4e1715937c..0dcc90ddbe9 100644 --- a/src/mame/edevices/fantland.cpp +++ b/src/mame/edevices/fantland.cpp @@ -686,7 +686,7 @@ INPUT_PORTS_END ***************************************************************************/ template -CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r) +ioport_value fantland_state::wheelrun_wheel_r() { int delta = m_wheel[Player]->read(); delta = (delta & 0x7f) - (delta & 0x80) + 4; diff --git a/src/mame/edevices/fantland.h b/src/mame/edevices/fantland.h index f8dc7b17154..e5135e9435a 100644 --- a/src/mame/edevices/fantland.h +++ b/src/mame/edevices/fantland.h @@ -30,7 +30,7 @@ public: void wheelrun(machine_config &config); void galaxygn(machine_config &config); - template DECLARE_CUSTOM_INPUT_MEMBER(wheelrun_wheel_r); + template ioport_value wheelrun_wheel_r(); protected: /* misc */ diff --git a/src/mame/excellent/lastbank.cpp b/src/mame/excellent/lastbank.cpp index 0884a7c1eb0..0f0c77d297d 100644 --- a/src/mame/excellent/lastbank.cpp +++ b/src/mame/excellent/lastbank.cpp @@ -52,7 +52,7 @@ public: void lastbank(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r); + ioport_value sound_status_r(); protected: virtual void machine_start() override; @@ -161,7 +161,7 @@ void lastbank_state::sound_flags_w(uint8_t data) m_oki->reset(); } -CUSTOM_INPUT_MEMBER(lastbank_state::sound_status_r) +ioport_value lastbank_state::sound_status_r() { return BIT(m_sound_flags, 0) << 1 | BIT(m_sound_flags, 1); } diff --git a/src/mame/exidy/exidy.cpp b/src/mame/exidy/exidy.cpp index fc1fcc36fd0..5661ac7db51 100644 --- a/src/mame/exidy/exidy.cpp +++ b/src/mame/exidy/exidy.cpp @@ -209,7 +209,7 @@ public: void mtrap(machine_config &config); void pepper2(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(intsource_coins_r); + ioport_value intsource_coins_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_count_w); protected: @@ -289,8 +289,8 @@ public: void rallys(machine_config &config); void phantoma(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(spectar_coins_r); - DECLARE_CUSTOM_INPUT_MEMBER(rallys_coin1_r); + ioport_value spectar_coins_r(); + ioport_value rallys_coin1_r(); void init_sidetrac(); void init_spectar(); @@ -364,7 +364,7 @@ public: void teetert(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(teetert_input_r); + ioport_value teetert_input_r(); protected: virtual void machine_start() override; @@ -404,26 +404,26 @@ private: * *************************************/ -CUSTOM_INPUT_MEMBER(exidy_state::intsource_coins_r) +ioport_value exidy_state::intsource_coins_r() { uint8_t const dsw = m_dsw->read(); uint8_t const in0 = m_in0->read(); return (BIT(~in0, 7) << 1) | BIT(dsw, 0); } -CUSTOM_INPUT_MEMBER(spectar_state::spectar_coins_r) +ioport_value spectar_state::spectar_coins_r() { uint8_t const dsw = m_dsw->read(); uint8_t const in0 = m_in0->read(); return (BIT(~in0, 7) << 1) | BIT(~dsw, 0); } -CUSTOM_INPUT_MEMBER(spectar_state::rallys_coin1_r) +ioport_value spectar_state::rallys_coin1_r() { return BIT(m_in0->read(), 7); } -CUSTOM_INPUT_MEMBER(teetert_state::teetert_input_r) +ioport_value teetert_state::teetert_input_r() { uint8_t const dial = m_dial->read(); diff --git a/src/mame/exidy/exidy440.cpp b/src/mame/exidy/exidy440.cpp index b7079b8ff66..f1dae8d1210 100644 --- a/src/mame/exidy/exidy440.cpp +++ b/src/mame/exidy/exidy440.cpp @@ -280,7 +280,7 @@ int exidy440_state::firq_vblank_r() } -CUSTOM_INPUT_MEMBER(exidy440_state::hitnmiss_button1_r) +ioport_value exidy440_state::hitnmiss_button1_r() { /* button 1 shows up in two bits */ uint32_t button1 = ioport("HITNMISS_BUTTON1")->read(); diff --git a/src/mame/exidy/exidy440.h b/src/mame/exidy/exidy440.h index a2539969b5f..b22edbfa9b3 100644 --- a/src/mame/exidy/exidy440.h +++ b/src/mame/exidy/exidy440.h @@ -33,7 +33,7 @@ public: int firq_beam_r(); int firq_vblank_r(); - DECLARE_CUSTOM_INPUT_MEMBER(hitnmiss_button1_r); + ioport_value hitnmiss_button1_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); void init_showdown(); void init_yukon(); diff --git a/src/mame/galaxian/galaxian.cpp b/src/mame/galaxian/galaxian.cpp index dd6343d28c4..3c9defafcdc 100644 --- a/src/mame/galaxian/galaxian.cpp +++ b/src/mame/galaxian/galaxian.cpp @@ -1344,7 +1344,7 @@ INPUT_CHANGED_MEMBER(gmgalax_state::game_changed) template -CUSTOM_INPUT_MEMBER(gmgalax_state::port_r) +ioport_value gmgalax_state::port_r() { return (m_selected_game != 0 ? m_glin : m_gmin)[N]->read(); } @@ -6250,7 +6250,7 @@ INPUT_PORTS_END // Coinage Dips are spread across two input ports template -CUSTOM_INPUT_MEMBER(galaxian_state::ckongg_coinage_r) +ioport_value galaxian_state::ckongg_coinage_r() { switch (Mask) { @@ -6656,7 +6656,7 @@ static INPUT_PORTS_START( scobras ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(moonwar_state::dial_r) +ioport_value moonwar_state::dial_r() { // see http://www.cityofberwyn.com/schematics/stern/MoonWar_opto.tiff for schematic // i.e. a 74ls161 counts from 0 to 15 which is the absolute number of bars passed on the quadrature diff --git a/src/mame/galaxian/galaxian.h b/src/mame/galaxian/galaxian.h index e2dc7709661..ed1f81f67de 100644 --- a/src/mame/galaxian/galaxian.h +++ b/src/mame/galaxian/galaxian.h @@ -324,7 +324,7 @@ public: void bigkonggx(machine_config &config); void scrammr(machine_config &config); - template CUSTOM_INPUT_MEMBER(ckongg_coinage_r); + template ioport_value ckongg_coinage_r(); template int ckongs_coinage_r(); protected: @@ -494,7 +494,7 @@ public: void gmgalax(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(game_changed); - template DECLARE_CUSTOM_INPUT_MEMBER(port_r); + template ioport_value port_r(); void init_gmgalax(); @@ -862,7 +862,7 @@ public: { } - DECLARE_CUSTOM_INPUT_MEMBER(dial_r); + ioport_value dial_r(); void moonwar(machine_config &config); diff --git a/src/mame/galaxian/galaxold.cpp b/src/mame/galaxian/galaxold.cpp index ffc17ed5f67..4293e7424b4 100644 --- a/src/mame/galaxian/galaxold.cpp +++ b/src/mame/galaxian/galaxold.cpp @@ -1102,7 +1102,7 @@ INPUT_PORTS_END // Coinage Dips are spread across two input ports template -CUSTOM_INPUT_MEMBER(galaxold_state::dkongjrm_coinage_r) +ioport_value galaxold_state::dkongjrm_coinage_r() { switch (Mask) { diff --git a/src/mame/galaxian/galaxold.h b/src/mame/galaxian/galaxold.h index 6e97488138e..b0651589ba4 100644 --- a/src/mame/galaxian/galaxold.h +++ b/src/mame/galaxian/galaxold.h @@ -149,7 +149,7 @@ public: uint8_t rescueb_a002_r() { return 0xfc; } template int _4in1_fake_port_r(); template int vpool_lives_r(); - template DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r); + template ioport_value dkongjrm_coinage_r(); void init_bullsdrtg(); void init_ladybugg(); diff --git a/src/mame/galaxian/scramble.h b/src/mame/galaxian/scramble.h index 7bff8cdc56d..014f9de8baf 100644 --- a/src/mame/galaxian/scramble.h +++ b/src/mame/galaxian/scramble.h @@ -43,7 +43,7 @@ public: memory_bank_creator m_cavelon_bank_object; - DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_dial_r); + ioport_value darkplnt_dial_r(); uint8_t hncholms_prot_r(); uint8_t scramble_soundram_r(offs_t offset); uint8_t mars_ppi8255_0_r(offs_t offset); diff --git a/src/mame/galaxian/scramble_m.cpp b/src/mame/galaxian/scramble_m.cpp index da39a79e46b..9f1f847800a 100644 --- a/src/mame/galaxian/scramble_m.cpp +++ b/src/mame/galaxian/scramble_m.cpp @@ -33,7 +33,7 @@ MACHINE_RESET_MEMBER(scramble_state,explorer) } -CUSTOM_INPUT_MEMBER(scramble_state::darkplnt_dial_r) +ioport_value scramble_state::darkplnt_dial_r() { static const uint8_t remap[] = {0x03, 0x02, 0x00, 0x01, 0x21, 0x20, 0x22, 0x23, 0x33, 0x32, 0x30, 0x31, 0x11, 0x10, 0x12, 0x13, diff --git a/src/mame/gottlieb/gottlieb.cpp b/src/mame/gottlieb/gottlieb.cpp index 1c91d6f679d..52a7c7dd240 100644 --- a/src/mame/gottlieb/gottlieb.cpp +++ b/src/mame/gottlieb/gottlieb.cpp @@ -277,8 +277,8 @@ public: void init_qbert(); void init_qbertqub(); - template DECLARE_CUSTOM_INPUT_MEMBER(track_delta_r); - DECLARE_CUSTOM_INPUT_MEMBER(stooges_joystick_r); + template ioport_value track_delta_r(); + ioport_value stooges_joystick_r(); protected: virtual void machine_start() override; @@ -665,7 +665,7 @@ uint32_t gottlieb_state::screen_update(screen_device &screen, bitmap_rgb32 &bitm *************************************/ template -CUSTOM_INPUT_MEMBER(gottlieb_state::track_delta_r) +ioport_value gottlieb_state::track_delta_r() { return (N ? m_track_y : m_track_x)->read() - m_track[N]; } @@ -679,7 +679,7 @@ void gottlieb_state::analog_reset_w(u8 data) } -CUSTOM_INPUT_MEMBER(gottlieb_state::stooges_joystick_r) +ioport_value gottlieb_state::stooges_joystick_r() { static const char *const joyport[] = { "P2JOY", "P3JOY", "P1JOY", nullptr }; return (joyport[m_joystick_select & 3] != nullptr) ? ioport(joyport[m_joystick_select & 3])->read() : 0xff; diff --git a/src/mame/handheld/hh_cop400.cpp b/src/mame/handheld/hh_cop400.cpp index b1fe912787d..aa1a60e11af 100644 --- a/src/mame/handheld/hh_cop400.cpp +++ b/src/mame/handheld/hh_cop400.cpp @@ -1115,7 +1115,7 @@ public: void mbaskb2(machine_config &config); void msoccer2(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(switch_r); + ioport_value switch_r(); protected: virtual void machine_start() override; @@ -1188,7 +1188,7 @@ u8 mbaskb2_state::sub_read_in() // inputs -CUSTOM_INPUT_MEMBER(mbaskb2_state::switch_r) +ioport_value mbaskb2_state::switch_r() { // The power switch is off-1-2, and the game relies on power-on starting at 1, // otherwise msoccer2 boots up to what looks like a factory test mode. diff --git a/src/mame/handheld/hh_tms1k.cpp b/src/mame/handheld/hh_tms1k.cpp index ff426cd666c..ad957b8cd85 100644 --- a/src/mame/handheld/hh_tms1k.cpp +++ b/src/mame/handheld/hh_tms1k.cpp @@ -12388,8 +12388,8 @@ public: void wtalker(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(sensor_r) { return m_dial & 1; } - DECLARE_CUSTOM_INPUT_MEMBER(pulse_r) { return (m_pulse > machine().time()) ? 1 : 0; } + ioport_value sensor_r() { return m_dial & 1; } + ioport_value pulse_r() { return (m_pulse > machine().time()) ? 1 : 0; } protected: virtual void machine_start() override; diff --git a/src/mame/ice/lethalj.cpp b/src/mame/ice/lethalj.cpp index 92edfd4c0f9..20651e18e9f 100644 --- a/src/mame/ice/lethalj.cpp +++ b/src/mame/ice/lethalj.cpp @@ -199,7 +199,7 @@ Pin #11(+) | | R | * *************************************/ -CUSTOM_INPUT_MEMBER(lethalj_state::cclownz_paddle) +ioport_value lethalj_state::cclownz_paddle() { int value = m_paddle->read(); return ((value << 4) & 0xf00) | (value & 0x00f); diff --git a/src/mame/ice/lethalj.h b/src/mame/ice/lethalj.h index 6cae2b57b47..8c3999b024d 100644 --- a/src/mame/ice/lethalj.h +++ b/src/mame/ice/lethalj.h @@ -40,7 +40,7 @@ public: void init_ripribit(); void init_cclownz(); - DECLARE_CUSTOM_INPUT_MEMBER(cclownz_paddle); + ioport_value cclownz_paddle(); private: void ripribit_control_w(uint16_t data); diff --git a/src/mame/igs/igs_m027.cpp b/src/mame/igs/igs_m027.cpp index ec0781e0df1..d8e64d810e0 100644 --- a/src/mame/igs/igs_m027.cpp +++ b/src/mame/igs/igs_m027.cpp @@ -71,7 +71,7 @@ public: m_out_lamps(*this, "lamp%u", 1U) { } - DECLARE_CUSTOM_INPUT_MEMBER(kbd_ioport_r); + ioport_value kbd_ioport_r(); template void counter_w(int state); @@ -1483,7 +1483,7 @@ u32 igs_m027_state::lhdmg_gpio_r() } -CUSTOM_INPUT_MEMBER(igs_m027_state::kbd_ioport_r) +ioport_value igs_m027_state::kbd_ioport_r() { return kbd_r<0, 0, 0>(); } diff --git a/src/mame/igt/peplus.cpp b/src/mame/igt/peplus.cpp index 3fa0a3018c8..94dd46d68c5 100644 --- a/src/mame/igt/peplus.cpp +++ b/src/mame/igt/peplus.cpp @@ -266,7 +266,7 @@ public: void init_pepluss64(); void init_peplussbw(); - template DECLARE_CUSTOM_INPUT_MEMBER(input_r); + template ioport_value input_r(); protected: virtual void machine_start() override; @@ -1085,7 +1085,7 @@ void peplus_state::main_iomap(address_map &map) *************************/ template -CUSTOM_INPUT_MEMBER(peplus_state::input_r) +ioport_value peplus_state::input_r() { uint8_t inp_ret = 0x00; uint8_t inp_read = m_inp_bank[N]->read(); diff --git a/src/mame/itech/itech8.cpp b/src/mame/itech/itech8.cpp index 9522701bdaa..73c4b30e472 100644 --- a/src/mame/itech/itech8.cpp +++ b/src/mame/itech/itech8.cpp @@ -1166,7 +1166,7 @@ INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(itech8_state::gtg_mux) +ioport_value itech8_state::gtg_mux() { return m_p1->read() & m_p2->read(); } diff --git a/src/mame/itech/itech8.h b/src/mame/itech/itech8.h index 0801344fd3a..2d38fc34f50 100644 --- a/src/mame/itech/itech8.h +++ b/src/mame/itech/itech8.h @@ -57,7 +57,7 @@ public: void init_hstennis(); int special_r(); - DECLARE_CUSTOM_INPUT_MEMBER(gtg_mux); + ioport_value gtg_mux(); protected: static constexpr u32 VRAM_SIZE = 0x40000; diff --git a/src/mame/jaleco/bnstars.cpp b/src/mame/jaleco/bnstars.cpp index 8c0d68ac545..80bcb4e3fcb 100644 --- a/src/mame/jaleco/bnstars.cpp +++ b/src/mame/jaleco/bnstars.cpp @@ -128,7 +128,7 @@ public: void init_bnstars(); - template DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r); + template ioport_value mahjong_ctrl_r(); private: @@ -436,7 +436,7 @@ template void ms32_bnstars_state::palette_ram_w(offs_t offset, u16 da } template -CUSTOM_INPUT_MEMBER(ms32_bnstars_state::mahjong_ctrl_r) +ioport_value ms32_bnstars_state::mahjong_ctrl_r() { required_ioport_array<4> &keys = (P == 0) ? m_p1_keys : m_p2_keys; // different routing than other ms32.cpp mahjong games, using 0x2080 as mask diff --git a/src/mame/jaleco/cischeat.cpp b/src/mame/jaleco/cischeat.cpp index 49801edfd7b..b66199a62fb 100644 --- a/src/mame/jaleco/cischeat.cpp +++ b/src/mame/jaleco/cischeat.cpp @@ -835,7 +835,7 @@ void captflag_state::motor_move(int side, uint16_t data) } template -CUSTOM_INPUT_MEMBER(captflag_state::motor_pos_r) +ioport_value captflag_state::motor_pos_r() { const uint8_t pos[4] = {1,0,2,3}; // -> 2,3,1,0 offsets -> 0123 return ~pos[m_motor_pos[N]]; @@ -1668,19 +1668,19 @@ INPUT_PORTS_END Arm Champs II **************************************************************************/ -CUSTOM_INPUT_MEMBER(armchamp2_state::left_sensor_r) +ioport_value armchamp2_state::left_sensor_r() { int arm_x = ioport("ARM")->read(); return (arm_x < 0x40); } -CUSTOM_INPUT_MEMBER(armchamp2_state::right_sensor_r) +ioport_value armchamp2_state::right_sensor_r() { int arm_x = ioport("ARM")->read(); return (arm_x > 0xc0); } -CUSTOM_INPUT_MEMBER(armchamp2_state::center_sensor_r) +ioport_value armchamp2_state::center_sensor_r() { int arm_x = ioport("ARM")->read(); return ((arm_x > 0x60) && (arm_x < 0xa0)); diff --git a/src/mame/jaleco/cischeat.h b/src/mame/jaleco/cischeat.h index 98bdaf8788a..f1b07416560 100644 --- a/src/mame/jaleco/cischeat.h +++ b/src/mame/jaleco/cischeat.h @@ -183,9 +183,9 @@ public: void armchmp2(machine_config &config); void armchmp2_map(address_map &map); TIMER_DEVICE_CALLBACK_MEMBER(armchamp2_scanline); - DECLARE_CUSTOM_INPUT_MEMBER(left_sensor_r); - DECLARE_CUSTOM_INPUT_MEMBER(right_sensor_r); - DECLARE_CUSTOM_INPUT_MEMBER(center_sensor_r); + ioport_value left_sensor_r(); + ioport_value right_sensor_r(); + ioport_value center_sensor_r(); private: u16 m_arm_motor_command; @@ -232,7 +232,7 @@ public: void captflag(machine_config &config); template int motor_busy_r(); - template DECLARE_CUSTOM_INPUT_MEMBER(motor_pos_r); + template ioport_value motor_pos_r(); void init_captflag(); void init_vscaptfl(); diff --git a/src/mame/jaleco/ddayjlc.cpp b/src/mame/jaleco/ddayjlc.cpp index c83441ba516..54f6074ce4f 100644 --- a/src/mame/jaleco/ddayjlc.cpp +++ b/src/mame/jaleco/ddayjlc.cpp @@ -90,7 +90,7 @@ public: void ddayjlc(machine_config &config); void init_ddayjlc(); - DECLARE_CUSTOM_INPUT_MEMBER(prot_r); + ioport_value prot_r(); protected: virtual void machine_start() override; @@ -282,7 +282,7 @@ static const uint8_t prot_data[0x10] = 0x03, 0x01, 0x00, 0x03 }; -CUSTOM_INPUT_MEMBER(ddayjlc_state::prot_r) +ioport_value ddayjlc_state::prot_r() { return prot_data[m_prot_addr]; } diff --git a/src/mame/jaleco/exerion.cpp b/src/mame/jaleco/exerion.cpp index 6cda724cc7d..5eab6b80d4c 100644 --- a/src/mame/jaleco/exerion.cpp +++ b/src/mame/jaleco/exerion.cpp @@ -168,7 +168,7 @@ public: void init_exerionb(); void init_irion(); - DECLARE_CUSTOM_INPUT_MEMBER(controls_r); + ioport_value controls_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); protected: @@ -628,7 +628,7 @@ uint32_t exerion_state::screen_update(screen_device &screen, bitmap_ind16 &bitma *************************************/ // Players inputs are muxed at 0xa000 -CUSTOM_INPUT_MEMBER(exerion_state::controls_r) +ioport_value exerion_state::controls_r() { return m_inputs[m_cocktail_flip]->read() & 0x3f; } diff --git a/src/mame/jaleco/homerun.cpp b/src/mame/jaleco/homerun.cpp index ac031dce841..40bf5bf299a 100644 --- a/src/mame/jaleco/homerun.cpp +++ b/src/mame/jaleco/homerun.cpp @@ -147,7 +147,7 @@ public: int sprite0_r(); int homerun_d7756_busy_r(); - DECLARE_CUSTOM_INPUT_MEMBER(ganjaja_hopper_status_r); + ioport_value ganjaja_hopper_status_r(); protected: virtual void machine_start() override; @@ -409,7 +409,7 @@ int homerun_state::homerun_d7756_busy_r() return m_samples->playing(0) ? 0 : 1; } -CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r) +ioport_value homerun_state::ganjaja_hopper_status_r() { // gives hopper error if not 0 return 0; diff --git a/src/mame/jaleco/ms32.cpp b/src/mame/jaleco/ms32.cpp index 4968db6b2ae..5d057dcd66a 100644 --- a/src/mame/jaleco/ms32.cpp +++ b/src/mame/jaleco/ms32.cpp @@ -482,7 +482,7 @@ Notes from Charles MacDonald /********** READ INPUTS **********/ -CUSTOM_INPUT_MEMBER(ms32_state::mahjong_ctrl_r) +ioport_value ms32_state::mahjong_ctrl_r() { u32 mj_input; diff --git a/src/mame/jaleco/ms32.h b/src/mame/jaleco/ms32.h index 843a4cee619..d58bf35d7e5 100644 --- a/src/mame/jaleco/ms32.h +++ b/src/mame/jaleco/ms32.h @@ -93,7 +93,7 @@ public: void init_bnstars(); void init_ss92046_01(); - DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r); + ioport_value mahjong_ctrl_r(); protected: required_device m_sysctrl; diff --git a/src/mame/jaleco/tetrisp2.cpp b/src/mame/jaleco/tetrisp2.cpp index a95dd7c18de..cf80808357a 100644 --- a/src/mame/jaleco/tetrisp2.cpp +++ b/src/mame/jaleco/tetrisp2.cpp @@ -230,7 +230,7 @@ void rocknms_state::rocknms_main2sub_w(offs_t offset, u16 data, u16 mem_mask) m_rocknms_main2sub = (data ^ 0xffff); } -CUSTOM_INPUT_MEMBER(rocknms_state::rocknms_main2sub_status_r) +ioport_value rocknms_state::rocknms_main2sub_status_r() { return m_rocknms_sub2main & 0x0003; } diff --git a/src/mame/jaleco/tetrisp2.h b/src/mame/jaleco/tetrisp2.h index 2b58f47b4f1..da0c9f785db 100644 --- a/src/mame/jaleco/tetrisp2.h +++ b/src/mame/jaleco/tetrisp2.h @@ -162,7 +162,7 @@ public: void rocknms(machine_config &config); void init_rocknms(); - DECLARE_CUSTOM_INPUT_MEMBER(rocknms_main2sub_status_r); + ioport_value rocknms_main2sub_status_r(); private: required_device m_subcpu; diff --git a/src/mame/kaneko/suprnova.cpp b/src/mame/kaneko/suprnova.cpp index 59abba6a3ae..9a128f26500 100644 --- a/src/mame/kaneko/suprnova.cpp +++ b/src/mame/kaneko/suprnova.cpp @@ -497,7 +497,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(skns_state::irq) **********************************************************************************/ template -CUSTOM_INPUT_MEMBER(skns_state::paddle_r) +ioport_value skns_state::paddle_r() { return m_paddle[P]->read(); } diff --git a/src/mame/kaneko/suprnova.h b/src/mame/kaneko/suprnova.h index 7fc21a26c30..df8f4ecd67b 100644 --- a/src/mame/kaneko/suprnova.h +++ b/src/mame/kaneko/suprnova.h @@ -66,7 +66,7 @@ public: void init_galpani4(); void init_ryouran(); - template DECLARE_CUSTOM_INPUT_MEMBER(paddle_r); + template ioport_value paddle_r(); private: struct hit_t diff --git a/src/mame/konami/crimfght.cpp b/src/mame/konami/crimfght.cpp index 27f7c620d0c..c8bbe188a90 100644 --- a/src/mame/konami/crimfght.cpp +++ b/src/mame/konami/crimfght.cpp @@ -47,7 +47,7 @@ public: m_rombank(*this, "rombank") { } - DECLARE_CUSTOM_INPUT_MEMBER(system_r); + ioport_value system_r(); void crimfght(machine_config &config); private: @@ -414,7 +414,7 @@ void crimfght_state::banking_callback(uint8_t data) m_init = BIT(data, 7); } -CUSTOM_INPUT_MEMBER( crimfght_state::system_r ) +ioport_value crimfght_state::system_r() { uint8_t data = 0; diff --git a/src/mame/konami/konamigv.cpp b/src/mame/konami/konamigv.cpp index 0c45f806844..0f9c0609c7a 100644 --- a/src/mame/konami/konamigv.cpp +++ b/src/mame/konami/konamigv.cpp @@ -342,7 +342,7 @@ public: uint16_t tokimeki_serial_r(); void tokimeki_serial_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_CUSTOM_INPUT_MEMBER(tokimeki_device_check_r); + ioport_value tokimeki_device_check_r(); void tokimeki_device_check_w(int state); private: @@ -1122,7 +1122,7 @@ void tokimeki_state::tmoshsp_init() m_printer_is_manual_layout = true; } -CUSTOM_INPUT_MEMBER(tokimeki_state::tokimeki_device_check_r) +ioport_value tokimeki_state::tokimeki_device_check_r() { return BIT(m_device_val, 15); } diff --git a/src/mame/konami/konamigx.cpp b/src/mame/konami/konamigx.cpp index 9a3f903524e..16c73ef8839 100644 --- a/src/mame/konami/konamigx.cpp +++ b/src/mame/konami/konamigx.cpp @@ -450,7 +450,7 @@ void konamigx_state::esc_w(address_space &space, uint32_t data) /**********************************************************************************/ /* EEPROM handlers */ -CUSTOM_INPUT_MEMBER(konamigx_state::gx_rdport1_3_r) +ioport_value konamigx_state::gx_rdport1_3_r() { return (m_gx_rdport1_3 >> 1); } diff --git a/src/mame/konami/konamigx.h b/src/mame/konami/konamigx.h index c1482d11199..889f68066b2 100644 --- a/src/mame/konami/konamigx.h +++ b/src/mame/konami/konamigx.h @@ -85,7 +85,7 @@ public: void konamigx_t4_psacmap_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void vblank_irq_ack_w(int state); void hblank_irq_ack_w(int state); - DECLARE_CUSTOM_INPUT_MEMBER(gx_rdport1_3_r); + ioport_value gx_rdport1_3_r(); void init_konamigx(); TILE_GET_INFO_MEMBER(get_gx_psac_tile_info); TILE_GET_INFO_MEMBER(get_gx_psac3_tile_info); diff --git a/src/mame/konami/ksys573.cpp b/src/mame/konami/ksys573.cpp index 04835287a4c..6bc5191b8e1 100644 --- a/src/mame/konami/ksys573.cpp +++ b/src/mame/konami/ksys573.cpp @@ -767,7 +767,7 @@ public: void dsem(machine_config &config); void dsem2(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER( gn845pwbb_read ); + ioport_value gn845pwbb_read(); void init_ddr(); @@ -1425,7 +1425,7 @@ void ddr_state::gn845pwbb_clk_w( int offset, int data ) m_stage_state[ offset ].state, m_stage_state[ offset ].DO, m_stage_state[ offset ].shift, m_stage_state[ offset ].bit, m_stage_mask ); } -CUSTOM_INPUT_MEMBER( ddr_state::gn845pwbb_read ) +ioport_value ddr_state::gn845pwbb_read() { return m_stage->read() & m_stage_mask; } diff --git a/src/mame/konami/piratesh.cpp b/src/mame/konami/piratesh.cpp index 34c88249028..c9661e8e197 100644 --- a/src/mame/konami/piratesh.cpp +++ b/src/mame/konami/piratesh.cpp @@ -70,8 +70,8 @@ public: void piratesh(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(helm_r); - DECLARE_CUSTOM_INPUT_MEMBER(battery_r); + ioport_value helm_r(); + ioport_value battery_r(); protected: virtual void machine_start() override; @@ -443,7 +443,7 @@ void piratesh_state::k054539_nmi_gen(int state) m_sound_intck = state; } -CUSTOM_INPUT_MEMBER(piratesh_state::helm_r) +ioport_value piratesh_state::helm_r() { // Appears to be a quadrature encoder uint8_t xa, xb; @@ -455,7 +455,7 @@ CUSTOM_INPUT_MEMBER(piratesh_state::helm_r) return (xb << 1) | xa; } -CUSTOM_INPUT_MEMBER(piratesh_state::battery_r) +ioport_value piratesh_state::battery_r() { // .x MB3790 /ALARM1 // x. MB3790 /ALARM2 diff --git a/src/mame/konami/qdrmfgp.cpp b/src/mame/konami/qdrmfgp.cpp index 0acc8c9d4b1..300b3f3fb56 100644 --- a/src/mame/konami/qdrmfgp.cpp +++ b/src/mame/konami/qdrmfgp.cpp @@ -58,7 +58,7 @@ public: void qdrmfgp(machine_config &config); void qdrmfgp2(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(battery_sensor_r); + ioport_value battery_sensor_r(); protected: virtual void machine_reset() override; @@ -178,7 +178,7 @@ uint16_t qdrmfgp_state::inputs_r() return m_control & 0x0080 ? m_inputs_port->read() : m_dsw_port->read(); } -CUSTOM_INPUT_MEMBER(qdrmfgp_state::battery_sensor_r) +ioport_value qdrmfgp_state::battery_sensor_r() { /* bit 0-1 battery power sensor: 3=good, 2=low, other=bad */ return 0x0003; diff --git a/src/mame/midw8080/8080bw.cpp b/src/mame/midw8080/8080bw.cpp index a7133066eec..db6240ddbad 100644 --- a/src/mame/midw8080/8080bw.cpp +++ b/src/mame/midw8080/8080bw.cpp @@ -237,7 +237,7 @@ MACHINE_START_MEMBER(_8080bw_state,extra_8080bw) /* */ /*******************************************************/ -CUSTOM_INPUT_MEMBER(invaders_clone_state::sicv_in2_control_r) +ioport_value invaders_clone_state::sicv_in2_control_r() { return m_player_controls[is_cabinet_cocktail() ? 1 : 0]->read() | ioport("P2GATE")->read(); } @@ -404,12 +404,12 @@ INPUT_PORTS_END /* */ /*******************************************************/ -CUSTOM_INPUT_MEMBER(invaders_clone_state::invadpt2_in1_control_r) +ioport_value invaders_clone_state::invadpt2_in1_control_r() { return m_player_controls[0]->read() | (m_player_controls[1]->read() & ~m_cabinet_type->read()); } -CUSTOM_INPUT_MEMBER(invaders_clone_state::invadpt2_in2_control_r) +ioport_value invaders_clone_state::invadpt2_in2_control_r() { return m_player_controls[1]->read() | (m_player_controls[0]->read() & ~m_cabinet_type->read()); } @@ -1504,7 +1504,7 @@ INPUT_PORTS_END /* */ /*******************************************************/ -CUSTOM_INPUT_MEMBER(rollingc_state::game_select_r) +ioport_value rollingc_state::game_select_r() { // need the joystick left/right inputs to show in two places return bitswap<2>(m_player_controls[0]->read(), 1, 2); diff --git a/src/mame/midw8080/8080bw.h b/src/mame/midw8080/8080bw.h index 2a528f58a43..c6668170eeb 100644 --- a/src/mame/midw8080/8080bw.h +++ b/src/mame/midw8080/8080bw.h @@ -32,9 +32,9 @@ class invaders_clone_state : public invaders_state { public: - DECLARE_CUSTOM_INPUT_MEMBER(sicv_in2_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(invadpt2_in1_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(invadpt2_in2_control_r); + ioport_value sicv_in2_control_r(); + ioport_value invadpt2_in1_control_r(); + ioport_value invadpt2_in2_control_r(); protected: invaders_clone_state(const machine_config &mconfig, device_type type, const char *tag) : @@ -404,7 +404,7 @@ public: void rollingc(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(game_select_r); + ioport_value game_select_r(); protected: virtual void machine_start() override; diff --git a/src/mame/midw8080/mw8080bw.cpp b/src/mame/midw8080/mw8080bw.cpp index 74f68144431..9f089a2d1c8 100644 --- a/src/mame/midw8080/mw8080bw.cpp +++ b/src/mame/midw8080/mw8080bw.cpp @@ -414,7 +414,7 @@ void seawolf_state::periscope_lamp_w(u8 data) } -CUSTOM_INPUT_MEMBER(seawolf_state::erase_input_r) +ioport_value seawolf_state::erase_input_r() { return m_erase_sw->read() & m_erase_dip->read(); } @@ -654,13 +654,13 @@ uint8_t mw8080bw_state::tornbase_get_cabinet_type() } -CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_hit_left_input_r) +ioport_value mw8080bw_state::tornbase_hit_left_input_r() { return ioport(TORNBASE_L_HIT_PORT_TAG)->read(); } -CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_hit_right_input_r) +ioport_value mw8080bw_state::tornbase_hit_right_input_r() { uint32_t ret; @@ -681,7 +681,7 @@ CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_hit_right_input_r) } -CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_pitch_left_input_r) +ioport_value mw8080bw_state::tornbase_pitch_left_input_r() { uint32_t ret; @@ -702,13 +702,13 @@ CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_pitch_left_input_r) } -CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_pitch_right_input_r) +ioport_value mw8080bw_state::tornbase_pitch_right_input_r() { return ioport(TORNBASE_L_PITCH_PORT_TAG)->read(); } -CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_score_input_r) +ioport_value mw8080bw_state::tornbase_score_input_r() { return ioport(TORNBASE_SCORE_SW_PORT_TAG)->read() & ioport(TORNBASE_SCORE_DIP_PORT_TAG)->read(); @@ -1303,13 +1303,13 @@ void desertgu_state::machine_start() } -CUSTOM_INPUT_MEMBER(desertgu_state::gun_input_r) +ioport_value desertgu_state::gun_input_r() { return m_gun_port[m_controller_select]->read(); } -CUSTOM_INPUT_MEMBER(desertgu_state::dip_sw_0_1_r) +ioport_value desertgu_state::dip_sw_0_1_r() { return m_dip_sw_0_1[m_controller_select]->read(); } @@ -1413,7 +1413,7 @@ void desertgu_state::desertgu(machine_config &config) #define DPLAY_CAB_TYPE_COCKTAIL (1) -CUSTOM_INPUT_MEMBER(dplay_state::dplay_pitch_left_input_r) +ioport_value dplay_state::dplay_pitch_left_input_r() { uint32_t ret; @@ -1426,7 +1426,7 @@ CUSTOM_INPUT_MEMBER(dplay_state::dplay_pitch_left_input_r) } -CUSTOM_INPUT_MEMBER(dplay_state::dplay_pitch_right_input_r) +ioport_value dplay_state::dplay_pitch_right_input_r() { return m_l_pitch->read(); } @@ -1779,7 +1779,7 @@ void clowns_state::machine_start() } -CUSTOM_INPUT_MEMBER(clowns_state::controller_r) +ioport_value clowns_state::controller_r() { return m_controllers[m_controller_select]->read(); } @@ -2572,7 +2572,7 @@ void invaders_state::machine_start() -CUSTOM_INPUT_MEMBER(invaders_state::invaders_sw6_sw7_r) +ioport_value invaders_state::invaders_sw6_sw7_r() { // upright PCB : switches visible // cocktail PCB: HI @@ -2584,7 +2584,7 @@ CUSTOM_INPUT_MEMBER(invaders_state::invaders_sw6_sw7_r) } -CUSTOM_INPUT_MEMBER(invaders_state::invaders_sw5_r) +ioport_value invaders_state::invaders_sw5_r() { // upright PCB : switch visible // cocktail PCB: HI @@ -2596,7 +2596,7 @@ CUSTOM_INPUT_MEMBER(invaders_state::invaders_sw5_r) } -CUSTOM_INPUT_MEMBER(invaders_state::invaders_in0_control_r) +ioport_value invaders_state::invaders_in0_control_r() { // upright PCB : P1 controls // cocktail PCB: HI @@ -2608,13 +2608,13 @@ CUSTOM_INPUT_MEMBER(invaders_state::invaders_in0_control_r) } -CUSTOM_INPUT_MEMBER(invaders_state::invaders_in1_control_r) +ioport_value invaders_state::invaders_in1_control_r() { return m_player_controls[0]->read(); } -CUSTOM_INPUT_MEMBER(invaders_state::invaders_in2_control_r) +ioport_value invaders_state::invaders_in2_control_r() { // upright PCB : P1 controls // cocktail PCB: P2 controls @@ -2739,7 +2739,7 @@ void invaders_state::invaders(machine_config &config) #define BLUESHRK_COIN_INPUT_PORT_TAG ("COIN") -CUSTOM_INPUT_MEMBER(mw8080bw_state::blueshrk_coin_input_r) +ioport_value mw8080bw_state::blueshrk_coin_input_r() { uint32_t ret = ioport(BLUESHRK_COIN_INPUT_PORT_TAG)->read(); diff --git a/src/mame/midw8080/mw8080bw.h b/src/mame/midw8080/mw8080bw.h index 12f54526f16..0f87196d4e3 100644 --- a/src/mame/midw8080/mw8080bw.h +++ b/src/mame/midw8080/mw8080bw.h @@ -67,12 +67,12 @@ public: DECLARE_INPUT_CHANGED_MEMBER(direct_coin_count); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_left_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_hit_right_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_left_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_pitch_right_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(tornbase_score_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(blueshrk_coin_input_r); + ioport_value tornbase_hit_left_input_r(); + ioport_value tornbase_hit_right_input_r(); + ioport_value tornbase_pitch_left_input_r(); + ioport_value tornbase_pitch_right_input_r(); + ioport_value tornbase_score_input_r(); + ioport_value blueshrk_coin_input_r(); IRQ_CALLBACK_MEMBER(interrupt_vector); @@ -165,7 +165,7 @@ public: void seawolf(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(erase_input_r); + ioport_value erase_input_r(); protected: virtual void machine_start() override; @@ -250,8 +250,8 @@ public: void desertgu(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(gun_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(dip_sw_0_1_r); + ioport_value gun_input_r(); + ioport_value dip_sw_0_1_r(); protected: virtual void machine_start() override; @@ -282,8 +282,8 @@ public: void dplay(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_left_input_r); - DECLARE_CUSTOM_INPUT_MEMBER(dplay_pitch_right_input_r); + ioport_value dplay_pitch_left_input_r(); + ioport_value dplay_pitch_right_input_r(); private: void io_map(address_map &map); @@ -306,7 +306,7 @@ public: void clowns(machine_config &config); void spacwalk(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(controller_r); + ioport_value controller_r(); protected: virtual void machine_start() override; @@ -388,11 +388,11 @@ public: void invaders(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw6_sw7_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_sw5_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_in0_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_in1_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(invaders_in2_control_r); + ioport_value invaders_sw6_sw7_r(); + ioport_value invaders_sw5_r(); + ioport_value invaders_in0_control_r(); + ioport_value invaders_in1_control_r(); + ioport_value invaders_in2_control_r(); protected: void machine_start() override; diff --git a/src/mame/midway/astrocde.cpp b/src/mame/midway/astrocde.cpp index 7c8e1ed800d..f7aba5be292 100644 --- a/src/mame/midway/astrocde.cpp +++ b/src/mame/midway/astrocde.cpp @@ -249,7 +249,7 @@ void astrocde_state::sparkle_w(int state) * *************************************/ -CUSTOM_INPUT_MEMBER(ebases_state::trackball_r) +ioport_value ebases_state::trackball_r() { return (m_trackball[m_input_select]->read() - m_trackball_last) & 0xff; } @@ -301,7 +301,7 @@ void demndrgn_state::input_select_w(int state) m_input_select = state; } -CUSTOM_INPUT_MEMBER(demndrgn_state::trackball_r) +ioport_value demndrgn_state::trackball_r() { return (m_trackball[m_input_select]->read() - m_trackball_last) & 0xff; } diff --git a/src/mame/midway/astrocde.h b/src/mame/midway/astrocde.h index a312e8ce096..f7068cd049c 100644 --- a/src/mame/midway/astrocde.h +++ b/src/mame/midway/astrocde.h @@ -215,7 +215,7 @@ public: { } void ebases(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(trackball_r); + ioport_value trackball_r(); protected: virtual void machine_start() override; @@ -240,7 +240,7 @@ public: { } void demndrgn(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(trackball_r); + ioport_value trackball_r(); protected: virtual void machine_start() override; diff --git a/src/mame/midway/atlantis.cpp b/src/mame/midway/atlantis.cpp index 49af22b22cc..48f9ab84e12 100644 --- a/src/mame/midway/atlantis.cpp +++ b/src/mame/midway/atlantis.cpp @@ -188,7 +188,7 @@ private: void duart_irq_callback(int state); - DECLARE_CUSTOM_INPUT_MEMBER(port_mod_r); + ioport_value port_mod_r(); uint16_t port_ctrl_r(offs_t offset); void port_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint16_t m_port_data = 0; diff --git a/src/mame/midway/balsente.h b/src/mame/midway/balsente.h index 2f91137dd6f..c2e0ceff1c0 100644 --- a/src/mame/midway/balsente.h +++ b/src/mame/midway/balsente.h @@ -68,7 +68,7 @@ public: void st1002(machine_config &config); void spiker(machine_config &config); void triviamb(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(nstocker_bits_r); + ioport_value nstocker_bits_r(); void init_otwalls(); void init_triviaes(); void init_triviaes2(); diff --git a/src/mame/midway/balsente_m.cpp b/src/mame/midway/balsente_m.cpp index f4cbed317fe..ae3d2e9db87 100644 --- a/src/mame/midway/balsente_m.cpp +++ b/src/mame/midway/balsente_m.cpp @@ -360,7 +360,7 @@ void balsente_state::teamht_multiplex_select_w(offs_t offset, uint8_t data) * *************************************/ -CUSTOM_INPUT_MEMBER(balsente_state::nstocker_bits_r) +ioport_value balsente_state::nstocker_bits_r() { return m_nstocker_bits; } diff --git a/src/mame/midway/midvunit.cpp b/src/mame/midway/midvunit.cpp index 56f95dd161a..b07a327aa45 100644 --- a/src/mame/midway/midvunit.cpp +++ b/src/mame/midway/midvunit.cpp @@ -504,7 +504,7 @@ void midvunit_state::wheel_board_w(uint32_t data) } -DECLARE_CUSTOM_INPUT_MEMBER(crusnusa_state::motion_r) +ioport_value crusnusa_state::motion_r() { uint8_t const status = m_motion->read(); for (uint8_t bit = 0; bit < 8; bit++) diff --git a/src/mame/midway/midvunit.h b/src/mame/midway/midvunit.h index 843d1ff5de4..65f93ee5acd 100644 --- a/src/mame/midway/midvunit.h +++ b/src/mame/midway/midvunit.h @@ -203,7 +203,7 @@ public: void init_crusnu21(); void init_crusnusa(); - DECLARE_CUSTOM_INPUT_MEMBER(motion_r); + ioport_value motion_r(); protected: void init_crusnusa_common(offs_t speedup); diff --git a/src/mame/midway/midyunit.cpp b/src/mame/midway/midyunit.cpp index 1aec0219ca2..f42255aa298 100644 --- a/src/mame/midway/midyunit.cpp +++ b/src/mame/midway/midyunit.cpp @@ -162,7 +162,7 @@ int midzunit_state::narc_talkback_strobe_r() } -CUSTOM_INPUT_MEMBER(midzunit_state::narc_talkback_data_r) +ioport_value midzunit_state::narc_talkback_data_r() { return m_narc_sound->read() & 0xff; } diff --git a/src/mame/midway/midyunit.h b/src/mame/midway/midyunit.h index 43db0d5d5d2..f8a429c04a3 100644 --- a/src/mame/midway/midyunit.h +++ b/src/mame/midway/midyunit.h @@ -132,7 +132,7 @@ public: void init_narc(); int narc_talkback_strobe_r(); - DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_data_r); + ioport_value narc_talkback_data_r(); protected: virtual void machine_reset() override; diff --git a/src/mame/midway/midzeus.cpp b/src/mame/midway/midzeus.cpp index 8cc955d972d..9145de24fd1 100644 --- a/src/mame/midway/midzeus.cpp +++ b/src/mame/midway/midzeus.cpp @@ -140,7 +140,7 @@ public: void crusnexo(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(keypad_r); + ioport_value keypad_r(); protected: virtual void machine_start() override @@ -186,7 +186,7 @@ public: void thegrid(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(custom_49way_r); + ioport_value custom_49way_r(); private: uint32_t trackball_r(offs_t offset); @@ -668,7 +668,7 @@ void midzeus_state::tms32032_control_w(offs_t offset, uint32_t data, uint32_t me * *************************************/ -CUSTOM_INPUT_MEMBER(thegrid_state::custom_49way_r) +ioport_value thegrid_state::custom_49way_r() { static const uint8_t translate49[7] = { 0x8, 0xc, 0xe, 0xf, 0x3, 0x1, 0x0 }; return (translate49[m_io_49way_y->read() >> 4] << 4) | translate49[m_io_49way_x->read() >> 4]; @@ -682,7 +682,7 @@ void crusnexo_state::keypad_select_w(offs_t offset, uint32_t data) } -CUSTOM_INPUT_MEMBER(crusnexo_state::keypad_r) +ioport_value crusnexo_state::keypad_r() { uint32_t bits = m_io_keypad->read(); uint8_t select = m_keypad_select; diff --git a/src/mame/midway/mw18w.cpp b/src/mame/midway/mw18w.cpp index ca5b0454f20..228270f9f19 100644 --- a/src/mame/midway/mw18w.cpp +++ b/src/mame/midway/mw18w.cpp @@ -37,7 +37,7 @@ public: void mw18w(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(mw18w_sensors_r); + ioport_value mw18w_sensors_r(); private: void mw18w_sound0_w(uint8_t data); @@ -165,7 +165,7 @@ void mw18w_state::mw18w_irq0_clear_w(uint8_t data) m_maincpu->set_input_line(0, CLEAR_LINE); } -CUSTOM_INPUT_MEMBER(mw18w_state::mw18w_sensors_r) +ioport_value mw18w_state::mw18w_sensors_r() { // d7: off road // d6: in dock area diff --git a/src/mame/midway/seattle.cpp b/src/mame/midway/seattle.cpp index fb7f59dc871..b0f7121e862 100644 --- a/src/mame/midway/seattle.cpp +++ b/src/mame/midway/seattle.cpp @@ -330,9 +330,9 @@ public: void init_mace(); void init_blitz99(); - DECLARE_CUSTOM_INPUT_MEMBER(blitz_49way_r); - DECLARE_CUSTOM_INPUT_MEMBER(i40_r); - DECLARE_CUSTOM_INPUT_MEMBER(gearshift_r); + ioport_value blitz_49way_r(); + ioport_value i40_r(); + ioport_value gearshift_r(); protected: virtual void machine_start() override; @@ -770,7 +770,7 @@ const uint8_t seattle_state::translate49[7] = { 0x8, 0xc, 0xe, 0xf, 0x3, 0x1, 0x /************************************* * 2 player 49 Way Joystick on Blitz *************************************/ -CUSTOM_INPUT_MEMBER(seattle_state::blitz_49way_r) +ioport_value seattle_state::blitz_49way_r() { return (translate49[m_io_49way_y[1]->read() >> 4] << 12) | (translate49[m_io_49way_x[1]->read() >> 4] << 8) | (translate49[m_io_49way_y[0]->read() >> 4] << 4) | (translate49[m_io_49way_x[0]->read() >> 4] << 0); @@ -786,7 +786,7 @@ void seattle_state::i40_w(uint32_t data) m_i40_data = data; } -CUSTOM_INPUT_MEMBER(seattle_state::i40_r) +ioport_value seattle_state::i40_r() { if (m_io_dips->read() & 0x100) { // 8 way joysticks @@ -844,7 +844,7 @@ CUSTOM_INPUT_MEMBER(seattle_state::i40_r) * Gearshift (calspeed) * *************************************/ -DECLARE_CUSTOM_INPUT_MEMBER(seattle_state::gearshift_r) +ioport_value seattle_state::gearshift_r() { // Check for gear change and save gear selection uint32_t gear = m_io_gearshift->read(); diff --git a/src/mame/midway/vegas.cpp b/src/mame/midway/vegas.cpp index f452379f97f..9ce517e0fc3 100644 --- a/src/mame/midway/vegas.cpp +++ b/src/mame/midway/vegas.cpp @@ -380,11 +380,11 @@ public: void init_sf2049(); void init_sf2049se(); - DECLARE_CUSTOM_INPUT_MEMBER(i40_r); - DECLARE_CUSTOM_INPUT_MEMBER(gauntleg_p12_r); - DECLARE_CUSTOM_INPUT_MEMBER(gauntleg_p34_r); - DECLARE_CUSTOM_INPUT_MEMBER(keypad_r); - DECLARE_CUSTOM_INPUT_MEMBER(gearshift_r); + ioport_value i40_r(); + ioport_value gauntleg_p12_r(); + ioport_value gauntleg_p34_r(); + ioport_value keypad_r(); + ioport_value gearshift_r(); protected: virtual void machine_start() override; @@ -1062,7 +1062,7 @@ void vegas_state::i40_w(uint32_t data) m_i40_data = data; } -CUSTOM_INPUT_MEMBER(vegas_state::i40_r) +ioport_value vegas_state::i40_r() { if (m_io_dips->read() & 0x100) { // 8 way joysticks @@ -1117,7 +1117,7 @@ CUSTOM_INPUT_MEMBER(vegas_state::i40_r) /************************************* * Gauntlet Player 1 & 2 control read *************************************/ -CUSTOM_INPUT_MEMBER(vegas_state::gauntleg_p12_r) +ioport_value vegas_state::gauntleg_p12_r() { if (m_io_dips->read() & 0x2000) { // 8 way joysticks @@ -1133,7 +1133,7 @@ CUSTOM_INPUT_MEMBER(vegas_state::gauntleg_p12_r) /************************************* * Gauntlet Player 3 & 4 control read *************************************/ -CUSTOM_INPUT_MEMBER(vegas_state::gauntleg_p34_r) +ioport_value vegas_state::gauntleg_p34_r() { if (m_io_dips->read() & 0x2000) { // 8 way joysticks @@ -1182,7 +1182,7 @@ void vegas_state::wheel_board_w(uint32_t data) } } -CUSTOM_INPUT_MEMBER(vegas_state::keypad_r) +ioport_value vegas_state::keypad_r() { int row_sel; for (row_sel=0; row_sel<4; row_sel++) @@ -1204,7 +1204,7 @@ CUSTOM_INPUT_MEMBER(vegas_state::keypad_r) * Gearshift * *************************************/ -DECLARE_CUSTOM_INPUT_MEMBER(vegas_state::gearshift_r) +ioport_value vegas_state::gearshift_r() { // Check for gear change and save gear selection uint32_t gear = m_io_gearshift->read(); diff --git a/src/mame/midway/williams.cpp b/src/mame/midway/williams.cpp index 4af46e955db..f9dd551f10c 100644 --- a/src/mame/midway/williams.cpp +++ b/src/mame/midway/williams.cpp @@ -1385,7 +1385,7 @@ INPUT_PORTS_END template -CUSTOM_INPUT_MEMBER(tshoot_state::gun_r) +ioport_value tshoot_state::gun_r() { int data = m_gun[P]->read(); return (data & 0x3f) ^ ((data & 0x3f) >> 1); diff --git a/src/mame/midway/williams.h b/src/mame/midway/williams.h index fc6609eb0f3..80fdfda2d34 100644 --- a/src/mame/midway/williams.h +++ b/src/mame/midway/williams.h @@ -203,8 +203,8 @@ public: m_dial(*this, "DIAL") { } - DECLARE_CUSTOM_INPUT_MEMBER(dial0_r) { return m_dial->read() & 3; } - DECLARE_CUSTOM_INPUT_MEMBER(dial1_r) { return m_dial->read() >> 2 & 3; } + ioport_value dial0_r() { return m_dial->read() & 3; } + ioport_value dial1_r() { return m_dial->read() >> 2 & 3; } private: required_ioport m_dial; @@ -366,7 +366,7 @@ public: void tshoot(machine_config &config); - template DECLARE_CUSTOM_INPUT_MEMBER(gun_r); + template ioport_value gun_r(); private: virtual void machine_start() override; diff --git a/src/mame/midway/wmg.cpp b/src/mame/midway/wmg.cpp index 7fa02c999d3..43baeccf5f2 100644 --- a/src/mame/midway/wmg.cpp +++ b/src/mame/midway/wmg.cpp @@ -97,7 +97,7 @@ public: void wmg(machine_config &config); - template DECLARE_CUSTOM_INPUT_MEMBER(wmg_mux_r); + template ioport_value wmg_mux_r(); protected: virtual void machine_start() override; @@ -442,7 +442,7 @@ void wmg_state::wmg_port_select_w(int state) } template -CUSTOM_INPUT_MEMBER(wmg_state::wmg_mux_r) +ioport_value wmg_state::wmg_mux_r() { if (N == 0) { diff --git a/src/mame/misc/enigma2.cpp b/src/mame/misc/enigma2.cpp index 5e47aeacbe1..1b0368d3743 100644 --- a/src/mame/misc/enigma2.cpp +++ b/src/mame/misc/enigma2.cpp @@ -184,8 +184,8 @@ public: void init_enigma2(); - DECLARE_CUSTOM_INPUT_MEMBER(p1_controls_r); - DECLARE_CUSTOM_INPUT_MEMBER(p2_controls_r); + ioport_value p1_controls_r(); + ioport_value p2_controls_r(); protected: virtual void machine_start() override; @@ -535,13 +535,13 @@ void enigma2_state::enigma2_flip_screen_w(uint8_t data) } -CUSTOM_INPUT_MEMBER(enigma2_state::p1_controls_r) +ioport_value enigma2_state::p1_controls_r() { return ioport("P1CONTROLS")->read(); } -CUSTOM_INPUT_MEMBER(enigma2_state::p2_controls_r) +ioport_value enigma2_state::p2_controls_r() { if (m_flip_screen) return ioport("P2CONTROLS")->read(); diff --git a/src/mame/misc/epos.cpp b/src/mame/misc/epos.cpp index 0b621b2d336..6c64a5768a1 100644 --- a/src/mame/misc/epos.cpp +++ b/src/mame/misc/epos.cpp @@ -124,7 +124,7 @@ public: void tristar8000(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(coin_r) { return m_coin_latch; } + ioport_value coin_r() { return m_coin_latch; } DECLARE_INPUT_CHANGED_MEMBER(coin_switch) { if (newval) m_coin_latch |= param; } protected: diff --git a/src/mame/misc/imolagp.cpp b/src/mame/misc/imolagp.cpp index 435ca1cd633..19708059f1a 100644 --- a/src/mame/misc/imolagp.cpp +++ b/src/mame/misc/imolagp.cpp @@ -130,7 +130,7 @@ public: void imolagp(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(imolagp_steerlatch_r); + ioport_value imolagp_steerlatch_r(); protected: virtual void machine_start() override; @@ -416,7 +416,7 @@ void imolagp_state::imolagp_slave_io(address_map &map) ***************************************************************************/ -CUSTOM_INPUT_MEMBER(imolagp_state::imolagp_steerlatch_r) +ioport_value imolagp_state::imolagp_steerlatch_r() { return m_steerlatch & 0xf; } diff --git a/src/mame/misc/jaminator.cpp b/src/mame/misc/jaminator.cpp index 754af617fd8..6fae6d8eab6 100644 --- a/src/mame/misc/jaminator.cpp +++ b/src/mame/misc/jaminator.cpp @@ -64,12 +64,12 @@ public: void jaminator(machine_config &config); void input_sel_w(u8 data); - DECLARE_CUSTOM_INPUT_MEMBER(input_r); - DECLARE_CUSTOM_INPUT_MEMBER(bender_r); + ioport_value input_r(); + ioport_value bender_r(); // link cable not emulated yet, but output needs to be looped back too (used for starting songs, etc) void link_data_w(u8 data) { m_link_data = data; } - DECLARE_CUSTOM_INPUT_MEMBER(link_data_r) { return m_link_data; } + ioport_value link_data_r() { return m_link_data; } protected: virtual void machine_start() override; @@ -219,7 +219,7 @@ void jaminator_state::input_sel_w(u8 data) } //************************************************************************** -CUSTOM_INPUT_MEMBER(jaminator_state::input_r) +ioport_value jaminator_state::input_r() { if (m_input_sel < 0x7) return m_inputs[m_input_sel]->read(); @@ -228,7 +228,7 @@ CUSTOM_INPUT_MEMBER(jaminator_state::input_r) } //************************************************************************** -CUSTOM_INPUT_MEMBER(jaminator_state::bender_r) +ioport_value jaminator_state::bender_r() { // the bender PCB only has 15 contact positions (0-14), but the ROM recognizes 16 values static const u8 bendval[] = { diff --git a/src/mame/misc/katosmedz80.cpp b/src/mame/misc/katosmedz80.cpp index 1668a1a08ed..287a7d3af2c 100644 --- a/src/mame/misc/katosmedz80.cpp +++ b/src/mame/misc/katosmedz80.cpp @@ -272,7 +272,7 @@ public: m_pos(*this, "mpos%u", 0U) { } - DECLARE_CUSTOM_INPUT_MEMBER(arm_sensors_r); + ioport_value arm_sensors_r(); void dnbanban(machine_config &config) ATTR_COLD; protected: @@ -372,7 +372,7 @@ void katosmedz80_state::io_map(address_map &map) */ -CUSTOM_INPUT_MEMBER(katosmedz80_state::arm_sensors_r) +ioport_value katosmedz80_state::arm_sensors_r() { return m_sensors; } diff --git a/src/mame/misc/ssingles.cpp b/src/mame/misc/ssingles.cpp index 1526f4b93a6..c0a4f95eeb3 100644 --- a/src/mame/misc/ssingles.cpp +++ b/src/mame/misc/ssingles.cpp @@ -187,7 +187,7 @@ public: void ssingles(machine_config &config); void atamanot(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(controls_r); + ioport_value controls_r(); protected: virtual void video_start() override; @@ -329,7 +329,7 @@ void ssingles_state::c001_w(uint8_t data) m_prot_data ^= data ^ 0x11; } -CUSTOM_INPUT_MEMBER(ssingles_state::controls_r) +ioport_value ssingles_state::controls_r() { int data = 7; switch (m_extra->read()) //multiplexed diff --git a/src/mame/misc/vamphalf.cpp b/src/mame/misc/vamphalf.cpp index 7ffc026b54a..47a9fb4e432 100644 --- a/src/mame/misc/vamphalf.cpp +++ b/src/mame/misc/vamphalf.cpp @@ -138,7 +138,7 @@ public: void init_mrkicker(); void init_solitaire(); - DECLARE_CUSTOM_INPUT_MEMBER(boonggab_photo_sensors_r); + ioport_value boonggab_photo_sensors_r(); u16 eeprom_r(offs_t offset); u32 eeprom32_r(); @@ -918,7 +918,7 @@ u32 vamphalf_state::screen_update_aoh(screen_device &screen, bitmap_ind16 &bitma return 0; } -CUSTOM_INPUT_MEMBER(vamphalf_state::boonggab_photo_sensors_r) +ioport_value vamphalf_state::boonggab_photo_sensors_r() { static const u16 photo_sensors_table[8] = { 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 }; u8 res = m_photosensors->read(); diff --git a/src/mame/namco/namcoio_gearbox.cpp b/src/mame/namco/namcoio_gearbox.cpp index 5e8aefd6aa1..7362ba920ed 100644 --- a/src/mame/namco/namcoio_gearbox.cpp +++ b/src/mame/namco/namcoio_gearbox.cpp @@ -107,7 +107,7 @@ ioport_constructor namcoio_gearbox_device::device_input_ports() const //static const ioport_value gearbox_table[] = { 0x0f, 0x0a, 0x09, 0x0e, 0x0d, 0x06, 0x05 }; -CUSTOM_INPUT_MEMBER( namcoio_gearbox_device::in_r ) +ioport_value namcoio_gearbox_device::in_r() { if(ioport("CONFIG")->read() & 1) return ioport("GEARBOX")->read() & 0xf; diff --git a/src/mame/namco/namcoio_gearbox.h b/src/mame/namco/namcoio_gearbox.h index 86bd04cfb31..dc88ca88e63 100644 --- a/src/mame/namco/namcoio_gearbox.h +++ b/src/mame/namco/namcoio_gearbox.h @@ -24,7 +24,7 @@ public: namcoio_gearbox_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations - DECLARE_CUSTOM_INPUT_MEMBER( in_r ); + ioport_value in_r(); int clutch_r(); uint8_t m_gearbox_state = 0; virtual ioport_constructor device_input_ports() const override; diff --git a/src/mame/namco/wacky_gator.cpp b/src/mame/namco/wacky_gator.cpp index a7b5a7d8f37..88d4ee2498c 100644 --- a/src/mame/namco/wacky_gator.cpp +++ b/src/mame/namco/wacky_gator.cpp @@ -47,8 +47,8 @@ public: m_lamps(*this, "lamp%u", 0U) { } - DECLARE_CUSTOM_INPUT_MEMBER(alligators_rear_sensors_r); - DECLARE_CUSTOM_INPUT_MEMBER(alligators_front_sensors_r); + ioport_value alligators_rear_sensors_r(); + ioport_value alligators_front_sensors_r(); void wackygtr(machine_config &config); @@ -162,7 +162,7 @@ void wackygtr_state::pmm8713_ck(int i, int state) } } -CUSTOM_INPUT_MEMBER(wackygtr_state::alligators_rear_sensors_r) +ioport_value wackygtr_state::alligators_rear_sensors_r() { return ((m_motors_pos[0] < 10) ? 0x01 : 0) | ((m_motors_pos[1] < 10) ? 0x02 : 0) | @@ -172,7 +172,7 @@ CUSTOM_INPUT_MEMBER(wackygtr_state::alligators_rear_sensors_r) (m_alligators_ctrl ^ 0x1f); } -CUSTOM_INPUT_MEMBER(wackygtr_state::alligators_front_sensors_r) +ioport_value wackygtr_state::alligators_front_sensors_r() { return ((m_motors_pos[0] < 5 || m_motors_pos[0] > 55) ? 0x01 : 0) | ((m_motors_pos[1] < 5 || m_motors_pos[1] > 55) ? 0x02 : 0) | diff --git a/src/mame/nec/pc9801.cpp b/src/mame/nec/pc9801.cpp index ac6b0d98da4..c2a7e7661dd 100644 --- a/src/mame/nec/pc9801.cpp +++ b/src/mame/nec/pc9801.cpp @@ -1246,7 +1246,7 @@ void pc9801vm_state::upd7220_grcg_2_map(address_map &map) map(0x00000, 0x3ffff).rw(FUNC(pc9801vm_state::upd7220_grcg_r), FUNC(pc9801vm_state::upd7220_grcg_w)).share("video_ram_2"); } -CUSTOM_INPUT_MEMBER(pc98_base_state::system_type_r) +ioport_value pc98_base_state::system_type_r() { // System Type (0x00 stock PC-9801, 0xc0 PC-9801U / PC-98LT, PC-98HA, 0x80 others) return m_sys_type; diff --git a/src/mame/nec/pc9801.h b/src/mame/nec/pc9801.h index 30ef597bb41..0649027eef8 100644 --- a/src/mame/nec/pc9801.h +++ b/src/mame/nec/pc9801.h @@ -101,7 +101,7 @@ public: { } - DECLARE_CUSTOM_INPUT_MEMBER(system_type_r); + ioport_value system_type_r(); protected: required_device m_gfxdecode; diff --git a/src/mame/neogeo/neogeo.cpp b/src/mame/neogeo/neogeo.cpp index f58a635b724..87de6d74d89 100644 --- a/src/mame/neogeo/neogeo.cpp +++ b/src/mame/neogeo/neogeo.cpp @@ -915,7 +915,7 @@ uint16_t ngarcade_base_state::in1_edge_joy_r() return ((m_edge->in1_r() & m_ctrl2->read_ctrl()) << 8) | 0xff; } -CUSTOM_INPUT_MEMBER(ngarcade_base_state::startsel_edge_joy_r) +ioport_value ngarcade_base_state::startsel_edge_joy_r() { uint32_t ret = m_edge->read_start_sel() | ~0x05; if (m_ctrl1) @@ -1059,7 +1059,7 @@ void ngarcade_base_state::save_ram_w(offs_t offset, uint16_t data, uint16_t mem_ * *************************************/ -CUSTOM_INPUT_MEMBER(neogeo_base_state::get_memcard_status) +ioport_value neogeo_base_state::get_memcard_status() { // D0 and D1 are memcard 1 and 2 presence indicators, D2 indicates memcard // write protect status (we are always write enabled) @@ -1095,7 +1095,7 @@ void neogeo_base_state::memcard_w(offs_t offset, uint16_t data, uint16_t mem_mas * *************************************/ -CUSTOM_INPUT_MEMBER(neogeo_base_state::get_audio_result) +ioport_value neogeo_base_state::get_audio_result() { uint8_t ret = m_soundlatch2->read(); diff --git a/src/mame/neogeo/neogeo.h b/src/mame/neogeo/neogeo.h index 7b47e36c0fb..741f4e40781 100644 --- a/src/mame/neogeo/neogeo.h +++ b/src/mame/neogeo/neogeo.h @@ -43,8 +43,8 @@ class neogeo_base_state : public driver_device { public: - DECLARE_CUSTOM_INPUT_MEMBER(get_memcard_status); - DECLARE_CUSTOM_INPUT_MEMBER(get_audio_result); + ioport_value get_memcard_status(); + ioport_value get_audio_result(); protected: neogeo_base_state(const machine_config &mconfig, device_type type, const char *tag) @@ -222,7 +222,7 @@ private: class ngarcade_base_state : public neogeo_base_state { public: - DECLARE_CUSTOM_INPUT_MEMBER(startsel_edge_joy_r); + ioport_value startsel_edge_joy_r(); protected: ngarcade_base_state(const machine_config &mconfig, device_type type, const char *tag) diff --git a/src/mame/novag/vip.cpp b/src/mame/novag/vip.cpp index 9b21a8356d8..9869398ba9a 100644 --- a/src/mame/novag/vip.cpp +++ b/src/mame/novag/vip.cpp @@ -106,7 +106,7 @@ public: void svip(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(power_off) { if (newval) m_power = false; } - DECLARE_CUSTOM_INPUT_MEMBER(power_r) { return m_power ? 1 : 0; } + ioport_value power_r() { return m_power ? 1 : 0; } protected: virtual void machine_start() override; diff --git a/src/mame/olympia/lbeach.cpp b/src/mame/olympia/lbeach.cpp index 80c8194f001..1f2f1e9d166 100644 --- a/src/mame/olympia/lbeach.cpp +++ b/src/mame/olympia/lbeach.cpp @@ -66,8 +66,8 @@ public: m_palette(*this, "palette") { } - DECLARE_CUSTOM_INPUT_MEMBER(col_bg_r) { return m_collision_bg_car; } - DECLARE_CUSTOM_INPUT_MEMBER(col_fg_r) { return m_collision_fg_car; } + ioport_value col_bg_r() { return m_collision_bg_car; } + ioport_value col_fg_r() { return m_collision_fg_car; } void lbeach(machine_config &config); diff --git a/src/mame/omori/battlex.cpp b/src/mame/omori/battlex.cpp index 0feaff1879e..7d60e93553b 100644 --- a/src/mame/omori/battlex.cpp +++ b/src/mame/omori/battlex.cpp @@ -111,7 +111,7 @@ public: void battlex(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(in0_b4_r); + ioport_value in0_b4_r(); protected: virtual void machine_start() override; @@ -287,7 +287,7 @@ INTERRUPT_GEN_MEMBER(battlex_state::interrupt) device.execute().set_input_line(0, ASSERT_LINE); } -CUSTOM_INPUT_MEMBER(battlex_state::in0_b4_r) +ioport_value battlex_state::in0_b4_r() { uint32_t ret = m_in0_b4; if (m_in0_b4) diff --git a/src/mame/pacman/pacman.cpp b/src/mame/pacman/pacman.cpp index d2a42a79e84..c50b6904061 100644 --- a/src/mame/pacman/pacman.cpp +++ b/src/mame/pacman/pacman.cpp @@ -8651,7 +8651,7 @@ void pacman_state::init_pengomc1() romdata[i] = buf[i^0xff]; } -CUSTOM_INPUT_MEMBER(clubpacm_state::clubpacm_input_r) +ioport_value clubpacm_state::clubpacm_input_r() { ioport_value data = 0x0f; diff --git a/src/mame/pacman/pacman.h b/src/mame/pacman/pacman.h index 309933f57a4..efa200e4d10 100644 --- a/src/mame/pacman/pacman.h +++ b/src/mame/pacman/pacman.h @@ -287,7 +287,7 @@ public: void clubpacm(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(clubpacm_input_r); + ioport_value clubpacm_input_r(); void init_clubpacma(); diff --git a/src/mame/pc/calchase.cpp b/src/mame/pc/calchase.cpp index 1899866546b..561972f3869 100644 --- a/src/mame/pc/calchase.cpp +++ b/src/mame/pc/calchase.cpp @@ -146,7 +146,7 @@ public: isa16_calchase_jamma_if(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ioport_constructor device_input_ports() const override; - DECLARE_CUSTOM_INPUT_MEMBER( heartbeat_r ); + ioport_value heartbeat_r(); protected: virtual void device_start() override; @@ -247,7 +247,7 @@ TIMER_CALLBACK_MEMBER(isa16_calchase_jamma_if::heartbeat_cb) m_hb_state ^= 1; } -CUSTOM_INPUT_MEMBER(isa16_calchase_jamma_if::heartbeat_r) +ioport_value isa16_calchase_jamma_if::heartbeat_r() { return m_hb_state; } diff --git a/src/mame/phoenix/phoenix.h b/src/mame/phoenix/phoenix.h index 4d960d8324a..26e59f2b5bf 100644 --- a/src/mame/phoenix/phoenix.h +++ b/src/mame/phoenix/phoenix.h @@ -23,7 +23,7 @@ public: { } - DECLARE_CUSTOM_INPUT_MEMBER(player_input_r); + ioport_value player_input_r(); int pleiads_protection_r(); void condor(machine_config &config); diff --git a/src/mame/phoenix/phoenix_v.cpp b/src/mame/phoenix/phoenix_v.cpp index c0774699549..64b4bacd413 100644 --- a/src/mame/phoenix/phoenix_v.cpp +++ b/src/mame/phoenix/phoenix_v.cpp @@ -294,7 +294,7 @@ void phoenix_state::phoenix_scroll_w(uint8_t data) } -CUSTOM_INPUT_MEMBER(phoenix_state::player_input_r) +ioport_value phoenix_state::player_input_r() { if (m_cocktail_mode) return (ioport("CTRL")->read() & 0xf0) >> 4; diff --git a/src/mame/pinball/flicker.cpp b/src/mame/pinball/flicker.cpp index 9665416ffdf..2d6c547811d 100644 --- a/src/mame/pinball/flicker.cpp +++ b/src/mame/pinball/flicker.cpp @@ -61,7 +61,7 @@ public: { } - DECLARE_CUSTOM_INPUT_MEMBER(coins_in); + ioport_value coins_in(); DECLARE_INPUT_CHANGED_MEMBER(test_changed); @@ -379,7 +379,7 @@ void flicker_state::cm_ram2_w(int state) } -CUSTOM_INPUT_MEMBER(flicker_state::coins_in) +ioport_value flicker_state::coins_in() { u8 const coins(m_coinport->read()); return BIT(coins, 7) ? (coins & 0x3f) : 0; diff --git a/src/mame/pinball/icecold.cpp b/src/mame/pinball/icecold.cpp index 11cf16bf198..820ffe02250 100644 --- a/src/mame/pinball/icecold.cpp +++ b/src/mame/pinball/icecold.cpp @@ -51,7 +51,7 @@ public: void icecold(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER( test_switch_press ); - DECLARE_CUSTOM_INPUT_MEMBER( motors_limit_r ); + ioport_value motors_limit_r(); protected: virtual void machine_start() override; @@ -225,7 +225,7 @@ void icecold_state::machine_reset() m_ball_gate_sw = 1; } -CUSTOM_INPUT_MEMBER( icecold_state::motors_limit_r ) +ioport_value icecold_state::motors_limit_r() { uint8_t data = 0; diff --git a/src/mame/pinball/peyper.cpp b/src/mame/pinball/peyper.cpp index ecb18ac6d99..3170395ec56 100644 --- a/src/mame/pinball/peyper.cpp +++ b/src/mame/pinball/peyper.cpp @@ -63,7 +63,7 @@ public: , m_io_outputs(*this, "out%d", 0U) { } - template DECLARE_CUSTOM_INPUT_MEMBER(wolfman_replay_hs_r); + template ioport_value wolfman_replay_hs_r(); void init_0() { m_game = 0; } void init_1() { m_game = 1; } void init_2() { m_game = 2; } @@ -213,7 +213,7 @@ void peyper_state::sol_w(u8 data) template -CUSTOM_INPUT_MEMBER(peyper_state::wolfman_replay_hs_r) +ioport_value peyper_state::wolfman_replay_hs_r() { switch (Mask) { diff --git a/src/mame/promat/gstream.cpp b/src/mame/promat/gstream.cpp index e485c626022..ae72a8408ca 100644 --- a/src/mame/promat/gstream.cpp +++ b/src/mame/promat/gstream.cpp @@ -165,7 +165,7 @@ public: void init_x2222(); int mirror_service_r(); - DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_r); + ioport_value gstream_mirror_r(); int x2222_toggle_r(); private: @@ -232,7 +232,7 @@ int gstream_state::mirror_service_r() return ~result; } -CUSTOM_INPUT_MEMBER(gstream_state::gstream_mirror_r) +ioport_value gstream_state::gstream_mirror_r() { int result; diff --git a/src/mame/psikyo/psikyo4.cpp b/src/mame/psikyo/psikyo4.cpp index e14de096750..174f064463c 100644 --- a/src/mame/psikyo/psikyo4.cpp +++ b/src/mame/psikyo/psikyo4.cpp @@ -166,7 +166,7 @@ INTERRUPT_GEN_MEMBER(psikyo4_state::interrupt) } template -CUSTOM_INPUT_MEMBER(psikyo4_state::mahjong_ctrl_r)/* used by hotgmck/hgkairak */ +ioport_value psikyo4_state::mahjong_ctrl_r()/* used by hotgmck/hgkairak */ { int ret = 0xff; @@ -297,7 +297,7 @@ void psikyo4_state::ps4_ymf_map(address_map &map) } -CUSTOM_INPUT_MEMBER(psikyo4_state::system_r) +ioport_value psikyo4_state::system_r() { return m_system->read(); } diff --git a/src/mame/psikyo/psikyo4.h b/src/mame/psikyo/psikyo4.h index 227c3516827..ad146997661 100644 --- a/src/mame/psikyo/psikyo4.h +++ b/src/mame/psikyo/psikyo4.h @@ -36,8 +36,8 @@ public: void ps4big(machine_config &config); void ps4small(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(system_r); - template DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r); + ioport_value system_r(); + template ioport_value mahjong_ctrl_r(); private: /* memory pointers */ diff --git a/src/mame/rare/kinst.cpp b/src/mame/rare/kinst.cpp index 0453ec7ebe8..8238d0c89be 100644 --- a/src/mame/rare/kinst.cpp +++ b/src/mame/rare/kinst.cpp @@ -219,7 +219,7 @@ public: void kinst(machine_config &config); void kinst2(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(sound_status_r) { return BIT(m_dcs->control_r(), 11); } + ioport_value sound_status_r() { return BIT(m_dcs->control_r(), 11); } protected: required_device m_maincpu; diff --git a/src/mame/sanritsu/mjkjidai.cpp b/src/mame/sanritsu/mjkjidai.cpp index 04f8ca818da..0bd5bf551ac 100644 --- a/src/mame/sanritsu/mjkjidai.cpp +++ b/src/mame/sanritsu/mjkjidai.cpp @@ -67,7 +67,7 @@ public: void mjkjidai(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(keyboard_r); + ioport_value keyboard_r(); protected: virtual void machine_start() override; @@ -254,7 +254,7 @@ void mjkjidai_state::adpcm_int(int state) } } -CUSTOM_INPUT_MEMBER(mjkjidai_state::keyboard_r) +ioport_value mjkjidai_state::keyboard_r() { int res = 0x3f; diff --git a/src/mame/sega/model2.cpp b/src/mame/sega/model2.cpp index 13594b5a5df..d538ec8a599 100644 --- a/src/mame/sega/model2.cpp +++ b/src/mame/sega/model2.cpp @@ -1623,7 +1623,7 @@ u8 model2_state::in0_r() */ // Used by Sega Rally and Daytona USA, others might be different -CUSTOM_INPUT_MEMBER(model2_state::daytona_gearbox_r) +ioport_value model2_state::daytona_gearbox_r() { u8 res = m_gears.read_safe(0); int i; diff --git a/src/mame/sega/model2.h b/src/mame/sega/model2.h index 12f41dc4a1b..36ea35deb9a 100644 --- a/src/mame/sega/model2.h +++ b/src/mame/sega/model2.h @@ -83,7 +83,7 @@ public: std::unique_ptr m_poly; /* Public for access by the ioports */ - DECLARE_CUSTOM_INPUT_MEMBER(daytona_gearbox_r); + ioport_value daytona_gearbox_r(); /* Public for access by MCFG */ TIMER_DEVICE_CALLBACK_MEMBER(model2_interrupt); diff --git a/src/mame/sega/naomi.cpp b/src/mame/sega/naomi.cpp index 126ed0808e9..e5ffe041c25 100644 --- a/src/mame/sega/naomi.cpp +++ b/src/mame/sega/naomi.cpp @@ -1977,7 +1977,7 @@ INPUT_CHANGED_MEMBER(naomi_state::naomi_mp_w) m_mp_mux = newval; } -CUSTOM_INPUT_MEMBER(naomi_state::naomi_mp_r) +ioport_value naomi_state::naomi_mp_r() { uint8_t retval = 0; @@ -2047,7 +2047,7 @@ static INPUT_PORTS_START( naomi_mp ) PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_MAHJONG_D ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(naomi_state::suchie3_mp_r) +ioport_value naomi_state::suchie3_mp_r() { uint8_t retval = 0; @@ -2075,7 +2075,7 @@ static INPUT_PORTS_START( suchie3 ) PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(naomi_state, suchie3_mp_r) INPUT_PORTS_END -template CUSTOM_INPUT_MEMBER(naomi_state::naomi_kb_r) +template ioport_value naomi_state::naomi_kb_r() { for (int i = 0; i < 5; i++) { diff --git a/src/mame/sega/naomi.h b/src/mame/sega/naomi.h index e1aa4381f2e..4020c8564a8 100644 --- a/src/mame/sega/naomi.h +++ b/src/mame/sega/naomi.h @@ -58,9 +58,9 @@ public: void init_naomigd(); void init_naomigd_mp(); - DECLARE_CUSTOM_INPUT_MEMBER(naomi_mp_r); - DECLARE_CUSTOM_INPUT_MEMBER(suchie3_mp_r); - template DECLARE_CUSTOM_INPUT_MEMBER(naomi_kb_r); + ioport_value naomi_mp_r(); + ioport_value suchie3_mp_r(); + template ioport_value naomi_kb_r(); DECLARE_INPUT_CHANGED_MEMBER(naomi_mp_w); uint64_t naomi2_biose_idle_skip_r(); diff --git a/src/mame/sega/segajw.cpp b/src/mame/sega/segajw.cpp index 8f8036f20c8..6c0e488cc45 100644 --- a/src/mame/sega/segajw.cpp +++ b/src/mame/sega/segajw.cpp @@ -58,7 +58,7 @@ public: void segajw(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(coin_drop_start); - DECLARE_CUSTOM_INPUT_MEMBER(coin_sensors_r); + ioport_value coin_sensors_r(); int hopper_sensors_r(); protected: @@ -153,7 +153,7 @@ int segajw_state::hopper_sensors_r() return data; } -CUSTOM_INPUT_MEMBER( segajw_state::coin_sensors_r ) +ioport_value segajw_state::coin_sensors_r() { uint8_t data = 0; diff --git a/src/mame/sega/segaorun.cpp b/src/mame/sega/segaorun.cpp index fa92ce85778..7042efe518f 100644 --- a/src/mame/sega/segaorun.cpp +++ b/src/mame/sega/segaorun.cpp @@ -912,7 +912,7 @@ void segaorun_state::sound_portmap(address_map &map) // GENERIC PORT DEFINITIONS //************************************************************************** -CUSTOM_INPUT_MEMBER(segaorun_state::bankmotor_pos_r) +ioport_value segaorun_state::bankmotor_pos_r() { return m_bankmotor_pos >> 8 & 0xff; } diff --git a/src/mame/sega/segaorun.h b/src/mame/sega/segaorun.h index 7f27e19171a..7375fa4f404 100644 --- a/src/mame/sega/segaorun.h +++ b/src/mame/sega/segaorun.h @@ -76,7 +76,7 @@ public: void init_outrunb(); void init_shangon(); - CUSTOM_INPUT_MEMBER( bankmotor_pos_r ); + ioport_value bankmotor_pos_r(); protected: // PPI read/write handlers diff --git a/src/mame/sega/segas16a.cpp b/src/mame/sega/segas16a.cpp index 0e341097e11..fff253a5d9d 100644 --- a/src/mame/sega/segas16a.cpp +++ b/src/mame/sega/segas16a.cpp @@ -1187,7 +1187,7 @@ static INPUT_PORTS_START( afighter ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(afighter_16a_analog_state::afighter_accel_r) +ioport_value afighter_16a_analog_state::afighter_accel_r() { int accel = m_accel->read(); @@ -1202,7 +1202,7 @@ CUSTOM_INPUT_MEMBER(afighter_16a_analog_state::afighter_accel_r) return 0; } -CUSTOM_INPUT_MEMBER(afighter_16a_analog_state::afighter_handl_left_r) +ioport_value afighter_16a_analog_state::afighter_handl_left_r() { int steer = m_steer->read(); @@ -1220,7 +1220,7 @@ CUSTOM_INPUT_MEMBER(afighter_16a_analog_state::afighter_handl_left_r) return 0x00; } -CUSTOM_INPUT_MEMBER(afighter_16a_analog_state::afighter_handl_right_r) +ioport_value afighter_16a_analog_state::afighter_handl_right_r() { int steer = m_steer->read(); diff --git a/src/mame/sega/segas16a.h b/src/mame/sega/segas16a.h index 02c73ac651f..2fcd4580f57 100644 --- a/src/mame/sega/segas16a.h +++ b/src/mame/sega/segas16a.h @@ -198,9 +198,9 @@ public: , m_steer(*this, "STEER") { } - DECLARE_CUSTOM_INPUT_MEMBER(afighter_accel_r); - DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_left_r); - DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_right_r); + ioport_value afighter_accel_r(); + ioport_value afighter_handl_left_r(); + ioport_value afighter_handl_right_r(); private: required_ioport m_accel; diff --git a/src/mame/sega/segas16b.cpp b/src/mame/sega/segas16b.cpp index 42166fd3e45..e3c087e15a2 100644 --- a/src/mame/sega/segas16b.cpp +++ b/src/mame/sega/segas16b.cpp @@ -2172,7 +2172,7 @@ static INPUT_PORTS_START( afighter ) INPUT_PORTS_END /* this is identical to the s16a implementation, maybe should be moved to common class */ -CUSTOM_INPUT_MEMBER(afighter_16b_analog_state::afighter_accel_r) +ioport_value afighter_16b_analog_state::afighter_accel_r() { int accel = m_accel->read(); @@ -2187,7 +2187,7 @@ CUSTOM_INPUT_MEMBER(afighter_16b_analog_state::afighter_accel_r) return 0; } -CUSTOM_INPUT_MEMBER(afighter_16b_analog_state::afighter_handl_left_r) +ioport_value afighter_16b_analog_state::afighter_handl_left_r() { int steer = m_steer->read(); @@ -2205,7 +2205,7 @@ CUSTOM_INPUT_MEMBER(afighter_16b_analog_state::afighter_handl_left_r) return 0x00; } -CUSTOM_INPUT_MEMBER(afighter_16b_analog_state::afighter_handl_right_r) +ioport_value afighter_16b_analog_state::afighter_handl_right_r() { int steer = m_steer->read(); diff --git a/src/mame/sega/segas16b.h b/src/mame/sega/segas16b.h index 2ad3870ae92..998796ea8d5 100644 --- a/src/mame/sega/segas16b.h +++ b/src/mame/sega/segas16b.h @@ -324,9 +324,9 @@ public: , m_steer(*this, "STEER") { } - DECLARE_CUSTOM_INPUT_MEMBER(afighter_accel_r); - DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_left_r); - DECLARE_CUSTOM_INPUT_MEMBER(afighter_handl_right_r); + ioport_value afighter_accel_r(); + ioport_value afighter_handl_left_r(); + ioport_value afighter_handl_right_r(); private: required_ioport m_accel; diff --git a/src/mame/sega/sg1000.cpp b/src/mame/sega/sg1000.cpp index b26f32fbdb2..6698d052eef 100644 --- a/src/mame/sega/sg1000.cpp +++ b/src/mame/sega/sg1000.cpp @@ -394,7 +394,7 @@ INPUT_CHANGED_MEMBER( sg1000_state::trigger_nmi ) } /*------------------------------------------------- - CUSTOM_INPUT_MEMBER( ctrl2_r ) + ioport_value ctrl2_r() -------------------------------------------------*/ template diff --git a/src/mame/sega/shtzone.cpp b/src/mame/sega/shtzone.cpp index 6e9455c6334..32e022bae71 100644 --- a/src/mame/sega/shtzone.cpp +++ b/src/mame/sega/shtzone.cpp @@ -84,8 +84,8 @@ public: void shtzone(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(gun_tl_p1_r); - DECLARE_CUSTOM_INPUT_MEMBER(gun_tl_p2_r); + ioport_value gun_tl_p1_r(); + ioport_value gun_tl_p2_r(); protected: virtual void machine_start() override; @@ -194,12 +194,12 @@ void shtzone_state::prg_map(address_map &map) map(0xdc00, 0xdc00).portr("IN1"); } -CUSTOM_INPUT_MEMBER(shtzone_state::gun_tl_p1_r) +ioport_value shtzone_state::gun_tl_p1_r() { return BIT(m_port_ctrl1->in_r(), 4); } -CUSTOM_INPUT_MEMBER(shtzone_state::gun_tl_p2_r) +ioport_value shtzone_state::gun_tl_p2_r() { return BIT(m_port_ctrl2->in_r(), 4); } diff --git a/src/mame/sega/stactics.cpp b/src/mame/sega/stactics.cpp index 64e3d5912d9..81675e5a301 100644 --- a/src/mame/sega/stactics.cpp +++ b/src/mame/sega/stactics.cpp @@ -89,7 +89,7 @@ public: int shot_standby_r(); int not_shot_arrive_r(); int motor_not_ready_r(); - DECLARE_CUSTOM_INPUT_MEMBER(get_rng); + ioport_value get_rng(); protected: virtual void machine_start() override; @@ -645,7 +645,7 @@ void stactics_state::move_motor() * *************************************/ -CUSTOM_INPUT_MEMBER(stactics_state::get_rng) +ioport_value stactics_state::get_rng() { // this is a 555 timer, but cannot read one of the resistor values return machine().rand() & 0x07; diff --git a/src/mame/sega/system1.cpp b/src/mame/sega/system1.cpp index 471a29206cf..b7c1b6a8e3e 100644 --- a/src/mame/sega/system1.cpp +++ b/src/mame/sega/system1.cpp @@ -433,14 +433,14 @@ void system1_state::videomode_w(u8 data) * *************************************/ -CUSTOM_INPUT_MEMBER(system1_state::dakkochn_mux_data_r) +ioport_value system1_state::dakkochn_mux_data_r() { static const char *const ports[] = { "KEY0", "KEY1", "KEY2", "KEY3", "KEY4", "KEY5", "KEY6" }; return ioport(ports[m_dakkochn_mux_data])->read(); } -CUSTOM_INPUT_MEMBER(system1_state::dakkochn_mux_status_r) +ioport_value system1_state::dakkochn_mux_status_r() { /* reads from here indicate which mux port is selected */ return 1 << (m_dakkochn_mux_data); diff --git a/src/mame/sega/system1.h b/src/mame/sega/system1.h index cc21c621bae..140d390eee7 100644 --- a/src/mame/sega/system1.h +++ b/src/mame/sega/system1.h @@ -113,8 +113,8 @@ public: void init_bootsys2(); void init_bootsys2d(); - DECLARE_CUSTOM_INPUT_MEMBER(dakkochn_mux_data_r); - DECLARE_CUSTOM_INPUT_MEMBER(dakkochn_mux_status_r); + ioport_value dakkochn_mux_data_r(); + ioport_value dakkochn_mux_status_r(); protected: virtual void machine_start() override; diff --git a/src/mame/sega/turbo.cpp b/src/mame/sega/turbo.cpp index c8785aff6c2..e494598d38a 100644 --- a/src/mame/sega/turbo.cpp +++ b/src/mame/sega/turbo.cpp @@ -440,7 +440,7 @@ void turbo_base_state::digit_w(uint8_t data) * *************************************/ -CUSTOM_INPUT_MEMBER(turbo_base_state::pedal_r) +ioport_value turbo_base_state::pedal_r() { // inverted 2-bit Gray code from a pair of optos in mechanical pedal uint8_t pedal = m_pedal->read(); diff --git a/src/mame/sega/turbo.h b/src/mame/sega/turbo.h index b96c4109742..08e2adab253 100644 --- a/src/mame/sega/turbo.h +++ b/src/mame/sega/turbo.h @@ -44,7 +44,7 @@ public: , m_lamp(*this, "lamp") { } - DECLARE_CUSTOM_INPUT_MEMBER(pedal_r); + ioport_value pedal_r(); protected: virtual void machine_start() override; diff --git a/src/mame/sega/zaxxon.cpp b/src/mame/sega/zaxxon.cpp index b29c99fde68..be991e56e29 100644 --- a/src/mame/sega/zaxxon.cpp +++ b/src/mame/sega/zaxxon.cpp @@ -351,7 +351,7 @@ uint8_t zaxxon_state::razmataz_counter_r() template -CUSTOM_INPUT_MEMBER(zaxxon_state::razmataz_dial_r) +ioport_value zaxxon_state::razmataz_dial_r() { int res; diff --git a/src/mame/sega/zaxxon.h b/src/mame/sega/zaxxon.h index 3beff1af871..cb9f7f2e03c 100644 --- a/src/mame/sega/zaxxon.h +++ b/src/mame/sega/zaxxon.h @@ -48,7 +48,7 @@ public: void init_razmataz(); void init_zaxxonj(); - template DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r); + template ioport_value razmataz_dial_r(); template int zaxxon_coin_r(); DECLARE_INPUT_CHANGED_MEMBER(service_switch); DECLARE_INPUT_CHANGED_MEMBER(zaxxon_coin_inserted); diff --git a/src/mame/seibu/seibuspi.cpp b/src/mame/seibu/seibuspi.cpp index f2be8e221e3..8d9c540b5b8 100644 --- a/src/mame/seibu/seibuspi.cpp +++ b/src/mame/seibu/seibuspi.cpp @@ -1206,7 +1206,7 @@ void seibuspi_state::ymf_irqhandler(int state) } template -CUSTOM_INPUT_MEMBER(seibuspi_state::ejanhs_encode) +ioport_value seibuspi_state::ejanhs_encode() { /* E-Jan Highschool has a keyboard with the following keys The keys are encoded with 3 bits for each input port diff --git a/src/mame/seibu/seibuspi.h b/src/mame/seibu/seibuspi.h index 839b015c2ad..c25c8c697f8 100644 --- a/src/mame/seibu/seibuspi.h +++ b/src/mame/seibu/seibuspi.h @@ -56,7 +56,7 @@ public: void init_ejanhs(); void init_sys386f(); - template DECLARE_CUSTOM_INPUT_MEMBER(ejanhs_encode); + template ioport_value ejanhs_encode(); IRQ_CALLBACK_MEMBER(spi_irq_callback); INTERRUPT_GEN_MEMBER(spi_interrupt); diff --git a/src/mame/seta/downtown.cpp b/src/mame/seta/downtown.cpp index 80a5736db66..5b044b8d356 100644 --- a/src/mame/seta/downtown.cpp +++ b/src/mame/seta/downtown.cpp @@ -466,8 +466,8 @@ public: void usclssic(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(trackball_x_r); - DECLARE_CUSTOM_INPUT_MEMBER(trackball_y_r); + ioport_value trackball_x_r(); + ioport_value trackball_y_r(); protected: virtual void machine_start() override; @@ -858,12 +858,12 @@ u16 usclssic_state::dsw_r(offs_t offset) return 0; } -CUSTOM_INPUT_MEMBER(usclssic_state::trackball_x_r) +ioport_value usclssic_state::trackball_x_r() { return m_track_x[m_port_select ? 1 : 0]->read(); } -CUSTOM_INPUT_MEMBER(usclssic_state::trackball_y_r) +ioport_value usclssic_state::trackball_y_r() { return m_track_y[m_port_select ? 1 : 0]->read(); } diff --git a/src/mame/seta/seta.cpp b/src/mame/seta/seta.cpp index 2f721c52294..6673aff4c7f 100644 --- a/src/mame/seta/seta.cpp +++ b/src/mame/seta/seta.cpp @@ -1553,8 +1553,8 @@ public: void setaroul(machine_config &config); DECLARE_INPUT_CHANGED_MEMBER(coin_drop_start); - DECLARE_CUSTOM_INPUT_MEMBER(coin_sensors_r); - DECLARE_CUSTOM_INPUT_MEMBER(hopper_sensors_r); + ioport_value coin_sensors_r(); + ioport_value hopper_sensors_r(); void screen_vblank(int state); @@ -2807,7 +2807,7 @@ INPUT_CHANGED_MEMBER( setaroul_state::coin_drop_start ) m_coin_start_cycles = m_maincpu->total_cycles(); } -CUSTOM_INPUT_MEMBER( setaroul_state::coin_sensors_r ) +ioport_value setaroul_state::coin_sensors_r() { u8 data = 0x03; diff --git a/src/mame/snk/snk.cpp b/src/mame/snk/snk.cpp index 014d7b159a8..1f69a180a18 100644 --- a/src/mame/snk/snk.cpp +++ b/src/mame/snk/snk.cpp @@ -1110,7 +1110,7 @@ hand, always returning 0xf inbetween valid values confuses the game. *****************************************************************************/ template -CUSTOM_INPUT_MEMBER(snk_state::gwar_rotary) +ioport_value snk_state::gwar_rotary() { int value = m_rot_io[Which]->read(); @@ -1126,7 +1126,7 @@ CUSTOM_INPUT_MEMBER(snk_state::gwar_rotary) } template -CUSTOM_INPUT_MEMBER(snk_state::gwarb_rotary) +ioport_value snk_state::gwarb_rotary() { if (m_joymode_io->read() == 1) { @@ -1173,12 +1173,12 @@ void snk_state::countryc_trackball_w(uint8_t data) m_countryc_trackball = data & 1; } -CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_x) +ioport_value snk_state::countryc_trackball_x() { return m_trackball_x_io[m_countryc_trackball]->read(); } -CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_y) +ioport_value snk_state::countryc_trackball_y() { return m_trackball_y_io[m_countryc_trackball]->read(); } @@ -1187,7 +1187,7 @@ CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_y) /************************************************************************/ template -CUSTOM_INPUT_MEMBER(snk_state::snk_bonus_r) +ioport_value snk_state::snk_bonus_r() { switch (Mask) { diff --git a/src/mame/snk/snk.h b/src/mame/snk/snk.h index 1c8fa919870..5bd6558013f 100644 --- a/src/mame/snk/snk.h +++ b/src/mame/snk/snk.h @@ -64,11 +64,11 @@ public: void madcrush(machine_config &config); int sound_busy_r(); - template DECLARE_CUSTOM_INPUT_MEMBER(gwar_rotary); - template DECLARE_CUSTOM_INPUT_MEMBER(gwarb_rotary); - DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_x); - DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_y); - template DECLARE_CUSTOM_INPUT_MEMBER(snk_bonus_r); + template ioport_value gwar_rotary(); + template ioport_value gwarb_rotary(); + ioport_value countryc_trackball_x(); + ioport_value countryc_trackball_y(); + template ioport_value snk_bonus_r(); protected: virtual void machine_start() override; diff --git a/src/mame/snk/snk6502.cpp b/src/mame/snk/snk6502.cpp index e9fb4625dab..88b5c8d7ff6 100644 --- a/src/mame/snk/snk6502.cpp +++ b/src/mame/snk/snk6502.cpp @@ -322,7 +322,7 @@ void snk6502_state::sasuke_start_counter() * *************************************/ -CUSTOM_INPUT_MEMBER(snk6502_state::sasuke_count_r) +ioport_value snk6502_state::sasuke_count_r() { return (m_sasuke_counter >> 4); } diff --git a/src/mame/snk/snk6502.h b/src/mame/snk/snk6502.h index c826150057d..e4bd990a43a 100644 --- a/src/mame/snk/snk6502.h +++ b/src/mame/snk/snk6502.h @@ -36,7 +36,7 @@ public: void satansat(machine_config &config); void sasuke(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(sasuke_count_r); + ioport_value sasuke_count_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); DECLARE_VIDEO_START(pballoon); diff --git a/src/mame/taito/arkanoid.h b/src/mame/taito/arkanoid.h index 93c9c6e5036..4c800f49d7e 100644 --- a/src/mame/taito/arkanoid.h +++ b/src/mame/taito/arkanoid.h @@ -38,7 +38,7 @@ public: { } - DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_semaphore_input_r); + ioport_value arkanoid_semaphore_input_r(); void init_block2(); void init_arkblock(); void init_hexa(); diff --git a/src/mame/taito/arkanoid_m.cpp b/src/mame/taito/arkanoid_m.cpp index 234e3b87e51..c886fe22d9a 100644 --- a/src/mame/taito/arkanoid_m.cpp +++ b/src/mame/taito/arkanoid_m.cpp @@ -22,7 +22,7 @@ #include "logmacro.h" -CUSTOM_INPUT_MEMBER(arkanoid_state::arkanoid_semaphore_input_r) +ioport_value arkanoid_state::arkanoid_semaphore_input_r() { // bit 0 is host semaphore flag, bit 1 is MCU semaphore flag (both active low) return diff --git a/src/mame/taito/buggychl.cpp b/src/mame/taito/buggychl.cpp index 0741c167a36..d75011ffbe1 100644 --- a/src/mame/taito/buggychl.cpp +++ b/src/mame/taito/buggychl.cpp @@ -147,7 +147,7 @@ public: void buggychl(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(pedal_in_r); + ioport_value pedal_in_r(); protected: virtual void machine_start() override; @@ -651,7 +651,7 @@ Sound Master CPU (SMCPU) /******************************************************************************/ // accelerator is 4-bit, we need to convert it here so that it doesn't clash with other inputs in IN1 (known i/o framework fault) -CUSTOM_INPUT_MEMBER( buggychl_state::pedal_in_r ) +ioport_value buggychl_state::pedal_in_r() { return m_pedal_input->read() >> 4; } diff --git a/src/mame/taito/crbaloon.cpp b/src/mame/taito/crbaloon.cpp index 1a1c5593997..cac06302120 100644 --- a/src/mame/taito/crbaloon.cpp +++ b/src/mame/taito/crbaloon.cpp @@ -68,7 +68,7 @@ void crbaloon_state::pc3092_w(offs_t offset, uint8_t data) } -CUSTOM_INPUT_MEMBER(crbaloon_state::pc3092_r) +ioport_value crbaloon_state::pc3092_r() { uint32_t ret; diff --git a/src/mame/taito/crbaloon.h b/src/mame/taito/crbaloon.h index d674c04c1f1..5e55ac4b590 100644 --- a/src/mame/taito/crbaloon.h +++ b/src/mame/taito/crbaloon.h @@ -34,7 +34,7 @@ public: { } void crbaloon(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(pc3092_r); + ioport_value pc3092_r(); protected: virtual void machine_reset() override; diff --git a/src/mame/taito/cyclemb.cpp b/src/mame/taito/cyclemb.cpp index a1bf53d18c5..af03ba3440b 100644 --- a/src/mame/taito/cyclemb.cpp +++ b/src/mame/taito/cyclemb.cpp @@ -146,7 +146,7 @@ public: // void ym_irq(int state); void update_dial(int P); - template DECLARE_CUSTOM_INPUT_MEMBER(dial_r); + template ioport_value dial_r(); void init_skydest(); void init_cyclemb(); @@ -765,7 +765,7 @@ void cyclemb_state::update_dial(int P) } template -CUSTOM_INPUT_MEMBER(cyclemb_state::dial_r) +ioport_value cyclemb_state::dial_r() { return m_dial_status[P].current_value | (m_dial_status[P].reverse ? 0x80 : 0x00); } diff --git a/src/mame/taito/opwolf.cpp b/src/mame/taito/opwolf.cpp index 6633414a76f..1961087f312 100644 --- a/src/mame/taito/opwolf.cpp +++ b/src/mame/taito/opwolf.cpp @@ -328,8 +328,8 @@ public: void init_opwolfb(); void init_opwolfp(); - DECLARE_CUSTOM_INPUT_MEMBER(opwolf_gun_x_r); - DECLARE_CUSTOM_INPUT_MEMBER(opwolf_gun_y_r); + ioport_value opwolf_gun_x_r(); + ioport_value opwolf_gun_y_r(); protected: virtual void machine_start() override; @@ -628,14 +628,14 @@ void opwolf_state::counters_w(uint8_t data) machine().bookkeeping().coin_counter_w(0, ~data & 0x10); } -CUSTOM_INPUT_MEMBER(opwolf_state::opwolf_gun_x_r ) +ioport_value opwolf_state::opwolf_gun_x_r() { /* P1X - Have to remap 8 bit input value, into 0-319 visible range */ int scaled = (ioport(P1X_PORT_TAG)->read() * 320 ) / 256; return (scaled + 0x15 + m_opwolf_gun_xoffs); } -CUSTOM_INPUT_MEMBER(opwolf_state::opwolf_gun_y_r ) +ioport_value opwolf_state::opwolf_gun_y_r() { return (ioport(P1Y_PORT_TAG)->read() - 0x24 + m_opwolf_gun_yoffs); } diff --git a/src/mame/taito/superqix.cpp b/src/mame/taito/superqix.cpp index 9977d8f8c3c..06f52d80ac7 100644 --- a/src/mame/taito/superqix.cpp +++ b/src/mame/taito/superqix.cpp @@ -885,7 +885,7 @@ u8 hotsmash_state::hotsmash_z80_mcu_r() return m_from_mcu; } -CUSTOM_INPUT_MEMBER(hotsmash_state::pbillian_semaphore_input_r) +ioport_value hotsmash_state::pbillian_semaphore_input_r() { ioport_value res = 0; // bit 0x40 is PROBABLY latch 1 on 74ls74.7c, is high if m_z80_has_written is clear diff --git a/src/mame/taito/superqix.h b/src/mame/taito/superqix.h index 53cc1a51a16..c21f5c45ebd 100644 --- a/src/mame/taito/superqix.h +++ b/src/mame/taito/superqix.h @@ -160,7 +160,7 @@ public: void pbillian(machine_config &config); void pbillianb(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(pbillian_semaphore_input_r); + ioport_value pbillian_semaphore_input_r(); protected: virtual void machine_start() override; diff --git a/src/mame/taito/taito_f3.cpp b/src/mame/taito/taito_f3.cpp index 77a14478c41..2dde35806f0 100644 --- a/src/mame/taito/taito_f3.cpp +++ b/src/mame/taito/taito_f3.cpp @@ -36,14 +36,14 @@ /******************************************************************************/ template -CUSTOM_INPUT_MEMBER(taito_f3_state::f3_analog_r) +ioport_value taito_f3_state::f3_analog_r() { const int data = m_dial[Num]->read(); return ((data & 0xf) << 12) | ((data & 0xff0) >> 4); } template -CUSTOM_INPUT_MEMBER(taito_f3_state::f3_coin_r) +ioport_value taito_f3_state::f3_coin_r() { return m_coin_word[Num]; } @@ -229,7 +229,7 @@ void taito_f3_state::bubsympb_oki_map(address_map &map) /******************************************************************************/ -CUSTOM_INPUT_MEMBER( taito_f3_state::eeprom_read ) +ioport_value taito_f3_state::eeprom_read() { return m_eepromin->read(); } diff --git a/src/mame/taito/taito_f3.h b/src/mame/taito/taito_f3.h index 892650101e7..1717bf1bcea 100644 --- a/src/mame/taito/taito_f3.h +++ b/src/mame/taito/taito_f3.h @@ -90,9 +90,9 @@ public: void init_scfinals(); void init_pbobbl2x(); - template DECLARE_CUSTOM_INPUT_MEMBER(f3_analog_r); - template DECLARE_CUSTOM_INPUT_MEMBER(f3_coin_r); - DECLARE_CUSTOM_INPUT_MEMBER(eeprom_read); + template ioport_value f3_analog_r(); + template ioport_value f3_coin_r(); + ioport_value eeprom_read(); protected: using fixed8 = s32; diff --git a/src/mame/taito/taito_z.cpp b/src/mame/taito/taito_z.cpp index 33d37b1e36e..e92a2ab9b32 100644 --- a/src/mame/taito/taito_z.cpp +++ b/src/mame/taito/taito_z.cpp @@ -1359,20 +1359,20 @@ void spacegun_state::spacegun_eeprom_w(u8 data) GAME INPUTS **********************************************************/ -CUSTOM_INPUT_MEMBER(taitoz_state::gas_pedal_r) +ioport_value taitoz_state::gas_pedal_r() { static const u8 retval[8] = { 0,1,3,2,6,7,5,4 }; return retval[m_gas.read_safe(0) & 7]; } -CUSTOM_INPUT_MEMBER(taitoz_state::brake_pedal_r) +ioport_value taitoz_state::brake_pedal_r() { static const u8 retval[8] = { 0,1,3,2,6,7,5,4 }; return retval[m_brake.read_safe(0) & 7]; } // enforceja only, 3 bits applied on both pots -template CUSTOM_INPUT_MEMBER(taitoz_state::adstick_r) +template ioport_value taitoz_state::adstick_r() { static const u8 retval[8] = { 0,1,3,2,6,7,5,4 }; u8 raw_value = ((axis == 0 ? m_stickx : m_sticky).read_safe(0) >> 5) & 7; diff --git a/src/mame/taito/taito_z.h b/src/mame/taito/taito_z.h index c168421c69e..c4d55487242 100644 --- a/src/mame/taito/taito_z.h +++ b/src/mame/taito/taito_z.h @@ -49,9 +49,9 @@ public: m_cpua_out(*this, "genout%u", 0U) { } - DECLARE_CUSTOM_INPUT_MEMBER(gas_pedal_r); - DECLARE_CUSTOM_INPUT_MEMBER(brake_pedal_r); - template DECLARE_CUSTOM_INPUT_MEMBER(adstick_r); + ioport_value gas_pedal_r(); + ioport_value brake_pedal_r(); + template ioport_value adstick_r(); void bshark_base(machine_config &config); void bshark(machine_config &config); diff --git a/src/mame/taito/taitosj.cpp b/src/mame/taito/taitosj.cpp index 583b5bfb502..e418ad825dd 100644 --- a/src/mame/taito/taitosj.cpp +++ b/src/mame/taito/taitosj.cpp @@ -196,7 +196,7 @@ void taitosj_state::sound_semaphore2_w(uint8_t data) machine().scheduler().synchronize(timer_expired_delegate(FUNC(taitosj_state::sound_semaphore2_w_cb), this), data); } -CUSTOM_INPUT_MEMBER(taitosj_state::input_port_4_f0_r) +ioport_value taitosj_state::input_port_4_f0_r() { return m_input_port_4_f0; } @@ -255,7 +255,7 @@ void taitosj_state::main_mcu_map(address_map &map) // seems the most logical way to do the gears template -CUSTOM_INPUT_MEMBER(taitosj_state::kikstart_gear_r) +ioport_value taitosj_state::kikstart_gear_r() { // gear MUST be 1, 2 or 3 if (m_gear[Player]->read() & 0x01) m_kikstart_gears[Player] = 0x02; diff --git a/src/mame/taito/taitosj.h b/src/mame/taito/taitosj.h index b2a963c4cd1..fab0ed4ac46 100644 --- a/src/mame/taito/taitosj.h +++ b/src/mame/taito/taitosj.h @@ -54,8 +54,8 @@ public: void init_junglhbr(); void init_spacecr(); - DECLARE_CUSTOM_INPUT_MEMBER(input_port_4_f0_r); - template DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r); + ioport_value input_port_4_f0_r(); + template ioport_value kikstart_gear_r(); protected: virtual void machine_start() override; diff --git a/src/mame/taito/topspeed.cpp b/src/mame/taito/topspeed.cpp index 300c8051143..b7aaae29010 100644 --- a/src/mame/taito/topspeed.cpp +++ b/src/mame/taito/topspeed.cpp @@ -206,8 +206,8 @@ public: void topspeed(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(gas_pedal_r); - DECLARE_CUSTOM_INPUT_MEMBER(brake_pedal_r); + ioport_value gas_pedal_r(); + ioport_value brake_pedal_r(); protected: virtual void machine_start() override; @@ -587,13 +587,13 @@ u8 topspeed_state::input_bypass_r() } } -CUSTOM_INPUT_MEMBER(topspeed_state::gas_pedal_r) +ioport_value topspeed_state::gas_pedal_r() { static constexpr u8 retval[8] = { 0, 1, 3, 2, 6, 7, 5, 4 }; return retval[m_gas->read() & 7]; } -CUSTOM_INPUT_MEMBER(topspeed_state::brake_pedal_r) +ioport_value topspeed_state::brake_pedal_r() { static constexpr u8 retval[8] = { 0, 1, 3, 2, 6, 7, 5, 4 }; return retval[m_brake->read() & 7]; diff --git a/src/mame/tch/littlerb.cpp b/src/mame/tch/littlerb.cpp index 654a31aa56b..364d16c27bc 100644 --- a/src/mame/tch/littlerb.cpp +++ b/src/mame/tch/littlerb.cpp @@ -123,7 +123,7 @@ public: void init_littlerb(); - DECLARE_CUSTOM_INPUT_MEMBER(frame_step_r); + ioport_value frame_step_r(); protected: virtual void machine_start() override; @@ -199,7 +199,7 @@ void littlerb_state::main(address_map &map) } // guess according to DASM code and checking the gameplay speed, could be different -CUSTOM_INPUT_MEMBER(littlerb_state::frame_step_r) +ioport_value littlerb_state::frame_step_r() { uint32_t ret = m_soundframe; diff --git a/src/mame/technos/ddragon3.cpp b/src/mame/technos/ddragon3.cpp index 6e5969eeb25..724d1c57de8 100644 --- a/src/mame/technos/ddragon3.cpp +++ b/src/mame/technos/ddragon3.cpp @@ -271,13 +271,13 @@ void wwfwfest_state::wwfwfest_priority_w(uint8_t data) /* DIPs are spread across the other input ports */ template -CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_3f_r) +ioport_value wwfwfest_state::dsw_3f_r() { return m_dsw[N]->read() & 0x3f; } template -CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_c0_r) +ioport_value wwfwfest_state::dsw_c0_r() { return (m_dsw[N]->read() & 0xc0) >> 6; } diff --git a/src/mame/technos/ddragon3.h b/src/mame/technos/ddragon3.h index aa1f61a0402..def802ee129 100644 --- a/src/mame/technos/ddragon3.h +++ b/src/mame/technos/ddragon3.h @@ -128,8 +128,8 @@ public: void wwfwfest(machine_config &config); void wwfwfstb(machine_config &config); - template DECLARE_CUSTOM_INPUT_MEMBER(dsw_3f_r); - template DECLARE_CUSTOM_INPUT_MEMBER(dsw_c0_r); + template ioport_value dsw_3f_r(); + template ioport_value dsw_c0_r(); private: /* wwfwfest has an extra layer */ diff --git a/src/mame/technos/renegade.cpp b/src/mame/technos/renegade.cpp index 61c4706cf28..8d0efa9eb89 100644 --- a/src/mame/technos/renegade.cpp +++ b/src/mame/technos/renegade.cpp @@ -156,7 +156,7 @@ public: void renegade(machine_config &config); void kuniokunb(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); + ioport_value mcu_status_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_inserted); protected: @@ -439,7 +439,7 @@ uint8_t renegade_state::mcu_reset_r() return 0; } -CUSTOM_INPUT_MEMBER(renegade_state::mcu_status_r) +ioport_value renegade_state::mcu_status_r() { if (m_mcu.found()) { diff --git a/src/mame/technos/xain.cpp b/src/mame/technos/xain.cpp index fc19b92603e..c9995b33f4b 100644 --- a/src/mame/technos/xain.cpp +++ b/src/mame/technos/xain.cpp @@ -275,7 +275,7 @@ int xain_state::vblank_r() ***************************************************************************/ -CUSTOM_INPUT_MEMBER(xain_state::mcu_status_r) +ioport_value xain_state::mcu_status_r() { // bit 0 is host MCU flag, bit 1 is host semaphore flag (both active low) return diff --git a/src/mame/technos/xain.h b/src/mame/technos/xain.h index 87822efd16d..3e35db6474e 100644 --- a/src/mame/technos/xain.h +++ b/src/mame/technos/xain.h @@ -39,7 +39,7 @@ public: void xsleenab(machine_config &config); int vblank_r(); - DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r); + ioport_value mcu_status_r(); protected: virtual void machine_start() override; diff --git a/src/mame/tvgames/spg110.cpp b/src/mame/tvgames/spg110.cpp index 49738e0c4bc..da72a10dc58 100644 --- a/src/mame/tvgames/spg110.cpp +++ b/src/mame/tvgames/spg110.cpp @@ -47,7 +47,7 @@ public: void spg110_base(machine_config &config); void spg110_spdmo(machine_config& config); - DECLARE_CUSTOM_INPUT_MEMBER(plunger_r); + ioport_value plunger_r(); protected: required_device m_maincpu; @@ -247,7 +247,7 @@ static INPUT_PORTS_START( jak_capb ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(spg110_game_state::plunger_r) +ioport_value spg110_game_state::plunger_r() { // this is only needed because our PORT_CENTERDELTA doesn't work if set > 255 (and is limited in the menu to that) such a value that doesn't center quickly enough for the plunger to be effective return ioport("JOYY_REAL")->read()<<2; diff --git a/src/mame/tvgames/spg2xx.cpp b/src/mame/tvgames/spg2xx.cpp index 3ec99264ac7..c8900c23795 100644 --- a/src/mame/tvgames/spg2xx.cpp +++ b/src/mame/tvgames/spg2xx.cpp @@ -790,12 +790,12 @@ static INPUT_PORTS_START( doyousud ) INPUT_PORTS_END -CUSTOM_INPUT_MEMBER(spg2xx_game_fordrace_state::wheel_r) +ioport_value spg2xx_game_fordrace_state::wheel_r() { return ioport("WHEEL_REAL")->read() >> 1; } -CUSTOM_INPUT_MEMBER(spg2xx_game_fordrace_state::wheel2_r) +ioport_value spg2xx_game_fordrace_state::wheel2_r() { // return 0x0800; uint16_t dat = ioport("WHEEL_REAL")->read(); diff --git a/src/mame/tvgames/spg2xx.h b/src/mame/tvgames/spg2xx.h index 7e9b27a6263..18d0150be75 100644 --- a/src/mame/tvgames/spg2xx.h +++ b/src/mame/tvgames/spg2xx.h @@ -270,8 +270,8 @@ public: void fordrace(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(wheel_r); - DECLARE_CUSTOM_INPUT_MEMBER(wheel2_r); + ioport_value wheel_r(); + ioport_value wheel2_r(); private: }; diff --git a/src/mame/universal/ladybug.cpp b/src/mame/universal/ladybug.cpp index 4fbbd53c71f..13ec126373e 100644 --- a/src/mame/universal/ladybug.cpp +++ b/src/mame/universal/ladybug.cpp @@ -78,8 +78,8 @@ public: , m_p2_control(*this, "CONTP2") { } - DECLARE_CUSTOM_INPUT_MEMBER(ladybug_p1_control_r); - DECLARE_CUSTOM_INPUT_MEMBER(ladybug_p2_control_r); + ioport_value ladybug_p1_control_r(); + ioport_value ladybug_p2_control_r(); DECLARE_INPUT_CHANGED_MEMBER(coin1_inserted); DECLARE_INPUT_CHANGED_MEMBER(coin2_inserted); void ladybug(machine_config &config); @@ -267,12 +267,12 @@ INPUT_CHANGED_MEMBER(ladybug_state::coin2_inserted) m_maincpu->set_input_line(0, HOLD_LINE); } -CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p1_control_r) +ioport_value ladybug_state::ladybug_p1_control_r() { return m_p1_control->read(); } -CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p2_control_r) +ioport_value ladybug_state::ladybug_p2_control_r() { // upright cabinet only uses a single set of controls */ return ((m_port_dsw0->read() & 0x20) ? m_p2_control : m_p1_control)->read(); diff --git a/src/mame/upl/nova2001.cpp b/src/mame/upl/nova2001.cpp index 97a7ae5ea11..8a644fed2f5 100644 --- a/src/mame/upl/nova2001.cpp +++ b/src/mame/upl/nova2001.cpp @@ -139,7 +139,7 @@ e000 - e7ff R/W Work RAM * *************************************/ -CUSTOM_INPUT_MEMBER(nova2001_state::ninjakun_io_A002_ctrl_r) +ioport_value nova2001_state::ninjakun_io_A002_ctrl_r() { return m_ninjakun_io_a002_ctrl; } diff --git a/src/mame/upl/nova2001.h b/src/mame/upl/nova2001.h index 4a9b6d67235..709e0f1b69d 100644 --- a/src/mame/upl/nova2001.h +++ b/src/mame/upl/nova2001.h @@ -31,7 +31,7 @@ public: void init_raiders5(); void init_pkunwar(); - DECLARE_CUSTOM_INPUT_MEMBER(ninjakun_io_A002_ctrl_r); + ioport_value ninjakun_io_A002_ctrl_r(); private: required_device m_maincpu; diff --git a/src/mame/ussr/istrebiteli.cpp b/src/mame/ussr/istrebiteli.cpp index 5c7d08c4492..9022fa8d674 100644 --- a/src/mame/ussr/istrebiteli.cpp +++ b/src/mame/ussr/istrebiteli.cpp @@ -159,7 +159,7 @@ public: void motogonki(machine_config &config); template int collision_r(); - DECLARE_CUSTOM_INPUT_MEMBER(coin_r); + ioport_value coin_r(); DECLARE_INPUT_CHANGED_MEMBER(coin_inc); @@ -482,7 +482,7 @@ int istrebiteli_state::collision_r() return m_spr_collision[ID]; } -CUSTOM_INPUT_MEMBER(istrebiteli_state::coin_r) +ioport_value istrebiteli_state::coin_r() { return coin_count; } diff --git a/src/mame/ussr/special_gambl.cpp b/src/mame/ussr/special_gambl.cpp index ab9049ecd2e..07bc3585572 100644 --- a/src/mame/ussr/special_gambl.cpp +++ b/src/mame/ussr/special_gambl.cpp @@ -59,7 +59,7 @@ public: void dice(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(boot_r) { return m_cold_boot; } + ioport_value boot_r() { return m_cold_boot; } DECLARE_INPUT_CHANGED_MEMBER(ram_test) { m_maincpu->set_input_line(INPUT_LINE_NMI, newval ? ASSERT_LINE : CLEAR_LINE); } protected: diff --git a/src/mame/valadon/bagman.cpp b/src/mame/valadon/bagman.cpp index 602060b0e04..01a3c25f18e 100644 --- a/src/mame/valadon/bagman.cpp +++ b/src/mame/valadon/bagman.cpp @@ -447,7 +447,7 @@ GFXDECODE_END /* squaitsa doesn't map the dial directly, instead it polls the results of the dial through an external circuitry. I don't know if the following is correct, there can possibly be multiple solutions for the same problem. */ -template CUSTOM_INPUT_MEMBER(squaitsa_state::dial_input_r) +template ioport_value squaitsa_state::dial_input_r() { uint8_t const dial_val = m_dial[N]->read(); diff --git a/src/mame/valadon/bagman.h b/src/mame/valadon/bagman.h index d7298f01001..2b7c390457a 100644 --- a/src/mame/valadon/bagman.h +++ b/src/mame/valadon/bagman.h @@ -125,7 +125,7 @@ public: m_old_val{ 0, 0 } { } - template DECLARE_CUSTOM_INPUT_MEMBER(dial_input_r); + template ioport_value dial_input_r(); protected: virtual void machine_start() override; diff --git a/src/mame/venture/suprridr.cpp b/src/mame/venture/suprridr.cpp index 18788d8772c..e35a0396672 100644 --- a/src/mame/venture/suprridr.cpp +++ b/src/mame/venture/suprridr.cpp @@ -116,7 +116,7 @@ public: void suprridr(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(control_r); + ioport_value control_r(); protected: virtual void machine_start() override; @@ -478,7 +478,7 @@ void suprridr_state::sound_portmap(address_map &map) * *************************************/ -CUSTOM_INPUT_MEMBER(suprridr_state::control_r) +ioport_value suprridr_state::control_r() { // screen flip multiplexes controls diff --git a/src/mame/vsystem/rpunch.cpp b/src/mame/vsystem/rpunch.cpp index e2e9b03dd8e..8d87fed6eac 100644 --- a/src/mame/vsystem/rpunch.cpp +++ b/src/mame/vsystem/rpunch.cpp @@ -150,7 +150,7 @@ public: void rpunch(machine_config &config); void svolleybl(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(hi_bits_r) { return m_hi_bits->read(); } + ioport_value hi_bits_r() { return m_hi_bits->read(); } protected: required_device m_maincpu; diff --git a/src/mame/vsystem/tail2nos.cpp b/src/mame/vsystem/tail2nos.cpp index 7016e885cb9..71220ae5840 100644 --- a/src/mame/vsystem/tail2nos.cpp +++ b/src/mame/vsystem/tail2nos.cpp @@ -54,7 +54,7 @@ public: void tail2nos(machine_config &config); - template DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r); + template ioport_value analog_in_r(); protected: virtual void machine_start() override; @@ -326,7 +326,7 @@ void tail2nos_state::sound_port_map(address_map &map) } template -CUSTOM_INPUT_MEMBER(tail2nos_state::analog_in_r) +ioport_value tail2nos_state::analog_in_r() { int delta = m_analog[N]->read(); diff --git a/src/mame/yamaha/ymdx100.cpp b/src/mame/yamaha/ymdx100.cpp index afc6c552aa2..e4cfe5200dd 100644 --- a/src/mame/yamaha/ymdx100.cpp +++ b/src/mame/yamaha/ymdx100.cpp @@ -273,7 +273,7 @@ public: void dx100(machine_config &config); void led_w(int state) { m_led = state; } - DECLARE_CUSTOM_INPUT_MEMBER(midi_in_r) { return m_midi_in; } + ioport_value midi_in_r() { return m_midi_in; } protected: virtual void driver_start() override; diff --git a/src/mame/yamaha/ympsr150.cpp b/src/mame/yamaha/ympsr150.cpp index 9cbe1d3f66c..af7b9d42398 100644 --- a/src/mame/yamaha/ympsr150.cpp +++ b/src/mame/yamaha/ympsr150.cpp @@ -100,12 +100,12 @@ public: template void keys_w(int state); template - DECLARE_CUSTOM_INPUT_MEMBER(keys_r); + ioport_value keys_r(); - DECLARE_CUSTOM_INPUT_MEMBER(dial_r); + ioport_value dial_r(); DECLARE_INPUT_CHANGED_MEMBER(switch_w); - DECLARE_CUSTOM_INPUT_MEMBER(switch_r) { return m_switch; } + ioport_value switch_r() { return m_switch; } void apo_w(int state) { if (state) m_maincpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } DECLARE_INPUT_CHANGED_MEMBER(power_w) { if (!newval) m_maincpu->set_input_line(INPUT_LINE_RESET, CLEAR_LINE); } @@ -120,7 +120,7 @@ public: template void digit_w(u8 state) { m_digit[Num] = state ^ 0xff; } - DECLARE_CUSTOM_INPUT_MEMBER(lcd_r) { return m_lcdc->db_r() >> 4; } + ioport_value lcd_r() { return m_lcdc->db_r() >> 4; } void lcd_w(int state) { m_lcdc->db_w(state << 4); } private: @@ -162,7 +162,7 @@ void psr150_state::keys_w(int state) } template -CUSTOM_INPUT_MEMBER(psr150_state::keys_r) +ioport_value psr150_state::keys_r() { ioport_value result = 0; for (unsigned i = 0U; i < m_keys.size(); i++) @@ -172,7 +172,7 @@ CUSTOM_INPUT_MEMBER(psr150_state::keys_r) return result >> StartBit; } -CUSTOM_INPUT_MEMBER(psr150_state::dial_r) +ioport_value psr150_state::dial_r() { // return the dial position as a 2-bit gray code const u8 val = m_dial->read(); diff --git a/src/mame/yamaha/ympsr60.cpp b/src/mame/yamaha/ympsr60.cpp index 5f2925c42cf..05b01b5768c 100644 --- a/src/mame/yamaha/ympsr60.cpp +++ b/src/mame/yamaha/ympsr60.cpp @@ -171,7 +171,7 @@ public: // optional sustain pedal input; if this doesn't change, sustain will not work // if no pedal present, it seems sustain should still work, so toggle the value // here a bit to make the keyboard notice - CUSTOM_INPUT_MEMBER(sustain_fuzz) { return (m_sustain_fuzz = !m_sustain_fuzz) ? 8 : 12; } + ioport_value sustain_fuzz() { return (m_sustain_fuzz = !m_sustain_fuzz) ? 8 : 12; } }; void psr60_state::psr60_map(address_map &map) diff --git a/src/mame/zaccaria/zac1b1120.cpp b/src/mame/zaccaria/zac1b1120.cpp index 695b908160b..c4dd4ceaebe 100644 --- a/src/mame/zaccaria/zac1b1120.cpp +++ b/src/mame/zaccaria/zac1b1120.cpp @@ -58,7 +58,7 @@ public: void tinvader(machine_config &config); void dodgem(machine_config &config); - DECLARE_CUSTOM_INPUT_MEMBER(bg_collision_r) { return m_collision_background; } + ioport_value bg_collision_r() { return m_collision_background; } protected: virtual void video_start() override; -- cgit v1.2.3