From 73e0972d28c563a857832425e5981fcfdc5d305d Mon Sep 17 00:00:00 2001 From: AJR Date: Sun, 31 May 2020 14:54:37 -0400 Subject: [PATCH] pc_vga & co.: Simplify 8-bit handler signatures (nw) --- src/devices/bus/isa/mach32.h | 4 +- src/devices/bus/isa/s3virge.cpp | 36 +++--- src/devices/bus/isa/s3virge.h | 20 +-- src/devices/bus/isa/svga_cirrus.cpp | 20 +-- src/devices/bus/isa/svga_cirrus.h | 4 +- src/devices/bus/isa/svga_s3.cpp | 42 +++---- src/devices/bus/isa/svga_s3.h | 8 +- src/devices/bus/isa/svga_trident.cpp | 20 +-- src/devices/bus/isa/svga_trident.h | 2 +- src/devices/bus/isa/svga_tseng.cpp | 10 +- src/devices/bus/isa/svga_tseng.h | 2 +- src/devices/bus/isa/trident.cpp | 60 ++++----- src/devices/bus/isa/trident.h | 32 ++--- src/devices/bus/isa/vga.cpp | 10 +- src/devices/bus/isa/vga.h | 2 +- src/devices/bus/isa/vga_ati.cpp | 42 +++---- src/devices/bus/isa/vga_ati.h | 6 +- src/devices/video/clgd542x.cpp | 36 +++--- src/devices/video/clgd542x.h | 16 +-- src/devices/video/pc_vga.cpp | 174 +++++++++++++-------------- src/devices/video/pc_vga.h | 84 ++++++------- src/devices/video/virge_pci.cpp | 58 ++++----- src/devices/video/virge_pci.h | 4 +- src/mame/drivers/savquest.cpp | 12 +- src/mame/drivers/vis.cpp | 78 ++++++------ 25 files changed, 391 insertions(+), 391 deletions(-) diff --git a/src/devices/bus/isa/mach32.h b/src/devices/bus/isa/mach32.h index 18d4673ab0f..21478a4a7fd 100644 --- a/src/devices/bus/isa/mach32.h +++ b/src/devices/bus/isa/mach32.h @@ -93,7 +93,7 @@ public: DECLARE_READ16_MEMBER(ibm8514_vtotal_r) { return m_8514a->ibm8514_vtotal_r(space,offset,mem_mask); } DECLARE_WRITE16_MEMBER(ibm8514_vtotal_w) { m_8514a->ibm8514_vtotal_w(space,offset,data,mem_mask); } DECLARE_READ16_MEMBER(ibm8514_htotal_r) { return m_8514a->ibm8514_htotal_r(space,offset,mem_mask); } - DECLARE_WRITE8_MEMBER(ibm8514_htotal_w) { m_8514a->ibm8514_htotal_w(space,offset,data,mem_mask); } + void ibm8514_htotal_w(offs_t offset, uint8_t data) { m_8514a->ibm8514_htotal_w(offset,data); } DECLARE_READ16_MEMBER(ibm8514_vdisp_r) { return m_8514a->ibm8514_vdisp_r(space,offset,mem_mask); } DECLARE_WRITE16_MEMBER(ibm8514_vdisp_w) { m_8514a->ibm8514_vdisp_w(space,offset,data,mem_mask); } DECLARE_READ16_MEMBER(ibm8514_vsync_r) { return m_8514a->ibm8514_vsync_r(space,offset,mem_mask); } @@ -140,7 +140,7 @@ public: DECLARE_WRITE16_MEMBER(mach8_clksel_w) { m_8514a->mach8_clksel_w(space,offset,data,mem_mask); } // read only on the mach8 DECLARE_READ16_MEMBER(mach32_mem_boundary_r) { return m_8514a->mach32_mem_boundary_r(space,offset,mem_mask); } DECLARE_WRITE16_MEMBER(mach32_mem_boundary_w) { m_8514a->mach32_mem_boundary_w(space,offset,data,mem_mask); } // read only on the mach8 - DECLARE_READ8_MEMBER(mach32_status_r) { return m_8514a->ibm8514_status_r(space,offset,mem_mask); } + uint8_t mach32_status_r(offs_t offset) { return m_8514a->ibm8514_status_r(offset); } DECLARE_READ16_MEMBER(mach32_config1_r) { return m_8514a->mach32_config1_r(space,offset,mem_mask); } DECLARE_WRITE16_MEMBER(mach32_horz_overscan_w) { m_8514a->mach32_horz_overscan_w(space,offset,data,mem_mask); } DECLARE_WRITE16_MEMBER(mach32_ge_ext_config_w) { m_8514a->mach32_ge_ext_config_w(space,offset,data,mem_mask); ati_define_video_mode(); } diff --git a/src/devices/bus/isa/s3virge.cpp b/src/devices/bus/isa/s3virge.cpp index 9fa8739a13d..6866ece1828 100644 --- a/src/devices/bus/isa/s3virge.cpp +++ b/src/devices/bus/isa/s3virge.cpp @@ -731,7 +731,7 @@ bit 0 Vertical Total bit 10. Bit 10 of the Vertical Total register (3d4h } -READ8_MEMBER(s3virge_vga_device::port_03b0_r) +uint8_t s3virge_vga_device::port_03b0_r(offs_t offset) { uint8_t res = 0xff; @@ -743,7 +743,7 @@ READ8_MEMBER(s3virge_vga_device::port_03b0_r) res = s3_crtc_reg_read(vga.crtc.index); break; default: - res = vga_device::port_03b0_r(space,offset,mem_mask); + res = vga_device::port_03b0_r(offset); break; } } @@ -751,7 +751,7 @@ READ8_MEMBER(s3virge_vga_device::port_03b0_r) return res; } -WRITE8_MEMBER(s3virge_vga_device::port_03b0_w) +void s3virge_vga_device::port_03b0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3b0) { @@ -762,37 +762,37 @@ WRITE8_MEMBER(s3virge_vga_device::port_03b0_w) s3_crtc_reg_write(vga.crtc.index,data); break; default: - vga_device::port_03b0_w(space,offset,data,mem_mask); + vga_device::port_03b0_w(offset,data); break; } } } -READ8_MEMBER(s3virge_vga_device::port_03c0_r) +uint8_t s3virge_vga_device::port_03c0_r(offs_t offset) { uint8_t res; switch(offset) { default: - res = s3_vga_device::port_03c0_r(space,offset,mem_mask); + res = s3_vga_device::port_03c0_r(offset); break; } return res; } -WRITE8_MEMBER(s3virge_vga_device::port_03c0_w) +void s3virge_vga_device::port_03c0_w(offs_t offset, uint8_t data) { switch(offset) { default: - s3_vga_device::port_03c0_w(space,offset,data,mem_mask); + s3_vga_device::port_03c0_w(offset,data); break; } } -READ8_MEMBER(s3virge_vga_device::port_03d0_r) +uint8_t s3virge_vga_device::port_03d0_r(offs_t offset) { uint8_t res = 0xff; @@ -804,7 +804,7 @@ READ8_MEMBER(s3virge_vga_device::port_03d0_r) res = s3_crtc_reg_read(vga.crtc.index); break; default: - res = vga_device::port_03d0_r(space,offset,mem_mask); + res = vga_device::port_03d0_r(offset); break; } } @@ -812,7 +812,7 @@ READ8_MEMBER(s3virge_vga_device::port_03d0_r) return res; } -WRITE8_MEMBER(s3virge_vga_device::port_03d0_w) +void s3virge_vga_device::port_03d0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3d0) { @@ -823,13 +823,13 @@ WRITE8_MEMBER(s3virge_vga_device::port_03d0_w) s3_crtc_reg_write(vga.crtc.index,data); break; default: - vga_device::port_03d0_w(space,offset,data,mem_mask); + vga_device::port_03d0_w(offset,data); break; } } } -READ8_MEMBER(s3virge_vga_device::mem_r) +uint8_t s3virge_vga_device::mem_r(offs_t offset) { if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en || svga.rgb32_en) { @@ -858,12 +858,12 @@ READ8_MEMBER(s3virge_vga_device::mem_r) return data; } if((offset + (svga.bank_r*0x10000)) < vga.svga_intf.vram_size) - return vga_device::mem_r(space,offset,mem_mask); + return vga_device::mem_r(offset); else return 0xff; } -WRITE8_MEMBER(s3virge_vga_device::mem_w) +void s3virge_vga_device::mem_w(offs_t offset, uint8_t data) { // bit 4 of CR53 enables memory-mapped I/O if(s3.cr53 & 0x10) @@ -897,17 +897,17 @@ WRITE8_MEMBER(s3virge_vga_device::mem_w) } if((offset + (svga.bank_w*0x10000)) < vga.svga_intf.vram_size) - vga_device::mem_w(space,offset,data,mem_mask); + vga_device::mem_w(offset,data); } -READ8_MEMBER(s3virge_vga_device::fb_r) +uint8_t s3virge_vga_device::fb_r(offs_t offset) { if(offset < s3virge.linear_address_size_full) return vga.memory[offset % vga.svga_intf.vram_size]; return 0xff; } -WRITE8_MEMBER(s3virge_vga_device::fb_w) +void s3virge_vga_device::fb_w(offs_t offset, uint8_t data) { if(offset < s3virge.linear_address_size_full) vga.memory[offset % vga.svga_intf.vram_size] = data; diff --git a/src/devices/bus/isa/s3virge.h b/src/devices/bus/isa/s3virge.h index 558dcbad189..a89c5c17e61 100644 --- a/src/devices/bus/isa/s3virge.h +++ b/src/devices/bus/isa/s3virge.h @@ -24,17 +24,17 @@ public: auto linear_config_changed() { return m_linear_config_changed_cb.bind(); } - virtual READ8_MEMBER(port_03b0_r) override; - virtual WRITE8_MEMBER(port_03b0_w) override; - virtual READ8_MEMBER(port_03c0_r) override; - virtual WRITE8_MEMBER(port_03c0_w) override; - virtual READ8_MEMBER(port_03d0_r) override; - virtual WRITE8_MEMBER(port_03d0_w) override; - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t port_03b0_r(offs_t offset) override; + virtual void port_03b0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03c0_r(offs_t offset) override; + virtual void port_03c0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03d0_r(offs_t offset) override; + virtual void port_03d0_w(offs_t offset, uint8_t data) override; + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; - DECLARE_READ8_MEMBER(fb_r); - DECLARE_WRITE8_MEMBER(fb_w); + uint8_t fb_r(offs_t offset); + void fb_w(offs_t offset, uint8_t data); DECLARE_READ32_MEMBER(s3d_sub_status_r); DECLARE_WRITE32_MEMBER(s3d_sub_control_w); DECLARE_READ32_MEMBER(s3d_func_ctrl_r); diff --git a/src/devices/bus/isa/svga_cirrus.cpp b/src/devices/bus/isa/svga_cirrus.cpp index 74b3c581a39..e1cebaf9a32 100644 --- a/src/devices/bus/isa/svga_cirrus.cpp +++ b/src/devices/bus/isa/svga_cirrus.cpp @@ -66,7 +66,7 @@ isa16_svga_cirrus_device::isa16_svga_cirrus_device(const machine_config &mconfig //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_svga_cirrus_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_svga_cirrus_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_svga_cirrus_device::device_start() { @@ -74,11 +74,11 @@ void isa16_svga_cirrus_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "dm_clgd5430"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03b0_w))); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03c0_w))); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03d0_w))); + m_isa->install_device(0x03b0, 0x03bf, read8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(cirrus_gd5430_device::mem_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5430_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::mem_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5430_device::mem_w))); } //------------------------------------------------- @@ -144,7 +144,7 @@ isa16_svga_cirrus_gd542x_device::isa16_svga_cirrus_gd542x_device(const machine_c //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_svga_cirrus_gd542x_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_svga_cirrus_gd542x_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_svga_cirrus_gd542x_device::device_start() { @@ -152,11 +152,11 @@ void isa16_svga_cirrus_gd542x_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "clgd542x"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03b0_w))); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03c0_w))); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03d0_w))); + m_isa->install_device(0x03b0, 0x03bf, read8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(cirrus_gd5428_device::mem_r)), write8_delegate(*m_vga, FUNC(cirrus_gd5428_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::mem_r)), write8sm_delegate(*m_vga, FUNC(cirrus_gd5428_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_cirrus.h b/src/devices/bus/isa/svga_cirrus.h index c1a97a5730b..d2e7d75595c 100644 --- a/src/devices/bus/isa/svga_cirrus.h +++ b/src/devices/bus/isa/svga_cirrus.h @@ -20,7 +20,7 @@ public: // construction/destruction isa16_svga_cirrus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides @@ -43,7 +43,7 @@ public: // construction/destruction isa16_svga_cirrus_gd542x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides diff --git a/src/devices/bus/isa/svga_s3.cpp b/src/devices/bus/isa/svga_s3.cpp index 26225d06215..66f563e0e14 100644 --- a/src/devices/bus/isa/svga_s3.cpp +++ b/src/devices/bus/isa/svga_s3.cpp @@ -76,7 +76,7 @@ isa16_svga_s3_device::isa16_svga_s3_device(const machine_config &mconfig, const //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_svga_s3_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_svga_s3_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_svga_s3_device::device_start() { @@ -84,9 +84,9 @@ void isa16_svga_s3_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3_764"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::port_03b0_w))); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::port_03c0_w))); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::port_03d0_w))); + m_isa->install_device(0x03b0, 0x03bf, read8sm_delegate(*m_vga, FUNC(s3_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(s3_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8sm_delegate(*m_vga, FUNC(s3_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(s3_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8sm_delegate(*m_vga, FUNC(s3_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(s3_vga_device::port_03d0_w))); m_isa->install16_device(0x82e8, 0x82eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currenty_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currenty_w))); m_isa->install16_device(0x86e8, 0x86eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currentx_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_currentx_w))); m_isa->install16_device(0x8ae8, 0x8aeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_desty_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_desty_w))); @@ -104,7 +104,7 @@ void isa16_svga_s3_device::device_start() m_isa->install16_device(0xbee8, 0xbeeb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_multifunc_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_multifunc_w))); m_isa->install16_device(0xe2e8, 0xe2eb, read16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_pixel_xfer_r)), write16_delegate(*m_8514, FUNC(ibm8514a_device::ibm8514_pixel_xfer_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(s3_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(s3_vga_device::mem_w))); } //------------------------------------------------- @@ -190,7 +190,7 @@ isa16_s3virge_device::isa16_s3virge_device(const machine_config &mconfig, const //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_s3virge_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_s3virge_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_s3virge_device::device_start() { @@ -198,11 +198,11 @@ void isa16_s3virge_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virge"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); + m_isa->install_device(0x03b0, 0x03bf, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); } //------------------------------------------------- @@ -261,7 +261,7 @@ WRITE_LINE_MEMBER(isa16_s3virgedx_device::linear_config_changed_w) } m_lfb_start = m_vga->get_linear_address(); m_lfb_end = m_lfb_start + m_vga->get_linear_address_size_full() - 1; - m_isa->install_memory(m_lfb_start, m_lfb_end, read8_delegate(*m_vga, FUNC(s3virge_vga_device::fb_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::fb_w))); + m_isa->install_memory(m_lfb_start, m_lfb_end, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::fb_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::fb_w))); } else { @@ -296,7 +296,7 @@ isa16_s3virgedx_device::isa16_s3virgedx_device(const machine_config &mconfig, co //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_s3virgedx_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_s3virgedx_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_s3virgedx_device::device_start() { @@ -304,11 +304,11 @@ void isa16_s3virgedx_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "s3virgedx"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); + m_isa->install_device(0x03b0, 0x03bf, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); save_item(NAME(m_lfb_enable)); save_item(NAME(m_lfb_start)); @@ -394,7 +394,7 @@ isa16_stealth3d2kpro_device::isa16_stealth3d2kpro_device(const machine_config &m //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_stealth3d2kpro_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_stealth3d2kpro_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_stealth3d2kpro_device::device_start() { @@ -402,11 +402,11 @@ void isa16_stealth3d2kpro_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "svga", "stealth3d"); - m_isa->install_device(0x03b0, 0x03bf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); - m_isa->install_device(0x03c0, 0x03cf, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); - m_isa->install_device(0x03d0, 0x03df, read8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); + m_isa->install_device(0x03b0, 0x03bf, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03b0_w))); + m_isa->install_device(0x03c0, 0x03cf, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03c0_w))); + m_isa->install_device(0x03d0, 0x03df, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(s3virge_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(s3virge_vga_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_s3.h b/src/devices/bus/isa/svga_s3.h index 3c4e891c750..a07b0e039c6 100644 --- a/src/devices/bus/isa/svga_s3.h +++ b/src/devices/bus/isa/svga_s3.h @@ -23,7 +23,7 @@ public: // construction/destruction isa16_svga_s3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides @@ -47,7 +47,7 @@ public: // construction/destruction isa16_s3virge_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides @@ -72,7 +72,7 @@ public: // construction/destruction isa16_s3virgedx_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides @@ -100,7 +100,7 @@ public: // construction/destruction isa16_stealth3d2kpro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides diff --git a/src/devices/bus/isa/svga_trident.cpp b/src/devices/bus/isa/svga_trident.cpp index bc07c57a425..5c934e99bf0 100644 --- a/src/devices/bus/isa/svga_trident.cpp +++ b/src/devices/bus/isa/svga_trident.cpp @@ -66,7 +66,7 @@ isa16_svga_tgui9680_device::isa16_svga_tgui9680_device(const machine_config &mco //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_svga_tgui9680_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_svga_tgui9680_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_svga_tgui9680_device::device_start() { @@ -74,22 +74,22 @@ void isa16_svga_tgui9680_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "tgui9680", "tgui9680"); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(trident_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_03b0_w))); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(trident_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_03c0_w))); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(trident_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_03d0_w))); - m_isa->install_device(0x43c4, 0x43cb, read8_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_w))); - m_isa->install_device(0x83c4, 0x83cb, read8_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_w))); + m_isa->install_device(0x3b0, 0x3bf, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_03d0_w))); + m_isa->install_device(0x43c4, 0x43cb, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_43c6_w))); + m_isa->install_device(0x83c4, 0x83cb, read8sm_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::port_83c6_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(trident_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::mem_w))); // uncomment to test Windows 3.1 TGUI9440AGi driver -// m_isa->install_memory(0x4400000, 0x45fffff, read8_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::vram_w))); +// m_isa->install_memory(0x4400000, 0x45fffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_w))); // win95 drivers -// m_isa->install_memory(0x4000000, 0x41fffff, read8_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8_delegate(FUNC(*m_vga, trident_vga_device::vram_w))); +// m_isa->install_memory(0x4000000, 0x41fffff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::vram_r)), write8sm_delegate(FUNC(*m_vga, trident_vga_device::vram_w))); // acceleration ports - m_isa->install_device(0x2120, 0x21ff, read8_delegate(*m_vga, FUNC(trident_vga_device::accel_r)), write8_delegate(*m_vga, FUNC(trident_vga_device::accel_w))); + m_isa->install_device(0x2120, 0x21ff, read8sm_delegate(*m_vga, FUNC(trident_vga_device::accel_r)), write8sm_delegate(*m_vga, FUNC(trident_vga_device::accel_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/svga_trident.h b/src/devices/bus/isa/svga_trident.h index 47019e6b16e..c5c7bfdcf1d 100644 --- a/src/devices/bus/isa/svga_trident.h +++ b/src/devices/bus/isa/svga_trident.h @@ -27,7 +27,7 @@ public: // construction/destruction isa16_svga_tgui9680_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides diff --git a/src/devices/bus/isa/svga_tseng.cpp b/src/devices/bus/isa/svga_tseng.cpp index 53dc3d72a5d..48ee7324b2e 100644 --- a/src/devices/bus/isa/svga_tseng.cpp +++ b/src/devices/bus/isa/svga_tseng.cpp @@ -65,7 +65,7 @@ isa8_svga_et4k_device::isa8_svga_et4k_device(const machine_config &mconfig, cons //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa8_svga_et4k_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa8_svga_et4k_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa8_svga_et4k_device::device_start() { @@ -102,14 +102,14 @@ void isa8_svga_et4k_device::remap(int space_id, offs_t start, offs_t end) void isa8_svga_et4k_device::map_io() { - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(tseng_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::port_03b0_w))); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(tseng_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::port_03c0_w))); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(tseng_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::port_03d0_w))); + m_isa->install_device(0x3b0, 0x3bf, read8sm_delegate(*m_vga, FUNC(tseng_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(tseng_vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8sm_delegate(*m_vga, FUNC(tseng_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(tseng_vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*m_vga, FUNC(tseng_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(tseng_vga_device::port_03d0_w))); } void isa8_svga_et4k_device::map_ram() { - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(tseng_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(tseng_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(tseng_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(tseng_vga_device::mem_w))); } void isa8_svga_et4k_device::map_rom() diff --git a/src/devices/bus/isa/svga_tseng.h b/src/devices/bus/isa/svga_tseng.h index f267aad2634..690956741b5 100644 --- a/src/devices/bus/isa/svga_tseng.h +++ b/src/devices/bus/isa/svga_tseng.h @@ -22,7 +22,7 @@ public: // construction/destruction isa8_svga_et4k_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); virtual void remap(int space_id, offs_t start, offs_t end) override; diff --git a/src/devices/bus/isa/trident.cpp b/src/devices/bus/isa/trident.cpp index 9110c2205ef..0d64df5ba27 100644 --- a/src/devices/bus/isa/trident.cpp +++ b/src/devices/bus/isa/trident.cpp @@ -787,7 +787,7 @@ void trident_vga_device::trident_gc_reg_write(uint8_t index, uint8_t data) if(LOG) logerror("Trident GC%02X: write %02x\n",index,data); } -READ8_MEMBER(trident_vga_device::port_03c0_r) +uint8_t trident_vga_device::port_03c0_r(offs_t offset) { uint8_t res; @@ -803,27 +803,27 @@ READ8_MEMBER(trident_vga_device::port_03c0_r) if(tri.dac_active) res = tri.dac; else - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; case 0x07: case 0x08: case 0x09: tri.dac_active = false; tri.dac_count = 0; - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; case 0x0f: res = trident_gc_reg_read(vga.gc.index); break; default: - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; } return res; } -WRITE8_MEMBER(trident_vga_device::port_03c0_w) +void trident_vga_device::port_03c0_w(offs_t offset, uint8_t data) { switch(offset) { @@ -839,26 +839,26 @@ WRITE8_MEMBER(trident_vga_device::port_03c0_w) trident_define_video_mode(); } else - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); break; case 0x07: case 0x08: case 0x09: tri.dac_active = false; tri.dac_count = 0; - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); break; case 0x0f: trident_gc_reg_write(vga.gc.index,data); break; default: - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); break; } } -READ8_MEMBER(trident_vga_device::port_03d0_r) +uint8_t trident_vga_device::port_03d0_r(offs_t offset) { uint8_t res = 0xff; @@ -890,7 +890,7 @@ READ8_MEMBER(trident_vga_device::port_03d0_r) res = tri.port_3db; break; default: - res = vga_device::port_03d0_r(space,offset,mem_mask); + res = vga_device::port_03d0_r(offset); break; } } @@ -898,7 +898,7 @@ READ8_MEMBER(trident_vga_device::port_03d0_r) return res; } -WRITE8_MEMBER(trident_vga_device::port_03d0_w) +void trident_vga_device::port_03d0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3d0) { @@ -934,13 +934,13 @@ WRITE8_MEMBER(trident_vga_device::port_03d0_w) tri.port_3db = data; // no info on this port? Bit 5 appears to be a clock divider... break; default: - vga_device::port_03d0_w(space,offset,data,mem_mask); + vga_device::port_03d0_w(offset,data); break; } } } -READ8_MEMBER(trident_vga_device::port_43c6_r) +uint8_t trident_vga_device::port_43c6_r(offs_t offset) { uint8_t res = 0xff; switch(offset) @@ -961,7 +961,7 @@ READ8_MEMBER(trident_vga_device::port_43c6_r) return res; } -WRITE8_MEMBER(trident_vga_device::port_43c6_w) +void trident_vga_device::port_43c6_w(offs_t offset, uint8_t data) { switch(offset) { @@ -998,7 +998,7 @@ WRITE8_MEMBER(trident_vga_device::port_43c6_w) // Trident refers to these registers as a LUTDAC // Not much else is known. XFree86 uses register 4 for something related to DPMS -READ8_MEMBER(trident_vga_device::port_83c6_r) +uint8_t trident_vga_device::port_83c6_r(offs_t offset) { uint8_t res = 0xff; switch(offset) @@ -1015,7 +1015,7 @@ READ8_MEMBER(trident_vga_device::port_83c6_r) return res; } -WRITE8_MEMBER(trident_vga_device::port_83c6_w) +void trident_vga_device::port_83c6_w(offs_t offset, uint8_t data) { switch(offset) { @@ -1030,7 +1030,7 @@ WRITE8_MEMBER(trident_vga_device::port_83c6_w) } } -READ8_MEMBER(trident_vga_device::vram_r) +uint8_t trident_vga_device::vram_r(offs_t offset) { if (tri.linear_active) return vga.memory[offset % vga.svga_intf.vram_size]; @@ -1038,7 +1038,7 @@ READ8_MEMBER(trident_vga_device::vram_r) return 0xff; } -WRITE8_MEMBER(trident_vga_device::vram_w) +void trident_vga_device::vram_w(offs_t offset, uint8_t data) { if (tri.linear_active) { @@ -1053,11 +1053,11 @@ WRITE8_MEMBER(trident_vga_device::vram_w) } } -READ8_MEMBER(trident_vga_device::mem_r ) +uint8_t trident_vga_device::mem_r(offs_t offset) { if((tri.cr20 & 0x10) && (offset >= 0x1ff00)) // correct for old MMIO? { - return old_mmio_r(space,offset-0x1ff00); + return old_mmio_r(offset-0x1ff00); } if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb32_en) @@ -1076,14 +1076,14 @@ READ8_MEMBER(trident_vga_device::mem_r ) return data; } - return vga_device::mem_r(space,offset,mem_mask); + return vga_device::mem_r(offset); } -WRITE8_MEMBER(trident_vga_device::mem_w) +void trident_vga_device::mem_w(offs_t offset, uint8_t data) { if((tri.cr20 & 0x10) && (offset >= 0x1ff00)) // correct for old MMIO? { - old_mmio_w(space,offset-0x1ff00,data); + old_mmio_w(offset-0x1ff00,data); return; } @@ -1109,17 +1109,17 @@ WRITE8_MEMBER(trident_vga_device::mem_w) return; } - vga_device::mem_w(space,offset,data,mem_mask); + vga_device::mem_w(offset,data); } // Old style MMIO (maps to 0xbff00) -void trident_vga_device::old_mmio_w(address_space& space, uint32_t offset, uint8_t data) +void trident_vga_device::old_mmio_w(offs_t offset, uint8_t data) { if(offset >= 0x20) - accel_w(space,offset-0x20,data); + accel_w(offset-0x20,data); } -uint8_t trident_vga_device::old_mmio_r(address_space& space, uint32_t offset) +uint8_t trident_vga_device::old_mmio_r(offs_t offset) { if(offset == 0x20) { @@ -1127,7 +1127,7 @@ uint8_t trident_vga_device::old_mmio_r(address_space& space, uint32_t offset) return 0x20; } if(offset > 0x20) - return accel_r(space,offset-0x20); + return accel_r(offset-0x20); else return 0x00; } @@ -1195,7 +1195,7 @@ Graphics Engine for 9440/9660/9680 #define GER_DSTCLIP_Y 0x214E // Word */ -READ8_MEMBER(trident_vga_device::accel_r) +uint8_t trident_vga_device::accel_r(offs_t offset) { uint8_t res = 0xff; @@ -1230,7 +1230,7 @@ READ8_MEMBER(trident_vga_device::accel_r) return res; } -WRITE8_MEMBER(trident_vga_device::accel_w) +void trident_vga_device::accel_w(offs_t offset, uint8_t data) { if(offset >= 0x60) { diff --git a/src/devices/bus/isa/trident.h b/src/devices/bus/isa/trident.h index eadd479f14c..3dc8f63947c 100644 --- a/src/devices/bus/isa/trident.h +++ b/src/devices/bus/isa/trident.h @@ -17,22 +17,22 @@ class trident_vga_device : public svga_device { public: - virtual READ8_MEMBER(port_03c0_r) override; - virtual WRITE8_MEMBER(port_03c0_w) override; - virtual READ8_MEMBER(port_03d0_r) override; - virtual WRITE8_MEMBER(port_03d0_w) override; - DECLARE_READ8_MEMBER(port_83c6_r); - DECLARE_WRITE8_MEMBER(port_83c6_w); - DECLARE_READ8_MEMBER(port_43c6_r); - DECLARE_WRITE8_MEMBER(port_43c6_w); - DECLARE_READ8_MEMBER(vram_r); - DECLARE_WRITE8_MEMBER(vram_w); - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t port_03c0_r(offs_t offset) override; + virtual void port_03c0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03d0_r(offs_t offset) override; + virtual void port_03d0_w(offs_t offset, uint8_t data) override; + uint8_t port_83c6_r(offs_t offset); + void port_83c6_w(offs_t offset, uint8_t data); + uint8_t port_43c6_r(offs_t offset); + void port_43c6_w(offs_t offset, uint8_t data); + uint8_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint8_t data); + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; virtual uint16_t offset() override; - DECLARE_READ8_MEMBER(accel_r); - DECLARE_WRITE8_MEMBER(accel_w); + uint8_t accel_r(offs_t offset); + void accel_w(offs_t offset, uint8_t data); virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; @@ -128,8 +128,8 @@ private: int calculate_clock(); // old style MMIO (0xBFF00) - void old_mmio_w(address_space& space, uint32_t offset, uint8_t data); - uint8_t old_mmio_r(address_space& space, uint32_t offset); + void old_mmio_w(offs_t offset, uint8_t data); + uint8_t old_mmio_r(offs_t offset); // 2D acceleration void accel_command(); diff --git a/src/devices/bus/isa/vga.cpp b/src/devices/bus/isa/vga.cpp index 3fafec340b0..9772690c46e 100644 --- a/src/devices/bus/isa/vga.cpp +++ b/src/devices/bus/isa/vga.cpp @@ -63,7 +63,7 @@ isa8_vga_device::isa8_vga_device(const machine_config &mconfig, const char *tag, //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER( isa8_vga_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa8_vga_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa8_vga_device::device_start() { @@ -71,11 +71,11 @@ void isa8_vga_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "ibm_vga", "ibm_vga"); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03b0_w))); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03c0_w))); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03d0_w))); + m_isa->install_device(0x3b0, 0x3bf, read8sm_delegate(*m_vga, FUNC(vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8sm_delegate(*m_vga, FUNC(vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*m_vga, FUNC(vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(vga_device::port_03d0_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(vga_device::mem_r)), write8_delegate(*m_vga, FUNC(vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(vga_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/vga.h b/src/devices/bus/isa/vga.h index 4f18d8ff053..c1b4d7226aa 100644 --- a/src/devices/bus/isa/vga.h +++ b/src/devices/bus/isa/vga.h @@ -22,7 +22,7 @@ public: // construction/destruction isa8_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides diff --git a/src/devices/bus/isa/vga_ati.cpp b/src/devices/bus/isa/vga_ati.cpp index 37617ae62d4..054033ea21f 100644 --- a/src/devices/bus/isa/vga_ati.cpp +++ b/src/devices/bus/isa/vga_ati.cpp @@ -155,9 +155,9 @@ isa16_vga_mach64_device::isa16_vga_mach64_device(const machine_config &mconfig, //------------------------------------------------- // device_start - device-specific startup //------------------------------------------------- -READ8_MEMBER(isa16_vga_gfxultra_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } -READ8_MEMBER(isa16_vga_gfxultrapro_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } -READ8_MEMBER(isa16_vga_mach64_device::input_port_0_r ) { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_vga_gfxultra_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_vga_gfxultrapro_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } +uint8_t isa16_vga_mach64_device::input_port_0_r() { return 0xff; } //return machine().root_device().ioport("IN0")->read(); } void isa16_vga_gfxultra_device::device_start() { @@ -165,11 +165,11 @@ void isa16_vga_gfxultra_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "gfxultra"); - m_isa->install_device(0x1ce, 0x1cf, read8_delegate(*m_vga, FUNC(ati_vga_device::ati_port_ext_r)), write8_delegate(*m_vga, FUNC(ati_vga_device::ati_port_ext_w))); - m_isa->install_device(0x2e8, 0x2ef, read8_delegate(*m_8514, FUNC(mach8_device::ibm8514_status_r)), write8_delegate(*m_8514, FUNC(mach8_device::ibm8514_htotal_w))); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(ati_vga_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03b0_w))); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(ati_vga_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03c0_w))); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(ati_vga_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(vga_device::port_03d0_w))); + m_isa->install_device(0x1ce, 0x1cf, read8sm_delegate(*m_vga, FUNC(ati_vga_device::ati_port_ext_r)), write8sm_delegate(*m_vga, FUNC(ati_vga_device::ati_port_ext_w))); + m_isa->install_device(0x2e8, 0x2ef, read8sm_delegate(*m_8514, FUNC(mach8_device::ibm8514_status_r)), write8sm_delegate(*m_8514, FUNC(mach8_device::ibm8514_htotal_w))); + m_isa->install_device(0x3b0, 0x3bf, read8sm_delegate(*m_vga, FUNC(ati_vga_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(vga_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8sm_delegate(*m_vga, FUNC(ati_vga_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(vga_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*m_vga, FUNC(ati_vga_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(vga_device::port_03d0_w))); m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vtotal_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vtotal_w))); m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_config1_r)), write16_delegate(*this)); m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vdisp_r)), write16_delegate(*m_8514, FUNC(mach8_device::ibm8514_vdisp_w))); @@ -217,7 +217,7 @@ void isa16_vga_gfxultra_device::device_start() m_isa->install16_device(0xdeec, 0xdeef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_sourcey_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_ext_topscissor_w))); m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(*m_8514, FUNC(mach8_device::mach8_linedraw_r)), write16_delegate(*m_8514, FUNC(mach8_device::mach8_linedraw_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(ati_vga_device::mem_r)), write8_delegate(*m_vga, FUNC(ati_vga_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(ati_vga_device::mem_r)), write8sm_delegate(*m_vga, FUNC(ati_vga_device::mem_w))); } void isa16_vga_gfxultrapro_device::device_start() @@ -226,11 +226,11 @@ void isa16_vga_gfxultrapro_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "gfxultrapro"); - m_isa->install_device(0x1ce, 0x1cf, read8_delegate(*m_vga, FUNC(mach32_device::ati_port_ext_r)), write8_delegate(*m_vga, FUNC(mach32_device::ati_port_ext_w))); - m_isa->install_device(0x2e8, 0x2ef, read8_delegate(*m_vga, FUNC(mach32_device::mach32_status_r)), write8_delegate(*m_vga, FUNC(mach32_device::ibm8514_htotal_w))); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(mach32_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(mach32_device::port_03b0_w))); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(mach32_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(mach32_device::port_03c0_w))); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(mach32_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(mach32_device::port_03d0_w))); + m_isa->install_device(0x1ce, 0x1cf, read8sm_delegate(*m_vga, FUNC(mach32_device::ati_port_ext_r)), write8sm_delegate(*m_vga, FUNC(mach32_device::ati_port_ext_w))); + m_isa->install_device(0x2e8, 0x2ef, read8sm_delegate(*m_vga, FUNC(mach32_device::mach32_status_r)), write8sm_delegate(*m_vga, FUNC(mach32_device::ibm8514_htotal_w))); + m_isa->install_device(0x3b0, 0x3bf, read8sm_delegate(*m_vga, FUNC(mach32_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(mach32_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8sm_delegate(*m_vga, FUNC(mach32_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(mach32_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*m_vga, FUNC(mach32_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(mach32_device::port_03d0_w))); m_isa->install16_device(0xaec, 0xaef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_l_w))); m_isa->install16_device(0xeec, 0xeef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_readonly_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach32_cursor_h_w))); m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vtotal_r)), write16_delegate(*m_vga, FUNC(mach32_device::ibm8514_vtotal_w))); @@ -286,7 +286,7 @@ void isa16_vga_gfxultrapro_device::device_start() m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(*m_vga, FUNC(mach32_device::mach32_chipid_r)), write16_delegate(*this)); m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(*m_vga, FUNC(mach32_device::mach8_linedraw_r)), write16_delegate(*m_vga, FUNC(mach32_device::mach8_linedraw_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(mach32_device::mem_r)), write8_delegate(*m_vga, FUNC(mach32_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(mach32_device::mem_r)), write8sm_delegate(*m_vga, FUNC(mach32_device::mem_w))); } void isa16_vga_mach64_device::device_start() @@ -295,11 +295,11 @@ void isa16_vga_mach64_device::device_start() m_isa->install_rom(this, 0xc0000, 0xc7fff, "vga", "mach64"); - m_isa->install_device(0x1ce, 0x1cf, read8_delegate(*m_vga, FUNC(mach64_device::ati_port_ext_r)), write8_delegate(*m_vga, FUNC(mach64_device::ati_port_ext_w))); - m_isa->install_device(0x2e8, 0x2ef, read8_delegate(*m_vga, FUNC(mach64_device::mach32_status_r)), write8_delegate(*m_vga, FUNC(mach64_device::ibm8514_htotal_w))); - m_isa->install_device(0x3b0, 0x3bf, read8_delegate(*m_vga, FUNC(mach64_device::port_03b0_r)), write8_delegate(*m_vga, FUNC(mach64_device::port_03b0_w))); - m_isa->install_device(0x3c0, 0x3cf, read8_delegate(*m_vga, FUNC(mach64_device::port_03c0_r)), write8_delegate(*m_vga, FUNC(mach64_device::port_03c0_w))); - m_isa->install_device(0x3d0, 0x3df, read8_delegate(*m_vga, FUNC(mach64_device::port_03d0_r)), write8_delegate(*m_vga, FUNC(mach64_device::port_03d0_w))); + m_isa->install_device(0x1ce, 0x1cf, read8sm_delegate(*m_vga, FUNC(mach64_device::ati_port_ext_r)), write8sm_delegate(*m_vga, FUNC(mach64_device::ati_port_ext_w))); + m_isa->install_device(0x2e8, 0x2ef, read8sm_delegate(*m_vga, FUNC(mach64_device::mach32_status_r)), write8sm_delegate(*m_vga, FUNC(mach64_device::ibm8514_htotal_w))); + m_isa->install_device(0x3b0, 0x3bf, read8sm_delegate(*m_vga, FUNC(mach64_device::port_03b0_r)), write8sm_delegate(*m_vga, FUNC(mach64_device::port_03b0_w))); + m_isa->install_device(0x3c0, 0x3cf, read8sm_delegate(*m_vga, FUNC(mach64_device::port_03c0_r)), write8sm_delegate(*m_vga, FUNC(mach64_device::port_03c0_w))); + m_isa->install_device(0x3d0, 0x3df, read8sm_delegate(*m_vga, FUNC(mach64_device::port_03d0_r)), write8sm_delegate(*m_vga, FUNC(mach64_device::port_03d0_w))); m_isa->install16_device(0x12e8, 0x12eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vtotal_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vtotal_w))); m_isa->install16_device(0x12ec, 0x12ef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_config1_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach64_config1_w))); m_isa->install16_device(0x16e8, 0x16eb, read16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vdisp_r)), write16_delegate(*m_vga, FUNC(mach64_device::ibm8514_vdisp_w))); @@ -348,7 +348,7 @@ void isa16_vga_mach64_device::device_start() m_isa->install16_device(0xfaec, 0xfaef, read16_delegate(*m_vga, FUNC(mach64_device::mach32_chipid_r)), write16_delegate(*this)); m_isa->install16_device(0xfeec, 0xfeef, read16_delegate(*m_vga, FUNC(mach64_device::mach8_linedraw_r)), write16_delegate(*m_vga, FUNC(mach64_device::mach8_linedraw_w))); - m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(*m_vga, FUNC(mach64_device::mem_r)), write8_delegate(*m_vga, FUNC(mach64_device::mem_w))); + m_isa->install_memory(0xa0000, 0xbffff, read8sm_delegate(*m_vga, FUNC(mach64_device::mem_r)), write8sm_delegate(*m_vga, FUNC(mach64_device::mem_w))); } //------------------------------------------------- diff --git a/src/devices/bus/isa/vga_ati.h b/src/devices/bus/isa/vga_ati.h index f05b2fdae2d..f92f3c563ca 100644 --- a/src/devices/bus/isa/vga_ati.h +++ b/src/devices/bus/isa/vga_ati.h @@ -30,7 +30,7 @@ public: // construction/destruction isa16_vga_gfxultra_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides @@ -54,7 +54,7 @@ public: // construction/destruction isa16_vga_gfxultrapro_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides @@ -77,7 +77,7 @@ public: // construction/destruction isa16_vga_mach64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(input_port_0_r); + uint8_t input_port_0_r(); protected: // device-level overrides diff --git a/src/devices/video/clgd542x.cpp b/src/devices/video/clgd542x.cpp index f9bdf1a288a..ace2e7a4820 100644 --- a/src/devices/video/clgd542x.cpp +++ b/src/devices/video/clgd542x.cpp @@ -923,7 +923,7 @@ void cirrus_gd5428_device::cirrus_gc_reg_write(uint8_t index, uint8_t data) } } -READ8_MEMBER(cirrus_gd5428_device::port_03c0_r) +uint8_t cirrus_gd5428_device::port_03c0_r(offs_t offset) { uint8_t res = 0xff; @@ -934,7 +934,7 @@ READ8_MEMBER(cirrus_gd5428_device::port_03c0_r) break; case 0x09: if(!m_ext_palette_enabled) - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); else { if (vga.dac.read) @@ -964,14 +964,14 @@ READ8_MEMBER(cirrus_gd5428_device::port_03c0_r) res = cirrus_gc_reg_read(vga.gc.index); break; default: - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; } return res; } -WRITE8_MEMBER(cirrus_gd5428_device::port_03c0_w) +void cirrus_gd5428_device::port_03c0_w(offs_t offset, uint8_t data) { switch(offset) { @@ -980,7 +980,7 @@ WRITE8_MEMBER(cirrus_gd5428_device::port_03c0_w) break; case 0x09: if(!m_ext_palette_enabled) - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); else { if (!vga.dac.read) @@ -1009,13 +1009,13 @@ WRITE8_MEMBER(cirrus_gd5428_device::port_03c0_w) cirrus_gc_reg_write(vga.gc.index,data); break; default: - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); break; } cirrus_define_video_mode(); } -READ8_MEMBER(cirrus_gd5428_device::port_03b0_r) +uint8_t cirrus_gd5428_device::port_03b0_r(offs_t offset) { uint8_t res = 0xff; @@ -1027,7 +1027,7 @@ READ8_MEMBER(cirrus_gd5428_device::port_03b0_r) res = cirrus_crtc_reg_read(vga.crtc.index); break; default: - res = vga_device::port_03b0_r(space,offset,mem_mask); + res = vga_device::port_03b0_r(offset); break; } } @@ -1035,7 +1035,7 @@ READ8_MEMBER(cirrus_gd5428_device::port_03b0_r) return res; } -READ8_MEMBER(cirrus_gd5428_device::port_03d0_r) +uint8_t cirrus_gd5428_device::port_03d0_r(offs_t offset) { uint8_t res = 0xff; @@ -1047,7 +1047,7 @@ READ8_MEMBER(cirrus_gd5428_device::port_03d0_r) res = cirrus_crtc_reg_read(vga.crtc.index); break; default: - res = vga_device::port_03d0_r(space,offset,mem_mask); + res = vga_device::port_03d0_r(offset); break; } } @@ -1055,7 +1055,7 @@ READ8_MEMBER(cirrus_gd5428_device::port_03d0_r) return res; } -WRITE8_MEMBER(cirrus_gd5428_device::port_03b0_w) +void cirrus_gd5428_device::port_03b0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3b0) { @@ -1066,14 +1066,14 @@ WRITE8_MEMBER(cirrus_gd5428_device::port_03b0_w) cirrus_crtc_reg_write(vga.crtc.index,data); break; default: - vga_device::port_03b0_w(space,offset,data,mem_mask); + vga_device::port_03b0_w(offset,data); break; } } cirrus_define_video_mode(); } -WRITE8_MEMBER(cirrus_gd5428_device::port_03d0_w) +void cirrus_gd5428_device::port_03d0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3d0) { @@ -1084,7 +1084,7 @@ WRITE8_MEMBER(cirrus_gd5428_device::port_03d0_w) cirrus_crtc_reg_write(vga.crtc.index,data); break; default: - vga_device::port_03d0_w(space,offset,data,mem_mask); + vga_device::port_03d0_w(offset,data); break; } } @@ -1194,14 +1194,14 @@ inline uint8_t cirrus_gd5428_device::cirrus_vga_latch_write(int offs, uint8_t da return res; } -READ8_MEMBER(cirrus_gd5428_device::mem_r) +uint8_t cirrus_gd5428_device::mem_r(offs_t offset) { uint32_t addr; uint8_t bank; uint8_t cur_mode = pc_vga_choosevideomode(); if(gc_locked || offset >= 0x10000 || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) - return vga_device::mem_r(space,offset,mem_mask); + return vga_device::mem_r(offset); if(offset >= 0x8000 && offset < 0x10000 && (gc_mode_ext & 0x01)) // if accessing bank 1 (if enabled) bank = gc_bank_1; @@ -1325,7 +1325,7 @@ READ8_MEMBER(cirrus_gd5428_device::mem_r) } } -WRITE8_MEMBER(cirrus_gd5428_device::mem_w) +void cirrus_gd5428_device::mem_w(offs_t offset, uint8_t data) { uint32_t addr; uint8_t bank; @@ -1356,7 +1356,7 @@ WRITE8_MEMBER(cirrus_gd5428_device::mem_w) if(gc_locked || offset >= 0x10000 || cur_mode == TEXT_MODE || cur_mode == SCREEN_OFF) { - vga_device::mem_w(space,offset,data,mem_mask); + vga_device::mem_w(offset,data); return; } diff --git a/src/devices/video/clgd542x.h b/src/devices/video/clgd542x.h index a54acb7460d..6177b95c845 100644 --- a/src/devices/video/clgd542x.h +++ b/src/devices/video/clgd542x.h @@ -18,14 +18,14 @@ public: // construction/destruction cirrus_gd5428_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual READ8_MEMBER(port_03c0_r) override; - virtual WRITE8_MEMBER(port_03c0_w) override; - virtual READ8_MEMBER(port_03b0_r) override; - virtual WRITE8_MEMBER(port_03b0_w) override; - virtual READ8_MEMBER(port_03d0_r) override; - virtual WRITE8_MEMBER(port_03d0_w) override; - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t port_03c0_r(offs_t offset) override; + virtual void port_03c0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03b0_r(offs_t offset) override; + virtual void port_03b0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03d0_r(offs_t offset) override; + virtual void port_03d0_w(offs_t offset, uint8_t data) override; + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; diff --git a/src/devices/video/pc_vga.cpp b/src/devices/video/pc_vga.cpp index db89bd2fd78..b2a799341b7 100644 --- a/src/devices/video/pc_vga.cpp +++ b/src/devices/video/pc_vga.cpp @@ -1635,7 +1635,7 @@ uint8_t vga_device::vga_vblank() return res; } -READ8_MEMBER(vga_device::vga_crtc_r) +uint8_t vga_device::vga_crtc_r(offs_t offset) { uint8_t data = 0xff; @@ -1685,7 +1685,7 @@ READ8_MEMBER(vga_device::vga_crtc_r) return data; } -WRITE8_MEMBER(vga_device::vga_crtc_w) +void vga_device::vga_crtc_w(offs_t offset, uint8_t data) { switch (offset) { @@ -1718,11 +1718,11 @@ WRITE8_MEMBER(vga_device::vga_crtc_w) -READ8_MEMBER(vga_device::port_03b0_r) +uint8_t vga_device::port_03b0_r(offs_t offset) { uint8_t data = 0xff; if (CRTC_PORT_ADDR==0x3b0) - data=vga_crtc_r(space, offset, mem_mask); + data = vga_crtc_r(offset); return data; } @@ -1774,7 +1774,7 @@ uint8_t vga_device::gc_reg_read(uint8_t index) return res; } -READ8_MEMBER(vga_device::port_03c0_r) +uint8_t vga_device::port_03c0_r(offs_t offset) { uint8_t data = 0xff; @@ -1797,25 +1797,25 @@ READ8_MEMBER(vga_device::port_03c0_r) switch ((vga.miscellaneous_output>>2)&3) { case 3: - if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x01) + if (!vga.read_dipswitch.isnull() && vga.read_dipswitch() & 0x01) data |= 0x10; else data |= 0x10; break; case 2: - if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x02) + if (!vga.read_dipswitch.isnull() && vga.read_dipswitch() & 0x02) data |= 0x10; else data |= 0x10; break; case 1: - if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x04) + if (!vga.read_dipswitch.isnull() && vga.read_dipswitch() & 0x04) data |= 0x10; else data |= 0x10; break; case 0: - if (!vga.read_dipswitch.isnull() && vga.read_dipswitch(space, 0, mem_mask) & 0x08) + if (!vga.read_dipswitch.isnull() && vga.read_dipswitch() & 0x08) data |= 0x10; else data |= 0x10; @@ -1891,11 +1891,11 @@ READ8_MEMBER(vga_device::port_03c0_r) return data; } -READ8_MEMBER(vga_device::port_03d0_r) +uint8_t vga_device::port_03d0_r(offs_t offset) { uint8_t data = 0xff; if (CRTC_PORT_ADDR == 0x3d0) - data = vga_crtc_r(space, offset, mem_mask); + data = vga_crtc_r(offset); if(offset == 8) { logerror("VGA: 0x3d8 read %s\n", machine().describe_context()); @@ -1905,13 +1905,13 @@ READ8_MEMBER(vga_device::port_03d0_r) return data; } -WRITE8_MEMBER(vga_device::port_03b0_w) +void vga_device::port_03b0_w(offs_t offset, uint8_t data) { if (LOG_ACCESSES) logerror("vga_port_03b0_w(): port=0x%04x data=0x%02x\n", offset + 0x3b0, data); if (CRTC_PORT_ADDR == 0x3b0) - vga_crtc_w(space, offset, data, mem_mask); + vga_crtc_w(offset, data); } void vga_device::attribute_reg_write(uint8_t index, uint8_t data) @@ -1980,7 +1980,7 @@ void vga_device::gc_reg_write(uint8_t index,uint8_t data) } } -WRITE8_MEMBER(vga_device::port_03c0_w) +void vga_device::port_03c0_w(offs_t offset, uint8_t data) { if (LOG_ACCESSES) logerror("vga_port_03c0_w(): port=0x%04x data=0x%02x\n", offset + 0x3c0, data); @@ -2068,13 +2068,13 @@ WRITE8_MEMBER(vga_device::port_03c0_w) -WRITE8_MEMBER(vga_device::port_03d0_w) +void vga_device::port_03d0_w(offs_t offset, uint8_t data) { if (LOG_ACCESSES) logerror("vga_port_03d0_w(): port=0x%04x data=0x%02x\n", offset + 0x3d0, data); if (CRTC_PORT_ADDR == 0x3d0) - vga_crtc_w(space, offset, data, mem_mask); + vga_crtc_w(offset, data); } void vga_device::device_reset() @@ -2116,7 +2116,7 @@ void s3_vga_device::device_reset() s3.sr11 = 0x41; } -READ8_MEMBER(vga_device::mem_r) +uint8_t vga_device::mem_r(offs_t offset) { /* TODO: check me */ switch(vga.gc.memory_map_sel & 0x03) @@ -2183,7 +2183,7 @@ READ8_MEMBER(vga_device::mem_r) //return 0; } -WRITE8_MEMBER(vga_device::mem_w) +void vga_device::mem_w(offs_t offset, uint8_t data) { //Inside each case must prevent writes to non-mapped VGA memory regions, not only mask the offset. switch(vga.gc.memory_map_sel & 0x03) @@ -2400,7 +2400,7 @@ void tseng_vga_device::tseng_seq_reg_write(uint8_t index, uint8_t data) } } -READ8_MEMBER(tseng_vga_device::port_03b0_r) +uint8_t tseng_vga_device::port_03b0_r(offs_t offset) { uint8_t res = 0xff; @@ -2415,7 +2415,7 @@ READ8_MEMBER(tseng_vga_device::port_03b0_r) res = et4k.reg_3d8; break; default: - res = vga_device::port_03b0_r(space,offset,mem_mask); + res = vga_device::port_03b0_r(offset); break; } } @@ -2423,7 +2423,7 @@ READ8_MEMBER(tseng_vga_device::port_03b0_r) return res; } -WRITE8_MEMBER(tseng_vga_device::port_03b0_w) +void tseng_vga_device::port_03b0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3b0) { @@ -2441,7 +2441,7 @@ WRITE8_MEMBER(tseng_vga_device::port_03b0_w) et4k.ext_reg_ena = false; break; default: - vga_device::port_03b0_w(space,offset,data,mem_mask); + vga_device::port_03b0_w(offset,data); break; } } @@ -2482,7 +2482,7 @@ void tseng_vga_device::tseng_attribute_reg_write(uint8_t index, uint8_t data) } -READ8_MEMBER(tseng_vga_device::port_03c0_r) +uint8_t tseng_vga_device::port_03c0_r(offs_t offset) { uint8_t res; @@ -2494,7 +2494,7 @@ READ8_MEMBER(tseng_vga_device::port_03c0_r) case 0x16: res = et4k.misc1; break; case 0x17: res = et4k.misc2; break; default: - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; } @@ -2516,19 +2516,19 @@ READ8_MEMBER(tseng_vga_device::port_03c0_r) break; } et4k.dac_state++; - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; case 0x08: et4k.dac_state = 0; default: - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; } return res; } -WRITE8_MEMBER(tseng_vga_device::port_03c0_w) +void tseng_vga_device::port_03c0_w(offs_t offset, uint8_t data) { switch(offset) { @@ -2558,13 +2558,13 @@ WRITE8_MEMBER(tseng_vga_device::port_03c0_w) break; } default: - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); break; } tseng_define_video_mode(); } -READ8_MEMBER(tseng_vga_device::port_03d0_r) +uint8_t tseng_vga_device::port_03d0_r(offs_t offset) { uint8_t res = 0xff; @@ -2579,7 +2579,7 @@ READ8_MEMBER(tseng_vga_device::port_03d0_r) res = et4k.reg_3d8; break; default: - res = vga_device::port_03d0_r(space,offset,mem_mask); + res = vga_device::port_03d0_r(offset); break; } } @@ -2587,7 +2587,7 @@ READ8_MEMBER(tseng_vga_device::port_03d0_r) return res; } -WRITE8_MEMBER(tseng_vga_device::port_03d0_w) +void tseng_vga_device::port_03d0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3d0) { @@ -2607,14 +2607,14 @@ WRITE8_MEMBER(tseng_vga_device::port_03d0_w) et4k.ext_reg_ena = false; break; default: - vga_device::port_03d0_w(space,offset,data,mem_mask); + vga_device::port_03d0_w(offset,data); break; } } tseng_define_video_mode(); } -READ8_MEMBER(tseng_vga_device::mem_r) +uint8_t tseng_vga_device::mem_r(offs_t offset) { if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) { @@ -2622,10 +2622,10 @@ READ8_MEMBER(tseng_vga_device::mem_r) return vga.memory[(offset+svga.bank_r*0x10000)]; } - return vga_device::mem_r(space,offset,mem_mask); + return vga_device::mem_r(offset); } -WRITE8_MEMBER(tseng_vga_device::mem_w) +void tseng_vga_device::mem_w(offs_t offset, uint8_t data) { if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) { @@ -2633,7 +2633,7 @@ WRITE8_MEMBER(tseng_vga_device::mem_w) vga.memory[(offset+svga.bank_w*0x10000)] = data; } else - vga_device::mem_w(space,offset,data,mem_mask); + vga_device::mem_w(offset,data); } /****************************************** @@ -3202,7 +3202,7 @@ void s3_vga_device::s3_seq_reg_write(uint8_t index, uint8_t data) -READ8_MEMBER(s3_vga_device::port_03b0_r) +uint8_t s3_vga_device::port_03b0_r(offs_t offset) { uint8_t res = 0xff; @@ -3214,7 +3214,7 @@ READ8_MEMBER(s3_vga_device::port_03b0_r) res = s3_crtc_reg_read(vga.crtc.index); break; default: - res = vga_device::port_03b0_r(space,offset,mem_mask); + res = vga_device::port_03b0_r(offset); break; } } @@ -3222,7 +3222,7 @@ READ8_MEMBER(s3_vga_device::port_03b0_r) return res; } -WRITE8_MEMBER(s3_vga_device::port_03b0_w) +void s3_vga_device::port_03b0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3b0) { @@ -3233,13 +3233,13 @@ WRITE8_MEMBER(s3_vga_device::port_03b0_w) s3_crtc_reg_write(vga.crtc.index,data); break; default: - vga_device::port_03b0_w(space,offset,data,mem_mask); + vga_device::port_03b0_w(offset,data); break; } } } -READ8_MEMBER(s3_vga_device::port_03c0_r) +uint8_t s3_vga_device::port_03c0_r(offs_t offset) { uint8_t res; @@ -3249,14 +3249,14 @@ READ8_MEMBER(s3_vga_device::port_03c0_r) res = s3_seq_reg_read(vga.sequencer.index); break; default: - res = vga_device::port_03c0_r(space,offset,mem_mask); + res = vga_device::port_03c0_r(offset); break; } return res; } -WRITE8_MEMBER(s3_vga_device::port_03c0_w) +void s3_vga_device::port_03c0_w(offs_t offset, uint8_t data) { switch(offset) { @@ -3264,12 +3264,12 @@ WRITE8_MEMBER(s3_vga_device::port_03c0_w) s3_seq_reg_write(vga.sequencer.index,data); break; default: - vga_device::port_03c0_w(space,offset,data,mem_mask); + vga_device::port_03c0_w(offset,data); break; } } -READ8_MEMBER(s3_vga_device::port_03d0_r) +uint8_t s3_vga_device::port_03d0_r(offs_t offset) { uint8_t res = 0xff; @@ -3281,7 +3281,7 @@ READ8_MEMBER(s3_vga_device::port_03d0_r) res = s3_crtc_reg_read(vga.crtc.index); break; default: - res = vga_device::port_03d0_r(space,offset,mem_mask); + res = vga_device::port_03d0_r(offset); break; } } @@ -3289,7 +3289,7 @@ READ8_MEMBER(s3_vga_device::port_03d0_r) return res; } -WRITE8_MEMBER(s3_vga_device::port_03d0_w) +void s3_vga_device::port_03d0_w(offs_t offset, uint8_t data) { if (CRTC_PORT_ADDR == 0x3d0) { @@ -3300,13 +3300,13 @@ WRITE8_MEMBER(s3_vga_device::port_03d0_w) s3_crtc_reg_write(vga.crtc.index,data); break; default: - vga_device::port_03d0_w(space,offset,data,mem_mask); + vga_device::port_03d0_w(offset,data); break; } } } -READ8_MEMBER(ati_vga_device::port_03c0_r) +uint8_t ati_vga_device::port_03c0_r(offs_t offset) { uint8_t data = 0xff; @@ -3317,7 +3317,7 @@ READ8_MEMBER(ati_vga_device::port_03c0_r) data = vga.attribute.data[vga.attribute.index&0x1f]; break; default: - data = vga_device::port_03c0_r(space,offset,mem_mask); + data = vga_device::port_03c0_r(offset); break; } return data; @@ -4748,7 +4748,7 @@ WRITE16_MEMBER(ibm8514a_device::ibm8514_pixel_xfer_w) if(LOG_8514) logerror("8514/A: Pixel Transfer = %08x\n",ibm8514.pixel_xfer); } -READ8_MEMBER(s3_vga_device::mem_r) +uint8_t s3_vga_device::mem_r(offs_t offset) { if (svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb32_en) { @@ -4777,12 +4777,12 @@ READ8_MEMBER(s3_vga_device::mem_r) return data; } if((offset + (svga.bank_r*0x10000)) < vga.svga_intf.vram_size) - return vga_device::mem_r(space,offset,mem_mask); + return vga_device::mem_r(offset); else return 0xff; } -WRITE8_MEMBER(s3_vga_device::mem_w) +void s3_vga_device::mem_w(offs_t offset, uint8_t data) { ibm8514a_device* dev = get_8514(); // bit 4 of CR53 enables memory-mapped I/O @@ -4882,7 +4882,7 @@ WRITE8_MEMBER(s3_vga_device::mem_w) case 0x8119: case 0x9ae9: s3.mmio_9ae8 = (s3.mmio_9ae8 & 0x00ff) | (data << 8); - dev->ibm8514_cmd_w(space,0,s3.mmio_9ae8,0xffff); + dev->ibm8514_cmd_w(machine().dummy_space(),0,s3.mmio_9ae8,0xffff); break; case 0x8120: case 0xa2e8: @@ -5002,14 +5002,14 @@ WRITE8_MEMBER(s3_vga_device::mem_w) break; case 0xbee9: s3.mmio_bee8 = (s3.mmio_bee8 & 0x00ff) | (data << 8); - dev->ibm8514_multifunc_w(space,0,s3.mmio_bee8,0xffff); + dev->ibm8514_multifunc_w(machine().dummy_space(),0,s3.mmio_bee8,0xffff); break; case 0x96e8: s3.mmio_96e8 = (s3.mmio_96e8 & 0xff00) | data; break; case 0x96e9: s3.mmio_96e8 = (s3.mmio_96e8 & 0x00ff) | (data << 8); - dev->ibm8514_width_w(space,0,s3.mmio_96e8,0xffff); + dev->ibm8514_width_w(machine().dummy_space(),0,s3.mmio_96e8,0xffff); break; case 0xe2e8: dev->ibm8514.pixel_xfer = (dev->ibm8514.pixel_xfer & 0xffffff00) | data; @@ -5047,7 +5047,7 @@ WRITE8_MEMBER(s3_vga_device::mem_w) } if((offset + (svga.bank_w*0x10000)) < vga.svga_intf.vram_size) - vga_device::mem_w(space,offset,data,mem_mask); + vga_device::mem_w(offset,data); } /****************************************** @@ -5056,85 +5056,85 @@ gamtor.c implementation (TODO: identify the video card) ******************************************/ -READ8_MEMBER(gamtor_vga_device::mem_r) +uint8_t gamtor_vga_device::mem_r(offs_t offset) { return vga.memory[offset]; } -WRITE8_MEMBER(gamtor_vga_device::mem_w) +void gamtor_vga_device::mem_w(offs_t offset, uint8_t data) { vga.memory[offset] = data; } -READ8_MEMBER(gamtor_vga_device::port_03b0_r) +uint8_t gamtor_vga_device::port_03b0_r(offs_t offset) { uint8_t res; switch(offset) { default: - res = vga_device::port_03b0_r(space,offset ^ 3,mem_mask); + res = vga_device::port_03b0_r(offset ^ 3); break; } return res; } -WRITE8_MEMBER(gamtor_vga_device::port_03b0_w) +void gamtor_vga_device::port_03b0_w(offs_t offset, uint8_t data) { switch(offset) { default: - vga_device::port_03b0_w(space,offset ^ 3,data,mem_mask); + vga_device::port_03b0_w(offset ^ 3,data); break; } } -READ8_MEMBER(gamtor_vga_device::port_03c0_r) +uint8_t gamtor_vga_device::port_03c0_r(offs_t offset) { uint8_t res; switch(offset) { default: - res = vga_device::port_03c0_r(space,offset ^ 3,mem_mask); + res = vga_device::port_03c0_r(offset ^ 3); break; } return res; } -WRITE8_MEMBER(gamtor_vga_device::port_03c0_w) +void gamtor_vga_device::port_03c0_w(offs_t offset, uint8_t data) { switch(offset) { default: - vga_device::port_03c0_w(space,offset ^ 3,data,mem_mask); + vga_device::port_03c0_w(offset ^ 3,data); break; } } -READ8_MEMBER(gamtor_vga_device::port_03d0_r) +uint8_t gamtor_vga_device::port_03d0_r(offs_t offset) { uint8_t res; switch(offset) { default: - res = vga_device::port_03d0_r(space,offset ^ 3,mem_mask); + res = vga_device::port_03d0_r(offset ^ 3); break; } return res; } -WRITE8_MEMBER(gamtor_vga_device::port_03d0_w) +void gamtor_vga_device::port_03d0_w(offs_t offset, uint8_t data) { switch(offset) { default: - vga_device::port_03d0_w(space,offset ^ 3,data,mem_mask); + vga_device::port_03d0_w(offset ^ 3,data); break; } } @@ -5230,7 +5230,7 @@ void ati_vga_device::ati_define_video_mode() set_dot_clock(); } -READ8_MEMBER(ati_vga_device::mem_r) +uint8_t ati_vga_device::mem_r(offs_t offset) { if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) { @@ -5246,10 +5246,10 @@ READ8_MEMBER(ati_vga_device::mem_r) } } - return vga_device::mem_r(space,offset,mem_mask); + return vga_device::mem_r(offset); } -WRITE8_MEMBER(ati_vga_device::mem_w) +void ati_vga_device::mem_w(offs_t offset, uint8_t data) { if(svga.rgb8_en || svga.rgb15_en || svga.rgb16_en || svga.rgb24_en) { @@ -5265,11 +5265,11 @@ WRITE8_MEMBER(ati_vga_device::mem_w) } } else - vga_device::mem_w(space,offset,data,mem_mask); + vga_device::mem_w(offset,data); } -READ8_MEMBER(ati_vga_device::ati_port_ext_r) +uint8_t ati_vga_device::ati_port_ext_r(offs_t offset) { uint8_t ret = 0xff; @@ -5317,7 +5317,7 @@ READ8_MEMBER(ati_vga_device::ati_port_ext_r) return ret; } -WRITE8_MEMBER(ati_vga_device::ati_port_ext_w) +void ati_vga_device::ati_port_ext_w(offs_t offset, uint8_t data) { switch(offset) { @@ -5438,25 +5438,25 @@ bit 0 SENSE is the result of a wired-OR of 3 comparators, one This bit toggles every time a HSYNC pulse starts 3-15 Reserved(0) */ -READ8_MEMBER(ibm8514a_device::ibm8514_status_r) +uint8_t ibm8514a_device::ibm8514_status_r(offs_t offset) { switch(offset) { case 0: return m_vga->vga_vblank() << 1; case 2: - return m_vga->port_03c0_r(space,6,mem_mask); + return m_vga->port_03c0_r(6); case 3: - return m_vga->port_03c0_r(space,7,mem_mask); + return m_vga->port_03c0_r(7); case 4: - return m_vga->port_03c0_r(space,8,mem_mask); + return m_vga->port_03c0_r(8); case 5: - return m_vga->port_03c0_r(space,9,mem_mask); + return m_vga->port_03c0_r(9); } return 0; } -WRITE8_MEMBER(ibm8514a_device::ibm8514_htotal_w) +void ibm8514a_device::ibm8514_htotal_w(offs_t offset, uint8_t data) { switch(offset) { @@ -5464,16 +5464,16 @@ WRITE8_MEMBER(ibm8514a_device::ibm8514_htotal_w) ibm8514.htotal = data & 0xff; break; case 2: - m_vga->port_03c0_w(space,6,data,mem_mask); + m_vga->port_03c0_w(6,data); break; case 3: - m_vga->port_03c0_w(space,7,data,mem_mask); + m_vga->port_03c0_w(7,data); break; case 4: - m_vga->port_03c0_w(space,8,data,mem_mask); + m_vga->port_03c0_w(8,data); break; case 5: - m_vga->port_03c0_w(space,9,data,mem_mask); + m_vga->port_03c0_w(9,data); break; } //vga.crtc.horz_total = data & 0x01ff; diff --git a/src/devices/video/pc_vga.h b/src/devices/video/pc_vga.h index ce05567d4cc..aee3ffdf98a 100644 --- a/src/devices/video/pc_vga.h +++ b/src/devices/video/pc_vga.h @@ -26,14 +26,14 @@ public: virtual void zero(); virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - virtual READ8_MEMBER(port_03b0_r); - virtual WRITE8_MEMBER(port_03b0_w); - virtual READ8_MEMBER(port_03c0_r); - virtual WRITE8_MEMBER(port_03c0_w); - virtual READ8_MEMBER(port_03d0_r); - virtual WRITE8_MEMBER(port_03d0_w); - virtual READ8_MEMBER(mem_r); - virtual WRITE8_MEMBER(mem_w); + virtual uint8_t port_03b0_r(offs_t offset); + virtual void port_03b0_w(offs_t offset, uint8_t data); + virtual uint8_t port_03c0_r(offs_t offset); + virtual void port_03c0_w(offs_t offset, uint8_t data); + virtual uint8_t port_03d0_r(offs_t offset); + virtual void port_03d0_w(offs_t offset, uint8_t data); + virtual uint8_t mem_r(offs_t offset); + virtual void mem_w(offs_t offset, uint8_t data); virtual uint8_t mem_linear_r(offs_t offset); virtual void mem_linear_w(offs_t offset,uint8_t data); virtual TIMER_CALLBACK_MEMBER(vblank_timer_cb); @@ -77,8 +77,8 @@ protected: void crtc_reg_write(uint8_t index, uint8_t data); void seq_reg_write(uint8_t index, uint8_t data); uint8_t vga_vblank(); - READ8_MEMBER(vga_crtc_r); - WRITE8_MEMBER(vga_crtc_w); + uint8_t vga_crtc_r(offs_t offset); + void vga_crtc_w(offs_t offset, uint8_t data); uint8_t gc_reg_read(uint8_t index); void attribute_reg_write(uint8_t index, uint8_t data); void gc_reg_write(uint8_t index,uint8_t data); @@ -114,7 +114,7 @@ protected: { vga_t(device_t &owner) : read_dipswitch(owner) { } - read8_delegate read_dipswitch; + read8smo_delegate read_dipswitch; struct { size_t vram_size; @@ -294,8 +294,8 @@ public: WRITE16_MEMBER(ibm8514_display_ctrl_w); READ16_MEMBER(ibm8514_line_error_r); WRITE16_MEMBER(ibm8514_line_error_w); - READ8_MEMBER(ibm8514_status_r); - WRITE8_MEMBER(ibm8514_htotal_w); + uint8_t ibm8514_status_r(offs_t offset); + void ibm8514_htotal_w(offs_t offset, uint8_t data); READ16_MEMBER(ibm8514_substatus_r); WRITE16_MEMBER(ibm8514_subcontrol_w); READ16_MEMBER(ibm8514_subcontrol_r); @@ -499,14 +499,14 @@ public: // construction/destruction tseng_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual READ8_MEMBER(port_03b0_r) override; - virtual WRITE8_MEMBER(port_03b0_w) override; - virtual READ8_MEMBER(port_03c0_r) override; - virtual WRITE8_MEMBER(port_03c0_w) override; - virtual READ8_MEMBER(port_03d0_r) override; - virtual WRITE8_MEMBER(port_03d0_w) override; - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t port_03b0_r(offs_t offset) override; + virtual void port_03b0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03c0_r(offs_t offset) override; + virtual void port_03c0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03d0_r(offs_t offset) override; + virtual void port_03d0_w(offs_t offset, uint8_t data) override; + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; protected: virtual void device_start() override; @@ -546,13 +546,13 @@ public: // construction/destruction ati_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; // VGA registers - virtual READ8_MEMBER(port_03c0_r) override; - READ8_MEMBER(ati_port_ext_r); - WRITE8_MEMBER(ati_port_ext_w); + virtual uint8_t port_03c0_r(offs_t offset) override; + uint8_t ati_port_ext_r(offs_t offset); + void ati_port_ext_w(offs_t offset, uint8_t data); virtual uint16_t offset() override; @@ -587,14 +587,14 @@ public: // construction/destruction s3_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual READ8_MEMBER(port_03b0_r) override; - virtual WRITE8_MEMBER(port_03b0_w) override; - virtual READ8_MEMBER(port_03c0_r) override; - virtual WRITE8_MEMBER(port_03c0_w) override; - virtual READ8_MEMBER(port_03d0_r) override; - virtual WRITE8_MEMBER(port_03d0_w) override; - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t port_03b0_r(offs_t offset) override; + virtual void port_03b0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03c0_r(offs_t offset) override; + virtual void port_03c0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03d0_r(offs_t offset) override; + virtual void port_03d0_w(offs_t offset, uint8_t data) override; + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; virtual uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect) override; @@ -680,14 +680,14 @@ public: gamtor_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual READ8_MEMBER(port_03b0_r) override; - virtual WRITE8_MEMBER(port_03b0_w) override; - virtual READ8_MEMBER(port_03c0_r) override; - virtual WRITE8_MEMBER(port_03c0_w) override; - virtual READ8_MEMBER(port_03d0_r) override; - virtual WRITE8_MEMBER(port_03d0_w) override; - virtual READ8_MEMBER(mem_r) override; - virtual WRITE8_MEMBER(mem_w) override; + virtual uint8_t port_03b0_r(offs_t offset) override; + virtual void port_03b0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03c0_r(offs_t offset) override; + virtual void port_03c0_w(offs_t offset, uint8_t data) override; + virtual uint8_t port_03d0_r(offs_t offset) override; + virtual void port_03d0_w(offs_t offset, uint8_t data) override; + virtual uint8_t mem_r(offs_t offset) override; + virtual void mem_w(offs_t offset, uint8_t data) override; }; diff --git a/src/devices/video/virge_pci.cpp b/src/devices/video/virge_pci.cpp index 6bebe26bc88..f527555ed91 100644 --- a/src/devices/video/virge_pci.cpp +++ b/src/devices/video/virge_pci.cpp @@ -103,13 +103,13 @@ READ32_MEMBER(virge_pci_device::vga_3b0_r) { uint32_t result = 0; if (ACCESSING_BITS_0_7) - result |= downcast(m_vga.target())->port_03b0_r(space, offset * 4 + 0, 0xff) << 0; + result |= downcast(m_vga.target())->port_03b0_r(offset * 4 + 0) << 0; if (ACCESSING_BITS_8_15) - result |= downcast(m_vga.target())->port_03b0_r(space, offset * 4 + 1, 0xff) << 8; + result |= downcast(m_vga.target())->port_03b0_r(offset * 4 + 1) << 8; if (ACCESSING_BITS_16_23) - result |= downcast(m_vga.target())->port_03b0_r(space, offset * 4 + 2, 0xff) << 16; + result |= downcast(m_vga.target())->port_03b0_r(offset * 4 + 2) << 16; if (ACCESSING_BITS_24_31) - result |= downcast(m_vga.target())->port_03b0_r(space, offset * 4 + 3, 0xff) << 24; + result |= downcast(m_vga.target())->port_03b0_r(offset * 4 + 3) << 24; return result; } @@ -117,13 +117,13 @@ WRITE32_MEMBER(virge_pci_device::vga_3b0_w) { if (ACCESSING_BITS_0_7) { - downcast(m_vga.target())->port_03b0_w(space, offset * 4 + 0, data >> 0, 0xff); + downcast(m_vga.target())->port_03b0_w(offset * 4 + 0, data >> 0); if(offset == 1 && downcast(m_vga.target())->get_crtc_port() == 0x3b0) m_current_crtc_reg = data & 0xff; } if (ACCESSING_BITS_8_15) { - downcast(m_vga.target())->port_03b0_w(space, offset * 4 + 1, data >> 8, 0xff); + downcast(m_vga.target())->port_03b0_w(offset * 4 + 1, data >> 8); if(offset == 1 && downcast(m_vga.target())->get_crtc_port() == 0x3b0) { if(m_current_crtc_reg == 0x58) @@ -139,48 +139,48 @@ WRITE32_MEMBER(virge_pci_device::vga_3b0_w) } } if (ACCESSING_BITS_16_23) - downcast(m_vga.target())->port_03b0_w(space, offset * 4 + 2, data >> 16, 0xff); + downcast(m_vga.target())->port_03b0_w(offset * 4 + 2, data >> 16); if (ACCESSING_BITS_24_31) - downcast(m_vga.target())->port_03b0_w(space, offset * 4 + 3, data >> 24, 0xff); + downcast(m_vga.target())->port_03b0_w(offset * 4 + 3, data >> 24); } READ32_MEMBER(virge_pci_device::vga_3c0_r) { uint32_t result = 0; if (ACCESSING_BITS_0_7) - result |= downcast(m_vga.target())->port_03c0_r(space, offset * 4 + 0, 0xff) << 0; + result |= downcast(m_vga.target())->port_03c0_r(offset * 4 + 0) << 0; if (ACCESSING_BITS_8_15) - result |= downcast(m_vga.target())->port_03c0_r(space, offset * 4 + 1, 0xff) << 8; + result |= downcast(m_vga.target())->port_03c0_r(offset * 4 + 1) << 8; if (ACCESSING_BITS_16_23) - result |= downcast(m_vga.target())->port_03c0_r(space, offset * 4 + 2, 0xff) << 16; + result |= downcast(m_vga.target())->port_03c0_r(offset * 4 + 2) << 16; if (ACCESSING_BITS_24_31) - result |= downcast(m_vga.target())->port_03c0_r(space, offset * 4 + 3, 0xff) << 24; + result |= downcast(m_vga.target())->port_03c0_r(offset * 4 + 3) << 24; return result; } WRITE32_MEMBER(virge_pci_device::vga_3c0_w) { if (ACCESSING_BITS_0_7) - downcast(m_vga.target())->port_03c0_w(space, offset * 4 + 0, data >> 0, 0xff); + downcast(m_vga.target())->port_03c0_w(offset * 4 + 0, data >> 0); if (ACCESSING_BITS_8_15) - downcast(m_vga.target())->port_03c0_w(space, offset * 4 + 1, data >> 8, 0xff); + downcast(m_vga.target())->port_03c0_w(offset * 4 + 1, data >> 8); if (ACCESSING_BITS_16_23) - downcast(m_vga.target())->port_03c0_w(space, offset * 4 + 2, data >> 16, 0xff); + downcast(m_vga.target())->port_03c0_w(offset * 4 + 2, data >> 16); if (ACCESSING_BITS_24_31) - downcast(m_vga.target())->port_03c0_w(space, offset * 4 + 3, data >> 24, 0xff); + downcast(m_vga.target())->port_03c0_w(offset * 4 + 3, data >> 24); } READ32_MEMBER(virge_pci_device::vga_3d0_r) { uint32_t result = 0; if (ACCESSING_BITS_0_7) - result |= downcast(m_vga.target())->port_03d0_r(space, offset * 4 + 0, 0xff) << 0; + result |= downcast(m_vga.target())->port_03d0_r(offset * 4 + 0) << 0; if (ACCESSING_BITS_8_15) - result |= downcast(m_vga.target())->port_03d0_r(space, offset * 4 + 1, 0xff) << 8; + result |= downcast(m_vga.target())->port_03d0_r(offset * 4 + 1) << 8; if (ACCESSING_BITS_16_23) - result |= downcast(m_vga.target())->port_03d0_r(space, offset * 4 + 2, 0xff) << 16; + result |= downcast(m_vga.target())->port_03d0_r(offset * 4 + 2) << 16; if (ACCESSING_BITS_24_31) - result |= downcast(m_vga.target())->port_03d0_r(space, offset * 4 + 3, 0xff) << 24; + result |= downcast(m_vga.target())->port_03d0_r(offset * 4 + 3) << 24; return result; } @@ -188,13 +188,13 @@ WRITE32_MEMBER(virge_pci_device::vga_3d0_w) { if (ACCESSING_BITS_0_7) { - downcast(m_vga.target())->port_03d0_w(space, offset * 4 + 0, data >> 0, 0xff); + downcast(m_vga.target())->port_03d0_w(offset * 4 + 0, data >> 0); if(offset == 1 && downcast(m_vga.target())->get_crtc_port() == 0x3d0) m_current_crtc_reg = data & 0xff; } if (ACCESSING_BITS_8_15) { - downcast(m_vga.target())->port_03d0_w(space, offset * 4 + 1, data >> 8, 0xff); + downcast(m_vga.target())->port_03d0_w(offset * 4 + 1, data >> 8); if(offset == 1 && downcast(m_vga.target())->get_crtc_port() == 0x3d0) { if(m_current_crtc_reg >= 0x58 && m_current_crtc_reg <= 0x5a) @@ -204,19 +204,19 @@ WRITE32_MEMBER(virge_pci_device::vga_3d0_w) } } if (ACCESSING_BITS_16_23) - downcast(m_vga.target())->port_03d0_w(space, offset * 4 + 2, data >> 16, 0xff); + downcast(m_vga.target())->port_03d0_w(offset * 4 + 2, data >> 16); if (ACCESSING_BITS_24_31) - downcast(m_vga.target())->port_03d0_w(space, offset * 4 + 3, data >> 24, 0xff); + downcast(m_vga.target())->port_03d0_w(offset * 4 + 3, data >> 24); } -READ8_MEMBER(virge_pci_device::vram_r) +uint8_t virge_pci_device::vram_r(offs_t offset) { - return downcast(m_vga.target())->mem_r(space, offset, 0xff); + return downcast(m_vga.target())->mem_r(offset); } -WRITE8_MEMBER(virge_pci_device::vram_w) +void virge_pci_device::vram_w(offs_t offset, uint8_t data) { - downcast(m_vga.target())->mem_w(space, offset, data, 0xff); + downcast(m_vga.target())->mem_w(offset, data); } void virge_pci_device::postload() @@ -259,7 +259,7 @@ void virgedx_pci_device::device_start() void virge_pci_device::map_extra(uint64_t memory_window_start, uint64_t memory_window_end, uint64_t memory_offset, address_space *memory_space, uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) { - memory_space->install_readwrite_handler(0xa0000, 0xbffff, read8_delegate(*this, FUNC(virge_pci_device::vram_r)), write8_delegate(*this, FUNC(virge_pci_device::vram_w))); + memory_space->install_readwrite_handler(0xa0000, 0xbffff, read8sm_delegate(*this, FUNC(virge_pci_device::vram_r)), write8sm_delegate(*this, FUNC(virge_pci_device::vram_w))); io_space->install_readwrite_handler(0x3b0, 0x3bf, read32_delegate(*this, FUNC(virge_pci_device::vga_3b0_r)), write32_delegate(*this, FUNC(virge_pci_device::vga_3b0_w))); io_space->install_readwrite_handler(0x3c0, 0x3cf, read32_delegate(*this, FUNC(virge_pci_device::vga_3c0_r)), write32_delegate(*this, FUNC(virge_pci_device::vga_3c0_w))); diff --git a/src/devices/video/virge_pci.h b/src/devices/video/virge_pci.h index a672fb03b08..8470f309e56 100644 --- a/src/devices/video/virge_pci.h +++ b/src/devices/video/virge_pci.h @@ -43,8 +43,8 @@ public: DECLARE_WRITE32_MEMBER(vga_3c0_w); DECLARE_READ32_MEMBER(vga_3d0_r); DECLARE_WRITE32_MEMBER(vga_3d0_w); - DECLARE_READ8_MEMBER(vram_r); - DECLARE_WRITE8_MEMBER(vram_w); + uint8_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint8_t data); DECLARE_READ32_MEMBER(base_address_r); DECLARE_WRITE32_MEMBER(base_address_w); diff --git a/src/mame/drivers/savquest.cpp b/src/mame/drivers/savquest.cpp index 3b514ced247..56aa4d81409 100644 --- a/src/mame/drivers/savquest.cpp +++ b/src/mame/drivers/savquest.cpp @@ -113,8 +113,8 @@ private: DECLARE_WRITE_LINE_MEMBER(vblank_assert); - DECLARE_READ8_MEMBER(smram_r); - DECLARE_WRITE8_MEMBER(smram_w); + uint8_t smram_r(offs_t offset); + void smram_w(offs_t offset, uint8_t data); void savquest_io(address_map &map); void savquest_map(address_map &map); @@ -717,22 +717,22 @@ WRITE8_MEMBER(savquest_state::parallel_port_w) } } -READ8_MEMBER(savquest_state::smram_r) +uint8_t savquest_state::smram_r(offs_t offset) { /* TODO: way more complex than this */ if(m_mtxc_config_reg[0x72] & 0x40) return m_smram[offset]; else - return m_vga->mem_r(space,offset,0xff); + return m_vga->mem_r(offset); } -WRITE8_MEMBER(savquest_state::smram_w) +void savquest_state::smram_w(offs_t offset, uint8_t data) { /* TODO: way more complex than this */ if(m_mtxc_config_reg[0x72] & 0x40) m_smram[offset] = data; else - m_vga->mem_w(space,offset,data,0xff); + m_vga->mem_w(offset,data); } diff --git a/src/mame/drivers/vis.cpp b/src/mame/drivers/vis.cpp index d0805bedcad..48c2f9526d2 100644 --- a/src/mame/drivers/vis.cpp +++ b/src/mame/drivers/vis.cpp @@ -19,8 +19,8 @@ class vis_audio_device : public device_t, public: vis_audio_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(pcm_r); - DECLARE_WRITE8_MEMBER(pcm_w); + uint8_t pcm_r(offs_t offset); + void pcm_w(offs_t offset, uint8_t data); protected: virtual void device_start() override; virtual void device_reset() override; @@ -56,7 +56,7 @@ void vis_audio_device::device_start() { set_isa_device(); m_isa->set_dma_channel(7, this, false); - m_isa->install_device(0x0220, 0x022f, read8_delegate(*this, FUNC(vis_audio_device::pcm_r)), write8_delegate(*this, FUNC(vis_audio_device::pcm_w))); + m_isa->install_device(0x0220, 0x022f, read8sm_delegate(*this, FUNC(vis_audio_device::pcm_r)), write8sm_delegate(*this, FUNC(vis_audio_device::pcm_w))); m_isa->install_device(0x0388, 0x038b, read8sm_delegate(*subdevice("ymf262"), FUNC(ymf262_device::read)), write8sm_delegate(*subdevice("ymf262"), FUNC(ymf262_device::write))); m_pcm = timer_alloc(); m_pcm->adjust(attotime::never); @@ -149,7 +149,7 @@ void vis_audio_device::device_add_mconfig(machine_config &config) vreg.add_route(0, "rdac", -1.0, DAC_VREF_NEG_INPUT); } -READ8_MEMBER(vis_audio_device::pcm_r) +uint8_t vis_audio_device::pcm_r(offs_t offset) { switch(offset) { @@ -182,7 +182,7 @@ READ8_MEMBER(vis_audio_device::pcm_r) return 0; } -WRITE8_MEMBER(vis_audio_device::pcm_w) +void vis_audio_device::pcm_w(offs_t offset, uint8_t data) { u8 oldmode = m_mode; switch(offset) @@ -235,10 +235,10 @@ class vis_vga_device : public svga_device, { public: vis_vga_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(vga_r); - DECLARE_WRITE8_MEMBER(vga_w); - DECLARE_READ8_MEMBER(visvgamem_r); - DECLARE_WRITE8_MEMBER(visvgamem_w); + uint8_t vga_r(offs_t offset); + void vga_w(offs_t offset, uint8_t data); + uint8_t visvgamem_r(offs_t offset); + void visvgamem_w(offs_t offset, uint8_t data); protected: virtual void device_start() override; virtual void device_reset() override; @@ -386,8 +386,8 @@ void vis_vga_device::vga_vh_yuv8(bitmap_rgb32 &bitmap, const rectangle &cliprect void vis_vga_device::device_start() { set_isa_device(); - m_isa->install_device(0x03b0, 0x03df, read8_delegate(*this, FUNC(vis_vga_device::vga_r)), write8_delegate(*this, FUNC(vis_vga_device::vga_w))); - m_isa->install_memory(0x0a0000, 0x0bffff, read8_delegate(*this, FUNC(vis_vga_device::visvgamem_r)), write8_delegate(*this, FUNC(vis_vga_device::visvgamem_w))); + m_isa->install_device(0x03b0, 0x03df, read8sm_delegate(*this, FUNC(vis_vga_device::vga_r)), write8sm_delegate(*this, FUNC(vis_vga_device::vga_w))); + m_isa->install_memory(0x0a0000, 0x0bffff, read8sm_delegate(*this, FUNC(vis_vga_device::visvgamem_r)), write8sm_delegate(*this, FUNC(vis_vga_device::visvgamem_w))); svga_device::device_start(); vga.svga_intf.seq_regcount = 0x2d; save_pointer(m_crtc_regs,"VIS CRTC",0x32); @@ -441,22 +441,22 @@ uint32_t vis_vga_device::screen_update(screen_device &screen, bitmap_rgb32 &bitm return 0; } -READ8_MEMBER(vis_vga_device::visvgamem_r) +uint8_t vis_vga_device::visvgamem_r(offs_t offset) { if(!(vga.sequencer.data[0x25] & 0x40)) - return mem_r(space, offset, mem_mask); + return mem_r(offset); u16 win = (vga.sequencer.data[0x1e] & 0x0f) == 3 ? m_wina : m_winb; // this doesn't seem quite right return mem_linear_r((offset + (win * 64)) & 0x3ffff); } -WRITE8_MEMBER(vis_vga_device::visvgamem_w) +void vis_vga_device::visvgamem_w(offs_t offset, uint8_t data) { if(!(vga.sequencer.data[0x25] & 0x40)) - return mem_w(space, offset, data, mem_mask); + return mem_w(offset, data); return mem_linear_w((offset + (m_wina * 64)) & 0x3ffff, data); } -READ8_MEMBER(vis_vga_device::vga_r) +uint8_t vis_vga_device::vga_r(offs_t offset) { switch(offset) { @@ -473,14 +473,14 @@ READ8_MEMBER(vis_vga_device::vga_r) return m_crtc_regs[vga.crtc.index]; } if(offset < 0x10) - return port_03b0_r(space, offset, mem_mask); + return port_03b0_r(offset); else if(offset < 0x20) - return port_03c0_r(space, offset - 0x10, mem_mask); + return port_03c0_r(offset - 0x10); else - return port_03d0_r(space, offset - 0x20, mem_mask); + return port_03d0_r(offset - 0x20); } -WRITE8_MEMBER(vis_vga_device::vga_w) +void vis_vga_device::vga_w(offs_t offset, uint8_t data) { switch(offset) { @@ -694,11 +694,11 @@ WRITE8_MEMBER(vis_vga_device::vga_w) break; } if(offset < 0x10) - port_03b0_w(space, offset, data, mem_mask); + port_03b0_w(offset, data); else if(offset < 0x20) - port_03c0_w(space, offset - 0x10, data, mem_mask); + port_03c0_w(offset - 0x10, data); else - port_03d0_w(space, offset - 0x20, data, mem_mask); + port_03d0_w(offset - 0x20, data); } class vis_state : public driver_device @@ -722,16 +722,16 @@ private: required_device m_pic2; required_ioport m_pad; - DECLARE_READ8_MEMBER(sysctl_r); - DECLARE_WRITE8_MEMBER(sysctl_w); - DECLARE_READ8_MEMBER(unk_r); - DECLARE_WRITE8_MEMBER(unk_w); - DECLARE_READ8_MEMBER(unk2_r); - DECLARE_READ8_MEMBER(unk3_r); + uint8_t sysctl_r(); + void sysctl_w(uint8_t data); + uint8_t unk_r(offs_t offset); + void unk_w(offs_t offset, uint8_t data); + uint8_t unk2_r(); + uint8_t unk3_r(); DECLARE_READ16_MEMBER(pad_r); DECLARE_WRITE16_MEMBER(pad_w); - DECLARE_READ8_MEMBER(unk1_r); - DECLARE_WRITE8_MEMBER(unk1_w); + uint8_t unk1_r(offs_t offset); + void unk1_w(offs_t offset, uint8_t data); void io_map(address_map &map); void main_map(address_map &map); @@ -757,14 +757,14 @@ INPUT_CHANGED_MEMBER(vis_state::update) } //chipset registers? -READ8_MEMBER(vis_state::unk_r) +uint8_t vis_state::unk_r(offs_t offset) { if(offset) return m_unk[m_unkidx]; return 0; } -WRITE8_MEMBER(vis_state::unk_w) +void vis_state::unk_w(offs_t offset, uint8_t data) { if(offset) m_unk[m_unkidx] = data; @@ -772,13 +772,13 @@ WRITE8_MEMBER(vis_state::unk_w) m_unkidx = data & 0xf; } -READ8_MEMBER(vis_state::unk2_r) +uint8_t vis_state::unk2_r() { return 0x40; } //memory card reader? -READ8_MEMBER(vis_state::unk3_r) +uint8_t vis_state::unk3_r() { return 0x00; } @@ -813,14 +813,14 @@ WRITE16_MEMBER(vis_state::pad_w) } } -READ8_MEMBER(vis_state::unk1_r) +uint8_t vis_state::unk1_r(offs_t offset) { if(offset == 2) return 0xde; return 0; } -WRITE8_MEMBER(vis_state::unk1_w) +void vis_state::unk1_w(offs_t offset, uint8_t data) { switch(offset) { @@ -833,12 +833,12 @@ WRITE8_MEMBER(vis_state::unk1_w) m_unk1[offset] = data; } -READ8_MEMBER(vis_state::sysctl_r) +uint8_t vis_state::sysctl_r() { return m_sysctl; } -WRITE8_MEMBER(vis_state::sysctl_w) +void vis_state::sysctl_w(uint8_t data) { if(BIT(data, 0) && !BIT(m_sysctl, 0)) m_maincpu->pulse_input_line(INPUT_LINE_RESET, attotime::zero);