From 59337f9e503618cf287a1888da376010d6611682 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Wed, 11 Mar 2020 20:04:17 +0100 Subject: src/devices: simplified some handlers (nw) --- src/devices/bus/vip/vp550.cpp | 4 ++-- src/devices/bus/vip/vp595.cpp | 2 +- src/devices/cpu/h6280/h6280.cpp | 2 +- src/devices/sound/ad1848.cpp | 8 ++++---- src/devices/sound/ad1848.h | 8 ++++---- src/devices/sound/asc.cpp | 4 ++-- src/devices/sound/asc.h | 4 ++-- src/devices/sound/astrocde.cpp | 8 ++++---- src/devices/sound/astrocde.h | 4 ++-- src/devices/sound/awacs.cpp | 4 ++-- src/devices/sound/awacs.h | 4 ++-- src/devices/sound/c6280.cpp | 2 +- src/devices/sound/c6280.h | 2 +- src/devices/sound/cdp1863.cpp | 2 +- src/devices/sound/cdp1863.h | 5 ++--- src/devices/sound/cdp1864.cpp | 16 +++++++-------- src/devices/sound/cdp1864.h | 16 +++++++-------- src/devices/sound/huc6230.cpp | 2 +- src/devices/video/crt9021.cpp | 4 ++-- src/devices/video/crt9021.h | 39 ++++++++++++++++++------------------ src/devices/video/crt9212.cpp | 6 +++--- src/devices/video/crt9212.h | 18 ++++++++--------- src/devices/video/ef9369.cpp | 6 +++--- src/devices/video/ef9369.h | 6 +++--- src/devices/video/gb_lcd.cpp | 18 ++++++++--------- src/devices/video/gb_lcd.h | 16 +++++++-------- src/devices/video/hd44102.cpp | 18 ++++++++--------- src/devices/video/hd44102.h | 14 ++++++------- src/devices/video/hd61830.cpp | 8 ++++---- src/devices/video/hd61830.h | 8 ++++---- src/devices/video/hd66421.cpp | 8 ++++---- src/devices/video/hd66421.h | 8 ++++---- src/devices/video/hp1ll3.cpp | 4 ++-- src/devices/video/hp1ll3.h | 4 ++-- src/devices/video/huc6260.cpp | 8 ++++---- src/devices/video/huc6260.h | 8 ++++---- src/devices/video/i8244.cpp | 8 ++++---- src/devices/video/i8244.h | 8 ++++---- src/devices/video/jangou_blitter.cpp | 20 +++++++++--------- src/devices/video/jangou_blitter.h | 20 +++++++++--------- src/devices/video/mb88303.cpp | 12 +++++------ src/devices/video/mb88303.h | 12 +++++------ src/devices/video/mb90082.cpp | 4 ++-- src/devices/video/mb90082.h | 4 ++-- src/devices/video/mb_vcu.cpp | 24 +++++++++++----------- src/devices/video/mb_vcu.h | 24 +++++++++++----------- src/devices/video/msm6255.cpp | 8 ++++---- src/devices/video/msm6255.h | 8 ++++---- src/devices/video/nt7534.cpp | 20 +++++++++--------- src/devices/video/nt7534.h | 12 +++++------ src/devices/video/ppu2c0x.cpp | 8 ++++---- src/devices/video/ppu2c0x.h | 8 ++++---- src/devices/video/ppu2c0x_vt.cpp | 16 +++++++-------- src/devices/video/ppu2c0x_vt.h | 8 ++++---- src/devices/video/sed1330.cpp | 8 ++++---- src/devices/video/sed1330.h | 8 ++++---- src/devices/video/sed1520.cpp | 20 +++++++++--------- src/devices/video/sed1520.h | 12 +++++------ src/devices/video/snes_ppu.cpp | 38 +++++++++++++++++------------------ src/devices/video/snes_ppu.h | 8 ++++---- src/devices/video/upd3301.cpp | 12 +++++------ src/devices/video/upd3301.h | 12 +++++------ src/devices/video/vic4567.cpp | 6 +++--- src/devices/video/vic4567.h | 6 +++--- src/mame/drivers/controlid.cpp | 2 +- src/mame/drivers/cosmicos.cpp | 6 +++--- src/mame/drivers/eti660.cpp | 2 +- src/mame/drivers/kyocera.cpp | 7 ++----- src/mame/drivers/odyssey2.cpp | 8 ++++---- src/mame/drivers/olyboss.cpp | 2 +- src/mame/drivers/pofo.cpp | 8 ++++---- src/mame/drivers/studio2.cpp | 2 +- src/mame/drivers/tandy2k.cpp | 4 ++-- src/mame/drivers/tmc1800.cpp | 6 +++--- src/mame/drivers/tmc2000e.cpp | 2 +- src/mame/machine/cybiko.cpp | 8 ++++---- src/mame/machine/gb.cpp | 10 ++++----- src/mame/video/nbmj8688.cpp | 8 ++++---- 78 files changed, 361 insertions(+), 366 deletions(-) diff --git a/src/devices/bus/vip/vp550.cpp b/src/devices/bus/vip/vp550.cpp index 6d1e36f57d7..8df76ac92d5 100644 --- a/src/devices/bus/vip/vp550.cpp +++ b/src/devices/bus/vip/vp550.cpp @@ -120,8 +120,8 @@ void vp550_device::vip_program_w(offs_t offset, uint8_t data, int cdef, int *min switch (offset & 0x03) { - case 1: m_pfg_a->write_str(data); break; - case 2: m_pfg_b->write_str(data); break; + case 1: m_pfg_a->str_w(data); break; + case 2: m_pfg_b->str_w(data); break; case 3: octave_w(data); break; } diff --git a/src/devices/bus/vip/vp595.cpp b/src/devices/bus/vip/vp595.cpp index 1dab7f4a49f..670b0926f90 100644 --- a/src/devices/bus/vip/vp595.cpp +++ b/src/devices/bus/vip/vp595.cpp @@ -79,7 +79,7 @@ void vp595_device::vip_io_w(offs_t offset, uint8_t data) { if (!data) data = 0x80; - m_pfg->write_str(data); + m_pfg->str_w(data); } } diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp index 40dde50f0ae..ffb0f4088c1 100644 --- a/src/devices/cpu/h6280/h6280.cpp +++ b/src/devices/cpu/h6280/h6280.cpp @@ -2604,7 +2604,7 @@ READ8_MEMBER( h6280_device::io_buffer_r ) WRITE8_MEMBER( h6280_device::psg_w ) { m_io_buffer = data; - m_psg->c6280_w(space,offset,data,mem_mask); + m_psg->c6280_w(offset, data); } bool h6280_device::memory_translate(int spacenum, int intention, offs_t &address) diff --git a/src/devices/sound/ad1848.cpp b/src/devices/sound/ad1848.cpp index 5db5b3ded2d..368025c83cb 100644 --- a/src/devices/sound/ad1848.cpp +++ b/src/devices/sound/ad1848.cpp @@ -64,7 +64,7 @@ void ad1848_device::device_reset() m_irq = false; } -READ8_MEMBER(ad1848_device::read) +uint8_t ad1848_device::read(offs_t offset) { switch(offset) { @@ -80,7 +80,7 @@ READ8_MEMBER(ad1848_device::read) return 0; } -WRITE8_MEMBER(ad1848_device::write) +void ad1848_device::write(offs_t offset, uint8_t data) { static constexpr int div_factor[] = {3072, 1536, 896, 768, 448, 384, 512, 2560}; switch(offset) @@ -127,13 +127,13 @@ WRITE8_MEMBER(ad1848_device::write) } } -READ8_MEMBER(ad1848_device::dack_r) +uint8_t ad1848_device::dack_r() { m_drq_cb(CLEAR_LINE); return 0; // not implemented } -WRITE8_MEMBER(ad1848_device::dack_w) +void ad1848_device::dack_w(uint8_t data) { if(!m_play) return; diff --git a/src/devices/sound/ad1848.h b/src/devices/sound/ad1848.h index 61d8a9202d8..2b98691befa 100644 --- a/src/devices/sound/ad1848.h +++ b/src/devices/sound/ad1848.h @@ -16,10 +16,10 @@ public: auto irq() { return m_irq_cb.bind(); } auto drq() { return m_drq_cb.bind(); } - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); - DECLARE_READ8_MEMBER(dack_r); - DECLARE_WRITE8_MEMBER(dack_w); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); + uint8_t dack_r(); + void dack_w(uint8_t data); protected: virtual void device_start() override; diff --git a/src/devices/sound/asc.cpp b/src/devices/sound/asc.cpp index d0a2c491679..69d4c384f3a 100644 --- a/src/devices/sound/asc.cpp +++ b/src/devices/sound/asc.cpp @@ -266,7 +266,7 @@ void asc_device::sound_stream_update(sound_stream &stream, stream_sample_t **inp // read - read from the chip's registers and internal RAM //------------------------------------------------- -READ8_MEMBER( asc_device::read ) +uint8_t asc_device::read(offs_t offset) { uint8_t rv; @@ -412,7 +412,7 @@ READ8_MEMBER( asc_device::read ) // write - write to the chip's registers and internal RAM //------------------------------------------------- -WRITE8_MEMBER( asc_device::write ) +void asc_device::write(offs_t offset, uint8_t data) { //printf("ASC: write %02x to %x\n", data, offset); diff --git a/src/devices/sound/asc.h b/src/devices/sound/asc.h index 436b319beac..e720aab4efa 100644 --- a/src/devices/sound/asc.h +++ b/src/devices/sound/asc.h @@ -47,8 +47,8 @@ public: void set_type(asc_type type) { m_chip_type = type; } auto irqf_callback() { return write_irq.bind(); } - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); protected: enum diff --git a/src/devices/sound/astrocde.cpp b/src/devices/sound/astrocde.cpp index 797d5920176..63f900b4806 100644 --- a/src/devices/sound/astrocde.cpp +++ b/src/devices/sound/astrocde.cpp @@ -297,7 +297,7 @@ void astrocade_io_device::state_save_register() * *************************************/ -WRITE8_MEMBER(astrocade_io_device::write) +void astrocade_io_device::write(offs_t offset, uint8_t data) { if ((offset & 8) != 0) offset = (offset >> 8) & 7; @@ -312,14 +312,14 @@ WRITE8_MEMBER(astrocade_io_device::write) } -READ8_MEMBER(astrocade_io_device::read) +uint8_t astrocade_io_device::read(offs_t offset) { if ((offset & 0x0f) < 0x08) { if (!machine().side_effects_disabled()) - m_so_callback[offset & 7](space, 0, offset >> 8); + m_so_callback[offset & 7](0, offset >> 8); - return m_si_callback(space, offset & 7); + return m_si_callback(offset & 7); } else if ((offset & 0x0f) >= 0x0c) return m_pots[offset & 3](); diff --git a/src/devices/sound/astrocde.h b/src/devices/sound/astrocde.h index 398a3648d3d..40bf8cc1448 100644 --- a/src/devices/sound/astrocde.h +++ b/src/devices/sound/astrocde.h @@ -61,8 +61,8 @@ protected: virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override; public: - DECLARE_WRITE8_MEMBER(write); - DECLARE_READ8_MEMBER(read); + void write(offs_t offset, uint8_t data); + uint8_t read(offs_t offset); private: void state_save_register(); diff --git a/src/devices/sound/awacs.cpp b/src/devices/sound/awacs.cpp index 0c9c5417ffc..c03c2d9eb11 100644 --- a/src/devices/sound/awacs.cpp +++ b/src/devices/sound/awacs.cpp @@ -127,7 +127,7 @@ void awacs_device::sound_stream_update(sound_stream &stream, stream_sample_t **i // read - read from the chip's registers and internal RAM //------------------------------------------------- -READ8_MEMBER( awacs_device::read ) +uint8_t awacs_device::read(offs_t offset) { return m_regs[offset]; } @@ -136,7 +136,7 @@ READ8_MEMBER( awacs_device::read ) // write - write to the chip's registers and internal RAM //------------------------------------------------- -WRITE8_MEMBER( awacs_device::write ) +void awacs_device::write(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/devices/sound/awacs.h b/src/devices/sound/awacs.h index 68f6f428550..4ef4a800a24 100644 --- a/src/devices/sound/awacs.h +++ b/src/devices/sound/awacs.h @@ -25,8 +25,8 @@ public: // construction/destruction awacs_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); void set_dma_base(address_space &space, int offset0, int offset1); diff --git a/src/devices/sound/c6280.cpp b/src/devices/sound/c6280.cpp index 8b0c4322e79..0278620d943 100644 --- a/src/devices/sound/c6280.cpp +++ b/src/devices/sound/c6280.cpp @@ -213,7 +213,7 @@ void c6280_device::sound_stream_update(sound_stream &stream, stream_sample_t **i ------11 4 bit Shift Addition */ -WRITE8_MEMBER( c6280_device::c6280_w ) +void c6280_device::c6280_w(offs_t offset, uint8_t data) { channel *chan = &m_channel[m_select]; diff --git a/src/devices/sound/c6280.h b/src/devices/sound/c6280.h index dade29ab806..9a778c31a9d 100644 --- a/src/devices/sound/c6280.h +++ b/src/devices/sound/c6280.h @@ -13,7 +13,7 @@ public: c6280_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); // write only - DECLARE_WRITE8_MEMBER( c6280_w ); + void c6280_w(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/sound/cdp1863.cpp b/src/devices/sound/cdp1863.cpp index 6551e8bd983..0f480f05bb6 100644 --- a/src/devices/sound/cdp1863.cpp +++ b/src/devices/sound/cdp1863.cpp @@ -141,7 +141,7 @@ void cdp1863_device::sound_stream_update(sound_stream &stream, stream_sample_t * // oe_w - output enable write //------------------------------------------------- -WRITE_LINE_MEMBER( cdp1863_device::oe_w ) +void cdp1863_device::oe_w(int state) { m_oe = state; } diff --git a/src/devices/sound/cdp1863.h b/src/devices/sound/cdp1863.h index 310848c607d..e44b65a6f9d 100644 --- a/src/devices/sound/cdp1863.h +++ b/src/devices/sound/cdp1863.h @@ -42,10 +42,9 @@ public: void set_clock2(int clock2) { m_clock2 = clock2; } void set_clock2(const XTAL &xtal) { xtal.validate("selecting cdp1863 clock"); set_clock2(xtal.value()); } - DECLARE_WRITE8_MEMBER( str_w ) { write_str(data); } - void write_str(uint8_t data) { m_latch = data; } + void str_w(uint8_t data) { m_latch = data; } - DECLARE_WRITE_LINE_MEMBER( oe_w ); + void oe_w(int state); void set_clk1(int clock); void set_clk2(int clock); diff --git a/src/devices/sound/cdp1864.cpp b/src/devices/sound/cdp1864.cpp index ace6a34781e..ba026792c49 100644 --- a/src/devices/sound/cdp1864.cpp +++ b/src/devices/sound/cdp1864.cpp @@ -306,7 +306,7 @@ void cdp1864_device::sound_stream_update(sound_stream &stream, stream_sample_t * // dispon_r - //------------------------------------------------- -READ8_MEMBER( cdp1864_device::dispon_r ) +uint8_t cdp1864_device::dispon_r() { m_disp = 1; @@ -318,7 +318,7 @@ READ8_MEMBER( cdp1864_device::dispon_r ) // dispoff_r - //------------------------------------------------- -READ8_MEMBER( cdp1864_device::dispoff_r ) +uint8_t cdp1864_device::dispoff_r() { m_disp = 0; @@ -333,7 +333,7 @@ READ8_MEMBER( cdp1864_device::dispoff_r ) // step_bgcolor_w - //------------------------------------------------- -WRITE8_MEMBER( cdp1864_device::step_bgcolor_w ) +void cdp1864_device::step_bgcolor_w(uint8_t data) { m_disp = 1; @@ -346,7 +346,7 @@ WRITE8_MEMBER( cdp1864_device::step_bgcolor_w ) // tone_latch_w - //------------------------------------------------- -WRITE8_MEMBER( cdp1864_device::tone_latch_w ) +void cdp1864_device::tone_latch_w(uint8_t data) { m_latch = data; } @@ -356,7 +356,7 @@ WRITE8_MEMBER( cdp1864_device::tone_latch_w ) // dma_w - //------------------------------------------------- -WRITE8_MEMBER( cdp1864_device::dma_w ) +void cdp1864_device::dma_w(uint8_t data) { int rdata = 1, bdata = 1, gdata = 1; int sx = screen().hpos() + 4; @@ -389,7 +389,7 @@ WRITE8_MEMBER( cdp1864_device::dma_w ) // con_w - color on write //------------------------------------------------- -WRITE_LINE_MEMBER( cdp1864_device::con_w ) +void cdp1864_device::con_w(int state) { m_con = state; } @@ -399,7 +399,7 @@ WRITE_LINE_MEMBER( cdp1864_device::con_w ) // aoe_w - audio output enable write //------------------------------------------------- -WRITE_LINE_MEMBER( cdp1864_device::aoe_w ) +void cdp1864_device::aoe_w(int state) { if (!state) { @@ -414,7 +414,7 @@ WRITE_LINE_MEMBER( cdp1864_device::aoe_w ) // evs_w - external vertical sync write //------------------------------------------------- -WRITE_LINE_MEMBER( cdp1864_device::evs_w ) +void cdp1864_device::evs_w(int state) { } diff --git a/src/devices/sound/cdp1864.h b/src/devices/sound/cdp1864.h index ff66122dfbd..54c8f3b8ab2 100644 --- a/src/devices/sound/cdp1864.h +++ b/src/devices/sound/cdp1864.h @@ -93,17 +93,17 @@ public: void set_chrominance(double r, double b, double g, double bkg) { m_chr_r = r; m_chr_b = b; m_chr_g = g; m_chr_bkg = bkg; } - DECLARE_READ8_MEMBER( dispon_r ); - DECLARE_READ8_MEMBER( dispoff_r ); + uint8_t dispon_r(); + uint8_t dispoff_r(); - DECLARE_WRITE8_MEMBER( step_bgcolor_w ); - DECLARE_WRITE8_MEMBER( tone_latch_w ); + void step_bgcolor_w(uint8_t data); + void tone_latch_w(uint8_t data); - DECLARE_WRITE8_MEMBER( dma_w ); + void dma_w(uint8_t data); - DECLARE_WRITE_LINE_MEMBER( con_w ); - DECLARE_WRITE_LINE_MEMBER( aoe_w ); - DECLARE_WRITE_LINE_MEMBER( evs_w ); + void con_w(int state); + void aoe_w(int state); + void evs_w(int state); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/sound/huc6230.cpp b/src/devices/sound/huc6230.cpp index 57e3b77ab26..01d5799ac59 100644 --- a/src/devices/sound/huc6230.cpp +++ b/src/devices/sound/huc6230.cpp @@ -52,7 +52,7 @@ WRITE8_MEMBER( huc6230_device::write ) m_stream->update(); if (offset < 0x10) { - m_psg->c6280_w(space, offset, data, mem_mask); + m_psg->c6280_w(offset, data); } else if (offset < 0x11) { diff --git a/src/devices/video/crt9021.cpp b/src/devices/video/crt9021.cpp index 2ed5680559f..6f1bc8102e2 100644 --- a/src/devices/video/crt9021.cpp +++ b/src/devices/video/crt9021.cpp @@ -131,7 +131,7 @@ void crt9021_device::device_start() // ld_sh_w - load/shift //------------------------------------------------- -WRITE_LINE_MEMBER( crt9021_device::ld_sh_w ) +void crt9021_device::ld_sh_w(int state) { LOG("CRT9021 LD/SH: %u\n", state); @@ -171,7 +171,7 @@ WRITE_LINE_MEMBER( crt9021_device::ld_sh_w ) // vsync_w - vertical sync //------------------------------------------------- -WRITE_LINE_MEMBER( crt9021_device::vsync_w ) +void crt9021_device::vsync_w(int state) { LOG("CRT9021 VSYNC: %u\n", state); } diff --git a/src/devices/video/crt9021.h b/src/devices/video/crt9021.h index a98c76251b0..1d071da00df 100644 --- a/src/devices/video/crt9021.h +++ b/src/devices/video/crt9021.h @@ -56,26 +56,25 @@ public: template void set_display_callback(T &&... args) { m_display_cb.set(std::forward(args)...); } void write(uint8_t data) { m_data = data; } - DECLARE_WRITE8_MEMBER( write ) { write(data); } - DECLARE_WRITE_LINE_MEMBER( ms0_w ) { m_ms0 = state; } - DECLARE_WRITE_LINE_MEMBER( ms1_w ) { m_ms1 = state; } - DECLARE_WRITE_LINE_MEMBER( revid_w ) { m_revid = state; } - DECLARE_WRITE_LINE_MEMBER( chabl_w ) { m_chabl = state; } - DECLARE_WRITE_LINE_MEMBER( blink_w ) { m_blink = state; } - DECLARE_WRITE_LINE_MEMBER( intin_w ) { m_intin = state; } - DECLARE_WRITE_LINE_MEMBER( atten_w ) { m_atten = state; } - DECLARE_WRITE_LINE_MEMBER( cursor_w ) { m_cursor = state; } - DECLARE_WRITE_LINE_MEMBER( retbl_w ) { m_retbl = state; } - DECLARE_WRITE_LINE_MEMBER( ld_sh_w ); - DECLARE_WRITE_LINE_MEMBER( sld_w ) { m_sld = state; } - DECLARE_WRITE_LINE_MEMBER( slg_w ) { m_slg = state; } - DECLARE_WRITE_LINE_MEMBER( blc_w ) { m_blc = state; } - DECLARE_WRITE_LINE_MEMBER( bkc_w ) { m_bkc = state; } - DECLARE_WRITE_LINE_MEMBER( sl0_w ) { m_sl0 = state; } - DECLARE_WRITE_LINE_MEMBER( sl1_w ) { m_sl1 = state; } - DECLARE_WRITE_LINE_MEMBER( sl2_w ) { m_sl2 = state; } - DECLARE_WRITE_LINE_MEMBER( sl3_w ) { m_sl3 = state; } - DECLARE_WRITE_LINE_MEMBER( vsync_w ); + void ms0_w(int state) { m_ms0 = state; } + void ms1_w(int state) { m_ms1 = state; } + void revid_w(int state) { m_revid = state; } + void chabl_w(int state) { m_chabl = state; } + void blink_w(int state) { m_blink = state; } + void intin_w(int state) { m_intin = state; } + void atten_w(int state) { m_atten = state; } + void cursor_w(int state) { m_cursor = state; } + void retbl_w(int state) { m_retbl = state; } + void ld_sh_w(int state); + void sld_w(int state) { m_sld = state; } + void slg_w(int state) { m_slg = state; } + void blc_w(int state) { m_blc = state; } + void bkc_w(int state) { m_bkc = state; } + void sl0_w(int state) { m_sl0 = state; } + void sl1_w(int state) { m_sl1 = state; } + void sl2_w(int state) { m_sl2 = state; } + void sl3_w(int state) { m_sl3 = state; } + void vsync_w(int state); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/crt9212.cpp b/src/devices/video/crt9212.cpp index 575624d3dda..836680dffee 100644 --- a/src/devices/video/crt9212.cpp +++ b/src/devices/video/crt9212.cpp @@ -92,7 +92,7 @@ void crt9212_device::device_start() // clrcnt_w - clear counter //------------------------------------------------- -WRITE_LINE_MEMBER( crt9212_device::clrcnt_w ) +void crt9212_device::clrcnt_w(int state) { if (m_clrcnt && !state) { @@ -107,7 +107,7 @@ WRITE_LINE_MEMBER( crt9212_device::clrcnt_w ) // rclk_w - read clock //------------------------------------------------- -WRITE_LINE_MEMBER( crt9212_device::rclk_w ) +void crt9212_device::rclk_w(int state) { if (!m_rclk && state) { @@ -160,7 +160,7 @@ WRITE_LINE_MEMBER( crt9212_device::rclk_w ) // wclk_w - write clock //------------------------------------------------- -WRITE_LINE_MEMBER( crt9212_device::wclk_w ) +void crt9212_device::wclk_w(int state) { if (!m_wclk && state) { diff --git a/src/devices/video/crt9212.h b/src/devices/video/crt9212.h index 0abbe714004..bf32b311c2d 100644 --- a/src/devices/video/crt9212.h +++ b/src/devices/video/crt9212.h @@ -45,15 +45,15 @@ public: auto rof() { return m_write_rof.bind(); } auto wof() { return m_write_wof.bind(); } - DECLARE_WRITE8_MEMBER( write ) { m_data = data; } - DECLARE_WRITE_LINE_MEMBER( clrcnt_w ); - DECLARE_WRITE_LINE_MEMBER( tog_w ) { m_tog = state; } - DECLARE_WRITE_LINE_MEMBER( ren_w ) { m_ren = state; } - DECLARE_WRITE_LINE_MEMBER( wen1_w ) { m_wen1 = state; } - DECLARE_WRITE_LINE_MEMBER( wen2_w ) { m_wen2 = state; } - DECLARE_WRITE_LINE_MEMBER( oe_w ) { m_oe = state; } - DECLARE_WRITE_LINE_MEMBER( rclk_w ); - DECLARE_WRITE_LINE_MEMBER( wclk_w ); + void write(uint8_t data) { m_data = data; } + void clrcnt_w(int state); + void tog_w(int state) { m_tog = state; } + void ren_w(int state) { m_ren = state; } + void wen1_w(int state) { m_wen1 = state; } + void wen2_w(int state) { m_wen2 = state; } + void oe_w(int state) { m_oe = state; } + void rclk_w(int state) ; + void wclk_w(int state) ; protected: // device-level overrides diff --git a/src/devices/video/ef9369.cpp b/src/devices/video/ef9369.cpp index 49da6402bf7..2e2d9e12229 100644 --- a/src/devices/video/ef9369.cpp +++ b/src/devices/video/ef9369.cpp @@ -70,7 +70,7 @@ void ef9369_device::device_reset() // IMPLEMENTATION //************************************************************************** -READ8_MEMBER( ef9369_device::data_r ) +uint8_t ef9369_device::data_r() { if (m_address & 1) return m_m[m_address >> 1] << 4 | m_cc[m_address >> 1]; @@ -78,7 +78,7 @@ READ8_MEMBER( ef9369_device::data_r ) return m_cb[m_address >> 1] << 4 | m_ca[m_address >> 1]; } -WRITE8_MEMBER( ef9369_device::data_w ) +void ef9369_device::data_w(uint8_t data) { const int entry = m_address >> 1; @@ -102,7 +102,7 @@ WRITE8_MEMBER( ef9369_device::data_w ) m_address &= 0x1f; } -WRITE8_MEMBER( ef9369_device::address_w ) +void ef9369_device::address_w(uint8_t data) { m_address = data & 0x1f; // 5-bit } diff --git a/src/devices/video/ef9369.h b/src/devices/video/ef9369.h index 1e2a1af6f0d..7c10d6d1b22 100644 --- a/src/devices/video/ef9369.h +++ b/src/devices/video/ef9369.h @@ -48,9 +48,9 @@ public: // configuration template void set_color_update_callback(T &&... args) { m_color_update_cb.set(std::forward(args)...); } - DECLARE_READ8_MEMBER(data_r); - DECLARE_WRITE8_MEMBER(data_w); - DECLARE_WRITE8_MEMBER(address_w); + uint8_t data_r(); + void data_w(uint8_t data); + void address_w(uint8_t data); static constexpr int NUMCOLORS = 16; diff --git a/src/devices/video/gb_lcd.cpp b/src/devices/video/gb_lcd.cpp index 019ba778144..4f02d39bfab 100644 --- a/src/devices/video/gb_lcd.cpp +++ b/src/devices/video/gb_lcd.cpp @@ -2866,7 +2866,7 @@ void dmg_ppu_device::lcd_switch_on(uint8_t new_data) } -READ8_MEMBER(dmg_ppu_device::vram_r) +uint8_t dmg_ppu_device::vram_r(offs_t offset) { if (!machine().side_effects_disabled()) { @@ -2878,7 +2878,7 @@ READ8_MEMBER(dmg_ppu_device::vram_r) } -WRITE8_MEMBER(dmg_ppu_device::vram_w) +void dmg_ppu_device::vram_w(offs_t offset, uint8_t data) { update_state(); if (m_vram_locked == LOCKED) @@ -2888,7 +2888,7 @@ WRITE8_MEMBER(dmg_ppu_device::vram_w) } -READ8_MEMBER(dmg_ppu_device::oam_r) +uint8_t dmg_ppu_device::oam_r(offs_t offset) { if (!machine().side_effects_disabled()) { @@ -2900,7 +2900,7 @@ READ8_MEMBER(dmg_ppu_device::oam_r) } -WRITE8_MEMBER(dmg_ppu_device::oam_w) +void dmg_ppu_device::oam_w(offs_t offset, uint8_t data) { update_state(); if (m_oam_locked == LOCKED || offset >= 0xa0 || m_oam_dma_processing) @@ -2911,7 +2911,7 @@ WRITE8_MEMBER(dmg_ppu_device::oam_w) -READ8_MEMBER(dmg_ppu_device::video_r) +uint8_t dmg_ppu_device::video_r(offs_t offset) { if (!machine().side_effects_disabled()) { @@ -3048,7 +3048,7 @@ void dmg_ppu_device::check_stat_irq() } -WRITE8_MEMBER(dmg_ppu_device::video_w) +void dmg_ppu_device::video_w(offs_t offset, uint8_t data) { update_state(); LOG("video_w: offset = %02x, data = %02x\n", offset, data); @@ -3183,7 +3183,7 @@ WRITE8_MEMBER(dmg_ppu_device::video_w) m_vid_regs[offset] = data; } -READ8_MEMBER(cgb_ppu_device::video_r) +uint8_t cgb_ppu_device::video_r(offs_t offset) { if (!machine().side_effects_disabled()) { @@ -3271,7 +3271,7 @@ bool cgb_ppu_device::stat_write(uint8_t new_data) } -WRITE8_MEMBER(cgb_ppu_device::video_w) +void cgb_ppu_device::video_w(offs_t offset, uint8_t data) { update_state(); LOG("video_w\n"); @@ -3487,7 +3487,7 @@ WRITE8_MEMBER(cgb_ppu_device::video_w) return; default: /* we didn't handle the write, so pass it to the GB handler */ - dmg_ppu_device::video_w(space, offset, data); + dmg_ppu_device::video_w(offset, data); return; } diff --git a/src/devices/video/gb_lcd.h b/src/devices/video/gb_lcd.h index 2de6c66ba10..9c4e2607420 100644 --- a/src/devices/video/gb_lcd.h +++ b/src/devices/video/gb_lcd.h @@ -30,12 +30,12 @@ public: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER(vram_r); - DECLARE_WRITE8_MEMBER(vram_w); - DECLARE_READ8_MEMBER(oam_r); - DECLARE_WRITE8_MEMBER(oam_w); - virtual DECLARE_READ8_MEMBER(video_r); - virtual DECLARE_WRITE8_MEMBER(video_w); + uint8_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint8_t data); + uint8_t oam_r(offs_t offset); + void oam_w(offs_t offset, uint8_t data); + virtual uint8_t video_r(offs_t offset); + virtual void video_w(offs_t offset, uint8_t data); virtual void update_state(); @@ -289,8 +289,8 @@ public: } cgb_ppu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ8_MEMBER(video_r) override; - virtual DECLARE_WRITE8_MEMBER(video_w) override; + virtual uint8_t video_r(offs_t offset) override; + virtual void video_w(offs_t offset, uint8_t data) override; protected: diff --git a/src/devices/video/hd44102.cpp b/src/devices/video/hd44102.cpp index 71e8a0fba13..3b05f1e5e69 100644 --- a/src/devices/video/hd44102.cpp +++ b/src/devices/video/hd44102.cpp @@ -112,13 +112,13 @@ void hd44102_device::device_reset() // read - register read //------------------------------------------------- -READ8_MEMBER( hd44102_device::read ) +uint8_t hd44102_device::read(offs_t offset) { uint8_t data = 0; if (m_cs2) { - data = (offset & 0x01) ? data_r(space, offset) : status_r(space, offset); + data = (offset & 0x01) ? data_r() : status_r(); } return data; @@ -129,11 +129,11 @@ READ8_MEMBER( hd44102_device::read ) // write - register write //------------------------------------------------- -WRITE8_MEMBER( hd44102_device::write ) +void hd44102_device::write(offs_t offset, uint8_t data) { if (m_cs2) { - (offset & 0x01) ? data_w(space, offset, data) : control_w(space, offset, data); + (offset & 0x01) ? data_w(data) : control_w(data); } } @@ -142,7 +142,7 @@ WRITE8_MEMBER( hd44102_device::write ) // status_r - status read //------------------------------------------------- -READ8_MEMBER( hd44102_device::status_r ) +uint8_t hd44102_device::status_r() { return m_status; } @@ -152,7 +152,7 @@ READ8_MEMBER( hd44102_device::status_r ) // control_w - control write //------------------------------------------------- -WRITE8_MEMBER( hd44102_device::control_w ) +void hd44102_device::control_w(uint8_t data) { if (m_status & STATUS_BUSY) return; @@ -213,7 +213,7 @@ WRITE8_MEMBER( hd44102_device::control_w ) // data_r - data read //------------------------------------------------- -READ8_MEMBER( hd44102_device::data_r ) +uint8_t hd44102_device::data_r() { uint8_t data = m_output; @@ -229,7 +229,7 @@ READ8_MEMBER( hd44102_device::data_r ) // data_w - data write //------------------------------------------------- -WRITE8_MEMBER( hd44102_device::data_w ) +void hd44102_device::data_w(uint8_t data) { m_ram[m_x][m_y] = data; @@ -241,7 +241,7 @@ WRITE8_MEMBER( hd44102_device::data_w ) // cs2_w - chip select 2 write //------------------------------------------------- -WRITE_LINE_MEMBER( hd44102_device::cs2_w ) +void hd44102_device::cs2_w(int state) { m_cs2 = state; } diff --git a/src/devices/video/hd44102.h b/src/devices/video/hd44102.h index 1688a502441..94c87c8b2b6 100644 --- a/src/devices/video/hd44102.h +++ b/src/devices/video/hd44102.h @@ -36,10 +36,10 @@ public: // inline configuration helpers void set_offsets(int sx, int sy) { m_sx = sx; m_sy = sy; } - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); - DECLARE_WRITE_LINE_MEMBER( cs2_w ); + void cs2_w(int state); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -49,11 +49,11 @@ protected: virtual void device_reset() override; private: - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( control_w ); + uint8_t status_r(); + void control_w(uint8_t data); - DECLARE_READ8_MEMBER( data_r ); - DECLARE_WRITE8_MEMBER( data_w ); + uint8_t data_r(); + void data_w(uint8_t data); inline void count_up_or_down(); diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp index 15e9930721f..26ee97cb22f 100644 --- a/src/devices/video/hd61830.cpp +++ b/src/devices/video/hd61830.cpp @@ -177,7 +177,7 @@ void hd61830_device::set_busy_flag() // status_r - status register read //------------------------------------------------- -READ8_MEMBER( hd61830_device::status_r ) +uint8_t hd61830_device::status_r() { LOG("HD61830 Status Read: %s\n", m_bf ? "busy" : "ready"); @@ -189,7 +189,7 @@ READ8_MEMBER( hd61830_device::status_r ) // control_w - instruction register write //------------------------------------------------- -WRITE8_MEMBER( hd61830_device::control_w ) +void hd61830_device::control_w(uint8_t data) { m_ir = data; } @@ -199,7 +199,7 @@ WRITE8_MEMBER( hd61830_device::control_w ) // data_r - data register read //------------------------------------------------- -READ8_MEMBER( hd61830_device::data_r ) +uint8_t hd61830_device::data_r() { uint8_t data = m_dor; @@ -217,7 +217,7 @@ READ8_MEMBER( hd61830_device::data_r ) // data_w - data register write //------------------------------------------------- -WRITE8_MEMBER( hd61830_device::data_w ) +void hd61830_device::data_w(uint8_t data) { if (m_bf) { diff --git a/src/devices/video/hd61830.h b/src/devices/video/hd61830.h index f8579081ac1..56747935587 100644 --- a/src/devices/video/hd61830.h +++ b/src/devices/video/hd61830.h @@ -28,11 +28,11 @@ public: auto rd_rd_callback() { return m_read_rd.bind(); } - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( control_w ); + uint8_t status_r(); + void control_w(uint8_t data); - DECLARE_READ8_MEMBER( data_r ); - DECLARE_WRITE8_MEMBER( data_w ); + uint8_t data_r(); + void data_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/hd66421.cpp b/src/devices/video/hd66421.cpp index bb03b80252e..22efe3689e8 100644 --- a/src/devices/video/hd66421.cpp +++ b/src/devices/video/hd66421.cpp @@ -150,25 +150,25 @@ void hd66421_device::device_start() save_item(NAME(m_y)); } -READ8_MEMBER( hd66421_device::reg_idx_r ) +uint8_t hd66421_device::reg_idx_r() { _logerror( 2, ("reg_idx_r\n")); return m_cmd; } -WRITE8_MEMBER( hd66421_device::reg_idx_w ) +void hd66421_device::reg_idx_w(uint8_t data) { _logerror( 2, ("reg_idx_w (%02X)\n", data)); m_cmd = data; } -READ8_MEMBER( hd66421_device::reg_dat_r ) +uint8_t hd66421_device::reg_dat_r() { _logerror( 2, ("reg_dat_r\n")); return m_reg[m_cmd]; } -WRITE8_MEMBER( hd66421_device::reg_dat_w ) +void hd66421_device::reg_dat_w(uint8_t data) { _logerror( 2, ("reg_dat_w (%02X)\n", data)); m_reg[m_cmd] = data; diff --git a/src/devices/video/hd66421.h b/src/devices/video/hd66421.h index b2ed9f991e5..8a38311d8e5 100644 --- a/src/devices/video/hd66421.h +++ b/src/devices/video/hd66421.h @@ -32,10 +32,10 @@ public: // construction/destruction hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ8_MEMBER( reg_idx_r ); - DECLARE_WRITE8_MEMBER( reg_idx_w ); - DECLARE_READ8_MEMBER( reg_dat_r ); - DECLARE_WRITE8_MEMBER( reg_dat_w ); + uint8_t reg_idx_r(); + void reg_idx_w(uint8_t data); + uint8_t reg_dat_r(); + void reg_dat_w(uint8_t data); uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/hp1ll3.cpp b/src/devices/video/hp1ll3.cpp index e376aa48b1f..9a1952d8c25 100644 --- a/src/devices/video/hp1ll3.cpp +++ b/src/devices/video/hp1ll3.cpp @@ -850,7 +850,7 @@ uint32_t hp1ll3_device::screen_update(screen_device &screen, bitmap_ind16 &bitma * offset 2: data */ -READ8_MEMBER( hp1ll3_device::read ) +uint8_t hp1ll3_device::read(offs_t offset) { uint8_t data = 0; @@ -964,7 +964,7 @@ READ8_MEMBER( hp1ll3_device::read ) // write - register write //------------------------------------------------- -WRITE8_MEMBER( hp1ll3_device::write ) +void hp1ll3_device::write(offs_t offset, uint8_t data) { DBG_LOG(1,"HPGPU", ("W @ %d <- %02x\n", offset, data)); diff --git a/src/devices/video/hp1ll3.h b/src/devices/video/hp1ll3.h index 8719168a882..1dd238fba8f 100644 --- a/src/devices/video/hp1ll3.h +++ b/src/devices/video/hp1ll3.h @@ -29,8 +29,8 @@ public: // Set VRAM size (in kw). Parameter must be <= 128 and it must be a power of 2. void set_vram_size(unsigned kw) { m_vram_size = kw * 1024; } - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/huc6260.cpp b/src/devices/video/huc6260.cpp index 293d2cbd8cf..1160f7edf13 100644 --- a/src/devices/video/huc6260.cpp +++ b/src/devices/video/huc6260.cpp @@ -187,19 +187,19 @@ void huc6260_device::video_update( bitmap_ind16 &bitmap, const rectangle &clipre // the battlera arcade board reads/writes the palette directly -READ8_MEMBER(huc6260_device::palette_direct_read) +uint8_t huc6260_device::palette_direct_read(offs_t offset) { if (!(offset&1)) return m_palette[offset>>1]; else return m_palette[offset >> 1] >> 8; } -WRITE8_MEMBER(huc6260_device::palette_direct_write) +void huc6260_device::palette_direct_write(offs_t offset, uint8_t data) { if (!(offset&1)) m_palette[offset>>1] = (m_palette[offset>>1] & 0xff00) | data; else m_palette[offset>>1] = (m_palette[offset>>1] & 0x00ff) | (data<<8); } -READ8_MEMBER( huc6260_device::read ) +uint8_t huc6260_device::read(offs_t offset) { uint8_t data = 0xFF; @@ -221,7 +221,7 @@ READ8_MEMBER( huc6260_device::read ) } -WRITE8_MEMBER( huc6260_device::write ) +void huc6260_device::write(offs_t offset, uint8_t data) { switch ( offset & 7 ) { diff --git a/src/devices/video/huc6260.h b/src/devices/video/huc6260.h index 695f60c9a05..69b74f8394b 100644 --- a/src/devices/video/huc6260.h +++ b/src/devices/video/huc6260.h @@ -33,11 +33,11 @@ public: auto hsync_changed() { return m_hsync_changed_cb.bind(); } void video_update(bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); - READ8_MEMBER(palette_direct_read); - WRITE8_MEMBER(palette_direct_write); + uint8_t palette_direct_read(offs_t offset); + void palette_direct_write(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/video/i8244.cpp b/src/devices/video/i8244.cpp index a2d142b0410..cc19dd2081e 100644 --- a/src/devices/video/i8244.cpp +++ b/src/devices/video/i8244.cpp @@ -292,7 +292,7 @@ offs_t i8244_device::fix_register_mirrors( offs_t offset ) } -READ8_MEMBER(i8244_device::read) +uint8_t i8244_device::read(offs_t offset) { uint8_t data; @@ -342,7 +342,7 @@ READ8_MEMBER(i8244_device::read) } -WRITE8_MEMBER(i8244_device::write) +void i8244_device::write(offs_t offset, uint8_t data) { offset = fix_register_mirrors( offset ); @@ -367,7 +367,7 @@ WRITE8_MEMBER(i8244_device::write) } -READ_LINE_MEMBER(i8244_device::vblank) +int i8244_device::vblank() { if ( screen().vpos() > m_start_vpos && screen().vpos() < m_start_vblank ) { @@ -377,7 +377,7 @@ READ_LINE_MEMBER(i8244_device::vblank) } -READ_LINE_MEMBER(i8244_device::hblank) +int i8244_device::hblank() { int hpos = screen().hpos(); int vpos = screen().vpos(); diff --git a/src/devices/video/i8244.h b/src/devices/video/i8244.h index 2a46163073b..b9c28d070af 100644 --- a/src/devices/video/i8244.h +++ b/src/devices/video/i8244.h @@ -35,10 +35,10 @@ public: auto irq_cb() { return m_irq_func.bind(); } auto postprocess_cb() { return m_postprocess_func.bind(); } - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); - DECLARE_READ_LINE_MEMBER(vblank); - DECLARE_READ_LINE_MEMBER(hblank); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); + int vblank(); + int hblank(); void i8244_palette(palette_device &palette) const; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/jangou_blitter.cpp b/src/devices/video/jangou_blitter.cpp index 5cebf751cb1..a866d13777d 100644 --- a/src/devices/video/jangou_blitter.cpp +++ b/src/devices/video/jangou_blitter.cpp @@ -206,52 +206,52 @@ void jangou_blitter_device::trigger_write(void) m_bltflip = false; } -WRITE8_MEMBER( jangou_blitter_device::vregs_w ) +void jangou_blitter_device::vregs_w(offs_t offset, uint8_t data) { // bit 5 set by Jangou, left-over? m_pen_data[offset] = data & 0x0f; } -WRITE8_MEMBER( jangou_blitter_device::bltflip_w ) +void jangou_blitter_device::bltflip_w(uint8_t data) { // TODO: unsure about how this works, Charles says it swaps the nibble but afaik it's used for CPU tiles in Night Gal Summer/Sexy Gal and they seems fine? // Maybe flipx is actually bltflip for later HW? m_bltflip = true; } -READ_LINE_MEMBER( jangou_blitter_device::status_r ) +int jangou_blitter_device::status_r() { return false; } // data accessors -WRITE8_MEMBER( jangou_blitter_device::x_w ) { m_x = data; } -WRITE8_MEMBER( jangou_blitter_device::y_w ) { m_y = data; } -WRITE8_MEMBER( jangou_blitter_device::src_lo_address_w ) +void jangou_blitter_device::x_w(uint8_t data) { m_x = data; } +void jangou_blitter_device::y_w(uint8_t data) { m_y = data; } +void jangou_blitter_device::src_lo_address_w(uint8_t data) { m_src_addr &= ~0xff; m_src_addr |= data & 0xff; } -WRITE8_MEMBER( jangou_blitter_device::src_md_address_w ) +void jangou_blitter_device::src_md_address_w(uint8_t data) { m_src_addr &= ~0xff00; m_src_addr |= data << 8; } -WRITE8_MEMBER( jangou_blitter_device::src_hi_address_w ) +void jangou_blitter_device::src_hi_address_w(uint8_t data) { m_src_addr &= ~0xff0000; m_src_addr |= data << 16; } -WRITE8_MEMBER( jangou_blitter_device::width_w ) +void jangou_blitter_device::width_w(uint8_t data) { m_width = data; } -WRITE8_MEMBER( jangou_blitter_device::height_and_trigger_w ) +void jangou_blitter_device::height_and_trigger_w(uint8_t data) { m_height = data; trigger_write(); diff --git a/src/devices/video/jangou_blitter.h b/src/devices/video/jangou_blitter.h index 8bf4f4a56ec..e8d43c3a9f6 100644 --- a/src/devices/video/jangou_blitter.h +++ b/src/devices/video/jangou_blitter.h @@ -23,9 +23,9 @@ public: void blit_v1_regs(address_map &map); void blit_v2_regs(address_map &map); - DECLARE_WRITE8_MEMBER( vregs_w ); - DECLARE_WRITE8_MEMBER( bltflip_w ); - DECLARE_READ_LINE_MEMBER( status_r ); + void vregs_w(offs_t offset, uint8_t data); + void bltflip_w(uint8_t data); + int status_r(); const uint8_t &blit_buffer(unsigned y, unsigned x) const { return m_blit_buffer[(256 * y) + x]; } @@ -49,13 +49,13 @@ private: bool m_bltflip; // blitter write accessors - DECLARE_WRITE8_MEMBER( x_w ); - DECLARE_WRITE8_MEMBER( y_w ); - DECLARE_WRITE8_MEMBER( height_and_trigger_w ); - DECLARE_WRITE8_MEMBER( width_w ); - DECLARE_WRITE8_MEMBER( src_lo_address_w ); - DECLARE_WRITE8_MEMBER( src_md_address_w ); - DECLARE_WRITE8_MEMBER( src_hi_address_w ); + void x_w(uint8_t data); + void y_w(uint8_t data); + void height_and_trigger_w(uint8_t data); + void width_w(uint8_t data); + void src_lo_address_w(uint8_t data); + void src_md_address_w(uint8_t data); + void src_hi_address_w(uint8_t data); }; diff --git a/src/devices/video/mb88303.cpp b/src/devices/video/mb88303.cpp index 5b291553ddd..1112012db1d 100644 --- a/src/devices/video/mb88303.cpp +++ b/src/devices/video/mb88303.cpp @@ -166,19 +166,19 @@ void mb88303_device::device_reset() } -WRITE8_MEMBER( mb88303_device::da_w ) +void mb88303_device::da_w(uint8_t data) { //logerror("%s: mb88303_device::da_w: %02x\n", machine().describe_context(), data); m_da = data; } -WRITE_LINE_MEMBER( mb88303_device::adm_w ) +void mb88303_device::adm_w(int state) { //logerror("%s: mb88303_device::adm_w: %02x\n", machine().describe_context(), state); m_adm = state; } -WRITE_LINE_MEMBER( mb88303_device::reset_n_w ) +void mb88303_device::reset_n_w(int state) { logerror("%s: mb88303_device::reset_n_w: %02x\n", machine().describe_context(), state); uint8_t old = m_reset_n; @@ -198,7 +198,7 @@ WRITE_LINE_MEMBER( mb88303_device::reset_n_w ) } } -WRITE_LINE_MEMBER( mb88303_device::ldi_w ) +void mb88303_device::ldi_w(int state) { //logerror("%s: mb88303_device::ldi_w: %02x\n", machine().describe_context(), state); uint8_t old = m_ldi; @@ -260,12 +260,12 @@ void mb88303_device::process_data() } } -WRITE_LINE_MEMBER( mb88303_device::hsync_n_w ) +void mb88303_device::hsync_n_w(int state) { m_hsync_n = state; } -WRITE_LINE_MEMBER( mb88303_device::vsync_n_w ) +void mb88303_device::vsync_n_w(int state) { m_vsync_n = state; } diff --git a/src/devices/video/mb88303.h b/src/devices/video/mb88303.h index f8804adff61..742c6b62beb 100644 --- a/src/devices/video/mb88303.h +++ b/src/devices/video/mb88303.h @@ -45,12 +45,12 @@ public: auto vobn_callback() { return m_write_vobn.bind(); } auto do_callback() { return m_write_do.bind(); } - DECLARE_WRITE8_MEMBER(da_w); - DECLARE_WRITE_LINE_MEMBER(adm_w); - DECLARE_WRITE_LINE_MEMBER(reset_n_w); - DECLARE_WRITE_LINE_MEMBER(ldi_w); - DECLARE_WRITE_LINE_MEMBER(hsync_n_w); - DECLARE_WRITE_LINE_MEMBER(vsync_n_w); + void da_w(uint8_t data); + void adm_w(int state); + void reset_n_w(int state); + void ldi_w(int state); + void hsync_n_w(int state); + void vsync_n_w(int state); void update_bitmap(bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/mb90082.cpp b/src/devices/video/mb90082.cpp index 8744011bc31..b56e4e61409 100644 --- a/src/devices/video/mb90082.cpp +++ b/src/devices/video/mb90082.cpp @@ -132,7 +132,7 @@ void mb90082_device::device_reset() // READ/WRITE HANDLERS //************************************************************************** -WRITE_LINE_MEMBER( mb90082_device::set_cs_line ) +void mb90082_device::set_cs_line(int state) { m_reset_line = state; @@ -143,7 +143,7 @@ WRITE_LINE_MEMBER( mb90082_device::set_cs_line ) } -WRITE8_MEMBER( mb90082_device::write ) +void mb90082_device::write(uint8_t data) { uint16_t dat; diff --git a/src/devices/video/mb90082.h b/src/devices/video/mb90082.h index 5c6d2c46df3..782138ea466 100644 --- a/src/devices/video/mb90082.h +++ b/src/devices/video/mb90082.h @@ -27,8 +27,8 @@ public: mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // I/O operations - DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE_LINE_MEMBER( set_cs_line ); + void write(uint8_t data); + void set_cs_line(int state); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp index 96acc945359..745675243e6 100644 --- a/src/devices/video/mb_vcu.cpp +++ b/src/devices/video/mb_vcu.cpp @@ -54,12 +54,12 @@ void mb_vcu_device::mb_vcu_pal_ram(address_map &map) } } -READ8_MEMBER( mb_vcu_device::mb_vcu_paletteram_r ) +uint8_t mb_vcu_device::mb_vcu_paletteram_r(offs_t offset) { return m_palram[offset]; } -WRITE8_MEMBER( mb_vcu_device::mb_vcu_paletteram_w ) +void mb_vcu_device::mb_vcu_paletteram_w(offs_t offset, uint8_t data) { int r,g,b, bit0, bit1, bit2; @@ -229,23 +229,23 @@ void mb_vcu_device::device_reset() //************************************************************************** // uint8_t *pcg = memregion("sub2")->base(); -READ8_MEMBER( mb_vcu_device::read_ram ) +uint8_t mb_vcu_device::read_ram(offs_t offset) { return m_ram[offset]; } -WRITE8_MEMBER( mb_vcu_device::write_ram ) +void mb_vcu_device::write_ram(offs_t offset, uint8_t data) { m_ram[offset] = data; } -WRITE8_MEMBER( mb_vcu_device::write_vregs ) +void mb_vcu_device::write_vregs(offs_t offset, uint8_t data) { m_vregs[offset] = data; } /* latches RAM offset to send to params */ -READ8_MEMBER( mb_vcu_device::load_params ) +uint8_t mb_vcu_device::load_params(offs_t offset) { m_param_offset_latch = offset; @@ -273,7 +273,7 @@ READ8_MEMBER( mb_vcu_device::load_params ) return 0; // open bus? } -READ8_MEMBER( mb_vcu_device::load_gfx ) +uint8_t mb_vcu_device::load_gfx(offs_t offset) { int xi,yi; int dstx,dsty; @@ -388,7 +388,7 @@ Read-Modify-Write operations ---0 -011 (0x03) clear VRAM ---1 -011 (0x13) collision detection */ -READ8_MEMBER( mb_vcu_device::load_set_clr ) +uint8_t mb_vcu_device::load_set_clr(offs_t offset) { int xi,yi; int dstx,dsty; @@ -469,7 +469,7 @@ READ8_MEMBER( mb_vcu_device::load_set_clr ) return 0; // open bus? } -WRITE8_MEMBER( mb_vcu_device::background_color_w ) +void mb_vcu_device::background_color_w(uint8_t data) { int bit0,bit1,bit2; int r,g,b; @@ -495,7 +495,7 @@ WRITE8_MEMBER( mb_vcu_device::background_color_w ) m_palette->set_pen_color(0x100, rgb_t(r, g, b)); } -READ8_MEMBER( mb_vcu_device::status_r ) +uint8_t mb_vcu_device::status_r() { /* ---- ---x busy or vblank flag @@ -503,12 +503,12 @@ READ8_MEMBER( mb_vcu_device::status_r ) return m_status; } -WRITE8_MEMBER( mb_vcu_device::vbank_w ) +void mb_vcu_device::vbank_w(uint8_t data) { m_vbank = (data & 0x40) >> 6; } -WRITE8_MEMBER( mb_vcu_device::vbank_clear_w ) +void mb_vcu_device::vbank_clear_w(uint8_t data) { m_vbank = (data & 0x40) >> 6; diff --git a/src/devices/video/mb_vcu.h b/src/devices/video/mb_vcu.h index 90f0eea422a..8e9973f7433 100644 --- a/src/devices/video/mb_vcu.h +++ b/src/devices/video/mb_vcu.h @@ -27,16 +27,16 @@ public: template void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward(tag)); } // I/O operations - DECLARE_WRITE8_MEMBER( write_vregs ); - DECLARE_READ8_MEMBER( read_ram ); - DECLARE_WRITE8_MEMBER( write_ram ); - DECLARE_READ8_MEMBER( load_params ); - DECLARE_READ8_MEMBER( load_gfx ); - DECLARE_READ8_MEMBER( load_set_clr ); - DECLARE_WRITE8_MEMBER( background_color_w ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( vbank_w ); - DECLARE_WRITE8_MEMBER( vbank_clear_w ); + void write_vregs(offs_t offset, uint8_t data); + uint8_t read_ram(offs_t offset); + void write_ram(offs_t offset, uint8_t data); + uint8_t load_params(offs_t offset); + uint8_t load_gfx(offs_t offset); + uint8_t load_set_clr(offs_t offset); + void background_color_w(uint8_t data); + uint8_t status_r(); + void vbank_w(uint8_t data); + void vbank_clear_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); void screen_eof(void); @@ -54,8 +54,8 @@ private: inline uint8_t read_io(offs_t address); inline void write_io(offs_t address, uint8_t data); - DECLARE_READ8_MEMBER( mb_vcu_paletteram_r ); - DECLARE_WRITE8_MEMBER( mb_vcu_paletteram_w ); + uint8_t mb_vcu_paletteram_r(offs_t offset); + void mb_vcu_paletteram_w(offs_t offset, uint8_t data); void mb_vcu_pal_ram(address_map &map); void mb_vcu_vram(address_map &map); diff --git a/src/devices/video/msm6255.cpp b/src/devices/video/msm6255.cpp index b1c83556103..f7f0ee2928a 100644 --- a/src/devices/video/msm6255.cpp +++ b/src/devices/video/msm6255.cpp @@ -136,7 +136,7 @@ device_memory_interface::space_config_vector msm6255_device::memory_space_config // ir_r - //------------------------------------------------- -READ8_MEMBER( msm6255_device::ir_r ) +uint8_t msm6255_device::ir_r() { return m_ir; } @@ -146,7 +146,7 @@ READ8_MEMBER( msm6255_device::ir_r ) // ir_w - //------------------------------------------------- -WRITE8_MEMBER( msm6255_device::ir_w ) +void msm6255_device::ir_w(uint8_t data) { m_ir = data & 0x0f; } @@ -156,7 +156,7 @@ WRITE8_MEMBER( msm6255_device::ir_w ) // dr_r - //------------------------------------------------- -READ8_MEMBER( msm6255_device::dr_r ) +uint8_t msm6255_device::dr_r() { uint8_t data = 0; @@ -205,7 +205,7 @@ READ8_MEMBER( msm6255_device::dr_r ) // dr_w - //------------------------------------------------- -WRITE8_MEMBER( msm6255_device::dr_w ) +void msm6255_device::dr_w(uint8_t data) { switch (m_ir) { diff --git a/src/devices/video/msm6255.h b/src/devices/video/msm6255.h index 20b6db6688e..8e821c7668e 100644 --- a/src/devices/video/msm6255.h +++ b/src/devices/video/msm6255.h @@ -61,11 +61,11 @@ private: void update_graphics(bitmap_ind16 &bitmap, const rectangle &cliprect); void update_text(bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( ir_r ); - DECLARE_WRITE8_MEMBER( ir_w ); + uint8_t ir_r(); + void ir_w(uint8_t data); - DECLARE_READ8_MEMBER( dr_r ); - DECLARE_WRITE8_MEMBER( dr_w ); + uint8_t dr_r(); + void dr_w(uint8_t data); void msm6255(address_map &map); diff --git a/src/devices/video/nt7534.cpp b/src/devices/video/nt7534.cpp index a4cb9fb33f7..e777aac55dc 100644 --- a/src/devices/video/nt7534.cpp +++ b/src/devices/video/nt7534.cpp @@ -155,27 +155,27 @@ uint32_t nt7534_device::screen_update(screen_device &screen, bitmap_ind16 &bitma return 0; } -READ8_MEMBER(nt7534_device::read) +uint8_t nt7534_device::read(offs_t offset) { switch (offset & 0x01) { - case 0: return control_read(space, 0); - case 1: return data_read(space, 0); + case 0: return control_read(); + case 1: return data_read(); } return 0; } -WRITE8_MEMBER(nt7534_device::write) +void nt7534_device::write(offs_t offset, uint8_t data) { switch (offset & 0x01) { - case 0: control_write(space, 0, data); break; - case 1: data_write(space, 0, data); break; + case 0: control_write(data); break; + case 1: data_write(data); break; } } -WRITE8_MEMBER(nt7534_device::control_write) +void nt7534_device::control_write(uint8_t data) { if (m_data_len == 4) { @@ -284,7 +284,7 @@ WRITE8_MEMBER(nt7534_device::control_write) } } -READ8_MEMBER(nt7534_device::control_read) +uint8_t nt7534_device::control_read() { if (m_data_len == 4) { @@ -302,7 +302,7 @@ READ8_MEMBER(nt7534_device::control_read) } } -WRITE8_MEMBER(nt7534_device::data_write) +void nt7534_device::data_write(uint8_t data) { // if (m_busy_flag) // { @@ -340,7 +340,7 @@ WRITE8_MEMBER(nt7534_device::data_write) set_busy_flag(41); } -READ8_MEMBER(nt7534_device::data_read) +uint8_t nt7534_device::data_read() { if (m_page*132 + m_column >= ARRAY_LENGTH(m_ddram)) return 0; diff --git a/src/devices/video/nt7534.h b/src/devices/video/nt7534.h index caece0de4d1..ef36ba36884 100644 --- a/src/devices/video/nt7534.h +++ b/src/devices/video/nt7534.h @@ -32,12 +32,12 @@ public: template void set_pixel_update_cb(T &&... args) { m_pixel_update_cb.set(std::forward(args)...); } // device interface - virtual DECLARE_WRITE8_MEMBER(write); - virtual DECLARE_READ8_MEMBER(read); - virtual DECLARE_WRITE8_MEMBER(control_write); - virtual DECLARE_READ8_MEMBER(control_read); - virtual DECLARE_WRITE8_MEMBER(data_write); - virtual DECLARE_READ8_MEMBER(data_read); + virtual void write(offs_t offset, uint8_t data); + virtual uint8_t read(offs_t offset); + virtual void control_write(uint8_t data); + virtual uint8_t control_read(); + virtual void data_write(uint8_t data); + virtual uint8_t data_read(); const uint8_t *render(); virtual uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/ppu2c0x.cpp b/src/devices/video/ppu2c0x.cpp index 664f9cfc7e5..fe220ed1e6e 100644 --- a/src/devices/video/ppu2c0x.cpp +++ b/src/devices/video/ppu2c0x.cpp @@ -1059,7 +1059,7 @@ void ppu2c0x_device::update_scanline() * *************************************/ -WRITE8_MEMBER( ppu2c0x_device::palette_write ) +void ppu2c0x_device::palette_write(offs_t offset, uint8_t data) { int color_emphasis = (m_regs[PPU_CONTROL1] & PPU_CONTROL1_COLOR_EMPHASIS) * 2; @@ -1089,7 +1089,7 @@ WRITE8_MEMBER( ppu2c0x_device::palette_write ) } } -READ8_MEMBER( ppu2c0x_device::palette_read ) +uint8_t ppu2c0x_device::palette_read(offs_t offset) { if (m_regs[PPU_CONTROL1] & PPU_CONTROL1_DISPLAY_MONO) return (m_palette_ram[offset & 0x1f] & 0x30); @@ -1104,7 +1104,7 @@ READ8_MEMBER( ppu2c0x_device::palette_read ) * *************************************/ -READ8_MEMBER( ppu2c0x_device::read ) +uint8_t ppu2c0x_device::read(offs_t offset) { if (offset >= PPU_MAX_REG) { @@ -1168,7 +1168,7 @@ READ8_MEMBER( ppu2c0x_device::read ) * *************************************/ -WRITE8_MEMBER( ppu2c0x_device::write ) +void ppu2c0x_device::write(offs_t offset, uint8_t data) { if (offset >= PPU_MAX_REG) { diff --git a/src/devices/video/ppu2c0x.h b/src/devices/video/ppu2c0x.h index 1a9900393e2..66857549c63 100644 --- a/src/devices/video/ppu2c0x.h +++ b/src/devices/video/ppu2c0x.h @@ -63,10 +63,10 @@ public: // are non-rendering and non-vblank. }; - virtual DECLARE_READ8_MEMBER( read ); - virtual DECLARE_WRITE8_MEMBER( write ); - virtual DECLARE_READ8_MEMBER( palette_read ); - virtual DECLARE_WRITE8_MEMBER( palette_write ); + virtual uint8_t read(offs_t offset); + virtual void write(offs_t offset, uint8_t data); + virtual uint8_t palette_read(offs_t offset); + virtual void palette_write(offs_t offset, uint8_t data); template void set_cpu_tag(T &&tag) { m_cpu.set_tag(std::forward(tag)); } auto int_callback() { return m_int_callback.bind(); } diff --git a/src/devices/video/ppu2c0x_vt.cpp b/src/devices/video/ppu2c0x_vt.cpp index f663d77992f..2f1e3091326 100644 --- a/src/devices/video/ppu2c0x_vt.cpp +++ b/src/devices/video/ppu2c0x_vt.cpp @@ -47,7 +47,7 @@ ppu_vt03pal_device::ppu_vt03pal_device(const machine_config& mconfig, const char } -READ8_MEMBER(ppu_vt03_device::palette_read) +uint8_t ppu_vt03_device::palette_read(offs_t offset) { if (m_201x_regs[0] & 0x80) { @@ -55,7 +55,7 @@ READ8_MEMBER(ppu_vt03_device::palette_read) } else { - return ppu2c0x_device::palette_read(space, offset); + return ppu2c0x_device::palette_read(offset); } } @@ -157,7 +157,7 @@ void ppu_vt03_device::set_new_pen(int i) } -WRITE8_MEMBER(ppu_vt03_device::palette_write) +void ppu_vt03_device::palette_write(offs_t offset, uint8_t data) { //logerror("pal write %d %02x\n", offset, data); // why is the check pal_mask = (m_pal_mode == PAL_MODE_NEW_VG) ? 0x08 : 0x80 in set_2010_reg and 0x04 : 0x80 here? @@ -172,15 +172,15 @@ WRITE8_MEMBER(ppu_vt03_device::palette_write) { //if(m_pal_mode == PAL_MODE_NEW_VG) // ddrdismx writes the palette before setting the register but doesn't use 'PAL_MODE_NEW_VG', Konami logo is missing if you don't allow writes to be stored for when we switch m_newpal[offset & 0xff] = data; - ppu2c0x_device::palette_write(space, offset, data); + ppu2c0x_device::palette_write(offset, data); } } -READ8_MEMBER(ppu_vt03_device::read) +uint8_t ppu_vt03_device::read(offs_t offset) { if (offset <= 0xf) { - return ppu2c0x_device::read(space, offset); + return ppu2c0x_device::read(offset); } else if (offset <= 0x1f) { @@ -500,11 +500,11 @@ void ppu_vt03_device::set_2010_reg(uint8_t data) m_201x_regs[0x0] = data; } -WRITE8_MEMBER(ppu_vt03_device::write) +void ppu_vt03_device::write(offs_t offset, uint8_t data) { if (offset < 0x10) { - ppu2c0x_device::write(space, offset, data); + ppu2c0x_device::write(offset, data); } else { diff --git a/src/devices/video/ppu2c0x_vt.h b/src/devices/video/ppu2c0x_vt.h index 9514da73136..410a48e8839 100644 --- a/src/devices/video/ppu2c0x_vt.h +++ b/src/devices/video/ppu2c0x_vt.h @@ -34,10 +34,10 @@ public: void set_palette_mode(vtxx_pal_mode pmode) { m_pal_mode = pmode; } void set_201x_descramble(uint8_t reg0, uint8_t reg1, uint8_t reg2, uint8_t reg3, uint8_t reg4, uint8_t reg5); - virtual DECLARE_READ8_MEMBER(read) override; - virtual DECLARE_WRITE8_MEMBER(write) override; - virtual DECLARE_READ8_MEMBER(palette_read) override; - virtual DECLARE_WRITE8_MEMBER(palette_write) override; + virtual uint8_t read(offs_t offset) override; + virtual void write(offs_t offset, uint8_t data) override; + virtual uint8_t palette_read(offs_t offset) override; + virtual void palette_write(offs_t offset, uint8_t data) override; virtual uint32_t palette_entries() const override { return 256; } virtual uint32_t palette_indirect_entries() const override { return 4*16*8; } diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp index 40027444684..4b52400142d 100644 --- a/src/devices/video/sed1330.cpp +++ b/src/devices/video/sed1330.cpp @@ -242,7 +242,7 @@ device_memory_interface::space_config_vector sed1330_device::memory_space_config // status_r - //------------------------------------------------- -READ8_MEMBER( sed1330_device::status_r ) +uint8_t sed1330_device::status_r() { if (!machine().side_effects_disabled()) LOG("SED1330 Status Read: %s\n", m_bf ? "busy" : "ready"); @@ -255,7 +255,7 @@ READ8_MEMBER( sed1330_device::status_r ) // command_w - //------------------------------------------------- -WRITE8_MEMBER( sed1330_device::command_w ) +void sed1330_device::command_w(uint8_t data) { m_ir = data; m_pbc = 0; @@ -288,7 +288,7 @@ WRITE8_MEMBER( sed1330_device::command_w ) // data_r - //------------------------------------------------- -READ8_MEMBER( sed1330_device::data_r ) +uint8_t sed1330_device::data_r() { uint8_t data = 0; @@ -337,7 +337,7 @@ READ8_MEMBER( sed1330_device::data_r ) // data_w - //------------------------------------------------- -WRITE8_MEMBER( sed1330_device::data_w ) +void sed1330_device::data_w(uint8_t data) { switch (m_ir) { diff --git a/src/devices/video/sed1330.h b/src/devices/video/sed1330.h index aa1b7f38194..2baf3b011cd 100644 --- a/src/devices/video/sed1330.h +++ b/src/devices/video/sed1330.h @@ -28,11 +28,11 @@ public: // construction/destruction sed1330_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( command_w ); + uint8_t status_r(); + void command_w(uint8_t data); - DECLARE_READ8_MEMBER( data_r ); - DECLARE_WRITE8_MEMBER( data_w ); + uint8_t data_r(); + void data_w(uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/sed1520.cpp b/src/devices/video/sed1520.cpp index 8573725835f..a118faf6581 100644 --- a/src/devices/video/sed1520.cpp +++ b/src/devices/video/sed1520.cpp @@ -97,23 +97,23 @@ uint32_t sed1520_device::screen_update(screen_device &screen, bitmap_ind16 &bitm return 0; } -READ8_MEMBER(sed1520_device::read) +uint8_t sed1520_device::read(offs_t offset) { if (offset & 0x01) - return data_read(space, 0); + return data_read(); else - return status_read(space, 0); + return status_read(); } -WRITE8_MEMBER(sed1520_device::write) +void sed1520_device::write(offs_t offset, uint8_t data) { if (offset & 0x01) - data_write(space, 0, data); + data_write(data); else - control_write(space, 0, data); + control_write(data); } -WRITE8_MEMBER(sed1520_device::control_write) +void sed1520_device::control_write(uint8_t data) { if((data & 0xfe) == 0xae) // display on/off m_lcd_on = data & 0x01; @@ -148,19 +148,19 @@ WRITE8_MEMBER(sed1520_device::control_write) logerror("%s: invalid SED1520 command: %x\n", tag(), data); } -READ8_MEMBER(sed1520_device::status_read) +uint8_t sed1520_device::status_read() { uint8_t data = (m_busy << 7) | (m_adc << 6) | (m_lcd_on << 5); return data; } -WRITE8_MEMBER(sed1520_device::data_write) +void sed1520_device::data_write(uint8_t data) { m_vram[(m_page * 80 + m_column) % sizeof(m_vram)] = data; m_column = (m_column + 1) % 80; } -READ8_MEMBER(sed1520_device::data_read) +uint8_t sed1520_device::data_read() { uint8_t data = m_vram[(m_page * 80 + m_column) % sizeof(m_vram)]; if (!m_modify_write) diff --git a/src/devices/video/sed1520.h b/src/devices/video/sed1520.h index 2857b978d10..4ff215774ea 100644 --- a/src/devices/video/sed1520.h +++ b/src/devices/video/sed1520.h @@ -36,12 +36,12 @@ public: template void set_screen_update_cb(T &&... args) { m_screen_update_cb.set(std::forward(args)...); } // device interface - virtual DECLARE_WRITE8_MEMBER(write); - virtual DECLARE_READ8_MEMBER(read); - virtual DECLARE_WRITE8_MEMBER(control_write); - virtual DECLARE_READ8_MEMBER(status_read); - virtual DECLARE_WRITE8_MEMBER(data_write); - virtual DECLARE_READ8_MEMBER(data_read); + virtual void write(offs_t offset, uint8_t data); + virtual uint8_t read(offs_t offset); + virtual void control_write(uint8_t data); + virtual uint8_t status_read(); + virtual void data_write(uint8_t data); + virtual uint8_t data_read(); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); protected: diff --git a/src/devices/video/snes_ppu.cpp b/src/devices/video/snes_ppu.cpp index 9f8d06f8e6b..b61cce148e0 100644 --- a/src/devices/video/snes_ppu.cpp +++ b/src/devices/video/snes_ppu.cpp @@ -2,7 +2,7 @@ // copyright-holders:byuu, Anthony Kruize, Fabio Priuli /*************************************************************************** - snes.c + snes.cpp Video file to handle emulation of the Nintendo Super NES. @@ -1481,7 +1481,7 @@ inline uint32_t snes_ppu_device::get_vram_address() return addr << 1; } -READ8_MEMBER( snes_ppu_device::vram_read ) +uint8_t snes_ppu_device::vram_read(offs_t offset) { uint8_t res; offset &= 0xffff; // only 64KB are present on SNES @@ -1517,7 +1517,7 @@ READ8_MEMBER( snes_ppu_device::vram_read ) return res; } -WRITE8_MEMBER( snes_ppu_device::vram_write ) +void snes_ppu_device::vram_write(offs_t offset, uint8_t data) { offset &= 0xffff; // only 64KB are present on SNES, Robocop 3 relies on this @@ -1532,7 +1532,7 @@ WRITE8_MEMBER( snes_ppu_device::vram_write ) if (h <= 4) m_vram[offset] = data; else if (h == 6) - m_vram[offset] = m_openbus_cb(space, 0); + m_vram[offset] = m_openbus_cb(0); else { //printf("%d %d VRAM write, CHECK!\n",h,v); @@ -1673,7 +1673,7 @@ void snes_ppu_device::write_object( uint16_t address, uint8_t data ) solution adopted by BSNES without enabling it. *************************************************/ -READ8_MEMBER( snes_ppu_device::cgram_read ) +uint8_t snes_ppu_device::cgram_read(offs_t offset) { uint8_t res; offset &= 0x1ff; @@ -1699,7 +1699,7 @@ READ8_MEMBER( snes_ppu_device::cgram_read ) return res; } -WRITE8_MEMBER( snes_ppu_device::cgram_write ) +void snes_ppu_device::cgram_write(offs_t offset, uint8_t data) { offset &= 0x1ff; @@ -1952,8 +1952,8 @@ uint8_t snes_ppu_device::read(address_space &space, uint32_t offset, uint8_t wri if (!m_vram_fgr_high) { - m_vram_read_buffer = vram_read(space, addr); - m_vram_read_buffer |= (vram_read(space, addr + 1) << 8); + m_vram_read_buffer = vram_read(addr); + m_vram_read_buffer |= (vram_read(addr + 1) << 8); m_vmadd = (m_vmadd + m_vram_fgr_increment) & 0xffff; } @@ -1967,8 +1967,8 @@ uint8_t snes_ppu_device::read(address_space &space, uint32_t offset, uint8_t wri if (m_vram_fgr_high) { - m_vram_read_buffer = vram_read(space, addr); - m_vram_read_buffer |= (vram_read(space, addr + 1) << 8); + m_vram_read_buffer = vram_read(addr); + m_vram_read_buffer |= (vram_read(addr + 1) << 8); m_vmadd = (m_vmadd + m_vram_fgr_increment) & 0xffff; } @@ -1977,11 +1977,11 @@ uint8_t snes_ppu_device::read(address_space &space, uint32_t offset, uint8_t wri } case RCGDATA: /* Read data from CGRAM */ if (!(m_cgram_address & 0x01)) - m_ppu2_open_bus = cgram_read(space, m_cgram_address); + m_ppu2_open_bus = cgram_read(m_cgram_address); else { m_ppu2_open_bus &= 0x80; - m_ppu2_open_bus |= cgram_read(space, m_cgram_address) & 0x7f; + m_ppu2_open_bus |= cgram_read(m_cgram_address) & 0x7f; } m_cgram_address = (m_cgram_address + 1) % (SNES_CGRAM_SIZE - 2); @@ -2177,8 +2177,8 @@ void snes_ppu_device::write(address_space &space, uint32_t offset, uint8_t data) uint32_t addr; m_vmadd = (m_vmadd & 0xff00) | (data << 0); addr = get_vram_address(); - m_vram_read_buffer = vram_read(space, addr); - m_vram_read_buffer |= (vram_read(space, addr + 1) << 8); + m_vram_read_buffer = vram_read(addr); + m_vram_read_buffer |= (vram_read(addr + 1) << 8); } break; case VMADDH: /* Address for VRAM read/write (high) */ @@ -2186,14 +2186,14 @@ void snes_ppu_device::write(address_space &space, uint32_t offset, uint8_t data) uint32_t addr; m_vmadd = (m_vmadd & 0x00ff) | (data << 8); addr = get_vram_address(); - m_vram_read_buffer = vram_read(space, addr); - m_vram_read_buffer |= (vram_read(space, addr + 1) << 8); + m_vram_read_buffer = vram_read(addr); + m_vram_read_buffer |= (vram_read(addr + 1) << 8); } break; case VMDATAL: /* 2118: Data for VRAM write (low) */ { uint32_t addr = get_vram_address(); - vram_write(space, addr, data); + vram_write(addr, data); if (!m_vram_fgr_high) m_vmadd = (m_vmadd + m_vram_fgr_increment) & 0xffff; @@ -2202,7 +2202,7 @@ void snes_ppu_device::write(address_space &space, uint32_t offset, uint8_t data) case VMDATAH: /* 2119: Data for VRAM write (high) */ { uint32_t addr = get_vram_address(); - vram_write(space, addr + 1, data); + vram_write(addr + 1, data); if (m_vram_fgr_high) m_vmadd = (m_vmadd + m_vram_fgr_increment) & 0xffff; @@ -2243,7 +2243,7 @@ void snes_ppu_device::write(address_space &space, uint32_t offset, uint8_t data) m_cgram_address = data << 1; break; case CGDATA: /* Data for colour RAM */ - cgram_write(space, m_cgram_address, data); + cgram_write(m_cgram_address, data); m_cgram_address = (m_cgram_address + 1) % (SNES_CGRAM_SIZE - 2); break; case W12SEL: /* Window mask settings for BG1-2 */ diff --git a/src/devices/video/snes_ppu.h b/src/devices/video/snes_ppu.h index 0906526d6db..7f1bb18a49c 100644 --- a/src/devices/video/snes_ppu.h +++ b/src/devices/video/snes_ppu.h @@ -299,10 +299,10 @@ protected: uint8_t read_object(uint16_t address); void write_object(uint16_t address, uint8_t data); - DECLARE_READ8_MEMBER( cgram_read ); - DECLARE_WRITE8_MEMBER( cgram_write ); - DECLARE_READ8_MEMBER( vram_read ); - DECLARE_WRITE8_MEMBER( vram_write ); + uint8_t cgram_read(offs_t offset); + void cgram_write(offs_t offset, uint8_t data); + uint8_t vram_read(offs_t offset); + void vram_write(offs_t offset, uint8_t data); object m_objects[128]; /* Object Attribute Memory (OAM) */ std::unique_ptr m_cgram; /* Palette RAM */ std::unique_ptr m_vram; /* Video RAM (TODO: Should be 16-bit, but it's easier this way) */ diff --git a/src/devices/video/upd3301.cpp b/src/devices/video/upd3301.cpp index 166f623dc30..9da9f70af7c 100644 --- a/src/devices/video/upd3301.cpp +++ b/src/devices/video/upd3301.cpp @@ -233,7 +233,7 @@ void upd3301_device::device_timer(emu_timer &timer, device_timer_id id, int para // read - //------------------------------------------------- -READ8_MEMBER( upd3301_device::read ) +uint8_t upd3301_device::read(offs_t offset) { uint8_t data = 0; @@ -256,7 +256,7 @@ READ8_MEMBER( upd3301_device::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( upd3301_device::write ) +void upd3301_device::write(offs_t offset, uint8_t data) { switch (offset & 0x01) { @@ -397,7 +397,7 @@ WRITE8_MEMBER( upd3301_device::write ) // dack_w - //------------------------------------------------- -WRITE8_MEMBER( upd3301_device::dack_w ) +void upd3301_device::dack_w(uint8_t data) { if (m_y >= (m_l * m_r)) { @@ -437,7 +437,7 @@ WRITE8_MEMBER( upd3301_device::dack_w ) // lpen_w - //------------------------------------------------- -WRITE_LINE_MEMBER( upd3301_device::lpen_w ) +void upd3301_device::lpen_w(int state) { } @@ -446,7 +446,7 @@ WRITE_LINE_MEMBER( upd3301_device::lpen_w ) // hrtc_r - //------------------------------------------------- -READ_LINE_MEMBER( upd3301_device::hrtc_r ) +int upd3301_device::hrtc_r() { return m_hrtc; } @@ -456,7 +456,7 @@ READ_LINE_MEMBER( upd3301_device::hrtc_r ) // vrtc_r - //------------------------------------------------- -READ_LINE_MEMBER( upd3301_device::vrtc_r ) +int upd3301_device::vrtc_r() { return m_vrtc; } diff --git a/src/devices/video/upd3301.h b/src/devices/video/upd3301.h index 293aaa91613..281c17a9980 100644 --- a/src/devices/video/upd3301.h +++ b/src/devices/video/upd3301.h @@ -67,12 +67,12 @@ public: auto hrtc_wr_callback() { return m_write_hrtc.bind(); } auto vrtc_wr_callback() { return m_write_vrtc.bind(); } - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); - DECLARE_WRITE8_MEMBER( dack_w ); - DECLARE_WRITE_LINE_MEMBER( lpen_w ); - DECLARE_READ_LINE_MEMBER( hrtc_r ); - DECLARE_READ_LINE_MEMBER( vrtc_r ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); + void dack_w(uint8_t data); + void lpen_w(int state); + int hrtc_r(); + int vrtc_r(); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/video/vic4567.cpp b/src/devices/video/vic4567.cpp index 14e22461c23..c493e3d3a05 100644 --- a/src/devices/video/vic4567.cpp +++ b/src/devices/video/vic4567.cpp @@ -1261,7 +1261,7 @@ void vic3_device::vic2_drawlines( int first, int last, int start_x, int end_x ) I/O HANDLERS *****************************************************************************/ -WRITE8_MEMBER( vic3_device::palette_w ) +void vic3_device::palette_w(offs_t offset, uint8_t data) { if (offset < 0x100) m_palette_red[offset] = data; @@ -1274,7 +1274,7 @@ WRITE8_MEMBER( vic3_device::palette_w ) } -WRITE8_MEMBER( vic3_device::port_w ) +void vic3_device::port_w(offs_t offset, uint8_t data) { DBG_LOG(2, "vic write", ("%.2x:%.2x\n", offset, data)); offset &= 0x7f; @@ -1532,7 +1532,7 @@ WRITE8_MEMBER( vic3_device::port_w ) } } -READ8_MEMBER( vic3_device::port_r ) +uint8_t vic3_device::port_r(offs_t offset) { int val = 0; offset &= 0x7f; diff --git a/src/devices/video/vic4567.h b/src/devices/video/vic4567.h index ecadbfe19d9..c6a718a8f5a 100644 --- a/src/devices/video/vic4567.h +++ b/src/devices/video/vic4567.h @@ -121,9 +121,9 @@ public: auto lightpen_y_callback() { return m_lightpen_y_cb.bind(); } auto c64_mem_r_callback() { return m_c64_mem_r_cb.bind(); } - DECLARE_WRITE8_MEMBER(port_w); - DECLARE_WRITE8_MEMBER(palette_w); - DECLARE_READ8_MEMBER(port_r); + void port_w(offs_t offset, uint8_t data); + void palette_w(offs_t offset, uint8_t data); + uint8_t port_r(offs_t offset); void raster_interrupt_gen(); uint32_t video_update(bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/drivers/controlid.cpp b/src/mame/drivers/controlid.cpp index f026d795baa..ee09bd2f956 100644 --- a/src/mame/drivers/controlid.cpp +++ b/src/mame/drivers/controlid.cpp @@ -102,7 +102,7 @@ WRITE8_MEMBER(controlidx628_state::p1_w) { if ((BIT(m_p1_data, 6) == 0) && (BIT(data, 6) == 1)) // on raising-edge of bit 6 { - m_lcdc->write(space, BIT(data, 7), m_p0_data); + m_lcdc->write(BIT(data, 7), m_p0_data); } // P1.0 is also used as a serial I/O clock m_p1_data = data; diff --git a/src/mame/drivers/cosmicos.cpp b/src/mame/drivers/cosmicos.cpp index a997accc93e..d3b23c7a785 100644 --- a/src/mame/drivers/cosmicos.cpp +++ b/src/mame/drivers/cosmicos.cpp @@ -98,7 +98,7 @@ READ8_MEMBER( cosmicos_state::video_off_r ) if (!m_q) { - data = m_cti->dispoff_r(space, 0); + data = m_cti->dispoff_r(); } return data; @@ -110,7 +110,7 @@ READ8_MEMBER( cosmicos_state::video_on_r ) if (!m_q) { - data = m_cti->dispon_r(space, 0); + data = m_cti->dispon_r(); } return data; @@ -120,7 +120,7 @@ WRITE8_MEMBER( cosmicos_state::audio_latch_w ) { if (m_q) { - m_cti->tone_latch_w(space, 0, data); + m_cti->tone_latch_w(data); } } diff --git a/src/mame/drivers/eti660.cpp b/src/mame/drivers/eti660.cpp index 6eb66b34ca1..f4cc7d2339a 100644 --- a/src/mame/drivers/eti660.cpp +++ b/src/mame/drivers/eti660.cpp @@ -183,7 +183,7 @@ WRITE8_MEMBER( eti660_state::dma_w ) else m_color = m_p_videoram[offset] ? 7 : 0; - m_cti->dma_w(space, offset, data); + m_cti->dma_w(data); } /* PIA6821 Interface */ diff --git a/src/mame/drivers/kyocera.cpp b/src/mame/drivers/kyocera.cpp index 725f75b3859..a1ea225a14d 100644 --- a/src/mame/drivers/kyocera.cpp +++ b/src/mame/drivers/kyocera.cpp @@ -534,21 +534,18 @@ void tandy200_state::stbk_w(uint8_t data) uint8_t kc85_state::lcd_r(offs_t offset) { - address_space &space = machine().dummy_space(); uint8_t data = 0; for (uint8_t i = 0; i < 10; i++) - data |= m_lcdc[i]->read(space, offset); + data |= m_lcdc[i]->read(offset); return data; } void kc85_state::lcd_w(offs_t offset, uint8_t data) { - address_space &space = machine().dummy_space(); - for (uint8_t i = 0; i < 10; i++) - m_lcdc[i]->write(space, offset, data); + m_lcdc[i]->write(offset, data); } /* Memory Maps */ diff --git a/src/mame/drivers/odyssey2.cpp b/src/mame/drivers/odyssey2.cpp index 12f8bfd084a..a445ed2a42d 100644 --- a/src/mame/drivers/odyssey2.cpp +++ b/src/mame/drivers/odyssey2.cpp @@ -346,7 +346,7 @@ READ8_MEMBER(odyssey2_state::io_read) { if ((m_p1 & (P1_VDC_COPY_MODE_ENABLE | P1_VDC_ENABLE)) == 0) { - return m_i8244->read(space, offset); + return m_i8244->read(offset); } if (!(m_p1 & P1_EXT_RAM_ENABLE)) { @@ -370,7 +370,7 @@ WRITE8_MEMBER(odyssey2_state::io_write) } else if (!(m_p1 & P1_VDC_ENABLE)) { - m_i8244->write(space, offset, data); + m_i8244->write(offset, data); } } @@ -379,7 +379,7 @@ READ8_MEMBER(g7400_state::io_read) { if ((m_p1 & (P1_VDC_COPY_MODE_ENABLE | P1_VDC_ENABLE)) == 0) { - return m_i8244->read(space, offset); + return m_i8244->read(offset); } else if (!(m_p1 & P1_EXT_RAM_ENABLE)) { @@ -407,7 +407,7 @@ WRITE8_MEMBER(g7400_state::io_write) } else if (!(m_p1 & P1_VDC_ENABLE)) { - m_i8244->write(space, offset, data); + m_i8244->write(offset, data); } else if (!(m_p1 & P1_VPP_ENABLE)) { diff --git a/src/mame/drivers/olyboss.cpp b/src/mame/drivers/olyboss.cpp index 0695d4b8516..f1a667f5f88 100644 --- a/src/mame/drivers/olyboss.cpp +++ b/src/mame/drivers/olyboss.cpp @@ -386,7 +386,7 @@ WRITE8_MEMBER( olyboss_state::fdcdma_w ) WRITE8_MEMBER( olyboss_state::crtcdma_w ) { m_channel = 2; - m_crtc->dack_w(space, offset, data, mem_mask); + m_crtc->dack_w(data); } READ8_MEMBER( olyboss_state::fdcctrl_r ) diff --git a/src/mame/drivers/pofo.cpp b/src/mame/drivers/pofo.cpp index 01a62f67877..fc06eb42e42 100644 --- a/src/mame/drivers/pofo.cpp +++ b/src/mame/drivers/pofo.cpp @@ -674,11 +674,11 @@ READ8_MEMBER( portfolio_state::io_r ) case 1: if (offset & 0x01) { - data = m_lcdc->status_r(space, 0); + data = m_lcdc->status_r(); } else { - data = m_lcdc->data_r(space, 0); + data = m_lcdc->data_r(); } break; @@ -726,11 +726,11 @@ WRITE8_MEMBER( portfolio_state::io_w ) case 1: if (offset & 0x01) { - m_lcdc->control_w(space, 0, data); + m_lcdc->control_w(data); } else { - m_lcdc->data_w(space, 0, data); + m_lcdc->data_w(data); } break; diff --git a/src/mame/drivers/studio2.cpp b/src/mame/drivers/studio2.cpp index 29df0acba8d..6f55b46c3eb 100644 --- a/src/mame/drivers/studio2.cpp +++ b/src/mame/drivers/studio2.cpp @@ -531,7 +531,7 @@ WRITE8_MEMBER( mpt02_state::dma_w ) m_color = m_color_ram[addr]; m_cti->con_w(0); // HACK - m_cti->dma_w(space, offset, data); + m_cti->dma_w(data); } /* Machine Initialization */ diff --git a/src/mame/drivers/tandy2k.cpp b/src/mame/drivers/tandy2k.cpp index e14a900204e..73d47d758ba 100644 --- a/src/mame/drivers/tandy2k.cpp +++ b/src/mame/drivers/tandy2k.cpp @@ -86,10 +86,10 @@ READ8_MEMBER( tandy2k_state::videoram_r ) uint16_t data = program.read_word(addr); // character - m_drb0->write(space, 0, data & 0xff); + m_drb0->write(data & 0xff); // attributes - m_drb1->write(space, 0, data >> 8); + m_drb1->write(data >> 8); return data & 0xff; } diff --git a/src/mame/drivers/tmc1800.cpp b/src/mame/drivers/tmc1800.cpp index c6a5d6421ae..563faf867fc 100644 --- a/src/mame/drivers/tmc1800.cpp +++ b/src/mame/drivers/tmc1800.cpp @@ -286,7 +286,7 @@ WRITE8_MEMBER( tmc2000_state::bankswitch_w ) m_rac = BIT(data, 0); bankswitch(); - m_cti->tone_latch_w(space, 0, data); + m_cti->tone_latch_w(data); } WRITE8_MEMBER( nano_state::bankswitch_w ) @@ -297,7 +297,7 @@ WRITE8_MEMBER( nano_state::bankswitch_w ) program.install_ram(0x0000, 0x0fff, 0x7000, ram); /* write to CDP1864 tone latch */ - m_cti->tone_latch_w(space, 0, data); + m_cti->tone_latch_w(data); } READ8_MEMBER( tmc1800_state::dispon_r ) @@ -629,7 +629,7 @@ WRITE8_MEMBER( tmc2000_state::dma_w ) m_color = ~(m_colorram[offset & 0x1ff]) & 0x07; m_cti->con_w(0); // HACK - m_cti->dma_w(space, offset, data); + m_cti->dma_w(data); } // OSCOM Nano diff --git a/src/mame/drivers/tmc2000e.cpp b/src/mame/drivers/tmc2000e.cpp index cb1dc369546..c7ace3a7525 100644 --- a/src/mame/drivers/tmc2000e.cpp +++ b/src/mame/drivers/tmc2000e.cpp @@ -257,7 +257,7 @@ WRITE8_MEMBER( tmc2000e_state::dma_w ) m_color = (m_colorram[offset & 0x3ff]) & 0x07; // 0x04 = R, 0x02 = B, 0x01 = G m_cti->con_w(0); // HACK - m_cti->dma_w(space, offset, data); + m_cti->dma_w(data); } diff --git a/src/mame/machine/cybiko.cpp b/src/mame/machine/cybiko.cpp index 9cba1120f76..31eef3f34ea 100644 --- a/src/mame/machine/cybiko.cpp +++ b/src/mame/machine/cybiko.cpp @@ -88,15 +88,15 @@ void cybiko_state::machine_reset() READ16_MEMBER( cybiko_state::cybiko_lcd_r ) { uint16_t data = 0; - if (ACCESSING_BITS_8_15) data |= (m_crtc->reg_idx_r(space, offset) << 8); - if (ACCESSING_BITS_0_7) data |= (m_crtc->reg_dat_r(space, offset) << 0); + if (ACCESSING_BITS_8_15) data |= (m_crtc->reg_idx_r() << 8); + if (ACCESSING_BITS_0_7) data |= (m_crtc->reg_dat_r() << 0); return data; } WRITE16_MEMBER( cybiko_state::cybiko_lcd_w ) { - if (ACCESSING_BITS_8_15) m_crtc->reg_idx_w(space, offset, (data >> 8) & 0xff); - if (ACCESSING_BITS_0_7) m_crtc->reg_dat_w(space, offset, (data >> 0) & 0xff); + if (ACCESSING_BITS_8_15) m_crtc->reg_idx_w((data >> 8) & 0xff); + if (ACCESSING_BITS_0_7) m_crtc->reg_dat_w((data >> 0) & 0xff); } int cybiko_state::cybiko_key_r( offs_t offset, int mem_mask) diff --git a/src/mame/machine/gb.cpp b/src/mame/machine/gb.cpp index b5373bb7b9f..7ff5a39667c 100644 --- a/src/mame/machine/gb.cpp +++ b/src/mame/machine/gb.cpp @@ -312,7 +312,7 @@ WRITE8_MEMBER(gb_state::gb_io2_w) m_bios_disable = true; } else - m_ppu->video_w(space, offset, data); + m_ppu->video_w(offset, data); } #ifdef MAME_DEBUG @@ -637,7 +637,7 @@ WRITE8_MEMBER(gb_state::gbc_io2_w) default: break; } - m_ppu->video_w(space, offset, data); + m_ppu->video_w(offset, data); } READ8_MEMBER(gb_state::gbc_io2_r) @@ -653,7 +653,7 @@ READ8_MEMBER(gb_state::gbc_io2_r) default: break; } - return m_ppu->video_r(space, offset); + return m_ppu->video_r(offset); } /**************************************************************************** @@ -719,7 +719,7 @@ READ8_MEMBER(megaduck_state::megaduck_video_r) { offset ^= 0x0C; } - data = m_ppu->video_r(space, offset); + data = m_ppu->video_r(offset); if (offset) return data; return bitswap<8>(data,7,0,5,4,6,3,2,1); @@ -735,7 +735,7 @@ WRITE8_MEMBER(megaduck_state::megaduck_video_w) { offset ^= 0x0C; } - m_ppu->video_w(space, offset, data); + m_ppu->video_w(offset, data); } /* Map megaduck audio offset to game boy audio offsets */ diff --git a/src/mame/video/nbmj8688.cpp b/src/mame/video/nbmj8688.cpp index 95da1eb067d..0a7520a75b1 100644 --- a/src/mame/video/nbmj8688.cpp +++ b/src/mame/video/nbmj8688.cpp @@ -613,14 +613,14 @@ VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_pure_16bit_LCD) WRITE8_MEMBER(nbmj8688_state::HD61830B_both_instr_w) { - m_lcdc0->control_w(space, offset, data); - m_lcdc1->control_w(space, offset, data); + m_lcdc0->control_w(data); + m_lcdc1->control_w(data); } WRITE8_MEMBER(nbmj8688_state::HD61830B_both_data_w) { - m_lcdc0->data_w(space, offset, data); - m_lcdc1->data_w(space, offset, data); + m_lcdc0->data_w(data); + m_lcdc1->data_w(data); } -- cgit v1.2.3