summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-09-14 15:27:30 -0400
committerGravatarGravatar AJR <ajrhacker@users.noreply.github.com>2019-09-14 15:37:04 -0400
commit6fab7692981d7956fe400995e4774c9d007b215f (patch) (github)
tree33db51072448e42875ab5874549ca538a9add521
parent2f39181ac1e093b42a6ff17b49013cfadb02e7a9 (diff)
downloadmame-6fab7692981d7956fe400995e4774c9d007b215f.tar.bz2
mame-6fab7692981d7956fe400995e4774c9d007b215f.zip
PORT_CUSTOM simplification (nw)
- Remove both arguments from CUSTOM_INPUT_MEMBER (adding template parameters as necessary) - Remove 'param' from PORT_CUSTOM_MEMBER and assume 'device' is DEVICE_SELF (use PORT_CUSTOM_DEVICE_MEMBER if it isn't) - Replace PORT_CUSTOM_MEMBER with PORT_READ_LINE_MEMBER where applicable Add implicit DEVICE_SELF variants of PORT_READ_LINE_DEVICE_MEMBER and PORT_WRITE_LINE_DEVICE_MEMBER (nw) Remove ioport_field argument from PORT_CROSSHAIR_MAPPER (nw) captflag, gmgalax: Separate driver classes from base (nw)
-rw-r--r--src/devices/bus/amiga/keyboard/mitsumi.cpp14
-rw-r--r--src/devices/bus/coleco/controller/hand.cpp2
-rw-r--r--src/devices/bus/coleco/controller/sac.cpp2
-rw-r--r--src/devices/bus/sms_ctrl/paddle.cpp4
-rw-r--r--src/devices/bus/sms_ctrl/sports.cpp6
-rw-r--r--src/devices/bus/sms_ctrl/sportsjp.cpp6
-rw-r--r--src/devices/machine/sensorboard.cpp8
-rw-r--r--src/emu/ioport.cpp5
-rw-r--r--src/emu/ioport.h27
-rw-r--r--src/mame/audio/gottlieb.cpp2
-rw-r--r--src/mame/audio/snk6502.cpp4
-rw-r--r--src/mame/audio/snk6502.h2
-rw-r--r--src/mame/drivers/8080bw.cpp36
-rw-r--r--src/mame/drivers/acefruit.cpp69
-rw-r--r--src/mame/drivers/aci_ggm.cpp2
-rw-r--r--src/mame/drivers/alg.cpp18
-rw-r--r--src/mame/drivers/amiga.cpp39
-rw-r--r--src/mame/drivers/aristmk5.cpp10
-rw-r--r--src/mame/drivers/arkanoid.cpp2
-rw-r--r--src/mame/drivers/arsystems.cpp15
-rw-r--r--src/mame/drivers/artmagic.cpp10
-rw-r--r--src/mame/drivers/asteroid.cpp20
-rw-r--r--src/mame/drivers/astrocde.cpp10
-rw-r--r--src/mame/drivers/astrof.cpp18
-rw-r--r--src/mame/drivers/atlantis.cpp2
-rw-r--r--src/mame/drivers/bagman.cpp4
-rw-r--r--src/mame/drivers/balsente.cpp2
-rw-r--r--src/mame/drivers/battlex.cpp2
-rw-r--r--src/mame/drivers/blockade.cpp16
-rw-r--r--src/mame/drivers/bmcpokr.cpp10
-rw-r--r--src/mame/drivers/bnstars.cpp9
-rw-r--r--src/mame/drivers/btoads.cpp8
-rw-r--r--src/mame/drivers/bublbobl.cpp4
-rw-r--r--src/mame/drivers/buggychl.cpp2
-rw-r--r--src/mame/drivers/bwidow.cpp18
-rw-r--r--src/mame/drivers/by17.cpp66
-rw-r--r--src/mame/drivers/by35.cpp41
-rw-r--r--src/mame/drivers/bzone.cpp6
-rw-r--r--src/mame/drivers/cave.cpp14
-rw-r--r--src/mame/drivers/ccastles.cpp4
-rw-r--r--src/mame/drivers/champbas.cpp4
-rw-r--r--src/mame/drivers/cischeat.cpp84
-rw-r--r--src/mame/drivers/cloud9.cpp6
-rw-r--r--src/mame/drivers/cop01.cpp12
-rw-r--r--src/mame/drivers/crbaloon.cpp2
-rw-r--r--src/mame/drivers/crimfght.cpp2
-rw-r--r--src/mame/drivers/cubo.cpp17
-rw-r--r--src/mame/drivers/cyclemb.cpp4
-rw-r--r--src/mame/drivers/dacholer.cpp6
-rw-r--r--src/mame/drivers/dcheese.cpp12
-rw-r--r--src/mame/drivers/ddayjlc.cpp2
-rw-r--r--src/mame/drivers/ddenlovr.cpp16
-rw-r--r--src/mame/drivers/ddragon.cpp4
-rw-r--r--src/mame/drivers/ddragon3.cpp16
-rw-r--r--src/mame/drivers/deco_ld.cpp6
-rw-r--r--src/mame/drivers/dlair.cpp20
-rw-r--r--src/mame/drivers/ecoinfr.cpp18
-rw-r--r--src/mame/drivers/enigma2.cpp8
-rw-r--r--src/mame/drivers/eolith.cpp8
-rw-r--r--src/mame/drivers/eolith16.cpp2
-rw-r--r--src/mame/drivers/equites.cpp4
-rw-r--r--src/mame/drivers/exerion.cpp2
-rw-r--r--src/mame/drivers/exidy.cpp2
-rw-r--r--src/mame/drivers/exidy440.cpp52
-rw-r--r--src/mame/drivers/famibox.cpp6
-rw-r--r--src/mame/drivers/fantland.cpp8
-rw-r--r--src/mame/drivers/fgoal.cpp4
-rw-r--r--src/mame/drivers/firefox.cpp16
-rw-r--r--src/mame/drivers/firetrk.cpp71
-rw-r--r--src/mame/drivers/flicker.cpp2
-rw-r--r--src/mame/drivers/flstory.cpp2
-rw-r--r--src/mame/drivers/fromanc2.cpp14
-rw-r--r--src/mame/drivers/gaelco2.cpp48
-rw-r--r--src/mame/drivers/gaelco3d.cpp40
-rw-r--r--src/mame/drivers/galastrm.cpp4
-rw-r--r--src/mame/drivers/galaxi.cpp16
-rw-r--r--src/mame/drivers/galaxian.cpp69
-rw-r--r--src/mame/drivers/galaxold.cpp77
-rw-r--r--src/mame/drivers/gottlieb.cpp22
-rw-r--r--src/mame/drivers/gstream.cpp14
-rw-r--r--src/mame/drivers/hh_cop400.cpp6
-rw-r--r--src/mame/drivers/homelab.cpp8
-rw-r--r--src/mame/drivers/homerun.cpp16
-rw-r--r--src/mame/drivers/icecold.cpp2
-rw-r--r--src/mame/drivers/igs009.cpp6
-rw-r--r--src/mame/drivers/igs011.cpp14
-rw-r--r--src/mame/drivers/igspoker.cpp22
-rw-r--r--src/mame/drivers/imolagp.cpp4
-rw-r--r--src/mame/drivers/inufuku.cpp4
-rw-r--r--src/mame/drivers/istrebiteli.cpp26
-rw-r--r--src/mame/drivers/itech32.cpp8
-rw-r--r--src/mame/drivers/itech8.cpp40
-rw-r--r--src/mame/drivers/jackie.cpp6
-rw-r--r--src/mame/drivers/jankenmn.cpp6
-rw-r--r--src/mame/drivers/jedi.cpp2
-rw-r--r--src/mame/drivers/kenseim.cpp30
-rw-r--r--src/mame/drivers/konamigx.cpp2
-rw-r--r--src/mame/drivers/ksys573.cpp14
-rw-r--r--src/mame/drivers/ladybug.cpp4
-rw-r--r--src/mame/drivers/lastbank.cpp2
-rw-r--r--src/mame/drivers/lethalj.cpp2
-rw-r--r--src/mame/drivers/limenko.cpp10
-rw-r--r--src/mame/drivers/littlerb.cpp2
-rw-r--r--src/mame/drivers/m92.cpp4
-rw-r--r--src/mame/drivers/merit.cpp12
-rw-r--r--src/mame/drivers/metro.cpp6
-rw-r--r--src/mame/drivers/mhavoc.cpp22
-rw-r--r--src/mame/drivers/micro3d.cpp2
-rw-r--r--src/mame/drivers/midvunit.cpp2
-rw-r--r--src/mame/drivers/midyunit.cpp16
-rw-r--r--src/mame/drivers/midzeus.cpp4
-rw-r--r--src/mame/drivers/missile.cpp8
-rw-r--r--src/mame/drivers/mjkjidai.cpp2
-rw-r--r--src/mame/drivers/model2.cpp4
-rw-r--r--src/mame/drivers/mquake.cpp4
-rw-r--r--src/mame/drivers/ms32.cpp2
-rw-r--r--src/mame/drivers/multigam.cpp6
-rw-r--r--src/mame/drivers/mw18w.cpp2
-rw-r--r--src/mame/drivers/mw8080bw.cpp48
-rw-r--r--src/mame/drivers/namcos21_de.cpp2
-rw-r--r--src/mame/drivers/namcos22.cpp9
-rw-r--r--src/mame/drivers/naomi.cpp6
-rw-r--r--src/mame/drivers/nbmj8891.cpp10
-rw-r--r--src/mame/drivers/neogeo.cpp12
-rw-r--r--src/mame/drivers/niyanpai.cpp10
-rw-r--r--src/mame/drivers/nova2001.cpp2
-rw-r--r--src/mame/drivers/nss.cpp6
-rw-r--r--src/mame/drivers/omegrace.cpp2
-rw-r--r--src/mame/drivers/opwolf.cpp4
-rw-r--r--src/mame/drivers/pc9801.cpp2
-rw-r--r--src/mame/drivers/pencil2.cpp12
-rw-r--r--src/mame/drivers/peplus.cpp31
-rw-r--r--src/mame/drivers/peyper.cpp17
-rw-r--r--src/mame/drivers/phoenix.cpp8
-rw-r--r--src/mame/drivers/piggypas.cpp9
-rw-r--r--src/mame/drivers/pirates.cpp4
-rw-r--r--src/mame/drivers/piratesh.cpp4
-rw-r--r--src/mame/drivers/playch10.cpp2
-rw-r--r--src/mame/drivers/polepos.cpp4
-rw-r--r--src/mame/drivers/policetr.cpp4
-rw-r--r--src/mame/drivers/popeye.cpp10
-rw-r--r--src/mame/drivers/psikyo.cpp18
-rw-r--r--src/mame/drivers/psikyo4.cpp18
-rw-r--r--src/mame/drivers/pzletime.cpp6
-rw-r--r--src/mame/drivers/qdrmfgp.cpp4
-rw-r--r--src/mame/drivers/quantum.cpp2
-rw-r--r--src/mame/drivers/quizshow.cpp2
-rw-r--r--src/mame/drivers/r2dtank.cpp6
-rw-r--r--src/mame/drivers/renegade.cpp2
-rw-r--r--src/mame/drivers/rgum.cpp6
-rw-r--r--src/mame/drivers/rpunch.cpp4
-rw-r--r--src/mame/drivers/scobra.cpp18
-rw-r--r--src/mame/drivers/scramble.cpp12
-rw-r--r--src/mame/drivers/scyclone.cpp6
-rw-r--r--src/mame/drivers/seattle.cpp4
-rw-r--r--src/mame/drivers/segag80v.cpp4
-rw-r--r--src/mame/drivers/segajw.cpp8
-rw-r--r--src/mame/drivers/segaorun.cpp2
-rw-r--r--src/mame/drivers/segas16a.cpp6
-rw-r--r--src/mame/drivers/segas16b.cpp6
-rw-r--r--src/mame/drivers/seibuspi.cpp13
-rw-r--r--src/mame/drivers/seta.cpp6
-rw-r--r--src/mame/drivers/sk1.cpp4
-rw-r--r--src/mame/drivers/snk.cpp143
-rw-r--r--src/mame/drivers/snk6502.cpp6
-rw-r--r--src/mame/drivers/spdodgeb.cpp4
-rw-r--r--src/mame/drivers/spg110.cpp2
-rw-r--r--src/mame/drivers/spoker.cpp8
-rw-r--r--src/mame/drivers/sprint4.cpp45
-rw-r--r--src/mame/drivers/ssingles.cpp2
-rw-r--r--src/mame/drivers/stactics.cpp12
-rw-r--r--src/mame/drivers/starshp1.cpp4
-rw-r--r--src/mame/drivers/starwars.cpp4
-rw-r--r--src/mame/drivers/statriv2.cpp14
-rw-r--r--src/mame/drivers/superqix.cpp14
-rw-r--r--src/mame/drivers/suprnova.cpp12
-rw-r--r--src/mame/drivers/suprridr.cpp2
-rw-r--r--src/mame/drivers/system1.cpp4
-rw-r--r--src/mame/drivers/tail2nos.cpp8
-rw-r--r--src/mame/drivers/taito_f3.cpp21
-rw-r--r--src/mame/drivers/taito_z.cpp19
-rw-r--r--src/mame/drivers/taitosj.cpp41
-rw-r--r--src/mame/drivers/tempest.cpp12
-rw-r--r--src/mame/drivers/tetrisp2.cpp2
-rw-r--r--src/mame/drivers/thayers.cpp12
-rw-r--r--src/mame/drivers/timeplt.cpp6
-rw-r--r--src/mame/drivers/toaplan2.cpp6
-rw-r--r--src/mame/drivers/tomcat.cpp2
-rw-r--r--src/mame/drivers/topspeed.cpp15
-rw-r--r--src/mame/drivers/ultratnk.cpp26
-rw-r--r--src/mame/drivers/vamphalf.cpp2
-rw-r--r--src/mame/drivers/vegaeo.cpp2
-rw-r--r--src/mame/drivers/vegas.cpp8
-rw-r--r--src/mame/drivers/vicdual.cpp208
-rw-r--r--src/mame/drivers/video21.cpp6
-rw-r--r--src/mame/drivers/vii.cpp25
-rw-r--r--src/mame/drivers/viper.cpp8
-rw-r--r--src/mame/drivers/wacky_gator.cpp4
-rw-r--r--src/mame/drivers/wecleman.cpp4
-rw-r--r--src/mame/drivers/williams.cpp11
-rw-r--r--src/mame/drivers/wmg.cpp11
-rw-r--r--src/mame/drivers/wolfpack.cpp10
-rw-r--r--src/mame/drivers/wwfsstar.cpp4
-rw-r--r--src/mame/drivers/xain.cpp6
-rw-r--r--src/mame/drivers/xavix.cpp28
-rw-r--r--src/mame/drivers/xmen.cpp4
-rw-r--r--src/mame/drivers/xxmissio.cpp20
-rw-r--r--src/mame/drivers/zaxxon.cpp35
-rw-r--r--src/mame/drivers/zn.cpp6
-rw-r--r--src/mame/includes/8080bw.h4
-rw-r--r--src/mame/includes/amiga.h2
-rw-r--r--src/mame/includes/artmagic.h2
-rw-r--r--src/mame/includes/asteroid.h2
-rw-r--r--src/mame/includes/astrocde.h2
-rw-r--r--src/mame/includes/btoads.h4
-rw-r--r--src/mame/includes/bwidow.h3
-rw-r--r--src/mame/includes/bzone.h2
-rw-r--r--src/mame/includes/cave.h4
-rw-r--r--src/mame/includes/ccastles.h2
-rw-r--r--src/mame/includes/champbas.h2
-rw-r--r--src/mame/includes/cischeat.h86
-rw-r--r--src/mame/includes/cloud9.h2
-rw-r--r--src/mame/includes/cop01.h2
-rw-r--r--src/mame/includes/dcheese.h2
-rw-r--r--src/mame/includes/ddragon.h2
-rw-r--r--src/mame/includes/ddragon3.h8
-rw-r--r--src/mame/includes/eolith.h4
-rw-r--r--src/mame/includes/equites.h2
-rw-r--r--src/mame/includes/exidy440.h4
-rw-r--r--src/mame/includes/fantland.h7
-rw-r--r--src/mame/includes/fgoal.h2
-rw-r--r--src/mame/includes/firetrk.h10
-rw-r--r--src/mame/includes/fromanc2.h6
-rw-r--r--src/mame/includes/gaelco2.h2
-rw-r--r--src/mame/includes/gaelco3d.h4
-rw-r--r--src/mame/includes/galastrm.h2
-rw-r--r--src/mame/includes/galaxian.h35
-rw-r--r--src/mame/includes/galaxold.h8
-rw-r--r--src/mame/includes/gottlieb.h2
-rw-r--r--src/mame/includes/homerun.h6
-rw-r--r--src/mame/includes/inufuku.h2
-rw-r--r--src/mame/includes/itech32.h2
-rw-r--r--src/mame/includes/itech8.h6
-rw-r--r--src/mame/includes/m92.h2
-rw-r--r--src/mame/includes/metro.h2
-rw-r--r--src/mame/includes/mhavoc.h20
-rw-r--r--src/mame/includes/micro3d.h2
-rw-r--r--src/mame/includes/midyunit.h4
-rw-r--r--src/mame/includes/namcos22.h2
-rw-r--r--src/mame/includes/naomi.h5
-rw-r--r--src/mame/includes/nbmj8891.h2
-rw-r--r--src/mame/includes/niyanpai.h2
-rw-r--r--src/mame/includes/phoenix.h2
-rw-r--r--src/mame/includes/pirates.h2
-rw-r--r--src/mame/includes/playch10.h2
-rw-r--r--src/mame/includes/polepos.h2
-rw-r--r--src/mame/includes/policetr.h2
-rw-r--r--src/mame/includes/popeye.h4
-rw-r--r--src/mame/includes/psikyo.h4
-rw-r--r--src/mame/includes/psikyo4.h2
-rw-r--r--src/mame/includes/scramble.h9
-rw-r--r--src/mame/includes/segag80v.h2
-rw-r--r--src/mame/includes/seibuspi.h2
-rw-r--r--src/mame/includes/snk.h9
-rw-r--r--src/mame/includes/spdodgeb.h2
-rw-r--r--src/mame/includes/sprint4.h6
-rw-r--r--src/mame/includes/stactics.h8
-rw-r--r--src/mame/includes/starwars.h2
-rw-r--r--src/mame/includes/superqix.h4
-rw-r--r--src/mame/includes/suprnova.h8
-rw-r--r--src/mame/includes/tail2nos.h6
-rw-r--r--src/mame/includes/taito_f3.h4
-rw-r--r--src/mame/includes/taito_z.h7
-rw-r--r--src/mame/includes/taitosj.h2
-rw-r--r--src/mame/includes/timeplt.h2
-rw-r--r--src/mame/includes/toaplan2.h2
-rw-r--r--src/mame/includes/topspeed.h7
-rw-r--r--src/mame/includes/ultratnk.h9
-rw-r--r--src/mame/includes/vicdual.h14
-rw-r--r--src/mame/includes/wecleman.h2
-rw-r--r--src/mame/includes/williams.h2
-rw-r--r--src/mame/includes/wolfpack.h2
-rw-r--r--src/mame/includes/wwfsstar.h2
-rw-r--r--src/mame/includes/xain.h2
-rw-r--r--src/mame/includes/xavix.h16
-rw-r--r--src/mame/includes/xmen.h2
-rw-r--r--src/mame/includes/xxmissio.h2
-rw-r--r--src/mame/includes/zaxxon.h4
-rw-r--r--src/mame/machine/amiga.cpp15
-rw-r--r--src/mame/machine/gaelco2.cpp45
-rw-r--r--src/mame/machine/galaxold.cpp8
-rw-r--r--src/mame/machine/mhavoc.cpp19
-rw-r--r--src/mame/machine/micro3d.cpp2
-rw-r--r--src/mame/machine/naomi.cpp29
-rw-r--r--src/mame/machine/playch10.cpp2
-rw-r--r--src/mame/machine/scramble.cpp4
-rw-r--r--src/mame/machine/starwars.cpp2
-rw-r--r--src/mame/machine/taito68705interface.h6
-rw-r--r--src/mame/machine/williams.cpp7
-rw-r--r--src/mame/machine/xavix.cpp20
-rw-r--r--src/mame/video/avgdvg.cpp4
-rw-r--r--src/mame/video/avgdvg.h2
-rw-r--r--src/mame/video/homerun.cpp2
-rw-r--r--src/mame/video/phoenix.cpp2
-rw-r--r--src/mame/video/stactics.cpp6
305 files changed, 1734 insertions, 1692 deletions
diff --git a/src/devices/bus/amiga/keyboard/mitsumi.cpp b/src/devices/bus/amiga/keyboard/mitsumi.cpp
index a321562da9b..36837410cc4 100644
--- a/src/devices/bus/amiga/keyboard/mitsumi.cpp
+++ b/src/devices/bus/amiga/keyboard/mitsumi.cpp
@@ -112,7 +112,7 @@ public:
m_mcu->pa_w(machine().dummy_space(), 0, m_meta->read());
}
- CUSTOM_INPUT_MEMBER(kdat_r)
+ READ_LINE_MEMBER(kdat_r)
{
return m_kdat_in ^ 0x01U;
}
@@ -128,7 +128,7 @@ public:
return (result >> 2) ^ 0x3fU;
}
- CUSTOM_INPUT_MEMBER(reset_r)
+ READ_LINE_MEMBER(reset_r)
{
return m_ctrl_a_a;
}
@@ -414,17 +414,17 @@ protected:
INPUT_PORTS_START(fullsize_cols)
PORT_START("COLS")
- PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, cols_r, nullptr)
+ PORT_BIT(0xfc, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(mitsumi_keyboard_base, cols_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, kdat_r, nullptr)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(mitsumi_keyboard_base, kdat_r)
INPUT_PORTS_END
INPUT_PORTS_START(compact_cols)
PORT_START("COLS")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, reset_r, nullptr)
- PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, cols_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(mitsumi_keyboard_base, reset_r)
+ PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(mitsumi_keyboard_base, cols_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mitsumi_keyboard_base, kdat_r, nullptr)
+ PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(mitsumi_keyboard_base, kdat_r)
INPUT_PORTS_END
INPUT_PORTS_START(mitsumi_meta)
diff --git a/src/devices/bus/coleco/controller/hand.cpp b/src/devices/bus/coleco/controller/hand.cpp
index b8410183b68..d5e4d72b6bc 100644
--- a/src/devices/bus/coleco/controller/hand.cpp
+++ b/src/devices/bus/coleco/controller/hand.cpp
@@ -50,7 +50,7 @@ static INPUT_PORTS_START( coleco_hand_controller )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("COMMON1")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, coleco_hand_controller_device, keypad_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(coleco_hand_controller_device, keypad_r)
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
diff --git a/src/devices/bus/coleco/controller/sac.cpp b/src/devices/bus/coleco/controller/sac.cpp
index 0a47ac4be7a..7621897c78d 100644
--- a/src/devices/bus/coleco/controller/sac.cpp
+++ b/src/devices/bus/coleco/controller/sac.cpp
@@ -57,7 +57,7 @@ static INPUT_PORTS_START( coleco_super_action_controller )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("COMMON1")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, coleco_super_action_controller_device, keypad_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(coleco_super_action_controller_device, keypad_r)
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
diff --git a/src/devices/bus/sms_ctrl/paddle.cpp b/src/devices/bus/sms_ctrl/paddle.cpp
index 4f366697218..06f1c9bfa16 100644
--- a/src/devices/bus/sms_ctrl/paddle.cpp
+++ b/src/devices/bus/sms_ctrl/paddle.cpp
@@ -60,11 +60,11 @@ READ_LINE_MEMBER( sms_paddle_device::tr_pin_r )
static INPUT_PORTS_START( sms_paddle )
PORT_START("CTRL_PORT")
- PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_paddle_device, rldu_pins_r, nullptr) // R,L,D,U
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sms_paddle_device, rldu_pins_r) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_paddle_device, tr_pin_r ) // TR
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_paddle_device, tr_pin_r) // TR
PORT_START("PADDLE_X") // Paddle knob
PORT_BIT( 0xff, 0x80, IPT_PADDLE) PORT_SENSITIVITY(40) PORT_KEYDELTA(20) PORT_CENTERDELTA(0) PORT_MINMAX(0,255)
diff --git a/src/devices/bus/sms_ctrl/sports.cpp b/src/devices/bus/sms_ctrl/sports.cpp
index 2cca6cd069b..5a4809d3573 100644
--- a/src/devices/bus/sms_ctrl/sports.cpp
+++ b/src/devices/bus/sms_ctrl/sports.cpp
@@ -120,17 +120,17 @@ CUSTOM_INPUT_MEMBER( sms_sports_pad_device::rldu_pins_r )
static INPUT_PORTS_START( sms_sports_pad )
PORT_START("SPORTS_IN")
- PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_device, rldu_pins_r, nullptr) // R,L,D,U
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sms_sports_pad_device, rldu_pins_r) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) // TL (Button 1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_r) // TH
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_sports_pad_device, th_pin_r) // TH
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) // TR (Button 2)
PORT_START("SPORTS_OUT")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNUSED ) // Directional pins
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED ) // TL (Button 1)
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER(DEVICE_SELF, sms_sports_pad_device, th_pin_w) // TH
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OUTPUT ) PORT_WRITE_LINE_MEMBER(sms_sports_pad_device, th_pin_w) // TH
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED ) // TR (Button 2)
PORT_START("SPORTS_X") /* Sports Pad X axis */
diff --git a/src/devices/bus/sms_ctrl/sportsjp.cpp b/src/devices/bus/sms_ctrl/sportsjp.cpp
index 76c8e607e57..a0c2a69d2ad 100644
--- a/src/devices/bus/sms_ctrl/sportsjp.cpp
+++ b/src/devices/bus/sms_ctrl/sportsjp.cpp
@@ -65,11 +65,11 @@ CUSTOM_INPUT_MEMBER( sms_sports_pad_jp_device::rldu_pins_r ) { return ~(m_rldu_p
static INPUT_PORTS_START( sms_sports_pad_jp )
PORT_START("SPORTS_JP_IN")
- PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sms_sports_pad_jp_device, rldu_pins_r, nullptr) // R,L,D,U
+ PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sms_sports_pad_jp_device, rldu_pins_r) // R,L,D,U
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) // Vcc
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_sports_pad_jp_device, tl_pin_r ) // TL
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_sports_pad_jp_device, tl_pin_r) // TL
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // TH
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER( DEVICE_SELF, sms_sports_pad_jp_device, tr_pin_r ) // TR
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sms_sports_pad_jp_device, tr_pin_r) // TR
PORT_START("SPORTS_JP_BT") /* Sports Pad buttons nibble */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
diff --git a/src/devices/machine/sensorboard.cpp b/src/devices/machine/sensorboard.cpp
index 8a809fe7a73..18f20adf510 100644
--- a/src/devices/machine/sensorboard.cpp
+++ b/src/devices/machine/sensorboard.cpp
@@ -730,7 +730,7 @@ static INPUT_PORTS_START( sensorboard )
PORT_START("UI")
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1, NOTEQUALS, 0) PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_NAME("Modifier 2 / Force Sensor") // hold while clicking to force sensor (ignore piece)
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 1, NOTEQUALS, 0) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(KEYCODE_RCONTROL) PORT_NAME("Modifier 1 / Force Piece") // hold while clicking to force piece (ignore sensor)
- PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_sensor_busy, nullptr) // check if any sensor is busy / pressed (read-only)
+ PORT_BIT(0x0004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_sensor_busy) // check if any sensor is busy / pressed (read-only)
PORT_BIT(0x0008, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_hand, 0) PORT_NAME("Remove Piece")
PORT_BIT(0x0010, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 0) PORT_NAME("Undo Buffer First")
PORT_BIT(0x0020, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_undo, 1) PORT_NAME("Undo Buffer Previous")
@@ -740,13 +740,13 @@ static INPUT_PORTS_START( sensorboard )
PORT_BIT(0x0200, IP_ACTIVE_HIGH, IPT_OTHER) PORT_CONDITION("UI_CHECK", 2, NOTEQUALS, 0) PORT_CHANGED_MEMBER(DEVICE_SELF, sensorboard_device, ui_init, 1) PORT_NAME("Board Reset")
PORT_START("BS_CHECK") // board size (internal use)
- PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_bs_mask, nullptr)
+ PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_bs_mask)
PORT_START("SS_CHECK") // spawn size (internal use)
- PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_ss_mask, nullptr)
+ PORT_BIT( 0xffffffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_ss_mask)
PORT_START("UI_CHECK") // UI enabled (internal use)
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sensorboard_device, check_ui_enabled, nullptr)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(sensorboard_device, check_ui_enabled)
INPUT_PORTS_END
ioport_constructor sensorboard_device::device_input_ports() const
diff --git a/src/emu/ioport.cpp b/src/emu/ioport.cpp
index 58d076607d8..c65a5cb582b 100644
--- a/src/emu/ioport.cpp
+++ b/src/emu/ioport.cpp
@@ -597,7 +597,6 @@ ioport_field::ioport_field(ioport_port &port, ioport_type type, ioport_value def
m_flags(0),
m_impulse(0),
m_name(name),
- m_read_param(nullptr),
m_write_param(0),
m_digital_value(false),
m_min(0),
@@ -1210,7 +1209,7 @@ void ioport_field::crosshair_position(float &x, float &y, bool &gotx, bool &goty
// apply custom mapping if necessary
if (!m_crosshair_mapper.isnull())
- value = m_crosshair_mapper(*this, value);
+ value = m_crosshair_mapper(value);
// handle X axis
if (m_crosshair_axis == CROSSHAIR_AXIS_X)
@@ -3189,7 +3188,7 @@ void dynamic_field::read(ioport_value &result)
return;
// call the callback to read a new value
- ioport_value newval = m_field.m_read(m_field, m_field.m_read_param);
+ ioport_value newval = m_field.m_read();
m_oldval = newval;
// merge in the bits (don't invert yet, as all digitals are inverted together)
diff --git a/src/emu/ioport.h b/src/emu/ioport.h
index ff93dbc6eb8..df7d2ad026b 100644
--- a/src/emu/ioport.h
+++ b/src/emu/ioport.h
@@ -653,9 +653,9 @@ enum
typedef void(*ioport_constructor)(device_t &owner, ioport_list &portlist, std::string &errorbuf);
// I/O port callback function delegates
-typedef device_delegate<ioport_value (ioport_field &, void *)> ioport_field_read_delegate;
+typedef device_delegate<ioport_value ()> ioport_field_read_delegate;
typedef device_delegate<void (ioport_field &, u32, ioport_value, ioport_value)> ioport_field_write_delegate;
-typedef device_delegate<float (ioport_field &, float)> ioport_field_crossmap_delegate;
+typedef device_delegate<float (float)> ioport_field_crossmap_delegate;
// ======================> inp_header
@@ -1128,7 +1128,6 @@ private:
const char * m_name; // user-friendly name to display
input_seq m_seq[SEQ_TYPE_TOTAL];// sequences of all types
ioport_field_read_delegate m_read; // read callback routine
- void * m_read_param; // parameter for read callback routine
ioport_field_write_delegate m_write; // write callback routine
u32 m_write_param; // parameter for write callback routine
@@ -1525,7 +1524,7 @@ public:
ioport_configurer& field_set_analog_wraps() { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_WRAPS; return *this; }
ioport_configurer& field_set_remap_table(const ioport_value *table) { m_curfield->m_remap_table = table; return *this; }
ioport_configurer& field_set_analog_invert() { m_curfield->m_flags |= ioport_field::ANALOG_FLAG_INVERT; return *this; }
- ioport_configurer& field_set_dynamic_read(ioport_field_read_delegate delegate, void *param = nullptr) { m_curfield->m_read = delegate; m_curfield->m_read_param = param; return *this; }
+ ioport_configurer& field_set_dynamic_read(ioport_field_read_delegate delegate) { m_curfield->m_read = delegate; return *this; }
ioport_configurer& field_set_dynamic_write(ioport_field_write_delegate delegate, u32 param = 0) { m_curfield->m_write = delegate; m_curfield->m_write_param = param; return *this; }
ioport_configurer& field_set_diplocation(const char *location) { m_curfield->expand_diplocation(location, m_errorbuf); return *this; }
@@ -1556,16 +1555,16 @@ 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(ioport_field &field, void *param)
-#define DECLARE_CUSTOM_INPUT_MEMBER(name) ioport_value name(ioport_field &field, void *param)
+#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)
// macro for port changed callback functions (PORT_CROSSHAIR_MAPPER)
-#define CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value)
-#define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(ioport_field &field, float linear_value)
+#define CROSSHAIR_MAPPER_MEMBER(name) float name(float linear_value)
+#define DECLARE_CROSSHAIR_MAPPER_MEMBER(name) float name(float linear_value)
// macro for wrapping a default string
#define DEF_STR(str_num) ((const char *)INPUT_STRING_##str_num)
@@ -1710,18 +1709,24 @@ ATTR_COLD void INPUT_PORTS_NAME(_name)(device_t &owner, ioport_list &portlist, s
configurer.field_set_analog_invert();
// read callbacks
-#define PORT_CUSTOM_MEMBER(_device, _class, _member, _param) \
- configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr), (void *)(_param));
+#define PORT_CUSTOM_MEMBER(_class, _member) \
+ configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, DEVICE_SELF, (_class *)nullptr));
+#define PORT_CUSTOM_DEVICE_MEMBER(_device, _class, _member) \
+ configurer.field_set_dynamic_read(ioport_field_read_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr));
// write callbacks
#define PORT_CHANGED_MEMBER(_device, _class, _member, _param) \
configurer.field_set_dynamic_write(ioport_field_write_delegate(&_class::_member, #_class "::" #_member, _device, (_class *)nullptr), (_param));
// input device handler
+#define PORT_READ_LINE_MEMBER(_class, _member) \
+ configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, DEVICE_SELF, (_class *)nullptr));
#define PORT_READ_LINE_DEVICE_MEMBER(_device, _class, _member) \
- configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device, ioport_field &field, void *param)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)nullptr));
+ configurer.field_set_dynamic_read(ioport_field_read_delegate([](_class &device)->ioport_value { return (device._member() & 1) ? ~ioport_value(0) : 0; } , #_class "::" #_member, _device, (_class *)nullptr));
// output device handler
+#define PORT_WRITE_LINE_MEMBER(_class, _member) \
+ configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, u32 param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, DEVICE_SELF, (_class *)nullptr));
#define PORT_WRITE_LINE_DEVICE_MEMBER(_device, _class, _member) \
configurer.field_set_dynamic_write(ioport_field_write_delegate([](_class &device, ioport_field &field, u32 param, ioport_value oldval, ioport_value newval) { device._member(newval); }, #_class "::" #_member, _device, (_class *)nullptr));
diff --git a/src/mame/audio/gottlieb.cpp b/src/mame/audio/gottlieb.cpp
index 222b2e1ed08..cbab96454e2 100644
--- a/src/mame/audio/gottlieb.cpp
+++ b/src/mame/audio/gottlieb.cpp
@@ -647,7 +647,7 @@ INPUT_PORTS_START( gottlieb_sound_r2 )
PORT_DIPNAME( 0x40, 0x40, "Sound Test" ) PORT_DIPLOCATION("SB2:7")
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_sound_r2_device, speech_drq_custom_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_sound_r2_device, speech_drq_custom_r)
INPUT_PORTS_END
diff --git a/src/mame/audio/snk6502.cpp b/src/mame/audio/snk6502.cpp
index 94e647db077..ef691cce2c1 100644
--- a/src/mame/audio/snk6502.cpp
+++ b/src/mame/audio/snk6502.cpp
@@ -319,9 +319,9 @@ void snk6502_sound_device::set_music_clock(double clock_time)
m_tone_clock = 0;
}
-CUSTOM_INPUT_MEMBER(snk6502_sound_device::music0_playing)
+READ_LINE_MEMBER(snk6502_sound_device::music0_playing)
{
- return m_tone_channels[0].mute ? 0x01 : 0x00;
+ return m_tone_channels[0].mute ? 1 : 0;
}
void snk6502_sound_device::set_channel_base(int channel, int base, int mask)
diff --git a/src/mame/audio/snk6502.h b/src/mame/audio/snk6502.h
index 354fca29081..244e6218b19 100644
--- a/src/mame/audio/snk6502.h
+++ b/src/mame/audio/snk6502.h
@@ -19,7 +19,7 @@ class snk6502_sound_device : public device_t, public device_sound_interface
public:
snk6502_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- DECLARE_CUSTOM_INPUT_MEMBER(music0_playing);
+ DECLARE_READ_LINE_MEMBER(music0_playing);
void set_music_freq(int freq);
void set_music_clock(double clock_time);
diff --git a/src/mame/drivers/8080bw.cpp b/src/mame/drivers/8080bw.cpp
index dd0cd620792..1758ad9115e 100644
--- a/src/mame/drivers/8080bw.cpp
+++ b/src/mame/drivers/8080bw.cpp
@@ -245,7 +245,7 @@ static INPUT_PORTS_START( sicv )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2")
@@ -260,7 +260,7 @@ static INPUT_PORTS_START( sicv )
PORT_DIPSETTING( 0x00, "1500" )
/* SW1:5,6,7: In OFF, PL2 can have no control of joystick, going auto left/right and other problems like no laser gun.
Be sure these are always ON */
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr) PORT_DIPLOCATION("SW1:5,6,7") /* Labeled as "FACTORY" */
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r) PORT_DIPLOCATION("SW1:5,6,7") // Labeled as "FACTORY"
PORT_DIPNAME( 0x80, 0x00, "Coin Info" ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -318,7 +318,7 @@ static INPUT_PORTS_START( alieninv )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
@@ -330,7 +330,7 @@ static INPUT_PORTS_START( alieninv )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_DIPLOCATION("SW1:3") /* Pence Coin */
PORT_DIPUNKNOWN_DIPLOC( 0x08, 0x08, "SW1:4" ) /* Not bonus */
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr) PORT_DIPLOCATION("SW1:5,6,7")
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r) PORT_DIPLOCATION("SW1:5,6,7")
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Coinage ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x00, "2C/1C 50p/3C (+ Bonus Life)" )
PORT_DIPSETTING( 0x80, "1C/1C 50p/5C" )
@@ -1722,7 +1722,7 @@ void _8080bw_state::crashrd(machine_config &config)
/* */
/*******************************************************/
-CUSTOM_INPUT_MEMBER(_8080bw_state::sflush_80_r)
+READ_LINE_MEMBER(_8080bw_state::sflush_80_r)
{
return (m_screen->vpos() & 0x80) ? 1 : 0;
}
@@ -1775,7 +1775,7 @@ static INPUT_PORTS_START( sflush )
PORT_DIPNAME( 0x40, 0x00, "Coinage Display" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x40, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state,sflush_80_r, nullptr) // 128V?
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(_8080bw_state, sflush_80_r) // 128V?
PORT_START("PADDLE")
PORT_BIT( 0xff, 0x6a, IPT_PADDLE ) PORT_MINMAX(0x16,0xbf) PORT_SENSITIVITY(30) PORT_KEYDELTA(30) PORT_CENTERDELTA(0)
@@ -2249,7 +2249,7 @@ static INPUT_PORTS_START( yosakdon )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
@@ -2264,7 +2264,7 @@ static INPUT_PORTS_START( yosakdon )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
/* Dummy controls port, P1 */
@@ -3173,7 +3173,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(_8080bw_state::claybust_gun_callback)
m_claybust_gun_pos = 0;
}
-CUSTOM_INPUT_MEMBER(_8080bw_state::claybust_gun_on_r)
+READ_LINE_MEMBER(_8080bw_state::claybust_gun_on_r)
{
return (m_claybust_gun_pos != 0) ? 1 : 0;
}
@@ -3231,7 +3231,7 @@ void _8080bw_state::claybust_io_map(address_map &map)
static INPUT_PORTS_START( claybust )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_on_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(_8080bw_state, claybust_gun_on_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_IMPULSE(2) PORT_CHANGED_MEMBER(DEVICE_SELF, _8080bw_state, claybust_gun_trigger, 0)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
@@ -3323,7 +3323,7 @@ static INPUT_PORTS_START( galactic )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2")
@@ -3338,7 +3338,7 @@ static INPUT_PORTS_START( galactic )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "6" )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Dummy controls port, P1 */
@@ -3446,17 +3446,17 @@ static INPUT_PORTS_START( invmulti )
/* same as Midway Space Invaders, except that SW is unused */
PORT_START("IN0")
PORT_DIPUNUSED_DIPLOC( 0x01, 0x00, "SW:8" )
- PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, nullptr)
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_sw6_sw7_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in0_control_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_sw5_r)
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_coin_input_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
@@ -3464,7 +3464,7 @@ static INPUT_PORTS_START( invmulti )
PORT_DIPUNUSED_DIPLOC( 0x02, 0x00, "SW:4" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_DIPUNUSED_DIPLOC( 0x08, 0x00, "SW:2" )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "SW:1" )
/* fake port for reading the coin input */
diff --git a/src/mame/drivers/acefruit.cpp b/src/mame/drivers/acefruit.cpp
index c3ebc08de7b..96d9c1219ef 100644
--- a/src/mame/drivers/acefruit.cpp
+++ b/src/mame/drivers/acefruit.cpp
@@ -43,9 +43,9 @@ public:
void init_sidewndr();
- DECLARE_CUSTOM_INPUT_MEMBER(sidewndr_payout_r);
- DECLARE_CUSTOM_INPUT_MEMBER(starspnr_coinage_r);
- DECLARE_CUSTOM_INPUT_MEMBER(starspnr_payout_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(sidewndr_payout_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(starspnr_coinage_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(starspnr_payout_r);
protected:
enum
@@ -229,56 +229,53 @@ uint32_t acefruit_state::screen_update_acefruit(screen_device &screen, bitmap_in
return 0;
}
-CUSTOM_INPUT_MEMBER(acefruit_state::sidewndr_payout_r)
+template <int Mask>
+READ_LINE_MEMBER(acefruit_state::sidewndr_payout_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x01:
- return ((m_port_payout->read() & bit_mask) >> 0);
+ return ((m_port_payout->read() & Mask) >> 0);
case 0x02:
- return ((m_port_payout->read() & bit_mask) >> 1);
+ return ((m_port_payout->read() & Mask) >> 1);
default:
- logerror("sidewndr_payout_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("sidewndr_payout_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
-CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_coinage_r)
+template <int Mask>
+READ_LINE_MEMBER(acefruit_state::starspnr_coinage_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x01:
- return ((m_port_coinage->read() & bit_mask) >> 0);
+ return ((m_port_coinage->read() & Mask) >> 0);
case 0x02:
- return ((m_port_coinage->read() & bit_mask) >> 1);
+ return ((m_port_coinage->read() & Mask) >> 1);
case 0x04:
- return ((m_port_coinage->read() & bit_mask) >> 2);
+ return ((m_port_coinage->read() & Mask) >> 2);
case 0x08:
- return ((m_port_coinage->read() & bit_mask) >> 3);
+ return ((m_port_coinage->read() & Mask) >> 3);
default:
- logerror("starspnr_coinage_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("starspnr_coinage_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
-CUSTOM_INPUT_MEMBER(acefruit_state::starspnr_payout_r)
+template <int Mask>
+READ_LINE_MEMBER(acefruit_state::starspnr_payout_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x01:
- return ((m_port_payout->read() & bit_mask) >> 0);
+ return ((m_port_payout->read() & Mask) >> 0);
case 0x02:
- return ((m_port_payout->read() & bit_mask) >> 1);
+ return ((m_port_payout->read() & Mask) >> 1);
case 0x04:
- return ((m_port_payout->read() & bit_mask) >> 2);
+ return ((m_port_payout->read() & Mask) >> 2);
default:
- logerror("starspnr_payout_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("starspnr_payout_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@@ -383,14 +380,14 @@ static INPUT_PORTS_START( sidewndr )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME( "Cancel/Clear" )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME( "Refill" ) PORT_TOGGLE
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 ) /* "Token in" - also "Refill" when "Refill" mode ON */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,sidewndr_payout_r, (void *)0x01)
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, sidewndr_payout_r<0x01>)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN3") // 3
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_NAME( "Hold/Nudge 1" )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME( "Accountancy System" ) PORT_TOGGLE
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN4 ) /* "50P in" */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,sidewndr_payout_r, (void *)0x02)
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, sidewndr_payout_r<0x02>)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN4") // 4
@@ -497,7 +494,7 @@ static INPUT_PORTS_START( starspnr )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Collect/Cancel" )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN2 )
/* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x08) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x08>) /* to be confirmed */
PORT_START("IN2") // 2
/* tested at 0xe83c */
@@ -507,7 +504,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xef82 after IN5 bit 1 and after IN1 bit 3 - after coins are tested - table at 0xefa8 (3 bytes) */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0xeeba with IN3 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x02) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x02>) /* to be confirmed */
/* tested at 0x1b0f */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -516,7 +513,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xe8ea and 0xecbe */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0xeeba with IN2 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x01) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x01>) /* to be confirmed */
/* tested at 0x0178 */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -527,7 +524,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xed86 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0xeed7 with IN1 bit 3 - before coins are tested - table at 0xef55 (4 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_coinage_r, (void *)0x04) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_coinage_r<0x04>) /* to be confirmed */
PORT_START("IN5") // 5
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME( "Hold 3" )
@@ -536,7 +533,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xec6f */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0x1d60 with IN6 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x01) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_payout_r<0x01>) /* to be confirmed */
/* tested at 0xe312 and 0xe377 */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -545,7 +542,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xee42, 0xee5e and 0xeff5 before IN1 bit 0 - invalid code after 0xf000 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0x1d60 with IN5 bit 3 and IN7 bit 3 - table at 0x1d90 (8 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x02) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_payout_r<0x02>) /* to be confirmed */
/* tested at 0xe8dd and 0xec1c */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -557,7 +554,7 @@ static INPUT_PORTS_START( starspnr )
/* tested at 0xedcb */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* tested at 0x1d60 with IN5 bit 3 and IN6 bit 3 - table at 0x1d90 (8 * 3 bytes) */
- PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, acefruit_state,starspnr_payout_r, (void *)0x04) /* to be confirmed */
+ PORT_BIT( 0x08, 0x00, IPT_CUSTOM) PORT_READ_LINE_MEMBER(acefruit_state, starspnr_payout_r<0x04>) /* to be confirmed */
/* tested at 0xec2a */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/aci_ggm.cpp b/src/mame/drivers/aci_ggm.cpp
index 5814963e2c8..1c740817b8d 100644
--- a/src/mame/drivers/aci_ggm.cpp
+++ b/src/mame/drivers/aci_ggm.cpp
@@ -411,7 +411,7 @@ static INPUT_PORTS_START( ggm )
PORT_CONFSETTING( 0x03, "Steinitz" )
PORT_START("IN.6")
- PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, ggm_state, overlay_r, nullptr)
+ PORT_BIT(0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(ggm_state, overlay_r)
INPUT_PORTS_END
diff --git a/src/mame/drivers/alg.cpp b/src/mame/drivers/alg.cpp
index 2cb251611c7..352fda8a519 100644
--- a/src/mame/drivers/alg.cpp
+++ b/src/mame/drivers/alg.cpp
@@ -48,8 +48,8 @@ public:
{ }
DECLARE_CUSTOM_INPUT_MEMBER(lightgun_pos_r);
- DECLARE_CUSTOM_INPUT_MEMBER(lightgun_trigger_r);
- DECLARE_CUSTOM_INPUT_MEMBER(lightgun_holster_r);
+ DECLARE_READ_LINE_MEMBER(lightgun_trigger_r);
+ DECLARE_READ_LINE_MEMBER(lightgun_holster_r);
void init_aplatoon();
void init_palr3();
@@ -155,14 +155,14 @@ CUSTOM_INPUT_MEMBER(alg_state::lightgun_pos_r)
}
-CUSTOM_INPUT_MEMBER(alg_state::lightgun_trigger_r)
+READ_LINE_MEMBER(alg_state::lightgun_trigger_r)
{
/* read the trigger control based on the input select */
return (m_triggers->read() >> m_input_select) & 1;
}
-CUSTOM_INPUT_MEMBER(alg_state::lightgun_holster_r)
+READ_LINE_MEMBER(alg_state::lightgun_holster_r)
{
/* read the holster control based on the input select */
return (m_triggers->read() >> (2 + m_input_select)) & 1;
@@ -230,11 +230,11 @@ void alg_state::main_map_picmatic(address_map &map)
static INPUT_PORTS_START( alg )
PORT_START("joy_0_dat") /* read by Amiga core */
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, (void *)0)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(alg_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("joy_1_dat") /* read by Amiga core */
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,amiga_joystick_convert, (void *)1)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(alg_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("potgo") /* read by Amiga core */
@@ -245,7 +245,7 @@ static INPUT_PORTS_START( alg )
PORT_BIT( 0xaaff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("HVPOS") /* read by Amiga core */
- PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_pos_r, nullptr)
+ PORT_BIT( 0x1ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(alg_state, lightgun_pos_r)
PORT_START("FIRE")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(1)
@@ -276,13 +276,13 @@ static INPUT_PORTS_START( alg_2p )
PORT_MODIFY("potgo")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_trigger_r, nullptr)
+ PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(alg_state, lightgun_trigger_r)
PORT_MODIFY("FIRE")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("p2_joy")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, alg_state,lightgun_holster_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(alg_state, lightgun_holster_r)
PORT_START("GUN2X") /* referenced by lightgun_pos_r */
PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_PLAYER(2)
diff --git a/src/mame/drivers/amiga.cpp b/src/mame/drivers/amiga.cpp
index d19165cd21c..ec51d490bc1 100644
--- a/src/mame/drivers/amiga.cpp
+++ b/src/mame/drivers/amiga.cpp
@@ -552,7 +552,7 @@ public:
u16 handle_joystick_potgor(u16 potgor);
DECLARE_CUSTOM_INPUT_MEMBER( cd32_input );
- DECLARE_CUSTOM_INPUT_MEMBER( cd32_sel_mirror_input );
+ template <int P> DECLARE_READ_LINE_MEMBER( cd32_sel_mirror_input );
void init_pal();
void init_ntsc();
@@ -1146,9 +1146,10 @@ CUSTOM_INPUT_MEMBER( cd32_state::cd32_input )
return handle_joystick_potgor(m_potgo_value) >> 8;
}
-CUSTOM_INPUT_MEMBER( cd32_state::cd32_sel_mirror_input )
+template <int P>
+READ_LINE_MEMBER( cd32_state::cd32_sel_mirror_input )
{
- u8 bits = m_player_ports[(int)(uintptr_t)param]->read();
+ u8 bits = m_player_ports[P]->read();
return (bits & 0x20)>>5;
}
@@ -1459,6 +1460,22 @@ void a4000_state::a4000t_mem(address_map &map)
// INPUTS
//**************************************************************************
+template <int P>
+CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
+{
+ uint8_t bits = m_joy_ports[P].read_safe(0xff);
+
+ int up = (bits >> 0) & 1;
+ int down = (bits >> 1) & 1;
+ int left = (bits >> 2) & 1;
+ int right = (bits >> 3) & 1;
+
+ if (left) up ^= 1;
+ if (right) down ^= 1;
+
+ return down | (right << 1) | (up << 8) | (left << 9);
+}
+
static INPUT_PORTS_START( amiga )
PORT_START("input")
PORT_CONFNAME(0x10, 0x00, "Game Port 0 Device")
@@ -1469,16 +1486,16 @@ static INPUT_PORTS_START( amiga )
PORT_CONFSETTING(0x20, DEF_STR(Joystick) )
PORT_START("cia_0_port_a")
- PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, floppy_drive_status, (void *)0)
+ PORT_BIT(0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(amiga_state, floppy_drive_status)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
PORT_START("joy_0_dat")
- PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)0)
+ PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<0>)
PORT_BIT(0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("joy_1_dat")
- PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)1)
+ PORT_BIT(0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<1>)
PORT_BIT(0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_START("potgo")
@@ -1519,19 +1536,19 @@ INPUT_PORTS_START( cd32 )
PORT_MODIFY("cia_0_port_a")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_CUSTOM )
// this is the regular port for reading a single button joystick on the Amiga, many CD32 games require this to mirror the pad start button!
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state, cd32_sel_mirror_input, (void *)0)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state, cd32_sel_mirror_input, (void *)1)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cd32_state, cd32_sel_mirror_input<0>)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cd32_state, cd32_sel_mirror_input<1>)
PORT_MODIFY("joy_0_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)0)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("joy_1_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, amiga_state, amiga_joystick_convert, (void *)1)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(amiga_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("potgo")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cd32_state, cd32_input, (void *)0)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cd32_state, cd32_input)
PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED )
// CD32 '11' button pad (4 dpad directions + 7 buttons), not read directly
diff --git a/src/mame/drivers/aristmk5.cpp b/src/mame/drivers/aristmk5.cpp
index d0c3761394f..95aec608b5b 100644
--- a/src/mame/drivers/aristmk5.cpp
+++ b/src/mame/drivers/aristmk5.cpp
@@ -704,7 +704,7 @@ public:
INPUT_CHANGED_MEMBER(coin_start);
CUSTOM_INPUT_MEMBER(coin_r);
CUSTOM_INPUT_MEMBER(coin_usa_r);
- CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_WRITE32_MEMBER(Ns5w48);
@@ -1213,7 +1213,7 @@ void aristmk5_state::aristmk5_drame_map(address_map &map)
}
-CUSTOM_INPUT_MEMBER(aristmk5_state::hopper_r)
+READ_LINE_MEMBER(aristmk5_state::hopper_r)
{
return (m_hopper_test && m_hopper->line_r()) ? 0 : 1;
}
@@ -1388,7 +1388,7 @@ static INPUT_PORTS_START( aristmk5_usa )
PORT_BIT(0x00000080, IP_ACTIVE_HIGH, IPT_GAMBLE_DOOR) PORT_CODE(KEYCODE_C) PORT_TOGGLE PORT_NAME("Cashbox door")
PORT_START("P4")
- PORT_BIT(0x00000078, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, aristmk5_state, coin_usa_r, nullptr)
+ PORT_BIT(0x00000078, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(aristmk5_state, coin_usa_r)
PORT_START("P5")
PORT_BIT(0x00000008, IP_ACTIVE_LOW, IPT_OTHER) // Meters
@@ -1442,8 +1442,8 @@ static INPUT_PORTS_START( aristmk5 )
PORT_BIT(0x00c00000, IP_ACTIVE_HIGH, IPT_UNUSED) // Unused mechanical security switch
PORT_START("P3")
- PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_CUSTOM_MEMBER(DEVICE_SELF, aristmk5_state, hopper_r, nullptr)
- PORT_BIT(0x000000f8, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, aristmk5_state, coin_r, nullptr)
+ PORT_BIT(0x00000002, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_READ_LINE_MEMBER(aristmk5_state, hopper_r)
+ PORT_BIT(0x000000f8, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(aristmk5_state, coin_r)
PORT_START("P6")
PORT_BIT(0x00000002, IP_ACTIVE_LOW, IPT_OTHER) // Battery
diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp
index 55b284416a7..83bf0c53aa5 100644
--- a/src/mame/drivers/arkanoid.cpp
+++ b/src/mame/drivers/arkanoid.cpp
@@ -1010,7 +1010,7 @@ static INPUT_PORTS_START( arkanoid )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state, arkanoid_semaphore_input_r, nullptr) // Z80 and MCU Semaphores
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arkanoid_state, arkanoid_semaphore_input_r) // Z80 and MCU Semaphores
PORT_START("SYSTEM2") // these are the secondary "RH" joystick ports for P1 and P2; the circuitry to read them is populated on the arkanoid PCB, but the game never actually reads these.
/*PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP )
diff --git a/src/mame/drivers/arsystems.cpp b/src/mame/drivers/arsystems.cpp
index c4d09ecfc49..3dc38a177c9 100644
--- a/src/mame/drivers/arsystems.cpp
+++ b/src/mame/drivers/arsystems.cpp
@@ -89,7 +89,7 @@ public:
void init_argh();
DECLARE_WRITE16_MEMBER(arcadia_multibios_change_game);
- DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r);
+ template <int Coin> DECLARE_CUSTOM_INPUT_MEMBER(coin_counter_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_changed_callback);
DECLARE_WRITE8_MEMBER(arcadia_cia_0_portb_w);
@@ -162,12 +162,11 @@ WRITE8_MEMBER(arcadia_amiga_state::arcadia_cia_0_portb_w)
*
*************************************/
+template <int Coin>
CUSTOM_INPUT_MEMBER(arcadia_amiga_state::coin_counter_r)
{
- int coin = (uintptr_t)param;
-
/* return coin counter values */
- return m_coin_counter[coin] & 3;
+ return m_coin_counter[Coin] & 3;
}
@@ -257,15 +256,15 @@ static INPUT_PORTS_START( arcadia )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, (void *)0)
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,coin_counter_r, (void *)1)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, coin_counter_r<0>)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, coin_counter_r<1>)
PORT_START("joy_0_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, (void *)0)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("joy_1_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arcadia_amiga_state,amiga_joystick_convert, (void *)1)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(arcadia_amiga_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("potgo")
diff --git a/src/mame/drivers/artmagic.cpp b/src/mame/drivers/artmagic.cpp
index 79548718334..3189eb3d0f0 100644
--- a/src/mame/drivers/artmagic.cpp
+++ b/src/mame/drivers/artmagic.cpp
@@ -371,7 +371,7 @@ void artmagic_state::stonebal_protection()
}
-CUSTOM_INPUT_MEMBER(artmagic_state::prot_r)
+READ_LINE_MEMBER(artmagic_state::prot_r)
{
return m_prot_output_bit;
}
@@ -599,8 +599,8 @@ static INPUT_PORTS_START( cheesech )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("30000a")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, nullptr) /* protection data */
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* protection ready */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(artmagic_state, prot_r) // protection data
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) // protection ready
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -791,8 +791,8 @@ static INPUT_PORTS_START( shtstar )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("3c000a")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, artmagic_state,prot_r, nullptr) /* protection data */
- PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* protection ready */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(artmagic_state, prot_r) // protection data
+ PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_CUSTOM ) // protection ready
PORT_BIT( 0x00fc, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/asteroid.cpp b/src/mame/drivers/asteroid.cpp
index 1a59ce4c4ca..1e18d8b4eba 100644
--- a/src/mame/drivers/asteroid.cpp
+++ b/src/mame/drivers/asteroid.cpp
@@ -389,7 +389,7 @@ void asteroid_state::llander_map(address_map &map)
*
*************************************/
-CUSTOM_INPUT_MEMBER(asteroid_state::clock_r)
+READ_LINE_MEMBER(asteroid_state::clock_r)
{
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
}
@@ -398,8 +398,8 @@ static INPUT_PORTS_START( asteroid )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN )
/* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
@@ -458,7 +458,7 @@ static INPUT_PORTS_START( asteroidb )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Bit 7 is VG_HALT */
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_MODIFY("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@@ -495,9 +495,9 @@ static INPUT_PORTS_START( asterock )
PORT_MODIFY("IN0")
/* Bit 0 is VG_HALT and Bit 2 is the 3 KHz source */
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
@@ -537,8 +537,8 @@ static INPUT_PORTS_START( astdelux )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED ) /* According to schematics */
/* Bit 2 is the 3 KHz source and Bit 3 the VG_HALT bit */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON5 ) PORT_CODE(KEYCODE_SPACE) PORT_CODE(JOYCODE_BUTTON3) /* hyperspace */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_CODE(KEYCODE_LCONTROL) PORT_CODE(JOYCODE_BUTTON1) /* fire */
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
@@ -625,12 +625,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( llander )
PORT_START("IN0")
/* Bit 0 is VG_HALT */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
PORT_SERVICE( 0x02, IP_ACTIVE_LOW )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
/* Of the rest, Bit 6 is the 3KHz source. 3,4 and 5 are unknown */
PORT_BIT( 0x38, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, asteroid_state,clock_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(asteroid_state, clock_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
PORT_START("IN1")
diff --git a/src/mame/drivers/astrocde.cpp b/src/mame/drivers/astrocde.cpp
index ad983c5553e..ece42b777cf 100644
--- a/src/mame/drivers/astrocde.cpp
+++ b/src/mame/drivers/astrocde.cpp
@@ -404,7 +404,7 @@ WRITE8_MEMBER(astrocde_state::votrax_speech_w)
}
-CUSTOM_INPUT_MEMBER( astrocde_state::votrax_speech_status_r )
+READ_LINE_MEMBER( astrocde_state::votrax_speech_status_r )
{
return m_votrax->request();
}
@@ -723,7 +723,7 @@ static INPUT_PORTS_START( ebases )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x00, "S1:8" )
PORT_START("P4HANDLE")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ebases_state, trackball_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ebases_state, trackball_r)
PORT_START("TRACKX1")
PORT_BIT( 0xff, 0x00, IPT_TRACKBALL_X ) PORT_SENSITIVITY(50) PORT_KEYDELTA(10) PORT_RESET
@@ -838,7 +838,7 @@ static INPUT_PORTS_START( wow )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, votrax_speech_status_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(astrocde_state, votrax_speech_status_r)
PORT_START("P4HANDLE")
/* "If S1:1,2,3 are all ON or all OFF, only coin meter number 1 will count." */
@@ -908,7 +908,7 @@ static INPUT_PORTS_START( gorf )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrocde_state, votrax_speech_status_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(astrocde_state, votrax_speech_status_r)
PORT_START("P4HANDLE")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("S1:1")
@@ -1055,7 +1055,7 @@ static INPUT_PORTS_START( demndrgn )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("P2HANDLE")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, demndrgn_state, joystick_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(demndrgn_state, joystick_r)
PORT_START("P3HANDLE")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/astrof.cpp b/src/mame/drivers/astrof.cpp
index 7864d161b7c..2556459885d 100644
--- a/src/mame/drivers/astrof.cpp
+++ b/src/mame/drivers/astrof.cpp
@@ -624,8 +624,8 @@ static INPUT_PORTS_START( astrof )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -679,8 +679,8 @@ static INPUT_PORTS_START( abattle )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -734,8 +734,8 @@ static INPUT_PORTS_START( spfghmk2 )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -785,8 +785,8 @@ static INPUT_PORTS_START( spfghmk22 )
PORT_START("IN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p1_controls_r, nullptr)
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,astrof_p2_controls_r, nullptr)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p1_controls_r)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, astrof_p2_controls_r)
PORT_START("P1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
@@ -839,7 +839,7 @@ static INPUT_PORTS_START( tomahawk )
PORT_INCLUDE( astrof_common )
PORT_START("IN")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, astrof_state,tomahawk_controls_r, nullptr)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(astrof_state, tomahawk_controls_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/atlantis.cpp b/src/mame/drivers/atlantis.cpp
index ae666dd55a2..fb91a2a6a6f 100644
--- a/src/mame/drivers/atlantis.cpp
+++ b/src/mame/drivers/atlantis.cpp
@@ -767,7 +767,7 @@ static INPUT_PORTS_START( mwskins )
PORT_BIT(0x8000, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("IN2")
- //PORT_BIT(0x0007, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, atlantis_state, port_mod_r, "KEYPAD")
+ //PORT_BIT(0x0007, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(atlantis_state, port_mod_r)
PORT_BIT(0xffff, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("AN.0")
diff --git a/src/mame/drivers/bagman.cpp b/src/mame/drivers/bagman.cpp
index 66720698d43..c5175916802 100644
--- a/src/mame/drivers/bagman.cpp
+++ b/src/mame/drivers/bagman.cpp
@@ -343,7 +343,7 @@ static INPUT_PORTS_START( squaitsa )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
- PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, squaitsa_state, dial_input_r<0>, nullptr)
+ PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(squaitsa_state, dial_input_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START("P2")
@@ -352,7 +352,7 @@ static INPUT_PORTS_START( squaitsa )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
- PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, squaitsa_state, dial_input_r<1>, nullptr)
+ PORT_BIT( 0x60, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(squaitsa_state, dial_input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_START("DSW")
diff --git a/src/mame/drivers/balsente.cpp b/src/mame/drivers/balsente.cpp
index f4c3f8bc33b..5fc95e5ba11 100644
--- a/src/mame/drivers/balsente.cpp
+++ b/src/mame/drivers/balsente.cpp
@@ -1022,7 +1022,7 @@ static INPUT_PORTS_START( nstocker )
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "G1:7" )
PORT_MODIFY("IN0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, balsente_state,nstocker_bits_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(balsente_state, nstocker_bits_r)
/* cheese alert -- we have to map this to player 2 so that it doesn't interfere with
the crosshair controls */
diff --git a/src/mame/drivers/battlex.cpp b/src/mame/drivers/battlex.cpp
index da2d2a9f05d..d1aab0ccce0 100644
--- a/src/mame/drivers/battlex.cpp
+++ b/src/mame/drivers/battlex.cpp
@@ -166,7 +166,7 @@ static INPUT_PORTS_START( battlex )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, battlex_state,battlex_in0_b4_r, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(battlex_state, battlex_in0_b4_r)
PORT_DIPNAME( 0x20, 0x20, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x20, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
diff --git a/src/mame/drivers/blockade.cpp b/src/mame/drivers/blockade.cpp
index 990d2d5d357..127c85c951b 100644
--- a/src/mame/drivers/blockade.cpp
+++ b/src/mame/drivers/blockade.cpp
@@ -45,7 +45,7 @@ public:
{ }
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
- DECLARE_CUSTOM_INPUT_MEMBER(coin_r);
+ DECLARE_READ_LINE_MEMBER(coin_r);
DECLARE_WRITE8_MEMBER(coin_latch_w);
DECLARE_WRITE8_MEMBER(videoram_w);
@@ -123,7 +123,7 @@ static INPUT_PORTS_START( blockade )
PORT_CONFSETTING( 0x50, "4" )
PORT_CONFSETTING( 0x30, "5" )
PORT_CONFSETTING( 0x70, "6" )
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_START("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(2)
@@ -154,7 +154,7 @@ static INPUT_PORTS_START( comotion )
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(1)
@@ -193,7 +193,7 @@ static INPUT_PORTS_START( blasto )
PORT_CONFSETTING( 0x00, "70 Secs") // though service manual says 60
PORT_CONFSETTING( 0x08, "90 Secs")
PORT_BIT(0x70, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
@@ -228,7 +228,7 @@ static INPUT_PORTS_START( hustle )
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_START2)
PORT_BIT(0x60, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(2)
@@ -265,7 +265,7 @@ static INPUT_PORTS_START( mineswpr )
PORT_CONFSETTING( 0x50, "4")
PORT_CONFSETTING( 0x30, "5")
PORT_CONFSETTING( 0x70, "6")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(1)
@@ -296,7 +296,7 @@ static INPUT_PORTS_START( mineswpr4 )
PORT_CONFSETTING( 0x50, "4")
PORT_CONFSETTING( 0x30, "5")
PORT_CONFSETTING( 0x70, "6")
- PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, blockade_state, coin_r, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(blockade_state, coin_r)
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_4WAY PORT_PLAYER(1)
@@ -332,7 +332,7 @@ INPUT_CHANGED_MEMBER( blockade_state::coin_inserted )
m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);
}
-CUSTOM_INPUT_MEMBER( blockade_state::coin_r )
+READ_LINE_MEMBER( blockade_state::coin_r )
{
return m_coin_latch;
}
diff --git a/src/mame/drivers/bmcpokr.cpp b/src/mame/drivers/bmcpokr.cpp
index 4dfc66aad2d..6efbc64c122 100644
--- a/src/mame/drivers/bmcpokr.cpp
+++ b/src/mame/drivers/bmcpokr.cpp
@@ -44,7 +44,7 @@ public:
m_palette(*this, "palette")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
void bmcpokr(machine_config &config);
void mjmaglmp(machine_config &config);
@@ -336,7 +336,7 @@ READ16_MEMBER(bmcpokr_state::dsw_r)
return 0xff << 8;
}
-CUSTOM_INPUT_MEMBER(bmcpokr_state::hopper_r)
+READ_LINE_MEMBER(bmcpokr_state::hopper_r)
{
// motor off should clear the sense bit (I guess ticket.c should actually do this).
// Otherwise a hopper bit stuck low will prevent several keys from being registered.
@@ -489,7 +489,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // n.a. [START, ESC in service mode]
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_TAKE ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // SCORE
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // BET [BET, credit -1]
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HP [HOPPER, credit -100]
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HP [HOPPER, credit -100]
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // ACCOUNT [SERVICE MODE]
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // KEY-OUT [KEY-OUT, no hopper]
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW4",0x80,EQUALS,0x80) // DOUBLE-UP
@@ -507,7 +507,7 @@ static INPUT_PORTS_START( bmcpokr )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // n.a. [START, ESC in service mode]
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // <Left>2 (3rd)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_POKER_BET ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // <Down>1 (2nd) [BET, credit -1]
-// PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HP [HOPPER, credit -100]
+// PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HP [HOPPER, credit -100]
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // A2 [SERVICE MODE]
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // C2 [KEY-OUT, no hopper]
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_GAMBLE_D_UP ) PORT_CONDITION("DSW4",0x80,EQUALS,0x00) // S1 [START, ESC in service mode]
@@ -609,7 +609,7 @@ static INPUT_PORTS_START( mjmaglmp )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_COIN2 ) // NOTE
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) // KEY DOWN
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // PAY
- PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bmcpokr_state,hopper_r, nullptr) // HOPPER
+ PORT_BIT( 0x0200, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bmcpokr_state, hopper_r) // HOPPER
PORT_SERVICE_NO_TOGGLE( 0x0400, IP_ACTIVE_LOW ) // ACCOUNT
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Reset") // RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // (unused)
diff --git a/src/mame/drivers/bnstars.cpp b/src/mame/drivers/bnstars.cpp
index 3c2bf793f92..d67b3dbdae7 100644
--- a/src/mame/drivers/bnstars.cpp
+++ b/src/mame/drivers/bnstars.cpp
@@ -126,7 +126,7 @@ public:
void init_bnstars();
- DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
+ template <int P> DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
private:
@@ -558,7 +558,7 @@ uint32_t bnstars_state::screen_update_bnstars_right(screen_device &screen, bitma
static INPUT_PORTS_START( bnstars )
PORT_START("P1")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)0)
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(bnstars_state, mahjong_ctrl_r<0>)
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -601,7 +601,7 @@ static INPUT_PORTS_START( bnstars )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("P2")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bnstars_state, mahjong_ctrl_r, (void *)1)
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(bnstars_state, mahjong_ctrl_r<1>)
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -752,9 +752,10 @@ static GFXDECODE_START( gfx_bnstars )
GFXDECODE_ENTRY( "gfx7", 0, txlayout, 0x6000, 0x10 ) /* Tx scr2 */
GFXDECODE_END
+template <int P>
CUSTOM_INPUT_MEMBER(bnstars_state::mahjong_ctrl_r)
{
- required_ioport_array<4> &keys = (((int)(uintptr_t)param) == 0) ? m_p1_keys : m_p2_keys;
+ required_ioport_array<4> &keys = (P == 0) ? m_p1_keys : m_p2_keys;
switch (m_bnstars1_mahjong_select & 0x2080)
{
diff --git a/src/mame/drivers/btoads.cpp b/src/mame/drivers/btoads.cpp
index 080f8de3e0e..5137bde47ed 100644
--- a/src/mame/drivers/btoads.cpp
+++ b/src/mame/drivers/btoads.cpp
@@ -73,13 +73,13 @@ READ16_MEMBER( btoads_state::main_sound_r )
}
-CUSTOM_INPUT_MEMBER( btoads_state::main_to_sound_r )
+READ_LINE_MEMBER( btoads_state::main_to_sound_r )
{
return m_main_to_sound_ready;
}
-CUSTOM_INPUT_MEMBER( btoads_state::sound_to_main_r )
+READ_LINE_MEMBER( btoads_state::sound_to_main_r )
{
return m_sound_to_main_ready;
}
@@ -264,9 +264,9 @@ static INPUT_PORTS_START( btoads )
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SPECIAL")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, sound_to_main_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(btoads_state, sound_to_main_r)
PORT_SERVICE_NO_TOGGLE( 0x0002, IP_ACTIVE_LOW )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, btoads_state, main_to_sound_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(btoads_state, main_to_sound_r)
PORT_BIT( 0xff7c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("SW1")
diff --git a/src/mame/drivers/bublbobl.cpp b/src/mame/drivers/bublbobl.cpp
index fbc15414368..87704cf3b5c 100644
--- a/src/mame/drivers/bublbobl.cpp
+++ b/src/mame/drivers/bublbobl.cpp
@@ -732,8 +732,8 @@ static INPUT_PORTS_START( tokio )
PORT_INCLUDE( tokio_base )
PORT_MODIFY("IN0")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("bmcu", taito68705_mcu_device, host_semaphore_r, nullptr)
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("bmcu", taito68705_mcu_device, mcu_semaphore_r, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("bmcu", taito68705_mcu_device, host_semaphore_r)
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("bmcu", taito68705_mcu_device, mcu_semaphore_r)
INPUT_PORTS_END
static INPUT_PORTS_START( bublboblp )
diff --git a/src/mame/drivers/buggychl.cpp b/src/mame/drivers/buggychl.cpp
index 1b3e25cc09a..6cb0ebf2783 100644
--- a/src/mame/drivers/buggychl.cpp
+++ b/src/mame/drivers/buggychl.cpp
@@ -417,7 +417,7 @@ static INPUT_PORTS_START( buggychl )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_TILT )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, buggychl_state, pedal_in_r, nullptr)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(buggychl_state, pedal_in_r)
PORT_START("PEDAL")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_NAME("P1 Pedal") PORT_SENSITIVITY(100) PORT_KEYDELTA(15) /* accelerator */
diff --git a/src/mame/drivers/bwidow.cpp b/src/mame/drivers/bwidow.cpp
index 00638ada226..cb756f8ac11 100644
--- a/src/mame/drivers/bwidow.cpp
+++ b/src/mame/drivers/bwidow.cpp
@@ -309,7 +309,7 @@ READ8_MEMBER(bwidow_state::spacduel_IN3_r)
return res;
}
-CUSTOM_INPUT_MEMBER(bwidow_state::clock_r)
+READ_LINE_MEMBER(bwidow_state::clock_r)
{
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
}
@@ -484,9 +484,9 @@ static INPUT_PORTS_START( bwidow )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0")
PORT_DIPNAME(0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("D4:!7,!8")
@@ -562,9 +562,9 @@ static INPUT_PORTS_START( gravitar )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0")
PORT_DIPUNUSED_DIPLOC( 0x03, IP_ACTIVE_HIGH, "D4:!7,!8" )
@@ -636,9 +636,9 @@ static INPUT_PORTS_START( lunarbat )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0") /* DSW0 - Not read */
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -670,9 +670,9 @@ static INPUT_PORTS_START( spacduel )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_device, done_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_device, done_r)
/* bit 7 is tied to a 3kHz clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bwidow_state,clock_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bwidow_state, clock_r)
PORT_START("DSW0")
PORT_DIPNAME(0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("D4:!7,!8")
diff --git a/src/mame/drivers/by17.cpp b/src/mame/drivers/by17.cpp
index b33d20a0c23..0449568af27 100644
--- a/src/mame/drivers/by17.cpp
+++ b/src/mame/drivers/by17.cpp
@@ -60,9 +60,9 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(activity_button);
DECLARE_INPUT_CHANGED_MEMBER(self_test);
- DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0);
- DECLARE_CUSTOM_INPUT_MEMBER(saucer_x3);
- DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x2);
+ template <int Param> DECLARE_READ_LINE_MEMBER(outhole_x0);
+ template <int Param> DECLARE_READ_LINE_MEMBER(saucer_x3);
+ template <int Param> DECLARE_READ_LINE_MEMBER(drop_target_x2);
void by17(machine_config &config);
@@ -302,7 +302,7 @@ static INPUT_PORTS_START( by17 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, outhole_x0<0x07>) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("X1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )
@@ -386,17 +386,17 @@ static INPUT_PORTS_START( matahari )
PORT_DIPSETTING( 0x80, "Replay")
PORT_MODIFY("X2") /* Drop Target switches */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20) // PORT_CODE(KEYCODE_K)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21) // PORT_CODE(KEYCODE_J)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22) // PORT_CODE(KEYCODE_H)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23) // PORT_CODE(KEYCODE_G)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24) // PORT_CODE(KEYCODE_F)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25) // PORT_CODE(KEYCODE_D)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26) // PORT_CODE(KEYCODE_S)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27) // PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x20>) // PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x21>) // PORT_CODE(KEYCODE_J)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x22>) // PORT_CODE(KEYCODE_H)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x23>) // PORT_CODE(KEYCODE_G)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x24>) // PORT_CODE(KEYCODE_F)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x25>) // PORT_CODE(KEYCODE_D)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x26>) // PORT_CODE(KEYCODE_S)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x27>) // PORT_CODE(KEYCODE_A)
PORT_MODIFY("X3")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, saucer_x3<0x37>) // PORT_CODE(KEYCODE_Q)
INPUT_PORTS_END
static INPUT_PORTS_START( pwerplay )
@@ -438,24 +438,25 @@ static INPUT_PORTS_START( pwerplay )
PORT_DIPSETTING( 0xc0, "Extra Ball / Replay")
PORT_MODIFY("X2") /* Drop Target switches */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x20) // PORT_CODE(KEYCODE_K)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x21) // PORT_CODE(KEYCODE_J)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x22) // PORT_CODE(KEYCODE_H)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x23) // PORT_CODE(KEYCODE_G)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x24) // PORT_CODE(KEYCODE_F)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x25) // PORT_CODE(KEYCODE_D)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x26) // PORT_CODE(KEYCODE_S)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, drop_target_x2, (void *)0x27) // PORT_CODE(KEYCODE_A)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x20>) // PORT_CODE(KEYCODE_K)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x21>) // PORT_CODE(KEYCODE_J)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x22>) // PORT_CODE(KEYCODE_H)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x23>) // PORT_CODE(KEYCODE_G)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x24>) // PORT_CODE(KEYCODE_F)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x25>) // PORT_CODE(KEYCODE_D)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x26>) // PORT_CODE(KEYCODE_S)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, drop_target_x2<0x27>) // PORT_CODE(KEYCODE_A)
PORT_MODIFY("X3")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by17_state, saucer_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by17_state, saucer_x3<0x37>) // PORT_CODE(KEYCODE_Q)
INPUT_PORTS_END
-CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 )
+template <int Param>
+READ_LINE_MEMBER( by17_state::outhole_x0 )
{
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@@ -465,10 +466,11 @@ CUSTOM_INPUT_MEMBER( by17_state::outhole_x0 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
-CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 )
+template <int Param>
+READ_LINE_MEMBER( by17_state::saucer_x3 )
{
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@@ -478,13 +480,13 @@ CUSTOM_INPUT_MEMBER( by17_state::saucer_x3 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
-
-CUSTOM_INPUT_MEMBER( by17_state::drop_target_x2 )
+template <int Param>
+READ_LINE_MEMBER( by17_state::drop_target_x2 )
{
/* Here we simulate fallen Drop Targets so the Drop Target Reset Solenoids can release the switches */
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
switch (bit_shift)
{
diff --git a/src/mame/drivers/by35.cpp b/src/mame/drivers/by35.cpp
index 9b71ad328e7..29d765c531b 100644
--- a/src/mame/drivers/by35.cpp
+++ b/src/mame/drivers/by35.cpp
@@ -95,9 +95,9 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(activity_button);
DECLARE_INPUT_CHANGED_MEMBER(self_test);
- DECLARE_CUSTOM_INPUT_MEMBER(outhole_x0);
- DECLARE_CUSTOM_INPUT_MEMBER(drop_target_x0);
- DECLARE_CUSTOM_INPUT_MEMBER(kickback_x3);
+ template <int Param> DECLARE_READ_LINE_MEMBER(outhole_x0);
+ template <int Param> DECLARE_READ_LINE_MEMBER(drop_target_x0);
+ template <int Param> DECLARE_READ_LINE_MEMBER(kickback_x3);
void by35(machine_config &config);
void nuovo(machine_config &config);
@@ -402,7 +402,7 @@ static INPUT_PORTS_START( by35 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_TILT )
// PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Outhole") PORT_CODE(KEYCODE_BACKSPACE)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, outhole_x0, (void *)0x07) // PORT_CODE(KEYCODE_BACKSPACE)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, outhole_x0<0x07>) // PORT_CODE(KEYCODE_BACKSPACE)
PORT_START("X1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN3 )
@@ -843,14 +843,14 @@ static INPUT_PORTS_START( playboy )
PORT_DIPSETTING( 0x40, "Extra Ball or Special Held Until Collected")
PORT_MODIFY("X0") /* Drop Target switches */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x00) // PORT_CODE(KEYCODE_STOP)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x01) // PORT_CODE(KEYCODE_SLASH)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x02) // PORT_CODE(KEYCODE_OPENBRACE)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x03) // PORT_CODE(KEYCODE_CLOSEBRACE)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, drop_target_x0, (void *)0x04) // PORT_CODE(KEYCODE_BACKSLASH)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x00>) // PORT_CODE(KEYCODE_STOP)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x01>) // PORT_CODE(KEYCODE_SLASH)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x02>) // PORT_CODE(KEYCODE_OPENBRACE)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x03>) // PORT_CODE(KEYCODE_CLOSEBRACE)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, drop_target_x0<0x04>) // PORT_CODE(KEYCODE_BACKSLASH)
PORT_MODIFY("X3")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, by35_state, kickback_x3, (void *)0x37) // PORT_CODE(KEYCODE_Q)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(by35_state, kickback_x3<0x37>) // PORT_CODE(KEYCODE_Q)
PORT_START("RT2")
PORT_ADJUSTER( 50, "RT2 - Tone Sustain" )
@@ -952,10 +952,11 @@ static INPUT_PORTS_START( frontier )
INPUT_PORTS_END
-CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
+template <int Param>
+READ_LINE_MEMBER( by35_state::outhole_x0 )
{
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in the Outhole so the Outhole Solenoid can release it */
@@ -965,10 +966,11 @@ CUSTOM_INPUT_MEMBER( by35_state::outhole_x0 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
-CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
+template <int Param>
+READ_LINE_MEMBER( by35_state::kickback_x3 )
{
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
/* Here we simulate the ball sitting in a Saucer so the Saucer Solenoid can release it */
@@ -978,12 +980,13 @@ CUSTOM_INPUT_MEMBER( by35_state::kickback_x3 )
return ((m_io_hold_x[port] >> bit_shift) & 1);
}
-CUSTOM_INPUT_MEMBER( by35_state::drop_target_x0 )
+template <int Param>
+READ_LINE_MEMBER( by35_state::drop_target_x0 )
{
/* Here we simulate the Drop Target switch states so the Drop Target Reset Solenoid can also release the switches */
- int bit_shift = ((uintptr_t)param & 0x07);
- int port = (((uintptr_t)param >> 4) & 0x07);
+ int bit_shift = (Param & 0x07);
+ int port = ((Param >> 4) & 0x07);
switch (bit_shift)
{
diff --git a/src/mame/drivers/bzone.cpp b/src/mame/drivers/bzone.cpp
index cc8fc1e7753..09e95802ce4 100644
--- a/src/mame/drivers/bzone.cpp
+++ b/src/mame/drivers/bzone.cpp
@@ -267,7 +267,7 @@ INTERRUPT_GEN_MEMBER(bzone_state::bzone_interrupt)
*
*************************************/
-CUSTOM_INPUT_MEMBER(bzone_state::clock_r)
+READ_LINE_MEMBER(bzone_state::clock_r)
{
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
}
@@ -394,9 +394,9 @@ void redbaron_state::redbaron_map(address_map &map)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step") \
/* bit 6 is the VG HALT bit. We set it to "low" */\
/* per default (busy vector processor). */\
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_bzone_device, done_r, nullptr)\
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_bzone_device, done_r)\
/* bit 7 is tied to a 3kHz clock */\
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, bzone_state,clock_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(bzone_state, clock_r)
#define BZONEDSW0\
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index 216eec536ae..f5c895ad14f 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -735,7 +735,7 @@ void cave_state::korokoro_eeprom_w(offs_t offset, u16 data, u16 mem_mask)
}
}
-CUSTOM_INPUT_MEMBER(cave_state::korokoro_hopper_r)
+READ_LINE_MEMBER(cave_state::korokoro_hopper_r)
{
return m_hopper ? 1 : 0;
}
@@ -1123,7 +1123,7 @@ void cave_state::tjumpman_leds_w(u8 data)
// popmessage("led %04X", data);
}
-CUSTOM_INPUT_MEMBER(cave_state::tjumpman_hopper_r)
+READ_LINE_MEMBER(cave_state::tjumpman_hopper_r)
{
return (m_hopper && !(m_screen[0]->frame_number() % 10)) ? 0 : 1;
}
@@ -1608,7 +1608,7 @@ static INPUT_PORTS_START( korokoro )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // service medal out?
PORT_SERVICE( 0x2000, IP_ACTIVE_LOW )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_SERVICE1 ) // service coin
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,korokoro_hopper_r, nullptr) // motor / hopper status ???
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, korokoro_hopper_r) // motor / hopper status ???
PORT_START("IN1")
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
@@ -1625,7 +1625,7 @@ static INPUT_PORTS_START( tekkencw )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE(KEYCODE_Y) // suru ("do")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_CONFNAME( 0x08, 0x08, "Self Test" )
@@ -1647,7 +1647,7 @@ static INPUT_PORTS_START( tekkenbs )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_CONFNAME( 0x08, 0x08, "Self Test" )
@@ -1668,7 +1668,7 @@ static INPUT_PORTS_START( tjumpman )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( DEF_STR( Yes ) ) PORT_CODE(KEYCODE_Y) // suru ("do")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "1 Bet" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state,tjumpman_hopper_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1691,7 +1691,7 @@ static INPUT_PORTS_START( pacslot )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME( "Pac-Man" ) PORT_CODE(KEYCODE_Y)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME( "Bet" )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cave_state, tjumpman_hopper_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cave_state, tjumpman_hopper_r)
PORT_START("IN1")
PORT_CONFNAME( 0x08, 0x08, "Self Test" )
diff --git a/src/mame/drivers/ccastles.cpp b/src/mame/drivers/ccastles.cpp
index 9b5f86a9522..d054eba255d 100644
--- a/src/mame/drivers/ccastles.cpp
+++ b/src/mame/drivers/ccastles.cpp
@@ -170,7 +170,7 @@ TIMER_CALLBACK_MEMBER(ccastles_state::clock_irq)
}
-CUSTOM_INPUT_MEMBER(ccastles_state::get_vblank)
+READ_LINE_MEMBER(ccastles_state::vblank_r)
{
int scanline = m_screen->vpos();
return m_syncprom[scanline & 0xff] & 1;
@@ -340,7 +340,7 @@ static INPUT_PORTS_START( ccastles )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x10, IP_ACTIVE_LOW )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ccastles_state,get_vblank, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ccastles_state, vblank_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Left Jump/1P Start Upright") PORT_CONDITION("IN1",0x20,EQUALS,0x00) /* left Jump, non-cocktail start1 */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("1P Jump") PORT_CONDITION("IN1",0x20,EQUALS,0x20) /* 1p Jump, cocktail */
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Right Jump/2P Start Upright") PORT_CONDITION("IN1",0x20,EQUALS,0x00) /* right Jump, non-cocktail start2 */
diff --git a/src/mame/drivers/champbas.cpp b/src/mame/drivers/champbas.cpp
index 201eb966bac..03218b93243 100644
--- a/src/mame/drivers/champbas.cpp
+++ b/src/mame/drivers/champbas.cpp
@@ -98,7 +98,7 @@ TODO:
*
*************************************/
-CUSTOM_INPUT_MEMBER(champbas_state::watchdog_bit2)
+READ_LINE_MEMBER(champbas_state::watchdog_bit2)
{
return (0x10 - m_watchdog->get_vblank_counter()) >> 2 & 1;
}
@@ -337,7 +337,7 @@ static INPUT_PORTS_START( talbot )
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, champbas_state, watchdog_bit2, nullptr) // bit 2 of the watchdog counter
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(champbas_state, watchdog_bit2) // bit 2 of the watchdog counter
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index bbf0a46dfe3..1fbf37acc69 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -698,7 +698,7 @@ void cischeat_state::armchmp2_map(address_map &map)
#define RIGHT 0
#define LEFT 1
-WRITE16_MEMBER(cischeat_state::captflag_leds_w)
+WRITE16_MEMBER(captflag_state::leds_w)
{
COMBINE_DATA( &m_captflag_leds );
if (ACCESSING_BITS_8_15)
@@ -709,13 +709,13 @@ WRITE16_MEMBER(cischeat_state::captflag_leds_w)
m_leds[1] = BIT(data, 13); // select
int power = (data & 0x1000);
- m_captflag_hopper->motor_w(power ? 1 : 0); // prize motor
+ m_hopper->motor_w(power ? 1 : 0); // prize motor
if (!power)
- m_captflag_hopper->reset();
+ m_hopper->reset();
}
}
-WRITE16_MEMBER(cischeat_state::captflag_oki_bank_w)
+WRITE16_MEMBER(captflag_state::oki_bank_w)
{
if (ACCESSING_BITS_0_7)
{
@@ -726,32 +726,32 @@ WRITE16_MEMBER(cischeat_state::captflag_oki_bank_w)
// Motors
-WRITE16_MEMBER(cischeat_state::captflag_motor_command_right_w)
+WRITE16_MEMBER(captflag_state::motor_command_right_w)
{
// Output check:
// e09a up
// 80b9 - (when not busy)
// 0088 - (when busy)
// e0ba down
- data = COMBINE_DATA( &m_captflag_motor_command[RIGHT] );
- captflag_motor_move(RIGHT, data);
+ data = COMBINE_DATA( &m_motor_command[RIGHT] );
+ motor_move(RIGHT, data);
}
-WRITE16_MEMBER(cischeat_state::captflag_motor_command_left_w)
+WRITE16_MEMBER(captflag_state::motor_command_left_w)
{
// Output check:
// e0ba up
// 8099 - (when not busy)
// 0088 - (when busy)
// e09a down
- data = COMBINE_DATA( &m_captflag_motor_command[LEFT] );
- captflag_motor_move(LEFT, data);
+ data = COMBINE_DATA( &m_motor_command[LEFT] );
+ motor_move(LEFT, data);
}
-void cischeat_state::captflag_motor_move(int side, uint16_t data)
+void captflag_state::motor_move(int side, uint16_t data)
{
- uint16_t & pos = m_captflag_motor_pos[side];
+ uint16_t & pos = m_motor_pos[side];
- timer_device &dev((side == RIGHT) ? *m_captflag_motor_right : *m_captflag_motor_left);
+ timer_device &dev((side == RIGHT) ? *m_motor_right : *m_motor_left);
// bool busy = !(dev.time_left() == attotime::never);
bool busy = false;
@@ -802,20 +802,22 @@ void cischeat_state::captflag_motor_move(int side, uint16_t data)
output().set_value((side == RIGHT) ? "right" : "left", pos);
}
-CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_pos_r)
+template <int N>
+CUSTOM_INPUT_MEMBER(captflag_state::motor_pos_r)
{
const uint8_t pos[4] = {1,0,2,3}; // -> 2,3,1,0 offsets -> 0123
- return ~pos[m_captflag_motor_pos[(uintptr_t)param]];
+ return ~pos[m_motor_pos[N]];
}
-CUSTOM_INPUT_MEMBER(cischeat_state::captflag_motor_busy_r)
+template <int N>
+READ_LINE_MEMBER(captflag_state::motor_busy_r)
{
-// timer_device & dev = ((side == RIGHT) ? m_captflag_motor_right : m_captflag_motor_left);
+// timer_device & dev = ((side == RIGHT) ? m_motor_right : m_motor_left);
// return (dev.time_left() == attotime::never) ? 0 : 1;
return 0;
}
-void cischeat_state::captflag_map(address_map &map)
+void captflag_state::captflag_map(address_map &map)
{
map(0x000000, 0x07ffff).rom(); // ROM
map(0x082000, 0x082005).w("scroll0", FUNC(megasys1_tilemap_device::scroll_w));
@@ -827,24 +829,24 @@ void cischeat_state::captflag_map(address_map &map)
map(0x0b0000, 0x0b7fff).ram().w("scroll2", FUNC(megasys1_tilemap_device::write)).share("scroll2"); // Scroll RAM 2
map(0x0b8000, 0x0bffff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette"); // Palette
map(0x0f0000, 0x0fffff).ram().share("ram"); // Work RAM + Spriteram
- map(0x100000, 0x100001).portr("SW1_2").w(FUNC(cischeat_state::captflag_oki_bank_w)); // 2 x DSW + Sound
- map(0x100008, 0x100009).portr("Buttons").w(FUNC(cischeat_state::captflag_leds_w)); // Buttons + Leds
+ map(0x100000, 0x100001).portr("SW1_2").w(FUNC(captflag_state::oki_bank_w)); // 2 x DSW + Sound
+ map(0x100008, 0x100009).portr("Buttons").w(FUNC(captflag_state::leds_w)); // Buttons + Leds
map(0x100015, 0x100015).rw(m_oki1, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); // Sound
map(0x100019, 0x100019).rw(m_oki2, FUNC(okim6295_device::read), FUNC(okim6295_device::write)); //
- map(0x10001c, 0x10001d).w(FUNC(cischeat_state::scudhamm_enable_w)); // ?
+ map(0x10001c, 0x10001d).w(FUNC(captflag_state::scudhamm_enable_w)); // ?
map(0x100040, 0x100041).portr("SW01"); // DSW + Motor
- map(0x100044, 0x100045).w(FUNC(cischeat_state::captflag_motor_command_left_w)); // Motor Command (Left)
- map(0x100048, 0x100049).w(FUNC(cischeat_state::captflag_motor_command_right_w)); // Motor Command (Right)
+ map(0x100044, 0x100045).w(FUNC(captflag_state::motor_command_left_w)); // Motor Command (Left)
+ map(0x100048, 0x100049).w(FUNC(captflag_state::motor_command_right_w)); // Motor Command (Right)
map(0x100060, 0x10007f).ram().share("nvram"); // NVRAM (even bytes only)
}
-void cischeat_state::captflag_oki1_map(address_map &map)
+void captflag_state::oki1_map(address_map &map)
{
map(0x00000, 0x1ffff).rom();
map(0x20000, 0x3ffff).bankr("oki1_bank");
}
-void cischeat_state::captflag_oki2_map(address_map &map)
+void captflag_state::oki2_map(address_map &map)
{
map(0x00000, 0x1ffff).rom();
map(0x20000, 0x3ffff).bankr("oki2_bank");
@@ -1752,11 +1754,11 @@ static INPUT_PORTS_START( captflag )
PORT_DIPUNKNOWN_DIPLOC( 0x8000, 0x8000, "SW2:8" )
PORT_START("SW01")
- PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_pos_r, (void *)LEFT)
- PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_pos_r, (void *)RIGHT)
+ PORT_BIT( 0x0003, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(captflag_state, motor_pos_r<LEFT>)
+ PORT_BIT( 0x000c, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(captflag_state, motor_pos_r<RIGHT>)
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_busy_r, (void *)LEFT)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, cischeat_state, captflag_motor_busy_r, (void *)RIGHT)
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(captflag_state, motor_busy_r<LEFT>)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(captflag_state, motor_busy_r<RIGHT>)
PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("SW01:1,2")
PORT_DIPSETTING( 0x0000, DEF_STR( Easy ) )
@@ -2157,7 +2159,7 @@ void cischeat_state::armchmp2(machine_config &config)
4-7] rte
*/
-TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::captflag_scanline)
+TIMER_DEVICE_CALLBACK_MEMBER(captflag_state::captflag_scanline)
{
int scanline = param;
@@ -2168,14 +2170,14 @@ TIMER_DEVICE_CALLBACK_MEMBER(cischeat_state::captflag_scanline)
m_maincpu->set_input_line(3, HOLD_LINE);
}
-void cischeat_state::captflag(machine_config &config)
+void captflag_state::captflag(machine_config &config)
{
/* basic machine hardware */
M68000(config, m_maincpu, XTAL(24'000'000) / 2); // TMP68000P-12
- m_maincpu->set_addrmap(AS_PROGRAM, &cischeat_state::captflag_map);
- TIMER(config, "scantimer").configure_scanline(FUNC(cischeat_state::captflag_scanline), "screen", 0, 1);
+ m_maincpu->set_addrmap(AS_PROGRAM, &captflag_state::captflag_map);
+ TIMER(config, "scantimer").configure_scanline(FUNC(captflag_state::captflag_scanline), "screen", 0, 1);
- TICKET_DISPENSER(config, m_captflag_hopper, attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH );
+ TICKET_DISPENSER(config, m_hopper, attotime::from_msec(2000), TICKET_MOTOR_ACTIVE_HIGH, TICKET_STATUS_ACTIVE_HIGH );
WATCHDOG_TIMER(config, m_watchdog);
NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0);
@@ -2187,7 +2189,7 @@ void cischeat_state::captflag(machine_config &config)
// m_screen->set_vblank_time(ATTOSECONDS_IN_USEC(2500 * 3) /* not accurate */);
m_screen->set_size(256, 256);
m_screen->set_visarea(0, 256-1, 0 +16, 256-1 -16);
- m_screen->set_screen_update(FUNC(cischeat_state::screen_update_scudhamm));
+ m_screen->set_screen_update(FUNC(captflag_state::screen_update_scudhamm));
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_scudhamm);
@@ -2198,8 +2200,8 @@ void cischeat_state::captflag(machine_config &config)
MEGASYS1_TILEMAP(config, m_tmap[2], m_palette, 0x4e00/2);
// Motors
- TIMER(config, m_captflag_motor_left).configure_generic(timer_device::expired_delegate());
- TIMER(config, m_captflag_motor_right).configure_generic(timer_device::expired_delegate());
+ TIMER(config, m_motor_left).configure_generic(timer_device::expired_delegate());
+ TIMER(config, m_motor_right).configure_generic(timer_device::expired_delegate());
// Layout
config.set_default_layout(layout_captflag);
@@ -2209,12 +2211,12 @@ void cischeat_state::captflag(machine_config &config)
SPEAKER(config, "rspeaker").front_right();
OKIM6295(config, m_oki1, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
- m_oki1->set_addrmap(0, &cischeat_state::captflag_oki1_map);
+ m_oki1->set_addrmap(0, &captflag_state::oki1_map);
m_oki1->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
m_oki1->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
OKIM6295(config, m_oki2, 4000000/2, okim6295_device::PIN7_HIGH); // pin 7 not verified
- m_oki2->set_addrmap(0, &cischeat_state::captflag_oki2_map);
+ m_oki2->set_addrmap(0, &captflag_state::oki2_map);
m_oki2->add_route(ALL_OUTPUTS, "lspeaker", 0.5);
m_oki2->add_route(ALL_OUTPUTS, "rspeaker", 0.5);
}
@@ -3711,7 +3713,7 @@ ROM_START( captflag )
ROM_LOAD( "mr92027-09_w26.ic18", 0x000000, 0x100000, CRC(3aaa332a) SHA1(6c19364069e0b077a07ac4f9c4b0cf0c0985a42a) ) // 1 on the PCB
ROM_END
-void cischeat_state::init_captflag()
+void captflag_state::init_captflag()
{
m_oki1_bank->configure_entries(0, 0x100000 / 0x20000, memregion("oki1")->base(), 0x20000);
m_oki2_bank->configure_entries(0, 0x100000 / 0x20000, memregion("oki2")->base(), 0x20000);
@@ -3736,5 +3738,5 @@ GAME( 1992, armchmp2o2,armchmp2, armchmp2, armchmp2, cischeat_state, empty_init
GAME( 1992, armchmp2o, armchmp2, armchmp2, armchmp2, cischeat_state, empty_init, ROT270, "Jaleco", "Arm Champs II (ver 1.7)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1992, wildplt, 0, wildplt, wildplt, wildplt_state, init_f1gpstar, ROT0, "Jaleco", "Wild Pilot", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NOT_WORKING ) // busted timings
GAMEL( 1993, f1gpstr2, 0, f1gpstr2, f1gpstr2, cischeat_state, init_f1gpstar, ROT0, "Jaleco", "F-1 Grand Prix Star II", MACHINE_IMPERFECT_GRAPHICS | MACHINE_NODEVICE_LAN, layout_f1gpstar )
-GAME( 1993, captflag, 0, captflag, captflag, cischeat_state, init_captflag, ROT270, "Jaleco", "Captain Flag (Japan)", MACHINE_IMPERFECT_GRAPHICS )
+GAME( 1993, captflag, 0, captflag, captflag, captflag_state, init_captflag, ROT270, "Jaleco", "Captain Flag (Japan)", MACHINE_IMPERFECT_GRAPHICS )
GAME( 1994, scudhamm, 0, scudhamm, scudhamm, cischeat_state, empty_init, ROT270, "Jaleco", "Scud Hammer", MACHINE_IMPERFECT_GRAPHICS )
diff --git a/src/mame/drivers/cloud9.cpp b/src/mame/drivers/cloud9.cpp
index cf3855fe764..7d6cd992daf 100644
--- a/src/mame/drivers/cloud9.cpp
+++ b/src/mame/drivers/cloud9.cpp
@@ -142,7 +142,7 @@ TIMER_CALLBACK_MEMBER(cloud9_state::clock_irq)
}
-CUSTOM_INPUT_MEMBER(cloud9_state::get_vblank)
+READ_LINE_MEMBER(cloud9_state::vblank_r)
{
int scanline = m_screen->vpos();
return (~m_syncprom[scanline & 0xff] >> 1) & 1;
@@ -289,7 +289,7 @@ static INPUT_PORTS_START( cloud9 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cloud9_state, vblank_r)
PORT_START("IN1")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -330,7 +330,7 @@ static INPUT_PORTS_START( firebeas )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cloud9_state,get_vblank, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cloud9_state, vblank_r)
PORT_START("IN1")
PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/cop01.cpp b/src/mame/drivers/cop01.cpp
index 06a8329f43a..23b78715bdd 100644
--- a/src/mame/drivers/cop01.cpp
+++ b/src/mame/drivers/cop01.cpp
@@ -102,10 +102,10 @@ READ8_MEMBER(cop01_state::cop01_sound_command_r)
}
-CUSTOM_INPUT_MEMBER(cop01_state::mightguy_area_r)
+template <int Mask>
+READ_LINE_MEMBER(cop01_state::mightguy_area_r)
{
- int bit_mask = (uintptr_t)param;
- return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
+ return (ioport("FAKE")->read() & Mask) ? 1 : 0;
}
WRITE8_MEMBER(cop01_state::cop01_irq_ack_w)
@@ -329,7 +329,7 @@ static INPUT_PORTS_START( mightguy )
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x04) // "Start Area" - see fake Dip Switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x04>) // "Start Area" - see fake Dip Switch
PORT_START("DSW2")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Coin_A ) )
@@ -347,8 +347,8 @@ static INPUT_PORTS_START( mightguy )
PORT_DIPSETTING( 0x20, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x00, "Invincibility")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x01) // "Start Area" - see fake Dip Switch
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cop01_state,mightguy_area_r, (void *)0x02) // "Start Area" - see fake Dip Switch
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x01>) // "Start Area" - see fake Dip Switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cop01_state, mightguy_area_r<0x02>) // "Start Area" - see fake Dip Switch
PORT_START("FAKE") /* FAKE Dip Switch */
PORT_DIPNAME( 0x07, 0x07, "Starting Area" )
diff --git a/src/mame/drivers/crbaloon.cpp b/src/mame/drivers/crbaloon.cpp
index ff32e1de93e..b0e0f99fd6f 100644
--- a/src/mame/drivers/crbaloon.cpp
+++ b/src/mame/drivers/crbaloon.cpp
@@ -295,7 +295,7 @@ static INPUT_PORTS_START( crbaloon )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Name Reset")
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, crbaloon_state,pc3092_r, nullptr)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(crbaloon_state, pc3092_r)
PORT_START("PC3092")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
diff --git a/src/mame/drivers/crimfght.cpp b/src/mame/drivers/crimfght.cpp
index 8a9fbcd2cc1..cc1b9cb146d 100644
--- a/src/mame/drivers/crimfght.cpp
+++ b/src/mame/drivers/crimfght.cpp
@@ -183,7 +183,7 @@ static INPUT_PORTS_START( crimfght )
PORT_DIPUNUSED_DIPLOC(0x02, IP_ACTIVE_LOW, "SW3:2")
PORT_SERVICE_DIPLOC( 0x04, IP_ACTIVE_LOW, "SW3:3")
PORT_DIPUNUSED_DIPLOC(0x08, IP_ACTIVE_LOW, "SW3:4")
- PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, crimfght_state, system_r, nullptr)
+ PORT_BIT(0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(crimfght_state, system_r)
PORT_START("P1")
KONAMI8_B123_START(1)
diff --git a/src/mame/drivers/cubo.cpp b/src/mame/drivers/cubo.cpp
index 3ccd4f22fc2..50cf4c71f52 100644
--- a/src/mame/drivers/cubo.cpp
+++ b/src/mame/drivers/cubo.cpp
@@ -336,7 +336,7 @@ public:
uint16_t handle_joystick_potgor(uint16_t potgor);
DECLARE_CUSTOM_INPUT_MEMBER(cubo_input);
- DECLARE_CUSTOM_INPUT_MEMBER(cd32_sel_mirror_input);
+ template <int P> DECLARE_READ_LINE_MEMBER(cd32_sel_mirror_input);
DECLARE_WRITE_LINE_MEMBER( akiko_int_w );
DECLARE_WRITE8_MEMBER( akiko_cia_0_port_a_write );
@@ -534,9 +534,10 @@ CUSTOM_INPUT_MEMBER( cubo_state::cubo_input )
return handle_joystick_potgor(m_potgo_value) >> 8;
}
-CUSTOM_INPUT_MEMBER( cubo_state::cd32_sel_mirror_input )
+template <int P>
+READ_LINE_MEMBER( cubo_state::cd32_sel_mirror_input )
{
- uint8_t bits = m_player_ports[(int)(uintptr_t)param]->read();
+ uint8_t bits = m_player_ports[P]->read();
return (bits & 0x20)>>5;
}
@@ -546,22 +547,22 @@ static INPUT_PORTS_START( cubo )
PORT_START("CIA0PORTA")
PORT_BIT( 0x3f, IP_ACTIVE_LOW, IPT_CUSTOM )
/* this is the regular port for reading a single button joystick on the Amiga, many CD32 games require this to mirror the pad start button! */
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cd32_sel_mirror_input, (void *)1)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cd32_sel_mirror_input, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cubo_state, cd32_sel_mirror_input<1>)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(cubo_state, cd32_sel_mirror_input<0>)
PORT_START("CIA0PORTB")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("joy_0_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state, amiga_joystick_convert, (void *)1)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cubo_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("joy_1_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state, amiga_joystick_convert, (void *)0)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cubo_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("potgo")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cubo_state,cubo_input, nullptr)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cubo_state, cubo_input)
PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/cyclemb.cpp b/src/mame/drivers/cyclemb.cpp
index 7c5e4a10c77..45a625d8ca5 100644
--- a/src/mame/drivers/cyclemb.cpp
+++ b/src/mame/drivers/cyclemb.cpp
@@ -708,7 +708,7 @@ static INPUT_PORTS_START( cyclemb )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P1_1")
- PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cyclemb_state, pad_r<0>, nullptr)
+ PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, pad_r<0>)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("PAD_P1")
@@ -731,7 +731,7 @@ static INPUT_PORTS_START( cyclemb )
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P2_1")
- PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, cyclemb_state, pad_r<1>, nullptr)
+ PORT_BIT( 0x9f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(cyclemb_state, pad_r<1>)
PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("PAD_P2")
diff --git a/src/mame/drivers/dacholer.cpp b/src/mame/drivers/dacholer.cpp
index 338307f87a1..015d0fa5834 100644
--- a/src/mame/drivers/dacholer.cpp
+++ b/src/mame/drivers/dacholer.cpp
@@ -62,7 +62,7 @@ public:
void itaten(machine_config &config);
void dacholer(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(snd_ack_r);
+ DECLARE_READ_LINE_MEMBER(snd_ack_r);
private:
DECLARE_WRITE8_MEMBER(bg_scroll_x_w);
@@ -302,7 +302,7 @@ WRITE8_MEMBER(dacholer_state::snd_ack_w)
m_snd_ack = data;
}
-CUSTOM_INPUT_MEMBER(dacholer_state::snd_ack_r)
+READ_LINE_MEMBER(dacholer_state::snd_ack_r)
{
return m_snd_ack; //guess ...
}
@@ -382,7 +382,7 @@ static INPUT_PORTS_START( dacholer )
PORT_DIPSETTING( 0x04, DEF_STR( 5C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 4C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 1C_1C ) )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dacholer_state,snd_ack_r, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dacholer_state, snd_ack_r)
PORT_START("DSWB")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Lives ) ) /* table at 0x0a9c */
diff --git a/src/mame/drivers/dcheese.cpp b/src/mame/drivers/dcheese.cpp
index 2c13dd86b9a..21d57cd27f5 100644
--- a/src/mame/drivers/dcheese.cpp
+++ b/src/mame/drivers/dcheese.cpp
@@ -111,12 +111,6 @@ void dcheese_state::machine_start()
*
*************************************/
-CUSTOM_INPUT_MEMBER(dcheese_state::sound_latch_state_r)
-{
- return m_soundlatch->pending_r();
-}
-
-
WRITE16_MEMBER(dcheese_state::eeprom_control_w)
{
/* toggles bit $0100 very frequently while waiting for things */
@@ -245,7 +239,7 @@ static INPUT_PORTS_START( dcheese )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* sound->main buffer status (0=empty) */
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -295,7 +289,7 @@ static INPUT_PORTS_START( lottof2 )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* sound->main buffer status (0=empty) */
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -343,7 +337,7 @@ static INPUT_PORTS_START( fredmem )
PORT_BIT( 0x001f, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* low 5 bits read as a unit */
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* sound->main buffer status (0=empty) */
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dcheese_state,sound_latch_state_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/ddayjlc.cpp b/src/mame/drivers/ddayjlc.cpp
index a6a77990714..02a18490774 100644
--- a/src/mame/drivers/ddayjlc.cpp
+++ b/src/mame/drivers/ddayjlc.cpp
@@ -454,7 +454,7 @@ static INPUT_PORTS_START( ddayjlc )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_SERVICE1 )
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddayjlc_state,prot_r, nullptr)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddayjlc_state, prot_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("DSW1")
diff --git a/src/mame/drivers/ddenlovr.cpp b/src/mame/drivers/ddenlovr.cpp
index 4c37d3f68d4..3f5f3bc44a2 100644
--- a/src/mame/drivers/ddenlovr.cpp
+++ b/src/mame/drivers/ddenlovr.cpp
@@ -212,7 +212,7 @@ public:
void init_rongrong();
void init_momotaro();
- DECLARE_CUSTOM_INPUT_MEMBER(ddenlovr_blitter_irq_r);
+ DECLARE_READ_LINE_MEMBER(blitter_irq_r);
DECLARE_CUSTOM_INPUT_MEMBER(ddenlovj_blitter_r);
DECLARE_CUSTOM_INPUT_MEMBER(nettoqc_special_r);
DECLARE_CUSTOM_INPUT_MEMBER(mjflove_blitter_r);
@@ -1748,7 +1748,7 @@ uint32_t ddenlovr_state::screen_update_ddenlovr(screen_device &screen, bitmap_rg
return 0;
}
-CUSTOM_INPUT_MEMBER(ddenlovr_state::ddenlovr_blitter_irq_r)
+READ_LINE_MEMBER(ddenlovr_state::blitter_irq_r)
{
return m_ddenlovr_blitter_irq_flag;
}
@@ -4548,7 +4548,7 @@ static INPUT_PORTS_START( ddenlovj )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovj_blitter_r, nullptr) // blitter irq flag? (bit 5) & RTC (bit 6)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddenlovr_state, ddenlovj_blitter_r) // blitter irq flag? (bit 5) & RTC (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("DSW1")
@@ -4654,7 +4654,7 @@ static INPUT_PORTS_START( ddenlovr )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddenlovr_state, blitter_irq_r) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("DSW")
@@ -4709,7 +4709,7 @@ static INPUT_PORTS_START( nettoqc )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,nettoqc_special_r, nullptr) // ? (bit 5) & blitter irq flag (bit 6)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddenlovr_state, nettoqc_special_r) // ? (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_START("DSW1")
@@ -4807,7 +4807,7 @@ static INPUT_PORTS_START( ultrchmp )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddenlovr_state, blitter_irq_r) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("DSW")
@@ -4987,7 +4987,7 @@ static INPUT_PORTS_START( quiz365 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) /* Test */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) // ? quiz365
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,ddenlovr_blitter_irq_r, nullptr) // blitter irq flag
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddenlovr_state, blitter_irq_r) // blitter irq flag
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("DSW1")
@@ -8089,7 +8089,7 @@ static INPUT_PORTS_START( mjflove )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME(DEF_STR( Test )) PORT_CODE(KEYCODE_F1) PORT_TOGGLE
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddenlovr_state,mjflove_blitter_r, nullptr) // RTC (bit 5) & blitter irq flag (bit 6)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ddenlovr_state, mjflove_blitter_r) // RTC (bit 5) & blitter irq flag (bit 6)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) // blitter busy flag
PORT_START("KEY0")
diff --git a/src/mame/drivers/ddragon.cpp b/src/mame/drivers/ddragon.cpp
index 70fdc54f3cc..d9f13ffd2b0 100644
--- a/src/mame/drivers/ddragon.cpp
+++ b/src/mame/drivers/ddragon.cpp
@@ -332,7 +332,7 @@ WRITE8_MEMBER(ddragon_state::ddragonba_port_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(ddragon_state::subcpu_bus_free)
+READ_LINE_MEMBER(ddragon_state::subcpu_bus_free_r)
{
// Corresponds to BA (Bus Available) on the HD63701
if (m_subcpu)
@@ -680,7 +680,7 @@ static INPUT_PORTS_START( ddragon )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ddragon_state, subcpu_bus_free, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ddragon_state, subcpu_bus_free_r)
PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/ddragon3.cpp b/src/mame/drivers/ddragon3.cpp
index 746b587b3a3..d0128d7c991 100644
--- a/src/mame/drivers/ddragon3.cpp
+++ b/src/mame/drivers/ddragon3.cpp
@@ -270,16 +270,16 @@ WRITE8_MEMBER(wwfwfest_state::wwfwfest_priority_w)
/* DIPs are spread across the other input ports */
+template <int N>
CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_3f_r)
{
- const char *tag = (const char *)param;
- return ioport(tag)->read() & 0x3f;
+ return m_dsw[N]->read() & 0x3f;
}
+template <int N>
CUSTOM_INPUT_MEMBER(wwfwfest_state::dsw_c0_r)
{
- const char *tag = (const char *)param;
- return (ioport(tag)->read() & 0xc0) >> 6;
+ return (m_dsw[N]->read() & 0xc0) >> 6;
}
@@ -604,7 +604,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW2")
+ PORT_BIT( 0x3000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_c0_r<1>)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -617,7 +617,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_3f_r, "DSW2")
+ PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_3f_r<1>)
PORT_START("P3")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(3)
@@ -628,7 +628,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START3 )
- PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_3f_r, "DSW1")
+ PORT_BIT( 0x3f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_3f_r<0>)
PORT_START("P4")
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(4)
@@ -639,7 +639,7 @@ static INPUT_PORTS_START( wwfwfest )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START4 )
- PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfwfest_state,dsw_c0_r, "DSW1")
+ PORT_BIT( 0x0300, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wwfwfest_state, dsw_c0_r<0>)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/deco_ld.cpp b/src/mame/drivers/deco_ld.cpp
index 553b43ece79..f8adb56d08d 100644
--- a/src/mame/drivers/deco_ld.cpp
+++ b/src/mame/drivers/deco_ld.cpp
@@ -140,7 +140,7 @@ public:
void rblaster(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(begas_vblank_r);
+ DECLARE_READ_LINE_MEMBER(begas_vblank_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
private:
@@ -318,7 +318,7 @@ void deco_ld_state::rblaster_sound_map(address_map &map)
map(0xe000, 0xffff).rom();
}
-CUSTOM_INPUT_MEMBER( deco_ld_state::begas_vblank_r )
+READ_LINE_MEMBER( deco_ld_state::begas_vblank_r )
{
return m_screen->vpos() >= 240*2;
}
@@ -361,7 +361,7 @@ static INPUT_PORTS_START( begas )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,deco_ld_state,begas_vblank_r, nullptr) // TODO: IPT_VBLANK doesn't seem to work fine?
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(deco_ld_state, begas_vblank_r) // TODO: IPT_VBLANK doesn't seem to work fine?
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, "DSWA" )
diff --git a/src/mame/drivers/dlair.cpp b/src/mame/drivers/dlair.cpp
index 4c2ef3c9511..29a1cbcc035 100644
--- a/src/mame/drivers/dlair.cpp
+++ b/src/mame/drivers/dlair.cpp
@@ -69,8 +69,8 @@ public:
{
}
- DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_status_r);
- DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_command_r);
+ DECLARE_READ_LINE_MEMBER(laserdisc_status_r);
+ DECLARE_READ_LINE_MEMBER(laserdisc_command_r);
void init_fixed();
void init_variable();
@@ -106,7 +106,7 @@ private:
return CLEAR_LINE;
}
- uint8_t laserdisc_status_r()
+ uint8_t laserdisc_status_strobe_r()
{
if (m_ldv1000 != nullptr) return m_ldv1000->status_strobe_r();
return CLEAR_LINE;
@@ -343,13 +343,13 @@ WRITE8_MEMBER(dlair_state::led_den2_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(dlair_state::laserdisc_status_r)
+READ_LINE_MEMBER(dlair_state::laserdisc_status_r)
{
- return laserdisc_status_r();
+ return laserdisc_status_strobe_r();
}
-CUSTOM_INPUT_MEMBER(dlair_state::laserdisc_command_r)
+READ_LINE_MEMBER(dlair_state::laserdisc_command_r)
{
return (laserdisc_ready_r() == ASSERT_LINE) ? 0 : 1;
}
@@ -563,8 +563,8 @@ static INPUT_PORTS_START( dlair )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, nullptr) /* status strobe */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, nullptr) /* command strobe */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_status_r) /* status strobe */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_command_r) /* command strobe */
INPUT_PORTS_END
@@ -595,8 +595,8 @@ static INPUT_PORTS_START( dleuro )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_status_r, nullptr) /* status strobe */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, dlair_state,laserdisc_command_r, nullptr) /* command strobe */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_status_r) /* status strobe */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(dlair_state, laserdisc_command_r) /* command strobe */
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("A:1")
diff --git a/src/mame/drivers/ecoinfr.cpp b/src/mame/drivers/ecoinfr.cpp
index 35590fbb350..51081e9667f 100644
--- a/src/mame/drivers/ecoinfr.cpp
+++ b/src/mame/drivers/ecoinfr.cpp
@@ -67,9 +67,9 @@ public:
void init_ecoinfr();
void init_ecoinfrmab();
- DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel1_opto_r);
- DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel2_opto_r);
- DECLARE_CUSTOM_INPUT_MEMBER(ecoinfr_reel3_opto_r);
+ DECLARE_READ_LINE_MEMBER(reel1_opto_r);
+ DECLARE_READ_LINE_MEMBER(reel2_opto_r);
+ DECLARE_READ_LINE_MEMBER(reel3_opto_r);
private:
int irq_toggle;
@@ -515,19 +515,19 @@ void ecoinfr_state::portmap(address_map &map)
map(0x18, 0x18).w(FUNC(ecoinfr_state::ec_port18_out_w)); // 24 (Watchdog)
}
-CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel1_opto_r)
+READ_LINE_MEMBER(ecoinfr_state::reel1_opto_r)
{
if (m_optic_pattern & 0x1) return 1;
return 0;
}
-CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel2_opto_r)
+READ_LINE_MEMBER(ecoinfr_state::reel2_opto_r)
{
if (m_optic_pattern & 0x2) return 1;
return 0;
}
-CUSTOM_INPUT_MEMBER(ecoinfr_state::ecoinfr_reel3_opto_r)
+READ_LINE_MEMBER(ecoinfr_state::reel3_opto_r)
{
if (m_optic_pattern & 0x4) return 1;
return 0;
@@ -561,12 +561,12 @@ static INPUT_PORTS_START( ecoinfr_barx )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel1_opto_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ecoinfr_state, reel1_opto_r)
PORT_DIPNAME( 0x02, 0x02, "IN1:02" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel3_opto_r, nullptr)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ecoinfr_state,ecoinfr_reel2_opto_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ecoinfr_state, reel3_opto_r)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ecoinfr_state, reel2_opto_r)
PORT_DIPNAME( 0x10, 0x10, "IN1:10" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x10, DEF_STR( On ) )
diff --git a/src/mame/drivers/enigma2.cpp b/src/mame/drivers/enigma2.cpp
index f700ea1eacc..cc0609461aa 100644
--- a/src/mame/drivers/enigma2.cpp
+++ b/src/mame/drivers/enigma2.cpp
@@ -502,14 +502,14 @@ static INPUT_PORTS_START( enigma2 )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, nullptr)
+ PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p1_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, nullptr)
+ PORT_BIT( 0x78, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p2_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW")
@@ -557,7 +557,7 @@ static INPUT_PORTS_START( enigma2a )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p1_controls_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p1_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN1")
@@ -565,7 +565,7 @@ static INPUT_PORTS_START( enigma2a )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, enigma2_state,p2_controls_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(enigma2_state, p2_controls_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW")
diff --git a/src/mame/drivers/eolith.cpp b/src/mame/drivers/eolith.cpp
index 1eab7cba8c2..32abd745d10 100644
--- a/src/mame/drivers/eolith.cpp
+++ b/src/mame/drivers/eolith.cpp
@@ -277,7 +277,7 @@ static INPUT_PORTS_START( common )
PORT_BIT( 0x00000008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000020, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, eolith_speedup_getvblank, nullptr)
+ PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(eolith_state, speedup_vblank_r)
PORT_BIT( 0x00003f80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00008000, IP_ACTIVE_LOW )
@@ -515,7 +515,7 @@ static INPUT_PORTS_START( stealsee )
PORT_INCLUDE(common)
PORT_MODIFY("IN0")
- PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith_state, stealsee_speedup_getvblank, nullptr)
+ PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(eolith_state, stealsee_speedup_vblank_r)
INPUT_PORTS_END
@@ -1726,7 +1726,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(eolith_state::eolith_speedup)
}
}
-CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank)
+READ_LINE_MEMBER(eolith_state::speedup_vblank_r)
{
// printf("%s:eolith speedup_read data %02x\n",machine().describe_context().c_str(), m_speedup_vblank);
@@ -1735,7 +1735,7 @@ CUSTOM_INPUT_MEMBER(eolith_state::eolith_speedup_getvblank)
}
// StealSee doesn't use interrupts, just the vblank
-CUSTOM_INPUT_MEMBER(eolith_state::stealsee_speedup_getvblank)
+READ_LINE_MEMBER(eolith_state::stealsee_speedup_vblank_r)
{
int pc = m_maincpu->pc();
diff --git a/src/mame/drivers/eolith16.cpp b/src/mame/drivers/eolith16.cpp
index 882c27ad7fd..baa2558ed80 100644
--- a/src/mame/drivers/eolith16.cpp
+++ b/src/mame/drivers/eolith16.cpp
@@ -90,7 +90,7 @@ void eolith16_state::eolith16_map(address_map &map)
static INPUT_PORTS_START( eolith16 )
PORT_START("SPECIAL")
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, eolith16_state, eolith_speedup_getvblank, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(eolith16_state, speedup_vblank_r)
PORT_BIT( 0xff6f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
diff --git a/src/mame/drivers/equites.cpp b/src/mame/drivers/equites.cpp
index 3e3c6839c37..a066ec22e83 100644
--- a/src/mame/drivers/equites.cpp
+++ b/src/mame/drivers/equites.cpp
@@ -583,7 +583,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(splndrbt_state::splndrbt_scanline)
/******************************************************************************/
// CPU Handlers
-CUSTOM_INPUT_MEMBER(gekisou_state::gekisou_unknown_bit_r)
+READ_LINE_MEMBER(gekisou_state::gekisou_unknown_bit_r)
{
return m_gekisou_unknown_bit;
}
@@ -791,7 +791,7 @@ static INPUT_PORTS_START( gekisou )
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gekisou_state, gekisou_unknown_bit_r, nullptr)
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(gekisou_state, gekisou_unknown_bit_r)
/* this is actually a variable resistor */
PORT_START(FRQ_ADJUSTER_TAG)
diff --git a/src/mame/drivers/exerion.cpp b/src/mame/drivers/exerion.cpp
index 93afe3231ea..f89a3242dd4 100644
--- a/src/mame/drivers/exerion.cpp
+++ b/src/mame/drivers/exerion.cpp
@@ -237,7 +237,7 @@ void exerion_state::sub_map(address_map &map)
/* verified from Z80 code */
static INPUT_PORTS_START( exerion )
PORT_START("IN0")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exerion_state, exerion_controls_r, nullptr)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(exerion_state, exerion_controls_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
diff --git a/src/mame/drivers/exidy.cpp b/src/mame/drivers/exidy.cpp
index 79313769fb4..ca03469957f 100644
--- a/src/mame/drivers/exidy.cpp
+++ b/src/mame/drivers/exidy.cpp
@@ -638,7 +638,7 @@ static INPUT_PORTS_START( teetert )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy_state,teetert_input_r, nullptr)
+ PORT_BIT( 0x44, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(exidy_state, teetert_input_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/exidy440.cpp b/src/mame/drivers/exidy440.cpp
index a71c7f05624..ef28ecfd5f3 100644
--- a/src/mame/drivers/exidy440.cpp
+++ b/src/mame/drivers/exidy440.cpp
@@ -271,13 +271,13 @@ INPUT_CHANGED_MEMBER(exidy440_state::coin_inserted)
*
*************************************/
-CUSTOM_INPUT_MEMBER(exidy440_state::firq_beam_r)
+READ_LINE_MEMBER(exidy440_state::firq_beam_r)
{
return m_firq_beam;
}
-CUSTOM_INPUT_MEMBER(exidy440_state::firq_vblank_r)
+READ_LINE_MEMBER(exidy440_state::firq_vblank_r)
{
return m_firq_vblank;
}
@@ -530,8 +530,8 @@ static INPUT_PORTS_START( crossbow )
PORT_DIPSETTING( 0x30, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -571,8 +571,8 @@ static INPUT_PORTS_START( cheyenne )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -612,8 +612,8 @@ static INPUT_PORTS_START( combat )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -653,8 +653,8 @@ static INPUT_PORTS_START( catch22 )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -696,8 +696,8 @@ static INPUT_PORTS_START( cracksht )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -734,8 +734,8 @@ static INPUT_PORTS_START( claypign )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -776,8 +776,8 @@ static INPUT_PORTS_START( chiller )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -815,8 +815,8 @@ static INPUT_PORTS_START( topsecex )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -852,7 +852,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hitnmiss )
PORT_START("IN0") /* player inputs and logic board dips */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,hitnmiss_button1_r, nullptr)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(exidy440_state, hitnmiss_button1_r)
PORT_DIPNAME( 0x0c, 0x00, "Seconds" )
PORT_DIPSETTING( 0x04, "20" )
PORT_DIPSETTING( 0x00, "30" )
@@ -863,8 +863,8 @@ static INPUT_PORTS_START( hitnmiss )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -896,7 +896,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( whodunit )
PORT_START("IN0") /* player inputs and logic board dips */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x04, "2" )
@@ -908,8 +908,8 @@ static INPUT_PORTS_START( whodunit )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
@@ -947,8 +947,8 @@ static INPUT_PORTS_START( showdown )
PORT_DIPSETTING( 0x00, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x10, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x20, DEF_STR( Hardest ) )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_beam_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, exidy440_state,firq_vblank_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_beam_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(exidy440_state, firq_vblank_r)
PORT_START("IN1") /* audio board dips */
COINAGE
diff --git a/src/mame/drivers/famibox.cpp b/src/mame/drivers/famibox.cpp
index 5c01db664b9..fab34e49be2 100644
--- a/src/mame/drivers/famibox.cpp
+++ b/src/mame/drivers/famibox.cpp
@@ -77,7 +77,7 @@ public:
void famibox(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(famibox_coin_r);
+ DECLARE_READ_LINE_MEMBER(coin_r);
DECLARE_INPUT_CHANGED_MEMBER(famibox_keyswitch_changed);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
@@ -421,7 +421,7 @@ INPUT_CHANGED_MEMBER(famibox_state::coin_inserted)
}
}
-CUSTOM_INPUT_MEMBER(famibox_state::famibox_coin_r)
+READ_LINE_MEMBER(famibox_state::coin_r)
{
return m_coins > 0;
}
@@ -480,7 +480,7 @@ static INPUT_PORTS_START( famibox )
PORT_DIPSETTING( 0x08, "Key position 4" )
PORT_DIPSETTING( 0x10, "Key position 5" )
PORT_DIPSETTING( 0x20, "Key position 6" )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, famibox_state,famibox_coin_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(famibox_state, coin_r)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, famibox_state,coin_inserted, 0)
diff --git a/src/mame/drivers/fantland.cpp b/src/mame/drivers/fantland.cpp
index 77cf05ff9bb..21fce64c7a3 100644
--- a/src/mame/drivers/fantland.cpp
+++ b/src/mame/drivers/fantland.cpp
@@ -689,10 +689,10 @@ INPUT_PORTS_END
Wheels Runner
***************************************************************************/
+template <int Player>
CUSTOM_INPUT_MEMBER(fantland_state::wheelrun_wheel_r)
{
- int player = (uintptr_t)param;
- int delta = ioport(player ? "WHEEL1" : "WHEEL0")->read();
+ int delta = m_wheel[Player]->read();
delta = (delta & 0x7f) - (delta & 0x80) + 4;
if (delta > 7) delta = 7;
@@ -708,7 +708,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)0)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(fantland_state, wheelrun_wheel_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53001") /* 53001 */
@@ -716,7 +716,7 @@ static INPUT_PORTS_START( wheelrun )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fantland_state,wheelrun_wheel_r, (void *)1)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(fantland_state, wheelrun_wheel_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("53002") /* 53002 */
diff --git a/src/mame/drivers/fgoal.cpp b/src/mame/drivers/fgoal.cpp
index e4014e1458c..b3aca7a63ef 100644
--- a/src/mame/drivers/fgoal.cpp
+++ b/src/mame/drivers/fgoal.cpp
@@ -110,7 +110,7 @@ READ8_MEMBER(fgoal_state::analog_r)
}
-CUSTOM_INPUT_MEMBER(fgoal_state::_80_r)
+READ_LINE_MEMBER(fgoal_state::_80_r)
{
uint8_t ret = (m_screen->vpos() & 0x80) ? 1 : 0;
@@ -263,7 +263,7 @@ static INPUT_PORTS_START( fgoal )
/* extra credit score changes depending on player's performance */
PORT_START("IN1")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fgoal_state, _80_r, nullptr) /* 128V */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fgoal_state, _80_r) /* 128V */
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Cabinet ))
PORT_DIPSETTING( 0x00, DEF_STR( Upright ))
PORT_DIPSETTING( 0x40, DEF_STR( Cocktail ))
diff --git a/src/mame/drivers/firefox.cpp b/src/mame/drivers/firefox.cpp
index 695345457f3..ab35e22dd29 100644
--- a/src/mame/drivers/firefox.cpp
+++ b/src/mame/drivers/firefox.cpp
@@ -69,8 +69,6 @@ public:
m_mainbank(*this, "mainbank")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(mainflag_r);
- DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r);
void firefox(machine_config &config);
private:
@@ -330,16 +328,6 @@ WRITE8_MEMBER(firefox_state::firefox_objram_bank_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(firefox_state::mainflag_r)
-{
- return m_soundlatch->pending_r() ? 1 : 0;
-}
-
-CUSTOM_INPUT_MEMBER(firefox_state::soundflag_r)
-{
- return m_soundlatch2->pending_r() ? 1 : 0;
-}
-
WRITE_LINE_MEMBER(firefox_state::sound_reset_w)
{
m_audiocpu->set_input_line(INPUT_LINE_RESET, state ? ASSERT_LINE : CLEAR_LINE);
@@ -540,8 +528,8 @@ static INPUT_PORTS_START( firefox )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("rdin1")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,mainflag_r, nullptr)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firefox_state,soundflag_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch2", generic_latch_8_device, pending_r)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/firetrk.cpp b/src/mame/drivers/firetrk.cpp
index ecbb92ee960..3a79bf22061 100644
--- a/src/mame/drivers/firetrk.cpp
+++ b/src/mame/drivers/firetrk.cpp
@@ -178,25 +178,27 @@ READ8_MEMBER(firetrk_state::montecar_dip_r)
}
-CUSTOM_INPUT_MEMBER(firetrk_state::steer_dir_r)
+template <int P>
+READ_LINE_MEMBER(firetrk_state::steer_dir_r)
{
- return m_steer_dir[(uintptr_t)param];
+ return m_steer_dir[P];
}
-CUSTOM_INPUT_MEMBER(firetrk_state::steer_flag_r)
+template <int P>
+READ_LINE_MEMBER(firetrk_state::steer_flag_r)
{
- return m_steer_flag[(uintptr_t)param];
+ return m_steer_flag[P];
}
-CUSTOM_INPUT_MEMBER(firetrk_state::skid_r)
+template <int P>
+READ_LINE_MEMBER(firetrk_state::skid_r)
{
uint32_t ret;
- int which = (uintptr_t)param;
- if (which != 2)
- ret = m_skid[which];
+ if (P != 2)
+ ret = m_skid[P];
else
ret = m_skid[0] | m_skid[1];
@@ -204,13 +206,13 @@ CUSTOM_INPUT_MEMBER(firetrk_state::skid_r)
}
-CUSTOM_INPUT_MEMBER(firetrk_state::crash_r)
+template <int P>
+READ_LINE_MEMBER(firetrk_state::crash_r)
{
uint32_t ret;
- int which = (uintptr_t)param;
- if (which != 2)
- ret = m_crash[which];
+ if (P != 2)
+ ret = m_crash[P];
else
ret = m_crash[0] | m_crash[1];
@@ -218,9 +220,10 @@ CUSTOM_INPUT_MEMBER(firetrk_state::crash_r)
}
-CUSTOM_INPUT_MEMBER(firetrk_state::gear_r)
+template <int P>
+READ_LINE_MEMBER(firetrk_state::gear_r)
{
- return (m_gear == (uintptr_t)param) ? 1 : 0;
+ return (m_gear == P) ? 1 : 0;
}
@@ -417,11 +420,11 @@ static INPUT_PORTS_START( firetrk )
PORT_START("BIT_0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas") PORT_PLAYER(1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)0)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<0>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<1>)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Bell") PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_TILT )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<2>)
PORT_SERVICE( 0x80, IP_ACTIVE_HIGH ) PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state, service_mode_switch_changed, 0)
PORT_START("BIT_6")
@@ -439,11 +442,11 @@ static INPUT_PORTS_START( firetrk )
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)0)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)1)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<0>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<1>)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, crash_r, (void *)2)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, crash_r<2>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Diag Step")
PORT_START("HORN")
@@ -485,23 +488,23 @@ static INPUT_PORTS_START( superbug )
PORT_DIPSETTING( 0xc0, DEF_STR( German ) )
PORT_START("BIT_0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)1)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<1>)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)0)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_MEMORY_RESET ) PORT_NAME("Hiscore Reset")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_SERVICE( 0x20, IP_ACTIVE_HIGH )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_TILT )
PORT_START("BIT_7")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)2)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)0)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)0)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<2>)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<0>)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, crash_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, crash_r<0>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select")
PORT_START("GEAR")
@@ -557,14 +560,14 @@ static INPUT_PORTS_START( montecar )
PORT_DIPSETTING( 0x00, DEF_STR( German ) )
PORT_START("BIT_6")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)0)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)1)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, gear_r, (void *)2)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<0>)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<1>)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, gear_r<2>)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON6 ) PORT_NAME("Track Select")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Gas")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_dir_r, (void *)0)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)1)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_dir_r<0>)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<1>)
PORT_START("BIT_7")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@@ -573,8 +576,8 @@ static INPUT_PORTS_START( montecar )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, steer_flag_r, (void *)0)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, firetrk_state, skid_r, (void *)0)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, steer_flag_r<0>)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(firetrk_state, skid_r<0>)
PORT_START("GEAR")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Gear 1") PORT_CHANGED_MEMBER(DEVICE_SELF, firetrk_state, gear_changed, 0)
diff --git a/src/mame/drivers/flicker.cpp b/src/mame/drivers/flicker.cpp
index c6815cc51a3..7f246481e51 100644
--- a/src/mame/drivers/flicker.cpp
+++ b/src/mame/drivers/flicker.cpp
@@ -125,7 +125,7 @@ static INPUT_PORTS_START( flicker )
PORT_BIT(0x0001, IP_ACTIVE_HIGH, IPT_UNUSED)
PORT_BIT(0x0002, IP_ACTIVE_HIGH, IPT_OTHER) PORT_NAME("Door Slam") PORT_CODE(KEYCODE_HOME) PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0)
PORT_BIT(0x001c, IP_ACTIVE_HIGH, IPT_UNKNOWN) // called "two coins", "three coins", "four coins" in patent, purpose unknown
- PORT_BIT(0x07e0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, flicker_state, coins_in, nullptr)
+ PORT_BIT(0x07e0, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(flicker_state, coins_in)
PORT_BIT(0x0800, IP_ACTIVE_HIGH, IPT_TILT)
PORT_BIT(0x1000, IP_ACTIVE_HIGH, IPT_START) PORT_NAME("Credit Button") PORT_CHANGED_MEMBER(DEVICE_SELF, flicker_state, test_changed, 0)
PORT_BIT(0x6000, IP_ACTIVE_HIGH, IPT_UNUSED)
diff --git a/src/mame/drivers/flstory.cpp b/src/mame/drivers/flstory.cpp
index 8f2ad9132fd..1f885f91c68 100644
--- a/src/mame/drivers/flstory.cpp
+++ b/src/mame/drivers/flstory.cpp
@@ -506,7 +506,7 @@ static INPUT_PORTS_START( victnine )
/* bits 0,1 are MCU related:
- bit 0: mcu is ready to receive data from main cpu
- bit 1: mcu has sent data to the main cpu */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, flstory_state,victnine_mcu_status_bit01_r, nullptr)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(flstory_state, victnine_mcu_status_bit01_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 )
diff --git a/src/mame/drivers/fromanc2.cpp b/src/mame/drivers/fromanc2.cpp
index 8bd66cfc0fb..475251720cb 100644
--- a/src/mame/drivers/fromanc2.cpp
+++ b/src/mame/drivers/fromanc2.cpp
@@ -67,17 +67,17 @@ READ16_MEMBER(fromanc2_state::keymatrix_r)
return ret;
}
-CUSTOM_INPUT_MEMBER(fromanc2_state::subcpu_int_r)
+READ_LINE_MEMBER(fromanc2_state::subcpu_int_r)
{
return m_subcpu_int_flag & 0x01;
}
-CUSTOM_INPUT_MEMBER(fromanc2_state::sndcpu_nmi_r)
+READ_LINE_MEMBER(fromanc2_state::sndcpu_nmi_r)
{
return m_sndcpu_nmi_flag & 0x01;
}
-CUSTOM_INPUT_MEMBER(fromanc2_state::subcpu_nmi_r)
+READ_LINE_MEMBER(fromanc2_state::subcpu_nmi_r)
{
return m_subcpu_nmi_flag & 0x01;
}
@@ -304,9 +304,9 @@ static INPUT_PORTS_START( fromanc2 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN4 )
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_int_r, nullptr) // SUBCPU INT FLAG
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, nullptr) // SNDCPU NMI FLAG
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,subcpu_nmi_r, nullptr) // SUBCPU NMI FLAG
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, subcpu_int_r) // SUBCPU INT FLAG
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, sndcpu_nmi_r) // SNDCPU NMI FLAG
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, subcpu_nmi_r) // SUBCPU NMI FLAG
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (1P)" ) PORT_CODE(KEYCODE_F2) // TEST (1P)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME( "Service Mode (2P)" ) PORT_CODE(KEYCODE_F2) // TEST (2P)
@@ -405,7 +405,7 @@ static INPUT_PORTS_START( fromanc4 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_COIN4 )
- PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, fromanc2_state,sndcpu_nmi_r, nullptr) // SNDCPU NMI FLAG
+ PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(fromanc2_state, sndcpu_nmi_r) // SNDCPU NMI FLAG
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/gaelco2.cpp b/src/mame/drivers/gaelco2.cpp
index 0a75914de40..13974ef8cbb 100644
--- a/src/mame/drivers/gaelco2.cpp
+++ b/src/mame/drivers/gaelco2.cpp
@@ -1968,6 +1968,50 @@ ROM_END
WORLD RALLY 2
============================================================================*/
+/***************************************************************************
+
+ World Rally 2 analog controls
+ - added by Mirko Mattioli <els@fastwebnet.it>
+ ---------------------------------------------------------------
+ WR2 pcb has two ADC, one for each player. The ADCs have in common
+ the clock signal line (adc_clk) and the chip enable signal line
+ (adc_cs) and, of course, two different data out signal lines.
+ When "Pot Wheel" option is selected via dip-switch, then the gear
+ is enabled (low/high shifter); the gear is disabled in joy mode by
+ the CPU program code. No brakes are present in this game.
+ Analog controls routines come from modified code wrote by Aaron
+ Giles for gaelco3d driver.
+
+***************************************************************************/
+
+template <int N>
+READ_LINE_MEMBER(wrally2_state::wrally2_analog_bit_r)
+{
+ return (m_analog_ports[N] >> 7) & 0x01;
+}
+
+
+WRITE_LINE_MEMBER(wrally2_state::wrally2_adc_clk)
+{
+ /* a zero/one combo is written here to clock the next analog port bit */
+ if (!state)
+ {
+ m_analog_ports[0] <<= 1;
+ m_analog_ports[1] <<= 1;
+ }
+}
+
+
+WRITE_LINE_MEMBER(wrally2_state::wrally2_adc_cs)
+{
+ /* a zero is written here to read the analog ports, and a one is written when finished */
+ if (!state)
+ {
+ m_analog_ports[0] = m_analog0->read();
+ m_analog_ports[1] = m_analog1->read();
+ }
+}
+
void wrally2_state::wrally2_map(address_map &map)
{
map(0x000000, 0x0fffff).rom(); /* ROM */
@@ -1994,7 +2038,7 @@ static INPUT_PORTS_START( wrally2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1) PORT_NAME("P1 Acc.")
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("P1 Gear") PORT_TOGGLE
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, wrally2_state,wrally2_analog_bit_r, (void *)0x00) /* ADC_1 serial input */
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<0>) /* ADC_1 serial input */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
PORT_SERVICE_DIPLOC( 0x0100, IP_ACTIVE_LOW, "SW2:1" )
PORT_DIPNAME( 0x0200, 0x0000, "Coin mechanism" ) PORT_DIPLOCATION("SW2:2")
@@ -2052,7 +2096,7 @@ static INPUT_PORTS_START( wrally2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) PORT_NAME("P2 Acc.")
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2) PORT_NAME("P2 Gear") PORT_TOGGLE
- PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, wrally2_state,wrally2_analog_bit_r, (void *)0x01) /* ADC_2 serial input */
+ PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(wrally2_state, wrally2_analog_bit_r<1>) /* ADC_2 serial input */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/drivers/gaelco3d.cpp b/src/mame/drivers/gaelco3d.cpp
index 11c5b398f24..7a4f364bdf2 100644
--- a/src/mame/drivers/gaelco3d.cpp
+++ b/src/mame/drivers/gaelco3d.cpp
@@ -305,10 +305,10 @@ WRITE16_MEMBER(gaelco3d_state::sound_status_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(gaelco3d_state::analog_bit_r)
+template <int N>
+READ_LINE_MEMBER(gaelco3d_state::analog_bit_r)
{
- int which = (uintptr_t)param;
- return (m_analog_ports[which] >> 7) & 0x01;
+ return (m_analog_ports[N] >> 7) & 0x01;
}
@@ -337,10 +337,10 @@ WRITE_LINE_MEMBER(gaelco3d_state::analog_port_latch_w)
}
}
-CUSTOM_INPUT_MEMBER(gaelco3d_state::fp_analog_bit_r)
+template <int N>
+READ_LINE_MEMBER(gaelco3d_state::fp_analog_bit_r)
{
- int which = (uintptr_t)param;
- return (m_fp_analog_ports[which] >> m_fp_clock) & 1;
+ return (m_fp_analog_ports[N] >> m_fp_clock) & 1;
}
WRITE_LINE_MEMBER(gaelco3d_state::fp_analog_clock_w)
@@ -747,10 +747,10 @@ static INPUT_PORTS_START( speedup )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2) // checked after reading analog from port 1
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) // checked after reading analog from port 2
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_PLAYER(2) // checked after reading analog from port 3
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<0>)
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<1>)
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<2>)
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<3>)
PORT_START("IN3")
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN2 ) // verified
@@ -786,10 +786,10 @@ static INPUT_PORTS_START( surfplnt )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x0800, IP_ACTIVE_LOW )
- PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
- PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
+ PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<0>)
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<1>)
+ PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<2>)
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<3>)
PORT_START("IN3")
PORT_BIT( 0xffff, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -823,10 +823,10 @@ static INPUT_PORTS_START( radikalb )
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x08000000, IP_ACTIVE_LOW )
- PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)0)
- PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)1)
- PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)2)
- PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,analog_bit_r, (void *)3)
+ PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<0>)
+ PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<1>)
+ PORT_BIT( 0x40000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<2>)
+ PORT_BIT( 0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, analog_bit_r<3>)
PORT_START("IN3")
PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -868,8 +868,8 @@ static INPUT_PORTS_START( footbpow )
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x08000000, IP_ACTIVE_LOW )
- PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,fp_analog_bit_r, (void *)1)
- PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, gaelco3d_state,fp_analog_bit_r, (void *)0)
+ PORT_BIT( 0x10000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, fp_analog_bit_r<1>)
+ PORT_BIT( 0x20000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(gaelco3d_state, fp_analog_bit_r<0>)
PORT_BIT( 0xc0000000, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN3")
diff --git a/src/mame/drivers/galastrm.cpp b/src/mame/drivers/galastrm.cpp
index 1779b9ada61..ac619aee3f3 100644
--- a/src/mame/drivers/galastrm.cpp
+++ b/src/mame/drivers/galastrm.cpp
@@ -70,7 +70,7 @@ void galastrm_state::tc0610_w(offs_t offset, u16 data)
}
-CUSTOM_INPUT_MEMBER(galastrm_state::frame_counter_r)
+READ_LINE_MEMBER(galastrm_state::frame_counter_r)
{
return m_frame_counter;
}
@@ -113,7 +113,7 @@ void galastrm_state::main_map(address_map &map)
static INPUT_PORTS_START( galastrm )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galastrm_state, frame_counter_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galastrm_state, frame_counter_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/galaxi.cpp b/src/mame/drivers/galaxi.cpp
index 3f9e2472e51..e0a6cbfe08d 100644
--- a/src/mame/drivers/galaxi.cpp
+++ b/src/mame/drivers/galaxi.cpp
@@ -70,8 +70,8 @@ public:
void lastfour(machine_config &config);
void magjoker(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(ticket_r);
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(ticket_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
protected:
virtual void machine_start() override;
@@ -297,12 +297,12 @@ WRITE16_MEMBER(galaxi_state::_500004_w)
show_out();
}
-CUSTOM_INPUT_MEMBER(galaxi_state::ticket_r)
+READ_LINE_MEMBER(galaxi_state::ticket_r)
{
return m_ticket && !(m_screen->frame_number() % 10);
}
-CUSTOM_INPUT_MEMBER(galaxi_state::hopper_r)
+READ_LINE_MEMBER(galaxi_state::hopper_r)
{
return m_hopper && !(m_screen->frame_number() % 10);
}
@@ -376,11 +376,11 @@ static INPUT_PORTS_START( galaxi )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, nullptr) // hopper sensor
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(galaxi_state, hopper_r) // hopper sensor
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_COIN3 ) // pin 25LC
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, nullptr) // ticket sensor
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxi_state, ticket_r) // ticket sensor
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM ) // hopper out (pin 14LS)
PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_CUSTOM ) // (pin 26LC)
@@ -396,11 +396,11 @@ static INPUT_PORTS_START( magjoker )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_POKER_HOLD5 )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_GAMBLE_PAYOUT )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, hopper_r, nullptr) // hopper sensor
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxi_state, hopper_r) // hopper sensor
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(5) // coin a
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_COIN2 ) PORT_IMPULSE(5) // coin b (token)
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Hopper Refill") PORT_CODE(KEYCODE_H)
- PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxi_state, ticket_r, nullptr) // ticket sensor
+ PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxi_state, ticket_r) // ticket sensor
PORT_BIT( 0x1000, IP_ACTIVE_HIGH, IPT_CUSTOM ) // hopper out (pin 14LS)
PORT_SERVICE_NO_TOGGLE( 0x2000, IP_ACTIVE_HIGH ) // test
PORT_BIT( 0x4000, IP_ACTIVE_HIGH, IPT_GAMBLE_KEYOUT ) // (pin 26LC)
diff --git a/src/mame/drivers/galaxian.cpp b/src/mame/drivers/galaxian.cpp
index cc371f9586e..b8cda8fd62b 100644
--- a/src/mame/drivers/galaxian.cpp
+++ b/src/mame/drivers/galaxian.cpp
@@ -929,8 +929,8 @@ READ8_MEMBER(galaxian_state::theend_protection_r)
return m_protection_result;
}
-
-CUSTOM_INPUT_MEMBER(galaxian_state::theend_protection_alt_r)
+template <int N>
+READ_LINE_MEMBER(galaxian_state::theend_protection_alt_r)
{
/*
Handled by a custom IC. Holds two bits derived from the upper bit of
@@ -1231,16 +1231,16 @@ WRITE8_MEMBER(galaxian_state::scorpion_digitalker_control_w)
*
*************************************/
-INPUT_CHANGED_MEMBER(galaxian_state::gmgalax_game_changed)
+INPUT_CHANGED_MEMBER(gmgalax_state::game_changed)
{
address_space &space = m_maincpu->space(AS_PROGRAM);
/* new value is the selected game */
- m_gmgalax_selected_game = newval;
+ m_selected_game = newval;
/* select the bank and graphics bank based on it */
- membank("bank1")->set_entry(m_gmgalax_selected_game);
- galaxian_gfxbank_w(space, 0, m_gmgalax_selected_game);
+ membank("bank1")->set_entry(m_selected_game);
+ galaxian_gfxbank_w(space, 0, m_selected_game);
/* reset the stars */
galaxian_stars_enable_w(space, 0, 0);
@@ -1250,12 +1250,10 @@ INPUT_CHANGED_MEMBER(galaxian_state::gmgalax_game_changed)
}
-CUSTOM_INPUT_MEMBER(galaxian_state::gmgalax_port_r)
+template <int N>
+CUSTOM_INPUT_MEMBER(gmgalax_state::port_r)
{
- const char *portname = (const char *)param;
- if (m_gmgalax_selected_game != 0)
- portname += strlen(portname) + 1;
- return ioport(portname)->read();
+ return (m_selected_game != 0 ? m_glin : m_gmin)[N]->read();
}
@@ -1305,9 +1303,10 @@ WRITE8_MEMBER(galaxian_state::zigzag_ay8910_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r)
+template <int N>
+READ_LINE_MEMBER(galaxian_state::azurian_port_r)
{
- return (ioport("FAKE")->read() >> (uintptr_t)param) & 1;
+ return (ioport("FAKE")->read() >> N) & 1;
}
@@ -1318,14 +1317,14 @@ CUSTOM_INPUT_MEMBER(galaxian_state::azurian_port_r)
*
*************************************/
-CUSTOM_INPUT_MEMBER(galaxian_state::kingball_muxbit_r)
+READ_LINE_MEMBER(galaxian_state::kingball_muxbit_r)
{
/* multiplex the service mode switch with a speech DIP switch */
return (ioport("FAKE")->read() >> m_kingball_speech_dip) & 1;
}
-CUSTOM_INPUT_MEMBER(galaxian_state::kingball_noise_r)
+READ_LINE_MEMBER(galaxian_state::kingball_noise_r)
{
/* bit 5 is the NOISE line from the sound circuit. The code just verifies
that it's working, doesn't actually use return value, so we can just use
@@ -2867,7 +2866,7 @@ static INPUT_PORTS_START( azurian )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)0) /* "linked" with bit 2 of IN2 */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, azurian_port_r<0>) /* "linked" with bit 2 of IN2 */
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x80, "5" )
@@ -2879,7 +2878,7 @@ static INPUT_PORTS_START( azurian )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "5000" )
PORT_DIPSETTING( 0x02, "7000" )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, azurian_port_r, (void *)1) /* "linked" with bit 6 of IN1 */
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, azurian_port_r<1>) /* "linked" with bit 6 of IN1 */
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
@@ -3491,13 +3490,13 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gmgalax )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN0\0GLIN0")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(gmgalax_state, port_r<0>)
PORT_START("IN1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN1\0GLIN1")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(gmgalax_state, port_r<1>)
PORT_START("IN2")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_port_r, "GMIN2\0GLIN2")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(gmgalax_state, port_r<2>)
PORT_START("GMIN0") /* Ghost Muncher - IN0 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CONDITION("GAMESEL",0x01,NOTEQUALS,0x01)
@@ -3575,7 +3574,7 @@ static INPUT_PORTS_START( gmgalax )
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("GAMESEL") /* fake - game select */
- PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, galaxian_state, gmgalax_game_changed, 0)
+ PORT_DIPNAME( 0x01, 0x00, "Game Select") PORT_CODE(KEYCODE_F1) PORT_TOGGLE PORT_CHANGED_MEMBER(DEVICE_SELF, gmgalax_state, game_changed, 0)
PORT_DIPSETTING( 0x00, "Ghost Muncher" )
PORT_DIPSETTING( 0x01, "Galaxian" )
INPUT_PORTS_END
@@ -4328,14 +4327,14 @@ static INPUT_PORTS_START( kingball )
PORT_INCLUDE(galaxian)
PORT_MODIFY("IN0")
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_muxbit_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, kingball_muxbit_r)
/* Relating to above port:Hack? - possibly multiplexed via writes to $b003 */
//PORT_DIPNAME( 0x40, 0x40, "Speech" )
//PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
//PORT_DIPSETTING( 0x40, DEF_STR( On ) )
PORT_MODIFY("IN1")
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, kingball_noise_r, nullptr) /* NOISE line */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, kingball_noise_r) /* NOISE line */
PORT_DIPNAME( 0xc0, 0x40, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0xc0, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x40, DEF_STR( 1C_1C ) )
@@ -4826,9 +4825,9 @@ static INPUT_PORTS_START( theend )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)0) /* protection bit */
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<0>) /* protection bit */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)1) /* protection bit */
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<1>) /* protection bit */
PORT_START("IN3") /* need for some PPI accesses */
PORT_BIT( 0xff, 0x00, IPT_UNUSED )
@@ -4870,9 +4869,9 @@ static INPUT_PORTS_START( scramble )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)0) /* protection bit */
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<0>) /* protection bit */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, theend_protection_alt_r, (void *)1) /* protection bit */
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxian_state, theend_protection_alt_r<1>) /* protection bit */
PORT_START("IN3") /* need for some PPI accesses */
PORT_BIT( 0xff, 0x00, IPT_UNUSED )
@@ -5348,7 +5347,7 @@ CUSTOM_INPUT_MEMBER(galaxian_state::moonwar_dial_r)
/* verified from Z80 code */
static INPUT_PORTS_START( moonwar )
PORT_START("IN0")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxian_state, moonwar_dial_r, nullptr)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxian_state, moonwar_dial_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL // cocktail: p2 shield
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -6183,14 +6182,14 @@ void galaxian_state::zigzag(machine_config &config)
}
-void galaxian_state::gmgalax(machine_config &config)
+void gmgalax_state::gmgalax(machine_config &config)
{
galaxian(config);
/* banked video hardware */
m_gfxdecode->set_info(gfx_gmgalax);
m_palette->set_entries(64);
- m_palette->set_init(FUNC(galaxian_state::galaxian_palette));
+ m_palette->set_init(FUNC(gmgalax_state::galaxian_palette));
}
@@ -7073,20 +7072,20 @@ void galaxian_state::init_azurian()
}
-void galaxian_state::init_gmgalax()
+void gmgalax_state::init_gmgalax()
{
address_space &space = m_maincpu->space(AS_PROGRAM);
/* video extensions */
- common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &galaxian_state::gmgalax_extend_tile_info, &galaxian_state::gmgalax_extend_sprite_info);
+ common_init(&galaxian_state::galaxian_draw_bullet, &galaxian_state::galaxian_draw_background, &gmgalax_state::gmgalax_extend_tile_info, &gmgalax_state::gmgalax_extend_sprite_info);
/* ROM is banked */
space.install_read_bank(0x0000, 0x3fff, "bank1");
membank("bank1")->configure_entries(0, 2, memregion("maincpu")->base() + 0x10000, 0x4000);
/* callback when the game select is toggled */
- gmgalax_game_changed(*machine().ioport().ports().begin()->second->fields().first(), 0, 0, 0);
- save_item(NAME(m_gmgalax_selected_game));
+ game_changed(*machine().ioport().ports().begin()->second->fields().first(), 0, 0, 0);
+ save_item(NAME(m_selected_game));
}
@@ -12777,7 +12776,7 @@ GAME( 1982, zigzagb, 0, zigzag, zigzag, galaxian_state, init_
GAME( 1982, zigzagb2, zigzagb, zigzag, zigzag, galaxian_state, init_zigzag, ROT90, "bootleg (LAX)", "Zig Zag (Dig Dug conversion on Galaxian hardware, bootleg set 2)", MACHINE_SUPPORTS_SAVE )
/* multi-game select via external switch */
-GAME( 1981, gmgalax, 0, gmgalax, gmgalax, galaxian_state, init_gmgalax, ROT90, "bootleg", "Ghostmuncher Galaxian (bootleg)", MACHINE_SUPPORTS_SAVE )
+GAME( 1981, gmgalax, 0, gmgalax, gmgalax, gmgalax_state, init_gmgalax, ROT90, "bootleg", "Ghostmuncher Galaxian (bootleg)", MACHINE_SUPPORTS_SAVE )
// Multigames
GAME( 2002, fourplay, 0, fourplay, galaxian, galaxian_state, init_fourplay, ROT90, "Macro", "Four Play", MACHINE_SUPPORTS_SAVE )
diff --git a/src/mame/drivers/galaxold.cpp b/src/mame/drivers/galaxold.cpp
index 6055bb97fdc..61d91dfcedb 100644
--- a/src/mame/drivers/galaxold.cpp
+++ b/src/mame/drivers/galaxold.cpp
@@ -837,19 +837,18 @@ void galaxold_state::bullsdrtg_data_map(address_map &map)
}
/* Lives Dips are spread across two input ports */
-CUSTOM_INPUT_MEMBER(galaxold_state::vpool_lives_r)
+template <int Mask>
+READ_LINE_MEMBER(galaxold_state::vpool_lives_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x40: /* vpool : IN1 (0xa800) bit 6 */
- return ((ioport("LIVES")->read() & bit_mask) >> 6);
+ return ((ioport("LIVES")->read() & Mask) >> 6);
case 0x01: /* vpool : DSW (0xb000) bit 0 */
- return ((ioport("LIVES")->read() & bit_mask) >> 0);
+ return ((ioport("LIVES")->read() & Mask) >> 0);
default:
- logerror("vpool_lives_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("vpool_lives_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@@ -873,11 +872,11 @@ static INPUT_PORTS_START( vpool )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_2WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,vpool_lives_r, (void *)0x40)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, vpool_lives_r<0x40>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("DSW0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,vpool_lives_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, vpool_lives_r<0x01>)
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x02, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
@@ -1080,24 +1079,23 @@ INPUT_PORTS_END
/* Coinage Dips are spread across two input ports */
+template <int Mask>
CUSTOM_INPUT_MEMBER(galaxold_state::ckongg_coinage_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x0c: /* ckongg : DSW (0xc800) bits 2 and 3 */
- return ((ioport("COINAGE")->read() & bit_mask) >> 2);
+ return ((ioport("COINAGE")->read() & Mask) >> 2);
case 0x40: /* ckongg : IN1 (0xc400) bit 6 */
- return ((ioport("COINAGE")->read() & bit_mask) >> 6);
+ return ((ioport("COINAGE")->read() & Mask) >> 6);
case 0xc0: /* ckongmc : IN1 (0xa800) bits 6 and 7 */
- return ((ioport("COINAGE")->read() & bit_mask) >> 6);
+ return ((ioport("COINAGE")->read() & Mask) >> 6);
case 0x01: /* ckongmc : DSW (0xb000) bit 0 */
- return ((ioport("COINAGE")->read() & bit_mask) >> 0);
+ return ((ioport("COINAGE")->read() & Mask) >> 0);
default:
- logerror("ckongg_coinage_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("ckongg_coinage_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@@ -1121,7 +1119,7 @@ static INPUT_PORTS_START( ckongg )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x40)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0x40>)
PORT_DIPNAME( 0x80, 0x80, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x80, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
@@ -1132,7 +1130,7 @@ static INPUT_PORTS_START( ckongg )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPSETTING( 0x03, "6" )
- PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x0c)
+ PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0x0c>)
PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COINAGE")
@@ -1166,10 +1164,10 @@ static INPUT_PORTS_START( ckongmc )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0xc0>)
PORT_START("DSW")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,ckongg_coinage_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, ckongg_coinage_r<0x01>)
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "4" )
@@ -1417,6 +1415,14 @@ static INPUT_PORTS_START( scrambler )
INPUT_PORTS_END
+template <int Mask>
+READ_LINE_MEMBER(galaxold_state::_4in1_fake_port_r)
+{
+ static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" };
+
+ return (ioport(portnames[m__4in1_bank])->read() & Mask) ? 1 : 0;
+}
+
static INPUT_PORTS_START( 4in1 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
@@ -1437,18 +1443,18 @@ static INPUT_PORTS_START( 4in1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x40) // See fake ports
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x80) // See fake ports
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x40>) // See fake ports
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x80>) // See fake ports
PORT_START("DSW0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x01) // See fake ports
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x02) // See fake ports
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x01>) // See fake ports
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x02>) // See fake ports
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" ) // 2 when continue (Scramble PT2)
PORT_DIPSETTING( 0x04, "5" ) // 2 when continue (Scramble PT2)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x08) // See fake ports
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x10) // See fake ports
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,_4in1_fake_port_r, (void *)0x20) // See fake ports
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x08>) // See fake ports
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x10>) // See fake ports
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(galaxold_state, _4in1_fake_port_r<0x20>) // fake ports
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("FAKE1") /* The Ghost Muncher PT3 - FAKE DSW0 (bits 0 to 5) and IN1 (bits 6 and 7) */
@@ -1592,19 +1598,18 @@ INPUT_PORTS_END
/* Coinage Dips are spread across two input ports */
+template <int Mask>
CUSTOM_INPUT_MEMBER(galaxold_state::dkongjrm_coinage_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0xc0: /* dkongjrm : IN1 (0xa8??) bits 6 and 7 */
- return ((ioport("COINAGE")->read() & bit_mask) >> 6);
+ return ((ioport("COINAGE")->read() & Mask) >> 6);
case 0x01: /* dkongjrm : DSW (0xb0??) bit 0 */
- return ((ioport("COINAGE")->read() & bit_mask) >> 0);
+ return ((ioport("COINAGE")->read() & Mask) >> 0);
default:
- logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("dkongjrm_coinage_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@@ -1628,10 +1633,10 @@ static INPUT_PORTS_START( dkongjrm )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,dkongjrm_coinage_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, dkongjrm_coinage_r<0xc0>)
PORT_START("DSW")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, galaxold_state,dkongjrm_coinage_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(galaxold_state, dkongjrm_coinage_r<0x01>)
PORT_DIPNAME( 0x06, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "4" )
diff --git a/src/mame/drivers/gottlieb.cpp b/src/mame/drivers/gottlieb.cpp
index cda30320922..3ae77dcb246 100644
--- a/src/mame/drivers/gottlieb.cpp
+++ b/src/mame/drivers/gottlieb.cpp
@@ -277,12 +277,10 @@ void gottlieb_state::machine_reset()
*
*************************************/
-CUSTOM_INPUT_MEMBER(gottlieb_state::analog_delta_r)
+template <int N>
+CUSTOM_INPUT_MEMBER(gottlieb_state::track_delta_r)
{
- const char *string = (const char *)param;
- int which = string[0] - '0';
-
- return ioport(&string[1])->read() - m_track[which];
+ return (N ? m_track_y : m_track_x)->read() - m_track[N];
}
@@ -837,10 +835,10 @@ static INPUT_PORTS_START( reactor )
PORT_BIT ( 0xfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2") /* trackball H */
- PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "0TRACKX")
+ PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<0>)
PORT_START("IN3") /* trackball V */
- PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
+ PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
PORT_START("IN4")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
@@ -1048,10 +1046,10 @@ static INPUT_PORTS_START( argusg )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN2") /* trackball H */
- PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "0TRACKX")
+ PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<0>)
PORT_START("IN3") /* trackball V */
- PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
+ PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
/* NOTE: Buttons are shared for both players; are mirrored to each side of the controller */
PORT_START("IN4")
@@ -1105,7 +1103,7 @@ static INPUT_PORTS_START( mplanets )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3") /* trackball V (dial) */
- PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
+ PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
PORT_START("IN4")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
@@ -1584,7 +1582,7 @@ static INPUT_PORTS_START( 3stooges )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN4") /* joystick inputs */
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,stooges_joystick_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, stooges_joystick_r)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(3)
@@ -1696,7 +1694,7 @@ static INPUT_PORTS_START( wizwarz )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3") /* trackball V is a dial input */
- PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gottlieb_state,analog_delta_r, "1TRACKY")
+ PORT_BIT( 0xff, 0, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gottlieb_state, track_delta_r<1>)
PORT_START("IN4") /* ? */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
diff --git a/src/mame/drivers/gstream.cpp b/src/mame/drivers/gstream.cpp
index 42cc5dc63ad..73fc65c96e7 100644
--- a/src/mame/drivers/gstream.cpp
+++ b/src/mame/drivers/gstream.cpp
@@ -161,9 +161,9 @@ public:
void init_gstream();
void init_x2222();
- DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_service_r);
+ DECLARE_READ_LINE_MEMBER(mirror_service_r);
DECLARE_CUSTOM_INPUT_MEMBER(gstream_mirror_r);
- DECLARE_CUSTOM_INPUT_MEMBER(x2222_toggle_r);
+ DECLARE_READ_LINE_MEMBER(x2222_toggle_r);
private:
/* devices */
@@ -212,14 +212,14 @@ private:
void x2222_io(address_map &map);
};
-CUSTOM_INPUT_MEMBER(gstream_state::x2222_toggle_r) // or the game hangs when starting, might be a status flag for the sound?
+READ_LINE_MEMBER(gstream_state::x2222_toggle_r) // or the game hangs when starting, might be a status flag for the sound?
{
m_toggle ^= 0xffff;
return m_toggle;
}
-CUSTOM_INPUT_MEMBER(gstream_state::gstream_mirror_service_r)
+READ_LINE_MEMBER(gstream_state::mirror_service_r)
{
int result;
@@ -427,10 +427,10 @@ static INPUT_PORTS_START( gstream )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x7000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_service_r, nullptr)
+ PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(gstream_state, mirror_service_r)
PORT_START("IN2")
- PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,gstream_mirror_r, nullptr)
+ PORT_BIT( 0x004f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(gstream_state, gstream_mirror_r)
PORT_BIT( 0xffb0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
@@ -522,7 +522,7 @@ static INPUT_PORTS_START( x2222 )
PORT_DIPNAME( 0x0040, 0x0040, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0040, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, gstream_state,x2222_toggle_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(gstream_state, x2222_toggle_r)
INPUT_PORTS_END
diff --git a/src/mame/drivers/hh_cop400.cpp b/src/mame/drivers/hh_cop400.cpp
index 7f1edd5a0f6..5380f7a25da 100644
--- a/src/mame/drivers/hh_cop400.cpp
+++ b/src/mame/drivers/hh_cop400.cpp
@@ -678,7 +678,7 @@ public:
u8 m_motor_pos;
TIMER_DEVICE_CALLBACK_MEMBER(motor_sim_tick);
- DECLARE_CUSTOM_INPUT_MEMBER(motor_switch);
+ DECLARE_READ_LINE_MEMBER(motor_switch_r);
DECLARE_WRITE8_MEMBER(write_l);
DECLARE_WRITE8_MEMBER(write_d);
@@ -703,7 +703,7 @@ void lchicken_state::machine_start()
// handlers
-CUSTOM_INPUT_MEMBER(lchicken_state::motor_switch)
+READ_LINE_MEMBER(lchicken_state::motor_switch_r)
{
return m_motor_pos > 0xe8; // approximation
}
@@ -782,7 +782,7 @@ static INPUT_PORTS_START( lchicken )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lchicken_state, motor_switch, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(lchicken_state, motor_switch_r)
INPUT_PORTS_END
void lchicken_state::lchicken(machine_config &config)
diff --git a/src/mame/drivers/homelab.cpp b/src/mame/drivers/homelab.cpp
index dbbc6f6bec5..55fe65152bc 100644
--- a/src/mame/drivers/homelab.cpp
+++ b/src/mame/drivers/homelab.cpp
@@ -62,7 +62,7 @@ public:
void init_brailab4();
- DECLARE_CUSTOM_INPUT_MEMBER(cass3_r);
+ DECLARE_READ_LINE_MEMBER(cass3_r);
private:
DECLARE_READ8_MEMBER(key_r);
@@ -170,7 +170,7 @@ WRITE8_MEMBER( homelab_state::brailab4_portff_w )
membank("bank1")->set_entry(1);
}
-CUSTOM_INPUT_MEMBER( homelab_state::cass3_r )
+READ_LINE_MEMBER( homelab_state::cass3_r )
{
return (m_cass->input() > 0.03);
}
@@ -362,7 +362,7 @@ static INPUT_PORTS_START( homelab3 ) // F4 to F8 are foreign characters
PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("X3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homelab_state, cass3_r, " ")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homelab_state, cass3_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
@@ -475,7 +475,7 @@ static INPUT_PORTS_START( brailab4 ) // F4 to F8 are foreign characters
PORT_BIT(0xf0, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("X3")
- PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homelab_state, cass3_r, " ")
+ PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homelab_state, cass3_r)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F2") PORT_CODE(KEYCODE_F2)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F1") PORT_CODE(KEYCODE_F1)
PORT_BIT(0xf8, IP_ACTIVE_LOW, IPT_UNUSED)
diff --git a/src/mame/drivers/homerun.cpp b/src/mame/drivers/homerun.cpp
index 9ced0870472..4b45d7a71ef 100644
--- a/src/mame/drivers/homerun.cpp
+++ b/src/mame/drivers/homerun.cpp
@@ -126,12 +126,12 @@ void homerun_state::io_map(address_map &map)
}
-CUSTOM_INPUT_MEMBER(homerun_state::homerun_d7756_busy_r)
+READ_LINE_MEMBER(homerun_state::homerun_d7756_busy_r)
{
return m_samples->playing(0) ? 0 : 1;
}
-CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_d7756_busy_r)
+READ_LINE_MEMBER(homerun_state::ganjaja_d7756_busy_r)
{
return m_d7756->busy_r();
}
@@ -152,8 +152,8 @@ CUSTOM_INPUT_MEMBER(homerun_state::ganjaja_hopper_status_r)
static INPUT_PORTS_START( homerun )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, sprite0_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, homerun_d7756_busy_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, homerun_d7756_busy_r)
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@@ -189,7 +189,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dynashot )
PORT_START("IN0")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, sprite0_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED ) // doesn't have d7756
PORT_BIT( 0x37, IP_ACTIVE_HIGH, IPT_UNKNOWN )
@@ -227,8 +227,8 @@ static INPUT_PORTS_START( ganjaja )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // ?
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, sprite0_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_d7756_busy_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, sprite0_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(homerun_state, ganjaja_d7756_busy_r)
PORT_BIT( 0x36, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN1")
@@ -236,7 +236,7 @@ static INPUT_PORTS_START( ganjaja )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_NAME("P1 Down / Paper")
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_NAME("P1 Right / Scissors")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) // unused?
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, homerun_state, ganjaja_hopper_status_r, nullptr)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(homerun_state, ganjaja_hopper_status_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/icecold.cpp b/src/mame/drivers/icecold.cpp
index 055d81782eb..7d09be7a758 100644
--- a/src/mame/drivers/icecold.cpp
+++ b/src/mame/drivers/icecold.cpp
@@ -156,7 +156,7 @@ static INPUT_PORTS_START( icecold )
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_JOYSTICKRIGHT_UP)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP)
- PORT_BIT(0x55, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, icecold_state, motors_limit_r, nullptr)
+ PORT_BIT(0x55, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(icecold_state, motors_limit_r)
PORT_START("X0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_START1)
diff --git a/src/mame/drivers/igs009.cpp b/src/mame/drivers/igs009.cpp
index 459cf6c8e05..88a622f316c 100644
--- a/src/mame/drivers/igs009.cpp
+++ b/src/mame/drivers/igs009.cpp
@@ -66,7 +66,7 @@ public:
void init_jingbell();
void init_jingbelli();
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_WRITE8_MEMBER(reel1_ram_w);
@@ -387,7 +387,7 @@ uint32_t igs009_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
***************************************************************************/
-CUSTOM_INPUT_MEMBER(igs009_state::hopper_r)
+READ_LINE_MEMBER(igs009_state::hopper_r)
{
return m_hopper && !(m_screen->frame_number()%10);
}
@@ -698,7 +698,7 @@ static INPUT_PORTS_START( jingbell )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igs009_state,hopper_r, nullptr) // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs009_state, hopper_r) // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT ) PORT_NAME("Pay Out")
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)
diff --git a/src/mame/drivers/igs011.cpp b/src/mame/drivers/igs011.cpp
index 8f54ac5c800..21b5163779b 100644
--- a/src/mame/drivers/igs011.cpp
+++ b/src/mame/drivers/igs011.cpp
@@ -100,7 +100,7 @@ public:
{
}
- DECLARE_CUSTOM_INPUT_MEMBER(igs_hopper_r);
+ DECLARE_READ_LINE_MEMBER(igs_hopper_r);
void init_lhbv33c();
void init_drgnwrldv21j();
@@ -641,7 +641,7 @@ void igs011_state::machine_start()
// Inputs
-CUSTOM_INPUT_MEMBER(igs011_state::igs_hopper_r)
+READ_LINE_MEMBER(igs011_state::igs_hopper_r)
{
return (m_igs_hopper && ((m_screen->frame_number()/5)&1)) ? 0x0000 : 0x0001;
}
@@ -3275,7 +3275,7 @@ static INPUT_PORTS_START( lhb2 )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state, igs_hopper_r, nullptr) // hopper switch
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3405,7 +3405,7 @@ static INPUT_PORTS_START( nkishusp )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) // data clear
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // stats
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -3534,7 +3534,7 @@ static INPUT_PORTS_START( wlcc )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE2 ) // shown in test mode
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Pay Out") PORT_CODE(KEYCODE_O) // clear coin
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
@@ -3663,7 +3663,7 @@ static INPUT_PORTS_START( lhb )
PORT_DIPUNKNOWN( 0x80, 0x80 )
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE2 ) // system reset
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
@@ -3964,7 +3964,7 @@ static INPUT_PORTS_START( xymg )
PORT_DIPUNKNOWN( 0x80, 0x80 )
PORT_START("COIN")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, igs011_state,igs_hopper_r, nullptr) // hopper switch
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igs011_state, igs_hopper_r) // hopper switch
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x04, IP_ACTIVE_LOW ) // keep pressed while booting
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE1 ) // stats
diff --git a/src/mame/drivers/igspoker.cpp b/src/mame/drivers/igspoker.cpp
index 6993004728d..92a9f1fe0bd 100644
--- a/src/mame/drivers/igspoker.cpp
+++ b/src/mame/drivers/igspoker.cpp
@@ -124,7 +124,7 @@ public:
void init_cpokerpk();
void init_kungfu();
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_READ8_MEMBER(igs_irqack_r);
@@ -393,7 +393,7 @@ WRITE8_MEMBER(igspoker_state::custom_io_w)
}
}
-CUSTOM_INPUT_MEMBER(igspoker_state::hopper_r)
+READ_LINE_MEMBER(igspoker_state::hopper_r)
{
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
@@ -541,7 +541,7 @@ static INPUT_PORTS_START( cpoker )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -675,7 +675,7 @@ static INPUT_PORTS_START( cpokerx )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -840,7 +840,7 @@ static INPUT_PORTS_START( csk227 )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
@@ -985,7 +985,7 @@ static INPUT_PORTS_START( csk234 )
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1137,7 +1137,7 @@ static INPUT_PORTS_START( igs_ncs )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1459,7 +1459,7 @@ static INPUT_PORTS_START( cpokerpk )
PORT_DIPSETTING( 0x00, "100:1" )
PORT_START("SERVICE")
- PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x8f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1594,7 +1594,7 @@ static INPUT_PORTS_START( chleague )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SERVICE")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1733,7 +1733,7 @@ static INPUT_PORTS_START( pktet346 )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
@@ -1844,7 +1844,7 @@ static INPUT_PORTS_START( igstet341 )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_CODE(KEYCODE_9)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,igspoker_state, hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(igspoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
diff --git a/src/mame/drivers/imolagp.cpp b/src/mame/drivers/imolagp.cpp
index 459d5e223c8..238eef986a7 100644
--- a/src/mame/drivers/imolagp.cpp
+++ b/src/mame/drivers/imolagp.cpp
@@ -450,7 +450,7 @@ static INPUT_PORTS_START( imolagp )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(imolagp_state, imolagp_steerlatch_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -481,7 +481,7 @@ static INPUT_PORTS_START( imolagpo )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("IN1")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, imolagp_state, imolagp_steerlatch_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(imolagp_state, imolagp_steerlatch_r)
INPUT_PORTS_END
diff --git a/src/mame/drivers/inufuku.cpp b/src/mame/drivers/inufuku.cpp
index 1d1df8bccfb..8215a410db1 100644
--- a/src/mame/drivers/inufuku.cpp
+++ b/src/mame/drivers/inufuku.cpp
@@ -100,7 +100,7 @@ WRITE8_MEMBER(inufuku_state::inufuku_soundrombank_w)
******************************************************************************/
-CUSTOM_INPUT_MEMBER(inufuku_state::soundflag_r)
+READ_LINE_MEMBER(inufuku_state::soundflag_r)
{
return m_soundlatch->pending_r() ? 0 : 1;
}
@@ -222,7 +222,7 @@ static INPUT_PORTS_START( inufuku )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, inufuku_state,soundflag_r, nullptr) // pending sound command
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(inufuku_state, soundflag_r) // pending sound command
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN ) // 3on3dunk cares about something in here, possibly a vblank flag
PORT_START( "EEPROMOUT" )
diff --git a/src/mame/drivers/istrebiteli.cpp b/src/mame/drivers/istrebiteli.cpp
index 9eb028d49ac..2121be3167b 100644
--- a/src/mame/drivers/istrebiteli.cpp
+++ b/src/mame/drivers/istrebiteli.cpp
@@ -144,7 +144,7 @@ public:
void istreb(machine_config &config);
void motogonki(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(collision_r);
+ template <int ID> DECLARE_READ_LINE_MEMBER(collision_r);
DECLARE_CUSTOM_INPUT_MEMBER(coin_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inc);
@@ -449,23 +449,23 @@ void istrebiteli_state::moto_io_map(address_map &map)
map(0x40, 0x4f).w(FUNC(istrebiteli_state::moto_tileram_w));
}
-CUSTOM_INPUT_MEMBER(istrebiteli_state::collision_r)
+template <int ID>
+READ_LINE_MEMBER(istrebiteli_state::collision_r)
{
// piece of HACK
// real hardware does per-pixel sprite collision detection
- int id = *(int*)&param;
- if ((m_spr_ctrl[id] & 0x80) == 0)
+ if ((m_spr_ctrl[ID] & 0x80) == 0)
{
- int sx = m_spr_xy[0 + id * 2];
- int sy = m_spr_xy[1 + id * 2];
- int px = m_spr_xy[6 - id * 2] + 3;
- int py = m_spr_xy[7 - id * 2] + 3;
+ int sx = m_spr_xy[0 + ID * 2];
+ int sy = m_spr_xy[1 + ID * 2];
+ int px = m_spr_xy[6 - ID * 2] + 3;
+ int py = m_spr_xy[7 - ID * 2] + 3;
if (sx > 56 && px >= sx && px < (sx + 8) && py >= sy && py < (sy + 8))
- m_spr_collision[id] |= 1;
+ m_spr_collision[ID] |= 1;
}
- return m_spr_collision[id];
+ return m_spr_collision[ID];
}
CUSTOM_INPUT_MEMBER(istrebiteli_state::coin_r)
@@ -486,7 +486,7 @@ static INPUT_PORTS_START( istreb )
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, istrebiteli_state, collision_r, 1)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(istrebiteli_state, collision_r<1>)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
@@ -496,14 +496,14 @@ static INPUT_PORTS_START( istreb )
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(2)
PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(2)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(2)
- PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, istrebiteli_state, collision_r, 0)
+ PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_MEMBER(istrebiteli_state, collision_r<0>)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("IN2")
PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_START1)
PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_START2)
- PORT_BIT(0x3c, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, istrebiteli_state, coin_r, nullptr)
+ PORT_BIT(0x3c, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(istrebiteli_state, coin_r)
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_HBLANK("screen")
PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_VBLANK("screen")
diff --git a/src/mame/drivers/itech32.cpp b/src/mame/drivers/itech32.cpp
index d11c61cf430..e96530bacfd 100644
--- a/src/mame/drivers/itech32.cpp
+++ b/src/mame/drivers/itech32.cpp
@@ -488,7 +488,7 @@ void itech32_state::color_w(u8 data)
*************************************/
-CUSTOM_INPUT_MEMBER(itech32_state::special_port_r)
+READ_LINE_MEMBER(itech32_state::special_port_r)
{
if (m_soundlatch->pending_r())
m_special_result ^= 1;
@@ -1093,7 +1093,7 @@ static INPUT_PORTS_START( timekill )
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech32_state, special_port_r)
PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:1")
PORT_DIPSETTING( 0x0000, "-" )
PORT_DIPSETTING( 0x0010, "+" )
@@ -1138,7 +1138,7 @@ static INPUT_PORTS_START( itech32_base_16bit )
PORT_SERVICE_NO_TOGGLE( 0x0001, IP_ACTIVE_LOW )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
+ PORT_BIT( 0x0008, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech32_state, special_port_r)
PORT_DIPNAME( 0x0010, 0x0000, "Video Sync" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x0000, "-" )
PORT_DIPSETTING( 0x0010, "+" )
@@ -1357,7 +1357,7 @@ static INPUT_PORTS_START( itech32_base_32bit )
PORT_SERVICE_NO_TOGGLE( 0x00010000, IP_ACTIVE_LOW )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x00040000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech32_state,special_port_r, nullptr)
+ PORT_BIT( 0x00080000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech32_state, special_port_r)
PORT_DIPNAME( 0x00100000, 0x00000000, "Video Sync" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00000000, "-" )
PORT_DIPSETTING( 0x00100000, "+" )
diff --git a/src/mame/drivers/itech8.cpp b/src/mame/drivers/itech8.cpp
index 72eea1aa603..f3ec9da347d 100644
--- a/src/mame/drivers/itech8.cpp
+++ b/src/mame/drivers/itech8.cpp
@@ -752,7 +752,7 @@ WRITE8_MEMBER(itech8_state::rimrockn_bank_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(itech8_state::special_r)
+READ_LINE_MEMBER(itech8_state::special_r)
{
return m_pia_portb_data & 0x01;
}
@@ -1056,7 +1056,7 @@ void itech8_state::slikz80_io_map(address_map &map)
static INPUT_PORTS_START( wfortune )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1085,7 +1085,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( grmatch )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, "Adjustments Lockout" )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
@@ -1123,7 +1123,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( stratab )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1171,14 +1171,12 @@ INPUT_PORTS_END
CUSTOM_INPUT_MEMBER(itech8_state::gtg_mux)
{
- const char *tag1 = (const char *)param;
- const char *tag2 = tag1 + strlen(tag1) + 1;
- return ioport(tag1)->read() & ioport(tag2)->read();
+ return m_p1->read() & m_p2->read();
}
static INPUT_PORTS_START( gtg )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1189,7 +1187,7 @@ static INPUT_PORTS_START( gtg )
PORT_START("60")
/* it is still unknown how the second player inputs are muxed in */
/* currently we map both sets of controls to the same inputs */
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,gtg_mux, "P1\0P2")
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(itech8_state, gtg_mux)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -1215,7 +1213,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gtgt )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1242,7 +1240,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gtg2t )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1279,7 +1277,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( slikshot )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1306,7 +1304,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( dynobop )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1333,7 +1331,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( sstrike )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1360,7 +1358,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( pokrdice )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Lower Right") PORT_CODE(KEYCODE_3_PAD)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
@@ -1389,7 +1387,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( hstennis )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x08, DEF_STR( Upright ) )
@@ -1424,7 +1422,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( arlingtn )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Unknown ) ) /* see code at e23c */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -1455,7 +1453,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( peggle )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1477,7 +1475,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( pegglet )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x80, IP_ACTIVE_LOW )
@@ -1499,7 +1497,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( neckneck )
PORT_START("40")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_BIT( 0x06, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* see code at e23c */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -1540,7 +1538,7 @@ static INPUT_PORTS_START( rimrockn )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, itech8_state,special_r, nullptr) /* input from sound board */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(itech8_state, special_r) /* input from sound board */
PORT_START("80")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/jackie.cpp b/src/mame/drivers/jackie.cpp
index 7f85992824b..36281367b71 100644
--- a/src/mame/drivers/jackie.cpp
+++ b/src/mame/drivers/jackie.cpp
@@ -77,7 +77,7 @@ public:
void init_jackie();
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
private:
DECLARE_WRITE8_MEMBER(fg_tile_w);
@@ -375,7 +375,7 @@ void jackie_state::io_map(address_map &map)
map(0x8000, 0xffff).r(FUNC(jackie_state::expram_r));
}
-CUSTOM_INPUT_MEMBER(jackie_state::hopper_r)
+READ_LINE_MEMBER(jackie_state::hopper_r)
{
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
@@ -454,7 +454,7 @@ static INPUT_PORTS_START( jackie )
PORT_START("SERVICE")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_CODE(KEYCODE_9) PORT_NAME("Attendent")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jackie_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jackie_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW ) // test (press during boot)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
diff --git a/src/mame/drivers/jankenmn.cpp b/src/mame/drivers/jankenmn.cpp
index 4f722610c3e..6b4b948756e 100644
--- a/src/mame/drivers/jankenmn.cpp
+++ b/src/mame/drivers/jankenmn.cpp
@@ -169,7 +169,7 @@ public:
, m_lamps(*this, "lamp%u", 0U)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_status_r);
+ DECLARE_READ_LINE_MEMBER(hopper_status_r);
void jankenmn(machine_config &config);
@@ -251,7 +251,7 @@ WRITE8_MEMBER(jankenmn_state::lamps3_w)
logerror("payout: %02X\n", (data & 0x04));
}
-CUSTOM_INPUT_MEMBER(jankenmn_state::hopper_status_r)
+READ_LINE_MEMBER(jankenmn_state::hopper_status_r)
{
// temp workaround, needs hopper
return machine().rand();
@@ -336,7 +336,7 @@ static INPUT_PORTS_START( jankenmn )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Paa (Paper)")
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_COIN3 ) // 100 yen coin
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jankenmn_state, hopper_status_r, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jankenmn_state, hopper_status_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN2 ) // 10 yen coin
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 ) // 10 yen coin
diff --git a/src/mame/drivers/jedi.cpp b/src/mame/drivers/jedi.cpp
index e0c773cf42d..eb177b62da1 100644
--- a/src/mame/drivers/jedi.cpp
+++ b/src/mame/drivers/jedi.cpp
@@ -303,7 +303,7 @@ static INPUT_PORTS_START( jedi )
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_TILT )
PORT_BIT( 0x18, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,jedi_state,jedi_audio_comm_stat_r, nullptr)
+ PORT_BIT( 0x60, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(jedi_state, jedi_audio_comm_stat_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("STICKY")
diff --git a/src/mame/drivers/kenseim.cpp b/src/mame/drivers/kenseim.cpp
index ad985da6393..d36a07e7116 100644
--- a/src/mame/drivers/kenseim.cpp
+++ b/src/mame/drivers/kenseim.cpp
@@ -172,11 +172,11 @@ public:
void init_kenseim();
- DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_1234_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_5678_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_9_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_req_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kenseim_cmd_LVm_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(cmd_1234_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(cmd_5678_r);
+ DECLARE_READ_LINE_MEMBER(cmd_9_r);
+ DECLARE_READ_LINE_MEMBER(cmd_req_r);
+ DECLARE_READ_LINE_MEMBER(cmd_LVm_r);
private:
void mole_up(int side, int mole)
@@ -373,27 +373,27 @@ WRITE8_MEMBER(kenseim_state::cpu_portc_w)
/* 68k side COMMS reads */
-CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_1234_r)
+CUSTOM_INPUT_MEMBER(kenseim_state::cmd_1234_r)
{
return (m_to_68k_cmd_low & 0x0f) >> 0;
}
-CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_5678_r)
+CUSTOM_INPUT_MEMBER(kenseim_state::cmd_5678_r)
{
return (m_to_68k_cmd_low & 0xf0) >> 4;
}
-CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_9_r)
+READ_LINE_MEMBER(kenseim_state::cmd_9_r)
{
return m_to_68k_cmd_d9;
}
-CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_req_r)
+READ_LINE_MEMBER(kenseim_state::cmd_req_r)
{
return m_to_68k_cmd_req;
}
-CUSTOM_INPUT_MEMBER(kenseim_state::kenseim_cmd_LVm_r)
+READ_LINE_MEMBER(kenseim_state::cmd_LVm_r)
{
return m_to_68k_cmd_LVm;;
}
@@ -512,10 +512,10 @@ static INPUT_PORTS_START( kenseim )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_COIN1*/ ) // n/c
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_COIN2*/ ) // n/c
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_9_r, nullptr) // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // D9
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(kenseim_state, cmd_9_r) // PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) // D9
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // n/c?
- PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_req_r, nullptr) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // REQ
- PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_LVm_r, nullptr) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // LVm
+ PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(kenseim_state, cmd_req_r) // PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 ) // REQ
+ PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(kenseim_state, cmd_LVm_r) // PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 ) // LVm
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED ) // PORT_SERVICE( 0x40, IP_ACTIVE_LOW ) n/c
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // n/c?
@@ -524,7 +524,7 @@ static INPUT_PORTS_START( kenseim )
// PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1) // D6
// PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1) // D7
// PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(1) // D8
- PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_5678_r, nullptr)
+ PORT_BIT( 0x000f, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(kenseim_state, cmd_5678_r)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON1*/ ) /*PORT_PLAYER(1)*/ // n/c
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON2*/ ) /*PORT_PLAYER(1)*/ // n/c
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED/*IPT_BUTTON3*/ ) /*PORT_PLAYER(1)*/ // n/c
@@ -534,7 +534,7 @@ static INPUT_PORTS_START( kenseim )
// PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2) // D2
// PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2) // D3
// PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2) // D4
- PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, kenseim_state, kenseim_cmd_1234_r, nullptr)
+ PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(kenseim_state, cmd_1234_r)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON1*/ ) /*PORT_PLAYER(2)*/ // n/c
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON2*/ ) /*PORT_PLAYER(2)*/ // n/c
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED /*IPT_BUTTON3*/ ) /*PORT_PLAYER(2)*/ // n/c
diff --git a/src/mame/drivers/konamigx.cpp b/src/mame/drivers/konamigx.cpp
index 5deb364a2d4..02879ecf82f 100644
--- a/src/mame/drivers/konamigx.cpp
+++ b/src/mame/drivers/konamigx.cpp
@@ -1189,7 +1189,7 @@ static INPUT_PORTS_START( common )
// note: racin' force expects bit 1 of the eeprom port to toggle
PORT_BIT( 0x00000001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
- PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, konamigx_state, gx_rdport1_3_r, nullptr)
+ PORT_BIT( 0x000000fe, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(konamigx_state, gx_rdport1_3_r)
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/ksys573.cpp b/src/mame/drivers/ksys573.cpp
index 17fbf6b5136..f8c5f328778 100644
--- a/src/mame/drivers/ksys573.cpp
+++ b/src/mame/drivers/ksys573.cpp
@@ -466,8 +466,8 @@ public:
void init_drmn();
DECLARE_CUSTOM_INPUT_MEMBER( gn845pwbb_read );
- DECLARE_CUSTOM_INPUT_MEMBER( gunmania_tank_shutter_sensor );
- DECLARE_CUSTOM_INPUT_MEMBER( gunmania_cable_holder_sensor );
+ DECLARE_READ_LINE_MEMBER( gunmania_tank_shutter_sensor );
+ DECLARE_READ_LINE_MEMBER( gunmania_cable_holder_sensor );
DECLARE_READ_LINE_MEMBER( h8_d0_r );
DECLARE_READ_LINE_MEMBER( h8_d1_r );
@@ -2026,7 +2026,7 @@ WRITE16_MEMBER( ksys573_state::gunmania_w )
verboselog( 2, "gunmania_w %08x %08x %08x\n", offset, mem_mask, data );
}
-CUSTOM_INPUT_MEMBER( ksys573_state::gunmania_tank_shutter_sensor )
+READ_LINE_MEMBER( ksys573_state::gunmania_tank_shutter_sensor )
{
if( m_tank_shutter_position == 0 )
{
@@ -2036,7 +2036,7 @@ CUSTOM_INPUT_MEMBER( ksys573_state::gunmania_tank_shutter_sensor )
return 0;
}
-CUSTOM_INPUT_MEMBER( ksys573_state::gunmania_cable_holder_sensor )
+READ_LINE_MEMBER( ksys573_state::gunmania_cable_holder_sensor )
{
return m_cable_holder_release;
}
@@ -2713,7 +2713,7 @@ static INPUT_PORTS_START( ddr )
PORT_INCLUDE( konami573 )
PORT_MODIFY( "IN2" )
- PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( DEVICE_SELF, ksys573_state,gn845pwbb_read, nullptr )
+ PORT_BIT( 0x00000f0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( ksys573_state, gn845pwbb_read )
PORT_START( "STAGE" )
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY PORT_PLAYER( 1 )
@@ -2873,11 +2873,11 @@ static INPUT_PORTS_START( gunmania )
PORT_BIT( 0x00000800, IP_ACTIVE_LOW, IPT_BUTTON7 ) PORT_PLAYER( 1 ) PORT_NAME( "Bullet Tube-1 Sensor" )
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER( 1 ) PORT_NAME( "Bullet Tube-2 Sensor" )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER( 1 ) PORT_NAME( "Safety Sensor Under" )
- PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_tank_shutter_sensor, nullptr )
+ PORT_BIT( 0x00000100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ksys573_state, gunmania_tank_shutter_sensor)
PORT_MODIFY( "IN3" )
PORT_BIT( 0x0d000b00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER( DEVICE_SELF,ksys573_state,gunmania_cable_holder_sensor, nullptr )
+ PORT_BIT( 0x02000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ksys573_state, gunmania_cable_holder_sensor)
PORT_START( "GUNX" )
PORT_BIT( 0x7f, 0x2f, IPT_LIGHTGUN_X ) PORT_CROSSHAIR( X, 1.0, 0.0, 0 ) PORT_MINMAX( 0x00,0x5f ) PORT_SENSITIVITY( 100 ) PORT_KEYDELTA( 15 ) PORT_PLAYER( 1 )
diff --git a/src/mame/drivers/ladybug.cpp b/src/mame/drivers/ladybug.cpp
index 14ee602e55d..6160930e578 100644
--- a/src/mame/drivers/ladybug.cpp
+++ b/src/mame/drivers/ladybug.cpp
@@ -202,13 +202,13 @@ CUSTOM_INPUT_MEMBER(ladybug_state::ladybug_p2_control_r)
static INPUT_PORTS_START( ladybug )
PORT_START("IN0")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state, ladybug_p1_control_r, nullptr)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ladybug_state, ladybug_p1_control_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT )
PORT_START("IN1")
- PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ladybug_state, ladybug_p2_control_r, nullptr)
+ PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ladybug_state, ladybug_p2_control_r)
// This should be connected to the 4V clock. I don't think the game uses it.
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
// Note that there are TWO VBlank inputs, one is active low, the other active
diff --git a/src/mame/drivers/lastbank.cpp b/src/mame/drivers/lastbank.cpp
index 3934797a153..d6403343398 100644
--- a/src/mame/drivers/lastbank.cpp
+++ b/src/mame/drivers/lastbank.cpp
@@ -223,7 +223,7 @@ static INPUT_PORTS_START( lastbank )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x30, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lastbank_state, sound_status_r, nullptr)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(lastbank_state, sound_status_r)
PORT_START("P1_KEY0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYPAD ) PORT_NAME("5-6") PORT_CODE(KEYCODE_B)
diff --git a/src/mame/drivers/lethalj.cpp b/src/mame/drivers/lethalj.cpp
index 01875d251d5..2fc6664dc42 100644
--- a/src/mame/drivers/lethalj.cpp
+++ b/src/mame/drivers/lethalj.cpp
@@ -514,7 +514,7 @@ static INPUT_PORTS_START( cclownz )
PORT_DIPSETTING( 0x0000, "3000" )
PORT_START("IN1")
- PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, lethalj_state,cclownz_paddle, nullptr)
+ PORT_BIT( 0x0f0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(lethalj_state, cclownz_paddle)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0060, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START1 )
diff --git a/src/mame/drivers/limenko.cpp b/src/mame/drivers/limenko.cpp
index d8291d3ad28..55ccde825cd 100644
--- a/src/mame/drivers/limenko.cpp
+++ b/src/mame/drivers/limenko.cpp
@@ -66,7 +66,7 @@ public:
void init_legendoh();
void init_spotty();
- DECLARE_CUSTOM_INPUT_MEMBER(spriteram_bit_r);
+ DECLARE_READ_LINE_MEMBER(spriteram_bit_r);
protected:
virtual void video_start() override;
@@ -164,7 +164,7 @@ void limenko_state::fg_videoram_w(offs_t offset, u32 data, u32 mem_mask)
m_fg_tilemap->mark_tile_dirty(offset);
}
-CUSTOM_INPUT_MEMBER(limenko_state::spriteram_bit_r)
+READ_LINE_MEMBER(limenko_state::spriteram_bit_r)
{
return m_spriteram_bit;
}
@@ -572,7 +572,7 @@ static INPUT_PORTS_START(legendoh)
PORT_DIPNAME(0x20000000, 0x00000000, "Sound Enable")
PORT_DIPSETTING( 0x20000000, DEF_STR(Off))
PORT_DIPSETTING( 0x00000000, DEF_STR(On))
- PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, nullptr) //changes spriteram location
+ PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(limenko_state, spriteram_bit_r) //changes spriteram location
PORT_BIT(0x4000ffff, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("EEPROMOUT")
@@ -616,7 +616,7 @@ static INPUT_PORTS_START(sb2003)
PORT_DIPNAME(0x20000000, 0x00000000, "Sound Enable")
PORT_DIPSETTING( 0x20000000, DEF_STR(Off))
PORT_DIPSETTING( 0x00000000, DEF_STR(On))
- PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, nullptr) //changes spriteram location
+ PORT_BIT(0x80000000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(limenko_state, spriteram_bit_r) //changes spriteram location
PORT_BIT(0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1) // checked in dynabomb I/O test, but doesn't work in game
PORT_BIT(0x5f00ffff, IP_ACTIVE_LOW, IPT_UNUSED)
@@ -654,7 +654,7 @@ static INPUT_PORTS_START(spotty)
PORT_BIT(0x00010000, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x00020000, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x00040000, IP_ACTIVE_LOW, IPT_COIN1)
- PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, limenko_state,spriteram_bit_r, nullptr) //changes spriteram location
+ PORT_BIT(0x00080000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(limenko_state, spriteram_bit_r) //changes spriteram location
PORT_SERVICE_NO_TOGGLE(0x00200000, IP_ACTIVE_LOW)
PORT_BIT(0x00400000, IP_ACTIVE_LOW, IPT_CUSTOM) //security bit
PORT_BIT(0x00800000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read)
diff --git a/src/mame/drivers/littlerb.cpp b/src/mame/drivers/littlerb.cpp
index 5c5c206ca69..0058b8d9acb 100644
--- a/src/mame/drivers/littlerb.cpp
+++ b/src/mame/drivers/littlerb.cpp
@@ -255,7 +255,7 @@ static INPUT_PORTS_START( littlerb )
PORT_DIPNAME( 0x1000, 0x1000, "???" )
PORT_DIPSETTING( 0x1000, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
- PORT_BIT( 0xe000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, littlerb_state,littlerb_frame_step_r, nullptr)
+ PORT_BIT( 0xe000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(littlerb_state, littlerb_frame_step_r)
PORT_START("P2") /* 16bit */
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
diff --git a/src/mame/drivers/m92.cpp b/src/mame/drivers/m92.cpp
index 23cf49cb831..8485bdaf54e 100644
--- a/src/mame/drivers/m92.cpp
+++ b/src/mame/drivers/m92.cpp
@@ -283,7 +283,7 @@ WRITE8_MEMBER(m92_state::bankswitch_w)
logerror("%05x: bankswitch %04x\n", m_maincpu->pc(), data);
}
-CUSTOM_INPUT_MEMBER(m92_state::m92_sprite_busy_r)
+READ_LINE_MEMBER(m92_state::sprite_busy_r)
{
return m_sprite_buffer_busy;
}
@@ -420,7 +420,7 @@ static INPUT_PORTS_START( m92_2player )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, m92_state,m92_sprite_busy_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(m92_state, sprite_busy_r)
/* DIP switch bank 3 */
PORT_DIPUNKNOWN_DIPLOC( 0x0100, 0x0100, "SW3:1" )
PORT_DIPUNKNOWN_DIPLOC( 0x0200, 0x0200, "SW3:2" )
diff --git a/src/mame/drivers/merit.cpp b/src/mame/drivers/merit.cpp
index 8c932d55280..ba47fc504d6 100644
--- a/src/mame/drivers/merit.cpp
+++ b/src/mame/drivers/merit.cpp
@@ -120,7 +120,7 @@ public:
void init_key_2();
void init_dtrvwz5();
- DECLARE_CUSTOM_INPUT_MEMBER(rndbit_r);
+ DECLARE_READ_LINE_MEMBER(rndbit_r);
private:
void dodge_nvram_init(nvram_device &nvram, void *base, size_t size);
@@ -411,7 +411,7 @@ WRITE8_MEMBER(merit_state::casino5_bank_w)
}
}
-CUSTOM_INPUT_MEMBER(merit_state::rndbit_r)
+READ_LINE_MEMBER(merit_state::rndbit_r)
{
return machine().rand();
}
@@ -638,7 +638,7 @@ static INPUT_PORTS_START( meritpoker )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(merit_state, rndbit_r)
PORT_START("DSW")
PORT_DIPUNKNOWN_DIPLOC( 0x01, IP_ACTIVE_LOW, "SW1:1" )
@@ -846,7 +846,7 @@ static INPUT_PORTS_START( pitboss ) /* PCB pinout maps 12 lamp outputs - Where a
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_COCKTAIL PORT_CODE(KEYCODE_G) PORT_NAME("P2 Button 5")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_COCKTAIL PORT_CODE(KEYCODE_W) PORT_NAME("P2 Play")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(merit_state, rndbit_r)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1")
@@ -909,7 +909,7 @@ static INPUT_PORTS_START( mroundup ) // todo: Find were Player 2 "Play" is mappe
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_COCKTAIL PORT_CODE(KEYCODE_G) PORT_NAME("P2 Button 5")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // pulling this LOW causes "unathorized conversion" msg.
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(merit_state, rndbit_r)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, "Enable Draw Poker" ) PORT_DIPLOCATION("SW1:1")
@@ -1054,7 +1054,7 @@ static INPUT_PORTS_START( casino5 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, merit_state,rndbit_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(merit_state, rndbit_r)
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, "Enable Draw Poker" ) PORT_DIPLOCATION("SW1:1")
diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp
index 47722f3d48a..41600286900 100644
--- a/src/mame/drivers/metro.cpp
+++ b/src/mame/drivers/metro.cpp
@@ -322,9 +322,9 @@ READ8_MEMBER(metro_state::soundstatus_r)
return (m_busy_sndcpu ? 0x00 : 0x01);
}
-CUSTOM_INPUT_MEMBER(metro_state::custom_soundstatus_r)
+READ_LINE_MEMBER(metro_state::custom_soundstatus_r)
{
- return (m_busy_sndcpu ? 0x01 : 0x00);
+ return (m_busy_sndcpu ? 1 : 0);
}
WRITE8_MEMBER(metro_state::soundstatus_w)
@@ -1373,7 +1373,7 @@ void metro_state::vmetal_map(address_map &map)
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) \
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_START2 ) \
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) \
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, metro_state,custom_soundstatus_r, nullptr) /* From Sound CPU */
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(metro_state, custom_soundstatus_r) /* From Sound CPU */
#define COINAGE_SERVICE_LOC(DIPBANK) \
diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp
index df4dcfaf274..52d51efd330 100644
--- a/src/mame/drivers/mhavoc.cpp
+++ b/src/mame/drivers/mhavoc.cpp
@@ -375,7 +375,7 @@ void mhavoc_state::alphaone_map(address_map &map)
*
*************************************/
-CUSTOM_INPUT_MEMBER(mhavoc_state::clock_r)
+READ_LINE_MEMBER(mhavoc_state::clock_r)
{
/* 2.4kHz (divide 2.5MHz by 1024) */
return (m_alpha->total_cycles() & 0x400) ? 0 : 1;
@@ -394,20 +394,20 @@ static INPUT_PORTS_START( mhavoc )
/* Bit 2 = Gamma xmtd flag */
/* Bit 1 = 2.4kHz (divide 2.5MHz by 1024) */
/* Bit 0 = Vector generator halt flag */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_mhavoc_device, done_r, nullptr)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, nullptr)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_xmtd_r, nullptr)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,gamma_rcvd_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_mhavoc_device, done_r)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(mhavoc_state, clock_r)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(mhavoc_state, gamma_xmtd_r)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(mhavoc_state, gamma_rcvd_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diag Step/Coin C") PORT_CODE(KEYCODE_F1)
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,mhavoc_bit67_r, "COIN\0SERVICE")
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mhavoc_state, coin_service_r)
PORT_START("IN1") /* gamma */
/* Bits 7-2 = input switches */
/* Bit 1 = Alpha rcvd flag */
/* Bit 0 = Alpha xmtd flag */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_xmtd_r, nullptr)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,alpha_rcvd_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(mhavoc_state, alpha_xmtd_r)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(mhavoc_state, alpha_rcvd_r)
PORT_BIT( 0x0c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
@@ -476,7 +476,7 @@ static INPUT_PORTS_START( mhavocrv )
PORT_INCLUDE( mhavoc )
PORT_MODIFY("IN1")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,tms5220_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("tms", tms5220_device, readyq_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
INPUT_PORTS_END
@@ -493,8 +493,8 @@ INPUT_PORTS_END
static INPUT_PORTS_START( alphaone )
PORT_START("IN0") /* alpha (player_1 = 0) */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_mhavoc_device, done_r, nullptr)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mhavoc_state,clock_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_mhavoc_device, done_r)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(mhavoc_state, clock_r)
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
diff --git a/src/mame/drivers/micro3d.cpp b/src/mame/drivers/micro3d.cpp
index 6077a7cb88a..160fdaadb2d 100644
--- a/src/mame/drivers/micro3d.cpp
+++ b/src/mame/drivers/micro3d.cpp
@@ -117,7 +117,7 @@ static INPUT_PORTS_START( botss )
PORT_INCLUDE( micro3d )
PORT_MODIFY("INPUTS_A_B")
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, micro3d_state, botss_hwchk_r, nullptr)
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(micro3d_state, botss_hwchk_r)
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shield")
PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
diff --git a/src/mame/drivers/midvunit.cpp b/src/mame/drivers/midvunit.cpp
index 5ae88e17edb..5ed78778e39 100644
--- a/src/mame/drivers/midvunit.cpp
+++ b/src/mame/drivers/midvunit.cpp
@@ -757,7 +757,7 @@ static INPUT_PORTS_START( crusnusa )
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_NAME("Motion Status - Device 2")
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_NAME("Motion Status - Device 3")
PORT_BIT( 0x0800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_NAME("Motion Status - Device 4")
- PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midvunit_state, motion_r, nullptr )
+ PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(midvunit_state, motion_r)
PORT_START("DSW")
/* DSW2 at U97 */
diff --git a/src/mame/drivers/midyunit.cpp b/src/mame/drivers/midyunit.cpp
index 4d35c966546..7c0d543b23e 100644
--- a/src/mame/drivers/midyunit.cpp
+++ b/src/mame/drivers/midyunit.cpp
@@ -153,7 +153,7 @@ WRITE8_MEMBER(midyunit_state::yawdim_oki_bank_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(midyunit_state::narc_talkback_strobe_r)
+READ_LINE_MEMBER(midyunit_state::narc_talkback_strobe_r)
{
return (m_narc_sound->read() >> 8) & 1;
}
@@ -165,7 +165,7 @@ CUSTOM_INPUT_MEMBER(midyunit_state::narc_talkback_data_r)
}
-CUSTOM_INPUT_MEMBER(midyunit_state::adpcm_irq_state_r)
+READ_LINE_MEMBER(midyunit_state::adpcm_irq_state_r)
{
return m_adpcm_sound->irq_read() & 1;
}
@@ -241,7 +241,7 @@ static INPUT_PORTS_START( narc )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_COIN4 )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_strobe_r, nullptr)
+ PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(midyunit_state, narc_talkback_strobe_r)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED ) /* memory protect interlock */
PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xc000, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -257,7 +257,7 @@ static INPUT_PORTS_START( narc )
*/
PORT_START("IN2")
- PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,narc_talkback_data_r, nullptr)
+ PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(midyunit_state, narc_talkback_data_r)
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW")
@@ -724,7 +724,7 @@ static INPUT_PORTS_START( mkla2 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(midyunit_state, adpcm_irq_state_r)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1)
PORT_START("IN2")
@@ -816,7 +816,7 @@ static INPUT_PORTS_START( mkla4 )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P2 Block 2") PORT_PLAYER(2)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 Low Punch") PORT_PLAYER(1)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_NAME("P1 Low Kick") PORT_PLAYER(1)
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(midyunit_state, adpcm_irq_state_r)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_NAME("P1 Block 2") PORT_PLAYER(1)
PORT_START("IN2")
@@ -908,7 +908,7 @@ static INPUT_PORTS_START( term2 )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x3000, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(midyunit_state, adpcm_irq_state_r)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("DSW")
@@ -1009,7 +1009,7 @@ static INPUT_PORTS_START( totcarn )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNUSED ) /* video freeze */
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x3c00, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midyunit_state,adpcm_irq_state_r, nullptr)
+ PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(midyunit_state, adpcm_irq_state_r)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
diff --git a/src/mame/drivers/midzeus.cpp b/src/mame/drivers/midzeus.cpp
index a34c61a00f0..192bc040bb0 100644
--- a/src/mame/drivers/midzeus.cpp
+++ b/src/mame/drivers/midzeus.cpp
@@ -1100,7 +1100,7 @@ static INPUT_PORTS_START( crusnexo )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
- PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, midzeus_state, keypad_r, nullptr )
+ PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(midzeus_state, keypad_r )
PORT_BIT( 0xfff8, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("KEYPAD")
@@ -1216,7 +1216,7 @@ static INPUT_PORTS_START( thegrid )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
- PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, midzeus_state, custom_49way_r, nullptr)
+ PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(midzeus_state, custom_49way_r)
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("49WAYX")
diff --git a/src/mame/drivers/missile.cpp b/src/mame/drivers/missile.cpp
index 2a62d81080f..6aa4787d203 100644
--- a/src/mame/drivers/missile.cpp
+++ b/src/mame/drivers/missile.cpp
@@ -387,7 +387,7 @@ public:
void init_missilem();
void init_suprmatk();
- DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
+ DECLARE_READ_LINE_MEMBER(vblank_r);
private:
DECLARE_WRITE8_MEMBER(missile_w);
@@ -505,7 +505,7 @@ TIMER_CALLBACK_MEMBER(missile_state::clock_irq)
}
-CUSTOM_INPUT_MEMBER(missile_state::get_vblank)
+READ_LINE_MEMBER(missile_state::vblank_r)
{
int v = scanline_to_v(m_screen->vpos());
return v < 24;
@@ -991,7 +991,7 @@ static INPUT_PORTS_START( missile )
PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(missile_state, vblank_r)
PORT_START("R10") /* IN2 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("R10:1,2")
@@ -1081,7 +1081,7 @@ static INPUT_PORTS_START( suprmatk )
PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_CUSTOM )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT )
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, missile_state,get_vblank, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(missile_state, vblank_r)
PORT_START("R10") /* IN2 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coinage ) ) PORT_DIPLOCATION("R10:1,2")
diff --git a/src/mame/drivers/mjkjidai.cpp b/src/mame/drivers/mjkjidai.cpp
index 2aa94b2d72a..c83ef4b9023 100644
--- a/src/mame/drivers/mjkjidai.cpp
+++ b/src/mame/drivers/mjkjidai.cpp
@@ -162,7 +162,7 @@ static INPUT_PORTS_START( mjkjidai )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("KEYBOARD")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, mjkjidai_state, keyboard_r, nullptr)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(mjkjidai_state, keyboard_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // reinitialize NVRAM and reset the game
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp
index 4f2d41e2db1..3ed7aae5fd0 100644
--- a/src/mame/drivers/model2.cpp
+++ b/src/mame/drivers/model2.cpp
@@ -1739,7 +1739,7 @@ static INPUT_PORTS_START( daytona )
PORT_MODIFY("IN1")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_BUTTON9) PORT_NAME("VR4 (Green)")
PORT_BIT(0x0e, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x70, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state, daytona_gearbox_r, nullptr)
+ PORT_BIT(0x70, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(model2_state, daytona_gearbox_r)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_MODIFY("IN2")
@@ -1878,7 +1878,7 @@ static INPUT_PORTS_START( srallyc )
PORT_MODIFY("IN1")
PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN)
- PORT_BIT(0x70, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, model2_state, daytona_gearbox_r, nullptr)
+ PORT_BIT(0x70, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(model2_state, daytona_gearbox_r)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN)
PORT_MODIFY("IN2")
diff --git a/src/mame/drivers/mquake.cpp b/src/mame/drivers/mquake.cpp
index 1fdf926f4bb..a8917d18086 100644
--- a/src/mame/drivers/mquake.cpp
+++ b/src/mame/drivers/mquake.cpp
@@ -174,11 +174,11 @@ static INPUT_PORTS_START( mquake )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2) /* JS1SW */
PORT_START("joy_0_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mquake_state,amiga_joystick_convert, (void *)0)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mquake_state, amiga_joystick_convert<0>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("joy_1_dat")
- PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mquake_state,amiga_joystick_convert, (void *)1)
+ PORT_BIT( 0x0303, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mquake_state, amiga_joystick_convert<1>)
PORT_BIT( 0xfcfc, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("p1_joy")
diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp
index b71bb15525d..d3c5112b116 100644
--- a/src/mame/drivers/ms32.cpp
+++ b/src/mame/drivers/ms32.cpp
@@ -934,7 +934,7 @@ static INPUT_PORTS_START( ms32_mahjong )
PORT_INCLUDE( ms32 )
PORT_MODIFY("INPUTS")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ms32_state,mahjong_ctrl_r, nullptr) // here we read mahjong keys
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ms32_state, mahjong_ctrl_r) // here we read mahjong keys
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x00010000, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00020000, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/drivers/multigam.cpp b/src/mame/drivers/multigam.cpp
index 11034f792f3..a8617843474 100644
--- a/src/mame/drivers/multigam.cpp
+++ b/src/mame/drivers/multigam.cpp
@@ -135,7 +135,7 @@ public:
void init_multigam();
void init_multigm3();
- DECLARE_CUSTOM_INPUT_MEMBER(multigam_inputs_r);
+ DECLARE_READ_LINE_MEMBER(multigam_inputs_r);
protected:
virtual void machine_start() override;
@@ -346,7 +346,7 @@ READ8_MEMBER(multigam_state::multigam_IN1_r)
return ((m_in_1 >> m_in_1_shift++) & 0x01) | 0x40;
}
-CUSTOM_INPUT_MEMBER(multigam_state::multigam_inputs_r)
+READ_LINE_MEMBER(multigam_state::multigam_inputs_r)
{
/* bit 0: serial input (dsw)
bit 1: coin */
@@ -1036,7 +1036,7 @@ static INPUT_PORTS_START( multigam_common )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_PLAYER(2)
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, multigam_state,multigam_inputs_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(multigam_state, multigam_inputs_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_COIN1 )
INPUT_PORTS_END
diff --git a/src/mame/drivers/mw18w.cpp b/src/mame/drivers/mw18w.cpp
index f3a2e8263e4..64194a28ed0 100644
--- a/src/mame/drivers/mw18w.cpp
+++ b/src/mame/drivers/mw18w.cpp
@@ -219,7 +219,7 @@ static INPUT_PORTS_START( mw18w )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN ) // left/right sw.
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw18w_state, mw18w_sensors_r, nullptr)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw18w_state, mw18w_sensors_r)
PORT_START("IN1")
PORT_BIT( 0x1f, 0x00, IPT_PEDAL ) PORT_REMAP_TABLE(mw18w_controller_table + 0x20) PORT_SENSITIVITY(100) PORT_KEYDELTA(1) PORT_NAME("Gas Pedal")
diff --git a/src/mame/drivers/mw8080bw.cpp b/src/mame/drivers/mw8080bw.cpp
index c1ff84b847d..d00d06e6695 100644
--- a/src/mame/drivers/mw8080bw.cpp
+++ b/src/mame/drivers/mw8080bw.cpp
@@ -385,7 +385,7 @@ static INPUT_PORTS_START( seawolf )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x0c, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,seawolf_erase_input_r, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, seawolf_erase_input_r)
PORT_DIPNAME( 0xe0, 0x60, "Extended Time At" ) PORT_DIPLOCATION("G4:6,7,8")
PORT_DIPSETTING( 0x00, DEF_STR( None ) )
PORT_DIPSETTING( 0x20, "2000" )
@@ -656,21 +656,21 @@ void mw8080bw_state::tornbase_io_map(address_map &map)
static INPUT_PORTS_START( tornbase )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_left_input_r, nullptr)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_left_input_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, tornbase_hit_left_input_r)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, tornbase_pitch_left_input_r)
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Unused ) ) PORT_CONDITION("IN2", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("B1:7")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x80, DEF_STR( On ) )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_hit_right_input_r, nullptr)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_pitch_right_input_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, tornbase_hit_right_input_r)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, tornbase_pitch_right_input_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED) /* not connected */
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* schematics shows it as "START", but not used by the software */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,tornbase_score_input_r, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, tornbase_score_input_r)
PORT_DIPNAME( 0x78, 0x40, DEF_STR( Coinage ) ) PORT_CONDITION("IN2", 0x80, EQUALS, 0x00) PORT_DIPLOCATION("B1:2,3,4,5")
PORT_DIPSETTING( 0x18, "4 Coins/1 Inning" )
PORT_DIPSETTING( 0x10, "3 Coins/1 Inning" )
@@ -1240,10 +1240,10 @@ void mw8080bw_state::desertgu_io_map(address_map &map)
static INPUT_PORTS_START( desertgu )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_gun_input_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, desertgu_gun_input_r)
PORT_START("IN1")
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,desertgu_dip_sw_0_1_r, nullptr)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, desertgu_dip_sw_0_1_r)
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Language ) ) PORT_CONDITION("IN1", 0x30, NOTEQUALS, 0x30) PORT_DIPLOCATION("C2:5,6")
PORT_DIPSETTING( 0x00, DEF_STR( English ) )
PORT_DIPSETTING( 0x04, DEF_STR( German ) )
@@ -1365,12 +1365,12 @@ void mw8080bw_state::dplay_io_map(address_map &map)
static INPUT_PORTS_START( dplay )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Hit") PORT_PLAYER(1)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, nullptr)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, dplay_pitch_left_input_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Hit") PORT_PLAYER(2)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, nullptr)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, dplay_pitch_right_input_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("IN2")
@@ -1429,12 +1429,12 @@ INPUT_PORTS_END
static INPUT_PORTS_START( einning )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P1 Hit") PORT_PLAYER(1)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_left_input_r, nullptr)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, dplay_pitch_left_input_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("P2 Hit") PORT_PLAYER(2)
- PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,dplay_pitch_right_input_r, nullptr)
+ PORT_BIT( 0x7e, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, dplay_pitch_right_input_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("IN2")
@@ -1756,7 +1756,7 @@ void mw8080bw_state::clowns_io_map(address_map &map)
static INPUT_PORTS_START( clowns )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, clowns_controller_r)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) /* not connected */
@@ -1805,7 +1805,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( clowns1 )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, clowns_controller_r)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1896,7 +1896,7 @@ void mw8080bw_state::spacwalk_io_map(address_map &map)
static INPUT_PORTS_START( spacwalk )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,clowns_controller_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, clowns_controller_r)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2545,6 +2545,7 @@ CUSTOM_INPUT_MEMBER(mw8080bw_state::invaders_coin_input_r)
{
uint32_t ret = ioport(INVADERS_COIN_INPUT_PORT_TAG)->read();
+ // FIXME: use PORT_CHANGED_MEMBER or PORT_WRITE_LINE_MEMBER instead of updating here
machine().bookkeeping().coin_counter_w(0, !ret);
return ret;
@@ -2648,17 +2649,17 @@ static INPUT_PORTS_START( invaders )
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW:8")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x01, DEF_STR( On ) )
- PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw6_sw7_r, nullptr)
+ PORT_BIT( 0x06, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_sw6_sw7_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in0_control_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_sw5_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in0_control_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_sw5_r)
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_coin_input_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in1_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in1_control_r)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN2")
@@ -2671,7 +2672,7 @@ static INPUT_PORTS_START( invaders )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW:2")
PORT_DIPSETTING( 0x08, "1000" )
PORT_DIPSETTING( 0x00, "1500" )
- PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_in2_control_r, nullptr)
+ PORT_BIT( 0x70, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_in2_control_r)
PORT_DIPNAME( 0x80, 0x00, "Display Coinage" ) PORT_DIPLOCATION("SW:1")
PORT_DIPSETTING( 0x80, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2754,6 +2755,7 @@ CUSTOM_INPUT_MEMBER(mw8080bw_state::blueshrk_coin_input_r)
{
uint32_t ret = ioport(BLUESHRK_COIN_INPUT_PORT_TAG)->read();
+ // FIXME: use PORT_CHANGED_MEMBER or PORT_WRITE_LINE_MEMBER instead of updating here
machine().bookkeeping().coin_counter_w(0, !ret);
return ret;
@@ -2781,7 +2783,7 @@ static INPUT_PORTS_START( blueshrk )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,blueshrk_coin_input_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, blueshrk_coin_input_r)
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unused ) ) PORT_CONDITION("IN1", 0x80, EQUALS, 0x80) PORT_DIPLOCATION("SW:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -2872,7 +2874,7 @@ static INPUT_PORTS_START( invad2ct )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, mw8080bw_state,invaders_coin_input_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(mw8080bw_state, invaders_coin_input_r)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/namcos21_de.cpp b/src/mame/drivers/namcos21_de.cpp
index 5b1ed9a62e8..92c08805094 100644
--- a/src/mame/drivers/namcos21_de.cpp
+++ b/src/mame/drivers/namcos21_de.cpp
@@ -556,7 +556,7 @@ static INPUT_PORTS_START( driveyes )
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("pcb_1:MCUDI0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("gearbox", namcoio_gearbox_device, in_r, nullptr )
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_DEVICE_MEMBER("gearbox", namcoio_gearbox_device, in_r)
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("pcb_1:MCUDI1") /* 63B05Z0 - $3001 */
diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp
index 8ad1f1d5f50..23e472cadd2 100644
--- a/src/mame/drivers/namcos22.cpp
+++ b/src/mame/drivers/namcos22.cpp
@@ -3335,9 +3335,10 @@ INPUT_PORTS_END
/*********************************************************************************************/
-CUSTOM_INPUT_MEMBER(namcos22s_state::alpine_motor_read)
+template <int N>
+READ_LINE_MEMBER(namcos22s_state::alpine_motor_r)
{
- return m_motor_status >> (uintptr_t)param & 1;
+ return BIT(m_motor_status, N);
}
static INPUT_PORTS_START( alpiner )
@@ -3349,8 +3350,8 @@ static INPUT_PORTS_START( alpiner )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_START1 ) // Decision / View Change
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_16WAY // L Selection
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_16WAY // R Selection
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22s_state, alpine_motor_read, 0) // steps are free
- PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, namcos22s_state, alpine_motor_read, 1) // steps are locked
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(namcos22s_state, alpine_motor_r<0>) // steps are free
+ PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(namcos22s_state, alpine_motor_r<1>) // steps are locked
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("ADC.0")
diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp
index ed5f2018ca8..a175a2bf7a7 100644
--- a/src/mame/drivers/naomi.cpp
+++ b/src/mame/drivers/naomi.cpp
@@ -2534,7 +2534,7 @@ static INPUT_PORTS_START( naomi_mp )
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_OUTPUT) PORT_CHANGED_MEMBER(DEVICE_SELF, naomi_state,naomi_mp_w, 0)
PORT_START("P1")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, naomi_state,naomi_mp_r, "KEY1\0KEY2\0KEY3\0KEY4\0KEY5")
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(naomi_state, naomi_mp_r)
PORT_BIT( 0x00ff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("KEY1")
@@ -2587,7 +2587,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( suchie3 )
PORT_INCLUDE( naomi_mp )
PORT_MODIFY("P1")
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, naomi_state,naomi_mp_r, "KEY5\0KEY2\0KEY3\0KEY4\0KEY1")
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(naomi_state, suchie3_mp_r)
INPUT_PORTS_END
static INPUT_PORTS_START( naomi_kb )
@@ -2615,7 +2615,7 @@ static INPUT_PORTS_START( naomi_kb )
// ---- ---x num lock
PORT_START("P1.KC1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, naomi_state, naomi_kb_r, 0)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(naomi_state, naomi_kb_r)
PORT_START("P1.KC2")
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp
index 1d19aa6d393..376b129c49e 100644
--- a/src/mame/drivers/nbmj8891.cpp
+++ b/src/mame/drivers/nbmj8891.cpp
@@ -566,7 +566,7 @@ void nbmj8891_state::taiwanmb_io_map(address_map &map)
* However, a few games (lovehous, maiko, mmaiko, hanaoji and the ones using inputport3_r below)
* read nb1413m3_outcoin_flag also at inputport3! Is this the correct behaviour for these games
* or should they only check the flag at inputport3? */
-CUSTOM_INPUT_MEMBER( nbmj8891_state::nb1413m3_outcoin_flag_r )
+READ_LINE_MEMBER( nbmj8891_state::nb1413m3_outcoin_flag_r )
{
return m_nb1413m3->m_outcoin_flag & 0x01;
}
@@ -1649,7 +1649,7 @@ static INPUT_PORTS_START( lovehous )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nbmj8891_state, nb1413m3_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1810,7 +1810,7 @@ static INPUT_PORTS_START( maiko )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) //
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nbmj8891_state, nb1413m3_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) //
@@ -1886,7 +1886,7 @@ static INPUT_PORTS_START( mmaiko )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nbmj8891_state, nb1413m3_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1962,7 +1962,7 @@ static INPUT_PORTS_START( hanaoji )
PORT_START("PORT0-2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) //
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nbmj8891_state, nb1413m3_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nbmj8891_state, nb1413m3_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) //
diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp
index 82f55dbc5df..3b4720ef2b7 100644
--- a/src/mame/drivers/neogeo.cpp
+++ b/src/mame/drivers/neogeo.cpp
@@ -1826,8 +1826,8 @@ INPUT_PORTS_START( neogeo )
PORT_START("SYSTEM")
PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ngarcade_base_state, startsel_edge_joy_r, nullptr)
- PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_base_state, get_memcard_status, nullptr)
+ PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ngarcade_base_state, startsel_edge_joy_r)
+ PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(neogeo_base_state, get_memcard_status)
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_CUSTOM ) // Hardware type (AES=0, MVS=1). Some games check this and show a piracy warning screen if the hardware and BIOS don't match
PORT_START("AUDIO/COIN")
@@ -1838,7 +1838,7 @@ INPUT_PORTS_START( neogeo )
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_CUSTOM ) // sense: 4-slot
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("upd4990a", upd1990a_device, tp_r)
PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("upd4990a", upd1990a_device, data_out_r)
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_base_state,get_audio_result, nullptr)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(neogeo_base_state, get_audio_result)
PORT_START("TEST")
PORT_BIT( 0x003f, IP_ACTIVE_HIGH, IPT_UNUSED )
@@ -1851,7 +1851,7 @@ static INPUT_PORTS_START( neogeo_mvs )
PORT_INCLUDE( neogeo )
PORT_MODIFY("SYSTEM")
- PORT_BIT( 0x0500, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ngarcade_base_state, startsel_edge_joy_r, nullptr)
+ PORT_BIT( 0x0500, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ngarcade_base_state, startsel_edge_joy_r)
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Next Game") PORT_CODE(KEYCODE_3)
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Previous Game") PORT_CODE(KEYCODE_4)
@@ -1876,14 +1876,14 @@ INPUT_PORTS_START( aes )
PORT_START("IN2")
PORT_BIT( 0x0fff, IP_ACTIVE_LOW, IPT_UNUSED )
// Start & Select are read from controller slot device
- PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_base_state, get_memcard_status, nullptr)
+ PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(neogeo_base_state, get_memcard_status)
PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) /* Hardware type (AES=0, MVS=1) Some games check this and show a piracy warning screen if the hardware and BIOS don't match */
PORT_START("AUDIO")
PORT_BIT( 0x0007, IP_ACTIVE_HIGH, IPT_UNUSED ) /* AES has no coin slots, it's a console */
PORT_BIT( 0x0018, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* what is this? Universe BIOS uses these bits to detect MVS or AES hardware */
PORT_BIT( 0x00e0, IP_ACTIVE_HIGH, IPT_UNUSED ) /* AES has no upd4990a */
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, neogeo_base_state, get_audio_result, nullptr)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(neogeo_base_state, get_audio_result)
PORT_START("JP") // JP1 and JP2 are jumpers or solderpads depending on AES board revision, intended for use on the Development BIOS
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Short JP1 (Debug Monitor)") PORT_CODE(KEYCODE_F1) PORT_CHANGED_MEMBER(DEVICE_SELF, aes_base_state, aes_jp1, 0)
diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp
index 5cdbd6a3f82..5f02e7ea0b8 100644
--- a/src/mame/drivers/niyanpai.cpp
+++ b/src/mame/drivers/niyanpai.cpp
@@ -109,7 +109,7 @@ WRITE16_MEMBER(niyanpai_state::tmp68301_parallel_port_w)
machine().bookkeeping().coin_lockout_w(0,data & 0x08);
}
-CUSTOM_INPUT_MEMBER(niyanpai_state::musobana_outcoin_flag_r)
+READ_LINE_MEMBER(niyanpai_state::musobana_outcoin_flag_r)
{
if (m_motor_on) m_musobana_outcoin_flag ^= 1;
else m_musobana_outcoin_flag = 1;
@@ -482,7 +482,7 @@ static INPUT_PORTS_START( musobana ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(niyanpai_state, musobana_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
@@ -536,7 +536,7 @@ static INPUT_PORTS_START( 4psimasy )
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(niyanpai_state, musobana_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
@@ -602,7 +602,7 @@ static INPUT_PORTS_START( mhhonban ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(niyanpai_state, musobana_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
@@ -668,7 +668,7 @@ static INPUT_PORTS_START( zokumahj ) // I don't have manual for this game.
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START3 ) // CREDIT CLEAR
PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_MEMORY_RESET ) // MEMORY RESET
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_SERVICE2 ) // ANALYZER
- PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, niyanpai_state,musobana_outcoin_flag_r, nullptr) // OUT COIN
+ PORT_BIT( 0x2000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(niyanpai_state, musobana_outcoin_flag_r) // OUT COIN
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x8000, IP_ACTIVE_LOW ) // TEST
diff --git a/src/mame/drivers/nova2001.cpp b/src/mame/drivers/nova2001.cpp
index e19726fc8c1..d8ebe5cb5d2 100644
--- a/src/mame/drivers/nova2001.cpp
+++ b/src/mame/drivers/nova2001.cpp
@@ -393,7 +393,7 @@ static INPUT_PORTS_START( ninjakun )
PORT_START("IN2") /* 0xa002 */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nova2001_state,ninjakun_io_A002_ctrl_r, nullptr)
+ PORT_BIT( 0x0c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(nova2001_state, ninjakun_io_A002_ctrl_r)
PORT_START("DSW1") // printed "SW 2"
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW2:1")
diff --git a/src/mame/drivers/nss.cpp b/src/mame/drivers/nss.cpp
index 65b716c5b3b..a0d1f495d85 100644
--- a/src/mame/drivers/nss.cpp
+++ b/src/mame/drivers/nss.cpp
@@ -322,7 +322,7 @@ public:
void init_nss();
- DECLARE_CUSTOM_INPUT_MEMBER(game_over_flag_r);
+ DECLARE_READ_LINE_MEMBER(game_over_flag_r);
private:
required_device<cpu_device> m_bioscpu;
@@ -652,7 +652,7 @@ void nss_state::machine_start()
}
-CUSTOM_INPUT_MEMBER(nss_state::game_over_flag_r)
+READ_LINE_MEMBER(nss_state::game_over_flag_r)
{
return m_game_over_flag;
}
@@ -665,7 +665,7 @@ static INPUT_PORTS_START( snes )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_START("FP")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nss_state,game_over_flag_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nss_state, game_over_flag_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON13 ) PORT_NAME("Restart Button")
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON12 ) PORT_NAME("Page Up Button")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON11 ) PORT_NAME("Page Down Button")
diff --git a/src/mame/drivers/omegrace.cpp b/src/mame/drivers/omegrace.cpp
index 697295a1559..621cc9c67e6 100644
--- a/src/mame/drivers/omegrace.cpp
+++ b/src/mame/drivers/omegrace.cpp
@@ -502,7 +502,7 @@ static INPUT_PORTS_START( omegrace )
PORT_BIT( 0x3f, 0x00, IPT_DIAL ) PORT_SENSITIVITY(12) PORT_KEYDELTA(10) PORT_COCKTAIL
PORT_START("AVGDVG") /* port 0x0b */
- PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("dvg", dvg_device, done_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("dvg", dvg_device, done_r)
INPUT_PORTS_END
diff --git a/src/mame/drivers/opwolf.cpp b/src/mame/drivers/opwolf.cpp
index 893f88200c2..b9cc31fb9aa 100644
--- a/src/mame/drivers/opwolf.cpp
+++ b/src/mame/drivers/opwolf.cpp
@@ -541,11 +541,11 @@ static INPUT_PORTS_START( opwolf )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN2")
- PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, opwolf_state, opwolf_gun_x_r, nullptr)
+ PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(opwolf_state, opwolf_gun_x_r)
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3")
- PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, opwolf_state, opwolf_gun_y_r, nullptr)
+ PORT_BIT( 0x01ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(opwolf_state, opwolf_gun_y_r)
PORT_BIT( 0xfe00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START(P1X_PORT_TAG) /* P1X (span allows you to shoot enemies behind status bar) */
diff --git a/src/mame/drivers/pc9801.cpp b/src/mame/drivers/pc9801.cpp
index 282285d0a3c..76144fb92d7 100644
--- a/src/mame/drivers/pc9801.cpp
+++ b/src/mame/drivers/pc9801.cpp
@@ -1601,7 +1601,7 @@ static INPUT_PORTS_START( pc9801 )
PORT_DIPNAME( 0x20, 0x00, DEF_STR( Unknown ) ) //system clock = 5 MHz (0) / 8 MHz (1)
PORT_DIPSETTING( 0x20, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pc9801_state, system_type_r, nullptr)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(pc9801_state, system_type_r)
PORT_START("DSW2")
PORT_DIPNAME( 0x01, 0x01, "System Specification" ) PORT_DIPLOCATION("SW1:1") //jumps to daa00 if off, presumably some card booting
diff --git a/src/mame/drivers/pencil2.cpp b/src/mame/drivers/pencil2.cpp
index 090b4b2bd7a..f6fe91efb81 100644
--- a/src/mame/drivers/pencil2.cpp
+++ b/src/mame/drivers/pencil2.cpp
@@ -107,8 +107,8 @@ public:
void pencil2(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(printer_ready_r);
- DECLARE_CUSTOM_INPUT_MEMBER(printer_ack_r);
+ DECLARE_READ_LINE_MEMBER(printer_ready_r);
+ DECLARE_READ_LINE_MEMBER(printer_ack_r);
private:
DECLARE_WRITE8_MEMBER(port10_w);
@@ -192,7 +192,7 @@ WRITE_LINE_MEMBER( pencil2_state::write_centronics_busy )
m_centronics_busy = state;
}
-CUSTOM_INPUT_MEMBER( pencil2_state::printer_ready_r )
+READ_LINE_MEMBER( pencil2_state::printer_ready_r )
{
return m_centronics_busy;
}
@@ -202,7 +202,7 @@ WRITE_LINE_MEMBER( pencil2_state::write_centronics_ack )
m_centronics_ack = state;
}
-CUSTOM_INPUT_MEMBER( pencil2_state::printer_ack_r )
+READ_LINE_MEMBER( pencil2_state::printer_ack_r )
{
return m_centronics_ack;
}
@@ -216,10 +216,10 @@ static INPUT_PORTS_START( pencil2 )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_RIGHT)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_DOWN)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_LEFT)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pencil2_state, printer_ready_r, " ")
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(pencil2_state, printer_ready_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("Break") PORT_CODE(KEYCODE_END)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pencil2_state, printer_ack_r, " ")
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(pencil2_state, printer_ack_r)
PORT_START("E1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') PORT_CHAR('@')
diff --git a/src/mame/drivers/peplus.cpp b/src/mame/drivers/peplus.cpp
index 6778945bb33..c69232af1f7 100644
--- a/src/mame/drivers/peplus.cpp
+++ b/src/mame/drivers/peplus.cpp
@@ -238,6 +238,7 @@ public:
m_bp(*this, "BP"),
m_touch_x(*this, "TOUCH_X"),
m_touch_y(*this, "TOUCH_Y"),
+ m_inp_bank(*this, "IN_BANK%u", 1U),
m_cmos_ram(*this, "cmos"),
m_program_ram(*this, "prograram"),
m_s3000_ram(*this, "s3000_ram"),
@@ -261,7 +262,7 @@ public:
void init_pepluss64();
void init_peplussbw();
- DECLARE_CUSTOM_INPUT_MEMBER(input_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(input_r);
protected:
virtual void machine_start() override;
@@ -283,6 +284,7 @@ private:
optional_ioport m_bp;
optional_ioport m_touch_x;
optional_ioport m_touch_y;
+ optional_ioport_array<2> m_inp_bank;
required_shared_ptr<uint8_t> m_cmos_ram;
required_shared_ptr<uint8_t> m_program_ram;
@@ -1088,10 +1090,11 @@ void peplus_state::main_iomap(address_map &map)
* Input ports *
*************************/
+template <int N>
CUSTOM_INPUT_MEMBER(peplus_state::input_r)
{
uint8_t inp_ret = 0x00;
- uint8_t inp_read = ioport((const char *)param)->read();
+ uint8_t inp_read = m_inp_bank[N]->read();
if (inp_read & 0x01) inp_ret = 0x01;
if (inp_read & 0x02) inp_ret = 0x02;
@@ -1165,9 +1168,9 @@ static INPUT_PORTS_START( peplus_schip )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START("IN0")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK1")
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK2")
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Card Cage") PORT_CODE(KEYCODE_M) PORT_TOGGLE
INPUT_PORTS_END
@@ -1193,9 +1196,9 @@ static INPUT_PORTS_START( nonplus_poker )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) // Bill Acceptor
PORT_START("IN0")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK1")
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK2")
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Card Cage") PORT_CODE(KEYCODE_M) PORT_TOGGLE
PORT_MODIFY("SW1")
@@ -1243,9 +1246,9 @@ static INPUT_PORTS_START( peplus_poker )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_OTHER ) // Bill Acceptor
PORT_START("IN0")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK1")
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK2")
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Card Cage") PORT_CODE(KEYCODE_M) PORT_TOGGLE
INPUT_PORTS_END
@@ -1271,9 +1274,9 @@ static INPUT_PORTS_START( peplus_bjack )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON15 ) // Bill Acceptor
PORT_START("IN0")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK1")
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK2")
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Card Cage") PORT_CODE(KEYCODE_M) PORT_TOGGLE
INPUT_PORTS_END
@@ -1304,9 +1307,9 @@ static INPUT_PORTS_START( peplus_keno )
PORT_BIT( 0xffff, 0x200, IPT_LIGHTGUN_Y ) PORT_MINMAX(0x00, 1024) PORT_CROSSHAIR(Y, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(13)
PORT_START("IN0")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK1")
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Light Pen") PORT_CODE(KEYCODE_A)
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK2")
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Card Cage") PORT_CODE(KEYCODE_M) PORT_TOGGLE
INPUT_PORTS_END
@@ -1332,9 +1335,9 @@ static INPUT_PORTS_START( peplus_slots )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON15 ) // Bill Acceptor
PORT_START("IN0")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK1")
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<0>)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, peplus_state, input_r, "IN_BANK2")
+ PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(peplus_state, input_r<1>)
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_OTHER ) PORT_NAME("Card Cage") PORT_CODE(KEYCODE_M) PORT_TOGGLE
INPUT_PORTS_END
diff --git a/src/mame/drivers/peyper.cpp b/src/mame/drivers/peyper.cpp
index f3dc37a2f57..c39595cb46c 100644
--- a/src/mame/drivers/peyper.cpp
+++ b/src/mame/drivers/peyper.cpp
@@ -53,7 +53,7 @@ public:
, m_dpl(*this, "dpl_%u", 0U)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(wolfman_replay_hs_r);
+ template <int Mask> DECLARE_CUSTOM_INPUT_MEMBER(wolfman_replay_hs_r);
void init_peyper();
void init_odin();
void init_wolfman();
@@ -186,18 +186,17 @@ WRITE8_MEMBER(peyper_state::sol_w)
}
+template <int Mask>
CUSTOM_INPUT_MEMBER(peyper_state::wolfman_replay_hs_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x03:
- return ((ioport("REPLAY")->read() & bit_mask) >> 0);
+ return ((ioport("REPLAY")->read() & Mask) >> 0);
case 0x40:
- return ((ioport("REPLAY")->read() & bit_mask) >> 6);
+ return ((ioport("REPLAY")->read() & Mask) >> 6);
default:
- logerror("wolfman_replay_hs_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("wolfman_replay_hs_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@@ -511,14 +510,14 @@ static INPUT_PORTS_START( wolfman )
PORT_DIPSETTING( 0x20, "01" )
// PORT_DIPNAME( 0x18, 0x00, DEF_STR( Coinage ) ) // Partidas/Moneda - code at 0x0a69 - tables at 0x0b30 (4 * 3) - credits BCD stored at 0x6151
// PORT_DIPNAME( 0x04, 0x00, "Balls" ) // Bolas/Partida - code at 0x0a5c - stored at 0x60bd
- PORT_BIT( 0x03, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, peyper_state,wolfman_replay_hs_r, (void *)0x03)
+ PORT_BIT( 0x03, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(peyper_state, wolfman_replay_hs_r<0x03>)
/* DSW1 : port 0x24 - DSW1-1 is bit 7 ... DSW1-8 is bit 0 */
PORT_START("DSW1")
PORT_DIPNAME( 0x80, 0x00, "Adjust Replay" ) // Premios por Puntuacion - code at 0x0aa3 - stored at 0x60c4 and 0x60cc (0x00 NO / 0x05 YES)
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x80, DEF_STR( Yes ) )
- PORT_BIT( 0x40, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, peyper_state,wolfman_replay_hs_r, (void *)0x40)
+ PORT_BIT( 0x40, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(peyper_state, wolfman_replay_hs_r<0x40>)
PORT_DIPNAME( 0x20, 0x00, "Clear RAM on Reset" ) // Borrador RAM - code at 0x0ace - range 0x6141..0x616f - 0x616d = 0x5a and 0x616e = 0xa5
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x20, DEF_STR( Yes ) )
diff --git a/src/mame/drivers/phoenix.cpp b/src/mame/drivers/phoenix.cpp
index 065e5770a1d..703e90a1fc0 100644
--- a/src/mame/drivers/phoenix.cpp
+++ b/src/mame/drivers/phoenix.cpp
@@ -101,7 +101,7 @@ static INPUT_PORTS_START( phoenix )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, nullptr)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(phoenix_state, player_input_r)
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" )
@@ -184,7 +184,7 @@ static INPUT_PORTS_START( condor )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,player_input_r, nullptr)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(phoenix_state, player_input_r)
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION( "SW1:1,2" )
@@ -314,7 +314,7 @@ static INPUT_PORTS_START( pleiads )
PORT_INCLUDE( phoenix )
PORT_MODIFY("IN0")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, nullptr) /* Protection. See 0x0552 */
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(phoenix_state, pleiads_protection_r) // Protection. See 0x0552
PORT_MODIFY("DSW0")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" )
@@ -337,7 +337,7 @@ static INPUT_PORTS_START( pleiadbl )
PORT_INCLUDE( phoenix )
PORT_MODIFY("IN0")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, phoenix_state,pleiads_protection_r, nullptr) /* Protection. See 0x0552 */
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(phoenix_state, pleiads_protection_r) // Protection. See 0x0552
PORT_MODIFY("DSW0")
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Demo_Sounds ) ) PORT_DIPLOCATION( "SW1:7" )
diff --git a/src/mame/drivers/piggypas.cpp b/src/mame/drivers/piggypas.cpp
index 20b3a23f899..9dcfa1b5e30 100644
--- a/src/mame/drivers/piggypas.cpp
+++ b/src/mame/drivers/piggypas.cpp
@@ -37,7 +37,7 @@ public:
void piggypas(machine_config &config);
void fidlstix(machine_config &config);
DECLARE_INPUT_CHANGED_MEMBER(ball_sensor);
- DECLARE_CUSTOM_INPUT_MEMBER(ticket_r);
+
private:
void output_digits();
virtual void machine_start() override;
@@ -150,17 +150,12 @@ INPUT_CHANGED_MEMBER(piggypas_state::ball_sensor)
m_maincpu->set_input_line(1, newval ? CLEAR_LINE : ASSERT_LINE);
}
-CUSTOM_INPUT_MEMBER(piggypas_state::ticket_r)
-{
- return m_ticket->line_r();
-}
-
static INPUT_PORTS_START( piggypas )
PORT_START("IN0")
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_COIN3)
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_START1)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_COIN4)
- PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, piggypas_state, ticket_r, nullptr)
+ PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_COIN2)
PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_KEYPAD) PORT_NAME("Gate sensor") PORT_CODE(KEYCODE_G)
PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED)
diff --git a/src/mame/drivers/pirates.cpp b/src/mame/drivers/pirates.cpp
index aa543f63141..66e86bab16f 100644
--- a/src/mame/drivers/pirates.cpp
+++ b/src/mame/drivers/pirates.cpp
@@ -117,7 +117,7 @@ WRITE16_MEMBER(pirates_state::out_w)
// logerror("%06x: out_w %04x\n",m_maincpu->pc(),data);
}
-CUSTOM_INPUT_MEMBER(pirates_state::prot_r)
+READ_LINE_MEMBER(pirates_state::prot_r)
{
// static int prot = 0xa3;
// offs_t pc;
@@ -204,7 +204,7 @@ static INPUT_PORTS_START( pirates )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) // EEPROM data
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode"
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // seems checked in "test mode"
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pirates_state,prot_r, nullptr) // protection
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH,IPT_CUSTOM ) PORT_READ_LINE_MEMBER(pirates_state, prot_r) // protection
/* What do these bits do ? */
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/piratesh.cpp b/src/mame/drivers/piratesh.cpp
index b42c050a2d6..15c0fda159a 100644
--- a/src/mame/drivers/piratesh.cpp
+++ b/src/mame/drivers/piratesh.cpp
@@ -490,7 +490,7 @@ static INPUT_PORTS_START( piratesh )
PORT_START("SPECIAL")
PORT_BIT( 0x0100, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("k053250", k053250ps_device, dmairq_r)
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_UNKNOWN ) // FIXME: NCPU from 053246 (DMA)
- PORT_BIT( 0x0c00, IP_ACTIVE_HIGH, IPT_CUSTOM )PORT_CUSTOM_MEMBER(DEVICE_SELF, piratesh_state, battery_r, nullptr)
+ PORT_BIT( 0x0c00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(piratesh_state, battery_r)
PORT_START("HELM")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(25) PORT_KEYDELTA(1)
@@ -507,7 +507,7 @@ static INPUT_PORTS_START( piratesh )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("ticket", ticket_dispenser_device, line_r)
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("hopper", ticket_dispenser_device, line_r)
- PORT_BIT( 0x1800, IP_ACTIVE_HIGH, IPT_CUSTOM )PORT_CUSTOM_MEMBER(DEVICE_SELF, piratesh_state, helm_r, nullptr)
+ PORT_BIT( 0x1800, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(piratesh_state, helm_r)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/playch10.cpp b/src/mame/drivers/playch10.cpp
index f0d17da7fda..023f963978a 100644
--- a/src/mame/drivers/playch10.cpp
+++ b/src/mame/drivers/playch10.cpp
@@ -388,7 +388,7 @@ static INPUT_PORTS_START( playch10 )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Channel Select") PORT_CODE(KEYCODE_0)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Enter") PORT_CODE(KEYCODE_MINUS)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE ) PORT_NAME("Reset") PORT_CODE(KEYCODE_EQUALS)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, playch10_state,pc10_int_detect_r, nullptr) // INT Detect
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(playch10_state, int_detect_r) // INT Detect
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 )
diff --git a/src/mame/drivers/polepos.cpp b/src/mame/drivers/polepos.cpp
index d078d1ba5c1..df70e540201 100644
--- a/src/mame/drivers/polepos.cpp
+++ b/src/mame/drivers/polepos.cpp
@@ -314,7 +314,7 @@ template<bool sub1> WRITE16_MEMBER(polepos_state::z8002_nvi_enable_w)
(sub1 ? m_subcpu : m_subcpu2)->set_input_line(z8002_device::NVI_LINE, CLEAR_LINE);
}
-CUSTOM_INPUT_MEMBER(polepos_state::auto_start_r)
+READ_LINE_MEMBER(polepos_state::auto_start_r)
{
return m_auto_start_mask;
}
@@ -477,7 +477,7 @@ static INPUT_PORTS_START( polepos )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gear Change") PORT_CODE(KEYCODE_SPACE) POLEPOS_TOGGLE /* Gear */
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, polepos_state,auto_start_r, nullptr) // start 1, program controlled
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(polepos_state, auto_start_r) // start 1, program controlled
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/drivers/policetr.cpp b/src/mame/drivers/policetr.cpp
index b10b9bd9310..7265232dd67 100644
--- a/src/mame/drivers/policetr.cpp
+++ b/src/mame/drivers/policetr.cpp
@@ -188,7 +188,7 @@ WRITE32_MEMBER(policetr_state::bsmt2000_data_w)
}
-CUSTOM_INPUT_MEMBER(policetr_state::bsmt_status_r)
+READ_LINE_MEMBER(policetr_state::bsmt_status_r)
{
return m_bsmt->read_status();
}
@@ -323,7 +323,7 @@ static INPUT_PORTS_START( policetr )
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_UNUSED ) /* /TILT (note 1) */
PORT_BIT( 0x00200000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_UNUSED ) /* /SERVICE (note 1) */
- PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, policetr_state, bsmt_status_r, nullptr)
+ PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(policetr_state, bsmt_status_r)
PORT_BIT( 0x01000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x02000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* /XSW2 (note 2) */
PORT_BIT( 0x04000000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
diff --git a/src/mame/drivers/popeye.cpp b/src/mame/drivers/popeye.cpp
index 605239d8b43..b8b738fe623 100644
--- a/src/mame/drivers/popeye.cpp
+++ b/src/mame/drivers/popeye.cpp
@@ -362,7 +362,7 @@ protected:
};
-CUSTOM_INPUT_MEMBER(tnx1_state::dsw1_read)
+READ_LINE_MEMBER(tnx1_state::dsw1_read)
{
return ioport("DSW1")->read() >> m_dswbit;
}
@@ -418,7 +418,7 @@ static INPUT_PORTS_START( skyskipr )
PORT_DIPSETTING( 0x08, "A 1/6 B 1/1" )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
PORT_BIT( 0x70, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tnx1_state, dsw1_read, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(tnx1_state, dsw1_read)
PORT_START("DSW1") /* DSW1 */
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
@@ -444,7 +444,7 @@ static INPUT_PORTS_START( skyskipr )
PORT_DIPSETTING( 0x80, DEF_STR( Cocktail ) )
INPUT_PORTS_END
-CUSTOM_INPUT_MEMBER( tnx1_state::pop_field_r )
+READ_LINE_MEMBER( tnx1_state::pop_field_r )
{
return m_field ^ 1;
}
@@ -475,7 +475,7 @@ static INPUT_PORTS_START( popeye )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tnx1_state,pop_field_r, nullptr) /* inverted init e/o signal (even odd) */
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(tnx1_state, pop_field_r) // inverted init e/o signal (even odd)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_COIN1 )
@@ -497,7 +497,7 @@ static INPUT_PORTS_START( popeye )
PORT_CONFSETTING( 0x20, "Nintendo Co.,Ltd" )
PORT_CONFSETTING( 0x60, "Nintendo of America" )
// PORT_CONFSETTING( 0x00, "Nintendo of America" )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tnx1_state, dsw1_read, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(tnx1_state, dsw1_read)
PORT_START("DSW1") /* DSW1 */
PORT_DIPNAME( 0x03, 0x01, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW2:1,2")
diff --git a/src/mame/drivers/psikyo.cpp b/src/mame/drivers/psikyo.cpp
index 574b4aafe5a..8b00d79f581 100644
--- a/src/mame/drivers/psikyo.cpp
+++ b/src/mame/drivers/psikyo.cpp
@@ -81,7 +81,7 @@ This was pointed out by Bart Puype
Strikers 1945 / Tengai MCU
***************************************************************************/
-CUSTOM_INPUT_MEMBER(psikyo_state::mcu_status_r)
+READ_LINE_MEMBER(psikyo_state::mcu_status_r)
{
int ret = 0x00;
@@ -419,7 +419,7 @@ void psikyo_state::s1945_sound_io_map(address_map &map)
***************************************************************************/
-CUSTOM_INPUT_MEMBER(psikyo_state::z80_nmi_r)
+READ_LINE_MEMBER(psikyo_state::z80_nmi_r)
{
int ret = 0x00;
@@ -539,7 +539,7 @@ static INPUT_PORTS_START( samuraia )
PORT_BIT( 0x00100000, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00200000, IP_ACTIVE_LOW )
PORT_BIT( 0x00400000, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
+ PORT_BIT( 0x00800000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, z80_nmi_r) // From Sound CPU
PORT_BIT( 0xff000000, IP_ACTIVE_LOW, IPT_UNKNOWN ) // unused?
PORT_MODIFY("DSW") /* c00004 -> c00007 */
@@ -615,7 +615,7 @@ static INPUT_PORTS_START( btlkroad )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, z80_nmi_r) // From Sound CPU
PORT_BIT( 0x00000100, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000200, IP_ACTIVE_LOW, IPT_BUTTON6 ) PORT_PLAYER(2)
PORT_BIT( 0x00000400, IP_ACTIVE_LOW, IPT_BUTTON5 ) PORT_PLAYER(2)
@@ -719,7 +719,7 @@ static INPUT_PORTS_START( gunbird )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, z80_nmi_r) // From Sound CPU
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("DSW") /* c00004 -> c00007 */
@@ -780,12 +780,12 @@ static INPUT_PORTS_START( s1945 )
PORT_MODIFY("P1_P2") /* c00000 -> c00003 */
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, nullptr)
+ PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, mcu_status_r)
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, z80_nmi_r) // From Sound CPU
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("DSW") /* c00004 -> c00007 */
@@ -904,12 +904,12 @@ static INPUT_PORTS_START( tengai )
PORT_MODIFY("P1_P2") /* c00000 -> c00003 */
PORT_BIT( 0x00000001, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x00000002, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,mcu_status_r, nullptr)
+ PORT_BIT( 0x00000004, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, mcu_status_r)
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_TILT )
- PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo_state,z80_nmi_r, nullptr) // From Sound CPU
+ PORT_BIT( 0x00000080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(psikyo_state, z80_nmi_r) // From Sound CPU
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("DSW") /* c00004 -> c00007 */
diff --git a/src/mame/drivers/psikyo4.cpp b/src/mame/drivers/psikyo4.cpp
index cf7f3388dbc..0d0c17455f7 100644
--- a/src/mame/drivers/psikyo4.cpp
+++ b/src/mame/drivers/psikyo4.cpp
@@ -166,15 +166,15 @@ INTERRUPT_GEN_MEMBER(psikyo4_state::interrupt)
device.execute().set_input_line(4, HOLD_LINE);
}
+template <int P>
CUSTOM_INPUT_MEMBER(psikyo4_state::mahjong_ctrl_r)/* used by hotgmck/hgkairak */
{
- int player = (uintptr_t)param;
int ret = 0xff;
- if (m_io_select & 1) ret &= m_keys[player+0]->read();
- if (m_io_select & 2) ret &= m_keys[player+1]->read();
- if (m_io_select & 4) ret &= m_keys[player+2]->read();
- if (m_io_select & 8) ret &= m_keys[player+3]->read();
+ if (m_io_select & 1) ret &= m_keys[P+0]->read();
+ if (m_io_select & 2) ret &= m_keys[P+1]->read();
+ if (m_io_select & 4) ret &= m_keys[P+2]->read();
+ if (m_io_select & 8) ret &= m_keys[P+3]->read();
return ret;
}
@@ -305,14 +305,14 @@ CUSTOM_INPUT_MEMBER(psikyo4_state::system_r)
static INPUT_PORTS_START( hotgmck )
PORT_START("P1_P2")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state, system_r, nullptr)
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(psikyo4_state, system_r)
PORT_BIT( 0x00ffff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state, mahjong_ctrl_r, (void *)0)
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(psikyo4_state, mahjong_ctrl_r<0>)
PORT_START("P3_P4")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state, system_r, nullptr)
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(psikyo4_state, system_r)
PORT_BIT( 0x00ffff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(DEVICE_SELF, psikyo4_state, mahjong_ctrl_r, (void *)4)
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) PORT_CUSTOM_MEMBER(psikyo4_state, mahjong_ctrl_r<4>)
PORT_START("JP4")/* jumper pads 'JP4' on the PCB */
/* EEPROM is read here */
diff --git a/src/mame/drivers/pzletime.cpp b/src/mame/drivers/pzletime.cpp
index afa04dcf963..520cdfed016 100644
--- a/src/mame/drivers/pzletime.cpp
+++ b/src/mame/drivers/pzletime.cpp
@@ -47,7 +47,7 @@ public:
void pzletime(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(ticket_status_r);
+ DECLARE_READ_LINE_MEMBER(ticket_status_r);
private:
/* memory pointers */
@@ -219,7 +219,7 @@ WRITE16_MEMBER(pzletime_state::oki_bank_w)
m_oki->set_rom_bank(data & 0x3);
}
-CUSTOM_INPUT_MEMBER(pzletime_state::ticket_status_r)
+READ_LINE_MEMBER(pzletime_state::ticket_status_r)
{
return (m_ticket && !(m_screen->frame_number() % 128));
}
@@ -251,7 +251,7 @@ static INPUT_PORTS_START( pzletime )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0040, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_93cxx_device, do_read) /* eeprom */
- PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, pzletime_state,ticket_status_r, nullptr) /* ticket dispenser */
+ PORT_BIT( 0x0080, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(pzletime_state, ticket_status_r) /* ticket dispenser */
PORT_BIT( 0xff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("INPUT")
diff --git a/src/mame/drivers/qdrmfgp.cpp b/src/mame/drivers/qdrmfgp.cpp
index 86f36d4686a..2262e9e6b36 100644
--- a/src/mame/drivers/qdrmfgp.cpp
+++ b/src/mame/drivers/qdrmfgp.cpp
@@ -382,7 +382,7 @@ static INPUT_PORTS_START( qdrmfgp )
PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
PORT_START("SENSOR")
- PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, nullptr) /* battery power sensor */
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(qdrmfgp_state, battery_sensor_r) /* battery power sensor */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -462,7 +462,7 @@ static INPUT_PORTS_START( qdrmfgp2 )
PORT_DIPSETTING( 0x0000, DEF_STR( Very_Hard ) )
PORT_START("SENSOR")
- PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, qdrmfgp_state,battery_sensor_r, nullptr) /* battery power sensor */
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(qdrmfgp_state, battery_sensor_r) /* battery power sensor */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SERVICE2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE3 )
PORT_BIT( 0xfff0, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/quantum.cpp b/src/mame/drivers/quantum.cpp
index 07d19297ae3..89d16712a6e 100644
--- a/src/mame/drivers/quantum.cpp
+++ b/src/mame/drivers/quantum.cpp
@@ -188,7 +188,7 @@ void quantum_state::main_map(address_map &map)
static INPUT_PORTS_START( quantum )
PORT_START("SYSTEM")
/* YHALT here MUST BE ALWAYS 0 */
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_quantum_device, done_r, nullptr) /* vg YHALT */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_quantum_device, done_r) // vg YHALT
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN3 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_START2 )
diff --git a/src/mame/drivers/quizshow.cpp b/src/mame/drivers/quizshow.cpp
index 2bc43a9b89a..ca56abe0d43 100644
--- a/src/mame/drivers/quizshow.cpp
+++ b/src/mame/drivers/quizshow.cpp
@@ -279,7 +279,7 @@ INPUT_CHANGED_MEMBER(quizshow_state::category_select)
static INPUT_PORTS_START( quizshow )
PORT_START("IN0") // ADR strobe 0
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, quizshow_state, tape_headpos_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(quizshow_state, tape_headpos_r)
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_COIN1 )
diff --git a/src/mame/drivers/r2dtank.cpp b/src/mame/drivers/r2dtank.cpp
index f97d9f48f16..f0804a1f499 100644
--- a/src/mame/drivers/r2dtank.cpp
+++ b/src/mame/drivers/r2dtank.cpp
@@ -76,7 +76,7 @@ public:
void r2dtank(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(get_ttl74123_output);
+ DECLARE_READ_LINE_MEMBER(ttl74123_output_r);
protected:
virtual void machine_start() override;
@@ -239,7 +239,7 @@ WRITE_LINE_MEMBER(r2dtank_state::ttl74123_output_changed)
}
-CUSTOM_INPUT_MEMBER(r2dtank_state::get_ttl74123_output)
+READ_LINE_MEMBER(r2dtank_state::ttl74123_output_r)
{
return m_ttl74123_output;
}
@@ -372,7 +372,7 @@ static INPUT_PORTS_START( r2dtank )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, r2dtank_state,get_ttl74123_output, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(r2dtank_state, ttl74123_output_r)
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
diff --git a/src/mame/drivers/renegade.cpp b/src/mame/drivers/renegade.cpp
index 5628839b5e9..c7fb5d19008 100644
--- a/src/mame/drivers/renegade.cpp
+++ b/src/mame/drivers/renegade.cpp
@@ -303,7 +303,7 @@ static INPUT_PORTS_START( renegade )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(1) /* attack right */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(2) /* attack right */
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, renegade_state, mcu_status_r, nullptr)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(renegade_state, mcu_status_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/rgum.cpp b/src/mame/drivers/rgum.cpp
index c8595ba1840..bdc3839667d 100644
--- a/src/mame/drivers/rgum.cpp
+++ b/src/mame/drivers/rgum.cpp
@@ -37,7 +37,7 @@ public:
void rgum(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(rgum_heartbeat_r);
+ DECLARE_READ_LINE_MEMBER(heartbeat_r);
private:
required_shared_ptr<uint8_t> m_vram;
@@ -100,7 +100,7 @@ void rgum_state::rgum_map(address_map &map)
}
-CUSTOM_INPUT_MEMBER(rgum_state::rgum_heartbeat_r)
+READ_LINE_MEMBER(rgum_state::heartbeat_r)
{
m_hbeat ^= 1;
@@ -125,7 +125,7 @@ static INPUT_PORTS_START( rgum )
PORT_DIPNAME( 0x10, 0x10, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x10, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rgum_state,rgum_heartbeat_r, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(rgum_state, heartbeat_r)
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x40, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
diff --git a/src/mame/drivers/rpunch.cpp b/src/mame/drivers/rpunch.cpp
index 2e2b36e2ac7..56d9e4a7faa 100644
--- a/src/mame/drivers/rpunch.cpp
+++ b/src/mame/drivers/rpunch.cpp
@@ -257,7 +257,7 @@ static INPUT_PORTS_START( rpunch )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1)
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, nullptr)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(rpunch_state, hi_bits_r)
PORT_START("P2") /* c001a lower 8 bits */
PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
@@ -267,7 +267,7 @@ static INPUT_PORTS_START( rpunch )
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x0020, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x00c0, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, rpunch_state,hi_bits_r, nullptr)
+ PORT_BIT( 0xff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(rpunch_state, hi_bits_r)
PORT_START("SERVICE") /* c0018/c001a upper 8 bits */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 )
diff --git a/src/mame/drivers/scobra.cpp b/src/mame/drivers/scobra.cpp
index dae7d2aa1e5..558ac585863 100644
--- a/src/mame/drivers/scobra.cpp
+++ b/src/mame/drivers/scobra.cpp
@@ -69,7 +69,7 @@ public:
void hustlerb(machine_config &config);
void rescuefe(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(stratgyx_coinage_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(stratgyx_coinage_r);
private:
DECLARE_READ8_MEMBER(scobra_soundram_r);
@@ -406,10 +406,10 @@ void scobra_state::hustlerb_sound_io_map(address_map &map)
/* stratgyx coinage DIPs are spread across two input ports */
-CUSTOM_INPUT_MEMBER(scobra_state::stratgyx_coinage_r)
+template <int Mask>
+READ_LINE_MEMBER(scobra_state::stratgyx_coinage_r)
{
- int bit_mask = (uintptr_t)param;
- return (ioport("IN4")->read() & bit_mask) ? 0x01 : 0x00;
+ return (ioport("IN4")->read() & Mask) ? 1 : 0;
}
@@ -439,8 +439,8 @@ static INPUT_PORTS_START( stratgyx )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x01) /* lower 2 coinage DIPs */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x02) /* lower 2 coinage DIPs */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x01>) /* lower 2 coinage DIPs */
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x02>) /* lower 2 coinage DIPs */
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
@@ -450,8 +450,8 @@ static INPUT_PORTS_START( stratgyx )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_COCKTAIL
PORT_START("IN3")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x04) /* upper 2 coinage DIPs */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scobra_state,stratgyx_coinage_r, (void *)0x08) /* upper 2 coinage DIPs */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x04>) /* upper 2 coinage DIPs */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scobra_state, stratgyx_coinage_r<0x08>) /* upper 2 coinage DIPs */
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) /* none of these appear to be used */
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -510,7 +510,7 @@ static INPUT_PORTS_START( darkplnt )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x02, "5" )
- PORT_BIT( 0xfc, 0x00, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,scobra_state, darkplnt_custom_r, "DIAL") /* scrambled dial */
+ PORT_BIT( 0xfc, 0x00, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(scobra_state, darkplnt_dial_r) // scrambled dial
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp
index 7ba5e5890bb..31aec21692a 100644
--- a/src/mame/drivers/scramble.cpp
+++ b/src/mame/drivers/scramble.cpp
@@ -555,10 +555,10 @@ static INPUT_PORTS_START( knockoutb )
INPUT_PORTS_END
/* ckongs coinage DIPs are spread across two input ports */
-CUSTOM_INPUT_MEMBER(scramble_state::ckongs_coinage_r)
+template <int Mask>
+READ_LINE_MEMBER(scramble_state::ckongs_coinage_r)
{
- int bit_mask = (uintptr_t)param;
- return (ioport("FAKE")->read() & bit_mask) ? 0x01 : 0x00;
+ return (ioport("FAKE")->read() & Mask) ? 1 : 0;
}
static INPUT_PORTS_START( ckongs )
@@ -573,8 +573,8 @@ static INPUT_PORTS_START( ckongs )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scramble_state,ckongs_coinage_r, (void *)0x01)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scramble_state,ckongs_coinage_r, (void *)0x02)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scramble_state, ckongs_coinage_r<0x01>)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scramble_state, ckongs_coinage_r<0x02>)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
@@ -590,7 +590,7 @@ static INPUT_PORTS_START( ckongs )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x04, "3" )
PORT_DIPSETTING( 0x00, "4" )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scramble_state,ckongs_coinage_r, (void *)0x04)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scramble_state, ckongs_coinage_r<0x04>)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
diff --git a/src/mame/drivers/scyclone.cpp b/src/mame/drivers/scyclone.cpp
index c85861d269f..66da380809a 100644
--- a/src/mame/drivers/scyclone.cpp
+++ b/src/mame/drivers/scyclone.cpp
@@ -67,7 +67,7 @@ public:
void scyclone(machine_config &config);
- CUSTOM_INPUT_MEMBER(collision_r);
+ DECLARE_READ_LINE_MEMBER(collision_r);
private:
DECLARE_WRITE8_MEMBER(vidctrl_w);
@@ -353,7 +353,7 @@ void scyclone_state::scyclone_sub_iomap(address_map &map)
// appears to be when a white bitmap pixel (col 0x7) collides with a large sprite?
// if you simply set it to 1 and shoot in the left corner, the game gets stuck
// but if you have it set to 0 there are no collisions with large objects
-CUSTOM_INPUT_MEMBER(scyclone_state::collision_r)
+READ_LINE_MEMBER(scyclone_state::collision_r)
{
return m_hascollided;
}
@@ -371,7 +371,7 @@ static INPUT_PORTS_START( scyclone )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, scyclone_state, collision_r, nullptr) // hw collision?
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(scyclone_state, collision_r) // hw collision?
// maybe these 4 are the 4xdsw bank?
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/seattle.cpp b/src/mame/drivers/seattle.cpp
index e51977934c4..3568c2307d0 100644
--- a/src/mame/drivers/seattle.cpp
+++ b/src/mame/drivers/seattle.cpp
@@ -1351,7 +1351,7 @@ static INPUT_PORTS_START( sfrush )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON14 ) PORT_NAME("Track 2") PORT_PLAYER(1) /* track 2 */
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON15 ) PORT_NAME("Track 3") PORT_PLAYER(1) /* track 3 */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON16 ) PORT_NAME("Track 4") PORT_PLAYER(1) /* track 4 */
- PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, seattle_state, gearshift_r, "GEAR" )
+ PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(seattle_state, gearshift_r)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_VOLUME_UP )
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_VOLUME_DOWN )
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1436,7 +1436,7 @@ static INPUT_PORTS_START( calspeed )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON8 ) PORT_NAME("View 2") PORT_PLAYER(1) /* tailgate cam */
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON9 ) PORT_NAME("View 3") PORT_PLAYER(1) /* sky cam */
PORT_BIT( 0x0f80, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, seattle_state, gearshift_r, "GEAR" )
+ PORT_BIT( 0xf000, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(seattle_state, gearshift_r)
PORT_START("GEAR")
PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("1st Gear") PORT_PLAYER(1) /* 1st gear */
diff --git a/src/mame/drivers/segag80v.cpp b/src/mame/drivers/segag80v.cpp
index c8a7a7238cf..d7856420afe 100644
--- a/src/mame/drivers/segag80v.cpp
+++ b/src/mame/drivers/segag80v.cpp
@@ -302,7 +302,7 @@ READ8_MEMBER(segag80v_state::spinner_input_r)
*
*************************************/
-CUSTOM_INPUT_MEMBER(segag80v_state::elim4_joint_coin_r)
+READ_LINE_MEMBER(segag80v_state::elim4_joint_coin_r)
{
return (ioport("COINS")->read() & 0xf) != 0xf;
}
@@ -577,7 +577,7 @@ static INPUT_PORTS_START( elim4 )
PORT_INCLUDE( g80v_generic )
PORT_MODIFY("D7D6")
- PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segag80v_state,elim4_joint_coin_r, nullptr) /* combination of all four coin inputs */
+ PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(segag80v_state, elim4_joint_coin_r) // combination of all four coin inputs
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
diff --git a/src/mame/drivers/segajw.cpp b/src/mame/drivers/segajw.cpp
index cb591b430d6..e25c8f8f578 100644
--- a/src/mame/drivers/segajw.cpp
+++ b/src/mame/drivers/segajw.cpp
@@ -57,7 +57,7 @@ public:
DECLARE_INPUT_CHANGED_MEMBER(coin_drop_start);
DECLARE_CUSTOM_INPUT_MEMBER(coin_sensors_r);
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_sensors_r);
+ DECLARE_READ_LINE_MEMBER(hopper_sensors_r);
private:
DECLARE_READ8_MEMBER(coin_counter_r);
@@ -131,7 +131,7 @@ INPUT_CHANGED_MEMBER( segajw_state::coin_drop_start )
m_coin_start_cycles = m_maincpu->total_cycles();
}
-CUSTOM_INPUT_MEMBER( segajw_state::hopper_sensors_r )
+READ_LINE_MEMBER( segajw_state::hopper_sensors_r )
{
uint8_t data = 0;
@@ -241,13 +241,13 @@ static INPUT_PORTS_START( segajw )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Last Game") PORT_CODE(KEYCODE_T)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("M-Door")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("D-Door")
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segajw_state, hopper_sensors_r, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(segajw_state, hopper_sensors_r)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Full")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_OTHER ) PORT_NAME("Hopper Fill")
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("IN3")
- PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segajw_state, coin_sensors_r, nullptr)
+ PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(segajw_state, coin_sensors_r)
PORT_BIT( 0xf8, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("COIN1") // start the coin drop sequence (see coin_sensors_r)
diff --git a/src/mame/drivers/segaorun.cpp b/src/mame/drivers/segaorun.cpp
index eb29ae78174..b17c0975289 100644
--- a/src/mame/drivers/segaorun.cpp
+++ b/src/mame/drivers/segaorun.cpp
@@ -951,7 +951,7 @@ static INPUT_PORTS_START( outrun_generic )
PORT_BIT( 0xff, 0x00, IPT_PEDAL2 ) PORT_SENSITIVITY(100) PORT_KEYDELTA(40)
PORT_START("ADC.3")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, segaorun_state, bankmotor_pos_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(segaorun_state, bankmotor_pos_r)
INPUT_PORTS_END
diff --git a/src/mame/drivers/segas16a.cpp b/src/mame/drivers/segas16a.cpp
index 62fd4e40737..054de70b024 100644
--- a/src/mame/drivers/segas16a.cpp
+++ b/src/mame/drivers/segas16a.cpp
@@ -1242,7 +1242,7 @@ static INPUT_PORTS_START( afighter_analog )
PORT_INCLUDE( afighter )
PORT_MODIFY("P1")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, afighter_16a_analog_state, afighter_accel_r, nullptr)
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(afighter_16a_analog_state, afighter_accel_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // SHOT
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // WEAPON1
@@ -1250,10 +1250,10 @@ static INPUT_PORTS_START( afighter_analog )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) // WEAPON3
PORT_MODIFY("P2")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, afighter_16a_analog_state, afighter_handl_left_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(afighter_16a_analog_state, afighter_handl_left_r)
PORT_MODIFY("UNUSED")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, afighter_16a_analog_state, afighter_handl_right_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(afighter_16a_analog_state, afighter_handl_right_r)
PORT_START("STEER") // steering
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp
index 88ed5bcb083..0647db49802 100644
--- a/src/mame/drivers/segas16b.cpp
+++ b/src/mame/drivers/segas16b.cpp
@@ -2271,7 +2271,7 @@ static INPUT_PORTS_START( afighter_analog )
PORT_INCLUDE( afighter )
PORT_MODIFY("P1")
- PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, afighter_16b_analog_state, afighter_accel_r, nullptr)
+ PORT_BIT( 0x07, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(afighter_16b_analog_state, afighter_accel_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) // SHOT
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) // WEAPON1
@@ -2279,10 +2279,10 @@ static INPUT_PORTS_START( afighter_analog )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON4 ) // WEAPON3
PORT_MODIFY("P2")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, afighter_16b_analog_state, afighter_handl_left_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(afighter_16b_analog_state, afighter_handl_left_r)
PORT_MODIFY("UNUSED")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, afighter_16b_analog_state, afighter_handl_right_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(afighter_16b_analog_state, afighter_handl_right_r)
PORT_START("STEER") // steering
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4)
diff --git a/src/mame/drivers/seibuspi.cpp b/src/mame/drivers/seibuspi.cpp
index 1440f20634a..1e3e0d4bd74 100644
--- a/src/mame/drivers/seibuspi.cpp
+++ b/src/mame/drivers/seibuspi.cpp
@@ -1203,6 +1203,7 @@ WRITE_LINE_MEMBER(seibuspi_state::ymf_irqhandler)
m_audiocpu->set_input_line(0, CLEAR_LINE);
}
+template <int N>
CUSTOM_INPUT_MEMBER(seibuspi_state::ejanhs_encode)
{
/* E-Jan Highschool has a keyboard with the following keys
@@ -1229,7 +1230,7 @@ CUSTOM_INPUT_MEMBER(seibuspi_state::ejanhs_encode)
Start - 111 port A
*/
static const u8 encoding[] = { 6, 5, 4, 3, 2, 7 };
- ioport_value state = ~m_key[(uintptr_t)param]->read();
+ ioport_value state = ~m_key[N]->read();
for (int bit = 0; bit < ARRAY_LENGTH(encoding); bit++)
if (state & (1 << bit))
@@ -1380,16 +1381,16 @@ static INPUT_PORTS_START( spi_ejanhs )
PORT_INCLUDE( spi_mahjong_keyboard )
PORT_START("INPUTS")
- PORT_BIT( 0x00000007, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)3)
- PORT_BIT( 0x00000038, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)4)
- PORT_BIT( 0x00000700, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)2)
- PORT_BIT( 0x00003800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)0)
+ PORT_BIT( 0x00000007, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(seibuspi_state, ejanhs_encode<3>)
+ PORT_BIT( 0x00000038, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(seibuspi_state, ejanhs_encode<4>)
+ PORT_BIT( 0x00000700, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(seibuspi_state, ejanhs_encode<2>)
+ PORT_BIT( 0x00003800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(seibuspi_state, ejanhs_encode<0>)
PORT_SPECIAL_ONOFF_DIPLOC( 0x00008000, 0x00000000, Flip_Screen, "SW1:1" )
PORT_BIT( 0xffff4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("SYSTEM")
// These need a noncontiguous encoding, but are nonfunctional in any case
- //PORT_BIT( 0x00000013, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, seibuspi_state,ejanhs_encode, (uintptr_t)1)
+ //PORT_BIT( 0x00000013, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(seibuspi_state, ejanhs_encode<1>)
PORT_SERVICE_NO_TOGGLE( 0x00000004, IP_ACTIVE_LOW )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x000000f3, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/seta.cpp b/src/mame/drivers/seta.cpp
index 1cc31cfafd6..a2292c8729f 100644
--- a/src/mame/drivers/seta.cpp
+++ b/src/mame/drivers/seta.cpp
@@ -4471,7 +4471,7 @@ static INPUT_PORTS_START( setaroul )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Attendant Pay") // att.pay (clears error)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN3 ) PORT_NAME("Note") // note (same as 100 coins)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) PORT_NAME("Coupon") // cupon (same as 10 coins)
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, setaroul_state, coin_sensors_r, nullptr)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(setaroul_state, coin_sensors_r)
PORT_START("COIN1") // start the coin drop sequence (see coin_sensors_r)
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, setaroul_state, coin_drop_start, 0)
@@ -6567,10 +6567,10 @@ INPUT_PORTS_END
static INPUT_PORTS_START( usclssic )
PORT_START("TRACKX")
- PORT_BIT( 0xfff, 0x000, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, usclssic_state, trackball_x_r, nullptr)
+ PORT_BIT( 0xfff, 0x000, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(usclssic_state, trackball_x_r)
PORT_START("TRACKY")
- PORT_BIT( 0xfff, 0x000, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, usclssic_state, trackball_y_r, nullptr)
+ PORT_BIT( 0xfff, 0x000, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(usclssic_state, trackball_y_r)
PORT_START("TRACK1_X") /* muxed port 0 */
PORT_BIT( 0xfff, 0x000, IPT_TRACKBALL_X ) PORT_SENSITIVITY(70) PORT_KEYDELTA(30) PORT_RESET
diff --git a/src/mame/drivers/sk1.cpp b/src/mame/drivers/sk1.cpp
index f0635c4f80f..e71c36b3c07 100644
--- a/src/mame/drivers/sk1.cpp
+++ b/src/mame/drivers/sk1.cpp
@@ -173,14 +173,14 @@ INPUT_PORTS_START(sk1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("G5#")
PORT_START("KO8")
- PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, sk1_state, mode_in, nullptr)
+ PORT_BIT(0x0f, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(sk1_state, mode_in)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A5")
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("A5#")
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("B5")
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_OTHER) PORT_NAME("C6")
PORT_START("KO9")
- PORT_BIT(0x83, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, sk1_state, function_in, nullptr)
+ PORT_BIT(0x83, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(sk1_state, function_in)
PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_START("TOGGLES")
diff --git a/src/mame/drivers/snk.cpp b/src/mame/drivers/snk.cpp
index 85309fbb9fd..8d4eae7df09 100644
--- a/src/mame/drivers/snk.cpp
+++ b/src/mame/drivers/snk.cpp
@@ -327,11 +327,6 @@ enum
/*********************************************************************/
-CUSTOM_INPUT_MEMBER(snk_state::marvins_sound_busy)
-{
- return m_soundlatch->pending_r() ? 1 : 0;
-}
-
READ8_MEMBER(snk_state::marvins_sound_nmi_ack_r)
{
m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE);
@@ -465,7 +460,7 @@ WRITE8_MEMBER(snk_state::snk_soundlatch_w)
machine().scheduler().synchronize(timer_expired_delegate(FUNC(snk_state::sndirq_update_callback),this), CMDIRQ_BUSY_ASSERT);
}
-CUSTOM_INPUT_MEMBER(snk_state::snk_sound_busy)
+READ_LINE_MEMBER(snk_state::sound_busy_r)
{
return (m_sound_status & 4) ? 1 : 0;
}
@@ -700,27 +695,28 @@ hand, always returning 0xf inbetween valid values confuses the game.
*****************************************************************************/
+template <int Which>
CUSTOM_INPUT_MEMBER(snk_state::gwar_rotary)
{
- int which = (int)(uintptr_t)param;
- int value = m_rot_io[which]->read();
+ int value = m_rot_io[Which]->read();
- if ((m_last_value[which] == 0x5 && value == 0x6) || (m_last_value[which] == 0x6 && value == 0x5))
+ if ((m_last_value[Which] == 0x5 && value == 0x6) || (m_last_value[Which] == 0x6 && value == 0x5))
{
- if (!m_cp_count[which])
+ if (!m_cp_count[Which])
value = 0xf;
- m_cp_count[which] = (m_cp_count[which] + 1) & 0x07;
+ m_cp_count[Which] = (m_cp_count[Which] + 1) & 0x07;
}
- m_last_value[which] = value;
+ m_last_value[Which] = value;
return value;
}
+template <int Which>
CUSTOM_INPUT_MEMBER(snk_state::gwarb_rotary)
{
if (m_joymode_io->read() == 1)
{
- return gwar_rotary(field, param);
+ return gwar_rotary<Which>();
}
else
{
@@ -776,24 +772,23 @@ CUSTOM_INPUT_MEMBER(snk_state::countryc_trackball_y)
/************************************************************************/
+template <int Mask>
CUSTOM_INPUT_MEMBER(snk_state::snk_bonus_r)
{
- int bit_mask = (uintptr_t)param;
-
- switch (bit_mask)
+ switch (Mask)
{
case 0x01: /* older games : "Occurrence" Dip Switch (DSW2:1) */
- return ((m_bonus_io->read() & bit_mask) >> 0);
+ return ((m_bonus_io->read() & Mask) >> 0);
case 0xc0: /* older games : "Bonus Life" Dip Switches (DSW1:7,8) */
- return ((m_bonus_io->read() & bit_mask) >> 6);
+ return ((m_bonus_io->read() & Mask) >> 6);
case 0x04: /* later games : "Occurrence" Dip Switch (DSW1:3) */
- return ((m_bonus_io->read() & bit_mask) >> 2);
+ return ((m_bonus_io->read() & Mask) >> 2);
case 0x30: /* later games : "Bonus Life" Dip Switches (DSW2:5,6) */
- return ((m_bonus_io->read() & bit_mask) >> 4);
+ return ((m_bonus_io->read() & Mask) >> 4);
default:
- logerror("snk_bonus_r : invalid %02X bit_mask\n",bit_mask);
+ logerror("snk_bonus_r : invalid %02X bit_mask\n",Mask);
return 0;
}
}
@@ -1518,7 +1513,7 @@ static INPUT_PORTS_START( marvins )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // sound CPU status
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) // service switch according to schematics, see code at 0x0453. Goes to garbage.
PORT_START("IN1")
@@ -1600,7 +1595,7 @@ static INPUT_PORTS_START( vangrd2 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // sound CPU status
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1684,8 +1679,8 @@ static INPUT_PORTS_START( madcrash )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,marvins_sound_busy, nullptr) /* sound CPU status */
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // sound CPU status
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("soundlatch", generic_latch_8_device, pending_r) // sound CPU status
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE )
PORT_START("IN1")
@@ -1762,7 +1757,7 @@ static INPUT_PORTS_START( jcross )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1805,10 +1800,10 @@ static INPUT_PORTS_START( jcross )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
// PORT_DIPSETTING( 0x10, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */
// PORT_DIPSETTING( 0x08, "INVALID !" ) /* settings table at 0x0378 is only 5 bytes wide */
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0xc0>)
PORT_START("DSW2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x01>)
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
@@ -1847,7 +1842,7 @@ static INPUT_PORTS_START( sgladiat )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_SERVICE ) /* code at 0x054e */
@@ -1888,10 +1883,10 @@ static INPUT_PORTS_START( sgladiat )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0xc0>)
PORT_START("DSW2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x01>)
PORT_DIPNAME( 0x02, 0x02, "Time" ) PORT_DIPLOCATION("DSW2:2")
PORT_DIPSETTING( 0x02, "More" ) /* Hazard race 2:30 / Chariot race 3:30 */
PORT_DIPSETTING( 0x00, "Less" ) /* Hazard race 2:00 / Chariot race 3:00 */
@@ -1931,7 +1926,7 @@ static INPUT_PORTS_START( hal21 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -1972,10 +1967,10 @@ static INPUT_PORTS_START( hal21 )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0xc0>)
PORT_START("DSW2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x01>)
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
@@ -2014,7 +2009,7 @@ static INPUT_PORTS_START( aso )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coinage" settings - code at 0x2e04 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2057,10 +2052,10 @@ static INPUT_PORTS_START( aso )
PORT_DIPSETTING( 0x10, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_6C ) )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0xc0>)
PORT_START("DSW2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x01>)
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
@@ -2100,7 +2095,7 @@ static INPUT_PORTS_START( alphamis )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x2e17 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2147,7 +2142,7 @@ static INPUT_PORTS_START( alphamis )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW1:8" )
PORT_START("DSW2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x01>)
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
@@ -2182,7 +2177,7 @@ static INPUT_PORTS_START( tnk3 )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2228,10 +2223,10 @@ static INPUT_PORTS_START( tnk3 )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x28, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x00, DEF_STR( Free_Play ) )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0xc0)
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0xc0>)
PORT_START("DSW2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x01>)
PORT_DIPNAME( 0x06, 0x06, DEF_STR( Difficulty ) ) PORT_DIPLOCATION("DSW2:2,3")
PORT_DIPSETTING( 0x06, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
@@ -2265,7 +2260,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( athena )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x09d4 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2302,7 +2297,7 @@ static INPUT_PORTS_START( athena )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) ) /* Single Controls */
PORT_DIPSETTING( 0x02, DEF_STR( Cocktail ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -2329,7 +2324,7 @@ static INPUT_PORTS_START( athena )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x30>)
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" )
PORT_DIPNAME( 0x80, 0x80, "Energy" ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x80, "12" )
@@ -2350,7 +2345,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( fitegolf )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x045b */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */
@@ -2446,7 +2441,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( countryc )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0450 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch */
@@ -2456,10 +2451,10 @@ static INPUT_PORTS_START( countryc )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START1 )
PORT_START("IN1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_x, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, countryc_trackball_x)
PORT_START("IN2")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,countryc_trackball_y, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, countryc_trackball_y)
PORT_START("IN3")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2528,7 +2523,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( ikari )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a15 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2568,7 +2563,7 @@ static INPUT_PORTS_START( ikari )
PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, "Separate" )
PORT_DIPSETTING( 0x00, "Common" )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -2594,7 +2589,7 @@ static INPUT_PORTS_START( ikari )
PORT_DIPSETTING( 0x08, "Demo Sounds On" )
PORT_DIPSETTING( 0x04, "Freeze" )
PORT_DIPSETTING( 0x00, "Infinite Lives (Cheat)")
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x30>)
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" ) /* read at 0x07c4, but strange test at 0x07cc */
PORT_DIPNAME( 0x80, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:8")
PORT_DIPSETTING( 0x80, DEF_STR( No ) )
@@ -2623,7 +2618,7 @@ static INPUT_PORTS_START( ikaria )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a00 */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
INPUT_PORTS_END
@@ -2665,7 +2660,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( victroad )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x0a19 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2705,7 +2700,7 @@ static INPUT_PORTS_START( victroad )
PORT_DIPNAME( 0x02, 0x02, "P1 & P2 Fire Buttons" ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, "Separate" )
PORT_DIPSETTING( 0x00, "Common" )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -2731,7 +2726,7 @@ static INPUT_PORTS_START( victroad )
PORT_DIPSETTING( 0x08, "Demo Sounds On" )
PORT_DIPSETTING( 0x00, "Freeze" )
PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)")
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x30>)
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
@@ -2769,7 +2764,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( bermudat )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0a0a */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2807,7 +2802,7 @@ static INPUT_PORTS_START( bermudat )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -2833,7 +2828,7 @@ static INPUT_PORTS_START( bermudat )
PORT_DIPSETTING( 0x08, "Demo Sounds On" )
PORT_DIPSETTING( 0x00, "Freeze" )
PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)")
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state,snk_bonus_r<0x30>)
PORT_DIPNAME( 0xc0, 0x80, "Game Style" ) PORT_DIPLOCATION("DSW2:7,8")
PORT_DIPSETTING( 0xc0, "Normal without continue" )
PORT_DIPSETTING( 0x80, "Normal with continue" )
@@ -2898,7 +2893,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( psychos )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
@@ -2935,7 +2930,7 @@ static INPUT_PORTS_START( psychos )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -2962,7 +2957,7 @@ static INPUT_PORTS_START( psychos )
PORT_DIPNAME( 0x08, 0x08, "Freeze" ) PORT_DIPLOCATION("DSW2:4")
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x30>)
PORT_DIPNAME( 0x40, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x40, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
@@ -2983,7 +2978,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( gwar )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x08c8 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE )
@@ -2997,7 +2992,7 @@ static INPUT_PORTS_START( gwar )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(1)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(1)
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwar_rotary, (void*)0)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, gwar_rotary<0>)
PORT_START("P1ROT")
PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
@@ -3007,7 +3002,7 @@ static INPUT_PORTS_START( gwar )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwar_rotary, (void*)1)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, gwar_rotary<1>)
PORT_START("P2ROT")
PORT_BIT( 0x0f, 0x00, IPT_POSITIONAL ) PORT_POSITIONS(12) PORT_WRAPS PORT_SENSITIVITY(15) PORT_KEYDELTA(1) PORT_CODE_DEC(KEYCODE_N) PORT_CODE_INC(KEYCODE_M) PORT_PLAYER(2) PORT_REVERSE PORT_FULL_TURN_COUNT(12)
@@ -3029,7 +3024,7 @@ static INPUT_PORTS_START( gwar )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Flip_Screen ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -3055,7 +3050,7 @@ static INPUT_PORTS_START( gwar )
PORT_DIPSETTING( 0x08, "Demo Sounds On" )
PORT_DIPSETTING( 0x00, "Freeze" )
PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)")
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x30>)
PORT_DIPUNUSED_DIPLOC( 0x40, 0x40, "DSW2:7" )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "DSW2:8" )
@@ -3078,10 +3073,10 @@ static INPUT_PORTS_START( gwarb )
// connected. If rotary is not connected, player fires in the direction he's facing.
PORT_MODIFY("IN1")
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)0)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, gwarb_rotary<0>)
PORT_MODIFY("IN2")
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,gwarb_rotary, (void*)1)
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, gwarb_rotary<1>)
PORT_START("JOYSTICK_MODE")
PORT_CONFNAME( 0x01, 0x00, "Joystick mode" )
@@ -3092,7 +3087,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( chopper )
PORT_START("IN0")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x0849 */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT ) /* reset */
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_SERVICE )
@@ -3131,7 +3126,7 @@ static INPUT_PORTS_START( chopper )
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("DSW1:2")
PORT_DIPSETTING( 0x02, DEF_STR( Upright ) ) /* Single Controls */
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x04)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x04>)
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Lives ) ) PORT_DIPLOCATION("DSW1:4")
PORT_DIPSETTING( 0x08, "3" )
PORT_DIPSETTING( 0x00, "5" )
@@ -3157,7 +3152,7 @@ static INPUT_PORTS_START( chopper )
PORT_DIPSETTING( 0x0c, "Demo Sounds On" )
PORT_DIPSETTING( 0x00, "Freeze" )
PORT_DIPSETTING( 0x04, "Infinite Lives (Cheat)")
- PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_bonus_r, (void *)0x30)
+ PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk_state, snk_bonus_r<0x30>)
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("DSW2:7")
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x40, DEF_STR( Yes ) )
@@ -3213,7 +3208,7 @@ static INPUT_PORTS_START( tdfever )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* also reset - code at 0x074a */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* adds 1 credit - code at 0x1065 */
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start Game A")
@@ -3355,7 +3350,7 @@ static INPUT_PORTS_START( fsoccer )
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE ) /* same as the dip switch / also reset - code at 0x00cc */
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE1 ) /* uses "Coin A" settings - code at 0x677f */
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk_state,snk_sound_busy, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(snk_state, sound_busy_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start Game A")
diff --git a/src/mame/drivers/snk6502.cpp b/src/mame/drivers/snk6502.cpp
index d6952f936e0..94b5ed0b14f 100644
--- a/src/mame/drivers/snk6502.cpp
+++ b/src/mame/drivers/snk6502.cpp
@@ -529,12 +529,12 @@ static INPUT_PORTS_START( satansat )
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x7c, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("snk6502:custom", snk6502_sound_device,music0_playing, nullptr) /* music0 playing */
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("snk6502:custom", snk6502_sound_device, music0_playing) // music0 playing
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_IMPULSE(1) PORT_CHANGED_MEMBER(DEVICE_SELF, snk6502_state,coin_inserted, 0)
PORT_BIT( 0x0e, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* NC */
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, snk6502_state,sasuke_count_r, nullptr) /* connected to a binary counter */
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(snk6502_state, sasuke_count_r) // connected to a binary counter
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:!1")
@@ -594,7 +594,7 @@ static INPUT_PORTS_START( vanguard )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL /* fire left */
PORT_MODIFY("IN2")
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("snk6502:custom", snk6502_sound_device,music0_playing, nullptr) /* music0 playing */
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("snk6502:custom", snk6502_sound_device, music0_playing) // music0 playing
INPUT_PORTS_END
static INPUT_PORTS_START( fantasy )
diff --git a/src/mame/drivers/spdodgeb.cpp b/src/mame/drivers/spdodgeb.cpp
index 631fba29c21..75296735a6b 100644
--- a/src/mame/drivers/spdodgeb.cpp
+++ b/src/mame/drivers/spdodgeb.cpp
@@ -264,7 +264,7 @@ void spdodgeb_state::spdodgeb_sound_map(address_map &map)
}
-CUSTOM_INPUT_MEMBER(spdodgeb_state::mcu63705_busy_r)
+READ_LINE_MEMBER(spdodgeb_state::mcu63705_busy_r)
{
m_toggle ^= 0x01;
return m_toggle;
@@ -273,7 +273,7 @@ CUSTOM_INPUT_MEMBER(spdodgeb_state::mcu63705_busy_r)
static INPUT_PORTS_START( spdodgeb )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, spdodgeb_state, mcu63705_busy_r, nullptr) /* mcu63701_busy flag */
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(spdodgeb_state, mcu63705_busy_r) // mcu63701_busy flag
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN2 )
diff --git a/src/mame/drivers/spg110.cpp b/src/mame/drivers/spg110.cpp
index 263e67a5e0b..aa37aaf5bb0 100644
--- a/src/mame/drivers/spg110.cpp
+++ b/src/mame/drivers/spg110.cpp
@@ -196,7 +196,7 @@ static INPUT_PORTS_START( jak_capb )
PORT_BIT( 0xffff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("JOYY")
- PORT_BIT( 0x03ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, spg110_game_state, plunger_r, nullptr)
+ PORT_BIT( 0x03ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(spg110_game_state, plunger_r)
PORT_START("JOYY_REAL")
PORT_BIT(0x00ff, 0x0000, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(100) PORT_MINMAX(0x00,0x00ff) PORT_NAME("Plunger") PORT_CENTERDELTA(255)
diff --git a/src/mame/drivers/spoker.cpp b/src/mame/drivers/spoker.cpp
index e1123669dd5..f36d23a3a62 100644
--- a/src/mame/drivers/spoker.cpp
+++ b/src/mame/drivers/spoker.cpp
@@ -62,7 +62,7 @@ public:
void init_spk116it();
void init_3super8();
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_r);
+ DECLARE_READ_LINE_MEMBER(hopper_r);
protected:
virtual void machine_start() override;
@@ -169,7 +169,7 @@ uint32_t spoker_state::screen_update(screen_device &screen, bitmap_ind16 &bitmap
Misc Handlers
***************************************************************************/
-CUSTOM_INPUT_MEMBER(spoker_state::hopper_r)
+READ_LINE_MEMBER(spoker_state::hopper_r)
{
if (m_hopper) return !(m_screen->frame_number()%10);
return machine().input().code_pressed(KEYCODE_H);
@@ -409,7 +409,7 @@ static INPUT_PORTS_START( spoker )
PORT_START("SERVICE")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Memory Clear") // stats, memory
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(spoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_PAYOUT )
PORT_SERVICE_NO_TOGGLE( 0x20, IP_ACTIVE_LOW )
@@ -478,7 +478,7 @@ static INPUT_PORTS_START( 3super8 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF,spoker_state,hopper_r, nullptr) PORT_NAME("HPSW") // hopper sensor
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(spoker_state, hopper_r) PORT_NAME("HPSW") // hopper sensor
PORT_SERVICE( 0x04, IP_ACTIVE_LOW )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_BOOK ) PORT_NAME("Statistics")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
diff --git a/src/mame/drivers/sprint4.cpp b/src/mame/drivers/sprint4.cpp
index ae2f80258ff..21a43489004 100644
--- a/src/mame/drivers/sprint4.cpp
+++ b/src/mame/drivers/sprint4.cpp
@@ -22,27 +22,24 @@ Atari Sprint 4 driver
#define PIXEL_CLOCK (MASTER_CLOCK / 2)
-CUSTOM_INPUT_MEMBER(sprint4_state::get_lever)
+template <int N>
+READ_LINE_MEMBER(sprint4_state::lever_r)
{
- int n = (uintptr_t) param;
-
- return 4 * m_gear[n] > m_da_latch;
+ return 4 * m_gear[N] > m_da_latch;
}
-CUSTOM_INPUT_MEMBER(sprint4_state::get_wheel)
+template <int N>
+READ_LINE_MEMBER(sprint4_state::wheel_r)
{
- int n = (uintptr_t) param;
-
- return 8 * m_steer_FF1[n] + 8 * m_steer_FF2[n] > m_da_latch;
+ return 8 * m_steer_FF1[N] + 8 * m_steer_FF2[N] > m_da_latch;
}
-CUSTOM_INPUT_MEMBER(sprint4_state::get_collision)
+template <int N>
+READ_LINE_MEMBER(sprint4_state::collision_flipflop_r)
{
- int n = (uintptr_t) param;
-
- return m_collision[n];
+ return m_collision[N];
}
@@ -257,13 +254,13 @@ static INPUT_PORTS_START( sprint4 )
PORT_START("COLLISION")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 1 Gas") PORT_PLAYER(1)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)0 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, collision_flipflop_r<0>)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 2 Gas") PORT_PLAYER(2)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, collision_flipflop_r<1>)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 3 Gas") PORT_PLAYER(3)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)2 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, collision_flipflop_r<2>)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Player 4 Gas") PORT_PLAYER(4)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_collision, (void *)3 )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, collision_flipflop_r<3>)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -294,14 +291,14 @@ static INPUT_PORTS_START( sprint4 )
PORT_DIPSETTING( 0xe0, "150 seconds" )
PORT_START("ANALOG")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)0)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)0)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)1)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)1)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)2)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)2)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_wheel, (void *)3)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, sprint4_state, get_lever, (void *)3)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, wheel_r<0>)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, lever_r<0>)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, wheel_r<1>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, lever_r<1>)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, wheel_r<2>)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, lever_r<2>)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, wheel_r<3>)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(sprint4_state, lever_r<3>)
PORT_START("WHEEL1")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(16) PORT_PLAYER(1)
diff --git a/src/mame/drivers/ssingles.cpp b/src/mame/drivers/ssingles.cpp
index c95a32a9c47..31d7041713b 100644
--- a/src/mame/drivers/ssingles.cpp
+++ b/src/mame/drivers/ssingles.cpp
@@ -433,7 +433,7 @@ static INPUT_PORTS_START( ssingles )
PORT_START("INPUTS")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_UNKNOWN ) //must be LOW
- PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ssingles_state,controls_r, nullptr)
+ PORT_BIT( 0x1c, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(ssingles_state, controls_r)
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_BUTTON4 )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_BUTTON3 )
diff --git a/src/mame/drivers/stactics.cpp b/src/mame/drivers/stactics.cpp
index 9221c11257c..95d09b4e60a 100644
--- a/src/mame/drivers/stactics.cpp
+++ b/src/mame/drivers/stactics.cpp
@@ -62,7 +62,7 @@ WRITE_LINE_MEMBER(stactics_state::motor_w)
}
-CUSTOM_INPUT_MEMBER(stactics_state::get_motor_not_ready)
+READ_LINE_MEMBER(stactics_state::motor_not_ready_r)
{
// if the motor is self-centering, but not centered yet
return (!m_motor_on && (m_horiz_pos != 0 || m_vert_pos != 0));
@@ -222,7 +222,7 @@ static INPUT_PORTS_START( stactics )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON2 )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_motor_not_ready, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(stactics_state, motor_not_ready_r)
PORT_START("IN1") /* IN1 */
PORT_DIPNAME( 0x07, 0x07, DEF_STR( Coin_B ) )
@@ -251,8 +251,8 @@ static INPUT_PORTS_START( stactics )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2") /* IN2 */
- PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_rng, nullptr)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_frame_count_d3, nullptr)
+ PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(stactics_state, get_rng)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(stactics_state, frame_count_d3_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_DIPNAME( 0x40, 0x40, DEF_STR( Free_Play ) )
@@ -262,7 +262,7 @@ static INPUT_PORTS_START( stactics )
PORT_START("IN3") /* IN3 */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_shot_standby, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(stactics_state, shot_standby_r)
PORT_DIPNAME( 0x04, 0x04, "Number of Barriers" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x00, "6" )
@@ -274,7 +274,7 @@ static INPUT_PORTS_START( stactics )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, stactics_state, get_not_shot_arrive, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(stactics_state, not_shot_arrive_r)
PORT_START("FAKE") /* FAKE */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
diff --git a/src/mame/drivers/starshp1.cpp b/src/mame/drivers/starshp1.cpp
index 9ab274acc87..64bee936a86 100644
--- a/src/mame/drivers/starshp1.cpp
+++ b/src/mame/drivers/starshp1.cpp
@@ -201,12 +201,12 @@ static INPUT_PORTS_START( starshp1 )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_START("VBLANK")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,starshp1_analog_r, nullptr) /* analog in */
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(starshp1_state, starshp1_analog_r) // analog in
PORT_SERVICE( 0x40, IP_ACTIVE_LOW )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("COINAGE")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starshp1_state,collision_latch_r, nullptr) /* collision latch */
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(starshp1_state, collision_latch_r) // collision latch
PORT_DIPNAME( 0x70, 0x20, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x10, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) )
diff --git a/src/mame/drivers/starwars.cpp b/src/mame/drivers/starwars.cpp
index d1db1db6f2d..54cd8cb277c 100644
--- a/src/mame/drivers/starwars.cpp
+++ b/src/mame/drivers/starwars.cpp
@@ -213,9 +213,9 @@ static INPUT_PORTS_START( starwars )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
/* Bit 6 is VG_HALT */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_starwars_device, done_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_starwars_device, done_r)
/* Bit 7 is MATH_RUN - see machine/starwars.c */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, starwars_state,matrix_flag_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(starwars_state, matrix_flag_r)
PORT_START("DSW0")
PORT_DIPNAME( 0x03, 0x02, "Starting Shields" ) PORT_DIPLOCATION("10D:1,2")
diff --git a/src/mame/drivers/statriv2.cpp b/src/mame/drivers/statriv2.cpp
index 924a4d88e82..bf6c4c836cb 100644
--- a/src/mame/drivers/statriv2.cpp
+++ b/src/mame/drivers/statriv2.cpp
@@ -107,7 +107,7 @@ public:
void init_addr_xhl();
void init_laserdisc();
- DECLARE_CUSTOM_INPUT_MEMBER(latched_coin_r);
+ DECLARE_READ_LINE_MEMBER(latched_coin_r);
private:
required_device<cpu_device> m_maincpu;
@@ -291,7 +291,7 @@ READ8_MEMBER(statriv2_state::question_data_r)
*
*************************************/
-CUSTOM_INPUT_MEMBER(statriv2_state::latched_coin_r)
+READ_LINE_MEMBER(statriv2_state::latched_coin_r)
{
return m_latched_coin;
}
@@ -354,7 +354,7 @@ static INPUT_PORTS_START( statusbj )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state, latched_coin_r, "COIN")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(statriv2_state, latched_coin_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x30, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
@@ -387,7 +387,7 @@ static INPUT_PORTS_START( funcsino )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Select Game") PORT_CODE(KEYCODE_S)
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state, latched_coin_r, "COIN")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(statriv2_state, latched_coin_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x10, 0x10, "DIP switch? 10" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -423,7 +423,7 @@ static INPUT_PORTS_START( tripdraw )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Stand") PORT_CODE(KEYCODE_4)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state, latched_coin_r, "COIN")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(statriv2_state, latched_coin_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x10, 0x10, "DIP switch? 10" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -459,7 +459,7 @@ static INPUT_PORTS_START( bigcsino ) // flyer shows 8 buttons on the cabinet
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_SERVICE_NO_TOGGLE( 0x02, IP_ACTIVE_LOW )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state, latched_coin_r, "COIN")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(statriv2_state, latched_coin_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_DIPNAME( 0x10, 0x10, "DIP switch? 10" )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
@@ -534,7 +534,7 @@ static INPUT_PORTS_START( statriv2 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Play 1000")
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, statriv2_state, latched_coin_r, "COIN")
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(statriv2_state, latched_coin_r)
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_SERVICE( 0x10, IP_ACTIVE_HIGH )
PORT_DIPNAME( 0x20, 0x20, "Show Correct Answer" )
diff --git a/src/mame/drivers/superqix.cpp b/src/mame/drivers/superqix.cpp
index e94562ea990..682cdebc09b 100644
--- a/src/mame/drivers/superqix.cpp
+++ b/src/mame/drivers/superqix.cpp
@@ -226,12 +226,12 @@ The MCU acts this way:
**************************************************************************/
-CUSTOM_INPUT_MEMBER(superqix_state::fromz80_semaphore_input_r)
+READ_LINE_MEMBER(superqix_state::fromz80_semaphore_input_r)
{
return (m_z80_has_written ? 1 : 0);
}
-CUSTOM_INPUT_MEMBER(superqix_state::frommcu_semaphore_input_r)
+READ_LINE_MEMBER(superqix_state::frommcu_semaphore_input_r)
{
return (m_mcu_has_written ? 1 : 0);
}
@@ -1093,7 +1093,7 @@ static INPUT_PORTS_START( pbillian )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // P2 fire (M powerup) + high score initials
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hotsmash_state, pbillian_semaphore_input_r, nullptr) /* Z80 and MCU Semaphores */
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(hotsmash_state, pbillian_semaphore_input_r) // Z80 and MCU Semaphores
PORT_START("PLUNGER1")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0x00, 0xff) PORT_SENSITIVITY(100) PORT_KEYDELTA(16)
@@ -1183,7 +1183,7 @@ static INPUT_PORTS_START( hotsmash )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // p2 button 2, unused on this game?
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, hotsmash_state, pbillian_semaphore_input_r, nullptr) /* Z80 and MCU Semaphores */
+ PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(hotsmash_state, pbillian_semaphore_input_r) // Z80 and MCU Semaphores
PORT_START("PLUNGER1") // plunger isn't present on hotsmash though the pins exist for it
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED ) PORT_PLAYER(1)
@@ -1261,7 +1261,7 @@ static INPUT_PORTS_START( superqix )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 ) // JAMMA #R ("Service")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_TILT ) // JAMMA #S ("Tilt")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE2 ) // JAMMA #15 ("Test")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, superqix_state, fromz80_semaphore_input_r, nullptr) // 74ls74 @C2 pin 8 (/Q2), this is the z80->mcu semaphore
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(superqix_state, fromz80_semaphore_input_r) // 74ls74 @C2 pin 8 (/Q2), this is the z80->mcu semaphore
PORT_START("P1") /* AY-3-8910 #1 @3P Port A */
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY // JAMMA #18
@@ -1280,8 +1280,8 @@ static INPUT_PORTS_START( superqix )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL // JAMMA #Y
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL // JAMMA #Z
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_COCKTAIL // JAMMA #a
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, superqix_state, frommcu_semaphore_input_r, nullptr) // 74ls174 @1J pin 5 (Q1), this is the mcu->z80 semaphore
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, superqix_state, fromz80_semaphore_input_r, nullptr) // 74ls74 @C2 pin 8 (/Q2), this is the z80->mcu semaphore
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(superqix_state, frommcu_semaphore_input_r) // 74ls174 @1J pin 5 (Q1), this is the mcu->z80 semaphore
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(superqix_state, fromz80_semaphore_input_r) // 74ls74 @C2 pin 8 (/Q2), this is the z80->mcu semaphore
INPUT_PORTS_END
diff --git a/src/mame/drivers/suprnova.cpp b/src/mame/drivers/suprnova.cpp
index fae1e70d3e6..1255842b58a 100644
--- a/src/mame/drivers/suprnova.cpp
+++ b/src/mame/drivers/suprnova.cpp
@@ -498,10 +498,10 @@ TIMER_DEVICE_CALLBACK_MEMBER(skns_state::irq)
**********************************************************************************/
+template <int P>
CUSTOM_INPUT_MEMBER(skns_state::paddle_r)
{
- const char *tag = (const char *)param;
- return ioport(tag)->read();
+ return m_paddle[P]->read();
}
static INPUT_PORTS_START( skns ) /* 3 buttons, 2 players */
@@ -556,12 +556,12 @@ static INPUT_PORTS_START( skns ) /* 3 buttons, 2 players */
PORT_DIPNAME( 0x00000080, 0x00000080, "Freeze" )
PORT_DIPSETTING( 0x00000000, "Freezes the game")
PORT_DIPSETTING( 0x00000080, "Right value")
- PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle C")
- PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle B")
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle A")
+ PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(skns_state, paddle_r<2>) // Paddle C
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(skns_state, paddle_r<1>) // Paddle B
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(skns_state, paddle_r<0>) // Paddle A
PORT_START("40000c")
- PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, skns_state,paddle_r, "Paddle D")
+ PORT_BIT( 0x000000ff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(skns_state, paddle_r<3>) // Paddle D
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("Paddle A")
diff --git a/src/mame/drivers/suprridr.cpp b/src/mame/drivers/suprridr.cpp
index 5c401d2e7a7..f4d3aaf4895 100644
--- a/src/mame/drivers/suprridr.cpp
+++ b/src/mame/drivers/suprridr.cpp
@@ -225,7 +225,7 @@ CUSTOM_INPUT_MEMBER(suprridr_state::control_r)
static INPUT_PORTS_START( suprridr )
PORT_START("INPUTS")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, suprridr_state, control_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(suprridr_state, control_r)
PORT_START("SYSTEM")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 )
diff --git a/src/mame/drivers/system1.cpp b/src/mame/drivers/system1.cpp
index a303c351342..e88277272c0 100644
--- a/src/mame/drivers/system1.cpp
+++ b/src/mame/drivers/system1.cpp
@@ -2012,10 +2012,10 @@ static INPUT_PORTS_START( dakkochn )
PORT_INCLUDE( choplift )
PORT_MODIFY("P1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_data_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(system1_state, dakkochn_mux_data_r)
PORT_MODIFY("P2")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, system1_state,dakkochn_mux_status_r, nullptr)
+ PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(system1_state, dakkochn_mux_status_r)
PORT_MODIFY("SYSTEM")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* start 1 & 2 not connected. */
diff --git a/src/mame/drivers/tail2nos.cpp b/src/mame/drivers/tail2nos.cpp
index 06c6e75470e..9ef10460371 100644
--- a/src/mame/drivers/tail2nos.cpp
+++ b/src/mame/drivers/tail2nos.cpp
@@ -74,10 +74,10 @@ void tail2nos_state::sound_port_map(address_map &map)
#endif
}
+template <int N>
CUSTOM_INPUT_MEMBER(tail2nos_state::analog_in_r)
{
- int num = (uintptr_t)param;
- int delta = ioport(num ? "AN1" : "AN0")->read();
+ int delta = m_analog[N]->read();
return delta >> 5;
}
@@ -91,7 +91,7 @@ static INPUT_PORTS_START( tail2nos )
PORT_BIT( 0x0010, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_CONDITION("DSW", 0x4000, EQUALS, 0x4000) PORT_NAME("Brake (standard BD)")
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_CONDITION("DSW", 0x4000, EQUALS, 0x4000) PORT_NAME("Accelerate (standard BD)")
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW", 0x4000, EQUALS, 0x4000)
- PORT_BIT( 0x0070, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tail2nos_state,analog_in_r, (void *)0) PORT_CONDITION("DSW", 0x4000, NOTEQUALS, 0x4000)
+ PORT_BIT( 0x0070, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tail2nos_state, analog_in_r<0>) PORT_CONDITION("DSW", 0x4000, NOTEQUALS, 0x4000)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_COIN2 )
@@ -103,7 +103,7 @@ static INPUT_PORTS_START( tail2nos )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_BIT( 0x0070, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tail2nos_state,analog_in_r, (void *)1) PORT_CONDITION("DSW", 0x4000, NOTEQUALS, 0x4000)
+ PORT_BIT( 0x0070, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tail2nos_state, analog_in_r<1>) PORT_CONDITION("DSW", 0x4000, NOTEQUALS, 0x4000)
PORT_BIT( 0x0070, IP_ACTIVE_LOW, IPT_UNUSED ) PORT_CONDITION("DSW", 0x4000, EQUALS, 0x4000)
PORT_BIT( 0xff8f, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/taito_f3.cpp b/src/mame/drivers/taito_f3.cpp
index 13db66e85d1..c867b19e8f8 100644
--- a/src/mame/drivers/taito_f3.cpp
+++ b/src/mame/drivers/taito_f3.cpp
@@ -42,18 +42,17 @@
/******************************************************************************/
+template <int Num>
CUSTOM_INPUT_MEMBER(taito_f3_state::f3_analog_r)
{
- const int num = (uintptr_t)param;
- const int data = m_dial[num]->read();
+ const int data = m_dial[Num]->read();
return ((data & 0xf) << 12) | ((data & 0xff0) >> 4);
}
-
+template <int Num>
CUSTOM_INPUT_MEMBER(taito_f3_state::f3_coin_r)
{
- const int num = (uintptr_t)param;
- return m_coin_word[num];
+ return m_coin_word[Num];
}
u32 taito_f3_state::f3_control_r(offs_t offset)
@@ -273,8 +272,8 @@ static INPUT_PORTS_START( f3 )
PORT_BIT( 0x00002000, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00004000, IP_ACTIVE_LOW, IPT_START3 )
PORT_BIT( 0x00008000, IP_ACTIVE_LOW, IPT_START4 )
- PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, nullptr)
- PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,eeprom_read, nullptr)
+ PORT_BIT( 0x00ff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taito_f3_state, eeprom_read)
+ PORT_BIT( 0xff000000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taito_f3_state, eeprom_read)
/* MSW: Coin counters/lockouts are readable, LSW: Joysticks (Player 1 & 2) */
PORT_START("IN.1")
@@ -287,7 +286,7 @@ static INPUT_PORTS_START( f3 )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x0000ff00, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* These must be high */
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_coin_r, (void *)0)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taito_f3_state, f3_coin_r<0>)
/* Player 3 & 4 fire buttons (Player 2 top fire buttons in Kaiser Knuckle) */
PORT_START("IN.4")
@@ -313,16 +312,16 @@ static INPUT_PORTS_START( f3 )
PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(4)
PORT_BIT( 0x0000ff00, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_coin_r, (void *)1)
+ PORT_BIT( 0xffff0000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taito_f3_state, f3_coin_r<1>)
/* Analog control 1 */
PORT_START("IN.2")
- PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_analog_r, (void*)0)
+ PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taito_f3_state, f3_analog_r<0>)
PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* Analog control 2 */
PORT_START("IN.3")
- PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taito_f3_state,f3_analog_r, (void *)1)
+ PORT_BIT( 0x0000ffff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taito_f3_state, f3_analog_r<1>)
PORT_BIT( 0xffff0000, IP_ACTIVE_LOW, IPT_UNKNOWN )
/* These are not read directly, but through PORT_CUSTOMs above */
diff --git a/src/mame/drivers/taito_z.cpp b/src/mame/drivers/taito_z.cpp
index 5a6d6f20efe..cc024428558 100644
--- a/src/mame/drivers/taito_z.cpp
+++ b/src/mame/drivers/taito_z.cpp
@@ -1392,11 +1392,16 @@ void taitoz_state::spacegun_eeprom_w(u8 data)
GAME INPUTS
**********************************************************/
-CUSTOM_INPUT_MEMBER(taitoz_state::taitoz_pedal_r)
+CUSTOM_INPUT_MEMBER(taitoz_state::gas_pedal_r)
{
static const u8 retval[8] = { 0,1,3,2,6,7,5,4 };
- ioport_port *port = ioport((const char *)param);
- return retval[port != nullptr ? port->read() & 7 : 0];
+ return retval[m_gas.read_safe(0) & 7];
+}
+
+CUSTOM_INPUT_MEMBER(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];
}
@@ -2210,7 +2215,7 @@ static INPUT_PORTS_START( contcirc )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitoz_state, taitoz_pedal_r, "GAS") PORT_CONDITION("DSWA", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitoz_state, gas_pedal_r) PORT_CONDITION("DSWA", 0x01, EQUALS, 0x01)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gas Switch") PORT_CONDITION("DSWA", 0x01, EQUALS, 0x00)
PORT_START("IN1")
@@ -2219,7 +2224,7 @@ static INPUT_PORTS_START( contcirc )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Shifter") PORT_TOGGLE
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitoz_state, taitoz_pedal_r, "BRAKE") PORT_CONDITION("DSWA", 0x01, EQUALS, 0x01)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitoz_state, brake_pedal_r) PORT_CONDITION("DSWA", 0x01, EQUALS, 0x01)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Brake Switch") PORT_CONDITION("DSWA", 0x01, EQUALS, 0x00) // no function?
PORT_START("IN2") /* unused */
@@ -2292,7 +2297,7 @@ static INPUT_PORTS_START( chasehq ) // IN3-6 perhaps used with cockpit setup? //
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitoz_state, taitoz_pedal_r, "BRAKE") PORT_CONDITION("DSWA", 0x02, EQUALS, 0x00)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitoz_state, brake_pedal_r) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x00)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Brake Switch") PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02)
PORT_START("IN1")
@@ -2301,7 +2306,7 @@ static INPUT_PORTS_START( chasehq ) // IN3-6 perhaps used with cockpit setup? //
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Calibrate") // ?
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Shifter") PORT_TOGGLE
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitoz_state, taitoz_pedal_r, "GAS") PORT_CONDITION("DSWA", 0x02, EQUALS, 0x00)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitoz_state, gas_pedal_r) PORT_CONDITION("DSWA", 0x02, EQUALS, 0x00)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gas Switch") PORT_CONDITION("DSWA", 0x02, EQUALS, 0x02)
PORT_START("IN2") /* unused */
diff --git a/src/mame/drivers/taitosj.cpp b/src/mame/drivers/taitosj.cpp
index b1c4a5dc7b3..401bea5bc28 100644
--- a/src/mame/drivers/taitosj.cpp
+++ b/src/mame/drivers/taitosj.cpp
@@ -254,23 +254,22 @@ void taitosj_state::taitosj_main_mcu_map(address_map &map)
/* seems the most logical way to do the gears */
+template <int Player>
CUSTOM_INPUT_MEMBER(taitosj_state::kikstart_gear_r)
{
const char *port_tag;
- int player = (int)(uintptr_t)param;
-
- if (player == 0)
+ if (Player == 0)
port_tag = "GEARP1";
else
port_tag = "GEARP2";
/* gear MUST be 1, 2 or 3 */
- if (ioport(port_tag)->read() & 0x01) m_kikstart_gears[player] = 0x02;
- if (ioport(port_tag)->read() & 0x02) m_kikstart_gears[player] = 0x03;
- if (ioport(port_tag)->read() & 0x04) m_kikstart_gears[player] = 0x01;
+ if (ioport(port_tag)->read() & 0x01) m_kikstart_gears[Player] = 0x02;
+ if (ioport(port_tag)->read() & 0x02) m_kikstart_gears[Player] = 0x03;
+ if (ioport(port_tag)->read() & 0x04) m_kikstart_gears[Player] = 0x01;
- return m_kikstart_gears[player];
+ return m_kikstart_gears[Player];
}
// TODO: merge with above
@@ -515,7 +514,7 @@ static INPUT_PORTS_START( spaceskr )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -597,7 +596,7 @@ static INPUT_PORTS_START( spacecr )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1") // according to the manual, dips 1, 2, 3 and 6 are unused but should be left off
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unused ) ) PORT_DIPLOCATION("SWA:1")
@@ -681,7 +680,7 @@ static INPUT_PORTS_START( junglek )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Finish Bonus" )
@@ -803,7 +802,7 @@ static INPUT_PORTS_START( alpine )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" )
@@ -888,7 +887,7 @@ static INPUT_PORTS_START( alpinea )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Jump Bonus" )
@@ -966,7 +965,7 @@ static INPUT_PORTS_START( timetunl )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Unknown ) )
@@ -1166,7 +1165,7 @@ static INPUT_PORTS_START( elevator )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:1,2")
@@ -1249,7 +1248,7 @@ static INPUT_PORTS_START( tinstar )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICKLEFT_UP ) PORT_8WAY PORT_COCKTAIL
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x03, 0x03, "Bonus Life?" )
@@ -1332,7 +1331,7 @@ static INPUT_PORTS_START( waterski )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -1421,7 +1420,7 @@ static INPUT_PORTS_START( bioatack )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1") /* d50a */
PORT_DIPNAME( 0x03, 0x03, DEF_STR( Bonus_Life ) )
@@ -1488,7 +1487,7 @@ static INPUT_PORTS_START( sfposeid )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -1556,7 +1555,7 @@ static INPUT_PORTS_START( hwrace )
PORT_START("IN4")
PORT_BIT( 0x0f, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,input_port_4_f0_r, nullptr) // from sound CPU
+ PORT_BIT( 0xf0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, input_port_4_f0_r) // from sound CPU
PORT_START("DSW1")
PORT_DIPNAME( 0x01, 0x01, DEF_STR( Unknown ) )
@@ -1645,7 +1644,7 @@ static INPUT_PORTS_START( kikstart )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START2 )
PORT_START("IN3") /* Service */
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)0) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, kikstart_gear_r<0>) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */
@@ -1655,7 +1654,7 @@ static INPUT_PORTS_START( kikstart )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN4")
- PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, taitosj_state,kikstart_gear_r, (void *)1) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
+ PORT_BIT( 0x03, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(taitosj_state, kikstart_gear_r<1>) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x08)
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNKNOWN ) PORT_CONDITION("DSW3", 0x08, EQUALS, 0x00)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* needs to be 0, otherwise cannot shift */
diff --git a/src/mame/drivers/tempest.cpp b/src/mame/drivers/tempest.cpp
index 6427c660f7c..0b3f08575cb 100644
--- a/src/mame/drivers/tempest.cpp
+++ b/src/mame/drivers/tempest.cpp
@@ -319,7 +319,7 @@ public:
DECLARE_CUSTOM_INPUT_MEMBER(tempest_knob_r);
DECLARE_CUSTOM_INPUT_MEMBER(tempest_buttons_r);
- DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
+ DECLARE_READ_LINE_MEMBER(clock_r);
protected:
DECLARE_WRITE8_MEMBER(wdclr_w);
@@ -391,7 +391,7 @@ CUSTOM_INPUT_MEMBER(tempest_state::tempest_buttons_r)
}
-CUSTOM_INPUT_MEMBER(tempest_state::clock_r)
+READ_LINE_MEMBER(tempest_state::clock_r)
{
/* Emulate the 3kHz source on bit 7 (divide 1.5MHz by 512) */
return (m_maincpu->total_cycles() & 0x100) ? 1 : 0;
@@ -524,12 +524,12 @@ static INPUT_PORTS_START( tempest )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_SERVICE1 ) PORT_NAME("Diagnostic Step")
/* bit 6 is the VG HALT bit. We set it to "low" */
/* per default (busy vector processor). */
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_tempest_device, done_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_tempest_device, done_r)
/* bit 7 is tied to a 3kHz (?) clock */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,clock_r, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(tempest_state, clock_r)
PORT_START("IN1/DSW0")
- PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_knob_r, nullptr)
+ PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tempest_state, tempest_knob_r)
/* The next one is reponsible for cocktail mode.
* According to the documentation, this is not a switch, although
* it may have been planned to put it on the Math Box PCB, D/E2 )
@@ -550,7 +550,7 @@ static INPUT_PORTS_START( tempest )
PORT_DIPNAME( 0x04, 0x04, "Rating" ) PORT_DIPLOCATION("DE2:2")
PORT_DIPSETTING( 0x04, "1, 3, 5, 7, 9" )
PORT_DIPSETTING( 0x00, "tied to high score" )
- PORT_BIT(0x18, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tempest_state,tempest_buttons_r, nullptr)
+ PORT_BIT(0x18, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tempest_state, tempest_buttons_r)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
diff --git a/src/mame/drivers/tetrisp2.cpp b/src/mame/drivers/tetrisp2.cpp
index ef53ea78535..2abc705b065 100644
--- a/src/mame/drivers/tetrisp2.cpp
+++ b/src/mame/drivers/tetrisp2.cpp
@@ -1081,7 +1081,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( rocknms )
PORT_START("PLAYERS") // IN0 - $be0002.w
- PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tetrisp2_state,rocknms_main2sub_status_r, nullptr) // MAIN -> SUB Communication
+ PORT_BIT( 0x0003, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tetrisp2_state, rocknms_main2sub_status_r) // MAIN -> SUB Communication
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(1)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(1)
PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(1)
diff --git a/src/mame/drivers/thayers.cpp b/src/mame/drivers/thayers.cpp
index ab4d2e55db9..b0c9c7d7f76 100644
--- a/src/mame/drivers/thayers.cpp
+++ b/src/mame/drivers/thayers.cpp
@@ -52,8 +52,8 @@ public:
void thayers(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_enter_r);
- DECLARE_CUSTOM_INPUT_MEMBER(laserdisc_ready_r);
+ DECLARE_READ_LINE_MEMBER(laserdisc_enter_r);
+ DECLARE_READ_LINE_MEMBER(laserdisc_ready_r);
private:
enum
@@ -651,14 +651,14 @@ void thayers_state::thayers_io_map(address_map &map)
/* Input Ports */
-CUSTOM_INPUT_MEMBER(thayers_state::laserdisc_enter_r)
+READ_LINE_MEMBER(thayers_state::laserdisc_enter_r)
{
if (m_pr7820 != nullptr) return m_pr7820_enter;
if (m_ldv1000 != nullptr) return (m_ldv1000->status_strobe_r() == ASSERT_LINE) ? 0 : 1;
return 0;
}
-CUSTOM_INPUT_MEMBER(thayers_state::laserdisc_ready_r)
+READ_LINE_MEMBER(thayers_state::laserdisc_ready_r)
{
if (m_pr7820 != nullptr) return (m_pr7820->ready_r() == ASSERT_LINE) ? 0 : 1;
if (m_ldv1000 != nullptr) return (m_ldv1000->command_strobe_r() == ASSERT_LINE) ? 0 : 1;
@@ -702,8 +702,8 @@ static INPUT_PORTS_START( thayers )
PORT_START("COIN")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 )
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_enter_r, nullptr)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, thayers_state,laserdisc_ready_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(thayers_state, laserdisc_enter_r)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(thayers_state, laserdisc_ready_r)
PORT_START("ROW.0")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_KEYBOARD ) PORT_NAME("1 YES") PORT_CODE(KEYCODE_1)
diff --git a/src/mame/drivers/timeplt.cpp b/src/mame/drivers/timeplt.cpp
index 17f32e54c5a..98708dd54c4 100644
--- a/src/mame/drivers/timeplt.cpp
+++ b/src/mame/drivers/timeplt.cpp
@@ -115,7 +115,7 @@ WRITE8_MEMBER(timeplt_state::chkun_sound_w)
m_tc8830f->reset();
}
-CUSTOM_INPUT_MEMBER(timeplt_state::chkun_hopper_status_r)
+READ_LINE_MEMBER(timeplt_state::chkun_hopper_status_r)
{
// temp workaround, needs hopper
return machine().rand();
@@ -272,7 +272,7 @@ static INPUT_PORTS_START( chkun )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Bet 3B")
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, timeplt_state, chkun_hopper_status_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(timeplt_state, chkun_hopper_status_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Bet 1B")
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Bet 2B")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
@@ -321,7 +321,7 @@ static INPUT_PORTS_START( bikkuric )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
- PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, timeplt_state, chkun_hopper_status_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(timeplt_state, chkun_hopper_status_r)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
diff --git a/src/mame/drivers/toaplan2.cpp b/src/mame/drivers/toaplan2.cpp
index a3d3c742c36..892adeae76b 100644
--- a/src/mame/drivers/toaplan2.cpp
+++ b/src/mame/drivers/toaplan2.cpp
@@ -663,7 +663,7 @@ void toaplan2_state::shared_ram_w(offs_t offset, u8 data)
}
-CUSTOM_INPUT_MEMBER(toaplan2_state::c2map_r)
+READ_LINE_MEMBER(toaplan2_state::c2map_r)
{
// For Teki Paki hardware
// bit 4 high signifies secondary CPU is ready
@@ -1632,7 +1632,7 @@ static INPUT_PORTS_START( tekipaki )
// PORT_CONFSETTING( 0x000d, DEF_STR( Japan ) )
// PORT_CONFSETTING( 0x000e, DEF_STR( Japan ) )
PORT_CONFSETTING( 0x000f, "Japan (Distributed by Tecmo)" )
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, nullptr)
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(toaplan2_state, c2map_r)
INPUT_PORTS_END
@@ -2045,7 +2045,7 @@ static INPUT_PORTS_START( whoopee )
PORT_INCLUDE( pipibibs )
PORT_MODIFY("JMPR")
- PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, toaplan2_state,c2map_r, nullptr) // bit 0x10 sound ready
+ PORT_BIT( 0x0010, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(toaplan2_state, c2map_r) // bit 0x10 sound ready
INPUT_PORTS_END
diff --git a/src/mame/drivers/tomcat.cpp b/src/mame/drivers/tomcat.cpp
index a55a07d9e7a..a7933a14a57 100644
--- a/src/mame/drivers/tomcat.cpp
+++ b/src/mame/drivers/tomcat.cpp
@@ -276,7 +276,7 @@ void tomcat_state::sound_map(address_map &map)
static INPUT_PORTS_START( tomcat )
PORT_START("IN0") /* INPUTS */
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER("avg", avg_tomcat_device, done_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("avg", avg_tomcat_device, done_r)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED ) // SPARE
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_BUTTON5 ) // DIAGNOSTIC
PORT_SERVICE( 0x08, IP_ACTIVE_LOW )
diff --git a/src/mame/drivers/topspeed.cpp b/src/mame/drivers/topspeed.cpp
index 0c4098fc03b..377ea3738f0 100644
--- a/src/mame/drivers/topspeed.cpp
+++ b/src/mame/drivers/topspeed.cpp
@@ -207,11 +207,16 @@ u8 topspeed_state::input_bypass_r()
}
}
-CUSTOM_INPUT_MEMBER(topspeed_state::pedal_r)
+CUSTOM_INPUT_MEMBER(topspeed_state::gas_pedal_r)
{
static const u8 retval[8] = { 0,1,3,2,6,7,5,4 };
- ioport_port *port = ioport((const char *)param);
- return retval[port != nullptr ? port->read() & 7 : 0];
+ return retval[m_gas.read_safe(0) & 7];
+}
+
+CUSTOM_INPUT_MEMBER(topspeed_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];
}
// TODO: proper motorcpu hook-up
@@ -469,7 +474,7 @@ static INPUT_PORTS_START( topspeed )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE1 )
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, topspeed_state, pedal_r, "BRAKE") PORT_CONDITION("DSWA", 0x03, NOTEQUALS, 0x02)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(topspeed_state, brake_pedal_r) PORT_CONDITION("DSWA", 0x03, NOTEQUALS, 0x02)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Brake Switch") PORT_CONDITION("DSWA", 0x03, EQUALS, 0x02)
PORT_START("IN1")
@@ -478,7 +483,7 @@ static INPUT_PORTS_START( topspeed )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE2 ) PORT_NAME("Calibrate") // ?
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("Shifter") PORT_TOGGLE
- PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, topspeed_state, pedal_r, "GAS") PORT_CONDITION("DSWA", 0x03, NOTEQUALS, 0x02)
+ PORT_BIT( 0xe0, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(topspeed_state, gas_pedal_r) PORT_CONDITION("DSWA", 0x03, NOTEQUALS, 0x02)
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Gas Switch") PORT_CONDITION("DSWA", 0x03, EQUALS, 0x02)
PORT_START("IN2") // Unused
diff --git a/src/mame/drivers/ultratnk.cpp b/src/mame/drivers/ultratnk.cpp
index 6c5d28b1798..b4fae269996 100644
--- a/src/mame/drivers/ultratnk.cpp
+++ b/src/mame/drivers/ultratnk.cpp
@@ -23,15 +23,17 @@ Atari Ultra Tank driver
-CUSTOM_INPUT_MEMBER(ultratnk_state::get_collision)
+template <int N>
+READ_LINE_MEMBER(ultratnk_state::collision_flipflop_r)
{
- return m_collision[(uintptr_t) param];
+ return m_collision[N];
}
-CUSTOM_INPUT_MEMBER(ultratnk_state::get_joystick)
+template <int N>
+READ_LINE_MEMBER(ultratnk_state::joystick_r)
{
- uint8_t joy = ioport((const char *)param)->read() & 3;
+ uint8_t joy = m_joy[N]->read() & 3;
if (joy == 1)
{
@@ -192,13 +194,13 @@ static INPUT_PORTS_START( ultratnk )
PORT_START("COLLISION")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)0 )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, collision_flipflop_r<0>)
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)1 )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, collision_flipflop_r<1>)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNUSED ) /* VCC */
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)2 )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, collision_flipflop_r<2>)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_TILT ) /* SLAM */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_collision, (void *)3 )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, collision_flipflop_r<3>)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 )
@@ -231,13 +233,13 @@ static INPUT_PORTS_START( ultratnk )
PORT_START("ANALOG")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_START1 )
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-W" )
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, joystick_r<0>) // "JOY-W"
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_START2 )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-Y" )
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, joystick_r<2>) // "JOY-Y"
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-X" )
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, joystick_r<1>) // "JOY-X"
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, ultratnk_state, get_joystick, "JOY-Z" )
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(ultratnk_state, joystick_r<3>) // "JOY-Z"
PORT_START("JOY-W")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICKLEFT_DOWN ) PORT_PLAYER(1)
diff --git a/src/mame/drivers/vamphalf.cpp b/src/mame/drivers/vamphalf.cpp
index f7c09126065..a1c19cca1a0 100644
--- a/src/mame/drivers/vamphalf.cpp
+++ b/src/mame/drivers/vamphalf.cpp
@@ -1050,7 +1050,7 @@ static INPUT_PORTS_START( boonggab )
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_CUSTOM ) // sensor 1
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_CUSTOM ) // sensor 2
PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_CUSTOM ) // sensor 3
- PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vamphalf_state,boonggab_photo_sensors_r, nullptr) // photo sensors 1, 2 and 3
+ PORT_BIT( 0x3800, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(vamphalf_state, boonggab_photo_sensors_r) // photo sensors 1, 2 and 3
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x8000, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/vegaeo.cpp b/src/mame/drivers/vegaeo.cpp
index a09279722bc..13e92abd15e 100644
--- a/src/mame/drivers/vegaeo.cpp
+++ b/src/mame/drivers/vegaeo.cpp
@@ -128,7 +128,7 @@ static INPUT_PORTS_START( crazywar )
PORT_BIT( 0x00000008, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0x00000010, IP_ACTIVE_LOW, IPT_SERVICE1 )
PORT_SERVICE_NO_TOGGLE( 0x00000020, IP_ACTIVE_LOW )
- PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegaeo_state, eolith_speedup_getvblank, nullptr)
+ PORT_BIT( 0x00000040, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vegaeo_state, speedup_vblank_r)
PORT_BIT( 0x00000080, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0xffffff00, IP_ACTIVE_LOW, IPT_UNUSED )
diff --git a/src/mame/drivers/vegas.cpp b/src/mame/drivers/vegas.cpp
index 33a653a6183..e12909b2fd1 100644
--- a/src/mame/drivers/vegas.cpp
+++ b/src/mame/drivers/vegas.cpp
@@ -1516,7 +1516,7 @@ static INPUT_PORTS_START( nbashowt )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(3)
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(3)
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegas_state, i40_r, nullptr)
+ PORT_BIT( 0x0f00, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(vegas_state, i40_r)
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_PLAYER(4)
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_PLAYER(4)
PORT_BIT( 0x4000, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(4)
@@ -1575,8 +1575,8 @@ static INPUT_PORTS_START( sf2049 )
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 2") PORT_PLAYER(1) /* view 2 */
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("View 3") PORT_PLAYER(1) /* view 3 */
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Music") PORT_PLAYER(1) /* music */
- PORT_BIT( 0x0070, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegas_state, keypad_r, "KEYPAD" )
- PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegas_state, gearshift_r, "GEAR" )
+ PORT_BIT( 0x0070, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(vegas_state, keypad_r)
+ PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(vegas_state, gearshift_r)
PORT_START("GEAR")
PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("1st Gear") PORT_PLAYER(1) /* 1st gear */
@@ -1670,7 +1670,7 @@ static INPUT_PORTS_START( cartfury )
PORT_BIT( 0x0020, IP_ACTIVE_LOW, IPT_BUTTON10 ) PORT_NAME("View 2") PORT_PLAYER(1) /* view 2 */
PORT_BIT( 0x0040, IP_ACTIVE_LOW, IPT_BUTTON11 ) PORT_NAME("View 3") PORT_PLAYER(1) /* view 3 */
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_BUTTON12 ) PORT_NAME("Boost") PORT_PLAYER(1) /* boost */
- PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, vegas_state, gearshift_r, "GEAR" )
+ PORT_BIT( 0x0f00, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(vegas_state, gearshift_r)
PORT_START("GEAR")
PORT_BIT( 0x1, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("1st Gear") PORT_PLAYER(1) /* 1st gear */
diff --git a/src/mame/drivers/vicdual.cpp b/src/mame/drivers/vicdual.cpp
index f93db10f607..482a9e6a321 100644
--- a/src/mame/drivers/vicdual.cpp
+++ b/src/mame/drivers/vicdual.cpp
@@ -96,7 +96,7 @@ void vicdual_state::assert_coin_status()
m_coin_status = 1;
}
-CUSTOM_INPUT_MEMBER(vicdual_state::read_coin_status)
+READ_LINE_MEMBER(vicdual_state::coin_status_r)
{
return m_coin_status;
}
@@ -171,25 +171,25 @@ int vicdual_state::get_vcounter()
}
-CUSTOM_INPUT_MEMBER(vicdual_state::get_64v)
+READ_LINE_MEMBER(vicdual_state::get_64v)
{
return (get_vcounter() >> 6) & 0x01;
}
-CUSTOM_INPUT_MEMBER(vicdual_state::get_vblank_comp)
+READ_LINE_MEMBER(vicdual_state::vblank_comp_r)
{
return (get_vcounter() < VICDUAL_VBSTART);
}
-CUSTOM_INPUT_MEMBER(vicdual_state::get_composite_blank_comp)
+READ_LINE_MEMBER(vicdual_state::cblank_comp_r)
{
- return (get_vblank_comp(field, nullptr) && !m_screen->hblank());
+ return (vblank_comp_r() && !m_screen->hblank());
}
-CUSTOM_INPUT_MEMBER(vicdual_state::get_timer_value)
+READ_LINE_MEMBER(vicdual_state::timer_value_r)
{
/* return the state of the timer (old code claims "4MHz square wave", but it was toggled once every 2msec, or 500Hz) */
return machine().time().as_ticks(500) & 1;
@@ -345,9 +345,9 @@ static INPUT_PORTS_START( depthch )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, get_64v)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -429,7 +429,7 @@ static INPUT_PORTS_START( safari )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, get_64v)
PORT_BIT( 0x0e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_DIPNAME( 0x30, 0x30, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 4C_1C ) )
@@ -437,7 +437,7 @@ static INPUT_PORTS_START( safari )
PORT_DIPSETTING( 0x20, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x30, DEF_STR( 1C_1C ) )
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -523,9 +523,9 @@ static INPUT_PORTS_START( frogs )
PORT_CONFSETTING( 0x40, DEF_STR( 1C_1C ) )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, get_64v)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
@@ -654,9 +654,9 @@ static INPUT_PORTS_START( headon )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, get_64v)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_CABINET_COLOR_OR_BW
@@ -680,10 +680,10 @@ static INPUT_PORTS_START( headonmz )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, get_64v)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) // protection? (check on startup)
PORT_BIT( 0x7a, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_CABINET_COLOR_OR_BW
@@ -715,7 +715,7 @@ static INPUT_PORTS_START( headonsa )
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0xf8, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("COIN")
@@ -740,7 +740,7 @@ static INPUT_PORTS_START( supcrash )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_DIPNAME( 0x02, 0x02, DEF_STR( Unknown ) ) // see comment above
PORT_DIPSETTING( 0x02, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -748,7 +748,7 @@ static INPUT_PORTS_START( supcrash )
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x78, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -766,9 +766,9 @@ static INPUT_PORTS_START( carnivalh )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_CABINET_COLOR_OR_BW
@@ -810,9 +810,9 @@ static INPUT_PORTS_START( sspaceat )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_CABINET_COLOR_OR_BW
@@ -954,7 +954,7 @@ static INPUT_PORTS_START( headon2 )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x02, DEF_STR( On ) )
PORT_BIT(0x7c, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -977,12 +977,12 @@ static INPUT_PORTS_START( car2 )
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* probably unused */
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_DIPNAME( 0x02, 0x00, DEF_STR( Coinage ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 2C_1C ) )
PORT_BIT( 0x7c, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -995,7 +995,7 @@ static INPUT_PORTS_START( headon2s )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_MODIFY("IN2")
- PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_MODIFY("COIN")
@@ -1034,10 +1034,10 @@ static INPUT_PORTS_START( digger )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
-// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr) // it's like this according to the schematics, but gameplay speed is too fast;
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr) // gameplay speed is correct now, there's likely an error in the schematics then...
+// PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r) // it's like this according to the schematics, but gameplay speed is too fast;
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r) // gameplay speed is correct now, there's likely an error in the schematics then...
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
@@ -1414,13 +1414,15 @@ void vicdual_state::headonn_io_map(address_map &map)
/* several of the games' lives DIPs are spread across two input ports */
-CUSTOM_INPUT_MEMBER(vicdual_state::fake_lives_r)
+template <int Param>
+READ_LINE_MEMBER(vicdual_state::fake_lives_r)
{
- /* use the low byte for the bitmask */
- uint8_t bit_mask = ((uintptr_t)param) & 0xff;
+ // FIXME: there should be two template parameters, but that makes port macros confused
+ // use the low byte for the bitmask
+ uint8_t bit_mask = (Param) & 0xff;
- /* and use d8 for the port */
- int port = ((uintptr_t)param) >> 8 & 1;
+ // and use d8 for the port
+ int port = (Param) >> 8 & 1;
return (m_fake_lives[port].read_safe(0) & bit_mask) ? 0 : 1;
}
@@ -1429,7 +1431,7 @@ static INPUT_PORTS_START( invho2 )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1440,8 +1442,8 @@ static INPUT_PORTS_START( invho2 )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1449,8 +1451,8 @@ static INPUT_PORTS_START( invho2 )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x101)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x101>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1458,8 +1460,8 @@ static INPUT_PORTS_START( invho2 )
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x102)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x101>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1492,7 +1494,7 @@ static INPUT_PORTS_START( carhntds )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1503,8 +1505,8 @@ static INPUT_PORTS_START( carhntds )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x002>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1512,8 +1514,8 @@ static INPUT_PORTS_START( carhntds )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x101)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x101>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1521,8 +1523,8 @@ static INPUT_PORTS_START( carhntds )
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x102)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x102>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1580,7 +1582,7 @@ static INPUT_PORTS_START( invds )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1591,8 +1593,8 @@ static INPUT_PORTS_START( invds )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x002>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1600,8 +1602,8 @@ static INPUT_PORTS_START( invds )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x101)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x101>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1609,8 +1611,8 @@ static INPUT_PORTS_START( invds )
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x102)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x101>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1638,7 +1640,7 @@ static INPUT_PORTS_START( sspacaho )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, "Head On Lives" ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "4" )
@@ -1649,8 +1651,8 @@ static INPUT_PORTS_START( sspacaho )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x002>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1661,7 +1663,7 @@ static INPUT_PORTS_START( sspacaho )
PORT_DIPNAME( 0x04, 0x00, "Space Attack Bonus Life" ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x00, "10000" )
PORT_DIPSETTING( 0x04, "15000" )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1672,7 +1674,7 @@ static INPUT_PORTS_START( sspacaho )
PORT_DIPNAME( 0x04, 0x00, "Space Attack Final UFO Bonus" ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1708,7 +1710,7 @@ static INPUT_PORTS_START( tranqgun )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_vblank_comp, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, vblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1719,7 +1721,7 @@ static INPUT_PORTS_START( tranqgun )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1730,7 +1732,7 @@ static INPUT_PORTS_START( tranqgun )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1759,7 +1761,7 @@ static INPUT_PORTS_START( spacetrk )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // unknown, but used
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1770,7 +1772,7 @@ static INPUT_PORTS_START( spacetrk )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1781,7 +1783,7 @@ static INPUT_PORTS_START( spacetrk )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1831,7 +1833,7 @@ static INPUT_PORTS_START( carnival )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:2")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_2WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_2WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1842,7 +1844,7 @@ static INPUT_PORTS_START( carnival )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1853,7 +1855,7 @@ static INPUT_PORTS_START( carnival )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1880,7 +1882,7 @@ static INPUT_PORTS_START( brdrline )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Cabinet ) ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 8-pos (is 6-8 unconnected?)
PORT_DIPSETTING( 0x00, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x08, DEF_STR( Cocktail ) )
@@ -1891,8 +1893,8 @@ static INPUT_PORTS_START( brdrline )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_vblank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x002>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, vblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1900,8 +1902,8 @@ static INPUT_PORTS_START( brdrline )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x004)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_64v, nullptr) /* yes, this is different */
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x004>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, get_64v) /* yes, this is different */
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1912,7 +1914,7 @@ static INPUT_PORTS_START( brdrline )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Bonus_Life ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, "15000" )
PORT_DIPSETTING( 0x00, "20000" )
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1953,7 +1955,7 @@ static INPUT_PORTS_START( pulsar )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
@@ -1964,8 +1966,8 @@ static INPUT_PORTS_START( pulsar )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x002>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1976,7 +1978,7 @@ static INPUT_PORTS_START( pulsar )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -1987,7 +1989,7 @@ static INPUT_PORTS_START( pulsar )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2023,7 +2025,7 @@ static INPUT_PORTS_START( heiankyo )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // bonus life?
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2034,7 +2036,7 @@ static INPUT_PORTS_START( heiankyo )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3") // bonus life?
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* has to be 0, protection? */
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2045,7 +2047,7 @@ static INPUT_PORTS_START( heiankyo )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Lives ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x04, "5" )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2058,7 +2060,7 @@ static INPUT_PORTS_START( alphaho )
PORT_START("IN0")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_COCKTAIL
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x001)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x001>)
PORT_DIPNAME( 0x08, 0x00, "Head On Lives" ) PORT_DIPLOCATION("SW1:5") // SW1 @ C1, 6-pos (is #6 unconnected?)
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x08, "4" )
@@ -2069,8 +2071,8 @@ static INPUT_PORTS_START( alphaho )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, fake_lives_r, (void *)0x002)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, fake_lives_r<0x002>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2081,7 +2083,7 @@ static INPUT_PORTS_START( alphaho )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2092,7 +2094,7 @@ static INPUT_PORTS_START( alphaho )
PORT_DIPNAME( 0x04, 0x00, "Alpha Fighter Unknown" ) PORT_DIPLOCATION("SW1:4") // related to soccer frequency (code at 0x4950)
PORT_DIPSETTING( 0x00, DEF_STR ( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR ( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("Game Select") PORT_TOGGLE
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2143,7 +2145,7 @@ static INPUT_PORTS_START( headonn )
PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_4WAY PORT_COCKTAIL
PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_UNUSED)
- PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_UNUSED)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_START2)
PORT_BIT(0xc0, IP_ACTIVE_LOW, IPT_UNUSED)
@@ -2337,9 +2339,9 @@ WRITE8_MEMBER(vicdual_state::samurai_protection_w)
}
-CUSTOM_INPUT_MEMBER(vicdual_state::samurai_protection_r)
+template <int Offset>
+READ_LINE_MEMBER(vicdual_state::samurai_protection_r)
{
- int offset = (uintptr_t)param;
uint32_t answer = 0;
if (m_samurai_protection_data == 0xab)
@@ -2347,7 +2349,7 @@ CUSTOM_INPUT_MEMBER(vicdual_state::samurai_protection_r)
else if (m_samurai_protection_data == 0x1d)
answer = 0x0c;
- return (answer >> offset) & 0x01;
+ return (answer >> Offset) & 0x01;
}
@@ -2400,33 +2402,33 @@ static INPUT_PORTS_START( samurai )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,samurai_protection_r, (void *)1)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, samurai_protection_r<1>)
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) PORT_DIPLOCATION("SW1:2") // unknown, but used
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_4WAY
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_4WAY
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,samurai_protection_r, (void *)2)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, samurai_protection_r<2>)
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:3")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_timer_value, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, timer_value_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_START1 )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("IN3")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state,samurai_protection_r, (void *)3)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, samurai_protection_r<3>)
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) PORT_DIPLOCATION("SW1:4")
PORT_DIPSETTING( 0x04, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_START2 )
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
@@ -2577,9 +2579,9 @@ static INPUT_PORTS_START( nsub )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_START("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nsub_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nsub_state, cblank_comp_r)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, nsub_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(nsub_state, coin_status_r)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, nsub_state, nsub_coin_in, 0)
@@ -2734,9 +2736,9 @@ static INPUT_PORTS_START( invinco )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START("IN2")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, get_composite_blank_comp, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, cblank_comp_r)
PORT_BIT( 0x7e, IP_ACTIVE_LOW, IPT_UNKNOWN ) /* probably unused */
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, vicdual_state, read_coin_status, nullptr)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(vicdual_state, coin_status_r)
PORT_COIN_DEFAULT
INPUT_PORTS_END
diff --git a/src/mame/drivers/video21.cpp b/src/mame/drivers/video21.cpp
index 3ef2c9a66b7..699f0390d66 100644
--- a/src/mame/drivers/video21.cpp
+++ b/src/mame/drivers/video21.cpp
@@ -45,7 +45,7 @@ public:
{ }
void video21(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(hopper_coinout_r);
+ DECLARE_READ_LINE_MEMBER(hopper_coinout_r);
protected:
virtual void machine_start() override;
@@ -166,7 +166,7 @@ void video21_state::io_map(address_map &map) {
}
-CUSTOM_INPUT_MEMBER(video21_state::hopper_coinout_r)
+READ_LINE_MEMBER(video21_state::hopper_coinout_r)
{
return m_hopper_coin;
}
@@ -203,7 +203,7 @@ static INPUT_PORTS_START( video21 )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_GAMBLE_DEAL ) PORT_NAME("Card")
PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_GAMBLE_STAND ) PORT_NAME("Stop")
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT )
- PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, video21_state, hopper_coinout_r, nullptr)
+ PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(video21_state, hopper_coinout_r)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
PORT_START("IN44")
diff --git a/src/mame/drivers/vii.cpp b/src/mame/drivers/vii.cpp
index 6dc3ee6c4a4..492d8368734 100644
--- a/src/mame/drivers/vii.cpp
+++ b/src/mame/drivers/vii.cpp
@@ -177,8 +177,6 @@ public:
void init_zeus();
void init_zone40();
- DECLARE_CUSTOM_INPUT_MEMBER(i2c_r);
-
protected:
virtual void machine_start() override;
virtual void machine_reset() override;
@@ -251,7 +249,7 @@ public:
void jakks_gkr_mv_i2c(machine_config &config);
void jakks_gkr_wp(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(i2c_gkr_r);
+ DECLARE_READ_LINE_MEMBER(i2c_gkr_r);
private:
virtual void machine_start() override;
@@ -479,12 +477,7 @@ WRITE16_MEMBER(vii_state::vii_portb_w)
}
-CUSTOM_INPUT_MEMBER(spg2xx_game_state::i2c_r)
-{
- return m_i2cmem->read_sda();
-}
-
-CUSTOM_INPUT_MEMBER(jakks_gkr_state::i2c_gkr_r)
+READ_LINE_MEMBER(jakks_gkr_state::i2c_gkr_r)
{
if (m_cart && m_cart->exists())
{
@@ -650,7 +643,7 @@ static INPUT_PORTS_START( walle )
PORT_BIT( 0x0400, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(1) PORT_NAME("B Button")
PORT_START("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, spg2xx_game_state,i2c_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
INPUT_PORTS_END
@@ -663,7 +656,7 @@ static INPUT_PORTS_START( jak_sith_i2c )
PORT_BIT( 0xf3df, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jakks_gkr_state,i2c_gkr_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
@@ -702,7 +695,7 @@ static INPUT_PORTS_START( jak_nm_i2c )
PORT_BIT( 0x0200, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_START("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jakks_gkr_state,i2c_gkr_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
PORT_BIT( 0x0002, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x0004, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
@@ -727,7 +720,7 @@ static INPUT_PORTS_START( jak_wf_i2c )
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jakks_gkr_state,i2c_gkr_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC
@@ -818,7 +811,7 @@ static INPUT_PORTS_START( jak_sdoo_i2c ) // GameKeyReady units had 2 main button
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jakks_gkr_state,i2c_gkr_r, nullptr) // is this correct? doesn't seem to work
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r) // is this correct? doesn't seem to work
PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Unknown ) )
PORT_DIPSETTING( 0x0002, DEF_STR( Off ) )
PORT_DIPSETTING( 0x0000, DEF_STR( On ) )
@@ -869,7 +862,7 @@ static INPUT_PORTS_START( jak_gkr_i2c )
PORT_INCLUDE(jak_gkr)
PORT_MODIFY("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jakks_gkr_state,i2c_gkr_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
INPUT_PORTS_END
static INPUT_PORTS_START( jak_disp_i2c )
@@ -887,7 +880,7 @@ static INPUT_PORTS_START( jak_disp_i2c )
PORT_BIT( 0x001f, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("P3")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, jakks_gkr_state,i2c_gkr_r, nullptr)
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(jakks_gkr_state, i2c_gkr_r)
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN ) // PAL/NTSC flag, set to NTSC (unverified here)
PORT_BIT( 0xfff6, IP_ACTIVE_HIGH, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/viper.cpp b/src/mame/drivers/viper.cpp
index 140a94cfa65..9cce29697d3 100644
--- a/src/mame/drivers/viper.cpp
+++ b/src/mame/drivers/viper.cpp
@@ -382,7 +382,7 @@ public:
m_ds2430_bit_timer(*this, "ds2430_timer2"),
m_workram(*this, "workram"),
m_ds2430_rom(*this, "ds2430"),
- m_io_ports(*this, {"IN0", "IN1", "IN2", "IN3", "IN4", "IN5", "IN6", "IN7"})
+ m_io_ports(*this, "IN%u", 0U)
{
}
@@ -392,7 +392,7 @@ public:
void init_vipercf();
void init_viperhd();
- DECLARE_CUSTOM_INPUT_MEMBER(ds2430_unk_r);
+ DECLARE_READ_LINE_MEMBER(ds2430_unk_r);
private:
DECLARE_READ32_MEMBER(epic_r);
@@ -2132,7 +2132,7 @@ void viper_state::viper_map(address_map &map)
/*****************************************************************************/
-CUSTOM_INPUT_MEMBER(viper_state::ds2430_unk_r)
+READ_LINE_MEMBER(viper_state::ds2430_unk_r)
{
return m_ds2430_unk_status;
}
@@ -2159,7 +2159,7 @@ static INPUT_PORTS_START( viper )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNKNOWN )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, viper_state, ds2430_unk_r, nullptr)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(viper_state, ds2430_unk_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) // if this bit is 0, loads a disk copier instead
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNKNOWN )
diff --git a/src/mame/drivers/wacky_gator.cpp b/src/mame/drivers/wacky_gator.cpp
index 4859b884b5e..47c2331c9fd 100644
--- a/src/mame/drivers/wacky_gator.cpp
+++ b/src/mame/drivers/wacky_gator.cpp
@@ -213,13 +213,13 @@ void wackygtr_state::set_lamps(int p, uint8_t value)
static INPUT_PORTS_START( wackygtr )
PORT_START("IN0")
- PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_rear_sensors_r, nullptr)
+ PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(wackygtr_state, alligators_rear_sensors_r)
PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_SERVICE)
PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_SERVICE1)
PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_COIN1)
PORT_START("IN1")
- PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, wackygtr_state, alligators_front_sensors_r, nullptr)
+ PORT_BIT(0x1f, IP_ACTIVE_LOW, IPT_CUSTOM) PORT_CUSTOM_MEMBER(wackygtr_state, alligators_front_sensors_r)
PORT_DIPNAME( 0xe0, 0x00, DEF_STR( Coin_A ) ) PORT_DIPLOCATION("SW:1,2,3")
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x20, DEF_STR( 1C_1C ) )
diff --git a/src/mame/drivers/wecleman.cpp b/src/mame/drivers/wecleman.cpp
index 53e4233a2c7..09f16c90031 100644
--- a/src/mame/drivers/wecleman.cpp
+++ b/src/mame/drivers/wecleman.cpp
@@ -841,7 +841,7 @@ INPUT_PORTS_END
Hot Chase Input Ports
***************************************************************************/
-CUSTOM_INPUT_MEMBER(wecleman_state::hotchase_sound_status_r)
+READ_LINE_MEMBER(wecleman_state::hotchase_sound_status_r)
{
return m_hotchase_sound_hs;
}
@@ -862,7 +862,7 @@ static INPUT_PORTS_START( hotchase )
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_SERVICE3 ) PORT_NAME("Left SW") // left sw
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_SERVICE4 ) PORT_NAME("Thermo SW") // thermo
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) // from sound cpu
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wecleman_state,hotchase_sound_status_r, nullptr)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(wecleman_state, hotchase_sound_status_r)
PORT_BIT( 0xe0, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_START("DSW2") /* $140015.b */
diff --git a/src/mame/drivers/williams.cpp b/src/mame/drivers/williams.cpp
index a90fbc89e48..f49a1e23239 100644
--- a/src/mame/drivers/williams.cpp
+++ b/src/mame/drivers/williams.cpp
@@ -1338,6 +1338,13 @@ static INPUT_PORTS_START( mysticm )
INPUT_PORTS_END
+template <int P>
+CUSTOM_INPUT_MEMBER(tshoot_state::gun_r)
+{
+ int data = m_gun[P]->read();
+ return (data & 0x3f) ^ ((data & 0x3f) >> 1);
+}
+
static INPUT_PORTS_START( tshoot )
PORT_START("IN1")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Grenade")
@@ -1357,12 +1364,12 @@ static INPUT_PORTS_START( tshoot )
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("INP1")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tshoot_state, gun_r, (uintptr_t)0)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tshoot_state, gun_r<0>)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("Fire")
PORT_START("INP2")
- PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, tshoot_state, gun_r, (uintptr_t)1)
+ PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(tshoot_state, gun_r<1>)
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_START("GUNX")
diff --git a/src/mame/drivers/wmg.cpp b/src/mame/drivers/wmg.cpp
index 030bc82d128..bc5ea81ecab 100644
--- a/src/mame/drivers/wmg.cpp
+++ b/src/mame/drivers/wmg.cpp
@@ -97,7 +97,7 @@ public:
void init_wmg();
- DECLARE_CUSTOM_INPUT_MEMBER(wmg_mux_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(wmg_mux_r);
private:
u8 wmg_nvram_r(offs_t offset);
@@ -179,10 +179,10 @@ void wmg_state::wmg_banked_map(address_map &map)
***************************************************************/
static INPUT_PORTS_START( wmg )
PORT_START("IN0")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wmg_state, wmg_mux_r, "0")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wmg_state, wmg_mux_r<0>)
PORT_START("IN1")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wmg_state, wmg_mux_r, "1")
+ PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(wmg_state, wmg_mux_r<1>)
PORT_START("IN2")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_NAME("Auto Up / Manual Down") PORT_TOGGLE
@@ -465,11 +465,10 @@ WRITE_LINE_MEMBER( wmg_state::wmg_port_select_w )
m_wmg_port_select = state | (m_wmg_c400 << 1);
}
+template <int N>
CUSTOM_INPUT_MEMBER(wmg_state::wmg_mux_r)
{
- const char *port = (const char *)param;
-
- if (port[0] == '0')
+ if (N == 0)
{
uint8_t ports[17] = { 0,0,2,2,5,4,7,7,9,9,11,11,14,13,9,9 };
return m_keyboard[ports[m_wmg_port_select]]->read();
diff --git a/src/mame/drivers/wolfpack.cpp b/src/mame/drivers/wolfpack.cpp
index 611f453464f..21d6d76776d 100644
--- a/src/mame/drivers/wolfpack.cpp
+++ b/src/mame/drivers/wolfpack.cpp
@@ -53,10 +53,10 @@ void wolfpack_state::machine_reset()
}
-CUSTOM_INPUT_MEMBER(wolfpack_state::dial_r)
+template <int Bit>
+READ_LINE_MEMBER(wolfpack_state::dial_r)
{
- int bit = (uintptr_t)param;
- return ((ioport("DIAL")->read() + bit) / 2) & 0x01;
+ return ((ioport("DIAL")->read() + Bit) / 2) & 0x01;
}
@@ -171,8 +171,8 @@ void wolfpack_state::main_map(address_map &map)
static INPUT_PORTS_START( wolfpack )
PORT_START("INPUTS")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state, dial_r, (void *)0) /* dial connects here */
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wolfpack_state, dial_r, (void *)1) /* dial connects here */
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(wolfpack_state, dial_r<0>) // dial connects here
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(wolfpack_state, dial_r<1>) // dial connects here
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_TILT )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_BUTTON1 )
PORT_SERVICE( 0x10, IP_ACTIVE_HIGH )
diff --git a/src/mame/drivers/wwfsstar.cpp b/src/mame/drivers/wwfsstar.cpp
index c7349d1c848..fc4c87dc1cf 100644
--- a/src/mame/drivers/wwfsstar.cpp
+++ b/src/mame/drivers/wwfsstar.cpp
@@ -280,7 +280,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(wwfsstar_state::scanline)
}
}
-CUSTOM_INPUT_MEMBER(wwfsstar_state::vblank_r)
+READ_LINE_MEMBER(wwfsstar_state::vblank_r)
{
return m_vblank;
}
@@ -315,7 +315,7 @@ static INPUT_PORTS_START( wwfsstar )
PORT_BIT( 0x0080, IP_ACTIVE_LOW, IPT_START2 ) PORT_NAME("Button B (1P VS 2P - Buy-in)")
PORT_START("SYSTEM")
- PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, wwfsstar_state, vblank_r, nullptr) /* VBlank */
+ PORT_BIT( 0x0001, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(wwfsstar_state, vblank_r) // VBlank
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_COIN1 )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_COIN2 )
PORT_BIT( 0x0008, IP_ACTIVE_LOW, IPT_SERVICE1 )
diff --git a/src/mame/drivers/xain.cpp b/src/mame/drivers/xain.cpp
index f1e7ba5aa94..85cc2e224d2 100644
--- a/src/mame/drivers/xain.cpp
+++ b/src/mame/drivers/xain.cpp
@@ -245,7 +245,7 @@ WRITE8_MEMBER(xain_state::irqB_clear_w)
m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE);
}
-CUSTOM_INPUT_MEMBER(xain_state::vblank_r)
+READ_LINE_MEMBER(xain_state::vblank_r)
{
return m_vblank;
}
@@ -425,8 +425,8 @@ static INPUT_PORTS_START( xsleena )
PORT_START("VBLANK")
PORT_BIT( 0x03, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_COIN3 )
- PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state, mcu_status_r, nullptr)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xain_state, vblank_r, nullptr) /* VBLANK */
+ PORT_BIT( 0x18, IP_ACTIVE_HIGH, IPT_CUSTOM) PORT_CUSTOM_MEMBER(xain_state, mcu_status_r)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xain_state, vblank_r) // VBLANK
PORT_BIT( 0xc0, IP_ACTIVE_LOW, IPT_UNUSED )
INPUT_PORTS_END
diff --git a/src/mame/drivers/xavix.cpp b/src/mame/drivers/xavix.cpp
index 7132cad5cfe..ffba3abe833 100644
--- a/src/mame/drivers/xavix.cpp
+++ b/src/mame/drivers/xavix.cpp
@@ -543,25 +543,25 @@ static INPUT_PORTS_START( xavix_i2c )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_state,i2c_r, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( ttv_lotr )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_lotr_state,camera_r, nullptr)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_lotr_state,camera_r, nullptr)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_state,i2c_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_i2c_lotr_state, camera_r)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_i2c_lotr_state, camera_r)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( xavix_bowl )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_bowl_state,camera_r, nullptr)
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_bowl_state,camera_r, nullptr)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_state,i2c_r, nullptr)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_i2c_bowl_state, camera_r)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_i2c_bowl_state, camera_r)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( epo_sdb )
@@ -631,7 +631,7 @@ static INPUT_PORTS_START( taikodp )
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_MODIFY("IN1")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_cart_state,i2c_r, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
INPUT_PORTS_END
static INPUT_PORTS_START( jpopira )
@@ -644,7 +644,7 @@ static INPUT_PORTS_START( jpopira )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON4 ) PORT_NAME("Pad 4")
PORT_MODIFY("IN1")
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_i2c_cart_state,i2c_r, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_DEVICE_MEMBER("i2cmem", i2cmem_device, read_sda)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
INPUT_PORTS_END
@@ -671,7 +671,7 @@ INPUT_PORTS_END
*/
-CUSTOM_INPUT_MEMBER( xavix_mtrk_state::mtrk_wheel_r )
+READ_LINE_MEMBER( xavix_mtrk_state::mtrk_wheel_r )
{
return m_wheel->read_direction();
}
@@ -686,7 +686,7 @@ static INPUT_PORTS_START( rad_mtrk )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_NAME("Throttle Low")
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_NAME("Reverse / Back")
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_mtrk_state,mtrk_wheel_r, (void *)0)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_mtrk_state, mtrk_wheel_r)
PORT_MODIFY("IN1")
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_NAME("Horn")
@@ -803,8 +803,8 @@ static INPUT_PORTS_START( ekara )
PORT_INCLUDE(xavix)
PORT_MODIFY("IN1")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_ekara_state,ekara_multi0_r, nullptr)
- PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_ekara_state,ekara_multi1_r, nullptr)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_ekara_state, ekara_multi0_r)
+ PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_ekara_state, ekara_multi1_r)
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
@@ -884,7 +884,7 @@ static INPUT_PORTS_START( popira2 ) // player 2 buttons have heavy latency, prob
PORT_MODIFY("IN1")
PORT_BIT( 0x07, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xavix_popira2_cart_state,i2c_r, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xavix_popira2_cart_state, i2c_r)
PORT_BIT( 0x30, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_POWER_OFF ) PORT_NAME("Power Switch") // pressing this will turn the game off.
PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_UNUSED )
diff --git a/src/mame/drivers/xmen.cpp b/src/mame/drivers/xmen.cpp
index 46c9ef7c47d..ed3b4543eb5 100644
--- a/src/mame/drivers/xmen.cpp
+++ b/src/mame/drivers/xmen.cpp
@@ -223,7 +223,7 @@ static INPUT_PORTS_START( xmen2p )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_er5911_device, cs_write)
INPUT_PORTS_END
-CUSTOM_INPUT_MEMBER(xmen_state::xmen_frame_r)
+READ_LINE_MEMBER(xmen_state::xmen_frame_r)
{
return m_screen->frame_number() & 1;
}
@@ -252,7 +252,7 @@ static INPUT_PORTS_START( xmen6p )
PORT_BIT( 0x1000, IP_ACTIVE_LOW, IPT_START5 ) /* not verified */
PORT_BIT( 0x2000, IP_ACTIVE_LOW, IPT_START6 ) /* not verified */
PORT_SERVICE_NO_TOGGLE( 0x4000, IP_ACTIVE_LOW )
- PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xmen_state,xmen_frame_r, nullptr) /* screen indicator? */
+ PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xmen_state, xmen_frame_r) // screen indicator?
PORT_START( "EEPROMOUT" )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_OUTPUT ) PORT_WRITE_LINE_DEVICE_MEMBER("eeprom", eeprom_serial_er5911_device, di_write)
diff --git a/src/mame/drivers/xxmissio.cpp b/src/mame/drivers/xxmissio.cpp
index fc3d551074a..5d54fc27d26 100644
--- a/src/mame/drivers/xxmissio.cpp
+++ b/src/mame/drivers/xxmissio.cpp
@@ -24,10 +24,10 @@ WRITE8_MEMBER(xxmissio_state::bank_sel_w)
membank("bank1")->set_entry(data & 7);
}
-CUSTOM_INPUT_MEMBER(xxmissio_state::status_r)
+template <int Mask>
+READ_LINE_MEMBER(xxmissio_state::status_r)
{
- int bit_mask = (uintptr_t)param;
- return (m_status & bit_mask) ? 1 : 0;
+ return (m_status & Mask) ? 1 : 0;
}
WRITE8_MEMBER(xxmissio_state::status_m_w)
@@ -208,14 +208,14 @@ static INPUT_PORTS_START( xxmissio )
PORT_DIPUNUSED_DIPLOC( 0x80, 0x80, "SW2:8" ) /* Shown as "Unused" in the manual */
PORT_START("STATUS")
- PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x01)
+ PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x01>)
PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_VBLANK("screen")
- PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x04)
- PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x08)
- PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x10)
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x20)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x40)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, xxmissio_state, status_r, (void *)0x80)
+ PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x04>)
+ PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x08>)
+ PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x10>)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x20>)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x40>)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(xxmissio_state, status_r<0x80>)
INPUT_PORTS_END
/****************************************************************************/
diff --git a/src/mame/drivers/zaxxon.cpp b/src/mame/drivers/zaxxon.cpp
index e97815570a0..694b0a3fdf4 100644
--- a/src/mame/drivers/zaxxon.cpp
+++ b/src/mame/drivers/zaxxon.cpp
@@ -350,24 +350,24 @@ READ8_MEMBER(zaxxon_state::razmataz_counter_r)
}
+template <int Num>
CUSTOM_INPUT_MEMBER(zaxxon_state::razmataz_dial_r)
{
- int num = (uintptr_t)param;
int res;
- int delta = m_dials[num]->read();
+ int delta = m_dials[Num]->read();
if (delta < 0x80)
{
// right
- m_razmataz_dial_pos[num] -= delta;
- res = (m_razmataz_dial_pos[num] << 1) | 1;
+ m_razmataz_dial_pos[Num] -= delta;
+ res = (m_razmataz_dial_pos[Num] << 1) | 1;
}
else
{
// left
- m_razmataz_dial_pos[num] += delta;
- res = (m_razmataz_dial_pos[num] << 1);
+ m_razmataz_dial_pos[Num] += delta;
+ res = (m_razmataz_dial_pos[Num] << 1);
}
return res;
@@ -422,9 +422,10 @@ INPUT_CHANGED_MEMBER(zaxxon_state::zaxxon_coin_inserted)
}
-CUSTOM_INPUT_MEMBER(zaxxon_state::zaxxon_coin_r)
+template <int Num>
+READ_LINE_MEMBER(zaxxon_state::zaxxon_coin_r)
{
- return m_coin_status[(int)(uintptr_t)param];
+ return m_coin_status[Num];
}
@@ -535,9 +536,9 @@ static INPUT_PORTS_START( zaxxon )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)0)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)1)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<0>)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<1>)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<2>)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 0)
@@ -696,7 +697,7 @@ INPUT_PORTS_END
static INPUT_PORTS_START( razmataz )
PORT_START("SW00")
- PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)0)
+ PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(zaxxon_state, razmataz_dial_r<0>)
PORT_START("DIAL.0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(1)
@@ -711,7 +712,7 @@ static INPUT_PORTS_START( razmataz )
PORT_BIT( 0xc0, IP_ACTIVE_HIGH, IPT_UNUSED )
PORT_START("SW08")
- PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)1)
+ PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(zaxxon_state, razmataz_dial_r<1>)
PORT_START("DIAL.1")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_RESET PORT_PLAYER(2)
@@ -724,9 +725,9 @@ static INPUT_PORTS_START( razmataz )
PORT_START("SW100")
PORT_BIT( 0x1f, IP_ACTIVE_HIGH, IPT_UNUSED )
- PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)0)
- PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)1)
- PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_r, (void *)2)
+ PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<0>)
+ PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<1>)
+ PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zaxxon_state, zaxxon_coin_r<2>)
PORT_START("COIN")
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, zaxxon_state,zaxxon_coin_inserted, 0)
@@ -789,7 +790,7 @@ static INPUT_PORTS_START( ixion )
PORT_INCLUDE(zaxxon)
PORT_MODIFY("SW00")
- PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(DEVICE_SELF, zaxxon_state,razmataz_dial_r, (void *)0)
+ PORT_BIT( 0xff, 0x00, IPT_CUSTOM) PORT_CUSTOM_MEMBER(zaxxon_state, razmataz_dial_r<0>)
PORT_START("DIAL.0")
PORT_BIT( 0xff, 0x00, IPT_DIAL ) PORT_SENSITIVITY(30) PORT_KEYDELTA(15) PORT_CODE_DEC(KEYCODE_Z) PORT_CODE_INC(KEYCODE_X) PORT_RESET
diff --git a/src/mame/drivers/zn.cpp b/src/mame/drivers/zn.cpp
index d2fb3176fda..34ac4c77a75 100644
--- a/src/mame/drivers/zn.cpp
+++ b/src/mame/drivers/zn.cpp
@@ -107,7 +107,7 @@ public:
void init_coh1000w();
void init_primrag2();
- DECLARE_CUSTOM_INPUT_MEMBER(jdredd_gun_mux_read);
+ DECLARE_READ_LINE_MEMBER(jdredd_gun_mux_r);
private:
template<int Chip> DECLARE_WRITE_LINE_MEMBER(cat702_dataout) { m_cat702_dataout[Chip] = state; update_sio0_rxd(); }
@@ -2037,7 +2037,7 @@ Notes:
* - Unpopulated DIP42 socket
*/
-CUSTOM_INPUT_MEMBER(zn_state::jdredd_gun_mux_read)
+READ_LINE_MEMBER(zn_state::jdredd_gun_mux_r)
{
return m_jdredd_gun_mux;
}
@@ -2892,7 +2892,7 @@ static INPUT_PORTS_START( jdredd )
PORT_BIT( 0x6f, IP_ACTIVE_LOW, IPT_UNUSED )
PORT_MODIFY("SERVICE")
- PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, zn_state,jdredd_gun_mux_read, nullptr)
+ PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_CUSTOM ) PORT_READ_LINE_MEMBER(zn_state, jdredd_gun_mux_r)
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(1)
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_PLAYER(2)
diff --git a/src/mame/includes/8080bw.h b/src/mame/includes/8080bw.h
index 410afc2e340..fc7317155e9 100644
--- a/src/mame/includes/8080bw.h
+++ b/src/mame/includes/8080bw.h
@@ -80,10 +80,10 @@ public:
void init_attackfc();
void init_invrvnge();
- DECLARE_CUSTOM_INPUT_MEMBER(sflush_80_r);
+ DECLARE_READ_LINE_MEMBER(sflush_80_r);
uint8_t sflush_in0_r();
DECLARE_INPUT_CHANGED_MEMBER(claybust_gun_trigger);
- DECLARE_CUSTOM_INPUT_MEMBER(claybust_gun_on_r);
+ DECLARE_READ_LINE_MEMBER(claybust_gun_on_r);
private:
/* devices/memory pointers */
diff --git a/src/mame/includes/amiga.h b/src/mame/includes/amiga.h
index 971c30fd287..304eba01c44 100644
--- a/src/mame/includes/amiga.h
+++ b/src/mame/includes/amiga.h
@@ -427,7 +427,7 @@ public:
TIMER_CALLBACK_MEMBER( amiga_blitter_proc );
void update_irqs();
- DECLARE_CUSTOM_INPUT_MEMBER( amiga_joystick_convert );
+ template <int P> DECLARE_CUSTOM_INPUT_MEMBER( amiga_joystick_convert );
DECLARE_CUSTOM_INPUT_MEMBER( floppy_drive_status );
DECLARE_WRITE_LINE_MEMBER( m68k_reset );
diff --git a/src/mame/includes/artmagic.h b/src/mame/includes/artmagic.h
index 67aaf477b7d..2256d3ce787 100644
--- a/src/mame/includes/artmagic.h
+++ b/src/mame/includes/artmagic.h
@@ -67,7 +67,7 @@ public:
TMS340X0_TO_SHIFTREG_CB_MEMBER(to_shiftreg);
TMS340X0_FROM_SHIFTREG_CB_MEMBER(from_shiftreg);
TMS340X0_SCANLINE_RGB32_CB_MEMBER(scanline);
- DECLARE_CUSTOM_INPUT_MEMBER(prot_r);
+ DECLARE_READ_LINE_MEMBER(prot_r);
void init_shtstar();
void init_cheesech();
void init_ultennis();
diff --git a/src/mame/includes/asteroid.h b/src/mame/includes/asteroid.h
index 42054d2c125..adb9d2b2f27 100644
--- a/src/mame/includes/asteroid.h
+++ b/src/mame/includes/asteroid.h
@@ -57,7 +57,7 @@ public:
DECLARE_WRITE8_MEMBER(earom_write);
DECLARE_WRITE8_MEMBER(earom_control_w);
- DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
+ DECLARE_READ_LINE_MEMBER(clock_r);
INTERRUPT_GEN_MEMBER(asteroid_interrupt);
INTERRUPT_GEN_MEMBER(asterock_interrupt);
diff --git a/src/mame/includes/astrocde.h b/src/mame/includes/astrocde.h
index 6599ca5d384..8642e16d11b 100644
--- a/src/mame/includes/astrocde.h
+++ b/src/mame/includes/astrocde.h
@@ -159,7 +159,7 @@ public:
virtual void machine_start() override;
DECLARE_WRITE8_MEMBER(votrax_speech_w);
- CUSTOM_INPUT_MEMBER( votrax_speech_status_r );
+ DECLARE_READ_LINE_MEMBER( votrax_speech_status_r );
void astrocade_base(machine_config &config);
void astrocade_16color_base(machine_config &config);
diff --git a/src/mame/includes/btoads.h b/src/mame/includes/btoads.h
index bfbe88dd255..f52d244c833 100644
--- a/src/mame/includes/btoads.h
+++ b/src/mame/includes/btoads.h
@@ -34,8 +34,8 @@ public:
m_tlc34076(*this, "tlc34076"),
m_screen(*this, "screen") { }
- DECLARE_CUSTOM_INPUT_MEMBER( main_to_sound_r );
- DECLARE_CUSTOM_INPUT_MEMBER( sound_to_main_r );
+ DECLARE_READ_LINE_MEMBER( main_to_sound_r );
+ DECLARE_READ_LINE_MEMBER( sound_to_main_r );
void btoads(machine_config &config);
diff --git a/src/mame/includes/bwidow.h b/src/mame/includes/bwidow.h
index bf3148bc548..8484bc6e014 100644
--- a/src/mame/includes/bwidow.h
+++ b/src/mame/includes/bwidow.h
@@ -31,7 +31,8 @@ public:
void bwidow_audio(machine_config &config);
void gravitar_audio(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
+ DECLARE_READ_LINE_MEMBER(clock_r);
+
protected:
DECLARE_READ8_MEMBER(spacduel_IN3_r);
DECLARE_READ8_MEMBER(bwidowp_in_r);
diff --git a/src/mame/includes/bzone.h b/src/mame/includes/bzone.h
index b72ce44ca3a..daba24c6ec1 100644
--- a/src/mame/includes/bzone.h
+++ b/src/mame/includes/bzone.h
@@ -31,7 +31,7 @@ public:
m_startled(*this, "startled")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
+ DECLARE_READ_LINE_MEMBER(clock_r);
void init_bradley();
void bzone(machine_config &config);
diff --git a/src/mame/includes/cave.h b/src/mame/includes/cave.h
index 5420a40b8b8..14cc4ce1b8d 100644
--- a/src/mame/includes/cave.h
+++ b/src/mame/includes/cave.h
@@ -53,8 +53,8 @@ public:
, m_led_outputs(*this, "led%u", 0U)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(korokoro_hopper_r);
- DECLARE_CUSTOM_INPUT_MEMBER(tjumpman_hopper_r);
+ DECLARE_READ_LINE_MEMBER(korokoro_hopper_r);
+ DECLARE_READ_LINE_MEMBER(tjumpman_hopper_r);
void init_uopoko();
void init_donpachi();
diff --git a/src/mame/includes/ccastles.h b/src/mame/includes/ccastles.h
index a9f04bf671a..9cbaad33aa5 100644
--- a/src/mame/includes/ccastles.h
+++ b/src/mame/includes/ccastles.h
@@ -32,7 +32,7 @@ public:
m_palette(*this, "palette")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
+ DECLARE_READ_LINE_MEMBER(vblank_r);
void ccastles(machine_config &config);
protected:
diff --git a/src/mame/includes/champbas.h b/src/mame/includes/champbas.h
index 299ef351881..b6bc976e0b9 100644
--- a/src/mame/includes/champbas.h
+++ b/src/mame/includes/champbas.h
@@ -36,7 +36,7 @@ public:
{
}
- DECLARE_CUSTOM_INPUT_MEMBER(watchdog_bit2);
+ DECLARE_READ_LINE_MEMBER(watchdog_bit2);
void init_champbas();
diff --git a/src/mame/includes/cischeat.h b/src/mame/includes/cischeat.h
index 947392938af..bfbd9d7f94e 100644
--- a/src/mame/includes/cischeat.h
+++ b/src/mame/includes/cischeat.h
@@ -39,17 +39,8 @@ public:
, m_palette(*this, "palette")
, m_soundlatch(*this, "soundlatch")
, m_soundlatch2(*this, "soundlatch2")
- , m_captflag_hopper(*this, "hopper")
- , m_captflag_motor_left(*this, "motor_left")
- , m_captflag_motor_right(*this, "motor_right")
- , m_oki1_bank(*this, "oki1_bank")
- , m_oki2_bank(*this, "oki2_bank")
, m_leds(*this, "led%u", 0U)
- {
- for (int side = 0; side < 2; ++side)
- m_captflag_motor_command[side] = m_captflag_motor_pos[side] = 0;
- m_captflag_leds = 0;
- }
+ {}
DECLARE_WRITE16_MEMBER(scudhamm_motor_command_w);
DECLARE_WRITE16_MEMBER(scudhamm_leds_w);
@@ -105,32 +96,17 @@ public:
void bigrun_draw_sprites(bitmap_ind16 &bitmap , const rectangle &cliprect, int priority1, int priority2);
void cischeat_untangle_sprites(const char *region);
- DECLARE_WRITE16_MEMBER(captflag_motor_command_right_w);
- DECLARE_WRITE16_MEMBER(captflag_motor_command_left_w);
- void captflag_motor_move(int side, uint16_t data);
- DECLARE_CUSTOM_INPUT_MEMBER(captflag_motor_busy_r);
- DECLARE_CUSTOM_INPUT_MEMBER(captflag_motor_pos_r);
- DECLARE_WRITE16_MEMBER(captflag_oki_bank_w);
-
- DECLARE_WRITE16_MEMBER(captflag_leds_w);
-
- void init_captflag();
- TIMER_DEVICE_CALLBACK_MEMBER(captflag_scanline);
void scudhamm(machine_config &config);
void armchmp2(machine_config &config);
void cischeat(machine_config &config);
void f1gpstr2(machine_config &config);
void f1gpstar(machine_config &config);
- void captflag(machine_config &config);
void bigrun(machine_config &config);
void armchmp2_map(address_map &map);
void bigrun_map(address_map &map);
void bigrun_map2(address_map &map);
void bigrun_map3(address_map &map);
void bigrun_sound_map(address_map &map);
- void captflag_map(address_map &map);
- void captflag_oki1_map(address_map &map);
- void captflag_oki2_map(address_map &map);
void cischeat_map(address_map &map);
void cischeat_map2(address_map &map);
void cischeat_map3(address_map &map);
@@ -184,18 +160,6 @@ protected:
optional_device<generic_latch_16_device> m_soundlatch;
optional_device<generic_latch_16_device> m_soundlatch2;
- // captflag
- optional_device<ticket_dispenser_device> m_captflag_hopper;
-
- optional_device<timer_device> m_captflag_motor_left;
- optional_device<timer_device> m_captflag_motor_right;
- uint16_t m_captflag_motor_command[2];
- uint16_t m_captflag_motor_pos[2];
-
- optional_memory_bank m_oki1_bank;
- optional_memory_bank m_oki2_bank;
-
- uint16_t m_captflag_leds;
output_finder<5> m_leds;
};
@@ -218,4 +182,52 @@ private:
uint16_t m_sprite_dma_reg;
};
+class captflag_state : public cischeat_state
+{
+public:
+ captflag_state(const machine_config &mconfig, device_type type, const char *tag)
+ : cischeat_state(mconfig, type, tag)
+ , m_hopper(*this, "hopper")
+ , m_motor_left(*this, "motor_left")
+ , m_motor_right(*this, "motor_right")
+ , m_oki1_bank(*this, "oki1_bank")
+ , m_oki2_bank(*this, "oki2_bank")
+ {
+ for (int side = 0; side < 2; ++side)
+ m_motor_command[side] = m_motor_pos[side] = 0;
+ m_captflag_leds = 0;
+ }
+
+ void captflag(machine_config &config);
+ template <int N> DECLARE_READ_LINE_MEMBER(motor_busy_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(motor_pos_r);
+ void init_captflag();
+
+private:
+ DECLARE_WRITE16_MEMBER(motor_command_right_w);
+ DECLARE_WRITE16_MEMBER(motor_command_left_w);
+ void motor_move(int side, uint16_t data);
+ DECLARE_WRITE16_MEMBER(oki_bank_w);
+
+ DECLARE_WRITE16_MEMBER(leds_w);
+
+ TIMER_DEVICE_CALLBACK_MEMBER(captflag_scanline);
+
+ void captflag_map(address_map &map);
+ void oki1_map(address_map &map);
+ void oki2_map(address_map &map);
+
+ required_device<ticket_dispenser_device> m_hopper;
+
+ required_device<timer_device> m_motor_left;
+ required_device<timer_device> m_motor_right;
+
+ required_memory_bank m_oki1_bank;
+ required_memory_bank m_oki2_bank;
+
+ uint16_t m_captflag_leds;
+ uint16_t m_motor_command[2];
+ uint16_t m_motor_pos[2];
+};
+
#endif
diff --git a/src/mame/includes/cloud9.h b/src/mame/includes/cloud9.h
index 8c9dc970317..bdbafab66c2 100644
--- a/src/mame/includes/cloud9.h
+++ b/src/mame/includes/cloud9.h
@@ -31,7 +31,7 @@ public:
m_videolatch(*this, "videolatch")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(get_vblank);
+ DECLARE_READ_LINE_MEMBER(vblank_r);
void cloud9(machine_config &config);
protected:
diff --git a/src/mame/includes/cop01.h b/src/mame/includes/cop01.h
index d7bd67d3458..76617d41940 100644
--- a/src/mame/includes/cop01.h
+++ b/src/mame/includes/cop01.h
@@ -62,7 +62,7 @@ public:
DECLARE_WRITE8_MEMBER(prot_address_w);
DECLARE_WRITE8_MEMBER(prot_data_w);
DECLARE_READ8_MEMBER(prot_data_r);
- DECLARE_CUSTOM_INPUT_MEMBER(mightguy_area_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(mightguy_area_r);
void init_mightguy();
TILE_GET_INFO_MEMBER(get_bg_tile_info);
TILE_GET_INFO_MEMBER(get_fg_tile_info);
diff --git a/src/mame/includes/dcheese.h b/src/mame/includes/dcheese.h
index 9b93ffada37..a3fa7728da1 100644
--- a/src/mame/includes/dcheese.h
+++ b/src/mame/includes/dcheese.h
@@ -36,8 +36,6 @@ public:
void fredmem(machine_config &config);
void dcheese(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(sound_latch_state_r);
-
protected:
enum
{
diff --git a/src/mame/includes/ddragon.h b/src/mame/includes/ddragon.h
index bf659d5dd82..236744281c9 100644
--- a/src/mame/includes/ddragon.h
+++ b/src/mame/includes/ddragon.h
@@ -55,7 +55,7 @@ public:
void init_ddragon();
void init_ddragon6809();
- DECLARE_CUSTOM_INPUT_MEMBER(subcpu_bus_free);
+ DECLARE_READ_LINE_MEMBER(subcpu_bus_free_r);
protected:
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/ddragon3.h b/src/mame/includes/ddragon3.h
index 686f77c26e5..579d4f51b31 100644
--- a/src/mame/includes/ddragon3.h
+++ b/src/mame/includes/ddragon3.h
@@ -118,7 +118,8 @@ public:
wwfwfest_state(const machine_config &mconfig, device_type type, const char *tag) :
ddragon3_state(mconfig, type, tag),
m_fg0_videoram(*this, "fg0_videoram"),
- m_paletteram(*this, "palette")
+ m_paletteram(*this, "palette"),
+ m_dsw(*this, "DSW%u", 1U)
{
vblank_level = 3;
raster_level = 2;
@@ -127,13 +128,14 @@ public:
void wwfwfest(machine_config &config);
void wwfwfstb(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(dsw_3f_r);
- DECLARE_CUSTOM_INPUT_MEMBER(dsw_c0_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(dsw_3f_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(dsw_c0_r);
private:
/* wwfwfest has an extra layer */
required_shared_ptr<uint16_t> m_fg0_videoram;
required_shared_ptr<uint16_t> m_paletteram;
+ required_ioport_array<2> m_dsw;
tilemap_t *m_fg0_tilemap;
DECLARE_WRITE16_MEMBER(wwfwfest_fg0_videoram_w);
diff --git a/src/mame/includes/eolith.h b/src/mame/includes/eolith.h
index 82e8a035386..27a19b6a9d9 100644
--- a/src/mame/includes/eolith.h
+++ b/src/mame/includes/eolith.h
@@ -38,8 +38,8 @@ public:
void init_landbrka();
void init_landbrkb();
- DECLARE_CUSTOM_INPUT_MEMBER(eolith_speedup_getvblank);
- DECLARE_CUSTOM_INPUT_MEMBER(stealsee_speedup_getvblank);
+ DECLARE_READ_LINE_MEMBER(speedup_vblank_r);
+ DECLARE_READ_LINE_MEMBER(stealsee_speedup_vblank_r);
void speedup_read();
void init_speedup();
diff --git a/src/mame/includes/equites.h b/src/mame/includes/equites.h
index 139b6a1965e..8a98fd8e46f 100644
--- a/src/mame/includes/equites.h
+++ b/src/mame/includes/equites.h
@@ -143,7 +143,7 @@ class gekisou_state : public equites_state
{
public:
using equites_state::equites_state;
- DECLARE_CUSTOM_INPUT_MEMBER(gekisou_unknown_bit_r);
+ DECLARE_READ_LINE_MEMBER(gekisou_unknown_bit_r);
void bngotime(machine_config &config);
void gekisou(machine_config &config);
diff --git a/src/mame/includes/exidy440.h b/src/mame/includes/exidy440.h
index b44409785fe..e5221e525a3 100644
--- a/src/mame/includes/exidy440.h
+++ b/src/mame/includes/exidy440.h
@@ -31,8 +31,8 @@ public:
m_palette(*this, "palette")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(firq_beam_r);
- DECLARE_CUSTOM_INPUT_MEMBER(firq_vblank_r);
+ DECLARE_READ_LINE_MEMBER(firq_beam_r);
+ DECLARE_READ_LINE_MEMBER(firq_vblank_r);
DECLARE_CUSTOM_INPUT_MEMBER(hitnmiss_button1_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_inserted);
void init_showdown();
diff --git a/src/mame/includes/fantland.h b/src/mame/includes/fantland.h
index 3ffd2bd4750..6f7b3c56668 100644
--- a/src/mame/includes/fantland.h
+++ b/src/mame/includes/fantland.h
@@ -22,14 +22,15 @@ public:
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
m_spriteram(*this, "spriteram", 0),
- m_spriteram2(*this, "spriteram2", 0)
+ m_spriteram2(*this, "spriteram2", 0),
+ m_wheel(*this, "WHEEL%u", 0U)
{ }
void fantland(machine_config &config);
void wheelrun(machine_config &config);
void galaxygn(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(wheelrun_wheel_r);
+ template <int Player> DECLARE_CUSTOM_INPUT_MEMBER(wheelrun_wheel_r);
protected:
/* misc */
@@ -47,6 +48,8 @@ protected:
required_shared_ptr<uint8_t> m_spriteram;
required_shared_ptr<uint8_t> m_spriteram2;
+ optional_ioport_array<2> m_wheel;
+
DECLARE_WRITE8_MEMBER(nmi_enable_w);
DECLARE_WRITE8_MEMBER(soundlatch_w);
virtual void machine_start() override;
diff --git a/src/mame/includes/fgoal.h b/src/mame/includes/fgoal.h
index 5dd1ab62fef..b1f7063a411 100644
--- a/src/mame/includes/fgoal.h
+++ b/src/mame/includes/fgoal.h
@@ -24,7 +24,7 @@ public:
void fgoal(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(_80_r);
+ DECLARE_READ_LINE_MEMBER(_80_r);
protected:
enum
diff --git a/src/mame/includes/firetrk.h b/src/mame/includes/firetrk.h
index 447e7cb6e98..9e29dcce7f2 100644
--- a/src/mame/includes/firetrk.h
+++ b/src/mame/includes/firetrk.h
@@ -73,11 +73,11 @@ public:
void montecar(machine_config &config);
void superbug(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(steer_dir_r);
- DECLARE_CUSTOM_INPUT_MEMBER(steer_flag_r);
- DECLARE_CUSTOM_INPUT_MEMBER(skid_r);
- DECLARE_CUSTOM_INPUT_MEMBER(crash_r);
- DECLARE_CUSTOM_INPUT_MEMBER(gear_r);
+ template <int P> DECLARE_READ_LINE_MEMBER(steer_dir_r);
+ template <int P> DECLARE_READ_LINE_MEMBER(steer_flag_r);
+ template <int P> DECLARE_READ_LINE_MEMBER(skid_r);
+ template <int P> DECLARE_READ_LINE_MEMBER(crash_r);
+ template <int P> DECLARE_READ_LINE_MEMBER(gear_r);
DECLARE_INPUT_CHANGED_MEMBER(service_mode_switch_changed);
DECLARE_INPUT_CHANGED_MEMBER(firetrk_horn_changed);
DECLARE_INPUT_CHANGED_MEMBER(gear_changed);
diff --git a/src/mame/includes/fromanc2.h b/src/mame/includes/fromanc2.h
index 627dabf0362..c9ac17a0394 100644
--- a/src/mame/includes/fromanc2.h
+++ b/src/mame/includes/fromanc2.h
@@ -35,9 +35,9 @@ public:
void init_fromanc4();
void init_fromanc2();
- DECLARE_CUSTOM_INPUT_MEMBER(subcpu_int_r);
- DECLARE_CUSTOM_INPUT_MEMBER(sndcpu_nmi_r);
- DECLARE_CUSTOM_INPUT_MEMBER(subcpu_nmi_r);
+ DECLARE_READ_LINE_MEMBER(subcpu_int_r);
+ DECLARE_READ_LINE_MEMBER(sndcpu_nmi_r);
+ DECLARE_READ_LINE_MEMBER(subcpu_nmi_r);
private:
/* memory pointers */
diff --git a/src/mame/includes/gaelco2.h b/src/mame/includes/gaelco2.h
index a4a3de25b8b..e33d05831c3 100644
--- a/src/mame/includes/gaelco2.h
+++ b/src/mame/includes/gaelco2.h
@@ -149,7 +149,7 @@ public:
void wrally2(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(wrally2_analog_bit_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(wrally2_analog_bit_r);
private:
required_ioport m_analog0;
diff --git a/src/mame/includes/gaelco3d.h b/src/mame/includes/gaelco3d.h
index f69298b3653..6d0f4dc8eb4 100644
--- a/src/mame/includes/gaelco3d.h
+++ b/src/mame/includes/gaelco3d.h
@@ -56,8 +56,8 @@ public:
void gaelco3d2(machine_config &config);
void gaelco3d(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(analog_bit_r);
- DECLARE_CUSTOM_INPUT_MEMBER(fp_analog_bit_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(analog_bit_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(fp_analog_bit_r);
private:
virtual void machine_start() override;
diff --git a/src/mame/includes/galastrm.h b/src/mame/includes/galastrm.h
index ebdd626e48b..f7f96a6a8ba 100644
--- a/src/mame/includes/galastrm.h
+++ b/src/mame/includes/galastrm.h
@@ -57,7 +57,7 @@ public:
{ }
void galastrm(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(frame_counter_r);
+ DECLARE_READ_LINE_MEMBER(frame_counter_r);
protected:
virtual void video_start() override;
diff --git a/src/mame/includes/galaxian.h b/src/mame/includes/galaxian.h
index c21573a4123..d8a0a9bf26e 100644
--- a/src/mame/includes/galaxian.h
+++ b/src/mame/includes/galaxian.h
@@ -100,10 +100,9 @@ public:
DECLARE_WRITE8_MEMBER(scramble_background_green_w);
DECLARE_WRITE8_MEMBER(scramble_background_blue_w);
DECLARE_WRITE8_MEMBER(galaxian_gfxbank_w);
- DECLARE_CUSTOM_INPUT_MEMBER(gmgalax_port_r);
- DECLARE_CUSTOM_INPUT_MEMBER(azurian_port_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kingball_muxbit_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kingball_noise_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(azurian_port_r);
+ DECLARE_READ_LINE_MEMBER(kingball_muxbit_r);
+ DECLARE_READ_LINE_MEMBER(kingball_noise_r);
DECLARE_CUSTOM_INPUT_MEMBER(moonwar_dial_r);
DECLARE_WRITE8_MEMBER(irq_enable_w);
DECLARE_WRITE8_MEMBER(start_lamp_w);
@@ -117,7 +116,7 @@ public:
DECLARE_WRITE8_MEMBER(theend_ppi8255_w);
DECLARE_WRITE8_MEMBER(theend_protection_w);
DECLARE_READ8_MEMBER(theend_protection_r);
- DECLARE_CUSTOM_INPUT_MEMBER(theend_protection_alt_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(theend_protection_alt_r);
DECLARE_WRITE8_MEMBER(explorer_sound_control_w);
DECLARE_READ8_MEMBER(sfx_sample_io_r);
DECLARE_WRITE8_MEMBER(sfx_sample_io_w);
@@ -159,7 +158,6 @@ public:
DECLARE_WRITE8_MEMBER(froggeram_ppi8255_w);
DECLARE_WRITE8_MEMBER(artic_gfxbank_w);
DECLARE_READ8_MEMBER(tenspot_dsw_read);
- DECLARE_INPUT_CHANGED_MEMBER(gmgalax_game_changed);
DECLARE_WRITE8_MEMBER(konami_sound_control_w);
DECLARE_READ8_MEMBER(konami_sound_timer_r);
DECLARE_WRITE8_MEMBER(konami_portc_0_w);
@@ -181,7 +179,6 @@ public:
void init_galaxian();
void init_nolock();
void init_azurian();
- void init_gmgalax();
void init_pisces();
void init_batman2();
void init_frogg();
@@ -315,7 +312,6 @@ public:
void pacmanbl(machine_config &config);
void quaak(machine_config &config);
void galaxian(machine_config &config);
- void gmgalax(machine_config &config);
void tenspot(machine_config &config);
void froggers(machine_config &config);
void froggervd(machine_config &config);
@@ -442,7 +438,6 @@ protected:
int m_numspritegens;
int m_counter_74ls161[2];
int m_direction[2];
- uint8_t m_gmgalax_selected_game;
uint8_t m_zigzag_ay8910_latch;
uint8_t m_kingball_speech_dip;
uint8_t m_kingball_sound;
@@ -490,4 +485,26 @@ protected:
void videight_map(address_map &map);
};
+class gmgalax_state : public galaxian_state
+{
+public:
+ gmgalax_state(const machine_config &mconfig, device_type type, const char *tag)
+ : galaxian_state(mconfig, type, tag)
+ , m_glin(*this, "GLIN%u", 0U)
+ , m_gmin(*this, "GMIN%u", 0U)
+ { }
+
+ void gmgalax(machine_config &config);
+
+ DECLARE_INPUT_CHANGED_MEMBER(game_changed);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(port_r);
+
+ void init_gmgalax();
+
+private:
+ uint8_t m_selected_game;
+ required_ioport_array<3> m_glin;
+ required_ioport_array<3> m_gmin;
+};
+
#endif // MAME_INCLUDES_GALAXIAN_H
diff --git a/src/mame/includes/galaxold.h b/src/mame/includes/galaxold.h
index 3a098047430..b0ae0dd4ba8 100644
--- a/src/mame/includes/galaxold.h
+++ b/src/mame/includes/galaxold.h
@@ -156,10 +156,10 @@ public:
DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_2_q_callback);
DECLARE_WRITE_LINE_MEMBER(galaxold_7474_9m_1_callback);
DECLARE_READ8_MEMBER(rescueb_a002_r) { return 0xfc; }
- DECLARE_CUSTOM_INPUT_MEMBER(_4in1_fake_port_r);
- DECLARE_CUSTOM_INPUT_MEMBER(vpool_lives_r);
- DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r);
- DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(_4in1_fake_port_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(vpool_lives_r);
+ template <int Mask> DECLARE_CUSTOM_INPUT_MEMBER(ckongg_coinage_r);
+ template <int Mask> DECLARE_CUSTOM_INPUT_MEMBER(dkongjrm_coinage_r);
void init_bullsdrtg();
void init_ladybugg();
diff --git a/src/mame/includes/gottlieb.h b/src/mame/includes/gottlieb.h
index f0c86f5f0a9..36d6d76411b 100644
--- a/src/mame/includes/gottlieb.h
+++ b/src/mame/includes/gottlieb.h
@@ -69,7 +69,7 @@ public:
void init_qbert();
void init_qbertqub();
- DECLARE_CUSTOM_INPUT_MEMBER(analog_delta_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(track_delta_r);
DECLARE_CUSTOM_INPUT_MEMBER(stooges_joystick_r);
private:
diff --git a/src/mame/includes/homerun.h b/src/mame/includes/homerun.h
index 0b953c267df..d2ffeef345f 100644
--- a/src/mame/includes/homerun.h
+++ b/src/mame/includes/homerun.h
@@ -32,9 +32,9 @@ public:
void dynashot(machine_config &config);
void homerun(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(sprite0_r);
- DECLARE_CUSTOM_INPUT_MEMBER(homerun_d7756_busy_r);
- DECLARE_CUSTOM_INPUT_MEMBER(ganjaja_d7756_busy_r);
+ DECLARE_READ_LINE_MEMBER(sprite0_r);
+ DECLARE_READ_LINE_MEMBER(homerun_d7756_busy_r);
+ DECLARE_READ_LINE_MEMBER(ganjaja_d7756_busy_r);
DECLARE_CUSTOM_INPUT_MEMBER(ganjaja_hopper_status_r);
protected:
diff --git a/src/mame/includes/inufuku.h b/src/mame/includes/inufuku.h
index 6986ee213ba..9c3459be9fd 100644
--- a/src/mame/includes/inufuku.h
+++ b/src/mame/includes/inufuku.h
@@ -28,7 +28,7 @@ public:
void inufuku(machine_config &config);
void _3on3dunk(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(soundflag_r);
+ DECLARE_READ_LINE_MEMBER(soundflag_r);
private:
/* memory pointers */
diff --git a/src/mame/includes/itech32.h b/src/mame/includes/itech32.h
index 0dd727808d0..5db212c2ba3 100644
--- a/src/mame/includes/itech32.h
+++ b/src/mame/includes/itech32.h
@@ -75,7 +75,7 @@ public:
void init_gt3d();
void init_gt3dl();
- DECLARE_CUSTOM_INPUT_MEMBER(special_port_r);
+ DECLARE_READ_LINE_MEMBER(special_port_r);
protected:
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/itech8.h b/src/mame/includes/itech8.h
index 32b889bfe10..13e4ca70bf2 100644
--- a/src/mame/includes/itech8.h
+++ b/src/mame/includes/itech8.h
@@ -34,6 +34,8 @@ public:
m_an(*this, { { "AN_C", "AN_D", "AN_E", "AN_F" } }),
m_fakex(*this, "FAKEX"),
m_fakey(*this, "FAKEY"),
+ m_p1(*this, "P1"),
+ m_p2(*this, "P2"),
m_visarea(0, 0, 0, 0),
m_bankxor(0)
{}
@@ -58,7 +60,7 @@ public:
void init_arligntn();
void init_hstennis();
- DECLARE_CUSTOM_INPUT_MEMBER(special_r);
+ DECLARE_READ_LINE_MEMBER(special_r);
DECLARE_CUSTOM_INPUT_MEMBER(gtg_mux);
protected:
@@ -89,6 +91,8 @@ protected:
optional_ioport_array<4> m_an;
optional_ioport m_fakex;
optional_ioport m_fakey;
+ optional_ioport m_p1;
+ optional_ioport m_p2;
rectangle m_visarea;
diff --git a/src/mame/includes/m92.h b/src/mame/includes/m92.h
index bf057b6c95e..70cfe455663 100644
--- a/src/mame/includes/m92.h
+++ b/src/mame/includes/m92.h
@@ -72,7 +72,7 @@ public:
void init_bank();
- DECLARE_CUSTOM_INPUT_MEMBER(m92_sprite_busy_r);
+ DECLARE_READ_LINE_MEMBER(sprite_busy_r);
private:
required_device<buffered_spriteram16_device> m_spriteram;
diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h
index 37c8f9b2c1e..214020bab22 100644
--- a/src/mame/includes/metro.h
+++ b/src/mame/includes/metro.h
@@ -96,7 +96,7 @@ public:
void init_metro();
void init_lastfortg();
- DECLARE_CUSTOM_INPUT_MEMBER(custom_soundstatus_r);
+ DECLARE_READ_LINE_MEMBER(custom_soundstatus_r);
private:
enum
diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h
index d2653a0def9..de6922bb40d 100644
--- a/src/mame/includes/mhavoc.h
+++ b/src/mame/includes/mhavoc.h
@@ -32,7 +32,9 @@ public:
m_gamma(*this, "gamma"),
m_pokey(*this, "pokey%u", 1U),
m_tms(*this, "tms"),
- m_lamps(*this, "lamp%u", 0U)
+ m_lamps(*this, "lamp%u", 0U),
+ m_coin(*this, "COIN"),
+ m_service(*this, "SERVICE")
{ }
void alphaone(machine_config &config);
@@ -41,13 +43,12 @@ public:
void init_mhavocrv();
- DECLARE_CUSTOM_INPUT_MEMBER(tms5220_r);
- DECLARE_CUSTOM_INPUT_MEMBER(mhavoc_bit67_r);
- DECLARE_CUSTOM_INPUT_MEMBER(gamma_rcvd_r);
- DECLARE_CUSTOM_INPUT_MEMBER(gamma_xmtd_r);
- DECLARE_CUSTOM_INPUT_MEMBER(alpha_rcvd_r);
- DECLARE_CUSTOM_INPUT_MEMBER(alpha_xmtd_r);
- DECLARE_CUSTOM_INPUT_MEMBER(clock_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(coin_service_r);
+ DECLARE_READ_LINE_MEMBER(gamma_rcvd_r);
+ DECLARE_READ_LINE_MEMBER(gamma_xmtd_r);
+ DECLARE_READ_LINE_MEMBER(alpha_rcvd_r);
+ DECLARE_READ_LINE_MEMBER(alpha_xmtd_r);
+ DECLARE_READ_LINE_MEMBER(clock_r);
private:
DECLARE_READ8_MEMBER(dual_pokey_r);
@@ -84,6 +85,9 @@ private:
optional_device_array<pokey_device, 4> m_pokey;
optional_device<tms5220_device> m_tms;
output_finder<2> m_lamps;
+ required_ioport m_coin;
+ required_ioport m_service;
+
uint8_t m_alpha_data;
uint8_t m_alpha_rcvd;
uint8_t m_alpha_xmtd;
diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h
index 96053772ac8..20e802c9d1c 100644
--- a/src/mame/includes/micro3d.h
+++ b/src/mame/includes/micro3d.h
@@ -58,7 +58,7 @@ public:
void init_micro3d();
void init_botss();
- DECLARE_CUSTOM_INPUT_MEMBER(botss_hwchk_r);
+ DECLARE_READ_LINE_MEMBER(botss_hwchk_r);
protected:
enum
diff --git a/src/mame/includes/midyunit.h b/src/mame/includes/midyunit.h
index 9ac1c12b539..7e6b531bd1d 100644
--- a/src/mame/includes/midyunit.h
+++ b/src/mame/includes/midyunit.h
@@ -68,9 +68,9 @@ public:
void init_mkyturbo();
void init_term2la2();
- DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_strobe_r);
+ DECLARE_READ_LINE_MEMBER(narc_talkback_strobe_r);
DECLARE_CUSTOM_INPUT_MEMBER(narc_talkback_data_r);
- DECLARE_CUSTOM_INPUT_MEMBER(adpcm_irq_state_r);
+ DECLARE_READ_LINE_MEMBER(adpcm_irq_state_r);
private:
/* protection data types */
diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h
index 398385c3cb8..c1c4a0fb27e 100644
--- a/src/mame/includes/namcos22.h
+++ b/src/mame/includes/namcos22.h
@@ -533,7 +533,7 @@ public:
void init_alpiner();
void init_alpinesa();
- DECLARE_CUSTOM_INPUT_MEMBER(alpine_motor_read);
+ template <int N> DECLARE_READ_LINE_MEMBER(alpine_motor_r);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h
index 8486f35e6fa..11160f45f98 100644
--- a/src/mame/includes/naomi.h
+++ b/src/mame/includes/naomi.h
@@ -43,7 +43,8 @@ class naomi_state : public dc_state
naomi_state(const machine_config &mconfig, device_type type, const char *tag)
: dc_state(mconfig, type, tag),
m_eeprom(*this, "main_eeprom"),
- m_rombase(*this, "rombase")
+ m_rombase(*this, "rombase"),
+ m_mp(*this, "KEY%u", 1U)
{ }
void naomi_base(machine_config &config);
@@ -66,6 +67,7 @@ class naomi_state : public dc_state
void init_naomi_mp();
DECLARE_CUSTOM_INPUT_MEMBER(naomi_mp_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(suchie3_mp_r);
DECLARE_CUSTOM_INPUT_MEMBER(naomi_kb_r);
DECLARE_INPUT_CHANGED_MEMBER(naomi_mp_w);
@@ -74,6 +76,7 @@ class naomi_state : public dc_state
protected:
required_device<eeprom_serial_93cxx_device> m_eeprom;
optional_shared_ptr<uint64_t> m_rombase;
+ optional_ioport_array<5> m_mp;
DECLARE_MACHINE_RESET(naomi);
diff --git a/src/mame/includes/nbmj8891.h b/src/mame/includes/nbmj8891.h
index b1dd9640600..4896972bad2 100644
--- a/src/mame/includes/nbmj8891.h
+++ b/src/mame/includes/nbmj8891.h
@@ -63,7 +63,7 @@ public:
void init_pairsnb();
void init_mjnanpas();
- DECLARE_CUSTOM_INPUT_MEMBER(nb1413m3_outcoin_flag_r);
+ DECLARE_READ_LINE_MEMBER(nb1413m3_outcoin_flag_r);
private:
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/niyanpai.h b/src/mame/includes/niyanpai.h
index 3f3a73be2ba..aeb56fcf22f 100644
--- a/src/mame/includes/niyanpai.h
+++ b/src/mame/includes/niyanpai.h
@@ -25,7 +25,7 @@ public:
void init_niyanpai();
- DECLARE_CUSTOM_INPUT_MEMBER(musobana_outcoin_flag_r);
+ DECLARE_READ_LINE_MEMBER(musobana_outcoin_flag_r);
private:
enum
diff --git a/src/mame/includes/phoenix.h b/src/mame/includes/phoenix.h
index 05c8dce06cb..45bae1ca4a7 100644
--- a/src/mame/includes/phoenix.h
+++ b/src/mame/includes/phoenix.h
@@ -29,7 +29,7 @@ public:
DECLARE_WRITE8_MEMBER(phoenix_scroll_w);
DECLARE_READ8_MEMBER(survival_input_port_0_r);
DECLARE_CUSTOM_INPUT_MEMBER(player_input_r);
- DECLARE_CUSTOM_INPUT_MEMBER(pleiads_protection_r);
+ DECLARE_READ_LINE_MEMBER(pleiads_protection_r);
void init_oneprom();
void init_coindsw();
void init_oneprom_coindsw();
diff --git a/src/mame/includes/pirates.h b/src/mame/includes/pirates.h
index fc6133d51dc..2a47a3cbb2c 100644
--- a/src/mame/includes/pirates.h
+++ b/src/mame/includes/pirates.h
@@ -32,7 +32,7 @@ public:
void init_pirates();
void init_genix();
- DECLARE_CUSTOM_INPUT_MEMBER(prot_r);
+ DECLARE_READ_LINE_MEMBER(prot_r);
private:
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/playch10.h b/src/mame/includes/playch10.h
index 6a1efd3072b..9c300ce4866 100644
--- a/src/mame/includes/playch10.h
+++ b/src/mame/includes/playch10.h
@@ -52,7 +52,7 @@ public:
void init_pckboard();
void init_pc_hrz();
- DECLARE_CUSTOM_INPUT_MEMBER(pc10_int_detect_r);
+ DECLARE_READ_LINE_MEMBER(int_detect_r);
private:
DECLARE_WRITE_LINE_MEMBER(up8w_w);
diff --git a/src/mame/includes/polepos.h b/src/mame/includes/polepos.h
index 1bf2f37aa84..af7dde9f267 100644
--- a/src/mame/includes/polepos.h
+++ b/src/mame/includes/polepos.h
@@ -40,7 +40,7 @@ public:
m_palette(*this, "palette")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(auto_start_r);
+ DECLARE_READ_LINE_MEMBER(auto_start_r);
void init_polepos2();
diff --git a/src/mame/includes/policetr.h b/src/mame/includes/policetr.h
index 91721667693..4a6cadd1086 100644
--- a/src/mame/includes/policetr.h
+++ b/src/mame/includes/policetr.h
@@ -25,7 +25,7 @@ public:
void driver_init() override;
- DECLARE_CUSTOM_INPUT_MEMBER(bsmt_status_r);
+ DECLARE_READ_LINE_MEMBER(bsmt_status_r);
protected:
policetr_state(const machine_config &mconfig, device_type type, const char *tag, uint32_t speedup_pc, uint32_t speedup_addr) :
diff --git a/src/mame/includes/popeye.h b/src/mame/includes/popeye.h
index 30954700aad..de3d341a735 100644
--- a/src/mame/includes/popeye.h
+++ b/src/mame/includes/popeye.h
@@ -28,8 +28,8 @@ public:
m_color_prom_spr(*this, "sprpal")
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(dsw1_read);
- DECLARE_CUSTOM_INPUT_MEMBER(pop_field_r);
+ DECLARE_READ_LINE_MEMBER(dsw1_read);
+ DECLARE_READ_LINE_MEMBER(pop_field_r);
virtual void config(machine_config &config);
diff --git a/src/mame/includes/psikyo.h b/src/mame/includes/psikyo.h
index 9f9e0815e58..d16e50509ba 100644
--- a/src/mame/includes/psikyo.h
+++ b/src/mame/includes/psikyo.h
@@ -59,8 +59,8 @@ public:
void init_tengai();
void init_gunbird();
- DECLARE_CUSTOM_INPUT_MEMBER(z80_nmi_r);
- DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r);
+ DECLARE_READ_LINE_MEMBER(z80_nmi_r);
+ DECLARE_READ_LINE_MEMBER(mcu_status_r);
private:
/* memory pointers */
diff --git a/src/mame/includes/psikyo4.h b/src/mame/includes/psikyo4.h
index a9540ac5946..f6b0e48f207 100644
--- a/src/mame/includes/psikyo4.h
+++ b/src/mame/includes/psikyo4.h
@@ -37,7 +37,7 @@ public:
void ps4small(machine_config &config);
DECLARE_CUSTOM_INPUT_MEMBER(system_r);
- DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
+ template <int P> DECLARE_CUSTOM_INPUT_MEMBER(mahjong_ctrl_r);
private:
/* memory pointers */
diff --git a/src/mame/includes/scramble.h b/src/mame/includes/scramble.h
index d7a6745d972..a57266e9d2e 100644
--- a/src/mame/includes/scramble.h
+++ b/src/mame/includes/scramble.h
@@ -24,7 +24,8 @@ public:
m_tmsprom(*this, "tmsprom"),
m_soundram(*this, "soundram"),
m_digitalker(*this, "digitalker"),
- m_soundlatch(*this, "soundlatch")
+ m_soundlatch(*this, "soundlatch"),
+ m_dial(*this, "DIAL")
{
}
@@ -36,8 +37,10 @@ public:
optional_device<digitalker_device> m_digitalker;
required_device<generic_latch_8_device> m_soundlatch;
- DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_custom_r);
- DECLARE_CUSTOM_INPUT_MEMBER(ckongs_coinage_r);
+ optional_ioport m_dial;
+
+ DECLARE_CUSTOM_INPUT_MEMBER(darkplnt_dial_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(ckongs_coinage_r);
DECLARE_READ8_MEMBER(hncholms_prot_r);
DECLARE_READ8_MEMBER(scramble_soundram_r);
DECLARE_READ8_MEMBER(mars_ppi8255_0_r);
diff --git a/src/mame/includes/segag80v.h b/src/mame/includes/segag80v.h
index 15c35e03917..ca0430a995f 100644
--- a/src/mame/includes/segag80v.h
+++ b/src/mame/includes/segag80v.h
@@ -45,7 +45,7 @@ public:
void init_spacfury();
DECLARE_INPUT_CHANGED_MEMBER(service_switch);
- DECLARE_CUSTOM_INPUT_MEMBER(elim4_joint_coin_r);
+ DECLARE_READ_LINE_MEMBER(elim4_joint_coin_r);
private:
required_shared_ptr<uint8_t> m_mainram;
diff --git a/src/mame/includes/seibuspi.h b/src/mame/includes/seibuspi.h
index f0ccdc21003..3d31ba14f52 100644
--- a/src/mame/includes/seibuspi.h
+++ b/src/mame/includes/seibuspi.h
@@ -52,7 +52,7 @@ public:
void init_ejanhs();
void init_sys386f();
- DECLARE_CUSTOM_INPUT_MEMBER(ejanhs_encode);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(ejanhs_encode);
IRQ_CALLBACK_MEMBER(spi_irq_callback);
INTERRUPT_GEN_MEMBER(spi_interrupt);
diff --git a/src/mame/includes/snk.h b/src/mame/includes/snk.h
index 928f44eda8f..b37f68e3810 100644
--- a/src/mame/includes/snk.h
+++ b/src/mame/includes/snk.h
@@ -63,13 +63,12 @@ public:
void sgladiat(machine_config &config);
void madcrush(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(marvins_sound_busy);
- DECLARE_CUSTOM_INPUT_MEMBER(snk_sound_busy);
- DECLARE_CUSTOM_INPUT_MEMBER(gwar_rotary);
- DECLARE_CUSTOM_INPUT_MEMBER(gwarb_rotary);
+ DECLARE_READ_LINE_MEMBER(sound_busy_r);
+ template <int Which> DECLARE_CUSTOM_INPUT_MEMBER(gwar_rotary);
+ template <int Which> DECLARE_CUSTOM_INPUT_MEMBER(gwarb_rotary);
DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_x);
DECLARE_CUSTOM_INPUT_MEMBER(countryc_trackball_y);
- DECLARE_CUSTOM_INPUT_MEMBER(snk_bonus_r);
+ template <int Mask> DECLARE_CUSTOM_INPUT_MEMBER(snk_bonus_r);
private:
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/spdodgeb.h b/src/mame/includes/spdodgeb.h
index 9de7b4407bb..2c1e32a5c20 100644
--- a/src/mame/includes/spdodgeb.h
+++ b/src/mame/includes/spdodgeb.h
@@ -36,7 +36,7 @@ public:
void spdodgeb(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(mcu63705_busy_r);
+ DECLARE_READ_LINE_MEMBER(mcu63705_busy_r);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/sprint4.h b/src/mame/includes/sprint4.h
index 802a0db5d88..ee7aa3dbe44 100644
--- a/src/mame/includes/sprint4.h
+++ b/src/mame/includes/sprint4.h
@@ -32,9 +32,9 @@ public:
void sprint4(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(get_lever);
- DECLARE_CUSTOM_INPUT_MEMBER(get_wheel);
- DECLARE_CUSTOM_INPUT_MEMBER(get_collision);
+ template <int N> DECLARE_READ_LINE_MEMBER(lever_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(wheel_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(collision_flipflop_r);
private:
DECLARE_READ8_MEMBER(wram_r);
diff --git a/src/mame/includes/stactics.h b/src/mame/includes/stactics.h
index bb9ed627e85..021300e3936 100644
--- a/src/mame/includes/stactics.h
+++ b/src/mame/includes/stactics.h
@@ -43,10 +43,10 @@ public:
void stactics(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(get_frame_count_d3);
- DECLARE_CUSTOM_INPUT_MEMBER(get_shot_standby);
- DECLARE_CUSTOM_INPUT_MEMBER(get_not_shot_arrive);
- DECLARE_CUSTOM_INPUT_MEMBER(get_motor_not_ready);
+ DECLARE_READ_LINE_MEMBER(frame_count_d3_r);
+ DECLARE_READ_LINE_MEMBER(shot_standby_r);
+ DECLARE_READ_LINE_MEMBER(not_shot_arrive_r);
+ DECLARE_READ_LINE_MEMBER(motor_not_ready_r);
DECLARE_CUSTOM_INPUT_MEMBER(get_rng);
private:
diff --git a/src/mame/includes/starwars.h b/src/mame/includes/starwars.h
index 7177faab06d..ec1cd37a17b 100644
--- a/src/mame/includes/starwars.h
+++ b/src/mame/includes/starwars.h
@@ -41,7 +41,7 @@ public:
void init_esb();
void init_starwars();
- DECLARE_CUSTOM_INPUT_MEMBER(matrix_flag_r);
+ DECLARE_READ_LINE_MEMBER(matrix_flag_r);
private:
required_device<generic_latch_8_device> m_soundlatch;
diff --git a/src/mame/includes/superqix.h b/src/mame/includes/superqix.h
index deea3f3b15b..1a44b4639c4 100644
--- a/src/mame/includes/superqix.h
+++ b/src/mame/includes/superqix.h
@@ -93,8 +93,8 @@ public:
void sqix_8031(machine_config &config);
void sqix_nomcu(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(fromz80_semaphore_input_r);
- DECLARE_CUSTOM_INPUT_MEMBER(frommcu_semaphore_input_r);
+ DECLARE_READ_LINE_MEMBER(fromz80_semaphore_input_r);
+ DECLARE_READ_LINE_MEMBER(frommcu_semaphore_input_r);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/suprnova.h b/src/mame/includes/suprnova.h
index cd64317a0c1..be618fb2d57 100644
--- a/src/mame/includes/suprnova.h
+++ b/src/mame/includes/suprnova.h
@@ -45,7 +45,9 @@ public:
m_palette_ram(*this, "palette_ram"),
m_v3t_ram(*this, "v3t_ram"),
m_main_ram(*this, "main_ram"),
- m_cache_ram(*this, "cache_ram") { }
+ m_cache_ram(*this, "cache_ram"),
+ m_paddle(*this, "Paddle %c", 'A')
+ { }
void sknsk(machine_config &config);
void sknsu(machine_config &config);
@@ -74,7 +76,7 @@ public:
void init_galpani4();
void init_ryouran();
- DECLARE_CUSTOM_INPUT_MEMBER(paddle_r);
+ template <int P> DECLARE_CUSTOM_INPUT_MEMBER(paddle_r);
private:
required_device<sh2_device> m_maincpu;
@@ -94,6 +96,8 @@ private:
required_shared_ptr<uint32_t> m_main_ram;
required_shared_ptr<uint32_t> m_cache_ram;
+ optional_ioport_array<4> m_paddle;
+
hit_t m_hit;
bitmap_ind16 m_sprite_bitmap;
bitmap_ind16 m_tilemap_bitmap_lower;
diff --git a/src/mame/includes/tail2nos.h b/src/mame/includes/tail2nos.h
index 78d013b8838..bdd610799c0 100644
--- a/src/mame/includes/tail2nos.h
+++ b/src/mame/includes/tail2nos.h
@@ -30,12 +30,13 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_palette(*this, "palette"),
m_soundlatch(*this, "soundlatch"),
- m_acia(*this, "acia")
+ m_acia(*this, "acia"),
+ m_analog(*this, "AN%u", 0U)
{ }
void tail2nos(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r);
+ template <int N> DECLARE_CUSTOM_INPUT_MEMBER(analog_in_r);
protected:
virtual void machine_start() override;
@@ -63,6 +64,7 @@ private:
required_device<palette_device> m_palette;
required_device<generic_latch_8_device> m_soundlatch;
required_device<acia6850_device> m_acia;
+ required_ioport_array<2> m_analog;
DECLARE_WRITE16_MEMBER(tail2nos_txvideoram_w);
DECLARE_WRITE16_MEMBER(tail2nos_zoomdata_w);
diff --git a/src/mame/includes/taito_f3.h b/src/mame/includes/taito_f3.h
index 2b2cb2758c0..6bdd37be8eb 100644
--- a/src/mame/includes/taito_f3.h
+++ b/src/mame/includes/taito_f3.h
@@ -132,8 +132,8 @@ public:
void init_scfinals();
void init_pbobbl2x();
- DECLARE_CUSTOM_INPUT_MEMBER(f3_analog_r);
- DECLARE_CUSTOM_INPUT_MEMBER(f3_coin_r);
+ template <int Num> DECLARE_CUSTOM_INPUT_MEMBER(f3_analog_r);
+ template <int Num> DECLARE_CUSTOM_INPUT_MEMBER(f3_coin_r);
DECLARE_CUSTOM_INPUT_MEMBER(eeprom_read);
protected:
diff --git a/src/mame/includes/taito_z.h b/src/mame/includes/taito_z.h
index 8787fe44e62..488192463ff 100644
--- a/src/mame/includes/taito_z.h
+++ b/src/mame/includes/taito_z.h
@@ -43,12 +43,15 @@ public:
m_tc0140syt(*this, "tc0140syt"),
m_gfxdecode(*this, "gfxdecode"),
m_filter(*this, {"2610.1.r", "2610.1.l", "2610.2.r", "2610.2.l"}),
+ m_gas(*this, "GAS"),
+ m_brake(*this, "BRAKE"),
m_steer(*this, "STEER"),
m_io_eepromout(*this, "EEPROMOUT"),
m_lamps(*this, "lamp%u", 0U)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(taitoz_pedal_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(gas_pedal_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(brake_pedal_r);
void bshark_base(machine_config &config);
void sci(machine_config &config);
@@ -108,6 +111,8 @@ private:
optional_device<tc0140syt_device> m_tc0140syt; // bshark & spacegun miss the CPUs which shall use TC0140
required_device<gfxdecode_device> m_gfxdecode;
optional_device_array<filter_volume_device, 4> m_filter;
+ optional_ioport m_gas;
+ optional_ioport m_brake;
optional_ioport m_steer;
optional_ioport m_io_eepromout;
output_finder<2> m_lamps;
diff --git a/src/mame/includes/taitosj.h b/src/mame/includes/taitosj.h
index 4736857f79d..56a1de866a7 100644
--- a/src/mame/includes/taitosj.h
+++ b/src/mame/includes/taitosj.h
@@ -58,7 +58,7 @@ public:
void init_spacecr();
DECLARE_CUSTOM_INPUT_MEMBER(input_port_4_f0_r);
- DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r);
+ template <int Player> DECLARE_CUSTOM_INPUT_MEMBER(kikstart_gear_r);
private:
required_shared_ptr<uint8_t> m_videoram_1;
diff --git a/src/mame/includes/timeplt.h b/src/mame/includes/timeplt.h
index 97e64a6a347..32f04cb2927 100644
--- a/src/mame/includes/timeplt.h
+++ b/src/mame/includes/timeplt.h
@@ -38,7 +38,7 @@ public:
void psurge(machine_config &config);
void bikkuric(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(chkun_hopper_status_r);
+ DECLARE_READ_LINE_MEMBER(chkun_hopper_status_r);
private:
required_device<cpu_device> m_maincpu;
diff --git a/src/mame/includes/toaplan2.h b/src/mame/includes/toaplan2.h
index 604b759c489..5144fb0aee9 100644
--- a/src/mame/includes/toaplan2.h
+++ b/src/mame/includes/toaplan2.h
@@ -86,7 +86,7 @@ public:
void init_batrider();
void init_enmadaio();
- DECLARE_CUSTOM_INPUT_MEMBER(c2map_r);
+ DECLARE_READ_LINE_MEMBER(c2map_r);
protected:
virtual void device_post_load() override;
diff --git a/src/mame/includes/topspeed.h b/src/mame/includes/topspeed.h
index f6b554850c3..6a5c418df73 100644
--- a/src/mame/includes/topspeed.h
+++ b/src/mame/includes/topspeed.h
@@ -36,13 +36,16 @@ public:
, m_filter2(*this, "filter2")
, m_filter3(*this, "filter3")
, m_gfxdecode(*this, "gfxdecode")
+ , m_gas(*this, "GAS")
+ , m_brake(*this, "BRAKE")
, m_steer(*this, "STEER")
, m_msm_rom(*this, "adpcm_%u", 0U)
{ }
void topspeed(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(pedal_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(gas_pedal_r);
+ DECLARE_CUSTOM_INPUT_MEMBER(brake_pedal_r);
protected:
virtual void machine_start() override;
@@ -66,6 +69,8 @@ private:
required_device<filter_volume_device> m_filter2;
required_device<filter_volume_device> m_filter3;
required_device<gfxdecode_device> m_gfxdecode;
+ required_ioport m_gas;
+ required_ioport m_brake;
required_ioport m_steer;
// Misc
diff --git a/src/mame/includes/ultratnk.h b/src/mame/includes/ultratnk.h
index 8c2943e1f58..49078cba7ad 100644
--- a/src/mame/includes/ultratnk.h
+++ b/src/mame/includes/ultratnk.h
@@ -27,11 +27,12 @@ public:
m_gfxdecode(*this, "gfxdecode"),
m_screen(*this, "screen"),
m_palette(*this, "palette"),
- m_videoram(*this, "videoram")
+ m_videoram(*this, "videoram"),
+ m_joy(*this, "JOY-%c", 'W')
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(get_collision);
- DECLARE_CUSTOM_INPUT_MEMBER(get_joystick);
+ template <int N> DECLARE_READ_LINE_MEMBER(collision_flipflop_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(joystick_r);
void ultratnk(machine_config &config);
protected:
@@ -75,6 +76,8 @@ protected:
required_shared_ptr<uint8_t> m_videoram;
+ required_ioport_array<4> m_joy;
+
int m_da_latch;
int m_collision[4];
tilemap_t* m_playfield;
diff --git a/src/mame/includes/vicdual.h b/src/mame/includes/vicdual.h
index 0a453acdba8..2be56d113ec 100644
--- a/src/mame/includes/vicdual.h
+++ b/src/mame/includes/vicdual.h
@@ -72,13 +72,13 @@ public:
void tranqgun(machine_config &config);
void tranqgun_audio(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(read_coin_status);
- DECLARE_CUSTOM_INPUT_MEMBER(get_64v);
- DECLARE_CUSTOM_INPUT_MEMBER(get_vblank_comp);
- DECLARE_CUSTOM_INPUT_MEMBER(get_composite_blank_comp);
- DECLARE_CUSTOM_INPUT_MEMBER(get_timer_value);
- DECLARE_CUSTOM_INPUT_MEMBER(fake_lives_r);
- DECLARE_CUSTOM_INPUT_MEMBER(samurai_protection_r);
+ DECLARE_READ_LINE_MEMBER(coin_status_r);
+ DECLARE_READ_LINE_MEMBER(get_64v);
+ DECLARE_READ_LINE_MEMBER(vblank_comp_r);
+ DECLARE_READ_LINE_MEMBER(cblank_comp_r);
+ DECLARE_READ_LINE_MEMBER(timer_value_r);
+ template <int Param> DECLARE_READ_LINE_MEMBER(fake_lives_r);
+ template <int N> DECLARE_READ_LINE_MEMBER(samurai_protection_r);
DECLARE_INPUT_CHANGED_MEMBER(coin_changed);
protected:
diff --git a/src/mame/includes/wecleman.h b/src/mame/includes/wecleman.h
index a6625413b96..6b9fb170249 100644
--- a/src/mame/includes/wecleman.h
+++ b/src/mame/includes/wecleman.h
@@ -43,7 +43,7 @@ public:
void init_wecleman();
void init_hotchase();
- DECLARE_CUSTOM_INPUT_MEMBER(hotchase_sound_status_r);
+ DECLARE_READ_LINE_MEMBER(hotchase_sound_status_r);
private:
enum
diff --git a/src/mame/includes/williams.h b/src/mame/includes/williams.h
index f574732ea73..1a8d2c7d9f2 100644
--- a/src/mame/includes/williams.h
+++ b/src/mame/includes/williams.h
@@ -287,7 +287,7 @@ public:
void tshoot(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(gun_r);
+ template <int P> DECLARE_CUSTOM_INPUT_MEMBER(gun_r);
private:
DECLARE_WRITE_LINE_MEMBER(maxvol_w);
diff --git a/src/mame/includes/wolfpack.h b/src/mame/includes/wolfpack.h
index ecccb0c69f4..52d09e7e6e7 100644
--- a/src/mame/includes/wolfpack.h
+++ b/src/mame/includes/wolfpack.h
@@ -30,7 +30,7 @@ public:
void wolfpack(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(dial_r);
+ template <int Bit> DECLARE_READ_LINE_MEMBER(dial_r);
private:
enum
diff --git a/src/mame/includes/wwfsstar.h b/src/mame/includes/wwfsstar.h
index 7372e9385af..94c813f0bf1 100644
--- a/src/mame/includes/wwfsstar.h
+++ b/src/mame/includes/wwfsstar.h
@@ -29,7 +29,7 @@ public:
void wwfsstar(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(vblank_r);
+ DECLARE_READ_LINE_MEMBER(vblank_r);
protected:
virtual void video_start() override;
diff --git a/src/mame/includes/xain.h b/src/mame/includes/xain.h
index 55b91e03d9c..0e87f3701d2 100644
--- a/src/mame/includes/xain.h
+++ b/src/mame/includes/xain.h
@@ -38,7 +38,7 @@ public:
void xsleena(machine_config &config);
void xsleenab(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(vblank_r);
+ DECLARE_READ_LINE_MEMBER(vblank_r);
DECLARE_CUSTOM_INPUT_MEMBER(mcu_status_r);
protected:
diff --git a/src/mame/includes/xavix.h b/src/mame/includes/xavix.h
index 3f60c7ce8b7..b9074189bd1 100644
--- a/src/mame/includes/xavix.h
+++ b/src/mame/includes/xavix.h
@@ -643,8 +643,6 @@ public:
hackaddress2 = 0x8524;
}
- DECLARE_CUSTOM_INPUT_MEMBER(i2c_r);
-
protected:
virtual void write_io1(uint8_t data, uint8_t direction) override;
@@ -701,7 +699,7 @@ public:
: xavix_i2c_state(mconfig, type, tag)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(camera_r);
+ DECLARE_READ_LINE_MEMBER(camera_r);
protected:
//virtual void write_io1(uint8_t data, uint8_t direction) override;
@@ -714,7 +712,7 @@ public:
: xavix_i2c_state(mconfig, type, tag)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(camera_r);
+ DECLARE_READ_LINE_MEMBER(camera_r);
};
@@ -730,7 +728,7 @@ public:
void xavix_mtrk(machine_config &config);
void xavix_mtrkp(machine_config &config);
- CUSTOM_INPUT_MEMBER( mtrk_wheel_r );
+ DECLARE_READ_LINE_MEMBER( mtrk_wheel_r );
protected:
required_device<xavix_mtrk_wheel_device> m_wheel;
@@ -939,8 +937,6 @@ public:
void xavix_i2c_taiko(machine_config &config);
void xavix_i2c_jpopira(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(i2c_r);
-
protected:
virtual void write_io1(uint8_t data, uint8_t direction) override;
@@ -957,7 +953,7 @@ public:
void xavix_cart_popira2(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(i2c_r);
+ DECLARE_READ_LINE_MEMBER(i2c_r);
protected:
virtual void write_io1(uint8_t data, uint8_t direction) override;
@@ -981,8 +977,8 @@ public:
m_extraiowrite(0)
{ }
- DECLARE_CUSTOM_INPUT_MEMBER(ekara_multi0_r);
- DECLARE_CUSTOM_INPUT_MEMBER(ekara_multi1_r);
+ DECLARE_READ_LINE_MEMBER(ekara_multi0_r);
+ DECLARE_READ_LINE_MEMBER(ekara_multi1_r);
// void xavix_ekara(machine_config &config);
diff --git a/src/mame/includes/xmen.h b/src/mame/includes/xmen.h
index 53700d05ee8..1f7529c0c0d 100644
--- a/src/mame/includes/xmen.h
+++ b/src/mame/includes/xmen.h
@@ -38,7 +38,7 @@ public:
void xmen(machine_config &config);
void xmen6p(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(xmen_frame_r);
+ DECLARE_READ_LINE_MEMBER(xmen_frame_r);
private:
/* video-related */
diff --git a/src/mame/includes/xxmissio.h b/src/mame/includes/xxmissio.h
index 5dcbbc64c65..604a18a1893 100644
--- a/src/mame/includes/xxmissio.h
+++ b/src/mame/includes/xxmissio.h
@@ -24,7 +24,7 @@ public:
void xxmissio(machine_config &config);
- DECLARE_CUSTOM_INPUT_MEMBER(status_r);
+ template <int Mask> DECLARE_READ_LINE_MEMBER(status_r);
protected:
virtual void machine_start() override;
diff --git a/src/mame/includes/zaxxon.h b/src/mame/includes/zaxxon.h
index 5a0e113ff8d..0754acac279 100644
--- a/src/mame/includes/zaxxon.h
+++ b/src/mame/includes/zaxxon.h
@@ -48,8 +48,8 @@ public:
void init_razmataz();
void init_zaxxonj();
- DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r);
- DECLARE_CUSTOM_INPUT_MEMBER(zaxxon_coin_r);
+ template <int Num> DECLARE_CUSTOM_INPUT_MEMBER(razmataz_dial_r);
+ template <int Num> DECLARE_READ_LINE_MEMBER(zaxxon_coin_r);
DECLARE_INPUT_CHANGED_MEMBER(service_switch);
DECLARE_INPUT_CHANGED_MEMBER(zaxxon_coin_inserted);
diff --git a/src/mame/machine/amiga.cpp b/src/mame/machine/amiga.cpp
index 70ed2ff292c..74e26418e78 100644
--- a/src/mame/machine/amiga.cpp
+++ b/src/mame/machine/amiga.cpp
@@ -413,21 +413,6 @@ uint16_t amiga_state::joy1dat_r()
return (m_p2_mouse_y.read_safe(0xff) << 8) | m_p2_mouse_x.read_safe(0xff);
}
-CUSTOM_INPUT_MEMBER( amiga_state::amiga_joystick_convert )
-{
- uint8_t bits = m_joy_ports[(int)(uintptr_t)param].read_safe(0xff);
-
- int up = (bits >> 0) & 1;
- int down = (bits >> 1) & 1;
- int left = (bits >> 2) & 1;
- int right = (bits >> 3) & 1;
-
- if (left) up ^= 1;
- if (right) down ^= 1;
-
- return down | (right << 1) | (up << 8) | (left << 9);
-}
-
/*************************************
diff --git a/src/mame/machine/gaelco2.cpp b/src/mame/machine/gaelco2.cpp
index 99afde75ec8..4e206995643 100644
--- a/src/mame/machine/gaelco2.cpp
+++ b/src/mame/machine/gaelco2.cpp
@@ -252,51 +252,6 @@ TIMER_DEVICE_CALLBACK_MEMBER(bang_state::bang_irq)
/***************************************************************************
- World Rally 2 analog controls
- - added by Mirko Mattioli <els@fastwebnet.it>
- ---------------------------------------------------------------
- WR2 pcb has two ADC, one for each player. The ADCs have in common
- the clock signal line (adc_clk) and the chip enable signal line
- (adc_cs) and, of course, two different data out signal lines.
- When "Pot Wheel" option is selected via dip-switch, then the gear
- is enabled (low/high shifter); the gear is disabled in joy mode by
- the CPU program code. No brakes are present in this game.
- Analog controls routines come from modified code wrote by Aaron
- Giles for gaelco3d driver.
-
-***************************************************************************/
-
-
-CUSTOM_INPUT_MEMBER(wrally2_state::wrally2_analog_bit_r)
-{
- int which = (uintptr_t)param;
- return (m_analog_ports[which] >> 7) & 0x01;
-}
-
-
-WRITE_LINE_MEMBER(wrally2_state::wrally2_adc_clk)
-{
- /* a zero/one combo is written here to clock the next analog port bit */
- if (!state)
- {
- m_analog_ports[0] <<= 1;
- m_analog_ports[1] <<= 1;
- }
-}
-
-
-WRITE_LINE_MEMBER(wrally2_state::wrally2_adc_cs)
-{
- /* a zero is written here to read the analog ports, and a one is written when finished */
- if (!state)
- {
- m_analog_ports[0] = m_analog0->read();
- m_analog_ports[1] = m_analog1->read();
- }
-}
-
-/***************************************************************************
-
Protection
***************************************************************************/
diff --git a/src/mame/machine/galaxold.cpp b/src/mame/machine/galaxold.cpp
index 488ec27dd8d..c94628c1427 100644
--- a/src/mame/machine/galaxold.cpp
+++ b/src/mame/machine/galaxold.cpp
@@ -142,14 +142,6 @@ WRITE8_MEMBER(galaxold_state::_4in1_bank_w)
membank("bank1")->set_entry(m__4in1_bank);
}
-CUSTOM_INPUT_MEMBER(galaxold_state::_4in1_fake_port_r)
-{
- static const char *const portnames[] = { "FAKE1", "FAKE2", "FAKE3", "FAKE4" };
- int bit_mask = (uintptr_t)param;
-
- return (ioport(portnames[m__4in1_bank])->read() & bit_mask) ? 0x01 : 0x00;
-}
-
void galaxold_state::init_4in1()
{
address_space &space = m_maincpu->space(AS_PROGRAM);
diff --git a/src/mame/machine/mhavoc.cpp b/src/mame/machine/mhavoc.cpp
index 69f341fd71a..65e9a99a3a6 100644
--- a/src/mame/machine/mhavoc.cpp
+++ b/src/mame/machine/mhavoc.cpp
@@ -204,37 +204,30 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_rom_banksel_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(mhavoc_state::tms5220_r)
+CUSTOM_INPUT_MEMBER(mhavoc_state::coin_service_r)
{
- return m_tms->readyq_r() ? 1 : 0;
+ return (m_player_1 ? m_service : m_coin)->read() & 0x03;
}
-CUSTOM_INPUT_MEMBER(mhavoc_state::mhavoc_bit67_r)
-{
- const char *tag1 = (const char *)param;
- const char *tag2 = tag1 + strlen(tag1) + 1;
- return ioport(m_player_1 ? tag2 : tag1)->read() & 0x03;
-}
-
-CUSTOM_INPUT_MEMBER(mhavoc_state::gamma_rcvd_r)
+READ_LINE_MEMBER(mhavoc_state::gamma_rcvd_r)
{
/* Gamma rcvd flag */
return m_gamma_rcvd;
}
-CUSTOM_INPUT_MEMBER(mhavoc_state::gamma_xmtd_r)
+READ_LINE_MEMBER(mhavoc_state::gamma_xmtd_r)
{
/* Gamma xmtd flag */
return m_gamma_xmtd;
}
-CUSTOM_INPUT_MEMBER(mhavoc_state::alpha_rcvd_r)
+READ_LINE_MEMBER(mhavoc_state::alpha_rcvd_r)
{
/* Alpha rcvd flag */
return (m_has_gamma_cpu && m_alpha_rcvd);
}
-CUSTOM_INPUT_MEMBER(mhavoc_state::alpha_xmtd_r)
+READ_LINE_MEMBER(mhavoc_state::alpha_xmtd_r)
{
/* Alpha xmtd flag */
return (m_has_gamma_cpu && m_alpha_xmtd);
diff --git a/src/mame/machine/micro3d.cpp b/src/mame/machine/micro3d.cpp
index 4d1c52ddbec..1eb182ea07f 100644
--- a/src/mame/machine/micro3d.cpp
+++ b/src/mame/machine/micro3d.cpp
@@ -370,7 +370,7 @@ READ8_MEMBER( micro3d_state::adc_volume_r )
return (uint8_t)((255.0/100.0) * m_volume->read() + 0.5);
}
-CUSTOM_INPUT_MEMBER(micro3d_state::botss_hwchk_r)
+READ_LINE_MEMBER(micro3d_state::botss_hwchk_r)
{
return m_botss_latch;
}
diff --git a/src/mame/machine/naomi.cpp b/src/mame/machine/naomi.cpp
index e4ecf881d6a..4d1f2ddfd6a 100644
--- a/src/mame/machine/naomi.cpp
+++ b/src/mame/machine/naomi.cpp
@@ -232,18 +232,34 @@ INPUT_CHANGED_MEMBER(naomi_state::naomi_mp_w)
CUSTOM_INPUT_MEMBER(naomi_state::naomi_mp_r)
{
- const char *tagptr = (const char *)param;
uint8_t retval = 0;
- for (int i = 0x80; i >= 0x08; i >>= 1)
+ int port = 0;
+ for (int i = 0x80; i >= 0x08; i >>= 1, port++)
+ {
+ if (m_mp_mux & i)
+ retval |= m_mp[port].read_safe(0);
+ }
+ return retval;
+}
+
+CUSTOM_INPUT_MEMBER(naomi_state::suchie3_mp_r)
+{
+ uint8_t retval = 0;
+
+ int port = 0;
+ for (int i = 0x80; i >= 0x08; i >>= 1, port++)
{
if (m_mp_mux & i)
{
- ioport_port *port = ioport(tagptr);
- if (port != nullptr)
- retval |= port->read();
+ // KEY1 and KEY5 are swapped
+ if (port == 0)
+ retval |= m_mp[4].read_safe(0);
+ else if (port == 4)
+ retval |= m_mp[0].read_safe(0);
+ else
+ retval |= m_mp[port].read_safe(0);
}
- tagptr += strlen(tagptr) + 1;
}
return retval;
}
@@ -251,7 +267,6 @@ CUSTOM_INPUT_MEMBER(naomi_state::naomi_mp_r)
CUSTOM_INPUT_MEMBER(naomi_state::naomi_kb_r)
{
// TODO: player 2 input reading
-// const int *tagptr = (const int *)param;
uint8_t retval = 0;
static const char *const keynames[] =
{
diff --git a/src/mame/machine/playch10.cpp b/src/mame/machine/playch10.cpp
index 80f67f75444..d38a4fc87f1 100644
--- a/src/mame/machine/playch10.cpp
+++ b/src/mame/machine/playch10.cpp
@@ -79,7 +79,7 @@ MACHINE_START_MEMBER(playch10_state,playch10_hboard)
*
*************************************/
-CUSTOM_INPUT_MEMBER(playch10_state::pc10_int_detect_r)
+READ_LINE_MEMBER(playch10_state::int_detect_r)
{
return ~m_pc10_int_detect & 1;
}
diff --git a/src/mame/machine/scramble.cpp b/src/mame/machine/scramble.cpp
index 1ba4da7f7c0..0bf08f83f78 100644
--- a/src/mame/machine/scramble.cpp
+++ b/src/mame/machine/scramble.cpp
@@ -32,7 +32,7 @@ MACHINE_RESET_MEMBER(scramble_state,explorer)
}
-CUSTOM_INPUT_MEMBER(scramble_state::darkplnt_custom_r)
+CUSTOM_INPUT_MEMBER(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,
@@ -42,7 +42,7 @@ CUSTOM_INPUT_MEMBER(scramble_state::darkplnt_custom_r)
0x2b, 0x2a, 0x28, 0x29, 0x09, 0x08, 0x0a, 0x0b,
0x0f, 0x0e, 0x0c, 0x0d, 0x2d, 0x2c, 0x2e, 0x2f,
0x27, 0x26, 0x24, 0x25, 0x05, 0x04, 0x06, 0x07 };
- uint8_t val = ioport((const char *)param)->read();
+ uint8_t val = m_dial->read();
return remap[val >> 2];
}
diff --git a/src/mame/machine/starwars.cpp b/src/mame/machine/starwars.cpp
index 43b1ed4d56a..e5bae0674ea 100644
--- a/src/mame/machine/starwars.cpp
+++ b/src/mame/machine/starwars.cpp
@@ -78,7 +78,7 @@ WRITE_LINE_MEMBER(starwars_state::coin2_counter_w)
*
*************************************/
-CUSTOM_INPUT_MEMBER(starwars_state::matrix_flag_r)
+READ_LINE_MEMBER(starwars_state::matrix_flag_r)
{
/* set the matrix processor flag */
return m_math_run ? 1 : 0;
diff --git a/src/mame/machine/taito68705interface.h b/src/mame/machine/taito68705interface.h
index 30c3b30dbc0..e1a7716a1c1 100644
--- a/src/mame/machine/taito68705interface.h
+++ b/src/mame/machine/taito68705interface.h
@@ -21,10 +21,8 @@ public:
DECLARE_READ8_MEMBER(data_r);
DECLARE_WRITE8_MEMBER(data_w);
DECLARE_WRITE_LINE_MEMBER(reset_w);
- DECLARE_READ_LINE_MEMBER(host_semaphore_r) { return m_host_flag ? ASSERT_LINE : CLEAR_LINE; }
- DECLARE_READ_LINE_MEMBER(mcu_semaphore_r) { return m_mcu_flag ? ASSERT_LINE : CLEAR_LINE; }
- DECLARE_CUSTOM_INPUT_MEMBER(host_semaphore_r) { return m_host_flag ? 1 : 0; }
- DECLARE_CUSTOM_INPUT_MEMBER(mcu_semaphore_r) { return m_mcu_flag ? 1 : 0; }
+ DECLARE_READ_LINE_MEMBER(host_semaphore_r) { return m_host_flag ? 1 : 0; }
+ DECLARE_READ_LINE_MEMBER(mcu_semaphore_r) { return m_mcu_flag ? 1 : 0; }
protected:
taito68705_mcu_device_base(
diff --git a/src/mame/machine/williams.cpp b/src/mame/machine/williams.cpp
index 34576e80b34..1c03c4f60ee 100644
--- a/src/mame/machine/williams.cpp
+++ b/src/mame/machine/williams.cpp
@@ -467,13 +467,6 @@ MACHINE_START_MEMBER(tshoot_state,tshoot)
}
-CUSTOM_INPUT_MEMBER(tshoot_state::gun_r)
-{
- int data = m_gun[(uintptr_t)param]->read();
- return (data & 0x3f) ^ ((data & 0x3f) >> 1);
-}
-
-
WRITE_LINE_MEMBER(tshoot_state::maxvol_w)
{
/* something to do with the sound volume */
diff --git a/src/mame/machine/xavix.cpp b/src/mame/machine/xavix.cpp
index 480e5155cfd..dcd39e04957 100644
--- a/src/mame/machine/xavix.cpp
+++ b/src/mame/machine/xavix.cpp
@@ -379,27 +379,17 @@ WRITE8_MEMBER(xavix_state::dispctrl_posirq_y_w)
/* Per Game IO port callbacks */
-CUSTOM_INPUT_MEMBER(xavix_i2c_state::i2c_r)
-{
- return m_i2cmem->read_sda();
-}
-
-CUSTOM_INPUT_MEMBER(xavix_i2c_cart_state::i2c_r)
-{
- return m_i2cmem->read_sda();
-}
-
-CUSTOM_INPUT_MEMBER(xavix_i2c_lotr_state::camera_r) // seems to be some kind of camera status bits
+READ_LINE_MEMBER(xavix_i2c_lotr_state::camera_r) // seems to be some kind of camera status bits
{
return machine().rand();
}
-CUSTOM_INPUT_MEMBER(xavix_i2c_bowl_state::camera_r) // seems to be some kind of camera status bits
+READ_LINE_MEMBER(xavix_i2c_bowl_state::camera_r) // seems to be some kind of camera status bits
{
return machine().rand();
}
-CUSTOM_INPUT_MEMBER(xavix_ekara_state::ekara_multi0_r)
+READ_LINE_MEMBER(xavix_ekara_state::ekara_multi0_r)
{
switch (m_extraioselect & 0x7f)
{
@@ -417,7 +407,7 @@ CUSTOM_INPUT_MEMBER(xavix_ekara_state::ekara_multi0