diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2019-09-14 15:27:30 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2019-09-14 15:37:04 -0400 |
commit | 6fab7692981d7956fe400995e4774c9d007b215f (patch) | |
tree | 33db51072448e42875ab5874549ca538a9add521 /src/mame/drivers/tempest.cpp | |
parent | 2f39181ac1e093b42a6ff17b49013cfadb02e7a9 (diff) |
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)
Diffstat (limited to 'src/mame/drivers/tempest.cpp')
-rw-r--r-- | src/mame/drivers/tempest.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 ) |