From 72397ac72513b23256cbdb876c9875541f7c9cc0 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Fri, 12 Jun 2020 18:25:17 +0200 Subject: drivers starting with m, n and o: removed read* and write* macros (nw) --- src/devices/bus/lpci/i82371sb.cpp | 4 +- src/devices/bus/neogeo/boot_kof10th.cpp | 6 +- src/devices/bus/neogeo/boot_kof10th.h | 6 +- src/devices/bus/neogeo/boot_kof2k3.h | 16 +-- src/devices/bus/neogeo/boot_misc.cpp | 2 +- src/devices/bus/neogeo/boot_misc.h | 4 +- src/devices/bus/neogeo/boot_svc.h | 8 +- src/devices/bus/neogeo/cmc.h | 4 +- src/devices/bus/neogeo/fatfury2.h | 4 +- src/devices/bus/neogeo/kof98.h | 4 +- src/devices/bus/neogeo/mslugx.h | 4 +- src/devices/bus/neogeo/prot_cthd.cpp | 2 +- src/devices/bus/neogeo/prot_cthd.h | 2 +- src/devices/bus/neogeo/prot_fatfury2.cpp | 4 +- src/devices/bus/neogeo/prot_fatfury2.h | 4 +- src/devices/bus/neogeo/prot_kof2k3bl.cpp | 8 +- src/devices/bus/neogeo/prot_kof2k3bl.h | 8 +- src/devices/bus/neogeo/prot_kof98.cpp | 4 +- src/devices/bus/neogeo/prot_kof98.h | 4 +- src/devices/bus/neogeo/prot_misc.cpp | 4 +- src/devices/bus/neogeo/prot_misc.h | 4 +- src/devices/bus/neogeo/prot_mslugx.cpp | 4 +- src/devices/bus/neogeo/prot_mslugx.h | 4 +- src/devices/bus/neogeo/prot_sma.cpp | 14 +-- src/devices/bus/neogeo/prot_sma.h | 14 +-- src/devices/bus/neogeo/pvc.h | 4 +- src/devices/bus/neogeo/rom.cpp | 4 +- src/devices/bus/neogeo/rom.h | 8 +- src/devices/bus/neogeo/sbp.cpp | 4 +- src/devices/bus/neogeo/sbp.h | 4 +- src/devices/bus/neogeo/slot.cpp | 28 ++--- src/devices/bus/neogeo/slot.h | 28 ++--- src/devices/bus/neogeo/sma.h | 4 +- src/devices/machine/i82371sb.cpp | 4 +- src/devices/machine/i82439hx.cpp | 2 +- src/devices/machine/i82439hx.h | 2 +- src/devices/machine/idectrl.cpp | 4 +- src/devices/machine/idectrl.h | 20 ++-- src/devices/machine/pci.cpp | 4 +- src/devices/machine/pci.h | 4 +- src/mame/audio/m79amb.cpp | 4 +- src/mame/audio/mario.cpp | 20 ++-- src/mame/audio/mw8080bw.cpp | 24 ++--- src/mame/audio/orbit.cpp | 10 +- src/mame/drivers/m10.cpp | 16 +-- src/mame/drivers/m107.cpp | 4 +- src/mame/drivers/m5.cpp | 40 +++---- src/mame/drivers/m62.cpp | 18 ++-- src/mame/drivers/m79amb.cpp | 8 +- src/mame/drivers/m92.cpp | 4 +- src/mame/drivers/mac.cpp | 38 +++---- src/mame/drivers/madalien.cpp | 6 +- src/mame/drivers/magmax.cpp | 2 +- src/mame/drivers/mainevt.cpp | 22 ++-- src/mame/drivers/mainsnk.cpp | 2 +- src/mame/drivers/malzak.cpp | 10 +- src/mame/drivers/markham.cpp | 18 ++-- src/mame/drivers/matmania.cpp | 6 +- src/mame/drivers/maygay1b.cpp | 34 +++--- src/mame/drivers/meadows.cpp | 12 +-- src/mame/drivers/megasys1.cpp | 2 +- src/mame/drivers/mermaid.cpp | 4 +- src/mame/drivers/metlclsh.cpp | 12 +-- src/mame/drivers/metro.cpp | 58 +++++------ src/mame/drivers/mhavoc.cpp | 8 +- src/mame/drivers/micronic.cpp | 26 ++--- src/mame/drivers/mikie.cpp | 2 +- src/mame/drivers/mitchell.cpp | 36 +++---- src/mame/drivers/mjkjidai.cpp | 2 +- src/mame/drivers/model1.cpp | 4 +- src/mame/drivers/model2.cpp | 4 +- src/mame/drivers/model3.cpp | 4 +- src/mame/drivers/moo.cpp | 2 +- src/mame/drivers/mosaic.cpp | 8 +- src/mame/drivers/mouser.cpp | 2 +- src/mame/drivers/mpz80.cpp | 40 +++---- src/mame/drivers/mrdo.cpp | 2 +- src/mame/drivers/mrjong.cpp | 2 +- src/mame/drivers/ms32.cpp | 14 +-- src/mame/drivers/msisaac.cpp | 22 ++-- src/mame/drivers/multfish.cpp | 34 +++--- src/mame/drivers/munchmo.cpp | 8 +- src/mame/drivers/mw8080bw.cpp | 20 ++-- src/mame/drivers/mystston.cpp | 4 +- src/mame/drivers/mystwarr.cpp | 2 +- src/mame/drivers/mz2500.cpp | 76 +++++++------- src/mame/drivers/namcofl.cpp | 12 +-- src/mame/drivers/namconb1.cpp | 22 ++-- src/mame/drivers/namcond1.cpp | 8 +- src/mame/drivers/namcos1.cpp | 2 +- src/mame/drivers/namcos2.cpp | 4 +- src/mame/drivers/namcos22.cpp | 75 ++++++++------ src/mame/drivers/namcos86.cpp | 22 ++-- src/mame/drivers/naomi.cpp | 20 ++-- src/mame/drivers/naughtyb.cpp | 21 ++-- src/mame/drivers/nbmj8688.cpp | 4 +- src/mame/drivers/nbmj8891.cpp | 2 +- src/mame/drivers/nbmj8991.cpp | 2 +- src/mame/drivers/nbmj9195.cpp | 2 +- src/mame/drivers/nc.cpp | 46 ++++---- src/mame/drivers/nds.cpp | 20 ++-- src/mame/drivers/nemesis.cpp | 18 ++-- src/mame/drivers/neogeo.cpp | 144 +++++++++++++------------ src/mame/drivers/nes.cpp | 4 +- src/mame/drivers/next.cpp | 48 ++++----- src/mame/drivers/nforcepc.cpp | 34 +++--- src/mame/drivers/ninjakd2.cpp | 24 ++--- src/mame/drivers/niyanpai.cpp | 6 +- src/mame/drivers/nmk16.cpp | 2 +- src/mame/drivers/norautp.cpp | 14 +-- src/mame/drivers/nova2001.cpp | 4 +- src/mame/drivers/nycaptor.cpp | 36 +++---- src/mame/drivers/ob68k1a.cpp | 4 +- src/mame/drivers/offtwall.cpp | 22 ++-- src/mame/drivers/ohmygod.cpp | 2 +- src/mame/drivers/ojankohs.cpp | 30 +++--- src/mame/drivers/olytext.cpp | 2 +- src/mame/drivers/osi.cpp | 12 +-- src/mame/drivers/overdriv.cpp | 20 ++-- src/mame/includes/m10.h | 22 ++-- src/mame/includes/m107.h | 4 +- src/mame/includes/m5.h | 42 ++++---- src/mame/includes/m52.h | 24 ++--- src/mame/includes/m57.h | 4 +- src/mame/includes/m58.h | 6 +- src/mame/includes/m62.h | 48 ++++----- src/mame/includes/m79amb.h | 12 +-- src/mame/includes/m92.h | 4 +- src/mame/includes/mac.h | 44 ++++---- src/mame/includes/macpci.h | 4 +- src/mame/includes/madalien.h | 10 +- src/mame/includes/magmax.h | 2 +- src/mame/includes/mainevt.h | 22 ++-- src/mame/includes/mainsnk.h | 8 +- src/mame/includes/malzak.h | 16 +-- src/mame/includes/mappy.h | 10 +- src/mame/includes/marineb.h | 10 +- src/mame/includes/mario.h | 18 ++-- src/mame/includes/markham.h | 18 ++-- src/mame/includes/matmania.h | 8 +- src/mame/includes/maygay1b.h | 32 +++--- src/mame/includes/meadows.h | 16 +-- src/mame/includes/megasys1.h | 2 +- src/mame/includes/mermaid.h | 16 +-- src/mame/includes/metlclsh.h | 20 ++-- src/mame/includes/metro.h | 46 ++++---- src/mame/includes/mhavoc.h | 34 +++--- src/mame/includes/micro3d.h | 10 +- src/mame/includes/micronic.h | 24 ++--- src/mame/includes/microtan.h | 12 +-- src/mame/includes/mikie.h | 10 +- src/mame/includes/mikro80.h | 10 +- src/mame/includes/mitchell.h | 58 +++++------ src/mame/includes/mjkjidai.h | 4 +- src/mame/includes/model1.h | 7 +- src/mame/includes/model2.h | 4 +- src/mame/includes/model3.h | 4 +- src/mame/includes/moo.h | 2 +- src/mame/includes/mosaic.h | 12 +-- src/mame/includes/mouser.h | 2 +- src/mame/includes/mpu4.h | 24 ++--- src/mame/includes/mpz80.h | 24 ++--- src/mame/includes/mrdo.h | 12 +-- src/mame/includes/mrflea.h | 6 +- src/mame/includes/mrjong.h | 8 +- src/mame/includes/ms32.h | 14 +-- src/mame/includes/msisaac.h | 38 +++---- src/mame/includes/msx.h | 22 ++-- src/mame/includes/mtx.h | 32 +++--- src/mame/includes/multfish.h | 32 +++--- src/mame/includes/munchmo.h | 8 +- src/mame/includes/mustache.h | 6 +- src/mame/includes/mw8080bw.h | 36 +++---- src/mame/includes/mystston.h | 6 +- src/mame/includes/mystwarr.h | 2 +- src/mame/includes/mz2500.h | 78 +++++++------- src/mame/includes/mz700.h | 44 ++++---- src/mame/includes/mz80.h | 4 +- src/mame/includes/n64.h | 44 ++++---- src/mame/includes/namcofl.h | 14 +-- src/mame/includes/namconb1.h | 24 ++--- src/mame/includes/namcond1.h | 12 +-- src/mame/includes/namcos1.h | 2 +- src/mame/includes/namcos2.h | 24 ++--- src/mame/includes/namcos22.h | 74 ++++++------- src/mame/includes/namcos86.h | 40 +++---- src/mame/includes/naomi.h | 34 +++--- src/mame/includes/naughtyb.h | 16 +-- src/mame/includes/nbmj8688.h | 28 ++--- src/mame/includes/nbmj8891.h | 36 +++---- src/mame/includes/nbmj8900.h | 18 ++-- src/mame/includes/nbmj8991.h | 14 +-- src/mame/includes/nbmj9195.h | 18 ++-- src/mame/includes/nc.h | 38 +++---- src/mame/includes/nds.h | 22 ++-- src/mame/includes/nemesis.h | 32 +++--- src/mame/includes/neogeo.h | 48 ++++----- src/mame/includes/nes.h | 14 +-- src/mame/includes/news.h | 6 +- src/mame/includes/next.h | 50 +++++---- src/mame/includes/nforcepc.h | 34 +++--- src/mame/includes/ninjakd2.h | 30 +++--- src/mame/includes/nitedrvr.h | 12 +-- src/mame/includes/niyanpai.h | 34 +++--- src/mame/includes/norautp.h | 2 +- src/mame/includes/nova2001.h | 18 ++-- src/mame/includes/nycaptor.h | 48 ++++----- src/mame/includes/ob68k1a.h | 4 +- src/mame/includes/offtwall.h | 10 +- src/mame/includes/ohmygod.h | 10 +- src/mame/includes/ojankohs.h | 46 ++++---- src/mame/includes/ondra.h | 8 +- src/mame/includes/orao.h | 4 +- src/mame/includes/orbit.h | 10 +- src/mame/includes/orion.h | 42 ++++---- src/mame/includes/osborne1.h | 26 ++--- src/mame/includes/osi.h | 12 +-- src/mame/includes/overdriv.h | 18 ++-- src/mame/machine/m24_z8000.cpp | 8 +- src/mame/machine/m24_z8000.h | 8 +- src/mame/machine/macpci.cpp | 4 +- src/mame/machine/mega32x.cpp | 155 ++++++++++++++------------- src/mame/machine/mega32x.h | 100 +++++++++--------- src/mame/machine/megacd.cpp | 173 ++++++++++++++++--------------- src/mame/machine/megacd.h | 116 ++++++++++----------- src/mame/machine/mhavoc.cpp | 35 +++---- src/mame/machine/micro3d.cpp | 10 +- src/mame/machine/microtan.cpp | 14 +-- src/mame/machine/mikro80.cpp | 10 +- src/mame/machine/mpu4.cpp | 40 +++---- src/mame/machine/msx.cpp | 22 ++-- src/mame/machine/mtx.cpp | 34 +++--- src/mame/machine/mz700.cpp | 56 +++++----- src/mame/machine/mz80.cpp | 4 +- src/mame/machine/n64.cpp | 44 ++++---- src/mame/machine/namco_c139.cpp | 6 +- src/mame/machine/namco_c139.h | 6 +- src/mame/machine/namco_c148.cpp | 56 +++++----- src/mame/machine/namco_c148.h | 70 ++++++------- src/mame/machine/namcond1.cpp | 4 +- src/mame/machine/namcos2.cpp | 16 +-- src/mame/machine/namcos21_dsp.cpp | 34 +++--- src/mame/machine/namcos21_dsp.h | 34 +++--- src/mame/machine/namcos21_dsp_c67.cpp | 68 ++++++------ src/mame/machine/namcos21_dsp_c67.h | 68 ++++++------ src/mame/machine/naomi.cpp | 44 ++++---- src/mame/machine/naomibd.cpp | 20 ++-- src/mame/machine/naomibd.h | 24 ++--- src/mame/machine/naomig1.cpp | 46 ++++---- src/mame/machine/naomig1.h | 50 ++++----- src/mame/machine/naomigd.cpp | 84 +++++++-------- src/mame/machine/naomigd.h | 80 +++++++------- src/mame/machine/naomim1.cpp | 2 +- src/mame/machine/naomim1.h | 2 +- src/mame/machine/naomim4.cpp | 2 +- src/mame/machine/naomim4.h | 2 +- src/mame/machine/nes.cpp | 18 ++-- src/mame/machine/nextkbd.cpp | 24 ++--- src/mame/machine/nextkbd.h | 26 ++--- src/mame/machine/nitedrvr.cpp | 12 +-- src/mame/machine/ns11prot.cpp | 36 +++---- src/mame/machine/ns11prot.h | 40 +++---- src/mame/machine/ondra.cpp | 10 +- src/mame/machine/orao.cpp | 4 +- src/mame/machine/orion.cpp | 158 ++++++++++++++-------------- src/mame/machine/osborne1.cpp | 60 +++++------ src/mame/video/m10.cpp | 6 +- src/mame/video/m52.cpp | 24 ++--- src/mame/video/m57.cpp | 4 +- src/mame/video/m58.cpp | 6 +- src/mame/video/m62.cpp | 34 +++--- src/mame/video/madalien.cpp | 4 +- src/mame/video/mainsnk.cpp | 6 +- src/mame/video/malzak.cpp | 6 +- src/mame/video/mappy.cpp | 10 +- src/mame/video/marineb.cpp | 10 +- src/mame/video/mario.cpp | 4 +- src/mame/video/markham.cpp | 2 +- src/mame/video/matmania.cpp | 2 +- src/mame/video/meadows.cpp | 7 +- src/mame/video/mermaid.cpp | 12 +-- src/mame/video/metlclsh.cpp | 8 +- src/mame/video/microtan.cpp | 2 +- src/mame/video/mikie.cpp | 6 +- src/mame/video/mitchell.cpp | 38 +++---- src/mame/video/mjkjidai.cpp | 2 +- src/mame/video/mosaic.cpp | 4 +- src/mame/video/mrdo.cpp | 10 +- src/mame/video/mrflea.cpp | 6 +- src/mame/video/mrjong.cpp | 6 +- src/mame/video/msisaac.cpp | 22 ++-- src/mame/video/mustache.cpp | 6 +- src/mame/video/mystston.cpp | 2 +- src/mame/video/mz700.cpp | 2 +- src/mame/video/namco_c169roz.cpp | 8 +- src/mame/video/namco_c169roz.h | 8 +- src/mame/video/namcofl.cpp | 2 +- src/mame/video/namconb1.cpp | 2 +- src/mame/video/namcos2.cpp | 6 +- src/mame/video/namcos22.cpp | 12 +-- src/mame/video/namcos2_roz.cpp | 2 +- src/mame/video/namcos2_roz.h | 2 +- src/mame/video/namcos86.cpp | 28 ++--- src/mame/video/naughtyb.cpp | 4 +- src/mame/video/nbmj8688.cpp | 28 ++--- src/mame/video/nbmj8891.cpp | 34 +++--- src/mame/video/nbmj8900.cpp | 26 ++--- src/mame/video/nbmj8991.cpp | 12 +-- src/mame/video/nbmj9195.cpp | 16 +-- src/mame/video/nemesis.cpp | 14 +-- src/mame/video/neogeo.cpp | 10 +- src/mame/video/news.cpp | 6 +- src/mame/video/ninjakd2.cpp | 8 +- src/mame/video/niyanpai.cpp | 28 ++--- src/mame/video/nova2001.cpp | 14 +-- src/mame/video/nycaptor.cpp | 12 +-- src/mame/video/ohmygod.cpp | 8 +- src/mame/video/ojankohs.cpp | 30 +++--- src/mame/video/orbit.cpp | 2 +- 319 files changed, 3111 insertions(+), 3084 deletions(-) diff --git a/src/devices/bus/lpci/i82371sb.cpp b/src/devices/bus/lpci/i82371sb.cpp index 4437aa849d6..15cb033231d 100644 --- a/src/devices/bus/lpci/i82371sb.cpp +++ b/src/devices/bus/lpci/i82371sb.cpp @@ -164,8 +164,8 @@ void i82371sb_device::map_busmaster_dma() { if (m_base != 0) { - spaceio->install_readwrite_handler(m_base, m_base + 0x7, read32_delegate(*m_ide, FUNC(bus_master_ide_controller_device::bmdma_r)), write32_delegate(*m_ide, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); - spaceio->install_readwrite_handler(m_base + 0x8, m_base + 0xf, read32_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_r)), write32_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); + spaceio->install_readwrite_handler(m_base, m_base + 0x7, read32s_delegate(*m_ide, FUNC(bus_master_ide_controller_device::bmdma_r)), write32s_delegate(*m_ide, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); + spaceio->install_readwrite_handler(m_base + 0x8, m_base + 0xf, read32s_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_r)), write32s_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); } } diff --git a/src/devices/bus/neogeo/boot_kof10th.cpp b/src/devices/bus/neogeo/boot_kof10th.cpp index d1dd9c925f5..a93b0e55af6 100644 --- a/src/devices/bus/neogeo/boot_kof10th.cpp +++ b/src/devices/bus/neogeo/boot_kof10th.cpp @@ -85,18 +85,18 @@ uint32_t neogeo_kof10th_cart_device::get_special_bank() return m_special_bank; } -READ16_MEMBER(neogeo_kof10th_cart_device::protection_r) +uint16_t neogeo_kof10th_cart_device::protection_r(address_space &space, offs_t offset) { return m_cart_ram[offset]; } -READ16_MEMBER(neogeo_kof10th_cart_device::addon_r) +uint16_t neogeo_kof10th_cart_device::addon_r(offs_t offset) { // printf("kof10th_RAM2_r\n"); return m_cart_ram2[offset]; } -WRITE16_MEMBER(neogeo_kof10th_cart_device::protection_w) +void neogeo_kof10th_cart_device::protection_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset < 0x40000/2) { diff --git a/src/devices/bus/neogeo/boot_kof10th.h b/src/devices/bus/neogeo/boot_kof10th.h index 9c5cf2a2e5d..8e422f6d6ec 100644 --- a/src/devices/bus/neogeo/boot_kof10th.h +++ b/src/devices/bus/neogeo/boot_kof10th.h @@ -21,9 +21,9 @@ public: virtual uint16_t get_helper() override; virtual uint32_t get_bank_base(uint16_t sel) override; virtual uint32_t get_special_bank() override; - virtual DECLARE_READ16_MEMBER(addon_r) override; - virtual DECLARE_READ16_MEMBER(protection_r) override; - virtual DECLARE_WRITE16_MEMBER(protection_w) override; + virtual uint16_t addon_r(offs_t offset) override; + virtual uint16_t protection_r(address_space &space, offs_t offset) override; + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/boot_kof2k3.h b/src/devices/bus/neogeo/boot_kof2k3.h index a5deb9bc378..a8e3efc5721 100644 --- a/src/devices/bus/neogeo/boot_kof2k3.h +++ b/src/devices/bus/neogeo/boot_kof2k3.h @@ -22,9 +22,9 @@ public: virtual int get_fixed_bank_type() override { return 0; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_kof2k3bl_prot->get_bank_base(); } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_kof2k3bl_prot->protection_r(space, offset, mem_mask); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_kof2k3bl_prot->kof2003_w(space, offset, data, mem_mask); } - virtual DECLARE_READ16_MEMBER(addon_r) override { return m_kof2k3bl_prot->overlay_r(space, offset, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_kof2k3bl_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_kof2k3bl_prot->kof2003_w(offset, data, mem_mask); } + virtual uint16_t addon_r(offs_t offset) override { return m_kof2k3bl_prot->overlay_r(); } protected: virtual void device_add_mconfig(machine_config &config) override; @@ -50,8 +50,8 @@ public: virtual int get_fixed_bank_type() override { return 0; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_kof2k3bl_prot->get_bank_base(); } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_kof2k3bl_prot->protection_r(space, offset, mem_mask); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_kof2k3bl_prot->kof2003p_w(space, offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_kof2k3bl_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_kof2k3bl_prot->kof2003p_w(offset, data, mem_mask); } protected: virtual void device_add_mconfig(machine_config &config) override; @@ -77,9 +77,9 @@ public: virtual int get_fixed_bank_type() override { return 0; } virtual uint32_t get_bank_base(uint16_t sel) override { return m_kof2k3bl_prot->get_bank_base(); } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_kof2k3bl_prot->protection_r(space, offset, mem_mask); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_kof2k3bl_prot->kof2003_w(space, offset, data, mem_mask); } - virtual DECLARE_READ16_MEMBER(addon_r) override { return m_kof2k3bl_prot->overlay_r(space, offset, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_kof2k3bl_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_kof2k3bl_prot->kof2003_w(offset, data, mem_mask); } + virtual uint16_t addon_r(offs_t offset) override { return m_kof2k3bl_prot->overlay_r(); } protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/neogeo/boot_misc.cpp b/src/devices/bus/neogeo/boot_misc.cpp index 7adc89519e4..8476123fbc7 100644 --- a/src/devices/bus/neogeo/boot_misc.cpp +++ b/src/devices/bus/neogeo/boot_misc.cpp @@ -292,7 +292,7 @@ ioport_constructor neogeo_kog_cart_device::device_input_ports() const } -READ16_MEMBER(neogeo_kog_cart_device::protection_r) +uint16_t neogeo_kog_cart_device::protection_r(address_space &space, offs_t offset) { return m_jumper->read(); } diff --git a/src/devices/bus/neogeo/boot_misc.h b/src/devices/bus/neogeo/boot_misc.h index d46bca46d51..cf07a67e774 100644 --- a/src/devices/bus/neogeo/boot_misc.h +++ b/src/devices/bus/neogeo/boot_misc.h @@ -173,7 +173,7 @@ public: virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_prot->mslug5p_prot_r(space, offset, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_prot->mslug5p_prot_r(); } virtual uint32_t get_bank_base(uint16_t sel) override { return m_prot->mslug5p_bank_base(sel); } protected: @@ -213,7 +213,7 @@ public: virtual ioport_constructor device_input_ports() const override; - virtual DECLARE_READ16_MEMBER(protection_r) override; + virtual uint16_t protection_r(address_space &space, offs_t offset) override; virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/boot_svc.h b/src/devices/bus/neogeo/boot_svc.h index 3204a170267..74a064500e3 100644 --- a/src/devices/bus/neogeo/boot_svc.h +++ b/src/devices/bus/neogeo/boot_svc.h @@ -20,8 +20,8 @@ public: neogeo_svcboot_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual uint32_t get_bank_base(uint16_t sel) override { return m_pvc_prot->get_bank_base(); } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_pvc_prot->protection_r(offset); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_pvc_prot->protection_w(offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_pvc_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_pvc_prot->protection_w(offset, data, mem_mask); } virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } @@ -74,8 +74,8 @@ public: neogeo_svcsplus_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual uint32_t get_bank_base(uint16_t sel) override { return m_pvc_prot->get_bank_base(); } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_pvc_prot->protection_r(offset); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_pvc_prot->protection_w(offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_pvc_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_pvc_prot->protection_w(offset, data, mem_mask); } virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/cmc.h b/src/devices/bus/neogeo/cmc.h index bba8251d2e5..0852574c9f8 100644 --- a/src/devices/bus/neogeo/cmc.h +++ b/src/devices/bus/neogeo/cmc.h @@ -214,8 +214,8 @@ public: virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 1; } - virtual DECLARE_READ16_MEMBER(ram_r) override { return m_ram[offset]; } - virtual DECLARE_WRITE16_MEMBER(ram_w) override { COMBINE_DATA(&m_ram[offset]); } + virtual uint16_t ram_r(offs_t offset) override { return m_ram[offset]; } + virtual void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { COMBINE_DATA(&m_ram[offset]); } protected: virtual void device_start() override; diff --git a/src/devices/bus/neogeo/fatfury2.h b/src/devices/bus/neogeo/fatfury2.h index 804049e4ff0..ba3e274b7ac 100644 --- a/src/devices/bus/neogeo/fatfury2.h +++ b/src/devices/bus/neogeo/fatfury2.h @@ -18,8 +18,8 @@ public: neogeo_fatfury2_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_prot->protection_r(space, offset, mem_mask); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_prot->protection_w(space, offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_prot->protection_w(offset, data); } protected: // device-level overrides diff --git a/src/devices/bus/neogeo/kof98.h b/src/devices/bus/neogeo/kof98.h index 9cb1ddbf59e..ec80a2a58f1 100644 --- a/src/devices/bus/neogeo/kof98.h +++ b/src/devices/bus/neogeo/kof98.h @@ -18,8 +18,8 @@ public: neogeo_kof98_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_prot->protection_r(space, offset, mem_mask); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_prot->protection_w(space, offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_prot->protection_w(data); } virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; diff --git a/src/devices/bus/neogeo/mslugx.h b/src/devices/bus/neogeo/mslugx.h index cb542fb7530..486eefe6ef8 100644 --- a/src/devices/bus/neogeo/mslugx.h +++ b/src/devices/bus/neogeo/mslugx.h @@ -18,8 +18,8 @@ public: neogeo_mslugx_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_prot->protection_r(space, offset, mem_mask); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_prot->protection_w(space, offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_prot->protection_r(space, offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_prot->protection_w(offset, data); } protected: // device-level overrides diff --git a/src/devices/bus/neogeo/prot_cthd.cpp b/src/devices/bus/neogeo/prot_cthd.cpp index d2c427d6ac7..d4cbc5c2a79 100644 --- a/src/devices/bus/neogeo/prot_cthd.cpp +++ b/src/devices/bus/neogeo/prot_cthd.cpp @@ -118,7 +118,7 @@ void cthd_prot_device::decrypt_cthd2003(uint8_t* sprrom, uint32_t sprrom_size, u // temporarily replaced by the get_bank_base functions below, until we clean up bankswitch implementation /* -WRITE16_MEMBER( ngbootleg_prot_device::cthd2003_bankswitch_w ) +void ngbootleg_prot_device::cthd2003_bankswitch_w(offs_t offset, uint16_t data) { int bankaddress; static const int cthd2003_banks[8] = diff --git a/src/devices/bus/neogeo/prot_cthd.h b/src/devices/bus/neogeo/prot_cthd.h index 95ae38289b3..a331742da4f 100644 --- a/src/devices/bus/neogeo/prot_cthd.h +++ b/src/devices/bus/neogeo/prot_cthd.h @@ -20,7 +20,7 @@ public: void decrypt_cthd2003(uint8_t* sprrom, uint32_t sprrom_size, uint8_t* audiorom, uint32_t audiorom_size, uint8_t* fixedrom, uint32_t fixedrom_size); void patch_cthd2003(uint8_t* cpurom, uint32_t cpurom_size); - //DECLARE_WRITE16_MEMBER(cthd2003_bankswitch_w); + //void cthd2003_bankswitch_w(offs_t offset, uint16_t data); uint32_t get_bank_base(uint16_t sel); void ct2k3sp_sx_decrypt(uint8_t* fixedrom, uint32_t fixedrom_size); diff --git a/src/devices/bus/neogeo/prot_fatfury2.cpp b/src/devices/bus/neogeo/prot_fatfury2.cpp index 418c49ff4cd..bd7af9247db 100644 --- a/src/devices/bus/neogeo/prot_fatfury2.cpp +++ b/src/devices/bus/neogeo/prot_fatfury2.cpp @@ -31,7 +31,7 @@ void fatfury2_prot_device::device_reset() /* the protection involves reading and writing addresses in the */ /* 0x2xxxxx range. There are several checks all around the code. */ -READ16_MEMBER( fatfury2_prot_device::protection_r ) +uint16_t fatfury2_prot_device::protection_r(offs_t offset) { uint16_t res = m_prot_data >> 24; @@ -56,7 +56,7 @@ READ16_MEMBER( fatfury2_prot_device::protection_r ) } -WRITE16_MEMBER( fatfury2_prot_device::protection_w ) +void fatfury2_prot_device::protection_w(offs_t offset, uint16_t data) { switch (offset) { diff --git a/src/devices/bus/neogeo/prot_fatfury2.h b/src/devices/bus/neogeo/prot_fatfury2.h index bb33d1c10c1..111b9f7388b 100644 --- a/src/devices/bus/neogeo/prot_fatfury2.h +++ b/src/devices/bus/neogeo/prot_fatfury2.h @@ -15,8 +15,8 @@ public: // construction/destruction fatfury2_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ16_MEMBER( protection_r ); - DECLARE_WRITE16_MEMBER( protection_w ); + uint16_t protection_r(offs_t offset); + void protection_w(offs_t offset, uint16_t data); protected: virtual void device_start() override; diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.cpp b/src/devices/bus/neogeo/prot_kof2k3bl.cpp index 456f164c042..67262d15bc8 100644 --- a/src/devices/bus/neogeo/prot_kof2k3bl.cpp +++ b/src/devices/bus/neogeo/prot_kof2k3bl.cpp @@ -31,17 +31,17 @@ void kof2k3bl_prot_device::device_reset() /* The King of Fighters 2003 (bootleg set 1) */ -READ16_MEMBER( kof2k3bl_prot_device::protection_r) +uint16_t kof2k3bl_prot_device::protection_r(offs_t offset) { return m_cartridge_ram[offset]; } -READ16_MEMBER(kof2k3bl_prot_device::overlay_r) // hack? +uint16_t kof2k3bl_prot_device::overlay_r() // hack? { return m_overlay; } -WRITE16_MEMBER(kof2k3bl_prot_device::kof2003_w) +void kof2k3bl_prot_device::kof2003_w(offs_t offset, uint16_t data, uint16_t mem_mask) { data = COMBINE_DATA(&m_cartridge_ram[offset]); if (offset == 0x1ff0/2 || offset == 0x1ff2/2) @@ -60,7 +60,7 @@ WRITE16_MEMBER(kof2k3bl_prot_device::kof2003_w) } } -WRITE16_MEMBER(kof2k3bl_prot_device::kof2003p_w) +void kof2k3bl_prot_device::kof2003p_w(offs_t offset, uint16_t data, uint16_t mem_mask) { data = COMBINE_DATA(&m_cartridge_ram[offset]); if (offset == 0x1ff0/2 || offset == 0x1ff2/2) diff --git a/src/devices/bus/neogeo/prot_kof2k3bl.h b/src/devices/bus/neogeo/prot_kof2k3bl.h index 52d87e87bfe..c4c83d30e5d 100644 --- a/src/devices/bus/neogeo/prot_kof2k3bl.h +++ b/src/devices/bus/neogeo/prot_kof2k3bl.h @@ -15,10 +15,10 @@ public: // construction/destruction kof2k3bl_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ16_MEMBER(protection_r); - DECLARE_WRITE16_MEMBER(kof2003_w); - DECLARE_WRITE16_MEMBER(kof2003p_w); - DECLARE_READ16_MEMBER(overlay_r); + uint16_t protection_r(offs_t offset); + void kof2003_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void kof2003p_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t overlay_r(); void bl_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size); void pl_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size); void upl_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size); diff --git a/src/devices/bus/neogeo/prot_kof98.cpp b/src/devices/bus/neogeo/prot_kof98.cpp index 5f76d935e1a..528bb2bf691 100644 --- a/src/devices/bus/neogeo/prot_kof98.cpp +++ b/src/devices/bus/neogeo/prot_kof98.cpp @@ -81,7 +81,7 @@ void kof98_prot_device::decrypt_68k(uint8_t* cpurom, uint32_t cpurom_size) The boards have an ALTERA chip (EPM7128SQC100-15) which is tied to 242-P1 ***************************************************************/ -READ16_MEMBER(kof98_prot_device::protection_r) +uint16_t kof98_prot_device::protection_r(offs_t offset) { if (m_prot_state == 1) { @@ -106,7 +106,7 @@ READ16_MEMBER(kof98_prot_device::protection_r) /* when 0x20aaaa contains 0x0090 (word) then 0x100 (normally the neogeo header) should return 0x00c200fd worked out using real hw */ -WRITE16_MEMBER( kof98_prot_device::protection_w ) +void kof98_prot_device::protection_w(uint16_t data) { /* info from razoola */ switch (data) diff --git a/src/devices/bus/neogeo/prot_kof98.h b/src/devices/bus/neogeo/prot_kof98.h index 652e098898a..eef9fa47a7e 100644 --- a/src/devices/bus/neogeo/prot_kof98.h +++ b/src/devices/bus/neogeo/prot_kof98.h @@ -17,8 +17,8 @@ public: kof98_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); void decrypt_68k(uint8_t* cpurom, uint32_t cpurom_size); - DECLARE_WRITE16_MEMBER(protection_w); - DECLARE_READ16_MEMBER(protection_r); + void protection_w(uint16_t data); + uint16_t protection_r(offs_t offset); int m_prot_state; uint16_t m_default_rom[2]; diff --git a/src/devices/bus/neogeo/prot_misc.cpp b/src/devices/bus/neogeo/prot_misc.cpp index a4fb1a0a4c4..3cd4b6db75c 100644 --- a/src/devices/bus/neogeo/prot_misc.cpp +++ b/src/devices/bus/neogeo/prot_misc.cpp @@ -267,7 +267,7 @@ void neoboot_prot_device::samsho5b_vx_decrypt(uint8_t* ymsndrom, uint32_t ymsndr /* Metal Slug 5 Plus (bootleg) */ -READ16_MEMBER( neoboot_prot_device::mslug5p_prot_r ) +uint16_t neoboot_prot_device::mslug5p_prot_r() { logerror("%s access protected\n", machine().describe_context()); return 0xa0; @@ -275,7 +275,7 @@ READ16_MEMBER( neoboot_prot_device::mslug5p_prot_r ) // FIXME: temporarily moved to the driver, through mslug5p_bank_base() below /* -WRITE16_MEMBER( neoboot_prot_device::ms5plus_bankswitch_w ) +void neoboot_prot_device::ms5plus_bankswitch_w(offs_t offset, uint16_t data) { int bankaddress; logerror("offset: %06x %s set banking %04x\n",offset,machine().describe_context(),data); diff --git a/src/devices/bus/neogeo/prot_misc.h b/src/devices/bus/neogeo/prot_misc.h index cbf552ff2ba..b7e89224573 100644 --- a/src/devices/bus/neogeo/prot_misc.h +++ b/src/devices/bus/neogeo/prot_misc.h @@ -34,8 +34,8 @@ public: void samsho5b_px_decrypt(uint8_t* cpurom, uint32_t cpurom_size); void samsho5b_vx_decrypt(uint8_t* ymsndrom, uint32_t ymsndrom_size); - DECLARE_READ16_MEMBER(mslug5p_prot_r); - //DECLARE_WRITE16_MEMBER(ms5plus_bankswitch_w); + uint16_t mslug5p_prot_r(); + //void ms5plus_bankswitch_w(offs_t offset, uint16_t data); uint32_t mslug5p_bank_base(uint16_t sel); void mslug5b_vx_decrypt(uint8_t* ymsndrom, uint32_t ymsndrom_size); diff --git a/src/devices/bus/neogeo/prot_mslugx.cpp b/src/devices/bus/neogeo/prot_mslugx.cpp index 650d595bf87..04b785514a5 100644 --- a/src/devices/bus/neogeo/prot_mslugx.cpp +++ b/src/devices/bus/neogeo/prot_mslugx.cpp @@ -32,7 +32,7 @@ void mslugx_prot_device::device_reset() Also found is a QFP144 chip labeled with 0103 - function unknown ***************************************************************/ -WRITE16_MEMBER( mslugx_prot_device::protection_w ) +void mslugx_prot_device::protection_w(offs_t offset, uint16_t data) { switch (offset) { @@ -60,7 +60,7 @@ WRITE16_MEMBER( mslugx_prot_device::protection_w ) } -READ16_MEMBER( mslugx_prot_device::protection_r ) +uint16_t mslugx_prot_device::protection_r(address_space &space, offs_t offset) { uint16_t res = 0; diff --git a/src/devices/bus/neogeo/prot_mslugx.h b/src/devices/bus/neogeo/prot_mslugx.h index 106bce3ad84..02243fff265 100644 --- a/src/devices/bus/neogeo/prot_mslugx.h +++ b/src/devices/bus/neogeo/prot_mslugx.h @@ -16,8 +16,8 @@ public: // construction/destruction mslugx_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_WRITE16_MEMBER( protection_w ); - DECLARE_READ16_MEMBER( protection_r ); + void protection_w(offs_t offset, uint16_t data); + uint16_t protection_r(address_space &space, offs_t offset); protected: virtual void device_start() override; diff --git a/src/devices/bus/neogeo/prot_sma.cpp b/src/devices/bus/neogeo/prot_sma.cpp index 99ed2269d2a..3f771781fa8 100644 --- a/src/devices/bus/neogeo/prot_sma.cpp +++ b/src/devices/bus/neogeo/prot_sma.cpp @@ -33,7 +33,7 @@ void sma_prot_device::device_reset() // temporarily replaced by the get_bank_base functions below, until we clean up bankswitch implementation #if 0 -WRITE16_MEMBER( sma_prot_device::kof99_bankswitch_w ) +void sma_prot_device::kof99_bankswitch_w(uint16_t data) { int bankaddress; static const int bankoffset[64] = @@ -63,7 +63,7 @@ WRITE16_MEMBER( sma_prot_device::kof99_bankswitch_w ) } -WRITE16_MEMBER( sma_prot_device::garou_bankswitch_w ) +void sma_prot_device::garou_bankswitch_w(uint16_t data) { int bankaddress; static const int bankoffset[64] = @@ -98,7 +98,7 @@ WRITE16_MEMBER( sma_prot_device::garou_bankswitch_w ) } -WRITE16_MEMBER( sma_prot_device::garouh_bankswitch_w ) +void sma_prot_device::garouh_bankswitch_w(uint16_t data) { int bankaddress; static const int bankoffset[64] = @@ -135,7 +135,7 @@ WRITE16_MEMBER( sma_prot_device::garouh_bankswitch_w ) } -WRITE16_MEMBER( sma_prot_device::mslug3_bankswitch_w ) +void sma_prot_device::mslug3_bankswitch_w(uint16_t data) { int bankaddress; static const int bankoffset[64] = @@ -169,7 +169,7 @@ WRITE16_MEMBER( sma_prot_device::mslug3_bankswitch_w ) } -WRITE16_MEMBER( sma_prot_device::kof2000_bankswitch_w ) +void sma_prot_device::kof2000_bankswitch_w(uint16_t data) { int bankaddress; static const int bankoffset[64] = @@ -389,7 +389,7 @@ uint32_t sma_prot_device::kof2000_bank_base(uint16_t sel) -READ16_MEMBER( sma_prot_device::prot_9a37_r ) +uint16_t sma_prot_device::prot_9a37_r() { return 0x9a37; } @@ -398,7 +398,7 @@ READ16_MEMBER( sma_prot_device::prot_9a37_r ) /* information about the sma random number generator provided by razoola */ /* this RNG is correct for KOF99, other games might be different */ -READ16_MEMBER( sma_prot_device::random_r ) +uint16_t sma_prot_device::random_r() { uint16_t old = m_sma_rng; uint16_t newbit = ((m_sma_rng >> 2) ^ diff --git a/src/devices/bus/neogeo/prot_sma.h b/src/devices/bus/neogeo/prot_sma.h index c36af941132..bb19fe43f40 100644 --- a/src/devices/bus/neogeo/prot_sma.h +++ b/src/devices/bus/neogeo/prot_sma.h @@ -16,13 +16,13 @@ public: // construction/destruction sma_prot_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - //DECLARE_WRITE16_MEMBER( kof99_bankswitch_w ); - //DECLARE_WRITE16_MEMBER( garou_bankswitch_w ); - //DECLARE_WRITE16_MEMBER( garouh_bankswitch_w ); - //DECLARE_WRITE16_MEMBER( mslug3_bankswitch_w ); - //DECLARE_WRITE16_MEMBER( kof2000_bankswitch_w ); - DECLARE_READ16_MEMBER( prot_9a37_r ); - DECLARE_READ16_MEMBER( random_r ); + //void kof99_bankswitch_w(uint16_t data); + //void garou_bankswitch_w(uint16_t data); + //void garouh_bankswitch_w(uint16_t data); + //void mslug3_bankswitch_w(uint16_t data); + //void kof2000_bankswitch_w(uint16_t data); + uint16_t prot_9a37_r(); + uint16_t random_r(); uint32_t kof99_bank_base(uint16_t sel); uint32_t garou_bank_base(uint16_t sel); uint32_t garouh_bank_base(uint16_t sel); diff --git a/src/devices/bus/neogeo/pvc.h b/src/devices/bus/neogeo/pvc.h index 00be5322f59..23f1bbfede5 100644 --- a/src/devices/bus/neogeo/pvc.h +++ b/src/devices/bus/neogeo/pvc.h @@ -21,8 +21,8 @@ public: // reading and writing virtual uint32_t get_bank_base(uint16_t sel) override { return m_pvc_prot->get_bank_base(); } - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_pvc_prot->protection_r(offset); } - virtual DECLARE_WRITE16_MEMBER(protection_w) override { m_pvc_prot->protection_w(offset, data, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_pvc_prot->protection_r(offset); } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { m_pvc_prot->protection_w(offset, data, mem_mask); } virtual void decrypt_all(DECRYPT_ALL_PARAMS) override { } virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/rom.cpp b/src/devices/bus/neogeo/rom.cpp index 0f54a808cef..290ea9f3a5d 100644 --- a/src/devices/bus/neogeo/rom.cpp +++ b/src/devices/bus/neogeo/rom.cpp @@ -49,7 +49,7 @@ void neogeo_rom_device::device_reset() mapper specific handlers -------------------------------------------------*/ -READ16_MEMBER(neogeo_rom_device::rom_r) +uint16_t neogeo_rom_device::rom_r(offs_t offset) { // to speed up access to ROM, the access to ROM are actually replaced in the driver // by accesses to the maincpu rom region, where we have anyway copied the rom content @@ -58,7 +58,7 @@ READ16_MEMBER(neogeo_rom_device::rom_r) } -WRITE16_MEMBER(neogeo_rom_device::banksel_w) +void neogeo_rom_device::banksel_w(uint16_t data) { // to speed up access to ROM, the banking is taken care of at driver level // by mapping higher banks to the corresponding offset in maincpu rom region diff --git a/src/devices/bus/neogeo/rom.h b/src/devices/bus/neogeo/rom.h index 1f62a890859..638154d919a 100644 --- a/src/devices/bus/neogeo/rom.h +++ b/src/devices/bus/neogeo/rom.h @@ -17,8 +17,8 @@ public: neogeo_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(rom_r) override; - virtual DECLARE_WRITE16_MEMBER(banksel_w) override; + virtual uint16_t rom_r(offs_t offset) override; + virtual void banksel_w(uint16_t data) override; protected: neogeo_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint16_t clock); @@ -44,8 +44,8 @@ class neogeo_vliner_cart_device : public neogeo_rom_device public: neogeo_vliner_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER(ram_r) override { return m_cart_ram[offset]; } - virtual DECLARE_WRITE16_MEMBER(ram_w) override { COMBINE_DATA(&m_cart_ram[offset]); } + virtual uint16_t ram_r(offs_t offset) override { return m_cart_ram[offset]; } + virtual void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { COMBINE_DATA(&m_cart_ram[offset]); } virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/sbp.cpp b/src/devices/bus/neogeo/sbp.cpp index 6b6920cb5e8..0ce1d179248 100644 --- a/src/devices/bus/neogeo/sbp.cpp +++ b/src/devices/bus/neogeo/sbp.cpp @@ -32,7 +32,7 @@ void neogeo_sbp_cart_device::device_reset() -READ16_MEMBER( neogeo_sbp_cart_device::protection_r ) +uint16_t neogeo_sbp_cart_device::protection_r(address_space &space, offs_t offset) { uint16_t* rom = (get_rom_size()) ? get_rom_base() : get_region_rom_base(); uint16_t origdata = rom[offset + (0x200/2)]; @@ -49,7 +49,7 @@ READ16_MEMBER( neogeo_sbp_cart_device::protection_r ) } -WRITE16_MEMBER( neogeo_sbp_cart_device::protection_w ) +void neogeo_sbp_cart_device::protection_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int realoffset = 0x200 + (offset * 2); diff --git a/src/devices/bus/neogeo/sbp.h b/src/devices/bus/neogeo/sbp.h index 455c7892399..25fd920f281 100644 --- a/src/devices/bus/neogeo/sbp.h +++ b/src/devices/bus/neogeo/sbp.h @@ -17,8 +17,8 @@ class neogeo_sbp_cart_device : public neogeo_rom_device public: neogeo_sbp_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_WRITE16_MEMBER(protection_w) override; - virtual DECLARE_READ16_MEMBER(protection_r) override; + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual uint16_t protection_r(address_space &space, offs_t offset) override; virtual void decrypt_all(DECRYPT_ALL_PARAMS) override; virtual int get_fixed_bank_type() override { return 0; } diff --git a/src/devices/bus/neogeo/slot.cpp b/src/devices/bus/neogeo/slot.cpp index b3b4ea4baa9..8f0b3e0e268 100644 --- a/src/devices/bus/neogeo/slot.cpp +++ b/src/devices/bus/neogeo/slot.cpp @@ -334,10 +334,10 @@ std::string neogeo_cart_slot_device::get_default_card_software(get_default_card_ rom_r -------------------------------------------------*/ -READ16_MEMBER(neogeo_cart_slot_device::rom_r) +uint16_t neogeo_cart_slot_device::rom_r(offs_t offset) { if (m_cart) - return m_cart->rom_r(space, offset, mem_mask); + return m_cart->rom_r(offset); else return 0xffff; } @@ -346,20 +346,20 @@ READ16_MEMBER(neogeo_cart_slot_device::rom_r) write_banksel -------------------------------------------------*/ -WRITE16_MEMBER(neogeo_cart_slot_device::banksel_w) +void neogeo_cart_slot_device::banksel_w(uint16_t data) { if (m_cart) - m_cart->banksel_w(space, offset, data, mem_mask); + m_cart->banksel_w(data); } /*------------------------------------------------- ram_r -------------------------------------------------*/ -READ16_MEMBER(neogeo_cart_slot_device::ram_r) +uint16_t neogeo_cart_slot_device::ram_r(offs_t offset) { if (m_cart) - return m_cart->ram_r(space, offset, mem_mask); + return m_cart->ram_r(offset); else return 0xffff; } @@ -368,20 +368,20 @@ READ16_MEMBER(neogeo_cart_slot_device::ram_r) ram_w -------------------------------------------------*/ -WRITE16_MEMBER(neogeo_cart_slot_device::ram_w) +void neogeo_cart_slot_device::ram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (m_cart) - m_cart->ram_w(space, offset, data, mem_mask); + m_cart->ram_w(offset, data, mem_mask); } /*------------------------------------------------- addon_r -------------------------------------------------*/ -READ16_MEMBER(neogeo_cart_slot_device::addon_r) +uint16_t neogeo_cart_slot_device::addon_r(offs_t offset) { if (m_cart) - return m_cart->addon_r(space, offset, mem_mask); + return m_cart->addon_r(offset); else return 0xffff; } @@ -390,10 +390,10 @@ READ16_MEMBER(neogeo_cart_slot_device::addon_r) protection_r -------------------------------------------------*/ -READ16_MEMBER(neogeo_cart_slot_device::protection_r) +uint16_t neogeo_cart_slot_device::protection_r(address_space &space, offs_t offset) { if (m_cart) - return m_cart->protection_r(space, offset, mem_mask); + return m_cart->protection_r(space, offset); else return 0xffff; } @@ -402,8 +402,8 @@ READ16_MEMBER(neogeo_cart_slot_device::protection_r) protection_w -------------------------------------------------*/ -WRITE16_MEMBER(neogeo_cart_slot_device::protection_w) +void neogeo_cart_slot_device::protection_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (m_cart) - m_cart->protection_w(space, offset, data, mem_mask); + m_cart->protection_w(offset, data, mem_mask); } diff --git a/src/devices/bus/neogeo/slot.h b/src/devices/bus/neogeo/slot.h index b528d6f3005..f2171a45eb1 100644 --- a/src/devices/bus/neogeo/slot.h +++ b/src/devices/bus/neogeo/slot.h @@ -93,13 +93,13 @@ public: virtual ~device_neogeo_cart_interface(); // reading from ROM - virtual DECLARE_READ16_MEMBER(rom_r) { return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(banksel_w) { } - virtual DECLARE_READ16_MEMBER(ram_r) { return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(ram_w) { } - virtual DECLARE_READ16_MEMBER(protection_r) { return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(protection_w) { } - virtual DECLARE_READ16_MEMBER(addon_r) { return 0xffff; } + virtual uint16_t rom_r(offs_t offset) { return 0xffff; } + virtual void banksel_w(uint16_t data) { } + virtual uint16_t ram_r(offs_t offset) { return 0xffff; } + virtual void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { } + virtual uint16_t protection_r(address_space &space, offs_t offset) { return 0xffff; } + virtual void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { } + virtual uint16_t addon_r(offs_t offset) { return 0xffff; } virtual uint32_t get_bank_base(uint16_t sel) { return 0; } virtual uint32_t get_special_bank() { return 0; } virtual uint16_t get_helper() { return 0; } @@ -220,13 +220,13 @@ public: virtual std::string get_default_card_software(get_default_card_software_hook &hook) const override; // reading and writing - DECLARE_READ16_MEMBER(rom_r); - DECLARE_WRITE16_MEMBER(banksel_w); - DECLARE_READ16_MEMBER(ram_r); - DECLARE_WRITE16_MEMBER(ram_w); - DECLARE_READ16_MEMBER(protection_r); - DECLARE_WRITE16_MEMBER(protection_w); - DECLARE_READ16_MEMBER(addon_r); + uint16_t rom_r(offs_t offset); + void banksel_w(uint16_t data); + uint16_t ram_r(offs_t offset); + void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t protection_r(address_space &space, offs_t offset); + void protection_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t addon_r(offs_t offset); void set_cart_type(const char *slot); int get_type() { return m_type; } diff --git a/src/devices/bus/neogeo/sma.h b/src/devices/bus/neogeo/sma.h index b4b72b3b5b5..1eb1a05e6ba 100644 --- a/src/devices/bus/neogeo/sma.h +++ b/src/devices/bus/neogeo/sma.h @@ -17,8 +17,8 @@ public: neogeo_sma_cart_device(const machine_config &mconfig, const char *tag, device_t *owner, uint16_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(protection_r) override { return m_sma_prot->prot_9a37_r(space, offset, mem_mask); } - virtual DECLARE_READ16_MEMBER(addon_r) override { return m_sma_prot->random_r(space, offset, mem_mask); } + virtual uint16_t protection_r(address_space &space, offs_t offset) override { return m_sma_prot->prot_9a37_r(); } + virtual uint16_t addon_r(offs_t offset) override { return m_sma_prot->random_r(); } virtual uint32_t get_bank_base(uint16_t sel) override { return 0; } virtual void decrypt_all(DECRYPT_ALL_PARAMS) override {} diff --git a/src/devices/machine/i82371sb.cpp b/src/devices/machine/i82371sb.cpp index 09399473564..d8feaeb05c1 100644 --- a/src/devices/machine/i82371sb.cpp +++ b/src/devices/machine/i82371sb.cpp @@ -961,8 +961,8 @@ void i82371sb_ide_device::map_extra(uint64_t memory_window_start, uint64_t memor { offs_t m_base = bmiba & 0xfff0; - io_space->install_readwrite_handler(m_base, m_base + 0x7, read32_delegate(*m_ide1, FUNC(bus_master_ide_controller_device::bmdma_r)), write32_delegate(*m_ide1, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); - io_space->install_readwrite_handler(m_base + 0x8, m_base + 0xf, read32_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_r)), write32_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); + io_space->install_readwrite_handler(m_base, m_base + 0x7, read32s_delegate(*m_ide1, FUNC(bus_master_ide_controller_device::bmdma_r)), write32s_delegate(*m_ide1, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); + io_space->install_readwrite_handler(m_base + 0x8, m_base + 0xf, read32s_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_r)), write32s_delegate(*m_ide2, FUNC(bus_master_ide_controller_device::bmdma_w)), 0xffffffff); } } diff --git a/src/devices/machine/i82439hx.cpp b/src/devices/machine/i82439hx.cpp index db689808e03..6a5f96c9935 100644 --- a/src/devices/machine/i82439hx.cpp +++ b/src/devices/machine/i82439hx.cpp @@ -163,7 +163,7 @@ void i82439hx_host_device::map_extra(uint64_t memory_window_start, uint64_t memo } -READ8_MEMBER (i82439hx_host_device::header_type_r) +uint8_t i82439hx_host_device::header_type_r() { return 0x00; // from datasheet } diff --git a/src/devices/machine/i82439hx.h b/src/devices/machine/i82439hx.h index 93af4629096..4968102c353 100644 --- a/src/devices/machine/i82439hx.h +++ b/src/devices/machine/i82439hx.h @@ -47,7 +47,7 @@ private: uint8_t drt, drat, smram, errcmd, errsts, errsyn; int smiact_n; - virtual DECLARE_READ8_MEMBER(header_type_r) override; + virtual uint8_t header_type_r() override; DECLARE_READ8_MEMBER (pcon_r); DECLARE_WRITE8_MEMBER(pcon_w); DECLARE_READ8_MEMBER (cc_r); diff --git a/src/devices/machine/idectrl.cpp b/src/devices/machine/idectrl.cpp index b8157820ab4..c8f79c3fd91 100644 --- a/src/devices/machine/idectrl.cpp +++ b/src/devices/machine/idectrl.cpp @@ -282,7 +282,7 @@ void bus_master_ide_controller_device::set_dmarq(int state) * *************************************/ -READ32_MEMBER( bus_master_ide_controller_device::bmdma_r ) +uint32_t bus_master_ide_controller_device::bmdma_r(offs_t offset, uint32_t mem_mask) { uint32_t result = 0; switch( offset ) @@ -313,7 +313,7 @@ READ32_MEMBER( bus_master_ide_controller_device::bmdma_r ) * *************************************/ -WRITE32_MEMBER( bus_master_ide_controller_device::bmdma_w ) +void bus_master_ide_controller_device::bmdma_w(offs_t offset, uint32_t data, uint32_t mem_mask) { LOG("%s:ide_bus_master32_w(%d, %08x, %08X)\n", machine().describe_context(), offset, mem_mask, data); diff --git a/src/devices/machine/idectrl.h b/src/devices/machine/idectrl.h index ace0b476afc..e81ffeae346 100644 --- a/src/devices/machine/idectrl.h +++ b/src/devices/machine/idectrl.h @@ -46,10 +46,10 @@ public: void write_cs0(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff); void write_cs1(offs_t offset, uint16_t data, uint16_t mem_mask = 0xffff); - DECLARE_READ16_MEMBER(cs0_r) { return read_cs0(offset, mem_mask); } - DECLARE_READ16_MEMBER(cs1_r) { return read_cs1(offset, mem_mask); } - DECLARE_WRITE16_MEMBER(cs0_w) { write_cs0(offset, data, mem_mask); } - DECLARE_WRITE16_MEMBER(cs1_w) { write_cs1(offset, data, mem_mask); } + uint16_t cs0_r(offs_t offset, uint16_t mem_mask = ~0) { return read_cs0(offset, mem_mask); } + uint16_t cs1_r(offs_t offset, uint16_t mem_mask = ~0) { return read_cs1(offset, mem_mask); } + void cs0_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { write_cs0(offset, data, mem_mask); } + void cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) { write_cs1(offset, data, mem_mask); } protected: ide_controller_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -89,10 +89,10 @@ public: void write_cs0(offs_t offset, uint32_t data, uint32_t mem_mask = 0xffffffff); void write_cs1(offs_t offset, uint32_t data, uint32_t mem_mask = 0xffffffff); - DECLARE_READ32_MEMBER(cs0_r) { return read_cs0(offset, mem_mask); } - DECLARE_READ32_MEMBER(cs1_r) { return read_cs1(offset, mem_mask); } - DECLARE_WRITE32_MEMBER(cs0_w) { write_cs0(offset, data, mem_mask); } - DECLARE_WRITE32_MEMBER(cs1_w) { write_cs1(offset, data, mem_mask); } + uint32_t cs0_r(offs_t offset, uint32_t mem_mask = ~0) { return read_cs0(offset, mem_mask); } + uint32_t cs1_r(offs_t offset, uint32_t mem_mask = ~0) { return read_cs1(offset, mem_mask); } + void cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { write_cs0(offset, data, mem_mask); } + void cs1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { write_cs1(offset, data, mem_mask); } protected: ide_controller_32_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -128,8 +128,8 @@ public: return *this; } - DECLARE_READ32_MEMBER( bmdma_r ); - DECLARE_WRITE32_MEMBER( bmdma_w ); + uint32_t bmdma_r(offs_t offset, uint32_t mem_mask = ~0); + void bmdma_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); protected: virtual void device_start() override; diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp index 65d94e3ea54..289940d353a 100644 --- a/src/devices/machine/pci.cpp +++ b/src/devices/machine/pci.cpp @@ -221,7 +221,7 @@ void pci_device::set_multifunction_device(bool enable) is_multifunction_device = enable; } -READ8_MEMBER(pci_device::header_type_r) +uint8_t pci_device::header_type_r() { return is_multifunction_device ? 0x80 : 0x00; } @@ -455,7 +455,7 @@ pci_bridge_device::pci_bridge_device(const machine_config &mconfig, device_type { } -READ8_MEMBER(pci_bridge_device::header_type_r) +uint8_t pci_bridge_device::header_type_r() { return 0x01; } diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h index a9a2a84744f..9eeb3582dc0 100644 --- a/src/devices/machine/pci.h +++ b/src/devices/machine/pci.h @@ -57,7 +57,7 @@ public: DECLARE_READ32_MEMBER(class_rev_r); virtual DECLARE_READ8_MEMBER(cache_line_size_r); virtual DECLARE_READ8_MEMBER(latency_timer_r); - virtual DECLARE_READ8_MEMBER(header_type_r); + virtual uint8_t header_type_r(); virtual DECLARE_READ8_MEMBER(bist_r); DECLARE_READ32_MEMBER(address_base_r); DECLARE_WRITE32_MEMBER(address_base_w); @@ -152,7 +152,7 @@ public: uint64_t io_window_start, uint64_t io_window_end, uint64_t io_offset, address_space *io_space) override; virtual void reset_all_mappings() override; - virtual DECLARE_READ8_MEMBER(header_type_r) override; + virtual uint8_t header_type_r() override; virtual void config_map(address_map &map) override; diff --git a/src/mame/audio/m79amb.cpp b/src/mame/audio/m79amb.cpp index ad33b2f3761..c0cd1aa1863 100644 --- a/src/mame/audio/m79amb.cpp +++ b/src/mame/audio/m79amb.cpp @@ -322,7 +322,7 @@ DISCRETE_SOUND_END /* the ports are guessed from operation */ /* the schematics do not show the actual hookup */ -WRITE8_MEMBER(m79amb_state::m79amb_8000_w) +void m79amb_state::m79amb_8000_w(uint8_t data) { /* these values are not latched */ /* they are pulsed when the port is addressed */ @@ -332,7 +332,7 @@ WRITE8_MEMBER(m79amb_state::m79amb_8000_w) m_discrete->write(M79AMB_THUD_EN, data & 0x04); } -WRITE8_MEMBER(m79amb_state::m79amb_8003_w) +void m79amb_state::m79amb_8003_w(uint8_t data) { /* Self Test goes low on reset and lights LED */ /* LED goes off on pass */ diff --git a/src/mame/audio/mario.cpp b/src/mame/audio/mario.cpp index e8fc4ca61b8..da4e4f1699a 100644 --- a/src/mame/audio/mario.cpp +++ b/src/mame/audio/mario.cpp @@ -487,7 +487,7 @@ READ_LINE_MEMBER(mario_state::mario_sh_t1_r) return I8035_T_R(1); } -READ8_MEMBER(mario_state::mario_sh_tune_r) +uint8_t mario_state::mario_sh_tune_r(offs_t offset) { uint8_t *SND = memregion("audiocpu")->base(); uint16_t mask = memregion("audiocpu")->bytes()-1; @@ -499,10 +499,10 @@ READ8_MEMBER(mario_state::mario_sh_tune_r) return (SND[(0x1000 + (p2 & 0x0f) * 256 + offset) & mask]); } -WRITE8_MEMBER(mario_state::mario_sh_sound_w) +void mario_state::mario_sh_sound_w(uint8_t data) { #if OLD_SOUND - m_discrete->write(space, DS_DAC, data); + m_discrete->write(DS_DAC, data); #else m_audio_dac->write(data); #endif @@ -524,7 +524,7 @@ void mario_state::mario_sh_p2_w(uint8_t data) * ****************************************************************/ -WRITE8_MEMBER(mario_state::masao_sh_irqtrigger_w) +void mario_state::masao_sh_irqtrigger_w(uint8_t data) { if (m_last == 1 && data == 0) { @@ -535,7 +535,7 @@ WRITE8_MEMBER(mario_state::masao_sh_irqtrigger_w) m_last = data; } -WRITE8_MEMBER(mario_state::mario_sh_tuneselect_w) +void mario_state::mario_sh_tuneselect_w(uint8_t data) { m_soundlatch->write(data); } @@ -543,27 +543,27 @@ WRITE8_MEMBER(mario_state::mario_sh_tuneselect_w) /* Sound 0 and 1 are pulsed !*/ /* Mario running sample */ -WRITE8_MEMBER(mario_state::mario_sh1_w) +void mario_state::mario_sh1_w(uint8_t data) { #if OLD_SOUND - m_discrete->write(space, DS_SOUND0_INP, 0); + m_discrete->write(DS_SOUND0_INP, 0); #else m_audio_snd0->write(data); #endif } /* Luigi running sample */ -WRITE8_MEMBER(mario_state::mario_sh2_w) +void mario_state::mario_sh2_w(uint8_t data) { #if OLD_SOUND - m_discrete->write(space, DS_SOUND1_INP, 0); + m_discrete->write(DS_SOUND1_INP, 0); #else m_audio_snd1->write(data); #endif } /* Misc samples */ -WRITE8_MEMBER(mario_state::mario_sh3_w) +void mario_state::mario_sh3_w(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/mame/audio/mw8080bw.cpp b/src/mame/audio/mw8080bw.cpp index 26fa00f2d94..9049b8781e4 100644 --- a/src/mame/audio/mw8080bw.cpp +++ b/src/mame/audio/mw8080bw.cpp @@ -3577,7 +3577,7 @@ void mw8080bw_state::tornbase_audio(machine_config &config) } -WRITE8_MEMBER(mw8080bw_state::tornbase_audio_w) +void mw8080bw_state::tornbase_audio_w(uint8_t data) { m_discrete->write(TORNBASE_TONE_240_EN, (data >> 0) & 0x01); @@ -4102,7 +4102,7 @@ void mw8080bw_state::checkmat_audio(machine_config &config) } -WRITE8_MEMBER(mw8080bw_state::checkmat_audio_w) +void mw8080bw_state::checkmat_audio_w(uint8_t data) { m_discrete->write(CHECKMAT_TONE_EN, data & 0x01); @@ -4320,7 +4320,7 @@ void mw8080bw_state::shuffle_audio(machine_config &config) } -WRITE8_MEMBER(mw8080bw_state::shuffle_audio_1_w) +void mw8080bw_state::shuffle_audio_1_w(uint8_t data) { m_discrete->write(SHUFFLE_CLICK_EN, (data >> 0) & 0x01); @@ -4338,7 +4338,7 @@ WRITE8_MEMBER(mw8080bw_state::shuffle_audio_1_w) } -WRITE8_MEMBER(mw8080bw_state::shuffle_audio_2_w) +void mw8080bw_state::shuffle_audio_2_w(uint8_t data) { m_discrete->write(SHUFFLE_FOUL_EN, (data >> 0) & 0x01); @@ -4437,7 +4437,7 @@ void mw8080bw_state::bowler_audio(machine_config &config) } -WRITE8_MEMBER(mw8080bw_state::bowler_audio_1_w) +void mw8080bw_state::bowler_audio_1_w(uint8_t data) { /* D0 - selects controller on the cocktail PCB */ @@ -4457,7 +4457,7 @@ WRITE8_MEMBER(mw8080bw_state::bowler_audio_1_w) } -WRITE8_MEMBER(mw8080bw_state::bowler_audio_2_w) +void mw8080bw_state::bowler_audio_2_w(uint8_t data) { /* set BALL ROLLING SOUND FREQ(data & 0x0f) 0, if no rolling, 0x08 used during ball return */ @@ -4471,28 +4471,28 @@ WRITE8_MEMBER(mw8080bw_state::bowler_audio_2_w) } -WRITE8_MEMBER(mw8080bw_state::bowler_audio_3_w) +void mw8080bw_state::bowler_audio_3_w(uint8_t data) { /* regardless of the data, enable BALL HITS PIN 1 sound (top circuit on the schematics) */ } -WRITE8_MEMBER(mw8080bw_state::bowler_audio_4_w) +void mw8080bw_state::bowler_audio_4_w(uint8_t data) { /* regardless of the data, enable BALL HITS PIN 2 sound (bottom circuit on the schematics) */ } -WRITE8_MEMBER(mw8080bw_state::bowler_audio_5_w) +void mw8080bw_state::bowler_audio_5_w(uint8_t data) { - /* not sure, appears to me trigerred alongside the two + /* not sure, appears to me triggered alongside the two BALL HITS PIN sounds */ } -WRITE8_MEMBER(mw8080bw_state::bowler_audio_6_w) +void mw8080bw_state::bowler_audio_6_w(uint8_t data) { /* D0 is not connected */ @@ -4877,7 +4877,7 @@ void mw8080bw_state::blueshrk_audio(machine_config &config) } -WRITE8_MEMBER(mw8080bw_state::blueshrk_audio_w) +void mw8080bw_state::blueshrk_audio_w(uint8_t data) { m_discrete->write(BLUESHRK_GAME_ON_EN, (data >> 0) & 0x01); diff --git a/src/mame/audio/orbit.cpp b/src/mame/audio/orbit.cpp index 2d69ee7ab15..175a8551595 100644 --- a/src/mame/audio/orbit.cpp +++ b/src/mame/audio/orbit.cpp @@ -2,7 +2,7 @@ // copyright-holders:Derrick Renaud /************************************************************************* - audio\orbit.c + audio\orbit.cpp *************************************************************************/ #include "emu.h" @@ -14,24 +14,24 @@ * *************************************/ -WRITE8_MEMBER(orbit_state::note_w) +void orbit_state::note_w(uint8_t data) { m_discrete->write(ORBIT_NOTE_FREQ, (~data) & 0xff); } -WRITE8_MEMBER(orbit_state::note_amp_w) +void orbit_state::note_amp_w(uint8_t data) { m_discrete->write(ORBIT_ANOTE1_AMP, data & 0x0f); m_discrete->write(ORBIT_ANOTE2_AMP, data >> 4); } -WRITE8_MEMBER(orbit_state::noise_amp_w) +void orbit_state::noise_amp_w(uint8_t data) { m_discrete->write(ORBIT_NOISE1_AMP, data & 0x0f); m_discrete->write(ORBIT_NOISE2_AMP, data >> 4); } -WRITE8_MEMBER(orbit_state::noise_rst_w) +void orbit_state::noise_rst_w(uint8_t data) { m_discrete->write(ORBIT_NOISE_EN, 0); } diff --git a/src/mame/drivers/m10.cpp b/src/mame/drivers/m10.cpp index b314e4938c8..4390f97c557 100644 --- a/src/mame/drivers/m10.cpp +++ b/src/mame/drivers/m10.cpp @@ -201,7 +201,7 @@ MACHINE_RESET_MEMBER(m10_state,m10) * 0x06: SAUCER HIT */ -WRITE8_MEMBER(m10_state::m10_ctrl_w) +void m10_state::m10_ctrl_w(uint8_t data) { #if M10_DEBUG if (data & 0x40) @@ -276,7 +276,7 @@ WRITE8_MEMBER(m10_state::m10_ctrl_w) * Will be updated only in attract mode */ -WRITE8_MEMBER(m10_state::m11_ctrl_w) +void m10_state::m11_ctrl_w(uint8_t data) { #if M10_DEBUG if (data & 0x4c) @@ -307,7 +307,7 @@ WRITE8_MEMBER(m10_state::m11_ctrl_w) * Will be updated only in attract mode */ -WRITE8_MEMBER(m10_state::m15_ctrl_w) +void m10_state::m15_ctrl_w(uint8_t data) { #if M10_DEBUG if (data & 0xf0) @@ -333,7 +333,7 @@ WRITE8_MEMBER(m10_state::m15_ctrl_w) * Will be updated only in attract mode */ -WRITE8_MEMBER(m10_state::m10_a500_w) +void m10_state::m10_a500_w(uint8_t data) { #if M10_DEBUG if (data & 0xfc) @@ -341,7 +341,7 @@ WRITE8_MEMBER(m10_state::m10_a500_w) #endif } -WRITE8_MEMBER(m10_state::m11_a100_w) +void m10_state::m11_a100_w(uint8_t data) { int raising_bits = data & ~m_last; //int falling_bits = ~data & m_last; @@ -375,7 +375,7 @@ WRITE8_MEMBER(m10_state::m11_a100_w) } -WRITE8_MEMBER(m10_state::m15_a100_w) +void m10_state::m15_a100_w(uint8_t data) { //int raising_bits = data & ~m_last; int falling_bits = ~data & m_last; @@ -432,7 +432,7 @@ WRITE8_MEMBER(m10_state::m15_a100_w) m_last = data; } -READ8_MEMBER(m10_state::m10_a700_r) +uint8_t m10_state::m10_a700_r() { //LOG(("rd:%d\n",m_screen->vpos())); LOG(("clear\n")); @@ -441,7 +441,7 @@ READ8_MEMBER(m10_state::m10_a700_r) return 0x00; } -READ8_MEMBER(m10_state::m11_a700_r) +uint8_t m10_state::m11_a700_r() { //LOG(("rd:%d\n",m_screen->vpos())); //m_maincpu->set_input_line(0, CLEAR_LINE); diff --git a/src/mame/drivers/m107.cpp b/src/mame/drivers/m107.cpp index d47cc465285..ce12577397a 100644 --- a/src/mame/drivers/m107.cpp +++ b/src/mame/drivers/m107.cpp @@ -74,13 +74,13 @@ TIMER_DEVICE_CALLBACK_MEMBER(m107_state::scanline_interrupt) /*****************************************************************************/ -WRITE8_MEMBER(m107_state::coincounter_w) +void m107_state::coincounter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0,data & 0x01); machine().bookkeeping().coin_counter_w(1,data & 0x02); } -WRITE8_MEMBER(m107_state::bankswitch_w) +void m107_state::bankswitch_w(uint8_t data) { m_mainbank->set_entry((data & 0x06) >> 1); if (data & 0xf9) diff --git a/src/mame/drivers/m5.cpp b/src/mame/drivers/m5.cpp index 4555c4e5dc9..79c405648a5 100644 --- a/src/mame/drivers/m5.cpp +++ b/src/mame/drivers/m5.cpp @@ -305,7 +305,7 @@ WRITE_LINE_MEMBER( m5_state::write_centronics_busy ) // sts_r - //------------------------------------------------- -READ8_MEMBER( m5_state::sts_r ) +uint8_t m5_state::sts_r() { /* @@ -341,7 +341,7 @@ READ8_MEMBER( m5_state::sts_r ) // com_w - //------------------------------------------------- -WRITE8_MEMBER( m5_state::com_w ) +void m5_state::com_w(uint8_t data) { /* @@ -378,7 +378,7 @@ WRITE8_MEMBER( m5_state::com_w ) // fd5_data_r - //------------------------------------------------- -READ8_MEMBER( m5_state::fd5_data_r ) +uint8_t m5_state::fd5_data_r() { m_ppi->pc6_w(0); @@ -390,7 +390,7 @@ READ8_MEMBER( m5_state::fd5_data_r ) // fd5_data_w - //------------------------------------------------- -WRITE8_MEMBER( m5_state::fd5_data_w ) +void m5_state::fd5_data_w(uint8_t data) { m_fd5_data = data; @@ -402,7 +402,7 @@ WRITE8_MEMBER( m5_state::fd5_data_w ) // fd5_com_r - //------------------------------------------------- -READ8_MEMBER( m5_state::fd5_com_r ) +uint8_t m5_state::fd5_com_r() { /* @@ -427,7 +427,7 @@ READ8_MEMBER( m5_state::fd5_com_r ) // fd5_com_w - //------------------------------------------------- -WRITE8_MEMBER( m5_state::fd5_com_w ) +void m5_state::fd5_com_w(uint8_t data) { /* @@ -452,7 +452,7 @@ WRITE8_MEMBER( m5_state::fd5_com_w ) // fd5_com_w - //------------------------------------------------- -WRITE8_MEMBER( m5_state::fd5_ctrl_w ) +void m5_state::fd5_ctrl_w(uint8_t data) { /* @@ -477,7 +477,7 @@ WRITE8_MEMBER( m5_state::fd5_ctrl_w ) // fd5_com_w - //------------------------------------------------- -WRITE8_MEMBER( m5_state::fd5_tc_w ) +void m5_state::fd5_tc_w(uint8_t data) { m_fdc->tc_w(true); m_fdc->tc_w(false); @@ -487,12 +487,12 @@ WRITE8_MEMBER( m5_state::fd5_tc_w ) // 64KBI support for oldest memory module //************************************************************************** -READ8_MEMBER( m5_state::mem64KBI_r ) //in 0x6c +uint8_t m5_state::mem64KBI_r() //in 0x6c { return BIT(m_ram_mode, 0); } -WRITE8_MEMBER( m5_state::mem64KBI_w ) //out 0x6c +void m5_state::mem64KBI_w(offs_t offset, uint8_t data) //out 0x6c { if (m_ram_type != MEM64KBI) return; @@ -533,7 +533,7 @@ WRITE8_MEMBER( m5_state::mem64KBI_w ) //out 0x6c // 64KBF paging //************************************************************************** -WRITE8_MEMBER( m5_state::mem64KBF_w ) //out 0x30 +void m5_state::mem64KBF_w(uint8_t data) //out 0x30 { if (m_ram_type != MEM64KBF) return; @@ -650,7 +650,7 @@ WRITE8_MEMBER( m5_state::mem64KBF_w ) //out 0x30 // 64KRX paging //************************************************************************** -WRITE8_MEMBER( m5_state::mem64KRX_w ) //out 0x7f +void m5_state::mem64KRX_w(offs_t offset, uint8_t data) //out 0x7f { if (m_ram_type != MEM64KRX) return; if (m_ram_mode == data) return; @@ -1061,13 +1061,13 @@ void brno_state::brno_io(address_map &map) } -READ8_MEMBER( brno_state::mmu_r ) +uint8_t brno_state::mmu_r() { return 0; } -WRITE8_MEMBER( brno_state::mmu_w ) +void brno_state::mmu_w(uint8_t data) { m_ramcpu = m_maincpu->state_int(Z80_B); m_rambank = ~data; //m_maincpu->state_int(Z80_A); @@ -1099,13 +1099,13 @@ WRITE8_MEMBER( brno_state::mmu_w ) } -READ8_MEMBER( brno_state::ramsel_r ) +uint8_t brno_state::ramsel_r() { return m_ramen; } -WRITE8_MEMBER( brno_state::ramsel_w ) //out 6b +void brno_state::ramsel_w(uint8_t data) //out 6b { //address_space &program = m_maincpu->space(AS_PROGRAM); @@ -1117,12 +1117,12 @@ WRITE8_MEMBER( brno_state::ramsel_w ) //out 6b logerror("CASEN change: out (&6b),%x\n",data); } -READ8_MEMBER( brno_state::romsel_r ) +uint8_t brno_state::romsel_r() { return m_romen; } -WRITE8_MEMBER( brno_state::romsel_w ) //out 6c +void brno_state::romsel_w(uint8_t data) //out 6c { address_space &program = m_maincpu->space(AS_PROGRAM); @@ -1154,13 +1154,13 @@ WRITE8_MEMBER( brno_state::romsel_w ) //out 6c // FD port 7c - Floppy select //------------------------------------------------- -READ8_MEMBER( brno_state::fd_r ) +uint8_t brno_state::fd_r() { return 0; } -WRITE8_MEMBER( brno_state::fd_w ) +void brno_state::fd_w(uint8_t data) { floppy_image_device *floppy; m_floppy = nullptr; diff --git a/src/mame/drivers/m62.cpp b/src/mame/drivers/m62.cpp index 2bbc6825d4b..c834baac46b 100644 --- a/src/mame/drivers/m62.cpp +++ b/src/mame/drivers/m62.cpp @@ -85,7 +85,7 @@ other supported games as well. /* that to select the ROM. The only exception I make is a special case used in */ /* service mode to test the ROMs. */ -READ8_MEMBER(m62_state::ldrun2_bankswitch_r) +uint8_t m62_state::ldrun2_bankswitch_r() { if (m_ldrun2_bankswap) { @@ -98,7 +98,7 @@ READ8_MEMBER(m62_state::ldrun2_bankswitch_r) return 0; } -WRITE8_MEMBER(m62_state::ldrun2_bankswitch_w) +void m62_state::ldrun2_bankswitch_w(offs_t offset, uint8_t data) { static const int banks[30] = { @@ -133,41 +133,41 @@ WRITE8_MEMBER(m62_state::ldrun2_bankswitch_w) /* Lode Runner 3 has, it seems, a poor man's protection consisting of a PAL */ /* (I think; it's included in the ROM set) which is read at certain times, */ /* and the game crashes if it doesn't match the expected values. */ -READ8_MEMBER(m62_state::ldrun3_prot_5_r) +uint8_t m62_state::ldrun3_prot_5_r() { return 5; } -READ8_MEMBER(m62_state::ldrun3_prot_7_r) +uint8_t m62_state::ldrun3_prot_7_r() { return 7; } -WRITE8_MEMBER(m62_state::ldrun4_bankswitch_w) +void m62_state::ldrun4_bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 0x01); } -WRITE8_MEMBER(m62_state::kidniki_bankswitch_w) +void m62_state::kidniki_bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 0x0f); } #define battroad_bankswitch_w kidniki_bankswitch_w -WRITE8_MEMBER(m62_state::spelunkr_bankswitch_w) +void m62_state::spelunkr_bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 0x03); } -WRITE8_MEMBER(m62_state::spelunk2_bankswitch_w) +void m62_state::spelunk2_bankswitch_w(uint8_t data) { membank("bank1")->set_entry((data & 0xc0) >> 6); membank("bank2")->set_entry((data & 0x3c) >> 2); } -WRITE8_MEMBER(m62_state::youjyudn_bankswitch_w) +void m62_state::youjyudn_bankswitch_w(uint8_t data) { membank("bank1")->set_entry(data & 0x01); } diff --git a/src/mame/drivers/m79amb.cpp b/src/mame/drivers/m79amb.cpp index 377efc3e7e4..7baecaf457e 100644 --- a/src/mame/drivers/m79amb.cpp +++ b/src/mame/drivers/m79amb.cpp @@ -68,7 +68,7 @@ void m79amb_state::machine_start() m_self_test.resolve(); } -WRITE8_MEMBER(m79amb_state::ramtek_videoram_w) +void m79amb_state::ramtek_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data & ~*m_mask; } @@ -99,7 +99,7 @@ uint32_t m79amb_state::screen_update_ramtek(screen_device &screen, bitmap_rgb32 } -READ8_MEMBER(m79amb_state::gray5bit_controller0_r) +uint8_t m79amb_state::gray5bit_controller0_r() { uint8_t port_data = ioport("8004")->read(); uint8_t gun_pos = ioport("GUN1")->read(); @@ -107,7 +107,7 @@ READ8_MEMBER(m79amb_state::gray5bit_controller0_r) return (port_data & 0xe0) | m_lut_gun1[gun_pos]; } -READ8_MEMBER(m79amb_state::gray5bit_controller1_r) +uint8_t m79amb_state::gray5bit_controller1_r() { uint8_t port_data = ioport("8005")->read(); uint8_t gun_pos = ioport("GUN2")->read(); @@ -115,7 +115,7 @@ READ8_MEMBER(m79amb_state::gray5bit_controller1_r) return (port_data & 0xe0) | m_lut_gun2[gun_pos]; } -WRITE8_MEMBER(m79amb_state::m79amb_8002_w) +void m79amb_state::m79amb_8002_w(uint8_t data) { /* D1 may also be watchdog reset */ /* port goes to 0x7f to turn on explosion lamp */ diff --git a/src/mame/drivers/m92.cpp b/src/mame/drivers/m92.cpp index 476b32bf1ff..ac6b4782000 100644 --- a/src/mame/drivers/m92.cpp +++ b/src/mame/drivers/m92.cpp @@ -267,7 +267,7 @@ void m92_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) m_eeprom[offset] = data; } -WRITE8_MEMBER(m92_state::coincounter_w) +void m92_state::coincounter_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 0x01); machine().bookkeeping().coin_counter_w(1, data & 0x02); @@ -276,7 +276,7 @@ WRITE8_MEMBER(m92_state::coincounter_w) /* Bit 0x40 set in Blade Master test mode input check */ } -WRITE8_MEMBER(m92_state::bankswitch_w) +void m92_state::bankswitch_w(uint8_t data) { m_mainbank->set_entry((data & 0x06) >> 1); if (data & 0xf9) diff --git a/src/mame/drivers/mac.cpp b/src/mame/drivers/mac.cpp index 2c419174cad..a61a1253340 100644 --- a/src/mame/drivers/mac.cpp +++ b/src/mame/drivers/mac.cpp @@ -202,7 +202,7 @@ void mac_state::ariel_ramdac_w(offs_t offset, uint32_t data, uint32_t mem_mask) } } -READ8_MEMBER( mac_state::mac_sonora_vctl_r ) +uint8_t mac_state::mac_sonora_vctl_r(offs_t offset) { if (offset == 2) { @@ -213,7 +213,7 @@ READ8_MEMBER( mac_state::mac_sonora_vctl_r ) return m_sonora_vctl[offset]; } -WRITE8_MEMBER( mac_state::mac_sonora_vctl_w ) +void mac_state::mac_sonora_vctl_w(offs_t offset, uint8_t data) { // printf("Sonora: %02x to vctl %x\n", data, offset); m_sonora_vctl[offset] = data; @@ -252,7 +252,7 @@ void mac_state::rbv_recalc_irqs() } } -READ8_MEMBER ( mac_state::mac_rbv_r ) +uint8_t mac_state::mac_rbv_r(offs_t offset) { int data = 0; @@ -300,7 +300,7 @@ READ8_MEMBER ( mac_state::mac_rbv_r ) return data; } -WRITE8_MEMBER ( mac_state::mac_rbv_w ) +void mac_state::mac_rbv_w(offs_t offset, uint8_t data) { if (offset < 0x100) { @@ -439,7 +439,7 @@ void mac_state::biu_w(offs_t offset, uint32_t data, uint32_t mem_mask) // printf("biu_w %x @ %x, mask %08x\n", data, offset, mem_mask); } -READ8_MEMBER(mac_state::oss_r) +uint8_t mac_state::oss_r(offs_t offset) { // printf("oss_r @ %x\n", offset); // if (offset <= 0xe) // for interrupt mask registers, we're intended to return something different than is written in the low 3 bits (?) @@ -450,7 +450,7 @@ READ8_MEMBER(mac_state::oss_r) return m_oss_regs[offset]; } -WRITE8_MEMBER(mac_state::oss_w) +void mac_state::oss_w(offs_t offset, uint8_t data) { // printf("oss_w %x @ %x\n", data, offset); m_oss_regs[offset] = data; @@ -463,29 +463,29 @@ uint32_t mac_state::buserror_r() return 0; } -READ8_MEMBER(mac_state::scciop_r) +uint8_t mac_state::scciop_r(offs_t offset) { // printf("scciop_r @ %x (PC=%x)\n", offset, m_maincpu->pc()); return 0; } -WRITE8_MEMBER(mac_state::scciop_w) +void mac_state::scciop_w(offs_t offset, uint8_t data) { // printf("scciop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->pc()); } -READ8_MEMBER(mac_state::swimiop_r) +uint8_t mac_state::swimiop_r(offs_t offset) { // printf("swimiop_r @ %x (PC=%x)\n", offset, m_maincpu->pc()); return 0; } -WRITE8_MEMBER(mac_state::swimiop_w) +void mac_state::swimiop_w(offs_t offset, uint8_t data) { // printf("swimiop_w %x @ %x (PC=%x)\n", data, offset, m_maincpu->pc()); } -READ8_MEMBER(mac_state::pmac_diag_r) +uint8_t mac_state::pmac_diag_r(offs_t offset) { switch (offset) { @@ -496,25 +496,25 @@ READ8_MEMBER(mac_state::pmac_diag_r) return 0; } -READ8_MEMBER(mac_state::amic_dma_r) +uint8_t mac_state::amic_dma_r() { return 0; } -WRITE8_MEMBER(mac_state::amic_dma_w) +void mac_state::amic_dma_w(offs_t offset, uint8_t data) { // printf("amic_dma_w: %02x at %x (PC=%x)\n", data, offset+0x1000, m_maincpu->pc()); } // HMC has one register: a 35-bit shift register which is accessed one bit at a time (see pmac6100 code at 4030383c which makes this obvious) -READ8_MEMBER(mac_state::hmc_r) +uint8_t mac_state::hmc_r() { uint8_t rv = (uint8_t)(m_hmc_shiftout&1); m_hmc_shiftout>>= 1; return rv; } -WRITE8_MEMBER(mac_state::hmc_w) +void mac_state::hmc_w(offs_t offset, uint8_t data) { // writes to xxx8 reset the bit shift position if ((offset&0x8) == 8) @@ -529,7 +529,7 @@ WRITE8_MEMBER(mac_state::hmc_w) } } -READ8_MEMBER(mac_state::mac_gsc_r) +uint8_t mac_state::mac_gsc_r(offs_t offset) { if (offset == 1) { @@ -539,11 +539,11 @@ READ8_MEMBER(mac_state::mac_gsc_r) return 0; } -WRITE8_MEMBER(mac_state::mac_gsc_w) +void mac_state::mac_gsc_w(uint8_t data) { } -READ8_MEMBER(mac_state::mac_5396_r) +uint8_t mac_state::mac_5396_r(offs_t offset) { if (offset < 0x100) { @@ -558,7 +558,7 @@ READ8_MEMBER(mac_state::mac_5396_r) //return 0; } -WRITE8_MEMBER(mac_state::mac_5396_w) +void mac_state::mac_5396_w(offs_t offset, uint8_t data) { if (offset < 0x100) { diff --git a/src/mame/drivers/madalien.cpp b/src/mame/drivers/madalien.cpp index 08134094254..b4de105cc1f 100644 --- a/src/mame/drivers/madalien.cpp +++ b/src/mame/drivers/madalien.cpp @@ -35,12 +35,12 @@ inline uint8_t madalien_state::shift_common(uint8_t hi, uint8_t lo) return table[((hi & 0x07) << 8) | lo]; } -READ8_MEMBER(madalien_state::shift_r) +uint8_t madalien_state::shift_r() { return shift_common(*m_shift_hi, *m_shift_lo); } -READ8_MEMBER(madalien_state::shift_rev_r) +uint8_t madalien_state::shift_rev_r() { uint8_t hi = *m_shift_hi ^ 0x07; uint8_t lo = bitswap<8>(*m_shift_lo,0,1,2,3,4,5,6,7); @@ -51,7 +51,7 @@ READ8_MEMBER(madalien_state::shift_rev_r) } -WRITE8_MEMBER(madalien_state::madalien_output_w) +void madalien_state::madalien_output_w(uint8_t data) { /* output latch, eight output bits, none connected */ } diff --git a/src/mame/drivers/magmax.cpp b/src/mame/drivers/magmax.cpp index 5714000c9b6..2d9c8051ec8 100644 --- a/src/mame/drivers/magmax.cpp +++ b/src/mame/drivers/magmax.cpp @@ -38,7 +38,7 @@ void magmax_state::cpu_irq_ack_w(uint16_t data) m_maincpu->set_input_line(M68K_IRQ_1, CLEAR_LINE); } -READ8_MEMBER(magmax_state::sound_r) +uint8_t magmax_state::sound_r() { return (m_soundlatch->read() << 1) | m_LS74_q; } diff --git a/src/mame/drivers/mainevt.cpp b/src/mame/drivers/mainevt.cpp index c3723b42e18..f7678ce2d23 100644 --- a/src/mame/drivers/mainevt.cpp +++ b/src/mame/drivers/mainevt.cpp @@ -47,7 +47,7 @@ Both games run on Konami's PWB351024A PCB #include "speaker.h" -WRITE8_MEMBER(mainevt_state::dv_nmienable_w) +void mainevt_state::dv_nmienable_w(uint8_t data) { m_nmi_enable = data; } @@ -59,7 +59,7 @@ WRITE_LINE_MEMBER(mainevt_state::dv_vblank_w) } -WRITE8_MEMBER(mainevt_state::mainevt_bankswitch_w) +void mainevt_state::mainevt_bankswitch_w(uint8_t data) { /* bit 0-1 ROM bank select */ m_rombank->set_entry(data & 0x03); @@ -75,7 +75,7 @@ WRITE8_MEMBER(mainevt_state::mainevt_bankswitch_w) /* other bits unused */ } -WRITE8_MEMBER(mainevt_state::mainevt_coin_w) +void mainevt_state::mainevt_coin_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, data & 0x10); machine().bookkeeping().coin_counter_w(1, data & 0x20); @@ -85,17 +85,17 @@ WRITE8_MEMBER(mainevt_state::mainevt_coin_w) m_leds[3] = BIT(data, 3); } -WRITE8_MEMBER(mainevt_state::mainevt_sh_irqtrigger_w) +void mainevt_state::mainevt_sh_irqtrigger_w(uint8_t data) { m_audiocpu->set_input_line_and_vector(0, HOLD_LINE, 0xff); // Z80 } -READ8_MEMBER(mainevt_state::mainevt_sh_busy_r) +uint8_t mainevt_state::mainevt_sh_busy_r() { return m_upd7759->busy_r(); } -WRITE8_MEMBER(mainevt_state::mainevt_sh_irqcontrol_w) +void mainevt_state::mainevt_sh_irqcontrol_w(uint8_t data) { m_upd7759->reset_w(data & 2); m_upd7759->start_w(data & 1); @@ -103,12 +103,12 @@ WRITE8_MEMBER(mainevt_state::mainevt_sh_irqcontrol_w) m_sound_irq_mask = data & 4; } -WRITE8_MEMBER(mainevt_state::devstor_sh_irqcontrol_w) +void mainevt_state::devstor_sh_irqcontrol_w(uint8_t data) { m_sound_irq_mask = data & 4; } -WRITE8_MEMBER(mainevt_state::mainevt_sh_bankswitch_w) +void mainevt_state::mainevt_sh_bankswitch_w(uint8_t data) { int bank_A, bank_B; @@ -123,7 +123,7 @@ WRITE8_MEMBER(mainevt_state::mainevt_sh_bankswitch_w) m_upd7759->set_rom_bank((data >> 4) & 0x03); } -WRITE8_MEMBER(mainevt_state::dv_sh_bankswitch_w) +void mainevt_state::dv_sh_bankswitch_w(uint8_t data) { int bank_A, bank_B; @@ -135,7 +135,7 @@ WRITE8_MEMBER(mainevt_state::dv_sh_bankswitch_w) m_k007232->set_bank(bank_A, bank_B); } -READ8_MEMBER(mainevt_state::k052109_051960_r) +uint8_t mainevt_state::k052109_051960_r(offs_t offset) { if (m_k052109->get_rmrd_line() == CLEAR_LINE) { @@ -150,7 +150,7 @@ READ8_MEMBER(mainevt_state::k052109_051960_r) return m_k052109->read(offset); } -WRITE8_MEMBER(mainevt_state::k052109_051960_w) +void mainevt_state::k052109_051960_w(offs_t offset, uint8_t data) { if (offset >= 0x3800 && offset < 0x3808) m_k051960->k051937_w(offset - 0x3800, data); diff --git a/src/mame/drivers/mainsnk.cpp b/src/mame/drivers/mainsnk.cpp index 6f869be918d..0436a7417af 100644 --- a/src/mame/drivers/mainsnk.cpp +++ b/src/mame/drivers/mainsnk.cpp @@ -118,7 +118,7 @@ cc_p14.j2 8192 0xedc6a1eb M5L2764k #include "speaker.h" -READ8_MEMBER(mainsnk_state::sound_ack_r) +uint8_t mainsnk_state::sound_ack_r() { m_audiocpu->set_input_line(0, CLEAR_LINE); return 0xff; diff --git a/src/mame/drivers/malzak.cpp b/src/mame/drivers/malzak.cpp index 4d5906f924d..89d77d050a0 100644 --- a/src/mame/drivers/malzak.cpp +++ b/src/mame/drivers/malzak.cpp @@ -79,12 +79,12 @@ #include -READ8_MEMBER(malzak_state::fake_VRLE_r) +uint8_t malzak_state::fake_VRLE_r() { return (m_s2636[0]->read_data(0xcb) & 0x3f) + (m_screen->vblank() ? 0x40 : 0x00); } -READ8_MEMBER(malzak_state::s2636_portA_r) +uint8_t malzak_state::s2636_portA_r() { // POT switch position, read from port A of the first S2636 // Not sure of the correct values to return, but these should @@ -147,13 +147,13 @@ void malzak_state::malzak2_map(address_map &map) } -READ8_MEMBER(malzak_state::s2650_data_r) +uint8_t malzak_state::s2650_data_r() { // popmessage("S2650 data port read"); return 0xff; } -WRITE8_MEMBER(malzak_state::port40_w) +void malzak_state::port40_w(uint8_t data) { // Bit 0 is constantly set high during gameplay // Bit 4 is set high, then low, upon death @@ -172,7 +172,7 @@ WRITE8_MEMBER(malzak_state::port40_w) } } -READ8_MEMBER(malzak_state::collision_r) +uint8_t malzak_state::collision_r() { // s2636 (0 only?) <-> tilemap collision detection // yyyy ---- y collision diff --git a/src/mame/drivers/markham.cpp b/src/mame/drivers/markham.cpp index 6bf26f788ad..efb4f7bd124 100644 --- a/src/mame/drivers/markham.cpp +++ b/src/mame/drivers/markham.cpp @@ -39,12 +39,12 @@ #define VBEND (16) #define VBSTART (240) -READ8_MEMBER(markham_state::markham_e004_r) +uint8_t markham_state::markham_e004_r() { return 0; } -WRITE8_MEMBER(markham_state::coin_output_w) +void markham_state::coin_output_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); @@ -61,7 +61,7 @@ WRITE8_MEMBER(markham_state::coin_output_w) } } -WRITE8_MEMBER(markham_state::flipscreen_w) +void markham_state::flipscreen_w(uint8_t data) { if (flip_screen() != (BIT(data, 0))) { @@ -72,17 +72,17 @@ WRITE8_MEMBER(markham_state::flipscreen_w) /****************************************************************************/ -READ8_MEMBER(markham_state::strnskil_d800_r) +uint8_t markham_state::strnskil_d800_r() { // bit0: interrupt type?, bit1: CPU2 busack? return (m_irq_source); } -WRITE8_MEMBER(markham_state::strnskil_master_output_w) +void markham_state::strnskil_master_output_w(uint8_t data) { m_scroll_ctrl = data >> 5; - flipscreen_w(space, 0, (data >> 3) & 1); + flipscreen_w((data >> 3) & 1); // bit 0: master CPU bus request? } @@ -103,7 +103,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(markham_state::strnskil_scanline) /****************************************************************************/ -READ8_MEMBER(markham_state::banbam_protection_r) +uint8_t markham_state::banbam_protection_r() { const uint8_t *prot_rom = (const uint8_t *)memregion("mcu_rom")->base(); @@ -155,7 +155,7 @@ READ8_MEMBER(markham_state::banbam_protection_r) return comm | arg; } -WRITE8_MEMBER(markham_state::banbam_protection_w) +void markham_state::banbam_protection_w(uint8_t data) { if (m_packet_write_pos) { @@ -176,7 +176,7 @@ WRITE8_MEMBER(markham_state::banbam_protection_w) logerror("packet buffer is: %02x %02x, status: %s \n", m_packet_buffer[0], m_packet_buffer[1], m_packet_reset ? "reset" : "active" ); } -WRITE8_MEMBER(markham_state::mcu_reset_w) +void markham_state::mcu_reset_w(uint8_t data) { // clear or assert? logerror("reset = %02x \n", data); diff --git a/src/mame/drivers/matmania.cpp b/src/mame/drivers/matmania.cpp index 6d8f8f0c62d..33014facc51 100644 --- a/src/mame/drivers/matmania.cpp +++ b/src/mame/drivers/matmania.cpp @@ -49,20 +49,20 @@ The driver has been updated accordingly. * *************************************/ -READ8_MEMBER(matmania_state::maniach_mcu_status_r) +uint8_t matmania_state::maniach_mcu_status_r() { return ((CLEAR_LINE == m_mcu->mcu_semaphore_r()) ? 0x01 : 0x00) | ((CLEAR_LINE == m_mcu->host_semaphore_r()) ? 0x02 : 0x00); } -WRITE8_MEMBER(matmania_state::matmania_sh_command_w) +void matmania_state::matmania_sh_command_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->set_input_line(M6502_IRQ_LINE, HOLD_LINE); } -WRITE8_MEMBER(matmania_state::maniach_sh_command_w) +void matmania_state::maniach_sh_command_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->set_input_line(M6809_IRQ_LINE, HOLD_LINE); diff --git a/src/mame/drivers/maygay1b.cpp b/src/mame/drivers/maygay1b.cpp index 1f1be5ee93d..8a23240cc84 100644 --- a/src/mame/drivers/maygay1b.cpp +++ b/src/mame/drivers/maygay1b.cpp @@ -115,7 +115,7 @@ WRITE_LINE_MEMBER(maygay1b_state::duart_irq_handler) } // FIRQ, related to the sample playback? -READ8_MEMBER( maygay1b_state::m1_firq_trg_r ) +uint8_t maygay1b_state::m1_firq_trg_r() { if (m_msm6376) { @@ -128,7 +128,7 @@ READ8_MEMBER( maygay1b_state::m1_firq_trg_r ) return 0xff; } -READ8_MEMBER( maygay1b_state::m1_firq_clr_r ) +uint8_t maygay1b_state::m1_firq_clr_r() { cpu0_firq(0); return 0xff; @@ -297,7 +297,7 @@ void maygay1b_state::machine_start() m_triacs.resolve(); } -WRITE8_MEMBER(maygay1b_state::reel12_w) +void maygay1b_state::reel12_w(uint8_t data) { m_reels[0]->update( data & 0x0F); m_reels[1]->update((data>>4) & 0x0F); @@ -306,7 +306,7 @@ WRITE8_MEMBER(maygay1b_state::reel12_w) awp_draw_reel(machine(),"reel2", *m_reels[1]); } -WRITE8_MEMBER(maygay1b_state::reel34_w) +void maygay1b_state::reel34_w(uint8_t data) { m_reels[2]->update( data & 0x0F); m_reels[3]->update((data>>4) & 0x0F); @@ -315,7 +315,7 @@ WRITE8_MEMBER(maygay1b_state::reel34_w) awp_draw_reel(machine(),"reel4", *m_reels[3]); } -WRITE8_MEMBER(maygay1b_state::reel56_w) +void maygay1b_state::reel56_w(uint8_t data) { m_reels[4]->update( data & 0x0F); m_reels[5]->update((data>>4) & 0x0F); @@ -382,14 +382,14 @@ WRITE_LINE_MEMBER(maygay1b_state::srsel_w) m_bank1->set_entry(state); } -WRITE8_MEMBER(maygay1b_state::latch_ch2_w) +void maygay1b_state::latch_ch2_w(uint8_t data) { m_msm6376->write(data&0x7f); m_msm6376->ch2_w(data&0x80); } //A strange setup this, the address lines are used to move st to the right level -READ8_MEMBER(maygay1b_state::latch_st_hi) +uint8_t maygay1b_state::latch_st_hi() { if (m_msm6376) { @@ -398,7 +398,7 @@ READ8_MEMBER(maygay1b_state::latch_st_hi) return 0xff; } -READ8_MEMBER(maygay1b_state::latch_st_lo) +uint8_t maygay1b_state::latch_st_lo() { if (m_msm6376) { @@ -407,7 +407,7 @@ READ8_MEMBER(maygay1b_state::latch_st_lo) return 0xff; } -READ8_MEMBER(maygay1b_state::m1_meter_r) +uint8_t maygay1b_state::m1_meter_r() { //TODO: Can we just return the AY port A data? return m_meter; @@ -473,7 +473,7 @@ void maygay1b_state::m1_memmap(address_map &map) * NEC uPD7759 handling (used as OKI replacement) * *************************************************/ -READ8_MEMBER(maygay1b_state::m1_firq_nec_r) +uint8_t maygay1b_state::m1_firq_nec_r() { int busy = m_upd7759->busy_r(); if (!busy) @@ -483,14 +483,14 @@ READ8_MEMBER(maygay1b_state::m1_firq_nec_r) return 0xff; } -READ8_MEMBER(maygay1b_state::nec_reset_r) +uint8_t maygay1b_state::nec_reset_r() { m_upd7759->reset_w(0); m_upd7759->reset_w(1); return 0xff; } -WRITE8_MEMBER(maygay1b_state::nec_bank0_w) +void maygay1b_state::nec_bank0_w(uint8_t data) { m_upd7759->set_rom_bank(0); m_upd7759->port_w(data); @@ -498,7 +498,7 @@ WRITE8_MEMBER(maygay1b_state::nec_bank0_w) m_upd7759->start_w(1); } -WRITE8_MEMBER(maygay1b_state::nec_bank1_w) +void maygay1b_state::nec_bank1_w(uint8_t data) { m_upd7759->set_rom_bank(1); m_upd7759->port_w(data); @@ -610,7 +610,7 @@ void maygay1b_state::lamp_data_2_w(uint8_t data) // MCU hookup not yet working -WRITE8_MEMBER(maygay1b_state::main_to_mcu_0_w) +void maygay1b_state::main_to_mcu_0_w(uint8_t data) { // we trigger the 2nd, more complex interrupt on writes here @@ -619,7 +619,7 @@ WRITE8_MEMBER(maygay1b_state::main_to_mcu_0_w) } -WRITE8_MEMBER(maygay1b_state::main_to_mcu_1_w) +void maygay1b_state::main_to_mcu_1_w(uint8_t data) { // we trigger the 1st interrupt on writes here // the 1st interrupt (03h) is a very simple one @@ -805,7 +805,7 @@ void maygay1b_state::maygay_m1_nec(machine_config &config) m_upd7759->add_route(ALL_OUTPUTS, "rspeaker", 1.0); } -WRITE8_MEMBER(maygay1b_state::m1ab_no_oki_w) +void maygay1b_state::m1ab_no_oki_w(uint8_t data) { popmessage("write to OKI, but no OKI rom"); } @@ -858,6 +858,6 @@ void maygay1b_state::init_m1() // if there is no OKI region disable writes here, the rom might be missing, so alert user if (m_oki_region == nullptr) { - m_maincpu->space(AS_PROGRAM).install_write_handler(0x2420, 0x2421, write8_delegate(*this, FUNC(maygay1b_state::m1ab_no_oki_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x2420, 0x2421, write8smo_delegate(*this, FUNC(maygay1b_state::m1ab_no_oki_w))); } } diff --git a/src/mame/drivers/meadows.cpp b/src/mame/drivers/meadows.cpp index afc8c0fc236..45c3590337f 100644 --- a/src/mame/drivers/meadows.cpp +++ b/src/mame/drivers/meadows.cpp @@ -138,21 +138,21 @@ * *************************************/ -READ8_MEMBER(meadows_state::hsync_chain_r) +uint8_t meadows_state::hsync_chain_r() { uint8_t val = m_screen->hpos(); return bitswap<8>(val,0,1,2,3,4,5,6,7); } -READ8_MEMBER(meadows_state::vsync_chain_hi_r) +uint8_t meadows_state::vsync_chain_hi_r() { uint8_t val = m_screen->vpos(); return ((val >> 1) & 0x08) | ((val >> 3) & 0x04) | ((val >> 5) & 0x02) | (val >> 7); } -READ8_MEMBER(meadows_state::vsync_chain_lo_r) +uint8_t meadows_state::vsync_chain_lo_r() { uint8_t val = m_screen->vpos(); return val & 0x0f; @@ -166,7 +166,7 @@ READ8_MEMBER(meadows_state::vsync_chain_lo_r) * *************************************/ -WRITE8_MEMBER(meadows_state::meadows_audio_w) +void meadows_state::meadows_audio_w(offs_t offset, uint8_t data) { switch (offset) { @@ -247,7 +247,7 @@ WRITE_LINE_MEMBER(meadows_state::minferno_vblank_irq) * *************************************/ -WRITE8_MEMBER(meadows_state::audio_hardware_w) +void meadows_state::audio_hardware_w(offs_t offset, uint8_t data) { switch (offset & 3) { @@ -289,7 +289,7 @@ WRITE8_MEMBER(meadows_state::audio_hardware_w) * *************************************/ -READ8_MEMBER(meadows_state::audio_hardware_r) +uint8_t meadows_state::audio_hardware_r(offs_t offset) { int data = 0; diff --git a/src/mame/drivers/megasys1.cpp b/src/mame/drivers/megasys1.cpp index 163c0395f5b..26f77917ac7 100644 --- a/src/mame/drivers/megasys1.cpp +++ b/src/mame/drivers/megasys1.cpp @@ -496,7 +496,7 @@ WRITE_LINE_MEMBER(megasys1_state::sound_irq) } template -READ8_MEMBER(megasys1_state::oki_status_r) +u8 megasys1_state::oki_status_r() { if (m_ignore_oki_status == 1) return 0; diff --git a/src/mame/drivers/mermaid.cpp b/src/mame/drivers/mermaid.cpp index f213e883de8..b8fff594330 100644 --- a/src/mame/drivers/mermaid.cpp +++ b/src/mame/drivers/mermaid.cpp @@ -126,13 +126,13 @@ Stephh's notes (based on the games Z80 code and some tests) : /* Read/Write Handlers */ -WRITE8_MEMBER(mermaid_state::mermaid_ay8910_write_port_w) +void mermaid_state::mermaid_ay8910_write_port_w(uint8_t data) { if (m_ay8910_enable[0]) m_ay8910[0]->data_w(data); if (m_ay8910_enable[1]) m_ay8910[1]->data_w(data); } -WRITE8_MEMBER(mermaid_state::mermaid_ay8910_control_port_w) +void mermaid_state::mermaid_ay8910_control_port_w(uint8_t data) { if (m_ay8910_enable[0]) m_ay8910[0]->address_w(data); if (m_ay8910_enable[1]) m_ay8910[1]->address_w(data); diff --git a/src/mame/drivers/metlclsh.cpp b/src/mame/drivers/metlclsh.cpp index a997313976e..f2d831a0e43 100644 --- a/src/mame/drivers/metlclsh.cpp +++ b/src/mame/drivers/metlclsh.cpp @@ -49,12 +49,12 @@ metlclsh: ***************************************************************************/ -WRITE8_MEMBER(metlclsh_state::metlclsh_cause_irq) +void metlclsh_state::metlclsh_cause_irq(uint8_t data) { m_subcpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } -WRITE8_MEMBER(metlclsh_state::metlclsh_ack_nmi) +void metlclsh_state::metlclsh_ack_nmi(uint8_t data) { m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } @@ -87,22 +87,22 @@ void metlclsh_state::metlclsh_master_map(address_map &map) ***************************************************************************/ -WRITE8_MEMBER(metlclsh_state::metlclsh_cause_nmi2) +void metlclsh_state::metlclsh_cause_nmi2(uint8_t data) { m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } -WRITE8_MEMBER(metlclsh_state::metlclsh_ack_irq2) +void metlclsh_state::metlclsh_ack_irq2(uint8_t data) { m_subcpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); } -WRITE8_MEMBER(metlclsh_state::metlclsh_ack_nmi2) +void metlclsh_state::metlclsh_ack_nmi2(uint8_t data) { m_subcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -WRITE8_MEMBER(metlclsh_state::metlclsh_flipscreen_w) +void metlclsh_state::metlclsh_flipscreen_w(uint8_t data) { flip_screen_set(data & 1); } diff --git a/src/mame/drivers/metro.cpp b/src/mame/drivers/metro.cpp index d825f683a02..06902083e85 100644 --- a/src/mame/drivers/metro.cpp +++ b/src/mame/drivers/metro.cpp @@ -133,7 +133,7 @@ u8 metro_state::irq_cause_r(offs_t offset) */ - uint8_t res = 0; + u8 res = 0; for (int i = 0; i < 8; i++) res |= (m_requested_int[i] << i); @@ -145,12 +145,12 @@ u8 metro_state::irq_cause_r(offs_t offset) void metro_state::update_irq_state() { /* Get the pending IRQs (only the enabled ones, e.g. where irq_enable is *0*) */ - uint8_t irq = irq_cause_r(0) & ~*m_irq_enable; + u8 irq = irq_cause_r(0) & ~*m_irq_enable; if (m_irq_line == -1) /* mouja, gakusai, gakusai2, dokyusei, dokyusp */ { /* This is for games that supply an *IRQ Vector* on the data bus together with an IRQ level for each possible IRQ source */ - uint8_t irq_level[8] = { 0 }; + u8 irq_level[8] = { 0 }; int i; for (i = 0; i < 8; i++) @@ -172,7 +172,7 @@ void metro_state::update_irq_state() /* For games that supply an *IRQ Vector* on the data bus */ -uint8_t metro_state::irq_vector_r(offs_t offset) +u8 metro_state::irq_vector_r(offs_t offset) { // logerror("%s: irq callback returns %04X\n", machine().describe_context(), m_irq_vectors[offset]); return m_irq_vectors[offset] & 0xff; @@ -301,7 +301,7 @@ WRITE_LINE_MEMBER(metro_state::puzzlet_vblank_irq) READ_LINE_MEMBER(metro_state::rxd_r) { - uint8_t data = m_sound_data; + u8 data = m_sound_data; // TODO: shift on SCK falling edges m_sound_data >>= 1; @@ -310,7 +310,7 @@ READ_LINE_MEMBER(metro_state::rxd_r) } -WRITE8_MEMBER(metro_state::sound_data_w) +void metro_state::sound_data_w(u8 data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(metro_state::sound_data_sync), this), data); m_audiocpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); // seen rxd_r @@ -323,7 +323,7 @@ TIMER_CALLBACK_MEMBER(metro_state::sound_data_sync) } -READ8_MEMBER(metro_state::soundstatus_r) +u8 metro_state::soundstatus_r() { return (m_busy_sndcpu ? 0x00 : 0x01); } @@ -333,29 +333,29 @@ READ_LINE_MEMBER(metro_state::custom_soundstatus_r) return (m_busy_sndcpu ? 1 : 0); } -WRITE8_MEMBER(metro_state::soundstatus_w) +void metro_state::soundstatus_w(u8 data) { m_soundstatus = data & 0x01; } template -void metro_state::upd7810_rombank_w(uint8_t data) +void metro_state::upd7810_rombank_w(u8 data) { m_audiobank->set_entry((data >> 4) & Mask); } -uint8_t metro_state::upd7810_porta_r() +u8 metro_state::upd7810_porta_r() { return m_porta; } -void metro_state::upd7810_porta_w(uint8_t data) +void metro_state::upd7810_porta_w(u8 data) { m_porta = data; } -void metro_state::upd7810_portb_w(uint8_t data) +void metro_state::upd7810_portb_w(u8 data) { /* port B layout: 7 !clock latch for message to main CPU @@ -404,7 +404,7 @@ void metro_state::upd7810_portb_w(uint8_t data) } -void metro_state::daitorid_portb_w(uint8_t data) +void metro_state::daitorid_portb_w(u8 data) { /* port B layout: 7 !clock latch for message to main CPU @@ -468,7 +468,7 @@ void metro_state::daitorid_portb_w(uint8_t data) ***************************************************************************/ -WRITE8_MEMBER(metro_state::coin_lockout_1word_w) +void metro_state::coin_lockout_1word_w(u8 data) { machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); machine().bookkeeping().coin_counter_w(1, BIT(data, 1)); @@ -800,13 +800,13 @@ void metro_state::gakusai_oki_bank_set() m_oki->set_rom_bank(bank); } -WRITE8_MEMBER(metro_state::gakusai_oki_bank_hi_w) +void metro_state::gakusai_oki_bank_hi_w(u8 data) { m_gakusai_oki_bank_hi = data; gakusai_oki_bank_set(); } -WRITE8_MEMBER(metro_state::gakusai_oki_bank_lo_w) +void metro_state::gakusai_oki_bank_lo_w(u8 data) { m_gakusai_oki_bank_lo = data; gakusai_oki_bank_set(); @@ -825,12 +825,12 @@ uint16_t metro_state::gakusai_input_r() return 0xffff; } -READ8_MEMBER(metro_state::gakusai_eeprom_r) +u8 metro_state::gakusai_eeprom_r() { return m_eeprom->do_read() & 1; } -WRITE8_MEMBER(metro_state::gakusai_eeprom_w) +void metro_state::gakusai_eeprom_w(u8 data) { // latch the bit m_eeprom->di_write(BIT(data, 0)); @@ -894,7 +894,7 @@ void metro_state::gakusai2_map(address_map &map) Mahjong Doukyuusei Special ***************************************************************************/ -READ8_MEMBER(metro_state::dokyusp_eeprom_r) +u8 metro_state::dokyusp_eeprom_r() { // clock line asserted: write latch or select next bit to read m_eeprom->clk_write(CLEAR_LINE); @@ -903,7 +903,7 @@ READ8_MEMBER(metro_state::dokyusp_eeprom_r) return m_eeprom->do_read() & 1; } -WRITE8_MEMBER(metro_state::dokyusp_eeprom_bit_w) +void metro_state::dokyusp_eeprom_bit_w(u8 data) { // latch the bit m_eeprom->di_write(BIT(data, 0)); @@ -913,7 +913,7 @@ WRITE8_MEMBER(metro_state::dokyusp_eeprom_bit_w) m_eeprom->clk_write(ASSERT_LINE); } -WRITE8_MEMBER(metro_state::dokyusp_eeprom_reset_w) +void metro_state::dokyusp_eeprom_reset_w(u8 data) { // reset line asserted: reset. m_eeprom->cs_write(BIT(data, 0) ? ASSERT_LINE : CLEAR_LINE); @@ -1084,7 +1084,7 @@ void metro_state::toride2g_map(address_map &map) Blazing Tornado ***************************************************************************/ -WRITE8_MEMBER(metro_state::blzntrnd_sh_bankswitch_w) +void metro_state::blzntrnd_sh_bankswitch_w(u8 data) { m_audiobank->set_entry(data & 0x07); } @@ -1129,7 +1129,7 @@ void metro_state::blzntrnd_map(address_map &map) Mouja ***************************************************************************/ -WRITE8_MEMBER(metro_state::mouja_sound_rombank_w) +void metro_state::mouja_sound_rombank_w(u8 data) { m_okibank->set_entry((data >> 3) & 0x07); } @@ -1183,7 +1183,7 @@ private: required_ioport port; int ce, clk; int cur_bit; - uint8_t value; + u8 value; }; DEFINE_DEVICE_TYPE(PUZZLET_IO, puzzlet_io_device, "puzzlet_io", "Puzzlet Coin/Start I/O") @@ -1286,7 +1286,7 @@ void metro_state::puzzlet_io_map(address_map &map) Varia Metal ***************************************************************************/ -WRITE8_MEMBER(metro_state::vmetal_control_w) +void metro_state::vmetal_control_w(u8 data) { /* Lower nibble is the coin control bits shown in service mode, but in game mode they're different */ @@ -1310,7 +1310,7 @@ WRITE8_MEMBER(metro_state::vmetal_control_w) logerror("%s: Writing unknown bits %04x to $200000\n",machine().describe_context(),data); } -WRITE8_MEMBER(metro_state::es8712_reset_w) +void metro_state::es8712_reset_w(u8 data) { m_essnd->reset(); } @@ -5591,7 +5591,7 @@ void metro_state::init_karatour() /* Unscramble the GFX ROMs */ void metro_state::init_balcube() { - uint8_t *ROM = memregion("vdp2")->base(); + u8 *ROM = memregion("vdp2")->base(); const unsigned len = memregion("vdp2")->bytes(); for (unsigned i = 0; i < len; i+=2) @@ -5606,10 +5606,10 @@ void metro_state::init_balcube() void metro_state::init_dharmak() { - uint8_t *src = memregion("vdp2")->base(); + u8 *src = memregion("vdp2")->base(); for (int i = 0; i < 0x200000; i += 4) { - uint8_t dat = src[i + 1]; + u8 dat = src[i + 1]; dat = bitswap<8>(dat, 7,3,2,4, 5,6,1,0); src[i + 1] = dat; diff --git a/src/mame/drivers/mhavoc.cpp b/src/mame/drivers/mhavoc.cpp index d9b698b3fa9..67a56707cb2 100644 --- a/src/mame/drivers/mhavoc.cpp +++ b/src/mame/drivers/mhavoc.cpp @@ -207,7 +207,7 @@ Address: 543210 |\----- pokey chip number MSB \------ pokey A3 */ -READ8_MEMBER(mhavoc_state::quad_pokeyn_r) +uint8_t mhavoc_state::quad_pokeyn_r(offs_t offset) { int pokey_num = (offset >> 3) & ~0x04; int control = (offset & 0x20) >> 2; @@ -216,7 +216,7 @@ READ8_MEMBER(mhavoc_state::quad_pokeyn_r) return m_pokey[pokey_num]->read(pokey_reg); } -WRITE8_MEMBER(mhavoc_state::quad_pokeyn_w) +void mhavoc_state::quad_pokeyn_w(offs_t offset, uint8_t data) { int pokey_num = (offset >> 3) & ~0x04; int control = (offset & 0x20) >> 2; @@ -239,7 +239,7 @@ Address: 43210 |\---- pokey chip number \----- pokey A3 */ -READ8_MEMBER(mhavoc_state::dual_pokey_r) +uint8_t mhavoc_state::dual_pokey_r(offs_t offset) { int pokey_num = (offset >> 3) & 0x01; int control = (offset & 0x10) >> 1; @@ -249,7 +249,7 @@ READ8_MEMBER(mhavoc_state::dual_pokey_r) } -WRITE8_MEMBER(mhavoc_state::dual_pokey_w) +void mhavoc_state::dual_pokey_w(offs_t offset, uint8_t data) { int pokey_num = (offset >> 3) & 0x01; int control = (offset & 0x10) >> 1; diff --git a/src/mame/drivers/micronic.cpp b/src/mame/drivers/micronic.cpp index 80789ee722a..3f93808ee0d 100644 --- a/src/mame/drivers/micronic.cpp +++ b/src/mame/drivers/micronic.cpp @@ -118,7 +118,7 @@ #include "speaker.h" -READ8_MEMBER( micronic_state::keypad_r ) +uint8_t micronic_state::keypad_r() { uint8_t data = 0; @@ -137,22 +137,22 @@ READ8_MEMBER( micronic_state::keypad_r ) return data; } -READ8_MEMBER( micronic_state::status_flag_r ) +uint8_t micronic_state::status_flag_r() { return m_status_flag; } -WRITE8_MEMBER( micronic_state::status_flag_w ) +void micronic_state::status_flag_w(uint8_t data) { m_status_flag = data; } -WRITE8_MEMBER( micronic_state::kp_matrix_w ) +void micronic_state::kp_matrix_w(uint8_t data) { m_kp_matrix = data; } -WRITE8_MEMBER( micronic_state::beep_w ) +void micronic_state::beep_w(uint8_t data) { uint16_t frequency[16] = { @@ -164,12 +164,12 @@ WRITE8_MEMBER( micronic_state::beep_w ) m_beep->set_state((data & 0x0f) ? 1 : 0); } -READ8_MEMBER( micronic_state::irq_flag_r ) +uint8_t micronic_state::irq_flag_r() { - return (m_backbattery->read()<<4) | (m_mainbattery->read()<<3) | (keypad_r(space, offset) ? 0 : 1); + return (m_backbattery->read()<<4) | (m_mainbattery->read()<<3) | (keypad_r() ? 0 : 1); } -WRITE8_MEMBER( micronic_state::bank_select_w ) +void micronic_state::bank_select_w(uint8_t data) { if (data < 2) { @@ -183,12 +183,12 @@ WRITE8_MEMBER( micronic_state::bank_select_w ) } } -WRITE8_MEMBER( micronic_state::lcd_contrast_w ) +void micronic_state::lcd_contrast_w(uint8_t data) { m_lcd_contrast = data; } -WRITE8_MEMBER( micronic_state::port_2c_w ) +void micronic_state::port_2c_w(uint8_t data) { m_lcd_backlight = BIT(data, 4); } @@ -198,17 +198,17 @@ WRITE8_MEMBER( micronic_state::port_2c_w ) RTC-146818 ***************************************************************************/ -WRITE8_MEMBER( micronic_state::rtc_address_w ) +void micronic_state::rtc_address_w(uint8_t data) { m_rtc->write(0, data); } -READ8_MEMBER( micronic_state::rtc_data_r ) +uint8_t micronic_state::rtc_data_r() { return m_rtc->read(1); } -WRITE8_MEMBER( micronic_state::rtc_data_w ) +void micronic_state::rtc_data_w(uint8_t data) { m_rtc->write(1, data); } diff --git a/src/mame/drivers/mikie.cpp b/src/mame/drivers/mikie.cpp index 0ea82a43983..807df8b5e9f 100644 --- a/src/mame/drivers/mikie.cpp +++ b/src/mame/drivers/mikie.cpp @@ -66,7 +66,7 @@ Stephh's notes (based on the games M6809 code and some tests) : * *************************************/ -READ8_MEMBER(mikie_state::mikie_sh_timer_r) +uint8_t mikie_state::mikie_sh_timer_r() { int clock = m_audiocpu->total_cycles() / MIKIE_TIMER_RATE; diff --git a/src/mame/drivers/mitchell.cpp b/src/mame/drivers/mitchell.cpp index 656956d18b1..7e777665602 100644 --- a/src/mame/drivers/mitchell.cpp +++ b/src/mame/drivers/mitchell.cpp @@ -136,7 +136,7 @@ mw-9.rom = ST M27C1001 / GFX * *************************************/ -READ8_MEMBER(mitchell_state::pang_port5_r) +uint8_t mitchell_state::pang_port5_r() { /* bits 0 and (sometimes) 3 are checked in the interrupt handler. bit 3 is checked before updating the palette so it really seems to be vblank. @@ -148,17 +148,17 @@ READ8_MEMBER(mitchell_state::pang_port5_r) return (ioport("SYS0")->read() & 0xfe) | (m_irq_source & 1); } -WRITE8_MEMBER(mitchell_state::eeprom_cs_w) +void mitchell_state::eeprom_cs_w(uint8_t data) { m_eeprom->cs_write(data ? ASSERT_LINE : CLEAR_LINE); } -WRITE8_MEMBER(mitchell_state::eeprom_clock_w) +void mitchell_state::eeprom_clock_w(uint8_t data) { m_eeprom->clk_write(data ? ASSERT_LINE : CLEAR_LINE); } -WRITE8_MEMBER(mitchell_state::eeprom_serial_w) +void mitchell_state::eeprom_serial_w(uint8_t data) { m_eeprom->di_write(data & 1); } @@ -170,7 +170,7 @@ WRITE8_MEMBER(mitchell_state::eeprom_serial_w) * *************************************/ -WRITE8_MEMBER(mitchell_state::pang_bankswitch_w) +void mitchell_state::pang_bankswitch_w(uint8_t data) { m_bank1->set_entry(data & 0x0f); if(m_bank1d) @@ -183,7 +183,7 @@ WRITE8_MEMBER(mitchell_state::pang_bankswitch_w) * *************************************/ -READ8_MEMBER(mitchell_state::block_input_r) +uint8_t mitchell_state::block_input_r(offs_t offset) { static const char *const dialnames[] = { "DIAL1", "DIAL2" }; static const char *const portnames[] = { "IN1", "IN2" }; @@ -227,7 +227,7 @@ READ8_MEMBER(mitchell_state::block_input_r) } } -WRITE8_MEMBER(mitchell_state::block_dial_control_w) +void mitchell_state::block_dial_control_w(uint8_t data) { if (data == 0x08) { @@ -242,7 +242,7 @@ WRITE8_MEMBER(mitchell_state::block_dial_control_w) } -READ8_MEMBER(mitchell_state::mahjong_input_r) +uint8_t mitchell_state::mahjong_input_r(offs_t offset) { int i; static const char *const keynames[2][5] = @@ -260,13 +260,13 @@ READ8_MEMBER(mitchell_state::mahjong_input_r) return 0xff; } -WRITE8_MEMBER(mitchell_state::mahjong_input_select_w) +void mitchell_state::mahjong_input_select_w(uint8_t data) { m_keymatrix = data; } -READ8_MEMBER(mitchell_state::input_r) +uint8_t mitchell_state::input_r(offs_t offset) { static const char *const portnames[] = { "IN0", "IN1", "IN2" }; @@ -277,12 +277,12 @@ READ8_MEMBER(mitchell_state::input_r) return ioport(portnames[offset])->read(); case 1: /* Mahjong games */ if (offset) - return mahjong_input_r(space, offset - 1); + return mahjong_input_r(offset - 1); else return ioport("IN0")->read(); case 2: /* Block Block - dial control */ if (offset) - return block_input_r(space, offset - 1); + return block_input_r(offset - 1); else return ioport("IN0")->read(); case 3: /* Super Pang - simulate START 1 press to initialize EEPROM */ @@ -291,7 +291,7 @@ READ8_MEMBER(mitchell_state::input_r) } -WRITE8_MEMBER(mitchell_state::input_w) +void mitchell_state::input_w(uint8_t data) { switch (m_input_type) { @@ -300,10 +300,10 @@ WRITE8_MEMBER(mitchell_state::input_w) logerror("PC %04x: write %02x to port 01\n", m_maincpu->pc(), data); break; case 1: - mahjong_input_select_w(space, offset, data); + mahjong_input_select_w(data); break; case 2: - block_dial_control_w(space, offset, data); + block_dial_control_w(data); break; } } @@ -386,7 +386,7 @@ void mitchell_state::spangbl_io_map(address_map &map) map(0x18, 0x18).w(FUNC(mitchell_state::eeprom_serial_w)); } -WRITE8_MEMBER(mitchell_state::sound_bankswitch_w) +void mitchell_state::sound_bankswitch_w(uint8_t data) { m_msm->reset_w(BIT(data, 3)); @@ -417,7 +417,7 @@ void mitchell_state::pangba_sound_map(address_map &map) /**** Monsters World ****/ -WRITE8_MEMBER(mitchell_state::oki_banking_w) +void mitchell_state::oki_banking_w(uint8_t data) { m_oki->set_rom_bank(data & 3); } @@ -431,7 +431,7 @@ void mitchell_state::mstworld_sound_map(address_map &map) map(0xa000, 0xa000).r(m_soundlatch, FUNC(generic_latch_8_device::read)); } -WRITE8_MEMBER(mitchell_state::mstworld_sound_w) +void mitchell_state::mstworld_sound_w(uint8_t data) { m_soundlatch->write(data); m_audiocpu->set_input_line(0, HOLD_LINE); diff --git a/src/mame/drivers/mjkjidai.cpp b/src/mame/drivers/mjkjidai.cpp index 9d7821eb376..5764af851a7 100644 --- a/src/mame/drivers/mjkjidai.cpp +++ b/src/mame/drivers/mjkjidai.cpp @@ -32,7 +32,7 @@ TODO: #include "speaker.h" -WRITE8_MEMBER(mjkjidai_state::adpcm_w) +void mjkjidai_state::adpcm_w(uint8_t data) { m_adpcm_pos = (data & 0x07) * 0x1000 * 2; m_adpcm_end = m_adpcm_pos + 0x1000 * 2; diff --git a/src/mame/drivers/model1.cpp b/src/mame/drivers/model1.cpp index 35131d00c06..4a3244a53b5 100644 --- a/src/mame/drivers/model1.cpp +++ b/src/mame/drivers/model1.cpp @@ -606,7 +606,7 @@ Notes: // and writes the data to the dual port RAM. This isn't // emulated yet, data just gets written to RAM. -READ8_MEMBER( model1_state::dpram_r ) +u8 model1_state::dpram_r(offs_t offset) { // insert waitstate m_maincpu->adjust_icount(-1); @@ -808,7 +808,7 @@ IRQ_CALLBACK_MEMBER(model1_state::irq_callback) return m_last_irq; } -WRITE8_MEMBER(model1_state::irq_control_w) +void model1_state::irq_control_w(u8 data) { switch (data) { diff --git a/src/mame/drivers/model2.cpp b/src/mame/drivers/model2.cpp index bcb23c84f00..6db0d7f16f2 100644 --- a/src/mame/drivers/model2.cpp +++ b/src/mame/drivers/model2.cpp @@ -1095,7 +1095,7 @@ void model2_state::lumaram_w(offs_t offset, u16 data, u16 mem_mask) } /* Top Skater reads here and discards the result */ -READ8_MEMBER(model2_state::tgpid_r) +u8 model2_state::tgpid_r(offs_t offset) { unsigned char ID[]={0,'T','A','H',0,'A','K','O',0,'Z','A','K',0,'M','T','K'}; @@ -1365,7 +1365,7 @@ void model2o_maxx_state::model2o_maxx_mem(address_map &map) map(0x00240000, 0x0024ffff).r(FUNC(model2o_maxx_state::maxx_r)); } -READ8_MEMBER(model2o_gtx_state::gtx_r) +u8 model2o_gtx_state::gtx_r(offs_t offset) { u8 *ROM = memregion("prot_data")->base(); diff --git a/src/mame/drivers/model3.cpp b/src/mame/drivers/model3.cpp index 2aec64eff35..6a918a1a3b0 100644 --- a/src/mame/drivers/model3.cpp +++ b/src/mame/drivers/model3.cpp @@ -1617,7 +1617,7 @@ uint64_t model3_state::real3d_status_r(offs_t offset) } /* SCSP interface */ -READ8_MEMBER(model3_state::model3_sound_r) +uint8_t model3_state::model3_sound_r(offs_t offset) { switch (offset) { @@ -1643,7 +1643,7 @@ READ8_MEMBER(model3_state::model3_sound_r) return 0; } -WRITE8_MEMBER(model3_state::model3_sound_w) +void model3_state::model3_sound_w(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/mame/drivers/moo.cpp b/src/mame/drivers/moo.cpp index 48be07987a2..1172ba131d3 100644 --- a/src/mame/drivers/moo.cpp +++ b/src/mame/drivers/moo.cpp @@ -226,7 +226,7 @@ void moo_state::sound_irq_w(uint16_t data) m_soundcpu->set_input_line(0, HOLD_LINE); } -WRITE8_MEMBER(moo_state::sound_bankswitch_w) +void moo_state::sound_bankswitch_w(uint8_t data) { membank("bank1")->set_base(memregion("soundcpu")->base() + 0x10000 + (data&0xf)*0x4000); } diff --git a/src/mame/drivers/mosaic.cpp b/src/mame/drivers/mosaic.cpp index 6668145c9b3..2a1a350215d 100644 --- a/src/mame/drivers/mosaic.cpp +++ b/src/mame/drivers/mosaic.cpp @@ -52,7 +52,7 @@ NOTE: PIC16C5x protection chip at 5A (UC02 as silkscreened on PCB) #include "speaker.h" -WRITE8_MEMBER(mosaic_state::protection_w) // TODO: hook up PIC dump and remove this simulation (PIC dump contains the exact values in this jumptable) +void mosaic_state::protection_w(uint8_t data) // TODO: hook up PIC dump and remove this simulation (PIC dump contains the exact values in this jumptable) { if (!BIT(data, 7)) { @@ -76,7 +76,7 @@ WRITE8_MEMBER(mosaic_state::protection_w) // TODO: hook up PIC dump and remove t } } -READ8_MEMBER(mosaic_state::protection_r) +uint8_t mosaic_state::protection_r() { int res = (m_prot_val >> 8) & 0xff; @@ -87,7 +87,7 @@ READ8_MEMBER(mosaic_state::protection_r) return res; } -WRITE8_MEMBER(mosaic_state::gfire2_protection_w) +void mosaic_state::gfire2_protection_w(uint8_t data) { logerror("%06x: protection_w %02x\n", m_maincpu->pc(), data); @@ -114,7 +114,7 @@ WRITE8_MEMBER(mosaic_state::gfire2_protection_w) } } -READ8_MEMBER(mosaic_state::gfire2_protection_r) +uint8_t mosaic_state::gfire2_protection_r() { int res = m_prot_val & 0xff; diff --git a/src/mame/drivers/mouser.cpp b/src/mame/drivers/mouser.cpp index cde0dabd118..81758f94b73 100644 --- a/src/mame/drivers/mouser.cpp +++ b/src/mame/drivers/mouser.cpp @@ -42,7 +42,7 @@ WRITE_LINE_MEMBER(mouser_state::mouser_nmi_interrupt) /* Sound CPU interrupted on write */ -WRITE8_MEMBER(mouser_state::mouser_sound_nmi_clear_w) +void mouser_state::mouser_sound_nmi_clear_w(uint8_t data) { m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } diff --git a/src/mame/drivers/mpz80.cpp b/src/mame/drivers/mpz80.cpp index 344a1f14e7f..c871167bd62 100644 --- a/src/mame/drivers/mpz80.cpp +++ b/src/mame/drivers/mpz80.cpp @@ -163,7 +163,7 @@ inline offs_t mpz80_state::get_address(offs_t offset) // mmu_r - //------------------------------------------------- -READ8_MEMBER( mpz80_state::mmu_r ) +uint8_t mpz80_state::mmu_r(offs_t offset) { if (m_trap && offset >= m_trap_start && offset <= m_trap_start + 0xf) return m_rom->base()[0x3f0 | (m_trap_reset << 10) | (offset - m_trap_start)]; @@ -189,19 +189,19 @@ READ8_MEMBER( mpz80_state::mmu_r ) } else if (offset == 0x400) { - data = trap_addr_r(space, 0); + data = trap_addr_r(); } else if (offset == 0x401) { - data = keyboard_r(space, 0); + data = keyboard_r(); } else if (offset == 0x402) { - data = switch_r(space, 0); + data = switch_r(); } else if (offset == 0x403) { - data = status_r(space, 0); + data = status_r(); } else if (offset >= 0x600 && offset < 0x800) { @@ -230,7 +230,7 @@ READ8_MEMBER( mpz80_state::mmu_r ) // mmu_w - //------------------------------------------------- -WRITE8_MEMBER( mpz80_state::mmu_w ) +void mpz80_state::mmu_w(offs_t offset, uint8_t data) { m_addr = get_address(offset); @@ -242,19 +242,19 @@ WRITE8_MEMBER( mpz80_state::mmu_w ) } else if (offset == 0x400) { - disp_seg_w(space, 0, data); + disp_seg_w(data); } else if (offset == 0x401) { - disp_col_w(space, 0, data); + disp_col_w(data); } else if (offset == 0x402) { - task_w(space, 0, data); + task_w(data); } else if (offset == 0x403) { - mask_w(space, 0, data); + mask_w(data); } else if (offset >= 0x600 && offset < 0x800) { @@ -292,7 +292,7 @@ inline offs_t mpz80_state::get_io_address(offs_t offset) // mmu_io_r - //------------------------------------------------- -READ8_MEMBER( mpz80_state::mmu_io_r ) +uint8_t mpz80_state::mmu_io_r(offs_t offset) { return m_s100->sinp_r(get_io_address(offset)); } @@ -302,7 +302,7 @@ READ8_MEMBER( mpz80_state::mmu_io_r ) // mmu_io_w - //------------------------------------------------- -WRITE8_MEMBER( mpz80_state::mmu_io_w ) +void mpz80_state::mmu_io_w(offs_t offset, uint8_t data) { m_s100->sout_w(get_io_address(offset), data); } @@ -312,7 +312,7 @@ WRITE8_MEMBER( mpz80_state::mmu_io_w ) // trap_addr_r - trap address register //------------------------------------------------- -READ8_MEMBER( mpz80_state::trap_addr_r ) +uint8_t mpz80_state::trap_addr_r() { /* @@ -337,7 +337,7 @@ READ8_MEMBER( mpz80_state::trap_addr_r ) // status_r - trap status register //------------------------------------------------- -READ8_MEMBER( mpz80_state::status_r ) +uint8_t mpz80_state::status_r() { /* @@ -362,7 +362,7 @@ READ8_MEMBER( mpz80_state::status_r ) // task_w - task register //------------------------------------------------- -WRITE8_MEMBER( mpz80_state::task_w ) +void mpz80_state::task_w(uint8_t data) { /* @@ -390,7 +390,7 @@ WRITE8_MEMBER( mpz80_state::task_w ) // mask_w - mask register //------------------------------------------------- -WRITE8_MEMBER( mpz80_state::mask_w ) +void mpz80_state::mask_w(uint8_t data) { /* @@ -420,7 +420,7 @@ WRITE8_MEMBER( mpz80_state::mask_w ) // keyboard_r - front panel keyboard //------------------------------------------------- -READ8_MEMBER( mpz80_state::keyboard_r ) +uint8_t mpz80_state::keyboard_r() { /* @@ -445,7 +445,7 @@ READ8_MEMBER( mpz80_state::keyboard_r ) // switch_r - switch register //------------------------------------------------- -READ8_MEMBER( mpz80_state::switch_r ) +uint8_t mpz80_state::switch_r() { /* @@ -481,7 +481,7 @@ READ8_MEMBER( mpz80_state::switch_r ) // disp_seg_w - front panel segment //------------------------------------------------- -WRITE8_MEMBER( mpz80_state::disp_seg_w ) +void mpz80_state::disp_seg_w(uint8_t data) { /* @@ -504,7 +504,7 @@ WRITE8_MEMBER( mpz80_state::disp_seg_w ) // disp_col_w - front panel column //------------------------------------------------- -WRITE8_MEMBER( mpz80_state::disp_col_w ) +void mpz80_state::disp_col_w(uint8_t data) { /* diff --git a/src/mame/drivers/mrdo.cpp b/src/mame/drivers/mrdo.cpp index 6b31dac3cb1..ca81b59da6f 100644 --- a/src/mame/drivers/mrdo.cpp +++ b/src/mame/drivers/mrdo.cpp @@ -41,7 +41,7 @@ constexpr XTAL VIDEO_CLOCK = 19.6_MHz_XTAL; /* PAL16R6CN used for protection. The game doesn't clear the screen */ /* if a read from this address doesn't return the value it expects. */ -READ8_MEMBER(mrdo_state::mrdo_SECRE_r) +uint8_t mrdo_state::mrdo_SECRE_r() { uint8_t *RAM = memregion("maincpu")->base(); diff --git a/src/mame/drivers/mrjong.cpp b/src/mame/drivers/mrjong.cpp index f2de01ab5a6..403744e3ce7 100644 --- a/src/mame/drivers/mrjong.cpp +++ b/src/mame/drivers/mrjong.cpp @@ -60,7 +60,7 @@ ROMs 6A, 7A, 8A, 9A: 2764 * *************************************/ -READ8_MEMBER(mrjong_state::io_0x03_r) +uint8_t mrjong_state::io_0x03_r() { return 0x00; } diff --git a/src/mame/drivers/ms32.cpp b/src/mame/drivers/ms32.cpp index 7eb5182205c..0b5bfd0ae65 100644 --- a/src/mame/drivers/ms32.cpp +++ b/src/mame/drivers/ms32.cpp @@ -545,22 +545,22 @@ void ms32_state::reset_sub_w(u32 data) /********** MEMORY MAP **********/ -READ8_MEMBER(ms32_state::ms32_nvram_r8) +u8 ms32_state::ms32_nvram_r8(offs_t offset) { return m_nvram_8[offset]; } -WRITE8_MEMBER(ms32_state::ms32_nvram_w8) +void ms32_state::ms32_nvram_w8(offs_t offset, u8 data) { m_nvram_8[offset] = data; } -READ8_MEMBER(ms32_state::ms32_priram_r8) +u8 ms32_state::ms32_priram_r8(offs_t offset) { return m_priram[offset]; } -WRITE8_MEMBER(ms32_state::ms32_priram_w8) +void ms32_state::ms32_priram_w8(offs_t offset, u8 data) { m_priram[offset] = data; } @@ -1662,18 +1662,18 @@ TIMER_DEVICE_CALLBACK_MEMBER(ms32_state::ms32_interrupt) code at $38 reads the 2nd command latch ?? */ -READ8_MEMBER(ms32_state::latch_r) +u8 ms32_state::latch_r() { return m_soundlatch->read()^0xff; } -WRITE8_MEMBER(ms32_state::ms32_snd_bank_w) +void ms32_state::ms32_snd_bank_w(u8 data) { m_z80bank[0]->set_entry((data >> 0) & 0x0F); m_z80bank[1]->set_entry((data >> 4) & 0x0F); } -WRITE8_MEMBER(ms32_state::to_main_w) +void ms32_state::to_main_w(u8 data) { m_to_main=data; irq_raise(1); diff --git a/src/mame/drivers/msisaac.cpp b/src/mame/drivers/msisaac.cpp index e6381222243..dce77d71c0f 100644 --- a/src/mame/drivers/msisaac.cpp +++ b/src/mame/drivers/msisaac.cpp @@ -34,18 +34,18 @@ TIMER_CALLBACK_MEMBER(msisaac_state::nmi_callback) m_pending_nmi = 1; } -WRITE8_MEMBER(msisaac_state::sound_command_w) +void msisaac_state::sound_command_w(uint8_t data) { m_soundlatch->write(data); machine().scheduler().synchronize(timer_expired_delegate(FUNC(msisaac_state::nmi_callback),this), data); } -WRITE8_MEMBER(msisaac_state::nmi_disable_w) +void msisaac_state::nmi_disable_w(uint8_t data) { m_sound_nmi_enable = 0; } -WRITE8_MEMBER(msisaac_state::nmi_enable_w) +void msisaac_state::nmi_enable_w(uint8_t data) { m_sound_nmi_enable = 1; if (m_pending_nmi) @@ -56,18 +56,18 @@ WRITE8_MEMBER(msisaac_state::nmi_enable_w) } #if 0 -WRITE8_MEMBER(msisaac_state::flip_screen_w) +void msisaac_state::flip_screen_w(uint8_t data) { flip_screen_set(data); } -WRITE8_MEMBER(msisaac_state::msisaac_coin_counter_w) +void msisaac_state::msisaac_coin_counter_w(offs_t offset, uint8_t data) { machine().bookkeeping().coin_counter_w(offset,data); } #endif -WRITE8_MEMBER(msisaac_state::ms_unknown_w) +void msisaac_state::ms_unknown_w(uint8_t data) { if (data != 0x08) popmessage("CPU #0 write to 0xf0a3 data=%2x", data); @@ -82,7 +82,7 @@ WRITE8_MEMBER(msisaac_state::ms_unknown_w) -READ8_MEMBER(msisaac_state::msisaac_mcu_r) +uint8_t msisaac_state::msisaac_mcu_r(offs_t offset) { #ifdef USE_MCU return m_bmcu->buggychl_mcu_r(offset); @@ -154,7 +154,7 @@ MCU simulation TODO: #endif } -READ8_MEMBER(msisaac_state::msisaac_mcu_status_r) +uint8_t msisaac_state::msisaac_mcu_status_r(offs_t offset) { #ifdef USE_MCU return m_bmcu->buggychl_mcu_status_r(offset); @@ -163,7 +163,7 @@ READ8_MEMBER(msisaac_state::msisaac_mcu_status_r) #endif } -WRITE8_MEMBER(msisaac_state::msisaac_mcu_w) +void msisaac_state::msisaac_mcu_w(offs_t offset, uint8_t data) { #ifdef USE_MCU m_bmcu->buggychl_mcu_w(offset,data); @@ -214,7 +214,7 @@ void msisaac_state::msisaac_map(address_map &map) // map(0xfc03, 0xfc04).w(FUNC(msisaac_state::msisaac_coin_counter_w)); } -WRITE8_MEMBER(msisaac_state::sound_control_0_w) +void msisaac_state::sound_control_0_w(uint8_t data) { m_snd_ctrl0 = data & 0xff; //popmessage("SND0 0=%2x 1=%2x", m_snd_ctrl0, m_snd_ctrl1); @@ -235,7 +235,7 @@ WRITE8_MEMBER(msisaac_state::sound_control_0_w) // m_msm->set_output_gain(6, m_vol_ctrl[(m_snd_ctrl0 >> 4) & 15] / 100.0); /* group2 from msm5232 */ // m_msm->set_output_gain(7, m_vol_ctrl[(m_snd_ctrl0 >> 4) & 15] / 100.0); /* group2 from msm5232 */ } -WRITE8_MEMBER(msisaac_state::sound_control_1_w) +void msisaac_state::sound_control_1_w(uint8_t data) { m_snd_ctrl1 = data & 0xff; //popmessage("SND1 0=%2x 1=%2x", m_snd_ctrl0, m_snd_ctrl1); diff --git a/src/mame/drivers/multfish.cpp b/src/mame/drivers/multfish.cpp index b75b4994ac4..78a7f230cb7 100644 --- a/src/mame/drivers/multfish.cpp +++ b/src/mame/drivers/multfish.cpp @@ -248,7 +248,7 @@ uint32_t igrosoft_gamble_state::screen_update_igrosoft_gamble(screen_device &scr return 0; } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_vid_w) +void igrosoft_gamble_state::igrosoft_gamble_vid_w(offs_t offset, uint8_t data) { m_vid[offset]=data; @@ -302,22 +302,22 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_vid_w) } } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_bank_w) +void igrosoft_gamble_state::igrosoft_gamble_bank_w(uint8_t data) { membank("bank1")->set_entry(data & 0x0f); } -READ8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_timekeeper_r) +uint8_t igrosoft_gamble_state::igrosoft_gamble_timekeeper_r(offs_t offset) { return m_m48t35->read(offset + 0x6000); } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_timekeeper_w) +void igrosoft_gamble_state::igrosoft_gamble_timekeeper_w(offs_t offset, uint8_t data) { m_m48t35->write(offset + 0x6000, data); } -READ8_MEMBER(igrosoft_gamble_state::bankedram_r) +uint8_t igrosoft_gamble_state::bankedram_r(offs_t offset) { if ((m_rambk & 0x80) == 0x00) { @@ -330,7 +330,7 @@ READ8_MEMBER(igrosoft_gamble_state::bankedram_r) } -WRITE8_MEMBER(igrosoft_gamble_state::bankedram_w) +void igrosoft_gamble_state::bankedram_w(offs_t offset, uint8_t data) { if ((m_rambk & 0x80) == 0x00) { @@ -338,24 +338,24 @@ WRITE8_MEMBER(igrosoft_gamble_state::bankedram_w) } else { - igrosoft_gamble_vid_w(space, offset+0x2000*(m_rambk & 0x03), data); + igrosoft_gamble_vid_w(offset+0x2000*(m_rambk & 0x03), data); } } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_rambank_w) +void igrosoft_gamble_state::igrosoft_gamble_rambank_w(uint8_t data) { m_rambk = data; } -READ8_MEMBER(igrosoft_gamble_state::ray_r) +uint8_t igrosoft_gamble_state::ray_r() { // the games read the raster beam position as part of the hardware checks.. // with a 6mhz clock and 640x480 resolution this seems to give the right results. return m_screen->vpos(); } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_hopper_w) +void igrosoft_gamble_state::igrosoft_gamble_hopper_w(uint8_t data) { /* Port 0x33 @@ -377,7 +377,7 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_hopper_w) machine().bookkeeping().coin_lockout_w(7, data & 0x04); } -WRITE8_MEMBER(igrosoft_gamble_state::rollfr_hopper_w) +void igrosoft_gamble_state::rollfr_hopper_w(uint8_t data) { /* By default RollFruit use inverted coinlock bit. @@ -857,7 +857,7 @@ static INPUT_PORTS_START( rollfr ) INPUT_PORTS_END -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_lamps1_w) +void igrosoft_gamble_state::igrosoft_gamble_lamps1_w(uint8_t data) { /* Port 0x30 @@ -881,7 +881,7 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_lamps1_w) m_lamps[0] = BIT(data, 7); /* Bet/Double Lamp */ } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_lamps2_w) +void igrosoft_gamble_state::igrosoft_gamble_lamps2_w(uint8_t data) { /* Port 0x34 @@ -897,7 +897,7 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_lamps2_w) m_lamps[10] = BIT(data, 4); /* Upper Lamp Green */ } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_lamps3_w) +void igrosoft_gamble_state::igrosoft_gamble_lamps3_w(uint8_t data) { /* Port 0x35 @@ -907,7 +907,7 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_lamps3_w) m_lamps[11] = BIT(data, 1); /* Upper Lamp Red */ } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_counters_w) +void igrosoft_gamble_state::igrosoft_gamble_counters_w(uint8_t data) { /* Port 0x31 @@ -927,12 +927,12 @@ WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_counters_w) machine().bookkeeping().coin_counter_w(5, data & 0x80); } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_f3_w) +void igrosoft_gamble_state::igrosoft_gamble_f3_w(uint8_t data) { //popmessage("igrosoft_gamble_f3_w %02x",data); } -WRITE8_MEMBER(igrosoft_gamble_state::igrosoft_gamble_dispenable_w) +void igrosoft_gamble_state::igrosoft_gamble_dispenable_w(uint8_t data) { //popmessage("igrosoft_gamble_f4_w %02x",data); // display enable? m_disp_enable = data; diff --git a/src/mame/drivers/munchmo.cpp b/src/mame/drivers/munchmo.cpp index 4910a9c2a98..d01a949d22e 100644 --- a/src/mame/drivers/munchmo.cpp +++ b/src/mame/drivers/munchmo.cpp @@ -63,23 +63,23 @@ IRQ_CALLBACK_MEMBER(munchmo_state::generic_irq_ack) return 0xff; } -WRITE8_MEMBER(munchmo_state::nmi_ack_w) +void munchmo_state::nmi_ack_w(uint8_t data) { m_maincpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -WRITE8_MEMBER(munchmo_state::sound_nmi_ack_w) +void munchmo_state::sound_nmi_ack_w(uint8_t data) { m_audiocpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); } -READ8_MEMBER(munchmo_state::ay1reset_r) +uint8_t munchmo_state::ay1reset_r() { m_ay8910[0]->reset_w(); return 0; } -READ8_MEMBER(munchmo_state::ay2reset_r) +uint8_t munchmo_state::ay2reset_r() { m_ay8910[1]->reset_w(); return 0; diff --git a/src/mame/drivers/mw8080bw.cpp b/src/mame/drivers/mw8080bw.cpp index fdc484f8836..d0073415c36 100644 --- a/src/mame/drivers/mw8080bw.cpp +++ b/src/mame/drivers/mw8080bw.cpp @@ -605,10 +605,10 @@ CUSTOM_INPUT_MEMBER(mw8080bw_state::tornbase_score_input_r) } -WRITE8_MEMBER(mw8080bw_state::tornbase_io_w) +void mw8080bw_state::tornbase_io_w(offs_t offset, uint8_t data) { if (offset & 0x01) - tornbase_audio_w(space, 0, data); + tornbase_audio_w(data); if (offset & 0x02) m_mb14241->shift_count_w(data); @@ -881,7 +881,7 @@ MACHINE_START_MEMBER(mw8080bw_state,maze) } -WRITE8_MEMBER(mw8080bw_state::maze_coin_counter_w) +void mw8080bw_state::maze_coin_counter_w(uint8_t data) { /* the data is not used, just pulse the counter */ machine().bookkeeping().coin_counter_w(0, 0); @@ -889,9 +889,9 @@ WRITE8_MEMBER(mw8080bw_state::maze_coin_counter_w) } -WRITE8_MEMBER(mw8080bw_state::maze_io_w) +void mw8080bw_state::maze_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) maze_coin_counter_w(space, 0, data); + if (offset & 0x01) maze_coin_counter_w(data); if (offset & 0x02) m_watchdog->watchdog_reset(); } @@ -1063,9 +1063,9 @@ void boothill_state::boothill(machine_config &config) * *************************************/ -WRITE8_MEMBER(mw8080bw_state::checkmat_io_w) +void mw8080bw_state::checkmat_io_w(offs_t offset, uint8_t data) { - if (offset & 0x01) checkmat_audio_w(space, 0, data); + if (offset & 0x01) checkmat_audio_w(data); if (offset & 0x02) m_watchdog->watchdog_reset(); } @@ -2277,7 +2277,7 @@ void mw8080bw_state::phantom2(machine_config &config) * *************************************/ -READ8_MEMBER(mw8080bw_state::bowler_shift_result_r) +uint8_t mw8080bw_state::bowler_shift_result_r() { /* ZV - not too sure why this is needed, I don't see anything unusual on the schematics that would cause @@ -2286,7 +2286,7 @@ READ8_MEMBER(mw8080bw_state::bowler_shift_result_r) return ~m_mb14241->shift_result_r(); } -WRITE8_MEMBER(mw8080bw_state::bowler_lights_1_w) +void mw8080bw_state::bowler_lights_1_w(uint8_t data) { output().set_value("200_LEFT_LIGHT", (data >> 0) & 0x01); @@ -2307,7 +2307,7 @@ WRITE8_MEMBER(mw8080bw_state::bowler_lights_1_w) } -WRITE8_MEMBER(mw8080bw_state::bowler_lights_2_w) +void mw8080bw_state::bowler_lights_2_w(uint8_t data) { output().set_value("REGULATION_GAME_LIGHT", ( data >> 0) & 0x01); output().set_value("FLASH_GAME_LIGHT", (~data >> 0) & 0x01); diff --git a/src/mame/drivers/mystston.cpp b/src/mame/drivers/mystston.cpp index 691132bd391..b96583a93a0 100644 --- a/src/mame/drivers/mystston.cpp +++ b/src/mame/drivers/mystston.cpp @@ -46,7 +46,7 @@ void mystston_state::mystston_on_scanline_interrupt() } -WRITE8_MEMBER(mystston_state::irq_clear_w) +void mystston_state::irq_clear_w(uint8_t data) { m_maincpu->set_input_line(0, CLEAR_LINE); } @@ -73,7 +73,7 @@ INPUT_CHANGED_MEMBER(mystston_state::coin_inserted) * *************************************/ -WRITE8_MEMBER(mystston_state::mystston_ay8910_select_w) +void mystston_state::mystston_ay8910_select_w(uint8_t data) { /* bit 5 goes to 8910 #0 BDIR pin */ if (((*m_ay8910_select & 0x20) == 0x20) && ((data & 0x20) == 0x00)) diff --git a/src/mame/drivers/mystwarr.cpp b/src/mame/drivers/mystwarr.cpp index 8e2f2a44f45..b1e0dd08da0 100644 --- a/src/mame/drivers/mystwarr.cpp +++ b/src/mame/drivers/mystwarr.cpp @@ -549,7 +549,7 @@ void mystwarr_state::gaiapols_map(address_map &map) /**********************************************************************************/ -WRITE8_MEMBER(mystwarr_state::sound_ctrl_w) +void mystwarr_state::sound_ctrl_w(uint8_t data) { if (!(data & 0x10)) m_soundcpu->set_input_line(INPUT_LINE_NMI, CLEAR_LINE); diff --git a/src/mame/drivers/mz2500.cpp b/src/mame/drivers/mz2500.cpp index 3898a1064e7..c2a1c297686 100644 --- a/src/mame/drivers/mz2500.cpp +++ b/src/mame/drivers/mz2500.cpp @@ -597,18 +597,18 @@ uint8_t mz2500_state::mz2500_cg_latch_compare() return res; } -READ8_MEMBER(mz2500_state::mz2500_bank_addr_r) +uint8_t mz2500_state::mz2500_bank_addr_r() { return m_bank_addr; } -WRITE8_MEMBER(mz2500_state::mz2500_bank_addr_w) +void mz2500_state::mz2500_bank_addr_w(uint8_t data) { // printf("%02x\n",data); m_bank_addr = data & 7; } -READ8_MEMBER(mz2500_state::mz2500_bank_data_r) +uint8_t mz2500_state::mz2500_bank_data_r() { uint8_t res; @@ -620,7 +620,7 @@ READ8_MEMBER(mz2500_state::mz2500_bank_data_r) return res; } -WRITE8_MEMBER(mz2500_state::mz2500_bank_data_w) +void mz2500_state::mz2500_bank_data_w(uint8_t data) { m_bank_val[m_bank_addr] = data & 0x3f; m_rambank[m_bank_addr]->set_bank(m_bank_val[m_bank_addr]); @@ -634,18 +634,18 @@ WRITE8_MEMBER(mz2500_state::mz2500_bank_data_w) m_bank_addr&=7; } -WRITE8_MEMBER(mz2500_state::mz2500_kanji_bank_w) +void mz2500_state::mz2500_kanji_bank_w(uint8_t data) { m_kanji_bank = data; } -WRITE8_MEMBER(mz2500_state::mz2500_dictionary_bank_w) +void mz2500_state::mz2500_dictionary_bank_w(uint8_t data) { m_dic_bank = data; } /* 0xf4 - 0xf7 all returns vblank / hblank states */ -READ8_MEMBER(mz2500_state::mz2500_crtc_hvblank_r) +uint8_t mz2500_state::mz2500_crtc_hvblank_r() { uint8_t vblank_bit, hblank_bit; @@ -694,7 +694,7 @@ uint8_t mz2500_state::pal_256_param(int index, int param) return val; } -WRITE8_MEMBER(mz2500_state::mz2500_tv_crtc_w) +void mz2500_state::mz2500_tv_crtc_w(offs_t offset, uint8_t data) { switch(offset) { @@ -774,7 +774,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_tv_crtc_w) } } -WRITE8_MEMBER(mz2500_state::mz2500_irq_sel_w) +void mz2500_state::mz2500_irq_sel_w(uint8_t data) { m_irq_sel = data; //printf("%02x\n",m_irq_sel); @@ -785,7 +785,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_irq_sel_w) m_irq_mask[3] = (data & 0x01); //RP5c15 } -WRITE8_MEMBER(mz2500_state::mz2500_irq_data_w) +void mz2500_state::mz2500_irq_data_w(uint8_t data) { if(m_irq_sel & 0x80) m_irq_vector[0] = data; //CRTC @@ -799,7 +799,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_irq_data_w) // popmessage("%02x %02x %02x %02x",m_irq_vector[0],m_irq_vector[1],m_irq_vector[2],m_irq_vector[3]); } -WRITE8_MEMBER(mz2500_state::floppy_select_w) +void mz2500_state::floppy_select_w(uint8_t data) { switch ((data & 0x03) ^ m_fdc_reverse) { @@ -815,7 +815,7 @@ WRITE8_MEMBER(mz2500_state::floppy_select_w) m_floppy->mon_w(!BIT(data, 7)); } -WRITE8_MEMBER(mz2500_state::floppy_side_w) +void mz2500_state::floppy_side_w(uint8_t data) { if (m_floppy) m_floppy->ss_w(BIT(data, 0)); @@ -833,7 +833,7 @@ void mz2500_state::mz2500_map(address_map &map) map(0xe000, 0xffff).m(m_rambank[7], FUNC(address_map_bank_device::amap8)); } -READ8_MEMBER(mz2500_state::rmw_r) +uint8_t mz2500_state::rmw_r(offs_t offset) { // TODO: correct? if(m_cg_reg[0x0e] == 0x3) @@ -852,7 +852,7 @@ READ8_MEMBER(mz2500_state::rmw_r) return m_cg_latch[plane]; } -WRITE8_MEMBER(mz2500_state::rmw_w) +void mz2500_state::rmw_w(offs_t offset, uint8_t data) { // TODO: correct? if(m_cg_reg[0x0e] == 0x3) @@ -906,7 +906,7 @@ WRITE8_MEMBER(mz2500_state::rmw_w) } } -READ8_MEMBER(mz2500_state::kanji_pcg_r) +uint8_t mz2500_state::kanji_pcg_r(offs_t offset) { if(m_kanji_bank & 0x80) //kanji ROM return m_kanji_rom[(offset & 0x7ff)+((m_kanji_bank & 0x7f)*0x800)]; @@ -915,7 +915,7 @@ READ8_MEMBER(mz2500_state::kanji_pcg_r) return m_pcg_ram[offset]; } -WRITE8_MEMBER(mz2500_state::kanji_pcg_w) +void mz2500_state::kanji_pcg_w(offs_t offset, uint8_t data) { if((m_kanji_bank & 0x80) == 0) ////PCG RAM { @@ -928,7 +928,7 @@ WRITE8_MEMBER(mz2500_state::kanji_pcg_w) // kanji ROM is read only } -READ8_MEMBER(mz2500_state::dict_rom_r) +uint8_t mz2500_state::dict_rom_r(offs_t offset) { return m_dic_rom[(offset & 0x1fff) + ((m_dic_bank & 0x1f)*0x2000)]; } @@ -957,7 +957,7 @@ void mz2500_state::mz2500_bank_window_map(address_map &map) map(0x78000,0x7ffff).rom().region("phone", 0); } -READ8_MEMBER(mz2500_state::mz2500_rom_r) +uint8_t mz2500_state::mz2500_rom_r() { m_lrom_index = (m_maincpu->state_int(Z80_B)); @@ -966,7 +966,7 @@ READ8_MEMBER(mz2500_state::mz2500_rom_r) return m_iplpro_rom[m_rom_index]; } -WRITE8_MEMBER(mz2500_state::mz2500_rom_w) +void mz2500_state::mz2500_rom_w(uint8_t data) { m_hrom_index = (m_maincpu->state_int(Z80_B)); @@ -975,7 +975,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_rom_w) } /* sets 16 color entries out of 4096 possible combinations */ -WRITE8_MEMBER(mz2500_state::palette4096_io_w) +void mz2500_state::palette4096_io_w(uint8_t data) { uint8_t pal_index; uint8_t pal_entry; @@ -994,17 +994,17 @@ WRITE8_MEMBER(mz2500_state::palette4096_io_w) m_palette->set_pen_color(pal_entry+0x10, pal4bit(m_pal[pal_entry].r), pal4bit(m_pal[pal_entry].g), pal4bit(m_pal[pal_entry].b)); } -READ8_MEMBER(mz2500_state::fdc_r) +uint8_t mz2500_state::fdc_r(offs_t offset) { return m_fdc->read(offset) ^ 0xff; } -WRITE8_MEMBER(mz2500_state::fdc_w) +void mz2500_state::fdc_w(offs_t offset, uint8_t data) { m_fdc->write(offset, data ^ 0xff); } -READ8_MEMBER(mz2500_state::mz2500_bplane_latch_r) +uint8_t mz2500_state::mz2500_bplane_latch_r() { if(m_cg_reg[7] & 0x10) return mz2500_cg_latch_compare(); @@ -1013,7 +1013,7 @@ READ8_MEMBER(mz2500_state::mz2500_bplane_latch_r) } -READ8_MEMBER(mz2500_state::mz2500_rplane_latch_r) +uint8_t mz2500_state::mz2500_rplane_latch_r() { if(m_cg_reg[0x07] & 0x10) { @@ -1027,12 +1027,12 @@ READ8_MEMBER(mz2500_state::mz2500_rplane_latch_r) return m_cg_latch[1]; } -READ8_MEMBER(mz2500_state::mz2500_gplane_latch_r) +uint8_t mz2500_state::mz2500_gplane_latch_r() { return m_cg_latch[2]; } -READ8_MEMBER(mz2500_state::mz2500_iplane_latch_r) +uint8_t mz2500_state::mz2500_iplane_latch_r() { return m_cg_latch[3]; } @@ -1067,12 +1067,12 @@ READ8_MEMBER(mz2500_state::mz2500_iplane_latch_r) 0x18: CG color masking */ -WRITE8_MEMBER(mz2500_state::mz2500_cg_addr_w) +void mz2500_state::mz2500_cg_addr_w(uint8_t data) { m_cg_reg_index = data; } -WRITE8_MEMBER(mz2500_state::mz2500_cg_data_w) +void mz2500_state::mz2500_cg_data_w(uint8_t data) { m_cg_reg[m_cg_reg_index & 0x1f] = data; @@ -1122,7 +1122,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_cg_data_w) m_cg_reg_index = (m_cg_reg_index & 0xfc) | ((m_cg_reg_index + 1) & 0x03); } -WRITE8_MEMBER(mz2500_state::timer_w) +void mz2500_state::timer_w(uint8_t data) { m_pit->write_gate0(1); m_pit->write_gate1(1); @@ -1133,7 +1133,7 @@ WRITE8_MEMBER(mz2500_state::timer_w) } -READ8_MEMBER(mz2500_state::mz2500_joystick_r) +uint8_t mz2500_state::mz2500_joystick_r() { uint8_t res,dir_en,in_r; @@ -1161,32 +1161,32 @@ READ8_MEMBER(mz2500_state::mz2500_joystick_r) return res; } -WRITE8_MEMBER(mz2500_state::mz2500_joystick_w) +void mz2500_state::mz2500_joystick_w(uint8_t data) { m_joy_mode = data; } -READ8_MEMBER(mz2500_state::mz2500_kanji_r) +uint8_t mz2500_state::mz2500_kanji_r(offs_t offset) { printf("Read from kanji 2 ROM\n"); return m_kanji2_rom[(m_kanji_index << 1) | (offset & 1)]; } -WRITE8_MEMBER(mz2500_state::mz2500_kanji_w) +void mz2500_state::mz2500_kanji_w(offs_t offset, uint8_t data) { (offset & 1) ? (m_kanji_index = (data << 8) | (m_kanji_index & 0xff)) : (m_kanji_index = (data & 0xff) | (m_kanji_index & 0xff00)); } -READ8_MEMBER(mz2500_state::rp5c15_8_r) +uint8_t mz2500_state::rp5c15_8_r() { uint8_t rtc_index = (m_maincpu->state_int(Z80_B)); return m_rtc->read(rtc_index); } -WRITE8_MEMBER(mz2500_state::rp5c15_8_w) +void mz2500_state::rp5c15_8_w(uint8_t data) { uint8_t rtc_index = (m_maincpu->state_int(Z80_B)); @@ -1194,7 +1194,7 @@ WRITE8_MEMBER(mz2500_state::rp5c15_8_w) } -READ8_MEMBER(mz2500_state::mz2500_emm_data_r) +uint8_t mz2500_state::mz2500_emm_data_r() { uint8_t emm_lo_index; @@ -1208,7 +1208,7 @@ READ8_MEMBER(mz2500_state::mz2500_emm_data_r) return 0xff; } -WRITE8_MEMBER(mz2500_state::mz2500_emm_addr_w) +void mz2500_state::mz2500_emm_addr_w(uint8_t data) { uint8_t emm_hi_index; @@ -1217,7 +1217,7 @@ WRITE8_MEMBER(mz2500_state::mz2500_emm_addr_w) m_emm_offset = ((emm_hi_index & 0xff) << 16) | ((data & 0xff) << 8) | (m_emm_offset & 0xff); } -WRITE8_MEMBER(mz2500_state::mz2500_emm_data_w) +void mz2500_state::mz2500_emm_data_w(uint8_t data) { uint8_t emm_lo_index; diff --git a/src/mame/drivers/namcofl.cpp b/src/mame/drivers/namcofl.cpp index 2cb7706e920..a1d565f35ab 100644 --- a/src/mame/drivers/namcofl.cpp +++ b/src/mame/drivers/namcofl.cpp @@ -172,22 +172,22 @@ TODO #include -READ32_MEMBER(namcofl_state::unk1_r) +uint32_t namcofl_state::unk1_r() { return 0xffffffff; } -READ32_MEMBER(namcofl_state::network_r) +uint32_t namcofl_state::network_r() { return 0xffffffff; } -READ32_MEMBER(namcofl_state::sysreg_r) +uint32_t namcofl_state::sysreg_r() { return 0; } -WRITE32_MEMBER(namcofl_state::sysreg_w) +void namcofl_state::sysreg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if ((offset == 2) && ACCESSING_BITS_0_7) // address space configuration { @@ -203,7 +203,7 @@ WRITE32_MEMBER(namcofl_state::sysreg_w) } // FIXME: remove this trampoline once the IRQ is moved into the actual device -WRITE8_MEMBER(namcofl_state::c116_w) +void namcofl_state::c116_w(offs_t offset, uint8_t data) { m_c116->write(offset, data); @@ -242,7 +242,7 @@ void namcofl_state::namcofl_bank_mem(address_map &map) } -WRITE16_MEMBER(namcofl_state::mcu_shared_w) +void namcofl_state::mcu_shared_w(offs_t offset, uint16_t data, uint16_t mem_mask) { // HACK! Many games data ROM routines redirect the vector from the sound command read to an RTS. // This needs more investigation. nebulray and vshoot do NOT do this. diff --git a/src/mame/drivers/namconb1.cpp b/src/mame/drivers/namconb1.cpp index ae596e3fa55..ad505fbc38f 100644 --- a/src/mame/drivers/namconb1.cpp +++ b/src/mame/drivers/namconb1.cpp @@ -339,7 +339,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(namconb1_state::mcu_irq2_cb) /****************************************************************************/ -WRITE8_MEMBER(namconb1_state::namconb1_cpureg_w) +void namconb1_state::namconb1_cpureg_w(offs_t offset, u8 data) { /** * 400000 0x00 @@ -426,7 +426,7 @@ WRITE8_MEMBER(namconb1_state::namconb1_cpureg_w) } -WRITE8_MEMBER(namconb1_state::namconb2_cpureg_w) +void namconb1_state::namconb2_cpureg_w(offs_t offset, u8 data) { /** * f00000 VBL IRQ enable/level @@ -514,7 +514,7 @@ WRITE8_MEMBER(namconb1_state::namconb2_cpureg_w) } -READ8_MEMBER(namconb1_state::namconb1_cpureg_r) +u8 namconb1_state::namconb1_cpureg_r(offs_t offset) { // 16: Watchdog if (ENABLE_LOGGING) @@ -527,7 +527,7 @@ READ8_MEMBER(namconb1_state::namconb1_cpureg_r) } -READ8_MEMBER(namconb1_state::namconb2_cpureg_r) +u8 namconb1_state::namconb2_cpureg_r(offs_t offset) { // 14: Watchdog if (ENABLE_LOGGING) @@ -542,7 +542,7 @@ READ8_MEMBER(namconb1_state::namconb2_cpureg_r) /****************************************************************************/ -READ32_MEMBER(namconb1_state::custom_key_r) +u32 namconb1_state::custom_key_r(offs_t offset) { u16 old_count = m_count; @@ -643,7 +643,7 @@ READ32_MEMBER(namconb1_state::custom_key_r) /***************************************************************/ -READ32_MEMBER(namconb1_state::gunbulet_gun_r) +u32 namconb1_state::gunbulet_gun_r(offs_t offset) { int result = 0; @@ -657,12 +657,12 @@ READ32_MEMBER(namconb1_state::gunbulet_gun_r) return result<<24; } /* gunbulet_gun_r */ -READ32_MEMBER(namconb1_state::randgen_r) +u32 namconb1_state::randgen_r() { return machine().rand(); } /* randgen_r */ -WRITE32_MEMBER(namconb1_state::srand_w) +void namconb1_state::srand_w(u32 data) { /** * Used to seed the hardware random number generator. @@ -670,12 +670,12 @@ WRITE32_MEMBER(namconb1_state::srand_w) */ } /* srand_w */ -READ32_MEMBER(namconb1_state::share_r) +u32 namconb1_state::share_r(offs_t offset) { return (m_namconb_shareram[offset * 2] << 16) | m_namconb_shareram[offset * 2 + 1]; } -WRITE32_MEMBER(namconb1_state::share_w) +void namconb1_state::share_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(m_namconb_shareram + offset * 2 + 1); data >>= 16; @@ -726,7 +726,7 @@ void namconb1_state::namconb2_am(address_map &map) map(0xf00000, 0xf0001f).rw(FUNC(namconb1_state::namconb2_cpureg_r), FUNC(namconb1_state::namconb2_cpureg_w)); } -WRITE16_MEMBER(namconb1_state::mcu_shared_w) +void namconb1_state::mcu_shared_w(offs_t offset, u16 data, u16 mem_mask) { // HACK! Many games data ROM routines redirect the vector from the sound command read to an RTS. // This needs more investigation. nebulray and vshoot do NOT do this. diff --git a/src/mame/drivers/namcond1.cpp b/src/mame/drivers/namcond1.cpp index 4feaa584b22..14b074e992e 100644 --- a/src/mame/drivers/namcond1.cpp +++ b/src/mame/drivers/namcond1.cpp @@ -225,7 +225,7 @@ void namcond1_state::abcheck_map(address_map &map) map(0xc3ff00, 0xc3ffff).rw(FUNC(namcond1_state::cuskey_r), FUNC(namcond1_state::cuskey_w)); } -READ16_MEMBER(namcond1_state::printer_r) +uint16_t namcond1_state::printer_r() { // bits tested: // bit 2 = 0 for paper cut switch on, 1 for off @@ -304,17 +304,17 @@ static INPUT_PORTS_START( abcheck ) INPUT_PORTS_END -READ16_MEMBER(namcond1_state::mcu_p7_read) +uint16_t namcond1_state::mcu_p7_read() { return 0xff; } -READ16_MEMBER(namcond1_state::mcu_pa_read) +uint16_t namcond1_state::mcu_pa_read() { return 0xff; } -WRITE16_MEMBER(namcond1_state::mcu_pa_write) +void namcond1_state::mcu_pa_write(uint16 data) { m_p8 = data; } diff --git a/src/mame/drivers/namcos1.cpp b/src/mame/drivers/namcos1.cpp index a670d407501..85eab2593a7 100644 --- a/src/mame/drivers/namcos1.cpp +++ b/src/mame/drivers/namcos1.cpp @@ -358,7 +358,7 @@ void namcos1_state::mcu_irq_ack_w(u8 data) } -READ8_MEMBER(namcos1_state::dsw_r) +u8 namcos1_state::dsw_r(offs_t offset) { // 7654---- not used // ----3--- ls257 dsw selector 1y diff --git a/src/mame/drivers/namcos2.cpp b/src/mame/drivers/namcos2.cpp index 806fb08007e..27bed8616d4 100644 --- a/src/mame/drivers/namcos2.cpp +++ b/src/mame/drivers/namcos2.cpp @@ -621,12 +621,12 @@ void namcos2_state::GollyGhostUpdateDiorama_c0( int data ) } } -READ16_MEMBER(namcos2_state::dpram_word_r) +uint16_t namcos2_state::dpram_word_r(offs_t offset) { return m_dpram[offset]; } -WRITE16_MEMBER(namcos2_state::dpram_word_w) +void namcos2_state::dpram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if( ACCESSING_BITS_0_7 ) { diff --git a/src/mame/drivers/namcos22.cpp b/src/mame/drivers/namcos22.cpp index 07ec5579d37..19a485028b4 100644 --- a/src/mame/drivers/namcos22.cpp +++ b/src/mame/drivers/namcos22.cpp @@ -1086,7 +1086,7 @@ Notes: // Main CPU /* SCI, prelim! */ -READ32_MEMBER(namcos22_state::namcos22_sci_r) +u32 namcos22_state::namcos22_sci_r(offs_t offset) { switch (offset) { @@ -1098,7 +1098,7 @@ READ32_MEMBER(namcos22_state::namcos22_sci_r) } } -WRITE32_MEMBER(namcos22_state::namcos22_sci_w) +void namcos22_state::namcos22_sci_w(u32 data) { /* 20020000 2 R/W RX Status @@ -1575,7 +1575,7 @@ void namcos22_state::namcos22_keycus_w(offs_t offset, u16 data, u16 mem_mask) * Writes to 0x50000008 and 0x5000000a reset the state of the input buffer. * It appears to be meant for debugging, not all games use it. */ -READ16_MEMBER(namcos22_state::namcos22_portbit_r) +u16 namcos22_state::namcos22_portbit_r(offs_t offset) { u16 ret = m_portbits[offset] & 1; @@ -1585,7 +1585,7 @@ READ16_MEMBER(namcos22_state::namcos22_portbit_r) return ret; } -WRITE16_MEMBER(namcos22_state::namcos22_portbit_w) +void namcos22_state::namcos22_portbit_w(offs_t offset, u16 data) { m_portbits[offset] = m_custom[offset].read_safe(0xffff); } @@ -1600,7 +1600,7 @@ void namcos22_state::namcos22_cpuleds_w(offs_t offset, u32 data, u32 mem_mask) m_cpuled_out[i] = (~data << i & 0x800000) ? 0 : 1; } -WRITE32_MEMBER(namcos22s_state::namcos22s_chipselect_w) +void namcos22s_state::namcos22s_chipselect_w(offs_t offset, u32 data, u32 mem_mask) { // assume that this register is for chip enable/disable // it's written many times during boot-up, and most games don't touch it afterwards (last value usually 0038 or 0838) @@ -1853,7 +1853,7 @@ void namcos22s_state::namcos22s_am(address_map &map) // Time Crisis gun -READ16_MEMBER(namcos22s_state::timecris_gun_r) +u16 namcos22s_state::timecris_gun_r(offs_t offset) { u16 xpos = m_opt[0]->read(); u16 ypos = m_opt[1]->read(); @@ -1890,12 +1890,12 @@ void namcos22s_state::timecris_am(address_map &map) // Alpine Surfer protection -READ32_MEMBER(namcos22s_state::alpinesa_prot_r) +u32 namcos22s_state::alpinesa_prot_r() { return m_alpinesa_protection; } -WRITE32_MEMBER(namcos22s_state::alpinesa_prot_w) +void namcos22s_state::alpinesa_prot_w(u32 data) { switch (data) { @@ -2235,7 +2235,7 @@ void namcos22_state::dsp_xf_output_w(u16 data) /* STUB */ } -WRITE16_MEMBER(namcos22_state::dsp_unk2_w) +void namcos22_state::dsp_unk2_w(u16 data) { /** * Used by Ridge Racer (Japan) to specify baseaddr @@ -2247,14 +2247,14 @@ WRITE16_MEMBER(namcos22_state::dsp_unk2_w) m_pdp_base = data; } -READ16_MEMBER(namcos22_state::dsp_unk_port3_r) +u16 namcos22_state::dsp_unk_port3_r() { m_dsp_master_bioz = 0; m_dsp_upload_state = NAMCOS22_DSP_UPLOAD_READY; return 0; } -WRITE16_MEMBER(namcos22_state::upload_code_to_slave_dsp_w) +void namcos22_state::upload_code_to_slave_dsp_w(u16 data) { switch (m_dsp_upload_state) { @@ -2308,19 +2308,19 @@ WRITE16_MEMBER(namcos22_state::upload_code_to_slave_dsp_w) } } -READ16_MEMBER(namcos22_state::dsp_unk8_r) +u16 namcos22_state::dsp_unk8_r() { /* bit 0x0001 is busy signal */ return 0x0000; } -READ16_MEMBER(namcos22_state::custom_ic_status_r) +u16 namcos22_state::custom_ic_status_r() { /* bit 0x0001 signals completion */ return 0x0063; } -READ16_MEMBER(namcos22_state::dsp_upload_status_r) +u16 namcos22_state::dsp_upload_status_r() { /* bit 0x0001 is polled to confirm that code/data has been successfully uploaded to the slave dsp via port 0x7. */ return 0x0000; @@ -2357,11 +2357,11 @@ TIMER_DEVICE_CALLBACK_MEMBER(namcos22_state::dsp_serial_pulse) } } -WRITE16_MEMBER(namcos22_state::dsp_unk_porta_w) +void namcos22_state::dsp_unk_porta_w(u16 data) { } -WRITE16_MEMBER(namcos22_state::dsp_led_w) +void namcos22_state::dsp_led_w(u16 data) { /* I believe this port controls diagnostic LEDs on the DSP PCB. */ } @@ -2402,13 +2402,13 @@ WRITE16_MEMBER(namcos22_state::dsp_led_w) * 0x0075 0xf205 // sx,sy * 0x602b 0x93e8 // i,zpos */ -WRITE16_MEMBER(namcos22_state::dsp_unk8_w) +void namcos22_state::dsp_unk8_w(u16 data) { m_RenderBufSize = 0; m_render_refresh = true; // this one is more likely controlled by slavedsp somewhere } -WRITE16_MEMBER(namcos22_state::master_render_device_w) +void namcos22_state::master_render_device_w(u16 data) { if (m_RenderBufSize < NAMCOS22_MAX_RENDER_CMD_SEQ) { @@ -2458,18 +2458,18 @@ u16 namcos22_state::dsp_slave_bioz_r() return 1; } -READ16_MEMBER(namcos22_state::dsp_slave_port3_r) +u16 namcos22_state::dsp_slave_port3_r() { return 0x0010; /* ? */ } -READ16_MEMBER(namcos22_state::dsp_slave_port4_r) +u16 namcos22_state::dsp_slave_port4_r() { return 0; //return ReadDataFromSlaveBuf(); } -READ16_MEMBER(namcos22_state::dsp_slave_port5_r) +u16 namcos22_state::dsp_slave_port5_r() { #if 0 int numWords = SlaveBufSize(); @@ -2479,32 +2479,32 @@ READ16_MEMBER(namcos22_state::dsp_slave_port5_r) return 0; } -READ16_MEMBER(namcos22_state::dsp_slave_port6_r) +u16 namcos22_state::dsp_slave_port6_r() { /* bit 0x9 indicates whether device at port2 is ready to receive data */ /* bit 0xd indicates whether data is available from port4 */ return 0; } -WRITE16_MEMBER(namcos22_state::dsp_slave_portc_w) +void namcos22_state::dsp_slave_portc_w(u16 data) { /* Unknown; used before transmitting a command sequence. */ } -READ16_MEMBER(namcos22_state::dsp_slave_port8_r) +u16 namcos22_state::dsp_slave_port8_r() { /* This reports status of the device mapped at port 0xb. */ /* The slave dsp waits for bit 0x0001 to be zero before writing a new command sequence. */ return 0; /* status */ } -READ16_MEMBER(namcos22_state::dsp_slave_portb_r) +u16 namcos22_state::dsp_slave_portb_r() { /* The slave DSP reads before transmitting a command sequence. */ return 0; } -WRITE16_MEMBER(namcos22_state::dsp_slave_portb_w) +void namcos22_state::dsp_slave_portb_w(u16 data) { /* The slave dsp uses this to transmit a command sequence to an external device. */ } @@ -5497,7 +5497,7 @@ ROM_END // MCU speed cheats (every bit helps with these games) // for MCU BIOS v1.41 -READ16_MEMBER(namcos22s_state::mcu141_speedup_r) +u16 namcos22s_state::mcu141_speedup_r() { if ((m_mcu->pc() == 0xc12d) && (!(m_su_82 & 0xff00))) { @@ -5507,13 +5507,13 @@ READ16_MEMBER(namcos22s_state::mcu141_speedup_r) return m_su_82; } -WRITE16_MEMBER(namcos22_state::mcu_speedup_w) +void namcos22_state::mcu_speedup_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_su_82); } // for MCU BIOS v1.20/v1.30 -READ16_MEMBER(namcos22s_state::mcu130_speedup_r) +u16 namcos22s_state::mcu130_speedup_r() { if ((m_mcu->pc() == 0xc12a) && (!(m_su_82 & 0xff00))) { @@ -5524,7 +5524,7 @@ READ16_MEMBER(namcos22s_state::mcu130_speedup_r) } // for NSTX7702 v1.00 (C74) -READ16_MEMBER(namcos22_state::mcuc74_speedup_r) +u16 namcos22_state::mcuc74_speedup_r() { if (((m_mcu->pc() == 0xc0df) || (m_mcu->pc() == 0xc101)) && (!(m_su_82 & 0xff00))) { @@ -5537,21 +5537,30 @@ READ16_MEMBER(namcos22_state::mcuc74_speedup_r) void namcos22_state::install_c74_speedup() { if (MCU_SPEEDUP) - m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x80, 0x81, read16_delegate(*this, FUNC(namcos22_state::mcuc74_speedup_r)), write16_delegate(*this, FUNC(namcos22_state::mcu_speedup_w))); + { + m_mcu->space(AS_PROGRAM).install_read_handler(0x80, 0x81, read16smo_delegate(*this, FUNC(namcos22_state::mcuc74_speedup_r))); + m_mcu->space(AS_PROGRAM).install_write_handler(0x80, 0x81, write16s_delegate(*this, FUNC(namcos22_state::mcu_speedup_w))); + } } void namcos22s_state::install_130_speedup() { // install speedup cheat for 1.20/1.30 MCU BIOS if (MCU_SPEEDUP) - m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(*this, FUNC(namcos22s_state::mcu130_speedup_r)), write16_delegate(*this, FUNC(namcos22s_state::mcu_speedup_w))); + { + m_mcu->space(AS_PROGRAM).install_read_handler(0x82, 0x83, read16smo_delegate(*this, FUNC(namcos22s_state::mcu130_speedup_r))); + m_mcu->space(AS_PROGRAM).install_write_handler(0x82, 0x83, write16s_delegate(*this, FUNC(namcos22s_state::mcu_speedup_w))); + } } void namcos22s_state::install_141_speedup() { // install speedup cheat for 1.41 MCU BIOS if (MCU_SPEEDUP) - m_mcu->space(AS_PROGRAM).install_readwrite_handler(0x82, 0x83, read16_delegate(*this, FUNC(namcos22s_state::mcu141_speedup_r)), write16_delegate(*this, FUNC(namcos22s_state::mcu_speedup_w))); + { + m_mcu->space(AS_PROGRAM).install_read_handler(0x82, 0x83, read16smo_delegate(*this, FUNC(namcos22s_state::mcu141_speedup_r))); + m_mcu->space(AS_PROGRAM).install_write_handler(0x82, 0x83, write16s_delegate(*this, FUNC(namcos22s_state::mcu_speedup_w))); + } } diff --git a/src/mame/drivers/namcos86.cpp b/src/mame/drivers/namcos86.cpp index 380bc6047c9..0443866311e 100644 --- a/src/mame/drivers/namcos86.cpp +++ b/src/mame/drivers/namcos86.cpp @@ -183,7 +183,7 @@ TODO: #include "speaker.h" -WRITE8_MEMBER(namcos86_state::bankswitch1_w) +void namcos86_state::bankswitch1_w(uint8_t data) { /* if the ROM expansion module is available, don't do anything. This avoids conflict */ /* with bankswitch1_ext_w() in wndrmomo */ @@ -193,7 +193,7 @@ WRITE8_MEMBER(namcos86_state::bankswitch1_w) membank("bank1")->set_entry(data & 0x03); } -WRITE8_MEMBER(namcos86_state::bankswitch1_ext_w) +void namcos86_state::bankswitch1_ext_w(uint8_t data) { if (!m_user1_ptr) return; @@ -201,13 +201,13 @@ WRITE8_MEMBER(namcos86_state::bankswitch1_ext_w) membank("bank1")->set_entry(data & 0x1f); } -WRITE8_MEMBER(namcos86_state::bankswitch2_w) +void namcos86_state::bankswitch2_w(uint8_t data) { membank("bank2")->set_entry(data & 0x03); } /* Stubs to pass the correct Dip Switch setup to the MCU */ -READ8_MEMBER(namcos86_state::dsw0_r) +uint8_t namcos86_state::dsw0_r() { int rhi, rlo; @@ -223,7 +223,7 @@ READ8_MEMBER(namcos86_state::dsw0_r) return rhi | rlo; } -READ8_MEMBER(namcos86_state::dsw1_r) +uint8_t namcos86_state::dsw1_r() { int rhi, rlo; @@ -241,18 +241,18 @@ READ8_MEMBER(namcos86_state::dsw1_r) } -WRITE8_MEMBER(namcos86_state::int_ack1_w) +void namcos86_state::int_ack1_w(uint8_t data) { m_cpu1->set_input_line(0, CLEAR_LINE); } -WRITE8_MEMBER(namcos86_state::int_ack2_w) +void namcos86_state::int_ack2_w(uint8_t data) { m_cpu2->set_input_line(0, CLEAR_LINE); } -WRITE8_MEMBER(namcos86_state::watchdog1_w) +void namcos86_state::watchdog1_w(uint8_t data) { m_wdog |= 1; if (m_wdog == 3) @@ -262,7 +262,7 @@ WRITE8_MEMBER(namcos86_state::watchdog1_w) } } -WRITE8_MEMBER(namcos86_state::watchdog2_w) +void namcos86_state::watchdog2_w(uint8_t data) { m_wdog |= 2; if (m_wdog == 3) @@ -287,7 +287,7 @@ void namcos86_state::led_w(uint8_t data) } -WRITE8_MEMBER(namcos86_state::cus115_w) +void namcos86_state::cus115_w(offs_t offset, uint8_t data) { /* make sure the expansion board is present */ if (!m_user1_ptr) @@ -306,7 +306,7 @@ WRITE8_MEMBER(namcos86_state::cus115_w) break; case 4: - bankswitch1_ext_w(space,0,data); + bankswitch1_ext_w(data); break; case 5: // not used? diff --git a/src/mame/drivers/naomi.cpp b/src/mame/drivers/naomi.cpp index 2ef4a928e45..e17f3276694 100644 --- a/src/mame/drivers/naomi.cpp +++ b/src/mame/drivers/naomi.cpp @@ -1643,7 +1643,7 @@ Premier Eleven #define CPU_CLOCK (200000000) -READ16_MEMBER(naomi_state::naomi_g2bus_r ) +uint16_t naomi_state::naomi_g2bus_r(offs_t offset) { // G2 bus is 16bit wide, "floating bus" value is 16 most significant address bits u32 address = 0x01000000 + offset * 2; @@ -1655,7 +1655,7 @@ READ16_MEMBER(naomi_state::naomi_g2bus_r ) */ -READ64_MEMBER(naomi_state::eeprom_93c46a_r ) +uint64_t naomi_state::eeprom_93c46a_r() { int res; // bit 0 - EEPROM type: 0 - 93C46, 1 - X76F100 TODO @@ -1665,7 +1665,7 @@ READ64_MEMBER(naomi_state::eeprom_93c46a_r ) return res; } -WRITE64_MEMBER(naomi_state::eeprom_93c46a_w ) +void naomi_state::eeprom_93c46a_w(uint64_t data) { /* bit 4 is data */ /* bit 2 is clock */ @@ -1784,7 +1784,7 @@ void naomi_state::naomi_map(address_map &map) */ // example hookup for accessing both PVRs, to be extended to everything else. -WRITE32_MEMBER(naomi2_state::both_pvr2_ta_w) +void naomi2_state::both_pvr2_ta_w(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask) { space.write_dword(0x005f8000|offset*4,data,mem_mask); space.write_dword(0x025f8000|offset*4,data,mem_mask); @@ -1860,13 +1860,13 @@ void naomi_state::naomi_port(address_map &map) * Atomiswave address map, almost identical to Dreamcast */ -READ64_MEMBER(atomiswave_state::aw_flash_r) +uint64_t atomiswave_state::aw_flash_r(offs_t offset) { return (uint64_t)m_awflash->read(offset*8) | (uint64_t)m_awflash->read((offset*8)+1)<<8 | (uint64_t)m_awflash->read((offset*8)+2)<<16 | (uint64_t)m_awflash->read((offset*8)+3)<<24 | (uint64_t)m_awflash->read((offset*8)+4)<<32 | (uint64_t)m_awflash->read((offset*8)+5)<<40 | (uint64_t)m_awflash->read((offset*8)+6)<<48 | (uint64_t)m_awflash->read((offset*8)+7)<<56; } -WRITE64_MEMBER(atomiswave_state::aw_flash_w) +void atomiswave_state::aw_flash_w(offs_t offset, uint64_t data, uint64_t mem_mask) { int i; uint32_t addr = offset * 8; @@ -1908,7 +1908,7 @@ inline int atomiswave_state::decode_reg32_64(uint32_t offset, uint64_t mem_mask, return reg; } -READ64_MEMBER(atomiswave_state::aw_modem_r ) +uint64_t atomiswave_state::aw_modem_r(offs_t offset, uint64_t mem_mask) { int reg; uint64_t shift; @@ -1934,7 +1934,7 @@ READ64_MEMBER(atomiswave_state::aw_modem_r ) return 0; } -WRITE64_MEMBER(atomiswave_state::aw_modem_w ) +void atomiswave_state::aw_modem_w(offs_t offset, uint64_t data, uint64_t mem_mask) { int reg; uint64_t shift; @@ -10741,7 +10741,7 @@ void atomiswave_state::init_atomiswave() m_maincpu->sh2drc_add_fastram(0x00000000, 0x0000ffff, true, ROM); } -READ64_MEMBER(atomiswave_state::xtrmhnt2_hack_r) +uint64_t atomiswave_state::xtrmhnt2_hack_r() { // disable ALL.Net board check if (m_maincpu->pc() == 0xc03cb30) @@ -10759,7 +10759,7 @@ READ64_MEMBER(atomiswave_state::xtrmhnt2_hack_r) void atomiswave_state::init_xtrmhnt2() { init_atomiswave(); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000000, 0x100011f, read64_delegate(*this, FUNC(atomiswave_state::xtrmhnt2_hack_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x1000000, 0x100011f, read64smo_delegate(*this, FUNC(atomiswave_state::xtrmhnt2_hack_r))); } ROM_START( fotns ) diff --git a/src/mame/drivers/naughtyb.cpp b/src/mame/drivers/naughtyb.cpp index 28d132d6991..d7f1dda8e0b 100644 --- a/src/mame/drivers/naughtyb.cpp +++ b/src/mame/drivers/naughtyb.cpp @@ -113,7 +113,7 @@ TODO: #define CLOCK_XTAL 12000000 -READ8_MEMBER(naughtyb_state::in0_port_r) +uint8_t naughtyb_state::in0_port_r() { int in0 = ioport("IN0")->read(); @@ -128,7 +128,7 @@ READ8_MEMBER(naughtyb_state::in0_port_r) return in0; } -READ8_MEMBER(naughtyb_state::dsw0_port_r) +uint8_t naughtyb_state::dsw0_port_r() { // vblank replaces the cabinet dip @@ -144,7 +144,7 @@ READ8_MEMBER(naughtyb_state::dsw0_port_r) Paul Priest: tourniquet@mameworld.net */ -READ8_MEMBER(naughtyb_state::popflame_protection_r)/* Not used by bootleg/hack */ +uint8_t naughtyb_state::popflame_protection_r()/* Not used by bootleg/hack */ { static const int seed00[4] = { 0x78, 0x68, 0x48, 0x38|0x80 }; static const int seed10[4] = { 0x68, 0x60, 0x68, 0x60|0x80 }; @@ -183,7 +183,7 @@ READ8_MEMBER(naughtyb_state::popflame_protection_r)/* Not used by bootleg/hack * #endif } -WRITE8_MEMBER(naughtyb_state::popflame_protection_w) +void naughtyb_state::popflame_protection_w(uint8_t data) { /* Alternative protection check is executed at the end of stage 3, it seems some kind of pseudo "EEPROM" device: @@ -839,10 +839,10 @@ ROM_END void naughtyb_state::init_popflame() { /* install a handler to catch protection checks */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x9000, 0x9000, read8_delegate(*this, FUNC(naughtyb_state::popflame_protection_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x9090, 0x9090, read8_delegate(*this, FUNC(naughtyb_state::popflame_protection_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x9000, 0x9000, read8smo_delegate(*this, FUNC(naughtyb_state::popflame_protection_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x9090, 0x9090, read8smo_delegate(*this, FUNC(naughtyb_state::popflame_protection_r))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xb000, 0xb0ff, write8_delegate(*this, FUNC(naughtyb_state::popflame_protection_w))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xb000, 0xb0ff, write8smo_delegate(*this, FUNC(naughtyb_state::popflame_protection_w))); save_item(NAME(m_popflame_prot_seed)); save_item(NAME(m_r_index)); @@ -850,12 +850,12 @@ void naughtyb_state::init_popflame() } -READ8_MEMBER(naughtyb_state::trvmstr_questions_r) +uint8_t naughtyb_state::trvmstr_questions_r() { return memregion("user1")->base()[m_question_offset]; } -WRITE8_MEMBER(naughtyb_state::trvmstr_questions_w) +void naughtyb_state::trvmstr_questions_w(offs_t offset, uint8_t data) { switch(offset) { @@ -874,7 +874,8 @@ WRITE8_MEMBER(naughtyb_state::trvmstr_questions_w) void naughtyb_state::init_trvmstr() { /* install questions' handlers */ - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xc000, 0xc002, read8_delegate(*this, FUNC(naughtyb_state::trvmstr_questions_r)), write8_delegate(*this, FUNC(naughtyb_state::trvmstr_questions_w))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc000, 0xc002, read8smo_delegate(*this, FUNC(naughtyb_state::trvmstr_questions_r))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xc000, 0xc002, write8sm_delegate(*this, FUNC(naughtyb_state::trvmstr_questions_w))); save_item(NAME(m_question_offset)); } diff --git a/src/mame/drivers/nbmj8688.cpp b/src/mame/drivers/nbmj8688.cpp index 257a486f3f9..6c4d202e0c1 100644 --- a/src/mame/drivers/nbmj8688.cpp +++ b/src/mame/drivers/nbmj8688.cpp @@ -144,7 +144,7 @@ void nbmj8688_state::bikkuri_map(address_map &map) map(0xf800, 0xffff).rom(); } -READ8_MEMBER(nbmj8688_state::ff_r) +uint8_t nbmj8688_state::ff_r() { /* possibly because of a bug, reads from port 0xd0 must return 0xff otherwise apparel doesn't clear the background when you insert a coin */ @@ -187,7 +187,7 @@ void nbmj8688_state::bikkuri_io_map(address_map &map) map(0xe0, 0xe0).w(FUNC(nbmj8688_state::secolove_romsel_w)); } -WRITE8_MEMBER(nbmj8688_state::barline_output_w) +void nbmj8688_state::barline_output_w(uint8_t data) { machine().bookkeeping().coin_lockout_w(0, ~data & 0x80); machine().bookkeeping().coin_counter_w(0, data & 0x02); diff --git a/src/mame/drivers/nbmj8891.cpp b/src/mame/drivers/nbmj8891.cpp index 9bd8cf40530..626baf2fa57 100644 --- a/src/mame/drivers/nbmj8891.cpp +++ b/src/mame/drivers/nbmj8891.cpp @@ -310,7 +310,7 @@ void nbmj8891_state::hanaoji_map(address_map &map) map(0xf800, 0xffff).ram().share("nvram"); } -READ8_MEMBER(nbmj8891_state::taiwanmb_unk_r) +uint8_t nbmj8891_state::taiwanmb_unk_r() { return 0x00; // MCU or 1413M3 STATUS? } diff --git a/src/mame/drivers/nbmj8991.cpp b/src/mame/drivers/nbmj8991.cpp index d58ccebdced..ab054d6cecd 100644 --- a/src/mame/drivers/nbmj8991.cpp +++ b/src/mame/drivers/nbmj8991.cpp @@ -42,7 +42,7 @@ Notes: #include "speaker.h" -WRITE8_MEMBER(nbmj8991_state::soundbank_w) +void nbmj8991_state::soundbank_w(uint8_t data) { if (!(data & 0x80)) m_soundlatch->clear_w(); membank("bank1")->set_entry(data & 0x03); diff --git a/src/mame/drivers/nbmj9195.cpp b/src/mame/drivers/nbmj9195.cpp index 267f980aa04..0eeb1275917 100644 --- a/src/mame/drivers/nbmj9195.cpp +++ b/src/mame/drivers/nbmj9195.cpp @@ -58,7 +58,7 @@ void nbmj9195_state::outcoin_flag_w(uint8_t data) else m_outcoin_flag = 1; } -WRITE8_MEMBER(nbmj9195_state::inputportsel_w) +void nbmj9195_state::inputportsel_w(uint8_t data) { m_inputport = (data ^ 0xff); } diff --git a/src/mame/drivers/nc.cpp b/src/mame/drivers/nc.cpp index 06ec723079d..3ac537f8601 100644 --- a/src/mame/drivers/nc.cpp +++ b/src/mame/drivers/nc.cpp @@ -474,12 +474,12 @@ void nc_state::nc_map(address_map &map) } -READ8_MEMBER(nc_state::nc_memory_management_r) +uint8_t nc_state::nc_memory_management_r(offs_t offset) { return m_memory_config[offset]; } -WRITE8_MEMBER(nc_state::nc_memory_management_w) +void nc_state::nc_memory_management_w(offs_t offset, uint8_t data) { LOG("Memory management W: %02x %02x\n",offset,data); m_memory_config[offset] = data; @@ -487,7 +487,7 @@ WRITE8_MEMBER(nc_state::nc_memory_management_w) nc_refresh_memory_config(); } -WRITE8_MEMBER(nc_state::nc_irq_mask_w) +void nc_state::nc_irq_mask_w(uint8_t data) { LOG("irq mask w: %02x\n", data); LOGDEBUG("irq mask nc200 w: %02x\n",data & ((1<<4) | (1<<5) | (1<<6) | (1<<7))); @@ -498,7 +498,7 @@ WRITE8_MEMBER(nc_state::nc_irq_mask_w) nc_update_interrupts(); } -WRITE8_MEMBER(nc_state::nc_irq_status_w) +void nc_state::nc_irq_status_w(uint8_t data) { LOG("irq status w: %02x\n", data); data = data ^ 0x0ff; @@ -521,7 +521,7 @@ WRITE8_MEMBER(nc_state::nc_irq_status_w) nc_update_interrupts(); } -WRITE8_MEMBER(nc200_state::nc200_irq_status_w) +void nc200_state::nc200_irq_status_w(uint8_t data) { LOG("irq status w: %02x\n", data); data = data ^ 0x0ff; @@ -536,16 +536,16 @@ WRITE8_MEMBER(nc200_state::nc200_irq_status_w) nc_update_interrupts(); } - nc_irq_status_w(space, offset, data, mem_mask); + nc_irq_status_w(data); } -READ8_MEMBER(nc_state::nc_irq_status_r) +uint8_t nc_state::nc_irq_status_r() { return ~((m_irq_status & (~m_irq_latch_mask)) | m_irq_latch); } -READ8_MEMBER(nc_state::nc_key_data_in_r) +uint8_t nc_state::nc_key_data_in_r(offs_t offset) { static const char *const keynames[] = { "LINE0", "LINE1", "LINE2", "LINE3", "LINE4", @@ -598,7 +598,7 @@ void nc_state::nc_sound_update(int channel) beeper_device->set_clock(frequency); } -WRITE8_MEMBER(nc_state::nc_sound_w) +void nc_state::nc_sound_w(offs_t offset, uint8_t data) { LOG("sound w: %04x %02x\n", offset, data); @@ -665,7 +665,7 @@ WRITE_LINE_MEMBER(nc_state::write_uart_clock) m_uart->write_rxc(state); } -WRITE8_MEMBER(nc_state::nc_uart_control_w) +void nc_state::nc_uart_control_w(uint8_t data) { /* same for nc100 and nc200 */ m_centronics->write_strobe(BIT(data, 6)); @@ -696,7 +696,7 @@ WRITE8_MEMBER(nc_state::nc_uart_control_w) -WRITE8_MEMBER(nc_state::nc100_display_memory_start_w) +void nc_state::nc100_display_memory_start_w(uint8_t data) { /* bit 7: A15 */ /* bit 6: A14 */ @@ -709,9 +709,9 @@ WRITE8_MEMBER(nc_state::nc100_display_memory_start_w) } -WRITE8_MEMBER(nc100_state::nc100_uart_control_w) +void nc100_state::nc100_uart_control_w(uint8_t data) { - nc_uart_control_w(space, offset,data); + nc_uart_control_w(data); // /* is this correct?? */ // if (data & (1<<3)) @@ -795,7 +795,7 @@ void nc100_state::machine_reset() } -WRITE8_MEMBER(nc100_state::nc100_poweroff_control_w) +void nc100_state::nc100_poweroff_control_w(uint8_t data) { /* bits 7-1: not used */ /* bit 0: 1 = no effect, 0 = power off */ @@ -805,7 +805,7 @@ WRITE8_MEMBER(nc100_state::nc100_poweroff_control_w) /* nc100 version of card/battery status */ -READ8_MEMBER(nc100_state::nc100_card_battery_status_r) +uint8_t nc100_state::nc100_card_battery_status_r() { int nc_card_battery_status = 0x0fc; @@ -833,7 +833,7 @@ READ8_MEMBER(nc100_state::nc100_card_battery_status_r) return nc_card_battery_status; } -WRITE8_MEMBER(nc100_state::nc100_memory_card_wait_state_w) +void nc100_state::nc100_memory_card_wait_state_w(uint8_t data) { LOG("nc100 memory card wait state: %02x\n",data); } @@ -1005,7 +1005,7 @@ void nc_state::nc150_init_machine() /* NC200 hardware */ #ifdef UNUSED_FUNCTION -WRITE8_MEMBER(nc200_state::nc200_display_memory_start_w) +void nc200_state::nc200_display_memory_start_w(uint8_t data) { /* bit 7: A15 */ /* bit 6: A14 */ @@ -1151,7 +1151,7 @@ NC200: /* nc200 version of card/battery status */ -READ8_MEMBER(nc200_state::nc200_card_battery_status_r) +uint8_t nc200_state::nc200_card_battery_status_r() { int nc_card_battery_status = 0x0ff; @@ -1184,7 +1184,7 @@ READ8_MEMBER(nc200_state::nc200_card_battery_status_r) bit 0: Parallel interface BUSY */ -READ8_MEMBER(nc200_state::nc200_printer_status_r) +uint8_t nc200_state::nc200_printer_status_r() { uint8_t result = 0; @@ -1194,11 +1194,11 @@ READ8_MEMBER(nc200_state::nc200_printer_status_r) } -WRITE8_MEMBER(nc200_state::nc200_uart_control_w) +void nc200_state::nc200_uart_control_w(uint8_t data) { /* int reset_fdc = (m_uart_control^data) & (1<<5); */ - nc_uart_control_w(space, offset,data); + nc_uart_control_w(data); if (data & (1<<3)) { @@ -1224,7 +1224,7 @@ WRITE8_MEMBER(nc200_state::nc200_uart_control_w) /* bit 1: disk motor?? */ /* bit 0: UPD765 Terminal Count input */ -WRITE8_MEMBER(nc200_state::nc200_memory_card_wait_state_w) +void nc200_state::nc200_memory_card_wait_state_w(uint8_t data) { LOGDEBUG("nc200 memory card wait state: PC: %04x %02x\n", m_maincpu->pc(), data); #if 0 @@ -1237,7 +1237,7 @@ WRITE8_MEMBER(nc200_state::nc200_memory_card_wait_state_w) /* bit 2: backlight: 1=off, 0=on */ /* bit 1 cleared to zero in disk code */ /* bit 0 seems to be the same as nc100 */ -WRITE8_MEMBER(nc200_state::nc200_poweroff_control_w) +void nc200_state::nc200_poweroff_control_w(uint8_t data) { LOGDEBUG("nc200 power off: PC: %04x %02x\n", m_maincpu->pc(), data); diff --git a/src/mame/drivers/nds.cpp b/src/mame/drivers/nds.cpp index b2ebec9aa73..da6acaaa177 100644 --- a/src/mame/drivers/nds.cpp +++ b/src/mame/drivers/nds.cpp @@ -70,7 +70,7 @@ static inline void ATTR_PRINTF(3,4) verboselog(device_t &device, int n_level, co } } -READ32_MEMBER(nds_state::arm7_io_r) +uint32_t nds_state::arm7_io_r(offs_t offset, uint32_t mem_mask) { uint8_t temp1, temp2; switch(offset) @@ -195,7 +195,7 @@ READ32_MEMBER(nds_state::arm7_io_r) return 0; } -WRITE32_MEMBER(nds_state::arm7_io_w) +void nds_state::arm7_io_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch(offset) { @@ -358,7 +358,7 @@ WRITE32_MEMBER(nds_state::arm7_io_w) } } -READ32_MEMBER(nds_state::arm9_io_r) +uint32_t nds_state::arm9_io_r(offs_t offset, uint32_t mem_mask) { switch(offset) { @@ -432,7 +432,7 @@ READ32_MEMBER(nds_state::arm9_io_r) return 0; } -WRITE32_MEMBER(nds_state::arm9_io_w) +void nds_state::arm9_io_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch(offset) { @@ -621,12 +621,12 @@ void nds_state::nds9_wram_map(address_map &map) map(0x18000, 0x1ffff).noprw().nopw(); // probably actually open bus? GBATEK describes as "random" } -READ32_MEMBER(nds_state::wram_first_half_r) { return m_WRAM[offset]; } -READ32_MEMBER(nds_state::wram_second_half_r) { return m_WRAM[offset+0x4000]; } -WRITE32_MEMBER(nds_state::wram_first_half_w) { COMBINE_DATA(&m_WRAM[offset]); } -WRITE32_MEMBER(nds_state::wram_second_half_w) { COMBINE_DATA(&m_WRAM[offset+0x4000]); } -READ32_MEMBER(nds_state::wram_arm7mirror_r) { return m_arm7ram[offset]; } -WRITE32_MEMBER(nds_state::wram_arm7mirror_w) { COMBINE_DATA(&m_arm7ram[offset]); } +uint32_t nds_state::wram_first_half_r(offs_t offset) { return m_WRAM[offset]; } +uint32_t nds_state::wram_second_half_r(offs_t offset) { return m_WRAM[offset+0x4000]; } +void nds_state::wram_first_half_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_WRAM[offset]); } +void nds_state::wram_second_half_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_WRAM[offset+0x4000]); } +uint32_t nds_state::wram_arm7mirror_r(offs_t offset) { return m_arm7ram[offset]; } +void nds_state::wram_arm7mirror_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_arm7ram[offset]); } static INPUT_PORTS_START( nds ) INPUT_PORTS_END diff --git a/src/mame/drivers/nemesis.cpp b/src/mame/drivers/nemesis.cpp index bfdb49b57d8..ed2b9f5a00d 100644 --- a/src/mame/drivers/nemesis.cpp +++ b/src/mame/drivers/nemesis.cpp @@ -252,7 +252,7 @@ WRITE_LINE_MEMBER(nemesis_state::sound_nmi_w) m_audiocpu->set_input_line(INPUT_LINE_NMI, state ? ASSERT_LINE : CLEAR_LINE); } -WRITE16_MEMBER(nemesis_state::bubsys_mcu_w) +void nemesis_state::bubsys_mcu_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_bubsys_control_ram[offset]); //logerror("bubsys_mcu_w (%08x) %d (%02x %02x %02x %02x)\n", m_maincpu->pc(), state, m_bubsys_control_ram[0], m_bubsys_control_ram[1], m_bubsys_control_ram[2], m_bubsys_control_ram[3]); @@ -292,19 +292,19 @@ WRITE16_MEMBER(nemesis_state::bubsys_mcu_w) } } -READ16_MEMBER(nemesis_state::gx400_sharedram_word_r) +uint16_t nemesis_state::gx400_sharedram_word_r(offs_t offset) { return m_gx400_shared_ram[offset]; } -WRITE16_MEMBER(nemesis_state::gx400_sharedram_word_w) +void nemesis_state::gx400_sharedram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) m_gx400_shared_ram[offset] = data; } -READ16_MEMBER(nemesis_state::konamigt_input_word_r) +uint16_t nemesis_state::konamigt_input_word_r() { /* bit 0-7: steering @@ -350,7 +350,7 @@ uint8_t nemesis_state::selected_ip_r() } -WRITE8_MEMBER(nemesis_state::nemesis_filter_w) +void nemesis_state::nemesis_filter_w(offs_t offset, uint8_t data) { int C1 = /* offset & 0x1000 ? 4700 : */ 0; // is this right? 4.7uF seems too large int C2 = offset & 0x0800 ? 33 : 0; // 0.033uF = 33 nF @@ -362,13 +362,13 @@ WRITE8_MEMBER(nemesis_state::nemesis_filter_w) // konamigt also uses bits 0x0018, what are they for? } -WRITE8_MEMBER(nemesis_state::gx400_speech_start_w) +void nemesis_state::gx400_speech_start_w(uint8_t data) { m_vlm->st(1); m_vlm->st(0); } -WRITE8_MEMBER(nemesis_state::salamand_speech_start_w) +void nemesis_state::salamand_speech_start_w(uint8_t data) { m_vlm->rst(BIT(data, 0)); m_vlm->st(BIT(data, 1)); @@ -393,7 +393,7 @@ uint8_t nemesis_state::nemesis_portA_r() return res; } -WRITE8_MEMBER(nemesis_state::city_sound_bank_w) +void nemesis_state::city_sound_bank_w(uint8_t data) { int bank_A = (data & 0x03); int bank_B = ((data >> 2) & 0x03); @@ -720,7 +720,7 @@ void nemesis_state::nyanpani_map(address_map &map) map(0x311000, 0x311fff).ram(); } -READ8_MEMBER(nemesis_state::wd_r) +uint8_t nemesis_state::wd_r() { m_frame_counter ^= 1; return m_frame_counter; diff --git a/src/mame/drivers/neogeo.cpp b/src/mame/drivers/neogeo.cpp index d8d92fd4247..eee92e5e0d0 100644 --- a/src/mame/drivers/neogeo.cpp +++ b/src/mame/drivers/neogeo.cpp @@ -878,7 +878,7 @@ void neogeo_base_state::start_interrupt_timers() * *************************************/ -WRITE8_MEMBER(neogeo_base_state::audio_cpu_enable_nmi_w) +void neogeo_base_state::audio_cpu_enable_nmi_w(offs_t offset, uint8_t data) { // out ($08) enables the nmi, out ($18) disables it m_audionmi->in_w<1>(BIT(~offset, 4)); @@ -892,22 +892,22 @@ WRITE8_MEMBER(neogeo_base_state::audio_cpu_enable_nmi_w) * *************************************/ -READ16_MEMBER(ngarcade_base_state::in0_edge_r) +uint16_t ngarcade_base_state::in0_edge_r() { return (m_edge->in0_r() << 8) | m_dsw->read(); } -READ16_MEMBER(ngarcade_base_state::in0_edge_joy_r) +uint16_t ngarcade_base_state::in0_edge_joy_r() { return ((m_edge->in0_r() & m_ctrl1->read_ctrl()) << 8) | m_dsw->read(); } -READ16_MEMBER(ngarcade_base_state::in1_edge_r) +uint16_t ngarcade_base_state::in1_edge_r() { return (m_edge->in1_r() << 8) | 0xff; } -READ16_MEMBER(ngarcade_base_state::in1_edge_joy_r) +uint16_t ngarcade_base_state::in1_edge_joy_r() { return ((m_edge->in1_r() & m_ctrl2->read_ctrl()) << 8) | 0xff; } @@ -989,7 +989,7 @@ void mvs_state::io_control_w(offs_t offset, uint8_t data) } -WRITE8_MEMBER(neogeo_base_state::audio_command_w) +void neogeo_base_state::audio_command_w(uint8_t data) { // glitches in s1945p without the boost_interleave here m_soundlatch->write(data); @@ -1003,7 +1003,7 @@ WRITE8_MEMBER(neogeo_base_state::audio_command_w) * *************************************/ -READ16_MEMBER(neogeo_base_state::unmapped_r) +uint16_t neogeo_base_state::unmapped_r(address_space &space) { uint16_t ret; @@ -1036,7 +1036,7 @@ WRITE_LINE_MEMBER(ngarcade_base_state::set_save_ram_unlock) } -WRITE16_MEMBER(ngarcade_base_state::save_ram_w) +void ngarcade_base_state::save_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (m_save_ram_unlocked) COMBINE_DATA(&m_save_ram[offset]); @@ -1058,7 +1058,7 @@ CUSTOM_INPUT_MEMBER(neogeo_base_state::get_memcard_status) } -READ16_MEMBER(neogeo_base_state::memcard_r) +uint16_t neogeo_base_state::memcard_r(offs_t offset) { m_maincpu->eat_cycles(2); // insert waitstate @@ -1073,7 +1073,7 @@ READ16_MEMBER(neogeo_base_state::memcard_r) } -WRITE16_MEMBER(neogeo_base_state::memcard_w) +void neogeo_base_state::memcard_w(offs_t offset, uint16_t data, uint16_t mem_mask) { m_maincpu->eat_cycles(2); // insert waitstate @@ -1105,7 +1105,7 @@ CUSTOM_INPUT_MEMBER(neogeo_base_state::get_audio_result) * *************************************/ -READ8_MEMBER(neogeo_base_state::audio_cpu_bank_select_r) +uint8_t neogeo_base_state::audio_cpu_bank_select_r(offs_t offset) { m_bank_audio_cart[offset & 3]->set_entry(offset >> 8); @@ -1134,7 +1134,7 @@ WRITE_LINE_MEMBER(neogeo_base_state::set_use_cart_audio) } -WRITE16_MEMBER(neogeo_base_state::write_banksel) +void neogeo_base_state::write_banksel(uint16_t data) { uint32_t len = (!m_slots[m_curr_slot] || m_slots[m_curr_slot]->get_rom_size() == 0) ? m_region_maincpu->bytes() : m_slots[m_curr_slot]->get_rom_size(); @@ -1218,16 +1218,16 @@ void mvs_led_el_state::output_strobe(uint8_t bits, uint8_t data) // FIXME: These are a temporary workaround for slot-driven bankswitch with protected carts. // A cleaner implementation is in progress. -WRITE16_MEMBER(neogeo_base_state::write_bankprot) +void neogeo_base_state::write_bankprot(uint16_t data) { m_bank_base = m_slots[m_curr_slot]->get_bank_base(data); m_bank_cartridge->set_base((uint8_t *)m_slots[m_curr_slot]->get_rom_base() + m_bank_base); } -WRITE16_MEMBER(neogeo_base_state::write_bankprot_pvc) +void neogeo_base_state::write_bankprot_pvc(offs_t offset, uint16_t data, uint16_t mem_mask) { // write to cart ram - m_slots[m_curr_slot]->protection_w(space, offset, data, mem_mask); + m_slots[m_curr_slot]->protection_w(offset, data, mem_mask); // actual bankswitch if (offset >= 0xff8) @@ -1237,10 +1237,10 @@ WRITE16_MEMBER(neogeo_base_state::write_bankprot_pvc) } } -WRITE16_MEMBER(neogeo_base_state::write_bankprot_kf2k3bl) +void neogeo_base_state::write_bankprot_kf2k3bl(offs_t offset, uint16_t data, uint16_t mem_mask) { // write to cart ram - m_slots[m_curr_slot]->protection_w(space, offset, data, mem_mask); + m_slots[m_curr_slot]->protection_w(offset, data, mem_mask); // actual bankswitch if (offset == 0x1ff0/2 || offset == 0x1ff2/2) @@ -1250,7 +1250,7 @@ WRITE16_MEMBER(neogeo_base_state::write_bankprot_kf2k3bl) } } -WRITE16_MEMBER(neogeo_base_state::write_bankprot_ms5p) +void neogeo_base_state::write_bankprot_ms5p(offs_t offset, uint16_t data) { logerror("ms5plus bankswitch - offset: %06x PC %06x: set banking %04x\n", offset, m_maincpu->pc(), data); @@ -1266,9 +1266,9 @@ WRITE16_MEMBER(neogeo_base_state::write_bankprot_ms5p) } } -WRITE16_MEMBER(neogeo_base_state::write_bankprot_kof10th) +void neogeo_base_state::write_bankprot_kof10th(offs_t offset, uint16_t data, uint16_t mem_mask) { - m_slots[m_curr_slot]->protection_w(space, offset, data, mem_mask); + m_slots[m_curr_slot]->protection_w(offset, data, mem_mask); if (offset == 0xffff0/2) { @@ -1278,7 +1278,7 @@ WRITE16_MEMBER(neogeo_base_state::write_bankprot_kof10th) } } -READ16_MEMBER(neogeo_base_state::read_lorom_kof10th) +uint16_t neogeo_base_state::read_lorom_kof10th(offs_t offset) { uint16_t* rom = (m_slots[m_curr_slot] && m_slots[m_curr_slot]->get_rom_size() > 0) ? m_slots[m_curr_slot]->get_rom_base() : (uint16_t*)m_region_maincpu->base(); if (offset + 0x80/2 >= 0x10000/2) @@ -1406,7 +1406,7 @@ void neogeo_base_state::set_slot_idx(int slot) space.install_read_bank(0x200000, 0x2fffff, "cartridge"); - space.install_write_handler(0x2ffff0, 0x2fffff, write16_delegate(*this, FUNC(neogeo_base_state::write_banksel))); + space.install_write_handler(0x2ffff0, 0x2fffff, write16smo_delegate(*this, FUNC(neogeo_base_state::write_banksel))); m_bank_cartridge = membank("cartridge"); init_cpu(); @@ -1425,49 +1425,51 @@ void neogeo_base_state::set_slot_idx(int slot) switch (type) { case NEOGEO_FATFURY2: - space.install_readwrite_handler(0x200000, 0x2fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); + space.install_read_handler(0x200000, 0x2fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x200000, 0x2fffff, write16s_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); break; case NEOGEO_KOF98: - space.install_read_handler(0x00100, 0x00103, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); - space.install_write_handler(0x20aaaa, 0x20aaab, write16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); + space.install_read_handler(0x00100, 0x00103, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x20aaaa, 0x20aaab, write16s_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); break; case NEOGEO_MSLUGX: - space.install_readwrite_handler(0x2fffe0, 0x2fffef, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); + space.install_read_handler(0x2fffe0, 0x2fffef, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x2fffe0, 0x2fffef, write16s_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); break; case NEOGEO_KOF99: // addon_r here gives SMA random number - space.install_write_handler(0x2ffff0, 0x2ffff1, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); - space.install_read_handler(0x2fe446, 0x2fe447, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); - space.install_read_handler(0x2ffff8, 0x2ffff9, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); - space.install_read_handler(0x2ffffa, 0x2ffffb, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_write_handler(0x2ffff0, 0x2ffff1, write16smo_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); + space.install_read_handler(0x2fe446, 0x2fe447, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_read_handler(0x2ffff8, 0x2ffff9, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_read_handler(0x2ffffa, 0x2ffffb, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); break; case NEOGEO_GAROU: // addon_r here gives SMA random number - space.install_write_handler(0x2fffc0, 0x2fffc1, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); - space.install_read_handler(0x2fe446, 0x2fe447, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); - space.install_read_handler(0x2fffcc, 0x2fffcd, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); - space.install_read_handler(0x2ffff0, 0x2ffff1, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_write_handler(0x2fffc0, 0x2fffc1, write16smo_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); + space.install_read_handler(0x2fe446, 0x2fe447, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_read_handler(0x2fffcc, 0x2fffcd, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_read_handler(0x2ffff0, 0x2ffff1, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); break; case NEOGEO_GAROUH: // addon_r here gives SMA random number - space.install_write_handler(0x2fffc0, 0x2fffc1, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); - space.install_read_handler(0x2fe446, 0x2fe447, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); - space.install_read_handler(0x2fffcc, 0x2fffcd, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); - space.install_read_handler(0x2ffff0, 0x2ffff1, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_write_handler(0x2fffc0, 0x2fffc1, write16smo_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); + space.install_read_handler(0x2fe446, 0x2fe447, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_read_handler(0x2fffcc, 0x2fffcd, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_read_handler(0x2ffff0, 0x2ffff1, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); break; case NEOGEO_MSLUG3: case NEOGEO_MSLUG3A: - space.install_write_handler(0x2fffe4, 0x2fffe5, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); - space.install_read_handler(0x2fe446, 0x2fe447, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); - //space.install_read_handler(0x2ffff8, 0x2ffff9, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); - //space.install_read_handler(0x2ffffa, 0x2ffffb, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_write_handler(0x2fffe4, 0x2fffe5, write16smo_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); + space.install_read_handler(0x2fe446, 0x2fe447, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + //space.install_read_handler(0x2ffff8, 0x2ffff9, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + //space.install_read_handler(0x2ffffa, 0x2ffffb, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); break; case NEOGEO_KOF2K: // addon_r here gives SMA random number - space.install_write_handler(0x2fffec, 0x2fffed, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); - space.install_read_handler(0x2fe446, 0x2fe447, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); - space.install_read_handler(0x2fffd8, 0x2fffd9, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); - space.install_read_handler(0x2fffda, 0x2fffdb, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_write_handler(0x2fffec, 0x2fffed, write16smo_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); + space.install_read_handler(0x2fe446, 0x2fe447, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_read_handler(0x2fffd8, 0x2fffd9, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_read_handler(0x2fffda, 0x2fffdb, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); break; case NEOGEO_MSLUG5: case NEOGEO_SVC: @@ -1475,26 +1477,30 @@ void neogeo_base_state::set_slot_idx(int slot) case NEOGEO_KOF2K3H: case NEOGEO_SVCBOOT: case NEOGEO_SVCSPLUS: - space.install_readwrite_handler(0x2fe000, 0x2fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot_pvc))); + space.install_read_handler(0x2fe000, 0x2fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x2fe000, 0x2fffff, write16s_delegate(*this, FUNC(neogeo_base_state::write_bankprot_pvc))); break; case NEOGEO_CTHD2K3: case NEOGEO_CT2K3SP: - space.install_write_handler(0x2ffff0, 0x2ffff1, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); + space.install_write_handler(0x2ffff0, 0x2ffff1, write16smo_delegate(*this, FUNC(neogeo_base_state::write_bankprot))); break; case NEOGEO_MSLUG5P: - space.install_readwrite_handler(0x2ffff0, 0x2fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot_ms5p))); + space.install_read_handler(0x2ffff0, 0x2fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x2ffff0, 0x2fffff, write16sm_delegate(*this, FUNC(neogeo_base_state::write_bankprot_ms5p))); break; case NEOGEO_KOG: - space.install_read_handler(0x0ffffe, 0x0fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_read_handler(0x0ffffe, 0x0fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); break; case NEOGEO_KOF2K3B: case NEOGEO_KOF2K3UP: // addon_r here gives m_overlay member from bootleg protection (possibly hack?) - space.install_readwrite_handler(0x2fe000, 0x2fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot_kf2k3bl))); - space.install_read_handler(0x58196, 0x58197, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_read_handler(0x2fe000, 0x2fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x2fe000, 0x2fffff, write16s_delegate(*this, FUNC(neogeo_base_state::write_bankprot_kf2k3bl))); + space.install_read_handler(0x58196, 0x58197, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); break; case NEOGEO_KOF2K3P: - space.install_readwrite_handler(0x2fe000, 0x2fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot_kf2k3bl))); + space.install_read_handler(0x2fe000, 0x2fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x2fe000, 0x2fffff, write16s_delegate(*this, FUNC(neogeo_base_state::write_bankprot_kf2k3bl))); break; case NEOGEO_SBP: // there seems to be a protection device living around here.. @@ -1502,21 +1508,24 @@ void neogeo_base_state::set_slot_idx(int slot) // there are also writes to 0x1080.. // // other stuff going on as well tho, the main overlay is still missing, and p1 inputs don't work - space.install_readwrite_handler(0x00200, 0x001fff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r)), write16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); + space.install_read_handler(0x00200, 0x001fff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_write_handler(0x00200, 0x001fff, write16s_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_w))); break; case NEOGEO_KOF10TH: // addon_r here reads from ram2 bank - space.install_read_handler(0x000080, 0x0dffff, read16_delegate(*this, FUNC(neogeo_base_state::read_lorom_kof10th))); - space.install_read_handler(0x0e0000, 0x0fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); - space.install_read_handler(0x2fe000, 0x2fffff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); + space.install_read_handler(0x000080, 0x0dffff, read16sm_delegate(*this, FUNC(neogeo_base_state::read_lorom_kof10th))); + space.install_read_handler(0x0e0000, 0x0fffff, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::addon_r))); + space.install_read_handler(0x2fe000, 0x2fffff, read16m_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::protection_r))); // REVIEW ME: we might possibly need to split this, by adding further write handlers - space.install_write_handler(0x200000, 0x2fffff, write16_delegate(*this, FUNC(neogeo_base_state::write_bankprot_kof10th))); + space.install_write_handler(0x200000, 0x2fffff, write16s_delegate(*this, FUNC(neogeo_base_state::write_bankprot_kof10th))); break; case NEOGEO_JOCKEYGP: - space.install_readwrite_handler(0x200000, 0x201fff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_r)), write16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_w))); + space.install_read_handler(0x200000, 0x201fff, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_r))); + space.install_write_handler(0x200000, 0x201fff, write16s_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_w))); break; case NEOGEO_VLINER: - space.install_readwrite_handler(0x200000, 0x201fff, read16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_r)), write16_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_w))); + space.install_read_handler(0x200000, 0x201fff, read16sm_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_r))); + space.install_write_handler(0x200000, 0x201fff, write16s_delegate(*m_slots[m_curr_slot], FUNC(neogeo_cart_slot_device::ram_w))); // custom input handling... install it here for the moment. space.install_read_port(0x300000, 0x300001, 0x01ff7e, "DSW"); space.install_read_port(0x280000, 0x280001, "IN5"); @@ -1564,19 +1573,20 @@ void ngarcade_base_state::machine_start() address_space &main_program_space(m_maincpu->space(AS_PROGRAM)); if (m_ctrl1) - main_program_space.install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, 0, read16_delegate(*this, FUNC(ngarcade_base_state::in0_edge_joy_r))); + main_program_space.install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, 0, read16smo_delegate(*this, FUNC(ngarcade_base_state::in0_edge_joy_r))); else if (m_edge) - main_program_space.install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, 0, read16_delegate(*this, FUNC(ngarcade_base_state::in0_edge_r))); + main_program_space.install_read_handler(0x300000, 0x300001, 0, 0x01ff7e, 0, read16smo_delegate(*this, FUNC(ngarcade_base_state::in0_edge_r))); if (m_ctrl2) - main_program_space.install_read_handler(0x340000, 0x340001, 0, 0x01fffe, 0, read16_delegate(*this, FUNC(ngarcade_base_state::in1_edge_joy_r))); + main_program_space.install_read_handler(0x340000, 0x340001, 0, 0x01fffe, 0, read16smo_delegate(*this, FUNC(ngarcade_base_state::in1_edge_joy_r))); else if (m_edge) - main_program_space.install_read_handler(0x340000, 0x340001, 0, 0x01fffe, 0, read16_delegate(*this, FUNC(ngarcade_base_state::in1_edge_r))); + main_program_space.install_read_handler(0x340000, 0x340001, 0, 0x01fffe, 0, read16smo_delegate(*this, FUNC(ngarcade_base_state::in1_edge_r))); if (m_memcard) { main_program_space.unmap_readwrite(0x800000, 0x800fff); - main_program_space.install_readwrite_handler(0x800000, 0x800fff, read16_delegate(*this, FUNC(ngarcade_base_state::memcard_r)), write16_delegate(*this, FUNC(ngarcade_base_state::memcard_w))); + main_program_space.install_read_handler(0x800000, 0x800fff, read16sm_delegate(*this, FUNC(ngarcade_base_state::memcard_r))); + main_program_space.install_write_handler(0x800000, 0x800fff, write16s_delegate(*this, FUNC(ngarcade_base_state::memcard_w))); } // enable rtc and serial mode @@ -1675,7 +1685,7 @@ void ngarcade_base_state::machine_reset() *************************************/ -READ16_MEMBER(neogeo_base_state::banked_vectors_r) +uint16_t neogeo_base_state::banked_vectors_r(offs_t offset) { if (!m_use_cart_vectors) { @@ -1727,7 +1737,7 @@ void ngarcade_base_state::neogeo_main_map(address_map &map) -READ16_MEMBER(aes_base_state::aes_in2_r) +uint16_t aes_base_state::aes_in2_r() { uint32_t ret = m_io_in2->read() & 0xf0ff; ret |= ((m_ctrl1->read_start_sel() & 0x03) << 8) | ((m_ctrl2->read_start_sel() & 0x03) << 10); diff --git a/src/mame/drivers/nes.cpp b/src/mame/drivers/nes.cpp index 4ad7f1966d4..0976aac72ca 100644 --- a/src/mame/drivers/nes.cpp +++ b/src/mame/drivers/nes.cpp @@ -2,7 +2,7 @@ // copyright-holders:Brad Oliver,Fabio Priuli /*************************************************************************** - nes.c + nes.cpp Driver file to handle emulation of the Nintendo Entertainment System (Famicom). @@ -20,7 +20,7 @@ #include "speaker.h" -WRITE8_MEMBER(nes_state::nes_vh_sprite_dma_w) +void nes_state::nes_vh_sprite_dma_w(address_space &space, uint8_t data) { m_ppu->spriteram_dma(space, data); } diff --git a/src/mame/drivers/next.cpp b/src/mame/drivers/next.cpp index bf520ac5891..c210f29cbae 100644 --- a/src/mame/drivers/next.cpp +++ b/src/mame/drivers/next.cpp @@ -82,14 +82,14 @@ uint32_t next_state::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, } /* map ROM at 0x01000000-0x0101ffff? */ -READ32_MEMBER( next_state::rom_map_r ) +uint32_t next_state::rom_map_r() { if(0 && !machine().side_effects_disabled()) printf("%08x ROM MAP?\n",maincpu->pc()); return 0x01000000; } -READ32_MEMBER( next_state::scr2_r ) +uint32_t next_state::scr2_r() { if(0 && !machine().side_effects_disabled()) printf("%08x\n",maincpu->pc()); @@ -126,7 +126,7 @@ READ32_MEMBER( next_state::scr2_r ) return data; } -WRITE32_MEMBER( next_state::scr2_w ) +void next_state::scr2_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if(0 && !machine().side_effects_disabled()) printf("scr2_w %08x (%08x)\n", data, maincpu->pc()); @@ -139,7 +139,7 @@ WRITE32_MEMBER( next_state::scr2_w ) irq_set(1, scr2 & 0x02000000); } -READ32_MEMBER( next_state::scr1_r ) +uint32_t next_state::scr1_r() { /* xxxx ---- ---- ---- ---- ---- ---- ---- slot ID @@ -217,17 +217,17 @@ void next_state::irq_set(int id, bool raise) } -READ32_MEMBER( next_state::irq_status_r ) +uint32_t next_state::irq_status_r() { return irq_status; } -READ32_MEMBER( next_state::irq_mask_r ) +uint32_t next_state::irq_mask_r() { return irq_mask; } -WRITE32_MEMBER( next_state::irq_mask_w ) +void next_state::irq_mask_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&irq_mask); irq_check(); @@ -434,7 +434,7 @@ void next_state::dma_check_end(int slot, bool eof) dma_end(slot); } -READ32_MEMBER( next_state::dma_regs_r) +uint32_t next_state::dma_regs_r(offs_t offset) { int slot = offset >> 2; int reg = offset & 3; @@ -462,7 +462,7 @@ READ32_MEMBER( next_state::dma_regs_r) return res; } -WRITE32_MEMBER( next_state::dma_regs_w) +void next_state::dma_regs_w(offs_t offset, uint32_t data) { int slot = offset >> 2; int reg = offset & 3; @@ -487,7 +487,7 @@ WRITE32_MEMBER( next_state::dma_regs_w) } } -READ32_MEMBER( next_state::dma_ctrl_r) +uint32_t next_state::dma_ctrl_r(offs_t offset) { int slot = offset >> 2; int reg = offset & 3; @@ -500,7 +500,7 @@ READ32_MEMBER( next_state::dma_ctrl_r) return reg ? 0 : dma_slots[slot].state << 24; } -WRITE32_MEMBER( next_state::dma_ctrl_w) +void next_state::dma_ctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask) { int slot = offset >> 2; int reg = offset & 3; @@ -559,14 +559,14 @@ void next_state::dma_do_ctrl_w(int slot, uint8_t data) int const next_state::scsi_clocks[4] = { 10000000, 12000000, 20000000, 16000000 }; -READ32_MEMBER( next_state::scsictrl_r ) +uint32_t next_state::scsictrl_r(offs_t offset, uint32_t mem_mask) { uint32_t res = (scsictrl << 24) | (scsistat << 16); logerror("scsictrl_read %08x @ %08x (%08x)\n", res, mem_mask, maincpu->pc()); return res; } -WRITE32_MEMBER( next_state::scsictrl_w ) +void next_state::scsictrl_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if(ACCESSING_BITS_24_31) { scsictrl = data >> 24; @@ -590,7 +590,7 @@ WRITE32_MEMBER( next_state::scsictrl_w ) } } -READ32_MEMBER( next_state::event_counter_r) +uint32_t next_state::event_counter_r(offs_t offset, uint32_t mem_mask) { // Event counters, around that time, are usually fixed-frequency counters. // This one being 1MHz seems to make sense @@ -602,17 +602,17 @@ READ32_MEMBER( next_state::event_counter_r) return eventc_latch; } -READ32_MEMBER( next_state::dsp_r) +uint32_t next_state::dsp_r() { return 0x7fffffff; } -WRITE32_MEMBER( next_state::fdc_control_w ) +void next_state::fdc_control_w(uint32_t data) { logerror("FDC write %02x (%08x)\n", data >> 24, maincpu->pc()); } -READ32_MEMBER( next_state::fdc_control_r ) +uint32_t next_state::fdc_control_r() { // Type of floppy present // 0 = no floppy in drive @@ -646,13 +646,13 @@ READ32_MEMBER( next_state::fdc_control_r ) return 0 << 24; } -READ32_MEMBER( next_state::phy_r ) +uint32_t next_state::phy_r(offs_t offset) { logerror("phy_r %d %08x (%08x)\n", offset, phy[offset], maincpu->pc()); return phy[offset] | (0 << 24); } -WRITE32_MEMBER( next_state::phy_w ) +void next_state::phy_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(phy+offset); logerror("phy_w %d %08x (%08x)\n", offset, phy[offset], maincpu->pc()); @@ -668,14 +668,14 @@ void next_state::device_timer(emu_timer &timer, device_timer_id id, int param, v timer_ctrl &= 0x7fffffff; } -READ32_MEMBER( next_state::timer_data_r ) +uint32_t next_state::timer_data_r() { if(timer_ctrl & 0x80000000) timer_update(); return timer_data; } -WRITE32_MEMBER( next_state::timer_data_w ) +void next_state::timer_data_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if(timer_ctrl & 0x80000000) { COMBINE_DATA(&timer_next_data); @@ -686,13 +686,13 @@ WRITE32_MEMBER( next_state::timer_data_w ) } } -READ32_MEMBER( next_state::timer_ctrl_r ) +uint32_t next_state::timer_ctrl_r() { irq_set(29, false); return timer_ctrl; } -WRITE32_MEMBER( next_state::timer_ctrl_w ) +void next_state::timer_ctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask) { bool oldact = timer_ctrl & 0x80000000; COMBINE_DATA(&timer_ctrl); @@ -793,7 +793,7 @@ WRITE_LINE_MEMBER(next_state::scsi_drq) dma_drq_w(1, state); } -WRITE8_MEMBER(next_state::ramdac_w) +void next_state::ramdac_w(offs_t offset, uint8_t data) { switch(offset) { case 0: diff --git a/src/mame/drivers/nforcepc.cpp b/src/mame/drivers/nforcepc.cpp index e35d2d9128d..06d2db89863 100644 --- a/src/mame/drivers/nforcepc.cpp +++ b/src/mame/drivers/nforcepc.cpp @@ -76,7 +76,7 @@ void crush11_host_device::config_map(address_map &map) map(0xf0, 0xf0).rw(FUNC(crush11_host_device::unknown_r), FUNC(crush11_host_device::unknown_w)); } -READ8_MEMBER(crush11_host_device::header_type_r) +uint8_t crush11_host_device::header_type_r() { return 0x80; // from lspci dump } @@ -128,22 +128,22 @@ void crush11_host_device::bios_map(address_map &map) map(0xfffc0000, 0xffffffff).rw(biosrom, FUNC(intelfsh8_device::read), FUNC(intelfsh8_device::write)); } -READ8_MEMBER(crush11_host_device::unknown_r) +uint8_t crush11_host_device::unknown_r() { return 4; } -WRITE8_MEMBER(crush11_host_device::unknown_w) +void crush11_host_device::unknown_w(uint8_t data) { logerror("test = %02x\n", data); } -READ32_MEMBER(crush11_host_device::ram_size_r) +uint32_t crush11_host_device::ram_size_r() { return ram_size * 1024 * 1024 - 1; } -WRITE32_MEMBER(crush11_host_device::ram_size_w) +void crush11_host_device::ram_size_w(uint32_t data) { logerror("trying to set size = %d\n", data); } @@ -462,7 +462,7 @@ void it8703f_device::device_add_mconfig(machine_config &config) m_kbdc->gate_a20_callback().set(FUNC(it8703f_device::kbdp21_gp25_gatea20_w)); } -READ8_MEMBER(it8703f_device::read_it8703f) +uint8_t it8703f_device::read_it8703f(offs_t offset) { if (offset == 0) { @@ -483,7 +483,7 @@ READ8_MEMBER(it8703f_device::read_it8703f) return 0; } -WRITE8_MEMBER(it8703f_device::write_it8703f) +void it8703f_device::write_it8703f(offs_t offset, uint8_t data) { uint8_t byt; @@ -905,12 +905,12 @@ void it8703f_device::map_lpt(address_map& map) map(0x0, 0x3).rw(FUNC(it8703f_device::lpt_read), FUNC(it8703f_device::lpt_write)); } -READ8_MEMBER(it8703f_device::lpt_read) +uint8_t it8703f_device::lpt_read(offs_t offset) { return pc_lpt_lptdev->read(offset); } -WRITE8_MEMBER(it8703f_device::lpt_write) +void it8703f_device::lpt_write(offs_t offset, uint8_t data) { pc_lpt_lptdev->write(offset, data); } @@ -927,12 +927,12 @@ void it8703f_device::map_serial1(address_map& map) map(0x0, 0x7).rw(FUNC(it8703f_device::serial1_read), FUNC(it8703f_device::serial1_write)); } -READ8_MEMBER(it8703f_device::serial1_read) +uint8_t it8703f_device::serial1_read(offs_t offset) { return pc_serial1_comdev->ins8250_r(offset); } -WRITE8_MEMBER(it8703f_device::serial1_write) +void it8703f_device::serial1_write(offs_t offset, uint8_t data) { pc_serial1_comdev->ins8250_w(offset, data); } @@ -949,12 +949,12 @@ void it8703f_device::map_serial2(address_map& map) map(0x0, 0x7).rw(FUNC(it8703f_device::serial2_read), FUNC(it8703f_device::serial2_write)); } -READ8_MEMBER(it8703f_device::serial2_read) +uint8_t it8703f_device::serial2_read(offs_t offset) { return pc_serial2_comdev->ins8250_r(offset); } -WRITE8_MEMBER(it8703f_device::serial2_write) +void it8703f_device::serial2_write(offs_t offset, uint8_t data) { pc_serial2_comdev->ins8250_w(offset, data); } @@ -972,7 +972,7 @@ void it8703f_device::map_keyboard(address_map &map) map(0x4, 0x4).rw(FUNC(it8703f_device::keybc_status_r), FUNC(it8703f_device::keybc_command_w)); } -READ8_MEMBER(it8703f_device::at_keybc_r) +uint8_t it8703f_device::at_keybc_r(offs_t offset) { switch (offset) //m_kbdc { @@ -983,7 +983,7 @@ READ8_MEMBER(it8703f_device::at_keybc_r) return 0xff; } -WRITE8_MEMBER(it8703f_device::at_keybc_w) +void it8703f_device::at_keybc_w(offs_t offset, uint8_t data) { switch (offset) { @@ -992,12 +992,12 @@ WRITE8_MEMBER(it8703f_device::at_keybc_w) } } -READ8_MEMBER(it8703f_device::keybc_status_r) +uint8_t it8703f_device::keybc_status_r() { return m_kbdc->data_r(4); } -WRITE8_MEMBER(it8703f_device::keybc_command_w) +void it8703f_device::keybc_command_w(uint8_t data) { m_kbdc->data_w(4, data); } diff --git a/src/mame/drivers/ninjakd2.cpp b/src/mame/drivers/ninjakd2.cpp index 1bc0762f53d..0b61aed922f 100644 --- a/src/mame/drivers/ninjakd2.cpp +++ b/src/mame/drivers/ninjakd2.cpp @@ -194,7 +194,7 @@ SAMPLES_START_CB_MEMBER(ninjakd2_state::ninjakd2_init_samples) m_sampledata = sampledata; } -WRITE8_MEMBER(ninjakd2_state::ninjakd2_pcm_play_w) +void ninjakd2_state::ninjakd2_pcm_play_w(uint8_t data) { // only Ninja Kid II uses this if (m_pcm_region == nullptr) @@ -249,7 +249,7 @@ void omegaf_state::io_protection_reset() m_io_protection_tick = 0; } -READ8_MEMBER(omegaf_state::io_protection_r) +uint8_t omegaf_state::io_protection_r(offs_t offset) { uint8_t result = 0xff; @@ -332,7 +332,7 @@ READ8_MEMBER(omegaf_state::io_protection_r) return result; } -WRITE8_MEMBER(omegaf_state::io_protection_w) +void omegaf_state::io_protection_w(offs_t offset, uint8_t data) { // load parameter on c006 bit 0 rise transition if (offset == 2 && (data & 1) && !(m_io_protection[2] & 1)) @@ -348,12 +348,12 @@ WRITE8_MEMBER(omegaf_state::io_protection_w) /*****************************************************************************/ -WRITE8_MEMBER(ninjakd2_state::ninjakd2_bankselect_w) +void ninjakd2_state::ninjakd2_bankselect_w(uint8_t data) { m_mainbank->set_entry(data & m_rom_bank_mask); } -WRITE8_MEMBER(ninjakd2_state::ninjakd2_soundreset_w) +void ninjakd2_state::ninjakd2_soundreset_w(uint8_t data) { // bit 4 resets sound CPU m_soundcpu->set_input_line(INPUT_LINE_RESET, (data & 0x10) ? ASSERT_LINE : CLEAR_LINE); @@ -365,19 +365,19 @@ WRITE8_MEMBER(ninjakd2_state::ninjakd2_soundreset_w) } template -WRITE8_MEMBER(robokid_state::robokid_bg_bank_w) +void robokid_state::robokid_bg_bank_w(uint8_t data) { m_robokid_bg_bank[Layer] = data & m_vram_bank_mask; } template -READ8_MEMBER(robokid_state::robokid_bg_videoram_r) +uint8_t robokid_state::robokid_bg_videoram_r(offs_t offset) { return m_robokid_bg_videoram[Layer][(m_robokid_bg_bank[Layer] << 10) | offset]; } template -WRITE8_MEMBER(robokid_state::robokid_bg_videoram_w) +void robokid_state::robokid_bg_videoram_w(offs_t offset, uint8_t data) { int const address = (m_robokid_bg_bank[Layer] << 10 ) | offset; @@ -386,7 +386,7 @@ WRITE8_MEMBER(robokid_state::robokid_bg_videoram_w) } template -WRITE8_MEMBER(robokid_state::robokid_bg_ctrl_w) +void robokid_state::robokid_bg_ctrl_w(offs_t offset, uint8_t data) { bg_ctrl(offset, data, m_robokid_tilemap[Layer]); } @@ -395,7 +395,7 @@ WRITE8_MEMBER(robokid_state::robokid_bg_ctrl_w) // returning 0 and no small enemies shoot any bullet. // returning 0xff seems enough // TODO: find a better reference and verify if there are more gameplay quirks, this might really be anything! -READ8_MEMBER(omegaf_state::unk_r) +uint8_t omegaf_state::unk_r() { return 0xff; } @@ -1642,7 +1642,7 @@ void mnight_state::init_mnight() /*****************************************************************************/ -READ8_MEMBER(robokid_state::motion_error_verbose_r) +uint8_t robokid_state::motion_error_verbose_r() { popmessage("%s MOTION ERROR, contact MAMEdev", machine().system().name); logerror("maincpu %04x MOTION ERROR\n", m_maincpu->pc()); @@ -1663,7 +1663,7 @@ void robokid_state::motion_error_kludge(uint16_t offset) ROM[2] = 0x18; ROM[3] = 0xf6; // jr $-8 - m_maincpu->space(AS_PROGRAM).install_read_handler(offset, offset, read8_delegate(*this, FUNC(robokid_state::motion_error_verbose_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(offset, offset, read8smo_delegate(*this, FUNC(robokid_state::motion_error_verbose_r))); } void robokid_state::init_robokid() diff --git a/src/mame/drivers/niyanpai.cpp b/src/mame/drivers/niyanpai.cpp index 27fb69507f2..d7066fe210e 100644 --- a/src/mame/drivers/niyanpai.cpp +++ b/src/mame/drivers/niyanpai.cpp @@ -60,7 +60,7 @@ void niyanpai_state::init_niyanpai() } -READ16_MEMBER(niyanpai_state::dipsw_r) +uint16_t niyanpai_state::dipsw_r() { uint8_t dipsw_a = ioport("DSWA")->read(); uint8_t dipsw_b = ioport("DSWB")->read(); @@ -78,7 +78,7 @@ MACHINE_START_MEMBER(niyanpai_state, musobana) save_item(NAME(m_musobana_outcoin_flag)); } -READ16_MEMBER(niyanpai_state::musobana_inputport_0_r) +uint16_t niyanpai_state::musobana_inputport_0_r() { int portdata; @@ -117,7 +117,7 @@ READ_LINE_MEMBER(niyanpai_state::musobana_outcoin_flag_r) return m_musobana_outcoin_flag & 0x01; } -WRITE16_MEMBER(niyanpai_state::musobana_inputport_w) +void niyanpai_state::musobana_inputport_w(uint16_t data) { m_musobana_inputport = data; } diff --git a/src/mame/drivers/nmk16.cpp b/src/mame/drivers/nmk16.cpp index 2df423c4779..a575ba9657e 100644 --- a/src/mame/drivers/nmk16.cpp +++ b/src/mame/drivers/nmk16.cpp @@ -646,7 +646,7 @@ printed on the up-left corner of the screen). } #ifdef UNUSED_FUNCTION -READ16_MEMBER(nmk16_state::mcu_shared_r) +u16 nmk16_state::mcu_shared_r() { return nmk16_mcu_shared_ram[offset]; } diff --git a/src/mame/drivers/norautp.cpp b/src/mame/drivers/norautp.cpp index d8ddad30182..740e867a6a7 100644 --- a/src/mame/drivers/norautp.cpp +++ b/src/mame/drivers/norautp.cpp @@ -712,12 +712,12 @@ void norautp_state::counterlamps_w(uint8_t data) PC0-PC2 could be set as input or output. */ -//READ8_MEMBER(norautp_state::ppi2_portc_r ) +//uint8_t norautp_state::ppi2_portc_r() //{ // return; //} -//WRITE8_MEMBER(norautp_state::ppi2_portc_w ) +//void norautp_state::ppi2_portc_w(uint8_t data) //{ // /* PC0-PC2 don't seems to be connected to any output */ //} @@ -741,17 +741,17 @@ TIMER_CALLBACK_MEMBER(norautp_state::ppi2_ack) #ifdef UNUSED_FUNCTION // old implementation /*game waits for /OBF signal (bit 7) to be set.*/ -READ8_MEMBER(norautp_state::test_r) +uint8_t norautp_state::test_r() { return 0xff; } -READ8_MEMBER(norautp_state::vram_data_r) +uint8_t norautp_state::vram_data_r() { return m_np_vram[m_np_addr]; } -WRITE8_MEMBER(norautp_state::vram_data_w) +void norautp_state::vram_data_w(uint8_t data) { m_np_vram[m_np_addr] = data & 0xff; @@ -761,14 +761,14 @@ WRITE8_MEMBER(norautp_state::vram_data_w) } -WRITE8_MEMBER(norautp_state::vram_addr_w) +void norautp_state::vram_addr_w(uint8_t data) { m_np_addr = data; } #endif /* game waits for bit 4 (0x10) to be reset.*/ -READ8_MEMBER(norautp_state::test2_r) +uint8_t norautp_state::test2_r() { return 0x00; } diff --git a/src/mame/drivers/nova2001.cpp b/src/mame/drivers/nova2001.cpp index 1606ab79d3e..b56dd061b79 100644 --- a/src/mame/drivers/nova2001.cpp +++ b/src/mame/drivers/nova2001.cpp @@ -145,13 +145,13 @@ CUSTOM_INPUT_MEMBER(nova2001_state::ninjakun_io_A002_ctrl_r) return m_ninjakun_io_a002_ctrl; } -WRITE8_MEMBER(nova2001_state::ninjakun_cpu1_io_A002_w) +void nova2001_state::ninjakun_cpu1_io_A002_w(u8 data) { if( data == 0x80 ) m_ninjakun_io_a002_ctrl |= 0x01; if( data == 0x40 ) m_ninjakun_io_a002_ctrl &= ~0x02; } -WRITE8_MEMBER(nova2001_state::ninjakun_cpu2_io_A002_w) +void nova2001_state::ninjakun_cpu2_io_A002_w(u8 data) { if( data == 0x40 ) m_ninjakun_io_a002_ctrl |= 0x02; if( data == 0x80 ) m_ninjakun_io_a002_ctrl &= ~0x01; diff --git a/src/mame/drivers/nycaptor.cpp b/src/mame/drivers/nycaptor.cpp index 3be5ac3938f..3bf1177af1e 100644 --- a/src/mame/drivers/nycaptor.cpp +++ b/src/mame/drivers/nycaptor.cpp @@ -206,17 +206,17 @@ Stephh's additional notes (based on the game Z80 code and some tests) : //#define USE_MCU -WRITE8_MEMBER(nycaptor_state::sub_cpu_halt_w) +void nycaptor_state::sub_cpu_halt_w(uint8_t data) { m_subcpu->set_input_line(INPUT_LINE_HALT, (data) ? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER(nycaptor_state::nycaptor_b_r) +uint8_t nycaptor_state::nycaptor_b_r() { return 1; } -READ8_MEMBER(nycaptor_state::nycaptor_by_r) +uint8_t nycaptor_state::nycaptor_by_r() { int port = ioport("LIGHTY")->read(); @@ -226,42 +226,42 @@ READ8_MEMBER(nycaptor_state::nycaptor_by_r) return port - 8; } -READ8_MEMBER(nycaptor_state::nycaptor_bx_r) +uint8_t nycaptor_state::nycaptor_bx_r() { return (ioport("LIGHTX")->read() + 0x27) | 1; } -WRITE8_MEMBER(nycaptor_state::sound_cpu_reset_w) +void nycaptor_state::sound_cpu_reset_w(uint8_t data) { m_audiocpu->set_input_line(INPUT_LINE_RESET, (data&1 )? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER(nycaptor_state::nycaptor_mcu_status_r1) +uint8_t nycaptor_state::nycaptor_mcu_status_r1() { /* bit 1 = when 1, mcu has sent data to the main cpu */ return (CLEAR_LINE != m_bmcu->mcu_semaphore_r()) ? 2 : 0; } -READ8_MEMBER(nycaptor_state::nycaptor_mcu_status_r2) +uint8_t nycaptor_state::nycaptor_mcu_status_r2() { /* bit 0 = when 1, mcu is ready to receive data from main cpu */ return (CLEAR_LINE != m_bmcu->host_semaphore_r()) ? 0 : 1; } -READ8_MEMBER(nycaptor_state::sound_status_r) +uint8_t nycaptor_state::sound_status_r() { return (m_soundlatch->pending_r() ? 1 : 0) | (m_soundlatch2->pending_r() ? 2 : 0); } -WRITE8_MEMBER(nycaptor_state::nmi_disable_w) +void nycaptor_state::nmi_disable_w(uint8_t data) { m_soundnmi->in_w<1>(0); } -WRITE8_MEMBER(nycaptor_state::nmi_enable_w) +void nycaptor_state::nmi_enable_w(uint8_t data) { m_soundnmi->in_w<1>(1); } @@ -270,12 +270,12 @@ void nycaptor_state::unk_w(uint8_t data) { } -READ8_MEMBER(nycaptor_state::nycaptor_generic_control_r) +uint8_t nycaptor_state::nycaptor_generic_control_r() { return m_generic_control_reg; } -WRITE8_MEMBER(nycaptor_state::nycaptor_generic_control_w) +void nycaptor_state::nycaptor_generic_control_w(uint8_t data) { m_generic_control_reg = data; membank("bank1")->set_entry((data&0x08)>>3); @@ -349,26 +349,26 @@ void nycaptor_state::sound_map(address_map &map) /* Cycle Shooting */ -READ8_MEMBER(nycaptor_state::cyclshtg_mcu_status_r) +uint8_t nycaptor_state::cyclshtg_mcu_status_r() { return 0xff; } -READ8_MEMBER(nycaptor_state::cyclshtg_mcu_r) +uint8_t nycaptor_state::cyclshtg_mcu_r() { return 7; } -WRITE8_MEMBER(nycaptor_state::cyclshtg_mcu_w) +void nycaptor_state::cyclshtg_mcu_w(uint8_t data) { } -READ8_MEMBER(nycaptor_state::cyclshtg_mcu_status_r1) +uint8_t nycaptor_state::cyclshtg_mcu_status_r1() { return machine().rand(); } -WRITE8_MEMBER(nycaptor_state::cyclshtg_generic_control_w) +void nycaptor_state::cyclshtg_generic_control_w(uint8_t data) { m_generic_control_reg = data; membank("bank1")->set_entry((data >> 2) & 3); @@ -425,7 +425,7 @@ void nycaptor_state::cyclshtg_slave_map(address_map &map) map(0xe000, 0xffff).ram().share("sharedram"); } -READ8_MEMBER(nycaptor_state::unk_r) +uint8_t nycaptor_state::unk_r() { return machine().rand(); } diff --git a/src/mame/drivers/ob68k1a.cpp b/src/mame/drivers/ob68k1a.cpp index 4451098abec..8c73e6e2c83 100644 --- a/src/mame/drivers/ob68k1a.cpp +++ b/src/mame/drivers/ob68k1a.cpp @@ -73,7 +73,7 @@ Notes: // pia_r - trampoline for PIA odd/even access //------------------------------------------------- -READ8_MEMBER( ob68k1a_state::pia_r ) +uint8_t ob68k1a_state::pia_r(offs_t offset) { if (offset) { return m_pia1->read(0); @@ -87,7 +87,7 @@ READ8_MEMBER( ob68k1a_state::pia_r ) // pia_w - trampoline for PIA odd/even access //------------------------------------------------- -WRITE8_MEMBER( ob68k1a_state::pia_w ) +void ob68k1a_state::pia_w(offs_t offset, uint8_t data) { if (offset) { m_pia1->write(0,data); diff --git a/src/mame/drivers/offtwall.cpp b/src/mame/drivers/offtwall.cpp index 1394be336e8..094adb79fd5 100644 --- a/src/mame/drivers/offtwall.cpp +++ b/src/mame/drivers/offtwall.cpp @@ -36,7 +36,7 @@ * *************************************/ -WRITE16_MEMBER(offtwall_state::io_latch_w) +void offtwall_state::io_latch_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* lower byte */ if (ACCESSING_BITS_0_7) @@ -88,7 +88,7 @@ WRITE16_MEMBER(offtwall_state::io_latch_w) -READ16_MEMBER(offtwall_state::bankswitch_r) +uint16_t offtwall_state::bankswitch_r(offs_t offset) { /* this is the table lookup; the bank is determined by the address that was requested */ m_bank_offset = (offset & 3) * 0x1000; @@ -98,7 +98,7 @@ READ16_MEMBER(offtwall_state::bankswitch_r) } -READ16_MEMBER(offtwall_state::bankrom_r) +uint16_t offtwall_state::bankrom_r(address_space &space, offs_t offset) { /* this is the banked ROM read */ logerror("%06X: %04X\n", m_maincpu->pcbase(), offset); @@ -138,7 +138,7 @@ READ16_MEMBER(offtwall_state::bankrom_r) -------------------------------------------------------------------------*/ -READ16_MEMBER(offtwall_state::spritecache_count_r) +uint16_t offtwall_state::spritecache_count_r(offs_t offset) { int prevpc = m_maincpu->pcbase(); @@ -192,7 +192,7 @@ READ16_MEMBER(offtwall_state::spritecache_count_r) -READ16_MEMBER(offtwall_state::unknown_verify_r) +uint16_t offtwall_state::unknown_verify_r(offs_t offset) { int prevpc = m_maincpu->pcbase(); if (prevpc < 0x5c5e || prevpc > 0xc432) @@ -445,9 +445,9 @@ ROM_END void offtwall_state::init_offtwall() { /* install son-of-slapstic workarounds */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16_delegate(*this, FUNC(offtwall_state::spritecache_count_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x037ec2, 0x037f39, read16_delegate(*this, FUNC(offtwall_state::bankswitch_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf1e, 0x3fdf1f, read16_delegate(*this, FUNC(offtwall_state::unknown_verify_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16sm_delegate(*this, FUNC(offtwall_state::spritecache_count_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x037ec2, 0x037f39, read16sm_delegate(*this, FUNC(offtwall_state::bankswitch_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf1e, 0x3fdf1f, read16sm_delegate(*this, FUNC(offtwall_state::unknown_verify_r))); m_spritecache_count = m_mainram + (0x3fde42 - 0x3fd800)/2; m_bankswitch_base = (uint16_t *)(memregion("maincpu")->base() + 0x37ec2); m_unknown_verify_base = m_mainram + (0x3fdf1e - 0x3fd800)/2; @@ -457,9 +457,9 @@ void offtwall_state::init_offtwall() void offtwall_state::init_offtwalc() { /* install son-of-slapstic workarounds */ - m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16_delegate(*this, FUNC(offtwall_state::spritecache_count_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x037eca, 0x037f43, read16_delegate(*this, FUNC(offtwall_state::bankswitch_r))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf24, 0x3fdf25, read16_delegate(*this, FUNC(offtwall_state::unknown_verify_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fde42, 0x3fde43, read16sm_delegate(*this, FUNC(offtwall_state::spritecache_count_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x037eca, 0x037f43, read16sm_delegate(*this, FUNC(offtwall_state::bankswitch_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x3fdf24, 0x3fdf25, read16sm_delegate(*this, FUNC(offtwall_state::unknown_verify_r))); m_spritecache_count = m_mainram + (0x3fde42 - 0x3fd800)/2; m_bankswitch_base = (uint16_t *)(memregion("maincpu")->base() + 0x37eca); m_unknown_verify_base = m_mainram + (0x3fdf24 - 0x3fd800)/2; diff --git a/src/mame/drivers/ohmygod.cpp b/src/mame/drivers/ohmygod.cpp index 23cc72d956d..8b739a3d802 100644 --- a/src/mame/drivers/ohmygod.cpp +++ b/src/mame/drivers/ohmygod.cpp @@ -23,7 +23,7 @@ Notes: #include "speaker.h" -WRITE16_MEMBER(ohmygod_state::ohmygod_ctrl_w) +void ohmygod_state::ohmygod_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { diff --git a/src/mame/drivers/ojankohs.cpp b/src/mame/drivers/ojankohs.cpp index ee545e238c9..938ed75e7ac 100644 --- a/src/mame/drivers/ojankohs.cpp +++ b/src/mame/drivers/ojankohs.cpp @@ -37,12 +37,12 @@ #include "speaker.h" -WRITE8_MEMBER(ojankohs_state::ojankohs_rombank_w) +void ojankohs_state::ojankohs_rombank_w(uint8_t data) { membank("bank1")->set_entry(data & 0x3f); } -WRITE8_MEMBER(ojankohs_state::ojankoy_rombank_w) +void ojankohs_state::ojankoy_rombank_w(uint8_t data) { membank("bank1")->set_entry(data & 0x1f); @@ -53,7 +53,7 @@ WRITE8_MEMBER(ojankohs_state::ojankoy_rombank_w) m_msm->reset_w(!m_adpcm_reset); } -WRITE8_MEMBER(ojankohs_state::ojankohs_adpcm_reset_w) +void ojankohs_state::ojankohs_adpcm_reset_w(uint8_t data) { m_adpcm_reset = BIT(data, 0); m_vclk_left = 0; @@ -61,7 +61,7 @@ WRITE8_MEMBER(ojankohs_state::ojankohs_adpcm_reset_w) m_msm->reset_w(!m_adpcm_reset); } -WRITE8_MEMBER(ojankohs_state::ojankohs_msm5205_w) +void ojankohs_state::ojankohs_msm5205_w(uint8_t data) { m_adpcm_data = data; m_vclk_left = 2; @@ -86,13 +86,13 @@ WRITE_LINE_MEMBER(ojankohs_state::ojankohs_adpcm_int) m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -WRITE8_MEMBER(ojankohs_state::ojankoc_ctrl_w) +void ojankohs_state::ojankoc_ctrl_w(uint8_t data) { membank("bank1")->set_entry(data & 0x0f); m_adpcm_reset = BIT(data, 4); m_msm->reset_w(!BIT(data, 4)); - ojankoc_flipscreen(space, data); + ojankoc_flipscreen(data); } @@ -544,12 +544,12 @@ INPUT_PORTS_END // INPUT PORT HANDLING //************************************************************************** -WRITE8_MEMBER( ojankohs_state::port_select_w ) +void ojankohs_state::port_select_w(uint8_t data) { m_port_select = data; } -READ8_MEMBER( ojankohs_state::keymatrix_p1_r ) +uint8_t ojankohs_state::keymatrix_p1_r() { uint8_t data = 0xff; @@ -564,7 +564,7 @@ READ8_MEMBER( ojankohs_state::keymatrix_p1_r ) return data; } -READ8_MEMBER( ojankohs_state::keymatrix_p2_r ) +uint8_t ojankohs_state::keymatrix_p2_r() { uint8_t data = 0xff; @@ -579,7 +579,7 @@ READ8_MEMBER( ojankohs_state::keymatrix_p2_r ) return data; } -READ8_MEMBER( ojankohs_state::ojankoc_keymatrix_p1_r ) +uint8_t ojankohs_state::ojankoc_keymatrix_p1_r() { uint8_t data = 0x00; @@ -593,7 +593,7 @@ READ8_MEMBER( ojankohs_state::ojankoc_keymatrix_p1_r ) return data; } -READ8_MEMBER( ojankohs_state::ojankoc_keymatrix_p2_r ) +uint8_t ojankohs_state::ojankoc_keymatrix_p2_r() { uint8_t data = 0x00; @@ -619,22 +619,22 @@ uint8_t ojankohs_state::ojankohs_dipsw2_r() return bitswap<8>(data, 0, 1, 2, 3, 4, 5, 6, 7); } -READ8_MEMBER( ojankohs_state::ccasino_dipsw3_r ) +uint8_t ojankohs_state::ccasino_dipsw3_r() { return m_dsw3->read() ^ 0xff; } -READ8_MEMBER( ojankohs_state::ccasino_dipsw4_r ) +uint8_t ojankohs_state::ccasino_dipsw4_r() { return m_dsw4->read() ^ 0xff; } -WRITE8_MEMBER( ojankohs_state::ojankoy_coinctr_w ) +void ojankohs_state::ojankoy_coinctr_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, BIT(data, 0)); } -WRITE8_MEMBER( ojankohs_state::ccasino_coinctr_w ) +void ojankohs_state::ccasino_coinctr_w(uint8_t data) { machine().bookkeeping().coin_counter_w(0, BIT(data, 1)); } diff --git a/src/mame/drivers/olytext.cpp b/src/mame/drivers/olytext.cpp index 2d2d717cbc7..c662d6c3351 100644 --- a/src/mame/drivers/olytext.cpp +++ b/src/mame/drivers/olytext.cpp @@ -129,7 +129,7 @@ void olytext_state::keyboard_put(u8 data) // } } -//WRITE8_MEMBER( olytext_state::fdcctrl_w ) +//void olytext_state::fdcctrl_w(uint8_t data) //{ // m_fdcctrl = data; // m_romen = (m_fdcctrl & 1) ? false : true; diff --git a/src/mame/drivers/osi.cpp b/src/mame/drivers/osi.cpp index 4ae92170c74..08f3f967661 100644 --- a/src/mame/drivers/osi.cpp +++ b/src/mame/drivers/osi.cpp @@ -270,7 +270,7 @@ DISCRETE_SOUND_END /* Keyboard */ -READ8_MEMBER( sb2m600_state::keyboard_r ) +uint8_t sb2m600_state::keyboard_r() { if (m_io_reset->read()) m_maincpu->reset(); @@ -284,7 +284,7 @@ READ8_MEMBER( sb2m600_state::keyboard_r ) return data; } -WRITE8_MEMBER( sb2m600_state::keyboard_w ) +void sb2m600_state::keyboard_w(uint8_t data) { m_keylatch = data; @@ -292,12 +292,12 @@ WRITE8_MEMBER( sb2m600_state::keyboard_w ) m_discrete->write(NODE_01, (data >> 2) & 0x0f); } -WRITE8_MEMBER( uk101_state::keyboard_w ) +void uk101_state::keyboard_w(uint8_t data) { m_keylatch = data; } -WRITE8_MEMBER( sb2m600_state::ctrl_w ) +void sb2m600_state::ctrl_w(uint8_t data) { /* @@ -320,7 +320,7 @@ WRITE8_MEMBER( sb2m600_state::ctrl_w ) m_discrete->write(NODE_10, BIT(data, 4)); } -WRITE8_MEMBER( c1p_state::osi630_ctrl_w ) +void c1p_state::osi630_ctrl_w(uint8_t data) { /* @@ -340,7 +340,7 @@ WRITE8_MEMBER( c1p_state::osi630_ctrl_w ) m_beeper->set_state(BIT(data, 1)); } -WRITE8_MEMBER( c1p_state::osi630_sound_w ) +void c1p_state::osi630_sound_w(uint8_t data) { if (data != 0) m_beeper->set_clock(49152 / data); diff --git a/src/mame/drivers/overdriv.cpp b/src/mame/drivers/overdriv.cpp index a36620e2f82..77e46cda0c9 100644 --- a/src/mame/drivers/overdriv.cpp +++ b/src/mame/drivers/overdriv.cpp @@ -61,7 +61,7 @@ static const uint16_t overdriv_default_eeprom[64] = }; -WRITE16_MEMBER(overdriv_state::eeprom_w) +void overdriv_state::eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //logerror("%s: write %04x to eeprom_w\n",machine().describe_context(),data); if (ACCESSING_BITS_0_7) @@ -102,7 +102,7 @@ INTERRUPT_GEN_MEMBER(overdriv_state::cpuB_interrupt) } #endif -WRITE16_MEMBER(overdriv_state::cpuA_ctrl_w) +void overdriv_state::cpuA_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -119,12 +119,12 @@ WRITE16_MEMBER(overdriv_state::cpuA_ctrl_w) } } -READ16_MEMBER(overdriv_state::cpuB_ctrl_r) +uint16_t overdriv_state::cpuB_ctrl_r() { return m_cpuB_ctrl; } -WRITE16_MEMBER(overdriv_state::cpuB_ctrl_w) +void overdriv_state::cpuB_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_cpuB_ctrl); @@ -139,7 +139,7 @@ WRITE16_MEMBER(overdriv_state::cpuB_ctrl_w) } } -WRITE16_MEMBER(overdriv_state::overdriv_soundirq_w) +void overdriv_state::overdriv_soundirq_w(uint16_t data) { m_audiocpu->set_input_line(M6809_IRQ_LINE, ASSERT_LINE); } @@ -147,13 +147,13 @@ WRITE16_MEMBER(overdriv_state::overdriv_soundirq_w) -WRITE16_MEMBER(overdriv_state::slave_irq4_assert_w) +void overdriv_state::slave_irq4_assert_w(uint16_t data) { // used in-game m_subcpu->set_input_line(4, HOLD_LINE); } -WRITE16_MEMBER(overdriv_state::slave_irq5_assert_w) +void overdriv_state::slave_irq5_assert_w(uint16_t data) { // tests GFX ROMs with this irq (indeed enabled only in test mode) m_subcpu->set_input_line(5, HOLD_LINE); @@ -188,7 +188,7 @@ void overdriv_state::overdriv_master_map(address_map &map) } #ifdef UNUSED_FUNCTION -WRITE8_MEMBER( overdriv_state::overdriv_k053246_w ) +void overdriv_state::overdriv_k053246_w(offs_t offset, uint8_t data) { m_k053246->k053246_w(offset,data); @@ -217,7 +217,7 @@ TIMER_CALLBACK_MEMBER(overdriv_state::objdma_end_cb ) m_subcpu->set_input_line(6, HOLD_LINE); } -WRITE8_MEMBER(overdriv_state::objdma_w) +void overdriv_state::objdma_w(uint8_t data) { if(data & 0x10) m_objdma_end_timer->adjust(attotime::from_usec(100)); @@ -244,7 +244,7 @@ void overdriv_state::overdriv_slave_map(address_map &map) map(0x220000, 0x221fff).r("k053250_2", FUNC(k053250_device::rom_r)); } -WRITE8_MEMBER(overdriv_state::sound_ack_w) +void overdriv_state::sound_ack_w(uint8_t data) { m_audiocpu->set_input_line(M6809_IRQ_LINE, CLEAR_LINE); } diff --git a/src/mame/includes/m10.h b/src/mame/includes/m10.h index d2de401cb94..79d658b5b8c 100644 --- a/src/mame/includes/m10.h +++ b/src/mame/includes/m10.h @@ -104,17 +104,17 @@ private: required_device m_screen; required_device m_palette; - DECLARE_WRITE8_MEMBER(m10_ctrl_w); - DECLARE_WRITE8_MEMBER(m11_ctrl_w); - DECLARE_WRITE8_MEMBER(m15_ctrl_w); - DECLARE_WRITE8_MEMBER(m10_a500_w); - DECLARE_WRITE8_MEMBER(m11_a100_w); - DECLARE_WRITE8_MEMBER(m15_a100_w); - DECLARE_READ8_MEMBER(m10_a700_r); - DECLARE_READ8_MEMBER(m11_a700_r); - DECLARE_WRITE8_MEMBER(m10_colorram_w); - DECLARE_WRITE8_MEMBER(m10_chargen_w); - DECLARE_WRITE8_MEMBER(m15_chargen_w); + void m10_ctrl_w(uint8_t data); + void m11_ctrl_w(uint8_t data); + void m15_ctrl_w(uint8_t data); + void m10_a500_w(uint8_t data); + void m11_a100_w(uint8_t data); + void m15_a100_w(uint8_t data); + uint8_t m10_a700_r(); + uint8_t m11_a700_r(); + void m10_colorram_w(offs_t offset, uint8_t data); + void m10_chargen_w(offs_t offset, uint8_t data); + void m15_chargen_w(offs_t offset, uint8_t data); TILEMAP_MAPPER_MEMBER(tilemap_scan); TILE_GET_INFO_MEMBER(get_tile_info); DECLARE_MACHINE_START(m10); diff --git a/src/mame/includes/m107.h b/src/mame/includes/m107.h index 18f4b221e7d..d31e733451c 100644 --- a/src/mame/includes/m107.h +++ b/src/mame/includes/m107.h @@ -73,8 +73,8 @@ private: pf_layer_info m_pf_layer[4]; uint16_t m_control[0x10]; - DECLARE_WRITE8_MEMBER(coincounter_w); - DECLARE_WRITE8_MEMBER(bankswitch_w); + void coincounter_w(uint8_t data); + void bankswitch_w(uint8_t data); void sound_reset_w(uint16_t data); void wpksoc_output_w(uint16_t data); void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/m5.h b/src/mame/includes/m5.h index b8333d78e4e..3d2433eb07f 100644 --- a/src/mame/includes/m5.h +++ b/src/mame/includes/m5.h @@ -79,8 +79,8 @@ protected: optional_ioport m_DIPS; m5_cart_slot_device *m_cart_ram, *m_cart; - DECLARE_READ8_MEMBER( sts_r ); - DECLARE_WRITE8_MEMBER( com_w ); + uint8_t sts_r(); + void com_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; @@ -91,22 +91,22 @@ private: uint8_t ppi_pc_r(); void ppi_pc_w(uint8_t data); - DECLARE_READ8_MEMBER( fd5_data_r ); - DECLARE_WRITE8_MEMBER( fd5_data_w ); - DECLARE_READ8_MEMBER( fd5_com_r ); - DECLARE_WRITE8_MEMBER( fd5_com_w ); - DECLARE_WRITE8_MEMBER( fd5_ctrl_w ); - DECLARE_WRITE8_MEMBER( fd5_tc_w ); + uint8_t fd5_data_r(); + void fd5_data_w(uint8_t data); + uint8_t fd5_com_r(); + void fd5_com_w(uint8_t data); + void fd5_ctrl_w(uint8_t data); + void fd5_tc_w(uint8_t data); DECLARE_FLOPPY_FORMATS( floppy_formats ); DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); // memory - DECLARE_READ8_MEMBER( mem64KBI_r ); - DECLARE_WRITE8_MEMBER( mem64KBI_w ); - DECLARE_WRITE8_MEMBER( mem64KBF_w ); - DECLARE_WRITE8_MEMBER( mem64KRX_w ); + uint8_t mem64KBI_r(); + void mem64KBI_w(offs_t offset, uint8_t data); + void mem64KBF_w(uint8_t data); + void mem64KRX_w(offs_t offset, uint8_t data); void fd5_io(address_map &map); void fd5_mem(address_map &map); @@ -147,15 +147,15 @@ public: void init_brno(); private: - DECLARE_READ8_MEMBER(mmu_r); - DECLARE_WRITE8_MEMBER(mmu_w); - DECLARE_READ8_MEMBER(ramsel_r); - DECLARE_WRITE8_MEMBER(ramsel_w); - DECLARE_READ8_MEMBER(romsel_r); - DECLARE_WRITE8_MEMBER(romsel_w); - - DECLARE_READ8_MEMBER(fd_r); - DECLARE_WRITE8_MEMBER(fd_w); + uint8_t mmu_r(); + void mmu_w(uint8_t data); + uint8_t ramsel_r(); + void ramsel_w(uint8_t data); + uint8_t romsel_r(); + void romsel_w(uint8_t data); + + uint8_t fd_r(); + void fd_w(uint8_t data); DECLARE_FLOPPY_FORMATS(floppy_formats); diff --git a/src/mame/includes/m52.h b/src/mame/includes/m52.h index 29893892d0a..3827f636064 100644 --- a/src/mame/includes/m52.h +++ b/src/mame/includes/m52.h @@ -29,14 +29,14 @@ public: void m52(machine_config &config); - DECLARE_WRITE8_MEMBER(m52_videoram_w); - DECLARE_WRITE8_MEMBER(m52_colorram_w); - DECLARE_READ8_MEMBER(m52_protection_r); + void m52_videoram_w(offs_t offset, uint8_t data); + void m52_colorram_w(offs_t offset, uint8_t data); + uint8_t m52_protection_r(); protected: virtual void machine_reset() override; virtual void video_start() override; - virtual DECLARE_WRITE8_MEMBER(m52_scroll_w); + virtual void m52_scroll_w(uint8_t data); /* board mod changes? */ int m_spritelimit; @@ -67,12 +67,12 @@ private: required_device m_tx_palette; required_device m_bg_palette; - DECLARE_WRITE8_MEMBER(m52_bg1ypos_w); - DECLARE_WRITE8_MEMBER(m52_bg1xpos_w); - DECLARE_WRITE8_MEMBER(m52_bg2xpos_w); - DECLARE_WRITE8_MEMBER(m52_bg2ypos_w); - DECLARE_WRITE8_MEMBER(m52_bgcontrol_w); - DECLARE_WRITE8_MEMBER(m52_flipscreen_w); + void m52_bg1ypos_w(uint8_t data); + void m52_bg1xpos_w(uint8_t data); + void m52_bg2xpos_w(uint8_t data); + void m52_bg2ypos_w(uint8_t data); + void m52_bgcontrol_w(uint8_t data); + void m52_flipscreen_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); void init_palette(); template @@ -98,8 +98,8 @@ public: protected: virtual void video_start() override; - virtual DECLARE_WRITE8_MEMBER(m52_scroll_w) override; - DECLARE_WRITE8_MEMBER(alpha1v_flipscreen_w); + virtual void m52_scroll_w(uint8_t data) override; + void alpha1v_flipscreen_w(uint8_t data); }; diff --git a/src/mame/includes/m57.h b/src/mame/includes/m57.h index e15f4549736..6c39ab3be9a 100644 --- a/src/mame/includes/m57.h +++ b/src/mame/includes/m57.h @@ -32,8 +32,8 @@ private: /* video-related */ tilemap_t* m_bg_tilemap; int m_flipscreen; - DECLARE_WRITE8_MEMBER(m57_videoram_w); - DECLARE_WRITE8_MEMBER(m57_flipscreen_w); + void m57_videoram_w(offs_t offset, uint8_t data); + void m57_flipscreen_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); virtual void video_start() override; void m57_palette(palette_device &palette) const; diff --git a/src/mame/includes/m58.h b/src/mame/includes/m58.h index 05f9b96166b..d8e8a73c89c 100644 --- a/src/mame/includes/m58.h +++ b/src/mame/includes/m58.h @@ -53,9 +53,9 @@ private: tilemap_t* m_bg_tilemap; bitmap_ind16 m_scroll_panel_bitmap; - DECLARE_WRITE8_MEMBER(videoram_w); - DECLARE_WRITE8_MEMBER(scroll_panel_w); - DECLARE_WRITE8_MEMBER(flipscreen_w); + void videoram_w(offs_t offset, uint8_t data); + void scroll_panel_w(offs_t offset, uint8_t data); + void flipscreen_w(uint8_t data); virtual void video_start() override; void m58_palette(palette_device &palette) const; diff --git a/src/mame/includes/m62.h b/src/mame/includes/m62.h index 579111838d8..c79bb5306cd 100644 --- a/src/mame/includes/m62.h +++ b/src/mame/includes/m62.h @@ -79,30 +79,30 @@ private: /* misc */ int m_ldrun2_bankswap; //ldrun2 int m_bankcontrol[2]; //ldrun2 - DECLARE_READ8_MEMBER(ldrun2_bankswitch_r); - DECLARE_WRITE8_MEMBER(ldrun2_bankswitch_w); - DECLARE_READ8_MEMBER(ldrun3_prot_5_r); - DECLARE_READ8_MEMBER(ldrun3_prot_7_r); - DECLARE_WRITE8_MEMBER(ldrun4_bankswitch_w); - DECLARE_WRITE8_MEMBER(kidniki_bankswitch_w); - DECLARE_WRITE8_MEMBER(spelunkr_bankswitch_w); - DECLARE_WRITE8_MEMBER(spelunk2_bankswitch_w); - DECLARE_WRITE8_MEMBER(youjyudn_bankswitch_w); - DECLARE_WRITE8_MEMBER(m62_flipscreen_w); - DECLARE_WRITE8_MEMBER(m62_hscroll_low_w); - DECLARE_WRITE8_MEMBER(m62_hscroll_high_w); - DECLARE_WRITE8_MEMBER(m62_vscroll_low_w); - DECLARE_WRITE8_MEMBER(m62_vscroll_high_w); - DECLARE_WRITE8_MEMBER(m62_tileram_w); - DECLARE_WRITE8_MEMBER(m62_textram_w); - DECLARE_WRITE8_MEMBER(kungfum_tileram_w); - DECLARE_WRITE8_MEMBER(ldrun3_topbottom_mask_w); - DECLARE_WRITE8_MEMBER(kidniki_text_vscroll_low_w); - DECLARE_WRITE8_MEMBER(kidniki_text_vscroll_high_w); - DECLARE_WRITE8_MEMBER(kidniki_background_bank_w); - DECLARE_WRITE8_MEMBER(spelunkr_palbank_w); - DECLARE_WRITE8_MEMBER(spelunk2_gfxport_w); - DECLARE_WRITE8_MEMBER(horizon_scrollram_w); + uint8_t ldrun2_bankswitch_r(); + void ldrun2_bankswitch_w(offs_t offset, uint8_t data); + uint8_t ldrun3_prot_5_r(); + uint8_t ldrun3_prot_7_r(); + void ldrun4_bankswitch_w(uint8_t data); + void kidniki_bankswitch_w(uint8_t data); + void spelunkr_bankswitch_w(uint8_t data); + void spelunk2_bankswitch_w(uint8_t data); + void youjyudn_bankswitch_w(uint8_t data); + void m62_flipscreen_w(uint8_t data); + void m62_hscroll_low_w(uint8_t data); + void m62_hscroll_high_w(uint8_t data); + void m62_vscroll_low_w(uint8_t data); + void m62_vscroll_high_w(uint8_t data); + void m62_tileram_w(offs_t offset, uint8_t data); + void m62_textram_w(offs_t offset, uint8_t data); + void kungfum_tileram_w(offs_t offset, uint8_t data); + void ldrun3_topbottom_mask_w(uint8_t data); + void kidniki_text_vscroll_low_w(uint8_t data); + void kidniki_text_vscroll_high_w(uint8_t data); + void kidniki_background_bank_w(uint8_t data); + void spelunkr_palbank_w(uint8_t data); + void spelunk2_gfxport_w(uint8_t data); + void horizon_scrollram_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_kungfum_bg_tile_info); TILE_GET_INFO_MEMBER(get_ldrun_bg_tile_info); TILE_GET_INFO_MEMBER(get_ldrun2_bg_tile_info); diff --git a/src/mame/includes/m79amb.h b/src/mame/includes/m79amb.h index fa97f4352f0..79579cf7510 100644 --- a/src/mame/includes/m79amb.h +++ b/src/mame/includes/m79amb.h @@ -24,12 +24,12 @@ public: void init_m79amb(); private: - DECLARE_WRITE8_MEMBER(ramtek_videoram_w); - DECLARE_READ8_MEMBER(gray5bit_controller0_r); - DECLARE_READ8_MEMBER(gray5bit_controller1_r); - DECLARE_WRITE8_MEMBER(m79amb_8000_w); - DECLARE_WRITE8_MEMBER(m79amb_8002_w); - DECLARE_WRITE8_MEMBER(m79amb_8003_w); + void ramtek_videoram_w(offs_t offset, uint8_t data); + uint8_t gray5bit_controller0_r(); + uint8_t gray5bit_controller1_r(); + void m79amb_8000_w(uint8_t data); + void m79amb_8002_w(uint8_t data); + void m79amb_8003_w(uint8_t data); INTERRUPT_GEN_MEMBER(m79amb_interrupt); diff --git a/src/mame/includes/m92.h b/src/mame/includes/m92.h index f6c42e03bc4..f6301ad4dbf 100644 --- a/src/mame/includes/m92.h +++ b/src/mame/includes/m92.h @@ -101,8 +101,8 @@ private: uint16_t eeprom_r(offs_t offset); void eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE8_MEMBER(coincounter_w); - DECLARE_WRITE8_MEMBER(bankswitch_w); + void coincounter_w(uint8_t data); + void bankswitch_w(uint8_t data); void sound_reset_w(uint16_t data); void spritecontrol_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void videocontrol_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/mac.h b/src/mame/includes/mac.h index e5b979fb42c..2e7755dbc67 100644 --- a/src/mame/includes/mac.h +++ b/src/mame/includes/mac.h @@ -419,10 +419,10 @@ private: uint32_t rbv_ramdac_r(); void rbv_ramdac_w(offs_t offset, uint32_t data); void ariel_ramdac_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - DECLARE_READ8_MEMBER( mac_sonora_vctl_r ); - DECLARE_WRITE8_MEMBER( mac_sonora_vctl_w ); - DECLARE_READ8_MEMBER ( mac_rbv_r ); - DECLARE_WRITE8_MEMBER ( mac_rbv_w ); + uint8_t mac_sonora_vctl_r(offs_t offset); + void mac_sonora_vctl_w(offs_t offset, uint8_t data); + uint8_t mac_rbv_r(offs_t offset); + void mac_rbv_w(offs_t offset, uint8_t data); uint32_t mac_read_id(); @@ -430,25 +430,25 @@ private: uint32_t biu_r(offs_t offset, uint32_t mem_mask = ~0); void biu_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); - DECLARE_READ8_MEMBER(oss_r); - DECLARE_WRITE8_MEMBER(oss_w); + uint8_t oss_r(offs_t offset); + void oss_w(offs_t offset, uint8_t data); uint32_t buserror_r(); - DECLARE_READ8_MEMBER(swimiop_r); - DECLARE_WRITE8_MEMBER(swimiop_w); - DECLARE_READ8_MEMBER(scciop_r); - DECLARE_WRITE8_MEMBER(scciop_w); - - DECLARE_READ8_MEMBER(hmc_r); - DECLARE_WRITE8_MEMBER(hmc_w); - DECLARE_READ8_MEMBER(amic_dma_r); - DECLARE_WRITE8_MEMBER(amic_dma_w); - DECLARE_READ8_MEMBER(pmac_diag_r); - - DECLARE_READ8_MEMBER(mac_gsc_r); - DECLARE_WRITE8_MEMBER(mac_gsc_w); - - DECLARE_READ8_MEMBER(mac_5396_r); - DECLARE_WRITE8_MEMBER(mac_5396_w); + uint8_t swimiop_r(offs_t offset); + void swimiop_w(offs_t offset, uint8_t data); + uint8_t scciop_r(offs_t offset); + void scciop_w(offs_t offset, uint8_t data); + + uint8_t hmc_r(); + void hmc_w(offs_t offset, uint8_t data); + uint8_t amic_dma_r(); + void amic_dma_w(offs_t offset, uint8_t data); + uint8_t pmac_diag_r(offs_t offset); + + uint8_t mac_gsc_r(offs_t offset); + void mac_gsc_w(uint8_t data); + + uint8_t mac_5396_r(offs_t offset); + void mac_5396_w(offs_t offset, uint8_t data); uint32_t dafb_r(offs_t offset, uint32_t mem_mask = ~0); void dafb_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); diff --git a/src/mame/includes/macpci.h b/src/mame/includes/macpci.h index 58f916f0c3b..22823aeb53f 100644 --- a/src/mame/includes/macpci.h +++ b/src/mame/includes/macpci.h @@ -130,8 +130,8 @@ private: uint32_t mac_read_id(); - DECLARE_READ8_MEMBER(mac_5396_r); - DECLARE_WRITE8_MEMBER(mac_5396_w); + uint8_t mac_5396_r(offs_t offset); + void mac_5396_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(irq_539x_1_w); DECLARE_WRITE_LINE_MEMBER(drq_539x_1_w); diff --git a/src/mame/includes/madalien.h b/src/mame/includes/madalien.h index ab50214d5a3..ec1243d6ccf 100644 --- a/src/mame/includes/madalien.h +++ b/src/mame/includes/madalien.h @@ -69,11 +69,11 @@ private: tilemap_t *m_tilemap_edge1[4]; tilemap_t *m_tilemap_edge2[4]; std::unique_ptr m_headlight_bitmap; - DECLARE_READ8_MEMBER(shift_r); - DECLARE_READ8_MEMBER(shift_rev_r); - DECLARE_WRITE8_MEMBER(madalien_output_w); - DECLARE_WRITE8_MEMBER(madalien_videoram_w); - DECLARE_WRITE8_MEMBER(madalien_charram_w); + uint8_t shift_r(); + uint8_t shift_rev_r(); + void madalien_output_w(uint8_t data); + void madalien_videoram_w(offs_t offset, uint8_t data); + void madalien_charram_w(offs_t offset, uint8_t data); void madalien_portA_w(uint8_t data); void madalien_portB_w(uint8_t data); TILEMAP_MAPPER_MEMBER(scan_mode0); diff --git a/src/mame/includes/magmax.h b/src/mame/includes/magmax.h index 95b517d2dd9..f4cd2c9350b 100644 --- a/src/mame/includes/magmax.h +++ b/src/mame/includes/magmax.h @@ -62,7 +62,7 @@ private: bitmap_ind16 m_bitmap; void cpu_irq_ack_w(uint16_t data); - DECLARE_READ8_MEMBER(sound_r); + uint8_t sound_r(); void vreg_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void ay8910_portB_0_w(uint8_t data); void ay8910_portA_0_w(uint8_t data); diff --git a/src/mame/includes/mainevt.h b/src/mame/includes/mainevt.h index 8ebd35935fb..2d92d05c1c0 100644 --- a/src/mame/includes/mainevt.h +++ b/src/mame/includes/mainevt.h @@ -36,17 +36,17 @@ public: void mainevt(machine_config &config); private: - DECLARE_WRITE8_MEMBER(dv_nmienable_w); - DECLARE_WRITE8_MEMBER(mainevt_bankswitch_w); - DECLARE_WRITE8_MEMBER(mainevt_coin_w); - DECLARE_WRITE8_MEMBER(mainevt_sh_irqtrigger_w); - DECLARE_WRITE8_MEMBER(mainevt_sh_irqcontrol_w); - DECLARE_WRITE8_MEMBER(devstor_sh_irqcontrol_w); - DECLARE_WRITE8_MEMBER(mainevt_sh_bankswitch_w); - DECLARE_READ8_MEMBER(k052109_051960_r); - DECLARE_WRITE8_MEMBER(k052109_051960_w); - DECLARE_READ8_MEMBER(mainevt_sh_busy_r); - DECLARE_WRITE8_MEMBER(dv_sh_bankswitch_w); + void dv_nmienable_w(uint8_t data); + void mainevt_bankswitch_w(uint8_t data); + void mainevt_coin_w(uint8_t data); + void mainevt_sh_irqtrigger_w(uint8_t data); + void mainevt_sh_irqcontrol_w(uint8_t data); + void devstor_sh_irqcontrol_w(uint8_t data); + void mainevt_sh_bankswitch_w(uint8_t data); + uint8_t k052109_051960_r(offs_t offset); + void k052109_051960_w(offs_t offset, uint8_t data); + uint8_t mainevt_sh_busy_r(); + void dv_sh_bankswitch_w(uint8_t data); uint32_t screen_update_mainevt(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_dv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(dv_vblank_w); diff --git a/src/mame/includes/mainsnk.h b/src/mame/includes/mainsnk.h index b83ce24f567..5c84bdbad95 100644 --- a/src/mame/includes/mainsnk.h +++ b/src/mame/includes/mainsnk.h @@ -45,10 +45,10 @@ private: int m_sound_cpu_busy; uint32_t m_bg_tile_offset; - DECLARE_READ8_MEMBER(sound_ack_r); - DECLARE_WRITE8_MEMBER(c600_w); - DECLARE_WRITE8_MEMBER(fgram_w); - DECLARE_WRITE8_MEMBER(bgram_w); + uint8_t sound_ack_r(); + void c600_w(uint8_t data); + void fgram_w(offs_t offset, uint8_t data); + void bgram_w(offs_t offset, uint8_t data); TILEMAP_MAPPER_MEMBER(marvins_tx_scan_cols); TILE_GET_INFO_MEMBER(get_tx_tile_info); diff --git a/src/mame/includes/malzak.h b/src/mame/includes/malzak.h index 2eadafed158..5902bc31874 100644 --- a/src/mame/includes/malzak.h +++ b/src/mame/includes/malzak.h @@ -50,14 +50,14 @@ private: required_device m_palette; required_memory_bank m_mainbank; - DECLARE_READ8_MEMBER(fake_VRLE_r); - DECLARE_READ8_MEMBER(s2636_portA_r); - DECLARE_READ8_MEMBER(s2650_data_r); - DECLARE_WRITE8_MEMBER(port40_w); - DECLARE_WRITE8_MEMBER(port60_w); - DECLARE_WRITE8_MEMBER(portc0_w); - DECLARE_READ8_MEMBER(collision_r); - DECLARE_WRITE8_MEMBER(playfield_w); + uint8_t fake_VRLE_r(); + uint8_t s2636_portA_r(); + uint8_t s2650_data_r(); + void port40_w(uint8_t data); + void port60_w(uint8_t data); + void portc0_w(uint8_t data); + uint8_t collision_r(); + void playfield_w(offs_t offset, uint8_t data); uint8_t videoram_r(offs_t offset); void palette_init(palette_device &palette) const; diff --git a/src/mame/includes/mappy.h b/src/mame/includes/mappy.h index e581bf9ffa6..455cebad247 100644 --- a/src/mame/includes/mappy.h +++ b/src/mame/includes/mappy.h @@ -77,11 +77,11 @@ private: DECLARE_WRITE_LINE_MEMBER(int_on_2_w); DECLARE_WRITE_LINE_MEMBER(int_on_3_w); DECLARE_WRITE_LINE_MEMBER(mappy_flip_w); - DECLARE_WRITE8_MEMBER(superpac_videoram_w); - DECLARE_WRITE8_MEMBER(mappy_videoram_w); - DECLARE_WRITE8_MEMBER(superpac_flipscreen_w); - DECLARE_READ8_MEMBER(superpac_flipscreen_r); - DECLARE_WRITE8_MEMBER(mappy_scroll_w); + void superpac_videoram_w(offs_t offset, uint8_t data); + void mappy_videoram_w(offs_t offset, uint8_t data); + void superpac_flipscreen_w(uint8_t data); + uint8_t superpac_flipscreen_r(); + void mappy_scroll_w(offs_t offset, uint8_t data); void out_lamps(uint8_t data); TILEMAP_MAPPER_MEMBER(superpac_tilemap_scan); TILEMAP_MAPPER_MEMBER(mappy_tilemap_scan); diff --git a/src/mame/includes/marineb.h b/src/mame/includes/marineb.h index 469f212fb95..312b9135a1d 100644 --- a/src/mame/includes/marineb.h +++ b/src/mame/includes/marineb.h @@ -55,11 +55,11 @@ private: bool m_irq_mask; DECLARE_WRITE_LINE_MEMBER(irq_mask_w); DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); - DECLARE_WRITE8_MEMBER(marineb_videoram_w); - DECLARE_WRITE8_MEMBER(marineb_colorram_w); - DECLARE_WRITE8_MEMBER(marineb_column_scroll_w); - DECLARE_WRITE8_MEMBER(marineb_palette_bank_0_w); - DECLARE_WRITE8_MEMBER(marineb_palette_bank_1_w); + void marineb_videoram_w(offs_t offset, uint8_t data); + void marineb_colorram_w(offs_t offset, uint8_t data); + void marineb_column_scroll_w(uint8_t data); + void marineb_palette_bank_0_w(uint8_t data); + void marineb_palette_bank_1_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(flipscreen_x_w); DECLARE_WRITE_LINE_MEMBER(flipscreen_y_w); TILE_GET_INFO_MEMBER(get_tile_info); diff --git a/src/mame/includes/mario.h b/src/mame/includes/mario.h index 0e3564e2962..6d0f8693d3f 100644 --- a/src/mame/includes/mario.h +++ b/src/mame/includes/mario.h @@ -120,21 +120,21 @@ private: DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); - DECLARE_WRITE8_MEMBER(mario_videoram_w); + void mario_videoram_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(gfx_bank_w); DECLARE_WRITE_LINE_MEMBER(palette_bank_w); - DECLARE_WRITE8_MEMBER(mario_scroll_w); + void mario_scroll_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(flip_w); uint8_t mario_sh_p1_r(); uint8_t mario_sh_p2_r(); DECLARE_READ_LINE_MEMBER(mario_sh_t0_r); DECLARE_READ_LINE_MEMBER(mario_sh_t1_r); - DECLARE_READ8_MEMBER(mario_sh_tune_r); + uint8_t mario_sh_tune_r(offs_t offset); void mario_sh_p1_w(uint8_t data); void mario_sh_p2_w(uint8_t data); - DECLARE_WRITE8_MEMBER(masao_sh_irqtrigger_w); - DECLARE_WRITE8_MEMBER(mario_sh_tuneselect_w); - DECLARE_WRITE8_MEMBER(mario_sh3_w); + void masao_sh_irqtrigger_w(uint8_t data); + void mario_sh_tuneselect_w(uint8_t data); + void mario_sh3_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void video_start() override; virtual void sound_start() override; @@ -142,9 +142,9 @@ private: void mario_palette(palette_device &palette) const; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); - DECLARE_WRITE8_MEMBER(mario_sh_sound_w); - DECLARE_WRITE8_MEMBER(mario_sh1_w); - DECLARE_WRITE8_MEMBER(mario_sh2_w); + void mario_sh_sound_w(uint8_t data); + void mario_sh1_w(uint8_t data); + void mario_sh2_w(uint8_t data); uint8_t memory_read_byte(offs_t offset); void memory_write_byte(offs_t offset, uint8_t data); void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/markham.h b/src/mame/includes/markham.h index 852b30401bf..64762b4975c 100644 --- a/src/mame/includes/markham.h +++ b/src/mame/includes/markham.h @@ -65,21 +65,21 @@ private: void markham_slave_map(address_map &map); void strnskil_slave_map(address_map &map); - DECLARE_WRITE8_MEMBER(coin_output_w); - DECLARE_WRITE8_MEMBER(flipscreen_w); - DECLARE_WRITE8_MEMBER(videoram_w); + void coin_output_w(uint8_t data); + void flipscreen_w(uint8_t data); + void videoram_w(offs_t offset, uint8_t data); // markham specific - DECLARE_READ8_MEMBER(markham_e004_r); + uint8_t markham_e004_r(); // strnskil specific - DECLARE_READ8_MEMBER(strnskil_d800_r); - DECLARE_WRITE8_MEMBER(strnskil_master_output_w); + uint8_t strnskil_d800_r(); + void strnskil_master_output_w(uint8_t data); // protection comms for banbam/pettanp - DECLARE_READ8_MEMBER(banbam_protection_r); - DECLARE_WRITE8_MEMBER(banbam_protection_w); - DECLARE_WRITE8_MEMBER(mcu_reset_w); + uint8_t banbam_protection_r(); + void banbam_protection_w(uint8_t data); + void mcu_reset_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/matmania.h b/src/mame/includes/matmania.h index 54d4873b670..57b1b9a792b 100644 --- a/src/mame/includes/matmania.h +++ b/src/mame/includes/matmania.h @@ -67,10 +67,10 @@ private: std::unique_ptr m_tmpbitmap; std::unique_ptr m_tmpbitmap2; - DECLARE_READ8_MEMBER(maniach_mcu_status_r); - DECLARE_WRITE8_MEMBER(matmania_sh_command_w); - DECLARE_WRITE8_MEMBER(maniach_sh_command_w); - DECLARE_WRITE8_MEMBER(matmania_paletteram_w); + uint8_t maniach_mcu_status_r(); + void matmania_sh_command_w(uint8_t data); + void maniach_sh_command_w(uint8_t data); + void matmania_paletteram_w(offs_t offset, uint8_t data); void matmania_palette(palette_device &palette) const; uint32_t screen_update_matmania(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_maniach(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/maygay1b.h b/src/mame/includes/maygay1b.h index a0e2fa52cc4..f01f382a46f 100644 --- a/src/mame/includes/maygay1b.h +++ b/src/mame/includes/maygay1b.h @@ -98,9 +98,9 @@ private: void lamp_data_w(uint8_t data); void lamp_data_2_w(uint8_t data); uint8_t kbd_r(); - DECLARE_WRITE8_MEMBER(reel12_w); - DECLARE_WRITE8_MEMBER(reel34_w); - DECLARE_WRITE8_MEMBER(reel56_w); + void reel12_w(uint8_t data); + void reel34_w(uint8_t data); + void reel56_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(ramen_w); DECLARE_WRITE_LINE_MEMBER(alarmen_w); DECLARE_WRITE_LINE_MEMBER(nmien_w); @@ -108,21 +108,21 @@ private: DECLARE_WRITE_LINE_MEMBER(psurelay_w); DECLARE_WRITE_LINE_MEMBER(wdog_w); DECLARE_WRITE_LINE_MEMBER(srsel_w); - DECLARE_WRITE8_MEMBER(latch_ch2_w); - DECLARE_READ8_MEMBER(latch_st_hi); - DECLARE_READ8_MEMBER(latch_st_lo); - DECLARE_WRITE8_MEMBER(m1ab_no_oki_w); + void latch_ch2_w(uint8_t data); + uint8_t latch_st_hi(); + uint8_t latch_st_lo(); + void m1ab_no_oki_w(uint8_t data); void m1_pia_porta_w(uint8_t data); void m1_pia_portb_w(uint8_t data); void m1_lockout_w(uint8_t data); void m1_meter_w(uint8_t data); - DECLARE_READ8_MEMBER(m1_meter_r); - DECLARE_READ8_MEMBER(m1_firq_clr_r); - DECLARE_READ8_MEMBER(m1_firq_trg_r); - DECLARE_READ8_MEMBER(m1_firq_nec_r); - DECLARE_READ8_MEMBER(nec_reset_r); - DECLARE_WRITE8_MEMBER(nec_bank0_w); - DECLARE_WRITE8_MEMBER(nec_bank1_w); + uint8_t m1_meter_r(); + uint8_t m1_firq_clr_r(); + uint8_t m1_firq_trg_r(); + uint8_t m1_firq_nec_r(); + uint8_t nec_reset_r(); + void nec_bank0_w(uint8_t data); + void nec_bank1_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); uint8_t m1_duart_r(); void mcu_port0_w(uint8_t data); @@ -132,8 +132,8 @@ private: uint8_t mcu_port0_r(); uint8_t mcu_port2_r(); - DECLARE_WRITE8_MEMBER(main_to_mcu_0_w); - DECLARE_WRITE8_MEMBER(main_to_mcu_1_w); + void main_to_mcu_0_w(uint8_t data); + void main_to_mcu_1_w(uint8_t data); uint8_t m_main_to_mcu; diff --git a/src/mame/includes/meadows.h b/src/mame/includes/meadows.h index 2177fd9e729..60b49339b21 100644 --- a/src/mame/includes/meadows.h +++ b/src/mame/includes/meadows.h @@ -68,14 +68,14 @@ private: uint8_t m_0c02; uint8_t m_0c03; tilemap_t *m_bg_tilemap; - DECLARE_READ8_MEMBER(hsync_chain_r); - DECLARE_READ8_MEMBER(vsync_chain_hi_r); - DECLARE_READ8_MEMBER(vsync_chain_lo_r); - DECLARE_WRITE8_MEMBER(meadows_audio_w); - DECLARE_WRITE8_MEMBER(audio_hardware_w); - DECLARE_READ8_MEMBER(audio_hardware_r); - DECLARE_WRITE8_MEMBER(meadows_videoram_w); - DECLARE_WRITE8_MEMBER(meadows_spriteram_w); + uint8_t hsync_chain_r(); + uint8_t vsync_chain_hi_r(); + uint8_t vsync_chain_lo_r(); + void meadows_audio_w(offs_t offset, uint8_t data); + void audio_hardware_w(offs_t offset, uint8_t data); + uint8_t audio_hardware_r(offs_t offset); + void meadows_videoram_w(offs_t offset, uint8_t data); + void meadows_spriteram_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); virtual void video_start() override; uint32_t screen_update_meadows(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/megasys1.h b/src/mame/includes/megasys1.h index d8d0a85a6ba..133a2e81802 100644 --- a/src/mame/includes/megasys1.h +++ b/src/mame/includes/megasys1.h @@ -169,7 +169,7 @@ private: void monkelf_scroll0_w(offs_t offset, u16 data, u16 mem_mask = ~0); void monkelf_scroll1_w(offs_t offset, u16 data, u16 mem_mask = ~0); void megasys1_set_vreg_flag(int which, int data); - template DECLARE_READ8_MEMBER(oki_status_r); + template u8 oki_status_r(); void ram_w(offs_t offset, u16 data); void p47b_adpcm_w(offs_t offset, u8 data); diff --git a/src/mame/includes/mermaid.h b/src/mame/includes/mermaid.h index 05cc1430346..be883de73fb 100644 --- a/src/mame/includes/mermaid.h +++ b/src/mame/includes/mermaid.h @@ -83,8 +83,8 @@ private: required_device_array m_latch; uint8_t m_nmi_mask; - DECLARE_WRITE8_MEMBER(mermaid_ay8910_write_port_w); - DECLARE_WRITE8_MEMBER(mermaid_ay8910_control_port_w); + void mermaid_ay8910_write_port_w(uint8_t data); + void mermaid_ay8910_control_port_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(ay1_enable_w); DECLARE_WRITE_LINE_MEMBER(ay2_enable_w); DECLARE_WRITE_LINE_MEMBER(nmi_mask_w); @@ -92,16 +92,16 @@ private: DECLARE_WRITE_LINE_MEMBER(rougien_sample_rom_hi_w); DECLARE_WRITE_LINE_MEMBER(rougien_sample_playback_w); void adpcm_data_w(uint8_t data); - DECLARE_WRITE8_MEMBER(mermaid_videoram2_w); - DECLARE_WRITE8_MEMBER(mermaid_videoram_w); - DECLARE_WRITE8_MEMBER(mermaid_colorram_w); + void mermaid_videoram2_w(offs_t offset, uint8_t data); + void mermaid_videoram_w(offs_t offset, uint8_t data); + void mermaid_colorram_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w); DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w); - DECLARE_WRITE8_MEMBER(mermaid_bg_scroll_w); - DECLARE_WRITE8_MEMBER(mermaid_fg_scroll_w); + void mermaid_bg_scroll_w(offs_t offset, uint8_t data); + void mermaid_fg_scroll_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(rougien_gfxbankswitch1_w); DECLARE_WRITE_LINE_MEMBER(rougien_gfxbankswitch2_w); - DECLARE_READ8_MEMBER(mermaid_collision_r); + uint8_t mermaid_collision_r(); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); virtual void machine_start() override; diff --git a/src/mame/includes/metlclsh.h b/src/mame/includes/metlclsh.h index 41485c25efd..8eb2f518124 100644 --- a/src/mame/includes/metlclsh.h +++ b/src/mame/includes/metlclsh.h @@ -47,16 +47,16 @@ private: required_device m_gfxdecode; required_device m_palette; - DECLARE_WRITE8_MEMBER(metlclsh_cause_irq); - DECLARE_WRITE8_MEMBER(metlclsh_ack_nmi); - DECLARE_WRITE8_MEMBER(metlclsh_cause_nmi2); - DECLARE_WRITE8_MEMBER(metlclsh_ack_irq2); - DECLARE_WRITE8_MEMBER(metlclsh_ack_nmi2); - DECLARE_WRITE8_MEMBER(metlclsh_flipscreen_w); - DECLARE_WRITE8_MEMBER(metlclsh_rambank_w); - DECLARE_WRITE8_MEMBER(metlclsh_gfxbank_w); - DECLARE_WRITE8_MEMBER(metlclsh_bgram_w); - DECLARE_WRITE8_MEMBER(metlclsh_fgram_w); + void metlclsh_cause_irq(uint8_t data); + void metlclsh_ack_nmi(uint8_t data); + void metlclsh_cause_nmi2(uint8_t data); + void metlclsh_ack_irq2(uint8_t data); + void metlclsh_ack_nmi2(uint8_t data); + void metlclsh_flipscreen_w(uint8_t data); + void metlclsh_rambank_w(uint8_t data); + void metlclsh_gfxbank_w(uint8_t data); + void metlclsh_bgram_w(offs_t offset, uint8_t data); + void metlclsh_fgram_w(offs_t offset, uint8_t data); TILEMAP_MAPPER_MEMBER(metlclsh_bgtilemap_scan); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); diff --git a/src/mame/includes/metro.h b/src/mame/includes/metro.h index 719ca620a93..e654f6bdc68 100644 --- a/src/mame/includes/metro.h +++ b/src/mame/includes/metro.h @@ -108,38 +108,38 @@ private: u8 irq_cause_r(offs_t offset); void irq_cause_w(offs_t offset, u8 data); - uint8_t irq_vector_r(offs_t offset); + u8 irq_vector_r(offs_t offset); void mouja_irq_timer_ctrl_w(uint16_t data); - DECLARE_WRITE8_MEMBER(sound_data_w); + void sound_data_w(u8 data); TIMER_CALLBACK_MEMBER(sound_data_sync); - DECLARE_READ8_MEMBER(soundstatus_r); - DECLARE_WRITE8_MEMBER(soundstatus_w); - template void upd7810_rombank_w(uint8_t data); - uint8_t upd7810_porta_r(); - void upd7810_porta_w(uint8_t data); - void upd7810_portb_w(uint8_t data); - void daitorid_portb_w(uint8_t data); - DECLARE_WRITE8_MEMBER(coin_lockout_1word_w); + u8 soundstatus_r(); + void soundstatus_w(u8 data); + template void upd7810_rombank_w(u8 data); + u8 upd7810_porta_r(); + void upd7810_porta_w(u8 data); + void upd7810_portb_w(u8 data); + void daitorid_portb_w(u8 data); + void coin_lockout_1word_w(u8 data); void coin_lockout_4words_w(offs_t offset, uint16_t data); uint16_t balcube_dsw_r(offs_t offset); uint16_t gakusai_input_r(); - DECLARE_WRITE8_MEMBER(blzntrnd_sh_bankswitch_w); + void blzntrnd_sh_bankswitch_w(u8 data); void puzzlet_irq_enable_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void puzzlet_portb_w(uint16_t data); void k053936_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE8_MEMBER(gakusai_oki_bank_hi_w); - DECLARE_WRITE8_MEMBER(gakusai_oki_bank_lo_w); - DECLARE_READ8_MEMBER(gakusai_eeprom_r); - DECLARE_WRITE8_MEMBER(gakusai_eeprom_w); - DECLARE_READ8_MEMBER(dokyusp_eeprom_r); - DECLARE_WRITE8_MEMBER(dokyusp_eeprom_bit_w); - DECLARE_WRITE8_MEMBER(dokyusp_eeprom_reset_w); - DECLARE_WRITE8_MEMBER(mouja_sound_rombank_w); + void gakusai_oki_bank_hi_w(u8 data); + void gakusai_oki_bank_lo_w(u8 data); + u8 gakusai_eeprom_r(); + void gakusai_eeprom_w(u8 data); + u8 dokyusp_eeprom_r(); + void dokyusp_eeprom_bit_w(u8 data); + void dokyusp_eeprom_reset_w(u8 data); + void mouja_sound_rombank_w(u8 data); DECLARE_WRITE_LINE_MEMBER(vdp_blit_end_w); // vmetal - DECLARE_WRITE8_MEMBER(vmetal_control_w); - DECLARE_WRITE8_MEMBER(es8712_reset_w); + void vmetal_control_w(u8 data); + void es8712_reset_w(u8 data); DECLARE_WRITE_LINE_MEMBER(vmetal_es8712_irq); TILE_GET_INFO_MEMBER(k053936_get_tile_info); @@ -223,12 +223,12 @@ private: int m_vblank_bit; int m_blitter_bit; int m_irq_line; - uint8_t m_requested_int[8]; + u8 m_requested_int[8]; emu_timer *m_mouja_irq_timer; emu_timer *m_karatour_irq_timer; /* sound related */ - uint8_t m_sound_data; + u8 m_sound_data; uint16_t m_soundstatus; int m_porta; int m_portb; diff --git a/src/mame/includes/mhavoc.h b/src/mame/includes/mhavoc.h index 949949ecc2e..b266763d947 100644 --- a/src/mame/includes/mhavoc.h +++ b/src/mame/includes/mhavoc.h @@ -51,23 +51,23 @@ public: DECLARE_READ_LINE_MEMBER(clock_r); private: - DECLARE_READ8_MEMBER(dual_pokey_r); - DECLARE_WRITE8_MEMBER(dual_pokey_w); - DECLARE_WRITE8_MEMBER(mhavoc_alpha_irq_ack_w); - DECLARE_WRITE8_MEMBER(mhavoc_gamma_irq_ack_w); - DECLARE_WRITE8_MEMBER(mhavoc_gamma_w); - DECLARE_READ8_MEMBER(mhavoc_alpha_r); - DECLARE_WRITE8_MEMBER(mhavoc_alpha_w); - DECLARE_READ8_MEMBER(mhavoc_gamma_r); - DECLARE_WRITE8_MEMBER(mhavoc_ram_banksel_w); - DECLARE_WRITE8_MEMBER(mhavoc_rom_banksel_w); - DECLARE_WRITE8_MEMBER(mhavoc_out_0_w); - DECLARE_WRITE8_MEMBER(alphaone_out_0_w); - DECLARE_WRITE8_MEMBER(mhavoc_out_1_w); - DECLARE_WRITE8_MEMBER(mhavocrv_speech_data_w); - DECLARE_WRITE8_MEMBER(mhavocrv_speech_strobe_w); - DECLARE_READ8_MEMBER(quad_pokeyn_r); - DECLARE_WRITE8_MEMBER(quad_pokeyn_w); + uint8_t dual_pokey_r(offs_t offset); + void dual_pokey_w(offs_t offset, uint8_t data); + void mhavoc_alpha_irq_ack_w(uint8_t data); + void mhavoc_gamma_irq_ack_w(uint8_t data); + void mhavoc_gamma_w(uint8_t data); + uint8_t mhavoc_alpha_r(); + void mhavoc_alpha_w(uint8_t data); + uint8_t mhavoc_gamma_r(); + void mhavoc_ram_banksel_w(uint8_t data); + void mhavoc_rom_banksel_w(uint8_t data); + void mhavoc_out_0_w(uint8_t data); + void alphaone_out_0_w(uint8_t data); + void mhavoc_out_1_w(uint8_t data); + void mhavocrv_speech_data_w(uint8_t data); + void mhavocrv_speech_strobe_w(uint8_t data); + uint8_t quad_pokeyn_r(offs_t offset); + void quad_pokeyn_w(offs_t offset, uint8_t data); TIMER_CALLBACK_MEMBER(delayed_gamma_w); TIMER_DEVICE_CALLBACK_MEMBER(mhavoc_cpu_irq_clock); diff --git a/src/mame/includes/micro3d.h b/src/mame/includes/micro3d.h index 07456d4d574..a76a2d0dc60 100644 --- a/src/mame/includes/micro3d.h +++ b/src/mame/includes/micro3d.h @@ -152,8 +152,8 @@ private: int m_drawing_buffer; int m_display_buffer; - DECLARE_WRITE8_MEMBER(vgb_uart_w); - DECLARE_READ8_MEMBER(vgb_uart_r); + void vgb_uart_w(offs_t offset, uint8_t data); + uint8_t vgb_uart_r(offs_t offset); void micro3d_mac1_w(uint32_t data); uint32_t micro3d_mac2_r(); void micro3d_mac2_w(uint32_t data); @@ -173,15 +173,15 @@ private: void micro3d_fifo_w(uint32_t data); void micro3d_alt_fifo_w(uint32_t data); uint32_t micro3d_pipe_r(); - DECLARE_WRITE8_MEMBER(micro3d_snd_dac_a); - DECLARE_WRITE8_MEMBER(micro3d_snd_dac_b); + void micro3d_snd_dac_a(uint8_t data); + void micro3d_snd_dac_b(uint8_t data); void micro3d_sound_p1_w(uint8_t data); void micro3d_sound_p3_w(uint8_t data); uint8_t micro3d_sound_p1_r(); uint8_t micro3d_sound_p3_r(); INTERRUPT_GEN_MEMBER(micro3d_vblank); TIMER_CALLBACK_MEMBER(mac_done_callback); - DECLARE_WRITE8_MEMBER(micro3d_upd7759_w); + void micro3d_upd7759_w(uint8_t data); void data_from_i8031(uint8_t data); uint8_t data_to_i8031(); DECLARE_WRITE_LINE_MEMBER(duart_irq_handler); diff --git a/src/mame/includes/micronic.h b/src/mame/includes/micronic.h index d4b019ffba7..4ff9b2bb4b7 100644 --- a/src/mame/includes/micronic.h +++ b/src/mame/includes/micronic.h @@ -59,18 +59,18 @@ protected: private: void nvram_init(nvram_device &nvram, void *data, size_t size); - DECLARE_READ8_MEMBER( keypad_r ); - DECLARE_READ8_MEMBER( status_flag_r ); - DECLARE_WRITE8_MEMBER( status_flag_w ); - DECLARE_WRITE8_MEMBER( kp_matrix_w ); - DECLARE_WRITE8_MEMBER( beep_w ); - DECLARE_READ8_MEMBER( irq_flag_r ); - DECLARE_WRITE8_MEMBER( port_2c_w ); - DECLARE_WRITE8_MEMBER( bank_select_w ); - DECLARE_WRITE8_MEMBER( lcd_contrast_w ); - DECLARE_WRITE8_MEMBER( rtc_address_w ); - DECLARE_READ8_MEMBER( rtc_data_r ); - DECLARE_WRITE8_MEMBER( rtc_data_w ); + uint8_t keypad_r(); + uint8_t status_flag_r(); + void status_flag_w(uint8_t data); + void kp_matrix_w(uint8_t data); + void beep_w(uint8_t data); + uint8_t irq_flag_r(); + void port_2c_w(uint8_t data); + void bank_select_w(uint8_t data); + void lcd_contrast_w(uint8_t data); + void rtc_address_w(uint8_t data); + uint8_t rtc_data_r(); + void rtc_data_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( mc146818_irq ); void micronic_palette(palette_device &palette) const; diff --git a/src/mame/includes/microtan.h b/src/mame/includes/microtan.h index 9c61e4112da..7cdcbf4b25c 100644 --- a/src/mame/includes/microtan.h +++ b/src/mame/includes/microtan.h @@ -53,8 +53,8 @@ public: void init_microtan(); TIMER_DEVICE_CALLBACK_MEMBER(kbd_scan); - DECLARE_READ8_MEMBER(bffx_r); - DECLARE_WRITE8_MEMBER(bffx_w); + uint8_t bffx_r(offs_t offset); + void bffx_w(offs_t offset, uint8_t data); DECLARE_INPUT_CHANGED_MEMBER(trigger_reset); protected: @@ -94,9 +94,9 @@ private: std::unique_ptr m_chunky_buffer; tilemap_t *m_bg_tilemap; - DECLARE_READ8_MEMBER(sound_r); - DECLARE_WRITE8_MEMBER(sound_w); - DECLARE_WRITE8_MEMBER(videoram_w); + uint8_t sound_r(); + void sound_w(uint8_t data); + void videoram_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); void pgm_chargen_w(offs_t offset, uint8_t data); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -128,7 +128,7 @@ protected: virtual void store_key(int key) override; private: - DECLARE_READ8_MEMBER(keyboard_r); + uint8_t keyboard_r(); void mt6809_map(address_map &map); }; diff --git a/src/mame/includes/mikie.h b/src/mame/includes/mikie.h index 8fb2e8aee04..9ccdc97f80e 100644 --- a/src/mame/includes/mikie.h +++ b/src/mame/includes/mikie.h @@ -45,15 +45,15 @@ private: required_device m_gfxdecode; required_device m_palette; - uint8_t m_irq_mask; - DECLARE_READ8_MEMBER(mikie_sh_timer_r); + uint8_t m_irq_mask; + uint8_t mikie_sh_timer_r(); DECLARE_WRITE_LINE_MEMBER(sh_irqtrigger_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_1_w); DECLARE_WRITE_LINE_MEMBER(coin_counter_2_w); DECLARE_WRITE_LINE_MEMBER(irq_mask_w); - DECLARE_WRITE8_MEMBER(mikie_videoram_w); - DECLARE_WRITE8_MEMBER(mikie_colorram_w); - DECLARE_WRITE8_MEMBER(mikie_palettebank_w); + void mikie_videoram_w(offs_t offset, uint8_t data); + void mikie_colorram_w(offs_t offset, uint8_t data); + void mikie_palettebank_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(flipscreen_w); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void machine_start() override; diff --git a/src/mame/includes/mikro80.h b/src/mame/includes/mikro80.h index a78ced1c7ef..de40452d1ea 100644 --- a/src/mame/includes/mikro80.h +++ b/src/mame/includes/mikro80.h @@ -57,15 +57,15 @@ private: required_shared_ptr m_video_ram; int m_keyboard_mask; int m_key_mask; - DECLARE_WRITE8_MEMBER(radio99_sound_w); + void radio99_sound_w(uint8_t data); uint8_t mikro80_8255_portb_r(); uint8_t mikro80_8255_portc_r(); void mikro80_8255_porta_w(uint8_t data); void mikro80_8255_portc_w(uint8_t data); - DECLARE_READ8_MEMBER(mikro80_keyboard_r); - DECLARE_WRITE8_MEMBER(mikro80_keyboard_w); - DECLARE_WRITE8_MEMBER(mikro80_tape_w); - DECLARE_READ8_MEMBER(mikro80_tape_r); + uint8_t mikro80_keyboard_r(offs_t offset); + void mikro80_keyboard_w(offs_t offset, uint8_t data); + void mikro80_tape_w(uint8_t data); + uint8_t mikro80_tape_r(); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_mikro80(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/mitchell.h b/src/mame/includes/mitchell.h index 9e4452820d2..462a77b2db4 100644 --- a/src/mame/includes/mitchell.h +++ b/src/mame/includes/mitchell.h @@ -107,34 +107,34 @@ private: int m_keymatrix; uint8_t m_irq_source; - DECLARE_READ8_MEMBER(pang_port5_r); - DECLARE_WRITE8_MEMBER(pang_bankswitch_w); - DECLARE_READ8_MEMBER(block_input_r); - DECLARE_WRITE8_MEMBER(block_dial_control_w); - DECLARE_READ8_MEMBER(mahjong_input_r); - DECLARE_WRITE8_MEMBER(mahjong_input_select_w); - DECLARE_READ8_MEMBER(input_r); - DECLARE_WRITE8_MEMBER(input_w); - DECLARE_WRITE8_MEMBER(mstworld_sound_w); - DECLARE_WRITE8_MEMBER(pang_video_bank_w); - DECLARE_WRITE8_MEMBER(mstworld_video_bank_w); - DECLARE_WRITE8_MEMBER(mgakuen_videoram_w); - DECLARE_READ8_MEMBER(mgakuen_videoram_r); - DECLARE_WRITE8_MEMBER(mgakuen_objram_w); - DECLARE_READ8_MEMBER(mgakuen_objram_r); - DECLARE_WRITE8_MEMBER(pang_videoram_w); - DECLARE_READ8_MEMBER(pang_videoram_r); - DECLARE_WRITE8_MEMBER(pang_colorram_w); - DECLARE_READ8_MEMBER(pang_colorram_r); - DECLARE_WRITE8_MEMBER(pang_gfxctrl_w); - DECLARE_WRITE8_MEMBER(pangbl_gfxctrl_w); - DECLARE_WRITE8_MEMBER(mstworld_gfxctrl_w); - DECLARE_WRITE8_MEMBER(pang_paletteram_w); - DECLARE_READ8_MEMBER(pang_paletteram_r); - DECLARE_WRITE8_MEMBER(eeprom_cs_w); - DECLARE_WRITE8_MEMBER(eeprom_clock_w); - DECLARE_WRITE8_MEMBER(eeprom_serial_w); - DECLARE_WRITE8_MEMBER(oki_banking_w); + uint8_t pang_port5_r(); + void pang_bankswitch_w(uint8_t data); + uint8_t block_input_r(offs_t offset); + void block_dial_control_w(uint8_t data); + uint8_t mahjong_input_r(offs_t offset); + void mahjong_input_select_w(uint8_t data); + uint8_t input_r(offs_t offset); + void input_w(uint8_t data); + void mstworld_sound_w(uint8_t data); + void pang_video_bank_w(uint8_t data); + void mstworld_video_bank_w(uint8_t data); + void mgakuen_videoram_w(offs_t offset, uint8_t data); + uint8_t mgakuen_videoram_r(offs_t offset); + void mgakuen_objram_w(offs_t offset, uint8_t data); + uint8_t mgakuen_objram_r(offs_t offset); + void pang_videoram_w(offs_t offset, uint8_t data); + uint8_t pang_videoram_r(offs_t offset); + void pang_colorram_w(offs_t offset, uint8_t data); + uint8_t pang_colorram_r(offs_t offset); + void pang_gfxctrl_w(uint8_t data); + void pangbl_gfxctrl_w(uint8_t data); + void mstworld_gfxctrl_w(uint8_t data); + void pang_paletteram_w(offs_t offset, uint8_t data); + uint8_t pang_paletteram_r(offs_t offset); + void eeprom_cs_w(uint8_t data); + void eeprom_clock_w(uint8_t data); + void eeprom_serial_w(uint8_t data); + void oki_banking_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); DECLARE_MACHINE_START(mitchell); @@ -145,7 +145,7 @@ private: void draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect ); void bootleg_decode(); void configure_banks(void (*decode)(uint8_t *src, uint8_t *dst, int size)); - DECLARE_WRITE8_MEMBER(sound_bankswitch_w); + void sound_bankswitch_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(spangbl_adpcm_int); void decrypted_opcodes_map(address_map &map); diff --git a/src/mame/includes/mjkjidai.h b/src/mame/includes/mjkjidai.h index 8130af068d1..e2a3b0455f7 100644 --- a/src/mame/includes/mjkjidai.h +++ b/src/mame/includes/mjkjidai.h @@ -50,9 +50,9 @@ private: void keyboard_select_lo_w(uint8_t data); void keyboard_select_hi_w(uint8_t data); - DECLARE_WRITE8_MEMBER(mjkjidai_videoram_w); + void mjkjidai_videoram_w(offs_t offset, uint8_t data); void mjkjidai_ctrl_w(uint8_t data); - DECLARE_WRITE8_MEMBER(adpcm_w); + void adpcm_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(adpcm_int); TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_start() override; diff --git a/src/mame/includes/model1.h b/src/mame/includes/model1.h index ed5dc6e5182..4ffe3f26498 100644 --- a/src/mame/includes/model1.h +++ b/src/mame/includes/model1.h @@ -97,9 +97,6 @@ private: virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_READ8_MEMBER(io_r); - DECLARE_WRITE8_MEMBER(io_w); - void bank_w(offs_t offset, u16 data, u16 mem_mask = ~0); TIMER_DEVICE_CALLBACK_MEMBER(model1_interrupt); @@ -209,7 +206,7 @@ private: // Machine void irq_raise(int level); void irq_init(); - DECLARE_WRITE8_MEMBER(irq_control_w); + void irq_control_w(u8 data); uint8_t m_irq_status; int m_last_irq; @@ -342,7 +339,7 @@ private: // I/O related output_finder<2> m_digits; output_finder<8> m_outs; - DECLARE_READ8_MEMBER(dpram_r); + u8 dpram_r(offs_t offset); void gen_outputs_w(uint8_t data); void vf_outputs_w(uint8_t data); void vr_outputs_w(uint8_t data); diff --git a/src/mame/includes/model2.h b/src/mame/includes/model2.h index 761803cf07e..e8aec216d39 100644 --- a/src/mame/includes/model2.h +++ b/src/mame/includes/model2.h @@ -205,7 +205,7 @@ protected: void fbvram_bankB_w(offs_t offset, u16 data, u16 mem_mask = ~0); void model2_3d_zclip_w(u32 data); void model2snd_ctrl(u16 data); - DECLARE_READ8_MEMBER(tgpid_r); + u8 tgpid_r(offs_t offset); u32 polygon_count_r(); u8 driveio_portg_r(); @@ -434,7 +434,7 @@ public: : model2o_state(mconfig, type, tag) {} - DECLARE_READ8_MEMBER(gtx_r); + u8 gtx_r(offs_t offset); void daytona_gtx(machine_config &config); void model2o_gtx_mem(address_map &map); diff --git a/src/mame/includes/model3.h b/src/mame/includes/model3.h index b1121701487..70ad7882468 100644 --- a/src/mame/includes/model3.h +++ b/src/mame/includes/model3.h @@ -296,8 +296,8 @@ private: uint64_t model3_rtc_r(offs_t offset, uint64_t mem_mask = ~0); void model3_rtc_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); uint64_t real3d_status_r(offs_t offset); - DECLARE_READ8_MEMBER(model3_sound_r); - DECLARE_WRITE8_MEMBER(model3_sound_w); + uint8_t model3_sound_r(offs_t offset); + void model3_sound_w(offs_t offset, uint8_t data); void daytona2_rombank_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); void model3snd_ctrl(uint16_t data); diff --git a/src/mame/includes/moo.h b/src/mame/includes/moo.h index 71cdd913536..62ec1f55436 100644 --- a/src/mame/includes/moo.h +++ b/src/mame/includes/moo.h @@ -82,7 +82,7 @@ private: uint16_t control2_r(); void control2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void sound_irq_w(uint16_t data); - DECLARE_WRITE8_MEMBER(sound_bankswitch_w); + void sound_bankswitch_w(uint8_t data); void moo_prot_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void moobl_oki_bank_w(uint16_t data); DECLARE_MACHINE_START(moo); diff --git a/src/mame/includes/mosaic.h b/src/mame/includes/mosaic.h index e83b3fc902c..4b4984bebf3 100644 --- a/src/mame/includes/mosaic.h +++ b/src/mame/includes/mosaic.h @@ -47,12 +47,12 @@ private: /* misc */ int m_prot_val; - DECLARE_WRITE8_MEMBER(protection_w); - DECLARE_READ8_MEMBER(protection_r); - DECLARE_WRITE8_MEMBER(gfire2_protection_w); - DECLARE_READ8_MEMBER(gfire2_protection_r); - DECLARE_WRITE8_MEMBER(fgvideoram_w); - DECLARE_WRITE8_MEMBER(bgvideoram_w); + void protection_w(uint8_t data); + uint8_t protection_r(); + void gfire2_protection_w(uint8_t data); + uint8_t gfire2_protection_r(); + void fgvideoram_w(offs_t offset, uint8_t data); + void bgvideoram_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); diff --git a/src/mame/includes/mouser.h b/src/mame/includes/mouser.h index aaaf2e65848..a68a349f06d 100644 --- a/src/mame/includes/mouser.h +++ b/src/mame/includes/mouser.h @@ -52,7 +52,7 @@ private: optional_shared_ptr m_decrypted_opcodes; DECLARE_WRITE_LINE_MEMBER(nmi_enable_w); - DECLARE_WRITE8_MEMBER(mouser_sound_nmi_clear_w); + void mouser_sound_nmi_clear_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(flip_screen_x_w); DECLARE_WRITE_LINE_MEMBER(flip_screen_y_w); void mouser_palette(palette_device &palette) const; diff --git a/src/mame/includes/mpu4.h b/src/mame/includes/mpu4.h index 8cc95a8c6fc..dee32473408 100644 --- a/src/mame/includes/mpu4.h +++ b/src/mame/includes/mpu4.h @@ -259,18 +259,18 @@ protected: return 0; } - DECLARE_WRITE8_MEMBER(bankswitch_w); - DECLARE_READ8_MEMBER(bankswitch_r); - DECLARE_WRITE8_MEMBER(bankset_w); - DECLARE_WRITE8_MEMBER(characteriser_w); - DECLARE_READ8_MEMBER(characteriser_r); - DECLARE_WRITE8_MEMBER(bwb_characteriser_w); - DECLARE_READ8_MEMBER(bwb_characteriser_r); - DECLARE_WRITE8_MEMBER(mpu4_ym2413_w); - DECLARE_READ8_MEMBER(mpu4_ym2413_r); - DECLARE_READ8_MEMBER(crystal_sound_r); - DECLARE_WRITE8_MEMBER(crystal_sound_w); - DECLARE_WRITE8_MEMBER(ic3ss_w); + void bankswitch_w(uint8_t data); + uint8_t bankswitch_r(); + void bankset_w(uint8_t data); + void characteriser_w(offs_t offset, uint8_t data); + uint8_t characteriser_r(address_space &space, offs_t offset); + void bwb_characteriser_w(offs_t offset, uint8_t data); + uint8_t bwb_characteriser_r(offs_t offset); + void mpu4_ym2413_w(offs_t offset, uint8_t data); + uint8_t mpu4_ym2413_r(offs_t offset); + uint8_t crystal_sound_r(); + void crystal_sound_w(uint8_t data); + void ic3ss_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(cpu0_irq); DECLARE_WRITE_LINE_MEMBER(ic2_o1_callback); DECLARE_WRITE_LINE_MEMBER(ic2_o2_callback); diff --git a/src/mame/includes/mpz80.h b/src/mame/includes/mpz80.h index 065279181b1..021077388df 100644 --- a/src/mame/includes/mpz80.h +++ b/src/mame/includes/mpz80.h @@ -56,18 +56,18 @@ private: inline void check_traps(); inline void check_interrupt(); - DECLARE_READ8_MEMBER( mmu_r ); - DECLARE_WRITE8_MEMBER( mmu_w ); - DECLARE_READ8_MEMBER( mmu_io_r ); - DECLARE_WRITE8_MEMBER( mmu_io_w ); - DECLARE_READ8_MEMBER( trap_addr_r ); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_READ8_MEMBER( switch_r ); - DECLARE_READ8_MEMBER( status_r ); - DECLARE_WRITE8_MEMBER( disp_seg_w ); - DECLARE_WRITE8_MEMBER( disp_col_w ); - DECLARE_WRITE8_MEMBER( task_w ); - DECLARE_WRITE8_MEMBER( mask_w ); + uint8_t mmu_r(offs_t offset); + void mmu_w(offs_t offset, uint8_t data); + uint8_t mmu_io_r(offs_t offset); + void mmu_io_w(offs_t offset, uint8_t data); + uint8_t trap_addr_r(); + uint8_t keyboard_r(); + uint8_t switch_r(); + uint8_t status_r(); + void disp_seg_w(uint8_t data); + void disp_col_w(uint8_t data); + void task_w(uint8_t data); + void mask_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER( s100_pint_w ); DECLARE_WRITE_LINE_MEMBER( s100_nmi_w ); diff --git a/src/mame/includes/mrdo.h b/src/mame/includes/mrdo.h index 377c66dfc61..a094821cce5 100644 --- a/src/mame/includes/mrdo.h +++ b/src/mame/includes/mrdo.h @@ -47,12 +47,12 @@ private: tilemap_t *m_fg_tilemap; int m_flipscreen; - DECLARE_READ8_MEMBER(mrdo_SECRE_r); - DECLARE_WRITE8_MEMBER(mrdo_bgvideoram_w); - DECLARE_WRITE8_MEMBER(mrdo_fgvideoram_w); - DECLARE_WRITE8_MEMBER(mrdo_scrollx_w); - DECLARE_WRITE8_MEMBER(mrdo_scrolly_w); - DECLARE_WRITE8_MEMBER(mrdo_flipscreen_w); + uint8_t mrdo_SECRE_r(); + void mrdo_bgvideoram_w(offs_t offset, uint8_t data); + void mrdo_fgvideoram_w(offs_t offset, uint8_t data); + void mrdo_scrollx_w(uint8_t data); + void mrdo_scrolly_w(uint8_t data); + void mrdo_flipscreen_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); void mrdo_palette(palette_device &palette) const; diff --git a/src/mame/includes/mrflea.h b/src/mame/includes/mrflea.h index d799a5f8800..7863528fa51 100644 --- a/src/mame/includes/mrflea.h +++ b/src/mame/includes/mrflea.h @@ -49,9 +49,9 @@ private: required_device m_palette; void mrflea_data1_w(uint8_t data); - DECLARE_WRITE8_MEMBER(mrflea_gfx_bank_w); - DECLARE_WRITE8_MEMBER(mrflea_videoram_w); - DECLARE_WRITE8_MEMBER(mrflea_spriteram_w); + void mrflea_gfx_bank_w(uint8_t data); + void mrflea_videoram_w(offs_t offset, uint8_t data); + void mrflea_spriteram_w(offs_t offset, uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_mrflea(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/mrjong.h b/src/mame/includes/mrjong.h index adfd472e028..6d8ffbb8c37 100644 --- a/src/mame/includes/mrjong.h +++ b/src/mame/includes/mrjong.h @@ -28,10 +28,10 @@ public: void mrjong(machine_config &config); private: - DECLARE_READ8_MEMBER(io_0x03_r); - DECLARE_WRITE8_MEMBER(mrjong_videoram_w); - DECLARE_WRITE8_MEMBER(mrjong_colorram_w); - DECLARE_WRITE8_MEMBER(mrjong_flipscreen_w); + uint8_t io_0x03_r(); + void mrjong_videoram_w(offs_t offset, uint8_t data); + void mrjong_colorram_w(offs_t offset, uint8_t data); + void mrjong_flipscreen_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); virtual void video_start() override; void mrjong_palette(palette_device &palette) const; diff --git a/src/mame/includes/ms32.h b/src/mame/includes/ms32.h index 3787ed2b477..aa6a8f1c3d5 100644 --- a/src/mame/includes/ms32.h +++ b/src/mame/includes/ms32.h @@ -60,10 +60,10 @@ protected: void configure_banks(); TIMER_DEVICE_CALLBACK_MEMBER(ms32_interrupt); - DECLARE_WRITE8_MEMBER(ms32_snd_bank_w); + void ms32_snd_bank_w(u8 data); - DECLARE_READ8_MEMBER(latch_r); - DECLARE_WRITE8_MEMBER(to_main_w); + u8 latch_r(); + void to_main_w(u8 data); u32 ms32_sound_r(); void ms32_sound_w(u32 data); void reset_sub_w(u32 data); @@ -114,10 +114,10 @@ private: int m_brt_g; int m_brt_b; u32 ms32_read_inputs3(); - DECLARE_READ8_MEMBER(ms32_nvram_r8); - DECLARE_WRITE8_MEMBER(ms32_nvram_w8); - DECLARE_READ8_MEMBER(ms32_priram_r8); - DECLARE_WRITE8_MEMBER(ms32_priram_w8); + u8 ms32_nvram_r8(offs_t offset); + void ms32_nvram_w8(offs_t offset, u8 data); + u8 ms32_priram_r8(offs_t offset); + void ms32_priram_w8(offs_t offset, u8 data); u16 ms32_palram_r16(offs_t offset); void ms32_palram_w16(offs_t offset, u16 data, u16 mem_mask = ~0); u16 ms32_rozram_r16(offs_t offset); diff --git a/src/mame/includes/msisaac.h b/src/mame/includes/msisaac.h index eb7129e2bbc..e95ec128ceb 100644 --- a/src/mame/includes/msisaac.h +++ b/src/mame/includes/msisaac.h @@ -81,25 +81,25 @@ private: required_device m_palette; required_device m_soundlatch; - DECLARE_WRITE8_MEMBER(sound_command_w); - DECLARE_WRITE8_MEMBER(nmi_disable_w); - DECLARE_WRITE8_MEMBER(nmi_enable_w); - DECLARE_WRITE8_MEMBER(ms_unknown_w); - DECLARE_READ8_MEMBER(msisaac_mcu_r); - DECLARE_READ8_MEMBER(msisaac_mcu_status_r); - DECLARE_WRITE8_MEMBER(msisaac_mcu_w); - DECLARE_WRITE8_MEMBER(sound_control_1_w); - DECLARE_WRITE8_MEMBER(msisaac_fg_scrolly_w); - DECLARE_WRITE8_MEMBER(msisaac_fg_scrollx_w); - DECLARE_WRITE8_MEMBER(msisaac_bg2_scrolly_w); - DECLARE_WRITE8_MEMBER(msisaac_bg2_scrollx_w); - DECLARE_WRITE8_MEMBER(msisaac_bg_scrolly_w); - DECLARE_WRITE8_MEMBER(msisaac_bg_scrollx_w); - DECLARE_WRITE8_MEMBER(msisaac_bg2_textbank_w); - DECLARE_WRITE8_MEMBER(msisaac_bg_videoram_w); - DECLARE_WRITE8_MEMBER(msisaac_bg2_videoram_w); - DECLARE_WRITE8_MEMBER(msisaac_fg_videoram_w); - DECLARE_WRITE8_MEMBER(sound_control_0_w); + void sound_command_w(uint8_t data); + void nmi_disable_w(uint8_t data); + void nmi_enable_w(uint8_t data); + void ms_unknown_w(uint8_t data); + uint8_t msisaac_mcu_r(offs_t offset); + uint8_t msisaac_mcu_status_r(offs_t offset); + void msisaac_mcu_w(offs_t offset, uint8_t data); + void sound_control_1_w(uint8_t data); + void msisaac_fg_scrolly_w(uint8_t data); + void msisaac_fg_scrollx_w(uint8_t data); + void msisaac_bg2_scrolly_w(uint8_t data); + void msisaac_bg2_scrollx_w(uint8_t data); + void msisaac_bg_scrolly_w(uint8_t data); + void msisaac_bg_scrollx_w(uint8_t data); + void msisaac_bg2_textbank_w(uint8_t data); + void msisaac_bg_videoram_w(offs_t offset, uint8_t data); + void msisaac_bg2_videoram_w(offs_t offset, uint8_t data); + void msisaac_fg_videoram_w(offs_t offset, uint8_t data); + void sound_control_0_w(uint8_t data); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_bg2_tile_info); diff --git a/src/mame/includes/msx.h b/src/mame/includes/msx.h index e53a87532ba..7d186a84657 100644 --- a/src/mame/includes/msx.h +++ b/src/mame/includes/msx.h @@ -288,15 +288,15 @@ protected: virtual void machine_reset() override; virtual void device_post_load() override; - DECLARE_WRITE8_MEMBER(msx_sec_slot_w); - DECLARE_READ8_MEMBER(msx_sec_slot_r); - DECLARE_READ8_MEMBER(msx_kanji_r); - DECLARE_WRITE8_MEMBER(msx_kanji_w); + void msx_sec_slot_w(uint8_t data); + uint8_t msx_sec_slot_r(); + uint8_t msx_kanji_r(offs_t offset); + void msx_kanji_w(offs_t offset, uint8_t data); void msx_ppi_port_a_w(uint8_t data); void msx_ppi_port_c_w(uint8_t data); uint8_t msx_ppi_port_b_r(); - DECLARE_READ8_MEMBER(msx_mem_read); - DECLARE_WRITE8_MEMBER(msx_mem_write); + uint8_t msx_mem_read(offs_t offset); + void msx_mem_write(offs_t offset, uint8_t data); uint8_t msx_psg_port_a_r(); uint8_t msx_psg_port_b_r(); void msx_psg_port_a_w(uint8_t data); @@ -491,11 +491,11 @@ private: void msx_ym2413(machine_config &config); void msx2_64kb_vram(machine_config &config); - DECLARE_READ8_MEMBER(msx_rtc_reg_r); - DECLARE_WRITE8_MEMBER(msx_rtc_reg_w); - DECLARE_WRITE8_MEMBER(msx_rtc_latch_w); - DECLARE_READ8_MEMBER(msx_switched_r); - DECLARE_WRITE8_MEMBER(msx_switched_w); + uint8_t msx_rtc_reg_r(); + void msx_rtc_reg_w(uint8_t data); + void msx_rtc_latch_w(uint8_t data); + uint8_t msx_switched_r(offs_t offset); + void msx_switched_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(turbo_w); void msx2_io_map(address_map &map); diff --git a/src/mame/includes/mtx.h b/src/mame/includes/mtx.h index 463174ee3fd..ee2170d6270 100644 --- a/src/mame/includes/mtx.h +++ b/src/mame/includes/mtx.h @@ -81,26 +81,26 @@ private: int m_centronics_perror; int m_centronics_select; - DECLARE_WRITE8_MEMBER(mtx_subpage_w); - DECLARE_WRITE8_MEMBER(mtx_bankswitch_w); - DECLARE_WRITE8_MEMBER(mtx_sound_latch_w); - DECLARE_WRITE8_MEMBER(mtx_sense_w); - DECLARE_READ8_MEMBER(mtx_key_lo_r); - DECLARE_READ8_MEMBER(mtx_key_hi_r); - DECLARE_WRITE8_MEMBER(hrx_address_w); - DECLARE_READ8_MEMBER(hrx_data_r); - DECLARE_WRITE8_MEMBER(hrx_data_w); - DECLARE_READ8_MEMBER(hrx_attr_r); - DECLARE_WRITE8_MEMBER(hrx_attr_w); + void mtx_subpage_w(uint8_t data); + void mtx_bankswitch_w(uint8_t data); + void mtx_sound_latch_w(uint8_t data); + void mtx_sense_w(uint8_t data); + uint8_t mtx_key_lo_r(); + uint8_t mtx_key_hi_r(); + void hrx_address_w(offs_t offset, uint8_t data); + uint8_t hrx_data_r(); + void hrx_data_w(uint8_t data); + uint8_t hrx_attr_r(); + void hrx_attr_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(ctc_tick); TIMER_DEVICE_CALLBACK_MEMBER(cassette_tick); DECLARE_WRITE_LINE_MEMBER(ctc_trg1_w); DECLARE_WRITE_LINE_MEMBER(ctc_trg2_w); - DECLARE_READ8_MEMBER(mtx_strobe_r); - DECLARE_READ8_MEMBER(mtx_sound_strobe_r); - DECLARE_WRITE8_MEMBER(mtx_cst_w); - DECLARE_WRITE8_MEMBER(mtx_cst_motor_w); - DECLARE_READ8_MEMBER(mtx_prt_r); + uint8_t mtx_strobe_r(); + uint8_t mtx_sound_strobe_r(); + void mtx_cst_w(uint8_t data); + void mtx_cst_motor_w(uint8_t data); + uint8_t mtx_prt_r(); DECLARE_WRITE_LINE_MEMBER(write_centronics_busy); DECLARE_WRITE_LINE_MEMBER(write_centronics_fault); DECLARE_WRITE_LINE_MEMBER(write_centronics_perror); diff --git a/src/mame/includes/multfish.h b/src/mame/includes/multfish.h index fadec1b8efe..1758f5e6dc9 100644 --- a/src/mame/includes/multfish.h +++ b/src/mame/includes/multfish.h @@ -60,22 +60,22 @@ public: void init_rollfruit(); private: - DECLARE_WRITE8_MEMBER(igrosoft_gamble_vid_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_bank_w); - DECLARE_READ8_MEMBER(bankedram_r); - DECLARE_WRITE8_MEMBER(bankedram_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_rambank_w); - DECLARE_READ8_MEMBER(ray_r); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_hopper_w); - DECLARE_WRITE8_MEMBER(rollfr_hopper_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps1_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps2_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_lamps3_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_counters_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_f3_w); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_dispenable_w); - DECLARE_READ8_MEMBER(igrosoft_gamble_timekeeper_r); - DECLARE_WRITE8_MEMBER(igrosoft_gamble_timekeeper_w); + void igrosoft_gamble_vid_w(offs_t offset, uint8_t data); + void igrosoft_gamble_bank_w(uint8_t data); + uint8_t bankedram_r(offs_t offset); + void bankedram_w(offs_t offset, uint8_t data); + void igrosoft_gamble_rambank_w(uint8_t data); + uint8_t ray_r(); + void igrosoft_gamble_hopper_w(uint8_t data); + void rollfr_hopper_w(uint8_t data); + void igrosoft_gamble_lamps1_w(uint8_t data); + void igrosoft_gamble_lamps2_w(uint8_t data); + void igrosoft_gamble_lamps3_w(uint8_t data); + void igrosoft_gamble_counters_w(uint8_t data); + void igrosoft_gamble_f3_w(uint8_t data); + void igrosoft_gamble_dispenable_w(uint8_t data); + uint8_t igrosoft_gamble_timekeeper_r(offs_t offset); + void igrosoft_gamble_timekeeper_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_igrosoft_gamble_tile_info); TILE_GET_INFO_MEMBER(get_igrosoft_gamble_reel_tile_info); uint32_t screen_update_igrosoft_gamble(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/munchmo.h b/src/mame/includes/munchmo.h index e85bce77918..c6a411f82f6 100644 --- a/src/mame/includes/munchmo.h +++ b/src/mame/includes/munchmo.h @@ -44,11 +44,11 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(nmi_enable_w); - DECLARE_WRITE8_MEMBER(nmi_ack_w); - DECLARE_WRITE8_MEMBER(sound_nmi_ack_w); + void nmi_ack_w(uint8_t data); + void sound_nmi_ack_w(uint8_t data); - DECLARE_READ8_MEMBER(ay1reset_r); - DECLARE_READ8_MEMBER(ay2reset_r); + uint8_t ay1reset_r(); + uint8_t ay2reset_r(); DECLARE_WRITE_LINE_MEMBER(palette_bank_0_w); DECLARE_WRITE_LINE_MEMBER(palette_bank_1_w); diff --git a/src/mame/includes/mustache.h b/src/mame/includes/mustache.h index fc55e34dcf6..bc4f9612cb0 100644 --- a/src/mame/includes/mustache.h +++ b/src/mame/includes/mustache.h @@ -43,9 +43,9 @@ private: tilemap_t *m_bg_tilemap; int m_control_byte; - DECLARE_WRITE8_MEMBER(videoram_w); - DECLARE_WRITE8_MEMBER(video_control_w); - DECLARE_WRITE8_MEMBER(scroll_w); + void videoram_w(offs_t offset, uint8_t data); + void video_control_w(uint8_t data); + void scroll_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); diff --git a/src/mame/includes/mw8080bw.h b/src/mame/includes/mw8080bw.h index 27b99e96cc0..d9a17ebd9d4 100644 --- a/src/mame/includes/mw8080bw.h +++ b/src/mame/includes/mw8080bw.h @@ -117,18 +117,18 @@ private: attotime m_interrupt_time; - DECLARE_WRITE8_MEMBER(tornbase_io_w); - DECLARE_WRITE8_MEMBER(maze_coin_counter_w); - DECLARE_WRITE8_MEMBER(maze_io_w); - DECLARE_WRITE8_MEMBER(checkmat_io_w); - DECLARE_READ8_MEMBER(bowler_shift_result_r); - DECLARE_WRITE8_MEMBER(bowler_lights_1_w); - DECLARE_WRITE8_MEMBER(bowler_lights_2_w); - DECLARE_WRITE8_MEMBER(bowler_audio_2_w); - DECLARE_WRITE8_MEMBER(bowler_audio_3_w); - DECLARE_WRITE8_MEMBER(bowler_audio_4_w); - DECLARE_WRITE8_MEMBER(bowler_audio_5_w); - DECLARE_WRITE8_MEMBER(bowler_audio_6_w); + void tornbase_io_w(offs_t offset, uint8_t data); + void maze_coin_counter_w(uint8_t data); + void maze_io_w(offs_t offset, uint8_t data); + void checkmat_io_w(offs_t offset, uint8_t data); + uint8_t bowler_shift_result_r(); + void bowler_lights_1_w(uint8_t data); + void bowler_lights_2_w(uint8_t data); + void bowler_audio_2_w(uint8_t data); + void bowler_audio_3_w(uint8_t data); + void bowler_audio_4_w(uint8_t data); + void bowler_audio_5_w(uint8_t data); + void bowler_audio_6_w(uint8_t data); DECLARE_MACHINE_START(maze); DECLARE_MACHINE_START(phantom2); DECLARE_MACHINE_START(invaders); @@ -136,12 +136,12 @@ private: DECLARE_WRITE_LINE_MEMBER(screen_vblank_phantom2); TIMER_CALLBACK_MEMBER(maze_tone_timing_timer_callback); TIMER_CALLBACK_MEMBER(interrupt_trigger); - DECLARE_WRITE8_MEMBER(tornbase_audio_w); - DECLARE_WRITE8_MEMBER(checkmat_audio_w); - DECLARE_WRITE8_MEMBER(shuffle_audio_1_w); - DECLARE_WRITE8_MEMBER(shuffle_audio_2_w); - DECLARE_WRITE8_MEMBER(bowler_audio_1_w); - DECLARE_WRITE8_MEMBER(blueshrk_audio_w); + void tornbase_audio_w(uint8_t data); + void checkmat_audio_w(uint8_t data); + void shuffle_audio_1_w(uint8_t data); + void shuffle_audio_2_w(uint8_t data); + void bowler_audio_1_w(uint8_t data); + void blueshrk_audio_w(uint8_t data); void maze_update_discrete(); void maze_write_discrete(uint8_t maze_tone_timing_state); uint8_t vpos_to_vysnc_chain_counter(int vpos); diff --git a/src/mame/includes/mystston.h b/src/mame/includes/mystston.h index 94bb6d94895..dab3bb7ffc1 100644 --- a/src/mame/includes/mystston.h +++ b/src/mame/includes/mystston.h @@ -61,9 +61,9 @@ private: required_shared_ptr m_paletteram; required_shared_ptr m_scroll; required_shared_ptr m_video_control; - DECLARE_WRITE8_MEMBER(irq_clear_w); - DECLARE_WRITE8_MEMBER(mystston_ay8910_select_w); - DECLARE_WRITE8_MEMBER(mystston_video_control_w); + void irq_clear_w(uint8_t data); + void mystston_ay8910_select_w(uint8_t data); + void mystston_video_control_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); uint32_t screen_update_mystston(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/mystwarr.h b/src/mame/includes/mystwarr.h index 022ae40a059..1aae783b340 100644 --- a/src/mame/includes/mystwarr.h +++ b/src/mame/includes/mystwarr.h @@ -65,7 +65,7 @@ private: void mceeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint16_t mccontrol_r(); void mccontrol_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE8_MEMBER(sound_ctrl_w); + void sound_ctrl_w(uint8_t data); void ddd_053936_enable_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void ddd_053936_clip_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/mame/includes/mz2500.h b/src/mame/includes/mz2500.h index a8bb9d560ea..5661379fabd 100644 --- a/src/mame/includes/mz2500.h +++ b/src/mame/includes/mz2500.h @@ -130,41 +130,41 @@ private: uint8_t m_pio_latchb; uint8_t m_ym_porta; uint8_t m_screen_enable; - DECLARE_READ8_MEMBER(mz2500_bank_addr_r); - DECLARE_WRITE8_MEMBER(mz2500_bank_addr_w); - DECLARE_READ8_MEMBER(mz2500_bank_data_r); - DECLARE_WRITE8_MEMBER(mz2500_bank_data_w); - DECLARE_WRITE8_MEMBER(mz2500_kanji_bank_w); - DECLARE_WRITE8_MEMBER(mz2500_dictionary_bank_w); - DECLARE_READ8_MEMBER(mz2500_crtc_hvblank_r); - DECLARE_WRITE8_MEMBER(mz2500_tv_crtc_w); - DECLARE_WRITE8_MEMBER(mz2500_irq_sel_w); - DECLARE_WRITE8_MEMBER(mz2500_irq_data_w); - DECLARE_READ8_MEMBER(mz2500_rom_r); - DECLARE_WRITE8_MEMBER(mz2500_rom_w); - DECLARE_WRITE8_MEMBER(palette4096_io_w); - DECLARE_READ8_MEMBER(mz2500_bplane_latch_r); - DECLARE_READ8_MEMBER(mz2500_rplane_latch_r); - DECLARE_READ8_MEMBER(mz2500_gplane_latch_r); - DECLARE_READ8_MEMBER(mz2500_iplane_latch_r); - DECLARE_WRITE8_MEMBER(mz2500_cg_addr_w); - DECLARE_WRITE8_MEMBER(mz2500_cg_data_w); - DECLARE_WRITE8_MEMBER(timer_w); - DECLARE_READ8_MEMBER(mz2500_joystick_r); - DECLARE_WRITE8_MEMBER(mz2500_joystick_w); - DECLARE_READ8_MEMBER(mz2500_kanji_r); - DECLARE_WRITE8_MEMBER(mz2500_kanji_w); - DECLARE_READ8_MEMBER(rp5c15_8_r); - DECLARE_WRITE8_MEMBER(rp5c15_8_w); - DECLARE_READ8_MEMBER(mz2500_emm_data_r); - DECLARE_WRITE8_MEMBER(mz2500_emm_addr_w); - DECLARE_WRITE8_MEMBER(mz2500_emm_data_w); - - DECLARE_READ8_MEMBER(rmw_r); - DECLARE_WRITE8_MEMBER(rmw_w); - DECLARE_READ8_MEMBER(kanji_pcg_r); - DECLARE_WRITE8_MEMBER(kanji_pcg_w); - DECLARE_READ8_MEMBER(dict_rom_r); + uint8_t mz2500_bank_addr_r(); + void mz2500_bank_addr_w(uint8_t data); + uint8_t mz2500_bank_data_r(); + void mz2500_bank_data_w(uint8_t data); + void mz2500_kanji_bank_w(uint8_t data); + void mz2500_dictionary_bank_w(uint8_t data); + uint8_t mz2500_crtc_hvblank_r(); + void mz2500_tv_crtc_w(offs_t offset, uint8_t data); + void mz2500_irq_sel_w(uint8_t data); + void mz2500_irq_data_w(uint8_t data); + uint8_t mz2500_rom_r(); + void mz2500_rom_w(uint8_t data); + void palette4096_io_w(uint8_t data); + uint8_t mz2500_bplane_latch_r(); + uint8_t mz2500_rplane_latch_r(); + uint8_t mz2500_gplane_latch_r(); + uint8_t mz2500_iplane_latch_r(); + void mz2500_cg_addr_w(uint8_t data); + void mz2500_cg_data_w(uint8_t data); + void timer_w(uint8_t data); + uint8_t mz2500_joystick_r(); + void mz2500_joystick_w(uint8_t data); + uint8_t mz2500_kanji_r(offs_t offset); + void mz2500_kanji_w(offs_t offset, uint8_t data); + uint8_t rp5c15_8_r(); + void rp5c15_8_w(uint8_t data); + uint8_t mz2500_emm_data_r(); + void mz2500_emm_addr_w(uint8_t data); + void mz2500_emm_data_w(uint8_t data); + + uint8_t rmw_r(offs_t offset); + void rmw_w(offs_t offset, uint8_t data); + uint8_t kanji_pcg_r(offs_t offset); + void kanji_pcg_w(offs_t offset, uint8_t data); + uint8_t dict_rom_r(offs_t offset); uint8_t mz2500_cg_latch_compare(); virtual void machine_start() override; @@ -174,10 +174,10 @@ private: uint32_t screen_update_mz2500(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(mz2500_vbl); - DECLARE_READ8_MEMBER(fdc_r); - DECLARE_WRITE8_MEMBER(fdc_w); - DECLARE_WRITE8_MEMBER(floppy_select_w); - DECLARE_WRITE8_MEMBER(floppy_side_w); + uint8_t fdc_r(offs_t offset); + void fdc_w(offs_t offset, uint8_t data); + void floppy_select_w(uint8_t data); + void floppy_side_w(uint8_t data); uint8_t mz2500_porta_r(); uint8_t mz2500_portb_r(); diff --git a/src/mame/includes/mz700.h b/src/mame/includes/mz700.h index b795fd8fa55..8e72a4a6dc1 100644 --- a/src/mame/includes/mz700.h +++ b/src/mame/includes/mz700.h @@ -51,28 +51,28 @@ public: void init_mz700(); private: - DECLARE_READ8_MEMBER(mz700_e008_r); - DECLARE_WRITE8_MEMBER(mz700_e008_w); - DECLARE_READ8_MEMBER(mz800_bank_0_r); - DECLARE_WRITE8_MEMBER(mz700_bank_0_w); - DECLARE_WRITE8_MEMBER(mz800_bank_0_w); - DECLARE_READ8_MEMBER(mz800_bank_1_r); - DECLARE_WRITE8_MEMBER(mz700_bank_1_w); - DECLARE_WRITE8_MEMBER(mz700_bank_2_w); - DECLARE_WRITE8_MEMBER(mz700_bank_3_w); - DECLARE_WRITE8_MEMBER(mz700_bank_4_w); - DECLARE_WRITE8_MEMBER(mz700_bank_5_w); - DECLARE_WRITE8_MEMBER(mz700_bank_6_w); - DECLARE_READ8_MEMBER(mz800_crtc_r); - DECLARE_WRITE8_MEMBER(mz800_write_format_w); - DECLARE_WRITE8_MEMBER(mz800_read_format_w); - DECLARE_WRITE8_MEMBER(mz800_display_mode_w); - DECLARE_WRITE8_MEMBER(mz800_scroll_border_w); - DECLARE_READ8_MEMBER(mz800_ramdisk_r); - DECLARE_WRITE8_MEMBER(mz800_ramdisk_w); - DECLARE_WRITE8_MEMBER(mz800_ramaddr_w); - DECLARE_WRITE8_MEMBER(mz800_palette_w); - DECLARE_WRITE8_MEMBER(mz800_cgram_w); + uint8_t mz700_e008_r(); + void mz700_e008_w(uint8_t data); + uint8_t mz800_bank_0_r(); + void mz700_bank_0_w(uint8_t data); + void mz800_bank_0_w(uint8_t data); + uint8_t mz800_bank_1_r(); + void mz700_bank_1_w(uint8_t data); + void mz700_bank_2_w(uint8_t data); + void mz700_bank_3_w(uint8_t data); + void mz700_bank_4_w(uint8_t data); + void mz700_bank_5_w(uint8_t data); + void mz700_bank_6_w(uint8_t data); + uint8_t mz800_crtc_r(); + void mz800_write_format_w(uint8_t data); + void mz800_read_format_w(uint8_t data); + void mz800_display_mode_w(uint8_t data); + void mz800_scroll_border_w(uint8_t data); + uint8_t mz800_ramdisk_r(); + void mz800_ramdisk_w(uint8_t data); + void mz800_ramaddr_w(uint8_t data); + void mz800_palette_w(uint8_t data); + void mz800_cgram_w(offs_t offset, uint8_t data); DECLARE_MACHINE_RESET(mz700); DECLARE_MACHINE_RESET(mz800); virtual void machine_start() override; diff --git a/src/mame/includes/mz80.h b/src/mame/includes/mz80.h index 73df51facdd..b426ccef9ac 100644 --- a/src/mame/includes/mz80.h +++ b/src/mame/includes/mz80.h @@ -39,8 +39,8 @@ public: void init_mz80k(); private: - DECLARE_READ8_MEMBER(mz80k_strobe_r); - DECLARE_WRITE8_MEMBER(mz80k_strobe_w); + uint8_t mz80k_strobe_r(); + void mz80k_strobe_w(uint8_t data); uint8_t mz80k_8255_portb_r(); uint8_t mz80k_8255_portc_r(); void mz80k_8255_porta_w(uint8_t data); diff --git a/src/mame/includes/n64.h b/src/mame/includes/n64.h index a12b2cf5b59..ced1597a25e 100644 --- a/src/mame/includes/n64.h +++ b/src/mame/includes/n64.h @@ -84,28 +84,28 @@ public: // construction/destruction n64_periphs(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ32_MEMBER( is64_r ); - DECLARE_WRITE32_MEMBER( is64_w ); - DECLARE_READ32_MEMBER( open_r ); - DECLARE_WRITE32_MEMBER( open_w ); - DECLARE_READ32_MEMBER( rdram_reg_r ); - DECLARE_WRITE32_MEMBER( rdram_reg_w ); - DECLARE_READ32_MEMBER( mi_reg_r ); - DECLARE_WRITE32_MEMBER( mi_reg_w ); - DECLARE_READ32_MEMBER( vi_reg_r ); - DECLARE_WRITE32_MEMBER( vi_reg_w ); - DECLARE_READ32_MEMBER( ai_reg_r ); - DECLARE_WRITE32_MEMBER( ai_reg_w ); - DECLARE_READ32_MEMBER( pi_reg_r ); - DECLARE_WRITE32_MEMBER( pi_reg_w ); - DECLARE_READ32_MEMBER( ri_reg_r ); - DECLARE_WRITE32_MEMBER( ri_reg_w ); - DECLARE_READ32_MEMBER( si_reg_r ); - DECLARE_WRITE32_MEMBER( si_reg_w ); - DECLARE_READ32_MEMBER( dd_reg_r ); - DECLARE_WRITE32_MEMBER( dd_reg_w ); - DECLARE_READ32_MEMBER( pif_ram_r ); - DECLARE_WRITE32_MEMBER( pif_ram_w ); + uint32_t is64_r(offs_t offset); + void is64_w(offs_t offset, uint32_t data); + uint32_t open_r(offs_t offset); + void open_w(uint32_t data); + uint32_t rdram_reg_r(offs_t offset, uint32_t mem_mask = ~0); + void rdram_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t mi_reg_r(offs_t offset, uint32_t mem_mask = ~0); + void mi_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vi_reg_r(offs_t offset, uint32_t mem_mask = ~0); + void vi_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t ai_reg_r(offs_t offset, uint32_t mem_mask = ~0); + void ai_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t pi_reg_r(offs_t offset, uint32_t mem_mask = ~0); + void pi_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t ri_reg_r(offs_t offset, uint32_t mem_mask = ~0); + void ri_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t si_reg_r(offs_t offset); + void si_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t dd_reg_r(offs_t offset); + void dd_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t pif_ram_r(offs_t offset, uint32_t mem_mask = ~0); + void pif_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); TIMER_CALLBACK_MEMBER(reset_timer_callback); TIMER_CALLBACK_MEMBER(vi_scanline_callback); TIMER_CALLBACK_MEMBER(dp_delay_callback); diff --git a/src/mame/includes/namcofl.h b/src/mame/includes/namcofl.h index cc106f39dab..f644e3e0559 100644 --- a/src/mame/includes/namcofl.h +++ b/src/mame/includes/namcofl.h @@ -69,12 +69,12 @@ private: m_mainbank[1]->set_bank(bank ^ 1); // RAM, ROM } - DECLARE_READ32_MEMBER(unk1_r); - DECLARE_READ32_MEMBER(network_r); - DECLARE_READ32_MEMBER(sysreg_r); - DECLARE_WRITE32_MEMBER(sysreg_w); - DECLARE_WRITE8_MEMBER(c116_w); - DECLARE_WRITE16_MEMBER(mcu_shared_w); + uint32_t unk1_r(); + uint32_t network_r(); + uint32_t sysreg_r(); + void sysreg_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + void c116_w(offs_t offset, uint8_t data); + void mcu_shared_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint8_t port6_r(); void port6_w(uint8_t data); uint8_t port7_r(); @@ -86,7 +86,7 @@ private: uint8_t dac2_r(); uint8_t dac1_r(); uint8_t dac0_r(); - DECLARE_WRITE32_MEMBER(spritebank_w); + void spritebank_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); DECLARE_MACHINE_START(namcofl); DECLARE_MACHINE_RESET(namcofl); DECLARE_VIDEO_START(namcofl); diff --git a/src/mame/includes/namconb1.h b/src/mame/includes/namconb1.h index 6ba65c46ff4..412f3cf6693 100644 --- a/src/mame/includes/namconb1.h +++ b/src/mame/includes/namconb1.h @@ -119,23 +119,23 @@ private: u32 m_tilemap_tile_bank[4]; std::unique_ptr m_spritebank32_delayed; - DECLARE_READ32_MEMBER(randgen_r); - DECLARE_WRITE32_MEMBER(srand_w); - DECLARE_WRITE8_MEMBER(namconb1_cpureg_w); - DECLARE_WRITE8_MEMBER(namconb2_cpureg_w); - DECLARE_READ8_MEMBER(namconb1_cpureg_r); - DECLARE_READ8_MEMBER(namconb2_cpureg_r); - DECLARE_READ32_MEMBER(custom_key_r); - DECLARE_READ32_MEMBER(gunbulet_gun_r); - DECLARE_READ32_MEMBER(share_r); - DECLARE_WRITE32_MEMBER(share_w); - DECLARE_WRITE16_MEMBER(mcu_shared_w); + u32 randgen_r(); + void srand_w(u32 data); + void namconb1_cpureg_w(offs_t offset, u8 data); + void namconb2_cpureg_w(offs_t offset, u8 data); + u8 namconb1_cpureg_r(offs_t offset); + u8 namconb2_cpureg_r(offs_t offset); + u32 custom_key_r(offs_t offset); + u32 gunbulet_gun_r(offs_t offset); + u32 share_r(offs_t offset); + void share_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void mcu_shared_w(offs_t offset, u16 data, u16 mem_mask = ~0); u8 port6_r(); void port6_w(u8 data); u8 port7_r(); template u16 dac_bit_r(); - DECLARE_WRITE32_MEMBER(rozbank32_w); + void rozbank32_w(offs_t offset, u32 data, u32 mem_mask = ~0); void video_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_namconb1(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); u32 screen_update_namconb2(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/namcond1.h b/src/mame/includes/namcond1.h index b762045aace..960e910bedd 100644 --- a/src/mame/includes/namcond1.h +++ b/src/mame/includes/namcond1.h @@ -37,12 +37,12 @@ private: uint8_t m_h8_irq5_enabled; int m_p8; - DECLARE_READ16_MEMBER(mcu_p7_read); - DECLARE_READ16_MEMBER(mcu_pa_read); - DECLARE_WRITE16_MEMBER(mcu_pa_write); - DECLARE_READ16_MEMBER(cuskey_r); - DECLARE_WRITE16_MEMBER(cuskey_w); - DECLARE_READ16_MEMBER(printer_r); + uint16_t mcu_p7_read(); + uint16_t mcu_pa_read(); + void mcu_pa_write(uint16_t data); + uint16_t cuskey_r(offs_t offset); + void cuskey_w(offs_t offset, uint16_t data); + uint16_t printer_r(); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/namcos1.h b/src/mame/includes/namcos1.h index fe6aa33f827..55c2dfe927b 100644 --- a/src/mame/includes/namcos1.h +++ b/src/mame/includes/namcos1.h @@ -119,7 +119,7 @@ private: DECLARE_WRITE_LINE_MEMBER(subres_w); void audiocpu_irq_ack_w(u8 data); void mcu_irq_ack_w(u8 data); - DECLARE_READ8_MEMBER(dsw_r); + u8 dsw_r(offs_t offset); void coin_w(u8 data); void dac_gain_w(u8 data); void sound_bankswitch_w(u8 data); diff --git a/src/mame/includes/namcos2.h b/src/mame/includes/namcos2.h index 5e5b6356de4..46cda26b59e 100644 --- a/src/mame/includes/namcos2.h +++ b/src/mame/includes/namcos2.h @@ -187,16 +187,16 @@ enum std::unique_ptr m_eeprom; - DECLARE_READ16_MEMBER(dpram_word_r); - DECLARE_WRITE16_MEMBER(dpram_word_w); + uint16_t dpram_word_r(offs_t offset); + void dpram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint8_t dpram_byte_r(offs_t offset); void dpram_byte_w(offs_t offset, uint8_t data); - DECLARE_WRITE8_MEMBER(eeprom_w); - DECLARE_READ8_MEMBER(eeprom_r); + void eeprom_w(offs_t offset, uint8_t data); + uint8_t eeprom_r(offs_t offset); - DECLARE_READ16_MEMBER(c140_rom_r); - DECLARE_WRITE8_MEMBER(sound_bankselect_w); + uint16_t c140_rom_r(offs_t offset); + void sound_bankselect_w(uint8_t data); void sound_reset_w(uint8_t data); void system_reset_w(uint8_t data); @@ -213,10 +213,10 @@ enum uint32_t screen_update_metlhawk(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_sgunner(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( c116_r ); + uint8_t c116_r(offs_t offset); - DECLARE_READ16_MEMBER( gfx_ctrl_r ); - DECLARE_WRITE16_MEMBER( gfx_ctrl_w ); + uint16_t gfx_ctrl_r(); + void gfx_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); virtual void machine_start() override; virtual void machine_reset() override; @@ -238,9 +238,9 @@ enum optional_device m_ns2sprite; optional_device m_ns2roz; - DECLARE_READ16_MEMBER( namcos2_68k_key_r ); - DECLARE_WRITE16_MEMBER( namcos2_68k_key_w ); - DECLARE_READ16_MEMBER( namcos2_finallap_prot_r ); + uint16_t namcos2_68k_key_r(offs_t offset); + void namcos2_68k_key_w(offs_t offset, uint16_t data); + uint16_t namcos2_finallap_prot_r(offs_t offset); void GollyGhostUpdateLED_c4( int data ); void GollyGhostUpdateLED_c6( int data ); void GollyGhostUpdateLED_c8( int data ); diff --git a/src/mame/includes/namcos22.h b/src/mame/includes/namcos22.h index b1a70010567..8216965e19a 100644 --- a/src/mame/includes/namcos22.h +++ b/src/mame/includes/namcos22.h @@ -287,40 +287,40 @@ protected: void point_hiword_w(u16 data); u16 point_loword_r(); u16 point_hiword_ir(); - DECLARE_WRITE16_MEMBER(dsp_unk2_w); - DECLARE_READ16_MEMBER(dsp_unk_port3_r); - DECLARE_WRITE16_MEMBER(upload_code_to_slave_dsp_w); - DECLARE_READ16_MEMBER(dsp_unk8_r); - DECLARE_READ16_MEMBER(custom_ic_status_r); - DECLARE_READ16_MEMBER(dsp_upload_status_r); + void dsp_unk2_w(u16 data); + u16 dsp_unk_port3_r(); + void upload_code_to_slave_dsp_w(u16 data); + u16 dsp_unk8_r(); + u16 custom_ic_status_r(); + u16 dsp_upload_status_r(); void slave_serial_io_w(u16 data); u16 master_serial_io_r(); - DECLARE_WRITE16_MEMBER(dsp_unk_porta_w); - DECLARE_WRITE16_MEMBER(dsp_led_w); - DECLARE_WRITE16_MEMBER(dsp_unk8_w); - DECLARE_WRITE16_MEMBER(master_render_device_w); + void dsp_unk_porta_w(u16 data); + void dsp_led_w(u16 data); + void dsp_unk8_w(u16 data); + void master_render_device_w(u16 data); u16 dsp_slave_bioz_r(); - DECLARE_READ16_MEMBER(dsp_slave_port3_r); - DECLARE_READ16_MEMBER(dsp_slave_port4_r); - DECLARE_READ16_MEMBER(dsp_slave_port5_r); - DECLARE_READ16_MEMBER(dsp_slave_port6_r); - DECLARE_WRITE16_MEMBER(dsp_slave_portc_w); - DECLARE_READ16_MEMBER(dsp_slave_port8_r); - DECLARE_READ16_MEMBER(dsp_slave_portb_r); - DECLARE_WRITE16_MEMBER(dsp_slave_portb_w); - DECLARE_READ32_MEMBER(namcos22_sci_r); - DECLARE_WRITE32_MEMBER(namcos22_sci_w); + u16 dsp_slave_port3_r(); + u16 dsp_slave_port4_r(); + u16 dsp_slave_port5_r(); + u16 dsp_slave_port6_r(); + void dsp_slave_portc_w(u16 data); + u16 dsp_slave_port8_r(); + u16 dsp_slave_portb_r(); + void dsp_slave_portb_w(u16 data); + u32 namcos22_sci_r(offs_t offset); + void namcos22_sci_w(u32 data); u16 namcos22_shared_r(offs_t offset); void namcos22_shared_w(offs_t offset, u16 data, u16 mem_mask = ~0); u16 namcos22_keycus_r(offs_t offset); void namcos22_keycus_w(offs_t offset, u16 data, u16 mem_mask = ~0); - DECLARE_READ16_MEMBER(namcos22_portbit_r); - DECLARE_WRITE16_MEMBER(namcos22_portbit_w); + u16 namcos22_portbit_r(offs_t offset); + void namcos22_portbit_w(offs_t offset, u16 data); void namcos22_cpuleds_w(offs_t offset, u32 data, u32 mem_mask = ~0); u8 mcu_port4_s22_r(); u8 iomcu_port4_s22_r(); - DECLARE_READ16_MEMBER(mcuc74_speedup_r); - DECLARE_WRITE16_MEMBER(mcu_speedup_w); + u16 mcuc74_speedup_r(); + void mcu_speedup_w(offs_t offset, u16 data, u16 mem_mask = ~0); inline u8 nthbyte(const u32 *src, int n) { return (src[n / 4] << ((n & 3) * 8)) >> 24; } inline u16 nthword(const u32 *src, int n) { return (src[n / 2] << ((n & 1) * 16)) >> 16; } @@ -548,20 +548,20 @@ private: void namcos22s_mix_text_layer(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect, int prival); u32 screen_update_namcos22s(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_WRITE16_MEMBER(namcos22s_czattr_w); - DECLARE_READ16_MEMBER(namcos22s_czattr_r); + void namcos22s_czattr_w(offs_t offset, u16 data, u16 mem_mask = ~0); + u16 namcos22s_czattr_r(offs_t offset); void namcos22s_czram_w(offs_t offset, u32 data, u32 mem_mask = ~0); u32 namcos22s_czram_r(offs_t offset); - DECLARE_READ32_MEMBER(namcos22s_vics_control_r); - DECLARE_WRITE32_MEMBER(namcos22s_vics_control_w); - DECLARE_READ16_MEMBER(spotram_r); - DECLARE_WRITE16_MEMBER(spotram_w); - - DECLARE_READ32_MEMBER(alpinesa_prot_r); - DECLARE_WRITE32_MEMBER(alpinesa_prot_w); - DECLARE_READ16_MEMBER(timecris_gun_r); + u32 namcos22s_vics_control_r(offs_t offset); + void namcos22s_vics_control_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u16 spotram_r(offs_t offset); + void spotram_w(offs_t offset, u16 data, u16 mem_mask = ~0); + + u32 alpinesa_prot_r(); + void alpinesa_prot_w(u32 data); + u16 timecris_gun_r(offs_t offset); void mb87078_gain_changed(offs_t offset, u8 data); - DECLARE_WRITE32_MEMBER(namcos22s_chipselect_w); + void namcos22s_chipselect_w(offs_t offset, u32 data, u32 mem_mask = ~0); void mcu_port4_w(u8 data); u8 mcu_port4_r(); @@ -571,8 +571,8 @@ private: u8 mcu_port6_r(); template u16 mcu_adc_r(); void alpine_mcu_port4_w(u8 data); - DECLARE_READ16_MEMBER(mcu130_speedup_r); - DECLARE_READ16_MEMBER(mcu141_speedup_r); + u16 mcu130_speedup_r(); + u16 mcu141_speedup_r(); INTERRUPT_GEN_MEMBER(namcos22s_interrupt); TIMER_DEVICE_CALLBACK_MEMBER(mcu_irq); diff --git a/src/mame/includes/namcos86.h b/src/mame/includes/namcos86.h index 03a524c79bb..eadebf47826 100644 --- a/src/mame/includes/namcos86.h +++ b/src/mame/includes/namcos86.h @@ -41,27 +41,27 @@ public: void init_namco86(); private: - DECLARE_WRITE8_MEMBER(bankswitch1_w); - DECLARE_WRITE8_MEMBER(bankswitch1_ext_w); - DECLARE_WRITE8_MEMBER(bankswitch2_w); - DECLARE_READ8_MEMBER(dsw0_r); - DECLARE_READ8_MEMBER(dsw1_r); - DECLARE_WRITE8_MEMBER(int_ack1_w); - DECLARE_WRITE8_MEMBER(int_ack2_w); - DECLARE_WRITE8_MEMBER(watchdog1_w); - DECLARE_WRITE8_MEMBER(watchdog2_w); + void bankswitch1_w(uint8_t data); + void bankswitch1_ext_w(uint8_t data); + void bankswitch2_w(uint8_t data); + uint8_t dsw0_r(); + uint8_t dsw1_r(); + void int_ack1_w(uint8_t data); + void int_ack2_w(uint8_t data); + void watchdog1_w(uint8_t data); + void watchdog2_w(uint8_t data); void coin_w(uint8_t data); void led_w(uint8_t data); - DECLARE_WRITE8_MEMBER(cus115_w); - DECLARE_WRITE8_MEMBER(videoram1_w); - DECLARE_WRITE8_MEMBER(videoram2_w); - DECLARE_WRITE8_MEMBER(tilebank_select_w); - DECLARE_WRITE8_MEMBER(scroll0_w); - DECLARE_WRITE8_MEMBER(scroll1_w); - DECLARE_WRITE8_MEMBER(scroll2_w); - DECLARE_WRITE8_MEMBER(scroll3_w); - DECLARE_WRITE8_MEMBER(backcolor_w); - DECLARE_WRITE8_MEMBER(spriteram_w); + void cus115_w(offs_t offset, uint8_t data); + void videoram1_w(offs_t offset, uint8_t data);; + void videoram2_w(offs_t offset, uint8_t data);; + void tilebank_select_w(offs_t offset, uint8_t data);; + void scroll0_w(offs_t offset, uint8_t data);; + void scroll1_w(offs_t offset, uint8_t data);; + void scroll2_w(offs_t offset, uint8_t data);; + void scroll3_w(offs_t offset, uint8_t data);; + void backcolor_w(uint8_t data);; + void spriteram_w(offs_t offset, uint8_t data);; TILE_GET_INFO_MEMBER(get_tile_info0); TILE_GET_INFO_MEMBER(get_tile_info1); @@ -73,7 +73,7 @@ private: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(screen_vblank); void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void scroll_w(address_space &space, int offset, int data, int layer); + void scroll_w(offs_t offset, int data, int layer); void common_mcu_map(address_map &map); void cpu1_map(address_map &map); diff --git a/src/mame/includes/naomi.h b/src/mame/includes/naomi.h index 677d02e9124..3cd82a5991f 100644 --- a/src/mame/includes/naomi.h +++ b/src/mame/includes/naomi.h @@ -73,7 +73,7 @@ class naomi_state : public dc_state DECLARE_CUSTOM_INPUT_MEMBER(naomi_kb_r); DECLARE_INPUT_CHANGED_MEMBER(naomi_mp_w); - DECLARE_READ64_MEMBER( naomi2_biose_idle_skip_r ); + uint64_t naomi2_biose_idle_skip_r(); protected: required_device m_eeprom; @@ -83,22 +83,22 @@ protected: DECLARE_MACHINE_RESET(naomi); DECLARE_WRITE_LINE_MEMBER(external_reset); - DECLARE_READ16_MEMBER( naomi_g2bus_r ); - DECLARE_READ64_MEMBER( eeprom_93c46a_r ); - DECLARE_WRITE64_MEMBER( eeprom_93c46a_w ); + uint16_t naomi_g2bus_r(offs_t offset); + uint64_t eeprom_93c46a_r(); + void eeprom_93c46a_w(uint64_t data); uint8_t m_mp_mux; uint8_t asciihex_to_dec(uint8_t in); void create_pic_from_retdat(); - DECLARE_READ64_MEMBER( naomi_biose_idle_skip_r ); - DECLARE_READ64_MEMBER( naomi_biosh_idle_skip_r ); - DECLARE_READ64_MEMBER( naomigd_ggxxsla_idle_skip_r ); - DECLARE_READ64_MEMBER( naomigd_ggxx_idle_skip_r ); - DECLARE_READ64_MEMBER( naomigd_ggxxrl_idle_skip_r ); - DECLARE_READ64_MEMBER( naomigd_sfz3ugd_idle_skip_r ); - DECLARE_READ64_MEMBER( hotd2_idle_skip_r ); + uint64_t naomi_biose_idle_skip_r(); + uint64_t naomi_biosh_idle_skip_r(); + uint64_t naomigd_ggxxsla_idle_skip_r(); + uint64_t naomigd_ggxx_idle_skip_r(); + uint64_t naomigd_ggxxrl_idle_skip_r(); + uint64_t naomigd_sfz3ugd_idle_skip_r(); + uint64_t hotd2_idle_skip_r(); void naomi_map(address_map &map); void naomi_port(address_map &map); @@ -129,7 +129,7 @@ private: required_shared_ptr m_elan_ram; required_device m_powervr2_slave; - DECLARE_WRITE32_MEMBER(both_pvr2_ta_w); + void both_pvr2_ta_w(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void naomi2_map(address_map &map); }; @@ -151,12 +151,12 @@ public: private: required_device m_awflash; - DECLARE_READ64_MEMBER( aw_flash_r ); - DECLARE_WRITE64_MEMBER( aw_flash_w ); - DECLARE_READ64_MEMBER( aw_modem_r ); - DECLARE_WRITE64_MEMBER( aw_modem_w ); + uint64_t aw_flash_r(offs_t offset); + void aw_flash_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); + uint64_t aw_modem_r(offs_t offset, uint64_t mem_mask = ~0); + void aw_modem_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); - DECLARE_READ64_MEMBER( xtrmhnt2_hack_r ); + uint64_t xtrmhnt2_hack_r(); void aw_map(address_map &map); void aw_port(address_map &map); diff --git a/src/mame/includes/naughtyb.h b/src/mame/includes/naughtyb.h index 1ff72be7dbe..cd97b8994c6 100644 --- a/src/mame/includes/naughtyb.h +++ b/src/mame/includes/naughtyb.h @@ -58,14 +58,14 @@ private: int m_bankreg; bitmap_ind16 m_tmpbitmap; - DECLARE_READ8_MEMBER(in0_port_r); - DECLARE_READ8_MEMBER(dsw0_port_r); - DECLARE_READ8_MEMBER(popflame_protection_r); - DECLARE_WRITE8_MEMBER(popflame_protection_w); - DECLARE_READ8_MEMBER(trvmstr_questions_r); - DECLARE_WRITE8_MEMBER(trvmstr_questions_w); - DECLARE_WRITE8_MEMBER(naughtyb_videoreg_w); - DECLARE_WRITE8_MEMBER(popflame_videoreg_w); + uint8_t in0_port_r(); + uint8_t dsw0_port_r(); + uint8_t popflame_protection_r(); + void popflame_protection_w(uint8_t data); + uint8_t trvmstr_questions_r(); + void trvmstr_questions_w(offs_t offset, uint8_t data); + void naughtyb_videoreg_w(uint8_t data); + void popflame_videoreg_w(uint8_t data); void naughtyb_palette(palette_device &palette) const; diff --git a/src/mame/includes/nbmj8688.h b/src/mame/includes/nbmj8688.h index e09b56d661c..0cccef036be 100644 --- a/src/mame/includes/nbmj8688.h +++ b/src/mame/includes/nbmj8688.h @@ -106,20 +106,20 @@ private: emu_timer *m_blitter_timer; // common - DECLARE_READ8_MEMBER(ff_r); - DECLARE_WRITE8_MEMBER(clut_w); - DECLARE_WRITE8_MEMBER(blitter_w); - DECLARE_WRITE8_MEMBER(scrolly_w); - - DECLARE_WRITE8_MEMBER(mjsikaku_gfxflag2_w); - DECLARE_WRITE8_MEMBER(mjsikaku_gfxflag3_w); - DECLARE_WRITE8_MEMBER(mjsikaku_romsel_w); - DECLARE_WRITE8_MEMBER(secolove_romsel_w); - DECLARE_WRITE8_MEMBER(crystalg_romsel_w); - DECLARE_WRITE8_MEMBER(seiha_romsel_w); - DECLARE_WRITE8_MEMBER(HD61830B_both_instr_w); - DECLARE_WRITE8_MEMBER(HD61830B_both_data_w); - DECLARE_WRITE8_MEMBER(barline_output_w); + uint8_t ff_r(); + void clut_w(offs_t offset, uint8_t data); + void blitter_w(offs_t offset, uint8_t data); + void scrolly_w(uint8_t data); + + void mjsikaku_gfxflag2_w(uint8_t data); + void mjsikaku_gfxflag3_w(uint8_t data); + void mjsikaku_romsel_w(uint8_t data); + void secolove_romsel_w(uint8_t data); + void crystalg_romsel_w(uint8_t data); + void seiha_romsel_w(uint8_t data); + void HD61830B_both_instr_w(uint8_t data); + void HD61830B_both_data_w(uint8_t data); + void barline_output_w(uint8_t data); DECLARE_VIDEO_START(mbmj8688_pure_12bit); void mbmj8688_12bit(palette_device &palette) const; diff --git a/src/mame/includes/nbmj8891.h b/src/mame/includes/nbmj8891.h index 4896972bad2..b89fb7891ce 100644 --- a/src/mame/includes/nbmj8891.h +++ b/src/mame/includes/nbmj8891.h @@ -98,25 +98,25 @@ private: int m_flipscreen_old; emu_timer *m_blitter_timer; - DECLARE_READ8_MEMBER(palette_type1_r); - DECLARE_WRITE8_MEMBER(palette_type1_w); - DECLARE_READ8_MEMBER(palette_type2_r); - DECLARE_WRITE8_MEMBER(palette_type2_w); - DECLARE_READ8_MEMBER(palette_type3_r); - DECLARE_WRITE8_MEMBER(palette_type3_w); - DECLARE_WRITE8_MEMBER(clutsel_w); - DECLARE_READ8_MEMBER(clut_r); - DECLARE_WRITE8_MEMBER(clut_w); - DECLARE_WRITE8_MEMBER(blitter_w); - DECLARE_WRITE8_MEMBER(scrolly_w); - DECLARE_WRITE8_MEMBER(vramsel_w); - DECLARE_WRITE8_MEMBER(romsel_w); + uint8_t palette_type1_r(offs_t offset); + void palette_type1_w(offs_t offset, uint8_t data); + uint8_t palette_type2_r(offs_t offset); + void palette_type2_w(offs_t offset, uint8_t data); + uint8_t palette_type3_r(offs_t offset); + void palette_type3_w(offs_t offset, uint8_t data); + void clutsel_w(uint8_t data); + uint8_t clut_r(offs_t offset); + void clut_w(offs_t offset, uint8_t data); + void blitter_w(offs_t offset, uint8_t data); + void scrolly_w(uint8_t data); + void vramsel_w(uint8_t data); + void romsel_w(uint8_t data); - DECLARE_READ8_MEMBER(taiwanmb_unk_r); - DECLARE_WRITE8_MEMBER(taiwanmb_blitter_w); - DECLARE_WRITE8_MEMBER(taiwanmb_gfxdraw_w); - DECLARE_WRITE8_MEMBER(taiwanmb_gfxflag_w); - DECLARE_WRITE8_MEMBER(taiwanmb_mcu_w); + uint8_t taiwanmb_unk_r(); + void taiwanmb_blitter_w(offs_t offset, uint8_t data); + void taiwanmb_gfxdraw_w(uint8_t data); + void taiwanmb_gfxflag_w(uint8_t data); + void taiwanmb_mcu_w(uint8_t data); virtual void video_start() override; DECLARE_VIDEO_START(_1layer); diff --git a/src/mame/includes/nbmj8900.h b/src/mame/includes/nbmj8900.h index 591d816b16c..17807ea7377 100644 --- a/src/mame/includes/nbmj8900.h +++ b/src/mame/includes/nbmj8900.h @@ -59,15 +59,15 @@ private: int m_flipscreen_old; emu_timer *m_blitter_timer; - DECLARE_READ8_MEMBER(palette_type1_r); - DECLARE_WRITE8_MEMBER(palette_type1_w); - DECLARE_WRITE8_MEMBER(clutsel_w); - DECLARE_READ8_MEMBER(clut_r); - DECLARE_WRITE8_MEMBER(clut_w); - DECLARE_WRITE8_MEMBER(blitter_w); - DECLARE_WRITE8_MEMBER(scrolly_w); - DECLARE_WRITE8_MEMBER(vramsel_w); - DECLARE_WRITE8_MEMBER(romsel_w); + uint8_t palette_type1_r(offs_t offset); + void palette_type1_w(offs_t offset, uint8_t data); + void clutsel_w(uint8_t data); + uint8_t clut_r(offs_t offset); + void clut_w(offs_t offset, uint8_t data); + void blitter_w(offs_t offset, uint8_t data); + void scrolly_w(uint8_t data); + void vramsel_w(uint8_t data); + void romsel_w(uint8_t data); virtual void video_start() override; diff --git a/src/mame/includes/nbmj8991.h b/src/mame/includes/nbmj8991.h index 43ea0def357..e9989a7590c 100644 --- a/src/mame/includes/nbmj8991.h +++ b/src/mame/includes/nbmj8991.h @@ -81,13 +81,13 @@ private: int m_flipscreen_old; emu_timer *m_blitter_timer; - DECLARE_WRITE8_MEMBER(soundbank_w); - DECLARE_WRITE8_MEMBER(palette_type1_w); - DECLARE_WRITE8_MEMBER(palette_type2_w); - DECLARE_WRITE8_MEMBER(palette_type3_w); - DECLARE_WRITE8_MEMBER(blitter_w); - DECLARE_READ8_MEMBER(clut_r); - DECLARE_WRITE8_MEMBER(clut_w); + void soundbank_w(uint8_t data); + void palette_type1_w(offs_t offset, uint8_t data); + void palette_type2_w(offs_t offset, uint8_t data); + void palette_type3_w(offs_t offset, uint8_t data); + void blitter_w(offs_t offset, uint8_t data); + uint8_t clut_r(offs_t offset); + void clut_w(offs_t offset, uint8_t data); virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/nbmj9195.h b/src/mame/includes/nbmj9195.h index 161bff1fff3..836a753adf0 100644 --- a/src/mame/includes/nbmj9195.h +++ b/src/mame/includes/nbmj9195.h @@ -115,7 +115,7 @@ private: emu_timer *m_blitter_timer; void soundbank_w(uint8_t data); - DECLARE_WRITE8_MEMBER(inputportsel_w); + void inputportsel_w(uint8_t data); uint8_t mscoutm_dipsw_0_r(); uint8_t mscoutm_dipsw_1_r(); uint8_t mscoutm_cpu_portb_r(); @@ -124,14 +124,14 @@ private: uint8_t others_cpu_portb_r(); uint8_t others_cpu_portc_r(); void soundcpu_porte_w(uint8_t data); - DECLARE_WRITE8_MEMBER(palette_w); - DECLARE_WRITE8_MEMBER(nb22090_palette_w); - DECLARE_WRITE8_MEMBER(blitter_0_w); - DECLARE_WRITE8_MEMBER(blitter_1_w); - DECLARE_READ8_MEMBER(blitter_0_r); - DECLARE_READ8_MEMBER(blitter_1_r); - DECLARE_WRITE8_MEMBER(clut_0_w); - DECLARE_WRITE8_MEMBER(clut_1_w); + void palette_w(offs_t offset, uint8_t data); + void nb22090_palette_w(offs_t offset, uint8_t data); + void blitter_0_w(offs_t offset, uint8_t data); + void blitter_1_w(offs_t offset, uint8_t data); + uint8_t blitter_0_r(offs_t offset); + uint8_t blitter_1_r(offs_t offset); + void clut_0_w(offs_t offset, uint8_t data); + void clut_1_w(offs_t offset, uint8_t data); void clutsel_w(uint8_t data); void gfxflag2_w(uint8_t data); void outcoin_flag_w(uint8_t data); diff --git a/src/mame/includes/nc.h b/src/mame/includes/nc.h index a7f354b3c0c..e26c40227ba 100644 --- a/src/mame/includes/nc.h +++ b/src/mame/includes/nc.h @@ -63,15 +63,15 @@ public: void init_nc(); protected: - DECLARE_READ8_MEMBER(nc_memory_management_r); - DECLARE_WRITE8_MEMBER(nc_memory_management_w); - DECLARE_WRITE8_MEMBER(nc_irq_mask_w); - DECLARE_WRITE8_MEMBER(nc_irq_status_w); - DECLARE_READ8_MEMBER(nc_irq_status_r); - DECLARE_READ8_MEMBER(nc_key_data_in_r); - DECLARE_WRITE8_MEMBER(nc_sound_w); - DECLARE_WRITE8_MEMBER(nc_uart_control_w); - DECLARE_WRITE8_MEMBER(nc100_display_memory_start_w); + uint8_t nc_memory_management_r(offs_t offset); + void nc_memory_management_w(offs_t offset, uint8_t data); + void nc_irq_mask_w(uint8_t data); + void nc_irq_status_w(uint8_t data); + uint8_t nc_irq_status_r(); + uint8_t nc_key_data_in_r(offs_t offset); + void nc_sound_w(offs_t offset, uint8_t data); + void nc_uart_control_w(uint8_t data); + void nc100_display_memory_start_w(uint8_t data); void nc_colours(palette_device &palette) const; TIMER_CALLBACK_MEMBER(nc_keyboard_timer_callback); @@ -146,10 +146,10 @@ public: void nc100(machine_config &config); protected: - DECLARE_WRITE8_MEMBER(nc100_uart_control_w); - DECLARE_WRITE8_MEMBER(nc100_poweroff_control_w); - DECLARE_READ8_MEMBER(nc100_card_battery_status_r); - DECLARE_WRITE8_MEMBER(nc100_memory_card_wait_state_w); + void nc100_uart_control_w(uint8_t data); + void nc100_poweroff_control_w(uint8_t data); + uint8_t nc100_card_battery_status_r(); + void nc100_memory_card_wait_state_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(nc100_tc8521_alarm_callback); DECLARE_WRITE_LINE_MEMBER(nc100_txrdy_callback); @@ -176,12 +176,12 @@ public: void nc200(machine_config &config); protected: - DECLARE_WRITE8_MEMBER(nc200_irq_status_w); - DECLARE_READ8_MEMBER(nc200_card_battery_status_r); - DECLARE_READ8_MEMBER(nc200_printer_status_r); - DECLARE_WRITE8_MEMBER(nc200_uart_control_w); - DECLARE_WRITE8_MEMBER(nc200_memory_card_wait_state_w); - DECLARE_WRITE8_MEMBER(nc200_poweroff_control_w); + void nc200_irq_status_w(uint8_t data); + uint8_t nc200_card_battery_status_r(); + uint8_t nc200_printer_status_r(); + void nc200_uart_control_w(uint8_t data); + void nc200_memory_card_wait_state_w(uint8_t data); + void nc200_poweroff_control_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(write_nc200_centronics_ack); DECLARE_WRITE_LINE_MEMBER(nc200_txrdy_callback); diff --git a/src/mame/includes/nds.h b/src/mame/includes/nds.h index 4b92bcd3d7e..11cea6a295d 100644 --- a/src/mame/includes/nds.h +++ b/src/mame/includes/nds.h @@ -30,19 +30,19 @@ private: void machine_reset() override; // ARM7 - DECLARE_READ32_MEMBER(arm7_io_r); - DECLARE_WRITE32_MEMBER(arm7_io_w); + uint32_t arm7_io_r(offs_t offset, uint32_t mem_mask = ~0); + void arm7_io_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // ARM9 - DECLARE_READ32_MEMBER(arm9_io_r); - DECLARE_WRITE32_MEMBER(arm9_io_w); - - DECLARE_READ32_MEMBER(wram_first_half_r); - DECLARE_READ32_MEMBER(wram_second_half_r); - DECLARE_WRITE32_MEMBER(wram_first_half_w); - DECLARE_WRITE32_MEMBER(wram_second_half_w); - DECLARE_READ32_MEMBER(wram_arm7mirror_r); - DECLARE_WRITE32_MEMBER(wram_arm7mirror_w); + uint32_t arm9_io_r(offs_t offset, uint32_t mem_mask = ~0); + void arm9_io_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + + uint32_t wram_first_half_r(offs_t offset); + uint32_t wram_second_half_r(offs_t offset); + void wram_first_half_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + void wram_second_half_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t wram_arm7mirror_r(offs_t offset); + void wram_arm7mirror_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void nds7_wram_map(address_map &map); void nds9_wram_map(address_map &map); diff --git a/src/mame/includes/nemesis.h b/src/mame/includes/nemesis.h index 5face5ec934..eb97139ef99 100644 --- a/src/mame/includes/nemesis.h +++ b/src/mame/includes/nemesis.h @@ -122,27 +122,27 @@ private: DECLARE_WRITE_LINE_MEMBER(coin2_lockout_w); DECLARE_WRITE_LINE_MEMBER(sound_irq_w); DECLARE_WRITE_LINE_MEMBER(sound_nmi_w); - DECLARE_READ16_MEMBER(gx400_sharedram_word_r); - DECLARE_WRITE16_MEMBER(gx400_sharedram_word_w); - DECLARE_READ16_MEMBER(konamigt_input_word_r); + uint16_t gx400_sharedram_word_r(offs_t offset); + void gx400_sharedram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t konamigt_input_word_r(); void selected_ip_w(uint8_t data); uint8_t selected_ip_r(); - DECLARE_WRITE16_MEMBER(bubsys_mcu_w); - DECLARE_READ8_MEMBER(wd_r); + void bubsys_mcu_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint8_t wd_r(); DECLARE_WRITE_LINE_MEMBER(gfx_flipx_w); DECLARE_WRITE_LINE_MEMBER(gfx_flipy_w); - DECLARE_WRITE16_MEMBER(salamand_control_port_word_w); - DECLARE_WRITE16_MEMBER(nemesis_palette_word_w); - DECLARE_WRITE16_MEMBER(nemesis_videoram1_word_w); - DECLARE_WRITE16_MEMBER(nemesis_videoram2_word_w); - DECLARE_WRITE16_MEMBER(nemesis_colorram1_word_w); - DECLARE_WRITE16_MEMBER(nemesis_colorram2_word_w); - DECLARE_WRITE16_MEMBER(nemesis_charram_word_w); - DECLARE_WRITE8_MEMBER(nemesis_filter_w); - DECLARE_WRITE8_MEMBER(gx400_speech_start_w); - DECLARE_WRITE8_MEMBER(salamand_speech_start_w); + void salamand_control_port_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_palette_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_videoram1_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_videoram2_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_colorram1_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_colorram2_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_charram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void nemesis_filter_w(offs_t offset, uint8_t data); + void gx400_speech_start_w(uint8_t data); + void salamand_speech_start_w(uint8_t data); uint8_t nemesis_portA_r(); - DECLARE_WRITE8_MEMBER(city_sound_bank_w); + void city_sound_bank_w(uint8_t data); TILE_GET_INFO_MEMBER(get_bg_tile_info); TILE_GET_INFO_MEMBER(get_fg_tile_info); virtual void machine_start() override; diff --git a/src/mame/includes/neogeo.h b/src/mame/includes/neogeo.h index ed6ed589ec2..992087db771 100644 --- a/src/mame/includes/neogeo.h +++ b/src/mame/includes/neogeo.h @@ -70,15 +70,15 @@ protected: , m_audionmi(*this, "audionmi") { } - DECLARE_READ16_MEMBER(memcard_r); - DECLARE_WRITE16_MEMBER(memcard_w); - DECLARE_READ8_MEMBER(audio_cpu_bank_select_r); - DECLARE_WRITE8_MEMBER(audio_cpu_enable_nmi_w); - DECLARE_READ16_MEMBER(unmapped_r); - DECLARE_READ16_MEMBER(paletteram_r); - DECLARE_WRITE16_MEMBER(paletteram_w); - DECLARE_READ16_MEMBER(video_register_r); - DECLARE_WRITE16_MEMBER(video_register_w); + uint16_t memcard_r(offs_t offset); + void memcard_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint8_t audio_cpu_bank_select_r(offs_t offset); + void audio_cpu_enable_nmi_w(offs_t offset, uint8_t data); + uint16_t unmapped_r(address_space &space); + uint16_t paletteram_r(offs_t offset); + void paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t video_register_r(address_space &space, offs_t offset, uint16_t mem_mask = ~0); + void video_register_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); TIMER_CALLBACK_MEMBER(display_position_interrupt_callback); TIMER_CALLBACK_MEMBER(display_position_vblank_callback); @@ -87,17 +87,17 @@ protected: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); virtual void io_control_w(offs_t offset, uint8_t data); - DECLARE_WRITE8_MEMBER(audio_command_w); + void audio_command_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(set_use_cart_vectors); DECLARE_WRITE_LINE_MEMBER(set_use_cart_audio); - DECLARE_READ16_MEMBER(banked_vectors_r); - DECLARE_WRITE16_MEMBER(write_banksel); - DECLARE_WRITE16_MEMBER(write_bankprot); - DECLARE_WRITE16_MEMBER(write_bankprot_pvc); - DECLARE_WRITE16_MEMBER(write_bankprot_ms5p); - DECLARE_WRITE16_MEMBER(write_bankprot_kf2k3bl); - DECLARE_WRITE16_MEMBER(write_bankprot_kof10th); - DECLARE_READ16_MEMBER(read_lorom_kof10th); + uint16_t banked_vectors_r(offs_t offset); + void write_banksel(uint16_t data); + void write_bankprot(uint16_t data); + void write_bankprot_pvc(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void write_bankprot_ms5p(offs_t offset, uint16_t data); + void write_bankprot_kf2k3bl(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void write_bankprot_kof10th(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t read_lorom_kof10th(offs_t offset); DECLARE_WRITE_LINE_MEMBER(set_screen_shadow); DECLARE_WRITE_LINE_MEMBER(set_palette_bank); @@ -229,11 +229,11 @@ protected: virtual void io_control_w(offs_t offset, uint8_t data) override; DECLARE_WRITE_LINE_MEMBER(set_save_ram_unlock); - DECLARE_WRITE16_MEMBER(save_ram_w); - DECLARE_READ16_MEMBER(in0_edge_r); - DECLARE_READ16_MEMBER(in0_edge_joy_r); - DECLARE_READ16_MEMBER(in1_edge_r); - DECLARE_READ16_MEMBER(in1_edge_joy_r); + void save_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t in0_edge_r(); + uint16_t in0_edge_joy_r(); + uint16_t in1_edge_r(); + uint16_t in1_edge_joy_r(); void neogeo_arcade(machine_config &config); void neogeo_mono(machine_config &config); @@ -261,7 +261,7 @@ protected: { } - DECLARE_READ16_MEMBER(aes_in2_r); + uint16_t aes_in2_r(); virtual void machine_start() override; diff --git a/src/mame/includes/nes.h b/src/mame/includes/nes.h index ee38c919a26..f2528a231fc 100644 --- a/src/mame/includes/nes.h +++ b/src/mame/includes/nes.h @@ -62,9 +62,9 @@ public: optional_device m_ctrl1; optional_device m_ctrl2; - DECLARE_READ8_MEMBER(nes_in0_r); - DECLARE_READ8_MEMBER(nes_in1_r); - DECLARE_WRITE8_MEMBER(nes_in0_w); + uint8_t nes_in0_r(); + uint8_t nes_in1_r(); + void nes_in0_w(uint8_t data); }; class nes_state : public nes_base_state @@ -83,10 +83,10 @@ public: int nes_ppu_vidaccess(int address, int data); - DECLARE_READ8_MEMBER(fc_in0_r); - DECLARE_READ8_MEMBER(fc_in1_r); - DECLARE_WRITE8_MEMBER(fc_in0_w); - DECLARE_WRITE8_MEMBER(nes_vh_sprite_dma_w); + uint8_t fc_in0_r(); + uint8_t fc_in1_r(); + void fc_in0_w(uint8_t data); + void nes_vh_sprite_dma_w(address_space &space, uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; virtual void video_start() override; diff --git a/src/mame/includes/news.h b/src/mame/includes/news.h index efebee554d7..2bf0b44bfd3 100644 --- a/src/mame/includes/news.h +++ b/src/mame/includes/news.h @@ -38,9 +38,9 @@ private: required_device m_maincpu; required_device m_gfxdecode; - DECLARE_WRITE8_MEMBER(news_fgram_w); - DECLARE_WRITE8_MEMBER(news_bgram_w); - DECLARE_WRITE8_MEMBER(news_bgpic_w); + void news_fgram_w(offs_t offset, uint8_t data); + void news_bgram_w(offs_t offset, uint8_t data); + void news_bgpic_w(uint8_t data); TILE_GET_INFO_MEMBER(get_fg_tile_info); TILE_GET_INFO_MEMBER(get_bg_tile_info); uint32_t screen_update_news(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/next.h b/src/mame/includes/next.h index fd2cb2756ea..e665dcfe2ab 100644 --- a/src/mame/includes/next.h +++ b/src/mame/includes/next.h @@ -71,32 +71,30 @@ private: void setup(uint32_t scr1, int size_x, int size_y, int skip, bool color); - DECLARE_READ8_MEMBER( io_r ); - DECLARE_WRITE8_MEMBER( io_w ); - DECLARE_READ32_MEMBER( rom_map_r ); - DECLARE_READ32_MEMBER( scr2_r ); - DECLARE_WRITE32_MEMBER( scr2_w ); - DECLARE_READ32_MEMBER( scr1_r ); - DECLARE_READ32_MEMBER( irq_status_r ); - DECLARE_READ32_MEMBER( irq_mask_r ); - DECLARE_WRITE32_MEMBER( irq_mask_w ); - DECLARE_READ32_MEMBER( event_counter_r ); - DECLARE_READ32_MEMBER( dsp_r ); - DECLARE_READ32_MEMBER( fdc_control_r ); - DECLARE_WRITE32_MEMBER( fdc_control_w ); - DECLARE_READ32_MEMBER( dma_ctrl_r ); - DECLARE_WRITE32_MEMBER( dma_ctrl_w ); - DECLARE_READ32_MEMBER( dma_regs_r ); - DECLARE_WRITE32_MEMBER( dma_regs_w ); - DECLARE_READ32_MEMBER( scsictrl_r ); - DECLARE_WRITE32_MEMBER( scsictrl_w ); - DECLARE_READ32_MEMBER( phy_r ); - DECLARE_WRITE32_MEMBER( phy_w ); - DECLARE_READ32_MEMBER( timer_data_r ); - DECLARE_WRITE32_MEMBER( timer_data_w ); - DECLARE_READ32_MEMBER( timer_ctrl_r ); - DECLARE_WRITE32_MEMBER( timer_ctrl_w ); - DECLARE_WRITE8_MEMBER( ramdac_w ); + uint32_t rom_map_r(); + uint32_t scr2_r(); + void scr2_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t scr1_r(); + uint32_t irq_status_r(); + uint32_t irq_mask_r(); + void irq_mask_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t event_counter_r(offs_t offset, uint32_t mem_mask = ~0); + uint32_t dsp_r(); + uint32_t fdc_control_r(); + void fdc_control_w(uint32_t data); + uint32_t dma_ctrl_r(offs_t offset); + void dma_ctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t dma_regs_r(offs_t offset); + void dma_regs_w(offs_t offset, uint32_t data); + uint32_t scsictrl_r(offs_t offset, uint32_t mem_mask = ~0); + void scsictrl_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t phy_r(offs_t offset); + void phy_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t timer_data_r(); + void timer_data_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t timer_ctrl_r(); + void timer_ctrl_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + void ramdac_w(offs_t offset, uint8_t data); uint32_t scr1; uint32_t scr2; diff --git a/src/mame/includes/nforcepc.h b/src/mame/includes/nforcepc.h index c5122a117e9..000f5ebb1da 100644 --- a/src/mame/includes/nforcepc.h +++ b/src/mame/includes/nforcepc.h @@ -53,11 +53,11 @@ private: required_device biosrom; uint32_t ram_size; - virtual DECLARE_READ8_MEMBER(header_type_r) override; - DECLARE_READ8_MEMBER(unknown_r); - DECLARE_WRITE8_MEMBER(unknown_w); - DECLARE_READ32_MEMBER(ram_size_r); - DECLARE_WRITE32_MEMBER(ram_size_w); + virtual uint8_t header_type_r() override; + uint8_t unknown_r(); + void unknown_w(uint8_t data); + uint32_t ram_size_r(); + void ram_size_w(uint32_t data); }; DECLARE_DEVICE_TYPE(CRUSH11, crush11_host_device) @@ -234,21 +234,21 @@ public: DECLARE_WRITE_LINE_MEMBER(kbdp21_gp25_gatea20_w); DECLARE_WRITE_LINE_MEMBER(kbdp20_gp20_reset_w); - DECLARE_READ8_MEMBER(read_it8703f); - DECLARE_WRITE8_MEMBER(write_it8703f); + uint8_t read_it8703f(offs_t offset); + void write_it8703f(offs_t offset, uint8_t data); // parallel port - DECLARE_READ8_MEMBER(lpt_read); - DECLARE_WRITE8_MEMBER(lpt_write); + uint8_t lpt_read(offs_t offset); + void lpt_write(offs_t offset, uint8_t data); // uarts - DECLARE_READ8_MEMBER(serial1_read); - DECLARE_WRITE8_MEMBER(serial1_write); - DECLARE_READ8_MEMBER(serial2_read); - DECLARE_WRITE8_MEMBER(serial2_write); + uint8_t serial1_read(offs_t offset); + void serial1_write(offs_t offset, uint8_t data); + uint8_t serial2_read(offs_t offset); + void serial2_write(offs_t offset, uint8_t data); // keyboard - DECLARE_READ8_MEMBER(at_keybc_r); - DECLARE_WRITE8_MEMBER(at_keybc_w); - DECLARE_READ8_MEMBER(keybc_status_r); - DECLARE_WRITE8_MEMBER(keybc_command_w); + uint8_t at_keybc_r(offs_t offset); + void at_keybc_w(offs_t offset, uint8_t data); + uint8_t keybc_status_r(); + void keybc_command_w(uint8_t data); protected: virtual void device_start() override; diff --git a/src/mame/includes/ninjakd2.h b/src/mame/includes/ninjakd2.h index 4df0adb69cc..26d0de824e7 100644 --- a/src/mame/includes/ninjakd2.h +++ b/src/mame/includes/ninjakd2.h @@ -41,13 +41,13 @@ public: void init_bootleg(); protected: - DECLARE_WRITE8_MEMBER(ninjakd2_bgvideoram_w); - DECLARE_WRITE8_MEMBER(ninjakd2_fgvideoram_w); - DECLARE_WRITE8_MEMBER(ninjakd2_bg_ctrl_w); - DECLARE_WRITE8_MEMBER(ninjakd2_sprite_overdraw_w); + void ninjakd2_bgvideoram_w(offs_t offset, uint8_t data); + void ninjakd2_fgvideoram_w(offs_t offset, uint8_t data); + void ninjakd2_bg_ctrl_w(offs_t offset, uint8_t data); + void ninjakd2_sprite_overdraw_w(uint8_t data); - DECLARE_WRITE8_MEMBER(ninjakd2_bankselect_w); - DECLARE_WRITE8_MEMBER(ninjakd2_soundreset_w); + void ninjakd2_bankselect_w(uint8_t data); + void ninjakd2_soundreset_w(uint8_t data); required_device m_maincpu; required_device m_palette; @@ -66,7 +66,7 @@ protected: void video_init_common(); - DECLARE_WRITE8_MEMBER(ninjakd2_pcm_play_w); + void ninjakd2_pcm_play_w(uint8_t data); SAMPLES_START_CB_MEMBER(ninjakd2_init_samples); TILE_GET_INFO_MEMBER(get_fg_tile_info); @@ -142,10 +142,10 @@ public: void init_robokidj(); protected: - template DECLARE_READ8_MEMBER(robokid_bg_videoram_r); - template DECLARE_WRITE8_MEMBER(robokid_bg_videoram_w); - template DECLARE_WRITE8_MEMBER(robokid_bg_ctrl_w); - template DECLARE_WRITE8_MEMBER(robokid_bg_bank_w); + template uint8_t robokid_bg_videoram_r(offs_t offset); + template void robokid_bg_videoram_w(offs_t offset, uint8_t data); + template void robokid_bg_ctrl_w(offs_t offset, uint8_t data); + template void robokid_bg_bank_w(uint8_t data); tilemap_t* m_robokid_tilemap[3]; void video_init_banked(uint32_t vram_alloc_size); @@ -155,7 +155,7 @@ protected: void robokid_main_cpu(address_map &map); private: - DECLARE_READ8_MEMBER(motion_error_verbose_r); + uint8_t motion_error_verbose_r(); DECLARE_VIDEO_START(robokid); uint32_t screen_update_robokid(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); @@ -181,9 +181,9 @@ protected: virtual void machine_reset() override; private: - DECLARE_READ8_MEMBER(unk_r); - DECLARE_READ8_MEMBER(io_protection_r); - DECLARE_WRITE8_MEMBER(io_protection_w); + uint8_t unk_r(); + uint8_t io_protection_r(offs_t offset); + void io_protection_w(offs_t offset, uint8_t data); void omegaf_main_cpu(address_map &map); diff --git a/src/mame/includes/nitedrvr.h b/src/mame/includes/nitedrvr.h index 14a4127b302..c0a7e987dc0 100644 --- a/src/mame/includes/nitedrvr.h +++ b/src/mame/includes/nitedrvr.h @@ -40,12 +40,12 @@ public: void nitedrvr(machine_config &config); private: - DECLARE_READ8_MEMBER(nitedrvr_steering_reset_r); - DECLARE_WRITE8_MEMBER(nitedrvr_steering_reset_w); - DECLARE_READ8_MEMBER(nitedrvr_in0_r); - DECLARE_READ8_MEMBER(nitedrvr_in1_r); - DECLARE_WRITE8_MEMBER(nitedrvr_out0_w); - DECLARE_WRITE8_MEMBER(nitedrvr_out1_w); + uint8_t nitedrvr_steering_reset_r(); + void nitedrvr_steering_reset_w(uint8_t data); + uint8_t nitedrvr_in0_r(offs_t offset); + uint8_t nitedrvr_in1_r(offs_t offset); + void nitedrvr_out0_w(uint8_t data); + void nitedrvr_out1_w(uint8_t data); virtual void machine_start() override; virtual void machine_reset() override; uint32_t screen_update_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/niyanpai.h b/src/mame/includes/niyanpai.h index 1ddd950681c..f001d067763 100644 --- a/src/mame/includes/niyanpai.h +++ b/src/mame/includes/niyanpai.h @@ -69,26 +69,26 @@ private: uint8_t m_motor_on; // common - DECLARE_READ16_MEMBER(dipsw_r); - DECLARE_READ16_MEMBER(palette_r); - DECLARE_WRITE16_MEMBER(palette_w); - DECLARE_WRITE8_MEMBER(blitter_0_w); - DECLARE_WRITE8_MEMBER(blitter_1_w); - DECLARE_WRITE8_MEMBER(blitter_2_w); - DECLARE_READ8_MEMBER(blitter_0_r); - DECLARE_READ8_MEMBER(blitter_1_r); - DECLARE_READ8_MEMBER(blitter_2_r); - DECLARE_WRITE8_MEMBER(clut_0_w); - DECLARE_WRITE8_MEMBER(clut_1_w); - DECLARE_WRITE8_MEMBER(clut_2_w); - DECLARE_WRITE8_MEMBER(clutsel_0_w); - DECLARE_WRITE8_MEMBER(clutsel_1_w); - DECLARE_WRITE8_MEMBER(clutsel_2_w); + uint16_t dipsw_r(); + uint16_t palette_r(offs_t offset); + void palette_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void blitter_0_w(offs_t offset, uint8_t data); + void blitter_1_w(offs_t offset, uint8_t data); + void blitter_2_w(offs_t offset, uint8_t data); + uint8_t blitter_0_r(offs_t offset); + uint8_t blitter_1_r(offs_t offset); + uint8_t blitter_2_r(offs_t offset); + void clut_0_w(offs_t offset, uint8_t data); + void clut_1_w(offs_t offset, uint8_t data); + void clut_2_w(offs_t offset, uint8_t data); + void clutsel_0_w(uint8_t data); + void clutsel_1_w(uint8_t data); + void clutsel_2_w(uint8_t data); void tmp68301_parallel_port_w(uint16_t data); // musobana and derived machine configs - DECLARE_READ16_MEMBER(musobana_inputport_0_r); - DECLARE_WRITE16_MEMBER(musobana_inputport_w); + uint16_t musobana_inputport_0_r(); + void musobana_inputport_w(uint16_t data); virtual void video_start() override; DECLARE_MACHINE_START(musobana); diff --git a/src/mame/includes/norautp.h b/src/mame/includes/norautp.h index b7d9dc308cb..05759f970b8 100644 --- a/src/mame/includes/norautp.h +++ b/src/mame/includes/norautp.h @@ -58,7 +58,7 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(ppi2_obf_w); TIMER_CALLBACK_MEMBER(ppi2_ack); - DECLARE_READ8_MEMBER(test2_r); + uint8_t test2_r(); void mainlamps_w(uint8_t data); void soundlamps_w(uint8_t data); void counterlamps_w(uint8_t data); diff --git a/src/mame/includes/nova2001.h b/src/mame/includes/nova2001.h index cbdbb717f38..6bdf6128bf0 100644 --- a/src/mame/includes/nova2001.h +++ b/src/mame/includes/nova2001.h @@ -45,17 +45,17 @@ private: tilemap_t *m_bg_tilemap; tilemap_t *m_fg_tilemap; - DECLARE_WRITE8_MEMBER(ninjakun_cpu1_io_A002_w); - DECLARE_WRITE8_MEMBER(ninjakun_cpu2_io_A002_w); - DECLARE_WRITE8_MEMBER(paletteram_w); - DECLARE_WRITE8_MEMBER(fg_videoram_w); - DECLARE_WRITE8_MEMBER(nova2001_bg_videoram_w); - DECLARE_WRITE8_MEMBER(ninjakun_bg_videoram_w); - DECLARE_READ8_MEMBER(ninjakun_bg_videoram_r); + void ninjakun_cpu1_io_A002_w(u8 data); + void ninjakun_cpu2_io_A002_w(u8 data); + void paletteram_w(offs_t offset, u8 data); + void fg_videoram_w(offs_t offset, u8 data); + void nova2001_bg_videoram_w(offs_t offset, u8 data); + void ninjakun_bg_videoram_w(offs_t offset, u8 data); + u8 ninjakun_bg_videoram_r(offs_t offset); void scroll_x_w(u8 data); void scroll_y_w(u8 data); - DECLARE_WRITE8_MEMBER(nova2001_flipscreen_w); - DECLARE_WRITE8_MEMBER(pkunwar_flipscreen_w); + void nova2001_flipscreen_w(u8 data); + void pkunwar_flipscreen_w(u8 data); DECLARE_VIDEO_START(nova2001); void nova2001_palette(palette_device &palette) const; diff --git a/src/mame/includes/nycaptor.h b/src/mame/includes/nycaptor.h index 487054ec855..9a9f6b8521d 100644 --- a/src/mame/includes/nycaptor.h +++ b/src/mame/includes/nycaptor.h @@ -79,31 +79,31 @@ private: required_device m_soundlatch2; required_device m_soundnmi; - DECLARE_WRITE8_MEMBER(sub_cpu_halt_w); - DECLARE_READ8_MEMBER(nycaptor_b_r); - DECLARE_READ8_MEMBER(nycaptor_by_r); - DECLARE_READ8_MEMBER(nycaptor_bx_r); - DECLARE_WRITE8_MEMBER(sound_cpu_reset_w); - DECLARE_WRITE8_MEMBER(nmi_disable_w); - DECLARE_WRITE8_MEMBER(nmi_enable_w); - DECLARE_READ8_MEMBER(nycaptor_generic_control_r); - DECLARE_WRITE8_MEMBER(nycaptor_generic_control_w); - DECLARE_READ8_MEMBER(cyclshtg_mcu_status_r); - DECLARE_READ8_MEMBER(cyclshtg_mcu_r); - DECLARE_WRITE8_MEMBER(cyclshtg_mcu_w); - DECLARE_READ8_MEMBER(cyclshtg_mcu_status_r1); - DECLARE_WRITE8_MEMBER(cyclshtg_generic_control_w); - DECLARE_READ8_MEMBER(unk_r); + void sub_cpu_halt_w(uint8_t data); + uint8_t nycaptor_b_r(); + uint8_t nycaptor_by_r(); + uint8_t nycaptor_bx_r(); + void sound_cpu_reset_w(uint8_t data); + void nmi_disable_w(uint8_t data); + void nmi_enable_w(uint8_t data); + uint8_t nycaptor_generic_control_r(); + void nycaptor_generic_control_w(uint8_t data); + uint8_t cyclshtg_mcu_status_r(); + uint8_t cyclshtg_mcu_r(); + void cyclshtg_mcu_w(uint8_t data); + uint8_t cyclshtg_mcu_status_r1(); + void cyclshtg_generic_control_w(uint8_t data); + uint8_t unk_r(); - DECLARE_READ8_MEMBER(nycaptor_mcu_status_r1); - DECLARE_READ8_MEMBER(nycaptor_mcu_status_r2); - DECLARE_READ8_MEMBER(sound_status_r); - DECLARE_WRITE8_MEMBER(nycaptor_videoram_w); - DECLARE_WRITE8_MEMBER(nycaptor_palette_w); - DECLARE_READ8_MEMBER(nycaptor_palette_r); - DECLARE_WRITE8_MEMBER(nycaptor_gfxctrl_w); - DECLARE_READ8_MEMBER(nycaptor_gfxctrl_r); - DECLARE_WRITE8_MEMBER(nycaptor_scrlram_w); + uint8_t nycaptor_mcu_status_r1(); + uint8_t nycaptor_mcu_status_r2(); + uint8_t sound_status_r(); + void nycaptor_videoram_w(offs_t offset, uint8_t data); + void nycaptor_palette_w(offs_t offset, uint8_t data); + uint8_t nycaptor_palette_r(offs_t offset); + void nycaptor_gfxctrl_w(uint8_t data); + uint8_t nycaptor_gfxctrl_r(); + void nycaptor_scrlram_w(offs_t offset, uint8_t data); void unk_w(uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); uint32_t screen_update_nycaptor(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/ob68k1a.h b/src/mame/includes/ob68k1a.h index fbe5dd9f5fd..a2df4e01c63 100644 --- a/src/mame/includes/ob68k1a.h +++ b/src/mame/includes/ob68k1a.h @@ -55,8 +55,8 @@ private: virtual void machine_start() override; virtual void machine_reset() override; - DECLARE_READ8_MEMBER( pia_r ); - DECLARE_WRITE8_MEMBER( pia_w ); + uint8_t pia_r(offs_t offset); + void pia_w(offs_t offset, uint8_t data); void ob68k1a_mem(address_map &map); }; diff --git a/src/mame/includes/offtwall.h b/src/mame/includes/offtwall.h index 6c25fd48750..6e317807fc9 100644 --- a/src/mame/includes/offtwall.h +++ b/src/mame/includes/offtwall.h @@ -34,11 +34,11 @@ public: void init_offtwalc(); private: - DECLARE_WRITE16_MEMBER(io_latch_w); - DECLARE_READ16_MEMBER(bankswitch_r); - DECLARE_READ16_MEMBER(bankrom_r); - DECLARE_READ16_MEMBER(spritecache_count_r); - DECLARE_READ16_MEMBER(unknown_verify_r); + void io_latch_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t bankswitch_r(offs_t offset); + uint16_t bankrom_r(address_space &space, offs_t offset); + uint16_t spritecache_count_r(offs_t offset); + uint16_t unknown_verify_r(offs_t offset); TILE_GET_INFO_MEMBER(get_playfield_tile_info); uint32_t screen_update_offtwall(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); void main_map(address_map &map); diff --git a/src/mame/includes/ohmygod.h b/src/mame/includes/ohmygod.h index 3376bd5e55c..df7a2d2c175 100644 --- a/src/mame/includes/ohmygod.h +++ b/src/mame/includes/ohmygod.h @@ -31,11 +31,11 @@ public: void init_naname(); private: - DECLARE_WRITE16_MEMBER(ohmygod_ctrl_w); - DECLARE_WRITE16_MEMBER(ohmygod_videoram_w); - DECLARE_WRITE16_MEMBER(ohmygod_spritebank_w); - DECLARE_WRITE16_MEMBER(ohmygod_scrollx_w); - DECLARE_WRITE16_MEMBER(ohmygod_scrolly_w); + void ohmygod_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void ohmygod_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void ohmygod_spritebank_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void ohmygod_scrollx_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void ohmygod_scrolly_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); TILE_GET_INFO_MEMBER(get_tile_info); virtual void machine_start() override; virtual void machine_reset() override; diff --git a/src/mame/includes/ojankohs.h b/src/mame/includes/ojankohs.h index d7092426710..03d6f287268 100644 --- a/src/mame/includes/ojankohs.h +++ b/src/mame/includes/ojankohs.h @@ -83,28 +83,28 @@ private: optional_ioport m_dsw3; optional_ioport m_dsw4; - DECLARE_WRITE8_MEMBER(ojankohs_rombank_w); - DECLARE_WRITE8_MEMBER(ojankoy_rombank_w); - DECLARE_WRITE8_MEMBER(ojankohs_msm5205_w); - DECLARE_WRITE8_MEMBER(ojankoc_ctrl_w); - DECLARE_WRITE8_MEMBER(port_select_w); - DECLARE_READ8_MEMBER(keymatrix_p1_r); - DECLARE_READ8_MEMBER(keymatrix_p2_r); - DECLARE_READ8_MEMBER(ojankoc_keymatrix_p1_r); - DECLARE_READ8_MEMBER(ojankoc_keymatrix_p2_r); - DECLARE_READ8_MEMBER(ccasino_dipsw3_r); - DECLARE_READ8_MEMBER(ccasino_dipsw4_r); - DECLARE_WRITE8_MEMBER(ojankoy_coinctr_w); - DECLARE_WRITE8_MEMBER(ccasino_coinctr_w); - DECLARE_WRITE8_MEMBER(ojankohs_palette_w); - DECLARE_WRITE8_MEMBER(ccasino_palette_w); - DECLARE_WRITE8_MEMBER(ojankoc_palette_w); - DECLARE_WRITE8_MEMBER(ojankohs_videoram_w); - DECLARE_WRITE8_MEMBER(ojankohs_colorram_w); - DECLARE_WRITE8_MEMBER(ojankohs_gfxreg_w); - DECLARE_WRITE8_MEMBER(ojankohs_flipscreen_w); - DECLARE_WRITE8_MEMBER(ojankoc_videoram_w); - DECLARE_WRITE8_MEMBER(ojankohs_adpcm_reset_w); + void ojankohs_rombank_w(uint8_t data); + void ojankoy_rombank_w(uint8_t data); + void ojankohs_msm5205_w(uint8_t data); + void ojankoc_ctrl_w(uint8_t data); + void port_select_w(uint8_t data); + uint8_t keymatrix_p1_r(); + uint8_t keymatrix_p2_r(); + uint8_t ojankoc_keymatrix_p1_r(); + uint8_t ojankoc_keymatrix_p2_r(); + uint8_t ccasino_dipsw3_r(); + uint8_t ccasino_dipsw4_r(); + void ojankoy_coinctr_w(uint8_t data); + void ccasino_coinctr_w(uint8_t data); + void ojankohs_palette_w(offs_t offset, uint8_t data); + void ccasino_palette_w(offs_t offset, uint8_t data); + void ojankoc_palette_w(offs_t offset, uint8_t data); + void ojankohs_videoram_w(offs_t offset, uint8_t data); + void ojankohs_colorram_w(offs_t offset, uint8_t data); + void ojankohs_gfxreg_w(uint8_t data); + void ojankohs_flipscreen_w(uint8_t data); + void ojankoc_videoram_w(offs_t offset, uint8_t data); + void ojankohs_adpcm_reset_w(uint8_t data); uint8_t ojankohs_dipsw1_r(); uint8_t ojankohs_dipsw2_r(); TILE_GET_INFO_MEMBER(ojankohs_get_tile_info); @@ -120,7 +120,7 @@ private: DECLARE_MACHINE_START(common); uint32_t screen_update_ojankohs(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); uint32_t screen_update_ojankoc(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - void ojankoc_flipscreen( address_space &space, int data ); + void ojankoc_flipscreen(int data); DECLARE_WRITE_LINE_MEMBER(ojankohs_adpcm_int); void ccasino_io_map(address_map &map); diff --git a/src/mame/includes/ondra.h b/src/mame/includes/ondra.h index be65072d208..b1021b1f900 100644 --- a/src/mame/includes/ondra.h +++ b/src/mame/includes/ondra.h @@ -37,10 +37,10 @@ public: void ondra(machine_config &config); private: - DECLARE_READ8_MEMBER(ondra_keyboard_r); - DECLARE_WRITE8_MEMBER(ondra_port_03_w); - DECLARE_WRITE8_MEMBER(ondra_port_09_w); - DECLARE_WRITE8_MEMBER(ondra_port_0a_w); + uint8_t ondra_keyboard_r(offs_t offset); + void ondra_port_03_w(uint8_t data); + void ondra_port_09_w(uint8_t data); + void ondra_port_0a_w(uint8_t data); uint32_t screen_update_ondra(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); DECLARE_WRITE_LINE_MEMBER(vblank_irq); TIMER_CALLBACK_MEMBER(nmi_check_callback); diff --git a/src/mame/includes/orao.h b/src/mame/includes/orao.h index 7ea550cec4b..a06c982e2ec 100644 --- a/src/mame/includes/orao.h +++ b/src/mame/includes/orao.h @@ -33,8 +33,8 @@ public: void init_orao103(); private: - DECLARE_READ8_MEMBER(orao_io_r); - DECLARE_WRITE8_MEMBER(orao_io_w); + uint8_t orao_io_r(offs_t offset); + void orao_io_w(offs_t offset, uint8_t data); virtual void machine_reset() override; virtual void video_start() override; uint32_t screen_update_orao(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/orbit.h b/src/mame/includes/orbit.h index 24776a12a2e..55bd794c264 100644 --- a/src/mame/includes/orbit.h +++ b/src/mame/includes/orbit.h @@ -52,16 +52,16 @@ protected: private: DECLARE_WRITE_LINE_MEMBER(coin_lockout_w); - DECLARE_WRITE8_MEMBER(playfield_w); + void playfield_w(offs_t offset, uint8_t data); TILE_GET_INFO_MEMBER(get_tile_info); uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); INTERRUPT_GEN_MEMBER(interrupt); TIMER_CALLBACK_MEMBER(irq_off); TIMER_DEVICE_CALLBACK_MEMBER(nmi_32v); - DECLARE_WRITE8_MEMBER(note_w); - DECLARE_WRITE8_MEMBER(note_amp_w); - DECLARE_WRITE8_MEMBER(noise_amp_w); - DECLARE_WRITE8_MEMBER(noise_rst_w); + void note_w(uint8_t data); + void note_amp_w(uint8_t data); + void noise_amp_w(uint8_t data); + void noise_rst_w(uint8_t data); void main_map(address_map &map); diff --git a/src/mame/includes/orion.h b/src/mame/includes/orion.h index 1f4b086b2bc..c179261033a 100644 --- a/src/mame/includes/orion.h +++ b/src/mame/includes/orion.h @@ -57,27 +57,27 @@ public: void orion128(machine_config &config); protected: - DECLARE_READ8_MEMBER(orion128_system_r); - DECLARE_WRITE8_MEMBER(orion128_system_w); - DECLARE_READ8_MEMBER(orion128_romdisk_r); - DECLARE_WRITE8_MEMBER(orion128_romdisk_w); - DECLARE_WRITE8_MEMBER(orion128_video_mode_w); - DECLARE_WRITE8_MEMBER(orion128_video_page_w); - DECLARE_WRITE8_MEMBER(orion128_memory_page_w); - DECLARE_WRITE8_MEMBER(orion_disk_control_w); - DECLARE_READ8_MEMBER(orion128_floppy_r); - DECLARE_WRITE8_MEMBER(orion128_floppy_w); - DECLARE_READ8_MEMBER(orionz80_floppy_rtc_r); - DECLARE_WRITE8_MEMBER(orionz80_floppy_rtc_w); - DECLARE_WRITE8_MEMBER(orionz80_sound_w); - DECLARE_WRITE8_MEMBER(orionz80_sound_fe_w); - DECLARE_WRITE8_MEMBER(orionz80_memory_page_w); - DECLARE_WRITE8_MEMBER(orionz80_dispatcher_w); - DECLARE_READ8_MEMBER(orionz80_io_r); - DECLARE_WRITE8_MEMBER(orionz80_io_w); - DECLARE_WRITE8_MEMBER(orionpro_memory_page_w); - DECLARE_READ8_MEMBER(orionpro_io_r); - DECLARE_WRITE8_MEMBER(orionpro_io_w); + uint8_t orion128_system_r(offs_t offset); + void orion128_system_w(offs_t offset, uint8_t data); + uint8_t orion128_romdisk_r(offs_t offset); + void orion128_romdisk_w(offs_t offset, uint8_t data); + void orion128_video_mode_w(uint8_t data); + void orion128_video_page_w(uint8_t data); + void orion128_memory_page_w(uint8_t data); + void orion_disk_control_w(uint8_t data); + uint8_t orion128_floppy_r(offs_t offset); + void orion128_floppy_w(offs_t offset, uint8_t data); + uint8_t orionz80_floppy_rtc_r(offs_t offset); + void orionz80_floppy_rtc_w(offs_t offset, uint8_t data); + void orionz80_sound_w(uint8_t data); + void orionz80_sound_fe_w(uint8_t data); + void orionz80_memory_page_w(uint8_t data); + void orionz80_dispatcher_w(uint8_t data); + uint8_t orionz80_io_r(offs_t offset); + void orionz80_io_w(offs_t offset, uint8_t data); + void orionpro_memory_page_w(uint8_t data); + uint8_t orionpro_io_r(offs_t offset); + void orionpro_io_w(offs_t offset, uint8_t data); DECLARE_MACHINE_START(orion128); void orion128_palette(palette_device &palette) const; uint32_t screen_update_orion128(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/osborne1.h b/src/mame/includes/osborne1.h index 6acd8efbbaa..6fd060f111f 100644 --- a/src/mame/includes/osborne1.h +++ b/src/mame/includes/osborne1.h @@ -76,13 +76,13 @@ protected: void osborne1_op(address_map &map); void osborne1_io(address_map &map); - DECLARE_WRITE8_MEMBER(bank_0xxx_w); - DECLARE_WRITE8_MEMBER(bank_1xxx_w); - DECLARE_READ8_MEMBER(bank_2xxx_3xxx_r); - DECLARE_WRITE8_MEMBER(bank_2xxx_3xxx_w); - DECLARE_WRITE8_MEMBER(videoram_w); - DECLARE_READ8_MEMBER(opcode_r); - DECLARE_WRITE8_MEMBER(bankswitch_w); + void bank_0xxx_w(offs_t offset, u8 data); + void bank_1xxx_w(offs_t offset, u8 data); + u8 bank_2xxx_3xxx_r(offs_t offset); + void bank_2xxx_3xxx_w(offs_t offset, u8 data); + void videoram_w(offs_t offset, u8 data); + u8 opcode_r(offs_t offset); + void bankswitch_w(offs_t offset, u8 data); DECLARE_WRITE_LINE_MEMBER(irqack_w); bool rom_mode() const { return 0 != m_rom_mode; } @@ -97,12 +97,12 @@ protected: required_device m_pia1; private: - uint8_t ieee_pia_pb_r(); - void ieee_pia_pb_w(uint8_t data); + u8 ieee_pia_pb_r(); + void ieee_pia_pb_w(u8 data); DECLARE_WRITE_LINE_MEMBER(ieee_pia_irq_a_func); - void video_pia_port_a_w(uint8_t data); - void video_pia_port_b_w(uint8_t data); + void video_pia_port_a_w(u8 data); + void video_pia_port_b_w(u8 data); DECLARE_WRITE_LINE_MEMBER(video_pia_out_cb2_dummy); DECLARE_WRITE_LINE_MEMBER(video_pia_irq_a_func); @@ -185,8 +185,8 @@ protected: void osborne1sp_mem(address_map &map); - DECLARE_READ8_MEMBER(bank_2xxx_3xxx_r); - DECLARE_WRITE8_MEMBER(bank_2xxx_3xxx_w); + u8 bank_2xxx_3xxx_r(offs_t offset); + void bank_2xxx_3xxx_w(offs_t offset, u8 data); private: u32 screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/includes/osi.h b/src/mame/includes/osi.h index 0f97df66a9d..379eb16001b 100644 --- a/src/mame/includes/osi.h +++ b/src/mame/includes/osi.h @@ -55,9 +55,9 @@ protected: virtual void video_start() override; uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_READ8_MEMBER( keyboard_r ); - DECLARE_WRITE8_MEMBER( keyboard_w ); - DECLARE_WRITE8_MEMBER( ctrl_w ); + uint8_t keyboard_r(); + void keyboard_w(uint8_t data); + void ctrl_w(uint8_t data); TIMER_DEVICE_CALLBACK_MEMBER(kansas_w); TIMER_DEVICE_CALLBACK_MEMBER(kansas_r); @@ -115,8 +115,8 @@ protected: virtual void machine_start() override; virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; - DECLARE_WRITE8_MEMBER( osi630_ctrl_w ); - DECLARE_WRITE8_MEMBER( osi630_sound_w ); + void osi630_ctrl_w(uint8_t data); + void osi630_sound_w(uint8_t data); void c1p_mem(address_map &map); required_device m_beeper; @@ -160,7 +160,7 @@ public: protected: uint32_t screen_update(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); - DECLARE_WRITE8_MEMBER( keyboard_w ); + void keyboard_w(uint8_t data); void uk101_video(machine_config &config); void uk101_mem(address_map &map); }; diff --git a/src/mame/includes/overdriv.h b/src/mame/includes/overdriv.h index 7416a5d0f6b..2f01f5a1225 100644 --- a/src/mame/includes/overdriv.h +++ b/src/mame/includes/overdriv.h @@ -38,15 +38,15 @@ public: void overdriv(machine_config &config); private: - DECLARE_WRITE16_MEMBER(eeprom_w); - DECLARE_WRITE16_MEMBER(cpuA_ctrl_w); - DECLARE_READ16_MEMBER(cpuB_ctrl_r); - DECLARE_WRITE16_MEMBER(cpuB_ctrl_w); - DECLARE_WRITE16_MEMBER(overdriv_soundirq_w); - DECLARE_WRITE8_MEMBER(sound_ack_w); - DECLARE_WRITE16_MEMBER(slave_irq4_assert_w); - DECLARE_WRITE16_MEMBER(slave_irq5_assert_w); - DECLARE_WRITE8_MEMBER(objdma_w); + void eeprom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void cpuA_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t cpuB_ctrl_r(); + void cpuB_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void overdriv_soundirq_w(uint16_t data); + void sound_ack_w(uint8_t data); + void slave_irq4_assert_w(uint16_t data); + void slave_irq5_assert_w(uint16_t data); + void objdma_w(uint8_t data); TIMER_CALLBACK_MEMBER(objdma_end_cb); uint32_t screen_update_overdriv(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect); diff --git a/src/mame/machine/m24_z8000.cpp b/src/mame/machine/m24_z8000.cpp index aee7ac9f6c6..5ad15a34568 100644 --- a/src/mame/machine/m24_z8000.cpp +++ b/src/mame/machine/m24_z8000.cpp @@ -176,12 +176,12 @@ void m24_z8000_device::i86_io_w(offs_t offset, uint16_t data, uint16_t mem_mask) m_maincpu->space(AS_IO).write_word(offset << 1, data, (mem_mask << 8) | (mem_mask >> 8)); } -WRITE8_MEMBER(m24_z8000_device::irqctl_w) +void m24_z8000_device::irqctl_w(uint8_t data) { m_irq = data; } -WRITE8_MEMBER(m24_z8000_device::serctl_w) +void m24_z8000_device::serctl_w(uint8_t data) { m_z8000_mem = (data & 0x20) ? true : false; } @@ -197,12 +197,12 @@ uint16_t m24_z8000_device::viack_r() return m_pic->acknowledge() << 1; } -READ8_MEMBER(m24_z8000_device::handshake_r) +uint8_t m24_z8000_device::handshake_r() { return 0; } -WRITE8_MEMBER(m24_z8000_device::handshake_w) +void m24_z8000_device::handshake_w(uint8_t data) { m_handshake = data; if(data & 1) diff --git a/src/mame/machine/m24_z8000.h b/src/mame/machine/m24_z8000.h index a7dea290eb1..e6d7283d82f 100644 --- a/src/mame/machine/m24_z8000.h +++ b/src/mame/machine/m24_z8000.h @@ -24,10 +24,10 @@ public: void dmem_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint16_t i86_io_r(offs_t offset, uint16_t mem_mask = ~0); void i86_io_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE8_MEMBER(irqctl_w); - DECLARE_WRITE8_MEMBER(serctl_w); - DECLARE_READ8_MEMBER(handshake_r); - DECLARE_WRITE8_MEMBER(handshake_w); + void irqctl_w(uint8_t data); + void serctl_w(uint8_t data); + uint8_t handshake_r(); + void handshake_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(halt_w) { m_z8000->set_input_line(INPUT_LINE_HALT, state); } DECLARE_WRITE_LINE_MEMBER(int_w) { m_z8000->set_input_line(z8001_device::VI_LINE, state); } diff --git a/src/mame/machine/macpci.cpp b/src/mame/machine/macpci.cpp index 7b116c6be65..1f9fe2b4581 100644 --- a/src/mame/machine/macpci.cpp +++ b/src/mame/machine/macpci.cpp @@ -182,7 +182,7 @@ void macpci_state::mac_scc_2_w(offs_t offset, uint16_t data) m_scc->reg_w(offset, data >> 8); } -READ8_MEMBER(macpci_state::mac_5396_r) +uint8_t macpci_state::mac_5396_r(offs_t offset) { if (offset < 0x100) { @@ -197,7 +197,7 @@ READ8_MEMBER(macpci_state::mac_5396_r) //return 0; } -WRITE8_MEMBER(macpci_state::mac_5396_w) +void macpci_state::mac_5396_w(offs_t offset, uint8_t data) { if (offset < 0x100) { diff --git a/src/mame/machine/mega32x.cpp b/src/mame/machine/mega32x.cpp index 290d88f2141..f16e2318705 100644 --- a/src/mame/machine/mega32x.cpp +++ b/src/mame/machine/mega32x.cpp @@ -240,22 +240,22 @@ sega_32x_pal_device::sega_32x_pal_device(const machine_config &mconfig, const ch { } -READ16_MEMBER( sega_32x_device::m68k_palette_r ) +uint16_t sega_32x_device::m68k_palette_r(offs_t offset) { return m_32x_palette[offset]; } -WRITE16_MEMBER( sega_32x_device::m68k_palette_w ) +void sega_32x_device::m68k_palette_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_32x_palette[offset]); } -READ16_MEMBER( sega_32x_device::m68k_dram_r ) +uint16_t sega_32x_device::m68k_dram_r(offs_t offset) { return m_32x_access_dram[offset]; } -WRITE16_MEMBER( sega_32x_device::m68k_dram_w ) +void sega_32x_device::m68k_dram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if ((mem_mask&0xffff) == 0xffff) { @@ -285,12 +285,12 @@ WRITE16_MEMBER( sega_32x_device::m68k_dram_w ) } } -READ16_MEMBER( sega_32x_device::m68k_dram_overwrite_r ) +uint16_t sega_32x_device::m68k_dram_overwrite_r(offs_t offset) { return m_32x_access_dram[offset]; } -WRITE16_MEMBER( sega_32x_device::m68k_dram_overwrite_w ) +void sega_32x_device::m68k_dram_overwrite_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //COMBINE_DATA(&m_32x_access_dram[offset+0x10000]); @@ -335,7 +335,7 @@ WRITE16_MEMBER( sega_32x_device::m68k_dram_overwrite_w ) -READ16_MEMBER( sega_32x_device::m68k_a15106_r ) +uint16_t sega_32x_device::m68k_a15106_r() { uint16_t retval; @@ -346,7 +346,7 @@ READ16_MEMBER( sega_32x_device::m68k_a15106_r ) return retval; } -WRITE16_MEMBER( sega_32x_device::m68k_a15106_w ) +void sega_32x_device::m68k_a15106_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -395,7 +395,7 @@ WRITE16_MEMBER( sega_32x_device::m68k_a15106_w ) -READ16_MEMBER( sega_32x_device::dreq_common_r ) +uint16_t sega_32x_device::dreq_common_r(address_space &space, offs_t offset) { address_space& _68kspace = m_main_cpu->space(AS_PROGRAM); @@ -466,7 +466,7 @@ READ16_MEMBER( sega_32x_device::dreq_common_r ) return 0x0000; } -WRITE16_MEMBER( sega_32x_device::dreq_common_w ) +void sega_32x_device::dreq_common_w(address_space &space, offs_t offset, uint16_t data) { address_space& _68kspace = m_main_cpu->space(AS_PROGRAM); @@ -584,12 +584,12 @@ WRITE16_MEMBER( sega_32x_device::dreq_common_w ) -READ16_MEMBER( sega_32x_device::m68k_a1511a_r ) +uint16_t sega_32x_device::m68k_a1511a_r() { return m_sega_tv; } -WRITE16_MEMBER( sega_32x_device::m68k_a1511a_w ) +void sega_32x_device::m68k_a1511a_w(uint16_t data) { m_sega_tv = data & 1; @@ -602,18 +602,18 @@ WRITE16_MEMBER( sega_32x_device::m68k_a1511a_w ) -READ16_MEMBER( sega_32x_device::m68k_m_hint_vector_r ) +uint16_t sega_32x_device::m68k_m_hint_vector_r(offs_t offset) { return m_hint_vector[offset]; } -WRITE16_MEMBER( sega_32x_device::m68k_m_hint_vector_w ) +void sega_32x_device::m68k_m_hint_vector_w(offs_t offset, uint16_t data) { m_hint_vector[offset] = data; } // returns MARS, the system ID of the 32x -READ16_MEMBER( sega_32x_device::m68k_MARS_r ) +uint16_t sega_32x_device::m68k_MARS_r(offs_t offset) { switch (offset) { @@ -635,12 +635,12 @@ READ16_MEMBER( sega_32x_device::m68k_MARS_r ) -READ16_MEMBER( sega_32x_device::m68k_a15100_r ) +uint16_t sega_32x_device::m68k_a15100_r() { return (m_32x_access_auth<<15) | 0x0080; } -WRITE16_MEMBER( sega_32x_device::m68k_a15100_w ) +void sega_32x_device::m68k_a15100_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -663,21 +663,25 @@ WRITE16_MEMBER( sega_32x_device::m68k_a15100_w ) space.install_rom(0x0000000, 0x03fffff, machine().root_device().memregion("32x_68k_bios")->base()); /* VDP area */ - space.install_readwrite_handler(0x0a15180, 0x0a1518b, read16_delegate(*this, FUNC(sega_32x_device::common_vdp_regs_r)), write16_delegate(*this, FUNC(sega_32x_device::common_vdp_regs_w))); // common / shared VDP regs - space.install_readwrite_handler(0x0a15200, 0x0a153ff, read16_delegate(*this, FUNC(sega_32x_device::m68k_palette_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_palette_w))); // access to 'palette' xRRRRRGGGGGBBBBB - space.install_readwrite_handler(0x0840000, 0x085ffff, read16_delegate(*this, FUNC(sega_32x_device::m68k_dram_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_dram_w))); // access to 'display ram' (framebuffer) - space.install_readwrite_handler(0x0860000, 0x087ffff, read16_delegate(*this, FUNC(sega_32x_device::m68k_dram_overwrite_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_dram_overwrite_w))); // access to 'display ram' (framebuffer) + space.install_read_handler(0x0a15180, 0x0a1518b, read16sm_delegate(*this, FUNC(sega_32x_device::common_vdp_regs_r))); // common / shared VDP regs + space.install_write_handler(0x0a15180, 0x0a1518b, write16_delegate(*this, FUNC(sega_32x_device::common_vdp_regs_w))); // common / shared VDP regs + space.install_read_handler(0x0a15200, 0x0a153ff, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_palette_r))); // access to 'palette' xRRRRRGGGGGBBBBB + space.install_write_handler(0x0a15200, 0x0a153ff, write16s_delegate(*this, FUNC(sega_32x_device::m68k_palette_w))); // access to 'palette' xRRRRRGGGGGBBBBB + space.install_read_handler(0x0840000, 0x085ffff, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_dram_r))); // access to 'display ram' (framebuffer) + space.install_write_handler(0x0840000, 0x085ffff, write16s_delegate(*this, FUNC(sega_32x_device::m68k_dram_w))); // access to 'display ram' (framebuffer) + space.install_read_handler(0x0860000, 0x087ffff, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_dram_overwrite_r))); // access to 'display ram' (framebuffer) + space.install_write_handler(0x0860000, 0x087ffff, write16s_delegate(*this, FUNC(sega_32x_device::m68k_dram_overwrite_w))); // access to 'display ram' (framebuffer) - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0x000070, 0x000073, read16_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_w))); // h interrupt vector + m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0x000070, 0x000073, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_r)), write16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_w))); // h interrupt vector } else { m_32x_adapter_enabled = 0; space.install_rom(0x0000000, 0x03fffff, machine().root_device().memregion("gamecart")->base()); - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0x000070, 0x000073, read16_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_w))); // h interrupt vector + m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0x000070, 0x000073, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_r)), write16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_w))); // h interrupt vector } } @@ -695,13 +699,13 @@ WRITE16_MEMBER( sega_32x_device::m68k_a15100_w ) -READ16_MEMBER( sega_32x_device::m68k_a15102_r ) +uint16_t sega_32x_device::m68k_a15102_r() { //printf("_32x_68k_a15102_r\n"); return m_32x_68k_a15102_reg; } -WRITE16_MEMBER( sega_32x_device::m68k_a15102_w ) +void sega_32x_device::m68k_a15102_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -727,12 +731,12 @@ WRITE16_MEMBER( sega_32x_device::m68k_a15102_w ) /**********************************************************************************************/ -READ16_MEMBER( sega_32x_device::m68k_a15104_r ) +uint16_t sega_32x_device::m68k_a15104_r() { return m_32x_68k_a15104_reg; } -WRITE16_MEMBER( sega_32x_device::m68k_a15104_w ) +void sega_32x_device::m68k_a15104_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -757,14 +761,14 @@ WRITE16_MEMBER( sega_32x_device::m68k_a15104_w ) /**********************************************************************************************/ // reads -READ16_MEMBER( sega_32x_device::m68k_m_commsram_r ) +uint16_t sega_32x_device::m68k_m_commsram_r(offs_t offset) { if (_32X_COMMS_PORT_SYNC) machine().scheduler().synchronize(); return m_commsram[offset]; } // writes -WRITE16_MEMBER( sega_32x_device::m68k_m_commsram_w ) +void sega_32x_device::m68k_m_commsram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_commsram[offset]); if (_32X_COMMS_PORT_SYNC) machine().scheduler().synchronize(); @@ -863,7 +867,7 @@ TIMER_CALLBACK_MEMBER(sega_32x_device::handle_pwm_callback) m_32x_pwm_timer->adjust(attotime::from_hz(clock() / (m_pwm_cycle - 1))); } -READ16_MEMBER( sega_32x_device::pwm_r ) +uint16_t sega_32x_device::pwm_r(offs_t offset) { switch(offset) { @@ -878,7 +882,7 @@ READ16_MEMBER( sega_32x_device::pwm_r ) return 0xffff; } -WRITE16_MEMBER( sega_32x_device::pwm_w ) +void sega_32x_device::pwm_w(offs_t offset, uint16_t data) { switch(offset) { @@ -923,12 +927,12 @@ WRITE16_MEMBER( sega_32x_device::pwm_w ) } } -WRITE16_MEMBER( sega_32x_device::m68k_pwm_w ) +void sega_32x_device::m68k_pwm_w(offs_t offset, uint16_t data) { if(offset == 0/2) - pwm_w(space,offset,(data & 0x7f) | (m_pwm_ctrl & 0xff80),mem_mask); + pwm_w(offset,(data & 0x7f) | (m_pwm_ctrl & 0xff80)); else - pwm_w(space,offset,data,mem_mask); + pwm_w(offset,data); } void sega_32x_device::sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) @@ -969,7 +973,7 @@ uint16_t sega_32x_device::get_hposition(void) return MAX_HPOSITION; } -READ16_MEMBER( sega_32x_device::common_vdp_regs_r ) +uint16_t sega_32x_device::common_vdp_regs_r(offs_t offset) { // what happens if the z80 accesses it, what authorization do we use? @@ -1028,7 +1032,7 @@ READ16_MEMBER( sega_32x_device::common_vdp_regs_r ) void sega_32x_device::check_framebuffer_swap(bool enabled) { // this logic should be correct, but makes things worse? - // enabled = (genesis_scanline_counter >= megadrive_irq6_scanline) from video/315_5313.c + // enabled = (genesis_scanline_counter >= megadrive_irq6_scanline) from video/315_5313.cpp //if (enabled) { m_32x_a1518a_reg = m_32x_fb_swap & 1; @@ -1047,7 +1051,7 @@ void sega_32x_device::check_framebuffer_swap(bool enabled) } -WRITE16_MEMBER( sega_32x_device::common_vdp_regs_w ) +void sega_32x_device::common_vdp_regs_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask) { // what happens if the z80 accesses it, what authorization do we use? which address space do we get?? the z80 *can* write here and to the framebuffer via the window @@ -1176,7 +1180,7 @@ P = PWM Interrupt Mask (0 masked, 1 allowed) /**********************************************************************************************/ /* MASTER */ -READ16_MEMBER( sega_32x_device::master_4000_r ) +uint16_t sega_32x_device::master_4000_r() { uint16_t retvalue = 0x0200; retvalue |= m_32x_access_auth << 15; @@ -1190,7 +1194,7 @@ READ16_MEMBER( sega_32x_device::master_4000_r ) return retvalue; } -WRITE16_MEMBER( sega_32x_device::master_4000_w ) +void sega_32x_device::master_4000_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) { @@ -1214,7 +1218,7 @@ WRITE16_MEMBER( sega_32x_device::master_4000_w ) /* SLAVE */ -READ16_MEMBER( sega_32x_device::slave_4000_r ) +uint16_t sega_32x_device::slave_4000_r() { uint16_t retvalue = 0x0200; retvalue |= m_32x_access_auth << 15; @@ -1228,7 +1232,7 @@ READ16_MEMBER( sega_32x_device::slave_4000_r ) } -WRITE16_MEMBER( sega_32x_device::slave_4000_w ) +void sega_32x_device::slave_4000_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) { @@ -1256,13 +1260,13 @@ WRITE16_MEMBER( sega_32x_device::slave_4000_w ) // Shouldn't be used /**********************************************************************************************/ -READ16_MEMBER( sega_32x_device::common_4002_r ) +uint16_t sega_32x_device::common_4002_r() { printf("reading 4002!\n"); return 0x0000; } -WRITE16_MEMBER( sega_32x_device::common_4002_w ) +void sega_32x_device::common_4002_w(uint16_t data) { printf("write 4002!\n"); } @@ -1273,12 +1277,12 @@ WRITE16_MEMBER( sega_32x_device::common_4002_w ) // H Count Register (H Interrupt) // 0 = every line /**********************************************************************************************/ -READ16_MEMBER( sega_32x_device::common_4004_r ) +uint16_t sega_32x_device::common_4004_r() { return m_32x_hcount_reg; } -WRITE16_MEMBER( sega_32x_device::common_4004_w ) +void sega_32x_device::common_4004_w(uint16_t data) { m_32x_hcount_reg = data & 0xff; } @@ -1289,13 +1293,13 @@ WRITE16_MEMBER( sega_32x_device::common_4004_w ) // DReq Control Register /**********************************************************************************************/ -READ16_MEMBER( sega_32x_device::common_4006_r ) +uint16_t sega_32x_device::common_4006_r() { //printf("DREQ read!\n"); // tempo reads it, shut up for now - return m68k_a15106_r(space,offset,mem_mask); + return m68k_a15106_r(); } -WRITE16_MEMBER( sega_32x_device::common_4006_w ) +void sega_32x_device::common_4006_w(uint16_t data) { printf("DREQ write!\n"); //register is read only on SH-2 side } @@ -1306,24 +1310,24 @@ WRITE16_MEMBER( sega_32x_device::common_4006_w ) // VRES (md reset button interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::master_4014_w ){ m_master_cpu->set_input_line(SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::slave_4014_w ) { m_slave_cpu->set_input_line(SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::master_4014_w(uint16_t data){ m_master_cpu->set_input_line(SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::slave_4014_w(uint16_t data) { m_slave_cpu->set_input_line(SH2_VRES_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 4016 // VINT (vertical interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::master_4016_w ){ m_sh2_master_vint_pending = 0; check_irqs(); } -WRITE16_MEMBER( sega_32x_device::slave_4016_w ) { m_sh2_slave_vint_pending = 0; check_irqs(); } +void sega_32x_device::master_4016_w(uint16_t data){ m_sh2_master_vint_pending = 0; check_irqs(); } +void sega_32x_device::slave_4016_w(uint16_t data) { m_sh2_slave_vint_pending = 0; check_irqs(); } /**********************************************************************************************/ // SH2 side 4018 // HINT (horizontal interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::master_4018_w ){ m_master_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::slave_4018_w ) { m_slave_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::master_4018_w(uint16_t data){ m_master_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::slave_4018_w(uint16_t data) { m_slave_cpu->set_input_line(SH2_HINT_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 401A @@ -1331,28 +1335,28 @@ WRITE16_MEMBER( sega_32x_device::slave_4018_w ) { m_slave_cpu->set_input_line(SH // Note: flag cleared here is a guess, according to After Burner behaviour /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::master_401a_w ){ m_32x_68k_a15102_reg &= ~1; m_master_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::slave_401a_w ) { m_32x_68k_a15102_reg &= ~2; m_slave_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::master_401a_w(uint16_t data){ m_32x_68k_a15102_reg &= ~1; m_master_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::slave_401a_w(uint16_t data) { m_32x_68k_a15102_reg &= ~2; m_slave_cpu->set_input_line(SH2_CINT_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 401C // PINT (PWM timer interrupt) clear /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::master_401c_w ){ m_master_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} -WRITE16_MEMBER( sega_32x_device::slave_401c_w ) { m_slave_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::master_401c_w(uint16_t data){ m_master_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} +void sega_32x_device::slave_401c_w(uint16_t data) { m_slave_cpu->set_input_line(SH2_PINT_IRQ_LEVEL,CLEAR_LINE);} /**********************************************************************************************/ // SH2 side 401E // ?? unknown / unused /**********************************************************************************************/ -WRITE16_MEMBER( sega_32x_device::master_401e_w ) +void sega_32x_device::master_401e_w(uint16_t data) { printf("master_401e_w\n"); } -WRITE16_MEMBER( sega_32x_device::slave_401e_w ) +void sega_32x_device::slave_401e_w(uint16_t data) { printf("slave_401e_w\n"); } @@ -1809,23 +1813,28 @@ void sega_32x_device::device_reset() if (m_32x_adapter_enabled == 0) { m_main_cpu->space(AS_PROGRAM).install_rom(0x0000000, 0x03fffff, machine().root_device().memregion(":gamecart")->base()); - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0x000070, 0x000073, read16_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_w))); // h interrupt vector + m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0x000070, 0x000073, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_r)), write16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_hint_vector_w))); // h interrupt vector }; m_a15100_reg = 0x0000; - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15100, 0xa15101, read16_delegate(*this, FUNC(sega_32x_device::m68k_a15100_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_a15100_w))); // framebuffer control regs - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15102, 0xa15103, read16_delegate(*this, FUNC(sega_32x_device::m68k_a15102_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_a15102_w))); // send irq to sh2 - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15104, 0xa15105, read16_delegate(*this, FUNC(sega_32x_device::m68k_a15104_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_a15104_w))); // 68k BANK rom set - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15106, 0xa15107, read16_delegate(*this, FUNC(sega_32x_device::m68k_a15106_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_a15106_w))); // dreq stuff - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15108, 0xa15113, read16_delegate(*this, FUNC(sega_32x_device::dreq_common_r)), write16_delegate(*this, FUNC(sega_32x_device::dreq_common_w))); // dreq src / dst / length /fifo - - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa1511a, 0xa1511b, read16_delegate(*this, FUNC(sega_32x_device::m68k_a1511a_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_a1511a_w))); // SEGA TV - - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15120, 0xa1512f, read16_delegate(*this, FUNC(sega_32x_device::m68k_m_commsram_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_m_commsram_w))); // comms reg 0-7 - m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15130, 0xa1513f, read16_delegate(*this, FUNC(sega_32x_device::pwm_r)), write16_delegate(*this, FUNC(sega_32x_device::m68k_pwm_w))); - - m_main_cpu->space(AS_PROGRAM).install_read_handler(0x0a130ec, 0x0a130ef, read16_delegate(*this, FUNC(sega_32x_device::m68k_MARS_r))); // system ID + m_main_cpu->space(AS_PROGRAM).install_read_handler(0xa15100, 0xa15101, read16smo_delegate(*this, FUNC(sega_32x_device::m68k_a15100_r))); // framebuffer control regs + m_main_cpu->space(AS_PROGRAM).install_write_handler(0xa15100, 0xa15101, write16_delegate(*this, FUNC(sega_32x_device::m68k_a15100_w))); // framebuffer control regs + m_main_cpu->space(AS_PROGRAM).install_read_handler(0xa15102, 0xa15103, read16smo_delegate(*this, FUNC(sega_32x_device::m68k_a15102_r))); // send irq to sh2 + m_main_cpu->space(AS_PROGRAM).install_write_handler(0xa15102, 0xa15103, write16s_delegate(*this, FUNC(sega_32x_device::m68k_a15102_w))); // send irq to sh2 + m_main_cpu->space(AS_PROGRAM).install_read_handler(0xa15104, 0xa15105, read16smo_delegate(*this, FUNC(sega_32x_device::m68k_a15104_r))); // 68k BANK rom set + m_main_cpu->space(AS_PROGRAM).install_write_handler(0xa15104, 0xa15105, write16s_delegate(*this, FUNC(sega_32x_device::m68k_a15104_w))); // 68k BANK rom set + m_main_cpu->space(AS_PROGRAM).install_read_handler(0xa15106, 0xa15107, read16smo_delegate(*this, FUNC(sega_32x_device::m68k_a15106_r))); // dreq stuff + m_main_cpu->space(AS_PROGRAM).install_write_handler(0xa15106, 0xa15107, write16_delegate(*this, FUNC(sega_32x_device::m68k_a15106_w))); // dreq stuff + m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15108, 0xa15113, read16m_delegate(*this, FUNC(sega_32x_device::dreq_common_r)), write16m_delegate(*this, FUNC(sega_32x_device::dreq_common_w))); // dreq src / dst / length /fifo + + m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa1511a, 0xa1511b, read16smo_delegate(*this, FUNC(sega_32x_device::m68k_a1511a_r)), write16smo_delegate(*this, FUNC(sega_32x_device::m68k_a1511a_w))); // SEGA TV + + m_main_cpu->space(AS_PROGRAM).install_read_handler(0xa15120, 0xa1512f, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_m_commsram_r))); // comms reg 0-7 + m_main_cpu->space(AS_PROGRAM).install_write_handler(0xa15120, 0xa1512f, write16s_delegate(*this, FUNC(sega_32x_device::m68k_m_commsram_w))); // comms reg 0-7 + m_main_cpu->space(AS_PROGRAM).install_readwrite_handler(0xa15130, 0xa1513f, read16sm_delegate(*this, FUNC(sega_32x_device::pwm_r)), write16sm_delegate(*this, FUNC(sega_32x_device::m68k_pwm_w))); + + m_main_cpu->space(AS_PROGRAM).install_read_handler(0x0a130ec, 0x0a130ef, read16sm_delegate(*this, FUNC(sega_32x_device::m68k_MARS_r))); // system ID diff --git a/src/mame/machine/mega32x.h b/src/mame/machine/mega32x.h index d6e80400b92..97c7512ca13 100644 --- a/src/mame/machine/mega32x.h +++ b/src/mame/machine/mega32x.h @@ -32,56 +32,56 @@ public: update_total_scanlines(mode3); } - DECLARE_READ16_MEMBER( m68k_palette_r ); - DECLARE_WRITE16_MEMBER( m68k_palette_w ); - DECLARE_READ16_MEMBER( m68k_dram_r ); - DECLARE_WRITE16_MEMBER( m68k_dram_w ); - DECLARE_READ16_MEMBER( m68k_dram_overwrite_r ); - DECLARE_WRITE16_MEMBER( m68k_dram_overwrite_w ); - DECLARE_READ16_MEMBER( m68k_a15106_r ); - DECLARE_WRITE16_MEMBER( m68k_a15106_w ); - DECLARE_READ16_MEMBER( dreq_common_r ); - DECLARE_WRITE16_MEMBER( dreq_common_w ); - DECLARE_READ16_MEMBER( m68k_a1511a_r ); - DECLARE_WRITE16_MEMBER( m68k_a1511a_w ); - DECLARE_READ16_MEMBER( m68k_m_hint_vector_r ); - DECLARE_WRITE16_MEMBER( m68k_m_hint_vector_w ); - DECLARE_READ16_MEMBER( m68k_MARS_r ); - DECLARE_READ16_MEMBER( m68k_a15100_r ); - DECLARE_WRITE16_MEMBER( m68k_a15100_w ); - DECLARE_READ16_MEMBER( m68k_a15102_r ); - DECLARE_WRITE16_MEMBER( m68k_a15102_w ); - DECLARE_READ16_MEMBER( m68k_a15104_r ); - DECLARE_WRITE16_MEMBER( m68k_a15104_w ); - DECLARE_READ16_MEMBER( m68k_m_commsram_r ); - DECLARE_WRITE16_MEMBER( m68k_m_commsram_w ); - DECLARE_READ16_MEMBER( pwm_r ); - DECLARE_WRITE16_MEMBER( pwm_w ); - DECLARE_WRITE16_MEMBER( m68k_pwm_w ); - DECLARE_READ16_MEMBER( common_vdp_regs_r ); - DECLARE_WRITE16_MEMBER( common_vdp_regs_w ); - DECLARE_READ16_MEMBER( master_4000_r ); - DECLARE_WRITE16_MEMBER( master_4000_w ); - DECLARE_READ16_MEMBER( slave_4000_r ); - DECLARE_WRITE16_MEMBER( slave_4000_w ); - DECLARE_READ16_MEMBER( common_4002_r ); - DECLARE_WRITE16_MEMBER( common_4002_w ); - DECLARE_READ16_MEMBER( common_4004_r ); - DECLARE_WRITE16_MEMBER( common_4004_w ); - DECLARE_READ16_MEMBER( common_4006_r ); - DECLARE_WRITE16_MEMBER( common_4006_w ); - DECLARE_WRITE16_MEMBER( master_4014_w ); - DECLARE_WRITE16_MEMBER( slave_4014_w ); - DECLARE_WRITE16_MEMBER( master_4016_w ); - DECLARE_WRITE16_MEMBER( slave_4016_w ); - DECLARE_WRITE16_MEMBER( master_4018_w ); - DECLARE_WRITE16_MEMBER( slave_4018_w ) ; - DECLARE_WRITE16_MEMBER( master_401a_w ); - DECLARE_WRITE16_MEMBER( slave_401a_w ); - DECLARE_WRITE16_MEMBER( master_401c_w ); - DECLARE_WRITE16_MEMBER( slave_401c_w ); - DECLARE_WRITE16_MEMBER( master_401e_w ); - DECLARE_WRITE16_MEMBER( slave_401e_w ); + uint16_t m68k_palette_r(offs_t offset); + void m68k_palette_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t m68k_dram_r(offs_t offset); + void m68k_dram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t m68k_dram_overwrite_r(offs_t offset); + void m68k_dram_overwrite_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t m68k_a15106_r(); + void m68k_a15106_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t dreq_common_r(address_space &space, offs_t offset); + void dreq_common_w(address_space &space, offs_t offset, uint16_t data); + uint16_t m68k_a1511a_r(); + void m68k_a1511a_w(uint16_t data); + uint16_t m68k_m_hint_vector_r(offs_t offset); + void m68k_m_hint_vector_w(offs_t offset, uint16_t data); + uint16_t m68k_MARS_r(offs_t offset); + uint16_t m68k_a15100_r(); + void m68k_a15100_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t m68k_a15102_r(); + void m68k_a15102_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t m68k_a15104_r(); + void m68k_a15104_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t m68k_m_commsram_r(offs_t offset); + void m68k_m_commsram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t pwm_r(offs_t offset); + void pwm_w(offs_t offset, uint16_t data); + void m68k_pwm_w(offs_t offset, uint16_t data); + uint16_t common_vdp_regs_r(offs_t offset); + void common_vdp_regs_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t master_4000_r(); + void master_4000_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t slave_4000_r(); + void slave_4000_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t common_4002_r(); + void common_4002_w(uint16_t data); + uint16_t common_4004_r(); + void common_4004_w(uint16_t data); + uint16_t common_4006_r(); + void common_4006_w(uint16_t data); + void master_4014_w(uint16_t data); + void slave_4014_w(uint16_t data); + void master_4016_w(uint16_t data); + void slave_4016_w(uint16_t data); + void master_4018_w(uint16_t data); + void slave_4018_w(uint16_t data); + void master_401a_w(uint16_t data); + void slave_401a_w(uint16_t data); + void master_401c_w(uint16_t data); + void slave_401c_w(uint16_t data); + void master_401e_w(uint16_t data); + void slave_401e_w(uint16_t data); SH2_DMA_FIFO_DATA_AVAILABLE_CB(_32x_fifo_available_callback); diff --git a/src/mame/machine/megacd.cpp b/src/mame/machine/megacd.cpp index f8938ad60cc..d0b53d9b595 100644 --- a/src/mame/machine/megacd.cpp +++ b/src/mame/machine/megacd.cpp @@ -402,7 +402,7 @@ inline void sega_segacd_device::write_pixel(uint8_t pix, int pixeloffset) // Wily Beamish and Citizen X appear to rely on this // however, it breaks the megacdj bios (megacd2j still works!) // (maybe that's a timing issue instead?) -uint16_t sega_segacd_device::segacd_1meg_mode_word_read(int offset, uint16_t mem_mask) +uint16_t sega_segacd_device::segacd_1meg_mode_word_read(offs_t offset) { offset *= 2; @@ -415,7 +415,7 @@ uint16_t sega_segacd_device::segacd_1meg_mode_word_read(int offset, uint16_t mem } -void sega_segacd_device::segacd_1meg_mode_word_write(int offset, uint16_t data, uint16_t mem_mask, int use_pm) +void sega_segacd_device::segacd_1meg_mode_word_write(offs_t offset, uint16_t data, uint16_t mem_mask, int use_pm) { offset *= 2; @@ -476,7 +476,7 @@ void sega_segacd_device::segacd_1meg_mode_word_write(int offset, uint16_t data, -WRITE16_MEMBER( sega_segacd_device::scd_a12000_halt_reset_w ) +void sega_segacd_device::scd_a12000_halt_reset_w(offs_t offset, uint16_t data, uint16_t mem_mask) { uint16_t old_halt = m_a12000_halt_reset_reg; @@ -526,7 +526,7 @@ WRITE16_MEMBER( sega_segacd_device::scd_a12000_halt_reset_w ) } } -READ16_MEMBER( sega_segacd_device::scd_a12000_halt_reset_r ) +uint16_t sega_segacd_device::scd_a12000_halt_reset_r() { return m_a12000_halt_reset_reg; } @@ -543,7 +543,7 @@ READ16_MEMBER( sega_segacd_device::scd_a12000_halt_reset_r ) // -READ16_MEMBER( sega_segacd_device::scd_a12002_memory_mode_r ) +uint16_t sega_segacd_device::scd_a12002_memory_mode_r() { int temp = scd_rammode; int temp2 = 0; @@ -602,7 +602,7 @@ void sega_segacd_device::scd_a12002_memory_mode_w_0_7(u8 data) } -WRITE16_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w ) +void sega_segacd_device::scd_a12002_memory_mode_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) scd_a12002_memory_mode_w_8_15(data>>8); @@ -614,7 +614,7 @@ WRITE16_MEMBER( sega_segacd_device::scd_a12002_memory_mode_w ) -READ16_MEMBER( sega_segacd_device::segacd_sub_memory_mode_r ) +uint16_t sega_segacd_device::segacd_sub_memory_mode_r() { int temp = scd_rammode; int temp2 = 0; @@ -690,7 +690,7 @@ void sega_segacd_device::segacd_sub_memory_mode_w_0_7(u8 data) } } -WRITE16_MEMBER( sega_segacd_device::segacd_sub_memory_mode_w ) +void sega_segacd_device::segacd_sub_memory_mode_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //printf("segacd_sub_memory_mode_w %04x %04x\n", data, mem_mask); @@ -713,12 +713,12 @@ WRITE16_MEMBER( sega_segacd_device::segacd_sub_memory_mode_w ) ********************************************************************************/ -READ16_MEMBER( sega_segacd_device::segacd_comms_flags_r ) +uint16_t sega_segacd_device::segacd_comms_flags_r() { return segacd_comms_flags; } -WRITE16_MEMBER( sega_segacd_device::segacd_comms_flags_subcpu_w ) +void sega_segacd_device::segacd_comms_flags_subcpu_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) // Dragon's Lair { @@ -732,7 +732,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_comms_flags_subcpu_w ) } } -WRITE16_MEMBER( sega_segacd_device::segacd_comms_flags_maincpu_w ) +void sega_segacd_device::segacd_comms_flags_maincpu_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) { @@ -746,14 +746,14 @@ WRITE16_MEMBER( sega_segacd_device::segacd_comms_flags_maincpu_w ) } } -READ16_MEMBER( sega_segacd_device::scd_4m_prgbank_ram_r ) +uint16_t sega_segacd_device::scd_4m_prgbank_ram_r(offs_t offset) { uint16_t realoffset = ((segacd_4meg_prgbank * 0x20000)/2) + offset; return m_prgram[realoffset]; } -WRITE16_MEMBER( sega_segacd_device::scd_4m_prgbank_ram_w ) +void sega_segacd_device::scd_4m_prgbank_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { uint16_t realoffset = ((segacd_4meg_prgbank * 0x20000)/2) + offset; @@ -766,49 +766,49 @@ WRITE16_MEMBER( sega_segacd_device::scd_4m_prgbank_ram_w ) -READ16_MEMBER( sega_segacd_device::segacd_comms_main_part1_r ) +uint16_t sega_segacd_device::segacd_comms_main_part1_r(offs_t offset) { return segacd_comms_part1[offset]; } -WRITE16_MEMBER( sega_segacd_device::segacd_comms_main_part1_w ) +void sega_segacd_device::segacd_comms_main_part1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_comms_part1[offset]); } -READ16_MEMBER( sega_segacd_device::segacd_comms_main_part2_r ) +uint16_t sega_segacd_device::segacd_comms_main_part2_r(offs_t offset) { return segacd_comms_part2[offset]; } -WRITE16_MEMBER( sega_segacd_device::segacd_comms_main_part2_w ) +void sega_segacd_device::segacd_comms_main_part2_w(uint16_t data) { printf("Sega CD main CPU attempting to write to read only comms regs\n"); } -READ16_MEMBER( sega_segacd_device::segacd_comms_sub_part1_r ) +uint16_t sega_segacd_device::segacd_comms_sub_part1_r(offs_t offset) { return segacd_comms_part1[offset]; } -WRITE16_MEMBER( sega_segacd_device::segacd_comms_sub_part1_w ) +void sega_segacd_device::segacd_comms_sub_part1_w(uint16_t data) { printf("Sega CD sub CPU attempting to write to read only comms regs\n"); } -READ16_MEMBER( sega_segacd_device::segacd_comms_sub_part2_r ) +uint16_t sega_segacd_device::segacd_comms_sub_part2_r(offs_t offset) { return segacd_comms_part2[offset]; } -WRITE16_MEMBER( sega_segacd_device::segacd_comms_sub_part2_w ) +void sega_segacd_device::segacd_comms_sub_part2_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_comms_part2[offset]); } -READ16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_r ) +uint16_t sega_segacd_device::segacd_main_dataram_part1_r(offs_t offset) { if ((scd_rammode&2)==RAM_MODE_2MEG) { @@ -832,16 +832,16 @@ READ16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_r ) if (offset<0x20000/2) { // wordram accees - //printf("Unspported: segacd_main_dataram_part1_r (word RAM) in mode 1\n"); + //printf("Unsupported: segacd_main_dataram_part1_r (word RAM) in mode 1\n"); // ret bit set by sub cpu determines which half of WorkRAM we have access to? if (scd_rammode&1) { - return segacd_1meg_mode_word_read(offset+0x20000/2, mem_mask); + return segacd_1meg_mode_word_read(offset+0x20000/2); } else { - return segacd_1meg_mode_word_read(offset+0x00000/2, mem_mask); + return segacd_1meg_mode_word_read(offset+0x00000/2); } } @@ -863,11 +863,11 @@ READ16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_r ) // HOTA cares about this if (!(scd_rammode&1)) { - return segacd_1meg_mode_word_read(offset+0x00000/2, mem_mask); + return segacd_1meg_mode_word_read(offset+0x00000/2); } else { - return segacd_1meg_mode_word_read(offset+0x20000/2, mem_mask); + return segacd_1meg_mode_word_read(offset+0x20000/2); } } } @@ -875,7 +875,7 @@ READ16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_r ) return 0x0000; } -WRITE16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_w ) +void sega_segacd_device::segacd_main_dataram_part1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if ((scd_rammode&2)==RAM_MODE_2MEG) { @@ -895,7 +895,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_w ) { if (offset<0x20000/2) { - //printf("Unspported: segacd_main_dataram_part1_w (word RAM) in mode 1\n"); + //printf("Unsupported: segacd_main_dataram_part1_w (word RAM) in mode 1\n"); // wordram accees // ret bit set by sub cpu determines which half of WorkRAM we have access to? @@ -910,12 +910,12 @@ WRITE16_MEMBER( sega_segacd_device::segacd_main_dataram_part1_w ) } else { - // printf("Unspported: segacd_main_dataram_part1_w (Cell rearranged RAM) in mode 1 (illega?)\n"); // is this legal?? + // printf("Unsupported: segacd_main_dataram_part1_w (Cell rearranged RAM) in mode 1 (illega?)\n"); // is this legal?? } } } -READ16_MEMBER( sega_segacd_device::scd_hint_vector_r ) +uint16_t sega_segacd_device::scd_hint_vector_r(offs_t offset) { // printf("read HINT offset %d\n", offset); @@ -932,12 +932,12 @@ READ16_MEMBER( sega_segacd_device::scd_hint_vector_r ) } -READ16_MEMBER( sega_segacd_device::scd_a12006_hint_register_r ) +uint16_t sega_segacd_device::scd_a12006_hint_register_r() { return segacd_hint_register; } -WRITE16_MEMBER( sega_segacd_device::scd_a12006_hint_register_w ) +void sega_segacd_device::scd_a12006_hint_register_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_hint_register); } @@ -1220,7 +1220,7 @@ inline uint8_t sega_segacd_device::get_stampmap_32x32_16x16_tile_info_pixel(int -WRITE16_MEMBER( sega_segacd_device::segacd_stopwatch_timer_w ) +void sega_segacd_device::segacd_stopwatch_timer_w(uint16_t data) { if(data == 0) m_stopwatch_timer->reset(); @@ -1228,7 +1228,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_stopwatch_timer_w ) printf("Stopwatch timer %04x\n",data); } -READ16_MEMBER( sega_segacd_device::segacd_stopwatch_timer_r ) +uint16_t sega_segacd_device::segacd_stopwatch_timer_r() { int32_t result = (m_stopwatch_timer->time_elapsed() * ATTOSECONDS_TO_HZ(ATTOSECONDS_IN_USEC(30.72))).as_double(); @@ -1241,7 +1241,7 @@ READ16_MEMBER( sega_segacd_device::segacd_stopwatch_timer_r ) -READ16_MEMBER( sega_segacd_device::segacd_sub_led_ready_r ) +uint16_t sega_segacd_device::segacd_sub_led_ready_r(offs_t offset, uint16_t mem_mask) { uint16_t retdata = 0x0000; @@ -1259,7 +1259,7 @@ READ16_MEMBER( sega_segacd_device::segacd_sub_led_ready_r ) return retdata; } -WRITE16_MEMBER( sega_segacd_device::segacd_sub_led_ready_w ) +void sega_segacd_device::segacd_sub_led_ready_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -1283,7 +1283,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_sub_led_ready_w ) -READ16_MEMBER( sega_segacd_device::segacd_sub_dataram_part1_r ) +uint16_t sega_segacd_device::segacd_sub_dataram_part1_r(offs_t offset) { if ((scd_rammode&2)==RAM_MODE_2MEG) { @@ -1298,16 +1298,16 @@ READ16_MEMBER( sega_segacd_device::segacd_sub_dataram_part1_r ) } else if ((scd_rammode&2)==RAM_MODE_1MEG) { -// printf("Unspported: segacd_sub_dataram_part1_r in mode 1 (Word RAM Expander - 1 Byte Per Pixel)\n"); +// printf("Unsupported: segacd_sub_dataram_part1_r in mode 1 (Word RAM Expander - 1 Byte Per Pixel)\n"); uint16_t data; if (scd_rammode&1) { - data = segacd_1meg_mode_word_read(offset/2+0x00000/2, 0xffff); + data = segacd_1meg_mode_word_read(offset/2+0x00000/2); } else { - data = segacd_1meg_mode_word_read(offset/2+0x20000/2, 0xffff); + data = segacd_1meg_mode_word_read(offset/2+0x20000/2); } if (offset&1) @@ -1325,7 +1325,7 @@ READ16_MEMBER( sega_segacd_device::segacd_sub_dataram_part1_r ) return 0x0000; } -WRITE16_MEMBER( sega_segacd_device::segacd_sub_dataram_part1_w ) +void sega_segacd_device::segacd_sub_dataram_part1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if ((scd_rammode&2)==RAM_MODE_2MEG) { @@ -1343,7 +1343,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_sub_dataram_part1_w ) else if ((scd_rammode&2)==RAM_MODE_1MEG) { //if (mem_mask==0xffff) - // printf("Unspported: segacd_sub_dataram_part1_w in mode 1 (Word RAM Expander - 1 Byte Per Pixel) %04x %04x\n", data, mem_mask); + // printf("Unsupported: segacd_sub_dataram_part1_w in mode 1 (Word RAM Expander - 1 Byte Per Pixel) %04x %04x\n", data, mem_mask); data = (data & 0x000f) | (data & 0x0f00)>>4; mem_mask = (mem_mask & 0x000f) | (mem_mask & 0x0f00)>>4; @@ -1367,11 +1367,11 @@ WRITE16_MEMBER( sega_segacd_device::segacd_sub_dataram_part1_w ) segacd_1meg_mode_word_write(offset/2+0x20000/2, data, mem_mask, 1); } - // printf("Unspported: segacd_sub_dataram_part1_w in mode 1 (Word RAM Expander - 1 Byte Per Pixel) %04x\n", data); + // printf("Unsupported: segacd_sub_dataram_part1_w in mode 1 (Word RAM Expander - 1 Byte Per Pixel) %04x\n", data); } } -READ16_MEMBER( sega_segacd_device::segacd_sub_dataram_part2_r ) +uint16_t sega_segacd_device::segacd_sub_dataram_part2_r(offs_t offset) { if ((scd_rammode&2)==RAM_MODE_2MEG) { @@ -1384,11 +1384,11 @@ READ16_MEMBER( sega_segacd_device::segacd_sub_dataram_part2_r ) // ret bit set by sub cpu determines which half of WorkRAM we have access to? if (scd_rammode&1) { - return segacd_1meg_mode_word_read(offset+0x00000/2, mem_mask); + return segacd_1meg_mode_word_read(offset+0x00000/2); } else { - return segacd_1meg_mode_word_read(offset+0x20000/2, mem_mask); + return segacd_1meg_mode_word_read(offset+0x20000/2); } } @@ -1396,7 +1396,7 @@ READ16_MEMBER( sega_segacd_device::segacd_sub_dataram_part2_r ) return 0x0000; } -WRITE16_MEMBER( sega_segacd_device::segacd_sub_dataram_part2_w ) +void sega_segacd_device::segacd_sub_dataram_part2_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if ((scd_rammode&2)==RAM_MODE_2MEG) { @@ -1420,7 +1420,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_sub_dataram_part2_w ) -READ16_MEMBER( sega_segacd_device::segacd_stampsize_r ) +uint16_t sega_segacd_device::segacd_stampsize_r() { uint16_t retdata = 0x0000; @@ -1432,7 +1432,7 @@ READ16_MEMBER( sega_segacd_device::segacd_stampsize_r ) } -WRITE16_MEMBER( sega_segacd_device::segacd_stampsize_w ) +void sega_segacd_device::segacd_stampsize_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //printf("segacd_stampsize_w %04x %04x\n",data, mem_mask); if (ACCESSING_BITS_0_7) @@ -1494,7 +1494,7 @@ inline uint8_t sega_segacd_device::read_pixel_from_stampmap(bitmap_ind16* srcbit // this triggers the conversion operation, which will cause an IRQ1 when finished -WRITE16_MEMBER( sega_segacd_device::segacd_trace_vector_base_address_w ) +void sega_segacd_device::segacd_trace_vector_base_address_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if ((scd_rammode&2)==RAM_MODE_1MEG) { @@ -1580,12 +1580,12 @@ WRITE16_MEMBER( sega_segacd_device::segacd_trace_vector_base_address_w ) } // actually just the low 8 bits? -READ16_MEMBER( sega_segacd_device::segacd_imagebuffer_vdot_size_r ) +uint16_t sega_segacd_device::segacd_imagebuffer_vdot_size_r() { return segacd_imagebuffer_vdot_size; } -WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_vdot_size_w ) +void sega_segacd_device::segacd_imagebuffer_vdot_size_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //printf("segacd_imagebuffer_vdot_size_w %04x %04x\n",data,mem_mask); COMBINE_DATA(&segacd_imagebuffer_vdot_size); @@ -1593,7 +1593,7 @@ WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_vdot_size_w ) // basically the 'tilemap' base address, for the 16x16 / 32x32 source tiles -READ16_MEMBER( sega_segacd_device::segacd_stampmap_base_address_r ) +uint16_t sega_segacd_device::segacd_stampmap_base_address_r() { // different bits are valid in different modes, but I'm guessing the register // always returns all the bits set, even if they're not used? @@ -1601,7 +1601,7 @@ READ16_MEMBER( sega_segacd_device::segacd_stampmap_base_address_r ) } -WRITE16_MEMBER( sega_segacd_device::segacd_stampmap_base_address_w ) +void sega_segacd_device::segacd_stampmap_base_address_w(offs_t offset, uint16_t data, uint16_t mem_mask) { // WORD ACCESS // low 3 bitsa aren't used, are they stored? @@ -1609,12 +1609,12 @@ WRITE16_MEMBER( sega_segacd_device::segacd_stampmap_base_address_w ) } // destination for 'rendering' the section of the tilemap(stampmap) requested -READ16_MEMBER( sega_segacd_device::segacd_imagebuffer_start_address_r ) +uint16_t sega_segacd_device::segacd_imagebuffer_start_address_r() { return segacd_imagebuffer_start_address; } -WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_start_address_w ) +void sega_segacd_device::segacd_imagebuffer_start_address_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_imagebuffer_start_address); @@ -1622,47 +1622,47 @@ WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_start_address_w ) //printf("segacd_imagebuffer_start_address_w %04x %04x (actual base = %06x)\n", data, segacd_imagebuffer_start_address, base); } -READ16_MEMBER( sega_segacd_device::segacd_imagebuffer_offset_r ) +uint16_t sega_segacd_device::segacd_imagebuffer_offset_r() { return segacd_imagebuffer_offset; } -WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_offset_w ) +void sega_segacd_device::segacd_imagebuffer_offset_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_imagebuffer_offset); // printf("segacd_imagebuffer_offset_w %04x\n", segacd_imagebuffer_offset); } -READ16_MEMBER( sega_segacd_device::segacd_imagebuffer_vcell_size_r ) +uint16_t sega_segacd_device::segacd_imagebuffer_vcell_size_r() { return segacd_imagebuffer_vcell_size; } -WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_vcell_size_w ) +void sega_segacd_device::segacd_imagebuffer_vcell_size_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_imagebuffer_vcell_size); } -READ16_MEMBER( sega_segacd_device::segacd_imagebuffer_hdot_size_r ) +uint16_t sega_segacd_device::segacd_imagebuffer_hdot_size_r() { return segacd_imagebuffer_hdot_size; } -WRITE16_MEMBER( sega_segacd_device::segacd_imagebuffer_hdot_size_w ) +void sega_segacd_device::segacd_imagebuffer_hdot_size_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&segacd_imagebuffer_hdot_size); } -READ16_MEMBER( sega_segacd_device::segacd_irq3timer_r ) +uint16_t sega_segacd_device::segacd_irq3timer_r() { return m_irq3_timer_reg; // always returns value written, not current counter! } -WRITE16_MEMBER( sega_segacd_device::segacd_irq3timer_w ) +void sega_segacd_device::segacd_irq3timer_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -1680,27 +1680,27 @@ WRITE16_MEMBER( sega_segacd_device::segacd_irq3timer_w ) } -READ8_MEMBER( sega_segacd_device::backupram_r ) +uint8_t sega_segacd_device::backupram_r(offs_t offset) { return m_backupram[offset]; } -WRITE8_MEMBER( sega_segacd_device::backupram_w ) +void sega_segacd_device::backupram_w(offs_t offset, uint8_t data) { m_backupram[offset] = data; } -READ8_MEMBER( sega_segacd_device::font_color_r ) +uint8_t sega_segacd_device::font_color_r() { return m_font_color; } -WRITE8_MEMBER( sega_segacd_device::font_color_w ) +void sega_segacd_device::font_color_w(uint8_t data) { m_font_color = data; } -READ16_MEMBER( sega_segacd_device::font_converted_r ) +uint16_t sega_segacd_device::font_converted_r(offs_t offset) { int scbg = (m_font_color & 0x0f); int scfg = (m_font_color & 0xf0)>>4; @@ -1733,28 +1733,35 @@ void sega_segacd_device::device_start() space.unmap_readwrite (0x020000,0x3fffff); - space.install_read_handler (0x0020000, 0x003ffff, read16_delegate(*this, FUNC(sega_segacd_device::scd_4m_prgbank_ram_r)) ); - space.install_write_handler (0x0020000, 0x003ffff, write16_delegate(*this, FUNC(sega_segacd_device::scd_4m_prgbank_ram_w)) ); + space.install_read_handler (0x0020000, 0x003ffff, read16sm_delegate(*this, FUNC(sega_segacd_device::scd_4m_prgbank_ram_r)) ); + space.install_write_handler (0x0020000, 0x003ffff, write16s_delegate(*this, FUNC(sega_segacd_device::scd_4m_prgbank_ram_w)) ); - space.install_readwrite_handler(0x200000, 0x23ffff, read16_delegate(*this, FUNC(sega_segacd_device::segacd_main_dataram_part1_r)), write16_delegate(*this, FUNC(sega_segacd_device::segacd_main_dataram_part1_w))); // RAM shared with sub - space.install_readwrite_handler(0xa12000, 0xa12001, read16_delegate(*this, FUNC(sega_segacd_device::scd_a12000_halt_reset_r)), write16_delegate(*this, FUNC(sega_segacd_device::scd_a12000_halt_reset_w))); // sub-cpu control - space.install_readwrite_handler(0xa12002, 0xa12003, read16_delegate(*this, FUNC(sega_segacd_device::scd_a12002_memory_mode_r)), write16_delegate(*this, FUNC(sega_segacd_device::scd_a12002_memory_mode_w))); // memory mode / write protect + space.install_read_handler(0x200000, 0x23ffff, read16sm_delegate(*this, FUNC(sega_segacd_device::segacd_main_dataram_part1_r))); // RAM shared with sub + space.install_write_handler(0x200000, 0x23ffff, write16s_delegate(*this, FUNC(sega_segacd_device::segacd_main_dataram_part1_w))); // RAM shared with sub + space.install_read_handler(0xa12000, 0xa12001, read16smo_delegate(*this, FUNC(sega_segacd_device::scd_a12000_halt_reset_r))); // sub-cpu control + space.install_write_handler(0xa12000, 0xa12001, write16s_delegate(*this, FUNC(sega_segacd_device::scd_a12000_halt_reset_w))); // sub-cpu control + space.install_read_handler(0xa12002, 0xa12003, read16smo_delegate(*this, FUNC(sega_segacd_device::scd_a12002_memory_mode_r))); // memory mode / write protect + space.install_write_handler(0xa12002, 0xa12003, write16s_delegate(*this, FUNC(sega_segacd_device::scd_a12002_memory_mode_w))); // memory mode / write protect //space.install_readwrite_handler(0xa12004, 0xa12005, read16_delegate(*this, FUNC(sega_segacd_device::segacd_cdc_mode_address_r)), write16_delegate(*this, FUNC(sega_segacd_device::segacd_cdc_mode_address_w))); - space.install_readwrite_handler(0xa12006, 0xa12007, read16_delegate(*this, FUNC(sega_segacd_device::scd_a12006_hint_register_r)), write16_delegate(*this, FUNC(sega_segacd_device::scd_a12006_hint_register_w))); // where HINT points on main CPU + space.install_read_handler(0xa12006, 0xa12007, read16smo_delegate(*this, FUNC(sega_segacd_device::scd_a12006_hint_register_r))); // where HINT points on main CPU + space.install_write_handler(0xa12006, 0xa12007, write16s_delegate(*this, FUNC(sega_segacd_device::scd_a12006_hint_register_w))); // where HINT points on main CPU //space.install_read_handler (0xa12008, 0xa12009, read16_delegate(*this, FUNC(sega_segacd_device::cdc_data_main_r))); - space.install_readwrite_handler(0xa1200c, 0xa1200d, read16_delegate(*this, FUNC(sega_segacd_device::segacd_stopwatch_timer_r)), write16_delegate(*this, FUNC(sega_segacd_device::segacd_stopwatch_timer_w))); // starblad + space.install_readwrite_handler(0xa1200c, 0xa1200d, read16smo_delegate(*this, FUNC(sega_segacd_device::segacd_stopwatch_timer_r)), write16smo_delegate(*this, FUNC(sega_segacd_device::segacd_stopwatch_timer_w))); // starblad - space.install_readwrite_handler(0xa1200e, 0xa1200f, read16_delegate(*this, FUNC(sega_segacd_device::segacd_comms_flags_r)), write16_delegate(*this, FUNC(sega_segacd_device::segacd_comms_flags_maincpu_w))); // communication flags block + space.install_read_handler(0xa1200e, 0xa1200f, read16smo_delegate(*this, FUNC(sega_segacd_device::segacd_comms_flags_r))); // communication flags block + space.install_write_handler(0xa1200e, 0xa1200f, write16s_delegate(*this, FUNC(sega_segacd_device::segacd_comms_flags_maincpu_w))); // communication flags block - space.install_readwrite_handler(0xa12010, 0xa1201f, read16_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part1_r)), write16_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part1_w))); - space.install_readwrite_handler(0xa12020, 0xa1202f, read16_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part2_r)), write16_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part2_w))); + space.install_read_handler(0xa12010, 0xa1201f, read16sm_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part1_r))); + space.install_write_handler(0xa12010, 0xa1201f, write16s_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part1_w))); + space.install_read_handler(0xa12020, 0xa1202f, read16sm_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part2_r))); + space.install_write_handler(0xa12020, 0xa1202f, write16smo_delegate(*this, FUNC(sega_segacd_device::segacd_comms_main_part2_w))); - space.install_read_handler (0x0000070, 0x0000073, read16_delegate(*this, FUNC(sega_segacd_device::scd_hint_vector_r)) ); + space.install_read_handler (0x0000070, 0x0000073, read16sm_delegate(*this, FUNC(sega_segacd_device::scd_hint_vector_r)) ); segacd_stampmap[0] = &machine().tilemap().create(*this, tilemap_get_info_delegate(*this, FUNC(sega_segacd_device::get_stampmap_16x16_1x1_tile_info)), TILEMAP_SCAN_ROWS, 16, 16, 16, 16); segacd_stampmap[1] = &machine().tilemap().create(*this, tilemap_get_info_delegate(*this, FUNC(sega_segacd_device::get_stampmap_32x32_1x1_tile_info)), TILEMAP_SCAN_ROWS, 32, 32, 8, 8); @@ -1764,12 +1771,12 @@ void sega_segacd_device::device_start() // todo register save state stuff } -READ16_MEMBER( sega_segacd_device::segacd_dmaaddr_r ) +uint16_t sega_segacd_device::segacd_dmaaddr_r() { return m_dmaaddr; } -WRITE16_MEMBER( sega_segacd_device::segacd_dmaaddr_w ) +void sega_segacd_device::segacd_dmaaddr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dmaaddr); } diff --git a/src/mame/machine/megacd.h b/src/mame/machine/megacd.h index 6ec41979bc4..f18411d82ef 100644 --- a/src/mame/machine/megacd.h +++ b/src/mame/machine/megacd.h @@ -24,82 +24,82 @@ public: void update_total_scanlines(bool mode3) { m_total_scanlines = mode3 ? (m_base_total_scanlines * 2) : m_base_total_scanlines; } // this gets set at each EOF double get_framerate() { return has_screen() ? screen().frame_period().as_hz() : double(m_framerate); } - DECLARE_READ16_MEMBER( segacd_dmaaddr_r ); - DECLARE_WRITE16_MEMBER( segacd_dmaaddr_w ); + uint16_t segacd_dmaaddr_r(); + void segacd_dmaaddr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE16_MEMBER( scd_a12000_halt_reset_w ); - DECLARE_READ16_MEMBER( scd_a12000_halt_reset_r ); - DECLARE_READ16_MEMBER( scd_a12002_memory_mode_r ); + void scd_a12000_halt_reset_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t scd_a12000_halt_reset_r(); + uint16_t scd_a12002_memory_mode_r(); void scd_a12002_memory_mode_w_8_15(u8 data); void scd_a12002_memory_mode_w_0_7(u8 data); - DECLARE_WRITE16_MEMBER( scd_a12002_memory_mode_w ); - DECLARE_READ16_MEMBER( segacd_sub_memory_mode_r ); + void scd_a12002_memory_mode_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_sub_memory_mode_r(); void segacd_sub_memory_mode_w_8_15(u8 data); void segacd_sub_memory_mode_w_0_7(u8 data); - DECLARE_WRITE16_MEMBER( segacd_sub_memory_mode_w ); + void segacd_sub_memory_mode_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_READ16_MEMBER( segacd_comms_flags_r ); - DECLARE_WRITE16_MEMBER( segacd_comms_flags_subcpu_w ); - DECLARE_WRITE16_MEMBER( segacd_comms_flags_maincpu_w ); - DECLARE_READ16_MEMBER( scd_4m_prgbank_ram_r ); - DECLARE_WRITE16_MEMBER( scd_4m_prgbank_ram_w ); - DECLARE_READ16_MEMBER( segacd_comms_main_part1_r ); - DECLARE_WRITE16_MEMBER( segacd_comms_main_part1_w ); - DECLARE_READ16_MEMBER( segacd_comms_main_part2_r ); - DECLARE_WRITE16_MEMBER( segacd_comms_main_part2_w ); - DECLARE_READ16_MEMBER( segacd_comms_sub_part1_r ); - DECLARE_WRITE16_MEMBER( segacd_comms_sub_part1_w ); - DECLARE_READ16_MEMBER( segacd_comms_sub_part2_r ); - DECLARE_WRITE16_MEMBER( segacd_comms_sub_part2_w ); + uint16_t segacd_comms_flags_r(); + void segacd_comms_flags_subcpu_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void segacd_comms_flags_maincpu_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t scd_4m_prgbank_ram_r(offs_t offset); + void scd_4m_prgbank_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_comms_main_part1_r(offs_t offset); + void segacd_comms_main_part1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_comms_main_part2_r(offs_t offset); + void segacd_comms_main_part2_w(uint16_t data); + uint16_t segacd_comms_sub_part1_r(offs_t offset); + void segacd_comms_sub_part1_w(uint16_t data); + uint16_t segacd_comms_sub_part2_r(offs_t offset); + void segacd_comms_sub_part2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_READ16_MEMBER( segacd_main_dataram_part1_r ); - DECLARE_WRITE16_MEMBER( segacd_main_dataram_part1_w ); + uint16_t segacd_main_dataram_part1_r(offs_t offset); + void segacd_main_dataram_part1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_READ16_MEMBER( scd_hint_vector_r ); - DECLARE_READ16_MEMBER( scd_a12006_hint_register_r ); - DECLARE_WRITE16_MEMBER( scd_a12006_hint_register_w ); + uint16_t scd_hint_vector_r(offs_t offset); + uint16_t scd_a12006_hint_register_r(); + void scd_a12006_hint_register_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE16_MEMBER( segacd_stopwatch_timer_w ); - DECLARE_READ16_MEMBER( segacd_stopwatch_timer_r ); - DECLARE_READ16_MEMBER( segacd_sub_led_ready_r ); - DECLARE_WRITE16_MEMBER( segacd_sub_led_ready_w ); - DECLARE_READ16_MEMBER( segacd_sub_dataram_part1_r ); - DECLARE_WRITE16_MEMBER( segacd_sub_dataram_part1_w ); - DECLARE_READ16_MEMBER( segacd_sub_dataram_part2_r ); - DECLARE_WRITE16_MEMBER( segacd_sub_dataram_part2_w ); + void segacd_stopwatch_timer_w(uint16_t data); + uint16_t segacd_stopwatch_timer_r(); + uint16_t segacd_sub_led_ready_r(offs_t offset, uint16_t mem_mask = ~0); + void segacd_sub_led_ready_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_sub_dataram_part1_r(offs_t offset); + void segacd_sub_dataram_part1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_sub_dataram_part2_r(offs_t offset); + void segacd_sub_dataram_part2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_READ16_MEMBER( segacd_stampsize_r ); - DECLARE_WRITE16_MEMBER( segacd_stampsize_w ); + uint16_t segacd_stampsize_r(); + void segacd_stampsize_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); TILE_GET_INFO_MEMBER( get_stampmap_16x16_1x1_tile_info ); TILE_GET_INFO_MEMBER( get_stampmap_32x32_1x1_tile_info ); TILE_GET_INFO_MEMBER( get_stampmap_16x16_16x16_tile_info ); TILE_GET_INFO_MEMBER( get_stampmap_32x32_16x16_tile_info ); - WRITE16_MEMBER( segacd_trace_vector_base_address_w ); - READ16_MEMBER( segacd_imagebuffer_vdot_size_r ); - WRITE16_MEMBER( segacd_imagebuffer_vdot_size_w ); - READ16_MEMBER( segacd_stampmap_base_address_r ); - WRITE16_MEMBER( segacd_stampmap_base_address_w ); - READ16_MEMBER( segacd_imagebuffer_start_address_r ); - WRITE16_MEMBER( segacd_imagebuffer_start_address_w ); - READ16_MEMBER( segacd_imagebuffer_offset_r ); - WRITE16_MEMBER( segacd_imagebuffer_offset_w ); - READ16_MEMBER( segacd_imagebuffer_vcell_size_r ); - WRITE16_MEMBER( segacd_imagebuffer_vcell_size_w ); - READ16_MEMBER( segacd_imagebuffer_hdot_size_r ); - WRITE16_MEMBER( segacd_imagebuffer_hdot_size_w ); - READ16_MEMBER( segacd_irq3timer_r ); - WRITE16_MEMBER( segacd_irq3timer_w ); - READ8_MEMBER( backupram_r ); - WRITE8_MEMBER( backupram_w ); - READ8_MEMBER( font_color_r ); - WRITE8_MEMBER( font_color_w ); - READ16_MEMBER( font_converted_r ); + void segacd_trace_vector_base_address_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_imagebuffer_vdot_size_r(); + void segacd_imagebuffer_vdot_size_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_stampmap_base_address_r(); + void segacd_stampmap_base_address_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_imagebuffer_start_address_r(); + void segacd_imagebuffer_start_address_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_imagebuffer_offset_r(); + void segacd_imagebuffer_offset_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_imagebuffer_vcell_size_r(); + void segacd_imagebuffer_vcell_size_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_imagebuffer_hdot_size_r(); + void segacd_imagebuffer_hdot_size_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t segacd_irq3timer_r(); + void segacd_irq3timer_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint8_t backupram_r(offs_t offset); + void backupram_w(offs_t offset, uint8_t data); + uint8_t font_color_r(); + void font_color_w(uint8_t data); + uint16_t font_converted_r(offs_t offset); void segacd_map(address_map &map); void segacd_pcm_map(address_map &map); @@ -161,8 +161,8 @@ protected: inline void write_pixel(uint8_t pix, int pixeloffset); - uint16_t segacd_1meg_mode_word_read(int offset, uint16_t mem_mask); - void segacd_1meg_mode_word_write(int offset, uint16_t data, uint16_t mem_mask, int use_pm); + uint16_t segacd_1meg_mode_word_read(offs_t offset); + void segacd_1meg_mode_word_write(offs_t offset, uint16_t data, uint16_t mem_mask, int use_pm); uint16_t m_dmaaddr; diff --git a/src/mame/machine/mhavoc.cpp b/src/mame/machine/mhavoc.cpp index 2dbfe7067af..60bdc933683 100644 --- a/src/mame/machine/mhavoc.cpp +++ b/src/mame/machine/mhavoc.cpp @@ -39,7 +39,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(mhavoc_state::mhavoc_cpu_irq_clock) } -WRITE8_MEMBER(mhavoc_state::mhavoc_alpha_irq_ack_w) +void mhavoc_state::mhavoc_alpha_irq_ack_w(uint8_t data) { /* clear the line and reset the clock */ m_alpha->set_input_line(0, CLEAR_LINE); @@ -48,7 +48,7 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_alpha_irq_ack_w) } -WRITE8_MEMBER(mhavoc_state::mhavoc_gamma_irq_ack_w) +void mhavoc_state::mhavoc_gamma_irq_ack_w(uint8_t data) { /* clear the line and reset the clock */ m_gamma->set_input_line(0, CLEAR_LINE); @@ -84,7 +84,6 @@ void mhavoc_state::machine_start() void mhavoc_state::machine_reset() { - address_space &space = m_alpha->space(AS_PROGRAM); m_has_gamma_cpu = (m_gamma != nullptr); membank("bank1")->configure_entry(0, m_zram0); @@ -92,8 +91,8 @@ void mhavoc_state::machine_reset() membank("bank2")->configure_entries(0, 4, memregion("alpha")->base() + 0x10000, 0x2000); /* reset RAM/ROM banks to 0 */ - mhavoc_ram_banksel_w(space, 0, 0); - mhavoc_rom_banksel_w(space, 0, 0); + mhavoc_ram_banksel_w(0); + mhavoc_rom_banksel_w(0); /* reset alpha comm status */ m_alpha_data = 0; @@ -137,14 +136,14 @@ TIMER_CALLBACK_MEMBER(mhavoc_state::delayed_gamma_w) } -WRITE8_MEMBER(mhavoc_state::mhavoc_gamma_w) +void mhavoc_state::mhavoc_gamma_w(uint8_t data) { //logerror(" writing to gamma processor: %02x (%d %d)\n", data, m_gamma_rcvd, m_alpha_xmtd); machine().scheduler().synchronize(timer_expired_delegate(FUNC(mhavoc_state::delayed_gamma_w),this), data); } -READ8_MEMBER(mhavoc_state::mhavoc_alpha_r) +uint8_t mhavoc_state::mhavoc_alpha_r() { //logerror("\t\t\t\t\treading from alpha processor: %02x (%d %d)\n", m_alpha_data, m_gamma_rcvd, m_alpha_xmtd); m_gamma_rcvd = 1; @@ -160,7 +159,7 @@ READ8_MEMBER(mhavoc_state::mhavoc_alpha_r) * *************************************/ -WRITE8_MEMBER(mhavoc_state::mhavoc_alpha_w) +void mhavoc_state::mhavoc_alpha_w(uint8_t data) { //logerror("\t\t\t\t\twriting to alpha processor: %02x %d %d\n", data, m_alpha_rcvd, m_gamma_xmtd); m_alpha_rcvd = 0; @@ -169,7 +168,7 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_alpha_w) } -READ8_MEMBER(mhavoc_state::mhavoc_gamma_r) +uint8_t mhavoc_state::mhavoc_gamma_r() { //logerror(" reading from gamma processor: %02x (%d %d)\n", m_gamma_data, m_alpha_rcvd, m_gamma_xmtd); m_alpha_rcvd = 1; @@ -185,13 +184,13 @@ READ8_MEMBER(mhavoc_state::mhavoc_gamma_r) * *************************************/ -WRITE8_MEMBER(mhavoc_state::mhavoc_ram_banksel_w) +void mhavoc_state::mhavoc_ram_banksel_w(uint8_t data) { membank("bank1")->set_entry(data & 1); } -WRITE8_MEMBER(mhavoc_state::mhavoc_rom_banksel_w) +void mhavoc_state::mhavoc_rom_banksel_w(uint8_t data) { membank("bank2")->set_entry(data & 3); } @@ -239,7 +238,7 @@ READ_LINE_MEMBER(mhavoc_state::alpha_xmtd_r) * *************************************/ -WRITE8_MEMBER(mhavoc_state::mhavoc_out_0_w) +void mhavoc_state::mhavoc_out_0_w(uint8_t data) { /* Bit 7 = Invert Y -- unemulated */ /* Bit 6 = Invert X -- unemulated */ @@ -266,7 +265,7 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_out_0_w) } -WRITE8_MEMBER(mhavoc_state::alphaone_out_0_w) +void mhavoc_state::alphaone_out_0_w(uint8_t data) { /* Bit 5 = P2 lamp */ m_lamps[0] = BIT(~data, 5); @@ -284,7 +283,7 @@ WRITE8_MEMBER(mhavoc_state::alphaone_out_0_w) } -WRITE8_MEMBER(mhavoc_state::mhavoc_out_1_w) +void mhavoc_state::mhavoc_out_1_w(uint8_t data) { /* Bit 1 = left coin counter */ machine().bookkeeping().coin_counter_w(0, data & 0x02); @@ -299,13 +298,13 @@ WRITE8_MEMBER(mhavoc_state::mhavoc_out_1_w) * *************************************/ -WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_data_w) +void mhavoc_state::mhavocrv_speech_data_w(uint8_t data) { m_speech_write_buffer = data; } -WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_strobe_w) +void mhavoc_state::mhavocrv_speech_strobe_w(uint8_t data) { m_tms->data_w(m_speech_write_buffer); } @@ -319,6 +318,6 @@ WRITE8_MEMBER(mhavoc_state::mhavocrv_speech_strobe_w) void mhavoc_state::init_mhavocrv() { // For Return to Vax, add support for the normally-unused speech module. - m_gamma->space(AS_PROGRAM).install_write_handler(0x5800, 0x5800, write8_delegate(*this, FUNC(mhavoc_state::mhavocrv_speech_data_w))); - m_gamma->space(AS_PROGRAM).install_write_handler(0x5900, 0x5900, write8_delegate(*this, FUNC(mhavoc_state::mhavocrv_speech_strobe_w))); + m_gamma->space(AS_PROGRAM).install_write_handler(0x5800, 0x5800, write8smo_delegate(*this, FUNC(mhavoc_state::mhavocrv_speech_data_w))); + m_gamma->space(AS_PROGRAM).install_write_handler(0x5900, 0x5900, write8smo_delegate(*this, FUNC(mhavoc_state::mhavocrv_speech_strobe_w))); } diff --git a/src/mame/machine/micro3d.cpp b/src/mame/machine/micro3d.cpp index 0353281c0ea..aaeb2e83c9a 100644 --- a/src/mame/machine/micro3d.cpp +++ b/src/mame/machine/micro3d.cpp @@ -84,7 +84,7 @@ void micro3d_state::duart_output_w(uint8_t data) * *************************************/ -READ8_MEMBER( micro3d_state::vgb_uart_r ) +uint8_t micro3d_state::vgb_uart_r(offs_t offset) { // the mode and sync registers switched places? if (offset == 1 || offset == 2) @@ -93,7 +93,7 @@ READ8_MEMBER( micro3d_state::vgb_uart_r ) return m_vgb_uart->read(offset); } -WRITE8_MEMBER( micro3d_state::vgb_uart_w ) +void micro3d_state::vgb_uart_w(offs_t offset, uint8_t data) { // the mode and sync registers switched places? if (offset == 1 || offset == 2) @@ -454,13 +454,13 @@ void micro3d_state::drmath_intr2_ack(uint32_t data) ***************************************************************************/ -WRITE8_MEMBER(micro3d_state::micro3d_snd_dac_a) +void micro3d_state::micro3d_snd_dac_a(uint8_t data) { m_noise_1->dac_w(data); m_noise_2->dac_w(data); } -WRITE8_MEMBER(micro3d_state::micro3d_snd_dac_b) +void micro3d_state::micro3d_snd_dac_b(uint8_t data) { /* TODO: This controls upd7759 volume */ } @@ -491,7 +491,7 @@ uint8_t micro3d_state::micro3d_sound_p3_r() return (m_sound_port_latch[3] & 0xf7) | (m_upd7759->busy_r() ? 0x08 : 0); } -WRITE8_MEMBER(micro3d_state::micro3d_upd7759_w) +void micro3d_state::micro3d_upd7759_w(uint8_t data) { m_upd7759->port_w(data); m_upd7759->start_w(0); diff --git a/src/mame/machine/microtan.cpp b/src/mame/machine/microtan.cpp index 9818bcad4f7..aa5a3c0f815 100644 --- a/src/mame/machine/microtan.cpp +++ b/src/mame/machine/microtan.cpp @@ -113,20 +113,20 @@ static const char keyboard[8][9][8] = { }; -READ8_MEMBER(microtan_state::sound_r) +uint8_t microtan_state::sound_r() { int data = 0xff; LOG("sound_r: -> %02x\n", data); return data; } -WRITE8_MEMBER(microtan_state::sound_w) +void microtan_state::sound_w(uint8_t data) { LOG("sound_w: <- %02x\n", data); } -READ8_MEMBER(microtan_state::bffx_r) +uint8_t microtan_state::bffx_r(offs_t offset) { int data = 0xff; switch( offset & 3 ) @@ -172,7 +172,7 @@ TIMER_CALLBACK_MEMBER(microtan_state::pulse_nmi) m_maincpu->pulse_input_line(INPUT_LINE_NMI, attotime::zero); } -WRITE8_MEMBER(microtan_state::bffx_w) +void microtan_state::bffx_w(offs_t offset, uint8_t data) { switch( offset & 3 ) { @@ -197,7 +197,7 @@ WRITE8_MEMBER(microtan_state::bffx_w) } } -READ8_MEMBER(mt6809_state::keyboard_r) +uint8_t mt6809_state::keyboard_r() { uint8_t data = m_keyboard_ascii; @@ -660,10 +660,10 @@ void microtan_state::snapshot_copy(uint8_t *snapshot_buff, int snapshot_size) for (int i = 0; i < 16; i++ ) { if (i < 4) - bffx_w(space, i, snapshot_buff[base++]); + bffx_w(i, snapshot_buff[base++]); } - sound_w(space, 0, snapshot_buff[base++]); + sound_w(snapshot_buff[base++]); m_chunky_graphics = snapshot_buff[base++]; /* first set of AY8910 registers */ diff --git a/src/mame/machine/mikro80.cpp b/src/mame/machine/mikro80.cpp index 9ac6f8e252e..b0dd9598adf 100644 --- a/src/mame/machine/mikro80.cpp +++ b/src/mame/machine/mikro80.cpp @@ -78,24 +78,24 @@ void mikro80_state::machine_reset() } -READ8_MEMBER(mikro80_state::mikro80_keyboard_r) +uint8_t mikro80_state::mikro80_keyboard_r(offs_t offset) { return m_ppi8255->read(offset^0x03); } -WRITE8_MEMBER(mikro80_state::mikro80_keyboard_w) +void mikro80_state::mikro80_keyboard_w(offs_t offset, uint8_t data) { m_ppi8255->write(offset^0x03, data); } -WRITE8_MEMBER(mikro80_state::mikro80_tape_w) +void mikro80_state::mikro80_tape_w(uint8_t data) { m_cassette->output(data & 0x01 ? 1 : -1); } -READ8_MEMBER(mikro80_state::mikro80_tape_r) +uint8_t mikro80_state::mikro80_tape_r() { double level = m_cassette->input(); if (level < 0) { @@ -104,7 +104,7 @@ READ8_MEMBER(mikro80_state::mikro80_tape_r) return 0xff; } -WRITE8_MEMBER(mikro80_state::radio99_sound_w) +void mikro80_state::radio99_sound_w(uint8_t data) { m_dac->write(BIT(data, 1)); } diff --git a/src/mame/machine/mpu4.cpp b/src/mame/machine/mpu4.cpp index f8260d7a230..246ccb03e03 100644 --- a/src/mame/machine/mpu4.cpp +++ b/src/mame/machine/mpu4.cpp @@ -508,7 +508,7 @@ However, there is no evidence to suggest this was ever implemented. The controls for it exist however, in the form of the Soundboard PIA CB2 pin, which is used in some cabinets instead of the main control. */ -WRITE8_MEMBER(mpu4_state::bankswitch_w) +void mpu4_state::bankswitch_w(uint8_t data) { // printf("bankswitch_w %02x\n", data); @@ -518,13 +518,13 @@ WRITE8_MEMBER(mpu4_state::bankswitch_w) } -READ8_MEMBER(mpu4_state::bankswitch_r) +uint8_t mpu4_state::bankswitch_r() { return m_bank1->entry(); } -WRITE8_MEMBER(mpu4_state::bankset_w) +void mpu4_state::bankset_w(uint8_t data) { // printf("bankset_w %02x\n", data); @@ -1421,7 +1421,7 @@ and t1 is the initial value in clock 1. /* This is a bit of a cheat - since we don't clock into the OKI chip directly, we need to calculate the oscillation frequency in advance. We're running the timer for interrupt purposes, but the frequency calculation is done by plucking the values out as they are written.*/ -WRITE8_MEMBER(mpu4_state::ic3ss_w) +void mpu4_state::ic3ss_w(offs_t offset, uint8_t data) { m_ptm_ic3ss->write(offset,data); @@ -1891,7 +1891,7 @@ check is bypassed. This may be something to look at for prototype ROMs and hacks */ -WRITE8_MEMBER(mpu4_state::characteriser_w) +void mpu4_state::characteriser_w(offs_t offset, uint8_t data) { int x; int call=data; @@ -1968,7 +1968,7 @@ WRITE8_MEMBER(mpu4_state::characteriser_w) } -READ8_MEMBER(mpu4_state::characteriser_r) +uint8_t mpu4_state::characteriser_r(address_space &space, offs_t offset) { if (!m_current_chr_table) { @@ -2039,7 +2039,7 @@ and two holding the appropriate call and response pairs for the two stages of op */ -WRITE8_MEMBER(mpu4_state::bwb_characteriser_w) +void mpu4_state::bwb_characteriser_w(offs_t offset, uint8_t data) { int x; int call=data; @@ -2080,7 +2080,7 @@ WRITE8_MEMBER(mpu4_state::bwb_characteriser_w) } } -READ8_MEMBER(mpu4_state::bwb_characteriser_r) +uint8_t mpu4_state::bwb_characteriser_r(offs_t offset) { LOG_CHR(("Characteriser read offset %02X \n",offset)); @@ -2114,12 +2114,12 @@ READ8_MEMBER(mpu4_state::bwb_characteriser_r) /* Common configurations */ -WRITE8_MEMBER(mpu4_state::mpu4_ym2413_w) +void mpu4_state::mpu4_ym2413_w(offs_t offset, uint8_t data) { if (m_ym2413) m_ym2413->write(offset,data); } -READ8_MEMBER(mpu4_state::mpu4_ym2413_r) +uint8_t mpu4_state::mpu4_ym2413_r(offs_t offset) { // if (m_ym2413) return m_ym2413->read(offset); return 0xff; @@ -2128,8 +2128,8 @@ READ8_MEMBER(mpu4_state::mpu4_ym2413_r) void mpu4_state::mpu4_install_mod4yam_space(address_space &space) { - space.install_read_handler(0x0880, 0x0882, read8_delegate(*this, FUNC(mpu4_state::mpu4_ym2413_r))); - space.install_write_handler(0x0880, 0x0881, write8_delegate(*this, FUNC(mpu4_state::mpu4_ym2413_w))); + space.install_read_handler(0x0880, 0x0882, read8sm_delegate(*this, FUNC(mpu4_state::mpu4_ym2413_r))); + space.install_write_handler(0x0880, 0x0881, write8sm_delegate(*this, FUNC(mpu4_state::mpu4_ym2413_w))); } void mpu4_state::mpu4_install_mod4oki_space(address_space &space) @@ -2138,12 +2138,12 @@ void mpu4_state::mpu4_install_mod4oki_space(address_space &space) space.install_readwrite_handler(0x0880, 0x0883, read8sm_delegate(*pia_ic4ss, FUNC(pia6821_device::read)), write8sm_delegate(*pia_ic4ss, FUNC(pia6821_device::write))); space.install_read_handler(0x08c0, 0x08c7, read8sm_delegate(*m_ptm_ic3ss, FUNC(ptm6840_device::read))); - space.install_write_handler(0x08c0, 0x08c7, write8_delegate(*this, FUNC(mpu4_state::ic3ss_w))); + space.install_write_handler(0x08c0, 0x08c7, write8sm_delegate(*this, FUNC(mpu4_state::ic3ss_w))); } void mpu4_state::mpu4_install_mod4bwb_space(address_space &space) { - space.install_readwrite_handler(0x0810, 0x0810, read8_delegate(*this, FUNC(mpu4_state::bwb_characteriser_r)), write8_delegate(*this, FUNC(mpu4_state::bwb_characteriser_w))); + space.install_readwrite_handler(0x0810, 0x0810, read8sm_delegate(*this, FUNC(mpu4_state::bwb_characteriser_r)), write8sm_delegate(*this, FUNC(mpu4_state::bwb_characteriser_w))); mpu4_install_mod4oki_space(space); } @@ -2519,8 +2519,8 @@ void mpu4_state::init_m4default_big() else { m_bwb_bank = 1; - space.install_write_handler(0x0858, 0x0858, write8_delegate(*this, FUNC(mpu4_state::bankswitch_w))); - space.install_write_handler(0x0878, 0x0878, write8_delegate(*this, FUNC(mpu4_state::bankset_w))); + space.install_write_handler(0x0858, 0x0858, write8smo_delegate(*this, FUNC(mpu4_state::bankswitch_w))); + space.install_write_handler(0x0878, 0x0878, write8smo_delegate(*this, FUNC(mpu4_state::bankset_w))); uint8_t *rom = memregion("maincpu")->base(); m_numbanks = size / 0x10000; @@ -2539,12 +2539,12 @@ void mpu4_state::init_m4default_big() -READ8_MEMBER(mpu4_state::crystal_sound_r) +uint8_t mpu4_state::crystal_sound_r() { return machine().rand(); } //this may be a YMZ280B -WRITE8_MEMBER(mpu4_state::crystal_sound_w) +void mpu4_state::crystal_sound_w(uint8_t data) { printf("crystal_sound_w %02x\n",data); } @@ -2553,8 +2553,8 @@ void mpu4_state::init_m_frkstn() { address_space &space = m_maincpu->space(AS_PROGRAM); init_m4default_big(); - space.install_read_handler(0x0880, 0x0880, read8_delegate(*this, FUNC(mpu4_state::crystal_sound_r))); - space.install_write_handler(0x0881, 0x0881, write8_delegate(*this, FUNC(mpu4_state::crystal_sound_w))); + space.install_read_handler(0x0880, 0x0880, read8smo_delegate(*this, FUNC(mpu4_state::crystal_sound_r))); + space.install_write_handler(0x0881, 0x0881, write8smo_delegate(*this, FUNC(mpu4_state::crystal_sound_w))); } // thanks to Project Amber for descramble information diff --git a/src/mame/machine/msx.cpp b/src/mame/machine/msx.cpp index f261fa155b3..784d891e8f3 100644 --- a/src/mame/machine/msx.cpp +++ b/src/mame/machine/msx.cpp @@ -287,17 +287,17 @@ void msx_state::msx_psg_port_b_w(uint8_t data) ** RTC functions */ -WRITE8_MEMBER( msx2_state::msx_rtc_latch_w ) +void msx2_state::msx_rtc_latch_w(uint8_t data) { m_rtc_latch = data & 15; } -WRITE8_MEMBER( msx2_state::msx_rtc_reg_w ) +void msx2_state::msx_rtc_reg_w(uint8_t data) { m_rtc->write(m_rtc_latch, data); } -READ8_MEMBER( msx2_state::msx_rtc_reg_r ) +uint8_t msx2_state::msx_rtc_reg_r() { return m_rtc->read(m_rtc_latch); } @@ -426,17 +426,17 @@ void msx_state::msx_memory_map_all () msx_memory_map_page (i); } -READ8_MEMBER( msx_state::msx_mem_read ) +uint8_t msx_state::msx_mem_read(offs_t offset) { return m_current_page[offset >> 14]->read(offset); } -WRITE8_MEMBER( msx_state::msx_mem_write ) +void msx_state::msx_mem_write(offs_t offset, uint8_t data) { m_current_page[offset >> 14]->write(offset, data); } -WRITE8_MEMBER( msx_state::msx_sec_slot_w ) +void msx_state::msx_sec_slot_w(uint8_t data) { int slot = m_primary_slot >> 6; if (m_slot_expanded[slot]) @@ -451,7 +451,7 @@ WRITE8_MEMBER( msx_state::msx_sec_slot_w ) m_current_page[3]->write(0xffff, data); } -READ8_MEMBER( msx_state::msx_sec_slot_r ) +uint8_t msx_state::msx_sec_slot_r() { int slot = m_primary_slot >> 6; @@ -465,7 +465,7 @@ READ8_MEMBER( msx_state::msx_sec_slot_r ) } } -READ8_MEMBER( msx_state::msx_kanji_r ) +uint8_t msx_state::msx_kanji_r(offs_t offset) { uint8_t result = 0xff; @@ -480,7 +480,7 @@ READ8_MEMBER( msx_state::msx_kanji_r ) return result; } -WRITE8_MEMBER( msx_state::msx_kanji_w ) +void msx_state::msx_kanji_w(offs_t offset, uint8_t data) { if (offset) m_kanji_latch = (m_kanji_latch & 0x007E0) | ((data & 0x3f) << 11); @@ -488,7 +488,7 @@ WRITE8_MEMBER( msx_state::msx_kanji_w ) m_kanji_latch = (m_kanji_latch & 0x1f800) | ((data & 0x3f) << 5); } -READ8_MEMBER( msx2_state::msx_switched_r ) +uint8_t msx2_state::msx_switched_r(offs_t offset) { uint8_t data = 0xff; @@ -500,7 +500,7 @@ READ8_MEMBER( msx2_state::msx_switched_r ) return data; } -WRITE8_MEMBER( msx2_state::msx_switched_w ) +void msx2_state::msx_switched_w(offs_t offset, uint8_t data) { for (int i = 0; i < m_switched.size(); i++) { diff --git a/src/mame/machine/mtx.cpp b/src/mame/machine/mtx.cpp index 20134257f89..6ad0ce4ea1f 100644 --- a/src/mame/machine/mtx.cpp +++ b/src/mame/machine/mtx.cpp @@ -19,7 +19,7 @@ mtx_strobe_r - centronics strobe -------------------------------------------------*/ -READ8_MEMBER(mtx_state::mtx_strobe_r) +uint8_t mtx_state::mtx_strobe_r() { /* set STROBE low */ m_centronics->write_strobe(false); @@ -40,7 +40,7 @@ READ8_MEMBER(mtx_state::mtx_strobe_r) in subpages 0 to 15. */ -WRITE8_MEMBER(mtx_state::mtx_subpage_w) +void mtx_state::mtx_subpage_w(uint8_t data) { if (m_extrom->exists()) { @@ -122,7 +122,7 @@ void mtx_state::bankswitch(uint8_t data) { /* rom based memory map */ program.install_rom(0x0000, 0x1fff, memregion("user1")->base()); - program.install_write_handler(0x0000, 0x1fff, write8_delegate(*this, FUNC(mtx_state::mtx_subpage_w))); + program.install_write_handler(0x0000, 0x1fff, write8smo_delegate(*this, FUNC(mtx_state::mtx_subpage_w))); program.install_read_bank(0x2000, 0x3fff, "rommap_bank1"); program.unmap_write(0x2000, 0x3fff); program.install_readwrite_bank(0x4000, 0x7fff, "rommap_bank2"); @@ -143,7 +143,7 @@ void mtx_state::bankswitch(uint8_t data) } } -WRITE8_MEMBER(mtx_state::mtx_bankswitch_w) +void mtx_state::mtx_bankswitch_w(uint8_t data) { bankswitch(data); } @@ -152,7 +152,7 @@ WRITE8_MEMBER(mtx_state::mtx_bankswitch_w) mtx_sound_strobe_r - sound strobe -------------------------------------------------*/ -READ8_MEMBER(mtx_state::mtx_sound_strobe_r) +uint8_t mtx_state::mtx_sound_strobe_r() { m_sn->write(m_sound_latch); return 0xff; @@ -162,7 +162,7 @@ READ8_MEMBER(mtx_state::mtx_sound_strobe_r) mtx_sound_latch_w - sound latch write -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::mtx_sound_latch_w) +void mtx_state::mtx_sound_latch_w(uint8_t data) { m_sound_latch = data; } @@ -171,7 +171,7 @@ WRITE8_MEMBER(mtx_state::mtx_sound_latch_w) mtx_cst_w - cassette write -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::mtx_cst_w) +void mtx_state::mtx_cst_w(uint8_t data) { m_cassette->output( BIT(data, 0) ? -1 : 1); } @@ -180,7 +180,7 @@ WRITE8_MEMBER(mtx_state::mtx_cst_w) mtx_cst_motor_w - cassette motor -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::mtx_cst_motor_w) +void mtx_state::mtx_cst_motor_w(uint8_t data) { /* supported in the MTX ROM */ switch (data) @@ -218,7 +218,7 @@ WRITE_LINE_MEMBER(mtx_state::write_centronics_select) m_centronics_select = state; } -READ8_MEMBER(mtx_state::mtx_prt_r) +uint8_t mtx_state::mtx_prt_r() { /* @@ -252,7 +252,7 @@ READ8_MEMBER(mtx_state::mtx_prt_r) mtx_sense_w - keyboard sense write -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::mtx_sense_w) +void mtx_state::mtx_sense_w(uint8_t data) { m_key_sense = data; } @@ -261,7 +261,7 @@ WRITE8_MEMBER(mtx_state::mtx_sense_w) mtx_key_lo_r - keyboard low read -------------------------------------------------*/ -READ8_MEMBER(mtx_state::mtx_key_lo_r) +uint8_t mtx_state::mtx_key_lo_r() { uint8_t data = 0xff; @@ -281,7 +281,7 @@ READ8_MEMBER(mtx_state::mtx_key_lo_r) mtx_key_lo_r - keyboard high read -------------------------------------------------*/ -READ8_MEMBER(mtx_state::mtx_key_hi_r) +uint8_t mtx_state::mtx_key_hi_r() { uint8_t data = ioport("country_code")->read(); @@ -301,7 +301,7 @@ READ8_MEMBER(mtx_state::mtx_key_hi_r) hrx_address_w - HRX video RAM address -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::hrx_address_w) +void mtx_state::hrx_address_w(offs_t offset, uint8_t data) { if (offset) { @@ -343,7 +343,7 @@ WRITE8_MEMBER(mtx_state::hrx_address_w) hrx_data_r - HRX data read -------------------------------------------------*/ -READ8_MEMBER(mtx_state::hrx_data_r) +uint8_t mtx_state::hrx_data_r() { return 0; } @@ -352,7 +352,7 @@ READ8_MEMBER(mtx_state::hrx_data_r) hrx_data_w - HRX data write -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::hrx_data_w) +void mtx_state::hrx_data_w(uint8_t data) { } @@ -360,7 +360,7 @@ WRITE8_MEMBER(mtx_state::hrx_data_w) hrx_attr_r - HRX attribute read -------------------------------------------------*/ -READ8_MEMBER(mtx_state::hrx_attr_r) +uint8_t mtx_state::hrx_attr_r() { return 0; } @@ -369,7 +369,7 @@ READ8_MEMBER(mtx_state::hrx_attr_r) hrx_attr_r - HRX attribute write -------------------------------------------------*/ -WRITE8_MEMBER(mtx_state::hrx_attr_w) +void mtx_state::hrx_attr_w(uint8_t data) { /* diff --git a/src/mame/machine/mz700.cpp b/src/mame/machine/mz700.cpp index 3c95d2f6386..139e3f4943b 100644 --- a/src/mame/machine/mz700.cpp +++ b/src/mame/machine/mz700.cpp @@ -90,7 +90,7 @@ void mz_state::init_mz800() void mz_state::machine_start() { /* reset memory map to defaults */ - mz700_bank_4_w(m_maincpu->space(AS_IO), 0, 0); + mz700_bank_4_w(0); } MACHINE_RESET_MEMBER( mz_state, mz700 ) @@ -118,7 +118,7 @@ MACHINE_RESET_MEMBER( mz_state, mz800 ) MMIO ***************************************************************************/ -READ8_MEMBER(mz_state::mz700_e008_r) +uint8_t mz_state::mz700_e008_r() { uint8_t data = 0; @@ -131,7 +131,7 @@ READ8_MEMBER(mz_state::mz700_e008_r) return data; } -WRITE8_MEMBER(mz_state::mz700_e008_w) +void mz_state::mz700_e008_w(uint8_t data) { m_pit->write_gate0(BIT(data, 0)); } @@ -141,7 +141,7 @@ WRITE8_MEMBER(mz_state::mz700_e008_w) BANK SWITCHING ***************************************************************************/ -READ8_MEMBER(mz_state::mz800_bank_0_r) +uint8_t mz_state::mz800_bank_0_r() { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -184,7 +184,7 @@ READ8_MEMBER(mz_state::mz800_bank_0_r) return 0xff; } -WRITE8_MEMBER(mz_state::mz700_bank_0_w) +void mz_state::mz700_bank_0_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -193,7 +193,7 @@ WRITE8_MEMBER(mz_state::mz700_bank_0_w) membank("bankr0")->set_entry(0); // ram } -WRITE8_MEMBER(mz_state::mz800_bank_0_w) +void mz_state::mz800_bank_0_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -203,7 +203,7 @@ WRITE8_MEMBER(mz_state::mz800_bank_0_w) membank("bankr0")->set_entry(0); // ram } -READ8_MEMBER(mz_state::mz800_bank_1_r) +uint8_t mz_state::mz800_bank_1_r() { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -230,7 +230,7 @@ READ8_MEMBER(mz_state::mz800_bank_1_r) return 0xff; } -WRITE8_MEMBER(mz_state::mz700_bank_1_w) +void mz_state::mz700_bank_1_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); membank("bankd")->set_entry(0); // ram @@ -268,7 +268,7 @@ WRITE8_MEMBER(mz_state::mz700_bank_1_w) } } -WRITE8_MEMBER(mz_state::mz700_bank_2_w) +void mz_state::mz700_bank_2_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -279,7 +279,7 @@ WRITE8_MEMBER(mz_state::mz700_bank_2_w) } -WRITE8_MEMBER(mz_state::mz700_bank_3_w) +void mz_state::mz700_bank_3_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -327,15 +327,15 @@ WRITE8_MEMBER(mz_state::mz700_bank_3_w) } } -WRITE8_MEMBER(mz_state::mz700_bank_4_w) +void mz_state::mz700_bank_4_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); if (m_mz700_mode) { m_mz700_ram_lock = false; /* reset lock */ - mz700_bank_2_w(space, 0, 0); /* switch in monitor rom */ - mz700_bank_3_w(space, 0, 0); /* switch in videoram, colorram, and mmio */ + mz700_bank_2_w(0); /* switch in monitor rom */ + mz700_bank_3_w(0); /* switch in videoram, colorram, and mmio */ if (!m_mz700) { @@ -395,7 +395,7 @@ WRITE8_MEMBER(mz_state::mz700_bank_4_w) } } -WRITE8_MEMBER(mz_state::mz700_bank_5_w) +void mz_state::mz700_bank_5_w(uint8_t data) { //address_space &spc = m_maincpu->space(AS_PROGRAM); @@ -419,7 +419,7 @@ WRITE8_MEMBER(mz_state::mz700_bank_5_w) } } -WRITE8_MEMBER(mz_state::mz700_bank_6_w) +void mz_state::mz700_bank_6_w(uint8_t data) { if (m_mz700_mode) { @@ -427,9 +427,9 @@ WRITE8_MEMBER(mz_state::mz700_bank_6_w) /* restore access */ if (m_mz700_ram_vram) - mz700_bank_3_w(space, 0, 0); + mz700_bank_3_w(0); else - mz700_bank_1_w(space, 0, 0); + mz700_bank_1_w(0); } else { @@ -437,9 +437,9 @@ WRITE8_MEMBER(mz_state::mz700_bank_6_w) /* restore access from 0xe000 to 0xffff */ if (m_mz800_ram_monitor) - mz700_bank_3_w(space, 0, 0); + mz700_bank_3_w(0); else - mz700_bank_1_w(space, 0, 0); + mz700_bank_1_w(0); } } @@ -603,7 +603,7 @@ void mz_state::mz800_z80pio_port_a_w(uint8_t data) } /* port CE */ -READ8_MEMBER(mz_state::mz800_crtc_r) +uint8_t mz_state::mz800_crtc_r() { uint8_t data = 0x00; LOG(1,"mz800_crtc_r",("%02X\n",data),machine()); @@ -612,7 +612,7 @@ READ8_MEMBER(mz_state::mz800_crtc_r) /* port EA */ -READ8_MEMBER(mz_state::mz800_ramdisk_r) +uint8_t mz_state::mz800_ramdisk_r() { uint8_t *mem = memregion("user1")->base(); uint8_t data = mem[m_mz800_ramaddr]; @@ -623,13 +623,13 @@ READ8_MEMBER(mz_state::mz800_ramdisk_r) } /* port CC */ -WRITE8_MEMBER(mz_state::mz800_write_format_w) +void mz_state::mz800_write_format_w(uint8_t data) { LOG(1,"mz800_write_format_w",("%02X\n", data),machine()); } /* port CD */ -WRITE8_MEMBER(mz_state::mz800_read_format_w) +void mz_state::mz800_read_format_w(uint8_t data) { LOG(1,"mz800_read_format_w",("%02X\n", data),machine()); } @@ -640,7 +640,7 @@ WRITE8_MEMBER(mz_state::mz800_read_format_w) * bit 1 1: 4bpp/2bpp 0: 2bpp/1bpp * bit 0 ??? */ -WRITE8_MEMBER(mz_state::mz800_display_mode_w) +void mz_state::mz800_display_mode_w(uint8_t data) { m_mz700_mode = BIT(data, 3); m_hires_mode = BIT(data, 2); @@ -656,13 +656,13 @@ WRITE8_MEMBER(mz_state::mz800_display_mode_w) } /* port CF */ -WRITE8_MEMBER(mz_state::mz800_scroll_border_w) +void mz_state::mz800_scroll_border_w(uint8_t data) { LOG(1,"mz800_scroll_border_w",("%02X\n", data),machine()); } /* port EA */ -WRITE8_MEMBER(mz_state::mz800_ramdisk_w) +void mz_state::mz800_ramdisk_w(uint8_t data) { uint8_t *mem = memregion("user1")->base(); LOG(2,"mz800_ramdisk_w",("[%04X] <- %02X\n", m_mz800_ramaddr, data),machine()); @@ -672,14 +672,14 @@ WRITE8_MEMBER(mz_state::mz800_ramdisk_w) } /* port EB */ -WRITE8_MEMBER(mz_state::mz800_ramaddr_w) +void mz_state::mz800_ramaddr_w(uint8_t data) { m_mz800_ramaddr = (m_maincpu->state_int(Z80_BC) & 0xff00) | (data & 0xff); LOG(1,"mz800_ramaddr_w",("%04X\n", m_mz800_ramaddr),machine()); } /* port F0 */ -WRITE8_MEMBER(mz_state::mz800_palette_w) +void mz_state::mz800_palette_w(uint8_t data) { if (data & 0x40) { diff --git a/src/mame/machine/mz80.cpp b/src/mame/machine/mz80.cpp index 79d6c6ee321..d1a5a42c174 100644 --- a/src/mame/machine/mz80.cpp +++ b/src/mame/machine/mz80.cpp @@ -75,12 +75,12 @@ WRITE_LINE_MEMBER( mz80_state::pit_out2_changed ) m_maincpu->set_input_line(0, HOLD_LINE); } -READ8_MEMBER( mz80_state::mz80k_strobe_r ) +uint8_t mz80_state::mz80k_strobe_r() { return 0x7e | (uint8_t)m_mz80k_tempo_strobe; } -WRITE8_MEMBER( mz80_state::mz80k_strobe_w ) +void mz80_state::mz80k_strobe_w(uint8_t data) { m_pit->write_gate0(BIT(data, 0)); } diff --git a/src/mame/machine/n64.cpp b/src/mame/machine/n64.cpp index fa4b914a61a..295e17878a0 100644 --- a/src/mame/machine/n64.cpp +++ b/src/mame/machine/n64.cpp @@ -307,7 +307,7 @@ void n64_periphs::device_reset() #define MI_MODE_EBUS 0x0100 /* Bit 8: ebus test mode */ #define MI_MODE_RDRAM 0x0200 /* Bit 9: RDRAM reg mode */ -READ32_MEMBER( n64_periphs::mi_reg_r ) +uint32_t n64_periphs::mi_reg_r(offs_t offset, uint32_t mem_mask) { uint32_t ret = 0; switch (offset) @@ -336,7 +336,7 @@ READ32_MEMBER( n64_periphs::mi_reg_r ) return ret; } -WRITE32_MEMBER( n64_periphs::mi_reg_w ) +void n64_periphs::mi_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -445,7 +445,7 @@ void n64_periphs::clear_rcp_interrupt(int interrupt) check_interrupts(); } -READ32_MEMBER( n64_periphs::is64_r ) +uint32_t n64_periphs::is64_r(offs_t offset) { switch(offset) { @@ -469,7 +469,7 @@ READ32_MEMBER( n64_periphs::is64_r ) } } -WRITE32_MEMBER( n64_periphs::is64_w ) +void n64_periphs::is64_w(offs_t offset, uint32_t data) { int i = 0; @@ -495,14 +495,14 @@ WRITE32_MEMBER( n64_periphs::is64_w ) } } -READ32_MEMBER( n64_periphs::open_r ) +uint32_t n64_periphs::open_r(offs_t offset) { uint32_t retval = (offset << 2) & 0x0000ffff; retval = ((retval + 2) << 16) | retval; return retval; } -WRITE32_MEMBER( n64_periphs::open_w ) +void n64_periphs::open_w(uint32_t data) { // Do nothing } @@ -520,7 +520,7 @@ WRITE32_MEMBER( n64_periphs::open_w ) #define RDRAM_ADDR_SELECT (8) #define RDRAM_DEVICE_MANUF (9) -READ32_MEMBER( n64_periphs::rdram_reg_r ) +uint32_t n64_periphs::rdram_reg_r(offs_t offset, uint32_t mem_mask) { if(offset > 0x24/4) { @@ -530,7 +530,7 @@ READ32_MEMBER( n64_periphs::rdram_reg_r ) return rdram_regs[offset]; } -WRITE32_MEMBER( n64_periphs::rdram_reg_w ) +void n64_periphs::rdram_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if(offset > 0x24/4) { @@ -1028,7 +1028,7 @@ void n64_periphs::vi_recalculate_resolution() screen().configure((vi_hsync & 0x00000fff)>>2, (vi_vsync & 0x00000fff), visarea, period); } -READ32_MEMBER( n64_periphs::vi_reg_r ) +uint32_t n64_periphs::vi_reg_r(offs_t offset, uint32_t mem_mask) { uint32_t ret = 0; switch (offset) @@ -1097,7 +1097,7 @@ READ32_MEMBER( n64_periphs::vi_reg_r ) return ret; } -WRITE32_MEMBER( n64_periphs::vi_reg_w ) +void n64_periphs::vi_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { //n64_state *state = machine().driver_data(); @@ -1307,7 +1307,7 @@ void n64_periphs::ai_timer_tick() } } -READ32_MEMBER( n64_periphs::ai_reg_r ) +uint32_t n64_periphs::ai_reg_r(offs_t offset, uint32_t mem_mask) { uint32_t ret = 0; switch (offset) @@ -1343,7 +1343,7 @@ READ32_MEMBER( n64_periphs::ai_reg_r ) return ret; } -WRITE32_MEMBER( n64_periphs::ai_reg_w ) +void n64_periphs::ai_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -1476,7 +1476,7 @@ void n64_periphs::pi_dma_tick() pi_dma_timer->adjust(attotime::never); } -READ32_MEMBER( n64_periphs::pi_reg_r ) +uint32_t n64_periphs::pi_reg_r(offs_t offset, uint32_t mem_mask) { uint32_t ret = 0; switch (offset) @@ -1533,7 +1533,7 @@ READ32_MEMBER( n64_periphs::pi_reg_r ) return ret; } -WRITE32_MEMBER( n64_periphs::pi_reg_w ) +void n64_periphs::pi_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -1639,7 +1639,7 @@ WRITE32_MEMBER( n64_periphs::pi_reg_w ) // RDRAM Interface -READ32_MEMBER( n64_periphs::ri_reg_r ) +uint32_t n64_periphs::ri_reg_r(offs_t offset, uint32_t mem_mask) { if(offset == 0x0C/4) // RI_SELECT { @@ -1663,7 +1663,7 @@ READ32_MEMBER( n64_periphs::ri_reg_r ) return ri_regs[offset]; } -WRITE32_MEMBER( n64_periphs::ri_reg_w ) +void n64_periphs::ri_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if(offset > 0x1c/4) { @@ -2145,7 +2145,7 @@ void n64_periphs::pif_dma(int direction) } } -READ32_MEMBER( n64_periphs::si_reg_r ) +uint32_t n64_periphs::si_reg_r(offs_t offset) { uint32_t ret = 0; switch (offset) @@ -2160,7 +2160,7 @@ READ32_MEMBER( n64_periphs::si_reg_r ) return ret; } -WRITE32_MEMBER( n64_periphs::si_reg_w ) +void n64_periphs::si_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -2397,7 +2397,7 @@ void n64_periphs::dd_read_C2() return; } -READ32_MEMBER( n64_periphs::dd_reg_r ) +uint32_t n64_periphs::dd_reg_r(offs_t offset) { if(offset < 0x400/4) { @@ -2473,7 +2473,7 @@ READ32_MEMBER( n64_periphs::dd_reg_r ) return ret; } -WRITE32_MEMBER( n64_periphs::dd_reg_w ) +void n64_periphs::dd_reg_w(offs_t offset, uint32_t data, uint32_t mem_mask) { //logerror("dd_reg_w: %08X, %08X, %08X\n", data, offset << 2, mem_mask); @@ -2679,7 +2679,7 @@ WRITE32_MEMBER( n64_periphs::dd_reg_w ) } } -READ32_MEMBER( n64_periphs::pif_ram_r ) +uint32_t n64_periphs::pif_ram_r(offs_t offset, uint32_t mem_mask) { if(!machine().side_effects_disabled()) { @@ -2695,7 +2695,7 @@ READ32_MEMBER( n64_periphs::pif_ram_r ) return ( ( pif_ram[offset*4+0] << 24 ) | ( pif_ram[offset*4+1] << 16 ) | ( pif_ram[offset*4+2] << 8 ) | ( pif_ram[offset*4+3] << 0 ) ) & mem_mask; } -WRITE32_MEMBER( n64_periphs::pif_ram_w ) +void n64_periphs::pif_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if( ACCESSING_BITS_24_31 ) { diff --git a/src/mame/machine/namco_c139.cpp b/src/mame/machine/namco_c139.cpp index 447c37346f4..882b1fb3bc3 100644 --- a/src/mame/machine/namco_c139.cpp +++ b/src/mame/machine/namco_c139.cpp @@ -92,17 +92,17 @@ device_memory_interface::space_config_vector namco_c139_device::memory_space_con // READ/WRITE HANDLERS //************************************************************************** -READ16_MEMBER(namco_c139_device::ram_r) +uint16_t namco_c139_device::ram_r(offs_t offset) { return m_ram[offset]; } -WRITE16_MEMBER(namco_c139_device::ram_w) +void namco_c139_device::ram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_ram[offset]); } -READ16_MEMBER(namco_c139_device::status_r) +uint16_t namco_c139_device::status_r() { /* x-- RX READY or irq pending? diff --git a/src/mame/machine/namco_c139.h b/src/mame/machine/namco_c139.h index 23cef740766..025f49b572c 100644 --- a/src/mame/machine/namco_c139.h +++ b/src/mame/machine/namco_c139.h @@ -33,10 +33,10 @@ public: // I/O operations void regs_map(address_map &map); - DECLARE_READ16_MEMBER(status_r); + uint16_t status_r(); - DECLARE_READ16_MEMBER(ram_r); - DECLARE_WRITE16_MEMBER(ram_w); + uint16_t ram_r(offs_t offset); + void ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void data_map(address_map &map); protected: diff --git a/src/mame/machine/namco_c148.cpp b/src/mame/machine/namco_c148.cpp index 946c0757cf2..047dd52a975 100644 --- a/src/mame/machine/namco_c148.cpp +++ b/src/mame/machine/namco_c148.cpp @@ -147,11 +147,11 @@ void namco_c148_device::device_reset() // IRQ section //************************************************************************** -READ8_MEMBER( namco_c148_device::pos_irq_level_r ) { return m_irqlevel.pos & 7; } -READ8_MEMBER( namco_c148_device::vblank_irq_level_r ) { return m_irqlevel.vblank & 7; } -READ8_MEMBER( namco_c148_device::cpu_irq_level_r ) { return m_irqlevel.cpu & 7; } -READ8_MEMBER( namco_c148_device::ex_irq_level_r ) { return m_irqlevel.ex & 7; } -READ8_MEMBER( namco_c148_device::sci_irq_level_r ) { return m_irqlevel.sci & 7; } +uint8_t namco_c148_device::pos_irq_level_r() { return m_irqlevel.pos & 7; } +uint8_t namco_c148_device::vblank_irq_level_r() { return m_irqlevel.vblank & 7; } +uint8_t namco_c148_device::cpu_irq_level_r() { return m_irqlevel.cpu & 7; } +uint8_t namco_c148_device::ex_irq_level_r() { return m_irqlevel.ex & 7; } +uint8_t namco_c148_device::sci_irq_level_r() { return m_irqlevel.sci & 7; } inline void namco_c148_device::flush_irq_acks() { @@ -162,56 +162,56 @@ inline void namco_c148_device::flush_irq_acks() m_hostcpu->set_input_line(i,CLEAR_LINE); } -WRITE8_MEMBER( namco_c148_device::pos_irq_level_w ) { m_irqlevel.pos = data & 7; flush_irq_acks(); if(data != 0) { LOG("%s: pos IRQ level = %02x\n",data); } } -WRITE8_MEMBER( namco_c148_device::vblank_irq_level_w ) { m_irqlevel.vblank = data & 7; flush_irq_acks(); LOG("%s: vblank IRQ level = %02x\n",data); } -WRITE8_MEMBER( namco_c148_device::cpu_irq_level_w ) { m_irqlevel.cpu = data & 7; flush_irq_acks(); LOG("%s: cpu IRQ level = %02x\n",data); } -WRITE8_MEMBER( namco_c148_device::ex_irq_level_w ) { m_irqlevel.ex = data & 7; flush_irq_acks(); LOG("%s: ex IRQ level = %02x\n",data); } -WRITE8_MEMBER( namco_c148_device::sci_irq_level_w ) { m_irqlevel.sci = data & 7; flush_irq_acks(); LOG("%s: sci IRQ level = %02x\n",data); } +void namco_c148_device::pos_irq_level_w(uint8_t data) { m_irqlevel.pos = data & 7; flush_irq_acks(); if(data != 0) { LOG("%s: pos IRQ level = %02x\n",data); } } +void namco_c148_device::vblank_irq_level_w(uint8_t data) { m_irqlevel.vblank = data & 7; flush_irq_acks(); LOG("%s: vblank IRQ level = %02x\n",data); } +void namco_c148_device::cpu_irq_level_w(uint8_t data) { m_irqlevel.cpu = data & 7; flush_irq_acks(); LOG("%s: cpu IRQ level = %02x\n",data); } +void namco_c148_device::ex_irq_level_w(uint8_t data) { m_irqlevel.ex = data & 7; flush_irq_acks(); LOG("%s: ex IRQ level = %02x\n",data); } +void namco_c148_device::sci_irq_level_w(uint8_t data) { m_irqlevel.sci = data & 7; flush_irq_acks(); LOG("%s: sci IRQ level = %02x\n",data); } -READ16_MEMBER( namco_c148_device::vblank_irq_ack_r ) { m_hostcpu->set_input_line(m_irqlevel.vblank, CLEAR_LINE); return 0; } -READ16_MEMBER( namco_c148_device::pos_irq_ack_r ) { m_hostcpu->set_input_line(m_irqlevel.pos, CLEAR_LINE); return 0; } -READ16_MEMBER( namco_c148_device::cpu_irq_ack_r ) { m_hostcpu->set_input_line(m_irqlevel.cpu, CLEAR_LINE); return 0; } -READ16_MEMBER( namco_c148_device::ex_irq_ack_r ) { m_hostcpu->set_input_line(m_irqlevel.ex, CLEAR_LINE); return 0; } -READ16_MEMBER( namco_c148_device::sci_irq_ack_r ) { m_hostcpu->set_input_line(m_irqlevel.sci, CLEAR_LINE); return 0; } +uint16_t namco_c148_device::vblank_irq_ack_r() { m_hostcpu->set_input_line(m_irqlevel.vblank, CLEAR_LINE); return 0; } +uint16_t namco_c148_device::pos_irq_ack_r() { m_hostcpu->set_input_line(m_irqlevel.pos, CLEAR_LINE); return 0; } +uint16_t namco_c148_device::cpu_irq_ack_r() { m_hostcpu->set_input_line(m_irqlevel.cpu, CLEAR_LINE); return 0; } +uint16_t namco_c148_device::ex_irq_ack_r() { m_hostcpu->set_input_line(m_irqlevel.ex, CLEAR_LINE); return 0; } +uint16_t namco_c148_device::sci_irq_ack_r() { m_hostcpu->set_input_line(m_irqlevel.sci, CLEAR_LINE); return 0; } -WRITE16_MEMBER( namco_c148_device::vblank_irq_ack_w ) { m_hostcpu->set_input_line(m_irqlevel.vblank, CLEAR_LINE); } -WRITE16_MEMBER( namco_c148_device::pos_irq_ack_w ) { m_hostcpu->set_input_line(m_irqlevel.pos, CLEAR_LINE); } -WRITE16_MEMBER( namco_c148_device::cpu_irq_ack_w ) { m_hostcpu->set_input_line(m_irqlevel.cpu, CLEAR_LINE); } -WRITE16_MEMBER( namco_c148_device::ex_irq_ack_w ) { m_hostcpu->set_input_line(m_irqlevel.ex, CLEAR_LINE); } -WRITE16_MEMBER( namco_c148_device::sci_irq_ack_w ) { m_hostcpu->set_input_line(m_irqlevel.sci, CLEAR_LINE); } +void namco_c148_device::vblank_irq_ack_w(uint16_t data) { m_hostcpu->set_input_line(m_irqlevel.vblank, CLEAR_LINE); } +void namco_c148_device::pos_irq_ack_w(uint16_t data) { m_hostcpu->set_input_line(m_irqlevel.pos, CLEAR_LINE); } +void namco_c148_device::cpu_irq_ack_w(uint16_t data) { m_hostcpu->set_input_line(m_irqlevel.cpu, CLEAR_LINE); } +void namco_c148_device::ex_irq_ack_w(uint16_t data) { m_hostcpu->set_input_line(m_irqlevel.ex, CLEAR_LINE); } +void namco_c148_device::sci_irq_ack_w(uint16_t data) { m_hostcpu->set_input_line(m_irqlevel.sci, CLEAR_LINE); } //************************************************************************** // Comm ports //************************************************************************** -READ8_MEMBER( namco_c148_device::ext_r ) +uint8_t namco_c148_device::ext_r() { return 0xff; // TODO: bit 0 EEPROM bit ready } -WRITE8_MEMBER( namco_c148_device::ext1_w ) +void namco_c148_device::ext1_w(uint8_t data) { m_out_ext1_cb(data & 7); } -WRITE8_MEMBER( namco_c148_device::ext2_w ) +void namco_c148_device::ext2_w(uint8_t data) { m_out_ext2_cb(data & 7); // TODO: bit 1/2 in Winning Run GPU might be irq enable? } -READ8_MEMBER( namco_c148_device::bus_ctrl_r ) +uint8_t namco_c148_device::bus_ctrl_r() { return m_bus_reg; } -WRITE8_MEMBER( namco_c148_device::bus_ctrl_w ) +void namco_c148_device::bus_ctrl_w(uint8_t data) { m_bus_reg = data & 7; } -WRITE16_MEMBER( namco_c148_device::cpu_irq_assert_w) +void namco_c148_device::cpu_irq_assert_w(uint16_t data) { // TODO: Starblade relies on this for showing large polygons, is it the right place? m_linked_c148->cpu_irq_trigger(); @@ -248,13 +248,13 @@ void namco_c148_device::sci_irq_trigger() } // TODO: these doesn't belong here, needs C116 device -READ8_MEMBER( namco_c148_device::ext_posirq_line_r ) +uint8_t namco_c148_device::ext_posirq_line_r() { // TODO: same as regular register? winrun91 reads here and subs with integer 0x39 for a new posirq that never gets triggered. return (m_posirq_line) & 0xff; } -WRITE8_MEMBER( namco_c148_device::ext_posirq_line_w ) +void namco_c148_device::ext_posirq_line_w(uint8_t data) { m_posirq_line = data; } diff --git a/src/mame/machine/namco_c148.h b/src/mame/machine/namco_c148.h index 706782723c4..0cd79c3e08e 100644 --- a/src/mame/machine/namco_c148.h +++ b/src/mame/machine/namco_c148.h @@ -42,41 +42,41 @@ public: auto out_ext1_callback() { return m_out_ext1_cb.bind(); } auto out_ext2_callback() { return m_out_ext2_cb.bind(); } - DECLARE_READ8_MEMBER( vblank_irq_level_r ); - DECLARE_WRITE8_MEMBER( vblank_irq_level_w ); - DECLARE_READ16_MEMBER( vblank_irq_ack_r ); - DECLARE_WRITE16_MEMBER( vblank_irq_ack_w ); - - DECLARE_READ8_MEMBER( pos_irq_level_r ); - DECLARE_WRITE8_MEMBER( pos_irq_level_w ); - DECLARE_READ16_MEMBER( pos_irq_ack_r ); - DECLARE_WRITE16_MEMBER( pos_irq_ack_w ); - - DECLARE_READ8_MEMBER( cpu_irq_level_r ); - DECLARE_WRITE8_MEMBER( cpu_irq_level_w ); - DECLARE_READ16_MEMBER( cpu_irq_ack_r ); - DECLARE_WRITE16_MEMBER( cpu_irq_ack_w ); - - DECLARE_READ8_MEMBER( ex_irq_level_r ); - DECLARE_WRITE8_MEMBER( ex_irq_level_w ); - DECLARE_READ16_MEMBER( ex_irq_ack_r ); - DECLARE_WRITE16_MEMBER( ex_irq_ack_w ); - - DECLARE_READ8_MEMBER( sci_irq_level_r ); - DECLARE_WRITE8_MEMBER( sci_irq_level_w ); - DECLARE_READ16_MEMBER( sci_irq_ack_r ); - DECLARE_WRITE16_MEMBER( sci_irq_ack_w ); - - DECLARE_READ8_MEMBER( ext_posirq_line_r ); - DECLARE_WRITE8_MEMBER( ext_posirq_line_w ); - DECLARE_WRITE16_MEMBER( cpu_irq_assert_w ); - - DECLARE_READ8_MEMBER( bus_ctrl_r ); - DECLARE_WRITE8_MEMBER( bus_ctrl_w ); - - DECLARE_READ8_MEMBER( ext_r ); - DECLARE_WRITE8_MEMBER( ext1_w ); - DECLARE_WRITE8_MEMBER( ext2_w ); + uint8_t vblank_irq_level_r(); + void vblank_irq_level_w(uint8_t data); + uint16_t vblank_irq_ack_r(); + void vblank_irq_ack_w(uint16_t data); + + uint8_t pos_irq_level_r(); + void pos_irq_level_w(uint8_t data); + uint16_t pos_irq_ack_r(); + void pos_irq_ack_w(uint16_t data); + + uint8_t cpu_irq_level_r(); + void cpu_irq_level_w(uint8_t data); + uint16_t cpu_irq_ack_r(); + void cpu_irq_ack_w(uint16_t data); + + uint8_t ex_irq_level_r(); + void ex_irq_level_w(uint8_t data); + uint16_t ex_irq_ack_r(); + void ex_irq_ack_w(uint16_t data); + + uint8_t sci_irq_level_r(); + void sci_irq_level_w(uint8_t data); + uint16_t sci_irq_ack_r(); + void sci_irq_ack_w(uint16_t data); + + uint8_t ext_posirq_line_r(); + void ext_posirq_line_w(uint8_t data); + void cpu_irq_assert_w(uint16_t data); + + uint8_t bus_ctrl_r(); + void bus_ctrl_w(uint8_t data); + + uint8_t ext_r(); + void ext1_w(uint8_t data); + void ext2_w(uint8_t data); void vblank_irq_trigger(); void pos_irq_trigger(); void ex_irq_trigger(); diff --git a/src/mame/machine/namcond1.cpp b/src/mame/machine/namcond1.cpp index beb0577b640..ddedeec6cf7 100644 --- a/src/mame/machine/namcond1.cpp +++ b/src/mame/machine/namcond1.cpp @@ -52,7 +52,7 @@ void namcond1_state::machine_reset() } // $c3ff00-$c3ffff -READ16_MEMBER(namcond1_state::cuskey_r) +uint16_t namcond1_state::cuskey_r(offs_t offset) { switch( offset ) { @@ -70,7 +70,7 @@ READ16_MEMBER(namcond1_state::cuskey_r) } } -WRITE16_MEMBER(namcond1_state::cuskey_w) +void namcond1_state::cuskey_w(offs_t offset, uint16_t data) { switch( offset ) { diff --git a/src/mame/machine/namcos2.cpp b/src/mame/machine/namcos2.cpp index 5d65e284dfa..d57038a5e8d 100644 --- a/src/mame/machine/namcos2.cpp +++ b/src/mame/machine/namcos2.cpp @@ -4,7 +4,7 @@ Namco System II - machine.c + namcos2.cpp Functions to emulate general aspects of the machine (RAM, ROM, interrupts, I/O ports) @@ -20,7 +20,7 @@ Namco System II -READ16_MEMBER( namcos2_state::namcos2_finallap_prot_r ) +uint16_t namcos2_state::namcos2_finallap_prot_r(offs_t offset) { static const uint16_t table0[8] = { 0x0000,0x0040,0x0440,0x2440,0x2480,0xa080,0x8081,0x8041 }; static const uint16_t table1[8] = { 0x0040,0x0060,0x0060,0x0860,0x0864,0x08e4,0x08e5,0x08a5 }; @@ -141,12 +141,12 @@ void namcos2_state::system_reset_w(uint8_t data) /* EEPROM Load/Save and read/write handling */ /*************************************************************/ -WRITE8_MEMBER( namcos2_state::eeprom_w ) +void namcos2_state::eeprom_w(offs_t offset, uint8_t data) { m_eeprom[offset] = data; } -READ8_MEMBER( namcos2_state::eeprom_r ) +uint8_t namcos2_state::eeprom_r(offs_t offset) { return m_eeprom[offset]; } @@ -186,7 +186,7 @@ suzuk8h2 1993 sws93 1993 334 $014e *************************************************************/ -READ16_MEMBER( namcos2_state::namcos2_68k_key_r ) +uint16_t namcos2_state::namcos2_68k_key_r(offs_t offset) { switch (m_gametype) { @@ -358,7 +358,7 @@ READ16_MEMBER( namcos2_state::namcos2_68k_key_r ) return machine().rand()&0xffff; } -WRITE16_MEMBER( namcos2_state::namcos2_68k_key_w ) +void namcos2_state::namcos2_68k_key_w(offs_t offset, uint16_t data) { int gametype = m_gametype; if( gametype == NAMCOS2_MARVEL_LAND && offset == 5 ) @@ -393,12 +393,12 @@ WRITE16_MEMBER( namcos2_state::namcos2_68k_key_w ) /* Sound sub-system */ /**************************************************************/ -WRITE8_MEMBER( namcos2_state::sound_bankselect_w ) +void namcos2_state::sound_bankselect_w(uint8_t data) { m_audiobank->set_entry(data>>4); } -READ16_MEMBER( namcos2_state::c140_rom_r ) +uint16_t namcos2_state::c140_rom_r(offs_t offset) { /* Verified from schematics: diff --git a/src/mame/machine/namcos21_dsp.cpp b/src/mame/machine/namcos21_dsp.cpp index 45cba87d1b5..1fe3977f912 100644 --- a/src/mame/machine/namcos21_dsp.cpp +++ b/src/mame/machine/namcos21_dsp.cpp @@ -48,20 +48,20 @@ void namcos21_dsp_device::device_reset() } -READ16_MEMBER(namcos21_dsp_device::winrun_dspcomram_r) +uint16_t namcos21_dsp_device::winrun_dspcomram_r(offs_t offset) { int bank = 1-(m_winrun_dspcomram_control[0x4/2]&1); uint16_t *mem = &m_winrun_dspcomram[0x1000*bank]; return mem[offset]; } -WRITE16_MEMBER(namcos21_dsp_device::winrun_dspcomram_w) +void namcos21_dsp_device::winrun_dspcomram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int bank = 1-(m_winrun_dspcomram_control[0x4/2]&1); uint16_t *mem = &m_winrun_dspcomram[0x1000*bank]; COMBINE_DATA( &mem[offset] ); } -READ16_MEMBER(namcos21_dsp_device::winrun_cuskey_r) +uint16_t namcos21_dsp_device::winrun_cuskey_r() { int pc = m_dsp->pc(); switch( pc ) @@ -82,7 +82,7 @@ READ16_MEMBER(namcos21_dsp_device::winrun_cuskey_r) return 0; } -WRITE16_MEMBER(namcos21_dsp_device::winrun_cuskey_w) +void namcos21_dsp_device::winrun_cuskey_w(uint16_t data) { } @@ -136,7 +136,7 @@ uint16_t namcos21_dsp_device::winrun_poly_reset_r() return 0; } -WRITE16_MEMBER(namcos21_dsp_device::winrun_dsp_render_w) +void namcos21_dsp_device::winrun_dsp_render_w(uint16_t data) { if( m_winrun_poly_index void set_renderer_tag(T &&tag) { m_renderer.set_tag(std::forward(tag)); } - DECLARE_WRITE16_MEMBER(winrun_dspbios_w); - DECLARE_READ16_MEMBER(winrun_68k_dspcomram_r); - DECLARE_WRITE16_MEMBER(winrun_68k_dspcomram_w); - DECLARE_READ16_MEMBER(winrun_dspcomram_control_r); - DECLARE_WRITE16_MEMBER(winrun_dspcomram_control_w); + void winrun_dspbios_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t winrun_68k_dspcomram_r(offs_t offset); + void winrun_68k_dspcomram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t winrun_dspcomram_control_r(offs_t offset); + void winrun_dspcomram_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_WRITE16_MEMBER(pointram_control_w); - DECLARE_READ16_MEMBER(pointram_data_r); - DECLARE_WRITE16_MEMBER(pointram_data_w); + void pointram_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t pointram_data_r(); + void pointram_data_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); protected: // device-level overrides @@ -64,16 +64,16 @@ private: int m_poly_frame_width; int m_poly_frame_height; - DECLARE_READ16_MEMBER(winrun_cuskey_r); - DECLARE_WRITE16_MEMBER(winrun_cuskey_w); - DECLARE_READ16_MEMBER(winrun_dspcomram_r); - DECLARE_WRITE16_MEMBER(winrun_dspcomram_w); - DECLARE_READ16_MEMBER(winrun_table_r); - DECLARE_WRITE16_MEMBER(winrun_dsp_complete_w); - DECLARE_WRITE16_MEMBER(winrun_dsp_render_w); + uint16_t winrun_cuskey_r(); + void winrun_cuskey_w(uint16_t data); + uint16_t winrun_dspcomram_r(offs_t offset); + void winrun_dspcomram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t winrun_table_r(offs_t offset); + void winrun_dsp_complete_w(uint16_t data); + void winrun_dsp_render_w(uint16_t data); uint16_t winrun_poly_reset_r(); - DECLARE_WRITE16_MEMBER(winrun_dsp_pointrom_addr_w); - DECLARE_READ16_MEMBER(winrun_dsp_pointrom_data_r); + void winrun_dsp_pointrom_addr_w(offs_t offset, uint16_t data); + uint16_t winrun_dsp_pointrom_data_r(); TIMER_CALLBACK_MEMBER(suspend_callback); emu_timer *m_suspend_timer; diff --git a/src/mame/machine/namcos21_dsp_c67.cpp b/src/mame/machine/namcos21_dsp_c67.cpp index 93e407ec1fc..424193383e9 100644 --- a/src/mame/machine/namcos21_dsp_c67.cpp +++ b/src/mame/machine/namcos21_dsp_c67.cpp @@ -131,11 +131,11 @@ void namcos21_dsp_c67_device::device_add_mconfig(machine_config &config) } -WRITE16_MEMBER(namcos21_dsp_c67_device::dspcuskey_w) +void namcos21_dsp_c67_device::dspcuskey_w(uint16_t data) { /* TODO: proper cuskey emulation */ } -READ16_MEMBER(namcos21_dsp_c67_device::dspcuskey_r) +uint16_t namcos21_dsp_c67_device::dspcuskey_r() { uint16_t result = 0; if( m_gametype == NAMCOS21_SOLVALOU ) @@ -349,12 +349,12 @@ uint16_t namcos21_dsp_c67_device::get_input_bytes_advertised_for_slave() return m_mpDspState->slaveBytesAdvertised; } -READ16_MEMBER(namcos21_dsp_c67_device::dspram16_r) +uint16_t namcos21_dsp_c67_device::dspram16_r(offs_t offset) { return m_dspram16[offset]; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dspram16_hack_w) +void namcos21_dsp_c67_device::dspram16_hack_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dspram16[offset]); @@ -370,7 +370,7 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::dspram16_hack_w) } } -WRITE16_MEMBER(namcos21_dsp_c67_device::dspram16_w) +void namcos21_dsp_c67_device::dspram16_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dspram16[offset]); @@ -389,7 +389,7 @@ int32_t namcos21_dsp_c67_device::read_pointrom_data(unsigned offset) } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_port0_r) +uint16_t namcos21_dsp_c67_device::dsp_port0_r() { int32_t data = read_pointrom_data(m_pointrom_idx++); m_mPointRomMSB = (uint8_t)(data>>16); @@ -397,12 +397,12 @@ READ16_MEMBER(namcos21_dsp_c67_device::dsp_port0_r) return (uint16_t)data; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port0_w) +void namcos21_dsp_c67_device::dsp_port0_w(uint16_t data) { /* unused? */ if (ENABLE_LOGGING) logerror( "PTRAM_LO(0x%04x)\n", data ); } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_port1_r) +uint16_t namcos21_dsp_c67_device::dsp_port1_r() { if( m_mbPointRomDataAvailable ) { @@ -412,45 +412,45 @@ READ16_MEMBER(namcos21_dsp_c67_device::dsp_port1_r) return 0x8000; /* IDC ack? */ } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port1_w) +void namcos21_dsp_c67_device::dsp_port1_w(uint16_t data) { /* unused? */ if (ENABLE_LOGGING) logerror( "PTRAM_HI(0x%04x)\n", data ); } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_port2_r) +uint16_t namcos21_dsp_c67_device::dsp_port2_r() { /* IDC TRANSMIT ENABLE? */ return 0; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port2_w) +void namcos21_dsp_c67_device::dsp_port2_w(uint16_t data) { if (ENABLE_LOGGING) logerror( "IDC ADDR INIT(0x%04x)\n", data ); m_mpDspState->masterSourceAddr = data; transfer_dsp_data(); } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_port3_idc_rcv_enable_r) +uint16_t namcos21_dsp_c67_device::dsp_port3_idc_rcv_enable_r() { /* IDC RECEIVE ENABLE? */ return 0; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port3_w) +void namcos21_dsp_c67_device::dsp_port3_w(uint16_t data) { m_pointrom_idx<<=16; m_pointrom_idx|=data; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port4_w) +void namcos21_dsp_c67_device::dsp_port4_w(uint16_t data) { /* receives $0B<<4 prior to IDC setup */ } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_port8_r) +uint16_t namcos21_dsp_c67_device::dsp_port8_r() { /* SMU status */ return 1; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port8_w) +void namcos21_dsp_c67_device::dsp_port8_w(uint16_t data) { if (ENABLE_LOGGING) logerror( "port8_w(%d)\n", data ); if( data ) @@ -460,17 +460,17 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_port8_w) m_irq_enable = data; } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_port9_r) +uint16_t namcos21_dsp_c67_device::dsp_port9_r() { /* render-device-busy; used for direct-draw */ return 0; } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_porta_r) +uint16_t namcos21_dsp_c67_device::dsp_porta_r() { /* config */ return 0; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_porta_w) +void namcos21_dsp_c67_device::dsp_porta_w(uint16_t data) { /* boot: 1 */ /* IRQ0 end: 0 */ @@ -480,12 +480,12 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_porta_w) // if (ENABLE_LOGGING) logerror( "dsp_porta_w(0x%04x)\n", data ); } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_portb_r) +uint16_t namcos21_dsp_c67_device::dsp_portb_r() { /* config */ return 1; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_portb_w) +void namcos21_dsp_c67_device::dsp_portb_w(uint16_t data) { if( data==0 ) { /* only 0->1 transition triggers */ @@ -518,7 +518,7 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_portb_w) m_mpDspState->masterDirectDrawSize = 0; } -WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_portc_w) +void namcos21_dsp_c67_device::dsp_portc_w(uint16_t data) { if( m_mpDspState->masterDirectDrawSize < DSP_BUF_MAX ) { @@ -530,7 +530,7 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::dsp_portc_w) } } -READ16_MEMBER(namcos21_dsp_c67_device::dsp_portf_r) +uint16_t namcos21_dsp_c67_device::dsp_portf_r() { /* informs BIOS that this is Master DSP */ return 0; } @@ -627,22 +627,22 @@ void namcos21_dsp_c67_device::render_slave_output(uint16_t data) } } -READ16_MEMBER(namcos21_dsp_c67_device::slave_port0_r) +uint16_t namcos21_dsp_c67_device::slave_port0_r() { return read_word_from_slave_input(); } -WRITE16_MEMBER(namcos21_dsp_c67_device::slave_port0_w) +void namcos21_dsp_c67_device::slave_port0_w(uint16_t data) { render_slave_output(data); } -READ16_MEMBER(namcos21_dsp_c67_device::slave_port2_r) +uint16_t namcos21_dsp_c67_device::slave_port2_r() { return get_input_bytes_advertised_for_slave(); } -READ16_MEMBER(namcos21_dsp_c67_device::slave_port3_r) +uint16_t namcos21_dsp_c67_device::slave_port3_r() { /* render-device queue size */ /* up to 0x1fe bytes? * slave blocks until free &space exists @@ -650,7 +650,7 @@ READ16_MEMBER(namcos21_dsp_c67_device::slave_port3_r) return 0; } -WRITE16_MEMBER(namcos21_dsp_c67_device::slave_port3_w) +void namcos21_dsp_c67_device::slave_port3_w(uint16_t data) { /* 0=busy, 1=ready? */ } @@ -659,7 +659,7 @@ void namcos21_dsp_c67_device::slave_XF_output_w(uint16_t data) if (ENABLE_LOGGING) logerror( "%s :slaveXF(%d)\n", machine().describe_context(), data ); } -READ16_MEMBER(namcos21_dsp_c67_device::slave_portf_r) +uint16_t namcos21_dsp_c67_device::slave_portf_r() { /* informs BIOS that this is Slave DSP */ return 1; } @@ -701,7 +701,7 @@ void namcos21_dsp_c67_device::slave_dsp_io(address_map &map) * 0001 0007 0000000A * 0002 001A 03FFF1A0 */ -WRITE16_MEMBER(namcos21_dsp_c67_device::pointram_control_w) +void namcos21_dsp_c67_device::pointram_control_w(offs_t offset, uint16_t data, uint16_t mem_mask) { // uint16_t prev = m_pointram_control; COMBINE_DATA( &m_pointram_control ); @@ -735,12 +735,12 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::pointram_control_w) m_pointram_idx = 0; /* HACK */ } -READ16_MEMBER(namcos21_dsp_c67_device::pointram_data_r) +uint16_t namcos21_dsp_c67_device::pointram_data_r() { return m_pointram[m_pointram_idx]; } -WRITE16_MEMBER(namcos21_dsp_c67_device::pointram_data_w) +void namcos21_dsp_c67_device::pointram_data_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if( ACCESSING_BITS_0_7 ) { @@ -752,12 +752,12 @@ WRITE16_MEMBER(namcos21_dsp_c67_device::pointram_data_w) } -READ16_MEMBER(namcos21_dsp_c67_device::namcos21_depthcue_r) +uint16_t namcos21_dsp_c67_device::namcos21_depthcue_r(offs_t offset) { int bank = (m_pointram_control&0x20)?1:0; return m_depthcue[bank][offset]; } -WRITE16_MEMBER(namcos21_dsp_c67_device::namcos21_depthcue_w) +void namcos21_dsp_c67_device::namcos21_depthcue_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if( ACCESSING_BITS_0_7 ) { diff --git a/src/mame/machine/namcos21_dsp_c67.h b/src/mame/machine/namcos21_dsp_c67.h index 602cd7cf2e7..433c0a557e3 100644 --- a/src/mame/machine/namcos21_dsp_c67.h +++ b/src/mame/machine/namcos21_dsp_c67.h @@ -31,14 +31,14 @@ public: void set_gametype(int gametype) { m_gametype = gametype; } - DECLARE_READ16_MEMBER(dspram16_r); - DECLARE_WRITE16_MEMBER(dspram16_hack_w); - DECLARE_WRITE16_MEMBER(dspram16_w); - DECLARE_WRITE16_MEMBER(pointram_control_w); - DECLARE_READ16_MEMBER(pointram_data_r); - DECLARE_WRITE16_MEMBER(pointram_data_w); - DECLARE_READ16_MEMBER(namcos21_depthcue_r); - DECLARE_WRITE16_MEMBER(namcos21_depthcue_w); + uint16_t dspram16_r(offs_t offset); + void dspram16_hack_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void dspram16_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + void pointram_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t pointram_data_r(); + void pointram_data_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t namcos21_depthcue_r(offs_t offset); + void namcos21_depthcue_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void reset_dsps(int state); void reset_kickstart(); @@ -103,34 +103,34 @@ private: void namcos21_kickstart_hacks(int internal); - DECLARE_WRITE16_MEMBER(dspcuskey_w); - DECLARE_READ16_MEMBER(dspcuskey_r); - DECLARE_READ16_MEMBER(dsp_port0_r); - DECLARE_WRITE16_MEMBER(dsp_port0_w); - DECLARE_READ16_MEMBER(dsp_port1_r); - DECLARE_WRITE16_MEMBER(dsp_port1_w); - DECLARE_READ16_MEMBER(dsp_port2_r); - DECLARE_WRITE16_MEMBER(dsp_port2_w); - DECLARE_READ16_MEMBER(dsp_port3_idc_rcv_enable_r); - DECLARE_WRITE16_MEMBER(dsp_port3_w); - DECLARE_WRITE16_MEMBER(dsp_port4_w); - DECLARE_READ16_MEMBER(dsp_port8_r); - DECLARE_WRITE16_MEMBER(dsp_port8_w); - DECLARE_READ16_MEMBER(dsp_port9_r); - DECLARE_READ16_MEMBER(dsp_porta_r); - DECLARE_WRITE16_MEMBER(dsp_porta_w); - DECLARE_READ16_MEMBER(dsp_portb_r); - DECLARE_WRITE16_MEMBER(dsp_portb_w); - DECLARE_WRITE16_MEMBER(dsp_portc_w); - DECLARE_READ16_MEMBER(dsp_portf_r); + void dspcuskey_w(uint16_t data); + uint16_t dspcuskey_r(); + uint16_t dsp_port0_r(); + void dsp_port0_w(uint16_t data); + uint16_t dsp_port1_r(); + void dsp_port1_w(uint16_t data); + uint16_t dsp_port2_r(); + void dsp_port2_w(uint16_t data); + uint16_t dsp_port3_idc_rcv_enable_r(); + void dsp_port3_w(uint16_t data); + void dsp_port4_w(uint16_t data); + uint16_t dsp_port8_r(); + void dsp_port8_w(uint16_t data); + uint16_t dsp_port9_r(); + uint16_t dsp_porta_r(); + void dsp_porta_w(uint16_t data); + uint16_t dsp_portb_r(); + void dsp_portb_w(uint16_t data); + void dsp_portc_w(uint16_t data); + uint16_t dsp_portf_r(); void dsp_xf_w(uint16_t data); - DECLARE_READ16_MEMBER(slave_port0_r); - DECLARE_WRITE16_MEMBER(slave_port0_w); - DECLARE_READ16_MEMBER(slave_port2_r); - DECLARE_READ16_MEMBER(slave_port3_r); - DECLARE_WRITE16_MEMBER(slave_port3_w); + uint16_t slave_port0_r(); + void slave_port0_w(uint16_t data); + uint16_t slave_port2_r(); + uint16_t slave_port3_r(); + void slave_port3_w(uint16_t data); void slave_XF_output_w(uint16_t data); - DECLARE_READ16_MEMBER(slave_portf_r); + uint16_t slave_portf_r(); void master_dsp_data(address_map &map); void master_dsp_io(address_map &map); diff --git a/src/mame/machine/naomi.cpp b/src/mame/machine/naomi.cpp index 78a7f61ca21..0521f62db4d 100644 --- a/src/mame/machine/naomi.cpp +++ b/src/mame/machine/naomi.cpp @@ -25,7 +25,7 @@ hotd2o: bp 0xc0ba1f6, modify work RAM 0xc9c35a8 to be zero, bpclear #include "includes/naomi.h" #include "sound/aica.h" -READ64_MEMBER(naomi_state::naomi_biose_idle_skip_r ) +uint64_t naomi_state::naomi_biose_idle_skip_r() { // if (m_maincpu->pc()==0xc04173c) // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -36,7 +36,7 @@ READ64_MEMBER(naomi_state::naomi_biose_idle_skip_r ) return dc_ram[0x2ad238/8]; } -READ64_MEMBER(naomi_state::naomi_biosh_idle_skip_r ) +uint64_t naomi_state::naomi_biosh_idle_skip_r() { // if (m_maincpu->pc()==0xc045ffc) // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -46,7 +46,7 @@ READ64_MEMBER(naomi_state::naomi_biosh_idle_skip_r ) return dc_ram[0x2b0600/8]; } -READ64_MEMBER(naomi_state::naomi2_biose_idle_skip_r ) +uint64_t naomi_state::naomi2_biose_idle_skip_r() { // if (m_maincpu->pc()==0xc04637c) // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -210,8 +210,8 @@ void naomi_state::set_drc_options() void naomi_state::init_naomi() { - //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r)); // rev e bios - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios + //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64smo_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r)); // rev e bios + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64smo_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios set_drc_options(); create_pic_from_retdat(); @@ -219,7 +219,7 @@ void naomi_state::init_naomi() void naomi2_state::init_naomi2() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(*this, FUNC(naomi_state::naomi2_biose_idle_skip_r))); // rev e bios + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64smo_delegate(*this, FUNC(naomi_state::naomi2_biose_idle_skip_r))); // rev e bios set_drc_options(); create_pic_from_retdat(); @@ -298,8 +298,8 @@ CUSTOM_INPUT_MEMBER(naomi_state::naomi_kb_r) void naomi_state::init_naomi_mp() { - //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r)); // rev e bios - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios + //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64smo_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r)); // rev e bios + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64smo_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios m_mp_mux = 0; set_drc_options(); @@ -308,8 +308,8 @@ void naomi_state::init_naomi_mp() void naomi_state::init_naomigd() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r))); // rev e bios - //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64smo_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r))); // rev e bios + //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64smo_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios set_drc_options(); create_pic_from_retdat(); @@ -317,8 +317,8 @@ void naomi_state::init_naomigd() void naomi_state::init_naomigd_mp() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r))); // rev e bios - //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2ad238, 0xc2ad23f, read64smo_delegate(*this, FUNC(naomi_state::naomi_biose_idle_skip_r))); // rev e bios + //m_maincpu->space(AS_PROGRAM).install_read_handler(0xc2b0600, 0xc2b0607, read64smo_delegate(*this, FUNC(naomi_state::naomi_biosh_idle_skip_r))); // rev h bios m_mp_mux = 0; set_drc_options(); @@ -326,7 +326,7 @@ void naomi_state::init_naomigd_mp() } -READ64_MEMBER(naomi_state::naomigd_ggxxsla_idle_skip_r ) +uint64_t naomi_state::naomigd_ggxxsla_idle_skip_r() { // if (m_maincpu->pc()==0x0c0c9adc) // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -336,11 +336,11 @@ READ64_MEMBER(naomi_state::naomigd_ggxxsla_idle_skip_r ) void naomi_state::init_ggxxsla() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc1aae18, 0xc1aae1f, read64_delegate(*this, FUNC(naomi_state::naomigd_ggxxsla_idle_skip_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc1aae18, 0xc1aae1f, read64smo_delegate(*this, FUNC(naomi_state::naomigd_ggxxsla_idle_skip_r))); init_naomigd(); } -READ64_MEMBER(naomi_state::naomigd_ggxx_idle_skip_r ) +uint64_t naomi_state::naomigd_ggxx_idle_skip_r() { // if (m_maincpu->pc()==0xc0b5c3c) // or 0xc0bab0c // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -351,11 +351,11 @@ READ64_MEMBER(naomi_state::naomigd_ggxx_idle_skip_r ) void naomi_state::init_ggxx() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc1837b8, 0xc1837bf, read64_delegate(*this, FUNC(naomi_state::naomigd_ggxx_idle_skip_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc1837b8, 0xc1837bf, read64smo_delegate(*this, FUNC(naomi_state::naomigd_ggxx_idle_skip_r))); init_naomigd(); } -READ64_MEMBER(naomi_state::naomigd_ggxxrl_idle_skip_r ) +uint64_t naomi_state::naomigd_ggxxrl_idle_skip_r() { // if (m_maincpu->pc()==0xc0b84bc) // or 0xc0bab0c // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -367,12 +367,12 @@ READ64_MEMBER(naomi_state::naomigd_ggxxrl_idle_skip_r ) void naomi_state::init_ggxxrl() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc18d6c8, 0xc18d6cf, read64_delegate(*this, FUNC(naomi_state::naomigd_ggxxrl_idle_skip_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc18d6c8, 0xc18d6cf, read64smo_delegate(*this, FUNC(naomi_state::naomigd_ggxxrl_idle_skip_r))); init_naomigd(); } /* at least speeds up the annoying copyright screens ;-) */ -READ64_MEMBER(naomi_state::naomigd_sfz3ugd_idle_skip_r ) +uint64_t naomi_state::naomigd_sfz3ugd_idle_skip_r() { // if (m_maincpu->pc()==0xc36a2dc) // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -382,12 +382,12 @@ READ64_MEMBER(naomi_state::naomigd_sfz3ugd_idle_skip_r ) void naomi_state::init_sfz3ugd() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xc5dc900, 0xc5dc907, read64_delegate(*this, FUNC(naomi_state::naomigd_sfz3ugd_idle_skip_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xc5dc900, 0xc5dc907, read64smo_delegate(*this, FUNC(naomi_state::naomigd_sfz3ugd_idle_skip_r))); init_naomigd(); } -READ64_MEMBER(naomi_state::hotd2_idle_skip_r ) +uint64_t naomi_state::hotd2_idle_skip_r() { // if (m_maincpu->pc()==0xc0cfcbc) // m_maincpu->spin_until_time(attotime::from_usec(500)); @@ -400,7 +400,7 @@ READ64_MEMBER(naomi_state::hotd2_idle_skip_r ) void naomi_state::init_hotd2() { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xca25fb8, 0xca25fbf, read64_delegate(*this, FUNC(naomi_state::hotd2_idle_skip_r))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xca25fb8, 0xca25fbf, read64smo_delegate(*this, FUNC(naomi_state::hotd2_idle_skip_r))); set_drc_options(); } diff --git a/src/mame/machine/naomibd.cpp b/src/mame/machine/naomibd.cpp index d0550d6f1c6..3dd0c7307b3 100644 --- a/src/mame/machine/naomibd.cpp +++ b/src/mame/machine/naomibd.cpp @@ -130,19 +130,19 @@ void naomi_board::dma_advance(uint32_t size) board_advance(size); } -WRITE16_MEMBER(naomi_board::rom_offseth_w) +void naomi_board::rom_offseth_w(uint16_t data) { rom_offset = (rom_offset & 0x0000ffff) | (data << 16); pio_ready = false; } -WRITE16_MEMBER(naomi_board::rom_offsetl_w) +void naomi_board::rom_offsetl_w(uint16_t data) { rom_offset = (rom_offset & 0xffff0000) | data; pio_ready = false; } -READ16_MEMBER(naomi_board::rom_data_r) +uint16_t naomi_board::rom_data_r() { if(!pio_ready) { board_setup_address(rom_offset, false); @@ -160,7 +160,7 @@ READ16_MEMBER(naomi_board::rom_data_r) return res; } -WRITE16_MEMBER(naomi_board::rom_data_w) +void naomi_board::rom_data_w(uint16_t data) { board_write(rom_offset, data); @@ -168,24 +168,24 @@ WRITE16_MEMBER(naomi_board::rom_data_w) rom_offset += 2; } -WRITE16_MEMBER(naomi_board::dma_offseth_w) +void naomi_board::dma_offseth_w(uint16_t data) { dma_offset = (dma_offset & 0x0000ffff) | (data << 16); dma_ready = false; } -WRITE16_MEMBER(naomi_board::dma_offsetl_w) +void naomi_board::dma_offsetl_w(uint16_t data) { dma_offset = (dma_offset & 0xffff0000) | data; dma_ready = false; } -WRITE16_MEMBER(naomi_board::dma_count_w) +void naomi_board::dma_count_w(uint16_t data) { dma_count = data; } -WRITE16_MEMBER(naomi_board::boardid_w) +void naomi_board::boardid_w(uint16_t data) { eeprom->write_cs((data >> 2) & 1); eeprom->write_rst((data >> 3) & 1); @@ -193,12 +193,12 @@ WRITE16_MEMBER(naomi_board::boardid_w) eeprom->write_sda((data >> 0) & 1); } -READ16_MEMBER(naomi_board::boardid_r) +uint16_t naomi_board::boardid_r() { return eeprom->read_sda() << 15; } -READ16_MEMBER(naomi_board::default_r) +uint16_t naomi_board::default_r(offs_t offset) { logerror("NAOMIBD: unmapped read at %02x\n", offset); return 0xffff; diff --git a/src/mame/machine/naomibd.h b/src/mame/machine/naomibd.h index 1786120bd76..f48f4ee5bf2 100644 --- a/src/mame/machine/naomibd.h +++ b/src/mame/machine/naomibd.h @@ -14,18 +14,18 @@ public: // Can be patched in the underlying class virtual void submap(address_map &map) override; - DECLARE_WRITE16_MEMBER(rom_offseth_w); // 5f7000 - DECLARE_WRITE16_MEMBER(rom_offsetl_w); // 5f7004 - DECLARE_READ16_MEMBER( rom_data_r); // 5f7008 - DECLARE_WRITE16_MEMBER(rom_data_w); // 5f7008 - DECLARE_WRITE16_MEMBER(dma_offseth_w); // 5f700c - DECLARE_WRITE16_MEMBER(dma_offsetl_w); // 5f7010 - DECLARE_WRITE16_MEMBER(dma_count_w); // 5f7014 - - DECLARE_WRITE16_MEMBER(boardid_w); // 5f7078 - DECLARE_READ16_MEMBER( boardid_r); // 5f707c - - DECLARE_READ16_MEMBER( default_r); + void rom_offseth_w(uint16_t data); // 5f7000 + void rom_offsetl_w(uint16_t data); // 5f7004 + uint16_t rom_data_r(); // 5f7008 + void rom_data_w(uint16_t data); // 5f7008 + void dma_offseth_w(uint16_t data); // 5f700c + void dma_offsetl_w(uint16_t data); // 5f7010 + void dma_count_w(uint16_t data); // 5f7014 + + void boardid_w(uint16_t data); // 5f7078 + uint16_t boardid_r(); // 5f707c + + uint16_t default_r(offs_t offset); protected: naomi_board(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/mame/machine/naomig1.cpp b/src/mame/machine/naomig1.cpp index 54786ffd025..f40958fa50b 100644 --- a/src/mame/machine/naomig1.cpp +++ b/src/mame/machine/naomig1.cpp @@ -67,58 +67,58 @@ void naomi_g1_device::device_timer(emu_timer &timer, device_timer_id id, int par irq_cb(DMA_GDROM_IRQ); } -READ32_MEMBER(naomi_g1_device::sb_gdstar_r) +uint32_t naomi_g1_device::sb_gdstar_r() { return gdstar; } -WRITE32_MEMBER(naomi_g1_device::sb_gdstar_w) +void naomi_g1_device::sb_gdstar_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&gdstar); logerror("G1: gdstar_w %08x @ %08x\n", data, mem_mask); } -READ32_MEMBER(naomi_g1_device::sb_gdlen_r) +uint32_t naomi_g1_device::sb_gdlen_r() { return gdlen; } -WRITE32_MEMBER(naomi_g1_device::sb_gdlen_w) +void naomi_g1_device::sb_gdlen_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&gdlen); logerror("G1: gdlen_w %08x @ %08x\n", data, mem_mask); } -READ32_MEMBER(naomi_g1_device::sb_gddir_r) +uint32_t naomi_g1_device::sb_gddir_r() { return gddir; } -WRITE32_MEMBER(naomi_g1_device::sb_gddir_w) +void naomi_g1_device::sb_gddir_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&gddir); gddir &= 1; logerror("G1: gddir_w %08x @ %08x\n", data, mem_mask); } -READ32_MEMBER(naomi_g1_device::sb_gden_r) +uint32_t naomi_g1_device::sb_gden_r() { return gden; } -WRITE32_MEMBER(naomi_g1_device::sb_gden_w) +void naomi_g1_device::sb_gden_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&gden); gden &= 1; logerror("G1: gden_w %08x @ %08x\n", data, mem_mask); } -READ32_MEMBER(naomi_g1_device::sb_gdst_r) +uint32_t naomi_g1_device::sb_gdst_r() { return gdst; } -WRITE32_MEMBER(naomi_g1_device::sb_gdst_w) +void naomi_g1_device::sb_gdst_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint32_t old = gdst; COMBINE_DATA(&gdst); @@ -167,69 +167,69 @@ WRITE32_MEMBER(naomi_g1_device::sb_gdst_w) } } -WRITE32_MEMBER(naomi_g1_device::sb_g1rrc_w) +void naomi_g1_device::sb_g1rrc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1rrc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1rwc_w) +void naomi_g1_device::sb_g1rwc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1rwc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1crc_w) +void naomi_g1_device::sb_g1crc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1crc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1cwc_w) +void naomi_g1_device::sb_g1cwc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1cwc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1frc_w) +void naomi_g1_device::sb_g1frc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1frc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1fwc_w) +void naomi_g1_device::sb_g1fwc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1fwc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1gdrc_w) +void naomi_g1_device::sb_g1gdrc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1gdrc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_g1gdwc_w) +void naomi_g1_device::sb_g1gdwc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1gdwc_w %08x @ %08x\n", data, mem_mask); } -READ32_MEMBER(naomi_g1_device::sb_g1sysm_r) +uint32_t naomi_g1_device::sb_g1sysm_r(offs_t offset, uint32_t mem_mask) { logerror("G1: g1sysm_r @ %08x\n", mem_mask); return 0; } -WRITE32_MEMBER(naomi_g1_device::sb_g1crdyc_w) +void naomi_g1_device::sb_g1crdyc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: g1crdyc_w %08x @ %08x\n", data, mem_mask); } -WRITE32_MEMBER(naomi_g1_device::sb_gdapro_w) +void naomi_g1_device::sb_gdapro_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("G1: gdapro_w %08x @ %08x\n", data, mem_mask); } -READ32_MEMBER(naomi_g1_device::sb_gdstard_r) +uint32_t naomi_g1_device::sb_gdstard_r(offs_t offset, uint32_t mem_mask) { logerror("G1: gdstard_r @ %08x\n", mem_mask); return 0; } -READ32_MEMBER(naomi_g1_device::sb_gdlend_r) +uint32_t naomi_g1_device::sb_gdlend_r(offs_t offset, uint32_t mem_mask) { logerror("G1: gdlend_r @ %08x\n", mem_mask); return 0; diff --git a/src/mame/machine/naomig1.h b/src/mame/machine/naomig1.h index 96807dce286..3c2e2dcfd91 100644 --- a/src/mame/machine/naomig1.h +++ b/src/mame/machine/naomig1.h @@ -24,31 +24,31 @@ public: void amap(address_map &map); // for range 0x005f7400-0x005f74ff virtual void submap(address_map &map) = 0; // for range 0x005f7000-0x005f70ff - DECLARE_READ32_MEMBER(sb_gdstar_r); // 5f7404 - DECLARE_WRITE32_MEMBER(sb_gdstar_w); // 5f7404 - DECLARE_READ32_MEMBER(sb_gdlen_r); // 5f7408 - DECLARE_WRITE32_MEMBER(sb_gdlen_w); // 5f7408 - DECLARE_READ32_MEMBER(sb_gddir_r); // 5f740c - DECLARE_WRITE32_MEMBER(sb_gddir_w); // 5f740c - DECLARE_READ32_MEMBER(sb_gden_r); // 5f7414 - DECLARE_WRITE32_MEMBER(sb_gden_w); // 5f7414 - DECLARE_READ32_MEMBER(sb_gdst_r); // 5f7418 - DECLARE_WRITE32_MEMBER(sb_gdst_w); // 5f7418 - - DECLARE_WRITE32_MEMBER(sb_g1rrc_w); // 5f7480 - DECLARE_WRITE32_MEMBER(sb_g1rwc_w); // 5f7484 - DECLARE_WRITE32_MEMBER(sb_g1frc_w); // 5f7488 - DECLARE_WRITE32_MEMBER(sb_g1fwc_w); // 5f748c - DECLARE_WRITE32_MEMBER(sb_g1crc_w); // 5f7490 - DECLARE_WRITE32_MEMBER(sb_g1cwc_w); // 5f7494 - DECLARE_WRITE32_MEMBER(sb_g1gdrc_w); // 5f74a0 - DECLARE_WRITE32_MEMBER(sb_g1gdwc_w); // 5f74a4 - DECLARE_READ32_MEMBER(sb_g1sysm_r); // 5f74b0 - DECLARE_WRITE32_MEMBER(sb_g1crdyc_w); // 5f74b4 - DECLARE_WRITE32_MEMBER(sb_gdapro_w); // 5f74b8 - - DECLARE_READ32_MEMBER(sb_gdstard_r); // 5f74f4 - DECLARE_READ32_MEMBER(sb_gdlend_r); // 5f74f8 + uint32_t sb_gdstar_r(); // 5f7404 + void sb_gdstar_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7404 + uint32_t sb_gdlen_r(); // 5f7408 + void sb_gdlen_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7408 + uint32_t sb_gddir_r(); // 5f740c + void sb_gddir_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f740c + uint32_t sb_gden_r(); // 5f7414 + void sb_gden_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7414 + uint32_t sb_gdst_r(); // 5f7418 + void sb_gdst_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7418 + + void sb_g1rrc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7480 + void sb_g1rwc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7484 + void sb_g1frc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7488 + void sb_g1fwc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f748c + void sb_g1crc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7490 + void sb_g1cwc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f7494 + void sb_g1gdrc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f74a0 + void sb_g1gdwc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f74a4 + uint32_t sb_g1sysm_r(offs_t offset, uint32_t mem_mask = ~0); // 5f74b0 + void sb_g1crdyc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f74b4 + void sb_gdapro_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // 5f74b8 + + uint32_t sb_gdstard_r(offs_t offset, uint32_t mem_mask = ~0); // 5f74f4 + uint32_t sb_gdlend_r(offs_t offset, uint32_t mem_mask = ~0); // 5f74f8 protected: enum { G1_TIMER_ID = 0x42 }; diff --git a/src/mame/machine/naomigd.cpp b/src/mame/machine/naomigd.cpp index 3a9597e031d..0219e0650d1 100644 --- a/src/mame/machine/naomigd.cpp +++ b/src/mame/machine/naomigd.cpp @@ -479,36 +479,36 @@ void idegdrom_device::map_dma(address_map &map) map(0x0000, 0x000f).rw("ide", FUNC(bus_master_ide_controller_device::bmdma_r), FUNC(bus_master_ide_controller_device::bmdma_w)); } -READ32_MEMBER(idegdrom_device::ide_cs0_r) +uint32_t idegdrom_device::ide_cs0_r(offs_t offset, uint32_t mem_mask) { const int o = offset >> 2; const int r = (offset & 3) << 3; - return m_ide->cs0_r(space, o, mem_mask << r) >> r; + return m_ide->cs0_r(o, mem_mask << r) >> r; } -READ32_MEMBER(idegdrom_device::ide_cs1_r) +uint32_t idegdrom_device::ide_cs1_r(offs_t offset, uint32_t mem_mask) { const int o = offset >> 2; const int r = (offset & 3) << 3; - return m_ide->cs1_r(space, o, mem_mask << r) >> r; + return m_ide->cs1_r(o, mem_mask << r) >> r; } -WRITE32_MEMBER(idegdrom_device::ide_cs0_w) +void idegdrom_device::ide_cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask) { const int o = offset >> 2; const int r = (offset & 3) << 3; - m_ide->cs0_w(space, o, data << r, mem_mask << r); + m_ide->cs0_w(o, data << r, mem_mask << r); } -WRITE32_MEMBER(idegdrom_device::ide_cs1_w) +void idegdrom_device::ide_cs1_w(offs_t offset, uint32_t data, uint32_t mem_mask) { const int o = offset >> 2; const int r = (offset & 3) << 3; - m_ide->cs1_w(space, o, data << r, mem_mask << r); + m_ide->cs1_w(o, data << r, mem_mask << r); } // The board @@ -596,47 +596,47 @@ void naomi_gdrom_board::pci_map(address_map &map) map(0x78000000, 0x783fffff).ram().share("6154sdram"); } -WRITE16_MEMBER(naomi_gdrom_board::dimm_command_w) +void naomi_gdrom_board::dimm_command_w(uint16_t data) { dimm_command = data; } -READ16_MEMBER(naomi_gdrom_board::dimm_command_r) +uint16_t naomi_gdrom_board::dimm_command_r() { return dimm_command & 0xffff; } -WRITE16_MEMBER(naomi_gdrom_board::dimm_offsetl_w) +void naomi_gdrom_board::dimm_offsetl_w(uint16_t data) { dimm_offsetl = data; } -READ16_MEMBER(naomi_gdrom_board::dimm_offsetl_r) +uint16_t naomi_gdrom_board::dimm_offsetl_r() { return dimm_offsetl & 0xffff; } -WRITE16_MEMBER(naomi_gdrom_board::dimm_parameterl_w) +void naomi_gdrom_board::dimm_parameterl_w(uint16_t data) { dimm_parameterl = data; } -READ16_MEMBER(naomi_gdrom_board::dimm_parameterl_r) +uint16_t naomi_gdrom_board::dimm_parameterl_r() { return dimm_parameterl & 0xffff; } -WRITE16_MEMBER(naomi_gdrom_board::dimm_parameterh_w) +void naomi_gdrom_board::dimm_parameterh_w(uint16_t data) { dimm_parameterh = data; } -READ16_MEMBER(naomi_gdrom_board::dimm_parameterh_r) +uint16_t naomi_gdrom_board::dimm_parameterh_r() { return dimm_parameterh & 0xffff; } -WRITE16_MEMBER(naomi_gdrom_board::dimm_status_w) +void naomi_gdrom_board::dimm_status_w(uint16_t data) { dimm_status = data; if (dimm_status & 0x001) @@ -649,62 +649,62 @@ WRITE16_MEMBER(naomi_gdrom_board::dimm_status_w) set_ext_irq(ASSERT_LINE); } -READ16_MEMBER(naomi_gdrom_board::dimm_status_r) +uint16_t naomi_gdrom_board::dimm_status_r() { return dimm_status & 0xffff; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_unknown_w) +void naomi_gdrom_board::sh4_unknown_w(uint32_t data) { sh4_unknown = data; } -READ32_MEMBER(naomi_gdrom_board::sh4_unknown_r) +uint32_t naomi_gdrom_board::sh4_unknown_r() { return sh4_unknown; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_command_w) +void naomi_gdrom_board::sh4_command_w(uint32_t data) { dimm_command = data; } -READ32_MEMBER(naomi_gdrom_board::sh4_command_r) +uint32_t naomi_gdrom_board::sh4_command_r() { return dimm_command; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_offsetl_w) +void naomi_gdrom_board::sh4_offsetl_w(uint32_t data) { dimm_offsetl = data; } -READ32_MEMBER(naomi_gdrom_board::sh4_offsetl_r) +uint32_t naomi_gdrom_board::sh4_offsetl_r() { return dimm_offsetl; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_parameterl_w) +void naomi_gdrom_board::sh4_parameterl_w(uint32_t data) { dimm_parameterl = data; } -READ32_MEMBER(naomi_gdrom_board::sh4_parameterl_r) +uint32_t naomi_gdrom_board::sh4_parameterl_r() { return dimm_parameterl; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_parameterh_w) +void naomi_gdrom_board::sh4_parameterh_w(uint32_t data) { dimm_parameterh = data; } -READ32_MEMBER(naomi_gdrom_board::sh4_parameterh_r) +uint32_t naomi_gdrom_board::sh4_parameterh_r() { return dimm_parameterh; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_status_w) +void naomi_gdrom_board::sh4_status_w(uint32_t data) { dimm_status = data; if (dimm_status & 0x001) @@ -717,12 +717,12 @@ WRITE32_MEMBER(naomi_gdrom_board::sh4_status_w) set_ext_irq(ASSERT_LINE); } -READ32_MEMBER(naomi_gdrom_board::sh4_status_r) +uint32_t naomi_gdrom_board::sh4_status_r() { return dimm_status; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_control_w) +void naomi_gdrom_board::sh4_control_w(uint32_t data) { uint32_t old = dimm_control; @@ -740,43 +740,43 @@ WRITE32_MEMBER(naomi_gdrom_board::sh4_control_w) set_reset_out(); } -READ32_MEMBER(naomi_gdrom_board::sh4_control_r) +uint32_t naomi_gdrom_board::sh4_control_r() { return dimm_control; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_sdramconfig_w) +void naomi_gdrom_board::sh4_sdramconfig_w(uint32_t data) { dimm_sdramconfig = data; logerror("Detected sdram dimm module size: %d megabytes\n", 4 * (1 << ((data >> 1) & 7))); } -READ32_MEMBER(naomi_gdrom_board::sh4_sdramconfig_r) +uint32_t naomi_gdrom_board::sh4_sdramconfig_r() { return dimm_sdramconfig; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_des_keyl_w) +void naomi_gdrom_board::sh4_des_keyl_w(uint32_t data) { dimm_des_key = (dimm_des_key & 0xffffffff00000000) | (uint64_t)data; } -READ32_MEMBER(naomi_gdrom_board::sh4_des_keyl_r) +uint32_t naomi_gdrom_board::sh4_des_keyl_r() { return (uint32_t)dimm_des_key; } -WRITE32_MEMBER(naomi_gdrom_board::sh4_des_keyh_w) +void naomi_gdrom_board::sh4_des_keyh_w(uint32_t data) { dimm_des_key = (dimm_des_key & 0xffffffff) | ((uint64_t)data << 32); } -READ32_MEMBER(naomi_gdrom_board::sh4_des_keyh_r) +uint32_t naomi_gdrom_board::sh4_des_keyh_r() { return (uint32_t)(dimm_des_key >> 32); } -READ64_MEMBER(naomi_gdrom_board::i2cmem_dimm_r) +uint64_t naomi_gdrom_board::i2cmem_dimm_r() { uint8_t ret; @@ -790,7 +790,7 @@ READ64_MEMBER(naomi_gdrom_board::i2cmem_dimm_r) return ret; } -WRITE64_MEMBER(naomi_gdrom_board::i2cmem_dimm_w) +void naomi_gdrom_board::i2cmem_dimm_w(uint64_t data) { if (data & 0x40000) { @@ -822,14 +822,14 @@ void naomi_gdrom_board::pic_map(address_map &map) map(0x00, 0x1f).rw(FUNC(naomi_gdrom_board::pic_dimm_r), FUNC(naomi_gdrom_board::pic_dimm_w)); } -READ8_MEMBER(naomi_gdrom_board::pic_dimm_r) +uint8_t naomi_gdrom_board::pic_dimm_r(offs_t offset) { if (offset == 1) return picbus | picbus_pullup; return 0; } -WRITE8_MEMBER(naomi_gdrom_board::pic_dimm_w) +void naomi_gdrom_board::pic_dimm_w(offs_t offset, uint8_t data) { if (offset == 1) { diff --git a/src/mame/machine/naomigd.h b/src/mame/machine/naomigd.h index f9e62c26aaa..cb51217adea 100644 --- a/src/mame/machine/naomigd.h +++ b/src/mame/machine/naomigd.h @@ -28,10 +28,10 @@ public: void map_control(address_map &map); void map_dma(address_map &map); - DECLARE_READ32_MEMBER(ide_cs0_r); - DECLARE_READ32_MEMBER(ide_cs1_r); - DECLARE_WRITE32_MEMBER(ide_cs0_w); - DECLARE_WRITE32_MEMBER(ide_cs1_w); + uint32_t ide_cs0_r(offs_t offset, uint32_t mem_mask = ~0); + uint32_t ide_cs1_r(offs_t offset, uint32_t mem_mask = ~0); + void ide_cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + void ide_cs1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(ide_irq); protected: @@ -89,42 +89,42 @@ public: virtual const tiny_rom_entry *device_rom_region() const override; - DECLARE_WRITE16_MEMBER(dimm_command_w); // 5f703c - DECLARE_READ16_MEMBER(dimm_command_r); - DECLARE_WRITE16_MEMBER(dimm_offsetl_w); // 5f7040 - DECLARE_READ16_MEMBER(dimm_offsetl_r); - DECLARE_WRITE16_MEMBER(dimm_parameterl_w); // 5f7044 - DECLARE_READ16_MEMBER(dimm_parameterl_r); - DECLARE_WRITE16_MEMBER(dimm_parameterh_w); // 5f7048 - DECLARE_READ16_MEMBER(dimm_parameterh_r); - DECLARE_WRITE16_MEMBER(dimm_status_w); // 5f704c - DECLARE_READ16_MEMBER(dimm_status_r); - - DECLARE_WRITE32_MEMBER(sh4_unknown_w); // 14000000 - DECLARE_READ32_MEMBER(sh4_unknown_r); - DECLARE_WRITE32_MEMBER(sh4_command_w); // 14000014 - DECLARE_READ32_MEMBER(sh4_command_r); - DECLARE_WRITE32_MEMBER(sh4_offsetl_w); // 14000018 - DECLARE_READ32_MEMBER(sh4_offsetl_r); - DECLARE_WRITE32_MEMBER(sh4_parameterl_w); // 1400001c - DECLARE_READ32_MEMBER(sh4_parameterl_r); - DECLARE_WRITE32_MEMBER(sh4_parameterh_w); // 14000020 - DECLARE_READ32_MEMBER(sh4_parameterh_r); - DECLARE_WRITE32_MEMBER(sh4_status_w); // 14000024 - DECLARE_READ32_MEMBER(sh4_status_r); - DECLARE_WRITE32_MEMBER(sh4_control_w); // 14000028 - DECLARE_READ32_MEMBER(sh4_control_r); - DECLARE_WRITE32_MEMBER(sh4_sdramconfig_w); // 1400002c - DECLARE_READ32_MEMBER(sh4_sdramconfig_r); - DECLARE_WRITE32_MEMBER(sh4_des_keyl_w); // 14000030 - DECLARE_READ32_MEMBER(sh4_des_keyl_r); - DECLARE_WRITE32_MEMBER(sh4_des_keyh_w); // 14000034 - DECLARE_READ32_MEMBER(sh4_des_keyh_r); - - DECLARE_READ64_MEMBER(i2cmem_dimm_r); - DECLARE_WRITE64_MEMBER(i2cmem_dimm_w); - DECLARE_READ8_MEMBER(pic_dimm_r); - DECLARE_WRITE8_MEMBER(pic_dimm_w); + void dimm_command_w(uint16_t data); // 5f703c + uint16_t dimm_command_r(); + void dimm_offsetl_w(uint16_t data); // 5f7040 + uint16_t dimm_offsetl_r(); + void dimm_parameterl_w(uint16_t data); // 5f7044 + uint16_t dimm_parameterl_r(); + void dimm_parameterh_w(uint16_t data); // 5f7048 + uint16_t dimm_parameterh_r(); + void dimm_status_w(uint16_t data); // 5f704c + uint16_t dimm_status_r(); + + void sh4_unknown_w(uint32_t data); // 14000000 + uint32_t sh4_unknown_r(); + void sh4_command_w(uint32_t data); // 14000014 + uint32_t sh4_command_r(); + void sh4_offsetl_w(uint32_t data); // 14000018 + uint32_t sh4_offsetl_r(); + void sh4_parameterl_w(uint32_t data); // 1400001c + uint32_t sh4_parameterl_r(); + void sh4_parameterh_w(uint32_t data); // 14000020 + uint32_t sh4_parameterh_r(); + void sh4_status_w(uint32_t data); // 14000024 + uint32_t sh4_status_r(); + void sh4_control_w(uint32_t data); // 14000028 + uint32_t sh4_control_r(); + void sh4_sdramconfig_w(uint32_t data); // 1400002c + uint32_t sh4_sdramconfig_r(); + void sh4_des_keyl_w(uint32_t data); // 14000030 + uint32_t sh4_des_keyl_r(); + void sh4_des_keyh_w(uint32_t data); // 14000034 + uint32_t sh4_des_keyh_r(); + + uint64_t i2cmem_dimm_r(); + void i2cmem_dimm_w(uint64_t data); + uint8_t pic_dimm_r(offs_t offset); + void pic_dimm_w(offs_t offset, uint8_t data); protected: virtual void device_start() override; diff --git a/src/mame/machine/naomim1.cpp b/src/mame/machine/naomim1.cpp index c5289435a47..fd4e26b88a4 100644 --- a/src/mame/machine/naomim1.cpp +++ b/src/mame/machine/naomim1.cpp @@ -18,7 +18,7 @@ naomi_m1_board::naomi_m1_board(const machine_config &mconfig, const char *tag, d { } -READ16_MEMBER(naomi_m1_board::actel_id_r) +uint16_t naomi_m1_board::actel_id_r() { return actel_id; } diff --git a/src/mame/machine/naomim1.h b/src/mame/machine/naomim1.h index b0702b7c772..4e062e1fd03 100644 --- a/src/mame/machine/naomim1.h +++ b/src/mame/machine/naomim1.h @@ -22,7 +22,7 @@ public: virtual void submap(address_map &map) override; - DECLARE_READ16_MEMBER(actel_id_r); + uint16_t actel_id_r(); protected: virtual void device_start() override; diff --git a/src/mame/machine/naomim4.cpp b/src/mame/machine/naomim4.cpp index 9bb9992614e..1e39a54879e 100644 --- a/src/mame/machine/naomim4.cpp +++ b/src/mame/machine/naomim4.cpp @@ -210,7 +210,7 @@ void naomi_m4_board::enc_fill() } } -READ16_MEMBER(naomi_m4_board::m4_id_r) +uint16_t naomi_m4_board::m4_id_r() { return m4id & 0xff80; } diff --git a/src/mame/machine/naomim4.h b/src/mame/machine/naomim4.h index 1ecab27a87b..78fdbbafde7 100644 --- a/src/mame/machine/naomim4.h +++ b/src/mame/machine/naomim4.h @@ -21,7 +21,7 @@ public: virtual void submap(address_map &map) override; - DECLARE_READ16_MEMBER(m4_id_r); + uint16_t m4_id_r(); protected: virtual void device_start() override; virtual void device_reset() override; diff --git a/src/mame/machine/nes.cpp b/src/mame/machine/nes.cpp index 56db41cf829..83219fbce5d 100644 --- a/src/mame/machine/nes.cpp +++ b/src/mame/machine/nes.cpp @@ -112,7 +112,7 @@ void nes_state::machine_start() // INPUTS //------------------------------------------------- -READ8_MEMBER(nes_base_state::nes_in0_r) +uint8_t nes_base_state::nes_in0_r() { uint8_t ret = 0x40; ret |= m_ctrl1->read_bit0(); @@ -120,7 +120,7 @@ READ8_MEMBER(nes_base_state::nes_in0_r) return ret; } -READ8_MEMBER(nes_base_state::nes_in1_r) +uint8_t nes_base_state::nes_in1_r() { uint8_t ret = 0x40; ret |= m_ctrl2->read_bit0(); @@ -128,14 +128,14 @@ READ8_MEMBER(nes_base_state::nes_in1_r) return ret; } -WRITE8_MEMBER(nes_base_state::nes_in0_w) +void nes_base_state::nes_in0_w(uint8_t data) { m_ctrl1->write(data); m_ctrl2->write(data); } -READ8_MEMBER(nes_state::fc_in0_r) +uint8_t nes_state::fc_in0_r() { uint8_t ret = 0x40; // bit 0 to controller port @@ -156,7 +156,7 @@ READ8_MEMBER(nes_state::fc_in0_r) return ret; } -READ8_MEMBER(nes_state::fc_in1_r) +uint8_t nes_state::fc_in1_r() { uint8_t ret = 0x40; // bit 0 to controller port @@ -174,7 +174,7 @@ READ8_MEMBER(nes_state::fc_in1_r) return ret; } -WRITE8_MEMBER(nes_state::fc_in0_w) +void nes_state::fc_in0_w(uint8_t data) { m_ctrl1->write(data); m_ctrl2->write(data); @@ -186,7 +186,7 @@ void nes_state::init_famicom() { // setup alt input handlers for additional FC input devices address_space &space = m_maincpu->space(AS_PROGRAM); - space.install_read_handler(0x4016, 0x4016, read8_delegate(*this, FUNC(nes_state::fc_in0_r))); - space.install_write_handler(0x4016, 0x4016, write8_delegate(*this, FUNC(nes_state::fc_in0_w))); - space.install_read_handler(0x4017, 0x4017, read8_delegate(*this, FUNC(nes_state::fc_in1_r))); + space.install_read_handler(0x4016, 0x4016, read8smo_delegate(*this, FUNC(nes_state::fc_in0_r))); + space.install_write_handler(0x4016, 0x4016, write8smo_delegate(*this, FUNC(nes_state::fc_in0_w))); + space.install_read_handler(0x4017, 0x4017, read8smo_delegate(*this, FUNC(nes_state::fc_in1_r))); } diff --git a/src/mame/machine/nextkbd.cpp b/src/mame/machine/nextkbd.cpp index ad6382fbd04..f19aee60ce5 100644 --- a/src/mame/machine/nextkbd.cpp +++ b/src/mame/machine/nextkbd.cpp @@ -161,37 +161,37 @@ bool nextkbd_device::fifo_empty() const return !fifo_size; } -READ8_MEMBER( nextkbd_device::status_snd_r ) +uint8_t nextkbd_device::status_snd_r() { logerror("status_snd_r %02x %s\n", ctrl_snd, machine().describe_context()); return ctrl_snd; } -READ8_MEMBER( nextkbd_device::status_kms_r ) +uint8_t nextkbd_device::status_kms_r() { logerror("status_kms_r %02x %s\n", ctrl_kms, machine().describe_context()); return ctrl_kms; } -READ8_MEMBER( nextkbd_device::status_dma_r ) +uint8_t nextkbd_device::status_dma_r() { logerror("status_dma_r %02x %s\n", ctrl_dma, machine().describe_context()); return ctrl_dma; } -READ8_MEMBER( nextkbd_device::status_cmd_r ) +uint8_t nextkbd_device::status_cmd_r() { logerror("status_cmd_r %02x %s\n", ctrl_cmd, machine().describe_context()); return ctrl_cmd; } -READ32_MEMBER( nextkbd_device::cdata_r ) +uint32_t nextkbd_device::cdata_r(offs_t offset, uint32_t mem_mask) { logerror("cdata_r %08x @ %08x %s\n", cdata, mem_mask, machine().describe_context()); return cdata; } -READ32_MEMBER( nextkbd_device::kmdata_r ) +uint32_t nextkbd_device::kmdata_r(offs_t offset, uint32_t mem_mask) { uint8_t old = ctrl_kms; ctrl_kms &= ~(C_KBD_INTERRUPT|C_KBD_DATA); @@ -201,7 +201,7 @@ READ32_MEMBER( nextkbd_device::kmdata_r ) return kmdata; } -WRITE8_MEMBER( nextkbd_device::ctrl_snd_w ) +void nextkbd_device::ctrl_snd_w(uint8_t data) { uint8_t old = ctrl_snd; ctrl_snd = (ctrl_snd & ~C_SOUND_WMASK) | (data & C_SOUND_WMASK); @@ -210,7 +210,7 @@ WRITE8_MEMBER( nextkbd_device::ctrl_snd_w ) logerror("ctrl_snd_w %02x | %02x %s\n", ctrl_snd, diff, machine().describe_context()); } -WRITE8_MEMBER( nextkbd_device::ctrl_kms_w ) +void nextkbd_device::ctrl_kms_w(uint8_t data) { uint8_t old = ctrl_kms; ctrl_kms = (ctrl_kms & ~C_KMS_WMASK) | (data & C_KMS_WMASK); @@ -219,7 +219,7 @@ WRITE8_MEMBER( nextkbd_device::ctrl_kms_w ) logerror("ctrl_kms_w %02x | %02x %s\n", ctrl_kms, diff, machine().describe_context()); } -WRITE8_MEMBER( nextkbd_device::ctrl_dma_w ) +void nextkbd_device::ctrl_dma_w(uint8_t data) { uint8_t old = ctrl_dma; ctrl_dma = (ctrl_dma & ~C_WMASK) | (data & C_WMASK); @@ -228,20 +228,20 @@ WRITE8_MEMBER( nextkbd_device::ctrl_dma_w ) logerror("ctrl_dma_w %02x | %02x %s\n", ctrl_dma, diff, machine().describe_context()); } -WRITE8_MEMBER( nextkbd_device::ctrl_cmd_w ) +void nextkbd_device::ctrl_cmd_w(uint8_t data) { ctrl_cmd = data; logerror("ctrl_cmd_w %02x %s\n", ctrl_cmd, machine().describe_context()); } -WRITE32_MEMBER( nextkbd_device::cdata_w ) +void nextkbd_device::cdata_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&cdata); logerror("cdata_w %08x @ %08x %s\n", data, mem_mask, machine().describe_context()); handle_command(); } -WRITE32_MEMBER( nextkbd_device::kmdata_w ) +void nextkbd_device::kmdata_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("kmdata_w %08x @ %08x %s\n", data, mem_mask, machine().describe_context()); } diff --git a/src/mame/machine/nextkbd.h b/src/mame/machine/nextkbd.h index ebf3e6615a4..b5578f71e09 100644 --- a/src/mame/machine/nextkbd.h +++ b/src/mame/machine/nextkbd.h @@ -16,19 +16,19 @@ public: void amap(address_map &map); - DECLARE_READ8_MEMBER(status_snd_r); - DECLARE_READ8_MEMBER(status_kms_r); - DECLARE_READ8_MEMBER(status_dma_r); - DECLARE_READ8_MEMBER(status_cmd_r); - DECLARE_READ32_MEMBER(cdata_r); - DECLARE_READ32_MEMBER(kmdata_r); - - DECLARE_WRITE8_MEMBER(ctrl_snd_w); - DECLARE_WRITE8_MEMBER(ctrl_kms_w); - DECLARE_WRITE8_MEMBER(ctrl_dma_w); - DECLARE_WRITE8_MEMBER(ctrl_cmd_w); - DECLARE_WRITE32_MEMBER(cdata_w); - DECLARE_WRITE32_MEMBER(kmdata_w); + uint8_t status_snd_r(); + uint8_t status_kms_r(); + uint8_t status_dma_r(); + uint8_t status_cmd_r(); + uint32_t cdata_r(offs_t offset, uint32_t mem_mask = ~0); + uint32_t kmdata_r(offs_t offset, uint32_t mem_mask = ~0); + + void ctrl_snd_w(uint8_t data); + void ctrl_kms_w(uint8_t data); + void ctrl_dma_w(uint8_t data); + void ctrl_cmd_w(uint8_t data); + void cdata_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + void kmdata_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); DECLARE_INPUT_CHANGED_MEMBER(update); diff --git a/src/mame/machine/nitedrvr.cpp b/src/mame/machine/nitedrvr.cpp index 500e7bf5e6d..f246b3fcb03 100644 --- a/src/mame/machine/nitedrvr.cpp +++ b/src/mame/machine/nitedrvr.cpp @@ -57,13 +57,13 @@ int nitedrvr_state::nitedrvr_steering( ) nitedrvr_steering_reset ***************************************************************************/ -READ8_MEMBER(nitedrvr_state::nitedrvr_steering_reset_r) +uint8_t nitedrvr_state::nitedrvr_steering_reset_r() { m_steering_val = 0; return 0; } -WRITE8_MEMBER(nitedrvr_state::nitedrvr_steering_reset_w) +void nitedrvr_state::nitedrvr_steering_reset_w(uint8_t data) { m_steering_val = 0; } @@ -97,7 +97,7 @@ Night Driver looks for the following: Fill in the steering and gear bits in a special way. ***************************************************************************/ -READ8_MEMBER(nitedrvr_state::nitedrvr_in0_r) +uint8_t nitedrvr_state::nitedrvr_in0_r(offs_t offset) { int gear = ioport("GEARS")->read(); @@ -160,7 +160,7 @@ Night Driver looks for the following: Fill in the track difficulty switch and special signal in a special way. ***************************************************************************/ -READ8_MEMBER(nitedrvr_state::nitedrvr_in1_r) +uint8_t nitedrvr_state::nitedrvr_in1_r(offs_t offset) { int port = ioport("IN0")->read(); @@ -207,7 +207,7 @@ D4 = SKID1 D5 = SKID2 ***************************************************************************/ -WRITE8_MEMBER(nitedrvr_state::nitedrvr_out0_w) +void nitedrvr_state::nitedrvr_out0_w(uint8_t data) { m_discrete->write(NITEDRVR_MOTOR_DATA, data & 0x0f); // Motor freq data m_discrete->write(NITEDRVR_SKID1_EN, data & 0x10); // Skid1 enable @@ -225,7 +225,7 @@ D4 = LED START D5 = Spare (Not used) ***************************************************************************/ -WRITE8_MEMBER(nitedrvr_state::nitedrvr_out1_w) +void nitedrvr_state::nitedrvr_out1_w(uint8_t data) { m_led = BIT(data, 4); diff --git a/src/mame/machine/ns11prot.cpp b/src/mame/machine/ns11prot.cpp index cccaf05fba8..8b7c1ac1d8d 100644 --- a/src/mame/machine/ns11prot.cpp +++ b/src/mame/machine/ns11prot.cpp @@ -34,7 +34,7 @@ keycus_c406_device::keycus_c406_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c406_device::read) +uint16_t keycus_c406_device::read(offs_t offset) { if( offset == 0 && m_p1 == 0x1234 && m_p2 == 0x5678 && m_p3 == 0x000f ) { @@ -45,7 +45,7 @@ READ16_MEMBER(keycus_c406_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c406_device::write) +void keycus_c406_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -74,7 +74,7 @@ keycus_c409_device::keycus_c409_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c409_device::read) +uint16_t keycus_c409_device::read(offs_t offset) { if( offset == 7 ) { @@ -90,7 +90,7 @@ READ16_MEMBER(keycus_c409_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c409_device::write) +void keycus_c409_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -119,7 +119,7 @@ keycus_c410_device::keycus_c410_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c410_device::read) +uint16_t keycus_c410_device::read(offs_t offset) { if( m_p2 == 0 ) { @@ -148,7 +148,7 @@ READ16_MEMBER(keycus_c410_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c410_device::write) +void keycus_c410_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -173,7 +173,7 @@ keycus_c411_device::keycus_c411_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c411_device::read) +uint16_t keycus_c411_device::read(offs_t offset) { if( m_p2 == 0x0000 && ( ( ( m_p1 == 0x0000 || m_p1 == 0x100 ) && m_p3 == 0xff7f ) || ( m_p1 == 0x7256 ) ) ) { @@ -200,7 +200,7 @@ READ16_MEMBER(keycus_c411_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c411_device::write) +void keycus_c411_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -229,7 +229,7 @@ keycus_c430_device::keycus_c430_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c430_device::read) +uint16_t keycus_c430_device::read(offs_t offset) { if( m_p2 == 0x0000 && ( ( m_p1 == 0xbfff && m_p3 == 0x0000 ) || m_p3 == 0xe296 ) ) { @@ -259,7 +259,7 @@ READ16_MEMBER(keycus_c430_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c430_device::write) +void keycus_c430_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -288,7 +288,7 @@ keycus_c431_device::keycus_c431_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c431_device::read) +uint16_t keycus_c431_device::read(offs_t offset) { if( m_p2 == 0x0000 && ( ( ( m_p1 == 0x0000 || m_p1 == 0xab50 ) && m_p3 == 0x7fff ) || m_p1 == 0x9e61 ) ) { @@ -317,7 +317,7 @@ READ16_MEMBER(keycus_c431_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c431_device::write) +void keycus_c431_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -346,7 +346,7 @@ keycus_c432_device::keycus_c432_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c432_device::read) +uint16_t keycus_c432_device::read(offs_t offset) { if( m_p1 == 0x0000 && ( ( ( m_p3 == 0x0000 || m_p3 == 0x00dc ) && m_p2 == 0xefff ) || m_p3 == 0x2f15 ) ) { @@ -377,7 +377,7 @@ READ16_MEMBER(keycus_c432_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c432_device::write) +void keycus_c432_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -406,7 +406,7 @@ keycus_c442_device::keycus_c442_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c442_device::read) +uint16_t keycus_c442_device::read(offs_t offset) { if( ( offset == 0 && m_p1 == 0x0020 && m_p2 == 0x0000 ) || ( offset == 0 && m_p1 == 0x0020 && m_p2 == 0x0021 ) ) @@ -429,7 +429,7 @@ READ16_MEMBER(keycus_c442_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c442_device::write) +void keycus_c442_device::write(offs_t offset, uint16_t data) { switch( offset ) { @@ -454,7 +454,7 @@ keycus_c443_device::keycus_c443_device(const machine_config &mconfig, const char { } -READ16_MEMBER(keycus_c443_device::read) +uint16_t keycus_c443_device::read(offs_t offset) { if( offset == 0 && m_p1 == 0x0020 && ( m_p2 == 0x0000 || m_p2 == 0xffff || m_p2 == 0xffe0 ) ) { @@ -475,7 +475,7 @@ READ16_MEMBER(keycus_c443_device::read) return machine().rand(); } -WRITE16_MEMBER(keycus_c443_device::write) +void keycus_c443_device::write(offs_t offset, uint16_t data) { switch( offset ) { diff --git a/src/mame/machine/ns11prot.h b/src/mame/machine/ns11prot.h index f45eca27b7e..3622d323f34 100644 --- a/src/mame/machine/ns11prot.h +++ b/src/mame/machine/ns11prot.h @@ -23,8 +23,8 @@ protected: uint16_t m_p3; public: - virtual DECLARE_READ16_MEMBER( read ) = 0; - virtual DECLARE_WRITE16_MEMBER( write ) = 0; + virtual uint16_t read(offs_t offset) = 0; + virtual void write(offs_t offset, uint16_t data) = 0; }; /* tekken 2 */ @@ -34,8 +34,8 @@ class keycus_c406_device : public ns11_keycus_device public: keycus_c406_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C406, keycus_c406_device) @@ -47,8 +47,8 @@ class keycus_c409_device : public ns11_keycus_device public: keycus_c409_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C409, keycus_c409_device) @@ -60,8 +60,8 @@ class keycus_c410_device : public ns11_keycus_device public: keycus_c410_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C410, keycus_c410_device) @@ -73,8 +73,8 @@ class keycus_c411_device : public ns11_keycus_device public: keycus_c411_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C411, keycus_c411_device) @@ -86,8 +86,8 @@ class keycus_c430_device : public ns11_keycus_device public: keycus_c430_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C430, keycus_c430_device) @@ -99,8 +99,8 @@ class keycus_c431_device : public ns11_keycus_device public: keycus_c431_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C431, keycus_c431_device) @@ -112,8 +112,8 @@ class keycus_c432_device : public ns11_keycus_device public: keycus_c432_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C432, keycus_c432_device) @@ -125,8 +125,8 @@ class keycus_c442_device : public ns11_keycus_device public: keycus_c442_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C442, keycus_c442_device) @@ -138,8 +138,8 @@ class keycus_c443_device : public ns11_keycus_device public: keycus_c443_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ16_MEMBER( read ) override; - virtual DECLARE_WRITE16_MEMBER( write ) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data) override; }; DECLARE_DEVICE_TYPE(KEYCUS_C443, keycus_c443_device) diff --git a/src/mame/machine/ondra.cpp b/src/mame/machine/ondra.cpp index da540a00c30..35614a3f950 100644 --- a/src/mame/machine/ondra.cpp +++ b/src/mame/machine/ondra.cpp @@ -15,7 +15,7 @@ #include "cpu/z80/z80.h" -READ8_MEMBER(ondra_state::ondra_keyboard_r) +uint8_t ondra_state::ondra_keyboard_r(offs_t offset) { uint8_t retVal = 0x00; @@ -49,11 +49,11 @@ void ondra_state::ondra_update_banks() m_bank3->set_base(m_ram->pointer() + 0xe000); } else { space.unmap_write(0xe000, 0xffff); - space.install_read_handler (0xe000, 0xffff, read8_delegate(*this, FUNC(ondra_state::ondra_keyboard_r))); + space.install_read_handler (0xe000, 0xffff, read8sm_delegate(*this, FUNC(ondra_state::ondra_keyboard_r))); } } -WRITE8_MEMBER(ondra_state::ondra_port_03_w) +void ondra_state::ondra_port_03_w(uint8_t data) { m_video_enable = data & 1; m_bank1_status = (data >> 1) & 1; @@ -62,11 +62,11 @@ WRITE8_MEMBER(ondra_state::ondra_port_03_w) m_cassette->output(((data >> 3) & 1) ? -1.0 : +1.0); } -WRITE8_MEMBER(ondra_state::ondra_port_09_w) +void ondra_state::ondra_port_09_w(uint8_t data) { } -WRITE8_MEMBER(ondra_state::ondra_port_0a_w) +void ondra_state::ondra_port_0a_w(uint8_t data) { } diff --git a/src/mame/machine/orao.cpp b/src/mame/machine/orao.cpp index c1ee0467922..aa707d208dc 100644 --- a/src/mame/machine/orao.cpp +++ b/src/mame/machine/orao.cpp @@ -29,7 +29,7 @@ void orao_state::machine_reset() { } -READ8_MEMBER(orao_state::orao_io_r) +uint8_t orao_state::orao_io_r(offs_t offset) { double level; @@ -69,7 +69,7 @@ READ8_MEMBER(orao_state::orao_io_r) } -WRITE8_MEMBER(orao_state::orao_io_w) +void orao_state::orao_io_w(offs_t offset, uint8_t data) { if (offset == 0x0800) { diff --git a/src/mame/machine/orion.cpp b/src/mame/machine/orion.cpp index a5a457235f1..2f2f77109aa 100644 --- a/src/mame/machine/orion.cpp +++ b/src/mame/machine/orion.cpp @@ -47,22 +47,22 @@ void orion_state::machine_start() m_video_mode_mask = 7; } -READ8_MEMBER(orion_state::orion128_system_r) +uint8_t orion_state::orion128_system_r(offs_t offset) { return m_ppi8255_2->read(offset & 3); } -WRITE8_MEMBER(orion_state::orion128_system_w) +void orion_state::orion128_system_w(offs_t offset, uint8_t data) { m_ppi8255_2->write(offset & 3, data); } -READ8_MEMBER(orion_state::orion128_romdisk_r) +uint8_t orion_state::orion128_romdisk_r(offs_t offset) { return m_ppi8255_1->read(offset & 3); } -WRITE8_MEMBER(orion_state::orion128_romdisk_w) +void orion_state::orion128_romdisk_w(offs_t offset, uint8_t data) { m_ppi8255_1->write(offset & 3, data); } @@ -73,7 +73,7 @@ void orion_state::orion_set_video_mode(int width) m_screen->configure(width, 256, visarea, m_screen->frame_period().attoseconds()); } -WRITE8_MEMBER(orion_state::orion128_video_mode_w) +void orion_state::orion128_video_mode_w(uint8_t data) { if ((data & 0x80)!=(m_orion128_video_mode & 0x80)) { @@ -100,7 +100,7 @@ WRITE8_MEMBER(orion_state::orion128_video_mode_w) m_orion128_video_mode = data; } -WRITE8_MEMBER(orion_state::orion128_video_page_w) +void orion_state::orion128_video_page_w(uint8_t data) { if (m_orion128_video_page != data) { @@ -130,7 +130,7 @@ WRITE8_MEMBER(orion_state::orion128_video_page_w) } -WRITE8_MEMBER(orion_state::orion128_memory_page_w) +void orion_state::orion128_memory_page_w(uint8_t data) { if (data!=m_orion128_memory_page ) { @@ -151,7 +151,7 @@ void orion_state::machine_reset() radio86_init_keyboard(); } -WRITE8_MEMBER(orion_state::orion_disk_control_w) +void orion_state::orion_disk_control_w(uint8_t data) { floppy_connector *names[] = { m_fd0, m_fd1, m_fd2, m_fd3}; floppy_image_device *floppy = names[data & 3]->get_device(); @@ -161,7 +161,7 @@ WRITE8_MEMBER(orion_state::orion_disk_control_w) floppy->ss_w(((data & 0x10) >> 4) ^ 1); } -READ8_MEMBER(orion_state::orion128_floppy_r) +uint8_t orion_state::orion128_floppy_r(offs_t offset) { switch(offset) { @@ -177,7 +177,7 @@ READ8_MEMBER(orion_state::orion128_floppy_r) return 0xff; } -WRITE8_MEMBER(orion_state::orion128_floppy_w) +void orion_state::orion128_floppy_w(offs_t offset, uint8_t data) { switch(offset) { @@ -191,10 +191,10 @@ WRITE8_MEMBER(orion_state::orion128_floppy_w) case 0x13 : m_fdc->data_w(data);break; case 0x4 : case 0x14 : - case 0x20 : orion_disk_control_w(space, offset, data);break; + case 0x20 : orion_disk_control_w(data);break; } } -READ8_MEMBER(orion_state::orionz80_floppy_rtc_r) +uint8_t orion_state::orionz80_floppy_rtc_r(offs_t offset) { if ((offset >= 0x60) && (offset <= 0x6f)) { @@ -202,11 +202,11 @@ READ8_MEMBER(orion_state::orionz80_floppy_rtc_r) } else { - return orion128_floppy_r(space,offset); + return orion128_floppy_r(offset); } } -WRITE8_MEMBER(orion_state::orionz80_floppy_rtc_w) +void orion_state::orionz80_floppy_rtc_w(offs_t offset, uint8_t data) { if ((offset >= 0x60) && (offset <= 0x6f)) { @@ -214,7 +214,7 @@ WRITE8_MEMBER(orion_state::orionz80_floppy_rtc_w) } else { - orion128_floppy_w(space,offset,data); + orion128_floppy_w(offset,data); } } @@ -224,7 +224,7 @@ void orion_z80_state::machine_start() m_video_mode_mask = 7; } -WRITE8_MEMBER(orion_state::orionz80_sound_w) +void orion_state::orionz80_sound_w(uint8_t data) { if (m_speaker_data == 0) { @@ -238,7 +238,7 @@ WRITE8_MEMBER(orion_state::orionz80_sound_w) } -WRITE8_MEMBER(orion_state::orionz80_sound_fe_w) +void orion_state::orionz80_sound_fe_w(uint8_t data) { m_speaker->level_w(BIT(data, 4)); } @@ -267,19 +267,19 @@ void orion_state::orionz80_switch_bank() if ((m_orionz80_dispatcher & 0x20) == 0) { - space.install_write_handler(0xf400, 0xf4ff, write8_delegate(*this, FUNC(orion_state::orion128_system_w))); - space.install_write_handler(0xf500, 0xf5ff, write8_delegate(*this, FUNC(orion_state::orion128_romdisk_w))); - space.install_write_handler(0xf700, 0xf7ff, write8_delegate(*this, FUNC(orion_state::orionz80_floppy_rtc_w))); - space.install_read_handler(0xf400, 0xf4ff, read8_delegate(*this, FUNC(orion_state::orion128_system_r))); - space.install_read_handler(0xf500, 0xf5ff, read8_delegate(*this, FUNC(orion_state::orion128_romdisk_r))); - space.install_read_handler(0xf700, 0xf7ff, read8_delegate(*this, FUNC(orion_state::orionz80_floppy_rtc_r))); - - space.install_write_handler(0xf800, 0xf8ff, write8_delegate(*this, FUNC(orion_state::orion128_video_mode_w))); - space.install_write_handler(0xf900, 0xf9ff, write8_delegate(*this, FUNC(orion_state::orionz80_memory_page_w))); - space.install_write_handler(0xfa00, 0xfaff, write8_delegate(*this, FUNC(orion_state::orion128_video_page_w))); - space.install_write_handler(0xfb00, 0xfbff, write8_delegate(*this, FUNC(orion_state::orionz80_dispatcher_w))); + space.install_write_handler(0xf400, 0xf4ff, write8sm_delegate(*this, FUNC(orion_state::orion128_system_w))); + space.install_write_handler(0xf500, 0xf5ff, write8sm_delegate(*this, FUNC(orion_state::orion128_romdisk_w))); + space.install_write_handler(0xf700, 0xf7ff, write8sm_delegate(*this, FUNC(orion_state::orionz80_floppy_rtc_w))); + space.install_read_handler(0xf400, 0xf4ff, read8sm_delegate(*this, FUNC(orion_state::orion128_system_r))); + space.install_read_handler(0xf500, 0xf5ff, read8sm_delegate(*this, FUNC(orion_state::orion128_romdisk_r))); + space.install_read_handler(0xf700, 0xf7ff, read8sm_delegate(*this, FUNC(orion_state::orionz80_floppy_rtc_r))); + + space.install_write_handler(0xf800, 0xf8ff, write8smo_delegate(*this, FUNC(orion_state::orion128_video_mode_w))); + space.install_write_handler(0xf900, 0xf9ff, write8smo_delegate(*this, FUNC(orion_state::orionz80_memory_page_w))); + space.install_write_handler(0xfa00, 0xfaff, write8smo_delegate(*this, FUNC(orion_state::orion128_video_page_w))); + space.install_write_handler(0xfb00, 0xfbff, write8smo_delegate(*this, FUNC(orion_state::orionz80_dispatcher_w))); space.unmap_write(0xfc00, 0xfeff); - space.install_write_handler(0xff00, 0xffff, write8_delegate(*this, FUNC(orion_state::orionz80_sound_w))); + space.install_write_handler(0xff00, 0xffff, write8smo_delegate(*this, FUNC(orion_state::orionz80_sound_w))); m_bank3->set_base(m_ram->pointer() + 0xf000); m_bank5->set_base(m_region_maincpu->base() + 0xf800); @@ -294,13 +294,13 @@ void orion_state::orionz80_switch_bank() } } -WRITE8_MEMBER(orion_state::orionz80_memory_page_w) +void orion_state::orionz80_memory_page_w(uint8_t data) { m_orionz80_memory_page = data & 7; orionz80_switch_bank(); } -WRITE8_MEMBER(orion_state::orionz80_dispatcher_w) +void orion_state::orionz80_dispatcher_w(uint8_t data) { m_orionz80_dispatcher = data; orionz80_switch_bank(); @@ -314,19 +314,19 @@ void orion_z80_state::machine_reset() space.install_write_bank(0x4000, 0xefff, "bank2"); space.install_write_bank(0xf000, 0xf3ff, "bank3"); - space.install_write_handler(0xf400, 0xf4ff, write8_delegate(*this, FUNC(orion_z80_state::orion128_system_w))); - space.install_write_handler(0xf500, 0xf5ff, write8_delegate(*this, FUNC(orion_z80_state::orion128_romdisk_w))); - space.install_write_handler(0xf700, 0xf7ff, write8_delegate(*this, FUNC(orion_z80_state::orionz80_floppy_rtc_w))); - space.install_read_handler(0xf400, 0xf4ff, read8_delegate(*this, FUNC(orion_z80_state::orion128_system_r))); - space.install_read_handler(0xf500, 0xf5ff, read8_delegate(*this, FUNC(orion_z80_state::orion128_romdisk_r))); - space.install_read_handler(0xf700, 0xf7ff, read8_delegate(*this, FUNC(orion_z80_state::orionz80_floppy_rtc_r))); - - space.install_write_handler(0xf800, 0xf8ff, write8_delegate(*this, FUNC(orion_z80_state::orion128_video_mode_w))); - space.install_write_handler(0xf900, 0xf9ff, write8_delegate(*this, FUNC(orion_z80_state::orionz80_memory_page_w))); - space.install_write_handler(0xfa00, 0xfaff, write8_delegate(*this, FUNC(orion_z80_state::orion128_video_page_w))); - space.install_write_handler(0xfb00, 0xfbff, write8_delegate(*this, FUNC(orion_z80_state::orionz80_dispatcher_w))); + space.install_write_handler(0xf400, 0xf4ff, write8sm_delegate(*this, FUNC(orion_z80_state::orion128_system_w))); + space.install_write_handler(0xf500, 0xf5ff, write8sm_delegate(*this, FUNC(orion_z80_state::orion128_romdisk_w))); + space.install_write_handler(0xf700, 0xf7ff, write8sm_delegate(*this, FUNC(orion_z80_state::orionz80_floppy_rtc_w))); + space.install_read_handler(0xf400, 0xf4ff, read8sm_delegate(*this, FUNC(orion_z80_state::orion128_system_r))); + space.install_read_handler(0xf500, 0xf5ff, read8sm_delegate(*this, FUNC(orion_z80_state::orion128_romdisk_r))); + space.install_read_handler(0xf700, 0xf7ff, read8sm_delegate(*this, FUNC(orion_z80_state::orionz80_floppy_rtc_r))); + + space.install_write_handler(0xf800, 0xf8ff, write8smo_delegate(*this, FUNC(orion_z80_state::orion128_video_mode_w))); + space.install_write_handler(0xf900, 0xf9ff, write8smo_delegate(*this, FUNC(orion_z80_state::orionz80_memory_page_w))); + space.install_write_handler(0xfa00, 0xfaff, write8smo_delegate(*this, FUNC(orion_z80_state::orion128_video_page_w))); + space.install_write_handler(0xfb00, 0xfbff, write8smo_delegate(*this, FUNC(orion_z80_state::orionz80_dispatcher_w))); space.unmap_write(0xfc00, 0xfeff); - space.install_write_handler(0xff00, 0xffff, write8_delegate(*this, FUNC(orion_z80_state::orionz80_sound_w))); + space.install_write_handler(0xff00, 0xffff, write8smo_delegate(*this, FUNC(orion_z80_state::orionz80_sound_w))); m_bank1->set_base(m_region_maincpu->base() + 0xf800); @@ -353,7 +353,7 @@ INTERRUPT_GEN_MEMBER(orion_state::orionz80_interrupt) } } -READ8_MEMBER(orion_state::orionz80_io_r) +uint8_t orion_state::orionz80_io_r(offs_t offset) { if (offset == 0xFFFD) { @@ -362,16 +362,16 @@ READ8_MEMBER(orion_state::orionz80_io_r) return 0xff; } -WRITE8_MEMBER(orion_state::orionz80_io_w) +void orion_state::orionz80_io_w(offs_t offset, uint8_t data) { switch (offset & 0xff) { - case 0xf8 : orion128_video_mode_w(space,0,data);break; - case 0xf9 : orionz80_memory_page_w(space,0,data);break; - case 0xfa : orion128_video_page_w(space,0,data);break; - case 0xfb : orionz80_dispatcher_w(space,0,data);break; - case 0xfe : orionz80_sound_fe_w(space,0,data);break; - case 0xff : orionz80_sound_w(space,0,data);break; + case 0xf8 : orion128_video_mode_w(data);break; + case 0xf9 : orionz80_memory_page_w(data);break; + case 0xfa : orion128_video_page_w(data);break; + case 0xfb : orionz80_dispatcher_w(data);break; + case 0xfe : orionz80_sound_fe_w(data);break; + case 0xff : orionz80_sound_w(data);break; } switch(offset) { @@ -455,20 +455,20 @@ void orion_state::orionpro_bank_switch() { m_bank6->set_base(ram + 0x10000 * 0 + 0xf000); - space.install_write_handler(0xf400, 0xf4ff, write8_delegate(*this, FUNC(orion_state::orion128_system_w))); - space.install_write_handler(0xf500, 0xf5ff, write8_delegate(*this, FUNC(orion_state::orion128_romdisk_w))); + space.install_write_handler(0xf400, 0xf4ff, write8sm_delegate(*this, FUNC(orion_state::orion128_system_w))); + space.install_write_handler(0xf500, 0xf5ff, write8sm_delegate(*this, FUNC(orion_state::orion128_romdisk_w))); space.unmap_write(0xf600, 0xf6ff); - space.install_write_handler(0xf700, 0xf7ff, write8_delegate(*this, FUNC(orion_state::orion128_floppy_w))); - space.install_read_handler(0xf400, 0xf4ff, read8_delegate(*this, FUNC(orion_state::orion128_system_r))); - space.install_read_handler(0xf500, 0xf5ff, read8_delegate(*this, FUNC(orion_state::orion128_romdisk_r))); + space.install_write_handler(0xf700, 0xf7ff, write8sm_delegate(*this, FUNC(orion_state::orion128_floppy_w))); + space.install_read_handler(0xf400, 0xf4ff, read8sm_delegate(*this, FUNC(orion_state::orion128_system_r))); + space.install_read_handler(0xf500, 0xf5ff, read8sm_delegate(*this, FUNC(orion_state::orion128_romdisk_r))); space.unmap_read(0xf600, 0xf6ff); - space.install_read_handler(0xf700, 0xf7ff, read8_delegate(*this, FUNC(orion_state::orion128_floppy_r))); + space.install_read_handler(0xf700, 0xf7ff, read8sm_delegate(*this, FUNC(orion_state::orion128_floppy_r))); - space.install_write_handler(0xf800, 0xf8ff, write8_delegate(*this, FUNC(orion_state::orion128_video_mode_w))); - space.install_write_handler(0xf900, 0xf9ff, write8_delegate(*this, FUNC(orion_state::orionpro_memory_page_w))); - space.install_write_handler(0xfa00, 0xfaff, write8_delegate(*this, FUNC(orion_state::orion128_video_page_w))); + space.install_write_handler(0xf800, 0xf8ff, write8smo_delegate(*this, FUNC(orion_state::orion128_video_mode_w))); + space.install_write_handler(0xf900, 0xf9ff, write8smo_delegate(*this, FUNC(orion_state::orionpro_memory_page_w))); + space.install_write_handler(0xfa00, 0xfaff, write8smo_delegate(*this, FUNC(orion_state::orion128_video_page_w))); space.unmap_write(0xfb00, 0xfeff); - space.install_write_handler(0xff00, 0xffff, write8_delegate(*this, FUNC(orion_state::orionz80_sound_w))); + space.install_write_handler(0xff00, 0xffff, write8smo_delegate(*this, FUNC(orion_state::orionz80_sound_w))); m_bank8->set_base(ram + 0x10000 * 0 + 0xf800); @@ -490,7 +490,7 @@ void orion_state::orionpro_bank_switch() } } -WRITE8_MEMBER(orion_state::orionpro_memory_page_w) +void orion_state::orionpro_memory_page_w(uint8_t data) { m_orionpro_128_page = data; orionpro_bank_switch(); @@ -521,7 +521,7 @@ void orion_pro_state::machine_reset() m_orionpro_pseudo_color = 0; } -READ8_MEMBER(orion_state::orionpro_io_r) +uint8_t orion_state::orionpro_io_r(offs_t offset) { switch (offset & 0xff) { @@ -540,11 +540,11 @@ READ8_MEMBER(orion_state::orionpro_io_r) case 0x19 : case 0x1a : case 0x1b : - return orion128_system_r(space,(offset & 0xff)-0x18); - case 0x28 : return orion128_romdisk_r(space,0); - case 0x29 : return orion128_romdisk_r(space,1); - case 0x2a : return orion128_romdisk_r(space,2); - case 0x2b : return orion128_romdisk_r(space,3); + return orion128_system_r((offset & 0xff)-0x18); + case 0x28 : return orion128_romdisk_r(0); + case 0x29 : return orion128_romdisk_r(1); + case 0x2a : return orion128_romdisk_r(2); + case 0x2b : return orion128_romdisk_r(3); } if (offset == 0xFFFD) { @@ -553,7 +553,7 @@ READ8_MEMBER(orion_state::orionpro_io_r) return 0xff; } -WRITE8_MEMBER(orion_state::orionpro_io_w) +void orion_state::orionpro_io_w(offs_t offset, uint8_t data) { switch (offset & 0xff) { @@ -567,22 +567,22 @@ WRITE8_MEMBER(orion_state::orionpro_io_w) case 0x11 : m_fdc->track_w(data);break; case 0x12 : m_fdc->sector_w(data);break; case 0x13 : m_fdc->data_w(data);break; - case 0x14 : orion_disk_control_w(space, 9, data);break; + case 0x14 : orion_disk_control_w(data);break; case 0x18 : case 0x19 : case 0x1a : case 0x1b : - orion128_system_w(space,(offset & 0xff)-0x18,data); break; - case 0x28 : orion128_romdisk_w(space,0,data); break; - case 0x29 : orion128_romdisk_w(space,1,data); break; - case 0x2a : orion128_romdisk_w(space,2,data); break; - case 0x2b : orion128_romdisk_w(space,3,data); break; - case 0xf8 : orion128_video_mode_w(space,0,data);break; + orion128_system_w((offset & 0xff)-0x18,data); break; + case 0x28 : orion128_romdisk_w(0,data); break; + case 0x29 : orion128_romdisk_w(1,data); break; + case 0x2a : orion128_romdisk_w(2,data); break; + case 0x2b : orion128_romdisk_w(3,data); break; + case 0xf8 : orion128_video_mode_w(data);break; case 0xf9 : m_orionpro_128_page = data; orionpro_bank_switch(); break; - case 0xfa : orion128_video_page_w(space,0,data);break; + case 0xfa : orion128_video_page_w(data);break; case 0xfc : m_orionpro_pseudo_color = data;break; - case 0xfe : orionz80_sound_fe_w(space,0,data);break; - case 0xff : orionz80_sound_w(space,0,data);break; + case 0xfe : orionz80_sound_fe_w(data);break; + case 0xff : orionz80_sound_w(data);break; } switch(offset) { diff --git a/src/mame/machine/osborne1.cpp b/src/mame/machine/osborne1.cpp index a715f3af65d..932cabea96b 100644 --- a/src/mame/machine/osborne1.cpp +++ b/src/mame/machine/osborne1.cpp @@ -13,19 +13,19 @@ There are three IRQ sources: #include "includes/osborne1.h" -WRITE8_MEMBER( osborne1_state::bank_0xxx_w ) +void osborne1_state::bank_0xxx_w(offs_t offset, u8 data) { if (!rom_mode()) m_ram->pointer()[offset] = data; } -WRITE8_MEMBER( osborne1_state::bank_1xxx_w ) +void osborne1_state::bank_1xxx_w(offs_t offset, u8 data) { if (!rom_mode()) m_ram->pointer()[0x1000 + offset] = data; } -READ8_MEMBER( osborne1_state::bank_2xxx_3xxx_r ) +u8 osborne1_state::bank_2xxx_3xxx_r(offs_t offset) { if (!rom_mode()) return m_ram->pointer()[0x2000 + offset]; @@ -33,7 +33,7 @@ READ8_MEMBER( osborne1_state::bank_2xxx_3xxx_r ) // Since each peripheral only checks two bits, many addresses will // result in multiple peripherals attempting to drive the bus. This is // simulated by ANDing all the values together. - uint8_t data = 0xFF; + u8 data = 0xFF; if ((offset & 0x900) == 0x100) // Floppy data &= m_fdc->read(offset & 0x03); if ((offset & 0x900) == 0x900) // IEEE488 PIA @@ -55,7 +55,7 @@ READ8_MEMBER( osborne1_state::bank_2xxx_3xxx_r ) return data; } -WRITE8_MEMBER( osborne1_state::bank_2xxx_3xxx_w ) +void osborne1_state::bank_2xxx_3xxx_w(offs_t offset, u8 data) { if (!rom_mode()) { @@ -77,9 +77,9 @@ WRITE8_MEMBER( osborne1_state::bank_2xxx_3xxx_w ) } } -READ8_MEMBER( osborne1sp_state::bank_2xxx_3xxx_r ) +u8 osborne1sp_state::bank_2xxx_3xxx_r(offs_t offset) { - uint8_t data = osborne1_state::bank_2xxx_3xxx_r(space, offset, mem_mask); + u8 data = osborne1_state::bank_2xxx_3xxx_r(offset); if (!rom_mode()) return data; @@ -90,9 +90,9 @@ READ8_MEMBER( osborne1sp_state::bank_2xxx_3xxx_r ) return data; } -WRITE8_MEMBER( osborne1sp_state::bank_2xxx_3xxx_w ) +void osborne1sp_state::bank_2xxx_3xxx_w(offs_t offset, u8 data) { - osborne1_state::bank_2xxx_3xxx_w(space, offset, data, mem_mask); + osborne1_state::bank_2xxx_3xxx_w(offset, data); if (rom_mode()) { @@ -104,22 +104,22 @@ WRITE8_MEMBER( osborne1sp_state::bank_2xxx_3xxx_w ) } } -WRITE8_MEMBER( osborne1_state::videoram_w ) +void osborne1_state::videoram_w(offs_t offset, u8 data) { // Attribute RAM is only one bit wide - low seven bits are discarded and read back high if (m_bit_9) data |= 0x7F; else m_tilemap->mark_tile_dirty(offset); - reinterpret_cast(m_bank_fxxx->base())[offset] = data; + reinterpret_cast(m_bank_fxxx->base())[offset] = data; } -READ8_MEMBER( osborne1_state::opcode_r ) +u8 osborne1_state::opcode_r(offs_t offset) { if (!machine().side_effects_disabled()) { // Update the flipflops that control bank selection and NMI - uint8_t const new_ub6a_q = (m_btn_reset->read() & 0x80) ? 1 : 0; + u8 const new_ub6a_q = (m_btn_reset->read() & 0x80) ? 1 : 0; if (!rom_mode()) { set_rom_mode(m_ub4a_q ? 0 : 1); @@ -133,7 +133,7 @@ READ8_MEMBER( osborne1_state::opcode_r ) return m_mem_cache.read_byte(offset); } -WRITE8_MEMBER( osborne1_state::bankswitch_w ) +void osborne1_state::bankswitch_w(offs_t offset, u8 data) { switch (offset) { @@ -167,7 +167,7 @@ WRITE_LINE_MEMBER( osborne1_state::irqack_w ) } -uint8_t osborne1_state::ieee_pia_pb_r() +u8 osborne1_state::ieee_pia_pb_r() { /* bit description @@ -181,7 +181,7 @@ uint8_t osborne1_state::ieee_pia_pb_r() 6 NDAC 7 NRFD */ - uint8_t data = 0; + u8 data = 0; data |= m_ieee->eoi_r() << 3; data |= m_ieee->dav_r() << 5; @@ -191,7 +191,7 @@ uint8_t osborne1_state::ieee_pia_pb_r() return data; } -void osborne1_state::ieee_pia_pb_w(uint8_t data) +void osborne1_state::ieee_pia_pb_w(u8 data) { /* bit description @@ -218,14 +218,14 @@ WRITE_LINE_MEMBER( osborne1_state::ieee_pia_irq_a_func ) } -void osborne1_state::video_pia_port_a_w(uint8_t data) +void osborne1_state::video_pia_port_a_w(u8 data) { m_scroll_x = data >> 1; m_fdc->dden_w(BIT(data, 0)); } -void osborne1_state::video_pia_port_b_w(uint8_t data) +void osborne1_state::video_pia_port_b_w(u8 data) { m_speaker->level_w((BIT(data, 5) && m_beep_state) ? 1 : 0); @@ -381,17 +381,17 @@ inline void osborne1_state::draw_rows(uint16_t col, bitmap_ind16 &bitmap, const m_scroll_y = m_pia1->b_output() & 0x1F; // Draw a line of the display - uint8_t const ra(y % 10); + u8 const ra(y % 10); uint16_t *p(&bitmap.pix16(y)); uint16_t const row(((m_scroll_y + (y / 10)) << 7) & 0x0F80); for (uint16_t x = 0; Width > x; ++x) { uint16_t const offs(row | ((col + x) & 0x7F)); - uint8_t const chr(m_ram->pointer()[0xF000 + offs]); - uint8_t const clr((m_ram->pointer()[0x10000 + offs] & 0x80) ? 2 : 1); + u8 const chr(m_ram->pointer()[0xF000 + offs]); + u8 const clr((m_ram->pointer()[0x10000 + offs] & 0x80) ? 2 : 1); - uint8_t const gfx(((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[(ra << 7) | (chr & 0x7F)]); + u8 const gfx(((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_chargen[(ra << 7) | (chr & 0x7F)]); // Display a scanline of a character for (unsigned b = 0; 8 > b; ++b) @@ -460,7 +460,7 @@ uint32_t osborne1sp_state::screen_update(screen_device &screen, bitmap_ind16 &bi TIMER_CALLBACK_MEMBER(osborne1_state::video_callback) { int const y(m_screen->vpos()); - uint8_t const ra(y % 10); + u8 const ra(y % 10); // The beeper is gated so it's active four out of every ten scanlines m_beep_state = (ra & 0x04) ? 1 : 0; @@ -484,7 +484,7 @@ TILE_GET_INFO_MEMBER(osborne1_state::get_tile_info) } -bool osborne1_state::set_rom_mode(uint8_t value) +bool osborne1_state::set_rom_mode(u8 value) { if (value != m_rom_mode) { @@ -499,7 +499,7 @@ bool osborne1_state::set_rom_mode(uint8_t value) } } -bool osborne1_state::set_bit_9(uint8_t value) +bool osborne1_state::set_bit_9(u8 value) { if (value != m_bit_9) { @@ -540,13 +540,13 @@ MC6845_UPDATE_ROW(osborne1nv_state::crtc_update_row) rgb_t const *const palette = m_palette->palette()->entry_list_raw(); uint16_t const base = (ma >> 1) & 0xF80; uint32_t *p = &bitmap.pix32(y); - for (uint8_t x = 0; x < x_count; ++x) + for (u8 x = 0; x < x_count; ++x) { uint16_t const offset = base | ((ma + x) & 0x7F); - uint8_t const chr = m_ram->pointer()[0xF000 | offset]; - uint8_t const clr = BIT(m_ram->pointer()[0x10000 | offset], 7) ? 2 : 1; + u8 const chr = m_ram->pointer()[0xF000 | offset]; + u8 const clr = BIT(m_ram->pointer()[0x10000 | offset], 7) ? 2 : 1; - uint8_t const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_nuevo[(ra << 7) | (chr & 0x7F)]; + u8 const gfx = ((chr & 0x80) && (ra == 9)) ? 0xFF : m_p_nuevo[(ra << 7) | (chr & 0x7F)]; for (unsigned bit = 0; 8 > bit; ++bit) *p++ = palette[BIT(gfx, 7 - bit) ? clr : 0]; diff --git a/src/mame/video/m10.cpp b/src/mame/video/m10.cpp index bf770252b75..3a0a233c961 100644 --- a/src/mame/video/m10.cpp +++ b/src/mame/video/m10.cpp @@ -56,7 +56,7 @@ TILE_GET_INFO_MEMBER(m10_state::get_tile_info) } -WRITE8_MEMBER(m10_state::m10_colorram_w) +void m10_state::m10_colorram_w(offs_t offset, uint8_t data) { if (m_colorram[offset] != data) { @@ -66,7 +66,7 @@ WRITE8_MEMBER(m10_state::m10_colorram_w) } -WRITE8_MEMBER(m10_state::m10_chargen_w) +void m10_state::m10_chargen_w(offs_t offset, uint8_t data) { if (m_chargen[offset] != data) { @@ -76,7 +76,7 @@ WRITE8_MEMBER(m10_state::m10_chargen_w) } -WRITE8_MEMBER(m10_state::m15_chargen_w) +void m10_state::m15_chargen_w(offs_t offset, uint8_t data) { if (m_chargen[offset] != data) { diff --git a/src/mame/video/m52.cpp b/src/mame/video/m52.cpp index 3749864b29d..4f2c725a551 100644 --- a/src/mame/video/m52.cpp +++ b/src/mame/video/m52.cpp @@ -193,7 +193,7 @@ void m52_alpha1v_state::video_start() * *************************************/ -WRITE8_MEMBER(m52_state::m52_scroll_w) +void m52_state::m52_scroll_w(uint8_t data) { /* According to the schematics there is only one video register that holds the X scroll value @@ -208,7 +208,7 @@ WRITE8_MEMBER(m52_state::m52_scroll_w) m_tx_tilemap->set_scrollx(3, -(data + 1)); } -WRITE8_MEMBER(m52_alpha1v_state::m52_scroll_w) +void m52_alpha1v_state::m52_scroll_w(uint8_t data) { /* alpha1v must have some board mod to invert scroll register use, as it expects only the first block to remain static @@ -229,14 +229,14 @@ WRITE8_MEMBER(m52_alpha1v_state::m52_scroll_w) * *************************************/ -WRITE8_MEMBER(m52_state::m52_videoram_w) +void m52_state::m52_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_tx_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(m52_state::m52_colorram_w) +void m52_state::m52_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_tx_tilemap->mark_tile_dirty(offset); @@ -253,7 +253,7 @@ WRITE8_MEMBER(m52_state::m52_colorram_w) /* This looks like some kind of protection implemented by a custom chip on the scroll board. It mangles the value written to the port m52_bg1xpos_w, as follows: result = popcount(value & 0x7f) ^ (value >> 7) */ -READ8_MEMBER(m52_state::m52_protection_r) +uint8_t m52_state::m52_protection_r() { int popcount = 0; int temp; @@ -271,27 +271,27 @@ READ8_MEMBER(m52_state::m52_protection_r) * *************************************/ -WRITE8_MEMBER(m52_state::m52_bg1ypos_w) +void m52_state::m52_bg1ypos_w(uint8_t data) { m_bg1ypos = data; } -WRITE8_MEMBER(m52_state::m52_bg1xpos_w) +void m52_state::m52_bg1xpos_w(uint8_t data) { m_bg1xpos = data; } -WRITE8_MEMBER(m52_state::m52_bg2xpos_w) +void m52_state::m52_bg2xpos_w(uint8_t data) { m_bg2xpos = data; } -WRITE8_MEMBER(m52_state::m52_bg2ypos_w) +void m52_state::m52_bg2ypos_w(uint8_t data) { m_bg2ypos = data; } -WRITE8_MEMBER(m52_state::m52_bgcontrol_w) +void m52_state::m52_bgcontrol_w(uint8_t data) { m_bgcontrol = data; } @@ -304,7 +304,7 @@ WRITE8_MEMBER(m52_state::m52_bgcontrol_w) * *************************************/ -WRITE8_MEMBER(m52_state::m52_flipscreen_w) +void m52_state::m52_flipscreen_w(uint8_t data) { /* screen flip is handled both by software and hardware */ flip_screen_set((data & 0x01) ^ (~ioport("DSW2")->read() & 0x01)); @@ -313,7 +313,7 @@ WRITE8_MEMBER(m52_state::m52_flipscreen_w) machine().bookkeeping().coin_counter_w(1, data & 0x20); } -WRITE8_MEMBER(m52_alpha1v_state::alpha1v_flipscreen_w) +void m52_alpha1v_state::alpha1v_flipscreen_w(uint8_t data) { flip_screen_set(data & 0x01); } diff --git a/src/mame/video/m57.cpp b/src/mame/video/m57.cpp index 62b496edc71..1fbd130292e 100644 --- a/src/mame/video/m57.cpp +++ b/src/mame/video/m57.cpp @@ -123,7 +123,7 @@ TILE_GET_INFO_MEMBER(m57_state::get_tile_info) * *************************************/ -WRITE8_MEMBER(m57_state::m57_videoram_w) +void m57_state::m57_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); @@ -151,7 +151,7 @@ void m57_state::video_start() * *************************************/ -WRITE8_MEMBER(m57_state::m57_flipscreen_w) +void m57_state::m57_flipscreen_w(uint8_t data) { /* screen flip is handled both by software and hardware */ m_flipscreen = (data & 0x01) ^ (~ioport("DSW2")->read() & 0x01); diff --git a/src/mame/video/m58.cpp b/src/mame/video/m58.cpp index e36d9216be1..f39d9936556 100644 --- a/src/mame/video/m58.cpp +++ b/src/mame/video/m58.cpp @@ -101,14 +101,14 @@ void m58_state::m58_palette(palette_device &palette) const * *************************************/ -WRITE8_MEMBER(m58_state::videoram_w) +void m58_state::videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(m58_state::scroll_panel_w) +void m58_state::scroll_panel_w(offs_t offset, uint8_t data) { int sx = ( offset % 16 ); int sy = ( offset / 16 ); @@ -184,7 +184,7 @@ void m58_state::video_start() * *************************************/ -WRITE8_MEMBER(m58_state::flipscreen_w) +void m58_state::flipscreen_w(uint8_t data) { /* screen flip is handled both by software and hardware */ flip_screen_set(BIT(data, 0) ^ BIT(~ioport("DSW2")->read(), 0)); diff --git a/src/mame/video/m62.cpp b/src/mame/video/m62.cpp index bb6579dda2e..eebc7e3b1ca 100644 --- a/src/mame/video/m62.cpp +++ b/src/mame/video/m62.cpp @@ -227,7 +227,7 @@ void m62_state::register_savestate() } -WRITE8_MEMBER(m62_state::m62_flipscreen_w) +void m62_state::m62_flipscreen_w(uint8_t data) { /* screen flip is handled both by software and hardware */ data ^= ((~ioport("DSW2")->read()) & 1); @@ -246,33 +246,33 @@ WRITE8_MEMBER(m62_state::m62_flipscreen_w) m_audio->m_audio_SINH->write((data >> 3) & 1); } -WRITE8_MEMBER(m62_state::m62_hscroll_low_w) +void m62_state::m62_hscroll_low_w(uint8_t data) { m_m62_background_hscroll = (m_m62_background_hscroll & 0xff00) | data; } -WRITE8_MEMBER(m62_state::m62_hscroll_high_w) +void m62_state::m62_hscroll_high_w(uint8_t data) { m_m62_background_hscroll = (m_m62_background_hscroll & 0xff) | (data << 8); } -WRITE8_MEMBER(m62_state::m62_vscroll_low_w) +void m62_state::m62_vscroll_low_w(uint8_t data) { m_m62_background_vscroll = (m_m62_background_vscroll & 0xff00) | data; } -WRITE8_MEMBER(m62_state::m62_vscroll_high_w) +void m62_state::m62_vscroll_high_w(uint8_t data) { m_m62_background_vscroll = (m_m62_background_vscroll & 0xff) | (data << 8); } -WRITE8_MEMBER(m62_state::m62_tileram_w) +void m62_state::m62_tileram_w(offs_t offset, uint8_t data) { m_m62_tileram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset >> 1); } -WRITE8_MEMBER(m62_state::m62_textram_w) +void m62_state::m62_textram_w(offs_t offset, uint8_t data) { m_m62_textram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset >> 1); @@ -361,7 +361,7 @@ void m62_state::m62_textlayer(tilemap_get_info_delegate tile_get_info, int rows, m_fg_tilemap->set_scroll_cols(cols); } -WRITE8_MEMBER(m62_state::kungfum_tileram_w) +void m62_state::kungfum_tileram_w(offs_t offset, uint8_t data) { m_m62_tileram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x7ff); @@ -476,7 +476,7 @@ VIDEO_START_MEMBER(m62_state,ldrun2) } -WRITE8_MEMBER(m62_state::ldrun3_topbottom_mask_w) +void m62_state::ldrun3_topbottom_mask_w(uint8_t data) { m_ldrun3_topbottom_mask = data & 1; } @@ -626,17 +626,17 @@ uint32_t m62_state::screen_update_lotlot(screen_device &screen, bitmap_rgb32 &bi } -WRITE8_MEMBER(m62_state::kidniki_text_vscroll_low_w) +void m62_state::kidniki_text_vscroll_low_w(uint8_t data) { m_kidniki_text_vscroll = (m_kidniki_text_vscroll & 0xff00) | data; } -WRITE8_MEMBER(m62_state::kidniki_text_vscroll_high_w) +void m62_state::kidniki_text_vscroll_high_w(uint8_t data) { m_kidniki_text_vscroll = (m_kidniki_text_vscroll & 0xff) | (data << 8); } -WRITE8_MEMBER(m62_state::kidniki_background_bank_w) +void m62_state::kidniki_background_bank_w(uint8_t data) { if (m_kidniki_background_bank != (data & 1)) { @@ -690,7 +690,7 @@ uint32_t m62_state::screen_update_kidniki(screen_device &screen, bitmap_rgb32 &b } -WRITE8_MEMBER(m62_state::spelunkr_palbank_w) +void m62_state::spelunkr_palbank_w(uint8_t data) { if (m_spelunkr_palbank != (data & 0x01)) { @@ -740,10 +740,10 @@ uint32_t m62_state::screen_update_spelunkr(screen_device &screen, bitmap_rgb32 & } -WRITE8_MEMBER(m62_state::spelunk2_gfxport_w) +void m62_state::spelunk2_gfxport_w(uint8_t data) { - m62_hscroll_high_w(space, 0, (data & 2) >> 1); - m62_vscroll_high_w(space, 0, (data & 1)); + m62_hscroll_high_w((data & 2) >> 1); + m62_vscroll_high_w((data & 1)); if (m_spelunkr_palbank != ((data & 0x0c) >> 2)) { m_spelunkr_palbank = (data & 0x0c) >> 2; @@ -827,7 +827,7 @@ uint32_t m62_state::screen_update_youjyudn(screen_device &screen, bitmap_rgb32 & } -WRITE8_MEMBER(m62_state::horizon_scrollram_w) +void m62_state::horizon_scrollram_w(offs_t offset, uint8_t data) { m_scrollram[offset] = data; } diff --git a/src/mame/video/madalien.cpp b/src/mame/video/madalien.cpp index 3ab2a3e0d94..7c1c2154b3c 100644 --- a/src/mame/video/madalien.cpp +++ b/src/mame/video/madalien.cpp @@ -109,7 +109,7 @@ TILE_GET_INFO_MEMBER(madalien_state::get_tile_info_FG) tileinfo.set(0, m_videoram[tile_index], 0, 0); } -WRITE8_MEMBER(madalien_state::madalien_videoram_w) +void madalien_state::madalien_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_tilemap_fg->mark_tile_dirty(offset); @@ -224,7 +224,7 @@ void madalien_state::draw_foreground(screen_device &screen, bitmap_ind16 &bitmap } -WRITE8_MEMBER(madalien_state::madalien_charram_w) +void madalien_state::madalien_charram_w(offs_t offset, uint8_t data) { m_charram[offset] = data; m_gfxdecode->gfx(0)->mark_dirty((offset/8) & 0xff); diff --git a/src/mame/video/mainsnk.cpp b/src/mame/video/mainsnk.cpp index 5fe7dda54cb..0eb25fbcadc 100644 --- a/src/mame/video/mainsnk.cpp +++ b/src/mame/video/mainsnk.cpp @@ -82,7 +82,7 @@ void mainsnk_state::video_start() } -WRITE8_MEMBER(mainsnk_state::c600_w) +void mainsnk_state::c600_w(uint8_t data) { int total_elements = m_gfxdecode->gfx(0)->elements(); @@ -104,13 +104,13 @@ WRITE8_MEMBER(mainsnk_state::c600_w) } } -WRITE8_MEMBER(mainsnk_state::fgram_w) +void mainsnk_state::fgram_w(offs_t offset, uint8_t data) { m_fgram[offset] = data; m_tx_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mainsnk_state::bgram_w) +void mainsnk_state::bgram_w(offs_t offset, uint8_t data) { m_bgram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); diff --git a/src/mame/video/malzak.cpp b/src/mame/video/malzak.cpp index 1f29da89974..efc9f7ce1b3 100644 --- a/src/mame/video/malzak.cpp +++ b/src/mame/video/malzak.cpp @@ -31,14 +31,14 @@ uint8_t malzak_state::videoram_r(offs_t offset) return m_videoram[offset]; } -WRITE8_MEMBER(malzak_state::port60_w) +void malzak_state::port60_w(uint8_t data) { m_scrollx = data; // logerror("I/O: port 0x60 write 0x%02x\n", data); m_playfield_tilemap->set_scrollx(0, m_scrollx + 48); } -WRITE8_MEMBER(malzak_state::portc0_w) +void malzak_state::portc0_w(uint8_t data) { m_scrolly = data; // logerror("I/O: port 0xc0 write 0x%02x\n", data); @@ -46,7 +46,7 @@ WRITE8_MEMBER(malzak_state::portc0_w) } //TODO: how readback works with this arrangement? Never occurs in-game -WRITE8_MEMBER(malzak_state::playfield_w) +void malzak_state::playfield_w(offs_t offset, uint8_t data) { int tile = ((m_scrollx / 16) * 16) + (offset / 16); diff --git a/src/mame/video/mappy.cpp b/src/mame/video/mappy.cpp index d9ad09fbe91..215f2d281a5 100644 --- a/src/mame/video/mappy.cpp +++ b/src/mame/video/mappy.cpp @@ -335,30 +335,30 @@ VIDEO_START_MEMBER(mappy_state,mappy) ***************************************************************************/ -WRITE8_MEMBER(mappy_state::superpac_videoram_w) +void mappy_state::superpac_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(mappy_state::mappy_videoram_w) +void mappy_state::mappy_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x7ff); } -WRITE8_MEMBER(mappy_state::superpac_flipscreen_w) +void mappy_state::superpac_flipscreen_w(uint8_t data) { flip_screen_set(data & 1); } -READ8_MEMBER(mappy_state::superpac_flipscreen_r) +uint8_t mappy_state::superpac_flipscreen_r() { flip_screen_set(1); return 0xff; } -WRITE8_MEMBER(mappy_state::mappy_scroll_w) +void mappy_state::mappy_scroll_w(offs_t offset, uint8_t data) { m_scroll = offset >> 3; } diff --git a/src/mame/video/marineb.cpp b/src/mame/video/marineb.cpp index 25159883fca..2f6f4422357 100644 --- a/src/mame/video/marineb.cpp +++ b/src/mame/video/marineb.cpp @@ -84,27 +84,27 @@ void marineb_state::video_start() * *************************************/ -WRITE8_MEMBER(marineb_state::marineb_videoram_w) +void marineb_state::marineb_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(marineb_state::marineb_colorram_w) +void marineb_state::marineb_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(marineb_state::marineb_column_scroll_w) +void marineb_state::marineb_column_scroll_w(uint8_t data) { m_column_scroll = data; } -WRITE8_MEMBER(marineb_state::marineb_palette_bank_0_w) +void marineb_state::marineb_palette_bank_0_w(uint8_t data) { uint8_t old = m_palette_bank; @@ -117,7 +117,7 @@ WRITE8_MEMBER(marineb_state::marineb_palette_bank_0_w) } -WRITE8_MEMBER(marineb_state::marineb_palette_bank_1_w) +void marineb_state::marineb_palette_bank_1_w(uint8_t data) { uint8_t old = m_palette_bank; diff --git a/src/mame/video/mario.cpp b/src/mame/video/mario.cpp index 47d2fa9212b..c6526cc919f 100644 --- a/src/mame/video/mario.cpp +++ b/src/mame/video/mario.cpp @@ -78,7 +78,7 @@ void mario_state::mario_palette(palette_device &palette) const palette.palette()->normalize_range(0, 255); } -WRITE8_MEMBER(mario_state::mario_videoram_w) +void mario_state::mario_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); @@ -96,7 +96,7 @@ WRITE_LINE_MEMBER(mario_state::palette_bank_w) machine().tilemap().mark_all_dirty(); } -WRITE8_MEMBER(mario_state::mario_scroll_w) +void mario_state::mario_scroll_w(uint8_t data) { m_gfx_scroll = data + 17; } diff --git a/src/mame/video/markham.cpp b/src/mame/video/markham.cpp index 78eddae8360..380bd980cbc 100644 --- a/src/mame/video/markham.cpp +++ b/src/mame/video/markham.cpp @@ -37,7 +37,7 @@ void markham_state::markham_palette(palette_device &palette) const } } -WRITE8_MEMBER(markham_state::videoram_w) +void markham_state::videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); diff --git a/src/mame/video/matmania.cpp b/src/mame/video/matmania.cpp index 57e55699573..5040abaeec0 100644 --- a/src/mame/video/matmania.cpp +++ b/src/mame/video/matmania.cpp @@ -77,7 +77,7 @@ void matmania_state::matmania_palette(palette_device &palette) const -WRITE8_MEMBER(matmania_state::matmania_paletteram_w) +void matmania_state::matmania_paletteram_w(offs_t offset, uint8_t data) { int bit0, bit1, bit2, bit3, val; int r, g, b; diff --git a/src/mame/video/meadows.cpp b/src/mame/video/meadows.cpp index ee91bc511a0..353ba892d64 100644 --- a/src/mame/video/meadows.cpp +++ b/src/mame/video/meadows.cpp @@ -47,10 +47,9 @@ void meadows_state::video_start() * *************************************/ -WRITE8_MEMBER(meadows_state::meadows_videoram_w) +void meadows_state::meadows_videoram_w(offs_t offset, uint8_t data) { - uint8_t *videoram = m_videoram; - videoram[offset] = data; + m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } @@ -62,7 +61,7 @@ WRITE8_MEMBER(meadows_state::meadows_videoram_w) * *************************************/ -WRITE8_MEMBER(meadows_state::meadows_spriteram_w) +void meadows_state::meadows_spriteram_w(offs_t offset, uint8_t data) { // m_screen->update_now(); m_screen->update_partial(m_screen->vpos()); diff --git a/src/mame/video/mermaid.cpp b/src/mame/video/mermaid.cpp index dddc87e4fa9..0d3c1be9ed9 100644 --- a/src/mame/video/mermaid.cpp +++ b/src/mame/video/mermaid.cpp @@ -54,19 +54,19 @@ void mermaid_state::rougien_palette(palette_device &palette) const } -WRITE8_MEMBER(mermaid_state::mermaid_videoram2_w) +void mermaid_state::mermaid_videoram2_w(offs_t offset, uint8_t data) { m_videoram2[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mermaid_state::mermaid_videoram_w) +void mermaid_state::mermaid_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mermaid_state::mermaid_colorram_w) +void mermaid_state::mermaid_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); @@ -82,13 +82,13 @@ WRITE_LINE_MEMBER(mermaid_state::flip_screen_y_w) flip_screen_y_set(state); } -WRITE8_MEMBER(mermaid_state::mermaid_bg_scroll_w) +void mermaid_state::mermaid_bg_scroll_w(offs_t offset, uint8_t data) { m_bg_scrollram[offset] = data; m_bg_tilemap->set_scrolly(offset, data); } -WRITE8_MEMBER(mermaid_state::mermaid_fg_scroll_w) +void mermaid_state::mermaid_fg_scroll_w(offs_t offset, uint8_t data) { m_fg_scrollram[offset] = data; m_fg_tilemap->set_scrolly(offset, data); @@ -104,7 +104,7 @@ WRITE_LINE_MEMBER(mermaid_state::rougien_gfxbankswitch2_w) m_rougien_gfxbank2 = state; } -READ8_MEMBER(mermaid_state::mermaid_collision_r) +uint8_t mermaid_state::mermaid_collision_r() { /* collision register active LOW: diff --git a/src/mame/video/metlclsh.cpp b/src/mame/video/metlclsh.cpp index 171f0e48fb3..bba011a5c65 100644 --- a/src/mame/video/metlclsh.cpp +++ b/src/mame/video/metlclsh.cpp @@ -24,7 +24,7 @@ #include "includes/metlclsh.h" -WRITE8_MEMBER(metlclsh_state::metlclsh_rambank_w) +void metlclsh_state::metlclsh_rambank_w(uint8_t data) { if (data & 1) { @@ -38,7 +38,7 @@ WRITE8_MEMBER(metlclsh_state::metlclsh_rambank_w) } } -WRITE8_MEMBER(metlclsh_state::metlclsh_gfxbank_w) +void metlclsh_state::metlclsh_gfxbank_w(uint8_t data) { if (!(data & 4) && (m_gfxbank != data)) { @@ -74,7 +74,7 @@ TILE_GET_INFO_MEMBER(metlclsh_state::get_bg_tile_info) tileinfo.set(1, m_bgram[tile_index] + (m_gfxbank << 7), 0, 0); } -WRITE8_MEMBER(metlclsh_state::metlclsh_bgram_w) +void metlclsh_state::metlclsh_bgram_w(offs_t offset, uint8_t data) { /* This ram is banked: it's either the tilemap (e401 = 1) or bit n of another area (e401 = n << 1)? (that I don't understand) */ @@ -118,7 +118,7 @@ TILE_GET_INFO_MEMBER(metlclsh_state::get_fg_tile_info) tileinfo.category = ((attr & 0x80) ? 1 : 2); } -WRITE8_MEMBER(metlclsh_state::metlclsh_fgram_w) +void metlclsh_state::metlclsh_fgram_w(offs_t offset, uint8_t data) { m_fgram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset & 0x3ff); diff --git a/src/mame/video/microtan.cpp b/src/mame/video/microtan.cpp index 3b7f70397ac..2a002cf04b9 100644 --- a/src/mame/video/microtan.cpp +++ b/src/mame/video/microtan.cpp @@ -18,7 +18,7 @@ #include "includes/microtan.h" -WRITE8_MEMBER(microtan_state::videoram_w) +void microtan_state::videoram_w(offs_t offset, uint8_t data) { if ((m_videoram[offset] != data) || (m_chunky_buffer[offset] != m_chunky_graphics)) { diff --git a/src/mame/video/mikie.cpp b/src/mame/video/mikie.cpp index f9b837a9a50..552bdb07f88 100644 --- a/src/mame/video/mikie.cpp +++ b/src/mame/video/mikie.cpp @@ -83,19 +83,19 @@ void mikie_state::mikie_palette(palette_device &palette) const } } -WRITE8_MEMBER(mikie_state::mikie_videoram_w) +void mikie_state::mikie_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mikie_state::mikie_colorram_w) +void mikie_state::mikie_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mikie_state::mikie_palettebank_w) +void mikie_state::mikie_palettebank_w(uint8_t data) { if (m_palettebank != (data & 0x07)) { diff --git a/src/mame/video/mitchell.cpp b/src/mame/video/mitchell.cpp index 5ccd9b53474..89b4d53e3c6 100644 --- a/src/mame/video/mitchell.cpp +++ b/src/mame/video/mitchell.cpp @@ -62,67 +62,67 @@ VIDEO_START_MEMBER(mitchell_state,pang) OBJ / CHAR RAM HANDLERS (BANK 0 = CHAR, BANK 1=OBJ) ***************************************************************************/ -WRITE8_MEMBER(mitchell_state::pang_video_bank_w) +void mitchell_state::pang_video_bank_w(uint8_t data) { /* Bank handler (sets base pointers for video write) (doesn't apply to mgakuen) */ m_video_bank = data; } -WRITE8_MEMBER(mitchell_state::mstworld_video_bank_w) +void mitchell_state::mstworld_video_bank_w(uint8_t data) { /* Monsters World seems to freak out if more bits are used.. */ m_video_bank = data & 1; } -WRITE8_MEMBER(mitchell_state::mgakuen_videoram_w) +void mitchell_state::mgakuen_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); } -READ8_MEMBER(mitchell_state::mgakuen_videoram_r) +uint8_t mitchell_state::mgakuen_videoram_r(offs_t offset) { return m_videoram[offset]; } -WRITE8_MEMBER(mitchell_state::mgakuen_objram_w) +void mitchell_state::mgakuen_objram_w(offs_t offset, uint8_t data) { m_objram[offset] = data; } -READ8_MEMBER(mitchell_state::mgakuen_objram_r) +uint8_t mitchell_state::mgakuen_objram_r(offs_t offset) { return m_objram[offset]; } -WRITE8_MEMBER(mitchell_state::pang_videoram_w) +void mitchell_state::pang_videoram_w(offs_t offset, uint8_t data) { if (m_video_bank) - mgakuen_objram_w(space, offset, data); + mgakuen_objram_w(offset, data); else - mgakuen_videoram_w(space, offset, data); + mgakuen_videoram_w(offset, data); } -READ8_MEMBER(mitchell_state::pang_videoram_r) +uint8_t mitchell_state::pang_videoram_r(offs_t offset) { if (m_video_bank) - return mgakuen_objram_r(space, offset); + return mgakuen_objram_r(offset); else - return mgakuen_videoram_r(space, offset); + return mgakuen_videoram_r(offset); } /*************************************************************************** COLOUR RAM ****************************************************************************/ -WRITE8_MEMBER(mitchell_state::pang_colorram_w) +void mitchell_state::pang_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -READ8_MEMBER(mitchell_state::pang_colorram_r) +uint8_t mitchell_state::pang_colorram_r(offs_t offset) { return m_colorram[offset]; } @@ -131,7 +131,7 @@ READ8_MEMBER(mitchell_state::pang_colorram_r) PALETTE HANDLERS (COLOURS: BANK 0 = 0x00-0x3f BANK 1=0x40-0xff) ****************************************************************************/ -WRITE8_MEMBER(mitchell_state::pang_gfxctrl_w) +void mitchell_state::pang_gfxctrl_w(uint8_t data) { logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data); { @@ -169,7 +169,7 @@ logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data); /* up marukin - you can see partially built up screens during attract mode. */ } -WRITE8_MEMBER(mitchell_state::pangbl_gfxctrl_w) +void mitchell_state::pangbl_gfxctrl_w(uint8_t data) { logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data); { @@ -205,7 +205,7 @@ logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data); /* up marukin - you can see partially built up screens during attract mode. */ } -WRITE8_MEMBER(mitchell_state::mstworld_gfxctrl_w) +void mitchell_state::mstworld_gfxctrl_w(uint8_t data) { logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data); { @@ -239,12 +239,12 @@ logerror("PC %04x: pang_gfxctrl_w %02x\n",m_maincpu->pc(),data); /* up marukin - you can see partially built up screens during attract mode. */ } -WRITE8_MEMBER(mitchell_state::pang_paletteram_w) +void mitchell_state::pang_paletteram_w(offs_t offset, uint8_t data) { m_palette->write8(offset + (m_paletteram_bank ? 0x800 : 0x000), data); } -READ8_MEMBER(mitchell_state::pang_paletteram_r) +uint8_t mitchell_state::pang_paletteram_r(offs_t offset) { return m_paletteram[offset + (m_paletteram_bank ? 0x800 : 0x000)]; } diff --git a/src/mame/video/mjkjidai.cpp b/src/mame/video/mjkjidai.cpp index e8107753395..681a5d7619a 100644 --- a/src/mame/video/mjkjidai.cpp +++ b/src/mame/video/mjkjidai.cpp @@ -39,7 +39,7 @@ void mjkjidai_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(mjkjidai_state::mjkjidai_videoram_w) +void mjkjidai_state::mjkjidai_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x7ff); diff --git a/src/mame/video/mosaic.cpp b/src/mame/video/mosaic.cpp index ce51b036873..bfa5368858c 100644 --- a/src/mame/video/mosaic.cpp +++ b/src/mame/video/mosaic.cpp @@ -58,13 +58,13 @@ void mosaic_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(mosaic_state::fgvideoram_w) +void mosaic_state::fgvideoram_w(offs_t offset, uint8_t data) { m_fgvideoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(mosaic_state::bgvideoram_w) +void mosaic_state::bgvideoram_w(offs_t offset, uint8_t data) { m_bgvideoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); diff --git a/src/mame/video/mrdo.cpp b/src/mame/video/mrdo.cpp index 0952ce68f0e..51ddcff46f1 100644 --- a/src/mame/video/mrdo.cpp +++ b/src/mame/video/mrdo.cpp @@ -179,25 +179,25 @@ void mrdo_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(mrdo_state::mrdo_bgvideoram_w) +void mrdo_state::mrdo_bgvideoram_w(offs_t offset, uint8_t data) { m_bgvideoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(mrdo_state::mrdo_fgvideoram_w) +void mrdo_state::mrdo_fgvideoram_w(offs_t offset, uint8_t data) { m_fgvideoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(mrdo_state::mrdo_scrollx_w) +void mrdo_state::mrdo_scrollx_w(uint8_t data) { m_bg_tilemap->set_scrollx(0, data); } -WRITE8_MEMBER(mrdo_state::mrdo_scrolly_w) +void mrdo_state::mrdo_scrolly_w(uint8_t data) { /* This is NOT affected by flipscreen (so stop it happening) */ if (m_flipscreen) @@ -207,7 +207,7 @@ WRITE8_MEMBER(mrdo_state::mrdo_scrolly_w) } -WRITE8_MEMBER(mrdo_state::mrdo_flipscreen_w) +void mrdo_state::mrdo_flipscreen_w(uint8_t data) { /* bits 1-3 control the playfield priority, but they are not used by */ /* Mr. Do! so we don't emulate them */ diff --git a/src/mame/video/mrflea.cpp b/src/mame/video/mrflea.cpp index 3c3a4856f67..9ea933c0052 100644 --- a/src/mame/video/mrflea.cpp +++ b/src/mame/video/mrflea.cpp @@ -10,7 +10,7 @@ Mr. F. Lea #include "emu.h" #include "includes/mrflea.h" -WRITE8_MEMBER(mrflea_state::mrflea_gfx_bank_w) +void mrflea_state::mrflea_gfx_bank_w(uint8_t data) { m_gfx_bank = data; @@ -18,7 +18,7 @@ WRITE8_MEMBER(mrflea_state::mrflea_gfx_bank_w) logerror("unknown gfx bank: 0x%02x\n", data); } -WRITE8_MEMBER(mrflea_state::mrflea_videoram_w) +void mrflea_state::mrflea_videoram_w(offs_t offset, uint8_t data) { int bank = offset / 0x400; @@ -29,7 +29,7 @@ WRITE8_MEMBER(mrflea_state::mrflea_videoram_w) the bank select. The remaining bits are from a video register. */ } -WRITE8_MEMBER(mrflea_state::mrflea_spriteram_w) +void mrflea_state::mrflea_spriteram_w(offs_t offset, uint8_t data) { if (offset & 2) { diff --git a/src/mame/video/mrjong.cpp b/src/mame/video/mrjong.cpp index cbde07f0141..3db2b131058 100644 --- a/src/mame/video/mrjong.cpp +++ b/src/mame/video/mrjong.cpp @@ -66,19 +66,19 @@ void mrjong_state::mrjong_palette(palette_device &palette) const ***************************************************************************/ -WRITE8_MEMBER(mrjong_state::mrjong_videoram_w) +void mrjong_state::mrjong_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mrjong_state::mrjong_colorram_w) +void mrjong_state::mrjong_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(mrjong_state::mrjong_flipscreen_w) +void mrjong_state::mrjong_flipscreen_w(uint8_t data) { if (flip_screen() != BIT(data, 2)) { diff --git a/src/mame/video/msisaac.cpp b/src/mame/video/msisaac.cpp index 7ba6609bd30..1836a164982 100644 --- a/src/mame/video/msisaac.cpp +++ b/src/mame/video/msisaac.cpp @@ -68,39 +68,39 @@ void msisaac_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(msisaac_state::msisaac_fg_scrolly_w) +void msisaac_state::msisaac_fg_scrolly_w(uint8_t data) { m_fg_tilemap->set_scrolly(0, data); } -WRITE8_MEMBER(msisaac_state::msisaac_fg_scrollx_w) +void msisaac_state::msisaac_fg_scrollx_w(uint8_t data) { m_fg_tilemap->set_scrollx(0, 9 + data); } -WRITE8_MEMBER(msisaac_state::msisaac_bg2_scrolly_w) +void msisaac_state::msisaac_bg2_scrolly_w(uint8_t data) { m_bg2_tilemap->set_scrolly(0, data); } -WRITE8_MEMBER(msisaac_state::msisaac_bg2_scrollx_w) +void msisaac_state::msisaac_bg2_scrollx_w(uint8_t data) { m_bg2_tilemap->set_scrollx(0, 9 + 2 + data); } -WRITE8_MEMBER(msisaac_state::msisaac_bg_scrolly_w) +void msisaac_state::msisaac_bg_scrolly_w(uint8_t data) { m_bg_tilemap->set_scrolly(0, data); } -WRITE8_MEMBER(msisaac_state::msisaac_bg_scrollx_w) +void msisaac_state::msisaac_bg_scrollx_w(uint8_t data) { m_bg_tilemap->set_scrollx(0, 9 + 4 + data); } #ifdef UNUSED_FUNCTION -WRITE8_MEMBER(msisaac_state::msisaac_textbank1_w) +void msisaac_state::msisaac_textbank1_w(uint8_t data) { if (textbank1!=data) { @@ -110,7 +110,7 @@ WRITE8_MEMBER(msisaac_state::msisaac_textbank1_w) } #endif -WRITE8_MEMBER(msisaac_state::msisaac_bg2_textbank_w) +void msisaac_state::msisaac_bg2_textbank_w(uint8_t data) { if (m_bg2_textbank != data ) { @@ -125,19 +125,19 @@ WRITE8_MEMBER(msisaac_state::msisaac_bg2_textbank_w) } } -WRITE8_MEMBER(msisaac_state::msisaac_bg_videoram_w) +void msisaac_state::msisaac_bg_videoram_w(offs_t offset, uint8_t data) { m_videoram2[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(msisaac_state::msisaac_bg2_videoram_w) +void msisaac_state::msisaac_bg2_videoram_w(offs_t offset, uint8_t data) { m_videoram3[offset] = data; m_bg2_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(msisaac_state::msisaac_fg_videoram_w) +void msisaac_state::msisaac_fg_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset); diff --git a/src/mame/video/mustache.cpp b/src/mame/video/mustache.cpp index a9a2fc85e0e..bc0172b25d0 100644 --- a/src/mame/video/mustache.cpp +++ b/src/mame/video/mustache.cpp @@ -12,13 +12,13 @@ #include "includes/mustache.h" -WRITE8_MEMBER(mustache_state::videoram_w) +void mustache_state::videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(mustache_state::video_control_w) +void mustache_state::video_control_w(uint8_t data) { /* It is assumed that screen flipping is controlled by both hardware (via a DIP switch, labeled "Hard SW" on the @@ -33,7 +33,7 @@ WRITE8_MEMBER(mustache_state::video_control_w) } } -WRITE8_MEMBER(mustache_state::scroll_w) +void mustache_state::scroll_w(uint8_t data) { m_bg_tilemap->set_scrollx(0, 0x100 - data); m_bg_tilemap->set_scrollx(1, 0x100 - data); diff --git a/src/mame/video/mystston.cpp b/src/mame/video/mystston.cpp index 3d3530b2726..fd2de4361d2 100644 --- a/src/mame/video/mystston.cpp +++ b/src/mame/video/mystston.cpp @@ -125,7 +125,7 @@ void mystston_state::set_palette() * *************************************/ -WRITE8_MEMBER(mystston_state::mystston_video_control_w) +void mystston_state::mystston_video_control_w(uint8_t data) { *m_video_control = data; diff --git a/src/mame/video/mz700.cpp b/src/mame/video/mz700.cpp index 9a919f920a2..e2749ec0cc3 100644 --- a/src/mame/video/mz700.cpp +++ b/src/mame/video/mz700.cpp @@ -98,7 +98,7 @@ uint32_t mz_state::screen_update_mz800(screen_device &screen, bitmap_ind16 &bitm CGRAM ***************************************************************************/ -WRITE8_MEMBER(mz_state::mz800_cgram_w) +void mz_state::mz800_cgram_w(offs_t offset, uint8_t data) { m_cgram[offset] = data; } diff --git a/src/mame/video/namco_c169roz.cpp b/src/mame/video/namco_c169roz.cpp index 252e0e08170..4672121dbfd 100644 --- a/src/mame/video/namco_c169roz.cpp +++ b/src/mame/video/namco_c169roz.cpp @@ -252,22 +252,22 @@ void namco_c169roz_device::draw(screen_device &screen, bitmap_ind16 &bitmap, con } } -READ16_MEMBER( namco_c169roz_device::control_r ) +uint16_t namco_c169roz_device::control_r(offs_t offset) { return m_control[offset]; } -WRITE16_MEMBER( namco_c169roz_device::control_w ) +void namco_c169roz_device::control_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_control[offset]); } -READ16_MEMBER( namco_c169roz_device::videoram_r ) +uint16_t namco_c169roz_device::videoram_r(offs_t offset) { return m_videoram[offset]; } -WRITE16_MEMBER( namco_c169roz_device::videoram_w ) +void namco_c169roz_device::videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_videoram[offset]); for (auto & elem : m_tilemap) diff --git a/src/mame/video/namco_c169roz.h b/src/mame/video/namco_c169roz.h index 901a659c2b6..d6329a6a8d0 100644 --- a/src/mame/video/namco_c169roz.h +++ b/src/mame/video/namco_c169roz.h @@ -19,10 +19,10 @@ public: void set_ram_words(uint32_t size) { m_ramsize = size; } void set_color_base(int color) { m_color_base = color; } - DECLARE_READ16_MEMBER( control_r ); - DECLARE_WRITE16_MEMBER( control_w ); - DECLARE_READ16_MEMBER( videoram_r ); - DECLARE_WRITE16_MEMBER( videoram_w ); + uint16_t control_r(offs_t offset); + void control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t videoram_r(offs_t offset); + void videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); typedef delegate c169_tilemap_delegate; void set_tile_callback(c169_tilemap_delegate tilemap_cb) { m_c169_cb = tilemap_cb; } diff --git a/src/mame/video/namcofl.cpp b/src/mame/video/namcofl.cpp index 223612f38c8..823eda54b37 100644 --- a/src/mame/video/namcofl.cpp +++ b/src/mame/video/namcofl.cpp @@ -92,7 +92,7 @@ uint32_t namcofl_state::screen_update(screen_device &screen, bitmap_ind16 &bitma // groups of sprites. I am unsure how to differentiate those groups // at this time however. -WRITE32_MEMBER(namcofl_state::spritebank_w) +void namcofl_state::spritebank_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_sprbank); } diff --git a/src/mame/video/namconb1.cpp b/src/mame/video/namconb1.cpp index 84f4edcf579..b926b6569ea 100644 --- a/src/mame/video/namconb1.cpp +++ b/src/mame/video/namconb1.cpp @@ -154,7 +154,7 @@ void namconb1_state::video_start() /****************************************************************************************************/ -WRITE32_MEMBER(namconb1_state::rozbank32_w) +void namconb1_state::rozbank32_w(offs_t offset, u32 data, u32 mem_mask) { u32 old_data = m_rozbank32[offset]; COMBINE_DATA(&m_rozbank32[offset]); diff --git a/src/mame/video/namcos2.cpp b/src/mame/video/namcos2.cpp index 47d61c1109f..3159f14e932 100644 --- a/src/mame/video/namcos2.cpp +++ b/src/mame/video/namcos2.cpp @@ -29,19 +29,19 @@ void namcos2_state::TilemapCB_finalap2(uint16_t code, int *tile, int *mask) * ---- ---- xxxx ---- always zero? * ---- ---- ---- xxxx sprite bank */ -READ16_MEMBER(namcos2_state::gfx_ctrl_r) +uint16_t namcos2_state::gfx_ctrl_r() { return m_gfx_ctrl; } -WRITE16_MEMBER(namcos2_state::gfx_ctrl_w) +void namcos2_state::gfx_ctrl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_gfx_ctrl); } /**************************************************************************/ -READ8_MEMBER(namcos2_state::c116_r) +uint8_t namcos2_state::c116_r(offs_t offset) { if ((offset & 0x1800) == 0x1800) { diff --git a/src/mame/video/namcos22.cpp b/src/mame/video/namcos22.cpp index 727364959bd..27354f16379 100644 --- a/src/mame/video/namcos22.cpp +++ b/src/mame/video/namcos22.cpp @@ -1710,7 +1710,7 @@ void namcos22_state::draw_sprites() } } -READ32_MEMBER(namcos22s_state::namcos22s_vics_control_r) +u32 namcos22s_state::namcos22s_vics_control_r(offs_t offset) { u32 ret = m_vics_control[offset]; @@ -1734,7 +1734,7 @@ READ32_MEMBER(namcos22s_state::namcos22s_vics_control_r) return ret; } -WRITE32_MEMBER(namcos22s_state::namcos22s_vics_control_w) +void namcos22s_state::namcos22s_vics_control_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_vics_control[offset]); } @@ -1879,7 +1879,7 @@ low byte is indirect pen, high byte is shift amount when spot is in alpha blend */ -READ16_MEMBER(namcos22s_state::spotram_r) +u16 namcos22s_state::spotram_r(offs_t offset) { if (offset == 2) { @@ -1895,7 +1895,7 @@ READ16_MEMBER(namcos22s_state::spotram_r) return 0; } -WRITE16_MEMBER(namcos22s_state::spotram_w) +void namcos22s_state::spotram_w(offs_t offset, u16 data, u16 mem_mask) { switch (offset) { @@ -2120,7 +2120,7 @@ void namcos22_state::update_palette() } -WRITE16_MEMBER(namcos22s_state::namcos22s_czattr_w) +void namcos22s_state::namcos22s_czattr_w(offs_t offset, u16 data, u16 mem_mask) { /* 0 1 2 3 4 5 6 7 @@ -2149,7 +2149,7 @@ WRITE16_MEMBER(namcos22s_state::namcos22s_czattr_w) } } -READ16_MEMBER(namcos22s_state::namcos22s_czattr_r) +u16 namcos22s_state::namcos22s_czattr_r(offs_t offset) { return m_czattr[offset]; } diff --git a/src/mame/video/namcos2_roz.cpp b/src/mame/video/namcos2_roz.cpp index 29a978c89a7..04f7f96ce4f 100644 --- a/src/mame/video/namcos2_roz.cpp +++ b/src/mame/video/namcos2_roz.cpp @@ -288,7 +288,7 @@ void namcos2_roz_device::draw_roz(screen_device &screen, bitmap_ind16 &bitmap, c draw_roz_helper(screen, bitmap, m_tilemap_roz, cliprect, &rozParam); } -WRITE16_MEMBER(namcos2_roz_device::rozram_word_w) +void namcos2_roz_device::rozram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_rozram[offset]); m_tilemap_roz->mark_tile_dirty(offset); diff --git a/src/mame/video/namcos2_roz.h b/src/mame/video/namcos2_roz.h index 6c5327fdec9..5ac1fa4e89d 100644 --- a/src/mame/video/namcos2_roz.h +++ b/src/mame/video/namcos2_roz.h @@ -19,7 +19,7 @@ public: template void set_rozram_tag(T &&tag) { m_rozram.set_tag(std::forward(tag)); } template void set_rozctrl_tag(T &&tag) { m_roz_ctrl.set_tag(std::forward(tag)); } - DECLARE_WRITE16_MEMBER( rozram_word_w ); + void rozram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void draw_roz(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint16_t gfx_ctrl); diff --git a/src/mame/video/namcos86.cpp b/src/mame/video/namcos86.cpp index 2e6c86498c4..0ccb4dbbc75 100644 --- a/src/mame/video/namcos86.cpp +++ b/src/mame/video/namcos86.cpp @@ -164,19 +164,19 @@ void namcos86_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(namcos86_state::videoram1_w) +void namcos86_state::videoram1_w(offs_t offset, uint8_t data) { m_rthunder_videoram1[offset] = data; m_bg_tilemap[offset/0x1000]->mark_tile_dirty((offset & 0xfff)/2); } -WRITE8_MEMBER(namcos86_state::videoram2_w) +void namcos86_state::videoram2_w(offs_t offset, uint8_t data) { m_rthunder_videoram2[offset] = data; m_bg_tilemap[2+offset/0x1000]->mark_tile_dirty((offset & 0xfff)/2); } -WRITE8_MEMBER(namcos86_state::tilebank_select_w) +void namcos86_state::tilebank_select_w(offs_t offset, uint8_t data) { int bit = BIT(offset,10); if (m_tilebank != bit) @@ -187,7 +187,7 @@ WRITE8_MEMBER(namcos86_state::tilebank_select_w) } } -void namcos86_state::scroll_w(address_space &space, int offset, int data, int layer) +void namcos86_state::scroll_w(offs_t offset, int data, int layer) { switch (offset) { @@ -203,30 +203,30 @@ void namcos86_state::scroll_w(address_space &space, int offset, int data, int la } } -WRITE8_MEMBER(namcos86_state::scroll0_w) +void namcos86_state::scroll0_w(offs_t offset, uint8_t data) { - scroll_w(space,offset,data,0); + scroll_w(offset,data,0); } -WRITE8_MEMBER(namcos86_state::scroll1_w) +void namcos86_state::scroll1_w(offs_t offset, uint8_t data) { - scroll_w(space,offset,data,1); + scroll_w(offset,data,1); } -WRITE8_MEMBER(namcos86_state::scroll2_w) +void namcos86_state::scroll2_w(offs_t offset, uint8_t data) { - scroll_w(space,offset,data,2); + scroll_w(offset,data,2); } -WRITE8_MEMBER(namcos86_state::scroll3_w) +void namcos86_state::scroll3_w(offs_t offset, uint8_t data) { - scroll_w(space,offset,data,3); + scroll_w(offset,data,3); } -WRITE8_MEMBER(namcos86_state::backcolor_w) +void namcos86_state::backcolor_w(uint8_t data) { m_backcolor = data; } -WRITE8_MEMBER(namcos86_state::spriteram_w) +void namcos86_state::spriteram_w(offs_t offset, uint8_t data) { m_rthunder_spriteram[offset] = data; diff --git a/src/mame/video/naughtyb.cpp b/src/mame/video/naughtyb.cpp index efadd21c57f..2dd4d21b9f4 100644 --- a/src/mame/video/naughtyb.cpp +++ b/src/mame/video/naughtyb.cpp @@ -115,7 +115,7 @@ void naughtyb_state::video_start() -WRITE8_MEMBER(naughtyb_state::naughtyb_videoreg_w) +void naughtyb_state::naughtyb_videoreg_w(uint8_t data) { // bits 4+5 control the sound circuit m_naughtyb_custom->control_c_w(data); @@ -127,7 +127,7 @@ WRITE8_MEMBER(naughtyb_state::naughtyb_videoreg_w) m_bankreg = (data >> 2) & 0x01; // banksel is just bit 2 } -WRITE8_MEMBER(naughtyb_state::popflame_videoreg_w) +void naughtyb_state::popflame_videoreg_w(uint8_t data) { // bits 4+5 control the sound circuit m_popflame_custom->control_c_w(data); diff --git a/src/mame/video/nbmj8688.cpp b/src/mame/video/nbmj8688.cpp index c3a41e5056b..75ab83fd15a 100644 --- a/src/mame/video/nbmj8688.cpp +++ b/src/mame/video/nbmj8688.cpp @@ -97,7 +97,7 @@ void nbmj8688_state::mbmj8688_lcd(palette_device &palette) const palette.set_pen_color(1, rgb_t(0, 0, 0)); } -WRITE8_MEMBER(nbmj8688_state::clut_w) +void nbmj8688_state::clut_w(offs_t offset, uint8_t data) { m_clut[offset] = (data ^ 0xff); } @@ -107,7 +107,7 @@ WRITE8_MEMBER(nbmj8688_state::clut_w) ******************************************************************************/ -WRITE8_MEMBER(nbmj8688_state::blitter_w) +void nbmj8688_state::blitter_w(offs_t offset, uint8_t data) { switch (offset) { @@ -130,7 +130,7 @@ WRITE8_MEMBER(nbmj8688_state::blitter_w) } } -WRITE8_MEMBER(nbmj8688_state::mjsikaku_gfxflag2_w) +void nbmj8688_state::mjsikaku_gfxflag2_w(uint8_t data) { m_gfxflag2 = data; @@ -145,17 +145,17 @@ WRITE8_MEMBER(nbmj8688_state::mjsikaku_gfxflag2_w) m_gfxflag2 |= 0x20; } -WRITE8_MEMBER(nbmj8688_state::mjsikaku_gfxflag3_w) +void nbmj8688_state::mjsikaku_gfxflag3_w(uint8_t data) { m_gfxflag3 = (data & 0xe0); } -WRITE8_MEMBER(nbmj8688_state::scrolly_w) +void nbmj8688_state::scrolly_w(uint8_t data) { m_scrolly = data; } -WRITE8_MEMBER(nbmj8688_state::mjsikaku_romsel_w) +void nbmj8688_state::mjsikaku_romsel_w(uint8_t data) { int gfxlen = memregion("gfx1")->bytes(); m_gfxrom = (data & 0x0f); @@ -169,11 +169,11 @@ WRITE8_MEMBER(nbmj8688_state::mjsikaku_romsel_w) } } -WRITE8_MEMBER(nbmj8688_state::secolove_romsel_w) +void nbmj8688_state::secolove_romsel_w(uint8_t data) { int gfxlen = memregion("gfx1")->bytes(); m_gfxrom = ((data & 0xc0) >> 4) + (data & 0x03); - mjsikaku_gfxflag2_w(space, 0, data); + mjsikaku_gfxflag2_w(data); if ((m_gfxrom << 17) > (gfxlen - 1)) { @@ -184,11 +184,11 @@ WRITE8_MEMBER(nbmj8688_state::secolove_romsel_w) } } -WRITE8_MEMBER(nbmj8688_state::crystalg_romsel_w) +void nbmj8688_state::crystalg_romsel_w(uint8_t data) { int gfxlen = memregion("gfx1")->bytes(); m_gfxrom = (data & 0x03); - mjsikaku_gfxflag2_w(space, 0, data); + mjsikaku_gfxflag2_w(data); if ((m_gfxrom << 17) > (gfxlen - 1)) { @@ -199,11 +199,11 @@ WRITE8_MEMBER(nbmj8688_state::crystalg_romsel_w) } } -WRITE8_MEMBER(nbmj8688_state::seiha_romsel_w) +void nbmj8688_state::seiha_romsel_w(uint8_t data) { int gfxlen = memregion("gfx1")->bytes(); m_gfxrom = (data & 0x1f); - mjsikaku_gfxflag3_w(space, 0, data); + mjsikaku_gfxflag3_w(data); if ((m_gfxrom << 17) > (gfxlen - 1)) { @@ -611,13 +611,13 @@ VIDEO_START_MEMBER(nbmj8688_state,mbmj8688_pure_16bit_LCD) common_video_start(); } -WRITE8_MEMBER(nbmj8688_state::HD61830B_both_instr_w) +void nbmj8688_state::HD61830B_both_instr_w(uint8_t data) { m_lcdc0->control_w(data); m_lcdc1->control_w(data); } -WRITE8_MEMBER(nbmj8688_state::HD61830B_both_data_w) +void nbmj8688_state::HD61830B_both_data_w(uint8_t data) { m_lcdc0->data_w(data); m_lcdc1->data_w(data); diff --git a/src/mame/video/nbmj8891.cpp b/src/mame/video/nbmj8891.cpp index c1bddc325cb..b041106f96d 100644 --- a/src/mame/video/nbmj8891.cpp +++ b/src/mame/video/nbmj8891.cpp @@ -16,12 +16,12 @@ ******************************************************************************/ -READ8_MEMBER(nbmj8891_state::palette_type1_r) +uint8_t nbmj8891_state::palette_type1_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE8_MEMBER(nbmj8891_state::palette_type1_w) +void nbmj8891_state::palette_type1_w(offs_t offset, uint8_t data) { int r, g, b; @@ -38,12 +38,12 @@ WRITE8_MEMBER(nbmj8891_state::palette_type1_w) m_palette->set_pen_color((offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); } -READ8_MEMBER(nbmj8891_state::palette_type2_r) +uint8_t nbmj8891_state::palette_type2_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE8_MEMBER(nbmj8891_state::palette_type2_w) +void nbmj8891_state::palette_type2_w(offs_t offset, uint8_t data) { int r, g, b; @@ -60,12 +60,12 @@ WRITE8_MEMBER(nbmj8891_state::palette_type2_w) m_palette->set_pen_color((offset & 0x0ff), pal4bit(r), pal4bit(g), pal4bit(b)); } -READ8_MEMBER(nbmj8891_state::palette_type3_r) +uint8_t nbmj8891_state::palette_type3_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE8_MEMBER(nbmj8891_state::palette_type3_w) +void nbmj8891_state::palette_type3_w(offs_t offset, uint8_t data) { int r, g, b; @@ -82,17 +82,17 @@ WRITE8_MEMBER(nbmj8891_state::palette_type3_w) m_palette->set_pen_color((offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); } -WRITE8_MEMBER(nbmj8891_state::clutsel_w) +void nbmj8891_state::clutsel_w(uint8_t data) { m_clutsel = data; } -READ8_MEMBER(nbmj8891_state::clut_r) +uint8_t nbmj8891_state::clut_r(offs_t offset) { return m_clut[offset]; } -WRITE8_MEMBER(nbmj8891_state::clut_w) +void nbmj8891_state::clut_w(offs_t offset, uint8_t data) { m_clut[((m_clutsel & 0x7f) * 0x10) + (offset & 0x0f)] = data; } @@ -101,7 +101,7 @@ WRITE8_MEMBER(nbmj8891_state::clut_w) ******************************************************************************/ -WRITE8_MEMBER(nbmj8891_state::blitter_w) +void nbmj8891_state::blitter_w(offs_t offset, uint8_t data) { switch (offset) { @@ -125,7 +125,7 @@ WRITE8_MEMBER(nbmj8891_state::blitter_w) } } -WRITE8_MEMBER(nbmj8891_state::taiwanmb_blitter_w) +void nbmj8891_state::taiwanmb_blitter_w(offs_t offset, uint8_t data) { switch (offset) { @@ -138,19 +138,19 @@ WRITE8_MEMBER(nbmj8891_state::taiwanmb_blitter_w) } } -WRITE8_MEMBER(nbmj8891_state::taiwanmb_gfxdraw_w) +void nbmj8891_state::taiwanmb_gfxdraw_w(uint8_t data) { // gfxdraw(); } -WRITE8_MEMBER(nbmj8891_state::taiwanmb_gfxflag_w) +void nbmj8891_state::taiwanmb_gfxflag_w(uint8_t data) { m_flipscreen = (data & 0x04) ? 1 : 0; vramflip(0); } -WRITE8_MEMBER(nbmj8891_state::taiwanmb_mcu_w) +void nbmj8891_state::taiwanmb_mcu_w(uint8_t data) { m_param_old[m_param_cnt & 0x0f] = data; @@ -233,12 +233,12 @@ WRITE8_MEMBER(nbmj8891_state::taiwanmb_mcu_w) m_param_cnt++; } -WRITE8_MEMBER(nbmj8891_state::scrolly_w) +void nbmj8891_state::scrolly_w(uint8_t data) { m_scrolly = data; } -WRITE8_MEMBER(nbmj8891_state::vramsel_w) +void nbmj8891_state::vramsel_w(uint8_t data) { /* protection - not sure about this */ m_nb1413m3->m_sndromrgntag = (data & 0x20) ? "protection" : "voice"; @@ -246,7 +246,7 @@ WRITE8_MEMBER(nbmj8891_state::vramsel_w) m_vram = data; } -WRITE8_MEMBER(nbmj8891_state::romsel_w) +void nbmj8891_state::romsel_w(uint8_t data) { int gfxlen = memregion("gfx1")->bytes(); m_gfxrom = (data & 0x0f); diff --git a/src/mame/video/nbmj8900.cpp b/src/mame/video/nbmj8900.cpp index ad9c1e021fc..faf75765d88 100644 --- a/src/mame/video/nbmj8900.cpp +++ b/src/mame/video/nbmj8900.cpp @@ -16,12 +16,12 @@ ******************************************************************************/ -READ8_MEMBER(nbmj8900_state::palette_type1_r) +uint8_t nbmj8900_state::palette_type1_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE8_MEMBER(nbmj8900_state::palette_type1_w) +void nbmj8900_state::palette_type1_w(offs_t offset, uint8_t data) { int r, g, b; @@ -39,12 +39,12 @@ WRITE8_MEMBER(nbmj8900_state::palette_type1_w) } #ifdef UNUSED_FUNCTION -READ8_MEMBER(nbmj8900_state::palette_type2_r) +uint8_t nbmj8900_state::palette_type2_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE8_MEMBER(nbmj8900_state::palette_type2_w) +void nbmj8900_state::palette_type2_w(offs_t offset, uint8_t data) { int r, g, b; @@ -61,12 +61,12 @@ WRITE8_MEMBER(nbmj8900_state::palette_type2_w) m_palette->set_pen_color((offset & 0x0ff), pal4bit(r), pal4bit(g), pal4bit(b)); } -READ8_MEMBER(nbmj8900_state::palette_type3_r) +uint8_t nbmj8900_state::palette_type3_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE8_MEMBER(nbmj8900_state::palette_type3_w) +void nbmj8900_state::palette_type3_w(offs_t offset, uint8_t data) { int r, g, b; @@ -84,17 +84,17 @@ WRITE8_MEMBER(nbmj8900_state::palette_type3_w) } #endif -WRITE8_MEMBER(nbmj8900_state::clutsel_w) +void nbmj8900_state::clutsel_w(uint8_t data) { m_clutsel = data; } -READ8_MEMBER(nbmj8900_state::clut_r) +uint8_t nbmj8900_state::clut_r(offs_t offset) { return m_clut[offset]; } -WRITE8_MEMBER(nbmj8900_state::clut_w) +void nbmj8900_state::clut_w(offs_t offset, uint8_t data) { m_clut[((m_clutsel & 0x7f) * 0x10) + (offset & 0x0f)] = data; } @@ -103,7 +103,7 @@ WRITE8_MEMBER(nbmj8900_state::clut_w) ******************************************************************************/ -WRITE8_MEMBER(nbmj8900_state::blitter_w) +void nbmj8900_state::blitter_w(offs_t offset, uint8_t data) { switch (offset) { @@ -127,12 +127,12 @@ WRITE8_MEMBER(nbmj8900_state::blitter_w) } } -WRITE8_MEMBER(nbmj8900_state::scrolly_w) +void nbmj8900_state::scrolly_w(uint8_t data) { m_scrolly = data; } -WRITE8_MEMBER(nbmj8900_state::vramsel_w) +void nbmj8900_state::vramsel_w(uint8_t data) { /* protection - not sure about this */ m_nb1413m3->m_sndromrgntag = (data & 0x20) ? "protdata" : "voice"; @@ -140,7 +140,7 @@ WRITE8_MEMBER(nbmj8900_state::vramsel_w) m_vram = data; } -WRITE8_MEMBER(nbmj8900_state::romsel_w) +void nbmj8900_state::romsel_w(uint8_t data) { m_gfxrom = (data & 0x0f); diff --git a/src/mame/video/nbmj8991.cpp b/src/mame/video/nbmj8991.cpp index 01bf4149d1c..e13e5bfb832 100644 --- a/src/mame/video/nbmj8991.cpp +++ b/src/mame/video/nbmj8991.cpp @@ -16,7 +16,7 @@ ******************************************************************************/ -WRITE8_MEMBER(nbmj8991_state::palette_type1_w) +void nbmj8991_state::palette_type1_w(offs_t offset, uint8_t data) { int r, g, b; @@ -33,7 +33,7 @@ WRITE8_MEMBER(nbmj8991_state::palette_type1_w) m_palette->set_pen_color((offset >> 1), pal4bit(r), pal4bit(g), pal4bit(b)); } -WRITE8_MEMBER(nbmj8991_state::palette_type2_w) +void nbmj8991_state::palette_type2_w(offs_t offset, uint8_t data) { int r, g, b; @@ -50,7 +50,7 @@ WRITE8_MEMBER(nbmj8991_state::palette_type2_w) m_palette->set_pen_color((offset / 2), pal5bit(r), pal5bit(g), pal5bit(b)); } -WRITE8_MEMBER(nbmj8991_state::palette_type3_w) +void nbmj8991_state::palette_type3_w(offs_t offset, uint8_t data) { int r, g, b; @@ -71,7 +71,7 @@ WRITE8_MEMBER(nbmj8991_state::palette_type3_w) ******************************************************************************/ -WRITE8_MEMBER(nbmj8991_state::blitter_w) +void nbmj8991_state::blitter_w(offs_t offset, uint8_t data) { int gfxlen = memregion("gfx1")->bytes(); @@ -115,12 +115,12 @@ WRITE8_MEMBER(nbmj8991_state::blitter_w) } } -READ8_MEMBER(nbmj8991_state::clut_r) +uint8_t nbmj8991_state::clut_r(offs_t offset) { return m_clut[offset]; } -WRITE8_MEMBER(nbmj8991_state::clut_w) +void nbmj8991_state::clut_w(offs_t offset, uint8_t data) { m_clut[((m_clutsel & 0x7f) * 0x10) + (offset & 0x0f)] = data; } diff --git a/src/mame/video/nbmj9195.cpp b/src/mame/video/nbmj9195.cpp index d2cc84ccb6a..153b420987f 100644 --- a/src/mame/video/nbmj9195.cpp +++ b/src/mame/video/nbmj9195.cpp @@ -17,7 +17,7 @@ ******************************************************************************/ -WRITE8_MEMBER(nbmj9195_state::palette_w) +void nbmj9195_state::palette_w(offs_t offset, uint8_t data) { m_palette_ptr[offset] = data; @@ -33,7 +33,7 @@ WRITE8_MEMBER(nbmj9195_state::palette_w) } } -WRITE8_MEMBER(nbmj9195_state::nb22090_palette_w) +void nbmj9195_state::nb22090_palette_w(offs_t offset, uint8_t data) { int r, g, b; int offs_h, offs_l; @@ -355,14 +355,14 @@ void nbmj9195_state::gfxdraw(int vram) ******************************************************************************/ -WRITE8_MEMBER(nbmj9195_state::blitter_0_w){ blitter_w(offset, data, 0); } -WRITE8_MEMBER(nbmj9195_state::blitter_1_w){ blitter_w(offset, data, 1); } +void nbmj9195_state::blitter_0_w(offs_t offset, uint8_t data){ blitter_w(offset, data, 0); } +void nbmj9195_state::blitter_1_w(offs_t offset, uint8_t data){ blitter_w(offset, data, 1); } -READ8_MEMBER(nbmj9195_state::blitter_0_r){ return blitter_r(offset, 0); } -READ8_MEMBER(nbmj9195_state::blitter_1_r){ return blitter_r(offset, 1); } +uint8_t nbmj9195_state::blitter_0_r(offs_t offset){ return blitter_r(offset, 0); } +uint8_t nbmj9195_state::blitter_1_r(offs_t offset){ return blitter_r(offset, 1); } -WRITE8_MEMBER(nbmj9195_state::clut_0_w){ clut_w(offset, data, 0); } -WRITE8_MEMBER(nbmj9195_state::clut_1_w){ clut_w(offset, data, 1); } +void nbmj9195_state::clut_0_w(offs_t offset, uint8_t data){ clut_w(offset, data, 0); } +void nbmj9195_state::clut_1_w(offs_t offset, uint8_t data){ clut_w(offset, data, 1); } /****************************************************************************** diff --git a/src/mame/video/nemesis.cpp b/src/mame/video/nemesis.cpp index 82ac7111146..29cf2fd05e1 100644 --- a/src/mame/video/nemesis.cpp +++ b/src/mame/video/nemesis.cpp @@ -118,7 +118,7 @@ WRITE_LINE_MEMBER(nemesis_state::gfx_flipy_w) } -WRITE16_MEMBER(nemesis_state::salamand_control_port_word_w) +void nemesis_state::salamand_control_port_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_0_7) { @@ -181,7 +181,7 @@ void nemesis_state::create_palette_lookups() } -WRITE16_MEMBER(nemesis_state::nemesis_palette_word_w) +void nemesis_state::nemesis_palette_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_paletteram + offset); data = m_paletteram[offset]; @@ -193,32 +193,32 @@ WRITE16_MEMBER(nemesis_state::nemesis_palette_word_w) } -WRITE16_MEMBER(nemesis_state::nemesis_videoram1_word_w) +void nemesis_state::nemesis_videoram1_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_videoram1 + offset); m_foreground->mark_tile_dirty(offset); } -WRITE16_MEMBER(nemesis_state::nemesis_videoram2_word_w) +void nemesis_state::nemesis_videoram2_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_videoram2 + offset); m_background->mark_tile_dirty(offset); } -WRITE16_MEMBER(nemesis_state::nemesis_colorram1_word_w) +void nemesis_state::nemesis_colorram1_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_colorram1 + offset); m_foreground->mark_tile_dirty(offset); } -WRITE16_MEMBER(nemesis_state::nemesis_colorram2_word_w) +void nemesis_state::nemesis_colorram2_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(m_colorram2 + offset); m_background->mark_tile_dirty(offset); } -WRITE16_MEMBER(nemesis_state::nemesis_charram_word_w) +void nemesis_state::nemesis_charram_word_w(offs_t offset, uint16_t data, uint16_t mem_mask) { uint16_t oldword = m_charram[offset]; diff --git a/src/mame/video/neogeo.cpp b/src/mame/video/neogeo.cpp index 4360a7c6dde..256ecf79cf1 100644 --- a/src/mame/video/neogeo.cpp +++ b/src/mame/video/neogeo.cpp @@ -88,13 +88,13 @@ WRITE_LINE_MEMBER(neogeo_base_state::set_palette_bank) } -READ16_MEMBER(neogeo_base_state::paletteram_r) +uint16_t neogeo_base_state::paletteram_r(offs_t offset) { return m_paletteram[m_palette_bank + offset]; } -WRITE16_MEMBER(neogeo_base_state::paletteram_w) +void neogeo_base_state::paletteram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { offset += m_palette_bank; data = COMBINE_DATA(&m_paletteram[offset]); @@ -226,13 +226,13 @@ void neogeo_base_state::set_video_control(uint16_t data) } -READ16_MEMBER(neogeo_base_state::video_register_r) +uint16_t neogeo_base_state::video_register_r(address_space &space, offs_t offset, uint16_t mem_mask) { uint16_t ret; /* accessing the LSB only is not mapped */ if (mem_mask == 0x00ff) - ret = unmapped_r(space, 0, 0xffff) & 0x00ff; + ret = unmapped_r(space) & 0x00ff; else { switch (offset) @@ -249,7 +249,7 @@ READ16_MEMBER(neogeo_base_state::video_register_r) } -WRITE16_MEMBER(neogeo_base_state::video_register_w) +void neogeo_base_state::video_register_w(offs_t offset, uint16_t data, uint16_t mem_mask) { /* accessing the LSB only is not mapped */ if (mem_mask != 0x00ff) diff --git a/src/mame/video/news.cpp b/src/mame/video/news.cpp index 6f3abe13378..ce8fc45ca6d 100644 --- a/src/mame/video/news.cpp +++ b/src/mame/video/news.cpp @@ -58,19 +58,19 @@ void news_state::video_start() ***************************************************************************/ -WRITE8_MEMBER(news_state::news_fgram_w) +void news_state::news_fgram_w(offs_t offset, uint8_t data) { m_fgram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(news_state::news_bgram_w) +void news_state::news_bgram_w(offs_t offset, uint8_t data) { m_bgram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset / 2); } -WRITE8_MEMBER(news_state::news_bgpic_w) +void news_state::news_bgpic_w(uint8_t data) { if (m_bgpic != data) { diff --git a/src/mame/video/ninjakd2.cpp b/src/mame/video/ninjakd2.cpp index 424349c8321..700172ce5a9 100644 --- a/src/mame/video/ninjakd2.cpp +++ b/src/mame/video/ninjakd2.cpp @@ -199,13 +199,13 @@ VIDEO_START_MEMBER(omegaf_state,omegaf) * *************************************/ -WRITE8_MEMBER(ninjakd2_state::ninjakd2_bgvideoram_w) +void ninjakd2_state::ninjakd2_bgvideoram_w(offs_t offset, uint8_t data) { m_bg_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset >> 1); } -WRITE8_MEMBER(ninjakd2_state::ninjakd2_fgvideoram_w) +void ninjakd2_state::ninjakd2_fgvideoram_w(offs_t offset, uint8_t data) { m_fg_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset >> 1); @@ -229,12 +229,12 @@ void ninjakd2_state::bg_ctrl(int offset, int data, tilemap_t* tilemap) tilemap->set_scrolly(0, scrolly); } -WRITE8_MEMBER(ninjakd2_state::ninjakd2_bg_ctrl_w) +void ninjakd2_state::ninjakd2_bg_ctrl_w(offs_t offset, uint8_t data) { bg_ctrl(offset, data, m_bg_tilemap); } -WRITE8_MEMBER(ninjakd2_state::ninjakd2_sprite_overdraw_w) +void ninjakd2_state::ninjakd2_sprite_overdraw_w(uint8_t data) { m_next_sprite_overdraw_enabled = data & 1; } diff --git a/src/mame/video/niyanpai.cpp b/src/mame/video/niyanpai.cpp index 5408856dbc1..3c14c3e1610 100644 --- a/src/mame/video/niyanpai.cpp +++ b/src/mame/video/niyanpai.cpp @@ -15,12 +15,12 @@ ******************************************************************************/ -READ16_MEMBER(niyanpai_state::palette_r) +uint16_t niyanpai_state::palette_r(offs_t offset) { return m_palette_ptr[offset]; } -WRITE16_MEMBER(niyanpai_state::palette_w) +void niyanpai_state::palette_w(offs_t offset, uint16_t data, uint16_t mem_mask) { int r, g, b; int offs_h, offs_l; @@ -333,21 +333,21 @@ void niyanpai_state::gfxdraw(int vram) ******************************************************************************/ -WRITE8_MEMBER(niyanpai_state::blitter_0_w){ blitter_w(0, offset, data); } -WRITE8_MEMBER(niyanpai_state::blitter_1_w){ blitter_w(1, offset, data); } -WRITE8_MEMBER(niyanpai_state::blitter_2_w){ blitter_w(2, offset, data); } +void niyanpai_state::blitter_0_w(offs_t offset, uint8_t data){ blitter_w(0, offset, data); } +void niyanpai_state::blitter_1_w(offs_t offset, uint8_t data){ blitter_w(1, offset, data); } +void niyanpai_state::blitter_2_w(offs_t offset, uint8_t data){ blitter_w(2, offset, data); } -READ8_MEMBER(niyanpai_state::blitter_0_r){ return blitter_r(0, offset); } -READ8_MEMBER(niyanpai_state::blitter_1_r){ return blitter_r(1, offset); } -READ8_MEMBER(niyanpai_state::blitter_2_r){ return blitter_r(2, offset); } +uint8_t niyanpai_state::blitter_0_r(offs_t offset){ return blitter_r(0, offset); } +uint8_t niyanpai_state::blitter_1_r(offs_t offset){ return blitter_r(1, offset); } +uint8_t niyanpai_state::blitter_2_r(offs_t offset){ return blitter_r(2, offset); } -WRITE8_MEMBER(niyanpai_state::clut_0_w){ clut_w(0, offset, data); } -WRITE8_MEMBER(niyanpai_state::clut_1_w){ clut_w(1, offset, data); } -WRITE8_MEMBER(niyanpai_state::clut_2_w){ clut_w(2, offset, data); } +void niyanpai_state::clut_0_w(offs_t offset, uint8_t data){ clut_w(0, offset, data); } +void niyanpai_state::clut_1_w(offs_t offset, uint8_t data){ clut_w(1, offset, data); } +void niyanpai_state::clut_2_w(offs_t offset, uint8_t data){ clut_w(2, offset, data); } -WRITE8_MEMBER(niyanpai_state::clutsel_0_w){ clutsel_w(0, data); } -WRITE8_MEMBER(niyanpai_state::clutsel_1_w){ clutsel_w(1, data); } -WRITE8_MEMBER(niyanpai_state::clutsel_2_w){ clutsel_w(2, data); } +void niyanpai_state::clutsel_0_w(uint8_t data){ clutsel_w(0, data); } +void niyanpai_state::clutsel_1_w(uint8_t data){ clutsel_w(1, data); } +void niyanpai_state::clutsel_2_w(uint8_t data){ clutsel_w(2, data); } /****************************************************************************** diff --git a/src/mame/video/nova2001.cpp b/src/mame/video/nova2001.cpp index 13a914067f2..7228c6e3b7c 100644 --- a/src/mame/video/nova2001.cpp +++ b/src/mame/video/nova2001.cpp @@ -45,7 +45,7 @@ rgb_t nova2001_state::BBGGRRII(u32 raw) return rgb_t(r | (r << 4), g | (g << 4), b | (b << 4)); } -WRITE8_MEMBER(nova2001_state::paletteram_w) +void nova2001_state::paletteram_w(offs_t offset, u8 data) { m_palette->write8(offset, data); @@ -185,19 +185,19 @@ VIDEO_START_MEMBER(nova2001_state,raiders5) * *************************************/ -WRITE8_MEMBER(nova2001_state::fg_videoram_w) +void nova2001_state::fg_videoram_w(offs_t offset, u8 data) { m_fg_videoram[offset] = data; m_fg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(nova2001_state::nova2001_bg_videoram_w) +void nova2001_state::nova2001_bg_videoram_w(offs_t offset, u8 data) { m_bg_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } -WRITE8_MEMBER(nova2001_state::ninjakun_bg_videoram_w) +void nova2001_state::ninjakun_bg_videoram_w(offs_t offset, u8 data) { int const x = m_bg_tilemap->scrollx(0) >> 3; int const y = m_bg_tilemap->scrolly(0) >> 3; @@ -209,7 +209,7 @@ WRITE8_MEMBER(nova2001_state::ninjakun_bg_videoram_w) m_bg_tilemap->mark_tile_dirty(offset & 0x3ff); } -READ8_MEMBER(nova2001_state::ninjakun_bg_videoram_r) +u8 nova2001_state::ninjakun_bg_videoram_r(offs_t offset) { int const x = m_bg_tilemap->scrollx(0) >> 3; int const y = m_bg_tilemap->scrolly(0) >> 3; @@ -230,13 +230,13 @@ void nova2001_state::scroll_y_w(u8 data) m_bg_tilemap->set_scrolly(0, data); } -WRITE8_MEMBER(nova2001_state::nova2001_flipscreen_w) +void nova2001_state::nova2001_flipscreen_w(u8 data) { // inverted flip_screen_set(~data & 1); } -WRITE8_MEMBER(nova2001_state::pkunwar_flipscreen_w) +void nova2001_state::pkunwar_flipscreen_w(u8 data) { flip_screen_set(data & 1); } diff --git a/src/mame/video/nycaptor.cpp b/src/mame/video/nycaptor.cpp index b6f05ebeee2..c7f25c5bb10 100644 --- a/src/mame/video/nycaptor.cpp +++ b/src/mame/video/nycaptor.cpp @@ -77,13 +77,13 @@ void nycaptor_state::video_start() save_item(NAME(m_paletteram_ext)); } -WRITE8_MEMBER(nycaptor_state::nycaptor_videoram_w) +void nycaptor_state::nycaptor_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset >> 1); } -WRITE8_MEMBER(nycaptor_state::nycaptor_palette_w) +void nycaptor_state::nycaptor_palette_w(offs_t offset, uint8_t data) { if (offset & 0x100) m_palette->write8_ext((offset & 0xff) + (m_palette_bank << 8), data); @@ -91,7 +91,7 @@ WRITE8_MEMBER(nycaptor_state::nycaptor_palette_w) m_palette->write8((offset & 0xff) + (m_palette_bank << 8), data); } -READ8_MEMBER(nycaptor_state::nycaptor_palette_r) +uint8_t nycaptor_state::nycaptor_palette_r(offs_t offset) { if (offset & 0x100) return m_paletteram_ext[(offset & 0xff) + (m_palette_bank << 8)]; @@ -99,7 +99,7 @@ READ8_MEMBER(nycaptor_state::nycaptor_palette_r) return m_paletteram[(offset & 0xff) + (m_palette_bank << 8)]; } -WRITE8_MEMBER(nycaptor_state::nycaptor_gfxctrl_w) +void nycaptor_state::nycaptor_gfxctrl_w(uint8_t data) { m_gfxctrl = data; @@ -113,12 +113,12 @@ WRITE8_MEMBER(nycaptor_state::nycaptor_gfxctrl_w) } -READ8_MEMBER(nycaptor_state::nycaptor_gfxctrl_r) +uint8_t nycaptor_state::nycaptor_gfxctrl_r() { return m_gfxctrl; } -WRITE8_MEMBER(nycaptor_state::nycaptor_scrlram_w) +void nycaptor_state::nycaptor_scrlram_w(offs_t offset, uint8_t data) { m_scrlram[offset] = data; m_bg_tilemap->set_scrolly(offset, data); diff --git a/src/mame/video/ohmygod.cpp b/src/mame/video/ohmygod.cpp index 470c64a42a4..2558eaf7c16 100644 --- a/src/mame/video/ohmygod.cpp +++ b/src/mame/video/ohmygod.cpp @@ -40,25 +40,25 @@ void ohmygod_state::video_start() ***************************************************************************/ -WRITE16_MEMBER(ohmygod_state::ohmygod_videoram_w) +void ohmygod_state::ohmygod_videoram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_videoram[offset]); m_bg_tilemap->mark_tile_dirty(offset / 2); } -WRITE16_MEMBER(ohmygod_state::ohmygod_spritebank_w) +void ohmygod_state::ohmygod_spritebank_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if (ACCESSING_BITS_8_15) m_spritebank = data & 0x8000; } -WRITE16_MEMBER(ohmygod_state::ohmygod_scrollx_w) +void ohmygod_state::ohmygod_scrollx_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_scrollx); m_bg_tilemap->set_scrollx(0, m_scrollx - 0x81ec); } -WRITE16_MEMBER(ohmygod_state::ohmygod_scrolly_w) +void ohmygod_state::ohmygod_scrolly_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_scrolly); m_bg_tilemap->set_scrolly(0, m_scrolly - 0x81ef); diff --git a/src/mame/video/ojankohs.cpp b/src/mame/video/ojankohs.cpp index 0e4c151869f..db98c744a4b 100644 --- a/src/mame/video/ojankohs.cpp +++ b/src/mame/video/ojankohs.cpp @@ -52,7 +52,7 @@ void ojankohs_state::ojankoy_palette(palette_device &palette) const } } -WRITE8_MEMBER(ojankohs_state::ojankohs_palette_w) +void ojankohs_state::ojankohs_palette_w(offs_t offset, uint8_t data) { m_paletteram[offset] = data; @@ -65,7 +65,7 @@ WRITE8_MEMBER(ojankohs_state::ojankohs_palette_w) m_palette->set_pen_color(offset >> 1, pal5bit(r), pal5bit(g), pal5bit(b)); } -WRITE8_MEMBER(ojankohs_state::ccasino_palette_w) +void ojankohs_state::ccasino_palette_w(offs_t offset, uint8_t data) { offset = bitswap<11>(offset, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8); @@ -80,7 +80,7 @@ WRITE8_MEMBER(ojankohs_state::ccasino_palette_w) m_palette->set_pen_color(offset >> 1, pal5bit(r), pal5bit(g), pal5bit(b)); } -WRITE8_MEMBER(ojankohs_state::ojankoc_palette_w) +void ojankohs_state::ojankoc_palette_w(offs_t offset, uint8_t data) { if (m_paletteram[offset] != data) { @@ -104,19 +104,19 @@ WRITE8_MEMBER(ojankohs_state::ojankoc_palette_w) ******************************************************************************/ -WRITE8_MEMBER(ojankohs_state::ojankohs_videoram_w) +void ojankohs_state::ojankohs_videoram_w(offs_t offset, uint8_t data) { m_videoram[offset] = data; m_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(ojankohs_state::ojankohs_colorram_w) +void ojankohs_state::ojankohs_colorram_w(offs_t offset, uint8_t data) { m_colorram[offset] = data; m_tilemap->mark_tile_dirty(offset); } -WRITE8_MEMBER(ojankohs_state::ojankohs_gfxreg_w) +void ojankohs_state::ojankohs_gfxreg_w(uint8_t data) { if (m_gfxreg != data) { @@ -125,7 +125,7 @@ WRITE8_MEMBER(ojankohs_state::ojankohs_gfxreg_w) } } -WRITE8_MEMBER(ojankohs_state::ojankohs_flipscreen_w) +void ojankohs_state::ojankohs_flipscreen_w(uint8_t data) { if (m_flipscreen != BIT(data, 0)) { @@ -177,7 +177,7 @@ TILE_GET_INFO_MEMBER(ojankohs_state::ojankoy_get_tile_info) ******************************************************************************/ -void ojankohs_state::ojankoc_flipscreen( address_space &space, int data ) +void ojankohs_state::ojankoc_flipscreen(int data) { int x, y; uint8_t color1, color2; @@ -193,20 +193,20 @@ void ojankohs_state::ojankoc_flipscreen( address_space &space, int data ) { color1 = m_videoram[0x0000 + ((y * 256) + x)]; color2 = m_videoram[0x3fff - ((y * 256) + x)]; - ojankoc_videoram_w(space, 0x0000 + ((y * 256) + x), color2); - ojankoc_videoram_w(space, 0x3fff - ((y * 256) + x), color1); + ojankoc_videoram_w(0x0000 + ((y * 256) + x), color2); + ojankoc_videoram_w(0x3fff - ((y * 256) + x), color1); color1 = m_videoram[0x4000 + ((y * 256) + x)]; color2 = m_videoram[0x7fff - ((y * 256) + x)]; - ojankoc_videoram_w(space, 0x4000 + ((y * 256) + x), color2); - ojankoc_videoram_w(space, 0x7fff - ((y * 256) + x), color1); + ojankoc_videoram_w(0x4000 + ((y * 256) + x), color2); + ojankoc_videoram_w(0x7fff - ((y * 256) + x), color1); } } m_flipscreen_old = m_flipscreen; } -WRITE8_MEMBER(ojankohs_state::ojankoc_videoram_w) +void ojankohs_state::ojankoc_videoram_w(offs_t offset, uint8_t data) { int i; uint8_t x, y, xx, px, py ; @@ -301,12 +301,10 @@ uint32_t ojankohs_state::screen_update_ojankoc(screen_device &screen, bitmap_ind if (m_screen_refresh) { - address_space &space = m_maincpu->space(AS_PROGRAM); - /* redraw bitmap */ for (offs = 0; offs < 0x8000; offs++) { - ojankoc_videoram_w(space, offs, m_videoram[offs]); + ojankoc_videoram_w(offs, m_videoram[offs]); } m_screen_refresh = 0; } diff --git a/src/mame/video/orbit.cpp b/src/mame/video/orbit.cpp index 320384bf03a..c1db3fc2efd 100644 --- a/src/mame/video/orbit.cpp +++ b/src/mame/video/orbit.cpp @@ -9,7 +9,7 @@ Atari Orbit video emulation #include "emu.h" #include "includes/orbit.h" -WRITE8_MEMBER(orbit_state::playfield_w) +void orbit_state::playfield_w(offs_t offset, uint8_t data) { m_playfield_ram[offset] = data; m_bg_tilemap->mark_tile_dirty(offset); -- cgit v1.2.3