mirror of
https://github.com/holub/mame
synced 2025-06-01 18:41:47 +03:00
[Z80PIO] Added alternate read/write handlers.
This commit is contained in:
parent
a6c8c32a9a
commit
9eba6f1517
@ -532,6 +532,20 @@ WRITE8_DEVICE_HANDLER(z80pio_w)
|
||||
z80pio_d_w(device, offset & 1, data);
|
||||
}
|
||||
|
||||
READ8_DEVICE_HANDLER(z80pio_alt_r)
|
||||
{
|
||||
int channel = BIT(offset, 1);
|
||||
return (offset & 1) ? z80pio_c_r(device, channel) : z80pio_d_r(device, channel);
|
||||
}
|
||||
|
||||
WRITE8_DEVICE_HANDLER(z80pio_alt_w)
|
||||
{
|
||||
int channel = BIT(offset, 1);
|
||||
if (offset & 1)
|
||||
z80pio_c_w(device, channel, data);
|
||||
else
|
||||
z80pio_d_w(device, channel, data);
|
||||
}
|
||||
|
||||
static DEVICE_START( z80pio )
|
||||
{
|
||||
|
@ -104,6 +104,8 @@ void z80pio_bstb_w(const device_config *device, int state);
|
||||
***************************************************************************/
|
||||
READ8_DEVICE_HANDLER(z80pio_r);
|
||||
WRITE8_DEVICE_HANDLER(z80pio_w);
|
||||
READ8_DEVICE_HANDLER(z80pio_alt_r);
|
||||
WRITE8_DEVICE_HANDLER(z80pio_alt_w);
|
||||
|
||||
|
||||
/* ----- device interface ----- */
|
||||
|
Loading…
Reference in New Issue
Block a user