diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/machine/i8155.cpp | 26 | ||||
-rw-r--r-- | src/devices/machine/i8155.h | 14 | ||||
-rw-r--r-- | src/devices/machine/nsc810.cpp | 4 | ||||
-rw-r--r-- | src/devices/machine/nsc810.h | 4 | ||||
-rw-r--r-- | src/mame/drivers/cp1.cpp | 21 | ||||
-rw-r--r-- | src/mame/drivers/vixen.cpp | 4 |
6 files changed, 36 insertions, 37 deletions
diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp index 779874a244d..b5027368633 100644 --- a/src/devices/machine/i8155.cpp +++ b/src/devices/machine/i8155.cpp @@ -406,7 +406,7 @@ void i8155_device::device_timer(emu_timer &timer, device_timer_id id, int param, // io_r - register read //------------------------------------------------- -READ8_MEMBER( i8155_device::io_r ) +uint8_t i8155_device::io_r(offs_t offset) { uint8_t data = 0; @@ -539,7 +539,7 @@ void i8155_device::register_w(int offset, uint8_t data) // io_w - register write //------------------------------------------------- -WRITE8_MEMBER( i8155_device::io_w ) +void i8155_device::io_w(offs_t offset, uint8_t data) { register_w(offset, data); } @@ -549,7 +549,7 @@ WRITE8_MEMBER( i8155_device::io_w ) // memory_r - internal RAM read //------------------------------------------------- -READ8_MEMBER( i8155_device::memory_r ) +uint8_t i8155_device::memory_r(offs_t offset) { return m_ram[offset & 0xff]; } @@ -559,7 +559,7 @@ READ8_MEMBER( i8155_device::memory_r ) // memory_w - internal RAM write //------------------------------------------------- -WRITE8_MEMBER( i8155_device::memory_w ) +void i8155_device::memory_w(offs_t offset, uint8_t data) { m_ram[offset & 0xff] = data; } @@ -569,7 +569,7 @@ WRITE8_MEMBER( i8155_device::memory_w ) // ale_w - address latch write //------------------------------------------------- -WRITE8_MEMBER( i8155_device::ale_w ) +void i8155_device::ale_w(offs_t offset, uint8_t data) { // I/O / memory select m_io_m = BIT(offset, 0); @@ -580,21 +580,21 @@ WRITE8_MEMBER( i8155_device::ale_w ) //------------------------------------------------- -// read - memory or I/O read +// data_r - memory or I/O read //------------------------------------------------- -READ8_MEMBER( i8155_device::read ) +uint8_t i8155_device::data_r() { uint8_t data = 0; switch (m_io_m) { case MEMORY: - data = memory_r(space, m_ad); + data = memory_r(m_ad); break; case IO: - data = io_r(space, m_ad); + data = io_r(m_ad); break; } @@ -603,19 +603,19 @@ READ8_MEMBER( i8155_device::read ) //------------------------------------------------- -// write - memory or I/O write +// data_w - memory or I/O write //------------------------------------------------- -WRITE8_MEMBER( i8155_device::write ) +void i8155_device::data_w(uint8_t data) { switch (m_io_m) { case MEMORY: - memory_w(space, m_ad, data); + memory_w(m_ad, data); break; case IO: - io_w(space, m_ad, data); + io_w(m_ad, data); break; } } diff --git a/src/devices/machine/i8155.h b/src/devices/machine/i8155.h index a17692211e6..2d6e49b2063 100644 --- a/src/devices/machine/i8155.h +++ b/src/devices/machine/i8155.h @@ -55,15 +55,15 @@ public: auto out_pc_callback() { return m_out_pc_cb.bind(); } auto out_to_callback() { return m_out_to_cb.bind(); } - DECLARE_READ8_MEMBER( io_r ); - DECLARE_WRITE8_MEMBER( io_w ); + uint8_t io_r(offs_t offset); + void io_w(offs_t offset, uint8_t data); - DECLARE_READ8_MEMBER( memory_r ); - DECLARE_WRITE8_MEMBER( memory_w ); + uint8_t memory_r(offs_t offset); + void memory_w(offs_t offset, uint8_t data); - DECLARE_WRITE8_MEMBER( ale_w ); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + void ale_w(offs_t offset, uint8_t data); + uint8_t data_r(); + void data_w(uint8_t data); protected: i8155_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/machine/nsc810.cpp b/src/devices/machine/nsc810.cpp index bf06c34d9dc..96a13e7b696 100644 --- a/src/devices/machine/nsc810.cpp +++ b/src/devices/machine/nsc810.cpp @@ -118,7 +118,7 @@ void nsc810_device::device_timer(emu_timer &timer, device_timer_id id, int param } } -READ8_MEMBER(nsc810_device::read) +uint8_t nsc810_device::read(offs_t offset) { uint8_t res = 0xff; @@ -191,7 +191,7 @@ READ8_MEMBER(nsc810_device::read) return res; } -WRITE8_MEMBER(nsc810_device::write) +void nsc810_device::write(offs_t offset, uint8_t data) { uint32_t rate; diff --git a/src/devices/machine/nsc810.h b/src/devices/machine/nsc810.h index 6eed2448ef1..520591208f7 100644 --- a/src/devices/machine/nsc810.h +++ b/src/devices/machine/nsc810.h @@ -46,8 +46,8 @@ public: void set_timer1_clock(uint32_t clk) { m_timer1_clock = clk; } void set_timer1_clock(const XTAL &clk) { set_timer1_clock(clk.value()); } - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); protected: virtual void device_start() override; diff --git a/src/mame/drivers/cp1.cpp b/src/mame/drivers/cp1.cpp index 49d31927f23..a329130a81e 100644 --- a/src/mame/drivers/cp1.cpp +++ b/src/mame/drivers/cp1.cpp @@ -122,14 +122,14 @@ READ8_MEMBER(cp1_state::i8155_read) if (!(m_port2 & 0x10)) { - m_i8155->ale_w(space, BIT(m_port2, 7), offset); - data |= m_i8155->read(space, offset); + m_i8155->ale_w(BIT(m_port2, 7), offset); + data |= m_i8155->data_r(); } if ((m_io_config->read() & 0x02) && !(m_port2 & 0x20)) { // CP3 RAM expansion - m_i8155_cp3->ale_w(space, BIT(m_port2, 7), offset); - data |= m_i8155_cp3->read(space, offset); + m_i8155_cp3->ale_w(BIT(m_port2, 7), offset); + data |= m_i8155_cp3->data_r(); } return data; @@ -139,14 +139,14 @@ WRITE8_MEMBER(cp1_state::i8155_write) { if (!(m_port2 & 0x10)) { - m_i8155->ale_w(space, BIT(m_port2, 7), offset); - m_i8155->write(space, offset, data); + m_i8155->ale_w(BIT(m_port2, 7), offset); + m_i8155->data_w(data); } if ((m_io_config->read() & 0x02) && !(m_port2 & 0x20)) { // CP3 RAM expansion - m_i8155_cp3->ale_w(space, BIT(m_port2, 7), offset); - m_i8155_cp3->write(space, offset, data); + m_i8155_cp3->ale_w(BIT(m_port2, 7), offset); + m_i8155_cp3->data_w(data); } } @@ -244,7 +244,6 @@ void cp1_state::machine_reset() QUICKLOAD_LOAD_MEMBER( cp1_state, quickload ) { - address_space &space = machine().dummy_space(); char line[0x10]; int addr = 0; while (image.fgets(line, 10) && addr < 0x100) @@ -252,8 +251,8 @@ QUICKLOAD_LOAD_MEMBER( cp1_state, quickload ) int op = 0, arg = 0; if (sscanf(line, "%d.%d", &op, &arg) == 2) { - m_i8155->memory_w(space, addr++, op); - m_i8155->memory_w(space, addr++, arg); + m_i8155->memory_w(addr++, op); + m_i8155->memory_w(addr++, arg); } else { diff --git a/src/mame/drivers/vixen.cpp b/src/mame/drivers/vixen.cpp index 2805320a2e3..8ef4f63ca30 100644 --- a/src/mame/drivers/vixen.cpp +++ b/src/mame/drivers/vixen.cpp @@ -259,12 +259,12 @@ void vixen_state::vixen_io(address_map &map) map.global_mask(0xff); map(0x00, 0x03).rw(m_fdc, FUNC(fd1797_device::read), FUNC(fd1797_device::write)); map(0x04, 0x04).mirror(0x03).rw(FUNC(vixen_state::status_r), FUNC(vixen_state::cmd_w)); - map(0x08, 0x08).mirror(0x01).rw(P8155H_TAG, FUNC(i8155_device::read), FUNC(i8155_device::write)); + map(0x08, 0x08).mirror(0x01).rw(P8155H_TAG, FUNC(i8155_device::data_r), FUNC(i8155_device::data_w)); map(0x0c, 0x0d).w(P8155H_TAG, FUNC(i8155_device::ale_w)); map(0x10, 0x10).mirror(0x07).r(m_ieee488, FUNC(ieee488_device::dio_r)); map(0x18, 0x18).mirror(0x07).r(FUNC(vixen_state::ieee488_r)); map(0x20, 0x21).mirror(0x04).w(m_io_i8155, FUNC(i8155_device::ale_w)); - map(0x28, 0x28).mirror(0x05).rw(m_io_i8155, FUNC(i8155_device::read), FUNC(i8155_device::write)); + map(0x28, 0x28).mirror(0x05).rw(m_io_i8155, FUNC(i8155_device::data_r), FUNC(i8155_device::data_w)); map(0x30, 0x31).mirror(0x06).rw(m_usart, FUNC(i8251_device::read), FUNC(i8251_device::write)); map(0x38, 0x38).mirror(0x07).r(FUNC(vixen_state::port3_r)); // AM_RANGE(0xf0, 0xff) Hard Disk? |