diff options
author | 2020-05-21 22:38:18 -0400 | |
---|---|---|
committer | 2020-05-21 22:38:18 -0400 | |
commit | f95267bf5e215e0f140407fecaf7c16c7da90f81 (patch) | |
tree | 4b2da8dca374c2e247ca84a841af34d09648fb65 /src/devices/bus/einstein | |
parent | 363485b628f370714ea065fcbd2484d7e0510c1e (diff) |
Various buses and associated drivers: Simplify handler signatures (nw)
Diffstat (limited to 'src/devices/bus/einstein')
-rw-r--r-- | src/devices/bus/einstein/pipe/silicon_disc.cpp | 12 | ||||
-rw-r--r-- | src/devices/bus/einstein/pipe/silicon_disc.h | 8 | ||||
-rw-r--r-- | src/devices/bus/einstein/pipe/speculator.cpp | 22 | ||||
-rw-r--r-- | src/devices/bus/einstein/pipe/speculator.h | 8 | ||||
-rw-r--r-- | src/devices/bus/einstein/pipe/tk02.cpp | 8 | ||||
-rw-r--r-- | src/devices/bus/einstein/pipe/tk02.h | 6 |
6 files changed, 32 insertions, 32 deletions
diff --git a/src/devices/bus/einstein/pipe/silicon_disc.cpp b/src/devices/bus/einstein/pipe/silicon_disc.cpp index ff4ac92a910..c0a29f304bd 100644 --- a/src/devices/bus/einstein/pipe/silicon_disc.cpp +++ b/src/devices/bus/einstein/pipe/silicon_disc.cpp @@ -87,8 +87,8 @@ void einstein_silicon_disc_device::device_reset() // install i/o ports io_space().install_device(0xf0, 0xff, *this, &einstein_silicon_disc_device::map); io_space().install_readwrite_handler(0xfa, 0xfa, 0, 0, 0xff00, - read8_delegate(*this, FUNC(einstein_silicon_disc_device::ram_r)), - write8_delegate(*this, FUNC(einstein_silicon_disc_device::ram_w))); + read8sm_delegate(*this, FUNC(einstein_silicon_disc_device::ram_r)), + write8sm_delegate(*this, FUNC(einstein_silicon_disc_device::ram_w))); } @@ -96,25 +96,25 @@ void einstein_silicon_disc_device::device_reset() // IMPLEMENTATION //************************************************************************** -WRITE8_MEMBER( einstein_silicon_disc_device::sector_low_w ) +void einstein_silicon_disc_device::sector_low_w(uint8_t data) { m_sector &= 0xff00; m_sector |= data; } -WRITE8_MEMBER( einstein_silicon_disc_device::sector_high_w ) +void einstein_silicon_disc_device::sector_high_w(uint8_t data) { m_sector &= 0x00ff; m_sector |= ((data & 0x07) << 8); } // a8 to a14 are used to specify the byte in a 128-byte sector -READ8_MEMBER( einstein_silicon_disc_device::ram_r ) +uint8_t einstein_silicon_disc_device::ram_r(offs_t offset) { return m_ram[(m_sector * 0x80) | ((offset >> 8) & 0x7f)]; } -WRITE8_MEMBER( einstein_silicon_disc_device::ram_w ) +void einstein_silicon_disc_device::ram_w(offs_t offset, uint8_t data) { m_ram[(m_sector * 0x80) | ((offset >> 8) & 0x7f)] = data; } diff --git a/src/devices/bus/einstein/pipe/silicon_disc.h b/src/devices/bus/einstein/pipe/silicon_disc.h index dad8ad7c940..c80ef0ed88c 100644 --- a/src/devices/bus/einstein/pipe/silicon_disc.h +++ b/src/devices/bus/einstein/pipe/silicon_disc.h @@ -42,10 +42,10 @@ private: std::unique_ptr<uint8_t[]> m_ram; uint16_t m_sector; - DECLARE_READ8_MEMBER(ram_r); - DECLARE_WRITE8_MEMBER(ram_w); - DECLARE_WRITE8_MEMBER(sector_low_w); - DECLARE_WRITE8_MEMBER(sector_high_w); + uint8_t ram_r(offs_t offset); + void ram_w(offs_t offset, uint8_t data); + void sector_low_w(uint8_t data); + void sector_high_w(uint8_t data); }; // device type definition diff --git a/src/devices/bus/einstein/pipe/speculator.cpp b/src/devices/bus/einstein/pipe/speculator.cpp index c4afaa4ac2d..e99d3978cb4 100644 --- a/src/devices/bus/einstein/pipe/speculator.cpp +++ b/src/devices/bus/einstein/pipe/speculator.cpp @@ -97,18 +97,18 @@ void einstein_speculator_device::device_reset() { // ram: range 0x1f, 0x3f, 0x5f, 0x7f, 0x9f, 0xbf, 0xdf, 0xff io_space().install_readwrite_handler(0x1f, 0x1f, 0, 0, 0xffe0, - read8_delegate(*this, FUNC(einstein_speculator_device::ram_r)), - write8_delegate(*this, FUNC(einstein_speculator_device::ram_w))); + read8sm_delegate(*this, FUNC(einstein_speculator_device::ram_r)), + write8sm_delegate(*this, FUNC(einstein_speculator_device::ram_w))); // ram: range 0x60 - 0xff io_space().install_readwrite_handler(0x60, 0x60, 0, 0, 0xff9f, - read8_delegate(*this, FUNC(einstein_speculator_device::ram_r)), - write8_delegate(*this, FUNC(einstein_speculator_device::ram_w))); + read8sm_delegate(*this, FUNC(einstein_speculator_device::ram_r)), + write8sm_delegate(*this, FUNC(einstein_speculator_device::ram_w))); // tape read/nmi write register: range 0xff io_space().install_readwrite_handler(0xff, 0xff, 0, 0, 0xff00, - read8_delegate(*this, FUNC(einstein_speculator_device::tape_r)), - write8_delegate(*this, FUNC(einstein_speculator_device::nmi_w))); + read8smo_delegate(*this, FUNC(einstein_speculator_device::tape_r)), + write8smo_delegate(*this, FUNC(einstein_speculator_device::nmi_w))); } @@ -167,19 +167,19 @@ offs_t einstein_speculator_device::address_translate(offs_t offset) return (ra3 << 3) | (ra2 << 2) | (ra1 << 1) | (ra0 << 0); } -READ8_MEMBER( einstein_speculator_device::ram_r ) +uint8_t einstein_speculator_device::ram_r(offs_t offset) { offs_t addr = ((offset << 4) & 0x7f) | address_translate(offset); return m_ram[addr]; } -WRITE8_MEMBER( einstein_speculator_device::ram_w ) +void einstein_speculator_device::ram_w(offs_t offset, uint8_t data) { offs_t addr = ((offset << 4) & 0x7f) | address_translate(offset); m_ram[addr] = data; } -READ8_MEMBER( einstein_speculator_device::tape_r ) +uint8_t einstein_speculator_device::tape_r() { // 7654321- unknown // -------0 cassette input @@ -187,9 +187,9 @@ READ8_MEMBER( einstein_speculator_device::tape_r ) return m_cassette->input() > 0.0038 ? 1 : 0; } -WRITE8_MEMBER( einstein_speculator_device::nmi_w ) +void einstein_speculator_device::nmi_w(uint8_t data) { - logerror("nmi_w offset %04x data %02x\n", offset, data); + logerror("nmi_w data %02x\n", data); // 76543--- unknown // -----2-- nmi enable? diff --git a/src/devices/bus/einstein/pipe/speculator.h b/src/devices/bus/einstein/pipe/speculator.h index bdbb4476e3e..c66b2e0122e 100644 --- a/src/devices/bus/einstein/pipe/speculator.h +++ b/src/devices/bus/einstein/pipe/speculator.h @@ -34,10 +34,10 @@ public: virtual void int_w(int state) override; - DECLARE_READ8_MEMBER(ram_r); - DECLARE_WRITE8_MEMBER(ram_w); - DECLARE_READ8_MEMBER(tape_r); - DECLARE_WRITE8_MEMBER(nmi_w); + uint8_t ram_r(offs_t offset); + void ram_w(offs_t offset, uint8_t data); + uint8_t tape_r(); + void nmi_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(ic5a_q_w); DECLARE_WRITE_LINE_MEMBER(ic5b_q_w); diff --git a/src/devices/bus/einstein/pipe/tk02.cpp b/src/devices/bus/einstein/pipe/tk02.cpp index 5f0a38ed27b..b0cf5998131 100644 --- a/src/devices/bus/einstein/pipe/tk02.cpp +++ b/src/devices/bus/einstein/pipe/tk02.cpp @@ -160,7 +160,7 @@ void tk02_device::device_start() void tk02_device::device_reset() { io_space().install_device(0x40, 0x4f, *this, &tk02_device::map); - io_space().install_readwrite_handler(0x40, 0x47, 0, 0, 0xff00, read8_delegate(*this, FUNC(tk02_device::ram_r)), write8_delegate(*this, FUNC(tk02_device::ram_w))); + io_space().install_readwrite_handler(0x40, 0x47, 0, 0, 0xff00, read8sm_delegate(*this, FUNC(tk02_device::ram_r)), write8sm_delegate(*this, FUNC(tk02_device::ram_w))); } @@ -203,17 +203,17 @@ WRITE_LINE_MEMBER( tk02_device::de_w ) // lower 3 bits of address define a 256-byte "row" // upper 8 bits define the offset in the row -READ8_MEMBER( tk02_device::ram_r ) +uint8_t tk02_device::ram_r(offs_t offset) { return m_ram[((offset & 0x07) << 8) | ((offset >> 8) & 0xff)]; } -WRITE8_MEMBER( tk02_device::ram_w ) +void tk02_device::ram_w(offs_t offset, uint8_t data) { m_ram[((offset & 0x07) << 8) | ((offset >> 8) & 0xff)] = data; } -READ8_MEMBER( tk02_device::status_r ) +uint8_t tk02_device::status_r() { // 7654---- unused // ----3--- link M001 diff --git a/src/devices/bus/einstein/pipe/tk02.h b/src/devices/bus/einstein/pipe/tk02.h index 8782def764c..3834585ed2a 100644 --- a/src/devices/bus/einstein/pipe/tk02.h +++ b/src/devices/bus/einstein/pipe/tk02.h @@ -40,9 +40,9 @@ private: DECLARE_WRITE_LINE_MEMBER(de_w); - DECLARE_READ8_MEMBER(ram_r); - DECLARE_WRITE8_MEMBER(ram_w); - DECLARE_READ8_MEMBER(status_r); + uint8_t ram_r(offs_t offset); + void ram_w(offs_t offset, uint8_t data); + uint8_t status_r(); MC6845_UPDATE_ROW(crtc_update_row); |