summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-08-15 11:13:22 -0400
committer AJR <ajrhacker@users.noreply.github.com>2019-08-15 11:13:22 -0400
commitbe6c96ff959a60144f3b7b4b832bb0557ed8268a (patch)
tree88c578bb5e41092b85799489a3917cb477840b86
parent5af23eec3427193e95bb28215ed95be09a6017e0 (diff)
arkanoid: Use ordinary read handler instead of custom port for input mux (nw)
-rw-r--r--src/mame/drivers/arkanoid.cpp12
-rw-r--r--src/mame/includes/arkanoid.h2
-rw-r--r--src/mame/machine/arkanoid.cpp4
3 files changed, 6 insertions, 12 deletions
diff --git a/src/mame/drivers/arkanoid.cpp b/src/mame/drivers/arkanoid.cpp
index 802497098d8..55b284416a7 100644
--- a/src/mame/drivers/arkanoid.cpp
+++ b/src/mame/drivers/arkanoid.cpp
@@ -854,7 +854,7 @@ void arkanoid_state::bootleg_map(address_map &map)
map(0xd008, 0xd008).w(FUNC(arkanoid_state::arkanoid_d008_w)); /* gfx bank, flip screen etc. */
map(0xd00c, 0xd00c).portr("SYSTEM");
map(0xd010, 0xd010).portr("BUTTONS").w("watchdog", FUNC(watchdog_timer_device::reset_w));
- map(0xd018, 0xd018).portr("MUX").nopw();
+ map(0xd018, 0xd018).r(FUNC(arkanoid_state::input_mux_r)).nopw();
map(0xe000, 0xe7ff).ram().w(FUNC(arkanoid_state::arkanoid_videoram_w)).share("videoram");
map(0xe800, 0xe83f).ram().share("spriteram");
map(0xe840, 0xefff).ram();
@@ -1032,9 +1032,6 @@ static INPUT_PORTS_START( arkanoid )
PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_UNKNOWN )
PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNKNOWN )
- PORT_START("MUX")
- PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_CUSTOM_MEMBER(DEVICE_SELF, arkanoid_state,arkanoid_input_mux, "P1\0P2")
-
PORT_START("DSW")
PORT_DIPNAME( 0x01, 0x00, DEF_STR( Allow_Continue ) ) PORT_DIPLOCATION("SW1:8")
PORT_DIPSETTING( 0x01, DEF_STR( No ) )
@@ -1184,9 +1181,6 @@ static INPUT_PORTS_START( tetrsark )
PORT_START("BUTTONS")
PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
- PORT_START("MUX")
- PORT_BIT( 0xff, IP_ACTIVE_LOW, IPT_UNUSED )
-
/* Inputs are read by the ay8910. For simplicity, we use tags from other sets (even if not appropriate) */
PORT_START("DSW")
PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_PLAYER(2)
@@ -1354,7 +1348,7 @@ void arkanoid_state::arkanoid(machine_config &config)
WATCHDOG_TIMER(config, "watchdog").set_vblank_count("screen", 128); // 74LS393 at ic21, counts 128 vblanks before firing watchdog; z80 /RESET ls08 ic19 pin 9 input comes from ls04 ic20 pin 8, ls04 ic20 pin 9 input comes from ic21 ls393 pin 8, and ls393 is set to chain both 4 bit counters together
ARKANOID_68705P5(config, m_mcuintf, 12_MHz_XTAL / 4); // verified on PCB
- m_mcuintf->portb_r_cb().set_ioport("MUX");
+ m_mcuintf->portb_r_cb().set(FUNC(arkanoid_state::input_mux_r));
config.m_minimum_quantum = attotime::from_hz(6000); // 100 CPU slices per second to synchronize between the MCU and the main CPU
@@ -1387,7 +1381,7 @@ void arkanoid_state::p3mcu(machine_config &config)
/* unprotected MCU */
ARKANOID_68705P3(config.replace(), m_mcuintf, 12_MHz_XTAL / 4);
- m_mcuintf->portb_r_cb().set_ioport("MUX");
+ m_mcuintf->portb_r_cb().set(FUNC(arkanoid_state::input_mux_r));
}
void arkanoid_state::p3mcuay(machine_config &config)
diff --git a/src/mame/includes/arkanoid.h b/src/mame/includes/arkanoid.h
index 95b4e7f5981..b901438462c 100644
--- a/src/mame/includes/arkanoid.h
+++ b/src/mame/includes/arkanoid.h
@@ -79,7 +79,7 @@ public:
DECLARE_WRITE8_MEMBER(hexaa_sub_80_w);
DECLARE_READ8_MEMBER(hexaa_sub_90_r);
DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_semaphore_input_r);
- DECLARE_CUSTOM_INPUT_MEMBER(arkanoid_input_mux);
+ uint8_t input_mux_r();
void init_block2();
void init_arkblock();
void init_hexa();
diff --git a/src/mame/machine/arkanoid.cpp b/src/mame/machine/arkanoid.cpp
index defde6ab266..b89d77eb4a0 100644
--- a/src/mame/machine/arkanoid.cpp
+++ b/src/mame/machine/arkanoid.cpp
@@ -25,9 +25,9 @@ CUSTOM_INPUT_MEMBER(arkanoid_state::arkanoid_semaphore_input_r)
((CLEAR_LINE != m_mcuintf->mcu_semaphore_r()) ? 0x00 : 0x02);
}
-CUSTOM_INPUT_MEMBER(arkanoid_state::arkanoid_input_mux)
+uint8_t arkanoid_state::input_mux_r()
{
- return m_muxports[(0 == m_paddle_select) ? 0 : 1]->read();
+ return m_muxports[(0 == m_paddle_select) ? 0 : 1].read_safe(0xff);
}
/*