diff options
author | smf- <smf-@users.noreply.github.com> | 2014-01-06 20:03:09 +0000 |
---|---|---|
committer | smf- <smf-@users.noreply.github.com> | 2014-01-06 20:03:09 +0000 |
commit | 5ea71188923065c8e1b94eaffcfbb77d46717510 (patch) | |
tree | e1ddb97165de5f84f8c3ff5415c237c2b11ac2d2 /src | |
parent | 2211539e88880516e13c2f15a9f7b24426e81ba5 (diff) |
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]
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/machine/6821pia.c | 4 | ||||
-rw-r--r-- | src/emu/machine/6821pia.h | 8 | ||||
-rw-r--r-- | src/mame/audio/exidy.c | 4 | ||||
-rw-r--r-- | src/mame/audio/spiders.c | 2 | ||||
-rw-r--r-- | src/mame/drivers/toratora.c | 2 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/emu/machine/6821pia.c b/src/emu/machine/6821pia.c index 714fc82abcc..1af2e1999de 100644 --- a/src/emu/machine/6821pia.c +++ b/src/emu/machine/6821pia.c @@ -906,7 +906,7 @@ void pia6821_device::set_a_input(UINT8 data, UINT8 z_mask) // pia6821_porta_w //------------------------------------------------- -WRITE8_MEMBER( pia6821_device::porta_w ) +void pia6821_device::porta_w(UINT8 data) { set_a_input(data, 0); } @@ -1013,7 +1013,7 @@ int pia6821_device::ca2_output_z() // 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"); diff --git a/src/emu/machine/6821pia.h b/src/emu/machine/6821pia.h index 01345fa30db..6dabe716b32 100644 --- a/src/emu/machine/6821pia.h +++ b/src/emu/machine/6821pia.h @@ -103,8 +103,8 @@ public: 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 - DECLARE_WRITE8_MEMBER( porta_w ); - void porta_w(UINT8 data) { porta_w(machine().driver_data()->generic_space(), 0, data); } + DECLARE_WRITE8_MEMBER( porta_w ) { porta_w(data); } + void porta_w(UINT8 data); void set_a_input(UINT8 data, UINT8 z_mask); UINT8 a_output(); @@ -114,8 +114,8 @@ public: int ca2_output(); int ca2_output_z(); - DECLARE_WRITE8_MEMBER( portb_w ); - void portb_w(UINT8 data) { portb_w(machine().driver_data()->generic_space(), 0, data); } + DECLARE_WRITE8_MEMBER( portb_w ) { portb_w(data); } + void portb_w(UINT8 data); UINT8 b_output(); DECLARE_WRITE_LINE_MEMBER( cb1_w ); diff --git a/src/mame/audio/exidy.c b/src/mame/audio/exidy.c index ddb2d88720f..b6cb75e7111 100644 --- a/src/mame/audio/exidy.c +++ b/src/mame/audio/exidy.c @@ -889,7 +889,7 @@ READ8_MEMBER( victory_sound_device::status_r ) 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_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 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_w(m_pia1_ca1); } diff --git a/src/mame/audio/spiders.c b/src/mame/audio/spiders.c index be8d760f9cf..4ab6dc13df8 100644 --- a/src/mame/audio/spiders.c +++ b/src/mame/audio/spiders.c @@ -175,7 +175,7 @@ DISCRETE_SOUND_END WRITE8_MEMBER(spiders_state::spiders_audio_command_w) { 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); } diff --git a/src/mame/drivers/toratora.c b/src/mame/drivers/toratora.c index 8249497db0b..b2abf8f1212 100644 --- a/src/mame/drivers/toratora.c +++ b/src/mame/drivers/toratora.c @@ -170,7 +170,7 @@ INTERRUPT_GEN_MEMBER(toratora_state::toratora_timer) m_last = ioport("INPUT")->read() & 0x0f; 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->ca2_w(ioport("INPUT")->read() & 0x20); } |