mirror of
https://github.com/holub/mame
synced 2025-10-05 08:41:31 +03:00
arkanoid: Use ordinary read handler instead of custom port for input mux (nw)
This commit is contained in:
parent
5af23eec34
commit
be6c96ff95
@ -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)
|
||||
|
@ -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();
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user