From c4412b751e2cdd50a8c94309e525ff0c31438429 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 18 Feb 2019 21:40:00 -0500 Subject: [PATCH] tms9914: Rename read/write handlers and remove superfluous arguments (nw) --- src/devices/bus/bbc/1mhzbus/ieee488.cpp | 12 ++++++------ src/devices/bus/hp_dio/human_interface.cpp | 8 ++++---- src/devices/machine/tms9914.cpp | 4 ++-- src/devices/machine/tms9914.h | 5 +++-- src/mame/drivers/gridcomp.cpp | 4 ++-- src/mame/drivers/hp_ipc.cpp | 2 +- src/mame/drivers/si5500.cpp | 4 ++-- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/devices/bus/bbc/1mhzbus/ieee488.cpp b/src/devices/bus/bbc/1mhzbus/ieee488.cpp index dc227a21729..3c280c06ad7 100644 --- a/src/devices/bus/bbc/1mhzbus/ieee488.cpp +++ b/src/devices/bus/bbc/1mhzbus/ieee488.cpp @@ -203,7 +203,7 @@ READ8_MEMBER(bbc_ieee488_device::fred_r) if (offset >= 0x20 && offset < 0x28) { - data = m_tms9914->reg8_r(space, offset & 0x07); + data = m_tms9914->read(offset & 0x07); } data &= m_1mhzbus->fred_r(space, offset); @@ -215,7 +215,7 @@ WRITE8_MEMBER(bbc_ieee488_device::fred_w) { if (offset >= 0x20 && offset < 0x28) { - m_tms9914->reg8_w(space, offset & 0x07, data); + m_tms9914->write(offset & 0x07, data); } m_1mhzbus->fred_w(space, offset, data); @@ -242,7 +242,7 @@ READ8_MEMBER(bbc_b488_device::fred_r) if (offset >= 0x20 && offset < 0x28) { - data = m_tms9914->reg8_r(space, offset & 0x07); + data = m_tms9914->read(offset & 0x07); } return data; @@ -252,7 +252,7 @@ WRITE8_MEMBER(bbc_b488_device::fred_w) { if (offset >= 0x20 && offset < 0x28) { - m_tms9914->reg8_w(space, offset & 0x07, data); + m_tms9914->write(offset & 0x07, data); } } @@ -263,7 +263,7 @@ WRITE8_MEMBER(bbc_b488_device::fred_w) //if (offset >= 0x20 && offset < 0x28) //{ - // data = mc68488_device->reg8_r(space, offset & 0x07); + // data = mc68488_device->read(offset & 0x07); //} //return data; @@ -273,6 +273,6 @@ WRITE8_MEMBER(bbc_b488_device::fred_w) //{ //if (offset >= 0x20 && offset < 0x28) //{ - // mc68488_device->reg8_w(space, offset & 0x07, data); + // mc68488_device->write(offset & 0x07, data); //} //} diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp index 9c58672e11d..58e3bff68aa 100644 --- a/src/devices/bus/hp_dio/human_interface.cpp +++ b/src/devices/bus/hp_dio/human_interface.cpp @@ -194,7 +194,7 @@ WRITE8_MEMBER(human_interface_device::ieee488_dio_w) WRITE8_MEMBER(human_interface_device::gpib_w) { if (offset & 0x08) { - m_tms9914->reg8_w(space, offset & 0x07, data); + m_tms9914->write(offset & 0x07, data); return; } @@ -234,7 +234,7 @@ READ8_MEMBER(human_interface_device::gpib_r) uint8_t data = 0xff; if (offset & 0x8) { - data = m_tms9914->reg8_r(space, offset & 0x07); + data = m_tms9914->read(offset & 0x07); return data; } @@ -360,14 +360,14 @@ void human_interface_device::dmack_w_in(int channel, uint8_t data) { if (channel) return; - m_tms9914->reg8_w(*program_space(), 7, data); + m_tms9914->write(7, data); } uint8_t human_interface_device::dmack_r_in(int channel) { if (channel || !m_gpib_dma_enable) return 0xff; - return m_tms9914->reg8_r(machine().dummy_space(), 7); + return m_tms9914->read(7); } } // namespace bus::hp_dio diff --git a/src/devices/machine/tms9914.cpp b/src/devices/machine/tms9914.cpp index 00fedd5db0c..eef06895493 100644 --- a/src/devices/machine/tms9914.cpp +++ b/src/devices/machine/tms9914.cpp @@ -241,7 +241,7 @@ WRITE_LINE_MEMBER(tms9914_device::ren_w) } // Register I/O -WRITE8_MEMBER(tms9914_device::reg8_w) +void tms9914_device::write(offs_t offset, uint8_t data) { LOG_REG("W %u=%02x\n" , offset , data); @@ -323,7 +323,7 @@ WRITE8_MEMBER(tms9914_device::reg8_w) } } -READ8_MEMBER(tms9914_device::reg8_r) +uint8_t tms9914_device::read(offs_t offset) { uint8_t res; diff --git a/src/devices/machine/tms9914.h b/src/devices/machine/tms9914.h index 14df9d80647..9fda5aa2ebb 100644 --- a/src/devices/machine/tms9914.h +++ b/src/devices/machine/tms9914.h @@ -83,8 +83,9 @@ public: DECLARE_WRITE_LINE_MEMBER(atn_w); DECLARE_WRITE_LINE_MEMBER(ren_w); - DECLARE_WRITE8_MEMBER(reg8_w); - DECLARE_READ8_MEMBER(reg8_r); + // Register access + void write(offs_t offset, uint8_t data); + uint8_t read(offs_t offset); // CONT output: true when 9914 is current controller-in-charge DECLARE_READ_LINE_MEMBER(cont_r); diff --git a/src/mame/drivers/gridcomp.cpp b/src/mame/drivers/gridcomp.cpp index 435a96acab2..fca86b46762 100644 --- a/src/mame/drivers/gridcomp.cpp +++ b/src/mame/drivers/gridcomp.cpp @@ -321,7 +321,7 @@ void gridcomp_state::grid1101_map(address_map &map) map(0xdfea0, 0xdfeaf).unmaprw(); // ?? map(0xdfec0, 0xdfecf).rw(m_modem, FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff); // incl. DTMF generator map(0xdff40, 0xdff5f).noprw(); // ?? machine ID EAROM, RTC - map(0xdff80, 0xdff8f).rw("hpib", FUNC(tms9914_device::reg8_r), FUNC(tms9914_device::reg8_w)).umask16(0x00ff); + map(0xdff80, 0xdff8f).rw("hpib", FUNC(tms9914_device::read), FUNC(tms9914_device::write)).umask16(0x00ff); map(0xdffc0, 0xdffcf).rw(FUNC(gridcomp_state::grid_keyb_r), FUNC(gridcomp_state::grid_keyb_w)); // Intel 8741 MCU map(0xfc000, 0xfffff).rom().region("user1", 0); } @@ -338,7 +338,7 @@ void gridcomp_state::grid1121_map(address_map &map) map(0xdfea0, 0xdfeaf).unmaprw(); // ?? map(0xdfec0, 0xdfecf).rw(m_modem, FUNC(i8255_device::read), FUNC(i8255_device::write)).umask16(0x00ff); // incl. DTMF generator map(0xdff40, 0xdff5f).noprw(); // ?? machine ID EAROM, RTC - map(0xdff80, 0xdff8f).rw("hpib", FUNC(tms9914_device::reg8_r), FUNC(tms9914_device::reg8_w)).umask16(0x00ff); + map(0xdff80, 0xdff8f).rw("hpib", FUNC(tms9914_device::read), FUNC(tms9914_device::write)).umask16(0x00ff); map(0xdffc0, 0xdffcf).rw(FUNC(gridcomp_state::grid_keyb_r), FUNC(gridcomp_state::grid_keyb_w)); // Intel 8741 MCU map(0xfc000, 0xfffff).rom().region("user1", 0); } diff --git a/src/mame/drivers/hp_ipc.cpp b/src/mame/drivers/hp_ipc.cpp index 098472e00ac..db082fe1357 100644 --- a/src/mame/drivers/hp_ipc.cpp +++ b/src/mame/drivers/hp_ipc.cpp @@ -499,7 +499,7 @@ void hp_ipc_state::hp_ipc_mem_inner_base(address_map &map) map(0x0610000, 0x0610007).rw(FUNC(hp_ipc_state::floppy_id_r), FUNC(hp_ipc_state::floppy_id_w)).umask16(0x00ff); map(0x0610008, 0x061000F).rw(m_fdc, FUNC(wd2797_device::read), FUNC(wd2797_device::write)).umask16(0x00ff); map(0x0620000, 0x0620007).rw(m_gpu, FUNC(hp1ll3_device::read), FUNC(hp1ll3_device::write)).umask16(0x00ff); - map(0x0630000, 0x063FFFF).mask(0xf).rw("hpib" , FUNC(tms9914_device::reg8_r) , FUNC(tms9914_device::reg8_w)).umask16(0x00ff); + map(0x0630000, 0x063FFFF).mask(0xf).rw("hpib" , FUNC(tms9914_device::read) , FUNC(tms9914_device::write)).umask16(0x00ff); map(0x0640000, 0x064002F).rw("rtc", FUNC(mm58167_device::read), FUNC(mm58167_device::write)).umask16(0x00ff); map(0x0660000, 0x06600FF).rw("mlc", FUNC(hp_hil_mlc_device::read), FUNC(hp_hil_mlc_device::write)).umask16(0x00ff); // 'caravan', scrn/caravan.h map(0x0670000, 0x067FFFF).noprw(); // Speaker (NatSemi COP 452) diff --git a/src/mame/drivers/si5500.cpp b/src/mame/drivers/si5500.cpp index 8b79ce05677..9ff4e6b03a6 100644 --- a/src/mame/drivers/si5500.cpp +++ b/src/mame/drivers/si5500.cpp @@ -93,7 +93,7 @@ WRITE_LINE_MEMBER(si5500_state::gpibc_we_w) if (!state) { u16 pio = m_gpibpsi->pio_outputs(); - m_gpibc->reg8_w(machine().dummy_space(), (pio >> 8) & 7, pio & 0xff); + m_gpibc->write((pio >> 8) & 7, pio & 0xff); } } @@ -102,7 +102,7 @@ WRITE_LINE_MEMBER(si5500_state::gpibc_dbin_w) if (state) { u16 pio = m_gpibpsi->pio_outputs(); - m_gpib_data = m_gpibc->reg8_r(machine().dummy_space(), (pio >> 8) & 7); + m_gpib_data = m_gpibc->read((pio >> 8) & 7); } }