msm5832: Simplify handlers (nw)

This commit is contained in:
AJR 2019-10-21 02:00:47 -04:00
parent e84674d577
commit 83296b75ec
8 changed files with 15 additions and 15 deletions

View File

@ -225,7 +225,7 @@ WRITE8_MEMBER(a2bus_timemasterho_device::pia_out_b)
// if it's a read, poke it into the PIA
if ((data>>5) & 1)
{
m_pia->write_porta(m_msm5832->data_r(space, 0));
m_pia->write_porta(m_msm5832->data_r());
}
}

View File

@ -290,7 +290,7 @@ void apricot_keyboard_hle_device::received_byte(uint8_t byte)
if (m_rtc_index >= 0)
{
m_rtc->address_w(m_rtc_index--);
m_rtc->data_w(machine().dummy_space(), 0, byte);
m_rtc->data_w(byte);
m_rtc->write_w(1);
m_rtc->write_w(0);
}
@ -316,7 +316,7 @@ void apricot_keyboard_hle_device::received_byte(uint8_t byte)
for (int i = 12; i >= 0; i--)
{
m_rtc->address_w(i);
transmit_byte(0xf0 | m_rtc->data_r(machine().dummy_space(), 0));
transmit_byte(0xf0 | m_rtc->data_r());
}
break;

View File

@ -164,7 +164,7 @@ void msm5832_device::rtc_clock_updated(int year, int month, int day, int day_of_
// data_r -
//-------------------------------------------------
READ8_MEMBER( msm5832_device::data_r )
uint8_t msm5832_device::data_r()
{
LOG("MSM5832 Register Read %01x: %01x\n", m_address, m_data & 0x0f);
@ -176,7 +176,7 @@ READ8_MEMBER( msm5832_device::data_r )
// data_w -
//-------------------------------------------------
WRITE8_MEMBER( msm5832_device::data_w )
void msm5832_device::data_w(uint8_t data)
{
LOG("MSM5832 Register Write %01x: %01x\n", m_address, data & 0x0f);

View File

@ -40,8 +40,8 @@ public:
// construction/destruction
msm5832_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
DECLARE_READ8_MEMBER( data_r );
DECLARE_WRITE8_MEMBER( data_w );
uint8_t data_r();
void data_w(uint8_t data);
void address_w(uint8_t data);

View File

@ -514,7 +514,7 @@ READ8_MEMBER(attache_state::pio_portA_r)
m_rtc->write_w(0);
m_rtc->read_w(1);
m_rtc->address_w((porta & 0xf0) >> 4);
ret = m_rtc->data_r(space,0);
ret = m_rtc->data_r();
logerror("RTC: read %02x from %02x (write)\n",ret,(porta & 0xf0) >> 4);
break;
case PIO_SEL_5832_READ:
@ -522,7 +522,7 @@ READ8_MEMBER(attache_state::pio_portA_r)
m_rtc->write_w(0);
m_rtc->read_w(1);
m_rtc->address_w((porta & 0xf0) >> 4);
ret = m_rtc->data_r(space,0);
ret = m_rtc->data_r();
logerror("RTC: read %02x from %02x\n",ret,(porta & 0xf0) >> 4);
break;
case PIO_SEL_5101_WRITE:
@ -569,7 +569,7 @@ void attache_state::operation_strobe(address_space& space, uint8_t data)
m_rtc->cs_w(1);
m_rtc->read_w(0);
m_rtc->address_w((data & 0xf0) >> 4);
m_rtc->data_w(space,0,data & 0x0f);
m_rtc->data_w(data & 0x0f);
m_rtc->write_w(1);
logerror("RTC: write %01x to %01x\n",data & 0x0f,(data & 0xf0) >> 4);
break;

View File

@ -238,7 +238,7 @@ READ8_MEMBER( aussiebyte_state::rtc_r )
{
m_rtc->read_w(1);
m_rtc->address_w(offset);
uint8_t data = m_rtc->data_r(space,0);
uint8_t data = m_rtc->data_r();
m_rtc->read_w(0);
return data;
}
@ -246,7 +246,7 @@ READ8_MEMBER( aussiebyte_state::rtc_r )
WRITE8_MEMBER( aussiebyte_state::rtc_w )
{
m_rtc->address_w(offset);
m_rtc->data_w(space,0,data);
m_rtc->data_w(data);
m_rtc->write_w(1);
m_rtc->write_w(0);
}

View File

@ -1476,7 +1476,7 @@ READ8_MEMBER( cmi_state::q133_1_porta_r )
{
if (BIT(m_q133_pia[0]->b_output(), 1))
{
return m_msm5832->data_r(space, m_msm5832_addr) << 4;
return m_msm5832->data_r() << 4;
}
return 0xff;
}

View File

@ -159,7 +159,7 @@ WRITE8_MEMBER( pulsar_state::ppi_pb_w )
// d0..d3 Data lines to rtc
WRITE8_MEMBER( pulsar_state::ppi_pc_w )
{
m_rtc->data_w(space, 0, data & 15);
m_rtc->data_w(data & 15);
}
// d7 /2 SIDES
@ -168,7 +168,7 @@ READ8_MEMBER( pulsar_state::ppi_pc_r )
uint8_t data = 0;
if (m_floppy)
data = m_floppy->twosid_r() << 7;
return m_rtc->data_r(space, 0) | data;
return m_rtc->data_r() | data;
}
static DEVICE_INPUT_DEFAULTS_START( terminal )