mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
Inlining 6821 PIA read/write calls
This commit is contained in:
parent
f346f656a1
commit
a1a413a621
@ -581,11 +581,6 @@ UINT8 pia6821_device::control_b_r()
|
||||
// read
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( pia6821_device::read )
|
||||
{
|
||||
return reg_r(offset);
|
||||
}
|
||||
|
||||
UINT8 pia6821_device::reg_r(UINT8 offset)
|
||||
{
|
||||
UINT8 ret;
|
||||
@ -628,16 +623,6 @@ UINT8 pia6821_device::reg_r(UINT8 offset)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// pia6821_alt_r
|
||||
//-------------------------------------------------
|
||||
|
||||
READ8_MEMBER( pia6821_device::read_alt )
|
||||
{
|
||||
return reg_r(((offset << 1) & 0x02) | ((offset >> 1) & 0x01));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// send_to_out_a_func
|
||||
@ -866,11 +851,6 @@ void pia6821_device::control_b_w(UINT8 data)
|
||||
// write
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( pia6821_device::write )
|
||||
{
|
||||
reg_w(offset, data);
|
||||
}
|
||||
|
||||
void pia6821_device::reg_w(UINT8 offset, UINT8 data)
|
||||
{
|
||||
switch (offset & 0x03)
|
||||
@ -909,16 +889,6 @@ void pia6821_device::reg_w(UINT8 offset, UINT8 data)
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// write_alt
|
||||
//-------------------------------------------------
|
||||
|
||||
WRITE8_MEMBER( pia6821_device::write_alt )
|
||||
{
|
||||
reg_w(((offset << 1) & 0x02) | ((offset >> 1) & 0x01), data);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------
|
||||
// porta_r
|
||||
//-------------------------------------------------
|
||||
|
@ -85,10 +85,10 @@ public:
|
||||
// static configuration helpers
|
||||
static void static_set_interface(device_t &device, const pia6821_interface &interface);
|
||||
|
||||
DECLARE_READ8_MEMBER( read );
|
||||
DECLARE_WRITE8_MEMBER( write );
|
||||
DECLARE_READ8_MEMBER( read_alt );
|
||||
DECLARE_WRITE8_MEMBER( write_alt );
|
||||
DECLARE_READ8_MEMBER( read ) { return reg_r(offset); }
|
||||
DECLARE_WRITE8_MEMBER( write ) { reg_w(offset, data); }
|
||||
DECLARE_READ8_MEMBER( read_alt ) { return reg_r(((offset << 1) & 0x02) | ((offset >> 1) & 0x01)); }
|
||||
DECLARE_WRITE8_MEMBER( write_alt ) { reg_w(((offset << 1) & 0x02) | ((offset >> 1) & 0x01), data); }
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user