mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
reduced the number of callers to set_a_input by calling porta_w & made the WRITE8_HANDLER call that as well, instead of the other way round and having to lookup an address space that is never used [smf]
This commit is contained in:
parent
2211539e88
commit
5ea7118892
@ -906,7 +906,7 @@ void pia6821_device::set_a_input(UINT8 data, UINT8 z_mask)
|
|||||||
// pia6821_porta_w
|
// pia6821_porta_w
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE8_MEMBER( pia6821_device::porta_w )
|
void pia6821_device::porta_w(UINT8 data)
|
||||||
{
|
{
|
||||||
set_a_input(data, 0);
|
set_a_input(data, 0);
|
||||||
}
|
}
|
||||||
@ -1013,7 +1013,7 @@ int pia6821_device::ca2_output_z()
|
|||||||
// portb_w
|
// portb_w
|
||||||
//-------------------------------------------------
|
//-------------------------------------------------
|
||||||
|
|
||||||
WRITE8_MEMBER( pia6821_device::portb_w )
|
void pia6821_device::portb_w(UINT8 data)
|
||||||
{
|
{
|
||||||
assert_always(m_in_b_handler.isnull(), "pia_set_input_b() called when in_b_func implemented");
|
assert_always(m_in_b_handler.isnull(), "pia_set_input_b() called when in_b_func implemented");
|
||||||
|
|
||||||
|
@ -103,8 +103,8 @@ public:
|
|||||||
UINT8 port_b_z_mask() const { return ~m_ddr_b; } // see first note in .c
|
UINT8 port_b_z_mask() const { return ~m_ddr_b; } // see first note in .c
|
||||||
void set_port_a_z_mask(UINT8 data) { m_port_a_z_mask = data; }// see second note in .c
|
void set_port_a_z_mask(UINT8 data) { m_port_a_z_mask = data; }// see second note in .c
|
||||||
|
|
||||||
DECLARE_WRITE8_MEMBER( porta_w );
|
DECLARE_WRITE8_MEMBER( porta_w ) { porta_w(data); }
|
||||||
void porta_w(UINT8 data) { porta_w(machine().driver_data()->generic_space(), 0, data); }
|
void porta_w(UINT8 data);
|
||||||
void set_a_input(UINT8 data, UINT8 z_mask);
|
void set_a_input(UINT8 data, UINT8 z_mask);
|
||||||
UINT8 a_output();
|
UINT8 a_output();
|
||||||
|
|
||||||
@ -114,8 +114,8 @@ public:
|
|||||||
int ca2_output();
|
int ca2_output();
|
||||||
int ca2_output_z();
|
int ca2_output_z();
|
||||||
|
|
||||||
DECLARE_WRITE8_MEMBER( portb_w );
|
DECLARE_WRITE8_MEMBER( portb_w ) { portb_w(data); }
|
||||||
void portb_w(UINT8 data) { portb_w(machine().driver_data()->generic_space(), 0, data); }
|
void portb_w(UINT8 data);
|
||||||
UINT8 b_output();
|
UINT8 b_output();
|
||||||
|
|
||||||
DECLARE_WRITE_LINE_MEMBER( cb1_w );
|
DECLARE_WRITE_LINE_MEMBER( cb1_w );
|
||||||
|
@ -889,7 +889,7 @@ READ8_MEMBER( victory_sound_device::status_r )
|
|||||||
|
|
||||||
TIMER_CALLBACK_MEMBER( victory_sound_device::delayed_command_w )
|
TIMER_CALLBACK_MEMBER( victory_sound_device::delayed_command_w )
|
||||||
{
|
{
|
||||||
m_pia1->set_a_input(param, 0);
|
m_pia1->porta_w(param);
|
||||||
m_pia1_ca1 = 0;
|
m_pia1_ca1 = 0;
|
||||||
m_pia1->ca1_w(m_pia1_ca1);
|
m_pia1->ca1_w(m_pia1_ca1);
|
||||||
}
|
}
|
||||||
@ -993,7 +993,7 @@ void victory_sound_device::device_reset()
|
|||||||
|
|
||||||
/* these two lines shouldn't be needed, but it avoids the log entry
|
/* these two lines shouldn't be needed, but it avoids the log entry
|
||||||
as the sound CPU checks port A before the main CPU ever writes to it */
|
as the sound CPU checks port A before the main CPU ever writes to it */
|
||||||
m_pia1->set_a_input(0, 0);
|
m_pia1->porta_w(0);
|
||||||
m_pia1_ca1 = 1;
|
m_pia1_ca1 = 1;
|
||||||
m_pia1->ca1_w(m_pia1_ca1);
|
m_pia1->ca1_w(m_pia1_ca1);
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@ DISCRETE_SOUND_END
|
|||||||
WRITE8_MEMBER(spiders_state::spiders_audio_command_w)
|
WRITE8_MEMBER(spiders_state::spiders_audio_command_w)
|
||||||
{
|
{
|
||||||
pia6821_device *pia = downcast<pia6821_device *>(machine().device("pia4"));
|
pia6821_device *pia = downcast<pia6821_device *>(machine().device("pia4"));
|
||||||
pia->set_a_input(data & 0xf8, 0);
|
pia->porta_w(data & 0xf8);
|
||||||
pia->ca1_w(data & 0x80 ? 1 : 0);
|
pia->ca1_w(data & 0x80 ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ INTERRUPT_GEN_MEMBER(toratora_state::toratora_timer)
|
|||||||
m_last = ioport("INPUT")->read() & 0x0f;
|
m_last = ioport("INPUT")->read() & 0x0f;
|
||||||
generic_pulse_irq_line(device.execute(), 0, 1);
|
generic_pulse_irq_line(device.execute(), 0, 1);
|
||||||
}
|
}
|
||||||
m_pia_u1->set_a_input(ioport("INPUT")->read() & 0x0f, 0);
|
m_pia_u1->porta_w(ioport("INPUT")->read() & 0x0f);
|
||||||
m_pia_u1->ca1_w(ioport("INPUT")->read() & 0x10);
|
m_pia_u1->ca1_w(ioport("INPUT")->read() & 0x10);
|
||||||
m_pia_u1->ca2_w(ioport("INPUT")->read() & 0x20);
|
m_pia_u1->ca2_w(ioport("INPUT")->read() & 0x20);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user