From 57cf17dc52bcd4571a68576dd6597ddf9fae41a8 Mon Sep 17 00:00:00 2001 From: Ivan Vangelista Date: Thu, 18 Jun 2020 20:13:33 +0200 Subject: finally retired the READ8/16/32/64 and WRITE8/16/32/64 macros (nw) --- src/devices/bus/abckb/abc77.cpp | 2 +- src/devices/bus/abckb/abc77.h | 2 +- src/devices/bus/adamnet/fdc.cpp | 2 +- src/devices/bus/adamnet/fdc.h | 2 +- src/devices/bus/amiga/zorro/a2065.cpp | 11 +- src/devices/bus/amiga/zorro/a2065.h | 4 +- src/devices/bus/amiga/zorro/a2232.cpp | 52 +++---- src/devices/bus/amiga/zorro/a2232.h | 32 ++--- src/devices/bus/amiga/zorro/buddha.cpp | 26 ++-- src/devices/bus/amiga/zorro/buddha.h | 26 ++-- src/devices/bus/c64/cpm.cpp | 4 +- src/devices/bus/c64/cpm.h | 4 +- src/devices/bus/c64/fcc.h | 6 +- src/devices/bus/cbmiec/c1541.cpp | 8 +- src/devices/bus/cbmiec/c1541.h | 8 +- src/devices/bus/cbmiec/c1571.cpp | 4 +- src/devices/bus/cbmiec/c1571.h | 4 +- src/devices/bus/cbmiec/cmdhd.cpp | 2 +- src/devices/bus/cbmiec/cmdhd.h | 2 +- src/devices/bus/cbus/pc9801_118.cpp | 12 +- src/devices/bus/cbus/pc9801_118.h | 8 +- src/devices/bus/cbus/pc9801_26.cpp | 6 +- src/devices/bus/cbus/pc9801_26.h | 4 +- src/devices/bus/cbus/pc9801_86.cpp | 28 ++-- src/devices/bus/cbus/pc9801_86.h | 16 +-- src/devices/bus/cbus/pc9801_amd98.cpp | 8 +- src/devices/bus/cbus/pc9801_amd98.h | 4 +- src/devices/bus/cbus/pc9801_cbus.cpp | 7 +- src/devices/bus/cbus/pc9801_cbus.h | 2 +- src/devices/bus/centronics/comxpl80.cpp | 8 +- src/devices/bus/centronics/comxpl80.h | 8 +- src/devices/bus/centronics/epson_ex800.cpp | 16 +-- src/devices/bus/centronics/epson_ex800.h | 16 +-- src/devices/bus/centronics/epson_lx810l.cpp | 4 +- src/devices/bus/centronics/epson_lx810l.h | 4 +- src/devices/bus/coleco/controller/ctrl.h | 1 - src/devices/bus/dmv/k230.cpp | 8 +- src/devices/bus/dmv/k230.h | 6 +- src/devices/bus/ep64/exdos.cpp | 6 +- src/devices/bus/ep64/exdos.h | 4 +- src/devices/bus/epson_sio/pf10.cpp | 6 +- src/devices/bus/epson_sio/pf10.h | 6 +- src/devices/bus/epson_sio/tf20.cpp | 6 +- src/devices/bus/epson_sio/tf20.h | 6 +- src/devices/bus/gba/gba_slot.cpp | 20 +-- src/devices/bus/gba/gba_slot.h | 32 ++--- src/devices/bus/gba/rom.cpp | 30 ++-- src/devices/bus/gba/rom.h | 32 ++--- src/devices/bus/hexbus/hx5102.cpp | 28 ++-- src/devices/bus/hexbus/hx5102.h | 16 +-- src/devices/bus/hexbus/tp0370.cpp | 4 +- src/devices/bus/hexbus/tp0370.h | 4 +- src/devices/bus/hp80_io/82900.cpp | 8 +- src/devices/bus/hp80_io/82900.h | 8 +- src/devices/bus/hp80_io/82937.cpp | 4 +- src/devices/bus/hp80_io/82937.h | 4 +- src/devices/bus/hp80_io/82939.cpp | 4 +- src/devices/bus/hp80_io/82939.h | 4 +- src/devices/bus/hp9845_io/98032.cpp | 4 +- src/devices/bus/hp9845_io/98032.h | 4 +- src/devices/bus/hp9845_io/98034.cpp | 22 +-- src/devices/bus/hp9845_io/98034.h | 22 +-- src/devices/bus/hp9845_io/98035.cpp | 32 ++--- src/devices/bus/hp9845_io/98035.h | 36 ++--- src/devices/bus/hp9845_io/98046.cpp | 10 +- src/devices/bus/hp9845_io/98046.h | 10 +- src/devices/bus/hp9845_io/hp9845_io.cpp | 6 +- src/devices/bus/hp9845_io/hp9845_io.h | 6 +- src/devices/bus/hp_dio/hp98265a.cpp | 8 +- src/devices/bus/hp_dio/hp98265a.h | 4 +- src/devices/bus/hp_dio/hp98543.cpp | 20 +-- src/devices/bus/hp_dio/hp98543.h | 12 +- src/devices/bus/hp_dio/hp98544.cpp | 8 +- src/devices/bus/hp_dio/hp98544.h | 4 +- src/devices/bus/hp_dio/hp98550.cpp | 20 +-- src/devices/bus/hp_dio/hp98550.h | 14 +- src/devices/bus/hp_dio/hp98603a.cpp | 8 +- src/devices/bus/hp_dio/hp98603a.h | 4 +- src/devices/bus/hp_dio/hp98603b.cpp | 8 +- src/devices/bus/hp_dio/hp98603b.h | 4 +- src/devices/bus/hp_dio/hp98620.cpp | 8 +- src/devices/bus/hp_dio/hp98620.h | 4 +- src/devices/bus/hp_dio/hp98643.cpp | 12 +- src/devices/bus/hp_dio/hp98643.h | 12 +- src/devices/bus/hp_dio/hp98644.cpp | 8 +- src/devices/bus/hp_dio/hp98644.h | 4 +- src/devices/bus/hp_dio/hp_dio.cpp | 1 + src/devices/bus/hp_dio/human_interface.cpp | 8 +- src/devices/bus/hp_dio/human_interface.h | 4 +- src/devices/bus/ieee488/c8280.cpp | 4 +- src/devices/bus/ieee488/c8280.h | 4 +- src/devices/bus/ieee488/hp9122c.cpp | 6 +- src/devices/bus/ieee488/hp9122c.h | 10 +- src/devices/bus/ieee488/hp9895.cpp | 26 ++-- src/devices/bus/ieee488/hp9895.h | 26 ++-- src/devices/bus/ieee488/softbox.cpp | 2 +- src/devices/bus/ieee488/softbox.h | 2 +- src/devices/bus/intellec4/insdatastor.cpp | 10 +- src/devices/bus/intellec4/insdatastor.h | 6 +- src/devices/bus/intellec4/tapereader.cpp | 8 +- src/devices/bus/intellec4/tapereader.h | 8 +- src/devices/bus/interpro/sr/edge.cpp | 14 +- src/devices/bus/interpro/sr/edge.h | 66 ++++----- src/devices/bus/interpro/sr/gt.cpp | 28 ++-- src/devices/bus/interpro/sr/gt.h | 108 +++++++-------- src/devices/bus/isa/dectalk.cpp | 20 +-- src/devices/bus/isa/dectalk.h | 20 +-- src/devices/bus/isa/ex1280.cpp | 10 +- src/devices/bus/isa/ex1280.h | 8 +- src/devices/bus/isa/ne2000.cpp | 6 +- src/devices/bus/isa/ne2000.h | 4 +- src/devices/bus/isa/s3virge.cpp | 10 +- src/devices/bus/isa/s3virge.h | 12 +- src/devices/bus/isa/sb16.cpp | 2 +- src/devices/bus/isa/sblaster.cpp | 4 +- src/devices/bus/isa/ssi2001.cpp | 2 +- src/devices/bus/isa/stereo_fx.cpp | 2 +- src/devices/bus/kc/d004.cpp | 10 +- src/devices/bus/kc/d004.h | 10 +- src/devices/bus/lpci/cirrus.cpp | 2 +- src/devices/bus/lpci/cirrus.h | 2 +- src/devices/bus/lpci/i82371sb.cpp | 6 +- src/devices/bus/lpci/i82371sb.h | 4 +- src/devices/bus/lpci/southbridge.cpp | 50 +++---- src/devices/bus/lpci/southbridge.h | 36 ++--- src/devices/bus/macpds/hyperdrive.cpp | 6 +- src/devices/bus/macpds/hyperdrive.h | 4 +- src/devices/bus/macpds/macpds.cpp | 15 +- src/devices/bus/macpds/macpds.h | 3 +- src/devices/bus/macpds/pds_tpdfpd.cpp | 12 +- src/devices/bus/macpds/pds_tpdfpd.h | 8 +- src/devices/bus/megadrive/eeprom.cpp | 32 ++--- src/devices/bus/megadrive/eeprom.h | 32 ++--- src/devices/bus/megadrive/ggenie.cpp | 6 +- src/devices/bus/megadrive/ggenie.h | 4 +- src/devices/bus/megadrive/jcart.cpp | 8 +- src/devices/bus/megadrive/jcart.h | 8 +- src/devices/bus/megadrive/md_slot.cpp | 24 ++-- src/devices/bus/megadrive/md_slot.h | 30 ++-- src/devices/bus/megadrive/rom.cpp | 118 ++++++++-------- src/devices/bus/megadrive/rom.h | 120 ++++++++-------- src/devices/bus/megadrive/sk.cpp | 4 +- src/devices/bus/megadrive/sk.h | 4 +- src/devices/bus/megadrive/stm95.cpp | 6 +- src/devices/bus/megadrive/stm95.h | 6 +- src/devices/bus/megadrive/svp.cpp | 40 +++--- src/devices/bus/megadrive/svp.h | 42 +++--- src/devices/bus/multibus/isbc202.cpp | 6 +- src/devices/bus/multibus/isbc202.h | 4 +- src/devices/bus/nubus/bootbug.cpp | 6 +- src/devices/bus/nubus/bootbug.h | 4 +- src/devices/bus/nubus/laserview.cpp | 6 +- src/devices/bus/nubus/laserview.h | 4 +- src/devices/bus/nubus/nubus.cpp | 45 ++---- src/devices/bus/nubus/nubus.h | 4 +- src/devices/bus/nubus/nubus_48gc.cpp | 6 +- src/devices/bus/nubus/nubus_48gc.h | 4 +- src/devices/bus/nubus/nubus_asntmc3b.cpp | 16 +-- src/devices/bus/nubus/nubus_asntmc3b.h | 8 +- src/devices/bus/nubus/nubus_cb264.cpp | 12 +- src/devices/bus/nubus/nubus_cb264.h | 8 +- src/devices/bus/nubus/nubus_image.cpp | 42 +++--- src/devices/bus/nubus/nubus_image.h | 28 ++-- src/devices/bus/nubus/nubus_m2hires.cpp | 14 +- src/devices/bus/nubus/nubus_m2hires.h | 8 +- src/devices/bus/nubus/nubus_m2video.cpp | 14 +- src/devices/bus/nubus/nubus_m2video.h | 8 +- src/devices/bus/nubus/nubus_radiustpd.cpp | 16 +-- src/devices/bus/nubus/nubus_radiustpd.h | 8 +- src/devices/bus/nubus/nubus_spec8.cpp | 14 +- src/devices/bus/nubus/nubus_spec8.h | 8 +- src/devices/bus/nubus/nubus_specpdq.cpp | 12 +- src/devices/bus/nubus/nubus_specpdq.h | 8 +- src/devices/bus/nubus/nubus_vikbw.cpp | 12 +- src/devices/bus/nubus/nubus_vikbw.h | 8 +- src/devices/bus/nubus/nubus_wsportrait.cpp | 14 +- src/devices/bus/nubus/nubus_wsportrait.h | 8 +- src/devices/bus/nubus/pds30_30hr.cpp | 12 +- src/devices/bus/nubus/pds30_30hr.h | 8 +- src/devices/bus/nubus/pds30_cb264.cpp | 12 +- src/devices/bus/nubus/pds30_cb264.h | 8 +- src/devices/bus/nubus/pds30_mc30.cpp | 12 +- src/devices/bus/nubus/pds30_mc30.h | 8 +- src/devices/bus/nubus/pds30_procolor816.cpp | 14 +- src/devices/bus/nubus/pds30_procolor816.h | 8 +- src/devices/bus/nubus/pds30_sigmalview.cpp | 14 +- src/devices/bus/nubus/pds30_sigmalview.h | 8 +- src/devices/bus/nubus/quadralink.cpp | 6 +- src/devices/bus/nubus/quadralink.h | 4 +- src/devices/bus/pc_joy/pc_joy.cpp | 4 +- src/devices/bus/pc_joy/pc_joy.h | 4 +- src/devices/bus/pet/superpet.cpp | 4 +- src/devices/bus/pet/superpet.h | 4 +- src/devices/bus/psi_kbd/psi_kbd.h | 2 +- src/devices/bus/qbus/pc11.cpp | 8 +- src/devices/bus/qbus/pc11.h | 4 +- src/devices/bus/qbus/qbus.cpp | 2 +- src/devices/bus/qbus/qbus.h | 2 +- src/devices/bus/saturn/bram.cpp | 4 +- src/devices/bus/saturn/bram.h | 4 +- src/devices/bus/saturn/dram.cpp | 8 +- src/devices/bus/saturn/dram.h | 8 +- src/devices/bus/saturn/rom.cpp | 2 +- src/devices/bus/saturn/rom.h | 2 +- src/devices/bus/saturn/sat_slot.cpp | 28 ++-- src/devices/bus/saturn/sat_slot.h | 28 ++-- src/devices/bus/sbus/artecon.cpp | 6 +- src/devices/bus/sbus/artecon.h | 6 +- src/devices/bus/sbus/bwtwo.cpp | 10 +- src/devices/bus/sbus/bwtwo.h | 10 +- src/devices/bus/sbus/cgsix.cpp | 26 ++-- src/devices/bus/sbus/cgsix.h | 26 ++-- src/devices/bus/sbus/cgthree.cpp | 14 +- src/devices/bus/sbus/cgthree.h | 15 +- src/devices/bus/sbus/hme.cpp | 6 +- src/devices/bus/sbus/hme.h | 6 +- src/devices/bus/sbus/sbus.cpp | 14 +- src/devices/bus/sbus/sbus.h | 11 +- src/devices/bus/sbus/sunpc.cpp | 6 +- src/devices/bus/sbus/sunpc.h | 6 +- src/devices/bus/sms_ctrl/multitap.h | 2 - src/devices/bus/ti99/internal/genboard.cpp | 4 +- src/devices/bus/ti99/internal/genboard.h | 4 +- src/devices/bus/ti99x/990_dk.cpp | 4 +- src/devices/bus/ti99x/990_dk.h | 4 +- src/devices/bus/ti99x/990_hd.cpp | 4 +- src/devices/bus/ti99x/990_hd.h | 4 +- src/devices/bus/ti99x/990_tap.cpp | 4 +- src/devices/bus/ti99x/990_tap.h | 4 +- src/devices/bus/tiki100/8088.cpp | 4 +- src/devices/bus/tiki100/8088.h | 4 +- src/devices/bus/vme/vme.cpp | 12 +- src/devices/bus/vme/vme.h | 8 +- src/devices/bus/vme/vme_fccpu20.cpp | 4 +- src/devices/bus/vme/vme_fccpu20.h | 4 +- src/devices/bus/vme/vme_fcisio.cpp | 6 +- src/devices/bus/vme/vme_fcisio.h | 6 +- src/devices/bus/vme/vme_fcscsi.cpp | 14 +- src/devices/bus/vme/vme_fcscsi.h | 14 +- src/devices/bus/vme/vme_hcpu30.cpp | 4 +- src/devices/bus/vme/vme_hcpu30.h | 4 +- src/devices/bus/vme/vme_mvme350.cpp | 4 +- src/devices/bus/vme/vme_mvme350.h | 4 +- src/devices/bus/vme/vme_mzr8300.cpp | 4 +- src/devices/bus/vme/vme_mzr8300.h | 4 +- src/devices/bus/wangpc/wdc.cpp | 20 +-- src/devices/bus/wangpc/wdc.h | 20 +-- src/devices/bus/x68k/x68k_midi.cpp | 6 +- src/devices/bus/x68k/x68k_midi.h | 4 +- src/devices/bus/x68k/x68k_neptunex.cpp | 6 +- src/devices/bus/x68k/x68k_neptunex.h | 4 +- src/devices/bus/x68k/x68k_scsiext.cpp | 6 +- src/devices/bus/x68k/x68k_scsiext.h | 4 +- src/devices/cpu/alto2/a2hw.cpp | 76 +++++----- src/devices/cpu/alto2/a2hw.h | 82 +++++------ src/devices/cpu/alto2/a2kbd.cpp | 2 +- src/devices/cpu/alto2/a2kbd.h | 2 +- src/devices/cpu/alto2/a2mem.cpp | 14 +- src/devices/cpu/alto2/a2mem.h | 10 +- src/devices/cpu/alto2/alto2cpu.cpp | 14 +- src/devices/cpu/alto2/alto2cpu.h | 18 +-- src/devices/cpu/arcompact/arcompact.cpp | 14 +- src/devices/cpu/arcompact/arcompact.h | 16 +-- src/devices/cpu/arm7/arm7.cpp | 14 +- src/devices/cpu/arm7/arm7.h | 14 +- src/devices/cpu/arm7/arm7ops.cpp | 6 +- src/devices/cpu/arm7/lpc210x.cpp | 38 ++--- src/devices/cpu/arm7/lpc210x.h | 46 +++--- src/devices/cpu/dsp16/dsp16.cpp | 12 +- src/devices/cpu/dsp16/dsp16.h | 6 +- src/devices/cpu/dsp56156/dsp56156.h | 6 +- src/devices/cpu/dsp56156/dsp56mem.cpp | 4 +- src/devices/cpu/dspp/dspp.cpp | 36 ++--- src/devices/cpu/dspp/dspp.h | 36 ++--- src/devices/cpu/h8/h83002.cpp | 8 +- src/devices/cpu/h8/h83002.h | 8 +- src/devices/cpu/h8/h83003.cpp | 8 +- src/devices/cpu/h8/h83003.h | 8 +- src/devices/cpu/h8/h83006.cpp | 4 +- src/devices/cpu/h8/h83006.h | 4 +- src/devices/cpu/h8/h83008.cpp | 4 +- src/devices/cpu/h8/h83008.h | 4 +- src/devices/cpu/h8/h83048.cpp | 4 +- src/devices/cpu/h8/h83048.h | 4 +- src/devices/cpu/h8/h83337.cpp | 16 +-- src/devices/cpu/h8/h83337.h | 16 +-- src/devices/cpu/h8/h8_adc.cpp | 12 +- src/devices/cpu/h8/h8_adc.h | 12 +- src/devices/cpu/h8/h8_dma.cpp | 56 ++++---- src/devices/cpu/h8/h8_dma.h | 56 ++++---- src/devices/cpu/h8/h8_dtc.cpp | 8 +- src/devices/cpu/h8/h8_dtc.h | 8 +- src/devices/cpu/h8/h8_intc.cpp | 44 +++--- src/devices/cpu/h8/h8_intc.h | 36 ++--- src/devices/cpu/h8/h8_port.cpp | 16 +-- src/devices/cpu/h8/h8_port.h | 16 +-- src/devices/cpu/h8/h8_sci.cpp | 26 ++-- src/devices/cpu/h8/h8_sci.h | 26 ++-- src/devices/cpu/h8/h8_timer16.cpp | 70 +++++----- src/devices/cpu/h8/h8_timer16.h | 66 ++++----- src/devices/cpu/h8/h8_timer8.cpp | 16 +-- src/devices/cpu/h8/h8_timer8.h | 16 +-- src/devices/cpu/h8/h8_watchdog.cpp | 8 +- src/devices/cpu/h8/h8_watchdog.h | 8 +- src/devices/cpu/h8/h8s2245.cpp | 8 +- src/devices/cpu/h8/h8s2245.h | 8 +- src/devices/cpu/h8/h8s2320.cpp | 4 +- src/devices/cpu/h8/h8s2320.h | 4 +- src/devices/cpu/h8/h8s2357.cpp | 4 +- src/devices/cpu/h8/h8s2357.h | 4 +- src/devices/cpu/h8/h8s2655.cpp | 4 +- src/devices/cpu/h8/h8s2655.h | 4 +- src/devices/cpu/i386/athlon.cpp | 4 +- src/devices/cpu/i386/athlon.h | 2 +- src/devices/cpu/i86/i186.cpp | 36 ++--- src/devices/cpu/i86/i186.h | 4 +- src/devices/cpu/jaguar/jaguar.cpp | 30 ++-- src/devices/cpu/jaguar/jaguar.h | 30 ++-- src/devices/cpu/m6502/m3745x.cpp | 12 +- src/devices/cpu/m6502/m3745x.h | 12 +- src/devices/cpu/m6502/m5074x.cpp | 26 ++-- src/devices/cpu/m6502/m5074x.h | 10 +- src/devices/cpu/m6502/m6500_1.cpp | 24 ++-- src/devices/cpu/m6502/m6500_1.h | 34 ++--- src/devices/cpu/m6502/n2a03.cpp | 8 +- src/devices/cpu/m6502/n2a03.h | 8 +- src/devices/cpu/m6805/m68705.cpp | 30 ++-- src/devices/cpu/m6805/m68705.h | 26 ++-- src/devices/cpu/mips/ps2vif1.cpp | 4 +- src/devices/cpu/mips/ps2vif1.h | 4 +- src/devices/cpu/mips/ps2vu.cpp | 4 +- src/devices/cpu/mips/ps2vu.h | 4 +- src/devices/cpu/pps4/pps4.cpp | 2 +- src/devices/cpu/pps4/pps4.h | 2 +- src/devices/cpu/psx/dma.cpp | 4 +- src/devices/cpu/psx/dma.h | 4 +- src/devices/cpu/psx/irq.cpp | 4 +- src/devices/cpu/psx/irq.h | 4 +- src/devices/cpu/psx/mdec.cpp | 4 +- src/devices/cpu/psx/mdec.h | 4 +- src/devices/cpu/psx/psx.cpp | 56 ++++---- src/devices/cpu/psx/psx.h | 40 +++--- src/devices/cpu/psx/rcnt.cpp | 4 +- src/devices/cpu/psx/rcnt.h | 4 +- src/devices/cpu/psx/sio.cpp | 4 +- src/devices/cpu/psx/sio.h | 4 +- src/devices/cpu/scudsp/scudsp.cpp | 12 +- src/devices/cpu/scudsp/scudsp.h | 12 +- src/devices/cpu/sh/sh2.cpp | 2 +- src/devices/cpu/sh/sh2.h | 208 ++++++++++++++-------------- src/devices/cpu/sh/sh2comn.cpp | 176 +++++++++++------------ src/devices/cpu/sh/sh3comn.cpp | 8 +- src/devices/cpu/sh/sh4.h | 12 +- src/devices/cpu/sh/sh4comn.cpp | 4 +- src/devices/cpu/sh/sh7604_bus.cpp | 32 ++--- src/devices/cpu/sh/sh7604_bus.h | 32 ++--- src/devices/cpu/sh/sh7604_wdt.cpp | 4 +- src/devices/cpu/sh/sh7604_wdt.h | 4 +- src/devices/cpu/sharc/sharc.cpp | 12 +- src/devices/cpu/sharc/sharc.h | 12 +- src/devices/cpu/tms32025/tms32025.cpp | 24 ++-- src/devices/cpu/tms32025/tms32025.h | 26 ++-- src/devices/cpu/tms32031/tms32031.cpp | 2 +- src/devices/cpu/tms32031/tms32031.h | 4 +- src/devices/cpu/tms32051/tms32051.cpp | 4 +- src/devices/cpu/tms32051/tms32051.h | 4 +- src/devices/machine/ra17xx.cpp | 2 +- src/emu/emumem.h | 19 --- src/emu/machine.cpp | 4 +- src/emu/machine.h | 4 +- src/emu/memarray.h | 2 +- src/mame/drivers/gba.cpp | 34 ++--- src/mame/drivers/hp9825.cpp | 4 +- src/mame/drivers/hp9845.cpp | 4 +- src/mame/drivers/megadriv.cpp | 9 +- src/mame/drivers/saturn.cpp | 56 ++++---- src/mame/drivers/segapico.cpp | 18 +-- src/mame/machine/3dom2.cpp | 2 +- src/zexall/zexall.cpp | 24 ++-- 379 files changed, 2620 insertions(+), 2661 deletions(-) diff --git a/src/devices/bus/abckb/abc77.cpp b/src/devices/bus/abckb/abc77.cpp index 782ab6ecab1..5d0760a58c3 100644 --- a/src/devices/bus/abckb/abc77.cpp +++ b/src/devices/bus/abckb/abc77.cpp @@ -601,7 +601,7 @@ WRITE_LINE_MEMBER( abc77_device::prog_w ) // j3_w - //------------------------------------------------- -WRITE8_MEMBER( abc77_device::j3_w ) +void abc77_device::j3_w(uint8_t data) { m_j3 = data; } diff --git a/src/devices/bus/abckb/abc77.h b/src/devices/bus/abckb/abc77.h index 4726e86f2f5..1d79f374f90 100644 --- a/src/devices/bus/abckb/abc77.h +++ b/src/devices/bus/abckb/abc77.h @@ -83,7 +83,7 @@ private: void p2_w(uint8_t data); DECLARE_READ_LINE_MEMBER( t1_r ); DECLARE_WRITE_LINE_MEMBER( prog_w ); - DECLARE_WRITE8_MEMBER( j3_w ); + void j3_w(uint8_t data); void abc77_io(address_map &map); void abc77_map(address_map &map); diff --git a/src/devices/bus/adamnet/fdc.cpp b/src/devices/bus/adamnet/fdc.cpp index 867c7cd8103..f46ac09b946 100644 --- a/src/devices/bus/adamnet/fdc.cpp +++ b/src/devices/bus/adamnet/fdc.cpp @@ -199,7 +199,7 @@ void adam_fdc_device::adamnet_reset_w(int state) // data_r - //------------------------------------------------- -READ8_MEMBER( adam_fdc_device::data_r ) +uint8_t adam_fdc_device::data_r(offs_t offset) { uint8_t data = m_fdc->data_r(); diff --git a/src/devices/bus/adamnet/fdc.h b/src/devices/bus/adamnet/fdc.h index d0d1cd1df55..515466927bb 100644 --- a/src/devices/bus/adamnet/fdc.h +++ b/src/devices/bus/adamnet/fdc.h @@ -54,7 +54,7 @@ private: DECLARE_FLOPPY_FORMATS( floppy_formats ); - DECLARE_READ8_MEMBER( data_r ); + uint8_t data_r(offs_t offset); uint8_t p1_r(); void p1_w(uint8_t data); uint8_t p2_r(); diff --git a/src/devices/bus/amiga/zorro/a2065.cpp b/src/devices/bus/amiga/zorro/a2065.cpp index 6b2348f187d..50c92753eae 100644 --- a/src/devices/bus/amiga/zorro/a2065.cpp +++ b/src/devices/bus/amiga/zorro/a2065.cpp @@ -96,9 +96,10 @@ void a2065_device::autoconfig_base_address(offs_t address) write16sm_delegate(*m_lance, FUNC(am7990_device::regs_w)), 0xffff); // install access to onboard ram (32k) - m_slot->space().install_readwrite_handler(address + 0x8000, address + 0x8000 + 0x7fff, - read16_delegate(*this, FUNC(a2065_device::host_ram_r)), - write16_delegate(*this, FUNC(a2065_device::host_ram_w)), 0xffff); + m_slot->space().install_read_handler(address + 0x8000, address + 0x8000 + 0x7fff, + read16sm_delegate(*this, FUNC(a2065_device::host_ram_r)), 0xffff); + m_slot->space().install_write_handler(address + 0x8000, address + 0x8000 + 0x7fff, + write16s_delegate(*this, FUNC(a2065_device::host_ram_w)), 0xffff); // we're done m_slot->cfgout_w(0); @@ -131,13 +132,13 @@ WRITE_LINE_MEMBER( a2065_device::cfgin_w ) } } -READ16_MEMBER( a2065_device::host_ram_r ) +uint16_t a2065_device::host_ram_r(offs_t offset) { // logerror("host read offset %04x\n", offset); return m_ram[offset & 0x3fff]; } -WRITE16_MEMBER( a2065_device::host_ram_w ) +void a2065_device::host_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { // logerror("host write %04x = %04x\n", offset, data); COMBINE_DATA(&m_ram[offset]); diff --git a/src/devices/bus/amiga/zorro/a2065.h b/src/devices/bus/amiga/zorro/a2065.h index ee0a82541fd..f305309fe48 100644 --- a/src/devices/bus/amiga/zorro/a2065.h +++ b/src/devices/bus/amiga/zorro/a2065.h @@ -32,8 +32,8 @@ public: // construction/destruction a2065_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER( host_ram_r ); - DECLARE_WRITE16_MEMBER( host_ram_w ); + uint16_t host_ram_r(offs_t offset); + void host_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint16_t lance_ram_r(offs_t offset); void lance_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/amiga/zorro/a2232.cpp b/src/devices/bus/amiga/zorro/a2232.cpp index 5e7e6733a50..af2e6db7461 100644 --- a/src/devices/bus/amiga/zorro/a2232.cpp +++ b/src/devices/bus/amiga/zorro/a2232.cpp @@ -157,14 +157,14 @@ void a2232_device::device_reset_after_children() // IMPLEMENTATION //************************************************************************** -WRITE8_MEMBER( a2232_device::int2_w ) +void a2232_device::int2_w(uint8_t data) { LOG("%s: int2_w %04x\n", shortname(), data); m_slot->int2_w(1); } -WRITE8_MEMBER( a2232_device::irq_ack8_w ) +void a2232_device::irq_ack8_w(uint8_t data) { LOG("%s: irq_ack_w %04x\n", shortname(), data); @@ -185,24 +185,24 @@ void a2232_device::autoconfig_base_address(offs_t address) m_slot->space().unmap_readwrite(0xe80000, 0xe8007f); m_slot->space().install_readwrite_handler(address, address + 0x3fff, - read16_delegate(*this, FUNC(a2232_device::shared_ram_r)), - write16_delegate(*this, FUNC(a2232_device::shared_ram_w)), 0xffff); + read16s_delegate(*this, FUNC(a2232_device::shared_ram_r)), + write16s_delegate(*this, FUNC(a2232_device::shared_ram_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0x4000, address + 0x4001, - read16_delegate(*this, FUNC(a2232_device::irq_ack_r)), - write16_delegate(*this, FUNC(a2232_device::irq_ack_w)), 0xffff); + read16smo_delegate(*this, FUNC(a2232_device::irq_ack_r)), + write16smo_delegate(*this, FUNC(a2232_device::irq_ack_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0x8000, address + 0x8001, - read16_delegate(*this, FUNC(a2232_device::reset_low_r)), - write16_delegate(*this, FUNC(a2232_device::reset_low_w)), 0xffff); + read16smo_delegate(*this, FUNC(a2232_device::reset_low_r)), + write16smo_delegate(*this, FUNC(a2232_device::reset_low_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0xa000, address + 0xa001, - read16_delegate(*this, FUNC(a2232_device::irq_r)), - write16_delegate(*this, FUNC(a2232_device::irq_w)), 0xffff); + read16smo_delegate(*this, FUNC(a2232_device::irq_r)), + write16smo_delegate(*this, FUNC(a2232_device::irq_w)), 0xffff); m_slot->space().install_readwrite_handler(address + 0xc000, address + 0xc001, - read16_delegate(*this, FUNC(a2232_device::reset_high_r)), - write16_delegate(*this, FUNC(a2232_device::reset_high_w)), 0xffff); + read16s_delegate(*this, FUNC(a2232_device::reset_high_r)), + write16s_delegate(*this, FUNC(a2232_device::reset_high_w)), 0xffff); // we're done m_slot->cfgout_w(0); @@ -240,7 +240,7 @@ WRITE_LINE_MEMBER( a2232_device::cfgin_w ) // ZORRO //************************************************************************** -READ16_MEMBER( a2232_device::shared_ram_r ) +uint16_t a2232_device::shared_ram_r(offs_t offset, uint16_t mem_mask) { uint16_t data = 0; @@ -259,7 +259,7 @@ READ16_MEMBER( a2232_device::shared_ram_r ) return data; } -WRITE16_MEMBER( a2232_device::shared_ram_w ) +void a2232_device::shared_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOGMASKED(LOG_DATA, "%s: shared_ram_w(%04x) %04x [mask = %04x]\n", shortname(), offset << 1, data, mem_mask); @@ -270,31 +270,31 @@ WRITE16_MEMBER( a2232_device::shared_ram_w ) m_shared_ram[offset << 1] = (data & 0xff00) >> 8; } -READ16_MEMBER( a2232_device::irq_ack_r ) +uint16_t a2232_device::irq_ack_r() { m_slot->int2_w(0); return 0xffff; } -WRITE16_MEMBER( a2232_device::irq_ack_w ) +void a2232_device::irq_ack_w(uint16_t data) { m_slot->int2_w(0); } -READ16_MEMBER( a2232_device::reset_low_r ) +uint16_t a2232_device::reset_low_r() { m_iocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); return 0xffff; } -WRITE16_MEMBER( a2232_device::reset_low_w ) +void a2232_device::reset_low_w(uint16_t data) { m_iocpu->set_input_line(INPUT_LINE_RESET, ASSERT_LINE); } -READ16_MEMBER( a2232_device::irq_r ) +uint16_t a2232_device::irq_r() { if (!machine().side_effects_disabled()) m_ioirq->in_w<8>(ASSERT_LINE); @@ -302,12 +302,12 @@ READ16_MEMBER( a2232_device::irq_r ) return 0xffff; } -WRITE16_MEMBER( a2232_device::irq_w ) +void a2232_device::irq_w(uint16_t data) { m_ioirq->in_w<8>(ASSERT_LINE); } -READ16_MEMBER( a2232_device::reset_high_r ) +uint16_t a2232_device::reset_high_r(offs_t offset, uint16_t mem_mask) { uint16_t data = 0xffff; @@ -318,7 +318,7 @@ READ16_MEMBER( a2232_device::reset_high_r ) return data; } -WRITE16_MEMBER( a2232_device::reset_high_w ) +void a2232_device::reset_high_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("%s: reset_high_w %04x [mask = %04x]\n", shortname(), data, mem_mask); @@ -331,13 +331,13 @@ WRITE16_MEMBER( a2232_device::reset_high_w ) //************************************************************************** template -READ8_MEMBER( a2232_device::acia_r ) +uint8_t a2232_device::acia_r(offs_t offset) { return m_acia[N]->read(offset >> 1); } template -WRITE8_MEMBER( a2232_device::acia_w ) +void a2232_device::acia_w(offs_t offset, uint8_t data) { m_acia[N]->write(offset >> 1, data); } @@ -347,12 +347,12 @@ WRITE8_MEMBER( a2232_device::acia_w ) // CIA //************************************************************************** -READ8_MEMBER( a2232_device::cia_r ) +uint8_t a2232_device::cia_r(offs_t offset) { return m_cia->read(offset >> 1); } -WRITE8_MEMBER( a2232_device::cia_w ) +void a2232_device::cia_w(offs_t offset, uint8_t data) { m_cia->write(offset >> 1, data); } diff --git a/src/devices/bus/amiga/zorro/a2232.h b/src/devices/bus/amiga/zorro/a2232.h index 9c4a6b05da1..c6c836aec80 100644 --- a/src/devices/bus/amiga/zorro/a2232.h +++ b/src/devices/bus/amiga/zorro/a2232.h @@ -39,16 +39,16 @@ public: a2232_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // zorro slot - DECLARE_READ16_MEMBER( shared_ram_r ); - DECLARE_WRITE16_MEMBER( shared_ram_w ); - DECLARE_READ16_MEMBER( irq_ack_r ); - DECLARE_WRITE16_MEMBER( irq_ack_w ); - DECLARE_READ16_MEMBER( reset_low_r ); - DECLARE_WRITE16_MEMBER( reset_low_w ); - DECLARE_READ16_MEMBER( irq_r ); - DECLARE_WRITE16_MEMBER( irq_w ); - DECLARE_READ16_MEMBER( reset_high_r ); - DECLARE_WRITE16_MEMBER( reset_high_w ); + uint16_t shared_ram_r(offs_t offset, uint16_t mem_mask = ~0); + void shared_ram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t irq_ack_r(); + void irq_ack_w(uint16_t data); + uint16_t reset_low_r(); + void reset_low_w(uint16_t data); + uint16_t irq_r(); + void irq_w(uint16_t data); + uint16_t reset_high_r(offs_t offset, uint16_t mem_mask = ~0); + void reset_high_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void iocpu_map(address_map &map); @@ -65,19 +65,19 @@ protected: private: // cpu - WRITE8_MEMBER( int2_w ); - WRITE8_MEMBER( irq_ack8_w ); + void int2_w(uint8_t data); + void irq_ack8_w(uint8_t data); // acia - template DECLARE_READ8_MEMBER( acia_r ); - template DECLARE_WRITE8_MEMBER( acia_w ); + template uint8_t acia_r(offs_t offset); + template void acia_w(offs_t offset, uint8_t data); // cia uint8_t cia_port_a_r(); uint8_t cia_port_b_r(); void cia_port_b_w(uint8_t data); - DECLARE_READ8_MEMBER( cia_r ); - DECLARE_WRITE8_MEMBER( cia_w ); + uint8_t cia_r(offs_t offset); + void cia_w(offs_t offset, uint8_t data); // rs232 DECLARE_WRITE_LINE_MEMBER( rs232_1_rxd_w ); diff --git a/src/devices/bus/amiga/zorro/buddha.cpp b/src/devices/bus/amiga/zorro/buddha.cpp index 57a251eb67c..83fe8bbcfd1 100644 --- a/src/devices/bus/amiga/zorro/buddha.cpp +++ b/src/devices/bus/amiga/zorro/buddha.cpp @@ -181,7 +181,7 @@ WRITE_LINE_MEMBER( buddha_device::cfgin_w ) } } -READ16_MEMBER( buddha_device::speed_r ) +uint16_t buddha_device::speed_r(offs_t offset, uint16_t mem_mask) { uint16_t data = 0xffff; @@ -191,7 +191,7 @@ READ16_MEMBER( buddha_device::speed_r ) return data; } -WRITE16_MEMBER( buddha_device::speed_w ) +void buddha_device::speed_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("speed_w %04x [mask = %04x]\n", data, mem_mask); } @@ -216,7 +216,7 @@ WRITE_LINE_MEMBER( buddha_device::ide_1_interrupt_w ) m_slot->int2_w(state); } -READ16_MEMBER( buddha_device::ide_0_interrupt_r ) +uint16_t buddha_device::ide_0_interrupt_r(offs_t offset, uint16_t mem_mask) { uint16_t data; @@ -227,7 +227,7 @@ READ16_MEMBER( buddha_device::ide_0_interrupt_r ) return data; } -READ16_MEMBER( buddha_device::ide_1_interrupt_r ) +uint16_t buddha_device::ide_1_interrupt_r(offs_t offset, uint16_t mem_mask) { uint16_t data; @@ -238,7 +238,7 @@ READ16_MEMBER( buddha_device::ide_1_interrupt_r ) return data; } -WRITE16_MEMBER( buddha_device::ide_interrupt_enable_w ) +void buddha_device::ide_interrupt_enable_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("ide_interrupt_enable_w %04x [mask = %04x]\n", data, mem_mask); @@ -246,7 +246,7 @@ WRITE16_MEMBER( buddha_device::ide_interrupt_enable_w ) m_ide_interrupts_enabled = true; } -READ16_MEMBER( buddha_device::ide_0_cs0_r ) +uint16_t buddha_device::ide_0_cs0_r(offs_t offset, uint16_t mem_mask) { uint16_t data = m_ata_0->cs0_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); @@ -256,7 +256,7 @@ READ16_MEMBER( buddha_device::ide_0_cs0_r ) return data; } -WRITE16_MEMBER( buddha_device::ide_0_cs0_w ) +void buddha_device::ide_0_cs0_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("ide_0_cs0_w(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -266,7 +266,7 @@ WRITE16_MEMBER( buddha_device::ide_0_cs0_w ) m_ata_0->cs0_w((offset >> 1) & 0x07, data, mem_mask); } -READ16_MEMBER( buddha_device::ide_0_cs1_r ) +uint16_t buddha_device::ide_0_cs1_r(offs_t offset, uint16_t mem_mask) { uint16_t data = m_ata_0->cs1_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); @@ -276,7 +276,7 @@ READ16_MEMBER( buddha_device::ide_0_cs1_r ) return data; } -WRITE16_MEMBER( buddha_device::ide_0_cs1_w ) +void buddha_device::ide_0_cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("ide_0_cs1_w(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -286,7 +286,7 @@ WRITE16_MEMBER( buddha_device::ide_0_cs1_w ) m_ata_0->cs1_w((offset >> 1) & 0x07, data, mem_mask); } -READ16_MEMBER( buddha_device::ide_1_cs0_r ) +uint16_t buddha_device::ide_1_cs0_r(offs_t offset, uint16_t mem_mask) { uint16_t data = m_ata_1->cs0_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); @@ -296,7 +296,7 @@ READ16_MEMBER( buddha_device::ide_1_cs0_r ) return data; } -WRITE16_MEMBER( buddha_device::ide_1_cs0_w ) +void buddha_device::ide_1_cs0_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("ide_1_cs0_w(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); @@ -306,7 +306,7 @@ WRITE16_MEMBER( buddha_device::ide_1_cs0_w ) m_ata_1->cs0_w((offset >> 1) & 0x07, data, mem_mask); } -READ16_MEMBER( buddha_device::ide_1_cs1_r ) +uint16_t buddha_device::ide_1_cs1_r(offs_t offset, uint16_t mem_mask) { uint16_t data = m_ata_1->cs1_r((offset >> 1) & 0x07, (mem_mask << 8) | (mem_mask >> 8)); data = (data << 8) | (data >> 8); @@ -316,7 +316,7 @@ READ16_MEMBER( buddha_device::ide_1_cs1_r ) return data; } -WRITE16_MEMBER( buddha_device::ide_1_cs1_w ) +void buddha_device::ide_1_cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("ide_1_cs1_w(%04x) %04x [mask = %04x]\n", offset, data, mem_mask); diff --git a/src/devices/bus/amiga/zorro/buddha.h b/src/devices/bus/amiga/zorro/buddha.h index b534734f994..f79382f6013 100644 --- a/src/devices/bus/amiga/zorro/buddha.h +++ b/src/devices/bus/amiga/zorro/buddha.h @@ -48,23 +48,23 @@ protected: private: // speed register - DECLARE_READ16_MEMBER( speed_r ); - DECLARE_WRITE16_MEMBER( speed_w ); + uint16_t speed_r(offs_t offset, uint16_t mem_mask = ~0); + void speed_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); // ide register - DECLARE_READ16_MEMBER( ide_0_cs0_r ); - DECLARE_WRITE16_MEMBER( ide_0_cs0_w ); - DECLARE_READ16_MEMBER( ide_0_cs1_r ); - DECLARE_WRITE16_MEMBER( ide_0_cs1_w ); - DECLARE_READ16_MEMBER( ide_1_cs0_r ); - DECLARE_WRITE16_MEMBER( ide_1_cs0_w ); - DECLARE_READ16_MEMBER( ide_1_cs1_r ); - DECLARE_WRITE16_MEMBER( ide_1_cs1_w ); + uint16_t ide_0_cs0_r(offs_t offset, uint16_t mem_mask = ~0); + void ide_0_cs0_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t ide_0_cs1_r(offs_t offset, uint16_t mem_mask = ~0); + void ide_0_cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t ide_1_cs0_r(offs_t offset, uint16_t mem_mask = ~0); + void ide_1_cs0_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t ide_1_cs1_r(offs_t offset, uint16_t mem_mask = ~0); + void ide_1_cs1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); // interrupt register - DECLARE_READ16_MEMBER( ide_0_interrupt_r ); - DECLARE_READ16_MEMBER( ide_1_interrupt_r ); - DECLARE_WRITE16_MEMBER( ide_interrupt_enable_w ); + uint16_t ide_0_interrupt_r(offs_t offset, uint16_t mem_mask = ~0); + uint16_t ide_1_interrupt_r(offs_t offset, uint16_t mem_mask = ~0); + void ide_interrupt_enable_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER( ide_0_interrupt_w ); DECLARE_WRITE_LINE_MEMBER( ide_1_interrupt_w ); diff --git a/src/devices/bus/c64/cpm.cpp b/src/devices/bus/c64/cpm.cpp index 7a909f6e920..02a5ccb029b 100644 --- a/src/devices/bus/c64/cpm.cpp +++ b/src/devices/bus/c64/cpm.cpp @@ -193,7 +193,7 @@ int c64_cpm_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int r // dma_r - //------------------------------------------------- -READ8_MEMBER( c64_cpm_cartridge_device::dma_r ) +uint8_t c64_cpm_cartridge_device::dma_r(offs_t offset) { uint8_t data = 0xff; @@ -212,7 +212,7 @@ READ8_MEMBER( c64_cpm_cartridge_device::dma_r ) // dma_w - //------------------------------------------------- -WRITE8_MEMBER( c64_cpm_cartridge_device::dma_w ) +void c64_cpm_cartridge_device::dma_w(offs_t offset, uint8_t data) { if (m_enabled) { diff --git a/src/devices/bus/c64/cpm.h b/src/devices/bus/c64/cpm.h index 63d3a7123cd..9500b536562 100644 --- a/src/devices/bus/c64/cpm.h +++ b/src/devices/bus/c64/cpm.h @@ -51,8 +51,8 @@ private: int m_reset; - DECLARE_READ8_MEMBER( dma_r ); - DECLARE_WRITE8_MEMBER( dma_w ); + uint8_t dma_r(offs_t offset); + void dma_w(offs_t offset, uint8_t data); void z80_io(address_map &map); void z80_mem(address_map &map); diff --git a/src/devices/bus/c64/fcc.h b/src/devices/bus/c64/fcc.h index 3c3aa02881d..03eac948a73 100644 --- a/src/devices/bus/c64/fcc.h +++ b/src/devices/bus/c64/fcc.h @@ -58,9 +58,9 @@ private: int m_hidden; DECLARE_WRITE_LINE_MEMBER(mainlatch_int) { m_slot->nmi_w(state); } - DECLARE_READ8_MEMBER(rom_r) { return m_romx[offset]; } // cartridge cpu rom - DECLARE_READ8_MEMBER(nvram_r) { return m_nvram[offset & m_nvram.mask()]; } - DECLARE_WRITE8_MEMBER(nvram_w) { m_nvram[offset & m_nvram.mask()] = data; } + uint8_t rom_r(offs_t offset) { return m_romx[offset]; } // cartridge cpu rom + uint8_t nvram_r(offs_t offset) { return m_nvram[offset & m_nvram.mask()]; } + void nvram_w(offs_t offset, uint8_t data) { m_nvram[offset & m_nvram.mask()] = data; } void c64_fcc_map(address_map &map); }; diff --git a/src/devices/bus/cbmiec/c1541.cpp b/src/devices/bus/cbmiec/c1541.cpp index fb18a9a4092..86b110f8a78 100644 --- a/src/devices/bus/cbmiec/c1541.cpp +++ b/src/devices/bus/cbmiec/c1541.cpp @@ -634,7 +634,7 @@ const tiny_rom_entry *msd_sd2_device::device_rom_region() const // read - //------------------------------------------------- -READ8_MEMBER( c1541_prologic_dos_classic_device::read ) +uint8_t c1541_prologic_dos_classic_device::read() { return 0; } @@ -644,7 +644,7 @@ READ8_MEMBER( c1541_prologic_dos_classic_device::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( c1541_prologic_dos_classic_device::write ) +void c1541_prologic_dos_classic_device::write(uint8_t data) { } @@ -913,12 +913,12 @@ FLOPPY_FORMATS_MEMBER( c1541_device_base::floppy_formats ) FLOPPY_FORMATS_END -READ8_MEMBER( c1541_prologic_dos_classic_device::pia_r ) +uint8_t c1541_prologic_dos_classic_device::pia_r(offs_t offset) { return m_pia->read((offset >> 2) & 0x03); } -WRITE8_MEMBER( c1541_prologic_dos_classic_device::pia_w ) +void c1541_prologic_dos_classic_device::pia_w(offs_t offset, uint8_t data) { m_pia->write((offset >> 2) & 0x03, data); } diff --git a/src/devices/bus/cbmiec/c1541.h b/src/devices/bus/cbmiec/c1541.h index 2dca91499dc..d73974c3e63 100644 --- a/src/devices/bus/cbmiec/c1541.h +++ b/src/devices/bus/cbmiec/c1541.h @@ -264,13 +264,13 @@ private: required_device m_cent_data_out; required_memory_region m_mmu_rom; - 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 pia_pa_w(uint8_t data); uint8_t pia_pb_r(); void pia_pb_w(uint8_t data); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(); + void write(uint8_t data); void c1541pdc_mem(address_map &map); }; diff --git a/src/devices/bus/cbmiec/c1571.cpp b/src/devices/bus/cbmiec/c1571.cpp index c725892753b..d08d92c8d7a 100644 --- a/src/devices/bus/cbmiec/c1571.cpp +++ b/src/devices/bus/cbmiec/c1571.cpp @@ -382,7 +382,7 @@ void c1571cr_device::via0_pb_w(uint8_t data) } -READ8_MEMBER( c1571_device::via1_r ) +uint8_t c1571_device::via1_r(offs_t offset) { uint8_t data = m_via1->read(offset); @@ -392,7 +392,7 @@ READ8_MEMBER( c1571_device::via1_r ) return data; } -WRITE8_MEMBER( c1571_device::via1_w ) +void c1571_device::via1_w(offs_t offset, uint8_t data) { m_via1->write(offset, data); diff --git a/src/devices/bus/cbmiec/c1571.h b/src/devices/bus/cbmiec/c1571.h index 26bc3f43ba7..db4ba3e9e63 100644 --- a/src/devices/bus/cbmiec/c1571.h +++ b/src/devices/bus/cbmiec/c1571.h @@ -49,8 +49,8 @@ public: uint8_t via0_pb_r(); void via0_pb_w(uint8_t data); - DECLARE_READ8_MEMBER( via1_r ); - DECLARE_WRITE8_MEMBER( via1_w ); + uint8_t via1_r(offs_t offset); + void via1_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER( via1_irq_w ); uint8_t via1_pb_r(); void via1_pb_w(uint8_t data); diff --git a/src/devices/bus/cbmiec/cmdhd.cpp b/src/devices/bus/cbmiec/cmdhd.cpp index 91d92bddc2a..096f68a9641 100644 --- a/src/devices/bus/cbmiec/cmdhd.cpp +++ b/src/devices/bus/cbmiec/cmdhd.cpp @@ -168,7 +168,7 @@ void cmd_hd_device::cbm_iec_reset(int state) // led_w - //------------------------------------------------- -WRITE8_MEMBER( cmd_hd_device::led_w ) +void cmd_hd_device::led_w(uint8_t data) { /* diff --git a/src/devices/bus/cbmiec/cmdhd.h b/src/devices/bus/cbmiec/cmdhd.h index c41433a7d65..8c6836f36bf 100644 --- a/src/devices/bus/cbmiec/cmdhd.h +++ b/src/devices/bus/cbmiec/cmdhd.h @@ -51,7 +51,7 @@ private: required_device m_maincpu; required_device m_scsibus; - DECLARE_WRITE8_MEMBER( led_w ); + void led_w(uint8_t data); void mem_map(address_map &map); }; diff --git a/src/devices/bus/cbus/pc9801_118.cpp b/src/devices/bus/cbus/pc9801_118.cpp index 2a2ec411a18..d298dbb5422 100644 --- a/src/devices/bus/cbus/pc9801_118.cpp +++ b/src/devices/bus/cbus/pc9801_118.cpp @@ -114,7 +114,7 @@ void pc9801_118_device::device_validity_check(validity_checker &valid) const void pc9801_118_device::device_start() { - m_bus->install_io(0xa460, 0xa463, read8_delegate(*this, FUNC(pc9801_118_device::id_r)), write8_delegate(*this, FUNC(pc9801_118_device::ext_w))); + m_bus->install_io(0xa460, 0xa463, read8sm_delegate(*this, FUNC(pc9801_118_device::id_r)), write8sm_delegate(*this, FUNC(pc9801_118_device::ext_w))); save_item(NAME(m_ext_reg)); } @@ -128,7 +128,7 @@ void pc9801_118_device::device_reset() { uint16_t port_base = (ioport("OPN3_DSW")->read() & 1) << 8; m_bus->io_space().unmap_readwrite(0x0088, 0x008b, 0x100); - m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8_delegate(*this, FUNC(pc9801_118_device::opn3_r)), write8_delegate(*this, FUNC(pc9801_118_device::opn3_w))); + m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8sm_delegate(*this, FUNC(pc9801_118_device::opn3_r)), write8sm_delegate(*this, FUNC(pc9801_118_device::opn3_w))); m_ext_reg = 1; // TODO: enabled or disabled? } @@ -138,7 +138,7 @@ void pc9801_118_device::device_reset() //************************************************************************** -READ8_MEMBER(pc9801_118_device::opn3_r) +uint8_t pc9801_118_device::opn3_r(offs_t offset) { if(((offset & 5) == 0) || m_ext_reg) return m_opn3->read(offset >> 1); @@ -150,7 +150,7 @@ READ8_MEMBER(pc9801_118_device::opn3_r) } -WRITE8_MEMBER(pc9801_118_device::opn3_w) +void pc9801_118_device::opn3_w(offs_t offset, uint8_t data) { if(((offset & 5) == 0) || m_ext_reg) m_opn3->write(offset >> 1,data); @@ -158,7 +158,7 @@ WRITE8_MEMBER(pc9801_118_device::opn3_w) // printf("PC9801-118: Write to undefined port [%02x] %02x\n",offset+0x188,data); } -READ8_MEMBER( pc9801_118_device::id_r ) +uint8_t pc9801_118_device::id_r(offs_t offset) { if(offset == 0) { @@ -170,7 +170,7 @@ READ8_MEMBER( pc9801_118_device::id_r ) return 0xff; } -WRITE8_MEMBER( pc9801_118_device::ext_w ) +void pc9801_118_device::ext_w(offs_t offset, uint8_t data) { if(offset == 0) { diff --git a/src/devices/bus/cbus/pc9801_118.h b/src/devices/bus/cbus/pc9801_118.h index 491179a478c..0bfe957a960 100644 --- a/src/devices/bus/cbus/pc9801_118.h +++ b/src/devices/bus/cbus/pc9801_118.h @@ -28,10 +28,10 @@ public: // construction/destruction pc9801_118_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(opn3_r); - DECLARE_WRITE8_MEMBER(opn3_w); - DECLARE_READ8_MEMBER(id_r); - DECLARE_WRITE8_MEMBER(ext_w); + uint8_t opn3_r(offs_t offset); + void opn3_w(offs_t offset, uint8_t data); + uint8_t id_r(offs_t offset); + void ext_w(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/cbus/pc9801_26.cpp b/src/devices/bus/cbus/pc9801_26.cpp index 3d70d603665..ad8ef212f27 100644 --- a/src/devices/bus/cbus/pc9801_26.cpp +++ b/src/devices/bus/cbus/pc9801_26.cpp @@ -133,7 +133,7 @@ void pc9801_26_device::device_reset() uint16_t port_base = (ioport("OPN_DSW")->read() & 1) << 8; m_bus->io_space().unmap_readwrite(0x0088, 0x008b, 0x100); - m_bus->install_io(port_base + 0x0088, port_base + 0x008b, read8_delegate(*this, FUNC(pc9801_26_device::opn_r)), write8_delegate(*this, FUNC(pc9801_26_device::opn_w))); + m_bus->install_io(port_base + 0x0088, port_base + 0x008b, read8sm_delegate(*this, FUNC(pc9801_26_device::opn_r)), write8sm_delegate(*this, FUNC(pc9801_26_device::opn_w))); } @@ -142,7 +142,7 @@ void pc9801_26_device::device_reset() //************************************************************************** // TODO: leftover mirrors? Doesn't match to what installs above -READ8_MEMBER(pc9801_26_device::opn_r) +uint8_t pc9801_26_device::opn_r(offs_t offset) { if((offset & 1) == 0) { @@ -156,7 +156,7 @@ READ8_MEMBER(pc9801_26_device::opn_r) } -WRITE8_MEMBER(pc9801_26_device::opn_w) +void pc9801_26_device::opn_w(offs_t offset, uint8_t data) { if((offset & 5) == 0) m_opn->write(offset >> 1, data); diff --git a/src/devices/bus/cbus/pc9801_26.h b/src/devices/bus/cbus/pc9801_26.h index abda3181512..b354d7b9a9e 100644 --- a/src/devices/bus/cbus/pc9801_26.h +++ b/src/devices/bus/cbus/pc9801_26.h @@ -27,8 +27,8 @@ public: // construction/destruction pc9801_26_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(opn_r); - DECLARE_WRITE8_MEMBER(opn_w); + uint8_t opn_r(offs_t offset); + void opn_w(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/cbus/pc9801_86.cpp b/src/devices/bus/cbus/pc9801_86.cpp index ed7012900ee..60a1d89870b 100644 --- a/src/devices/bus/cbus/pc9801_86.cpp +++ b/src/devices/bus/cbus/pc9801_86.cpp @@ -169,10 +169,10 @@ void pc9801_86_device::device_validity_check(validity_checker &valid) const void pc9801_86_device::device_start() { m_bus->program_space().install_rom(0xcc000,0xcffff,memregion(this->subtag("sound_bios").c_str())->base()); - m_bus->install_io(0xa460, 0xa463, read8_delegate(*this, FUNC(pc9801_86_device::id_r)), write8_delegate(*this, FUNC(pc9801_86_device::mask_w))); - m_bus->install_io(0xa464, 0xa46f, read8_delegate(*this, FUNC(pc9801_86_device::pcm_r)), write8_delegate(*this, FUNC(pc9801_86_device::pcm_w))); - m_bus->install_io(0xa66c, 0xa66f, read8_delegate(*this, [this](address_space &s, offs_t o, u8 mm){ return o == 2 ? m_pcm_mute : 0xff; }, "pc9801_86_mute_r"), - write8_delegate(*this, [this](address_space &s, offs_t o, u8 d, u8 mm){ if(o == 2) m_pcm_mute = d; }, "pc9801_86_mute_w")); + m_bus->install_io(0xa460, 0xa463, read8smo_delegate(*this, FUNC(pc9801_86_device::id_r)), write8smo_delegate(*this, FUNC(pc9801_86_device::mask_w))); + m_bus->install_io(0xa464, 0xa46f, read8sm_delegate(*this, FUNC(pc9801_86_device::pcm_r)), write8sm_delegate(*this, FUNC(pc9801_86_device::pcm_w))); + m_bus->install_io(0xa66c, 0xa66f, read8sm_delegate(*this, [this](offs_t o){ return o == 2 ? m_pcm_mute : 0xff; }, "pc9801_86_mute_r"), + write8sm_delegate(*this, [this](offs_t o, u8 d){ if(o == 2) m_pcm_mute = d; }, "pc9801_86_mute_w")); m_dac_timer = timer_alloc(); save_item(NAME(m_count)); @@ -189,7 +189,7 @@ void pc9801_86_device::device_reset() { uint16_t port_base = (ioport("OPNA_DSW")->read() & 1) << 8; m_bus->io_space().unmap_readwrite(0x0088, 0x008f, 0x100); - m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8_delegate(*this, FUNC(pc9801_86_device::opna_r)), write8_delegate(*this, FUNC(pc9801_86_device::opna_w))); + m_bus->install_io(port_base + 0x0088, port_base + 0x008f, read8sm_delegate(*this, FUNC(pc9801_86_device::opna_r)), write8sm_delegate(*this, FUNC(pc9801_86_device::opna_w))); m_mask = 0; m_head = m_tail = m_count = 0; @@ -207,7 +207,7 @@ void pc9801_86_device::device_reset() //************************************************************************** -READ8_MEMBER(pc9801_86_device::opna_r) +uint8_t pc9801_86_device::opna_r(offs_t offset) { if((offset & 1) == 0) return m_opna->read(offset >> 1); @@ -218,7 +218,7 @@ READ8_MEMBER(pc9801_86_device::opna_r) } } -WRITE8_MEMBER(pc9801_86_device::opna_w) +void pc9801_86_device::opna_w(offs_t offset, uint8_t data) { if((offset & 1) == 0) m_opna->write(offset >> 1,data); @@ -226,17 +226,17 @@ WRITE8_MEMBER(pc9801_86_device::opna_w) logerror("PC9801-86: Write to undefined port [%02x] %02x\n",offset+0x188,data); } -READ8_MEMBER(pc9801_86_device::id_r) +uint8_t pc9801_86_device::id_r() { return 0x40 | m_mask; } -WRITE8_MEMBER(pc9801_86_device::mask_w) +void pc9801_86_device::mask_w(uint8_t data) { m_mask = data & 1; } -READ8_MEMBER(pc9801_86_device::pcm_r) +uint8_t pc9801_86_device::pcm_r(offs_t offset) { if((offset & 1) == 0) { @@ -258,7 +258,7 @@ READ8_MEMBER(pc9801_86_device::pcm_r) return 0xff; } -WRITE8_MEMBER(pc9801_86_device::pcm_w) +void pc9801_86_device::pcm_w(offs_t offset, uint8_t data) { const u32 rate = (25.4_MHz_XTAL).value() / 16; const int divs[8] = {36, 48, 72, 96, 144, 192, 288, 384}; @@ -421,7 +421,7 @@ void pc9801_speakboard_device::device_start() { pc9801_86_device::device_start(); - m_bus->install_io(0x0588, 0x058f, read8_delegate(*this, FUNC(pc9801_speakboard_device::opna_slave_r)), write8_delegate(*this, FUNC(pc9801_speakboard_device::opna_slave_w))); + m_bus->install_io(0x0588, 0x058f, read8sm_delegate(*this, FUNC(pc9801_speakboard_device::opna_slave_r)), write8sm_delegate(*this, FUNC(pc9801_speakboard_device::opna_slave_w))); } void pc9801_speakboard_device::device_reset() @@ -429,7 +429,7 @@ void pc9801_speakboard_device::device_reset() pc9801_86_device::device_reset(); } -READ8_MEMBER(pc9801_speakboard_device::opna_slave_r) +uint8_t pc9801_speakboard_device::opna_slave_r(offs_t offset) { if((offset & 1) == 0) return m_opna_slave->read(offset >> 1); @@ -440,7 +440,7 @@ READ8_MEMBER(pc9801_speakboard_device::opna_slave_r) } } -WRITE8_MEMBER(pc9801_speakboard_device::opna_slave_w) +void pc9801_speakboard_device::opna_slave_w(offs_t offset, uint8_t data) { if((offset & 1) == 0) m_opna_slave->write(offset >> 1,data); diff --git a/src/devices/bus/cbus/pc9801_86.h b/src/devices/bus/cbus/pc9801_86.h index de3b9190aab..ce782cc20d1 100644 --- a/src/devices/bus/cbus/pc9801_86.h +++ b/src/devices/bus/cbus/pc9801_86.h @@ -29,12 +29,12 @@ public: pc9801_86_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); pc9801_86_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(opna_r); - DECLARE_WRITE8_MEMBER(opna_w); - DECLARE_READ8_MEMBER(id_r); - DECLARE_WRITE8_MEMBER(mask_w); - DECLARE_READ8_MEMBER(pcm_r); - DECLARE_WRITE8_MEMBER(pcm_w); + uint8_t opna_r(offs_t offset); + void opna_w(offs_t offset, uint8_t data); + uint8_t id_r(); + void mask_w(uint8_t data); + uint8_t pcm_r(offs_t offset); + void pcm_w(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(sound_irq); @@ -73,8 +73,8 @@ public: // construction/destruction pc9801_speakboard_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(opna_slave_r); - DECLARE_WRITE8_MEMBER(opna_slave_w); + uint8_t opna_slave_r(offs_t offset); + void opna_slave_w(offs_t offset, uint8_t data); protected: virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/cbus/pc9801_amd98.cpp b/src/devices/bus/cbus/pc9801_amd98.cpp index c89e88bc632..a6eeb015c4c 100644 --- a/src/devices/bus/cbus/pc9801_amd98.cpp +++ b/src/devices/bus/cbus/pc9801_amd98.cpp @@ -134,9 +134,9 @@ void pc9801_amd98_device::device_start() void pc9801_amd98_device::device_reset() { - m_bus->install_io(0x00d8, 0x00df, read8_delegate(*this, FUNC(pc9801_amd98_device::read)), write8_delegate(*this, FUNC(pc9801_amd98_device::write))); + m_bus->install_io(0x00d8, 0x00df, read8sm_delegate(*this, FUNC(pc9801_amd98_device::read)), write8sm_delegate(*this, FUNC(pc9801_amd98_device::write))); // Thexder access with following - m_bus->install_io(0x38d8, 0x38df, read8_delegate(*this, FUNC(pc9801_amd98_device::read)), write8_delegate(*this, FUNC(pc9801_amd98_device::write))); + m_bus->install_io(0x38d8, 0x38df, read8sm_delegate(*this, FUNC(pc9801_amd98_device::read)), write8sm_delegate(*this, FUNC(pc9801_amd98_device::write))); } @@ -144,7 +144,7 @@ void pc9801_amd98_device::device_reset() // READ/WRITE HANDLERS //************************************************************************** -READ8_MEMBER(pc9801_amd98_device::read) +uint8_t pc9801_amd98_device::read(offs_t offset) { switch(offset) { @@ -159,7 +159,7 @@ READ8_MEMBER(pc9801_amd98_device::read) return 0xff; } -WRITE8_MEMBER(pc9801_amd98_device::write) +void pc9801_amd98_device::write(offs_t offset, uint8_t data) { switch(offset) { diff --git a/src/devices/bus/cbus/pc9801_amd98.h b/src/devices/bus/cbus/pc9801_amd98.h index f116166fc9e..fa031edbe1b 100644 --- a/src/devices/bus/cbus/pc9801_amd98.h +++ b/src/devices/bus/cbus/pc9801_amd98.h @@ -29,8 +29,8 @@ public: static constexpr feature_type imperfect_features() { return feature::SOUND; } - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/cbus/pc9801_cbus.cpp b/src/devices/bus/cbus/pc9801_cbus.cpp index 6f8ccb5a6b3..0287404d011 100644 --- a/src/devices/bus/cbus/pc9801_cbus.cpp +++ b/src/devices/bus/cbus/pc9801_cbus.cpp @@ -95,7 +95,7 @@ void pc9801_slot_device::device_start() // m_card = dynamic_cast(get_card_device()); } -void pc9801_slot_device::install_io(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler) +template void pc9801_slot_device::install_io(offs_t start, offs_t end, R rhandler, W whandler) { int buswidth = m_iospace->data_width(); switch(buswidth) @@ -113,3 +113,8 @@ void pc9801_slot_device::install_io(offs_t start, offs_t end, read8_delegate rha fatalerror("PC-9801-26: Bus width %d not supported\n", buswidth); } } + +template void pc9801_slot_device::install_io(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); +template void pc9801_slot_device::install_io(offs_t start, offs_t end, read8s_delegate rhandler, write8s_delegate whandler); +template void pc9801_slot_device::install_io(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler); +template void pc9801_slot_device::install_io(offs_t start, offs_t end, read8smo_delegate rhandler, write8smo_delegate whandler); diff --git a/src/devices/bus/cbus/pc9801_cbus.h b/src/devices/bus/cbus/pc9801_cbus.h index 22dd80154c3..728aca3e692 100644 --- a/src/devices/bus/cbus/pc9801_cbus.h +++ b/src/devices/bus/cbus/pc9801_cbus.h @@ -111,7 +111,7 @@ public: address_space &program_space() const { return *m_memspace; } address_space &io_space() const { return *m_iospace; } template void int_w(bool state) { m_int_callback[I](state); } - void install_io(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler); + template void install_io(offs_t start, offs_t end, R rhandler, W whandler); protected: // device-level overrides diff --git a/src/devices/bus/centronics/comxpl80.cpp b/src/devices/bus/centronics/comxpl80.cpp index 3b0910389fa..65646f0d290 100644 --- a/src/devices/bus/centronics/comxpl80.cpp +++ b/src/devices/bus/centronics/comxpl80.cpp @@ -153,7 +153,7 @@ void comx_pl80_device::device_reset() // pa_w - //------------------------------------------------- -WRITE8_MEMBER( comx_pl80_device::pa_w ) +void comx_pl80_device::pa_w(uint8_t data) { /* @@ -205,7 +205,7 @@ WRITE8_MEMBER( comx_pl80_device::pa_w ) // pb_w - //------------------------------------------------- -WRITE8_MEMBER( comx_pl80_device::pb_w ) +void comx_pl80_device::pb_w(uint8_t data) { /* @@ -232,7 +232,7 @@ WRITE8_MEMBER( comx_pl80_device::pb_w ) // pc_w - //------------------------------------------------- -WRITE8_MEMBER( comx_pl80_device::pc_w ) +void comx_pl80_device::pc_w(uint8_t data) { /* @@ -262,7 +262,7 @@ WRITE8_MEMBER( comx_pl80_device::pc_w ) // pd_r - //------------------------------------------------- -READ8_MEMBER( comx_pl80_device::pd_r ) +uint8_t comx_pl80_device::pd_r() { /* diff --git a/src/devices/bus/centronics/comxpl80.h b/src/devices/bus/centronics/comxpl80.h index a6e77e730a2..f64a31da6d0 100644 --- a/src/devices/bus/centronics/comxpl80.h +++ b/src/devices/bus/centronics/comxpl80.h @@ -63,10 +63,10 @@ private: uint8_t m_data; - DECLARE_WRITE8_MEMBER( pa_w ); - DECLARE_WRITE8_MEMBER( pb_w ); - DECLARE_WRITE8_MEMBER( pc_w ); - DECLARE_READ8_MEMBER( pd_r ); + void pa_w(uint8_t data); + void pb_w(uint8_t data); + void pc_w(uint8_t data); + uint8_t pd_r(); }; diff --git a/src/devices/bus/centronics/epson_ex800.cpp b/src/devices/bus/centronics/epson_ex800.cpp index 986678300f8..e7af6cfc65b 100644 --- a/src/devices/bus/centronics/epson_ex800.cpp +++ b/src/devices/bus/centronics/epson_ex800.cpp @@ -435,46 +435,46 @@ void epson_ex800_device::portc_w(uint8_t data) /* Memory mapped I/O access */ -READ8_MEMBER(epson_ex800_device::devsel_r) +uint8_t epson_ex800_device::devsel_r(offs_t offset) { logerror("DEVSEL R %s with offset %x\n", machine().describe_context(), offset); return machine().rand(); } -WRITE8_MEMBER(epson_ex800_device::devsel_w) +void epson_ex800_device::devsel_w(offs_t offset, uint8_t data) { logerror("DEVSEL W %x %s with offset %x\n", data, machine().describe_context(), offset); } -READ8_MEMBER(epson_ex800_device::gate5a_r) +uint8_t epson_ex800_device::gate5a_r(offs_t offset) { logerror("GATE5A R %s with offset %x\n", machine().describe_context(), offset); return machine().rand(); } -WRITE8_MEMBER(epson_ex800_device::gate5a_w) +void epson_ex800_device::gate5a_w(offs_t offset, uint8_t data) { logerror("GATE5A W %x %s with offset %x\n", data, machine().describe_context(), offset); } -READ8_MEMBER(epson_ex800_device::iosel_r) +uint8_t epson_ex800_device::iosel_r(offs_t offset) { logerror("IOSEL R %s with offset %x\n", machine().describe_context(), offset); return machine().rand(); } -WRITE8_MEMBER(epson_ex800_device::iosel_w) +void epson_ex800_device::iosel_w(offs_t offset, uint8_t data) { logerror("IOSEL W %x %s with offset %x\n", data, machine().describe_context(), offset); } -READ8_MEMBER(epson_ex800_device::gate7a_r) +uint8_t epson_ex800_device::gate7a_r(offs_t offset) { logerror("GATE7A R %s with offset %x\n", machine().describe_context(), offset); return machine().rand(); } -WRITE8_MEMBER(epson_ex800_device::gate7a_w) +void epson_ex800_device::gate7a_w(offs_t offset, uint8_t data) { logerror("GATE7A W %x %s with offset %x\n", data, machine().describe_context(), offset); } diff --git a/src/devices/bus/centronics/epson_ex800.h b/src/devices/bus/centronics/epson_ex800.h index 750eb8a771f..d51b822f23f 100644 --- a/src/devices/bus/centronics/epson_ex800.h +++ b/src/devices/bus/centronics/epson_ex800.h @@ -48,14 +48,14 @@ private: void porta_w(uint8_t data); void portb_w(uint8_t data); void portc_w(uint8_t data); - DECLARE_READ8_MEMBER(devsel_r); - DECLARE_WRITE8_MEMBER(devsel_w); - DECLARE_READ8_MEMBER(gate5a_r); - DECLARE_WRITE8_MEMBER(gate5a_w); - DECLARE_READ8_MEMBER(iosel_r); - DECLARE_WRITE8_MEMBER(iosel_w); - DECLARE_READ8_MEMBER(gate7a_r); - DECLARE_WRITE8_MEMBER(gate7a_w); + uint8_t devsel_r(offs_t offset); + void devsel_w(offs_t offset, uint8_t data); + uint8_t gate5a_r(offs_t offset); + void gate5a_w(offs_t offset, uint8_t data); + uint8_t iosel_r(offs_t offset); + void iosel_w(offs_t offset, uint8_t data); + uint8_t gate7a_r(offs_t offset); + void gate7a_w(offs_t offset, uint8_t data); void ex800_mem(address_map &map); diff --git a/src/devices/bus/centronics/epson_lx810l.cpp b/src/devices/bus/centronics/epson_lx810l.cpp index 00d0ef866b4..bc594bc97aa 100644 --- a/src/devices/bus/centronics/epson_lx810l.cpp +++ b/src/devices/bus/centronics/epson_lx810l.cpp @@ -347,12 +347,12 @@ void epson_lx810l_device::device_timer(emu_timer &timer, device_timer_id id, int FAKEMEM READ/WRITE ***************************************************************************/ -READ8_MEMBER(epson_lx810l_device::fakemem_r) +uint8_t epson_lx810l_device::fakemem_r() { return m_fakemem; } -WRITE8_MEMBER(epson_lx810l_device::fakemem_w) +void epson_lx810l_device::fakemem_w(uint8_t data) { m_fakemem = data; } diff --git a/src/devices/bus/centronics/epson_lx810l.h b/src/devices/bus/centronics/epson_lx810l.h index 670ad10dae5..9d46d7fb508 100644 --- a/src/devices/bus/centronics/epson_lx810l.h +++ b/src/devices/bus/centronics/epson_lx810l.h @@ -77,8 +77,8 @@ private: void portc_w(offs_t offset, uint8_t data); /* fake memory I/O to get past memory reset check */ - DECLARE_READ8_MEMBER(fakemem_r); - DECLARE_WRITE8_MEMBER(fakemem_w); + uint8_t fakemem_r(); + void fakemem_w(uint8_t data); /* Extended Timer Output */ DECLARE_WRITE_LINE_MEMBER(co0_w); diff --git a/src/devices/bus/coleco/controller/ctrl.h b/src/devices/bus/coleco/controller/ctrl.h index fd79acaed46..3d87a19b355 100644 --- a/src/devices/bus/coleco/controller/ctrl.h +++ b/src/devices/bus/coleco/controller/ctrl.h @@ -64,7 +64,6 @@ public: // computer interface uint8_t read() { uint8_t data = 0xff; if (exists()) data = m_device->joy_r(); return data; } - DECLARE_READ8_MEMBER( read ) { return read(); } DECLARE_WRITE_LINE_MEMBER( common0_w ) { if (exists()) m_device->common0_w(state); } DECLARE_WRITE_LINE_MEMBER( common1_w ) { if (exists()) m_device->common1_w(state); } diff --git a/src/devices/bus/dmv/k230.cpp b/src/devices/bus/dmv/k230.cpp index 595cc5f970a..82d6e24f7d2 100644 --- a/src/devices/bus/dmv/k230.cpp +++ b/src/devices/bus/dmv/k230.cpp @@ -147,7 +147,7 @@ void dmv_k230_device::device_start() void dmv_k234_device::device_start() { dmv_k230_device::device_start(); - iospace().install_readwrite_handler(0xd8, 0xdf, read8_delegate(*this, FUNC(dmv_k234_device::snr_r)), write8_delegate(*this, FUNC(dmv_k234_device::snr_w)), 0); + iospace().install_readwrite_handler(0xd8, 0xdf, read8smo_delegate(*this, FUNC(dmv_k234_device::snr_r)), write8smo_delegate(*this, FUNC(dmv_k234_device::snr_w)), 0); // register for state saving save_item(NAME(m_snr)); @@ -247,7 +247,7 @@ void dmv_k230_device::switch16_w(int state) m_maincpu->set_input_line(INPUT_LINE_HALT, (m_hold || !m_switch16) ? ASSERT_LINE : CLEAR_LINE); } -READ8_MEMBER(dmv_k230_device::rom_r) +uint8_t dmv_k230_device::rom_r(offs_t offset) { return m_rom->base()[offset & 0x0fff]; } @@ -289,7 +289,7 @@ void dmv_k234_device::switch16_w(int state) } } -READ8_MEMBER( dmv_k234_device::snr_r ) +uint8_t dmv_k234_device::snr_r() { m_snr = ASSERT_LINE; m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); @@ -299,7 +299,7 @@ READ8_MEMBER( dmv_k234_device::snr_r ) return 0xff; } -WRITE8_MEMBER( dmv_k234_device::snr_w ) +void dmv_k234_device::snr_w(uint8_t data) { m_snr = ASSERT_LINE; m_maincpu->set_input_line(INPUT_LINE_HALT, CLEAR_LINE); diff --git a/src/devices/bus/dmv/k230.h b/src/devices/bus/dmv/k230.h index c7f8c967c44..fd8d759c137 100644 --- a/src/devices/bus/dmv/k230.h +++ b/src/devices/bus/dmv/k230.h @@ -61,7 +61,7 @@ protected: void program_w(offs_t offset, uint8_t data); private: - DECLARE_READ8_MEMBER(rom_r); + uint8_t rom_r(offs_t offset); }; @@ -104,8 +104,8 @@ protected: private: int m_snr; - DECLARE_READ8_MEMBER(snr_r); - DECLARE_WRITE8_MEMBER(snr_w); + uint8_t snr_r(); + void snr_w(uint8_t data); void k234_mem(address_map &map); }; diff --git a/src/devices/bus/ep64/exdos.cpp b/src/devices/bus/ep64/exdos.cpp index f443bb60693..806f6411058 100644 --- a/src/devices/bus/ep64/exdos.cpp +++ b/src/devices/bus/ep64/exdos.cpp @@ -145,7 +145,7 @@ void ep64_exdos_device::device_start() m_slot->program().install_rom(0x080000, 0x087fff, m_rom->base()); m_slot->io().install_readwrite_handler(0x10, 0x13, 0, 0x04, 0, read8sm_delegate(*m_fdc, FUNC(wd_fdc_device_base::read)), write8sm_delegate(*m_fdc, FUNC(wd_fdc_device_base::write))); - m_slot->io().install_readwrite_handler(0x18, 0x18, 0, 0x04, 0, read8_delegate(*this, FUNC(ep64_exdos_device::read)), write8_delegate(*this, FUNC(ep64_exdos_device::write))); + m_slot->io().install_readwrite_handler(0x18, 0x18, 0, 0x04, 0, read8smo_delegate(*this, FUNC(ep64_exdos_device::read)), write8smo_delegate(*this, FUNC(ep64_exdos_device::write))); } @@ -167,7 +167,7 @@ void ep64_exdos_device::device_reset() // read - //------------------------------------------------- -READ8_MEMBER( ep64_exdos_device::read ) +uint8_t ep64_exdos_device::read() { /* @@ -199,7 +199,7 @@ READ8_MEMBER( ep64_exdos_device::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( ep64_exdos_device::write ) +void ep64_exdos_device::write(uint8_t data) { /* diff --git a/src/devices/bus/ep64/exdos.h b/src/devices/bus/ep64/exdos.h index b437c56eb50..fc8600f3aaa 100644 --- a/src/devices/bus/ep64/exdos.h +++ b/src/devices/bus/ep64/exdos.h @@ -31,8 +31,8 @@ public: // construction/destruction ep64_exdos_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(); + void write(uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/epson_sio/pf10.cpp b/src/devices/bus/epson_sio/pf10.cpp index 2a55c2129fe..e4119498fba 100644 --- a/src/devices/bus/epson_sio/pf10.cpp +++ b/src/devices/bus/epson_sio/pf10.cpp @@ -164,18 +164,18 @@ void epson_pf10_device::port2_w(uint8_t data) logerror("%s: port2_w(%02x)\n", tag(), data); } -READ8_MEMBER( epson_pf10_device::fdc_r ) +uint8_t epson_pf10_device::fdc_r(offs_t offset) { logerror("%s: fdc_r @ %04x\n", tag(), offset); return 0xff; } -WRITE8_MEMBER( epson_pf10_device::fdc_w ) +void epson_pf10_device::fdc_w(offs_t offset, uint8_t data) { logerror("%s: fdc_w @ %04x (%02x)\n", tag(), offset, data); } -WRITE8_MEMBER( epson_pf10_device::fdc_tc_w ) +void epson_pf10_device::fdc_tc_w(uint8_t data) { logerror("%s: fdc_tc_w(%02x)\n", tag(), data); } diff --git a/src/devices/bus/epson_sio/pf10.h b/src/devices/bus/epson_sio/pf10.h index ced99d41715..e85c033099f 100644 --- a/src/devices/bus/epson_sio/pf10.h +++ b/src/devices/bus/epson_sio/pf10.h @@ -53,9 +53,9 @@ private: DECLARE_WRITE_LINE_MEMBER( pinc_w ); // floppy disk controller - DECLARE_READ8_MEMBER( fdc_r ); - DECLARE_WRITE8_MEMBER( fdc_w ); - DECLARE_WRITE8_MEMBER( fdc_tc_w ); + uint8_t fdc_r(offs_t offset); + void fdc_w(offs_t offset, uint8_t data); + void fdc_tc_w(uint8_t data); // hd6303 i/o uint8_t port1_r(); diff --git a/src/devices/bus/epson_sio/tf20.cpp b/src/devices/bus/epson_sio/tf20.cpp index 1fb12a66c0e..bcdce81a34b 100644 --- a/src/devices/bus/epson_sio/tf20.cpp +++ b/src/devices/bus/epson_sio/tf20.cpp @@ -215,7 +215,7 @@ IRQ_CALLBACK_MEMBER( epson_tf20_device::irq_callback ) } // a read from this location disables the rom -READ8_MEMBER( epson_tf20_device::rom_disable_r ) +uint8_t epson_tf20_device::rom_disable_r() { // switch in ram m_cpu->space(AS_PROGRAM).install_ram(0x0000, 0x7fff, m_ram->pointer()); @@ -231,7 +231,7 @@ READ8_MEMBER( epson_tf20_device::rom_disable_r ) // fdc interrupt //------------------------------------------------- -READ8_MEMBER( epson_tf20_device::upd765_tc_r ) +uint8_t epson_tf20_device::upd765_tc_r() { logerror("%s: upd765_tc_r\n", machine().describe_context()); @@ -242,7 +242,7 @@ READ8_MEMBER( epson_tf20_device::upd765_tc_r ) return 0xff; } -WRITE8_MEMBER( epson_tf20_device::fdc_control_w ) +void epson_tf20_device::fdc_control_w(uint8_t data) { logerror("%s: tf20_fdc_control_w(%02x)\n", machine().describe_context(), data); diff --git a/src/devices/bus/epson_sio/tf20.h b/src/devices/bus/epson_sio/tf20.h index 058bd60a4d4..6ce05bb2156 100644 --- a/src/devices/bus/epson_sio/tf20.h +++ b/src/devices/bus/epson_sio/tf20.h @@ -56,9 +56,9 @@ private: DECLARE_WRITE_LINE_MEMBER( rxc_w ); DECLARE_WRITE_LINE_MEMBER( pinc_w ); - DECLARE_READ8_MEMBER( rom_disable_r ); - DECLARE_READ8_MEMBER( upd765_tc_r ); - DECLARE_WRITE8_MEMBER( fdc_control_w ); + uint8_t rom_disable_r(); + uint8_t upd765_tc_r(); + void fdc_control_w(uint8_t data); void cpu_io(address_map &map); void cpu_mem(address_map &map); diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp index 4510800c8e7..629557768ed 100644 --- a/src/devices/bus/gba/gba_slot.cpp +++ b/src/devices/bus/gba/gba_slot.cpp @@ -901,26 +901,26 @@ std::string gba_cart_slot_device::get_default_card_software(get_default_card_sof read -------------------------------------------------*/ -READ32_MEMBER(gba_cart_slot_device::read_rom) +uint32_t gba_cart_slot_device::read_rom(offs_t offset) { if (m_cart) - return m_cart->read_rom(space, offset, mem_mask); + return m_cart->read_rom(offset); else return 0xffffffff; } -READ32_MEMBER(gba_cart_slot_device::read_ram) +uint32_t gba_cart_slot_device::read_ram(offs_t offset, uint32_t mem_mask) { if (m_cart) - return m_cart->read_ram(space, offset, mem_mask); + return m_cart->read_ram(offset, mem_mask); else return 0xffffffff; } -READ32_MEMBER(gba_cart_slot_device::read_gpio) +uint32_t gba_cart_slot_device::read_gpio(offs_t offset, uint32_t mem_mask) { if (m_cart) - return m_cart->read_gpio(space, offset, mem_mask); + return m_cart->read_gpio(offset, mem_mask); else return 0xffffffff; } @@ -930,14 +930,14 @@ READ32_MEMBER(gba_cart_slot_device::read_gpio) write -------------------------------------------------*/ -WRITE32_MEMBER(gba_cart_slot_device::write_ram) +void gba_cart_slot_device::write_ram(offs_t offset, uint32_t data, uint32_t mem_mask) { if (m_cart) - m_cart->write_ram(space, offset, data, mem_mask); + m_cart->write_ram(offset, data, mem_mask); } -WRITE32_MEMBER(gba_cart_slot_device::write_gpio) +void gba_cart_slot_device::write_gpio(offs_t offset, uint32_t data, uint32_t mem_mask) { if (m_cart) - m_cart->write_gpio(space, offset, data, mem_mask); + m_cart->write_gpio(offset, data, mem_mask); } diff --git a/src/devices/bus/gba/gba_slot.h b/src/devices/bus/gba/gba_slot.h index 8395028cdfb..32e935af71c 100644 --- a/src/devices/bus/gba/gba_slot.h +++ b/src/devices/bus/gba/gba_slot.h @@ -43,14 +43,14 @@ public: virtual ~device_gba_cart_interface(); // reading and writing - virtual DECLARE_READ32_MEMBER(read_rom) { return 0xffffffff; } - virtual DECLARE_READ32_MEMBER(read_ram) { return 0xffffffff; } - virtual DECLARE_READ32_MEMBER(read_gpio) { return 0; } - virtual DECLARE_READ32_MEMBER(read_tilt) { return 0xffffffff; } - virtual DECLARE_WRITE32_MEMBER(write_ram) { } - virtual DECLARE_WRITE32_MEMBER(write_gpio) { } - virtual DECLARE_WRITE32_MEMBER(write_tilt) { } - virtual DECLARE_WRITE32_MEMBER(write_mapper) { } + virtual uint32_t read_rom(offs_t offset) { return 0xffffffff; } + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) { return 0xffffffff; } + virtual uint32_t read_gpio(offs_t offset, uint32_t mem_mask = ~0) { return 0; } + virtual uint32_t read_tilt(offs_t offset, uint32_t mem_mask = ~0) { return 0xffffffff; } + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { } + virtual void write_gpio(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { } + virtual void write_tilt(offs_t offset, uint32_t data) { } + virtual void write_mapper(offs_t offset, uint32_t data) { } void rom_alloc(uint32_t size, const char *tag); void nvram_alloc(uint32_t size); @@ -120,14 +120,14 @@ public: uint32_t get_rom_size() { if (m_cart) return m_cart->get_rom_size(); return 0; } // reading and writing - virtual DECLARE_READ32_MEMBER(read_rom); - virtual DECLARE_READ32_MEMBER(read_ram); - virtual DECLARE_READ32_MEMBER(read_gpio); - virtual DECLARE_READ32_MEMBER(read_tilt) { if (m_cart) return m_cart->read_tilt(space, offset, mem_mask); else return 0xffffffff; } - virtual DECLARE_WRITE32_MEMBER(write_ram); - virtual DECLARE_WRITE32_MEMBER(write_gpio); - virtual DECLARE_WRITE32_MEMBER(write_tilt) { if (m_cart) m_cart->write_tilt(space, offset, data, mem_mask); } - virtual DECLARE_WRITE32_MEMBER(write_mapper) { if (m_cart) m_cart->write_mapper(space, offset, data, mem_mask); } + virtual uint32_t read_rom(offs_t offset); + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0); + virtual uint32_t read_gpio(offs_t offset, uint32_t mem_mask = ~0); + virtual uint32_t read_tilt(offs_t offset, uint32_t mem_mask = ~0) { if (m_cart) return m_cart->read_tilt(offset); else return 0xffffffff; } + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + virtual void write_gpio(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + virtual void write_tilt(offs_t offset, uint32_t data) { if (m_cart) m_cart->write_tilt(offset, data); } + virtual void write_mapper(offs_t offset, uint32_t data) { if (m_cart) m_cart->write_mapper(offset, data); } protected: // device-level overrides diff --git a/src/devices/bus/gba/rom.cpp b/src/devices/bus/gba/rom.cpp index 91fb6648ebf..378ed1d03cf 100644 --- a/src/devices/bus/gba/rom.cpp +++ b/src/devices/bus/gba/rom.cpp @@ -286,7 +286,7 @@ void gba_rom_3dmatrix_device::device_reset() cart types. -------------------------------------------------*/ -READ32_MEMBER(gba_rom_device::read_gpio) +uint32_t gba_rom_device::read_gpio(offs_t offset, uint32_t mem_mask) { if (!m_gpio_write_only) { @@ -313,7 +313,7 @@ READ32_MEMBER(gba_rom_device::read_gpio) return m_rom[offset + 0xc4/4]; } -WRITE32_MEMBER(gba_rom_device::write_gpio) +void gba_rom_device::write_gpio(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -346,7 +346,7 @@ WRITE32_MEMBER(gba_rom_device::write_gpio) Carts with SRAM -------------------------------------------------*/ -READ32_MEMBER(gba_rom_sram_device::read_ram) +uint32_t gba_rom_sram_device::read_ram(offs_t offset, uint32_t mem_mask) { if (!m_nvram.empty() && offset < m_nvram.size()) return m_nvram[offset]; @@ -354,7 +354,7 @@ READ32_MEMBER(gba_rom_sram_device::read_ram) return 0xffffffff; } -WRITE32_MEMBER(gba_rom_sram_device::write_ram) +void gba_rom_sram_device::write_ram(offs_t offset, uint32_t data, uint32_t mem_mask) { if (!m_nvram.empty() && offset < m_nvram.size()) COMBINE_DATA(&m_nvram[offset]); @@ -425,7 +425,7 @@ void gba_rom_flash_device::device_add_mconfig(machine_config &config) } -READ32_MEMBER(gba_rom_flash_device::read_ram) +uint32_t gba_rom_flash_device::read_ram(offs_t offset, uint32_t mem_mask) { uint32_t rv = 0; @@ -443,7 +443,7 @@ READ32_MEMBER(gba_rom_flash_device::read_ram) return rv; } -WRITE32_MEMBER(gba_rom_flash_device::write_ram) +void gba_rom_flash_device::write_ram(offs_t offset, uint32_t data, uint32_t mem_mask) { offset &= m_flash_mask; @@ -472,7 +472,7 @@ void gba_rom_flash1m_device::device_add_mconfig(machine_config &config) } -READ32_MEMBER(gba_rom_flash1m_device::read_ram) +uint32_t gba_rom_flash1m_device::read_ram(offs_t offset, uint32_t mem_mask) { uint32_t rv = 0; @@ -490,7 +490,7 @@ READ32_MEMBER(gba_rom_flash1m_device::read_ram) return rv; } -WRITE32_MEMBER(gba_rom_flash1m_device::write_ram) +void gba_rom_flash1m_device::write_ram(offs_t offset, uint32_t data, uint32_t mem_mask) { offset &= m_flash_mask; @@ -541,7 +541,7 @@ void gba_rom_flash1m_rtc_device::gpio_dev_write(uint16_t data, int gpio_dirs) Carts with EEPROM -------------------------------------------------*/ -READ32_MEMBER(gba_rom_eeprom_device::read_ram) +uint32_t gba_rom_eeprom_device::read_ram(offs_t offset, uint32_t mem_mask) { // Larger games have smaller access to EERPOM content if (m_rom_size > (16 * 1024 * 1024) && offset < 0xffff00/4) @@ -550,7 +550,7 @@ READ32_MEMBER(gba_rom_eeprom_device::read_ram) return m_eeprom->read(); } -WRITE32_MEMBER(gba_rom_eeprom_device::write_ram) +void gba_rom_eeprom_device::write_ram(offs_t offset, uint32_t data, uint32_t mem_mask) { // Larger games have smaller access to EEPROM content if (m_rom_size > (16 * 1024 * 1024) && offset < 0xffff00/4) @@ -562,7 +562,7 @@ WRITE32_MEMBER(gba_rom_eeprom_device::write_ram) m_eeprom->write(data); } -READ32_MEMBER(gba_rom_eeprom64_device::read_ram) +uint32_t gba_rom_eeprom64_device::read_ram(offs_t offset, uint32_t mem_mask) { // Larger games have smaller access to EERPOM content if (m_rom_size > (16 * 1024 * 1024) && offset < 0xffff00/4) @@ -571,7 +571,7 @@ READ32_MEMBER(gba_rom_eeprom64_device::read_ram) return m_eeprom->read(); } -WRITE32_MEMBER(gba_rom_eeprom64_device::write_ram) +void gba_rom_eeprom64_device::write_ram(offs_t offset, uint32_t data, uint32_t mem_mask) { // Larger games have smaller access to EEPROM content if (m_rom_size > (16 * 1024 * 1024) && offset < 0xffff00/4) @@ -614,7 +614,7 @@ ioport_constructor gba_rom_yoshiug_device::device_input_ports() const } -READ32_MEMBER(gba_rom_yoshiug_device::read_tilt) +uint32_t gba_rom_yoshiug_device::read_tilt(offs_t offset, uint32_t mem_mask) { switch (offset) { @@ -640,7 +640,7 @@ READ32_MEMBER(gba_rom_yoshiug_device::read_tilt) return 0xffffffff; } -WRITE32_MEMBER(gba_rom_yoshiug_device::write_tilt) +void gba_rom_yoshiug_device::write_tilt(offs_t offset, uint32_t data) { switch (offset) { @@ -743,7 +743,7 @@ void gba_rom_boktai_device::gpio_dev_write(uint16_t data, int gpio_dirs) the cart "range" is accessible...) -------------------------------------------------*/ -WRITE32_MEMBER(gba_rom_3dmatrix_device::write_mapper) +void gba_rom_3dmatrix_device::write_mapper(offs_t offset, uint32_t data) { //printf("mapper write 0x%.8X - 0x%X\n", offset, data); fflush(stdout); switch (offset & 3) diff --git a/src/devices/bus/gba/rom.h b/src/devices/bus/gba/rom.h index 30e3c08ce9d..3a1ac4005a1 100644 --- a/src/devices/bus/gba/rom.h +++ b/src/devices/bus/gba/rom.h @@ -91,10 +91,10 @@ public: gba_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_rom) override { return m_rom[offset]; } + virtual uint32_t read_rom(offs_t offset) override { return m_rom[offset]; } - virtual DECLARE_READ32_MEMBER(read_gpio) override; - virtual DECLARE_WRITE32_MEMBER(write_gpio) override; + virtual uint32_t read_gpio(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_gpio(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; virtual uint16_t gpio_dev_read(int gpio_dirs) { return 0; } virtual void gpio_dev_write(uint16_t data, int gpio_dirs) { } @@ -121,8 +121,8 @@ public: gba_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_ram) override; - virtual DECLARE_WRITE32_MEMBER(write_ram) override; + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: gba_rom_sram_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -183,8 +183,8 @@ public: gba_rom_flash_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_ram) override; - virtual DECLARE_WRITE32_MEMBER(write_ram) override; + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: gba_rom_flash_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -229,8 +229,8 @@ public: gba_rom_flash1m_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_ram) override; - virtual DECLARE_WRITE32_MEMBER(write_ram) override; + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: gba_rom_flash1m_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -275,8 +275,8 @@ public: gba_rom_eeprom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_ram) override; - virtual DECLARE_WRITE32_MEMBER(write_ram) override; + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: gba_rom_eeprom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -301,8 +301,8 @@ public: virtual ioport_constructor device_input_ports() const override; // reading and writing - virtual DECLARE_READ32_MEMBER(read_tilt) override; - virtual DECLARE_WRITE32_MEMBER(write_tilt) override; + virtual uint32_t read_tilt(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_tilt(offs_t offset, uint32_t data) override; protected: virtual void device_start() override; @@ -325,8 +325,8 @@ public: gba_rom_eeprom64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_ram) override; - virtual DECLARE_WRITE32_MEMBER(write_ram) override; + virtual uint32_t read_ram(offs_t offset, uint32_t mem_mask = ~0) override; + virtual void write_ram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: gba_rom_eeprom64_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -372,7 +372,7 @@ public: gba_rom_3dmatrix_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_WRITE32_MEMBER(write_mapper) override; + virtual void write_mapper(offs_t offset, uint32_t data) override; protected: // device-level overrides diff --git a/src/devices/bus/hexbus/hx5102.cpp b/src/devices/bus/hexbus/hx5102.cpp index 131a9db3e94..f9d2341456e 100644 --- a/src/devices/bus/hexbus/hx5102.cpp +++ b/src/devices/bus/hexbus/hx5102.cpp @@ -182,7 +182,7 @@ void hx5102_device::external_operation(offs_t offset, uint8_t data) /* Reading from the address space of the drive. */ -READ8_MEMBER( hx5102_device::read ) +uint8_t hx5102_device::read(offs_t offset) { bool ramen1 = ((offset & 0xf800)==0xe000); bool ramen2 = ((offset & 0xf800)==0xe800); @@ -220,11 +220,11 @@ READ8_MEMBER( hx5102_device::read ) // Floppy drive controller if (m_dcs) - return fdc_read(space, offset&0x000f); + return fdc_read(offset&0x000f); // Hexbus controller if (hcs) - return ibc_read(space, offset&0x000f); + return ibc_read(offset&0x000f); // DMA if (m_dack) @@ -243,7 +243,7 @@ READ8_MEMBER( hx5102_device::read ) /* Writing into the address space of the drive. */ -WRITE8_MEMBER( hx5102_device::write ) +void hx5102_device::write(offs_t offset, uint8_t data) { bool ramen1 = ((offset & 0xf800)==0xe000); bool ramen2 = ((offset & 0xf800)==0xe800); @@ -270,14 +270,14 @@ WRITE8_MEMBER( hx5102_device::write ) // Floppy drive controller if (m_dcs) { - fdc_write(space, offset&0x000f, data); + fdc_write(offset&0x000f, data); return; } // Hexbus controller if (hcs) { - ibc_write(space, offset&0x000f, data); + ibc_write(offset&0x000f, data); return; } @@ -366,7 +366,7 @@ WRITE_LINE_MEMBER( hx5102_device::mspeed_w ) /* Read access to the floppy controller */ -READ8_MEMBER(hx5102_device::fdc_read) +uint8_t hx5102_device::fdc_read(offs_t offset) { uint8_t val = 0; switch (offset) @@ -388,7 +388,7 @@ READ8_MEMBER(hx5102_device::fdc_read) /* Write access to the floppy controller */ -WRITE8_MEMBER(hx5102_device::fdc_write) +void hx5102_device::fdc_write(offs_t offset, uint8_t data) { m_dcs = ((offset & 0x0003)==0); @@ -416,18 +416,18 @@ void hx5102_device::update_readyff_input() /* Access to the Hexbus controller */ -READ8_MEMBER(hx5102_device::ibc_read) +uint8_t hx5102_device::ibc_read(offs_t offset) { if ((offset & 1)==0) - return m_hexbus_ctrl->read(space, (offset>>1)&1); + return m_hexbus_ctrl->read((offset>>1)&1); else return 0; } -WRITE8_MEMBER(hx5102_device::ibc_write) +void hx5102_device::ibc_write(offs_t offset, uint8_t data) { if ((offset & 1)==0) - m_hexbus_ctrl->write(space, (offset>>1)&1, data); + m_hexbus_ctrl->write((offset>>1)&1, data); } void hx5102_device::hexbus_out(uint8_t data) @@ -464,7 +464,7 @@ WRITE_LINE_MEMBER(hx5102_device::hsklatch_out) MON = Motor on INT = Interrupt from i8272A */ -READ8_MEMBER(hx5102_device::cruread) +uint8_t hx5102_device::cruread(offs_t offset) { uint8_t crubits = 0; // LOGMASKED(LOG_CRU, "Reading CRU addresses %04x-%04x\n", 0x17e0 + (offset<<4), 0x17ee + (offset<<4)); @@ -480,7 +480,7 @@ READ8_MEMBER(hx5102_device::cruread) /* CRU write access. */ -WRITE8_MEMBER(hx5102_device::cruwrite) +void hx5102_device::cruwrite(offs_t offset, uint8_t data) { // LOG("Writing CRU address %04x: %x\n", 0x17e0 + (offset<<1), data); switch (offset) diff --git a/src/devices/bus/hexbus/hx5102.h b/src/devices/bus/hexbus/hx5102.h index 48e35620c84..12f48dbe555 100644 --- a/src/devices/bus/hexbus/hx5102.h +++ b/src/devices/bus/hexbus/hx5102.h @@ -55,23 +55,23 @@ private: required_device m_flopcpu; line_state m_ready_old; - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(fdc_irq_w); DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); DECLARE_WRITE_LINE_MEMBER(motor_w); DECLARE_WRITE_LINE_MEMBER(mspeed_w); - DECLARE_READ8_MEMBER(fdc_read); - DECLARE_WRITE8_MEMBER(fdc_write); - DECLARE_READ8_MEMBER(ibc_read); - DECLARE_WRITE8_MEMBER(ibc_write); + uint8_t fdc_read(offs_t offset); + void fdc_write(offs_t offset, uint8_t data); + uint8_t ibc_read(offs_t offset); + void ibc_write(offs_t offset, uint8_t data); void hexbus_out(uint8_t data); DECLARE_WRITE_LINE_MEMBER(hsklatch_out); - DECLARE_READ8_MEMBER(cruread); - DECLARE_WRITE8_MEMBER(cruwrite); + uint8_t cruread(offs_t offset); + void cruwrite(offs_t offset, uint8_t data); // Operate the floppy motors bool m_motor_on; diff --git a/src/devices/bus/hexbus/tp0370.cpp b/src/devices/bus/hexbus/tp0370.cpp index f3c1d027f5b..6b8b416383b 100644 --- a/src/devices/bus/hexbus/tp0370.cpp +++ b/src/devices/bus/hexbus/tp0370.cpp @@ -153,7 +153,7 @@ ibc_device::ibc_device(const machine_config &mconfig, const char *tag, device_t /* Reading from host */ -READ8_MEMBER( ibc_device::read ) +uint8_t ibc_device::read(offs_t offset) { uint8_t status = 0; switch (offset) @@ -197,7 +197,7 @@ READ8_MEMBER( ibc_device::read ) /* Writing from host */ -WRITE8_MEMBER( ibc_device::write ) +void ibc_device::write(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/devices/bus/hexbus/tp0370.h b/src/devices/bus/hexbus/tp0370.h index b17c2f997d4..eb8b37dfd60 100644 --- a/src/devices/bus/hexbus/tp0370.h +++ b/src/devices/bus/hexbus/tp0370.h @@ -25,8 +25,8 @@ public: void device_start() override; void device_reset() override; - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); // Callbacks auto int_cb() { return m_int.bind(); } diff --git a/src/devices/bus/hp80_io/82900.cpp b/src/devices/bus/hp80_io/82900.cpp index 2afc3b55946..a488f8bfce7 100644 --- a/src/devices/bus/hp80_io/82900.cpp +++ b/src/devices/bus/hp80_io/82900.cpp @@ -96,7 +96,7 @@ WRITE_LINE_MEMBER(hp82900_io_card_device::reset_w) } } -READ8_MEMBER(hp82900_io_card_device::cpu_mem_r) +uint8_t hp82900_io_card_device::cpu_mem_r(offs_t offset) { if (m_rom_enabled) { return m_rom[ offset & 0x7ff ]; @@ -105,12 +105,12 @@ READ8_MEMBER(hp82900_io_card_device::cpu_mem_r) } } -WRITE8_MEMBER(hp82900_io_card_device::cpu_mem_w) +void hp82900_io_card_device::cpu_mem_w(offs_t offset, uint8_t data) { m_ram[ offset ] = data; } -READ8_MEMBER(hp82900_io_card_device::cpu_io_r) +uint8_t hp82900_io_card_device::cpu_io_r(offs_t offset) { m_rom_enabled = false; @@ -123,7 +123,7 @@ READ8_MEMBER(hp82900_io_card_device::cpu_io_r) return res; } -WRITE8_MEMBER(hp82900_io_card_device::cpu_io_w) +void hp82900_io_card_device::cpu_io_w(offs_t offset, uint8_t data) { m_rom_enabled = false; if (BIT(offset , 6) && (m_addr_latch & 0x82) == 0) { diff --git a/src/devices/bus/hp80_io/82900.h b/src/devices/bus/hp80_io/82900.h index 894b716d4cc..613783cbc3f 100644 --- a/src/devices/bus/hp80_io/82900.h +++ b/src/devices/bus/hp80_io/82900.h @@ -52,10 +52,10 @@ private: uint8_t m_addr_latch; DECLARE_WRITE_LINE_MEMBER(reset_w); - DECLARE_READ8_MEMBER(cpu_mem_r); - DECLARE_WRITE8_MEMBER(cpu_mem_w); - DECLARE_READ8_MEMBER(cpu_io_r); - DECLARE_WRITE8_MEMBER(cpu_io_w); + uint8_t cpu_mem_r(offs_t offset); + void cpu_mem_w(offs_t offset, uint8_t data); + uint8_t cpu_io_r(offs_t offset); + void cpu_io_w(offs_t offset, uint8_t data); void cpu_mem_map(address_map &map); void cpu_io_map(address_map &map); void z80_m1_w(uint8_t data); diff --git a/src/devices/bus/hp80_io/82937.cpp b/src/devices/bus/hp80_io/82937.cpp index c1ab9c1d57b..087855f7bec 100644 --- a/src/devices/bus/hp80_io/82937.cpp +++ b/src/devices/bus/hp80_io/82937.cpp @@ -167,12 +167,12 @@ void hp82937_io_card_device::dio_w(uint8_t data) update_data_out(); } -READ8_MEMBER(hp82937_io_card_device::switch_r) +uint8_t hp82937_io_card_device::switch_r() { return m_sw1->read() | 0xc0; } -WRITE8_MEMBER(hp82937_io_card_device::latch_w) +void hp82937_io_card_device::latch_w(uint8_t data) { LOG("latch=%02x\n" , data); m_latch = data; diff --git a/src/devices/bus/hp80_io/82937.h b/src/devices/bus/hp80_io/82937.h index d3731b5cbd6..07f3dec991a 100644 --- a/src/devices/bus/hp80_io/82937.h +++ b/src/devices/bus/hp80_io/82937.h @@ -58,8 +58,8 @@ private: uint8_t dio_r(); void dio_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(ieee488_ctrl_w); - DECLARE_READ8_MEMBER(switch_r); - DECLARE_WRITE8_MEMBER(latch_w); + uint8_t switch_r(); + void latch_w(uint8_t data); void cpu_io_map(address_map &map); diff --git a/src/devices/bus/hp80_io/82939.cpp b/src/devices/bus/hp80_io/82939.cpp index 25c52760cba..5633b3c45e2 100644 --- a/src/devices/bus/hp80_io/82939.cpp +++ b/src/devices/bus/hp80_io/82939.cpp @@ -163,7 +163,7 @@ uint8_t hp82939_io_card_device::p2_r() return res; } -READ8_MEMBER(hp82939_io_card_device::cpu_r) +uint8_t hp82939_io_card_device::cpu_r(offs_t offset) { if ((offset & 0x82) == 0x00) { return m_translator->uc_r(offset & 1); @@ -174,7 +174,7 @@ READ8_MEMBER(hp82939_io_card_device::cpu_r) } } -WRITE8_MEMBER(hp82939_io_card_device::cpu_w) +void hp82939_io_card_device::cpu_w(offs_t offset, uint8_t data) { if ((offset & 0x82) == 0x00) { m_translator->uc_w(offset & 1 , data); diff --git a/src/devices/bus/hp80_io/82939.h b/src/devices/bus/hp80_io/82939.h index ab79e277deb..fb9e07dd3ec 100644 --- a/src/devices/bus/hp80_io/82939.h +++ b/src/devices/bus/hp80_io/82939.h @@ -49,8 +49,8 @@ private: uint8_t p1_r(); void p1_w(uint8_t data); uint8_t p2_r(); - DECLARE_READ8_MEMBER(cpu_r); - DECLARE_WRITE8_MEMBER(cpu_w); + uint8_t cpu_r(offs_t offset); + void cpu_w(offs_t offset, uint8_t data); void cpu_io_map(address_map &map); }; diff --git a/src/devices/bus/hp9845_io/98032.cpp b/src/devices/bus/hp9845_io/98032.cpp index 558f6a60890..ecfc92ba706 100644 --- a/src/devices/bus/hp9845_io/98032.cpp +++ b/src/devices/bus/hp9845_io/98032.cpp @@ -102,7 +102,7 @@ void hp98032_io_card_device::device_reset() m_gpio->preset_w(0); } -READ16_MEMBER(hp98032_io_card_device::reg_r) +uint16_t hp98032_io_card_device::reg_r(address_space &space, offs_t offset) { uint16_t res = 0; @@ -173,7 +173,7 @@ READ16_MEMBER(hp98032_io_card_device::reg_r) return res; } -WRITE16_MEMBER(hp98032_io_card_device::reg_w) +void hp98032_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t data) { LOG("wr R%u=%04x\n" , offset + 4 , data); diff --git a/src/devices/bus/hp9845_io/98032.h b/src/devices/bus/hp9845_io/98032.h index 4eaa33ec786..059b0248ae9 100644 --- a/src/devices/bus/hp9845_io/98032.h +++ b/src/devices/bus/hp9845_io/98032.h @@ -32,8 +32,8 @@ protected: virtual void device_start() override; virtual void device_reset() override; - virtual DECLARE_READ16_MEMBER(reg_r) override; - virtual DECLARE_WRITE16_MEMBER(reg_w) override; + virtual uint16_t reg_r(address_space &space, offs_t offset) override; + virtual void reg_w(address_space &space, offs_t offset, uint16_t data) override; private: required_device m_gpio; diff --git a/src/devices/bus/hp9845_io/98034.cpp b/src/devices/bus/hp9845_io/98034.cpp index 92e98efd38f..d76101f003c 100644 --- a/src/devices/bus/hp9845_io/98034.cpp +++ b/src/devices/bus/hp9845_io/98034.cpp @@ -114,7 +114,7 @@ void hp98034_io_card_device::device_reset() update_dc(); } -READ16_MEMBER(hp98034_io_card_device::reg_r) +uint16_t hp98034_io_card_device::reg_r(address_space &space, offs_t offset) { uint16_t res = m_odr; @@ -154,7 +154,7 @@ READ16_MEMBER(hp98034_io_card_device::reg_r) return res; } -WRITE16_MEMBER(hp98034_io_card_device::reg_w) +void hp98034_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t data) { m_idr = (uint8_t)data; @@ -199,19 +199,19 @@ uint8_t hp98034_io_card_device::dc_r() return res; } -WRITE8_MEMBER(hp98034_io_card_device::hpib_data_w) +void hp98034_io_card_device::hpib_data_w(uint8_t data) { m_data_out = data; update_data_out(); } -WRITE8_MEMBER(hp98034_io_card_device::hpib_ctrl_w) +void hp98034_io_card_device::hpib_ctrl_w(uint8_t data) { m_ctrl_out = data; update_ctrl_out(); } -READ8_MEMBER(hp98034_io_card_device::hpib_ctrl_r) +uint8_t hp98034_io_card_device::hpib_ctrl_r() { uint8_t res = 0; @@ -243,28 +243,28 @@ READ8_MEMBER(hp98034_io_card_device::hpib_ctrl_r) return res; } -READ8_MEMBER(hp98034_io_card_device::hpib_data_r) +uint8_t hp98034_io_card_device::hpib_data_r() { return ~m_ieee488->dio_r(); } -READ8_MEMBER(hp98034_io_card_device::idr_r) +uint8_t hp98034_io_card_device::idr_r() { return m_idr; } -WRITE8_MEMBER(hp98034_io_card_device::odr_w) +void hp98034_io_card_device::odr_w(uint8_t data) { m_odr = data; } -READ8_MEMBER(hp98034_io_card_device::mode_reg_r) +uint8_t hp98034_io_card_device::mode_reg_r() { LOG("%.06f MR=%02x\n" , machine().time().as_double() , m_mode_reg); return m_mode_reg; } -WRITE8_MEMBER(hp98034_io_card_device::mode_reg_clear_w) +void hp98034_io_card_device::mode_reg_clear_w(uint8_t data) { LOG("%.06f clear_w\n" , machine().time().as_double()); m_mode_reg = 0xff; @@ -276,7 +276,7 @@ WRITE8_MEMBER(hp98034_io_card_device::mode_reg_clear_w) } } -READ8_MEMBER(hp98034_io_card_device::switch_r) +uint8_t hp98034_io_card_device::switch_r() { return m_sw1->read() | 0xc0; } diff --git a/src/devices/bus/hp9845_io/98034.h b/src/devices/bus/hp9845_io/98034.h index 885686caa53..c8cb5ff8765 100644 --- a/src/devices/bus/hp9845_io/98034.h +++ b/src/devices/bus/hp9845_io/98034.h @@ -33,23 +33,23 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_add_mconfig(machine_config &config) override; - virtual DECLARE_READ16_MEMBER(reg_r) override; - virtual DECLARE_WRITE16_MEMBER(reg_w) override; + virtual uint16_t reg_r(address_space &space, offs_t offset) override; + virtual void reg_w(address_space &space, offs_t offset, uint16_t data) override; private: void dc_w(uint8_t data); uint8_t dc_r(); uint8_t int_ack_r(); - DECLARE_WRITE8_MEMBER(hpib_data_w); - DECLARE_WRITE8_MEMBER(hpib_ctrl_w); - DECLARE_READ8_MEMBER(hpib_ctrl_r); - DECLARE_READ8_MEMBER(hpib_data_r); - DECLARE_READ8_MEMBER(idr_r); - DECLARE_WRITE8_MEMBER(odr_w); - DECLARE_READ8_MEMBER(mode_reg_r); - DECLARE_WRITE8_MEMBER(mode_reg_clear_w); - DECLARE_READ8_MEMBER(switch_r); + void hpib_data_w(uint8_t data); + void hpib_ctrl_w(uint8_t data); + uint8_t hpib_ctrl_r(); + uint8_t hpib_data_r(); + uint8_t idr_r(); + void odr_w(uint8_t data); + uint8_t mode_reg_r(); + void mode_reg_clear_w(uint8_t data); + uint8_t switch_r(); void np_io_map(address_map &map); void np_program_map(address_map &map); diff --git a/src/devices/bus/hp9845_io/98035.cpp b/src/devices/bus/hp9845_io/98035.cpp index 9194e200b19..c4516bdbc37 100644 --- a/src/devices/bus/hp9845_io/98035.cpp +++ b/src/devices/bus/hp9845_io/98035.cpp @@ -254,7 +254,7 @@ void hp98035_io_card_device::device_timer(emu_timer &timer, device_timer_id id, } } -READ16_MEMBER(hp98035_io_card_device::reg_r) +uint16_t hp98035_io_card_device::reg_r(address_space &space, offs_t offset) { uint16_t res; @@ -287,7 +287,7 @@ READ16_MEMBER(hp98035_io_card_device::reg_r) return res; } -WRITE16_MEMBER(hp98035_io_card_device::reg_w) +void hp98035_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t data) { bool new_inten; @@ -317,33 +317,33 @@ WRITE16_MEMBER(hp98035_io_card_device::reg_w) LOG(("write R%u=%04x\n" , offset + 4 , data)); } -WRITE8_MEMBER(hp98035_io_card_device::ram_addr_w) +void hp98035_io_card_device::ram_addr_w(uint8_t data) { m_ram_addr = data; } -READ8_MEMBER(hp98035_io_card_device::ram_data_r) +uint8_t hp98035_io_card_device::ram_data_r() { return m_np_ram[ m_ram_addr ]; } -WRITE8_MEMBER(hp98035_io_card_device::ram_addr_data_w) +void hp98035_io_card_device::ram_addr_data_w(uint8_t data) { m_ram_addr = data; m_np_ram[ m_ram_addr ] = m_ram_data_in; } -WRITE8_MEMBER(hp98035_io_card_device::ram_data_w) +void hp98035_io_card_device::ram_data_w(uint8_t data) { m_ram_data_in = data; } -WRITE8_MEMBER(hp98035_io_card_device::clock_key_w) +void hp98035_io_card_device::clock_key_w(uint8_t data) { m_clock_keys = data & 7; } -READ8_MEMBER(hp98035_io_card_device::clock_digit_r) +uint8_t hp98035_io_card_device::clock_digit_r() { switch (m_clock_mux) { case 1: @@ -360,20 +360,20 @@ READ8_MEMBER(hp98035_io_card_device::clock_digit_r) } } -WRITE8_MEMBER(hp98035_io_card_device::odr_w) +void hp98035_io_card_device::odr_w(uint8_t data) { m_odr = data; set_flg(true); } -READ8_MEMBER(hp98035_io_card_device::idr_r) +uint8_t hp98035_io_card_device::idr_r() { set_flg(true); m_idr_full = false; return m_idr; } -READ8_MEMBER(hp98035_io_card_device::np_status_r) +uint8_t hp98035_io_card_device::np_status_r() { // Bit 2 = 0: use US date format uint8_t res = 0x03; @@ -396,13 +396,13 @@ READ8_MEMBER(hp98035_io_card_device::np_status_r) return res; } -WRITE8_MEMBER(hp98035_io_card_device::clear_np_irq_w) +void hp98035_io_card_device::clear_np_irq_w(uint8_t data) { m_np_irq = false; update_dc(); } -READ8_MEMBER(hp98035_io_card_device::clock_mux_r) +uint8_t hp98035_io_card_device::clock_mux_r() { // External input lines are always active (bits 7-4) uint8_t res = 0xf0 | m_clock_mux; @@ -413,13 +413,13 @@ READ8_MEMBER(hp98035_io_card_device::clock_mux_r) return res; } -WRITE8_MEMBER(hp98035_io_card_device::set_irq_w) +void hp98035_io_card_device::set_irq_w(uint8_t data) { m_irq = true; update_irq(); } -READ8_MEMBER(hp98035_io_card_device::clr_inten_r) +uint8_t hp98035_io_card_device::clr_inten_r() { m_intflag = false; m_inten = false; @@ -428,7 +428,7 @@ READ8_MEMBER(hp98035_io_card_device::clr_inten_r) return 0xff; } -WRITE8_MEMBER(hp98035_io_card_device::clr_inten_w) +void hp98035_io_card_device::clr_inten_w(uint8_t data) { m_intflag = false; m_inten = false; diff --git a/src/devices/bus/hp9845_io/98035.h b/src/devices/bus/hp9845_io/98035.h index 5051c9058aa..0d057f6ef53 100644 --- a/src/devices/bus/hp9845_io/98035.h +++ b/src/devices/bus/hp9845_io/98035.h @@ -34,28 +34,28 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; virtual void device_add_mconfig(machine_config &config) override; - virtual DECLARE_READ16_MEMBER(reg_r) override; - virtual DECLARE_WRITE16_MEMBER(reg_w) override; + virtual uint16_t reg_r(address_space &space, offs_t offset) override; + virtual void reg_w(address_space &space, offs_t offset, uint16_t data) override; private: void dc_w(uint8_t data); - DECLARE_WRITE8_MEMBER(ram_addr_w); - DECLARE_READ8_MEMBER(ram_data_r); - DECLARE_WRITE8_MEMBER(ram_addr_data_w); - DECLARE_WRITE8_MEMBER(ram_data_w); - - DECLARE_WRITE8_MEMBER(clock_key_w); - DECLARE_READ8_MEMBER(clock_digit_r); - - DECLARE_WRITE8_MEMBER(odr_w); - DECLARE_READ8_MEMBER(idr_r); - DECLARE_READ8_MEMBER(np_status_r); - DECLARE_WRITE8_MEMBER(clear_np_irq_w); - DECLARE_READ8_MEMBER(clock_mux_r); - DECLARE_WRITE8_MEMBER(set_irq_w); - DECLARE_READ8_MEMBER(clr_inten_r); - DECLARE_WRITE8_MEMBER(clr_inten_w); + void ram_addr_w(uint8_t data); + uint8_t ram_data_r(); + void ram_addr_data_w(uint8_t data); + void ram_data_w(uint8_t data); + + void clock_key_w(uint8_t data); + uint8_t clock_digit_r(); + + void odr_w(uint8_t data); + uint8_t idr_r(); + uint8_t np_status_r(); + void clear_np_irq_w(uint8_t data); + uint8_t clock_mux_r(); + void set_irq_w(uint8_t data); + uint8_t clr_inten_r(); + void clr_inten_w(uint8_t data); void np_io_map(address_map &map); void np_program_map(address_map &map); diff --git a/src/devices/bus/hp9845_io/98046.cpp b/src/devices/bus/hp9845_io/98046.cpp index 328bbd91e81..8e977129a76 100644 --- a/src/devices/bus/hp9845_io/98046.cpp +++ b/src/devices/bus/hp9845_io/98046.cpp @@ -78,7 +78,7 @@ hp98046_io_card_device::~hp98046_io_card_device() { } -READ16_MEMBER(hp98046_io_card_device::reg_r) +uint16_t hp98046_io_card_device::reg_r(address_space &space, offs_t offset) { uint16_t res = 0; @@ -129,7 +129,7 @@ READ16_MEMBER(hp98046_io_card_device::reg_r) return res; } -WRITE16_MEMBER(hp98046_io_card_device::reg_w) +void hp98046_io_card_device::reg_w(address_space &space, offs_t offset, uint16_t data) { LOG_CPU("wr R%u=%04x\n" , offset + 4 , data); @@ -291,12 +291,12 @@ void hp98046_io_card_device::cpu_io_map(address_map &map) map(0 , 0xff).rw(FUNC(hp98046_io_card_device::cpu_r) , FUNC(hp98046_io_card_device::cpu_w)); } -READ8_MEMBER(hp98046_io_card_device::ram_r) +uint8_t hp98046_io_card_device::ram_r(offs_t offset) { return m_ram[ offset ]; } -READ8_MEMBER(hp98046_io_card_device::cpu_r) +uint8_t hp98046_io_card_device::cpu_r(offs_t offset) { if (BIT(m_port_2 , 2)) { return m_ram[ (offset & 0xff) | (uint16_t(m_port_2 & 3) << 8) ]; @@ -342,7 +342,7 @@ READ8_MEMBER(hp98046_io_card_device::cpu_r) } } -WRITE8_MEMBER(hp98046_io_card_device::cpu_w) +void hp98046_io_card_device::cpu_w(offs_t offset, uint8_t data) { if (BIT(m_port_2 , 2)) { m_ram[ (offset & 0xff) | (uint16_t(m_port_2 & 3) << 8) ] = data; diff --git a/src/devices/bus/hp9845_io/98046.h b/src/devices/bus/hp9845_io/98046.h index 1105865ea3b..fb8197de6fb 100644 --- a/src/devices/bus/hp9845_io/98046.h +++ b/src/devices/bus/hp9845_io/98046.h @@ -25,8 +25,8 @@ public: hp98046_io_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); virtual ~hp98046_io_card_device(); - virtual DECLARE_READ16_MEMBER(reg_r) override; - virtual DECLARE_WRITE16_MEMBER(reg_w) override; + virtual uint16_t reg_r(address_space &space, offs_t offset) override; + virtual void reg_w(address_space &space, offs_t offset, uint16_t data) override; virtual bool has_dual_sc() const override; @@ -74,9 +74,9 @@ private: void cpu_program_map(address_map &map); void cpu_io_map(address_map &map); - DECLARE_READ8_MEMBER(ram_r); - DECLARE_READ8_MEMBER(cpu_r); - DECLARE_WRITE8_MEMBER(cpu_w); + uint8_t ram_r(offs_t offset); + uint8_t cpu_r(offs_t offset); + void cpu_w(offs_t offset, uint8_t data); uint8_t p1_r(); void p2_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(sio_int_w); diff --git a/src/devices/bus/hp9845_io/hp9845_io.cpp b/src/devices/bus/hp9845_io/hp9845_io.cpp index efb9124c317..a6d09154671 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.cpp +++ b/src/devices/bus/hp9845_io/hp9845_io.cpp @@ -97,13 +97,13 @@ WRITE_LINE_MEMBER(hp9845_io_slot_device::dmar_w) m_dmar_cb_func(state); } -int hp9845_io_slot_device::get_rw_handlers(read16_delegate& rhandler , write16_delegate& whandler) +int hp9845_io_slot_device::get_rw_handlers(read16m_delegate& rhandler , write16m_delegate& whandler) { device_hp9845_io_interface *card = get_card_device(); if (card) { - rhandler = read16_delegate(*card, FUNC(device_hp9845_io_interface::reg_r)); - whandler = write16_delegate(*card, FUNC(device_hp9845_io_interface::reg_w)); + rhandler = read16m_delegate(*card, FUNC(device_hp9845_io_interface::reg_r)); + whandler = write16m_delegate(*card, FUNC(device_hp9845_io_interface::reg_w)); return card->get_sc(); } else { return -1; diff --git a/src/devices/bus/hp9845_io/hp9845_io.h b/src/devices/bus/hp9845_io/hp9845_io.h index 75a786afde0..bebe12c3408 100644 --- a/src/devices/bus/hp9845_io/hp9845_io.h +++ b/src/devices/bus/hp9845_io/hp9845_io.h @@ -61,7 +61,7 @@ public: // getter for r/w handlers // return value is SC (negative if no card is attached to slot) - int get_rw_handlers(read16_delegate& rhandler , write16_delegate& whandler); + int get_rw_handlers(read16m_delegate& rhandler , write16m_delegate& whandler); bool has_dual_sc() const; @@ -84,8 +84,8 @@ class device_hp9845_io_interface : public device_interface public: void set_slot_device(hp9845_io_slot_device &dev); - virtual DECLARE_READ16_MEMBER(reg_r) = 0; - virtual DECLARE_WRITE16_MEMBER(reg_w) = 0; + virtual uint16_t reg_r(address_space &space, offs_t offset) = 0; + virtual void reg_w(address_space &space, offs_t offset, uint16_t data) = 0; // SC getter uint8_t get_sc(); diff --git a/src/devices/bus/hp_dio/hp98265a.cpp b/src/devices/bus/hp_dio/hp98265a.cpp index a2cd9a04e1a..3bfeb992e9c 100644 --- a/src/devices/bus/hp_dio/hp98265a.cpp +++ b/src/devices/bus/hp_dio/hp98265a.cpp @@ -164,8 +164,8 @@ void dio16_98265a_device::device_reset() program_space().install_readwrite_handler( 0x600000 + (code * 0x10000), 0x6007ff + (code * 0x10000), - read16_delegate(*this, FUNC(dio16_98265a_device::io_r)), - write16_delegate(*this, FUNC(dio16_98265a_device::io_w))); + read16sm_delegate(*this, FUNC(dio16_98265a_device::io_r)), + write16sm_delegate(*this, FUNC(dio16_98265a_device::io_w))); program_space().install_device(0x600020 + (code * 0x10000), 0x60003f + (code * 0x10000), *m_spc, &mb87030_device::map, 0x00ff00ff); m_installed_io = true; } @@ -181,7 +181,7 @@ int dio16_98265a_device::get_int_level() REG_SW1_INT_LEVEL_MASK; } -READ16_MEMBER(dio16_98265a_device::io_r) +uint16_t dio16_98265a_device::io_r(offs_t offset) { uint16_t ret = 0xffff; @@ -204,7 +204,7 @@ READ16_MEMBER(dio16_98265a_device::io_r) return ret; } -WRITE16_MEMBER(dio16_98265a_device::io_w) +void dio16_98265a_device::io_w(offs_t offset, uint16_t data) { LOG("io_w: offset=%02X, data=%02X\n", offset, data); diff --git a/src/devices/bus/hp_dio/hp98265a.h b/src/devices/bus/hp_dio/hp98265a.h index 995430b1f1b..c2bd58726b5 100644 --- a/src/devices/bus/hp_dio/hp98265a.h +++ b/src/devices/bus/hp_dio/hp98265a.h @@ -35,8 +35,8 @@ protected: virtual ioport_constructor device_input_ports() const override; virtual void device_add_mconfig(machine_config &config) override; - DECLARE_READ16_MEMBER(io_r); - DECLARE_WRITE16_MEMBER(io_w); + uint16_t io_r(offs_t offset); + void io_w(offs_t offset, uint16_t data); void dmack_w_in(int channel, uint8_t data) override; uint8_t dmack_r_in(int channel) override; diff --git a/src/devices/bus/hp_dio/hp98543.cpp b/src/devices/bus/hp_dio/hp98543.cpp index bc9d62a465c..bd96c95852d 100644 --- a/src/devices/bus/hp_dio/hp98543.cpp +++ b/src/devices/bus/hp_dio/hp98543.cpp @@ -103,12 +103,12 @@ void dio16_98543_device::device_start() dio().install_memory( 0x200000, 0x27ffff, - read16_delegate(*this, FUNC(dio16_98543_device::vram_r)), - write16_delegate(*this, FUNC(dio16_98543_device::vram_w))); + read16s_delegate(*this, FUNC(dio16_98543_device::vram_r)), + write16s_delegate(*this, FUNC(dio16_98543_device::vram_w))); dio().install_memory( 0x560000, 0x563fff, - read16_delegate(*this, FUNC(dio16_98543_device::rom_r)), - write16_delegate(*this, FUNC(dio16_98543_device::rom_w))); + read16sm_delegate(*this, FUNC(dio16_98543_device::rom_r)), + write16sm_delegate(*this, FUNC(dio16_98543_device::rom_w))); dio().install_memory( 0x564000, 0x565fff, read16_delegate(*this, FUNC(dio16_98543_device::ctrl_r)), @@ -124,20 +124,20 @@ void dio16_98543_device::device_reset() { } -READ16_MEMBER(dio16_98543_device::rom_r) +uint16_t dio16_98543_device::rom_r(offs_t offset) { if (offset == 1) return m_intreg; return 0xff00 | m_rom[offset]; } -WRITE16_MEMBER(dio16_98543_device::rom_w) +void dio16_98543_device::rom_w(offs_t offset, uint16_t data) { if (offset == 1) m_intreg = data; } -READ16_MEMBER(dio16_98543_device::ctrl_r) +uint16_t dio16_98543_device::ctrl_r(address_space &space, offs_t offset, uint16_t mem_mask) { uint16_t ret = 0; @@ -147,13 +147,13 @@ READ16_MEMBER(dio16_98543_device::ctrl_r) return ret; } -WRITE16_MEMBER(dio16_98543_device::ctrl_w) +void dio16_98543_device::ctrl_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask) { for (auto &tc: m_topcat) tc->ctrl_w(space, offset, data, mem_mask); } -READ16_MEMBER(dio16_98543_device::vram_r) +uint16_t dio16_98543_device::vram_r(offs_t offset, uint16_t mem_mask) { uint16_t ret = 0; for (auto &tc: m_topcat) @@ -161,7 +161,7 @@ READ16_MEMBER(dio16_98543_device::vram_r) return ret; } -WRITE16_MEMBER(dio16_98543_device::vram_w) +void dio16_98543_device::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { for (auto &tc: m_topcat) tc->vram_w(offset, data, mem_mask); diff --git a/src/devices/bus/hp_dio/hp98543.h b/src/devices/bus/hp_dio/hp98543.h index d2cdd27ca89..567f2215c1b 100644 --- a/src/devices/bus/hp_dio/hp98543.h +++ b/src/devices/bus/hp_dio/hp98543.h @@ -21,13 +21,13 @@ class dio16_98543_device : public: dio16_98543_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(rom_r); - DECLARE_WRITE16_MEMBER(rom_w); + uint16_t rom_r(offs_t offset); + void rom_w(offs_t offset, uint16_t data); - DECLARE_READ16_MEMBER(ctrl_r); - DECLARE_WRITE16_MEMBER(ctrl_w); - DECLARE_READ16_MEMBER(vram_r); - DECLARE_WRITE16_MEMBER(vram_w); + uint16_t ctrl_r(address_space &space, offs_t offset, uint16_t mem_mask = ~0); + void ctrl_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vram_r(offs_t offset, uint16_t mem_mask = ~0); + void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); static constexpr int TOPCAT_COUNT = 4; diff --git a/src/devices/bus/hp_dio/hp98544.cpp b/src/devices/bus/hp_dio/hp98544.cpp index 3ab0c036277..842a7a78229 100644 --- a/src/devices/bus/hp_dio/hp98544.cpp +++ b/src/devices/bus/hp_dio/hp98544.cpp @@ -105,8 +105,8 @@ void dio16_98544_device::device_start() write16s_delegate(*m_topcat, FUNC(topcat_device::vram_w))); dio().install_memory( 0x560000, 0x563fff, - read16_delegate(*this, FUNC(dio16_98544_device::rom_r)), - write16_delegate(*this, FUNC(dio16_98544_device::rom_w))); + read16sm_delegate(*this, FUNC(dio16_98544_device::rom_r)), + write16sm_delegate(*this, FUNC(dio16_98544_device::rom_w))); dio().install_memory( 0x564000, 0x567fff, read16_delegate(*m_topcat, FUNC(topcat_device::ctrl_r)), @@ -121,7 +121,7 @@ void dio16_98544_device::device_reset() { } -READ16_MEMBER(dio16_98544_device::rom_r) +uint16_t dio16_98544_device::rom_r(offs_t offset) { if (offset == 1) return m_intreg; @@ -130,7 +130,7 @@ READ16_MEMBER(dio16_98544_device::rom_r) } // the video chip registers live here, so these writes are valid -WRITE16_MEMBER(dio16_98544_device::rom_w) +void dio16_98544_device::rom_w(offs_t offset, uint16_t data) { if (offset == 1) { m_intreg = data; diff --git a/src/devices/bus/hp_dio/hp98544.h b/src/devices/bus/hp_dio/hp98544.h index d009f8589fd..7e718180ea6 100644 --- a/src/devices/bus/hp_dio/hp98544.h +++ b/src/devices/bus/hp_dio/hp98544.h @@ -26,8 +26,8 @@ public: // construction/destruction dio16_98544_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(rom_r); - DECLARE_WRITE16_MEMBER(rom_w); + uint16_t rom_r(offs_t offset); + void rom_w(offs_t offset, uint16_t data); required_device m_topcat; uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/hp_dio/hp98550.cpp b/src/devices/bus/hp_dio/hp98550.cpp index e67c44e0eea..738926eae77 100644 --- a/src/devices/bus/hp_dio/hp98550.cpp +++ b/src/devices/bus/hp_dio/hp98550.cpp @@ -87,13 +87,13 @@ void dio32_98550_device::device_start() dio().install_memory( 0x200000, 0x3fffff, - read16_delegate(*this, FUNC(dio32_98550_device::vram_r)), - write16_delegate(*this, FUNC(dio32_98550_device::vram_w))); + read16s_delegate(*this, FUNC(dio32_98550_device::vram_r)), + write16s_delegate(*this, FUNC(dio32_98550_device::vram_w))); dio().install_memory( 0x560000, 0x56ffff, - read16_delegate(*this, FUNC(dio32_98550_device::rom_r)), - write16_delegate(*this, FUNC(dio32_98550_device::rom_w))); + read16s_delegate(*this, FUNC(dio32_98550_device::rom_r)), + write16s_delegate(*this, FUNC(dio32_98550_device::rom_w))); dio().install_memory( 0x564000, 0x5648ff, @@ -112,7 +112,7 @@ void dio32_98550_device::device_reset() m_ints = 0; } -READ16_MEMBER(dio32_98550_device::rom_r) +uint16_t dio32_98550_device::rom_r(offs_t offset, uint16_t mem_mask) { LOG("%s: %04x\n", __func__, offset); @@ -122,7 +122,7 @@ READ16_MEMBER(dio32_98550_device::rom_r) return 0xff00 | m_rom[offset]; } -WRITE16_MEMBER(dio32_98550_device::rom_w) +void dio32_98550_device::rom_w(offs_t offset, uint16_t data, uint16_t mem_mask) { switch (offset) { case 0: @@ -139,7 +139,7 @@ WRITE16_MEMBER(dio32_98550_device::rom_w) } } -READ16_MEMBER(dio32_98550_device::catseye_r) +uint16_t dio32_98550_device::catseye_r(address_space &space, offs_t offset, uint16_t mem_mask) { uint16_t ret = 0; @@ -149,14 +149,14 @@ READ16_MEMBER(dio32_98550_device::catseye_r) return ret; } -WRITE16_MEMBER(dio32_98550_device::catseye_w) +void dio32_98550_device::catseye_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask) { LOG("%s: %04X = %04X\n", __func__, offset << 1, data); for (auto &ce: m_catseye) ce->ctrl_w(offset, data, mem_mask); } -READ16_MEMBER(dio32_98550_device::vram_r) +uint16_t dio32_98550_device::vram_r(offs_t offset, uint16_t mem_mask) { uint16_t ret = 0; @@ -166,7 +166,7 @@ READ16_MEMBER(dio32_98550_device::vram_r) return ret; } -WRITE16_MEMBER(dio32_98550_device::vram_w) +void dio32_98550_device::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { for (auto &ce: m_catseye) ce->vram_w(offset, data, mem_mask); diff --git a/src/devices/bus/hp_dio/hp98550.h b/src/devices/bus/hp_dio/hp98550.h index 2b350f7a1a3..155a7213c09 100644 --- a/src/devices/bus/hp_dio/hp98550.h +++ b/src/devices/bus/hp_dio/hp98550.h @@ -21,16 +21,14 @@ class dio32_98550_device : public: dio32_98550_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(rom_r); - DECLARE_WRITE16_MEMBER(rom_w); + uint16_t rom_r(offs_t offset, uint16_t mem_mask = ~0); + void rom_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_READ16_MEMBER(topcat_r); - DECLARE_WRITE16_MEMBER(topcat_w); - DECLARE_READ16_MEMBER(catseye_r); - DECLARE_WRITE16_MEMBER(catseye_w); + uint16_t catseye_r(address_space &space, offs_t offset, uint16_t mem_mask = ~0); + void catseye_w(address_space &space, offs_t offset, uint16_t data, uint16_t mem_mask = ~0); - DECLARE_READ16_MEMBER(vram_r); - DECLARE_WRITE16_MEMBER(vram_w); + uint16_t vram_r(offs_t offset, uint16_t mem_mask = ~0); + void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); static constexpr int CATSEYE_COUNT = 8; diff --git a/src/devices/bus/hp_dio/hp98603a.cpp b/src/devices/bus/hp_dio/hp98603a.cpp index 9295fc1606d..caf83b3373f 100644 --- a/src/devices/bus/hp_dio/hp98603a.cpp +++ b/src/devices/bus/hp_dio/hp98603a.cpp @@ -67,16 +67,16 @@ void dio16_98603a_device::device_reset() { m_rom = device().machine().root_device().memregion(this->subtag(HP98603A_ROM_REGION).c_str())->base(); dio().install_memory(0x80000, 0xfffff, - read16_delegate(*this, FUNC(dio16_98603a_device::rom_r)), - write16_delegate(*this, FUNC(dio16_98603a_device::rom_w))); + read16sm_delegate(*this, FUNC(dio16_98603a_device::rom_r)), + write16sm_delegate(*this, FUNC(dio16_98603a_device::rom_w))); } -READ16_MEMBER(dio16_98603a_device::rom_r) +uint16_t dio16_98603a_device::rom_r(offs_t offset) { return m_rom[offset*2] | (m_rom[offset*2+1] << 8); } -WRITE16_MEMBER(dio16_98603a_device::rom_w) +void dio16_98603a_device::rom_w(offs_t offset, uint16_t data) { } diff --git a/src/devices/bus/hp_dio/hp98603a.h b/src/devices/bus/hp_dio/hp98603a.h index 1d08cf83e0b..ff369071bab 100644 --- a/src/devices/bus/hp_dio/hp98603a.h +++ b/src/devices/bus/hp_dio/hp98603a.h @@ -18,8 +18,8 @@ class dio16_98603a_device : public: // construction/destruction dio16_98603a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(rom_r); - DECLARE_WRITE16_MEMBER(rom_w); + uint16_t rom_r(offs_t offset); + void rom_w(offs_t offset, uint16_t data); protected: dio16_98603a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/hp_dio/hp98603b.cpp b/src/devices/bus/hp_dio/hp98603b.cpp index 638f5fba6e7..16bb4831bd0 100644 --- a/src/devices/bus/hp_dio/hp98603b.cpp +++ b/src/devices/bus/hp_dio/hp98603b.cpp @@ -62,16 +62,16 @@ void dio16_98603b_device::device_reset() { m_rom = device().machine().root_device().memregion(this->subtag(HP98603B_ROM_REGION).c_str())->base(); dio().install_memory(0x100000, 0x1fffff, - read16_delegate(*this, FUNC(dio16_98603b_device::rom_r)), - write16_delegate(*this, FUNC(dio16_98603b_device::rom_w))); + read16sm_delegate(*this, FUNC(dio16_98603b_device::rom_r)), + write16sm_delegate(*this, FUNC(dio16_98603b_device::rom_w))); } -READ16_MEMBER(dio16_98603b_device::rom_r) +uint16_t dio16_98603b_device::rom_r(offs_t offset) { return m_rom[offset*2] | (m_rom[offset*2+1] << 8); } -WRITE16_MEMBER(dio16_98603b_device::rom_w) +void dio16_98603b_device::rom_w(offs_t offset, uint16_t data) { } diff --git a/src/devices/bus/hp_dio/hp98603b.h b/src/devices/bus/hp_dio/hp98603b.h index ea16286c98e..615815edc51 100644 --- a/src/devices/bus/hp_dio/hp98603b.h +++ b/src/devices/bus/hp_dio/hp98603b.h @@ -18,8 +18,8 @@ class dio16_98603b_device : public: // construction/destruction dio16_98603b_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(rom_r); - DECLARE_WRITE16_MEMBER(rom_w); + uint16_t rom_r(offs_t offset); + void rom_w(offs_t offset, uint16_t data); protected: dio16_98603b_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/hp_dio/hp98620.cpp b/src/devices/bus/hp_dio/hp98620.cpp index 4244fa2898f..98fab0aa2b8 100644 --- a/src/devices/bus/hp_dio/hp98620.cpp +++ b/src/devices/bus/hp_dio/hp98620.cpp @@ -60,8 +60,8 @@ void dio16_98620_device::device_reset() if (!m_installed_io) { program_space().install_readwrite_handler(0x500000, 0x50020f, - read16_delegate(*this, FUNC(dio16_98620_device::dma_r)), - write16_delegate(*this, FUNC(dio16_98620_device::dma_w))); + read16sm_delegate(*this, FUNC(dio16_98620_device::dma_r)), + write16sm_delegate(*this, FUNC(dio16_98620_device::dma_w))); m_installed_io = true; } m_control = 0; @@ -88,7 +88,7 @@ uint16_t dio16_98620_device::get_ctrl(const int channel) return ret; } -READ16_MEMBER(dio16_98620_device::dma_r) +uint16_t dio16_98620_device::dma_r(offs_t offset) { uint16_t ret = 0; @@ -218,7 +218,7 @@ void dio16_98620_device::update_ctrl(const int channel, const uint16_t data, con } } -WRITE16_MEMBER(dio16_98620_device::dma_w) +void dio16_98620_device::dma_w(offs_t offset, uint16_t data) { LOG("dma_w: offset=%02X, data=%02X\n", offset << 1, data); diff --git a/src/devices/bus/hp_dio/hp98620.h b/src/devices/bus/hp_dio/hp98620.h index e9fd2b8122b..c6c93c67306 100644 --- a/src/devices/bus/hp_dio/hp98620.h +++ b/src/devices/bus/hp_dio/hp98620.h @@ -27,8 +27,8 @@ protected: virtual void device_start() override; virtual void device_reset() override; - DECLARE_READ16_MEMBER(dma_r); - DECLARE_WRITE16_MEMBER(dma_w); + uint16_t dma_r(offs_t offset); + void dma_w(offs_t offset, uint16_t data); DECLARE_WRITE_LINE_MEMBER(irq_w); diff --git a/src/devices/bus/hp_dio/hp98643.cpp b/src/devices/bus/hp_dio/hp98643.cpp index 65aae14695a..7d5cc557e71 100644 --- a/src/devices/bus/hp_dio/hp98643.cpp +++ b/src/devices/bus/hp_dio/hp98643.cpp @@ -123,7 +123,7 @@ WRITE_LINE_MEMBER(dio16_98643_device::lance_int_w) update_int(); } -WRITE16_MEMBER(dio16_98643_device::sc_w) +void dio16_98643_device::sc_w(uint16_t data) { LOG("%s: %02x\n", __func__, data); data &= (REG_SC_LOCK|REG_SC_IE); @@ -136,27 +136,27 @@ WRITE16_MEMBER(dio16_98643_device::sc_w) update_int(); } -READ16_MEMBER(dio16_98643_device::sc_r) +uint16_t dio16_98643_device::sc_r() { LOG("%s: %02x\n", __func__, m_sc); return m_sc; } -READ16_MEMBER(dio16_98643_device::id_r) +uint16_t dio16_98643_device::id_r() { return (REG_ID | (m_switches->read() & REG_SWITCHES_REMOTE)); } -WRITE16_MEMBER(dio16_98643_device::id_w) +void dio16_98643_device::id_w(uint16_t data) { reset(); } -READ16_MEMBER(dio16_98643_device::novram_r) +uint16_t dio16_98643_device::novram_r(offs_t offset) { return m_novram[offset]; } -WRITE16_MEMBER(dio16_98643_device::novram_w) +void dio16_98643_device::novram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_novram[offset & 0x3f]); } diff --git a/src/devices/bus/hp_dio/hp98643.h b/src/devices/bus/hp_dio/hp98643.h index d06a20b147f..665528ad3f6 100644 --- a/src/devices/bus/hp_dio/hp98643.h +++ b/src/devices/bus/hp_dio/hp98643.h @@ -55,12 +55,12 @@ private: void update_int(); int get_irq_line(); - READ16_MEMBER(sc_r); - WRITE16_MEMBER(sc_w); - READ16_MEMBER(id_r); - WRITE16_MEMBER(id_w); - READ16_MEMBER(novram_r); - WRITE16_MEMBER(novram_w); + uint16_t sc_r(); + void sc_w(uint16_t data); + uint16_t id_r(); + void id_w(uint16_t data); + uint16_t novram_r(offs_t offset); + void novram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(lance_int_w); void lance_dma_out(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); diff --git a/src/devices/bus/hp_dio/hp98644.cpp b/src/devices/bus/hp_dio/hp98644.cpp index 8545220b074..7c1f99a6c9d 100644 --- a/src/devices/bus/hp_dio/hp98644.cpp +++ b/src/devices/bus/hp_dio/hp98644.cpp @@ -161,13 +161,13 @@ void dio16_98644_device::device_reset() dio().install_memory( 0x600000 + (code * 0x10000), 0x6007ff + (code * 0x10000), - read16_delegate(*this, FUNC(dio16_98644_device::io_r)), - write16_delegate(*this, FUNC(dio16_98644_device::io_w))); + read16sm_delegate(*this, FUNC(dio16_98644_device::io_r)), + write16sm_delegate(*this, FUNC(dio16_98644_device::io_w))); m_installed_io = true; } } -READ16_MEMBER(dio16_98644_device::io_r) +uint16_t dio16_98644_device::io_r(offs_t offset) { uint16_t ret = 0xffff; @@ -204,7 +204,7 @@ READ16_MEMBER(dio16_98644_device::io_r) return ret; } -WRITE16_MEMBER(dio16_98644_device::io_w) +void dio16_98644_device::io_w(offs_t offset, uint16_t data) { if (offset == 0x0c) m_loopback = (data & 0x10) ? true : false; diff --git a/src/devices/bus/hp_dio/hp98644.h b/src/devices/bus/hp_dio/hp98644.h index c4ad925fc30..f34ff193588 100644 --- a/src/devices/bus/hp_dio/hp98644.h +++ b/src/devices/bus/hp_dio/hp98644.h @@ -38,8 +38,8 @@ protected: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; - DECLARE_READ16_MEMBER(io_r); - DECLARE_WRITE16_MEMBER(io_w); + uint16_t io_r(offs_t offset); + void io_w(offs_t offset, uint16_t data); required_device m_uart; diff --git a/src/devices/bus/hp_dio/hp_dio.cpp b/src/devices/bus/hp_dio/hp_dio.cpp index aa2bbcffe8e..7ad5398c637 100644 --- a/src/devices/bus/hp_dio/hp_dio.cpp +++ b/src/devices/bus/hp_dio/hp_dio.cpp @@ -268,6 +268,7 @@ template void dio16_device::install_memory(offs_t start, template void dio16_device::install_memory(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler); template void dio16_device::install_memory(offs_t start, offs_t end, read16s_delegate rhandler, write16s_delegate whandler); +template void dio16_device::install_memory(offs_t start, offs_t end, read16sm_delegate rhandler, write16sm_delegate whandler); void dio16_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data) { diff --git a/src/devices/bus/hp_dio/human_interface.cpp b/src/devices/bus/hp_dio/human_interface.cpp index 7c03e57ba73..ee6758e767c 100644 --- a/src/devices/bus/hp_dio/human_interface.cpp +++ b/src/devices/bus/hp_dio/human_interface.cpp @@ -119,8 +119,8 @@ void human_interface_device::device_start() write8sm_delegate(*m_iocpu, FUNC(upi41_cpu_device::upi41_master_w)), 0x00ff00ff); program_space().install_readwrite_handler(0x470000, 0x47001f, 0x1f, 0xffe0, 0, - read8_delegate(*this, FUNC(human_interface_device::gpib_r)), - write8_delegate(*this, FUNC(human_interface_device::gpib_w)), 0x00ff00ff); + read8sm_delegate(*this, FUNC(human_interface_device::gpib_r)), + write8sm_delegate(*this, FUNC(human_interface_device::gpib_w)), 0x00ff00ff); save_item(NAME(m_hil_read)); save_item(NAME(m_kbd_nmi)); @@ -192,7 +192,7 @@ void human_interface_device::ieee488_dio_w(uint8_t data) } } -WRITE8_MEMBER(human_interface_device::gpib_w) +void human_interface_device::gpib_w(offs_t offset, uint8_t data) { if (offset & 0x08) { m_tms9914->write(offset & 0x07, data); @@ -230,7 +230,7 @@ WRITE8_MEMBER(human_interface_device::gpib_w) LOG("gpib_w: %s %02X = %02X\n", machine().describe_context().c_str(), offset, data); } -READ8_MEMBER(human_interface_device::gpib_r) +uint8_t human_interface_device::gpib_r(offs_t offset) { uint8_t data = 0xff; diff --git a/src/devices/bus/hp_dio/human_interface.h b/src/devices/bus/hp_dio/human_interface.h index 18e22413db2..26f3548b731 100644 --- a/src/devices/bus/hp_dio/human_interface.h +++ b/src/devices/bus/hp_dio/human_interface.h @@ -41,8 +41,8 @@ private: uint8_t iocpu_test0_r(); /* GPIB */ - DECLARE_READ8_MEMBER(gpib_r); - DECLARE_WRITE8_MEMBER(gpib_w); + uint8_t gpib_r(offs_t offset); + void gpib_w(offs_t offset, uint8_t data); void ieee488_dio_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(gpib_irq); diff --git a/src/devices/bus/ieee488/c8280.cpp b/src/devices/bus/ieee488/c8280.cpp index e79e9839769..be6f8fde4ff 100644 --- a/src/devices/bus/ieee488/c8280.cpp +++ b/src/devices/bus/ieee488/c8280.cpp @@ -467,7 +467,7 @@ void c8280_device::ieee488_ifc(int state) m_ifc = state; } -READ8_MEMBER( c8280_device::fk5_r ) +uint8_t c8280_device::fk5_r() { /* @@ -492,7 +492,7 @@ READ8_MEMBER( c8280_device::fk5_r ) return data; } -WRITE8_MEMBER( c8280_device::fk5_w ) +void c8280_device::fk5_w(uint8_t data) { /* diff --git a/src/devices/bus/ieee488/c8280.h b/src/devices/bus/ieee488/c8280.h index 4695836bed0..aefa8060bb5 100644 --- a/src/devices/bus/ieee488/c8280.h +++ b/src/devices/bus/ieee488/c8280.h @@ -55,8 +55,8 @@ private: void riot1_pa_w(uint8_t data); uint8_t riot1_pb_r(); void riot1_pb_w(uint8_t data); - DECLARE_READ8_MEMBER( fk5_r ); - DECLARE_WRITE8_MEMBER( fk5_w ); + uint8_t fk5_r(); + void fk5_w(uint8_t data); void c8280_fdc_mem(address_map &map); void c8280_main_mem(address_map &map); diff --git a/src/devices/bus/ieee488/hp9122c.cpp b/src/devices/bus/ieee488/hp9122c.cpp index 221c341b17a..4f9cb76bff1 100644 --- a/src/devices/bus/ieee488/hp9122c.cpp +++ b/src/devices/bus/ieee488/hp9122c.cpp @@ -265,7 +265,7 @@ void hp9122c_device::i8291a_dio_w(uint8_t data) m_bus->dio_w(this, data); } -READ8_MEMBER(hp9122c_device::status_r) +uint8_t hp9122c_device::status_r() { uint8_t ret = REG_STATUS_DUAL|REG_STATUS_DISKCHG; auto addr = m_hpib_addr->read(); @@ -290,7 +290,7 @@ READ8_MEMBER(hp9122c_device::status_r) return ret; } -WRITE8_MEMBER(hp9122c_device::cmd_w) +void hp9122c_device::cmd_w(uint8_t data) { floppy_image_device *floppy0 = m_floppy[0]->get_device(); floppy_image_device *floppy1 = m_floppy[1]->get_device(); @@ -338,7 +338,7 @@ void hp9122c_device::index_pulse_cb(floppy_image_device *floppy, int state) } -WRITE8_MEMBER(hp9122c_device::clridx_w) +void hp9122c_device::clridx_w(uint8_t data) { m_index_int = false; update_intsel(); diff --git a/src/devices/bus/ieee488/hp9122c.h b/src/devices/bus/ieee488/hp9122c.h index 89c643400f5..1456502b235 100644 --- a/src/devices/bus/ieee488/hp9122c.h +++ b/src/devices/bus/ieee488/hp9122c.h @@ -109,13 +109,9 @@ private: DECLARE_WRITE_LINE_MEMBER(fdc_intrq_w); DECLARE_WRITE_LINE_MEMBER(fdc_drq_w); - DECLARE_WRITE8_MEMBER(cmd_w); - DECLARE_READ8_MEMBER(status_r); - DECLARE_WRITE8_MEMBER(clridx_w); - // Floppy drive interface - - DECLARE_READ8_MEMBER(fdc_read); - DECLARE_WRITE8_MEMBER(fdc_write); + void cmd_w(uint8_t data);; + uint8_t status_r(); + void clridx_w(uint8_t data);; void cpu_map(address_map &map); diff --git a/src/devices/bus/ieee488/hp9895.cpp b/src/devices/bus/ieee488/hp9895.cpp index 6d09984fba7..e7338e211b7 100644 --- a/src/devices/bus/ieee488/hp9895.cpp +++ b/src/devices/bus/ieee488/hp9895.cpp @@ -490,7 +490,7 @@ WRITE_LINE_MEMBER(hp9895_device::phi_int_w) } } -READ8_MEMBER(hp9895_device::phi_reg_r) +uint8_t hp9895_device::phi_reg_r(offs_t offset) { uint16_t reg = m_phi->reg16_r(offset); @@ -512,7 +512,7 @@ void hp9895_device::z80_m1_w(uint8_t data) } } -WRITE8_MEMBER(hp9895_device::data_w) +void hp9895_device::data_w(uint8_t data) { LOG_0(("W DATA=%02x\n" , data)); // CPU stalls until next SDOK @@ -522,13 +522,13 @@ WRITE8_MEMBER(hp9895_device::data_w) m_accdata = true; } -WRITE8_MEMBER(hp9895_device::clock_w) +void hp9895_device::clock_w(uint8_t data) { LOG_0(("W CLOCK=%02x\n" , data)); m_clock_reg = data; } -WRITE8_MEMBER(hp9895_device::reset_w) +void hp9895_device::reset_w(uint8_t data) { LOG_0(("W RESET=%02x\n" , data)); if (BIT(data , REG_RESET_TIMEOUT_START_BIT)) { @@ -541,13 +541,13 @@ WRITE8_MEMBER(hp9895_device::reset_w) // TODO: PROGRES } -WRITE8_MEMBER(hp9895_device::leds_w) +void hp9895_device::leds_w(uint8_t data) { LOG(("W LEDS=%02x %c%c%c%c%c\n" , data , BIT(data , 4) ? '.' : '*' , BIT(data , 3) ? '.' : '*' , BIT(data , 2) ? '.' : '*' , BIT(data , 1) ? '.' : '*' , BIT(data , 0) ? '.' : '*')); // TODO: } -WRITE8_MEMBER(hp9895_device::cntl_w) +void hp9895_device::cntl_w(uint8_t data) { if (data != m_cntl_reg) { LOG_0(("W CNTL=%02x -> %02x\n" , m_cntl_reg , data)); @@ -608,7 +608,7 @@ WRITE8_MEMBER(hp9895_device::cntl_w) } } -WRITE8_MEMBER(hp9895_device::drv_w) +void hp9895_device::drv_w(uint8_t data) { LOG_0(("W DRV=%02x\n" , data)); m_mgnena = BIT(data , REG_DRV_MGNENA_BIT); @@ -620,7 +620,7 @@ WRITE8_MEMBER(hp9895_device::drv_w) } } -WRITE8_MEMBER(hp9895_device::xv_w) +void hp9895_device::xv_w(uint8_t data) { LOG_0(("W XV=%02x\n" , data)); // Disk Changed flag is cleared when drive is ready and it is deselected @@ -644,7 +644,7 @@ WRITE8_MEMBER(hp9895_device::xv_w) m_hiden = BIT(data , REG_XV_HIDEN_BIT); } -READ8_MEMBER(hp9895_device::data_r) +uint8_t hp9895_device::data_r() { m_clock_reg = m_clock_sr; m_accdata = true; @@ -654,12 +654,12 @@ READ8_MEMBER(hp9895_device::data_r) return m_data_sr; } -READ8_MEMBER(hp9895_device::clock_r) +uint8_t hp9895_device::clock_r() { return m_clock_reg; } -READ8_MEMBER(hp9895_device::drivstat_r) +uint8_t hp9895_device::drivstat_r() { uint8_t res = 0; @@ -693,14 +693,14 @@ READ8_MEMBER(hp9895_device::drivstat_r) return res; } -READ8_MEMBER(hp9895_device::switches_r) +uint8_t hp9895_device::switches_r() { uint8_t res = get_switches2(); res |= m_switches->read(); return res; } -READ8_MEMBER(hp9895_device::switches2_r) +uint8_t hp9895_device::switches2_r() { return get_switches2(); } diff --git a/src/devices/bus/ieee488/hp9895.h b/src/devices/bus/ieee488/hp9895.h index ad4865d1854..53858207609 100644 --- a/src/devices/bus/ieee488/hp9895.h +++ b/src/devices/bus/ieee488/hp9895.h @@ -68,21 +68,21 @@ private: void z80_m1_w(uint8_t data); // Floppy interface - DECLARE_WRITE8_MEMBER(data_w); - DECLARE_WRITE8_MEMBER(clock_w); - DECLARE_WRITE8_MEMBER(reset_w); - DECLARE_WRITE8_MEMBER(leds_w); - DECLARE_WRITE8_MEMBER(cntl_w); - DECLARE_WRITE8_MEMBER(drv_w); - DECLARE_WRITE8_MEMBER(xv_w); - DECLARE_READ8_MEMBER(data_r); - DECLARE_READ8_MEMBER(clock_r); - DECLARE_READ8_MEMBER(drivstat_r); - DECLARE_READ8_MEMBER(switches_r); - DECLARE_READ8_MEMBER(switches2_r); + void data_w(uint8_t data); + void clock_w(uint8_t data); + void reset_w(uint8_t data); + void leds_w(uint8_t data); + void cntl_w(uint8_t data); + void drv_w(uint8_t data); + void xv_w(uint8_t data); + uint8_t data_r(); + uint8_t clock_r(); + uint8_t drivstat_r(); + uint8_t switches_r(); + uint8_t switches2_r(); // PHI register read - DECLARE_READ8_MEMBER(phi_reg_r); + uint8_t phi_reg_r(offs_t offset); // Floppy drive interface void floppy_ready_cb(floppy_image_device *floppy , int state); diff --git a/src/devices/bus/ieee488/softbox.cpp b/src/devices/bus/ieee488/softbox.cpp index 8106cae2aad..f2b319fb50c 100644 --- a/src/devices/bus/ieee488/softbox.cpp +++ b/src/devices/bus/ieee488/softbox.cpp @@ -376,7 +376,7 @@ void softbox_device::ieee488_ifc(int state) // dbrg_w - baud rate selection //------------------------------------------------- -WRITE8_MEMBER( softbox_device::dbrg_w ) +void softbox_device::dbrg_w(uint8_t data) { m_dbrg->str_w(data & 0x0f); m_dbrg->stt_w(data >> 4); diff --git a/src/devices/bus/ieee488/softbox.h b/src/devices/bus/ieee488/softbox.h index 173d539cfbe..6b1f4a1dee0 100644 --- a/src/devices/bus/ieee488/softbox.h +++ b/src/devices/bus/ieee488/softbox.h @@ -57,7 +57,7 @@ private: uint8_t ppi1_pc_r(); void ppi1_pc_w(uint8_t data); - DECLARE_WRITE8_MEMBER( dbrg_w ); + void dbrg_w(uint8_t data); void softbox_io(address_map &map); void softbox_mem(address_map &map); diff --git a/src/devices/bus/intellec4/insdatastor.cpp b/src/devices/bus/intellec4/insdatastor.cpp index 9f4e3c53072..77a9cc378e5 100644 --- a/src/devices/bus/intellec4/insdatastor.cpp +++ b/src/devices/bus/intellec4/insdatastor.cpp @@ -100,19 +100,19 @@ WRITE_LINE_MEMBER(imm4_22_device::reset_4002_in) } -WRITE8_MEMBER(imm4_22_device::ram_out) +void imm4_22_device::ram_out(offs_t offset, u8 data) { // GPIO write - hooking this up would be a pain with MAME as it is logerror("4002 A%u out %X\n", 13U + (offset & 0x03U), data & 0x0fU); } -WRITE8_MEMBER(imm4_22_device::rom_out) +void imm4_22_device::rom_out(offs_t offset, u8 data) { // GPIO write - hooking this up would be a pain with MAME as it is logerror("ROM %u out %X\n", (m_rom_page << 2) | ((offset >> 4) & 0x03U), data & 0x0fU); } -READ8_MEMBER(imm4_22_device::rom_in) +u8 imm4_22_device::rom_in(offs_t offset) { // GPIO read - hooking this up would be a pain with MAME as it is if (!machine().side_effects_disabled()) @@ -155,7 +155,7 @@ void imm4_22_device::map_ram_io() { memory_space().install_ram(start << 8, (start << 8) | 0x00ffU, m_memory); status_space().install_ram(start << 6, (start << 6) | 0x003fU, m_status); - ram_ports_space().install_write_handler(start << 2, (start << 2) | 0x03U, write8_delegate(*this, FUNC(imm4_22_device::ram_out))); + ram_ports_space().install_write_handler(start << 2, (start << 2) | 0x03U, write8sm_delegate(*this, FUNC(imm4_22_device::ram_out))); } offs_t const rom_ports_start(offs_t(m_rom_page) << 6); @@ -163,7 +163,7 @@ void imm4_22_device::map_ram_io() offs_t const rom_ports_mirror(m_rom_mirror ? 0x1f00U : 0x0700U); rom_ports_space().install_readwrite_handler( rom_ports_start, rom_ports_end, 0U, rom_ports_mirror, 0U, - read8_delegate(*this, FUNC(imm4_22_device::rom_in)), write8_delegate(*this, FUNC(imm4_22_device::rom_out))); + read8sm_delegate(*this, FUNC(imm4_22_device::rom_in)), write8sm_delegate(*this, FUNC(imm4_22_device::rom_out))); if (is_loaded()) map_prom(); diff --git a/src/devices/bus/intellec4/insdatastor.h b/src/devices/bus/intellec4/insdatastor.h index e6bf4545872..9c6acad729f 100644 --- a/src/devices/bus/intellec4/insdatastor.h +++ b/src/devices/bus/intellec4/insdatastor.h @@ -172,9 +172,9 @@ protected: virtual DECLARE_WRITE_LINE_MEMBER(reset_4002_in) override; private: - DECLARE_WRITE8_MEMBER(ram_out); - DECLARE_WRITE8_MEMBER(rom_out); - DECLARE_READ8_MEMBER(rom_in); + void ram_out(offs_t offset, u8 data); + void rom_out(offs_t offset, u8 data); + u8 rom_in(offs_t offset); void allocate(); void map_ram_io(); diff --git a/src/devices/bus/intellec4/tapereader.cpp b/src/devices/bus/intellec4/tapereader.cpp index 581735b39f0..ba9566fad2d 100644 --- a/src/devices/bus/intellec4/tapereader.cpp +++ b/src/devices/bus/intellec4/tapereader.cpp @@ -50,10 +50,10 @@ void imm4_90_device::device_start() save_item(NAME(m_advance)); save_item(NAME(m_stepping)); - rom_ports_space().install_read_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(*this, FUNC(imm4_90_device::rom4_in))); - rom_ports_space().install_read_handler(0x0060U, 0x006fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(*this, FUNC(imm4_90_device::rom6_in))); - rom_ports_space().install_read_handler(0x0070U, 0x007fU, 0x0000U, 0x1f00U, 0x0000, read8_delegate(*this, FUNC(imm4_90_device::rom7_in))); - rom_ports_space().install_write_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, write8_delegate(*this, FUNC(imm4_90_device::rom4_out))); + rom_ports_space().install_read_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, read8smo_delegate(*this, FUNC(imm4_90_device::rom4_in))); + rom_ports_space().install_read_handler(0x0060U, 0x006fU, 0x0000U, 0x1f00U, 0x0000, read8smo_delegate(*this, FUNC(imm4_90_device::rom6_in))); + rom_ports_space().install_read_handler(0x0070U, 0x007fU, 0x0000U, 0x1f00U, 0x0000, read8smo_delegate(*this, FUNC(imm4_90_device::rom7_in))); + rom_ports_space().install_write_handler(0x0040U, 0x004fU, 0x0000U, 0x1f00U, 0x0000, write8smo_delegate(*this, FUNC(imm4_90_device::rom4_out))); } diff --git a/src/devices/bus/intellec4/tapereader.h b/src/devices/bus/intellec4/tapereader.h index d28c89adba7..64e1727e5d5 100644 --- a/src/devices/bus/intellec4/tapereader.h +++ b/src/devices/bus/intellec4/tapereader.h @@ -41,10 +41,10 @@ protected: virtual void device_start() override; private: - DECLARE_READ8_MEMBER(rom4_in) { return m_ready ? 0x07U : 0x0fU; } - DECLARE_READ8_MEMBER(rom6_in) { return ~m_data & 0x0fU; } - DECLARE_READ8_MEMBER(rom7_in) { return (~m_data >> 4) & 0x0fU; } - DECLARE_WRITE8_MEMBER(rom4_out) { advance(BIT(data, 3)); } + u8 rom4_in() { return m_ready ? 0x07U : 0x0fU; } + u8 rom6_in() { return ~m_data & 0x0fU; } + u8 rom7_in() { return (~m_data >> 4) & 0x0fU; } + void rom4_out(u8 data) { advance(BIT(data, 3)); } DECLARE_WRITE_LINE_MEMBER(advance); TIMER_CALLBACK_MEMBER(step); diff --git a/src/devices/bus/interpro/sr/edge.cpp b/src/devices/bus/interpro/sr/edge.cpp index b8927438efc..c3ccbc14669 100644 --- a/src/devices/bus/interpro/sr/edge.cpp +++ b/src/devices/bus/interpro/sr/edge.cpp @@ -763,7 +763,7 @@ u32 edge2plus_framebuffer_device_base::screen_update(screen_device &screen, bitm return 0; } -WRITE32_MEMBER(edge1_device_base::control_w) +void edge1_device_base::control_w(offs_t offset, u32 data, u32 mem_mask) { // clear interrupt if (m_control & HOLDA_INT_H && !(data & HOLDA_INT_H)) @@ -799,7 +799,7 @@ WRITE_LINE_MEMBER(edge1_device_base::holda) m_status &= ~DSP_1_HOLDA_H; } -WRITE32_MEMBER(edge2plus_processor_device_base::control_w) +void edge2plus_processor_device_base::control_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_control); @@ -841,7 +841,7 @@ void edge2plus_processor_device_base::dsp1_map(address_map &map) } -WRITE32_MEMBER(edge2plus_framebuffer_device_base::lut_select_w) +void edge2plus_framebuffer_device_base::lut_select_w(u32 data) { LOG("select ramdac %d\n", data); @@ -865,12 +865,12 @@ WRITE_LINE_MEMBER(edge1_device_base::scc_irq) irq0(state); } -READ32_MEMBER(edge1_device_base::reg0_r) +u32 edge1_device_base::reg0_r() { return ((m_reg0 & ~VBLANK) | (m_screen->vblank() ? VBLANK : 0)); } -WRITE32_MEMBER(edge1_device_base::kernel_w) +void edge1_device_base::kernel_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_kernel); @@ -887,14 +887,14 @@ WRITE_LINE_MEMBER(edge2plus_processor_device_base::scc_irq) irq0(state); } -WRITE32_MEMBER(edge2plus_processor_device_base::kernel_w) +void edge2plus_processor_device_base::kernel_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_kernel); m_status |= KREG_IN_FULL; // FIXME: what clears this? } -READ32_MEMBER(edge2plus_processor_device_base::reg0_r) +u32 edge2plus_processor_device_base::reg0_r() { LOG("reg0_r vblank %d\n", m_screen->vblank()); diff --git a/src/devices/bus/interpro/sr/edge.h b/src/devices/bus/interpro/sr/edge.h index ad6c6dfbb1b..d12bfc45394 100644 --- a/src/devices/bus/interpro/sr/edge.h +++ b/src/devices/bus/interpro/sr/edge.h @@ -31,26 +31,26 @@ protected: DECLARE_WRITE_LINE_MEMBER(scc_irq); - DECLARE_READ32_MEMBER(reg0_r); - DECLARE_WRITE32_MEMBER(reg0_w) { COMBINE_DATA(&m_reg0); } + u32 reg0_r(); + void reg0_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_reg0); } - DECLARE_READ32_MEMBER(control_r) { return m_control; }; - DECLARE_WRITE32_MEMBER(control_w); - DECLARE_READ32_MEMBER(status_r) { return m_status; }; - DECLARE_WRITE32_MEMBER(status_w) { COMBINE_DATA(&m_status); } - DECLARE_READ32_MEMBER(fifo_r) { return m_fifo; }; - DECLARE_WRITE32_MEMBER(fifo_w) { COMBINE_DATA(&m_fifo); } - DECLARE_READ32_MEMBER(kernel_r) { return m_kernel; }; - DECLARE_WRITE32_MEMBER(kernel_w); + u32 control_r() { return m_control; }; + void control_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 status_r() { return m_status; }; + void status_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_status); } + u32 fifo_r() { return m_fifo; }; + void fifo_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_fifo); } + u32 kernel_r() { return m_kernel; }; + void kernel_w(offs_t offset, u32 data, u32 mem_mask = ~0); - DECLARE_READ32_MEMBER(attention_r) { return m_attention; }; - DECLARE_WRITE32_MEMBER(attention_w) { COMBINE_DATA(&m_attention); } + u32 attention_r() { return m_attention; }; + void attention_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_attention); } - DECLARE_WRITE32_MEMBER(ififo_lwm_w) { COMBINE_DATA(&m_ififo_lwm); } - DECLARE_WRITE32_MEMBER(ififo_hwm_w) { COMBINE_DATA(&m_ififo_hwm); } + void ififo_lwm_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ififo_lwm); } + void ififo_hwm_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ififo_hwm); } - DECLARE_READ32_MEMBER(srx_master_control_r) { return m_srx_master_control; } - DECLARE_WRITE32_MEMBER(srx_master_control_w) { COMBINE_DATA(&m_srx_master_control); } + u32 srx_master_control_r() { return m_srx_master_control; } + void srx_master_control_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_srx_master_control); } required_device m_screen; required_device m_sram; @@ -112,21 +112,21 @@ protected: DECLARE_WRITE_LINE_MEMBER(holda); DECLARE_WRITE_LINE_MEMBER(scc_irq); - DECLARE_READ32_MEMBER(control_r) { return m_control; }; - DECLARE_WRITE32_MEMBER(control_w); - DECLARE_READ32_MEMBER(status_r) { return m_status; }; - DECLARE_WRITE32_MEMBER(status_w) { COMBINE_DATA(&m_status); } - DECLARE_READ32_MEMBER(kernel_r) { return m_kernel; }; - DECLARE_WRITE32_MEMBER(kernel_w); - DECLARE_WRITE32_MEMBER(mapping_w) { COMBINE_DATA(&m_mapping); } - DECLARE_READ32_MEMBER(attention_r) { return m_attention; }; - DECLARE_WRITE32_MEMBER(attention_w) { COMBINE_DATA(&m_attention); } + u32 control_r() { return m_control; }; + void control_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 status_r() { return m_status; }; + void status_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_status); } + u32 kernel_r() { return m_kernel; }; + void kernel_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void mapping_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_mapping); } + u32 attention_r() { return m_attention; }; + void attention_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_attention); } - DECLARE_WRITE32_MEMBER(ififo_lwm_w) { COMBINE_DATA(&m_ififo_lwm); } - DECLARE_WRITE32_MEMBER(ififo_hwm_w) { COMBINE_DATA(&m_ififo_hwm); } + void ififo_lwm_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ififo_lwm); } + void ififo_hwm_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ififo_hwm); } - DECLARE_READ32_MEMBER(reg0_r); - DECLARE_WRITE32_MEMBER(reg0_w) { COMBINE_DATA(&m_reg0); } + u32 reg0_r(); + void reg0_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_reg0); } private: @@ -159,12 +159,12 @@ protected: u32 screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); - DECLARE_WRITE32_MEMBER(lut_select_w); + void lut_select_w(u32 data); - DECLARE_WRITE32_MEMBER(unk_300_w) { m_unk_304 = 0x1000; } - DECLARE_READ32_MEMBER(unk_304_r) { m_unk_304 ^= 0x1000; return m_unk_304; } + void unk_300_w(u32 data) { m_unk_304 = 0x1000; } + u32 unk_304_r() { m_unk_304 ^= 0x1000; return m_unk_304; } - DECLARE_WRITE32_MEMBER(select_w) { COMBINE_DATA(&m_select); } + void select_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_select); } required_device m_screen; required_device m_sram; diff --git a/src/devices/bus/interpro/sr/gt.cpp b/src/devices/bus/interpro/sr/gt.cpp index a5411ce7c19..768bf221ec5 100644 --- a/src/devices/bus/interpro/sr/gt.cpp +++ b/src/devices/bus/interpro/sr/gt.cpp @@ -621,7 +621,7 @@ void gt_device_base::device_start() m_done_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(gt_device_base::done), this)); } -WRITE32_MEMBER(gt_device_base::control_w) +void gt_device_base::control_w(offs_t offset, u32 data, u32 mem_mask) { if (data & GFX_BSGA_RST) { @@ -681,7 +681,7 @@ void gt_device_base::bsga_clip_status(s16 x, s16 y) LOG("bsga_clip_status result 0x%04x\n", m_bsga_status); } -WRITE32_MEMBER(gt_device_base::ri_xfer_w) +void gt_device_base::ri_xfer_w(offs_t offset, u32 data, u32 mem_mask) { LOG("ri_xfer_w 0x%08x mem_mask 0x%08x (%s)\n", data, mem_mask, machine().describe_context()); @@ -707,7 +707,7 @@ WRITE32_MEMBER(gt_device_base::ri_xfer_w) } } -WRITE32_MEMBER(gt_device_base::bsga_xin1yin1_w) +void gt_device_base::bsga_xin1yin1_w(offs_t offset, u32 data, u32 mem_mask) { m_bsga_xin1 = (m_bsga_xin1 & ~(mem_mask >> 0)) | ((data & mem_mask) >> 0); m_bsga_yin1 = (m_bsga_yin1 & ~(mem_mask >> 16)) | ((data & mem_mask) >> 16); @@ -726,7 +726,7 @@ WRITE32_MEMBER(gt_device_base::bsga_xin1yin1_w) m_bsga_tmp = m_bsga_xin1; } -WRITE32_MEMBER(gt_device_base::bsga_xin2yin2_w) +void gt_device_base::bsga_xin2yin2_w(offs_t offset, u32 data, u32 mem_mask) { m_bsga_xin2 = (m_bsga_xin2 & ~(mem_mask >> 0)) | ((data & mem_mask) >> 0); m_bsga_yin2 = (m_bsga_yin2 & ~(mem_mask >> 16)) | ((data & mem_mask) >> 16); @@ -743,7 +743,7 @@ WRITE32_MEMBER(gt_device_base::bsga_xin2yin2_w) m_line_timer->adjust(attotime::zero); } -WRITE16_MEMBER(gt_device_base::bsga_yin2_w) +void gt_device_base::bsga_yin2_w(offs_t offset, u16 data, u16 mem_mask) { COMBINE_DATA(&m_bsga_yin2); @@ -757,14 +757,14 @@ WRITE16_MEMBER(gt_device_base::bsga_yin2_w) m_line_timer->adjust(attotime::zero); } -READ16_MEMBER(gt_device_base::bsga_status_r) +u16 gt_device_base::bsga_status_r() { LOG("bsga_status_r 0x%04x (%s)\n", m_bsga_status, machine().describe_context()); return m_bsga_status; } -WRITE32_MEMBER(gt_device_base::bsga_float_w) +void gt_device_base::bsga_float_w(offs_t offset, u32 data) { // TODO: when we figure out exactly what this is supposed to do, convert it // to use softfloat instead. @@ -812,7 +812,7 @@ WRITE32_MEMBER(gt_device_base::bsga_float_w) LOG("bsga_float_w result 0x%04x overflow %s\n", m_bsga_xin, m_bsga_status & STATUS_FLOAT_OFLOW ? "set" : "clear"); } -WRITE16_MEMBER(gt_device_base::blit_width_w) +void gt_device_base::blit_width_w(offs_t offset, u16 data, u16 mem_mask) { // writing to blit width starts blit operation LOG("blit_width_w 0x%04x (%s)\n", data, machine().describe_context()); @@ -960,7 +960,7 @@ TIMER_CALLBACK_MEMBER(gt_device_base::done) m_control &= ~u32(param); } -WRITE8_MEMBER(gt_device_base::plane_enable_w) +void gt_device_base::plane_enable_w(u8 data) { if (m_control & GFX_GRPHCS_BUSY) return; @@ -971,7 +971,7 @@ WRITE8_MEMBER(gt_device_base::plane_enable_w) m_plane_enable = (data << 24) | (data << 16) | (data << 8) | (data << 0); } -WRITE8_MEMBER(gt_device_base::plane_data_w) +void gt_device_base::plane_data_w(u8 data) { if (m_control & GFX_GRPHCS_BUSY) return; @@ -1373,7 +1373,7 @@ void gt_device_base::bresenham_line(s16 major, s16 minor, s16 major_step, s16 mi LOG("bresenham_line end %d,%d\n", shallow ? major : minor, shallow ? minor : major); } -WRITE8_MEMBER(gt_device_base::contrast_dac_w) +void gt_device_base::contrast_dac_w(u8 data) { m_ramdac[0]->set_contrast(data); @@ -1384,7 +1384,7 @@ WRITE8_MEMBER(gt_device_base::contrast_dac_w) /* * GTDB support (SRX, SCC and mouse). */ -WRITE32_MEMBER(gtdb_device::srx_mapping_w) +void gtdb_device::srx_mapping_w(u32 data) { const offs_t srx_base = data << 24; @@ -1429,7 +1429,7 @@ void gtdb_device::mouse_status_w(offs_t offset, u32 data, u32 mem_mask) irq0(CLEAR_LINE); } -READ32_MEMBER(gtdb_device::mouse_x_r) +u32 gtdb_device::mouse_x_r() { const u32 result = m_mouse_x; @@ -1438,7 +1438,7 @@ READ32_MEMBER(gtdb_device::mouse_x_r) return result; } -READ32_MEMBER(gtdb_device::mouse_y_r) +u32 gtdb_device::mouse_y_r() { const u32 result = m_mouse_y; diff --git a/src/devices/bus/interpro/sr/gt.h b/src/devices/bus/interpro/sr/gt.h index 0fd02864c3b..aeeb70941ea 100644 --- a/src/devices/bus/interpro/sr/gt.h +++ b/src/devices/bus/interpro/sr/gt.h @@ -56,44 +56,44 @@ public: GFX_MONSENSE_60HZ = 0x0e000000, }; - DECLARE_READ32_MEMBER(control_r) { return m_control | (m_screen[0]->vblank() ? GFX_VERT_BLNK : 0); } - DECLARE_WRITE32_MEMBER(control_w); + u32 control_r() { return m_control | (m_screen[0]->vblank() ? GFX_VERT_BLNK : 0); } + void control_w(offs_t offset, u32 data, u32 mem_mask = ~0); - DECLARE_WRITE8_MEMBER(contrast_dac_w); + void contrast_dac_w(u8 data); - DECLARE_WRITE32_MEMBER(blit_src_address_w) { COMBINE_DATA(&m_blit_src_address); } - DECLARE_WRITE32_MEMBER(blit_dst_address_w) { COMBINE_DATA(&m_blit_dst_address); } - DECLARE_WRITE16_MEMBER(blit_width_w); + void blit_src_address_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_blit_src_address); } + void blit_dst_address_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_blit_dst_address); } + void blit_width_w(offs_t offset, u16 data, u16 mem_mask = ~0); - DECLARE_READ8_MEMBER(plane_enable_r) { return m_plane_enable; } - DECLARE_WRITE8_MEMBER(plane_enable_w); - DECLARE_READ8_MEMBER(plane_data_r) { return m_plane_data; } - DECLARE_WRITE8_MEMBER(plane_data_w); + u8 plane_enable_r() { return m_plane_enable; } + void plane_enable_w(u8 data); + u8 plane_data_r() { return m_plane_data; } + void plane_data_w(u8 data); - DECLARE_READ16_MEMBER(bsga_width_r) { return m_bsga_width; } - DECLARE_WRITE16_MEMBER(bsga_width_w) { COMBINE_DATA(&m_bsga_width); } - DECLARE_READ16_MEMBER(bsga_tmp_r) { return m_bsga_tmp; } - DECLARE_WRITE16_MEMBER(bsga_tmp_w) { COMBINE_DATA(&m_bsga_tmp); } + u16 bsga_width_r() { return m_bsga_width; } + void bsga_width_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_width); } + u16 bsga_tmp_r() { return m_bsga_tmp; } + void bsga_tmp_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_tmp); } - DECLARE_READ16_MEMBER(bsga_xmin_r) { return m_bsga_xmin; } - DECLARE_WRITE16_MEMBER(bsga_xmin_w) { COMBINE_DATA(&m_bsga_xmin); } - DECLARE_READ16_MEMBER(bsga_ymin_r) { return m_bsga_ymin; } - DECLARE_WRITE16_MEMBER(bsga_ymin_w) { COMBINE_DATA(&m_bsga_ymin); } + u16 bsga_xmin_r() { return m_bsga_xmin; } + void bsga_xmin_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_xmin); } + u16 bsga_ymin_r() { return m_bsga_ymin; } + void bsga_ymin_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_ymin); } - DECLARE_READ16_MEMBER(bsga_acc0_r) { return (m_bsga_width - m_bsga_xin1); } - DECLARE_READ16_MEMBER(bsga_acc1_r) { return -(m_bsga_width - m_bsga_xin1); } + u16 bsga_acc0_r() { return (m_bsga_width - m_bsga_xin1); } + u16 bsga_acc1_r() { return -(m_bsga_width - m_bsga_xin1); } - DECLARE_READ16_MEMBER(bsga_xmax_r) { return m_bsga_xmax; } - DECLARE_WRITE16_MEMBER(bsga_xmax_w) { COMBINE_DATA(&m_bsga_xmax); } - DECLARE_READ16_MEMBER(bsga_ymax_r) { return m_bsga_ymax; } - DECLARE_WRITE16_MEMBER(bsga_ymax_w) { COMBINE_DATA(&m_bsga_ymax); bsga_clip_status(m_bsga_xin1, m_bsga_yin1); } + u16 bsga_xmax_r() { return m_bsga_xmax; } + void bsga_xmax_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_xmax); } + u16 bsga_ymax_r() { return m_bsga_ymax; } + void bsga_ymax_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_ymax); bsga_clip_status(m_bsga_xin1, m_bsga_yin1); } - DECLARE_READ16_MEMBER(bsga_src0_r) { return m_bsga_xin1; } - DECLARE_READ16_MEMBER(bsga_src1_r) { return m_bsga_xin1; } + u16 bsga_src0_r() { return m_bsga_xin1; } + u16 bsga_src1_r() { return m_bsga_xin1; } - DECLARE_WRITE16_MEMBER(bsga_xin1_w) { COMBINE_DATA(&m_bsga_xin1); m_bsga_xin = m_bsga_xin1; m_bsga_tmp = m_bsga_xin1; } - DECLARE_WRITE16_MEMBER(bsga_yin1_w) { COMBINE_DATA(&m_bsga_yin1); m_bsga_yin = m_bsga_yin1; } - DECLARE_WRITE32_MEMBER(bsga_xin1yin1_w); + void bsga_xin1_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_xin1); m_bsga_xin = m_bsga_xin1; m_bsga_tmp = m_bsga_xin1; } + void bsga_yin1_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_yin1); m_bsga_yin = m_bsga_yin1; } + void bsga_xin1yin1_w(offs_t offset, u32 data, u32 mem_mask = ~0); enum bsga_status_mask : u16 { @@ -115,32 +115,32 @@ public: STATUS_CLIP1_MASK = 0x01e0, STATUS_CLIP_MASK = 0x1fe0 }; - DECLARE_READ16_MEMBER(bsga_status_r); + u16 bsga_status_r(); - DECLARE_WRITE32_MEMBER(bsga_xin2yin2_w); + void bsga_xin2yin2_w(offs_t offset, u32 data, u32 mem_mask = ~0); - DECLARE_WRITE16_MEMBER(bsga_xin2_w) { COMBINE_DATA(&m_bsga_xin2); m_bsga_xin = m_bsga_xin2; } - DECLARE_WRITE16_MEMBER(bsga_yin2_w); + void bsga_xin2_w(offs_t offset, u16 data, u16 mem_mask = ~0) { COMBINE_DATA(&m_bsga_xin2); m_bsga_xin = m_bsga_xin2; } + void bsga_yin2_w(offs_t offset, u16 data, u16 mem_mask = ~0); // FIXME: perhaps tmp is a counter of xin/yin and can be used to return correct value? - DECLARE_READ16_MEMBER(bsga_xin_r) { return m_bsga_xin; } - DECLARE_READ16_MEMBER(bsga_yin_r) { return m_bsga_yin; } + u16 bsga_xin_r() { return m_bsga_xin; } + u16 bsga_yin_r() { return m_bsga_yin; } - DECLARE_WRITE32_MEMBER(ri_initial_distance_w) { COMBINE_DATA(&m_ri_initial_distance); } - DECLARE_WRITE32_MEMBER(ri_distance_both_w) { COMBINE_DATA(&m_ri_distance_both); } - DECLARE_WRITE32_MEMBER(ri_distance_major_w) { COMBINE_DATA(&m_ri_distance_major); } - DECLARE_WRITE32_MEMBER(ri_initial_address_w) { COMBINE_DATA(&m_ri_initial_address); } - DECLARE_WRITE32_MEMBER(ri_address_both_w) { COMBINE_DATA(&m_ri_address_both); } - DECLARE_WRITE32_MEMBER(ri_address_major_w) { COMBINE_DATA(&m_ri_address_major); } - DECLARE_WRITE32_MEMBER(ri_initial_error_w) { COMBINE_DATA(&m_ri_initial_error); } - DECLARE_WRITE32_MEMBER(ri_error_both_w) { COMBINE_DATA(&m_ri_error_both); } - DECLARE_WRITE32_MEMBER(ri_error_major_w) { COMBINE_DATA(&m_ri_error_major); } + void ri_initial_distance_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_initial_distance); } + void ri_distance_both_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_distance_both); } + void ri_distance_major_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_distance_major); } + void ri_initial_address_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_initial_address); } + void ri_address_both_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_address_both); } + void ri_address_major_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_address_major); } + void ri_initial_error_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_initial_error); } + void ri_error_both_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_error_both); } + void ri_error_major_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_error_major); } - DECLARE_WRITE32_MEMBER(ri_stop_count_w) { COMBINE_DATA(&m_ri_stop_count); } - DECLARE_WRITE32_MEMBER(ri_control_w) { COMBINE_DATA(&m_ri_control); } - DECLARE_WRITE32_MEMBER(ri_xfer_w); + void ri_stop_count_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_stop_count); } + void ri_control_w(offs_t offset, u32 data, u32 mem_mask = ~0) { COMBINE_DATA(&m_ri_control); } + void ri_xfer_w(offs_t offset, u32 data, u32 mem_mask = ~0); - DECLARE_WRITE32_MEMBER(bsga_float_w); + void bsga_float_w(offs_t offset, u32 data); protected: virtual void device_start() override; @@ -263,7 +263,7 @@ protected: DECLARE_WRITE_LINE_MEMBER(serial_irq); void mouse_status_w(offs_t offset, u32 data, u32 mem_mask = ~0); - DECLARE_WRITE32_MEMBER(srx_mapping_w); + void srx_mapping_w(u32 data); enum int_status_mask { @@ -273,10 +273,10 @@ protected: MOUSE_Y = 0x40, SERIAL = 0x80, }; - DECLARE_READ32_MEMBER(mouse_int_r) { return m_mouse_int; } - DECLARE_WRITE32_MEMBER(mouse_int_w) { mem_mask &= ~0x7; COMBINE_DATA(&m_mouse_int); } - DECLARE_READ32_MEMBER(mouse_x_r); - DECLARE_READ32_MEMBER(mouse_y_r); + u32 mouse_int_r() { return m_mouse_int; } + void mouse_int_w(offs_t offset, u32 data, u32 mem_mask = ~0) { mem_mask &= ~0x7; COMBINE_DATA(&m_mouse_int); } + u32 mouse_x_r(); + u32 mouse_y_r(); enum vfifo_control_mask { @@ -284,7 +284,7 @@ protected: FIFO_LW_INTR = 0x40, FIFO_HW_INTR = 0x80, }; - DECLARE_READ32_MEMBER(fifo_control_r) { return m_fifo_control; } + u32 fifo_control_r() { return m_fifo_control; } //virtual void device_start() override; virtual void device_add_mconfig(machine_config &config) override; diff --git a/src/devices/bus/isa/dectalk.cpp b/src/devices/bus/isa/dectalk.cpp index dc8f827338a..6482ccbf7e6 100644 --- a/src/devices/bus/isa/dectalk.cpp +++ b/src/devices/bus/isa/dectalk.cpp @@ -26,27 +26,27 @@ dectalk_isa_device::dectalk_isa_device(const machine_config& mconfig, const char { } -WRITE16_MEMBER(dectalk_isa_device::status_w) +void dectalk_isa_device::status_w(uint16_t data) { m_stat = data; } -READ16_MEMBER(dectalk_isa_device::cmd_r) +uint16_t dectalk_isa_device::cmd_r() { return m_cmd; } -WRITE16_MEMBER(dectalk_isa_device::data_w) +void dectalk_isa_device::data_w(uint16_t data) { m_data = data; } -READ16_MEMBER(dectalk_isa_device::data_r) +uint16_t dectalk_isa_device::data_r() { return m_data; } -READ16_MEMBER(dectalk_isa_device::host_irq_r) +uint16_t dectalk_isa_device::host_irq_r() { //m_isa->ir?_w(1); return 0; @@ -65,12 +65,12 @@ void dectalk_isa_device::dma_w(uint8_t data) m_dma = data; } -WRITE16_MEMBER(dectalk_isa_device::dac_w) +void dectalk_isa_device::dac_w(uint16_t data) { m_dac->write(data >> 4); } -WRITE16_MEMBER(dectalk_isa_device::output_ctl_w) +void dectalk_isa_device::output_ctl_w(uint16_t data) { // X9C503P potentiometer, 8-CS, 4-U/D, 2-INC if(!(data & 8) && !(m_ctl & 2) && (data & 2)) @@ -86,14 +86,14 @@ WRITE16_MEMBER(dectalk_isa_device::output_ctl_w) m_ctl = data; } -READ16_MEMBER(dectalk_isa_device::dsp_dma_r) +uint16_t dectalk_isa_device::dsp_dma_r() { m_bio = ASSERT_LINE; m_cpu->drq1_w(0); return m_dsp_dma; } -WRITE16_MEMBER(dectalk_isa_device::dsp_dma_w) +void dectalk_isa_device::dsp_dma_w(uint16_t data) { m_bio = CLEAR_LINE; m_dsp_dma = data; @@ -107,7 +107,7 @@ READ_LINE_MEMBER(dectalk_isa_device::bio_line_r) return m_bio; } -WRITE16_MEMBER(dectalk_isa_device::irq_line_w) +void dectalk_isa_device::irq_line_w(uint16_t data) { m_cpu->int1_w(0); } diff --git a/src/devices/bus/isa/dectalk.h b/src/devices/bus/isa/dectalk.h index f004cd37863..674efa91d5d 100644 --- a/src/devices/bus/isa/dectalk.h +++ b/src/devices/bus/isa/dectalk.h @@ -32,18 +32,18 @@ private: void write(offs_t offset, uint8_t data); uint8_t read(offs_t offset); - DECLARE_WRITE16_MEMBER(status_w); - DECLARE_READ16_MEMBER(cmd_r); - DECLARE_WRITE16_MEMBER(data_w); - DECLARE_READ16_MEMBER(data_r); - DECLARE_READ16_MEMBER(host_irq_r); + void status_w(uint16_t data); + uint16_t cmd_r(); + void data_w(uint16_t data); + uint16_t data_r(); + uint16_t host_irq_r(); uint8_t dma_r(); void dma_w(uint8_t data); - DECLARE_WRITE16_MEMBER(dac_w); - DECLARE_READ16_MEMBER(dsp_dma_r); - DECLARE_WRITE16_MEMBER(dsp_dma_w); - DECLARE_WRITE16_MEMBER(output_ctl_w); - DECLARE_WRITE16_MEMBER(irq_line_w); + void dac_w(uint16_t data); + uint16_t dsp_dma_r(); + void dsp_dma_w(uint16_t data); + void output_ctl_w(uint16_t data); + void irq_line_w(uint16_t data); void dectalk_cpu_io(address_map &map); void dectalk_cpu_map(address_map &map); diff --git a/src/devices/bus/isa/ex1280.cpp b/src/devices/bus/isa/ex1280.cpp index 393f40fb51d..84c8bb8d269 100644 --- a/src/devices/bus/isa/ex1280.cpp +++ b/src/devices/bus/isa/ex1280.cpp @@ -90,7 +90,7 @@ void isa16_ex1280_device::device_add_mconfig(machine_config &config) // regs_r - register read handler //------------------------------------------------- -READ16_MEMBER(isa16_ex1280_device::regs_r) +uint16_t isa16_ex1280_device::regs_r(offs_t offset, uint16_t mem_mask) { uint16_t data = 0; if (offset == 0) @@ -110,7 +110,7 @@ READ16_MEMBER(isa16_ex1280_device::regs_r) // regs_w - register write handler //------------------------------------------------- -WRITE16_MEMBER(isa16_ex1280_device::regs_w) +void isa16_ex1280_device::regs_w(offs_t offset, uint16_t data, uint16_t mem_mask) { logerror("%s: regs_w: %08x = %04x & %04x\n", machine().describe_context(), 0x04000000 | (offset << 1), data, mem_mask); } @@ -120,7 +120,7 @@ WRITE16_MEMBER(isa16_ex1280_device::regs_w) // vram_r - VRAM direct read handler //------------------------------------------------- -READ16_MEMBER(isa16_ex1280_device::vram_r) +uint16_t isa16_ex1280_device::vram_r(offs_t offset) { logerror("vram_r: %08x = %04x\n", offset, m_vram[offset]); return m_vram[offset]; @@ -128,10 +128,10 @@ READ16_MEMBER(isa16_ex1280_device::vram_r) //------------------------------------------------- -// vram_r - VRAM direct write handler +// vram_w - VRAM direct write handler //------------------------------------------------- -WRITE16_MEMBER(isa16_ex1280_device::vram_w) +void isa16_ex1280_device::vram_w(offs_t offset, uint16_t data, uint16_t mem_mask) { logerror("vram_r: %08x = %04x & %04x\n", offset, data, mem_mask); COMBINE_DATA(&m_vram[offset]); diff --git a/src/devices/bus/isa/ex1280.h b/src/devices/bus/isa/ex1280.h index ebc18722ea2..a9637a1b1f6 100644 --- a/src/devices/bus/isa/ex1280.h +++ b/src/devices/bus/isa/ex1280.h @@ -35,10 +35,10 @@ protected: virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - DECLARE_READ16_MEMBER(vram_r); - DECLARE_WRITE16_MEMBER(vram_w); - DECLARE_READ16_MEMBER(regs_r); - DECLARE_WRITE16_MEMBER(regs_w); + uint16_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t regs_r(offs_t offset, uint16_t mem_mask = ~0); + void regs_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(vblank_w); required_device m_cpu; diff --git a/src/devices/bus/isa/ne2000.cpp b/src/devices/bus/isa/ne2000.cpp index 3fc60df6b21..08c73b96dac 100644 --- a/src/devices/bus/isa/ne2000.cpp +++ b/src/devices/bus/isa/ne2000.cpp @@ -31,7 +31,7 @@ void ne2000_device::device_start() { memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); set_isa_device(); - m_isa->install16_device(0x0300, 0x031f, read16_delegate(*this, FUNC(ne2000_device::ne2000_port_r)), write16_delegate(*this, FUNC(ne2000_device::ne2000_port_w))); + m_isa->install16_device(0x0300, 0x031f, read16s_delegate(*this, FUNC(ne2000_device::ne2000_port_r)), write16s_delegate(*this, FUNC(ne2000_device::ne2000_port_w))); } void ne2000_device::device_reset() { @@ -39,7 +39,7 @@ void ne2000_device::device_reset() { m_irq = ioport("CONFIG")->read() & 3; } -READ16_MEMBER(ne2000_device::ne2000_port_r) { +uint16_t ne2000_device::ne2000_port_r(offs_t offset, uint16_t mem_mask) { offset <<= 1; if(offset < 16) { return m_dp8390->cs_read(offset) | @@ -58,7 +58,7 @@ READ16_MEMBER(ne2000_device::ne2000_port_r) { return 0; } -WRITE16_MEMBER(ne2000_device::ne2000_port_w) { +void ne2000_device::ne2000_port_w(offs_t offset, uint16_t data, uint16_t mem_mask) { offset <<= 1; if(offset < 16) { if(mem_mask == 0xff00) { diff --git a/src/devices/bus/isa/ne2000.h b/src/devices/bus/isa/ne2000.h index 7f62e5e5167..328443fd9b2 100644 --- a/src/devices/bus/isa/ne2000.h +++ b/src/devices/bus/isa/ne2000.h @@ -14,8 +14,8 @@ class ne2000_device: public device_t, public: ne2000_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(ne2000_port_r); - DECLARE_WRITE16_MEMBER(ne2000_port_w); + uint16_t ne2000_port_r(offs_t offset, uint16_t mem_mask = ~0); + void ne2000_port_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); protected: virtual void device_start() override; diff --git a/src/devices/bus/isa/s3virge.cpp b/src/devices/bus/isa/s3virge.cpp index 6866ece1828..125e848bc81 100644 --- a/src/devices/bus/isa/s3virge.cpp +++ b/src/devices/bus/isa/s3virge.cpp @@ -1475,7 +1475,7 @@ void s3virge_vga_device::device_timer(emu_timer &timer, device_timer_id id, int // bit 31 - 2D / 3D Select -READ32_MEMBER(s3virge_vga_device::s3d_sub_status_r) +uint32_t s3virge_vga_device::s3d_sub_status_r() { uint32_t res = 0x00000000; @@ -1489,14 +1489,14 @@ READ32_MEMBER(s3virge_vga_device::s3d_sub_status_r) return res; } -WRITE32_MEMBER(s3virge_vga_device::s3d_sub_control_w) +void s3virge_vga_device::s3d_sub_control_w(uint32_t data) { s3virge.interrupt_enable = data & 0x00003f80; // TODO: bits 14-15==10 - reset engine LOGMMIO("Sub control = %08x\n", data); } -READ32_MEMBER(s3virge_vga_device::s3d_func_ctrl_r) +uint32_t s3virge_vga_device::s3d_func_ctrl_r() { uint32_t ret = 0; @@ -1504,7 +1504,7 @@ READ32_MEMBER(s3virge_vga_device::s3d_func_ctrl_r) return ret; } -READ32_MEMBER(s3virge_vga_device::s3d_register_r) +uint32_t s3virge_vga_device::s3d_register_r(offs_t offset) { uint32_t res = 0; int op_type = (((offset*4) & 0x1c00) >> 10) - 1; @@ -1525,7 +1525,7 @@ READ32_MEMBER(s3virge_vga_device::s3d_register_r) return res; } -WRITE32_MEMBER(s3virge_vga_device::s3d_register_w) +void s3virge_vga_device::s3d_register_w(offs_t offset, uint32_t data) { int op_type = (((offset*4) & 0x1c00) >> 10) - 1; diff --git a/src/devices/bus/isa/s3virge.h b/src/devices/bus/isa/s3virge.h index a89c5c17e61..1070850ddc3 100644 --- a/src/devices/bus/isa/s3virge.h +++ b/src/devices/bus/isa/s3virge.h @@ -35,14 +35,14 @@ public: uint8_t fb_r(offs_t offset); void fb_w(offs_t offset, uint8_t data); - DECLARE_READ32_MEMBER(s3d_sub_status_r); - DECLARE_WRITE32_MEMBER(s3d_sub_control_w); - DECLARE_READ32_MEMBER(s3d_func_ctrl_r); + uint32_t s3d_sub_status_r(); + void s3d_sub_control_w(uint32_t data); + uint32_t s3d_func_ctrl_r(); - DECLARE_READ32_MEMBER(s3d_register_r); - DECLARE_WRITE32_MEMBER(s3d_register_w); + uint32_t s3d_register_r(offs_t offset); + void s3d_register_w(offs_t offset, uint32_t data); - DECLARE_WRITE32_MEMBER(image_xfer) + void image_xfer(uint32_t data) { // if(s3virge.s3d.cmd_fifo[s3virge.s3d.cmd_fifo_current_ptr].reg[S3D_REG_COMMAND] & 0x00000080) { diff --git a/src/devices/bus/isa/sb16.cpp b/src/devices/bus/isa/sb16.cpp index dce0adbcca9..5bfacf2c196 100644 --- a/src/devices/bus/isa/sb16.cpp +++ b/src/devices/bus/isa/sb16.cpp @@ -709,7 +709,7 @@ void sb16_lle_device::device_start() ymf262_device &ymf262 = *subdevice("ymf262"); set_isa_device(); - m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0200, 0x0207, read8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); m_isa->install_device(0x0220, 0x022f, *this, &sb16_lle_device::host_io); m_isa->install_device(0x0330, 0x0331, read8sm_delegate(*this, FUNC(sb16_lle_device::mpu401_r)), write8sm_delegate(*this, FUNC(sb16_lle_device::mpu401_w))); m_isa->install_device(0x0388, 0x0389, read8sm_delegate(ymf262, FUNC(ymf262_device::read)), write8sm_delegate(ymf262, FUNC(ymf262_device::write))); diff --git a/src/devices/bus/isa/sblaster.cpp b/src/devices/bus/isa/sblaster.cpp index 542985f17d6..68120388f8a 100644 --- a/src/devices/bus/isa/sblaster.cpp +++ b/src/devices/bus/isa/sblaster.cpp @@ -1256,7 +1256,7 @@ isa16_sblaster16_device::isa16_sblaster16_device(const machine_config &mconfig, void sb8_device::device_start() { - m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0200, 0x0207, read8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); m_isa->install_device(0x0226, 0x0227, read8sm_delegate(*this, FUNC(sb_device::dsp_reset_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_reset_w))); m_isa->install_device(0x022a, 0x022b, read8sm_delegate(*this, FUNC(sb_device::dsp_data_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_data_w))); m_isa->install_device(0x022c, 0x022d, read8sm_delegate(*this, FUNC(sb_device::dsp_wbuf_status_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_cmd_w))); @@ -1301,7 +1301,7 @@ void isa8_sblaster1_5_device::device_start() void sb16_device::device_start() { ymf262_device &ymf262 = *subdevice("ymf262"); - m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0200, 0x0207, read8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); m_isa->install_device(0x0226, 0x0227, read8sm_delegate(*this, FUNC(sb_device::dsp_reset_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_reset_w))); m_isa->install_device(0x022a, 0x022b, read8sm_delegate(*this, FUNC(sb_device::dsp_data_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_data_w))); m_isa->install_device(0x022c, 0x022d, read8sm_delegate(*this, FUNC(sb_device::dsp_wbuf_status_r)), write8sm_delegate(*this, FUNC(sb_device::dsp_cmd_w))); diff --git a/src/devices/bus/isa/ssi2001.cpp b/src/devices/bus/isa/ssi2001.cpp index bff7a4c7d92..e1d271dc6b4 100644 --- a/src/devices/bus/isa/ssi2001.cpp +++ b/src/devices/bus/isa/ssi2001.cpp @@ -29,7 +29,7 @@ ssi2001_device::ssi2001_device(const machine_config &mconfig, const char *tag, d void ssi2001_device::device_start() { set_isa_device(); - m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0200, 0x0207, read8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); m_isa->install_device(0x0280, 0x029F, read8sm_delegate(*subdevice("sid6581"), FUNC(mos6581_device::read)), write8sm_delegate(*subdevice("sid6581"), FUNC(mos6581_device::write))); } diff --git a/src/devices/bus/isa/stereo_fx.cpp b/src/devices/bus/isa/stereo_fx.cpp index 3b5c8188a55..d5569c845d9 100644 --- a/src/devices/bus/isa/stereo_fx.cpp +++ b/src/devices/bus/isa/stereo_fx.cpp @@ -214,7 +214,7 @@ void stereo_fx_device::device_start() ym3812_device &ym3812 = *subdevice("ym3812"); set_isa_device(); - m_isa->install_device(0x0200, 0x0207, read8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); + m_isa->install_device(0x0200, 0x0207, read8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_r)), write8smo_delegate(*subdevice("pc_joy"), FUNC(pc_joy_device::joy_port_w))); m_isa->install_device(0x0226, 0x0227, read8smo_delegate(*this, FUNC(stereo_fx_device::invalid_r)), write8smo_delegate(*this, FUNC(stereo_fx_device::dsp_reset_w))); m_isa->install_device(0x022a, 0x022b, read8smo_delegate(*this, FUNC(stereo_fx_device::dsp_data_r)), write8smo_delegate(*this, FUNC(stereo_fx_device::invalid_w))); m_isa->install_device(0x022c, 0x022d, read8smo_delegate(*this, FUNC(stereo_fx_device::dsp_wbuf_status_r)), write8smo_delegate(*this, FUNC(stereo_fx_device::dsp_cmd_w))); diff --git a/src/devices/bus/kc/d004.cpp b/src/devices/bus/kc/d004.cpp index 8f162bc3006..8ca2f7b547b 100644 --- a/src/devices/bus/kc/d004.cpp +++ b/src/devices/bus/kc/d004.cpp @@ -301,7 +301,7 @@ void kc_d004_device::io_write(offs_t offset, uint8_t data) // FDC emulation //************************************************************************** -READ8_MEMBER(kc_d004_device::hw_input_gate_r) +uint8_t kc_d004_device::hw_input_gate_r() { /* bit 7: DMA Request (DRQ from FDC) @@ -327,7 +327,7 @@ READ8_MEMBER(kc_d004_device::hw_input_gate_r) return hw_input_gate; } -WRITE8_MEMBER(kc_d004_device::fdd_select_w) +void kc_d004_device::fdd_select_w(uint8_t data) { if (data & 0x01) m_floppy = m_floppy0->get_device(); @@ -346,7 +346,7 @@ WRITE8_MEMBER(kc_d004_device::fdd_select_w) m_fdc->set_floppy(m_floppy); } -WRITE8_MEMBER(kc_d004_device::hw_terminal_count_w) +void kc_d004_device::hw_terminal_count_w(uint8_t data) { m_fdc->tc_w(true); } @@ -412,7 +412,7 @@ void kc_d004_gide_device::device_reset() // GIDE read //------------------------------------------------- -READ8_MEMBER(kc_d004_gide_device::gide_r) +uint8_t kc_d004_gide_device::gide_r(offs_t offset) { uint8_t data = 0xff; uint8_t io_addr = offset & 0x0f; @@ -461,7 +461,7 @@ READ8_MEMBER(kc_d004_gide_device::gide_r) // GIDE write //------------------------------------------------- -WRITE8_MEMBER(kc_d004_gide_device::gide_w) +void kc_d004_gide_device::gide_w(offs_t offset, uint8_t data) { uint8_t io_addr = offset & 0x0f; diff --git a/src/devices/bus/kc/d004.h b/src/devices/bus/kc/d004.h index 6a7440d6ff2..948e3066882 100644 --- a/src/devices/bus/kc/d004.h +++ b/src/devices/bus/kc/d004.h @@ -47,9 +47,9 @@ protected: virtual void io_read(offs_t offset, uint8_t &data) override; virtual void io_write(offs_t offset, uint8_t data) override; - DECLARE_READ8_MEMBER(hw_input_gate_r); - DECLARE_WRITE8_MEMBER(fdd_select_w); - DECLARE_WRITE8_MEMBER(hw_terminal_count_w); + uint8_t hw_input_gate_r(); + void fdd_select_w(uint8_t data); + void hw_terminal_count_w(uint8_t data); required_device m_cpu; @@ -106,8 +106,8 @@ private: uint16_t m_ata_data; int m_lh; - DECLARE_READ8_MEMBER(gide_r); - DECLARE_WRITE8_MEMBER(gide_w); + uint8_t gide_r(offs_t offset); + void gide_w(offs_t offset, uint8_t data); void kc_d004_gide_io(address_map &map); }; diff --git a/src/devices/bus/lpci/cirrus.cpp b/src/devices/bus/lpci/cirrus.cpp index ad0e32149a0..659d39677a9 100644 --- a/src/devices/bus/lpci/cirrus.cpp +++ b/src/devices/bus/lpci/cirrus.cpp @@ -158,7 +158,7 @@ void pci_cirrus_svga_device::pci_write(pci_bus_device *pcibus, int function, int * *************************************/ -WRITE8_MEMBER( pci_cirrus_svga_device::cirrus_42E8_w ) +void pci_cirrus_svga_device::cirrus_42E8_w(uint8_t data) { if (data & 0x80) m_vga->reset(); diff --git a/src/devices/bus/lpci/cirrus.h b/src/devices/bus/lpci/cirrus.h index 91e512c3023..9f158a79178 100644 --- a/src/devices/bus/lpci/cirrus.h +++ b/src/devices/bus/lpci/cirrus.h @@ -28,7 +28,7 @@ public: virtual uint32_t pci_read(pci_bus_device *pcibus, int function, int offset, uint32_t mem_mask) override; virtual void pci_write(pci_bus_device *pcibus, int function, int offset, uint32_t data, uint32_t mem_mask) override; - DECLARE_WRITE8_MEMBER( cirrus_42E8_w ); + void cirrus_42E8_w(uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/lpci/i82371sb.cpp b/src/devices/bus/lpci/i82371sb.cpp index 15cb033231d..425fc563364 100644 --- a/src/devices/bus/lpci/i82371sb.cpp +++ b/src/devices/bus/lpci/i82371sb.cpp @@ -254,7 +254,7 @@ void i82371sb_device::device_start() southbridge_device::device_start(); m_ide_io_ports_enabled = false; - spaceio.install_readwrite_handler(0x00b0, 0x00b3, read8_delegate(*this, FUNC(i82371sb_device::read_apmcapms)), write8_delegate(*this, FUNC(i82371sb_device::write_apmcapms)), 0xffff0000); + spaceio.install_readwrite_handler(0x00b0, 0x00b3, read8sm_delegate(*this, FUNC(i82371sb_device::read_apmcapms)), write8sm_delegate(*this, FUNC(i82371sb_device::write_apmcapms)), 0xffff0000); m_smi_callback.resolve_safe(); m_boot_state_hook.resolve_safe(); // setup save states @@ -301,7 +301,7 @@ void i82371sb_device::port80_debug_write(uint8_t value) m_boot_state_hook((offs_t)0, value); } -READ8_MEMBER(i82371sb_device::read_apmcapms) +uint8_t i82371sb_device::read_apmcapms(offs_t offset) { if (offset == 0) return m_apmc; @@ -309,7 +309,7 @@ READ8_MEMBER(i82371sb_device::read_apmcapms) return m_apms; } -WRITE8_MEMBER(i82371sb_device::write_apmcapms) +void i82371sb_device::write_apmcapms(offs_t offset, uint8_t data) { if (offset == 0) { diff --git a/src/devices/bus/lpci/i82371sb.h b/src/devices/bus/lpci/i82371sb.h index 9b38c0876d0..1b70d33857b 100644 --- a/src/devices/bus/lpci/i82371sb.h +++ b/src/devices/bus/lpci/i82371sb.h @@ -50,8 +50,8 @@ protected: uint32_t pci_usb_r(device_t *busdevice, int offset, uint32_t mem_mask); void pci_usb_w(device_t *busdevice, int offset, uint32_t data, uint32_t mem_mask); private: - DECLARE_READ8_MEMBER(read_apmcapms); - DECLARE_WRITE8_MEMBER(write_apmcapms); + uint8_t read_apmcapms(offs_t offset); + void write_apmcapms(offs_t offset, uint8_t data); void map_busmaster_dma(); void update_smireq_line(); diff --git a/src/devices/bus/lpci/southbridge.cpp b/src/devices/bus/lpci/southbridge.cpp index 8b9795b8fe5..247bc9a48db 100644 --- a/src/devices/bus/lpci/southbridge.cpp +++ b/src/devices/bus/lpci/southbridge.cpp @@ -135,56 +135,56 @@ southbridge_device::southbridge_device(const machine_config &mconfig, device_typ * **********************************************************/ -READ32_MEMBER(southbridge_device::ide1_read32_cs0_r) +uint32_t southbridge_device::ide1_read32_cs0_r(offs_t offset, uint32_t mem_mask) { if (!m_ide_io_ports_enabled) return 0xffffffff; return m_ide->read_cs0(offset, mem_mask); } -WRITE32_MEMBER(southbridge_device::ide1_write32_cs0_w) +void southbridge_device::ide1_write32_cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if (!m_ide_io_ports_enabled) return; m_ide->write_cs0(offset, data, mem_mask); } -READ32_MEMBER(southbridge_device::ide2_read32_cs0_r) +uint32_t southbridge_device::ide2_read32_cs0_r(offs_t offset, uint32_t mem_mask) { if (!m_ide_io_ports_enabled) return 0xffffffff; return m_ide2->read_cs0(offset, mem_mask); } -WRITE32_MEMBER(southbridge_device::ide2_write32_cs0_w) +void southbridge_device::ide2_write32_cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if (!m_ide_io_ports_enabled) return; m_ide2->write_cs0(offset, data, mem_mask); } -READ8_MEMBER(southbridge_device::ide1_read_cs1_r) +uint8_t southbridge_device::ide1_read_cs1_r() { if (!m_ide_io_ports_enabled) return 0xff; return m_ide->read_cs1(1, 0xff0000) >> 16; } -WRITE8_MEMBER(southbridge_device::ide1_write_cs1_w) +void southbridge_device::ide1_write_cs1_w(uint8_t data) { if (!m_ide_io_ports_enabled) return; m_ide->write_cs1(1, data << 16, 0xff0000); } -READ8_MEMBER(southbridge_device::ide2_read_cs1_r) +uint8_t southbridge_device::ide2_read_cs1_r() { if (!m_ide_io_ports_enabled) return 0xff; return m_ide2->read_cs1(1, 0xff0000) >> 16; } -WRITE8_MEMBER(southbridge_device::ide2_write_cs1_w) +void southbridge_device::ide2_write_cs1_w(uint8_t data) { if (!m_ide_io_ports_enabled) return; @@ -194,7 +194,7 @@ WRITE8_MEMBER(southbridge_device::ide2_write_cs1_w) // With EISA it is possible to select whether each IRQ line is edge sensitive or level sensitive // Each bit corresponds to an IRQ, 0 for edge triggered 1 for level sensitive // IRQs 0 1 2 8 13 are always edge triggered -READ8_MEMBER(southbridge_device::eisa_irq_read) +uint8_t southbridge_device::eisa_irq_read(offs_t offset) { if (offset == 0) return m_eisa_irq_mode & 0xff; @@ -202,7 +202,7 @@ READ8_MEMBER(southbridge_device::eisa_irq_read) return m_eisa_irq_mode >> 8; } -WRITE8_MEMBER(southbridge_device::eisa_irq_write) +void southbridge_device::eisa_irq_write(offs_t offset, uint8_t data) { if (offset == 0) m_eisa_irq_mode = (m_eisa_irq_mode & 0xff00) | data; @@ -222,15 +222,15 @@ void southbridge_device::device_start() spaceio->install_readwrite_handler(0x0000, 0x001f, read8sm_delegate(*m_dma8237_1, FUNC(am9517a_device::read)), write8sm_delegate(*m_dma8237_1, FUNC(am9517a_device::write)), 0xffffffff); spaceio->install_readwrite_handler(0x0020, 0x003f, read8sm_delegate(*m_pic8259_master, FUNC(pic8259_device::read)), write8sm_delegate(*m_pic8259_master, FUNC(pic8259_device::write)), 0xffffffff); spaceio->install_readwrite_handler(0x0040, 0x005f, read8sm_delegate(*m_pit8254, FUNC(pit8254_device::read)), write8sm_delegate(*m_pit8254, FUNC(pit8254_device::write)), 0xffffffff); - spaceio->install_readwrite_handler(0x0060, 0x0063, read8_delegate(*this, FUNC(southbridge_device::at_portb_r)), write8_delegate(*this, FUNC(southbridge_device::at_portb_w)), 0x0000ff00); - spaceio->install_readwrite_handler(0x0080, 0x009f, read8_delegate(*this, FUNC(southbridge_device::at_page8_r)), write8_delegate(*this, FUNC(southbridge_device::at_page8_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x0060, 0x0063, read8smo_delegate(*this, FUNC(southbridge_device::at_portb_r)), write8smo_delegate(*this, FUNC(southbridge_device::at_portb_w)), 0x0000ff00); + spaceio->install_readwrite_handler(0x0080, 0x009f, read8sm_delegate(*this, FUNC(southbridge_device::at_page8_r)), write8sm_delegate(*this, FUNC(southbridge_device::at_page8_w)), 0xffffffff); spaceio->install_readwrite_handler(0x00a0, 0x00bf, read8sm_delegate(*m_pic8259_slave, FUNC(pic8259_device::read)), write8sm_delegate(*m_pic8259_slave, FUNC(pic8259_device::write)), 0xffffffff); - spaceio->install_readwrite_handler(0x00c0, 0x00df, read8_delegate(*this, FUNC(southbridge_device::at_dma8237_2_r)), write8_delegate(*this, FUNC(southbridge_device::at_dma8237_2_w)), 0xffffffff); - spaceio->install_readwrite_handler(0x0170, 0x0177, read32_delegate(*this, FUNC(southbridge_device::ide2_read32_cs0_r)), write32_delegate(*this, FUNC(southbridge_device::ide2_write32_cs0_w)), 0xffffffff); - spaceio->install_readwrite_handler(0x01f0, 0x01f7, read32_delegate(*this, FUNC(southbridge_device::ide1_read32_cs0_r)), write32_delegate(*this, FUNC(southbridge_device::ide1_write32_cs0_w)), 0xffffffff); - spaceio->install_readwrite_handler(0x0374, 0x0377, read8_delegate(*this, FUNC(southbridge_device::ide2_read_cs1_r)), write8_delegate(*this, FUNC(southbridge_device::ide2_write_cs1_w)), 0xff0000); - spaceio->install_readwrite_handler(0x03f4, 0x03f7, read8_delegate(*this, FUNC(southbridge_device::ide1_read_cs1_r)), write8_delegate(*this, FUNC(southbridge_device::ide1_write_cs1_w)), 0xff0000); - spaceio->install_readwrite_handler(0x04d0, 0x04d3, read8_delegate(*this, FUNC(southbridge_device::eisa_irq_read)), write8_delegate(*this, FUNC(southbridge_device::eisa_irq_write)), 0x0000ffff); + spaceio->install_readwrite_handler(0x00c0, 0x00df, read8sm_delegate(*this, FUNC(southbridge_device::at_dma8237_2_r)), write8sm_delegate(*this, FUNC(southbridge_device::at_dma8237_2_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x0170, 0x0177, read32s_delegate(*this, FUNC(southbridge_device::ide2_read32_cs0_r)), write32s_delegate(*this, FUNC(southbridge_device::ide2_write32_cs0_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x01f0, 0x01f7, read32s_delegate(*this, FUNC(southbridge_device::ide1_read32_cs0_r)), write32s_delegate(*this, FUNC(southbridge_device::ide1_write32_cs0_w)), 0xffffffff); + spaceio->install_readwrite_handler(0x0374, 0x0377, read8smo_delegate(*this, FUNC(southbridge_device::ide2_read_cs1_r)), write8smo_delegate(*this, FUNC(southbridge_device::ide2_write_cs1_w)), 0xff0000); + spaceio->install_readwrite_handler(0x03f4, 0x03f7, read8smo_delegate(*this, FUNC(southbridge_device::ide1_read_cs1_r)), write8smo_delegate(*this, FUNC(southbridge_device::ide1_write_cs1_w)), 0xff0000); + spaceio->install_readwrite_handler(0x04d0, 0x04d3, read8sm_delegate(*this, FUNC(southbridge_device::eisa_irq_read)), write8sm_delegate(*this, FUNC(southbridge_device::eisa_irq_write)), 0x0000ffff); spaceio->nop_readwrite(0x00e0, 0x00ef); } @@ -306,7 +306,7 @@ WRITE_LINE_MEMBER( southbridge_device::at_pit8254_out2_changed ) * *************************************************************************/ -READ8_MEMBER( southbridge_device::at_page8_r ) +uint8_t southbridge_device::at_page8_r(offs_t offset) { uint8_t data = m_at_pages[offset % 0x10]; @@ -329,7 +329,7 @@ READ8_MEMBER( southbridge_device::at_page8_r ) } -WRITE8_MEMBER( southbridge_device::at_page8_w ) +void southbridge_device::at_page8_w(offs_t offset, uint8_t data) { m_at_pages[offset % 0x10] = data; @@ -459,7 +459,7 @@ WRITE_LINE_MEMBER( southbridge_device::pc_dack5_w ) { pc_select_dma_channel(5, s WRITE_LINE_MEMBER( southbridge_device::pc_dack6_w ) { pc_select_dma_channel(6, state); } WRITE_LINE_MEMBER( southbridge_device::pc_dack7_w ) { pc_select_dma_channel(7, state); } -READ8_MEMBER( southbridge_device::at_portb_r ) +uint8_t southbridge_device::at_portb_r() { uint8_t data = m_at_speaker; data &= ~0xd0; // AT BIOS don't likes this being set @@ -475,7 +475,7 @@ READ8_MEMBER( southbridge_device::at_portb_r ) return data; } -WRITE8_MEMBER( southbridge_device::at_portb_w ) +void southbridge_device::at_portb_w(uint8_t data) { m_at_speaker = data; m_pit8254->write_gate2(BIT(data, 0)); @@ -491,12 +491,12 @@ WRITE_LINE_MEMBER( southbridge_device::iochck_w ) m_maincpu->set_input_line(INPUT_LINE_NMI, ASSERT_LINE); } -READ8_MEMBER( southbridge_device::at_dma8237_2_r ) +uint8_t southbridge_device::at_dma8237_2_r(offs_t offset) { return m_dma8237_2->read(offset / 2); } -WRITE8_MEMBER( southbridge_device::at_dma8237_2_w ) +void southbridge_device::at_dma8237_2_w(offs_t offset, uint8_t data) { m_dma8237_2->write(offset / 2, data); } @@ -574,7 +574,7 @@ void southbridge_extended_device::device_reset() southbridge_device::device_reset(); } -WRITE8_MEMBER( southbridge_extended_device::write_rtc ) +void southbridge_extended_device::write_rtc(offs_t offset, uint8_t data) { if (offset==0) { m_nmi_enabled = BIT(data,7); diff --git a/src/devices/bus/lpci/southbridge.h b/src/devices/bus/lpci/southbridge.h index 3ffe7033412..92953a5df0f 100644 --- a/src/devices/bus/lpci/southbridge.h +++ b/src/devices/bus/lpci/southbridge.h @@ -83,10 +83,10 @@ protected: void pc_select_dma_channel(int channel, bool state); private: - DECLARE_READ8_MEMBER(at_page8_r); - DECLARE_WRITE8_MEMBER(at_page8_w); - DECLARE_READ8_MEMBER(at_portb_r); - DECLARE_WRITE8_MEMBER(at_portb_w); + uint8_t at_page8_r(offs_t offset); + void at_page8_w(offs_t offset, uint8_t data); + uint8_t at_portb_r(); + void at_portb_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(iochck_w); uint8_t get_slave_ack(offs_t offset); DECLARE_WRITE_LINE_MEMBER(at_pit8254_out0_changed); @@ -117,23 +117,23 @@ private: DECLARE_WRITE_LINE_MEMBER(pc_dack6_w); DECLARE_WRITE_LINE_MEMBER(pc_dack7_w); - DECLARE_READ32_MEMBER(ide1_read32_cs0_r); - DECLARE_WRITE32_MEMBER(ide1_write32_cs0_w); - DECLARE_READ32_MEMBER(ide2_read32_cs0_r); - DECLARE_WRITE32_MEMBER(ide2_write32_cs0_w); - DECLARE_READ8_MEMBER(ide1_read_cs1_r); - DECLARE_WRITE8_MEMBER(ide1_write_cs1_w); - DECLARE_READ8_MEMBER(ide2_read_cs1_r); - DECLARE_WRITE8_MEMBER(ide2_write_cs1_w); - - DECLARE_READ8_MEMBER(at_dma8237_2_r); - DECLARE_WRITE8_MEMBER(at_dma8237_2_w); + uint32_t ide1_read32_cs0_r(offs_t offset, uint32_t mem_mask = ~0); + void ide1_write32_cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t ide2_read32_cs0_r(offs_t offset, uint32_t mem_mask = ~0); + void ide2_write32_cs0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint8_t ide1_read_cs1_r(); + void ide1_write_cs1_w(uint8_t data); + uint8_t ide2_read_cs1_r(); + void ide2_write_cs1_w(uint8_t data); + + uint8_t at_dma8237_2_r(offs_t offset); + void at_dma8237_2_w(offs_t offset, uint8_t data); uint8_t pc_dma_read_byte(offs_t offset); void pc_dma_write_byte(offs_t offset, uint8_t data); uint8_t pc_dma_read_word(offs_t offset); void pc_dma_write_word(offs_t offset, uint8_t data); - DECLARE_READ8_MEMBER(eisa_irq_read); - DECLARE_WRITE8_MEMBER(eisa_irq_write); + uint8_t eisa_irq_read(offs_t offset); + void eisa_irq_write(offs_t offset, uint8_t data); }; // ======================> southbridge_extended_device @@ -159,7 +159,7 @@ protected: required_device m_pc_kbdc; private: - DECLARE_WRITE8_MEMBER(write_rtc); + void write_rtc(offs_t offset, uint8_t data); }; #endif // MAME_BUS_LPCI_SOUTHBRIDGE_H diff --git a/src/devices/bus/macpds/hyperdrive.cpp b/src/devices/bus/macpds/hyperdrive.cpp index 2d6fddbebf2..ac688a1a620 100644 --- a/src/devices/bus/macpds/hyperdrive.cpp +++ b/src/devices/bus/macpds/hyperdrive.cpp @@ -159,7 +159,7 @@ void macpds_hyperdrive_device::device_start() install_rom(this, HYPERDRIVE_ROM_REGION, 0xf80000); // WD200x registers - m_macpds->install_device(0xfc0000, 0xfc000f, read16_delegate(*this, FUNC(macpds_hyperdrive_device::hyperdrive_r)), write16_delegate(*this, FUNC(macpds_hyperdrive_device::hyperdrive_w))); + m_macpds->install_device(0xfc0000, 0xfc000f, read16sm_delegate(*this, FUNC(macpds_hyperdrive_device::hyperdrive_r)), write16sm_delegate(*this, FUNC(macpds_hyperdrive_device::hyperdrive_w))); } //------------------------------------------------- @@ -170,12 +170,12 @@ void macpds_hyperdrive_device::device_reset() { } -WRITE16_MEMBER( macpds_hyperdrive_device::hyperdrive_w ) +void macpds_hyperdrive_device::hyperdrive_w(offs_t offset, uint16_t data) { m_hdc->write(offset, data & 0xff); } -READ16_MEMBER( macpds_hyperdrive_device::hyperdrive_r ) +uint16_t macpds_hyperdrive_device::hyperdrive_r(offs_t offset) { return m_hdc->read(offset); } diff --git a/src/devices/bus/macpds/hyperdrive.h b/src/devices/bus/macpds/hyperdrive.h index 7b2d4491212..d8bc4bc5883 100644 --- a/src/devices/bus/macpds/hyperdrive.h +++ b/src/devices/bus/macpds/hyperdrive.h @@ -39,8 +39,8 @@ protected: required_device m_hdc; private: - DECLARE_READ16_MEMBER(hyperdrive_r); - DECLARE_WRITE16_MEMBER(hyperdrive_w); + uint16_t hyperdrive_r(offs_t offset); + void hyperdrive_w(offs_t offset, uint16_t data); uint8_t hdd_r(offs_t offset); void hdd_w(offs_t offset, uint8_t data); diff --git a/src/devices/bus/macpds/macpds.cpp b/src/devices/bus/macpds/macpds.cpp index fb264fac214..3a7a87f85d2 100644 --- a/src/devices/bus/macpds/macpds.cpp +++ b/src/devices/bus/macpds/macpds.cpp @@ -96,17 +96,20 @@ void macpds_device::add_macpds_card(device_macpds_card_interface *card) m_device_list.append(*card); } -void macpds_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, uint32_t mask) +template void macpds_device::install_device(offs_t start, offs_t end, R rhandler, W whandler, uint32_t mask) { m_maincpu = machine().device(m_cputag); m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); } -void macpds_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask) -{ - m_maincpu = machine().device(m_cputag); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); -} +template void macpds_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read8s_delegate rhandler, write8s_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read8smo_delegate rhandler, write8smo_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read16s_delegate rhandler, write16s_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read16sm_delegate rhandler, write16sm_delegate whandler, uint32_t mask); +template void macpds_device::install_device(offs_t start, offs_t end, read16smo_delegate rhandler, write16smo_delegate whandler, uint32_t mask); void macpds_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data) { diff --git a/src/devices/bus/macpds/macpds.h b/src/devices/bus/macpds/macpds.h index 9cd5a550a5e..1977447a87b 100644 --- a/src/devices/bus/macpds/macpds.h +++ b/src/devices/bus/macpds/macpds.h @@ -73,8 +73,7 @@ public: void set_cputag(const char *tag) { m_cputag = tag; } void add_macpds_card(device_macpds_card_interface *card); - void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, uint32_t mask=0xffffffff); - void install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask=0xffffffff); + template void install_device(offs_t start, offs_t end, R rhandler, W whandler, uint32_t mask=0xffffffff); void install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data); void set_irq_line(int line, int state); diff --git a/src/devices/bus/macpds/pds_tpdfpd.cpp b/src/devices/bus/macpds/pds_tpdfpd.cpp index a6d6a0216f0..833d1d3820f 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.cpp +++ b/src/devices/bus/macpds/pds_tpdfpd.cpp @@ -112,8 +112,8 @@ void macpds_sedisplay_device::device_start() static const char bankname[] = { "radpds_ram" }; m_macpds->install_bank(0xc40000, 0xc40000+VRAM_SIZE-1, bankname, m_vram.get()); - m_macpds->install_device(0x770000, 0x77000f, read16_delegate(*this, FUNC(macpds_sedisplay_device::ramdac_r)), write16_delegate(*this, FUNC(macpds_sedisplay_device::ramdac_w))); - m_macpds->install_device(0xc10000, 0xc2ffff, read16_delegate(*this, FUNC(macpds_sedisplay_device::sedisplay_r)), write16_delegate(*this, FUNC(macpds_sedisplay_device::sedisplay_w))); + m_macpds->install_device(0x770000, 0x77000f, read16s_delegate(*this, FUNC(macpds_sedisplay_device::ramdac_r)), write16s_delegate(*this, FUNC(macpds_sedisplay_device::ramdac_w))); + m_macpds->install_device(0xc10000, 0xc2ffff, read16sm_delegate(*this, FUNC(macpds_sedisplay_device::sedisplay_r)), write16sm_delegate(*this, FUNC(macpds_sedisplay_device::sedisplay_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(879, 0), 0); @@ -181,11 +181,11 @@ uint32_t macpds_sedisplay_device::screen_update(screen_device &screen, bitmap_rg return 0; } -WRITE16_MEMBER( macpds_sedisplay_device::sedisplay_w ) +void macpds_sedisplay_device::sedisplay_w(offs_t offset, uint16_t data) { } -READ16_MEMBER( macpds_sedisplay_device::sedisplay_r ) +uint16_t macpds_sedisplay_device::sedisplay_r(offs_t offset) { if (offset == 0) // ack vbl { @@ -199,7 +199,7 @@ READ16_MEMBER( macpds_sedisplay_device::sedisplay_r ) return 0; } -WRITE16_MEMBER( macpds_sedisplay_device::ramdac_w ) +void macpds_sedisplay_device::ramdac_w(offs_t offset, uint16_t data, uint16_t mem_mask) { switch (offset) { @@ -224,7 +224,7 @@ WRITE16_MEMBER( macpds_sedisplay_device::ramdac_w ) } } -READ16_MEMBER( macpds_sedisplay_device::ramdac_r ) +uint16_t macpds_sedisplay_device::ramdac_r(offs_t offset, uint16_t mem_mask) { return 0; } diff --git a/src/devices/bus/macpds/pds_tpdfpd.h b/src/devices/bus/macpds/pds_tpdfpd.h index 21f53e63d7c..8999c569d34 100644 --- a/src/devices/bus/macpds/pds_tpdfpd.h +++ b/src/devices/bus/macpds/pds_tpdfpd.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ16_MEMBER(sedisplay_r); - DECLARE_WRITE16_MEMBER(sedisplay_w); - DECLARE_READ16_MEMBER(ramdac_r); - DECLARE_WRITE16_MEMBER(ramdac_w); + uint16_t sedisplay_r(offs_t offset); + void sedisplay_w(offs_t offset, uint16_t data); + uint16_t ramdac_r(offs_t offset, uint16_t mem_mask = ~0); + void ramdac_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/megadrive/eeprom.cpp b/src/devices/bus/megadrive/eeprom.cpp index 32787dec152..fa74fbe2917 100644 --- a/src/devices/bus/megadrive/eeprom.cpp +++ b/src/devices/bus/megadrive/eeprom.cpp @@ -162,7 +162,7 @@ void md_std_eeprom_device::device_reset() CART + EEPROM -------------------------------------------------*/ -READ16_MEMBER(md_std_eeprom_device::read) +uint16_t md_std_eeprom_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -174,7 +174,7 @@ READ16_MEMBER(md_std_eeprom_device::read) return 0xffff; } -WRITE16_MEMBER(md_std_eeprom_device::write) +void md_std_eeprom_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { @@ -185,7 +185,7 @@ WRITE16_MEMBER(md_std_eeprom_device::write) } } -READ16_MEMBER(md_eeprom_nbajam_device::read) +uint16_t md_eeprom_nbajam_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -198,7 +198,7 @@ READ16_MEMBER(md_eeprom_nbajam_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_nbajam_device::write) +void md_eeprom_nbajam_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { @@ -209,7 +209,7 @@ WRITE16_MEMBER(md_eeprom_nbajam_device::write) } } -READ16_MEMBER(md_eeprom_nbajamte_device::read) +uint16_t md_eeprom_nbajamte_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -222,7 +222,7 @@ READ16_MEMBER(md_eeprom_nbajamte_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_nbajamte_device::write) +void md_eeprom_nbajamte_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { @@ -241,7 +241,7 @@ WRITE16_MEMBER(md_eeprom_nbajamte_device::write) } // same as NBAJAMTE above... derived class? -READ16_MEMBER(md_eeprom_cslam_device::read) +uint16_t md_eeprom_cslam_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -254,7 +254,7 @@ READ16_MEMBER(md_eeprom_cslam_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_cslam_device::write) +void md_eeprom_cslam_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { @@ -273,7 +273,7 @@ WRITE16_MEMBER(md_eeprom_cslam_device::write) } // same as NBAJAMTE above... derived class? -READ16_MEMBER(md_eeprom_nflqb_device::read) +uint16_t md_eeprom_nflqb_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -286,7 +286,7 @@ READ16_MEMBER(md_eeprom_nflqb_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_nflqb_device::write) +void md_eeprom_nflqb_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { @@ -297,7 +297,7 @@ WRITE16_MEMBER(md_eeprom_nflqb_device::write) } } -READ16_MEMBER(md_eeprom_nhlpa_device::read) +uint16_t md_eeprom_nhlpa_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -310,7 +310,7 @@ READ16_MEMBER(md_eeprom_nhlpa_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_nhlpa_device::write) +void md_eeprom_nhlpa_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { @@ -321,7 +321,7 @@ WRITE16_MEMBER(md_eeprom_nhlpa_device::write) } } -READ16_MEMBER(md_eeprom_blara_device::read) +uint16_t md_eeprom_blara_device::read(offs_t offset) { if (offset == 0x380000/2) { @@ -334,7 +334,7 @@ READ16_MEMBER(md_eeprom_blara_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_blara_device::write) +void md_eeprom_blara_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x380000/2) { @@ -584,7 +584,7 @@ uint8_t md_eeprom_nbajam_alt_device::eeprom_i2c_out() } -READ16_MEMBER(md_eeprom_nbajam_alt_device::read) +uint16_t md_eeprom_nbajam_alt_device::read(offs_t offset) { if (offset == 0x200000/2) { @@ -596,7 +596,7 @@ READ16_MEMBER(md_eeprom_nbajam_alt_device::read) return 0xffff; } -WRITE16_MEMBER(md_eeprom_nbajam_alt_device::write) +void md_eeprom_nbajam_alt_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x200000/2) { diff --git a/src/devices/bus/megadrive/eeprom.h b/src/devices/bus/megadrive/eeprom.h index de60b413c27..73d693686ac 100644 --- a/src/devices/bus/megadrive/eeprom.h +++ b/src/devices/bus/megadrive/eeprom.h @@ -31,8 +31,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; required_device m_i2cmem; uint8_t m_i2c_mem, m_i2c_clk; @@ -51,8 +51,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; }; // ======================> md_eeprom_nbajamte_device @@ -68,8 +68,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; }; // ======================> md_eeprom_cslam_device (same read/write as nbajamte, but different I2C type) @@ -85,8 +85,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; }; // ======================> md_eeprom_nflqb_device (same read/write as nbajamte, but different I2C type) @@ -102,8 +102,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; }; // ======================> md_eeprom_nhlpa_device @@ -119,8 +119,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; }; // ======================> md_eeprom_blara_device (same read/write as codemast, but different I2C type) @@ -136,8 +136,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; }; @@ -174,8 +174,8 @@ public: md_eeprom_nbajam_alt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides diff --git a/src/devices/bus/megadrive/ggenie.cpp b/src/devices/bus/megadrive/ggenie.cpp index 17dbb78fc1d..e4df6f8ef29 100644 --- a/src/devices/bus/megadrive/ggenie.cpp +++ b/src/devices/bus/megadrive/ggenie.cpp @@ -63,7 +63,7 @@ void md_rom_ggenie_device::device_reset() mapper specific handlers -------------------------------------------------*/ -READ16_MEMBER(md_rom_ggenie_device::read) +uint16_t md_rom_ggenie_device::read(offs_t offset) { if (!m_gg_bypass || !m_exp->m_cart) { @@ -88,13 +88,13 @@ READ16_MEMBER(md_rom_ggenie_device::read) else if (offset == m_gg_addr[5]/2 && BIT(m_gg_regs[0], 5)) return m_gg_data[5]; else - return m_exp->m_cart->read(space, offset); + return m_exp->m_cart->read(offset); } else return 0xffff; } -WRITE16_MEMBER(md_rom_ggenie_device::write) +void md_rom_ggenie_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x40/2) return; diff --git a/src/devices/bus/megadrive/ggenie.h b/src/devices/bus/megadrive/ggenie.h index 38e282ac747..025f97fac7f 100644 --- a/src/devices/bus/megadrive/ggenie.h +++ b/src/devices/bus/megadrive/ggenie.h @@ -25,8 +25,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; private: required_device m_exp; diff --git a/src/devices/bus/megadrive/jcart.cpp b/src/devices/bus/megadrive/jcart.cpp index 80ade82bd86..26c99b2ef5f 100644 --- a/src/devices/bus/megadrive/jcart.cpp +++ b/src/devices/bus/megadrive/jcart.cpp @@ -157,7 +157,7 @@ void md_seprom_codemast_device::device_reset() J-CART ONLY (Pete Sampras Tennis) -------------------------------------------------*/ -READ16_MEMBER(md_jcart_device::read) +uint16_t md_jcart_device::read(offs_t offset) { if (offset == 0x38fffe/2) { @@ -182,7 +182,7 @@ READ16_MEMBER(md_jcart_device::read) return 0xffff; } -WRITE16_MEMBER(md_jcart_device::write) +void md_jcart_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x38fffe/2) { @@ -195,7 +195,7 @@ WRITE16_MEMBER(md_jcart_device::write) J-CART + SEPROM -------------------------------------------------*/ -READ16_MEMBER(md_seprom_codemast_device::read) +uint16_t md_seprom_codemast_device::read(offs_t offset) { if (offset == 0x380000/2) { @@ -225,7 +225,7 @@ READ16_MEMBER(md_seprom_codemast_device::read) return 0xffff; } -WRITE16_MEMBER(md_seprom_codemast_device::write) +void md_seprom_codemast_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x380000/2) { diff --git a/src/devices/bus/megadrive/jcart.h b/src/devices/bus/megadrive/jcart.h index 510a91a5d37..473c6ec2ce3 100644 --- a/src/devices/bus/megadrive/jcart.h +++ b/src/devices/bus/megadrive/jcart.h @@ -24,8 +24,8 @@ public: virtual ioport_constructor device_input_ports() const override; // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: md_jcart_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -58,8 +58,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; required_device m_i2cmem; diff --git a/src/devices/bus/megadrive/md_slot.cpp b/src/devices/bus/megadrive/md_slot.cpp index 698723897b7..e90a4510e2f 100644 --- a/src/devices/bus/megadrive/md_slot.cpp +++ b/src/devices/bus/megadrive/md_slot.cpp @@ -930,26 +930,26 @@ std::string base_md_cart_slot_device::get_default_card_software(get_default_card read -------------------------------------------------*/ -READ16_MEMBER(base_md_cart_slot_device::read) +uint16_t base_md_cart_slot_device::read(offs_t offset) { if (m_cart) - return m_cart->read(space, offset, mem_mask); + return m_cart->read(offset); else return 0xffff; } -READ16_MEMBER(base_md_cart_slot_device::read_a13) +uint16_t base_md_cart_slot_device::read_a13(offs_t offset) { if (m_cart) - return m_cart->read_a13(space, offset, mem_mask); + return m_cart->read_a13(offset); else return 0xffff; } -READ16_MEMBER(base_md_cart_slot_device::read_a15) +uint16_t base_md_cart_slot_device::read_a15(offs_t offset) { if (m_cart) - return m_cart->read_a15(space, offset, mem_mask); + return m_cart->read_a15(offset); else return 0xffff; } @@ -959,22 +959,22 @@ READ16_MEMBER(base_md_cart_slot_device::read_a15) write -------------------------------------------------*/ -WRITE16_MEMBER(base_md_cart_slot_device::write) +void base_md_cart_slot_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (m_cart) - m_cart->write(space, offset, data, mem_mask); + m_cart->write(offset, data, mem_mask); } -WRITE16_MEMBER(base_md_cart_slot_device::write_a13) +void base_md_cart_slot_device::write_a13(offs_t offset, uint16_t data) { if (m_cart) - m_cart->write_a13(space, offset, data, mem_mask); + m_cart->write_a13(offset, data); } -WRITE16_MEMBER(base_md_cart_slot_device::write_a15) +void base_md_cart_slot_device::write_a15(offs_t offset, uint16_t data) { if (m_cart) - m_cart->write_a15(space, offset, data, mem_mask); + m_cart->write_a15(offset, data); } /*------------------------------------------------- diff --git a/src/devices/bus/megadrive/md_slot.h b/src/devices/bus/megadrive/md_slot.h index cf3b20dc685..1e44cabaace 100644 --- a/src/devices/bus/megadrive/md_slot.h +++ b/src/devices/bus/megadrive/md_slot.h @@ -97,17 +97,17 @@ public: virtual ~device_md_cart_interface(); // reading and writing - virtual DECLARE_READ16_MEMBER(read) { return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(write) {} - virtual DECLARE_READ16_MEMBER(read_a13) { return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(write_a13) {} - virtual DECLARE_READ16_MEMBER(read_a15) { return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(write_a15) {} + virtual uint16_t read(offs_t offset) { return 0xffff; } + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) {} + virtual uint16_t read_a13(offs_t offset) { return 0xffff; } + virtual void write_a13(offs_t offset, uint16_t data) {} + virtual uint16_t read_a15(offs_t offset) { return 0xffff; } + virtual void write_a15(offs_t offset, uint16_t data) {} virtual int read_test() { return 0; } // used by Virtua Racing test // this probably should do more, like make Genesis V2 'die' if the SEGA string is not written promptly - virtual DECLARE_WRITE16_MEMBER(write_tmss_bank) { device().logerror("Write to TMSS bank: offset %x data %x\n", 0xa14000 + (offset << 1), data); }; + virtual void write_tmss_bank(offs_t offset, uint16_t data) { device().logerror("Write to TMSS bank: offset %x data %x\n", 0xa14000 + (offset << 1), data); }; virtual void rom_alloc(size_t size, const char *tag); virtual void nvram_alloc(size_t size); @@ -134,7 +134,7 @@ protected: int m_nvram_handlers_installed; // internal state -public: // FIXME: this needs to be public becuase the S&K "lock-on" cart is implemented in a really dodgy way +public: // FIXME: this needs to be public because the S&K "lock-on" cart is implemented in a really dodgy way uint16_t *m_rom; protected: uint32_t m_rom_size; @@ -182,13 +182,13 @@ public: void save_nvram() { if (m_cart && m_cart->get_nvram_size()) m_cart->save_nvram(); } // reading and writing - virtual DECLARE_READ16_MEMBER(read); - virtual DECLARE_WRITE16_MEMBER(write); - virtual DECLARE_READ16_MEMBER(read_a13); - virtual DECLARE_WRITE16_MEMBER(write_a13); - virtual DECLARE_READ16_MEMBER(read_a15); - virtual DECLARE_WRITE16_MEMBER(write_a15); - virtual DECLARE_WRITE16_MEMBER(write_tmss_bank) { if (m_cart) m_cart->write_tmss_bank(space, offset, data, mem_mask); }; + virtual uint16_t read(offs_t offset); + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + virtual uint16_t read_a13(offs_t offset); + virtual void write_a13(offs_t offset, uint16_t data); + virtual uint16_t read_a15(offs_t offset); + virtual void write_a15(offs_t offset, uint16_t data); + virtual void write_tmss_bank(offs_t offset, uint16_t data) { if (m_cart) m_cart->write_tmss_bank(offset, data); }; virtual int read_test() { if (m_cart) return m_cart->read_test(); else return 0; } // used by Virtua Racing test diff --git a/src/devices/bus/megadrive/rom.cpp b/src/devices/bus/megadrive/rom.cpp index ac54cfcc8fd..c6a8f592b3f 100644 --- a/src/devices/bus/megadrive/rom.cpp +++ b/src/devices/bus/megadrive/rom.cpp @@ -450,7 +450,7 @@ void md_rom_starodys_device::device_reset() CART + SRAM -------------------------------------------------*/ -READ16_MEMBER(md_rom_sram_device::read) +uint16_t md_rom_sram_device::read(offs_t offset) { // since a lot of generic carts ends up here if loaded from fullpath // we access nvram only if m_nvram_handlers_installed has been turned on @@ -465,7 +465,7 @@ READ16_MEMBER(md_rom_sram_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_sram_device::write) +void md_rom_sram_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { // since a lot of generic carts ends up here if loaded from fullpath // we access nvram only if m_nvram_handlers_installed has been turned on @@ -476,7 +476,7 @@ WRITE16_MEMBER(md_rom_sram_device::write) } } -WRITE16_MEMBER(md_rom_sram_device::write_a13) +void md_rom_sram_device::write_a13(offs_t offset, uint16_t data) { if (offset == 0xf0/2) { @@ -495,7 +495,7 @@ WRITE16_MEMBER(md_rom_sram_device::write_a13) CART + FRAM [almost same as SRAM... merge common parts?] -------------------------------------------------*/ -READ16_MEMBER(md_rom_fram_device::read) +uint16_t md_rom_fram_device::read(offs_t offset) { if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active) return m_nvram[offset - m_nvram_start/2]; @@ -505,20 +505,20 @@ READ16_MEMBER(md_rom_fram_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_fram_device::write) +void md_rom_fram_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active) m_nvram[offset - m_nvram_start/2] = data; } -WRITE16_MEMBER(md_rom_fram_device::write_a13) +void md_rom_fram_device::write_a13(offs_t offset, uint16_t data) { if (offset == 0xf0/2) m_nvram_active = BIT(data, 0); } -READ16_MEMBER(md_rom_fram_device::read_a13) +uint16_t md_rom_fram_device::read_a13(offs_t offset) { if (offset == 0xf0/2) return m_nvram_active; @@ -530,7 +530,7 @@ READ16_MEMBER(md_rom_fram_device::read_a13) SUPER STREET FIGHTERS 2 -------------------------------------------------*/ -READ16_MEMBER(md_rom_ssf2_device::read) +uint16_t md_rom_ssf2_device::read(offs_t offset) { if (offset < 0x400000/2) return m_rom[offset]; @@ -539,7 +539,7 @@ READ16_MEMBER(md_rom_ssf2_device::read) } // I'm not very fond of the code below... -WRITE16_MEMBER(md_rom_ssf2_device::write_a13) +void md_rom_ssf2_device::write_a13(offs_t offset, uint16_t data) { if (offset >= 0xf0/2) { @@ -564,7 +564,7 @@ WRITE16_MEMBER(md_rom_ssf2_device::write_a13) #define MD_ADDR_CM2IN1(a) (m_base == 0 ? ((a << 1) & 0x1fffff)/2 : (((a << 1) & 0x1fffff) + 0x200000)/2) -READ16_MEMBER(md_rom_cm2in1_device::read) +uint16_t md_rom_cm2in1_device::read(offs_t offset) { if (offset < 0x400000/2) return m_rom[MD_ADDR_CM2IN1(offset)]; @@ -577,15 +577,15 @@ READ16_MEMBER(md_rom_cm2in1_device::read) PIRATE MULTICARTS -------------------------------------------------*/ -READ16_MEMBER(md_rom_mcpirate_device::read) +uint16_t md_rom_mcpirate_device::read(offs_t offset) { if (offset < 0x400000/2) return m_rom[(((m_bank * 0x10000) + (offset << 1)) & (m_rom_size - 1))/2]; else - return read(space, offset - 0x400000/2, 0xffff); + return read(offset - 0x400000/2); } -WRITE16_MEMBER(md_rom_mcpirate_device::write_a13) +void md_rom_mcpirate_device::write_a13(offs_t offset, uint16_t data) { offset <<= 1; if (offset < 0x40) @@ -596,7 +596,7 @@ WRITE16_MEMBER(md_rom_mcpirate_device::write_a13) A BUG'S LIFE -------------------------------------------------*/ -READ16_MEMBER(md_rom_bugslife_device::read_a13) +uint16_t md_rom_bugslife_device::read_a13(offs_t offset) { if (offset == 0x00/2) return 0x28; if (offset == 0x02/2) return 0x01; @@ -608,7 +608,7 @@ READ16_MEMBER(md_rom_bugslife_device::read_a13) CHINESE FIGHTER 3 -------------------------------------------------*/ -READ16_MEMBER(md_rom_chinf3_device::read) +uint16_t md_rom_chinf3_device::read(offs_t offset) { if (offset < 0x100000/2) { @@ -680,7 +680,7 @@ READ16_MEMBER(md_rom_chinf3_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_chinf3_device::write) +void md_rom_chinf3_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x600000/2 && offset < 0x700000/2) { @@ -701,7 +701,7 @@ WRITE16_MEMBER(md_rom_chinf3_device::write) 16 MAHJONG II -------------------------------------------------*/ -READ16_MEMBER(md_rom_16mj2_device::read) +uint16_t md_rom_16mj2_device::read(offs_t offset) { if (offset == 0x400004/2) return 0xc900; @@ -716,7 +716,7 @@ READ16_MEMBER(md_rom_16mj2_device::read) LINGHUAN DAOSHI SUPER MAGICIAN / ELF WOR -------------------------------------------------*/ -READ16_MEMBER(md_rom_elfwor_device::read) +uint16_t md_rom_elfwor_device::read(offs_t offset) { // It returns (0x55 @ 0x400000 OR 0xc9 @ 0x400004) AND (0x0f @ 0x400002 OR 0x18 @ 0x400006). // It is probably best to add handlers for all 4 addresses @@ -736,7 +736,7 @@ READ16_MEMBER(md_rom_elfwor_device::read) HUAN LE TAO QI SHU / SMART MOUSE -------------------------------------------------*/ -READ16_MEMBER(md_rom_smouse_device::read) +uint16_t md_rom_smouse_device::read(offs_t offset) { if (offset == 0x400000/2) return 0x5500; if (offset == 0x400002/2) return 0x0f00; @@ -754,7 +754,7 @@ READ16_MEMBER(md_rom_smouse_device::read) YA SE CHUAN SHUO -------------------------------------------------*/ -READ16_MEMBER(md_rom_yasech_device::read) +uint16_t md_rom_yasech_device::read(offs_t offset) { if (offset == 0x400000/2) return 0x6300; if (offset == 0x400002/2) return 0x9800; @@ -772,7 +772,7 @@ READ16_MEMBER(md_rom_yasech_device::read) KOF98 -------------------------------------------------*/ -READ16_MEMBER(md_rom_kof98_device::read) +uint16_t md_rom_kof98_device::read(offs_t offset) { if (offset == 0x480000/2) return 0xaa00; if (offset == 0x4800e0/2) return 0xaa00; @@ -792,7 +792,7 @@ READ16_MEMBER(md_rom_kof98_device::read) KOF 99 -------------------------------------------------*/ -READ16_MEMBER(md_rom_kof99_device::read_a13) +uint16_t md_rom_kof99_device::read_a13(offs_t offset) { if (offset == 0x00/2) return 0x00; // startup protection check, chinese message if != 0 if (offset == 0x02/2) return 0x01; // write 02 to a13002.. shift right 1? @@ -804,7 +804,7 @@ READ16_MEMBER(md_rom_kof99_device::read_a13) LION KING 2 -------------------------------------------------*/ -READ16_MEMBER(md_rom_lion2_device::read) +uint16_t md_rom_lion2_device::read(offs_t offset) { if (offset == 0x400002/2) return m_prot1_data; if (offset == 0x400006/2) return m_prot2_data; @@ -816,7 +816,7 @@ READ16_MEMBER(md_rom_lion2_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_lion2_device::write) +void md_rom_lion2_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x400000/2) m_prot1_data = data; if (offset == 0x400004/2) m_prot2_data = data; @@ -828,7 +828,7 @@ WRITE16_MEMBER(md_rom_lion2_device::write) #define MD_LION3_ADDR(a) (((offset << 1) | (m_bank << 15)) & (m_rom_size - 1))/2 -READ16_MEMBER(md_rom_lion3_device::read) +uint16_t md_rom_lion3_device::read(offs_t offset) { if (offset < 0x100000/2) return m_rom[MD_LION3_ADDR(offset)]; @@ -855,7 +855,7 @@ READ16_MEMBER(md_rom_lion3_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_lion3_device::write) +void md_rom_lion3_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x600000/2 && offset < 0x700000/2) { @@ -907,7 +907,7 @@ WRITE16_MEMBER(md_rom_lion3_device::write) MA JIANG QING REN / MAHJONG LOVER -------------------------------------------------*/ -READ16_MEMBER(md_rom_mjlov_device::read) +uint16_t md_rom_mjlov_device::read(offs_t offset) { if (offset == 0x400000/2) return 0x9000; if (offset == 0x401000/2) return 0xd300; @@ -924,7 +924,7 @@ READ16_MEMBER(md_rom_mjlov_device::read) CHAOJI MAJIANG CLUB -------------------------------------------------*/ -READ16_MEMBER(md_rom_cjmjclub_device::read) +uint16_t md_rom_cjmjclub_device::read(offs_t offset) { if (offset == 0x400000/2) return 0x9000; if (offset == 0x400002/2) return 0xd300; @@ -941,7 +941,7 @@ READ16_MEMBER(md_rom_cjmjclub_device::read) SUPER BUBBLE BOBBLE MD -------------------------------------------------*/ -READ16_MEMBER(md_rom_sbubl_device::read) +uint16_t md_rom_sbubl_device::read(offs_t offset) { if (offset == 0x400000/2) return 0x5500; if (offset == 0x400002/2) return 0x0f00; @@ -957,7 +957,7 @@ READ16_MEMBER(md_rom_sbubl_device::read) SOUL BLADE -------------------------------------------------*/ -READ16_MEMBER(md_rom_soulb_device::read) +uint16_t md_rom_soulb_device::read(offs_t offset) { if (offset == 0x400002/2) return 0x9800; if (offset == 0x400004/2) return 0xc900; @@ -976,7 +976,7 @@ READ16_MEMBER(md_rom_soulb_device::read) #define MD_POKESTAD_ADDR(a) (((offset << 1) | (m_bank << 15)) & (m_rom_size - 1))/2 -READ16_MEMBER(md_rom_pokestad_device::read) +uint16_t md_rom_pokestad_device::read(offs_t offset) { if (offset < 0x100000/2) return m_rom[MD_POKESTAD_ADDR(offset)]; @@ -988,7 +988,7 @@ READ16_MEMBER(md_rom_pokestad_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_pokestad_device::write) +void md_rom_pokestad_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x700000/2 && offset < 0x800000/2) m_bank = data & 0x7f; @@ -998,7 +998,7 @@ WRITE16_MEMBER(md_rom_pokestad_device::write) POKEMON ALT -------------------------------------------------*/ -READ16_MEMBER(md_rom_pokea_device::read_a13) +uint16_t md_rom_pokea_device::read_a13(offs_t offset) { if (offset == 0x00/2) return 0x14; if (offset == 0x02/2) return 0x01; @@ -1010,14 +1010,14 @@ READ16_MEMBER(md_rom_pokea_device::read_a13) REALTEC -------------------------------------------------*/ -READ16_MEMBER(md_rom_realtec_device::read) +uint16_t md_rom_realtec_device::read(offs_t offset) { if (offset < (m_bank_size * 0x20000)) // two banks of same (variable) size at the bottom of the rom return m_rom[MD_ADDR((offset + (m_bank_addr * 0x20000)/2))]; return m_rom[MD_ADDR(((offset & 0x1fff/2) + 0x7e000/2))]; // otherwise it accesses the final 8k of the image } -WRITE16_MEMBER(md_rom_realtec_device::write) +void md_rom_realtec_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset == 0x400000/2) { @@ -1040,7 +1040,7 @@ WRITE16_MEMBER(md_rom_realtec_device::write) RED CLIFF -------------------------------------------------*/ -READ16_MEMBER(md_rom_redcl_device::read) +uint16_t md_rom_redcl_device::read(offs_t offset) { if (offset == 0x400000/2) return 0x55 << 8; if (offset == 0x400004/2) return 0xaa << 8; @@ -1056,7 +1056,7 @@ READ16_MEMBER(md_rom_redcl_device::read) ROCKMAN X3 -------------------------------------------------*/ -READ16_MEMBER(md_rom_rx3_device::read_a13) +uint16_t md_rom_rx3_device::read_a13(offs_t offset) { if (offset == 0) return 0x0c; @@ -1068,7 +1068,7 @@ READ16_MEMBER(md_rom_rx3_device::read_a13) SQUIRREL KING -------------------------------------------------*/ -READ16_MEMBER(md_rom_squir_device::read) +uint16_t md_rom_squir_device::read(offs_t offset) { if ((offset >= 0x400000/2) && (offset < 0x400008/2)) return m_latch; @@ -1080,7 +1080,7 @@ READ16_MEMBER(md_rom_squir_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_squir_device::write) +void md_rom_squir_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x400000/2 && offset < 0x400008/2) m_latch = data; @@ -1090,7 +1090,7 @@ WRITE16_MEMBER(md_rom_squir_device::write) SUPER MARIO BROS -------------------------------------------------*/ -READ16_MEMBER(md_rom_smb_device::read_a13) +uint16_t md_rom_smb_device::read_a13(offs_t offset) { if (offset == 0) return 0x0c; @@ -1102,7 +1102,7 @@ READ16_MEMBER(md_rom_smb_device::read_a13) SUPER MARIO BROS 2 -------------------------------------------------*/ -READ16_MEMBER(md_rom_smb2_device::read_a13) +uint16_t md_rom_smb2_device::read_a13(offs_t offset) { if (offset == 0) return 0x0a; @@ -1114,7 +1114,7 @@ READ16_MEMBER(md_rom_smb2_device::read_a13) SUPER MARIO WORLD 64 -------------------------------------------------*/ -READ16_MEMBER(md_rom_smw64_device::read) +uint16_t md_rom_smw64_device::read(offs_t offset) { // 0x000000-0x0fffff: lower 512KB ROM (up to 0x07ffff) + mirror // 0x600000-0x6fffff: internal hardware (up to 0x67ffff) + mirror @@ -1179,7 +1179,7 @@ READ16_MEMBER(md_rom_smw64_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_smw64_device::write) +void md_rom_smw64_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { // 0x600000-0x6fffff: internal hardware (up to 0x67ffff) + mirror // Namely, @@ -1228,7 +1228,7 @@ WRITE16_MEMBER(md_rom_smw64_device::write) TEKKEN SPECIAL -------------------------------------------------*/ -READ16_MEMBER(md_rom_tekkensp_device::read) +uint16_t md_rom_tekkensp_device::read(offs_t offset) { if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; @@ -1238,7 +1238,7 @@ READ16_MEMBER(md_rom_tekkensp_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_tekkensp_device::write) +void md_rom_tekkensp_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset < 0x400000/2) return; @@ -1274,7 +1274,7 @@ WRITE16_MEMBER(md_rom_tekkensp_device::write) TOP FIGHTER -------------------------------------------------*/ -READ16_MEMBER(md_rom_topf_device::read) +uint16_t md_rom_topf_device::read(offs_t offset) { //cpu #0 (PC=0004CBAE): unmapped program memory word read from 006A35D4 & 00FF -- wants regD7 if (offset == 0x645b44/2) @@ -1329,7 +1329,7 @@ READ16_MEMBER(md_rom_topf_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_topf_device::write) +void md_rom_topf_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x700000/2 && offset < 0x800000/2) { @@ -1354,12 +1354,12 @@ WRITE16_MEMBER(md_rom_topf_device::write) RADICA TV GAMES [to be split...] -------------------------------------------------*/ -READ16_MEMBER(md_rom_radica_device::read) +uint16_t md_rom_radica_device::read(offs_t offset) { return m_rom[(((m_bank * 0x10000) + (offset << 1)) & (m_rom_size - 1))/2]; } -READ16_MEMBER(md_rom_radica_device::read_a13) +uint16_t md_rom_radica_device::read_a13(offs_t offset) { if (offset < 0x80) m_bank = offset & 0x3f; @@ -1377,7 +1377,7 @@ READ16_MEMBER(md_rom_radica_device::read_a13) the end of ROM. -------------------------------------------------*/ -READ16_MEMBER(md_rom_beggarp_device::read) +uint16_t md_rom_beggarp_device::read(offs_t offset) { if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active) return m_nvram[offset & 0x3fff]; @@ -1390,7 +1390,7 @@ READ16_MEMBER(md_rom_beggarp_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_beggarp_device::write) +void md_rom_beggarp_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x0e00/2 && offset < 0x0f00/2) m_mode = BIT(data, 7); @@ -1400,7 +1400,7 @@ WRITE16_MEMBER(md_rom_beggarp_device::write) } // this works the same as in standard SRAM carts -WRITE16_MEMBER(md_rom_beggarp_device::write_a13) +void md_rom_beggarp_device::write_a13(offs_t offset, uint16_t data) { if (offset == 0xf0/2) { @@ -1424,7 +1424,7 @@ WRITE16_MEMBER(md_rom_beggarp_device::write_a13) (i.e. mirror of first 128K) -------------------------------------------------*/ -READ16_MEMBER(md_rom_wukong_device::read) +uint16_t md_rom_wukong_device::read(offs_t offset) { if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active) return m_nvram[offset - m_nvram_start/2]; @@ -1438,7 +1438,7 @@ READ16_MEMBER(md_rom_wukong_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_wukong_device::write) +void md_rom_wukong_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset < 0x100000/2) // it actually writes to 0xe00/2 m_mode = BIT(data, 7); @@ -1448,7 +1448,7 @@ WRITE16_MEMBER(md_rom_wukong_device::write) } // this works the same as in standard SRAM carts -WRITE16_MEMBER(md_rom_wukong_device::write_a13) +void md_rom_wukong_device::write_a13(offs_t offset, uint16_t data) { if (offset == 0xf0/2) { @@ -1474,7 +1474,7 @@ WRITE16_MEMBER(md_rom_wukong_device::write_a13) gives open bus -------------------------------------------------*/ -READ16_MEMBER(md_rom_starodys_device::read) +uint16_t md_rom_starodys_device::read(offs_t offset) { if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active && m_ram_enable) return m_nvram[offset & 0x3fff]; @@ -1494,7 +1494,7 @@ READ16_MEMBER(md_rom_starodys_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_starodys_device::write) +void md_rom_starodys_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= m_nvram_start/2 && offset <= m_nvram_end/2 && m_nvram_active && !m_nvram_readonly && m_ram_enable) m_nvram[offset & 0x3fff] = data; @@ -1536,13 +1536,13 @@ WRITE16_MEMBER(md_rom_starodys_device::write) } -READ16_MEMBER(md_rom_starodys_device::read_a13) +uint16_t md_rom_starodys_device::read_a13(offs_t offset) { return m_base << 4; } // this works the same as in standard SRAM carts -WRITE16_MEMBER(md_rom_starodys_device::write_a13) +void md_rom_starodys_device::write_a13(offs_t offset, uint16_t data) { if (offset == 0xf0/2) { diff --git a/src/devices/bus/megadrive/rom.h b/src/devices/bus/megadrive/rom.h index 8077ad7e0c6..7422ae58bdf 100644 --- a/src/devices/bus/megadrive/rom.h +++ b/src/devices/bus/megadrive/rom.h @@ -21,8 +21,8 @@ public: md_std_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override { if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; else return 0xffff; } - virtual DECLARE_WRITE16_MEMBER(write) override { } + virtual uint16_t read(offs_t offset) override { if (offset < 0x400000/2) return m_rom[MD_ADDR(offset)]; else return 0xffff; } + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override { } protected: md_std_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -40,9 +40,9 @@ public: md_rom_sram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual void write_a13(offs_t offset, uint16_t data) override; }; // ======================> md_rom_fram_device @@ -54,10 +54,10 @@ public: md_rom_fram_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write) override; - virtual DECLARE_READ16_MEMBER(read_a13) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual uint16_t read_a13(offs_t offset) override; + virtual void write_a13(offs_t offset, uint16_t data) override; }; // ======================> md_rom_ssf2_device @@ -69,8 +69,8 @@ public: md_rom_ssf2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write_a13(offs_t offset, uint16_t data) override; protected: // device-level overrides @@ -91,7 +91,7 @@ public: md_rom_cm2in1_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; protected: // device-level overrides @@ -112,8 +112,8 @@ public: md_rom_mcpirate_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write_a13(offs_t offset, uint16_t data) override; protected: // device-level overrides @@ -134,7 +134,7 @@ public: md_rom_bugslife_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read_a13(offs_t offset) override; }; // ======================> md_rom_chinf3_device @@ -146,8 +146,8 @@ public: md_rom_chinf3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -167,7 +167,7 @@ public: md_rom_16mj2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_elfwor_device @@ -179,7 +179,7 @@ public: md_rom_elfwor_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_yasech_device @@ -191,7 +191,7 @@ public: md_rom_yasech_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_kof98_device @@ -203,7 +203,7 @@ public: md_rom_kof98_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_kof99_device @@ -215,7 +215,7 @@ public: md_rom_kof99_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read_a13(offs_t offset) override; }; // ======================> md_rom_lion2_device @@ -227,8 +227,8 @@ public: md_rom_lion2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -248,8 +248,8 @@ public: md_rom_lion3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -270,7 +270,7 @@ public: md_rom_mjlov_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_cjmjclub_device @@ -282,7 +282,7 @@ public: md_rom_cjmjclub_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_pokea_device @@ -294,7 +294,7 @@ public: md_rom_pokea_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read_a13(offs_t offset) override; }; // ======================> md_rom_pokestad_device @@ -306,8 +306,8 @@ public: md_rom_pokestad_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -327,8 +327,8 @@ public: md_rom_realtec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -348,7 +348,7 @@ public: md_rom_redcl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_rx3_device @@ -360,7 +360,7 @@ public: md_rom_rx3_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read_a13(offs_t offset) override; }; // ======================> md_rom_sbubl_device @@ -372,7 +372,7 @@ public: md_rom_sbubl_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_smb_device @@ -384,7 +384,7 @@ public: md_rom_smb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read_a13(offs_t offset) override; }; // ======================> md_rom_smb2_device @@ -396,7 +396,7 @@ public: md_rom_smb2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read_a13(offs_t offset) override; }; // ======================> md_rom_smw64_device @@ -408,8 +408,8 @@ public: md_rom_smw64_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -431,7 +431,7 @@ public: md_rom_smouse_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; @@ -444,7 +444,7 @@ public: md_rom_soulb_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; + virtual uint16_t read(offs_t offset) override; }; // ======================> md_rom_squir_device @@ -456,8 +456,8 @@ public: md_rom_squir_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -477,8 +477,8 @@ public: md_rom_tekkensp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -498,8 +498,8 @@ public: md_rom_topf_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - 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, uint16_t mem_mask = ~0) override; protected: // device-level overrides @@ -520,8 +520,8 @@ public: md_rom_radica_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_READ16_MEMBER(read_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual uint16_t read_a13(offs_t offset) override; protected: // device-level overrides @@ -541,9 +541,9 @@ public: md_rom_beggarp_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual void write_a13(offs_t offset, uint16_t data) override; protected: // device-level overrides @@ -563,9 +563,9 @@ public: md_rom_wukong_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual void write_a13(offs_t offset, uint16_t data) override; protected: // device-level overrides @@ -585,10 +585,10 @@ public: md_rom_starodys_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write) override; - virtual DECLARE_READ16_MEMBER(read_a13) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual uint16_t read_a13(offs_t offset) override; + virtual void write_a13(offs_t offset, uint16_t data) override; protected: // device-level overrides diff --git a/src/devices/bus/megadrive/sk.cpp b/src/devices/bus/megadrive/sk.cpp index c45574ff1a3..43de6e3afd5 100644 --- a/src/devices/bus/megadrive/sk.cpp +++ b/src/devices/bus/megadrive/sk.cpp @@ -48,7 +48,7 @@ void md_rom_sk_device::device_start() mapper specific handlers -------------------------------------------------*/ -READ16_MEMBER(md_rom_sk_device::read) +uint16_t md_rom_sk_device::read(offs_t offset) { if (m_exp->m_cart != nullptr && m_exp->m_cart->get_rom_base() != nullptr && offset >= 0x200000/2 && offset < (0x200000 + m_exp->m_cart->get_rom_size())/2) return m_exp->m_cart->m_rom[offset - 0x200000/2]; @@ -58,7 +58,7 @@ READ16_MEMBER(md_rom_sk_device::read) return 0xffff; } -WRITE16_MEMBER(md_rom_sk_device::write) +void md_rom_sk_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { // should there be anything here? } diff --git a/src/devices/bus/megadrive/sk.h b/src/devices/bus/megadrive/sk.h index 2e115f7674c..cd297c41a7f 100644 --- a/src/devices/bus/megadrive/sk.h +++ b/src/devices/bus/megadrive/sk.h @@ -26,8 +26,8 @@ protected: virtual void device_add_mconfig(machine_config &config) override; // reading and writing - 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, uint16_t mem_mask = ~0) override; private: required_device m_exp; diff --git a/src/devices/bus/megadrive/stm95.cpp b/src/devices/bus/megadrive/stm95.cpp index 4f536766b01..e3fca0bbffe 100644 --- a/src/devices/bus/megadrive/stm95.cpp +++ b/src/devices/bus/megadrive/stm95.cpp @@ -209,7 +209,7 @@ void md_eeprom_stm95_device::device_reset() mapper specific handlers -------------------------------------------------*/ -READ16_MEMBER(md_eeprom_stm95_device::read) +uint16_t md_eeprom_stm95_device::read(offs_t offset) { if (offset == 0x0015e6/2 || offset == 0x0015e8/2) { @@ -236,7 +236,7 @@ READ16_MEMBER(md_eeprom_stm95_device::read) } } -READ16_MEMBER(md_eeprom_stm95_device::read_a13) +uint16_t md_eeprom_stm95_device::read_a13(offs_t offset) { if (offset == 0x0a/2) { @@ -245,7 +245,7 @@ READ16_MEMBER(md_eeprom_stm95_device::read_a13) return 0xffff; } -WRITE16_MEMBER(md_eeprom_stm95_device::write_a13) +void md_eeprom_stm95_device::write_a13(offs_t offset, uint16_t data) { if (offset == 0x00/2) { diff --git a/src/devices/bus/megadrive/stm95.h b/src/devices/bus/megadrive/stm95.h index c1291e1f12f..c04651d742c 100644 --- a/src/devices/bus/megadrive/stm95.h +++ b/src/devices/bus/megadrive/stm95.h @@ -64,9 +64,9 @@ public: md_eeprom_stm95_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_READ16_MEMBER(read_a13) override; - virtual DECLARE_WRITE16_MEMBER(write_a13) override; + virtual uint16_t read(offs_t offset) override; + virtual uint16_t read_a13(offs_t offset) override; + virtual void write_a13(offs_t offset, uint16_t data) override; protected: md_eeprom_stm95_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/megadrive/svp.cpp b/src/devices/bus/megadrive/svp.cpp index 2070b27a9b7..731a1ca7b7a 100644 --- a/src/devices/bus/megadrive/svp.cpp +++ b/src/devices/bus/megadrive/svp.cpp @@ -170,7 +170,7 @@ uint32_t md_rom_svp_device::pm_io(int reg, int write, uint32_t d) return (uint32_t)-1; } -READ16_MEMBER( md_rom_svp_device::read_pm0 ) +uint16_t md_rom_svp_device::read_pm0() { uint32_t d = pm_io(0, 0, 0); if (d != (uint32_t)-1) @@ -180,7 +180,7 @@ READ16_MEMBER( md_rom_svp_device::read_pm0 ) return d; } -WRITE16_MEMBER( md_rom_svp_device::write_pm0 ) +void md_rom_svp_device::write_pm0(uint16_t data) { uint32_t r = pm_io(0, 1, data); if (r != (uint32_t)-1) @@ -188,7 +188,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_pm0 ) m_xst2 = data; // ? } -READ16_MEMBER( md_rom_svp_device::read_pm1 ) +uint16_t md_rom_svp_device::read_pm1() { uint32_t r = pm_io(1, 0, 0); if (r != (uint32_t)-1) @@ -197,7 +197,7 @@ READ16_MEMBER( md_rom_svp_device::read_pm1 ) return 0; } -WRITE16_MEMBER( md_rom_svp_device::write_pm1 ) +void md_rom_svp_device::write_pm1(uint16_t data) { uint32_t r = pm_io(1, 1, data); if (r != (uint32_t)-1) @@ -205,7 +205,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_pm1 ) logerror("svp: PM1 acces in non PM mode?\n"); } -READ16_MEMBER( md_rom_svp_device::read_pm2 ) +uint16_t md_rom_svp_device::read_pm2() { uint32_t r = pm_io(2, 0, 0); if (r != (uint32_t)-1) @@ -214,7 +214,7 @@ READ16_MEMBER( md_rom_svp_device::read_pm2 ) return 0; } -WRITE16_MEMBER( md_rom_svp_device::write_pm2 ) +void md_rom_svp_device::write_pm2(uint16_t data) { uint32_t r = pm_io(2, 1, data); if (r != (uint32_t)-1) @@ -222,7 +222,7 @@ WRITE16_MEMBER( md_rom_svp_device::write_pm2 ) logerror("svp: PM2 acces in non PM mode?\n"); } -READ16_MEMBER( md_rom_svp_device::read_xst ) +uint16_t md_rom_svp_device::read_xst() { uint32_t d = pm_io(3, 0, 0); if (d != (uint32_t)-1) @@ -230,7 +230,7 @@ READ16_MEMBER( md_rom_svp_device::read_xst ) return m_xst; } -WRITE16_MEMBER( md_rom_svp_device::write_xst ) +void md_rom_svp_device::write_xst(uint16_t data) { uint32_t r = pm_io(3, 1, data); if (r != (uint32_t)-1) @@ -239,17 +239,17 @@ WRITE16_MEMBER( md_rom_svp_device::write_xst ) m_xst = data; } -READ16_MEMBER( md_rom_svp_device::read_pm4 ) +uint16_t md_rom_svp_device::read_pm4() { return pm_io(4, 0, 0); } -WRITE16_MEMBER( md_rom_svp_device::write_pm4 ) +void md_rom_svp_device::write_pm4(uint16_t data) { pm_io(4, 1, data); } -READ16_MEMBER( md_rom_svp_device::read_pmc ) +uint16_t md_rom_svp_device::read_pmc() { if (m_emu_status & SSP_PMC_HAVE_ADDR) { @@ -264,7 +264,7 @@ READ16_MEMBER( md_rom_svp_device::read_pmc ) } } -WRITE16_MEMBER( md_rom_svp_device::write_pmc ) +void md_rom_svp_device::write_pmc(uint16_t data) { if (m_emu_status & SSP_PMC_HAVE_ADDR) { @@ -279,24 +279,24 @@ WRITE16_MEMBER( md_rom_svp_device::write_pmc ) } } -READ16_MEMBER( md_rom_svp_device::read_al ) +uint16_t md_rom_svp_device::read_al() { m_emu_status &= ~(SSP_PMC_SET | SSP_PMC_HAVE_ADDR); return 0; } -WRITE16_MEMBER( md_rom_svp_device::write_al ) +void md_rom_svp_device::write_al(uint16_t data) { } -READ16_MEMBER( md_rom_svp_device::rom_read1 ) +uint16_t md_rom_svp_device::rom_read1(offs_t offset) { uint16_t *IRAM = (uint16_t *)m_iram; return IRAM[offset]; } -READ16_MEMBER( md_rom_svp_device::rom_read2 ) +uint16_t md_rom_svp_device::rom_read2(offs_t offset) { return m_rom[offset + 0x800/2]; } @@ -394,7 +394,7 @@ void md_rom_svp_device::device_start() save_item(NAME(m_iram)); } -READ16_MEMBER(md_rom_svp_device::read) +uint16_t md_rom_svp_device::read(offs_t offset) { uint16_t *DRAM = (uint16_t *)m_dram; @@ -425,7 +425,7 @@ READ16_MEMBER(md_rom_svp_device::read) } } -WRITE16_MEMBER(md_rom_svp_device::write) +void md_rom_svp_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset >= 0x300000/2 && offset < 0x320000/2) { @@ -435,7 +435,7 @@ WRITE16_MEMBER(md_rom_svp_device::write) } } -READ16_MEMBER(md_rom_svp_device::read_a15) +uint16_t md_rom_svp_device::read_a15(offs_t offset) { uint32_t d; switch (offset) @@ -450,7 +450,7 @@ READ16_MEMBER(md_rom_svp_device::read_a15) return 0; } -WRITE16_MEMBER(md_rom_svp_device::write_a15) +void md_rom_svp_device::write_a15(offs_t offset, uint16_t data) { switch (offset) { diff --git a/src/devices/bus/megadrive/svp.h b/src/devices/bus/megadrive/svp.h index 40d7e9aab2c..660417d0353 100644 --- a/src/devices/bus/megadrive/svp.h +++ b/src/devices/bus/megadrive/svp.h @@ -30,30 +30,30 @@ protected: virtual void set_bank_to_rom(const char *banktag, uint32_t offset) override; // reading and writing - virtual DECLARE_READ16_MEMBER(read) override; - virtual DECLARE_WRITE16_MEMBER(write) override; - virtual DECLARE_READ16_MEMBER(read_a15) override; - virtual DECLARE_WRITE16_MEMBER(write_a15) override; + virtual uint16_t read(offs_t offset) override; + virtual void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0) override; + virtual uint16_t read_a15(offs_t offset) override; + virtual void write_a15(offs_t offset, uint16_t data) override; virtual int read_test() override; - virtual DECLARE_READ16_MEMBER(rom_read1); - virtual DECLARE_READ16_MEMBER(rom_read2); - - virtual DECLARE_READ16_MEMBER(read_pm0); - virtual DECLARE_READ16_MEMBER(read_pm1); - virtual DECLARE_READ16_MEMBER(read_pm2); - virtual DECLARE_READ16_MEMBER(read_pm4); - virtual DECLARE_READ16_MEMBER(read_xst); - virtual DECLARE_READ16_MEMBER(read_pmc); - virtual DECLARE_READ16_MEMBER(read_al); - virtual DECLARE_WRITE16_MEMBER(write_pm0); - virtual DECLARE_WRITE16_MEMBER(write_pm1); - virtual DECLARE_WRITE16_MEMBER(write_pm2); - virtual DECLARE_WRITE16_MEMBER(write_pm4); - virtual DECLARE_WRITE16_MEMBER(write_xst); - virtual DECLARE_WRITE16_MEMBER(write_pmc); - virtual DECLARE_WRITE16_MEMBER(write_al); + virtual uint16_t rom_read1(offs_t offset); + virtual uint16_t rom_read2(offs_t offset); + + virtual uint16_t read_pm0(); + virtual uint16_t read_pm1(); + virtual uint16_t read_pm2(); + virtual uint16_t read_pm4(); + virtual uint16_t read_xst(); + virtual uint16_t read_pmc(); + virtual uint16_t read_al(); + virtual void write_pm0(uint16_t data); + virtual void write_pm1(uint16_t data); + virtual void write_pm2(uint16_t data); + virtual void write_pm4(uint16_t data); + virtual void write_xst(uint16_t data); + virtual void write_pmc(uint16_t data); + virtual void write_al(uint16_t data); private: required_device m_svp; diff --git a/src/devices/bus/multibus/isbc202.cpp b/src/devices/bus/multibus/isbc202.cpp index fc5b6135664..77efce95e82 100644 --- a/src/devices/bus/multibus/isbc202.cpp +++ b/src/devices/bus/multibus/isbc202.cpp @@ -229,7 +229,7 @@ isbc202_device::~isbc202_device() void isbc202_device::install_io_rw(address_space& space) { - space.install_readwrite_handler(0x78 , 0x7f , read8_delegate(*this , FUNC(isbc202_device::io_r)) , write8_delegate(*this , FUNC(isbc202_device::io_w))); + space.install_readwrite_handler(0x78 , 0x7f , read8m_delegate(*this , FUNC(isbc202_device::io_r)) , write8m_delegate(*this , FUNC(isbc202_device::io_w))); } void isbc202_device::install_mem_rw(address_space& space) @@ -237,7 +237,7 @@ void isbc202_device::install_mem_rw(address_space& space) m_mem_space = &space; } -READ8_MEMBER(isbc202_device::io_r) +uint8_t isbc202_device::io_r(address_space &space, offs_t offset) { uint8_t res = 0; @@ -301,7 +301,7 @@ READ8_MEMBER(isbc202_device::io_r) return res; } -WRITE8_MEMBER(isbc202_device::io_w) +void isbc202_device::io_w(address_space &space, offs_t offset, uint8_t data) { LOG_BUS("IO W @%u=%02x\n" , offset , data); diff --git a/src/devices/bus/multibus/isbc202.h b/src/devices/bus/multibus/isbc202.h index dc471e15224..ae5e6ce8fe9 100644 --- a/src/devices/bus/multibus/isbc202.h +++ b/src/devices/bus/multibus/isbc202.h @@ -32,8 +32,8 @@ public: virtual void install_mem_rw(address_space& space) override; // Access to I/O space by CPU - DECLARE_READ8_MEMBER(io_r); - DECLARE_WRITE8_MEMBER(io_w); + uint8_t io_r(address_space &space, offs_t offset); + void io_w(address_space &space, offs_t offset, uint8_t data); DECLARE_WRITE_LINE_MEMBER(co_w); diff --git a/src/devices/bus/nubus/bootbug.cpp b/src/devices/bus/nubus/bootbug.cpp index 427d35b33b5..eceaf61c9d3 100644 --- a/src/devices/bus/nubus/bootbug.cpp +++ b/src/devices/bus/nubus/bootbug.cpp @@ -102,7 +102,7 @@ void nubus_bootbug_device::device_start() slotspace = get_slotspace(); - nubus().install_device(slotspace, slotspace+0xff, read32_delegate(*this, FUNC(nubus_bootbug_device::dev_r)), write32_delegate(*this, FUNC(nubus_bootbug_device::dev_w))); + nubus().install_device(slotspace, slotspace+0xff, read32sm_delegate(*this, FUNC(nubus_bootbug_device::dev_r)), write32sm_delegate(*this, FUNC(nubus_bootbug_device::dev_w))); } //------------------------------------------------- @@ -113,12 +113,12 @@ void nubus_bootbug_device::device_reset() { } -WRITE32_MEMBER( nubus_bootbug_device::dev_w ) +void nubus_bootbug_device::dev_w(offs_t offset, uint32_t data) { m_uart->ins8250_w(offset, data & 0xff); } -READ32_MEMBER( nubus_bootbug_device::dev_r ) +uint32_t nubus_bootbug_device::dev_r(offs_t offset) { return m_uart->ins8250_r(offset); } diff --git a/src/devices/bus/nubus/bootbug.h b/src/devices/bus/nubus/bootbug.h index 5dced2d119c..735d343eb6c 100644 --- a/src/devices/bus/nubus/bootbug.h +++ b/src/devices/bus/nubus/bootbug.h @@ -36,8 +36,8 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(dev_r); - DECLARE_WRITE32_MEMBER(dev_w); + uint32_t dev_r(offs_t offset); + void dev_w(offs_t offset, uint32_t data); }; // device type definition diff --git a/src/devices/bus/nubus/laserview.cpp b/src/devices/bus/nubus/laserview.cpp index e080f4a1276..2c58b6e8dc3 100644 --- a/src/devices/bus/nubus/laserview.cpp +++ b/src/devices/bus/nubus/laserview.cpp @@ -91,7 +91,7 @@ void nubus_laserview_device::device_start() install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_laserview", &m_vram[0]); install_bank(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, "bank_laserview2", &m_vram[0]); - nubus().install_device(slotspace+0xB0000, slotspace+0xBFFFF, read32_delegate(*this, FUNC(nubus_laserview_device::regs_r)), write32_delegate(*this, FUNC(nubus_laserview_device::regs_w))); + nubus().install_device(slotspace+0xB0000, slotspace+0xBFFFF, read32s_delegate(*this, FUNC(nubus_laserview_device::regs_r)), write32s_delegate(*this, FUNC(nubus_laserview_device::regs_w))); } //------------------------------------------------- @@ -147,7 +147,7 @@ uint32_t nubus_laserview_device::screen_update(screen_device &screen, bitmap_rgb return 0; } -WRITE32_MEMBER( nubus_laserview_device::regs_w ) +void nubus_laserview_device::regs_w(offs_t offset, uint32_t data, uint32_t mem_mask) { // printf("%08x to regs @ %x mask %08x\n", data, offset, mem_mask); @@ -172,7 +172,7 @@ WRITE32_MEMBER( nubus_laserview_device::regs_w ) } -READ32_MEMBER( nubus_laserview_device::regs_r ) +uint32_t nubus_laserview_device::regs_r(offs_t offset, uint32_t mem_mask) { //f (offset != 0x3fc1) printf("Read regs_r @ %x mask %08x\n", offset, mem_mask); diff --git a/src/devices/bus/nubus/laserview.h b/src/devices/bus/nubus/laserview.h index a21a1aeed26..88131ca72ec 100644 --- a/src/devices/bus/nubus/laserview.h +++ b/src/devices/bus/nubus/laserview.h @@ -33,8 +33,8 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(regs_r); - DECLARE_WRITE32_MEMBER(regs_w); + uint32_t regs_r(offs_t offset, uint32_t mem_mask = ~0); + void regs_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus.cpp b/src/devices/bus/nubus/nubus.cpp index 118d7f50f1a..5bb45cb95d5 100644 --- a/src/devices/bus/nubus/nubus.cpp +++ b/src/devices/bus/nubus/nubus.cpp @@ -110,7 +110,7 @@ void nubus_device::add_nubus_card(device_nubus_card_interface *card) m_device_list.append(*card); } -void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, uint32_t mask) +template void nubus_device::install_device(offs_t start, offs_t end, R rhandler, W whandler, uint32_t mask) { int buswidth = m_space->data_width(); switch(buswidth) @@ -126,37 +126,18 @@ void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhand } } -void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask) -{ - int buswidth = m_space->data_width(); - switch(buswidth) - { - case 32: - m_space->install_readwrite_handler(start, end, rhandler, whandler, mask); - break; - case 64: - m_space->install_readwrite_handler(start, end, rhandler, whandler, ((uint64_t)mask<<32)|mask); - break; - default: - fatalerror("NUBUS: Bus width %d not supported\n", buswidth); - } -} - -void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, uint32_t mask) -{ - int buswidth = m_space->data_width(); - switch(buswidth) - { - case 32: - m_space->install_readwrite_handler(start, end, rhandler, whandler, mask); - break; - case 64: - m_space->install_readwrite_handler(start, end, rhandler, whandler, ((uint64_t)mask<<32)|mask); - break; - default: - fatalerror("NUBUS: Bus width %d not supported\n", buswidth); - } -} +template void nubus_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read8s_delegate rhandler, write8s_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read8sm_delegate rhandler, write8sm_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read8smo_delegate rhandler, write8smo_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read16s_delegate rhandler, write16s_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read16sm_delegate rhandler, write16sm_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read16smo_delegate rhandler, write16smo_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read32s_delegate rhandler, write32s_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read32sm_delegate rhandler, write32sm_delegate whandler, uint32_t mask); +template void nubus_device::install_device(offs_t start, offs_t end, read32smo_delegate rhandler, write32smo_delegate whandler, uint32_t mask); void nubus_device::install_readonly_device(offs_t start, offs_t end, read32_delegate rhandler, uint32_t mask) { diff --git a/src/devices/bus/nubus/nubus.h b/src/devices/bus/nubus/nubus.h index 874a37bcf82..bd5bf51c64a 100644 --- a/src/devices/bus/nubus/nubus.h +++ b/src/devices/bus/nubus/nubus.h @@ -71,9 +71,7 @@ public: auto out_irqe_callback() { return m_out_irqe_cb.bind(); } void add_nubus_card(device_nubus_card_interface *card); - void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler, uint32_t mask=0xffffffff); - void install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask=0xffffffff); - void install_device(offs_t start, offs_t end, read32_delegate rhandler, write32_delegate whandler, uint32_t mask=0xffffffff); + template void install_device(offs_t start, offs_t end, R rhandler, W whandler, uint32_t mask=0xffffffff); void install_readonly_device(offs_t start, offs_t end, read32_delegate rhandler, uint32_t mask=0xffffffff); void install_writeonly_device(offs_t start, offs_t end, write32_delegate whandler, uint32_t mask=0xffffffff); void install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data); diff --git a/src/devices/bus/nubus/nubus_48gc.cpp b/src/devices/bus/nubus/nubus_48gc.cpp index f54c98ff3f1..9105414f3e0 100644 --- a/src/devices/bus/nubus/nubus_48gc.cpp +++ b/src/devices/bus/nubus/nubus_48gc.cpp @@ -109,7 +109,7 @@ void jmfb_device::device_start() m_vram.resize(VRAM_SIZE); install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_48gc", &m_vram[0]); - nubus().install_device(slotspace+0x200000, slotspace+0x2003ff, read32_delegate(*this, FUNC(jmfb_device::mac_48gc_r)), write32_delegate(*this, FUNC(jmfb_device::mac_48gc_w))); + nubus().install_device(slotspace+0x200000, slotspace+0x2003ff, read32s_delegate(*this, FUNC(jmfb_device::mac_48gc_r)), write32s_delegate(*this, FUNC(jmfb_device::mac_48gc_w))); m_timer = timer_alloc(0, nullptr); m_screen = nullptr; // can we look this up now? @@ -248,7 +248,7 @@ uint32_t jmfb_device::screen_update(screen_device &screen, bitmap_rgb32 &bitmap, return 0; } -WRITE32_MEMBER( jmfb_device::mac_48gc_w ) +void jmfb_device::mac_48gc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_registers[offset&0xff]); @@ -343,7 +343,7 @@ WRITE32_MEMBER( jmfb_device::mac_48gc_w ) } } -READ32_MEMBER( jmfb_device::mac_48gc_r ) +uint32_t jmfb_device::mac_48gc_r(offs_t offset, uint32_t mem_mask) { // printf("%s 48gc_r: @ %x, mask %08x\n", machine().describe_context().c_str(), offset, mem_mask); diff --git a/src/devices/bus/nubus/nubus_48gc.h b/src/devices/bus/nubus/nubus_48gc.h index 3c73befdaea..f18df117f84 100644 --- a/src/devices/bus/nubus/nubus_48gc.h +++ b/src/devices/bus/nubus/nubus_48gc.h @@ -32,8 +32,8 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(mac_48gc_r); - DECLARE_WRITE32_MEMBER(mac_48gc_w); + uint32_t mac_48gc_r(offs_t offset, uint32_t mem_mask = ~0); + void mac_48gc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_asntmc3b.cpp b/src/devices/bus/nubus/nubus_asntmc3b.cpp index f68328ef45f..c3692ad441c 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.cpp +++ b/src/devices/bus/nubus/nubus_asntmc3b.cpp @@ -111,10 +111,10 @@ void nubus_mac8390_device::device_start() // TODO: move 24-bit mirroring down into nubus.c uint32_t ofs_24bit = slotno()<<20; - nubus().install_device(slotspace+0xd0000, slotspace+0xdffff, read8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w))); - nubus().install_device(slotspace+0xe0000, slotspace+0xe003f, read32_delegate(*this, FUNC(nubus_mac8390_device::en_r)), write32_delegate(*this, FUNC(nubus_mac8390_device::en_w))); - nubus().install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w))); - nubus().install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32_delegate(*this, FUNC(nubus_mac8390_device::en_r)), write32_delegate(*this, FUNC(nubus_mac8390_device::en_w))); + nubus().install_device(slotspace+0xd0000, slotspace+0xdffff, read8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w))); + nubus().install_device(slotspace+0xe0000, slotspace+0xe003f, read32s_delegate(*this, FUNC(nubus_mac8390_device::en_r)), write32s_delegate(*this, FUNC(nubus_mac8390_device::en_w))); + nubus().install_device(slotspace+0xd0000+ofs_24bit, slotspace+0xdffff+ofs_24bit, read8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_r)), write8sm_delegate(*this, FUNC(nubus_mac8390_device::asntm3b_ram_w))); + nubus().install_device(slotspace+0xe0000+ofs_24bit, slotspace+0xe003f+ofs_24bit, read32s_delegate(*this, FUNC(nubus_mac8390_device::en_r)), write32s_delegate(*this, FUNC(nubus_mac8390_device::en_w))); } //------------------------------------------------- @@ -127,19 +127,19 @@ void nubus_mac8390_device::device_reset() memcpy(m_prom, m_dp83902->get_mac(), 6); } -WRITE8_MEMBER( nubus_mac8390_device::asntm3b_ram_w ) +void nubus_mac8390_device::asntm3b_ram_w(offs_t offset, uint8_t data) { // printf("MC3NB: CPU wrote %02x to RAM @ %x\n", data, offset); m_ram[offset] = data; } -READ8_MEMBER( nubus_mac8390_device::asntm3b_ram_r ) +uint8_t nubus_mac8390_device::asntm3b_ram_r(offs_t offset) { // printf("MC3NB: CPU read %02x @ RAM %x\n", m_ram[offset], offset); return m_ram[offset]; } -WRITE32_MEMBER( nubus_mac8390_device::en_w ) +void nubus_mac8390_device::en_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if (mem_mask == 0xff000000) { @@ -156,7 +156,7 @@ WRITE32_MEMBER( nubus_mac8390_device::en_w ) } } -READ32_MEMBER( nubus_mac8390_device::en_r ) +uint32_t nubus_mac8390_device::en_r(offs_t offset, uint32_t mem_mask) { if (mem_mask == 0xff000000) { diff --git a/src/devices/bus/nubus/nubus_asntmc3b.h b/src/devices/bus/nubus/nubus_asntmc3b.h index 177cf30900b..20b3cbe0190 100644 --- a/src/devices/bus/nubus/nubus_asntmc3b.h +++ b/src/devices/bus/nubus/nubus_asntmc3b.h @@ -30,10 +30,10 @@ protected: virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - DECLARE_READ8_MEMBER(asntm3b_ram_r); - DECLARE_WRITE8_MEMBER(asntm3b_ram_w); - DECLARE_READ32_MEMBER(en_r); - DECLARE_WRITE32_MEMBER(en_w); + uint8_t asntm3b_ram_r(offs_t offset); + void asntm3b_ram_w(offs_t offset, uint8_t data); + uint32_t en_r(offs_t offset, uint32_t mem_mask = ~0); + void en_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); required_device m_dp83902; diff --git a/src/devices/bus/nubus/nubus_cb264.cpp b/src/devices/bus/nubus/nubus_cb264.cpp index 99d67081ecd..db964ec2055 100644 --- a/src/devices/bus/nubus/nubus_cb264.cpp +++ b/src/devices/bus/nubus/nubus_cb264.cpp @@ -95,8 +95,8 @@ void nubus_cb264_device::device_start() m_vram.resize(VRAM_SIZE); install_bank(slotspace, slotspace+VRAM_SIZE-1, "bank_cb264", &m_vram[0]); - nubus().install_device(slotspace+0xff6000, slotspace+0xff60ff, read32_delegate(*this, FUNC(nubus_cb264_device::cb264_r)), write32_delegate(*this, FUNC(nubus_cb264_device::cb264_w))); - nubus().install_device(slotspace+0xff7000, slotspace+0xff70ff, read32_delegate(*this, FUNC(nubus_cb264_device::cb264_ramdac_r)), write32_delegate(*this, FUNC(nubus_cb264_device::cb264_ramdac_w))); + nubus().install_device(slotspace+0xff6000, slotspace+0xff60ff, read32s_delegate(*this, FUNC(nubus_cb264_device::cb264_r)), write32s_delegate(*this, FUNC(nubus_cb264_device::cb264_w))); + nubus().install_device(slotspace+0xff7000, slotspace+0xff70ff, read32sm_delegate(*this, FUNC(nubus_cb264_device::cb264_ramdac_r)), write32sm_delegate(*this, FUNC(nubus_cb264_device::cb264_ramdac_w))); } //------------------------------------------------- @@ -221,7 +221,7 @@ uint32_t nubus_cb264_device::screen_update(screen_device &screen, bitmap_rgb32 & return 0; } -WRITE32_MEMBER( nubus_cb264_device::cb264_w ) +void nubus_cb264_device::cb264_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -243,7 +243,7 @@ WRITE32_MEMBER( nubus_cb264_device::cb264_w ) } } -READ32_MEMBER( nubus_cb264_device::cb264_r ) +uint32_t nubus_cb264_device::cb264_r(offs_t offset, uint32_t mem_mask) { switch (offset) { @@ -263,7 +263,7 @@ READ32_MEMBER( nubus_cb264_device::cb264_r ) return 0; } -WRITE32_MEMBER( nubus_cb264_device::cb264_ramdac_w ) +void nubus_cb264_device::cb264_ramdac_w(offs_t offset, uint32_t data) { switch (offset) { @@ -289,7 +289,7 @@ WRITE32_MEMBER( nubus_cb264_device::cb264_ramdac_w ) } } -READ32_MEMBER( nubus_cb264_device::cb264_ramdac_r ) +uint32_t nubus_cb264_device::cb264_ramdac_r(offs_t offset) { return 0; } diff --git a/src/devices/bus/nubus/nubus_cb264.h b/src/devices/bus/nubus/nubus_cb264.h index 07719f8ccae..d587fc16780 100644 --- a/src/devices/bus/nubus/nubus_cb264.h +++ b/src/devices/bus/nubus/nubus_cb264.h @@ -32,10 +32,10 @@ protected: virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - DECLARE_READ32_MEMBER(cb264_r); - DECLARE_WRITE32_MEMBER(cb264_w); - DECLARE_READ32_MEMBER(cb264_ramdac_r); - DECLARE_WRITE32_MEMBER(cb264_ramdac_w); + uint32_t cb264_r(offs_t offset, uint32_t mem_mask = ~0); + void cb264_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t cb264_ramdac_r(offs_t offset); + void cb264_ramdac_w(offs_t offset, uint32_t data); private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_image.cpp b/src/devices/bus/nubus/nubus_image.cpp index 80324a287bc..434d6bd2ded 100644 --- a/src/devices/bus/nubus/nubus_image.cpp +++ b/src/devices/bus/nubus/nubus_image.cpp @@ -180,13 +180,13 @@ void nubus_image_device::device_start() // printf("[image %p] slotspace = %x, super = %x\n", this, slotspace, superslotspace); - nubus().install_device(slotspace, slotspace+3, read32_delegate(*this, FUNC(nubus_image_device::image_r)), write32_delegate(*this, FUNC(nubus_image_device::image_w))); - nubus().install_device(slotspace+4, slotspace+7, read32_delegate(*this, FUNC(nubus_image_device::image_status_r)), write32_delegate(*this, FUNC(nubus_image_device::image_status_w))); - nubus().install_device(slotspace+8, slotspace+11, read32_delegate(*this, FUNC(nubus_image_device::file_cmd_r)), write32_delegate(*this, FUNC(nubus_image_device::file_cmd_w))); - nubus().install_device(slotspace+12, slotspace+15, read32_delegate(*this, FUNC(nubus_image_device::file_data_r)), write32_delegate(*this, FUNC(nubus_image_device::file_data_w))); - nubus().install_device(slotspace+16, slotspace+19, read32_delegate(*this, FUNC(nubus_image_device::file_len_r)), write32_delegate(*this, FUNC(nubus_image_device::file_len_w))); - nubus().install_device(slotspace+20, slotspace+147, read32_delegate(*this, FUNC(nubus_image_device::file_name_r)), write32_delegate(*this, FUNC(nubus_image_device::file_name_w))); - nubus().install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32_delegate(*this, FUNC(nubus_image_device::image_super_r)), write32_delegate(*this, FUNC(nubus_image_device::image_super_w))); + nubus().install_device(slotspace, slotspace+3, read32smo_delegate(*this, FUNC(nubus_image_device::image_r)), write32smo_delegate(*this, FUNC(nubus_image_device::image_w))); + nubus().install_device(slotspace+4, slotspace+7, read32smo_delegate(*this, FUNC(nubus_image_device::image_status_r)), write32smo_delegate(*this, FUNC(nubus_image_device::image_status_w))); + nubus().install_device(slotspace+8, slotspace+11, read32smo_delegate(*this, FUNC(nubus_image_device::file_cmd_r)), write32smo_delegate(*this, FUNC(nubus_image_device::file_cmd_w))); + nubus().install_device(slotspace+12, slotspace+15, read32smo_delegate(*this, FUNC(nubus_image_device::file_data_r)), write32smo_delegate(*this, FUNC(nubus_image_device::file_data_w))); + nubus().install_device(slotspace+16, slotspace+19, read32smo_delegate(*this, FUNC(nubus_image_device::file_len_r)), write32smo_delegate(*this, FUNC(nubus_image_device::file_len_w))); + nubus().install_device(slotspace+20, slotspace+147, read32sm_delegate(*this, FUNC(nubus_image_device::file_name_r)), write32sm_delegate(*this, FUNC(nubus_image_device::file_name_w))); + nubus().install_device(superslotspace, superslotspace+((256*1024*1024)-1), read32s_delegate(*this, FUNC(nubus_image_device::image_super_r)), write32s_delegate(*this, FUNC(nubus_image_device::image_super_w))); m_image = subdevice(IMAGE_DISK0_TAG); @@ -204,12 +204,12 @@ void nubus_image_device::device_reset() { } -WRITE32_MEMBER( nubus_image_device::image_status_w ) +void nubus_image_device::image_status_w(uint32_t data) { m_image->m_ejected = true; } -READ32_MEMBER( nubus_image_device::image_status_r ) +uint32_t nubus_image_device::image_status_r() { if(m_image->m_ejected) { return 0; @@ -221,16 +221,16 @@ READ32_MEMBER( nubus_image_device::image_status_r ) return 0; } -WRITE32_MEMBER( nubus_image_device::image_w ) +void nubus_image_device::image_w(uint32_t data) { } -READ32_MEMBER( nubus_image_device::image_r ) +uint32_t nubus_image_device::image_r() { return m_image->m_size; } -WRITE32_MEMBER( nubus_image_device::image_super_w ) +void nubus_image_device::image_super_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint32_t *image = (uint32_t*)m_image->m_data.get(); data = ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24); @@ -239,14 +239,14 @@ WRITE32_MEMBER( nubus_image_device::image_super_w ) COMBINE_DATA(&image[offset]); } -READ32_MEMBER( nubus_image_device::image_super_r ) +uint32_t nubus_image_device::image_super_r(offs_t offset, uint32_t mem_mask) { uint32_t *image = (uint32_t*)m_image->m_data.get(); uint32_t data = image[offset]; return ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24); } -WRITE32_MEMBER( nubus_image_device::file_cmd_w ) +void nubus_image_device::file_cmd_w(uint32_t data) { // data = ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24); filectx.curcmd = data; @@ -305,12 +305,12 @@ WRITE32_MEMBER( nubus_image_device::file_cmd_w ) } } -READ32_MEMBER( nubus_image_device::file_cmd_r ) +uint32_t nubus_image_device::file_cmd_r() { return 0; } -WRITE32_MEMBER( nubus_image_device::file_data_w ) +void nubus_image_device::file_data_w(uint32_t data) { std::uint32_t count = 4; std::uint32_t actualcount = 0; @@ -328,7 +328,7 @@ WRITE32_MEMBER( nubus_image_device::file_data_w ) } } -READ32_MEMBER( nubus_image_device::file_data_r ) +uint32_t nubus_image_device::file_data_r() { if(filectx.fd) { std::uint32_t ret; @@ -343,23 +343,23 @@ READ32_MEMBER( nubus_image_device::file_data_r ) return 0; } -WRITE32_MEMBER( nubus_image_device::file_len_w ) +void nubus_image_device::file_len_w(uint32_t data) { data = ((data & 0xff) << 24) | ((data & 0xff00) << 8) | ((data & 0xff0000) >> 8) | ((data & 0xff000000) >> 24); filectx.filelen = big_endianize_int32(data); } -READ32_MEMBER( nubus_image_device::file_len_r ) +uint32_t nubus_image_device::file_len_r() { return filectx.filelen; } -WRITE32_MEMBER( nubus_image_device::file_name_w ) +void nubus_image_device::file_name_w(offs_t offset, uint32_t data) { ((uint32_t*)(filectx.filename))[offset] = big_endianize_int32(data); } -READ32_MEMBER( nubus_image_device::file_name_r ) +uint32_t nubus_image_device::file_name_r(offs_t offset) { uint32_t ret; ret = big_endianize_int32(((uint32_t*)(filectx.filename))[offset]); diff --git a/src/devices/bus/nubus/nubus_image.h b/src/devices/bus/nubus/nubus_image.h index b2185f14d0f..9ead3fd1a53 100644 --- a/src/devices/bus/nubus/nubus_image.h +++ b/src/devices/bus/nubus/nubus_image.h @@ -56,20 +56,20 @@ protected: virtual void device_add_mconfig(machine_config &config) override; virtual const tiny_rom_entry *device_rom_region() const override; - DECLARE_READ32_MEMBER(image_status_r); - DECLARE_WRITE32_MEMBER(image_status_w); - DECLARE_READ32_MEMBER(image_r); - DECLARE_WRITE32_MEMBER(image_w); - DECLARE_READ32_MEMBER(image_super_r); - DECLARE_WRITE32_MEMBER(image_super_w); - DECLARE_READ32_MEMBER(file_cmd_r); - DECLARE_WRITE32_MEMBER(file_cmd_w); - DECLARE_READ32_MEMBER(file_data_r); - DECLARE_WRITE32_MEMBER(file_data_w); - DECLARE_READ32_MEMBER(file_len_r); - DECLARE_WRITE32_MEMBER(file_len_w); - DECLARE_READ32_MEMBER(file_name_r); - DECLARE_WRITE32_MEMBER(file_name_w); + uint32_t image_status_r(); + void image_status_w(uint32_t data); + uint32_t image_r(); + void image_w(uint32_t data); + uint32_t image_super_r(offs_t offset, uint32_t mem_mask = ~0); + void image_super_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t file_cmd_r(); + void file_cmd_w(uint32_t data); + uint32_t file_data_r(); + void file_data_w(uint32_t data); + uint32_t file_len_r(); + void file_len_w(uint32_t data); + uint32_t file_name_r(offs_t offset); + void file_name_w(offs_t offset, uint32_t data); messimg_disk_image_device *m_image; nbfilectx filectx; diff --git a/src/devices/bus/nubus/nubus_m2hires.cpp b/src/devices/bus/nubus/nubus_m2hires.cpp index 7ba4efe9b30..851537685d2 100644 --- a/src/devices/bus/nubus/nubus_m2hires.cpp +++ b/src/devices/bus/nubus/nubus_m2hires.cpp @@ -93,9 +93,9 @@ void nubus_m2hires_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_m2hires_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2hires_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_m2hires_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2hires_device::vram_w))); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_m2hires_device::m2hires_r)), write32_delegate(*this, FUNC(nubus_m2hires_device::m2hires_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_m2hires_device::vram_r)), write32s_delegate(*this, FUNC(nubus_m2hires_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32s_delegate(*this, FUNC(nubus_m2hires_device::vram_r)), write32s_delegate(*this, FUNC(nubus_m2hires_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32s_delegate(*this, FUNC(nubus_m2hires_device::m2hires_r)), write32s_delegate(*this, FUNC(nubus_m2hires_device::m2hires_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -215,7 +215,7 @@ uint32_t nubus_m2hires_device::screen_update(screen_device &screen, bitmap_rgb32 return 0; } -WRITE32_MEMBER( nubus_m2hires_device::m2hires_w ) +void nubus_m2hires_device::m2hires_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; @@ -278,7 +278,7 @@ WRITE32_MEMBER( nubus_m2hires_device::m2hires_w ) } } -READ32_MEMBER( nubus_m2hires_device::m2hires_r ) +uint32_t nubus_m2hires_device::m2hires_r(offs_t offset, uint32_t mem_mask) { if (offset == 0x10010/4) { @@ -293,13 +293,13 @@ READ32_MEMBER( nubus_m2hires_device::m2hires_r ) return 0; } -WRITE32_MEMBER( nubus_m2hires_device::vram_w ) +void nubus_m2hires_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_m2hires_device::vram_r ) +uint32_t nubus_m2hires_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset] ^ 0xffffffff; } diff --git a/src/devices/bus/nubus/nubus_m2hires.h b/src/devices/bus/nubus/nubus_m2hires.h index 339cf8ed00f..0837634a9ae 100644 --- a/src/devices/bus/nubus/nubus_m2hires.h +++ b/src/devices/bus/nubus/nubus_m2hires.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(m2hires_r); - DECLARE_WRITE32_MEMBER(m2hires_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t m2hires_r(offs_t offset, uint32_t mem_mask = ~0); + void m2hires_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_m2video.cpp b/src/devices/bus/nubus/nubus_m2video.cpp index ea515895cb3..f557d7631b0 100644 --- a/src/devices/bus/nubus/nubus_m2video.cpp +++ b/src/devices/bus/nubus/nubus_m2video.cpp @@ -95,9 +95,9 @@ void nubus_m2video_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_m2video_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2video_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_m2video_device::vram_r)), write32_delegate(*this, FUNC(nubus_m2video_device::vram_w))); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_m2video_device::m2video_r)), write32_delegate(*this, FUNC(nubus_m2video_device::m2video_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_m2video_device::vram_r)), write32s_delegate(*this, FUNC(nubus_m2video_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32s_delegate(*this, FUNC(nubus_m2video_device::vram_r)), write32s_delegate(*this, FUNC(nubus_m2video_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32s_delegate(*this, FUNC(nubus_m2video_device::m2video_r)), write32s_delegate(*this, FUNC(nubus_m2video_device::m2video_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -217,7 +217,7 @@ uint32_t nubus_m2video_device::screen_update(screen_device &screen, bitmap_rgb32 return 0; } -WRITE32_MEMBER( nubus_m2video_device::m2video_w ) +void nubus_m2video_device::m2video_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; switch (offset) @@ -279,7 +279,7 @@ WRITE32_MEMBER( nubus_m2video_device::m2video_w ) } } -READ32_MEMBER( nubus_m2video_device::m2video_r ) +uint32_t nubus_m2video_device::m2video_r(offs_t offset, uint32_t mem_mask) { if (offset == 0x50000/4) // bit 0 is VBL status { @@ -294,13 +294,13 @@ READ32_MEMBER( nubus_m2video_device::m2video_r ) return 0; } -WRITE32_MEMBER( nubus_m2video_device::vram_w ) +void nubus_m2video_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_m2video_device::vram_r ) +uint32_t nubus_m2video_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset] ^ 0xffffffff; } diff --git a/src/devices/bus/nubus/nubus_m2video.h b/src/devices/bus/nubus/nubus_m2video.h index 4c4716cdd4f..9eab1258734 100644 --- a/src/devices/bus/nubus/nubus_m2video.h +++ b/src/devices/bus/nubus/nubus_m2video.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(m2video_r); - DECLARE_WRITE32_MEMBER(m2video_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t m2video_r(offs_t offset, uint32_t mem_mask = ~0); + void m2video_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_radiustpd.cpp b/src/devices/bus/nubus/nubus_radiustpd.cpp index 3f1ccfc9146..f6d152be059 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.cpp +++ b/src/devices/bus/nubus/nubus_radiustpd.cpp @@ -94,10 +94,10 @@ void nubus_radiustpd_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_radiustpd_device::vram_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_radiustpd_device::vram_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::vram_w))); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_w))); - nubus().install_device(slotspace+0x980000, slotspace+0x9effff, read32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_r)), write32_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_radiustpd_device::vram_r)), write32s_delegate(*this, FUNC(nubus_radiustpd_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32s_delegate(*this, FUNC(nubus_radiustpd_device::vram_r)), write32s_delegate(*this, FUNC(nubus_radiustpd_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32s_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_r)), write32s_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_w))); + nubus().install_device(slotspace+0x980000, slotspace+0x9effff, read32s_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_r)), write32s_delegate(*this, FUNC(nubus_radiustpd_device::radiustpd_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -166,12 +166,12 @@ uint32_t nubus_radiustpd_device::screen_update(screen_device &screen, bitmap_rgb return 0; } -WRITE32_MEMBER( nubus_radiustpd_device::radiustpd_w ) +void nubus_radiustpd_device::radiustpd_w(offs_t offset, uint32_t data, uint32_t mem_mask) { // printf("TPD: write %08x to %x, mask %08x\n", data, offset, mem_mask); } -READ32_MEMBER( nubus_radiustpd_device::radiustpd_r ) +uint32_t nubus_radiustpd_device::radiustpd_r(offs_t offset, uint32_t mem_mask) { // printf("TPD: read @ %x, mask %08x\n", offset, mem_mask); @@ -194,13 +194,13 @@ READ32_MEMBER( nubus_radiustpd_device::radiustpd_r ) return 0; } -WRITE32_MEMBER( nubus_radiustpd_device::vram_w ) +void nubus_radiustpd_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_radiustpd_device::vram_r ) +uint32_t nubus_radiustpd_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset] ^ 0xffffffff; } diff --git a/src/devices/bus/nubus/nubus_radiustpd.h b/src/devices/bus/nubus/nubus_radiustpd.h index 20400277f1a..97ddb25f29a 100644 --- a/src/devices/bus/nubus/nubus_radiustpd.h +++ b/src/devices/bus/nubus/nubus_radiustpd.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(radiustpd_r); - DECLARE_WRITE32_MEMBER(radiustpd_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t radiustpd_r(offs_t offset, uint32_t mem_mask = ~0); + void radiustpd_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_spec8.cpp b/src/devices/bus/nubus/nubus_spec8.cpp index 00f5481aee8..b7a29b6f537 100644 --- a/src/devices/bus/nubus/nubus_spec8.cpp +++ b/src/devices/bus/nubus/nubus_spec8.cpp @@ -97,9 +97,9 @@ void nubus_spec8s3_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_spec8s3_device::vram_r)), write32_delegate(*this, FUNC(nubus_spec8s3_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_spec8s3_device::vram_r)), write32_delegate(*this, FUNC(nubus_spec8s3_device::vram_w))); - nubus().install_device(slotspace+0xd0000, slotspace+0xfffff, read32_delegate(*this, FUNC(nubus_spec8s3_device::spec8s3_r)), write32_delegate(*this, FUNC(nubus_spec8s3_device::spec8s3_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_spec8s3_device::vram_r)), write32s_delegate(*this, FUNC(nubus_spec8s3_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32s_delegate(*this, FUNC(nubus_spec8s3_device::vram_r)), write32s_delegate(*this, FUNC(nubus_spec8s3_device::vram_w))); + nubus().install_device(slotspace+0xd0000, slotspace+0xfffff, read32s_delegate(*this, FUNC(nubus_spec8s3_device::spec8s3_r)), write32s_delegate(*this, FUNC(nubus_spec8s3_device::spec8s3_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(767, 0), 0); @@ -222,7 +222,7 @@ uint32_t nubus_spec8s3_device::screen_update(screen_device &screen, bitmap_rgb32 return 0; } -WRITE32_MEMBER( nubus_spec8s3_device::spec8s3_w ) +void nubus_spec8s3_device::spec8s3_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -308,7 +308,7 @@ WRITE32_MEMBER( nubus_spec8s3_device::spec8s3_w ) } } -READ32_MEMBER( nubus_spec8s3_device::spec8s3_r ) +uint32_t nubus_spec8s3_device::spec8s3_r(offs_t offset, uint32_t mem_mask) { switch (offset) { @@ -337,13 +337,13 @@ READ32_MEMBER( nubus_spec8s3_device::spec8s3_r ) return 0; } -WRITE32_MEMBER( nubus_spec8s3_device::vram_w ) +void nubus_spec8s3_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_spec8s3_device::vram_r ) +uint32_t nubus_spec8s3_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset] ^ 0xffffffff; } diff --git a/src/devices/bus/nubus/nubus_spec8.h b/src/devices/bus/nubus/nubus_spec8.h index 41cb94432d1..a7085c60f05 100644 --- a/src/devices/bus/nubus/nubus_spec8.h +++ b/src/devices/bus/nubus/nubus_spec8.h @@ -35,10 +35,10 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - DECLARE_READ32_MEMBER(spec8s3_r); - DECLARE_WRITE32_MEMBER(spec8s3_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t spec8s3_r(offs_t offset, uint32_t mem_mask = ~0); + void spec8s3_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_specpdq.cpp b/src/devices/bus/nubus/nubus_specpdq.cpp index b3d85466ee5..891defaa336 100644 --- a/src/devices/bus/nubus/nubus_specpdq.cpp +++ b/src/devices/bus/nubus/nubus_specpdq.cpp @@ -114,8 +114,8 @@ void nubus_specpdq_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_specpdq_device::vram_r)), write32_delegate(*this, FUNC(nubus_specpdq_device::vram_w))); - nubus().install_device(slotspace+0x400000, slotspace+0xfbffff, read32_delegate(*this, FUNC(nubus_specpdq_device::specpdq_r)), write32_delegate(*this, FUNC(nubus_specpdq_device::specpdq_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_specpdq_device::vram_r)), write32s_delegate(*this, FUNC(nubus_specpdq_device::vram_w))); + nubus().install_device(slotspace+0x400000, slotspace+0xfbffff, read32s_delegate(*this, FUNC(nubus_specpdq_device::specpdq_r)), write32s_delegate(*this, FUNC(nubus_specpdq_device::specpdq_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(843, 0), 0); @@ -236,7 +236,7 @@ uint32_t nubus_specpdq_device::screen_update(screen_device &screen, bitmap_rgb32 return 0; } -WRITE32_MEMBER( nubus_specpdq_device::specpdq_w ) +void nubus_specpdq_device::specpdq_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if (offset >= 0xc0000 && offset < 0x100000) { @@ -489,7 +489,7 @@ WRITE32_MEMBER( nubus_specpdq_device::specpdq_w ) } } -READ32_MEMBER( nubus_specpdq_device::specpdq_r ) +uint32_t nubus_specpdq_device::specpdq_r(offs_t offset, uint32_t mem_mask) { // if (offset != 0xc005c && offset != 0xc005e) logerror("specpdq_r: @ %x (mask %08x %s)\n", offset, mem_mask, machine().describe_context()); @@ -501,13 +501,13 @@ READ32_MEMBER( nubus_specpdq_device::specpdq_r ) return 0; } -WRITE32_MEMBER( nubus_specpdq_device::vram_w ) +void nubus_specpdq_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_specpdq_device::vram_r ) +uint32_t nubus_specpdq_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset] ^ 0xffffffff; } diff --git a/src/devices/bus/nubus/nubus_specpdq.h b/src/devices/bus/nubus/nubus_specpdq.h index 448b13d4957..372e4beab08 100644 --- a/src/devices/bus/nubus/nubus_specpdq.h +++ b/src/devices/bus/nubus/nubus_specpdq.h @@ -36,10 +36,10 @@ protected: virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override; private: - DECLARE_READ32_MEMBER(specpdq_r); - DECLARE_WRITE32_MEMBER(specpdq_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t specpdq_r(offs_t offset, uint32_t mem_mask = ~0); + void specpdq_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_vikbw.cpp b/src/devices/bus/nubus/nubus_vikbw.cpp index 875ddf676f4..1c25795cd45 100644 --- a/src/devices/bus/nubus/nubus_vikbw.cpp +++ b/src/devices/bus/nubus/nubus_vikbw.cpp @@ -92,8 +92,8 @@ void nubus_vikbw_device::device_start() install_bank(slotspace+0x40000, slotspace+0x40000+VRAM_SIZE-1, "bank_vikbw", &m_vram[0]); install_bank(slotspace+0x940000, slotspace+0x940000+VRAM_SIZE-1, "bank_vikbw2", &m_vram[0]); - nubus().install_device(slotspace, slotspace+3, read32_delegate(*this, FUNC(nubus_vikbw_device::viking_enable_r)), write32_delegate(*this, FUNC(nubus_vikbw_device::viking_disable_w))); - nubus().install_device(slotspace+0x80000, slotspace+0x80000+3, read32_delegate(*this, FUNC(nubus_vikbw_device::viking_ack_r)), write32_delegate(*this, FUNC(nubus_vikbw_device::viking_ack_w))); + nubus().install_device(slotspace, slotspace+3, read32smo_delegate(*this, FUNC(nubus_vikbw_device::viking_enable_r)), write32smo_delegate(*this, FUNC(nubus_vikbw_device::viking_disable_w))); + nubus().install_device(slotspace+0x80000, slotspace+0x80000+3, read32smo_delegate(*this, FUNC(nubus_vikbw_device::viking_ack_r)), write32smo_delegate(*this, FUNC(nubus_vikbw_device::viking_ack_w))); } //------------------------------------------------- @@ -147,22 +147,22 @@ uint32_t nubus_vikbw_device::screen_update(screen_device &screen, bitmap_rgb32 & return 0; } -WRITE32_MEMBER( nubus_vikbw_device::viking_ack_w ) +void nubus_vikbw_device::viking_ack_w(uint32_t data) { lower_slot_irq(); } -READ32_MEMBER( nubus_vikbw_device::viking_ack_r ) +uint32_t nubus_vikbw_device::viking_ack_r() { return 0; } -WRITE32_MEMBER( nubus_vikbw_device::viking_disable_w ) +void nubus_vikbw_device::viking_disable_w(uint32_t data) { m_vbl_disable = 1; } -READ32_MEMBER( nubus_vikbw_device::viking_enable_r ) +uint32_t nubus_vikbw_device::viking_enable_r() { m_vbl_disable = 0; return 0; diff --git a/src/devices/bus/nubus/nubus_vikbw.h b/src/devices/bus/nubus/nubus_vikbw.h index 94ce5f1df17..a2a28a510f2 100644 --- a/src/devices/bus/nubus/nubus_vikbw.h +++ b/src/devices/bus/nubus/nubus_vikbw.h @@ -33,10 +33,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(viking_ack_r); - DECLARE_WRITE32_MEMBER(viking_ack_w); - DECLARE_READ32_MEMBER(viking_enable_r); - DECLARE_WRITE32_MEMBER(viking_disable_w); + uint32_t viking_ack_r(); + void viking_ack_w(uint32_t data); + uint32_t viking_enable_r(); + void viking_disable_w(uint32_t data); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/nubus_wsportrait.cpp b/src/devices/bus/nubus/nubus_wsportrait.cpp index fd85e99b99b..2f56488bf48 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.cpp +++ b/src/devices/bus/nubus/nubus_wsportrait.cpp @@ -96,9 +96,9 @@ void nubus_wsportrait_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_wsportrait_device::vram_r)), write32_delegate(*this, FUNC(nubus_wsportrait_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_wsportrait_device::vram_r)), write32_delegate(*this, FUNC(nubus_wsportrait_device::vram_w))); - nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32_delegate(*this, FUNC(nubus_wsportrait_device::wsportrait_r)), write32_delegate(*this, FUNC(nubus_wsportrait_device::wsportrait_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_wsportrait_device::vram_r)), write32s_delegate(*this, FUNC(nubus_wsportrait_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+0x900000+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_wsportrait_device::vram_r)), write32s_delegate(*this, FUNC(nubus_wsportrait_device::vram_w))); + nubus().install_device(slotspace+0x80000, slotspace+0xeffff, read32s_delegate(*this, FUNC(nubus_wsportrait_device::wsportrait_r)), write32s_delegate(*this, FUNC(nubus_wsportrait_device::wsportrait_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(869, 0), 0); @@ -203,7 +203,7 @@ uint32_t nubus_wsportrait_device::screen_update(screen_device &screen, bitmap_rg return 0; } -WRITE32_MEMBER( nubus_wsportrait_device::wsportrait_w ) +void nubus_wsportrait_device::wsportrait_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; // if (offset != 0x8000) printf("wsportrait: Write %08x @ %x, mask %08x\n", data, offset, mem_mask); @@ -263,7 +263,7 @@ WRITE32_MEMBER( nubus_wsportrait_device::wsportrait_w ) } } -READ32_MEMBER( nubus_wsportrait_device::wsportrait_r ) +uint32_t nubus_wsportrait_device::wsportrait_r(offs_t offset, uint32_t mem_mask) { // printf("wsportrait: Read @ %x, mask %08x\n", offset, mem_mask); @@ -289,13 +289,13 @@ READ32_MEMBER( nubus_wsportrait_device::wsportrait_r ) return 0; } -WRITE32_MEMBER( nubus_wsportrait_device::vram_w ) +void nubus_wsportrait_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { data ^= 0xffffffff; COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_wsportrait_device::vram_r ) +uint32_t nubus_wsportrait_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset] ^ 0xffffffff; } diff --git a/src/devices/bus/nubus/nubus_wsportrait.h b/src/devices/bus/nubus/nubus_wsportrait.h index d9614a76eb7..e9f81b982bc 100644 --- a/src/devices/bus/nubus/nubus_wsportrait.h +++ b/src/devices/bus/nubus/nubus_wsportrait.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(wsportrait_r); - DECLARE_WRITE32_MEMBER(wsportrait_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t wsportrait_r(offs_t offset, uint32_t mem_mask = ~0); + void wsportrait_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/pds30_30hr.cpp b/src/devices/bus/nubus/pds30_30hr.cpp index dbd0018cecd..2fe4687fc44 100644 --- a/src/devices/bus/nubus/pds30_30hr.cpp +++ b/src/devices/bus/nubus/pds30_30hr.cpp @@ -96,8 +96,8 @@ void nubus_xceed30hr_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_xceed30hr_device::vram_r)), write32_delegate(*this, FUNC(nubus_xceed30hr_device::vram_w))); - nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(*this, FUNC(nubus_xceed30hr_device::xceed30hr_r)), write32_delegate(*this, FUNC(nubus_xceed30hr_device::xceed30hr_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_xceed30hr_device::vram_r)), write32s_delegate(*this, FUNC(nubus_xceed30hr_device::vram_w))); + nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32s_delegate(*this, FUNC(nubus_xceed30hr_device::xceed30hr_r)), write32s_delegate(*this, FUNC(nubus_xceed30hr_device::xceed30hr_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -217,7 +217,7 @@ uint32_t nubus_xceed30hr_device::screen_update(screen_device &screen, bitmap_rgb return 0; } -WRITE32_MEMBER( nubus_xceed30hr_device::xceed30hr_w ) +void nubus_xceed30hr_device::xceed30hr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -287,7 +287,7 @@ WRITE32_MEMBER( nubus_xceed30hr_device::xceed30hr_w ) } } -READ32_MEMBER( nubus_xceed30hr_device::xceed30hr_r ) +uint32_t nubus_xceed30hr_device::xceed30hr_r(offs_t offset, uint32_t mem_mask) { // logerror("xceed30hr_r: @ %x, mask %08x %s\n", offset, mem_mask, machine().describe_context()); if (offset == 0x80008) @@ -299,12 +299,12 @@ READ32_MEMBER( nubus_xceed30hr_device::xceed30hr_r ) return 0; } -WRITE32_MEMBER( nubus_xceed30hr_device::vram_w ) +void nubus_xceed30hr_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_xceed30hr_device::vram_r ) +uint32_t nubus_xceed30hr_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset]; } diff --git a/src/devices/bus/nubus/pds30_30hr.h b/src/devices/bus/nubus/pds30_30hr.h index 6249f016205..331f8898df4 100644 --- a/src/devices/bus/nubus/pds30_30hr.h +++ b/src/devices/bus/nubus/pds30_30hr.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(xceed30hr_r); - DECLARE_WRITE32_MEMBER(xceed30hr_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t xceed30hr_r(offs_t offset, uint32_t mem_mask = ~0); + void xceed30hr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/pds30_cb264.cpp b/src/devices/bus/nubus/pds30_cb264.cpp index f7111b2a8e6..aa0ca1df648 100644 --- a/src/devices/bus/nubus/pds30_cb264.cpp +++ b/src/devices/bus/nubus/pds30_cb264.cpp @@ -90,8 +90,8 @@ void nubus_cb264se30_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_cb264se30_device::vram_r)), write32_delegate(*this, FUNC(nubus_cb264se30_device::vram_w))); - nubus().install_device(slotspace+0xf00000, slotspace+0xfeffff, read32_delegate(*this, FUNC(nubus_cb264se30_device::cb264se30_r)), write32_delegate(*this, FUNC(nubus_cb264se30_device::cb264se30_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_cb264se30_device::vram_r)), write32s_delegate(*this, FUNC(nubus_cb264se30_device::vram_w))); + nubus().install_device(slotspace+0xf00000, slotspace+0xfeffff, read32s_delegate(*this, FUNC(nubus_cb264se30_device::cb264se30_r)), write32s_delegate(*this, FUNC(nubus_cb264se30_device::cb264se30_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -228,7 +228,7 @@ uint32_t nubus_cb264se30_device::screen_update(screen_device &screen, bitmap_rgb return 0; } -WRITE32_MEMBER( nubus_cb264se30_device::cb264se30_w ) +void nubus_cb264se30_device::cb264se30_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -300,17 +300,17 @@ WRITE32_MEMBER( nubus_cb264se30_device::cb264se30_w ) } } -READ32_MEMBER( nubus_cb264se30_device::cb264se30_r ) +uint32_t nubus_cb264se30_device::cb264se30_r(offs_t offset, uint32_t mem_mask) { return 0; } -WRITE32_MEMBER( nubus_cb264se30_device::vram_w ) +void nubus_cb264se30_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_cb264se30_device::vram_r ) +uint32_t nubus_cb264se30_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset]; } diff --git a/src/devices/bus/nubus/pds30_cb264.h b/src/devices/bus/nubus/pds30_cb264.h index f32289fb0af..0892e23a2de 100644 --- a/src/devices/bus/nubus/pds30_cb264.h +++ b/src/devices/bus/nubus/pds30_cb264.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(cb264se30_r); - DECLARE_WRITE32_MEMBER(cb264se30_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t cb264se30_r(offs_t offset, uint32_t mem_mask = ~0); + void cb264se30_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/pds30_mc30.cpp b/src/devices/bus/nubus/pds30_mc30.cpp index 068ce736156..20969a5a6b7 100644 --- a/src/devices/bus/nubus/pds30_mc30.cpp +++ b/src/devices/bus/nubus/pds30_mc30.cpp @@ -92,8 +92,8 @@ void nubus_xceedmc30_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_xceedmc30_device::vram_r)), write32_delegate(*this, FUNC(nubus_xceedmc30_device::vram_w))); - nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32_delegate(*this, FUNC(nubus_xceedmc30_device::xceedmc30_r)), write32_delegate(*this, FUNC(nubus_xceedmc30_device::xceedmc30_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_xceedmc30_device::vram_r)), write32s_delegate(*this, FUNC(nubus_xceedmc30_device::vram_w))); + nubus().install_device(slotspace+0x800000, slotspace+0xefffff, read32s_delegate(*this, FUNC(nubus_xceedmc30_device::xceedmc30_r)), write32s_delegate(*this, FUNC(nubus_xceedmc30_device::xceedmc30_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -230,7 +230,7 @@ uint32_t nubus_xceedmc30_device::screen_update(screen_device &screen, bitmap_rgb return 0; } -WRITE32_MEMBER( nubus_xceedmc30_device::xceedmc30_w ) +void nubus_xceedmc30_device::xceedmc30_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -304,7 +304,7 @@ WRITE32_MEMBER( nubus_xceedmc30_device::xceedmc30_w ) } } -READ32_MEMBER( nubus_xceedmc30_device::xceedmc30_r ) +uint32_t nubus_xceedmc30_device::xceedmc30_r(offs_t offset, uint32_t mem_mask) { // printf("xceedmc30_r: @ %x, mask %08x [PC=%x]\n", offset, mem_mask, machine().device("maincpu")->pc()); if (offset == 0x80008) @@ -316,12 +316,12 @@ READ32_MEMBER( nubus_xceedmc30_device::xceedmc30_r ) return 0; } -WRITE32_MEMBER( nubus_xceedmc30_device::vram_w ) +void nubus_xceedmc30_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_xceedmc30_device::vram_r ) +uint32_t nubus_xceedmc30_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset]; } diff --git a/src/devices/bus/nubus/pds30_mc30.h b/src/devices/bus/nubus/pds30_mc30.h index db4fe782753..2691b8d728c 100644 --- a/src/devices/bus/nubus/pds30_mc30.h +++ b/src/devices/bus/nubus/pds30_mc30.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(xceedmc30_r); - DECLARE_WRITE32_MEMBER(xceedmc30_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t xceedmc30_r(offs_t offset, uint32_t mem_mask = ~0); + void xceedmc30_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/pds30_procolor816.cpp b/src/devices/bus/nubus/pds30_procolor816.cpp index 0399378216f..b251a57c33c 100644 --- a/src/devices/bus/nubus/pds30_procolor816.cpp +++ b/src/devices/bus/nubus/pds30_procolor816.cpp @@ -95,9 +95,9 @@ void nubus_procolor816_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_procolor816_device::vram_r)), write32_delegate(*this, FUNC(nubus_procolor816_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_procolor816_device::vram_r)), write32_delegate(*this, FUNC(nubus_procolor816_device::vram_w))); - nubus().install_device(slotspace+0xf00000, slotspace+0xff7fff, read32_delegate(*this, FUNC(nubus_procolor816_device::procolor816_r)), write32_delegate(*this, FUNC(nubus_procolor816_device::procolor816_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_procolor816_device::vram_r)), write32s_delegate(*this, FUNC(nubus_procolor816_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32s_delegate(*this, FUNC(nubus_procolor816_device::vram_r)), write32s_delegate(*this, FUNC(nubus_procolor816_device::vram_w))); + nubus().install_device(slotspace+0xf00000, slotspace+0xff7fff, read32s_delegate(*this, FUNC(nubus_procolor816_device::procolor816_r)), write32s_delegate(*this, FUNC(nubus_procolor816_device::procolor816_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(479, 0), 0); @@ -234,7 +234,7 @@ uint32_t nubus_procolor816_device::screen_update(screen_device &screen, bitmap_r return 0; } -WRITE32_MEMBER( nubus_procolor816_device::procolor816_w ) +void nubus_procolor816_device::procolor816_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset) { @@ -311,7 +311,7 @@ WRITE32_MEMBER( nubus_procolor816_device::procolor816_w ) } } -READ32_MEMBER( nubus_procolor816_device::procolor816_r ) +uint32_t nubus_procolor816_device::procolor816_r(offs_t offset, uint32_t mem_mask) { if (offset == 0x3dc00) { @@ -330,12 +330,12 @@ READ32_MEMBER( nubus_procolor816_device::procolor816_r ) return 0; } -WRITE32_MEMBER( nubus_procolor816_device::vram_w ) +void nubus_procolor816_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_procolor816_device::vram_r ) +uint32_t nubus_procolor816_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset]; } diff --git a/src/devices/bus/nubus/pds30_procolor816.h b/src/devices/bus/nubus/pds30_procolor816.h index dee825d4096..2fc0474798d 100644 --- a/src/devices/bus/nubus/pds30_procolor816.h +++ b/src/devices/bus/nubus/pds30_procolor816.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(procolor816_r); - DECLARE_WRITE32_MEMBER(procolor816_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t procolor816_r(offs_t offset, uint32_t mem_mask = ~0); + void procolor816_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/pds30_sigmalview.cpp b/src/devices/bus/nubus/pds30_sigmalview.cpp index 73c36d3c99c..c509b908064 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.cpp +++ b/src/devices/bus/nubus/pds30_sigmalview.cpp @@ -90,9 +90,9 @@ void nubus_lview_device::device_start() m_vram.resize(VRAM_SIZE); m_vram32 = (uint32_t *)&m_vram[0]; - nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32_delegate(*this, FUNC(nubus_lview_device::vram_r)), write32_delegate(*this, FUNC(nubus_lview_device::vram_w))); - nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32_delegate(*this, FUNC(nubus_lview_device::vram_r)), write32_delegate(*this, FUNC(nubus_lview_device::vram_w))); - nubus().install_device(slotspace+0xb0000, slotspace+0xbffff, read32_delegate(*this, FUNC(nubus_lview_device::lview_r)), write32_delegate(*this, FUNC(nubus_lview_device::lview_w))); + nubus().install_device(slotspace, slotspace+VRAM_SIZE-1, read32s_delegate(*this, FUNC(nubus_lview_device::vram_r)), write32s_delegate(*this, FUNC(nubus_lview_device::vram_w))); + nubus().install_device(slotspace+0x900000, slotspace+VRAM_SIZE-1+0x900000, read32s_delegate(*this, FUNC(nubus_lview_device::vram_r)), write32s_delegate(*this, FUNC(nubus_lview_device::vram_w))); + nubus().install_device(slotspace+0xb0000, slotspace+0xbffff, read32s_delegate(*this, FUNC(nubus_lview_device::lview_r)), write32s_delegate(*this, FUNC(nubus_lview_device::lview_w))); m_timer = timer_alloc(0, nullptr); m_timer->adjust(screen().time_until_pos(599, 0), 0); @@ -159,7 +159,7 @@ uint32_t nubus_lview_device::screen_update(screen_device &screen, bitmap_rgb32 & return 0; } -READ32_MEMBER( nubus_lview_device::lview_r ) +uint32_t nubus_lview_device::lview_r(offs_t offset, uint32_t mem_mask) { uint32_t rv = 0; @@ -179,7 +179,7 @@ READ32_MEMBER( nubus_lview_device::lview_r ) return rv; } -WRITE32_MEMBER( nubus_lview_device::lview_w ) +void nubus_lview_device::lview_w(offs_t offset, uint32_t data, uint32_t mem_mask) { // if (offset != 0x7a && offset != 0x3ffb) logerror("prot_w: %08x @ %x, mask %08x %s\n", data, offset, mem_mask, machine().describe_context()); @@ -197,12 +197,12 @@ WRITE32_MEMBER( nubus_lview_device::lview_w ) } } -WRITE32_MEMBER( nubus_lview_device::vram_w ) +void nubus_lview_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram32[offset]); } -READ32_MEMBER( nubus_lview_device::vram_r ) +uint32_t nubus_lview_device::vram_r(offs_t offset, uint32_t mem_mask) { return m_vram32[offset]; } diff --git a/src/devices/bus/nubus/pds30_sigmalview.h b/src/devices/bus/nubus/pds30_sigmalview.h index 66cfd175b42..b890a31654f 100644 --- a/src/devices/bus/nubus/pds30_sigmalview.h +++ b/src/devices/bus/nubus/pds30_sigmalview.h @@ -35,10 +35,10 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(lview_r); - DECLARE_WRITE32_MEMBER(lview_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t lview_r(offs_t offset, uint32_t mem_mask = ~0); + void lview_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset, uint32_t mem_mask = ~0); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/nubus/quadralink.cpp b/src/devices/bus/nubus/quadralink.cpp index 84855baebc3..732e56f1367 100644 --- a/src/devices/bus/nubus/quadralink.cpp +++ b/src/devices/bus/nubus/quadralink.cpp @@ -110,7 +110,7 @@ void nubus_quadralink_device::device_start() slotspace = get_slotspace(); - nubus().install_device(slotspace, slotspace+0xefffff, read32_delegate(*this, FUNC(nubus_quadralink_device::dev_r)), write32_delegate(*this, FUNC(nubus_quadralink_device::dev_w))); + nubus().install_device(slotspace, slotspace+0xefffff, read32s_delegate(*this, FUNC(nubus_quadralink_device::dev_r)), write32s_delegate(*this, FUNC(nubus_quadralink_device::dev_w))); } //------------------------------------------------- @@ -121,7 +121,7 @@ void nubus_quadralink_device::device_reset() { } -WRITE32_MEMBER( nubus_quadralink_device::dev_w ) +void nubus_quadralink_device::dev_w(offs_t offset, uint32_t data, uint32_t mem_mask) { //printf("write %x to QL space @ %x, mask %08x\n", data, offset, mem_mask); switch (offset) @@ -160,7 +160,7 @@ WRITE32_MEMBER( nubus_quadralink_device::dev_w ) } } -READ32_MEMBER( nubus_quadralink_device::dev_r ) +uint32_t nubus_quadralink_device::dev_r(offs_t offset, uint32_t mem_mask) { //printf("read QL space @ %x, mask %08x\n", offset, mem_mask); switch (offset) diff --git a/src/devices/bus/nubus/quadralink.h b/src/devices/bus/nubus/quadralink.h index 28f3eadbf47..3960c24d069 100644 --- a/src/devices/bus/nubus/quadralink.h +++ b/src/devices/bus/nubus/quadralink.h @@ -36,8 +36,8 @@ protected: virtual const tiny_rom_entry *device_rom_region() const override; private: - DECLARE_READ32_MEMBER(dev_r); - DECLARE_WRITE32_MEMBER(dev_w); + uint32_t dev_r(offs_t offset, uint32_t mem_mask = ~0); + void dev_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); }; // device type definition diff --git a/src/devices/bus/pc_joy/pc_joy.cpp b/src/devices/bus/pc_joy/pc_joy.cpp index 670382bebab..2171a9ddbf7 100644 --- a/src/devices/bus/pc_joy/pc_joy.cpp +++ b/src/devices/bus/pc_joy/pc_joy.cpp @@ -25,7 +25,7 @@ pc_joy_device::pc_joy_device(const machine_config &mconfig, const char *tag, dev set_fixed(false); } -READ8_MEMBER ( pc_joy_device::joy_port_r ) +uint8_t pc_joy_device::joy_port_r() { int delta = ((machine().time() - m_stime) * 256 * 2325).seconds(); @@ -35,7 +35,7 @@ READ8_MEMBER ( pc_joy_device::joy_port_r ) return (m_dev->btn() << 4) | (m_dev->y2(delta) << 3) | (m_dev->x2(delta) << 2) | (m_dev->y1(delta) << 1) | m_dev->x1(delta); } -WRITE8_MEMBER ( pc_joy_device::joy_port_w ) +void pc_joy_device::joy_port_w(uint8_t data) { m_stime = machine().time(); if(!m_dev) diff --git a/src/devices/bus/pc_joy/pc_joy.h b/src/devices/bus/pc_joy/pc_joy.h index d66636c3ad5..e09520f6436 100644 --- a/src/devices/bus/pc_joy/pc_joy.h +++ b/src/devices/bus/pc_joy/pc_joy.h @@ -37,8 +37,8 @@ class pc_joy_device : public device_t, public device_single_card_slot_interface< public: pc_joy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ8_MEMBER(joy_port_r); - DECLARE_WRITE8_MEMBER(joy_port_w); + uint8_t joy_port_r(); + void joy_port_w(uint8_t data); protected: virtual void device_start() override { m_stime = machine().time(); } diff --git a/src/devices/bus/pet/superpet.cpp b/src/devices/bus/pet/superpet.cpp index 6f7dcb9ea5e..77ec57b5c46 100644 --- a/src/devices/bus/pet/superpet.cpp +++ b/src/devices/bus/pet/superpet.cpp @@ -400,7 +400,7 @@ void superpet_device::pet_irq_w(int state) // read - //------------------------------------------------- -READ8_MEMBER( superpet_device::read ) +uint8_t superpet_device::read(offs_t offset) { return m_slot->dma_bd_r(offset); } @@ -410,7 +410,7 @@ READ8_MEMBER( superpet_device::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( superpet_device::write ) +void superpet_device::write(offs_t offset, uint8_t data) { m_slot->dma_bd_w(offset, data); } diff --git a/src/devices/bus/pet/superpet.h b/src/devices/bus/pet/superpet.h index 6a6dfde0889..097a4b45cd4 100644 --- a/src/devices/bus/pet/superpet.h +++ b/src/devices/bus/pet/superpet.h @@ -50,8 +50,8 @@ protected: private: DECLARE_WRITE_LINE_MEMBER( acia_irq_w ); - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(offs_t offset); + void write(offs_t offset, uint8_t data); void superpet_mem(address_map &map); diff --git a/src/devices/bus/psi_kbd/psi_kbd.h b/src/devices/bus/psi_kbd/psi_kbd.h index 5070e83d0c5..364ef98586a 100644 --- a/src/devices/bus/psi_kbd/psi_kbd.h +++ b/src/devices/bus/psi_kbd/psi_kbd.h @@ -67,7 +67,7 @@ public: // called from host DECLARE_WRITE_LINE_MEMBER( tx_w ); - DECLARE_READ8_MEMBER( key_data_r ) { return m_key_data; } + uint8_t key_data_r() { return m_key_data; } protected: // device-level overrides diff --git a/src/devices/bus/qbus/pc11.cpp b/src/devices/bus/qbus/pc11.cpp index bece8806b1d..46803aa0641 100644 --- a/src/devices/bus/qbus/pc11.cpp +++ b/src/devices/bus/qbus/pc11.cpp @@ -68,8 +68,8 @@ pc11_device::pc11_device(const machine_config &mconfig, const char *tag, device_ void pc11_device::device_start() { - m_bus->install_device(0177550, 0177557, read16_delegate(*this, FUNC(pc11_device::read)), - write16_delegate(*this, FUNC(pc11_device::write))); + m_bus->install_device(0177550, 0177557, read16sm_delegate(*this, FUNC(pc11_device::read)), + write16sm_delegate(*this, FUNC(pc11_device::write))); // resolve callbacks @@ -157,7 +157,7 @@ void pc11_device::call_unload() // read - register read //------------------------------------------------- -READ16_MEMBER(pc11_device::read) +uint16_t pc11_device::read(offs_t offset) { uint16_t data = 0; @@ -184,7 +184,7 @@ READ16_MEMBER(pc11_device::read) // write - register write //------------------------------------------------- -WRITE16_MEMBER(pc11_device::write) +void pc11_device::write(offs_t offset, uint16_t data) { LOGDBG("W %06o <- %06o\n", 0177550 + (offset << 1), data); diff --git a/src/devices/bus/qbus/pc11.h b/src/devices/bus/qbus/pc11.h index a92e1802cfe..5f0cefae924 100644 --- a/src/devices/bus/qbus/pc11.h +++ b/src/devices/bus/qbus/pc11.h @@ -54,8 +54,8 @@ public: virtual void call_unload() override; virtual const software_list_loader &get_software_list_loader() const override { return image_software_list_loader::instance(); } - DECLARE_READ16_MEMBER(read); - DECLARE_WRITE16_MEMBER(write); + uint16_t read(offs_t offset); + void write(offs_t offset, uint16_t data); protected: // device-level overrides diff --git a/src/devices/bus/qbus/qbus.cpp b/src/devices/bus/qbus/qbus.cpp index 144db1a2252..602f2cac685 100644 --- a/src/devices/bus/qbus/qbus.cpp +++ b/src/devices/bus/qbus/qbus.cpp @@ -133,7 +133,7 @@ void qbus_device::add_card(device_qbus_card_interface *card) m_device_list.append(*card); } -void qbus_device::install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask) +void qbus_device::install_device(offs_t start, offs_t end, read16sm_delegate rhandler, write16sm_delegate whandler, uint32_t mask) { m_maincpu->space(AS_PROGRAM).install_readwrite_handler(start, end, rhandler, whandler, mask); } diff --git a/src/devices/bus/qbus/qbus.h b/src/devices/bus/qbus/qbus.h index d0caf2f2cbd..cba9ef3b9e2 100644 --- a/src/devices/bus/qbus/qbus.h +++ b/src/devices/bus/qbus/qbus.h @@ -84,7 +84,7 @@ public: auto birq7() { return m_out_birq7_cb.bind(); } void add_card(device_qbus_card_interface *card); - void install_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler, uint32_t mask=0xffffffff); + void install_device(offs_t start, offs_t end, read16sm_delegate rhandler, write16sm_delegate whandler, uint32_t mask=0xffffffff); DECLARE_WRITE_LINE_MEMBER(birq4_w) { m_out_birq4_cb(state); } DECLARE_WRITE_LINE_MEMBER(birq5_w) { m_out_birq5_cb(state); } diff --git a/src/devices/bus/saturn/bram.cpp b/src/devices/bus/saturn/bram.cpp index cdcc7ad4376..4fac71dcd83 100644 --- a/src/devices/bus/saturn/bram.cpp +++ b/src/devices/bus/saturn/bram.cpp @@ -81,7 +81,7 @@ void saturn_bram_device::nvram_default() // Battery RAM: single chip -READ32_MEMBER(saturn_bram_device::read_ext_bram) +uint32_t saturn_bram_device::read_ext_bram(offs_t offset) { if (offset < m_ext_bram.size()/2) return (m_ext_bram[offset * 2] << 16) | m_ext_bram[offset * 2 + 1]; @@ -92,7 +92,7 @@ READ32_MEMBER(saturn_bram_device::read_ext_bram) } } -WRITE32_MEMBER(saturn_bram_device::write_ext_bram) +void saturn_bram_device::write_ext_bram(offs_t offset, uint32_t data, uint32_t mem_mask) { if (offset < m_ext_bram.size()/2) { diff --git a/src/devices/bus/saturn/bram.h b/src/devices/bus/saturn/bram.h index a295bc78333..71ff5f0ace9 100644 --- a/src/devices/bus/saturn/bram.h +++ b/src/devices/bus/saturn/bram.h @@ -14,8 +14,8 @@ class saturn_bram_device : public device_t, { public: // reading and writing - virtual DECLARE_READ32_MEMBER(read_ext_bram) override; - virtual DECLARE_WRITE32_MEMBER(write_ext_bram) override; + virtual uint32_t read_ext_bram(offs_t offset) override; + virtual void write_ext_bram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: // construction/destruction diff --git a/src/devices/bus/saturn/dram.cpp b/src/devices/bus/saturn/dram.cpp index 6d574dc28e3..c0380752aea 100644 --- a/src/devices/bus/saturn/dram.cpp +++ b/src/devices/bus/saturn/dram.cpp @@ -55,7 +55,7 @@ void saturn_dram_device::device_reset() // RAM: two DRAM chips are present in the cart, thus accesses only go up to m_size/2! -READ32_MEMBER(saturn_dram_device::read_ext_dram0) +uint32_t saturn_dram_device::read_ext_dram0(offs_t offset) { if (offset < (0x400000/2)/4) return m_ext_dram0[offset % m_ext_dram0.size()]; @@ -66,7 +66,7 @@ READ32_MEMBER(saturn_dram_device::read_ext_dram0) } } -READ32_MEMBER(saturn_dram_device::read_ext_dram1) +uint32_t saturn_dram_device::read_ext_dram1(offs_t offset) { if (offset < (0x400000/2)/4) return m_ext_dram1[offset % m_ext_dram1.size()]; @@ -77,7 +77,7 @@ READ32_MEMBER(saturn_dram_device::read_ext_dram1) } } -WRITE32_MEMBER(saturn_dram_device::write_ext_dram0) +void saturn_dram_device::write_ext_dram0(offs_t offset, uint32_t data, uint32_t mem_mask) { if (offset < (0x400000/2)/4) COMBINE_DATA(&m_ext_dram0[offset % m_ext_dram0.size()]); @@ -85,7 +85,7 @@ WRITE32_MEMBER(saturn_dram_device::write_ext_dram0) popmessage("DRAM0 write beyond its boundary! offs: %X data: %X\n", offset, data); } -WRITE32_MEMBER(saturn_dram_device::write_ext_dram1) +void saturn_dram_device::write_ext_dram1(offs_t offset, uint32_t data, uint32_t mem_mask) { if (offset < (0x400000/2)/4) COMBINE_DATA(&m_ext_dram1[offset % m_ext_dram1.size()]); diff --git a/src/devices/bus/saturn/dram.h b/src/devices/bus/saturn/dram.h index 1bef596993a..847c90a9955 100644 --- a/src/devices/bus/saturn/dram.h +++ b/src/devices/bus/saturn/dram.h @@ -13,10 +13,10 @@ class saturn_dram_device : public device_t, { public: // reading and writing - virtual DECLARE_READ32_MEMBER(read_ext_dram0) override; - virtual DECLARE_READ32_MEMBER(read_ext_dram1) override; - virtual DECLARE_WRITE32_MEMBER(write_ext_dram0) override; - virtual DECLARE_WRITE32_MEMBER(write_ext_dram1) override; + virtual uint32_t read_ext_dram0(offs_t offset) override; + virtual uint32_t read_ext_dram1(offs_t offset) override; + virtual void write_ext_dram0(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; + virtual void write_ext_dram1(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) override; protected: // construction/destruction diff --git a/src/devices/bus/saturn/rom.cpp b/src/devices/bus/saturn/rom.cpp index 1421018c298..5853a7b4bdb 100644 --- a/src/devices/bus/saturn/rom.cpp +++ b/src/devices/bus/saturn/rom.cpp @@ -47,7 +47,7 @@ void saturn_rom_device::device_reset() mapper specific handlers -------------------------------------------------*/ -READ32_MEMBER(saturn_rom_device::read_rom) +uint32_t saturn_rom_device::read_rom(offs_t offset) { return m_rom[offset & (m_rom_size/4 - 1)]; } diff --git a/src/devices/bus/saturn/rom.h b/src/devices/bus/saturn/rom.h index 0fc8f2ecbea..0706a74a420 100644 --- a/src/devices/bus/saturn/rom.h +++ b/src/devices/bus/saturn/rom.h @@ -15,7 +15,7 @@ public: saturn_rom_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // reading and writing - virtual DECLARE_READ32_MEMBER(read_rom) override; + virtual uint32_t read_rom(offs_t offset) override; protected: saturn_rom_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int cart_type); diff --git a/src/devices/bus/saturn/sat_slot.cpp b/src/devices/bus/saturn/sat_slot.cpp index a7357681958..955e3478f3e 100644 --- a/src/devices/bus/saturn/sat_slot.cpp +++ b/src/devices/bus/saturn/sat_slot.cpp @@ -219,34 +219,34 @@ int sat_cart_slot_device::get_cart_type() read -------------------------------------------------*/ -READ32_MEMBER(sat_cart_slot_device::read_rom) +uint32_t sat_cart_slot_device::read_rom(offs_t offset) { if (m_cart) - return m_cart->read_rom(space, offset, mem_mask); + return m_cart->read_rom(offset); else return 0xffffffff; } -READ32_MEMBER(sat_cart_slot_device::read_ext_dram0) +uint32_t sat_cart_slot_device::read_ext_dram0(offs_t offset) { if (m_cart) - return m_cart->read_ext_dram0(space, offset, mem_mask); + return m_cart->read_ext_dram0(offset); else return 0xffffffff; } -READ32_MEMBER(sat_cart_slot_device::read_ext_dram1) +uint32_t sat_cart_slot_device::read_ext_dram1(offs_t offset) { if (m_cart) - return m_cart->read_ext_dram1(space, offset, mem_mask); + return m_cart->read_ext_dram1(offset); else return 0xffffffff; } -READ32_MEMBER(sat_cart_slot_device::read_ext_bram) +uint32_t sat_cart_slot_device::read_ext_bram(offs_t offset) { if (m_cart) - return m_cart->read_ext_bram(space, offset, mem_mask); + return m_cart->read_ext_bram(offset); else return 0xffffffff; } @@ -255,20 +255,20 @@ READ32_MEMBER(sat_cart_slot_device::read_ext_bram) write -------------------------------------------------*/ -WRITE32_MEMBER(sat_cart_slot_device::write_ext_dram0) +void sat_cart_slot_device::write_ext_dram0(offs_t offset, uint32_t data, uint32_t mem_mask) { if (m_cart) - m_cart->write_ext_dram0(space, offset, data, mem_mask); + m_cart->write_ext_dram0(offset, data, mem_mask); } -WRITE32_MEMBER(sat_cart_slot_device::write_ext_dram1) +void sat_cart_slot_device::write_ext_dram1(offs_t offset, uint32_t data, uint32_t mem_mask) { if (m_cart) - m_cart->write_ext_dram1(space, offset, data, mem_mask); + m_cart->write_ext_dram1(offset, data, mem_mask); } -WRITE32_MEMBER(sat_cart_slot_device::write_ext_bram) +void sat_cart_slot_device::write_ext_bram(offs_t offset, uint32_t data, uint32_t mem_mask) { if (m_cart) - m_cart->write_ext_bram(space, offset, data, mem_mask); + m_cart->write_ext_bram(offset, data, mem_mask); } diff --git a/src/devices/bus/saturn/sat_slot.h b/src/devices/bus/saturn/sat_slot.h index dca26d7e8ae..9193cc2aa20 100644 --- a/src/devices/bus/saturn/sat_slot.h +++ b/src/devices/bus/saturn/sat_slot.h @@ -19,15 +19,15 @@ public: virtual ~device_sat_cart_interface(); // reading from ROM - virtual DECLARE_READ32_MEMBER(read_rom) { return 0xffffffff; } + virtual uint32_t read_rom(offs_t offset) { return 0xffffffff; } // reading and writing to Extended DRAM chips - virtual DECLARE_READ32_MEMBER(read_ext_dram0) { return 0xffffffff; } - virtual DECLARE_WRITE32_MEMBER(write_ext_dram0) { } - virtual DECLARE_READ32_MEMBER(read_ext_dram1) { return 0xffffffff; } - virtual DECLARE_WRITE32_MEMBER(write_ext_dram1) { } + virtual uint32_t read_ext_dram0(offs_t offset) { return 0xffffffff; } + virtual void write_ext_dram0(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { } + virtual uint32_t read_ext_dram1(offs_t offset) { return 0xffffffff; } + virtual void write_ext_dram1(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { } // reading and writing to Extended BRAM chip - virtual DECLARE_READ32_MEMBER(read_ext_bram) { return 0xffffffff; } - virtual DECLARE_WRITE32_MEMBER(write_ext_bram) { } + virtual uint32_t read_ext_bram(offs_t offset) { return 0xffffffff; } + virtual void write_ext_bram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { } int get_cart_type() const { return m_cart_type; } @@ -98,13 +98,13 @@ public: int get_cart_type(); // reading and writing - virtual DECLARE_READ32_MEMBER(read_rom); - virtual DECLARE_READ32_MEMBER(read_ext_dram0); - virtual DECLARE_WRITE32_MEMBER(write_ext_dram0); - virtual DECLARE_READ32_MEMBER(read_ext_dram1); - virtual DECLARE_WRITE32_MEMBER(write_ext_dram1); - virtual DECLARE_READ32_MEMBER(read_ext_bram); - virtual DECLARE_WRITE32_MEMBER(write_ext_bram); + virtual uint32_t read_rom(offs_t offset); + virtual uint32_t read_ext_dram0(offs_t offset); + virtual void write_ext_dram0(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + virtual uint32_t read_ext_dram1(offs_t offset); + virtual void write_ext_dram1(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + virtual uint32_t read_ext_bram(offs_t offset); + virtual void write_ext_bram(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); protected: // device-level overrides diff --git a/src/devices/bus/sbus/artecon.cpp b/src/devices/bus/sbus/artecon.cpp index f306494035b..0117ec12cd9 100644 --- a/src/devices/bus/sbus/artecon.cpp +++ b/src/devices/bus/sbus/artecon.cpp @@ -55,18 +55,18 @@ void sbus_artecon_device::install_device() m_sbus->install_device(m_base, m_base + 0x1ffffff, *this, &sbus_artecon_device::mem_map); } -READ32_MEMBER(sbus_artecon_device::unknown_r) +uint32_t sbus_artecon_device::unknown_r(offs_t offset, uint32_t mem_mask) { logerror("%s: unknown_r: %08x & %08x\n", machine().describe_context(), offset << 2, mem_mask); return 0; } -WRITE32_MEMBER(sbus_artecon_device::unknown_w) +void sbus_artecon_device::unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s: unknown_w: %08x = %08x & %08x\n", machine().describe_context(), offset << 2, data, mem_mask); } -READ32_MEMBER(sbus_artecon_device::rom_r) +uint32_t sbus_artecon_device::rom_r(offs_t offset) { return ((uint32_t*)m_rom->base())[offset]; } diff --git a/src/devices/bus/sbus/artecon.h b/src/devices/bus/sbus/artecon.h index ce414cf51b9..9b0d9a4cbbb 100644 --- a/src/devices/bus/sbus/artecon.h +++ b/src/devices/bus/sbus/artecon.h @@ -29,9 +29,9 @@ protected: // device_sbus_slot_interface overrides virtual void install_device() override; - DECLARE_READ32_MEMBER(unknown_r); - DECLARE_WRITE32_MEMBER(unknown_w); - DECLARE_READ32_MEMBER(rom_r); + uint32_t unknown_r(offs_t offset, uint32_t mem_mask = ~0); + void unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rom_r(offs_t offset); private: void mem_map(address_map &map) override; diff --git a/src/devices/bus/sbus/bwtwo.cpp b/src/devices/bus/sbus/bwtwo.cpp index 65f40df715c..55d9f92b7b6 100644 --- a/src/devices/bus/sbus/bwtwo.cpp +++ b/src/devices/bus/sbus/bwtwo.cpp @@ -88,28 +88,28 @@ uint32_t sbus_bwtwo_device::screen_update(screen_device &screen, bitmap_rgb32 &b return 0; } -READ8_MEMBER(sbus_bwtwo_device::regs_r) +uint8_t sbus_bwtwo_device::regs_r(offs_t offset) { logerror("%s: regs_r (unimplemented): %08x\n", machine().describe_context(), 0x400000 + offset); return 0; } -WRITE8_MEMBER(sbus_bwtwo_device::regs_w) +void sbus_bwtwo_device::regs_w(offs_t offset, uint8_t data) { logerror("%s: regs_w (unimplemented): %08x = %02x\n", machine().describe_context(), 0x400000 + offset, data); } -READ32_MEMBER(sbus_bwtwo_device::rom_r) +uint32_t sbus_bwtwo_device::rom_r(offs_t offset) { return ((uint32_t*)m_rom->base())[offset]; } -READ8_MEMBER(sbus_bwtwo_device::vram_r) +uint8_t sbus_bwtwo_device::vram_r(offs_t offset) { return m_vram[offset]; } -WRITE8_MEMBER(sbus_bwtwo_device::vram_w) +void sbus_bwtwo_device::vram_w(offs_t offset, uint8_t data) { m_vram[offset] = data; } diff --git a/src/devices/bus/sbus/bwtwo.h b/src/devices/bus/sbus/bwtwo.h index fb3408db7d4..d307f16f977 100644 --- a/src/devices/bus/sbus/bwtwo.h +++ b/src/devices/bus/sbus/bwtwo.h @@ -29,11 +29,11 @@ protected: // device_sbus_slot_interface overrides virtual void install_device() override; - DECLARE_READ8_MEMBER(regs_r); - DECLARE_WRITE8_MEMBER(regs_w); - DECLARE_READ32_MEMBER(rom_r); - DECLARE_READ8_MEMBER(vram_r); - DECLARE_WRITE8_MEMBER(vram_w); + uint8_t regs_r(offs_t offset); + void regs_w(offs_t offset, uint8_t data); + uint32_t rom_r(offs_t offset); + uint8_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint8_t data); private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/sbus/cgsix.cpp b/src/devices/bus/sbus/cgsix.cpp index 1cdd99da2b0..5d7bd715efd 100644 --- a/src/devices/bus/sbus/cgsix.cpp +++ b/src/devices/bus/sbus/cgsix.cpp @@ -204,28 +204,28 @@ uint32_t sbus_cgsix_device::screen_update(screen_device &screen, bitmap_rgb32 &b return 0; } -READ32_MEMBER(sbus_cgsix_device::rom_r) +uint32_t sbus_cgsix_device::rom_r(offs_t offset) { return ((uint32_t*)m_rom->base())[offset]; } -READ32_MEMBER(sbus_cgsix_device::unknown_r) +uint32_t sbus_cgsix_device::unknown_r(offs_t offset, uint32_t mem_mask) { logerror("%s: unknown_r: %08x & %08x\n", machine().describe_context(), offset << 2, mem_mask); return 0; } -WRITE32_MEMBER(sbus_cgsix_device::unknown_w) +void sbus_cgsix_device::unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s: unknown_w: %08x = %08x & %08x\n", machine().describe_context(), offset << 2, data, mem_mask); } -READ32_MEMBER(sbus_cgsix_device::vram_r) +uint32_t sbus_cgsix_device::vram_r(offs_t offset) { return m_vram[offset]; } -WRITE32_MEMBER(sbus_cgsix_device::vram_w) +void sbus_cgsix_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram[offset]); } @@ -456,7 +456,7 @@ void sbus_cgsix_device::handle_blit_command() } } -READ32_MEMBER(sbus_cgsix_device::fbc_r) +uint32_t sbus_cgsix_device::fbc_r(offs_t offset, uint32_t mem_mask) { uint32_t ret = 0; switch (offset) @@ -769,7 +769,7 @@ READ32_MEMBER(sbus_cgsix_device::fbc_r) return ret; } -WRITE32_MEMBER(sbus_cgsix_device::fbc_w) +void sbus_cgsix_device::fbc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { static char const *const misc_bdisp_name[4] = { "IGNORE", "0", "1", "ILLEGAL" }; static char const *const misc_bread_name[4] = { "IGNORE", "0", "1", "ILLEGAL" }; @@ -1233,34 +1233,34 @@ WRITE32_MEMBER(sbus_cgsix_device::fbc_w) } } -READ32_MEMBER(sbus_cgsix_device::cursor_address_r) +uint32_t sbus_cgsix_device::cursor_address_r() { return (m_cursor_x << 16) | (uint16_t)m_cursor_y; } -WRITE32_MEMBER(sbus_cgsix_device::cursor_address_w) +void sbus_cgsix_device::cursor_address_w(uint32_t data) { m_cursor_x = (int16_t)(data >> 16); m_cursor_y = (int16_t)data; } -READ32_MEMBER(sbus_cgsix_device::cursor_ram_r) +uint32_t sbus_cgsix_device::cursor_ram_r(offs_t offset) { return m_cursor_ram[offset]; } -WRITE32_MEMBER(sbus_cgsix_device::cursor_ram_w) +void sbus_cgsix_device::cursor_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_cursor_ram[offset]); } -READ32_MEMBER(sbus_cgsix_device::thc_misc_r) +uint32_t sbus_cgsix_device::thc_misc_r(offs_t offset, uint32_t mem_mask) { logerror("thc_misc_r: %08x & %08x\n", m_thc_misc | THC_MISC_REV, mem_mask); return m_thc_misc | THC_MISC_REV; } -WRITE32_MEMBER(sbus_cgsix_device::thc_misc_w) +void sbus_cgsix_device::thc_misc_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("thc_misc_w: %08x & %08x\n", data, mem_mask); if (BIT(data, THC_MISC_IRQ_BIT) && BIT(m_thc_misc, THC_MISC_IRQ_BIT)) diff --git a/src/devices/bus/sbus/cgsix.h b/src/devices/bus/sbus/cgsix.h index 71acec329a9..b6f3fe7520d 100644 --- a/src/devices/bus/sbus/cgsix.h +++ b/src/devices/bus/sbus/cgsix.h @@ -37,19 +37,19 @@ protected: virtual void device_start() override; virtual void device_reset() override; - DECLARE_READ32_MEMBER(rom_r); - DECLARE_READ32_MEMBER(unknown_r); - DECLARE_WRITE32_MEMBER(unknown_w); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); - DECLARE_READ32_MEMBER(fbc_r); - DECLARE_WRITE32_MEMBER(fbc_w); - DECLARE_READ32_MEMBER(thc_misc_r); - DECLARE_WRITE32_MEMBER(thc_misc_w); - DECLARE_READ32_MEMBER(cursor_address_r); - DECLARE_WRITE32_MEMBER(cursor_address_w); - DECLARE_READ32_MEMBER(cursor_ram_r); - DECLARE_WRITE32_MEMBER(cursor_ram_w); + uint32_t rom_r(offs_t offset); + uint32_t unknown_r(offs_t offset, uint32_t mem_mask = ~0); + void unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t fbc_r(offs_t offset, uint32_t mem_mask = ~0); + void fbc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t thc_misc_r(offs_t offset, uint32_t mem_mask = ~0); + void thc_misc_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t cursor_address_r(); + void cursor_address_w(uint32_t data); + uint32_t cursor_ram_r(offs_t offset); + void cursor_ram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(vblank_w); uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/sbus/cgthree.cpp b/src/devices/bus/sbus/cgthree.cpp index 091efef3b21..5ffe6a885c5 100644 --- a/src/devices/bus/sbus/cgthree.cpp +++ b/src/devices/bus/sbus/cgthree.cpp @@ -83,39 +83,39 @@ uint32_t sbus_cgthree_device::screen_update(screen_device &screen, bitmap_rgb32 return 0; } -READ32_MEMBER(sbus_cgthree_device::unknown_r) +uint32_t sbus_cgthree_device::unknown_r(offs_t offset, uint32_t mem_mask) { logerror("%s: unknown_r: %08x & %08x\n", machine().describe_context(), offset << 2, mem_mask); return 0; } -WRITE32_MEMBER(sbus_cgthree_device::unknown_w) +void sbus_cgthree_device::unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s: unknown_w: %08x = %08x & %08x\n", machine().describe_context(), offset << 2, data, mem_mask); } -READ8_MEMBER(sbus_cgthree_device::regs_r) +uint8_t sbus_cgthree_device::regs_r(offs_t offset) { logerror("%s: regs_r: Unimplemented: %08x\n", machine().describe_context(), 0x7ff800 + offset); return 0; } -WRITE8_MEMBER(sbus_cgthree_device::regs_w) +void sbus_cgthree_device::regs_w(offs_t offset, uint8_t data) { logerror("%s: regs_w: Unimplemented: %08x = %02x\n", machine().describe_context(), 0x7ff800 + offset, data); } -READ32_MEMBER(sbus_cgthree_device::rom_r) +uint32_t sbus_cgthree_device::rom_r(offs_t offset) { return ((uint32_t*)m_rom->base())[offset]; } -READ32_MEMBER(sbus_cgthree_device::vram_r) +uint32_t sbus_cgthree_device::vram_r(offs_t offset) { return m_vram[offset]; } -WRITE32_MEMBER(sbus_cgthree_device::vram_w) +void sbus_cgthree_device::vram_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vram[offset]); } diff --git a/src/devices/bus/sbus/cgthree.h b/src/devices/bus/sbus/cgthree.h index 9b99d4a2fba..d95a104aef5 100644 --- a/src/devices/bus/sbus/cgthree.h +++ b/src/devices/bus/sbus/cgthree.h @@ -32,14 +32,13 @@ protected: // device_sbus_slot_interface overrides virtual void install_device() override; - DECLARE_READ32_MEMBER(unknown_r); - DECLARE_WRITE32_MEMBER(unknown_w); - DECLARE_WRITE32_MEMBER(palette_w); - DECLARE_READ8_MEMBER(regs_r); - DECLARE_WRITE8_MEMBER(regs_w); - DECLARE_READ32_MEMBER(rom_r); - DECLARE_READ32_MEMBER(vram_r); - DECLARE_WRITE32_MEMBER(vram_w); + uint32_t unknown_r(offs_t offset, uint32_t mem_mask = ~0); + void unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint8_t regs_r(offs_t offset); + void regs_w(offs_t offset, uint8_t data); + uint32_t rom_r(offs_t offset); + uint32_t vram_r(offs_t offset); + void vram_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); private: uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect); diff --git a/src/devices/bus/sbus/hme.cpp b/src/devices/bus/sbus/hme.cpp index eb6d5852138..b11354f8e1e 100644 --- a/src/devices/bus/sbus/hme.cpp +++ b/src/devices/bus/sbus/hme.cpp @@ -54,18 +54,18 @@ void sbus_hme_device::install_device() m_sbus->install_device(m_base, m_base + 0x1ffffff, *this, &sbus_hme_device::mem_map); } -READ32_MEMBER(sbus_hme_device::unknown_r) +uint32_t sbus_hme_device::unknown_r(offs_t offset, uint32_t mem_mask) { logerror("%s: unknown_r: %08x & %08x\n", machine().describe_context(), offset << 2, mem_mask); return 0; } -WRITE32_MEMBER(sbus_hme_device::unknown_w) +void sbus_hme_device::unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s: unknown_w: %08x = %08x & %08x\n", machine().describe_context(), offset << 2, data, mem_mask); } -READ32_MEMBER(sbus_hme_device::rom_r) +uint32_t sbus_hme_device::rom_r(offs_t offset) { return ((uint32_t*)m_rom->base())[offset]; } diff --git a/src/devices/bus/sbus/hme.h b/src/devices/bus/sbus/hme.h index c3bb4ff2dfd..fde0571c755 100644 --- a/src/devices/bus/sbus/hme.h +++ b/src/devices/bus/sbus/hme.h @@ -29,9 +29,9 @@ protected: // device_sbus_slot_interface overrides virtual void install_device() override; - DECLARE_READ32_MEMBER(unknown_r); - DECLARE_WRITE32_MEMBER(unknown_w); - DECLARE_READ32_MEMBER(rom_r); + uint32_t unknown_r(offs_t offset, uint32_t mem_mask = ~0); + void unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rom_r(offs_t offset); private: void mem_map(address_map &map) override; diff --git a/src/devices/bus/sbus/sbus.cpp b/src/devices/bus/sbus/sbus.cpp index d8835549dce..4dff2c5db9b 100644 --- a/src/devices/bus/sbus/sbus.cpp +++ b/src/devices/bus/sbus/sbus.cpp @@ -103,12 +103,12 @@ void sbus_device::device_start() std::fill(std::begin(m_device_list), std::end(m_device_list), nullptr); m_space = &space(0); - m_space->install_readwrite_handler(0x00000000, 0x01ffffff, read32_delegate(*this, FUNC(sbus_device::slot_timeout_r<0>)), write32_delegate(*this, FUNC(sbus_device::slot_timeout_w<0>))); - m_space->install_readwrite_handler(0x02000000, 0x03ffffff, read32_delegate(*this, FUNC(sbus_device::slot_timeout_r<1>)), write32_delegate(*this, FUNC(sbus_device::slot_timeout_w<1>))); - m_space->install_readwrite_handler(0x04000000, 0x05ffffff, read32_delegate(*this, FUNC(sbus_device::slot_timeout_r<2>)), write32_delegate(*this, FUNC(sbus_device::slot_timeout_w<2>))); + m_space->install_readwrite_handler(0x00000000, 0x01ffffff, read32smo_delegate(*this, FUNC(sbus_device::slot_timeout_r<0>)), write32smo_delegate(*this, FUNC(sbus_device::slot_timeout_w<0>))); + m_space->install_readwrite_handler(0x02000000, 0x03ffffff, read32smo_delegate(*this, FUNC(sbus_device::slot_timeout_r<1>)), write32smo_delegate(*this, FUNC(sbus_device::slot_timeout_w<1>))); + m_space->install_readwrite_handler(0x04000000, 0x05ffffff, read32smo_delegate(*this, FUNC(sbus_device::slot_timeout_r<2>)), write32smo_delegate(*this, FUNC(sbus_device::slot_timeout_w<2>))); } -template READ32_MEMBER(sbus_device::slot_timeout_r) +template uint32_t sbus_device::slot_timeout_r() { m_maincpu->set_mae(); m_buserr(0, 0x20); @@ -116,19 +116,19 @@ template READ32_MEMBER(sbus_device::slot_timeout_r) return 0; } -template WRITE32_MEMBER(sbus_device::slot_timeout_w) +template void sbus_device::slot_timeout_w(uint32_t data) { m_maincpu->set_mae(); m_buserr(0, 0x8020); m_buserr(1, 0xffa00000 + (Slot << 21)); } -READ32_MEMBER(sbus_device::read) +uint32_t sbus_device::read(offs_t offset, uint32_t mem_mask) { return m_space->read_dword(offset << 2, mem_mask); } -WRITE32_MEMBER(sbus_device::write) +void sbus_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) { m_space->write_dword(offset << 2, data, mem_mask); } diff --git a/src/devices/bus/sbus/sbus.h b/src/devices/bus/sbus/sbus.h index 94c4cd7aa20..c6ad513f4ca 100644 --- a/src/devices/bus/sbus/sbus.h +++ b/src/devices/bus/sbus/sbus.h @@ -46,9 +46,6 @@ protected: // configuration required_device m_sbus; int m_slot; - - DECLARE_READ32_MEMBER(timeout_r); - DECLARE_WRITE32_MEMBER(timeout_w); }; DECLARE_DEVICE_TYPE(SBUS_SLOT, sbus_slot_device) @@ -92,8 +89,8 @@ public: m_space->install_device(addrstart, addrend, device, map, unitmask); } - DECLARE_READ32_MEMBER(read); - DECLARE_WRITE32_MEMBER(write); + uint32_t read(offs_t offset, uint32_t mem_mask = ~0); + void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); protected: sbus_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -117,8 +114,8 @@ private: void slot2_timeout_map(address_map &map); void slot3_timeout_map(address_map &map); - template DECLARE_READ32_MEMBER(slot_timeout_r); - template DECLARE_WRITE32_MEMBER(slot_timeout_w); + template uint32_t slot_timeout_r(); + template void slot_timeout_w(uint32_t data); }; DECLARE_DEVICE_TYPE(SBUS, sbus_device) diff --git a/src/devices/bus/sbus/sunpc.cpp b/src/devices/bus/sbus/sunpc.cpp index 7036e857393..bfb88b4726f 100644 --- a/src/devices/bus/sbus/sunpc.cpp +++ b/src/devices/bus/sbus/sunpc.cpp @@ -54,18 +54,18 @@ void sbus_sunpc_device::install_device() m_sbus->install_device(m_base, m_base + 0x1ffffff, *this, &sbus_sunpc_device::mem_map); } -READ32_MEMBER(sbus_sunpc_device::unknown_r) +uint32_t sbus_sunpc_device::unknown_r(offs_t offset, uint32_t mem_mask) { logerror("%s: unknown_r: %08x & %08x\n", machine().describe_context(), offset << 2, mem_mask); return 0; } -WRITE32_MEMBER(sbus_sunpc_device::unknown_w) +void sbus_sunpc_device::unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s: unknown_w: %08x = %08x & %08x\n", machine().describe_context(), offset << 2, data, mem_mask); } -READ32_MEMBER(sbus_sunpc_device::rom_r) +uint32_t sbus_sunpc_device::rom_r(offs_t offset) { return ((uint32_t*)m_rom->base())[offset]; } diff --git a/src/devices/bus/sbus/sunpc.h b/src/devices/bus/sbus/sunpc.h index 8c20c1be27e..951b0c6f7d6 100644 --- a/src/devices/bus/sbus/sunpc.h +++ b/src/devices/bus/sbus/sunpc.h @@ -29,9 +29,9 @@ protected: // device_sbus_slot_interface overrides virtual void install_device() override; - DECLARE_READ32_MEMBER(unknown_r); - DECLARE_WRITE32_MEMBER(unknown_w); - DECLARE_READ32_MEMBER(rom_r); + uint32_t unknown_r(offs_t offset, uint32_t mem_mask = ~0); + void unknown_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rom_r(offs_t offset); private: void mem_map(address_map &map) override; diff --git a/src/devices/bus/sms_ctrl/multitap.h b/src/devices/bus/sms_ctrl/multitap.h index 87f8b091274..6a2351c48f5 100644 --- a/src/devices/bus/sms_ctrl/multitap.h +++ b/src/devices/bus/sms_ctrl/multitap.h @@ -39,8 +39,6 @@ protected: virtual void peripheral_w(uint8_t data) override; private: - DECLARE_READ32_MEMBER(pixel_r); - required_device m_subctrl1_port; required_device m_subctrl2_port; required_device m_subctrl3_port; diff --git a/src/devices/bus/ti99/internal/genboard.cpp b/src/devices/bus/ti99/internal/genboard.cpp index 81b28a17d39..e985735021a 100644 --- a/src/devices/bus/ti99/internal/genboard.cpp +++ b/src/devices/bus/ti99/internal/genboard.cpp @@ -477,14 +477,14 @@ geneve_gate_array_device::geneve_gate_array_device(const machine_config &mconfig { } -WRITE8_MEMBER( geneve_gate_array_device::cru_sstep_write ) +void geneve_gate_array_device::cru_sstep_write(offs_t offset, uint8_t data) { // Single step // 13c0 - 13fe: 0001 0011 11xx xxx0 (offset << 1) LOGMASKED(LOG_WARN, "Single step not implemented; bit %d set to %d\n", offset & 0x001f, data); } -WRITE8_MEMBER( geneve_gate_array_device::cru_ctrl_write ) +void geneve_gate_array_device::cru_ctrl_write(offs_t offset, uint8_t data) { // This is just mirroring the internal flags of the 9995 int bit = (offset & 0x000f); diff --git a/src/devices/bus/ti99/internal/genboard.h b/src/devices/bus/ti99/internal/genboard.h index ef1e4402c44..218bdcb87ae 100644 --- a/src/devices/bus/ti99/internal/genboard.h +++ b/src/devices/bus/ti99/internal/genboard.h @@ -77,8 +77,8 @@ public: DECLARE_WRITE_LINE_MEMBER( dbin_in ); DECLARE_WRITE_LINE_MEMBER( extready_in ); DECLARE_WRITE_LINE_MEMBER( sndready_in ); - DECLARE_WRITE8_MEMBER( cru_sstep_write ); - DECLARE_WRITE8_MEMBER( cru_ctrl_write ); + void cru_sstep_write(offs_t offset, uint8_t data); + void cru_ctrl_write(offs_t offset, uint8_t data); // Outputs DECLARE_READ_LINE_MEMBER( csr_out ); diff --git a/src/devices/bus/ti99x/990_dk.cpp b/src/devices/bus/ti99x/990_dk.cpp index a634bba7a24..f9815b2302a 100644 --- a/src/devices/bus/ti99x/990_dk.cpp +++ b/src/devices/bus/ti99x/990_dk.cpp @@ -705,7 +705,7 @@ void fd800_legacy_device::do_cmd() 30: unit MSB 31: Interrupt (CBUSY???) (1 -> controller is ready) */ -READ8_MEMBER( fd800_legacy_device::cru_r ) +uint8_t fd800_legacy_device::cru_r(offs_t offset) { int reply = 0; @@ -736,7 +736,7 @@ READ8_MEMBER( fd800_legacy_device::cru_r ) 27: FD unit number MSB/extended command code 28-31: command code */ -WRITE8_MEMBER( fd800_legacy_device::cru_w ) +void fd800_legacy_device::cru_w(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/devices/bus/ti99x/990_dk.h b/src/devices/bus/ti99x/990_dk.h index d05278a187a..f5079462ccc 100644 --- a/src/devices/bus/ti99x/990_dk.h +++ b/src/devices/bus/ti99x/990_dk.h @@ -16,8 +16,8 @@ class fd800_legacy_device : public device_t public: fd800_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER( cru_r ); - DECLARE_WRITE8_MEMBER( cru_w ); + uint8_t cru_r(offs_t offset); + void cru_w(offs_t offset, uint8_t data); auto int_cb() { return m_int_line.bind(); } private: diff --git a/src/devices/bus/ti99x/990_hd.cpp b/src/devices/bus/ti99x/990_hd.cpp index a6ae9e63136..52e10ed8f1b 100644 --- a/src/devices/bus/ti99x/990_hd.cpp +++ b/src/devices/bus/ti99x/990_hd.cpp @@ -924,7 +924,7 @@ void ti990_hdc_device::execute_command() /* Read one register in TPCS space */ -READ16_MEMBER(ti990_hdc_device::read) +uint16_t ti990_hdc_device::read(offs_t offset) { if (offset < 8) return m_w[offset]; @@ -935,7 +935,7 @@ READ16_MEMBER(ti990_hdc_device::read) /* Write one register in TPCS space. Execute command if w7_idle is cleared. */ -WRITE16_MEMBER(ti990_hdc_device::write) +void ti990_hdc_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset < 8) { diff --git a/src/devices/bus/ti99x/990_hd.h b/src/devices/bus/ti99x/990_hd.h index 2f9be99a1e7..f934775654e 100644 --- a/src/devices/bus/ti99x/990_hd.h +++ b/src/devices/bus/ti99x/990_hd.h @@ -15,8 +15,8 @@ class ti990_hdc_device : public device_t public: ti990_hdc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(read); - DECLARE_WRITE16_MEMBER(write); + uint16_t read(offs_t offset); + void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); DECLARE_DEVICE_IMAGE_LOAD_MEMBER( load_hd ); DECLARE_DEVICE_IMAGE_UNLOAD_MEMBER( unload_hd ); diff --git a/src/devices/bus/ti99x/990_tap.cpp b/src/devices/bus/ti99x/990_tap.cpp index c60af16e24c..917c736fe11 100644 --- a/src/devices/bus/ti99x/990_tap.cpp +++ b/src/devices/bus/ti99x/990_tap.cpp @@ -853,7 +853,7 @@ void tap_990_device::execute_command() /* Read one register in TPCS space */ -READ16_MEMBER( tap_990_device::read ) +uint16_t tap_990_device::read(offs_t offset) { if (offset < 8) return m_w[offset]; @@ -864,7 +864,7 @@ READ16_MEMBER( tap_990_device::read ) /* Write one register in TPCS space. Execute command if w7_idle is cleared. */ -WRITE16_MEMBER( tap_990_device::write ) +void tap_990_device::write(offs_t offset, uint16_t data, uint16_t mem_mask) { if (offset < 8) { diff --git a/src/devices/bus/ti99x/990_tap.h b/src/devices/bus/ti99x/990_tap.h index 3be370a9f5a..00168cd896b 100644 --- a/src/devices/bus/ti99x/990_tap.h +++ b/src/devices/bus/ti99x/990_tap.h @@ -15,8 +15,8 @@ class tap_990_device : public device_t public: tap_990_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER( read ); - DECLARE_WRITE16_MEMBER( write ); + uint16_t read(offs_t offset); + void write(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void set_tape(int id, device_image_interface *img, bool bot, bool eot, bool wp) { diff --git a/src/devices/bus/tiki100/8088.cpp b/src/devices/bus/tiki100/8088.cpp index c9be41c8ae0..bd2ad5e4354 100644 --- a/src/devices/bus/tiki100/8088.cpp +++ b/src/devices/bus/tiki100/8088.cpp @@ -155,7 +155,7 @@ void tiki100_8088_device::iorq_w(offs_t offset, uint8_t data) // read - //------------------------------------------------- -READ8_MEMBER( tiki100_8088_device::read ) +uint8_t tiki100_8088_device::read() { return m_busak << 4 | m_data; } @@ -165,7 +165,7 @@ READ8_MEMBER( tiki100_8088_device::read ) // write - //------------------------------------------------- -WRITE8_MEMBER( tiki100_8088_device::write ) +void tiki100_8088_device::write(uint8_t data) { m_data = data & 0x0f; diff --git a/src/devices/bus/tiki100/8088.h b/src/devices/bus/tiki100/8088.h index 2e4e6966172..a997389ddf4 100644 --- a/src/devices/bus/tiki100/8088.h +++ b/src/devices/bus/tiki100/8088.h @@ -45,8 +45,8 @@ private: uint8_t m_data; - DECLARE_READ8_MEMBER( read ); - DECLARE_WRITE8_MEMBER( write ); + uint8_t read(); + void write(uint8_t data); void i8088_io(address_map &map); void i8088_mem(address_map &map); diff --git a/src/devices/bus/vme/vme.cpp b/src/devices/bus/vme/vme.cpp index 236dd258c73..d0338a4b71d 100644 --- a/src/devices/bus/vme/vme.cpp +++ b/src/devices/bus/vme/vme.cpp @@ -162,23 +162,23 @@ void vme_slot_device::device_config_complete() //------------------------------------------------- // P1 D8 read //------------------------------------------------- -READ8_MEMBER(vme_slot_device::read8) +uint8_t vme_slot_device::read8(offs_t offset) { uint16_t result = 0x00; LOG("%s %s\n", tag(), FUNCNAME); // printf("%s %s\n", tag(), FUNCNAME); - // if (m_card) result = m_card->read8(space, offset); + // if (m_card) result = m_card->read8(offset); return result; } //------------------------------------------------- // P1 D8 write //------------------------------------------------- -WRITE8_MEMBER(vme_slot_device::write8) +void vme_slot_device::write8(offs_t offset, uint8_t data) { LOG("%s %s\n", tag(), FUNCNAME); // printf("%s %s\n", tag(), FUNCNAME); - // if (m_card) m_card->write8(space, offset, data); + // if (m_card) m_card->write8(offset, data); } #if 0 // Disabled until we know how to make a board driver also a slot device @@ -487,14 +487,14 @@ void device_vme_card_interface::set_vme_device() } /* VME D8 accesses */ -READ8_MEMBER(device_vme_card_interface::read8) +uint8_t device_vme_card_interface::read8(offs_t offset) { uint8_t result = 0x00; LOG("%s %s Offset:%08x\n", m_device->tag(), FUNCNAME, offset); return result; } -WRITE8_MEMBER(device_vme_card_interface::write8) +void device_vme_card_interface::write8(offs_t offset, uint8_t data) { LOG("%s %s Offset:%08x\n", m_device->tag(), FUNCNAME, offset); } diff --git a/src/devices/bus/vme/vme.h b/src/devices/bus/vme/vme.h index 0492c2557fd..93947e40e91 100644 --- a/src/devices/bus/vme/vme.h +++ b/src/devices/bus/vme/vme.h @@ -105,8 +105,8 @@ public: void set_vme_slot(const char *tag, const char *slottag); void update_vme_chains(uint32_t slot_nbr); - virtual DECLARE_READ8_MEMBER(read8); - virtual DECLARE_WRITE8_MEMBER(write8); + virtual uint8_t read8(offs_t offset); + virtual void write8(offs_t offset, uint8_t data); protected: vme_slot_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); @@ -224,8 +224,8 @@ public: virtual ~device_vme_card_interface(); void set_vme_device(); - virtual DECLARE_READ8_MEMBER(read8); - virtual DECLARE_WRITE8_MEMBER(write8); + virtual uint8_t read8(offs_t offset); + virtual void write8(offs_t offset, uint8_t data); device_vme_card_interface(const machine_config &mconfig, device_t &device); diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp index d2a71141e21..e55037d6aca 100644 --- a/src/devices/bus/vme/vme_fccpu20.cpp +++ b/src/devices/bus/vme/vme_fccpu20.cpp @@ -496,13 +496,13 @@ void vme_fccpu20_device::device_timer (emu_timer &timer, device_timer_id id, int } /* Boot vector handler, the PCB hardwires the first 8 bytes from 0xff800000 to 0x0 at reset*/ -READ32_MEMBER (vme_fccpu20_device::bootvect_r) +uint32_t vme_fccpu20_device::bootvect_r(offs_t offset) { LOG("%s\n", FUNCNAME); return m_sysrom[offset]; } -WRITE32_MEMBER (vme_fccpu20_device::bootvect_w) +void vme_fccpu20_device::bootvect_w(offs_t offset, uint32_t data, uint32_t mem_mask) { LOG("%s\n", FUNCNAME); m_sysram[offset % ARRAY_LENGTH(m_sysram)] &= ~mem_mask; diff --git a/src/devices/bus/vme/vme_fccpu20.h b/src/devices/bus/vme/vme_fccpu20.h index d5f64ff3d5f..ede5e886f46 100644 --- a/src/devices/bus/vme/vme_fccpu20.h +++ b/src/devices/bus/vme/vme_fccpu20.h @@ -65,8 +65,8 @@ private: uint8_t pitc_r(); // Below are duplicated declarations from src/mame/drivers/fccpu20.cpp - DECLARE_READ32_MEMBER (bootvect_r); - DECLARE_WRITE32_MEMBER (bootvect_w); + uint32_t bootvect_r(offs_t offset); + void bootvect_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void cpu20_mem(address_map &map); void cpu_space_map(address_map &map); diff --git a/src/devices/bus/vme/vme_fcisio.cpp b/src/devices/bus/vme/vme_fcisio.cpp index 9961ae78597..d9e35370812 100644 --- a/src/devices/bus/vme/vme_fcisio.cpp +++ b/src/devices/bus/vme/vme_fcisio.cpp @@ -426,11 +426,11 @@ void vme_fcisio1_card_device::device_reset() } /* Boot vector handler, the PCB hardwires the first 8 bytes from 0x80000 to 0x0 */ -READ16_MEMBER (vme_fcisio1_card_device::bootvect_r){ +uint16_t vme_fcisio1_card_device::bootvect_r(offs_t offset){ return m_sysrom [offset]; } -READ8_MEMBER (vme_fcisio1_card_device::not_implemented_r){ +uint8_t vme_fcisio1_card_device::not_implemented_r(){ static int been_here = 0; if (!been_here++){ logerror(TODO); @@ -439,7 +439,7 @@ READ8_MEMBER (vme_fcisio1_card_device::not_implemented_r){ return (uint8_t) 0; } -WRITE8_MEMBER (vme_fcisio1_card_device::not_implemented_w){ +void vme_fcisio1_card_device::not_implemented_w(uint8_t data){ static int been_here = 0; if (!been_here++){ logerror(TODO); diff --git a/src/devices/bus/vme/vme_fcisio.h b/src/devices/bus/vme/vme_fcisio.h index 6f1f20ef39f..6ffecb0e6af 100644 --- a/src/devices/bus/vme/vme_fcisio.h +++ b/src/devices/bus/vme/vme_fcisio.h @@ -30,11 +30,11 @@ protected: private: uint8_t config_rd(); - DECLARE_READ16_MEMBER (bootvect_r); + uint16_t bootvect_r(offs_t offset); /* Dummy driver routines */ - DECLARE_READ8_MEMBER (not_implemented_r); - DECLARE_WRITE8_MEMBER (not_implemented_w); + uint8_t not_implemented_r(); + void not_implemented_w(uint8_t data); void fcisio1_mem(address_map &map); diff --git a/src/devices/bus/vme/vme_fcscsi.cpp b/src/devices/bus/vme/vme_fcscsi.cpp index 1682e0d9f17..79443b9d2e2 100644 --- a/src/devices/bus/vme/vme_fcscsi.cpp +++ b/src/devices/bus/vme/vme_fcscsi.cpp @@ -354,7 +354,7 @@ void vme_fcscsi1_card_device::device_reset() } /* Boot vector handler, the PCB hardwires the first 8 bytes from 0x80000 to 0x0 */ -READ16_MEMBER (vme_fcscsi1_card_device::bootvect_r){ +uint16_t vme_fcscsi1_card_device::bootvect_r(offs_t offset){ return m_sysrom [offset]; } @@ -370,12 +370,12 @@ Bit #: 7 6 5 4 3 2 1 0 \ ISCSI-l 1.D. Bit #2 */ -READ8_MEMBER (vme_fcscsi1_card_device::tcr_r){ +uint8_t vme_fcscsi1_card_device::tcr_r(){ LOG("%s\n", FUNCNAME); return (uint8_t) m_tcr; } -WRITE8_MEMBER (vme_fcscsi1_card_device::tcr_w){ +void vme_fcscsi1_card_device::tcr_w(uint8_t data){ floppy_image_device *floppy0 = m_fdc->subdevice("0")->get_device(); floppy_image_device *floppy1 = m_fdc->subdevice("1")->get_device(); floppy_image_device *floppy2 = m_fdc->subdevice("2")->get_device(); @@ -460,7 +460,7 @@ void vme_fcscsi1_card_device::fdc_write_byte(uint8_t data) m_fdc->data_w(data & 0xff); } -READ8_MEMBER(vme_fcscsi1_card_device::scsi_r) +uint8_t vme_fcscsi1_card_device::scsi_r(offs_t offset) { uint8_t data = 0; @@ -473,12 +473,12 @@ READ8_MEMBER(vme_fcscsi1_card_device::scsi_r) return data; } -WRITE8_MEMBER(vme_fcscsi1_card_device::scsi_w) +void vme_fcscsi1_card_device::scsi_w(offs_t offset, uint8_t data) { LOG("scsi W %02x <- %02x\n", offset, data); } -READ8_MEMBER (vme_fcscsi1_card_device::not_implemented_r){ +uint8_t vme_fcscsi1_card_device::not_implemented_r(){ static int been_here = 0; if (!been_here++){ logerror(TODO); @@ -487,7 +487,7 @@ READ8_MEMBER (vme_fcscsi1_card_device::not_implemented_r){ return (uint8_t) 0; } -WRITE8_MEMBER (vme_fcscsi1_card_device::not_implemented_w){ +void vme_fcscsi1_card_device::not_implemented_w(uint8_t data){ static int been_here = 0; if (!been_here++){ logerror(TODO); diff --git a/src/devices/bus/vme/vme_fcscsi.h b/src/devices/bus/vme/vme_fcscsi.h index 52bfec48dd5..9b7e8649bd3 100644 --- a/src/devices/bus/vme/vme_fcscsi.h +++ b/src/devices/bus/vme/vme_fcscsi.h @@ -44,17 +44,17 @@ private: void fdc_write_byte(uint8_t data); DECLARE_FLOPPY_FORMATS(floppy_formats); - DECLARE_READ16_MEMBER (bootvect_r); - DECLARE_READ8_MEMBER (tcr_r); - DECLARE_WRITE8_MEMBER (tcr_w); + uint16_t bootvect_r(offs_t offset); + uint8_t tcr_r(); + void tcr_w(uint8_t data); void led_w(uint8_t data); /* Dummy driver routines */ - DECLARE_READ8_MEMBER(not_implemented_r); - DECLARE_WRITE8_MEMBER(not_implemented_w); + uint8_t not_implemented_r(); + void not_implemented_w(uint8_t data); - DECLARE_READ8_MEMBER(scsi_r); - DECLARE_WRITE8_MEMBER(scsi_w); + uint8_t scsi_r(offs_t offset); + void scsi_w(offs_t offset, uint8_t data); void fcscsi1_mem(address_map &map); void cpu_space_map(address_map &map); diff --git a/src/devices/bus/vme/vme_hcpu30.cpp b/src/devices/bus/vme/vme_hcpu30.cpp index c101c53fbe4..55be33bde69 100644 --- a/src/devices/bus/vme/vme_hcpu30.cpp +++ b/src/devices/bus/vme/vme_hcpu30.cpp @@ -147,13 +147,13 @@ void vme_hcpu30_card_device::device_add_mconfig(machine_config &config) } /* Boot vector handler, the PCB hardwires the first 8 bytes from 0xff800000 to 0x0 at reset */ -READ32_MEMBER(vme_hcpu30_card_device::bootvect_r) +uint32_t vme_hcpu30_card_device::bootvect_r(offs_t offset) { LOG("%s\n", FUNCNAME); return m_sysrom[offset]; } -WRITE32_MEMBER(vme_hcpu30_card_device::bootvect_w) +void vme_hcpu30_card_device::bootvect_w(offs_t offset, uint32_t data, uint32_t mem_mask) { LOG("%s\n", FUNCNAME); m_sysram[offset % ARRAY_LENGTH(m_sysram)] &= ~mem_mask; diff --git a/src/devices/bus/vme/vme_hcpu30.h b/src/devices/bus/vme/vme_hcpu30.h index b4e387ace22..29a08b4183a 100644 --- a/src/devices/bus/vme/vme_hcpu30.h +++ b/src/devices/bus/vme/vme_hcpu30.h @@ -39,8 +39,8 @@ private: uint32_t *m_sysrom; uint32_t m_sysram[2]; - DECLARE_READ32_MEMBER(bootvect_r); - DECLARE_WRITE32_MEMBER(bootvect_w); + uint32_t bootvect_r(offs_t offset); + void bootvect_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); void hcpu30_mem(address_map &map); }; diff --git a/src/devices/bus/vme/vme_mvme350.cpp b/src/devices/bus/vme/vme_mvme350.cpp index 357ce3bd30b..1b8f2f7a564 100644 --- a/src/devices/bus/vme/vme_mvme350.cpp +++ b/src/devices/bus/vme/vme_mvme350.cpp @@ -252,12 +252,12 @@ void vme_mvme350_card_device::device_reset() } #if 0 -READ16_MEMBER (vme_mvme350_card_device::read16){ +uint16_t vme_mvme350_card_device::read16(){ LOG("%s()\n", FUNCNAME); return (uint8_t) 0; } -WRITE16_MEMBER (vme_mvme350_card_device::write16){ +void vme_mvme350_card_device::write16(uint16_t data){ LOG("%s()\n", FUNCNAME); } #endif diff --git a/src/devices/bus/vme/vme_mvme350.h b/src/devices/bus/vme/vme_mvme350.h index c140a5b9fc3..a328f3e7c53 100644 --- a/src/devices/bus/vme/vme_mvme350.h +++ b/src/devices/bus/vme/vme_mvme350.h @@ -15,8 +15,8 @@ public: vme_mvme350_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // Shared memory methods to be exported to the VME bus -// virtual DECLARE_READ16_MEMBER (read16) override; -// virtual DECLARE_WRITE16_MEMBER (write16) override; +// virtual uint16_t read16() override; +// virtual void write16(uint16_t data) override; protected: vme_mvme350_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/vme/vme_mzr8300.cpp b/src/devices/bus/vme/vme_mzr8300.cpp index 4aef834d395..cdcd3bd267e 100644 --- a/src/devices/bus/vme/vme_mzr8300.cpp +++ b/src/devices/bus/vme/vme_mzr8300.cpp @@ -197,12 +197,12 @@ void vme_mzr8300_card_device::device_reset() } #if 0 -READ8_MEMBER (vme_mzr8300_card_device::read8){ +uint8_t vme_mzr8300_card_device::read8(offs_t offset){ LOG("%s()\n", FUNCNAME); return (uint8_t) 0; } -WRITE8_MEMBER (vme_mzr8300_card_device::write8){ +void vme_mzr8300_card_device::write8(offs_t offset, uint8_t data){ LOG("%s()\n", FUNCNAME); } #endif diff --git a/src/devices/bus/vme/vme_mzr8300.h b/src/devices/bus/vme/vme_mzr8300.h index 6d105335276..d551bb2f077 100644 --- a/src/devices/bus/vme/vme_mzr8300.h +++ b/src/devices/bus/vme/vme_mzr8300.h @@ -14,8 +14,8 @@ class vme_mzr8300_card_device : public device_t, public device_vme_card_interfac public: vme_mzr8300_card_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); -// virtual DECLARE_READ8_MEMBER (read8) override; -// virtual DECLARE_WRITE8_MEMBER (write8) override; +// virtual uint8_t read8(offs_t offset) override; +// virtual void write8(offs_t offset, uint8_t data) override; protected: vme_mzr8300_card_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock); diff --git a/src/devices/bus/wangpc/wdc.cpp b/src/devices/bus/wangpc/wdc.cpp index 8b816a50ece..ddb6d07163b 100644 --- a/src/devices/bus/wangpc/wdc.cpp +++ b/src/devices/bus/wangpc/wdc.cpp @@ -292,7 +292,7 @@ bool wangpc_wdc_device::wangpcbus_have_dack(int line) // port_r - //------------------------------------------------- -READ8_MEMBER( wangpc_wdc_device::port_r ) +uint8_t wangpc_wdc_device::port_r() { /* @@ -317,7 +317,7 @@ READ8_MEMBER( wangpc_wdc_device::port_r ) // status_w - status register write //------------------------------------------------- -WRITE8_MEMBER( wangpc_wdc_device::status_w ) +void wangpc_wdc_device::status_w(uint8_t data) { logerror("WDC status %02x\n", data); @@ -325,11 +325,11 @@ WRITE8_MEMBER( wangpc_wdc_device::status_w ) } -READ8_MEMBER( wangpc_wdc_device::ctc_ch0_r ) { return m_ctc->read(0); } -WRITE8_MEMBER( wangpc_wdc_device::ctc_ch0_w ) { m_ctc->write(0, data); } -READ8_MEMBER( wangpc_wdc_device::ctc_ch1_r ) { return m_ctc->read(1); } -WRITE8_MEMBER( wangpc_wdc_device::ctc_ch1_w ) { m_ctc->write(1, data); } -READ8_MEMBER( wangpc_wdc_device::ctc_ch2_r ) { return m_ctc->read(2); } -WRITE8_MEMBER( wangpc_wdc_device::ctc_ch2_w ) { m_ctc->write(2, data); } -READ8_MEMBER( wangpc_wdc_device::ctc_ch3_r ) { return m_ctc->read(3); } -WRITE8_MEMBER( wangpc_wdc_device::ctc_ch3_w ) { m_ctc->write(3, data); } +uint8_t wangpc_wdc_device::ctc_ch0_r() { return m_ctc->read(0); } +void wangpc_wdc_device::ctc_ch0_w(uint8_t data) { m_ctc->write(0, data); } +uint8_t wangpc_wdc_device::ctc_ch1_r() { return m_ctc->read(1); } +void wangpc_wdc_device::ctc_ch1_w(uint8_t data) { m_ctc->write(1, data); } +uint8_t wangpc_wdc_device::ctc_ch2_r() { return m_ctc->read(2); } +void wangpc_wdc_device::ctc_ch2_w(uint8_t data) { m_ctc->write(2, data); } +uint8_t wangpc_wdc_device::ctc_ch3_r() { return m_ctc->read(3); } +void wangpc_wdc_device::ctc_ch3_w(uint8_t data) { m_ctc->write(3, data); } diff --git a/src/devices/bus/wangpc/wdc.h b/src/devices/bus/wangpc/wdc.h index c945ba6707d..cb09025e13e 100644 --- a/src/devices/bus/wangpc/wdc.h +++ b/src/devices/bus/wangpc/wdc.h @@ -50,16 +50,16 @@ protected: private: inline void set_irq(int state); - DECLARE_READ8_MEMBER( port_r ); - DECLARE_WRITE8_MEMBER( status_w ); - DECLARE_READ8_MEMBER( ctc_ch0_r ); - DECLARE_WRITE8_MEMBER( ctc_ch0_w ); - DECLARE_READ8_MEMBER( ctc_ch1_r ); - DECLARE_WRITE8_MEMBER( ctc_ch1_w ); - DECLARE_READ8_MEMBER( ctc_ch2_r ); - DECLARE_WRITE8_MEMBER( ctc_ch2_w ); - DECLARE_READ8_MEMBER( ctc_ch3_r ); - DECLARE_WRITE8_MEMBER( ctc_ch3_w ); + uint8_t port_r(); + void status_w(uint8_t data); + uint8_t ctc_ch0_r(); + void ctc_ch0_w(uint8_t data); + uint8_t ctc_ch1_r(); + void ctc_ch1_w(uint8_t data); + uint8_t ctc_ch2_r(); + void ctc_ch2_w(uint8_t data); + uint8_t ctc_ch3_r(); + void ctc_ch3_w(uint8_t data); void wangpc_wdc_io(address_map &map); void wangpc_wdc_mem(address_map &map); diff --git a/src/devices/bus/x68k/x68k_midi.cpp b/src/devices/bus/x68k/x68k_midi.cpp index 34243f758a2..2f55ce3781f 100644 --- a/src/devices/bus/x68k/x68k_midi.cpp +++ b/src/devices/bus/x68k/x68k_midi.cpp @@ -40,19 +40,19 @@ x68k_midi_device::x68k_midi_device(const machine_config &mconfig, const char *ta void x68k_midi_device::device_start() { m_slot = dynamic_cast(owner()); - m_slot->space().install_readwrite_handler(0xeafa00,0xeafa0f, read8_delegate(*this, FUNC(x68k_midi_device::x68k_midi_reg_r)), write8_delegate(*this, FUNC(x68k_midi_device::x68k_midi_reg_w)), 0x00ff00ff); + m_slot->space().install_readwrite_handler(0xeafa00,0xeafa0f, read8sm_delegate(*this, FUNC(x68k_midi_device::x68k_midi_reg_r)), write8sm_delegate(*this, FUNC(x68k_midi_device::x68k_midi_reg_w)), 0x00ff00ff); } void x68k_midi_device::device_reset() { } -READ8_MEMBER(x68k_midi_device::x68k_midi_reg_r) +uint8_t x68k_midi_device::x68k_midi_reg_r(offs_t offset) { return m_midi->read(offset); } -WRITE8_MEMBER(x68k_midi_device::x68k_midi_reg_w) +void x68k_midi_device::x68k_midi_reg_w(offs_t offset, uint8_t data) { m_midi->write(offset, data); } diff --git a/src/devices/bus/x68k/x68k_midi.h b/src/devices/bus/x68k/x68k_midi.h index 405ab433bd9..b43968d468b 100644 --- a/src/devices/bus/x68k/x68k_midi.h +++ b/src/devices/bus/x68k/x68k_midi.h @@ -27,8 +27,8 @@ public: // optional information overrides virtual void device_add_mconfig(machine_config &config) override; - DECLARE_READ8_MEMBER(x68k_midi_reg_r); - DECLARE_WRITE8_MEMBER(x68k_midi_reg_w); + uint8_t x68k_midi_reg_r(offs_t offset); + void x68k_midi_reg_w(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/bus/x68k/x68k_neptunex.cpp b/src/devices/bus/x68k/x68k_neptunex.cpp index 608acd4587c..b5c10545cd9 100644 --- a/src/devices/bus/x68k/x68k_neptunex.cpp +++ b/src/devices/bus/x68k/x68k_neptunex.cpp @@ -47,14 +47,14 @@ void x68k_neptune_device::device_start() mac[0] = 0; mac[1] = 0; // avoid gcc warning memcpy(m_prom, mac, 6); m_dp8390->set_mac(mac); - m_slot->space().install_readwrite_handler(0xece000,0xece3ff, read16_delegate(*this, FUNC(x68k_neptune_device::x68k_neptune_port_r)), write16_delegate(*this, FUNC(x68k_neptune_device::x68k_neptune_port_w)), 0xffffffff); + m_slot->space().install_readwrite_handler(0xece000,0xece3ff, read16s_delegate(*this, FUNC(x68k_neptune_device::x68k_neptune_port_r)), write16s_delegate(*this, FUNC(x68k_neptune_device::x68k_neptune_port_w)), 0xffffffff); } void x68k_neptune_device::device_reset() { memcpy(m_prom, m_dp8390->get_mac(), 6); } -READ16_MEMBER(x68k_neptune_device::x68k_neptune_port_r) +uint16_t x68k_neptune_device::x68k_neptune_port_r(offs_t offset, uint16_t mem_mask) { uint16_t data; @@ -81,7 +81,7 @@ READ16_MEMBER(x68k_neptune_device::x68k_neptune_port_r) return 0; } -WRITE16_MEMBER(x68k_neptune_device::x68k_neptune_port_w) +void x68k_neptune_device::x68k_neptune_port_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if(offset >= 0x100+32 || offset < 0x100) return; diff --git a/src/devices/bus/x68k/x68k_neptunex.h b/src/devices/bus/x68k/x68k_neptunex.h index 6bcfe6f7025..b60a58d46e1 100644 --- a/src/devices/bus/x68k/x68k_neptunex.h +++ b/src/devices/bus/x68k/x68k_neptunex.h @@ -27,8 +27,8 @@ public: // construction/destruction x68k_neptune_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER(x68k_neptune_port_r); - DECLARE_WRITE16_MEMBER(x68k_neptune_port_w); + uint16_t x68k_neptune_port_r(offs_t offset, uint16_t mem_mask = ~0); + void x68k_neptune_port_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); protected: // device-level overrides diff --git a/src/devices/bus/x68k/x68k_scsiext.cpp b/src/devices/bus/x68k/x68k_scsiext.cpp index 22a35a17297..54766c445ac 100644 --- a/src/devices/bus/x68k/x68k_scsiext.cpp +++ b/src/devices/bus/x68k/x68k_scsiext.cpp @@ -72,7 +72,7 @@ void x68k_scsiext_device::device_start() uint8_t *ROM = machine().root_device().memregion(subtag("scsiexrom").c_str())->base(); machine().root_device().membank("scsi_ext")->set_base(ROM); - m_slot->space().install_readwrite_handler(0xea0000,0xea001f, read8_delegate(*this, FUNC(x68k_scsiext_device::register_r)), write8_delegate(*this, FUNC(x68k_scsiext_device::register_w)), 0x00ff00ff); + m_slot->space().install_readwrite_handler(0xea0000,0xea001f, read8sm_delegate(*this, FUNC(x68k_scsiext_device::register_r)), write8sm_delegate(*this, FUNC(x68k_scsiext_device::register_w)), 0x00ff00ff); } void x68k_scsiext_device::device_reset() @@ -94,12 +94,12 @@ void x68k_scsiext_device::drq_w(int state) // TODO } -READ8_MEMBER(x68k_scsiext_device::register_r) +uint8_t x68k_scsiext_device::register_r(offs_t offset) { return m_spc->mb89352_r(offset); } -WRITE8_MEMBER(x68k_scsiext_device::register_w) +void x68k_scsiext_device::register_w(offs_t offset, uint8_t data) { m_spc->mb89352_w(offset,data); } diff --git a/src/devices/bus/x68k/x68k_scsiext.h b/src/devices/bus/x68k/x68k_scsiext.h index 19dd534d88b..c3be3ab84b5 100644 --- a/src/devices/bus/x68k/x68k_scsiext.h +++ b/src/devices/bus/x68k/x68k_scsiext.h @@ -21,8 +21,8 @@ public: // construction/destruction x68k_scsiext_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(register_r); - DECLARE_WRITE8_MEMBER(register_w); + uint8_t register_r(offs_t offset); + void register_w(offs_t offset, uint8_t data); protected: // device-level overrides diff --git a/src/devices/cpu/alto2/a2hw.cpp b/src/devices/cpu/alto2/a2hw.cpp index bdb8897d1d7..acb5c913232 100644 --- a/src/devices/cpu/alto2/a2hw.cpp +++ b/src/devices/cpu/alto2/a2hw.cpp @@ -13,173 +13,173 @@ * @brief read printer paper ready bit * Paper ready bit. 0 when the printer is ready for a paper scrolling operation. */ -READ16_MEMBER ( alto2_cpu_device::pprdy_r ) { return X_RDBITS(m_hw.utilin,16,0,0); } +uint16_t alto2_cpu_device::pprdy_r() { return X_RDBITS(m_hw.utilin,16,0,0); } /** * @brief read printer check bit * Printer check bit bit. * Should the printer find itself in an abnormal state, it sets this bit to 0 */ -READ16_MEMBER ( alto2_cpu_device::pcheck_r ) { return X_RDBITS(m_hw.utilin,16,1,1); } +uint16_t alto2_cpu_device::pcheck_r() { return X_RDBITS(m_hw.utilin,16,1,1); } /** * @brief read unused bit 2 */ -READ16_MEMBER ( alto2_cpu_device::unused2_r ) { return X_RDBITS(m_hw.utilin,16,2,2); } +uint16_t alto2_cpu_device::unused2_r() { return X_RDBITS(m_hw.utilin,16,2,2); } /** * @brief read printer daisy ready bit * Daisy ready bit. 0 when the printer is ready to print a character. */ -READ16_MEMBER ( alto2_cpu_device::pchrdy_r ) { return X_RDBITS(m_hw.utilin,16,3,3); } +uint16_t alto2_cpu_device::pchrdy_r() { return X_RDBITS(m_hw.utilin,16,3,3); } /** * @brief read printer carriage ready bit * Carriage ready bit. 0 when the printer is ready for horizontal positioning. */ -READ16_MEMBER ( alto2_cpu_device::parrdy_r ) { return X_RDBITS(m_hw.utilin,16,4,4); } +uint16_t alto2_cpu_device::parrdy_r() { return X_RDBITS(m_hw.utilin,16,4,4); } /** * @brief read printer ready bit * Ready bit. Both this bit and the appropriate other ready bit (carriage, * daisy, etc.) must be 0 before attempting any output operation. */ -READ16_MEMBER ( alto2_cpu_device::pready_r ) { return X_RDBITS(m_hw.utilin,16,5,5); } +uint16_t alto2_cpu_device::pready_r() { return X_RDBITS(m_hw.utilin,16,5,5); } /** * @brief memory configuration switch */ -READ16_MEMBER ( alto2_cpu_device::memconfig_r ) { return X_RDBITS(m_hw.utilin,16,6,6); } +uint16_t alto2_cpu_device::memconfig_r() { return X_RDBITS(m_hw.utilin,16,6,6); } /** * @brief get unused bit 7 */ -READ16_MEMBER ( alto2_cpu_device::unused7_r ) { return X_RDBITS(m_hw.utilin,16,7,7); } +uint16_t alto2_cpu_device::unused7_r() { return X_RDBITS(m_hw.utilin,16,7,7); } /** * @brief get key set key 0 */ -READ16_MEMBER ( alto2_cpu_device::keyset_key0_r ) { return X_RDBITS(m_hw.utilin,16,8,8); } +uint16_t alto2_cpu_device::keyset_key0_r() { return X_RDBITS(m_hw.utilin,16,8,8); } /** * @brief get key set key 1 */ -READ16_MEMBER ( alto2_cpu_device::keyset_key1_r ) { return X_RDBITS(m_hw.utilin,16,9,9); } +uint16_t alto2_cpu_device::keyset_key1_r() { return X_RDBITS(m_hw.utilin,16,9,9); } /** * @brief get key set key 2 */ -READ16_MEMBER ( alto2_cpu_device::keyset_key2_r ) { return X_RDBITS(m_hw.utilin,16,10,10); } +uint16_t alto2_cpu_device::keyset_key2_r() { return X_RDBITS(m_hw.utilin,16,10,10); } /** * @brief get key set key 3 */ -READ16_MEMBER ( alto2_cpu_device::keyset_key3_r ) { return X_RDBITS(m_hw.utilin,16,11,11); } +uint16_t alto2_cpu_device::keyset_key3_r() { return X_RDBITS(m_hw.utilin,16,11,11); } /** * @brief get key set key 4 */ -READ16_MEMBER ( alto2_cpu_device::keyset_key4_r ) { return X_RDBITS(m_hw.utilin,16,12,12); } +uint16_t alto2_cpu_device::keyset_key4_r() { return X_RDBITS(m_hw.utilin,16,12,12); } /** * @brief get mouse red button bit */ -READ16_MEMBER ( alto2_cpu_device::mouse_red_r ) { return X_RDBITS(m_hw.utilin,16,13,13); } +uint16_t alto2_cpu_device::mouse_red_r() { return X_RDBITS(m_hw.utilin,16,13,13); } /** * @brief get mouse blue button bit */ -READ16_MEMBER ( alto2_cpu_device::mouse_blue_r ) { return X_RDBITS(m_hw.utilin,16,14,14); } +uint16_t alto2_cpu_device::mouse_blue_r() { return X_RDBITS(m_hw.utilin,16,14,14); } /** * @brief get mouse yellow button bit */ -READ16_MEMBER ( alto2_cpu_device::mouse_yellow_r ) { return X_RDBITS(m_hw.utilin,16,15,15); } +uint16_t alto2_cpu_device::mouse_yellow_r() { return X_RDBITS(m_hw.utilin,16,15,15); } /** * @brief write printer paper ready bit */ -WRITE16_MEMBER( alto2_cpu_device::pprdy_w ) { X_WRBITS(m_hw.utilin,16,0,0,data); } +void alto2_cpu_device::pprdy_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,0,0,data); } /** * @brief write printer check bit */ -WRITE16_MEMBER( alto2_cpu_device::pcheck_w ) { X_WRBITS(m_hw.utilin,16,1,1,data); } +void alto2_cpu_device::pcheck_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,1,1,data); } /** * @brief read unused bit 2 */ -WRITE16_MEMBER( alto2_cpu_device::unused2_w ) { X_WRBITS(m_hw.utilin,16,2,2,data); } +void alto2_cpu_device::unused2_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,2,2,data); } /** * @brief write printer daisy ready bit */ -WRITE16_MEMBER( alto2_cpu_device::pchrdy_w ) { X_WRBITS(m_hw.utilin,16,3,3,data); } +void alto2_cpu_device::pchrdy_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,3,3,data); } /** * @brief write printer carriage ready bit */ -WRITE16_MEMBER( alto2_cpu_device::parrdy_w ) { X_WRBITS(m_hw.utilin,16,4,4,data); } +void alto2_cpu_device::parrdy_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,4,4,data); } /** * @brief write printer ready bit */ -WRITE16_MEMBER( alto2_cpu_device::pready_w ) { X_WRBITS(m_hw.utilin,16,5,5,data); } +void alto2_cpu_device::pready_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,5,5,data); } /** * @brief write memory configuration switch */ -WRITE16_MEMBER( alto2_cpu_device::memconfig_w ) { X_WRBITS(m_hw.utilin,16,6,6,data); } +void alto2_cpu_device::memconfig_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,6,6,data); } /** * @brief write unused bit 7 */ -WRITE16_MEMBER( alto2_cpu_device::unused7_w ) { X_WRBITS(m_hw.utilin,16,7,7,data); } +void alto2_cpu_device::unused7_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,7,7,data); } /** * @brief write key set key 0 */ -WRITE16_MEMBER( alto2_cpu_device::keyset_key0_w ) { X_WRBITS(m_hw.utilin,16,8,8,data); } +void alto2_cpu_device::keyset_key0_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,8,8,data); } /** * @brief write key set key 1 */ -WRITE16_MEMBER( alto2_cpu_device::keyset_key1_w ) { X_WRBITS(m_hw.utilin,16,9,9,data); } +void alto2_cpu_device::keyset_key1_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,9,9,data); } /** * @brief write key set key 2 */ -WRITE16_MEMBER( alto2_cpu_device::keyset_key2_w ) { X_WRBITS(m_hw.utilin,16,10,10,data); } +void alto2_cpu_device::keyset_key2_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,10,10,data); } /** * @brief write key set key 3 */ -WRITE16_MEMBER( alto2_cpu_device::keyset_key3_w ) { X_WRBITS(m_hw.utilin,16,11,11,data); } +void alto2_cpu_device::keyset_key3_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,11,11,data); } /** * @brief write key set key 4 */ -WRITE16_MEMBER( alto2_cpu_device::keyset_key4_w ) { X_WRBITS(m_hw.utilin,16,12,12,data); } +void alto2_cpu_device::keyset_key4_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,12,12,data); } /** * @brief write mouse red button bit */ -WRITE16_MEMBER( alto2_cpu_device::mouse_red_w ) { X_WRBITS(m_hw.utilin,16,13,13,data); } +void alto2_cpu_device::mouse_red_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,13,13,data); } /** * @brief write mouse blue button bit */ -WRITE16_MEMBER( alto2_cpu_device::mouse_blue_w ) { X_WRBITS(m_hw.utilin,16,14,14,data); } +void alto2_cpu_device::mouse_blue_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,14,14,data); } /** * @brief write mouse yellow button bit */ -WRITE16_MEMBER( alto2_cpu_device::mouse_yellow_w ) { X_WRBITS(m_hw.utilin,16,15,15,data); } +void alto2_cpu_device::mouse_yellow_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,15,15,data); } /** * @brief write mouse buttons bits */ -WRITE16_MEMBER( alto2_cpu_device::mouse_buttons_w ) { X_WRBITS(m_hw.utilin,16,13,15,data); } +void alto2_cpu_device::mouse_buttons_w(uint16_t data) { X_WRBITS(m_hw.utilin,16,13,15,data); } /** * @brief printer paper strobe bit @@ -234,7 +234,7 @@ WRITE16_MEMBER( alto2_cpu_device::mouse_buttons_w ) { X_WRBITS(m_hw.utilin,16,13 * @param offset memory mapped I/O address to be read * @return current value on the UTILIN port */ -READ16_MEMBER( alto2_cpu_device::utilin_r ) +uint16_t alto2_cpu_device::utilin_r(offs_t offset) { uint16_t data; // FIXME: update the printer status @@ -254,7 +254,7 @@ READ16_MEMBER( alto2_cpu_device::utilin_r ) * @param offset memory mapped I/O address to be read * @return current value on the XBUS port latch */ -READ16_MEMBER( alto2_cpu_device::xbus_r ) +uint16_t alto2_cpu_device::xbus_r(offs_t offset) { uint16_t data = m_hw.xbus[offset & 3]; @@ -272,7 +272,7 @@ READ16_MEMBER( alto2_cpu_device::xbus_r ) * @param addr memory mapped I/O address to be read * @param data value to write to the XBUS port latch */ -WRITE16_MEMBER( alto2_cpu_device::xbus_w ) +void alto2_cpu_device::xbus_w(offs_t offset, uint16_t data) { if (!machine().side_effects_disabled()) { LOG((this,LOG_HW,2," XBUS[%d] wr %#o (%#o)\n", offset & 3, offset, data)); @@ -286,7 +286,7 @@ WRITE16_MEMBER( alto2_cpu_device::xbus_w ) * @param addr memory mapped I/O address to be read * @return current value on the UTILOUT port latch */ -READ16_MEMBER( alto2_cpu_device::utilout_r ) +uint16_t alto2_cpu_device::utilout_r(offs_t offset) { uint16_t data = m_hw.utilout ^ 0177777; if (!machine().side_effects_disabled()) { @@ -303,7 +303,7 @@ READ16_MEMBER( alto2_cpu_device::utilout_r ) * @param addr memory mapped I/O address to be read * @param data value to write to the UTILOUT port latch */ -WRITE16_MEMBER( alto2_cpu_device::utilout_w ) +void alto2_cpu_device::utilout_w(offs_t offset, uint16_t data) { if (!machine().side_effects_disabled()) { LOG((this,LOG_HW,2," UTILOUT wr %#o (%#o)\n", offset, data)); diff --git a/src/devices/cpu/alto2/a2hw.h b/src/devices/cpu/alto2/a2hw.h index 18accb36c23..e429ca65699 100644 --- a/src/devices/cpu/alto2/a2hw.h +++ b/src/devices/cpu/alto2/a2hw.h @@ -18,49 +18,49 @@ struct { uint16_t utilin; //!< the UTILIN port at 0177030 to 0177033 (same value on all addresses) } m_hw; -DECLARE_READ16_MEMBER ( pprdy_r ); //!< read UTILIN[0] printer paper ready bit -DECLARE_READ16_MEMBER ( pcheck_r ); //!< read UTILIN[1] printer check bit -DECLARE_READ16_MEMBER ( unused2_r ); //!< read UTILIN[2] unused bit -DECLARE_READ16_MEMBER ( pchrdy_r ); //!< read UTILIN[3] printer daisy ready bit -DECLARE_READ16_MEMBER ( parrdy_r ); //!< read UTILIN[4] printer carriage ready bit -DECLARE_READ16_MEMBER ( pready_r ); //!< read UTILIN[5] printer ready bit -DECLARE_READ16_MEMBER ( memconfig_r ); //!< read UTILIN[6] memory config switch -DECLARE_READ16_MEMBER ( unused7_r ); //!< read UTILIN[7] unused bit -DECLARE_READ16_MEMBER ( keyset_key0_r ); //!< read UTILIN[8] keyset key #0 -DECLARE_READ16_MEMBER ( keyset_key1_r ); //!< read UTILIN[9] keyset key #1 -DECLARE_READ16_MEMBER ( keyset_key2_r ); //!< read UTILIN[10] keyset key #2 -DECLARE_READ16_MEMBER ( keyset_key3_r ); //!< read UTILIN[11] keyset key #3 -DECLARE_READ16_MEMBER ( keyset_key4_r ); //!< read UTILIN[12] keyset key #4 -DECLARE_READ16_MEMBER ( mouse_red_r ); //!< read UTILIN[13] mouse red button bit -DECLARE_READ16_MEMBER ( mouse_blue_r ); //!< read UTILIN[14] mouse blue button bit -DECLARE_READ16_MEMBER ( mouse_yellow_r ); //!< read UTILIN[15] mouse yellow button bit +uint16_t pprdy_r(); //!< read UTILIN[0] printer paper ready bit +uint16_t pcheck_r(); //!< read UTILIN[1] printer check bit +uint16_t unused2_r(); //!< read UTILIN[2] unused bit +uint16_t pchrdy_r(); //!< read UTILIN[3] printer daisy ready bit +uint16_t parrdy_r(); //!< read UTILIN[4] printer carriage ready bit +uint16_t pready_r(); //!< read UTILIN[5] printer ready bit +uint16_t memconfig_r(); //!< read UTILIN[6] memory config switch +uint16_t unused7_r(); //!< read UTILIN[7] unused bit +uint16_t keyset_key0_r(); //!< read UTILIN[8] keyset key #0 +uint16_t keyset_key1_r(); //!< read UTILIN[9] keyset key #1 +uint16_t keyset_key2_r(); //!< read UTILIN[10] keyset key #2 +uint16_t keyset_key3_r(); //!< read UTILIN[11] keyset key #3 +uint16_t keyset_key4_r(); //!< read UTILIN[12] keyset key #4 +uint16_t mouse_red_r(); //!< read UTILIN[13] mouse red button bit +uint16_t mouse_blue_r(); //!< read UTILIN[14] mouse blue button bit +uint16_t mouse_yellow_r(); //!< read UTILIN[15] mouse yellow button bit -DECLARE_WRITE16_MEMBER( pprdy_w ); //!< write UTILIN[0] printer paper ready bit -DECLARE_WRITE16_MEMBER( pcheck_w ); //!< write UTILIN[1] printer check bit -DECLARE_WRITE16_MEMBER( unused2_w ); //!< write UTILIN[2] unused bit -DECLARE_WRITE16_MEMBER( pchrdy_w ); //!< write UTILIN[3] printer daisy ready bit -DECLARE_WRITE16_MEMBER( parrdy_w ); //!< write UTILIN[4] carriage ready bit -DECLARE_WRITE16_MEMBER( pready_w ); //!< write UTILIN[5] printer ready bit -DECLARE_WRITE16_MEMBER( memconfig_w ); //!< write UTILIN[6] memory config switch -DECLARE_WRITE16_MEMBER( unused7_w ); //!< write UTILIN[7] unused bit -DECLARE_WRITE16_MEMBER( keyset_key0_w ); //!< write UTILIN[8] keyset key #0 -DECLARE_WRITE16_MEMBER( keyset_key1_w ); //!< write UTILIN[9] keyset key #1 -DECLARE_WRITE16_MEMBER( keyset_key2_w ); //!< write UTILIN[10] keyset key #2 -DECLARE_WRITE16_MEMBER( keyset_key3_w ); //!< write UTILIN[11] keyset key #3 -DECLARE_WRITE16_MEMBER( keyset_key4_w ); //!< write UTILIN[12] keyset key #4 -DECLARE_WRITE16_MEMBER( mouse_red_w ); //!< write UTILIN[13] mouse red button bit -DECLARE_WRITE16_MEMBER( mouse_blue_w ); //!< write UTILIN[14] mouse blue button bit -DECLARE_WRITE16_MEMBER( mouse_yellow_w ); //!< write UTILIN[15] mouse yellow button bit -DECLARE_WRITE16_MEMBER( mouse_buttons_w ); //!< write UTILIN[13-15] mouse buttons bits +void pprdy_w(uint16_t data); //!< write UTILIN[0] printer paper ready bit +void pcheck_w(uint16_t data); //!< write UTILIN[1] printer check bit +void unused2_w(uint16_t data); //!< write UTILIN[2] unused bit +void pchrdy_w(uint16_t data); //!< write UTILIN[3] printer daisy ready bit +void parrdy_w(uint16_t data); //!< write UTILIN[4] carriage ready bit +void pready_w(uint16_t data); //!< write UTILIN[5] printer ready bit +void memconfig_w(uint16_t data); //!< write UTILIN[6] memory config switch +void unused7_w(uint16_t data); //!< write UTILIN[7] unused bit +void keyset_key0_w(uint16_t data); //!< write UTILIN[8] keyset key #0 +void keyset_key1_w(uint16_t data); //!< write UTILIN[9] keyset key #1 +void keyset_key2_w(uint16_t data); //!< write UTILIN[10] keyset key #2 +void keyset_key3_w(uint16_t data); //!< write UTILIN[11] keyset key #3 +void keyset_key4_w(uint16_t data); //!< write UTILIN[12] keyset key #4 +void mouse_red_w(uint16_t data); //!< write UTILIN[13] mouse red button bit +void mouse_blue_w(uint16_t data); //!< write UTILIN[14] mouse blue button bit +void mouse_yellow_w(uint16_t data); //!< write UTILIN[15] mouse yellow button bit +void mouse_buttons_w(uint16_t data); //!< write UTILIN[13-15] mouse buttons bits -DECLARE_READ16_MEMBER ( utilin_r ); //!< read an UTILIN address -DECLARE_READ16_MEMBER ( utilout_r ); //!< read the UTILOUT address -DECLARE_WRITE16_MEMBER( utilout_w ); //!< write the UTILOUT address -DECLARE_READ16_MEMBER ( xbus_r ); //!< read an XBUS address -DECLARE_WRITE16_MEMBER( xbus_w ); //!< write an XBUS address (?) +uint16_t utilin_r(offs_t offset); //!< read an UTILIN address +uint16_t utilout_r(offs_t offset); //!< read the UTILOUT address +void utilout_w(offs_t offset, uint16_t data); //!< write the UTILOUT address +uint16_t xbus_r(offs_t offset); //!< read an XBUS address +void xbus_w(offs_t offset, uint16_t data); //!< write an XBUS address (?) -void init_hw(); //!< initialize miscellaneous hardware -void exit_hw(); //!< deinitialize miscellaneous hardware -void reset_hw(); //!< reset miscellaneous hardware +void init_hw(); //!< initialize miscellaneous hardware +void exit_hw(); //!< deinitialize miscellaneous hardware +void reset_hw(); //!< reset miscellaneous hardware #endif // _A2HW_H_ #endif // ALTO2_DEFINE_CONSTANTS diff --git a/src/devices/cpu/alto2/a2kbd.cpp b/src/devices/cpu/alto2/a2kbd.cpp index 4f7831beffb..ad94be209b4 100644 --- a/src/devices/cpu/alto2/a2kbd.cpp +++ b/src/devices/cpu/alto2/a2kbd.cpp @@ -14,7 +14,7 @@ * @param addr memory mapped I/O address to be read * @return keyboard matrix value for address modulo 4 */ -READ16_MEMBER( alto2_cpu_device::kbd_ad_r ) +uint16_t alto2_cpu_device::kbd_ad_r(offs_t offset) { uint16_t data = m_kb_read_callback(offset & 3); m_kbd.matrix[offset & 03] = data; diff --git a/src/devices/cpu/alto2/a2kbd.h b/src/devices/cpu/alto2/a2kbd.h index 8f5c9dd2538..856695c4bd6 100644 --- a/src/devices/cpu/alto2/a2kbd.h +++ b/src/devices/cpu/alto2/a2kbd.h @@ -100,7 +100,7 @@ struct { uint16_t matrix[4]; //!< a bit map of the keys pressed (ioports ROW0 ... ROW3) } m_kbd; -DECLARE_READ16_MEMBER( kbd_ad_r ); //!< read the keyboard matrix +uint16_t kbd_ad_r(offs_t offset); //!< read the keyboard matrix void init_kbd(uint16_t bootkey = 0177777); //!< initialize the keyboard hardware, optionally set the boot key void exit_kbd(); //!< deinitialize the keyboard hardware diff --git a/src/devices/cpu/alto2/a2mem.cpp b/src/devices/cpu/alto2/a2mem.cpp index 036ac05e23e..aff5fcdd908 100644 --- a/src/devices/cpu/alto2/a2mem.cpp +++ b/src/devices/cpu/alto2/a2mem.cpp @@ -482,7 +482,7 @@ uint32_t alto2_cpu_device::hamming_code(bool write, uint32_t dw_addr, uint32_t d * memory access. Note that MEAR is set whenever an error of * _any kind_ (single-bit or double-bit) is detected. */ -READ16_MEMBER( alto2_cpu_device::mear_r ) +uint16_t alto2_cpu_device::mear_r() { int data = m_mem.error ? m_mem.mear : m_mem.mar; if (!machine().side_effects_disabled()) { @@ -507,7 +507,7 @@ READ16_MEMBER( alto2_cpu_device::mear_r ) * MESR[14-15] Bank number in which error occurred * */ -READ16_MEMBER( alto2_cpu_device::mesr_r ) +uint16_t alto2_cpu_device::mesr_r() { uint16_t data = m_mem.mesr ^ 0177777; if (!machine().side_effects_disabled()) { @@ -521,7 +521,7 @@ READ16_MEMBER( alto2_cpu_device::mesr_r ) return data; } -WRITE16_MEMBER( alto2_cpu_device::mesr_w ) +void alto2_cpu_device::mesr_w(uint16_t data) { if (!machine().side_effects_disabled()) { LOG((this,LOG_MEM,2," MESR write %07o (clear MESR; was %07o)\n", data, m_mem.mesr)); @@ -552,7 +552,7 @@ WRITE16_MEMBER( alto2_cpu_device::mesr_w ) * MECR[15] Spare * */ -WRITE16_MEMBER( alto2_cpu_device::mecr_w ) +void alto2_cpu_device::mecr_w(uint16_t data) { m_mem.mecr = data ^ 0177777; // clear spare bits @@ -571,7 +571,7 @@ WRITE16_MEMBER( alto2_cpu_device::mecr_w ) /** * @brief memory error control register read */ -READ16_MEMBER( alto2_cpu_device::mecr_r ) +uint16_t alto2_cpu_device::mecr_r() { uint16_t data = m_mem.mecr ^ 0177777; // all spare bits are set @@ -591,7 +591,7 @@ READ16_MEMBER( alto2_cpu_device::mecr_r ) * Note: This is for debugger access. Regular memory access is * only through load_mar, read_mem and write_mem. */ -READ16_MEMBER ( alto2_cpu_device::ioram_r ) +uint16_t alto2_cpu_device::ioram_r(offs_t offset) { offs_t dw_addr = offset / 2; return static_cast(offset & 1 ? GET_ODD(m_mem.ram[dw_addr]) : GET_EVEN(m_mem.ram[dw_addr])); @@ -602,7 +602,7 @@ READ16_MEMBER ( alto2_cpu_device::ioram_r ) * Note: This is for debugger access. Regular memory access is * only through load_mar, read_mem and write_mem. */ -WRITE16_MEMBER( alto2_cpu_device::ioram_w ) +void alto2_cpu_device::ioram_w(offs_t offset, uint16_t data) { offs_t dw_addr = offset / 2; if (offset & 1) diff --git a/src/devices/cpu/alto2/a2mem.h b/src/devices/cpu/alto2/a2mem.h index 8c79c439a6c..631f98cfbc7 100644 --- a/src/devices/cpu/alto2/a2mem.h +++ b/src/devices/cpu/alto2/a2mem.h @@ -103,11 +103,11 @@ inline bool check_mem_write_stall() { } -DECLARE_READ16_MEMBER ( mear_r ); //!< memory error address register read -DECLARE_READ16_MEMBER ( mesr_r ); //!< memory error status register read -DECLARE_WRITE16_MEMBER( mesr_w ); //!< memory error status register write (clear) -DECLARE_READ16_MEMBER ( mecr_r ); //!< memory error control register read -DECLARE_WRITE16_MEMBER( mecr_w ); //!< memory error control register write +uint16_t mear_r(); //!< memory error address register read +uint16_t mesr_r(); //!< memory error status register read +void mesr_w(uint16_t data); //!< memory error status register write (clear) +uint16_t mecr_r(); //!< memory error control register read +void mecr_w(uint16_t data); //!< memory error control register write //! Read or write a memory double-word and calculate or compare its Hamming code. uint32_t hamming_code(bool write, uint32_t dw_addr, uint32_t dw_data); diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp index bffe5071192..f5669884a3a 100644 --- a/src/devices/cpu/alto2/alto2cpu.cpp +++ b/src/devices/cpu/alto2/alto2cpu.cpp @@ -1006,7 +1006,7 @@ void alto2_cpu_device::state_string_export(const device_state_entry &entry, std: } //! read microcode CROM or CRAM -READ32_MEMBER ( alto2_cpu_device::crom_cram_r ) +uint32_t alto2_cpu_device::crom_cram_r(offs_t offset) { if (offset < m_ucode_ram_base) return *reinterpret_cast(m_ucode_crom + offset * 4); @@ -1014,7 +1014,7 @@ READ32_MEMBER ( alto2_cpu_device::crom_cram_r ) } //! write microcode CROM or CRAM (CROM of course can't be written) -WRITE32_MEMBER( alto2_cpu_device::crom_cram_w ) +void alto2_cpu_device::crom_cram_w(offs_t offset, uint32_t data) { if (offset < m_ucode_ram_base) return; @@ -1022,7 +1022,7 @@ WRITE32_MEMBER( alto2_cpu_device::crom_cram_w ) } //! read constants PROM -READ16_MEMBER ( alto2_cpu_device::const_r ) +uint16_t alto2_cpu_device::const_r(offs_t offset) { return *reinterpret_cast(m_const_data + offset * 2); } @@ -1364,7 +1364,7 @@ static const char* memory_range_name(offs_t offset) /** * @brief read the open bus for unused MMIO range */ -READ16_MEMBER( alto2_cpu_device::noop_r ) +uint16_t alto2_cpu_device::noop_r(offs_t offset) { LOG((this,LOG_CPU,0," MMIO rd %s\n", memory_range_name(offset))); return 0177777; @@ -1373,7 +1373,7 @@ READ16_MEMBER( alto2_cpu_device::noop_r ) /** * @brief write nowhere for unused MMIO range */ -WRITE16_MEMBER( alto2_cpu_device::noop_w ) +void alto2_cpu_device::noop_w(offs_t offset, uint16_t data) { LOG((this,LOG_CPU,0," MMIO wr %s\n", memory_range_name(offset))); } @@ -1383,7 +1383,7 @@ WRITE16_MEMBER( alto2_cpu_device::noop_w ) * * The bank registers are stored in a 16x4-bit RAM 74S189. */ -READ16_MEMBER( alto2_cpu_device::bank_reg_r ) +uint16_t alto2_cpu_device::bank_reg_r(offs_t offset) { int task = offset & 017; int bank = m_bank_reg[task] | 0177760; @@ -1395,7 +1395,7 @@ READ16_MEMBER( alto2_cpu_device::bank_reg_r ) * * The bank registers are stored in a 16x4-bit RAM 74S189. */ -WRITE16_MEMBER( alto2_cpu_device::bank_reg_w ) +void alto2_cpu_device::bank_reg_w(offs_t offset, uint16_t data) { int task = offset & 017; m_bank_reg[task] = data & 017; diff --git a/src/devices/cpu/alto2/alto2cpu.h b/src/devices/cpu/alto2/alto2cpu.h index e1e66f5bcaf..603c5ac057a 100644 --- a/src/devices/cpu/alto2/alto2cpu.h +++ b/src/devices/cpu/alto2/alto2cpu.h @@ -260,19 +260,19 @@ private: void iomem_map(address_map &map); //! read microcode CROM or CRAM, depending on m_ucode_ram_base - DECLARE_READ32_MEMBER ( crom_cram_r ); + uint32_t crom_cram_r(offs_t offset); //! write microcode CRAM, depending on m_ucode_ram_base (ignore writes to CROM) - DECLARE_WRITE32_MEMBER( crom_cram_w ); + void crom_cram_w(offs_t offset, uint32_t data); //! read constants PROM - DECLARE_READ16_MEMBER ( const_r ); + uint16_t const_r(offs_t offset); //! read i/o space RAM - DECLARE_READ16_MEMBER ( ioram_r ); + uint16_t ioram_r(offs_t offset); //!< write i/o space RAM - DECLARE_WRITE16_MEMBER( ioram_w ); + void ioram_w(offs_t offset, uint16_t data); int m_icount; @@ -875,11 +875,11 @@ private: [[noreturn]] void f2_early_bad(); //! f2 dummy early function [[noreturn]] void f2_late_bad(); //! f2 dummy late function - DECLARE_READ16_MEMBER( noop_r ); //!< read open bus (0177777) - DECLARE_WRITE16_MEMBER( noop_w ); //!< write open bus + uint16_t noop_r (offs_t offset); //!< read open bus (0177777) + void noop_w(offs_t offset, uint16_t data); //!< write open bus - DECLARE_READ16_MEMBER( bank_reg_r ); //!< read bank register in memory mapped I/O range - DECLARE_WRITE16_MEMBER( bank_reg_w ); //!< write bank register in memory mapped I/O range + uint16_t bank_reg_r(offs_t offset); //!< read bank register in memory mapped I/O range + void bank_reg_w(offs_t offset, uint16_t data); //!< write bank register in memory mapped I/O range void bs_early_read_r(); //!< bus source: drive bus by R register void bs_early_load_r(); //!< bus source: load R places 0 on the BUS diff --git a/src/devices/cpu/arcompact/arcompact.cpp b/src/devices/cpu/arcompact/arcompact.cpp index c35798e5b94..7ca4cc02d3a 100644 --- a/src/devices/cpu/arcompact/arcompact.cpp +++ b/src/devices/cpu/arcompact/arcompact.cpp @@ -27,15 +27,15 @@ DEFINE_DEVICE_TYPE(ARCA5, arcompact_device, "arc_a5", "Argonaut ARCtangent A5") -READ32_MEMBER( arcompact_device::arcompact_auxreg002_LPSTART_r) { return m_LP_START&0xfffffffe; } -WRITE32_MEMBER(arcompact_device::arcompact_auxreg002_LPSTART_w) { m_LP_START = data&0xfffffffe; } -READ32_MEMBER( arcompact_device::arcompact_auxreg003_LPEND_r) { return m_LP_END&0xfffffffe; } -WRITE32_MEMBER(arcompact_device::arcompact_auxreg003_LPEND_w) { m_LP_END = data&0xfffffffe; } +uint32_t arcompact_device::arcompact_auxreg002_LPSTART_r() { return m_LP_START&0xfffffffe; } +void arcompact_device::arcompact_auxreg002_LPSTART_w(uint32_t data) { m_LP_START = data&0xfffffffe; } +uint32_t arcompact_device::arcompact_auxreg003_LPEND_r() { return m_LP_END&0xfffffffe; } +void arcompact_device::arcompact_auxreg003_LPEND_w(uint32_t data) { m_LP_END = data&0xfffffffe; } -READ32_MEMBER( arcompact_device::arcompact_auxreg00a_STATUS32_r) { return 0xffffdead; /*m_status32;*/ } +uint32_t arcompact_device::arcompact_auxreg00a_STATUS32_r() { return 0xffffdead; /*m_status32;*/ } -READ32_MEMBER( arcompact_device::arcompact_auxreg025_INTVECTORBASE_r) { return m_INTVECTORBASE&0xfffffc00; } -WRITE32_MEMBER(arcompact_device::arcompact_auxreg025_INTVECTORBASE_w) { m_INTVECTORBASE = data&0xfffffc00; } +uint32_t arcompact_device::arcompact_auxreg025_INTVECTORBASE_r() { return m_INTVECTORBASE&0xfffffc00; } +void arcompact_device::arcompact_auxreg025_INTVECTORBASE_w(uint32_t data) { m_INTVECTORBASE = data&0xfffffc00; } diff --git a/src/devices/cpu/arcompact/arcompact.h b/src/devices/cpu/arcompact/arcompact.h index 7d8be5453f0..d87499bc969 100644 --- a/src/devices/cpu/arcompact/arcompact.h +++ b/src/devices/cpu/arcompact/arcompact.h @@ -72,14 +72,14 @@ public: // construction/destruction arcompact_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ32_MEMBER( arcompact_auxreg002_LPSTART_r); - DECLARE_WRITE32_MEMBER(arcompact_auxreg002_LPSTART_w); - DECLARE_READ32_MEMBER( arcompact_auxreg003_LPEND_r); - DECLARE_WRITE32_MEMBER(arcompact_auxreg003_LPEND_w); - - DECLARE_READ32_MEMBER( arcompact_auxreg00a_STATUS32_r); - DECLARE_READ32_MEMBER( arcompact_auxreg025_INTVECTORBASE_r); - DECLARE_WRITE32_MEMBER( arcompact_auxreg025_INTVECTORBASE_w); + uint32_t arcompact_auxreg002_LPSTART_r(); + void arcompact_auxreg002_LPSTART_w(uint32_t data); + uint32_t arcompact_auxreg003_LPEND_r(); + void arcompact_auxreg003_LPEND_w(uint32_t data); + + uint32_t arcompact_auxreg00a_STATUS32_r(); + uint32_t arcompact_auxreg025_INTVECTORBASE_r(); + void arcompact_auxreg025_INTVECTORBASE_w(uint32_t data); void arcompact_auxreg_map(address_map &map); diff --git a/src/devices/cpu/arm7/arm7.cpp b/src/devices/cpu/arm7/arm7.cpp index d496265d41d..d76a54a3c91 100644 --- a/src/devices/cpu/arm7/arm7.cpp +++ b/src/devices/cpu/arm7/arm7.cpp @@ -1245,13 +1245,13 @@ bool arm7_cpu_device::get_t_flag() const /* ARM system coprocessor support */ -WRITE32_MEMBER( arm7_cpu_device::arm7_do_callback ) +void arm7_cpu_device::arm7_do_callback(uint32_t data) { m_pendingUnd = true; update_irq_state(); } -READ32_MEMBER( arm7_cpu_device::arm7_rt_r_callback ) +uint32_t arm7_cpu_device::arm7_rt_r_callback(offs_t offset) { uint32_t opcode = offset; uint8_t cReg = ( opcode & INSN_COPRO_CREG ) >> INSN_COPRO_CREG_SHIFT; @@ -1367,7 +1367,7 @@ READ32_MEMBER( arm7_cpu_device::arm7_rt_r_callback ) return data; } -WRITE32_MEMBER( arm7_cpu_device::arm7_rt_w_callback ) +void arm7_cpu_device::arm7_rt_w_callback(offs_t offset, uint32_t data) { uint32_t opcode = offset; uint8_t cReg = ( opcode & INSN_COPRO_CREG ) >> INSN_COPRO_CREG_SHIFT; @@ -1477,7 +1477,7 @@ WRITE32_MEMBER( arm7_cpu_device::arm7_rt_w_callback ) } } -READ32_MEMBER( arm946es_cpu_device::arm7_rt_r_callback ) +uint32_t arm946es_cpu_device::arm7_rt_r_callback(offs_t offset) { uint32_t opcode = offset; uint8_t cReg = ( opcode & INSN_COPRO_CREG ) >> INSN_COPRO_CREG_SHIFT; @@ -1531,7 +1531,7 @@ READ32_MEMBER( arm946es_cpu_device::arm7_rt_r_callback ) return data; } -WRITE32_MEMBER( arm946es_cpu_device::arm7_rt_w_callback ) +void arm946es_cpu_device::arm7_rt_w_callback(offs_t offset, uint32_t data) { uint32_t opcode = offset; uint8_t cReg = ( opcode & INSN_COPRO_CREG ) >> INSN_COPRO_CREG_SHIFT; @@ -1782,7 +1782,7 @@ void arm7_cpu_device::arm7_dt_w_callback(uint32_t insn, uint32_t *prn) } } -READ32_MEMBER( arm1176jzf_s_cpu_device::arm7_rt_r_callback ) +uint32_t arm1176jzf_s_cpu_device::arm7_rt_r_callback(offs_t offset) { uint32_t opcode = offset; uint8_t crn = (opcode & INSN_COPRO_CREG) >> INSN_COPRO_CREG_SHIFT; @@ -1803,7 +1803,7 @@ READ32_MEMBER( arm1176jzf_s_cpu_device::arm7_rt_r_callback ) return data; } -WRITE32_MEMBER( arm1176jzf_s_cpu_device::arm7_rt_w_callback ) +void arm1176jzf_s_cpu_device::arm7_rt_w_callback(offs_t offset, uint32_t data) { uint32_t opcode = offset; uint8_t crn = (opcode & INSN_COPRO_CREG) >> INSN_COPRO_CREG_SHIFT; diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h index 0a7a451ccfa..3f6f9c290a5 100644 --- a/src/devices/cpu/arm7/arm7.h +++ b/src/devices/cpu/arm7/arm7.h @@ -246,9 +246,9 @@ protected: virtual uint8_t arm7_cpu_read8(uint32_t addr); // Coprocessor support - DECLARE_WRITE32_MEMBER( arm7_do_callback ); - virtual DECLARE_READ32_MEMBER( arm7_rt_r_callback ); - virtual DECLARE_WRITE32_MEMBER( arm7_rt_w_callback ); + void arm7_do_callback(uint32_t data); + virtual uint32_t arm7_rt_r_callback(offs_t offset); + virtual void arm7_rt_w_callback(offs_t offset, uint32_t data); void arm7_dt_r_callback(uint32_t insn, uint32_t *prn); void arm7_dt_w_callback(uint32_t insn, uint32_t *prn); @@ -637,8 +637,8 @@ public: arm946es_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); // 946E-S has Protection Unit instead of ARM MMU so CP15 is quite different - virtual DECLARE_READ32_MEMBER( arm7_rt_r_callback ) override; - virtual DECLARE_WRITE32_MEMBER( arm7_rt_w_callback ) override; + virtual uint32_t arm7_rt_r_callback(offs_t offset) override; + virtual void arm7_rt_w_callback(offs_t offset, uint32_t data) override; virtual void arm7_cpu_write32(uint32_t addr, uint32_t data) override; virtual void arm7_cpu_write16(uint32_t addr, uint16_t data) override; @@ -677,8 +677,8 @@ public: // construction/destruction arm1176jzf_s_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - virtual DECLARE_READ32_MEMBER( arm7_rt_r_callback ) override; - virtual DECLARE_WRITE32_MEMBER( arm7_rt_w_callback ) override; + virtual uint32_t arm7_rt_r_callback(offs_t offset) override; + virtual void arm7_rt_w_callback(offs_t offset, uint32_t data) override; protected: virtual void device_reset() override; diff --git a/src/devices/cpu/arm7/arm7ops.cpp b/src/devices/cpu/arm7/arm7ops.cpp index 5bea4bbe5bd..f005406765f 100644 --- a/src/devices/cpu/arm7/arm7ops.cpp +++ b/src/devices/cpu/arm7/arm7ops.cpp @@ -299,7 +299,7 @@ int arm7_cpu_device::storeDec(uint32_t pat, uint32_t rbv, int mode) void arm7_cpu_device::HandleCoProcDO(uint32_t insn) { // This instruction simply instructs the co-processor to do something, no data is returned to ARM7 core - arm7_do_callback(*m_program, insn, 0, 0); // simply pass entire opcode to callback - since data format is actually dependent on co-proc implementation + arm7_do_callback(0); // simply pass entire opcode to callback - since data format is actually dependent on co-proc implementation } // Co-Processor Register Transfer - To/From Arm to Co-Proc @@ -310,7 +310,7 @@ void arm7_cpu_device::HandleCoProcRT(uint32_t insn) // Load (MRC) data from Co-Proc to ARM7 register if (insn & 0x00100000) // Bit 20 = Load or Store { - uint32_t res = arm7_rt_r_callback(*m_program, insn, 0); // RT Read handler must parse opcode & return appropriate result + uint32_t res = arm7_rt_r_callback(insn); // RT Read handler must parse opcode & return appropriate result if (!m_pendingUnd) { SetRegister((insn >> 12) & 0xf, res); @@ -319,7 +319,7 @@ void arm7_cpu_device::HandleCoProcRT(uint32_t insn) // Store (MCR) data from ARM7 to Co-Proc register else { - arm7_rt_w_callback(*m_program, insn, GetRegister((insn >> 12) & 0xf), 0); + arm7_rt_w_callback(insn, GetRegister((insn >> 12) & 0xf)); } } diff --git a/src/devices/cpu/arm7/lpc210x.cpp b/src/devices/cpu/arm7/lpc210x.cpp index d2964589e01..9e63b5785d0 100644 --- a/src/devices/cpu/arm7/lpc210x.cpp +++ b/src/devices/cpu/arm7/lpc210x.cpp @@ -47,12 +47,12 @@ lpc210x_device::lpc210x_device(const machine_config &mconfig, const char *tag, d { } -READ32_MEMBER(lpc210x_device::arm_E01FC088_r) +uint32_t lpc210x_device::arm_E01FC088_r() { return 0xffffffff; } -READ32_MEMBER(lpc210x_device::flash_r) +uint32_t lpc210x_device::flash_r(offs_t offset) { uint32_t ret = (m_flash[offset * 4 + 3] << 24) | (m_flash[offset * 4 + 2] << 16) | @@ -61,7 +61,7 @@ READ32_MEMBER(lpc210x_device::flash_r) return ret; } -WRITE32_MEMBER(lpc210x_device::flash_w) +void lpc210x_device::flash_w(offs_t offset, uint32_t data) { // } @@ -100,7 +100,7 @@ void lpc210x_device::device_reset() /* VIC (Vectored Interrupt Controller) */ -READ32_MEMBER( lpc210x_device::vic_r ) +uint32_t lpc210x_device::vic_r(offs_t offset, uint32_t mem_mask) { switch (offset*4) { @@ -112,7 +112,7 @@ READ32_MEMBER( lpc210x_device::vic_r ) } -WRITE32_MEMBER( lpc210x_device::vic_w ) +void lpc210x_device::vic_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset * 4) { @@ -123,7 +123,7 @@ WRITE32_MEMBER( lpc210x_device::vic_w ) /* PIN Select block */ -READ32_MEMBER( lpc210x_device::pin_r ) +uint32_t lpc210x_device::pin_r(offs_t offset, uint32_t mem_mask) { switch (offset*4) { @@ -135,7 +135,7 @@ READ32_MEMBER( lpc210x_device::pin_r ) } -WRITE32_MEMBER( lpc210x_device::pin_w ) +void lpc210x_device::pin_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset * 4) { @@ -146,7 +146,7 @@ WRITE32_MEMBER( lpc210x_device::pin_w ) /* MAM block (memory conttroller) */ -READ32_MEMBER( lpc210x_device::mam_r ) +uint32_t lpc210x_device::mam_r(offs_t offset, uint32_t mem_mask) { switch (offset*4) { @@ -158,7 +158,7 @@ READ32_MEMBER( lpc210x_device::mam_r ) } -WRITE32_MEMBER( lpc210x_device::mam_w ) +void lpc210x_device::mam_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset * 4) { @@ -169,7 +169,7 @@ WRITE32_MEMBER( lpc210x_device::mam_w ) /* FIO block */ -READ32_MEMBER( lpc210x_device::fio_r ) +uint32_t lpc210x_device::fio_r(offs_t offset, uint32_t mem_mask) { switch (offset*4) { @@ -181,7 +181,7 @@ READ32_MEMBER( lpc210x_device::fio_r ) } -WRITE32_MEMBER( lpc210x_device::fio_w ) +void lpc210x_device::fio_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset * 4) { @@ -193,35 +193,35 @@ WRITE32_MEMBER( lpc210x_device::fio_w ) /* APB Divider */ -READ32_MEMBER( lpc210x_device::apbdiv_r ) +uint32_t lpc210x_device::apbdiv_r(offs_t offset, uint32_t mem_mask) { logerror("%s unhandled read from APBDIV offset %08x mem_mask %08x\n", machine().describe_context(), offset * 4, mem_mask); return 0x00000000; } -WRITE32_MEMBER( lpc210x_device::apbdiv_w ) +void lpc210x_device::apbdiv_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s unhandled write APBDIV offset %02x data %08x mem_mask %08x\n", machine().describe_context(),offset * 4, data, mem_mask); } /* Syscon misc registers */ -READ32_MEMBER( lpc210x_device::scs_r ) +uint32_t lpc210x_device::scs_r(offs_t offset, uint32_t mem_mask) { logerror("%s unhandled read from SCS offset %08x mem_mask %08x\n", machine().describe_context(),offset * 4, mem_mask); return 0x00000000; } -WRITE32_MEMBER( lpc210x_device::scs_w ) +void lpc210x_device::scs_w(offs_t offset, uint32_t data, uint32_t mem_mask) { logerror("%s unhandled write SCS offset %02x data %08x mem_mask %08x\n", machine().describe_context(),offset * 4, data, mem_mask); } /* PLL Phase Locked Loop */ -READ32_MEMBER( lpc210x_device::pll_r ) +uint32_t lpc210x_device::pll_r(offs_t offset, uint32_t mem_mask) { switch (offset*4) { @@ -233,7 +233,7 @@ READ32_MEMBER( lpc210x_device::pll_r ) } -WRITE32_MEMBER( lpc210x_device::pll_w ) +void lpc210x_device::pll_w(offs_t offset, uint32_t data, uint32_t mem_mask) { switch (offset * 4) { @@ -245,7 +245,7 @@ WRITE32_MEMBER( lpc210x_device::pll_w ) /* Timers */ -uint32_t lpc210x_device::read_timer(address_space &space, int timer, int offset, uint32_t mem_mask) +uint32_t lpc210x_device::read_timer(int timer, int offset, uint32_t mem_mask) { switch (offset*4) { @@ -260,7 +260,7 @@ uint32_t lpc210x_device::read_timer(address_space &space, int timer, int offset, } -void lpc210x_device::write_timer(address_space &space, int timer, int offset, uint32_t data, uint32_t mem_mask) +void lpc210x_device::write_timer(int timer, int offset, uint32_t data, uint32_t mem_mask) { switch (offset * 4) { diff --git a/src/devices/cpu/arm7/lpc210x.h b/src/devices/cpu/arm7/lpc210x.h index afcc4a57795..c21b346a5e3 100644 --- a/src/devices/cpu/arm7/lpc210x.h +++ b/src/devices/cpu/arm7/lpc210x.h @@ -23,47 +23,47 @@ class lpc210x_device : public arm7_cpu_device public: lpc210x_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t); - DECLARE_READ32_MEMBER(arm_E01FC088_r); - DECLARE_READ32_MEMBER(flash_r); - DECLARE_WRITE32_MEMBER(flash_w); + uint32_t arm_E01FC088_r(); + uint32_t flash_r(offs_t offset); + void flash_w(offs_t offset, uint32_t data); // timer 0 / 1 - DECLARE_READ32_MEMBER(timer0_r) { return read_timer(space, 0, offset, mem_mask); } - DECLARE_WRITE32_MEMBER(timer0_w) { write_timer(space, 0, offset, data, mem_mask); } + uint32_t timer0_r(offs_t offset, uint32_t mem_mask = ~0) { return read_timer(0, offset, mem_mask); } + void timer0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { write_timer(0, offset, data, mem_mask); } - DECLARE_READ32_MEMBER(timer1_r) { return read_timer(space, 1, offset, mem_mask); } - DECLARE_WRITE32_MEMBER(timer1_w) { write_timer(space, 1, offset, data, mem_mask); } + uint32_t timer1_r(offs_t offset, uint32_t mem_mask = ~0) { return read_timer(1, offset, mem_mask); } + void timer1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { write_timer(1, offset, data, mem_mask); } - void write_timer(address_space &space, int timer, int offset, uint32_t data, uint32_t mem_mask); - uint32_t read_timer(address_space &space, int timer, int offset, uint32_t mem_mask); + void write_timer(int timer, int offset, uint32_t data, uint32_t mem_mask); + uint32_t read_timer(int timer, int offset, uint32_t mem_mask); // VIC - DECLARE_READ32_MEMBER(vic_r); - DECLARE_WRITE32_MEMBER(vic_w); + uint32_t vic_r(offs_t offset, uint32_t mem_mask = ~0); + void vic_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // PIN select block - DECLARE_READ32_MEMBER(pin_r); - DECLARE_WRITE32_MEMBER(pin_w); + uint32_t pin_r(offs_t offset, uint32_t mem_mask = ~0); + void pin_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); //PLL Phase Locked Loop - DECLARE_READ32_MEMBER(pll_r); - DECLARE_WRITE32_MEMBER(pll_w); + uint32_t pll_r(offs_t offset, uint32_t mem_mask = ~0); + void pll_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); //MAM memory controller - DECLARE_READ32_MEMBER(mam_r); - DECLARE_WRITE32_MEMBER(mam_w); + uint32_t mam_r(offs_t offset, uint32_t mem_mask = ~0); + void mam_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); //APB divider - DECLARE_READ32_MEMBER(apbdiv_r); - DECLARE_WRITE32_MEMBER(apbdiv_w); + uint32_t apbdiv_r(offs_t offset, uint32_t mem_mask = ~0); + void apbdiv_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); //syscon misc - DECLARE_READ32_MEMBER(scs_r); - DECLARE_WRITE32_MEMBER(scs_w); + uint32_t scs_r(offs_t offset, uint32_t mem_mask = ~0); + void scs_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // fio - DECLARE_READ32_MEMBER(fio_r); - DECLARE_WRITE32_MEMBER(fio_w); + uint32_t fio_r(offs_t offset, uint32_t mem_mask = ~0); + void fio_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // todo, use an appropriate flash type instead uint8_t m_flash[0x8000]; // needs to be public because the harmony/melody device injects contents with memcpy, yuck diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp index 778d2efb701..bd9003fb9b6 100644 --- a/src/devices/cpu/dsp16/dsp16.cpp +++ b/src/devices/cpu/dsp16/dsp16.cpp @@ -130,7 +130,7 @@ WRITE_LINE_MEMBER(dsp16_device_base::exm_w) high-level passive parallel I/O handlers ***********************************************************************/ -READ16_MEMBER(dsp16_device_base::pio_r) +u16 dsp16_device_base::pio_r() { if (!pio_pods_active()) { @@ -148,7 +148,7 @@ READ16_MEMBER(dsp16_device_base::pio_r) } } -WRITE16_MEMBER(dsp16_device_base::pio_w) +void dsp16_device_base::pio_w(u16 data) { if (!pio_pids_active()) { @@ -639,7 +639,7 @@ dsp16_disassembler::cpu::predicate dsp16_device_base::check_branch(offs_t pc) co return predicate::INDETERMINATE; } -template READ16_MEMBER(dsp16_device_base::external_memory_r) +template u16 dsp16_device_base::external_memory_r(offs_t offset, u16 mem_mask) { return m_spaces[AS_IO]->read_word(Base + offset, mem_mask); } @@ -2092,7 +2092,7 @@ void dsp16_device::external_memory_enable(address_space &space, bool enable) // this assumes internal ROM is mirrored above 2KiB, but actual hardware behaviour is unknown space.unmap_read(0x0000, 0xffff); if (enable) - space.install_read_handler(0x0000, 0xffff, read16_delegate(*this, FUNC(dsp16_device::external_memory_r<0x0000>))); + space.install_read_handler(0x0000, 0xffff, read16s_delegate(*this, FUNC(dsp16_device::external_memory_r<0x0000>))); else space.install_rom(0x0000, 0x07ff, 0xf800, &m_rom[0]); } @@ -2123,12 +2123,12 @@ void dsp16a_device::external_memory_enable(address_space &space, bool enable) space.unmap_read(0x0000, 0xffff); if (enable) { - space.install_read_handler(0x0000, 0xffff, read16_delegate(*this, FUNC(dsp16a_device::external_memory_r<0x0000>))); + space.install_read_handler(0x0000, 0xffff, read16s_delegate(*this, FUNC(dsp16a_device::external_memory_r<0x0000>))); } else { space.install_rom(0x0000, 0x0fff, &m_rom[0]); - space.install_read_handler(0x1000, 0xffff, read16_delegate(*this, FUNC(dsp16a_device::external_memory_r<0x1000>))); + space.install_read_handler(0x1000, 0xffff, read16s_delegate(*this, FUNC(dsp16a_device::external_memory_r<0x1000>))); } } diff --git a/src/devices/cpu/dsp16/dsp16.h b/src/devices/cpu/dsp16/dsp16.h index 5cc6c6a67f2..3f7ae66dd53 100644 --- a/src/devices/cpu/dsp16/dsp16.h +++ b/src/devices/cpu/dsp16/dsp16.h @@ -55,8 +55,8 @@ public: DECLARE_READ_LINE_MEMBER(ose_r) { return m_ose_out; } // high-level passive parallel I/O handlers - DECLARE_READ16_MEMBER(pio_r); - DECLARE_WRITE16_MEMBER(pio_w); + u16 pio_r(); + void pio_w(u16 data); // parallel I/O outputs DECLARE_READ_LINE_MEMBER(psel_r) { return m_psel_out; } @@ -105,7 +105,7 @@ protected: // for specialisations to override virtual void external_memory_enable(address_space &space, bool enable) = 0; - template DECLARE_READ16_MEMBER(external_memory_r); + template u16 external_memory_r(offs_t offset, u16 mem_mask = ~0); private: // state registration indices diff --git a/src/devices/cpu/dsp56156/dsp56156.h b/src/devices/cpu/dsp56156/dsp56156.h index 09801c54407..cc8ebe6741d 100644 --- a/src/devices/cpu/dsp56156/dsp56156.h +++ b/src/devices/cpu/dsp56156/dsp56156.h @@ -205,10 +205,10 @@ class dsp56156_device : public cpu_device public: dsp56156_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); - DECLARE_READ16_MEMBER( peripheral_register_r ); - DECLARE_WRITE16_MEMBER( peripheral_register_w ); + uint16_t peripheral_register_r(offs_t offset); + void peripheral_register_w(offs_t offset, uint16_t data); - void host_interface_write(uint8_t offset, uint8_t data); + void host_interface_write(uint8_t offset, uint8_t data); uint8_t host_interface_read(uint8_t offset); uint16_t get_peripheral_memory(uint16_t addr); diff --git a/src/devices/cpu/dsp56156/dsp56mem.cpp b/src/devices/cpu/dsp56156/dsp56mem.cpp index 37e249f15ca..9f61089b9b4 100644 --- a/src/devices/cpu/dsp56156/dsp56mem.cpp +++ b/src/devices/cpu/dsp56156/dsp56mem.cpp @@ -487,7 +487,7 @@ void dsp56156_io_reset(dsp56156_core* cpustate) /* Work */ -READ16_MEMBER( dsp56156_device::peripheral_register_r ) +uint16_t dsp56156_device::peripheral_register_r(offs_t offset) { dsp56156_core* cpustate = &m_core; // (printf) cpustate->device->logerror("Peripheral read 0x%04x\n", O2A(offset)); @@ -621,7 +621,7 @@ READ16_MEMBER( dsp56156_device::peripheral_register_r ) return cpustate->peripheral_ram[offset]; } -WRITE16_MEMBER( dsp56156_device::peripheral_register_w ) +void dsp56156_device::peripheral_register_w(offs_t offset, uint16_t data) { dsp56156_core* cpustate = &m_core; diff --git a/src/devices/cpu/dspp/dspp.cpp b/src/devices/cpu/dspp/dspp.cpp index d4f889df01a..dded3f028f9 100644 --- a/src/devices/cpu/dspp/dspp.cpp +++ b/src/devices/cpu/dspp/dspp.cpp @@ -1638,7 +1638,7 @@ void dspp_device::reset_channel(int32_t channel) // input_r - Read digital input //------------------------------------------------- -READ16_MEMBER( dspp_device::input_r ) +uint16_t dspp_device::input_r() { // TODO return 0; @@ -1649,7 +1649,7 @@ READ16_MEMBER( dspp_device::input_r ) // output_w - Write to the 8 output registers //------------------------------------------------- -WRITE16_MEMBER( dspp_device::output_w ) +void dspp_device::output_w(offs_t offset, uint16_t data) { m_outputs[offset] = data; } @@ -1659,7 +1659,7 @@ WRITE16_MEMBER( dspp_device::output_w ) // fifo_osc_r - //------------------------------------------------- -READ16_MEMBER( dspp_device::fifo_osc_r ) +uint16_t dspp_device::fifo_osc_r(offs_t offset) { uint32_t data = 0; uint32_t channel = offset / 8; @@ -1729,7 +1729,7 @@ READ16_MEMBER( dspp_device::fifo_osc_r ) // fifo_osc_w - //------------------------------------------------- -WRITE16_MEMBER( dspp_device::fifo_osc_w ) +void dspp_device::fifo_osc_w(offs_t offset, uint16_t data) { uint32_t channel = offset / 8; @@ -1785,7 +1785,7 @@ WRITE16_MEMBER( dspp_device::fifo_osc_w ) // input_control_w - //------------------------------------------------- -WRITE16_MEMBER( dspp_device::input_control_w ) +void dspp_device::input_control_w(uint16_t data) { // TODO } @@ -1795,7 +1795,7 @@ WRITE16_MEMBER( dspp_device::input_control_w ) // output_control_w - //------------------------------------------------- -WRITE16_MEMBER( dspp_device::output_control_w ) +void dspp_device::output_control_w(uint16_t data) { // TODO if (data & 1) @@ -1832,7 +1832,7 @@ WRITE16_MEMBER( dspp_device::output_control_w ) // input_status_r - Read input state //------------------------------------------------- -READ16_MEMBER( dspp_device::input_status_r ) +uint16_t dspp_device::input_status_r() { // TODO: How should this work? return 1; @@ -1844,7 +1844,7 @@ READ16_MEMBER( dspp_device::input_status_r ) // entries in the output FIFO //------------------------------------------------- -READ16_MEMBER( dspp_device::output_status_r ) +uint16_t dspp_device::output_status_r() { return m_output_fifo_count; } @@ -1854,7 +1854,7 @@ READ16_MEMBER( dspp_device::output_status_r ) // cpu_int_w - Host CPU soft interrupt //------------------------------------------------- -WRITE16_MEMBER( dspp_device::cpu_int_w ) +void dspp_device::cpu_int_w(uint16_t data) { m_core->m_partial_int |= (data << DSPX_FLD_INT_SOFT_SHIFT) & DSPX_FLD_INT_SOFT_MASK; update_host_interrupt(); @@ -1865,7 +1865,7 @@ WRITE16_MEMBER( dspp_device::cpu_int_w ) // pc_r - Read program counter //------------------------------------------------- -READ16_MEMBER( dspp_device::pc_r ) +uint16_t dspp_device::pc_r() { return m_core->m_pc; } @@ -1875,7 +1875,7 @@ READ16_MEMBER( dspp_device::pc_r ) // pc_w - Write program counter //------------------------------------------------- -WRITE16_MEMBER(dspp_device:: pc_w ) +void dspp_device::pc_w(uint16_t data) { m_core->m_pc = data; } @@ -1885,7 +1885,7 @@ WRITE16_MEMBER(dspp_device:: pc_w ) // audlock_r - Read Audio Lock status //------------------------------------------------- -READ16_MEMBER( dspp_device::audlock_r ) +uint16_t dspp_device::audlock_r() { return m_core->m_flag_audlock; } @@ -1895,7 +1895,7 @@ READ16_MEMBER( dspp_device::audlock_r ) // audlock_w - Write Audio Lock status //------------------------------------------------- -WRITE16_MEMBER( dspp_device::audlock_w ) +void dspp_device::audlock_w(uint16_t data) { m_core->m_flag_audlock = data & 1; } @@ -1905,7 +1905,7 @@ WRITE16_MEMBER( dspp_device::audlock_w ) // clock_r - Read CPU tick counter //------------------------------------------------- -READ16_MEMBER( dspp_device::clock_r ) +uint16_t dspp_device::clock_r() { return m_core->m_tclock; } @@ -1915,7 +1915,7 @@ READ16_MEMBER( dspp_device::clock_r ) // clock_w - Write CPU tick counter //------------------------------------------------- -WRITE16_MEMBER( dspp_device::clock_w ) +void dspp_device::clock_w(uint16_t data) { m_core->m_tclock = data; } @@ -1925,7 +1925,7 @@ WRITE16_MEMBER( dspp_device::clock_w ) // noise_r - PRNG noise //------------------------------------------------- -READ16_MEMBER( dspp_device::noise_r ) +uint16_t dspp_device::noise_r() { // TODO: Obviously this isn't accurate return machine().rand(); @@ -2334,7 +2334,7 @@ void dspp_device::write_ext_control(offs_t offset, uint32_t data) // read - host CPU read from DSPP internals //------------------------------------------------- -READ32_MEMBER( dspp_device::read ) +uint32_t dspp_device::read(offs_t offset) { if (offset < 0x1000/4) { @@ -2495,7 +2495,7 @@ void dspp_device::write_dma_stack(offs_t offset, uint32_t data) // write - host CPU write to DSPP internals //------------------------------------------------- -WRITE32_MEMBER( dspp_device::write ) +void dspp_device::write(offs_t offset, uint32_t data) { if (offset < 0x1000/4) { diff --git a/src/devices/cpu/dspp/dspp.h b/src/devices/cpu/dspp/dspp.h index 493c88d8ef0..68492fb7f40 100644 --- a/src/devices/cpu/dspp/dspp.h +++ b/src/devices/cpu/dspp/dspp.h @@ -41,30 +41,30 @@ public: auto dma_write_handler() { return m_dma_write_handler.bind(); } // Public interfaces - DECLARE_READ32_MEMBER( read ); - DECLARE_WRITE32_MEMBER( write ); + uint32_t read(offs_t offset); + void write(offs_t offset, uint32_t data); uint16_t read_output_fifo(); void dump_state(); // TODO: DEBUG REMOVE ME // Internal registers - DECLARE_READ16_MEMBER( input_r ); - DECLARE_WRITE16_MEMBER( output_w ); - DECLARE_READ16_MEMBER( fifo_osc_r ); - DECLARE_WRITE16_MEMBER( fifo_osc_w ); - DECLARE_WRITE16_MEMBER( input_control_w ); - DECLARE_WRITE16_MEMBER( output_control_w ); - DECLARE_READ16_MEMBER( input_status_r ); - DECLARE_READ16_MEMBER( output_status_r ); - DECLARE_WRITE16_MEMBER( cpu_int_w ); - DECLARE_READ16_MEMBER( pc_r ); - DECLARE_WRITE16_MEMBER( pc_w ); - DECLARE_READ16_MEMBER( audlock_r ); - DECLARE_WRITE16_MEMBER( audlock_w ); - DECLARE_READ16_MEMBER( clock_r ); - DECLARE_WRITE16_MEMBER( clock_w ); - DECLARE_READ16_MEMBER( noise_r ); + uint16_t input_r(); + void output_w(offs_t offset, uint16_t data); + uint16_t fifo_osc_r(offs_t offset); + void fifo_osc_w(offs_t offset, uint16_t data); + void input_control_w(uint16_t data); + void output_control_w(uint16_t data); + uint16_t input_status_r(); + uint16_t output_status_r(); + void cpu_int_w(uint16_t data); + uint16_t pc_r(); + void pc_w(uint16_t data); + uint16_t audlock_r(); + void audlock_w(uint16_t data); + uint16_t clock_r(); + void clock_w(uint16_t data); + uint16_t noise_r(); void update_fifo_dma(); void print_sums() { printf("%04x: %04x\n", (uint16_t)m_core->m_arg0, (uint16_t)m_core->m_arg1); } diff --git a/src/devices/cpu/h8/h83002.cpp b/src/devices/cpu/h8/h83002.cpp index f9b52dc43eb..ec385878f1d 100644 --- a/src/devices/cpu/h8/h83002.cpp +++ b/src/devices/cpu/h8/h83002.cpp @@ -251,25 +251,25 @@ void h83002_device::device_reset() syscr = 0x09; } -READ8_MEMBER(h83002_device::syscr_r) +uint8_t h83002_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h83002_device::syscr_w) +void h83002_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); logerror("syscr = %02x\n", data); } -READ8_MEMBER(h83002_device::rtmcsr_r) +uint8_t h83002_device::rtmcsr_r() { // set bit 7 -- Compare Match Flag (CMF): This status flag indicates that the RTCNT and RTCOR values have matched. return rtmcsr | 0x80; } -WRITE8_MEMBER(h83002_device::rtmcsr_w) +void h83002_device::rtmcsr_w(uint8_t data) { rtmcsr = data; logerror("rtmcsr = %02x\n", data); diff --git a/src/devices/cpu/h8/h83002.h b/src/devices/cpu/h8/h83002.h index 304ca673c67..94c1d603230 100644 --- a/src/devices/cpu/h8/h83002.h +++ b/src/devices/cpu/h8/h83002.h @@ -35,11 +35,11 @@ public: void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); - DECLARE_READ8_MEMBER(rtmcsr_r); - DECLARE_WRITE8_MEMBER(rtmcsr_w); + uint8_t rtmcsr_r(); + void rtmcsr_w(uint8_t data); protected: required_device intc; diff --git a/src/devices/cpu/h8/h83003.cpp b/src/devices/cpu/h8/h83003.cpp index 79129043b88..c7861618208 100644 --- a/src/devices/cpu/h8/h83003.cpp +++ b/src/devices/cpu/h8/h83003.cpp @@ -269,25 +269,25 @@ void h83003_device::device_reset() syscr = 0x09; } -READ8_MEMBER(h83003_device::syscr_r) +uint8_t h83003_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h83003_device::syscr_w) +void h83003_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); logerror("syscr = %02x\n", data); } -READ8_MEMBER(h83003_device::rtmcsr_r) +uint8_t h83003_device::rtmcsr_r() { // set bit 7 -- Compare Match Flag (CMF): This status flag indicates that the RTCNT and RTCOR values have matched. return rtmcsr | 0x80; } -WRITE8_MEMBER(h83003_device::rtmcsr_w) +void h83003_device::rtmcsr_w(uint8_t data) { rtmcsr = data; logerror("rtmcsr = %02x\n", data); diff --git a/src/devices/cpu/h8/h83003.h b/src/devices/cpu/h8/h83003.h index f988f0301cd..6c4f7cfaced 100644 --- a/src/devices/cpu/h8/h83003.h +++ b/src/devices/cpu/h8/h83003.h @@ -35,11 +35,11 @@ public: void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); - DECLARE_READ8_MEMBER(rtmcsr_r); - DECLARE_WRITE8_MEMBER(rtmcsr_w); + uint8_t rtmcsr_r(); + void rtmcsr_w(uint8_t data); protected: required_device intc; diff --git a/src/devices/cpu/h8/h83006.cpp b/src/devices/cpu/h8/h83006.cpp index 9a3d96e4773..d19937e93dc 100644 --- a/src/devices/cpu/h8/h83006.cpp +++ b/src/devices/cpu/h8/h83006.cpp @@ -242,12 +242,12 @@ void h83006_device::device_reset() } -READ8_MEMBER(h83006_device::syscr_r) +uint8_t h83006_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h83006_device::syscr_w) +void h83006_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); diff --git a/src/devices/cpu/h8/h83006.h b/src/devices/cpu/h8/h83006.h index 37ff4029476..083b91ea664 100644 --- a/src/devices/cpu/h8/h83006.h +++ b/src/devices/cpu/h8/h83006.h @@ -32,8 +32,8 @@ public: void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); protected: h83006_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); diff --git a/src/devices/cpu/h8/h83008.cpp b/src/devices/cpu/h8/h83008.cpp index b433f28be06..3db7c5a71aa 100644 --- a/src/devices/cpu/h8/h83008.cpp +++ b/src/devices/cpu/h8/h83008.cpp @@ -218,12 +218,12 @@ void h83008_device::device_reset() } -READ8_MEMBER(h83008_device::syscr_r) +uint8_t h83008_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h83008_device::syscr_w) +void h83008_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); diff --git a/src/devices/cpu/h8/h83008.h b/src/devices/cpu/h8/h83008.h index cdab99bd950..bb65adfcc9d 100644 --- a/src/devices/cpu/h8/h83008.h +++ b/src/devices/cpu/h8/h83008.h @@ -32,8 +32,8 @@ public: void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); protected: required_device intc; diff --git a/src/devices/cpu/h8/h83048.cpp b/src/devices/cpu/h8/h83048.cpp index d90f690a4b6..2358914e6cf 100644 --- a/src/devices/cpu/h8/h83048.cpp +++ b/src/devices/cpu/h8/h83048.cpp @@ -255,12 +255,12 @@ void h83048_device::device_reset() syscr = 0x0b; } -READ8_MEMBER(h83048_device::syscr_r) +uint8_t h83048_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h83048_device::syscr_w) +void h83048_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); diff --git a/src/devices/cpu/h8/h83048.h b/src/devices/cpu/h8/h83048.h index 6876a909c2d..d5afb5e67c8 100644 --- a/src/devices/cpu/h8/h83048.h +++ b/src/devices/cpu/h8/h83048.h @@ -37,8 +37,8 @@ public: void set_mode_a20() { mode_a20 = true; } void set_mode_a24() { mode_a20 = false; } - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); protected: h83048_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); diff --git a/src/devices/cpu/h8/h83337.cpp b/src/devices/cpu/h8/h83337.cpp index b3a386835f3..7f9e835513c 100644 --- a/src/devices/cpu/h8/h83337.cpp +++ b/src/devices/cpu/h8/h83337.cpp @@ -186,45 +186,45 @@ void h83337_device::device_reset() syscr = 0x09; } -READ8_MEMBER(h83337_device::syscr_r) +uint8_t h83337_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h83337_device::syscr_w) +void h83337_device::syscr_w(uint8_t data) { syscr = data; logerror("syscr = %02x\n", data); } -READ8_MEMBER(h83337_device::wscr_r) +uint8_t h83337_device::wscr_r() { return 0x00; } -WRITE8_MEMBER(h83337_device::wscr_w) +void h83337_device::wscr_w(uint8_t data) { logerror("wscr = %02x\n", data); } -READ8_MEMBER(h83337_device::stcr_r) +uint8_t h83337_device::stcr_r() { return 0x00; } -WRITE8_MEMBER(h83337_device::stcr_w) +void h83337_device::stcr_w(uint8_t data) { logerror("stcr = %02x\n", data); timer8_0->set_extra_clock_bit(data & 0x01); timer8_1->set_extra_clock_bit(data & 0x02); } -READ8_MEMBER(h83337_device::mdcr_r) +uint8_t h83337_device::mdcr_r() { return 0x00; } -WRITE8_MEMBER(h83337_device::mdcr_w) +void h83337_device::mdcr_w(uint8_t data) { logerror("mdcr = %02x\n", data); } diff --git a/src/devices/cpu/h8/h83337.h b/src/devices/cpu/h8/h83337.h index 0882e623f80..cc0d9735a34 100644 --- a/src/devices/cpu/h8/h83337.h +++ b/src/devices/cpu/h8/h83337.h @@ -36,14 +36,14 @@ class h83337_device : public h8_device { public: h83337_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(wscr_r); - DECLARE_WRITE8_MEMBER(wscr_w); - DECLARE_READ8_MEMBER(stcr_r); - DECLARE_WRITE8_MEMBER(stcr_w); - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); - DECLARE_READ8_MEMBER(mdcr_r); - DECLARE_WRITE8_MEMBER(mdcr_w); + uint8_t wscr_r(); + void wscr_w(uint8_t data); + uint8_t stcr_r(); + void stcr_w(uint8_t data); + uint8_t syscr_r(); + void syscr_w(uint8_t data); + uint8_t mdcr_r(); + void mdcr_w(uint8_t data); protected: h83337_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t start); diff --git a/src/devices/cpu/h8/h8_adc.cpp b/src/devices/cpu/h8/h8_adc.cpp index 76b03584e6d..3235ac8c6c8 100644 --- a/src/devices/cpu/h8/h8_adc.cpp +++ b/src/devices/cpu/h8/h8_adc.cpp @@ -31,31 +31,31 @@ void h8_adc_device::set_info(const char *_intc_tag, int _intc_vector) intc_vector = _intc_vector; } -READ8_MEMBER(h8_adc_device::addr8_r) +uint8_t h8_adc_device::addr8_r(offs_t offset) { if(V>=1) logerror("addr8_r %d %03x\n", offset, addr[offset >> 1]); return offset & 1 ? addr[offset >> 1] << 6 : addr[offset >> 1] >> 2; } -READ16_MEMBER(h8_adc_device::addr16_r) +uint16_t h8_adc_device::addr16_r(offs_t offset) { if(V>=1) logerror("addr16_r %d %03x\n", offset, addr[offset]); return addr[offset]; } -READ8_MEMBER(h8_adc_device::adcsr_r) +uint8_t h8_adc_device::adcsr_r() { if(V>=1) logerror("adcsr_r %02x\n", adcsr); return adcsr; } -READ8_MEMBER(h8_adc_device::adcr_r) +uint8_t h8_adc_device::adcr_r() { if(V>=1) logerror("adcr_r %02x\n", adcr); return adcr; } -WRITE8_MEMBER(h8_adc_device::adcsr_w) +void h8_adc_device::adcsr_w(uint8_t data) { if(V>=1) logerror("adcsr_w %02x\n", data); uint8_t prev = adcsr; @@ -76,7 +76,7 @@ WRITE8_MEMBER(h8_adc_device::adcsr_w) start_conversion(); } -WRITE8_MEMBER(h8_adc_device::adcr_w) +void h8_adc_device::adcr_w(uint8_t data) { if(V>=1) logerror("adcr_w %02x\n", data); adcr = data; diff --git a/src/devices/cpu/h8/h8_adc.h b/src/devices/cpu/h8/h8_adc.h index f0feb82f213..e54d3b747d9 100644 --- a/src/devices/cpu/h8/h8_adc.h +++ b/src/devices/cpu/h8/h8_adc.h @@ -21,12 +21,12 @@ class h8_adc_device : public device_t { public: void set_info(const char *intc_tag, int vect); - DECLARE_READ8_MEMBER(addr8_r); - DECLARE_READ16_MEMBER(addr16_r); - DECLARE_READ8_MEMBER(adcsr_r); - DECLARE_READ8_MEMBER(adcr_r); - DECLARE_WRITE8_MEMBER(adcsr_w); - DECLARE_WRITE8_MEMBER(adcr_w); + uint8_t addr8_r(offs_t offset); + uint16_t addr16_r(offs_t offset); + uint8_t adcsr_r(); + uint8_t adcr_r(); + void adcsr_w(uint8_t data); + void adcr_w(uint8_t data); DECLARE_WRITE_LINE_MEMBER(adtrg_w); void set_suspend(bool suspend); diff --git a/src/devices/cpu/h8/h8_dma.cpp b/src/devices/cpu/h8/h8_dma.cpp index 20f034d63e0..c295b77f330 100644 --- a/src/devices/cpu/h8/h8_dma.cpp +++ b/src/devices/cpu/h8/h8_dma.cpp @@ -74,37 +74,37 @@ void h8_dma_device::set_input(int inputnum, int state) logerror("input line %d not supported for h8_dma_device\n", inputnum); } -READ8_MEMBER(h8_dma_device::dmawer_r) +uint8_t h8_dma_device::dmawer_r() { logerror("dmawer_r %02x\n", dmawer); return dmawer; } -WRITE8_MEMBER(h8_dma_device::dmawer_w) +void h8_dma_device::dmawer_w(uint8_t data) { dmawer = data; logerror("dmawer_w %02x\n", data); } -READ8_MEMBER(h8_dma_device::dmatcr_r) +uint8_t h8_dma_device::dmatcr_r() { logerror("dmatcr_r %02x\n", dmatcr); return dmatcr; } -WRITE8_MEMBER(h8_dma_device::dmatcr_w) +void h8_dma_device::dmatcr_w(uint8_t data) { dmatcr = data; logerror("dmatcr_w %02x\n", data); } -READ16_MEMBER(h8_dma_device::dmabcr_r) +uint16_t h8_dma_device::dmabcr_r() { logerror("dmabcr_r %04x\n", dmabcr); return dmabcr; } -WRITE16_MEMBER(h8_dma_device::dmabcr_w) +void h8_dma_device::dmabcr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&dmabcr); logerror("dmabcr_w %04x\n", dmabcr); @@ -164,111 +164,111 @@ void h8_dma_channel_device::set_id(int id) state[1].id = id | 1; } -READ16_MEMBER(h8_dma_channel_device::marah_r) +uint16_t h8_dma_channel_device::marah_r() { logerror("marah_r %06x\n", mar[0]); return mar[0] >> 16; } -WRITE16_MEMBER(h8_dma_channel_device::marah_w) +void h8_dma_channel_device::marah_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if(ACCESSING_BITS_0_7) mar[0] = ((data & 0x00ff) << 16) | (mar[0] & 0xffff); logerror("marah_w %06x\n", mar[0]); } -READ16_MEMBER(h8_dma_channel_device::maral_r) +uint16_t h8_dma_channel_device::maral_r() { logerror("maral_r %06x\n", mar[0]); return mar[0]; } -WRITE16_MEMBER(h8_dma_channel_device::maral_w) +void h8_dma_channel_device::maral_w(offs_t offset, uint16_t data, uint16_t mem_mask) { mar[0] = (mar[0] & ~mem_mask) | (data & mem_mask); logerror("maral_w %06x\n", mar[0]); } -READ16_MEMBER(h8_dma_channel_device::ioara_r) +uint16_t h8_dma_channel_device::ioara_r() { logerror("iorar_r %04x\n", ioar[0]); return ioar[0]; } -WRITE16_MEMBER(h8_dma_channel_device::ioara_w) +void h8_dma_channel_device::ioara_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&ioar[0]); logerror("ioara_w %04x\n", ioar[0]); } -READ16_MEMBER(h8_dma_channel_device::etcra_r) +uint16_t h8_dma_channel_device::etcra_r() { logerror("etcra_r %04x\n", etcr[0]); return etcr[0]; } -WRITE16_MEMBER(h8_dma_channel_device::etcra_w) +void h8_dma_channel_device::etcra_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&etcr[0]); logerror("etcra_w %04x\n", etcr[0]); } -READ16_MEMBER(h8_dma_channel_device::marbh_r) +uint16_t h8_dma_channel_device::marbh_r() { logerror("marbh_r %06x\n", mar[1]); return mar[1] >> 16; } -WRITE16_MEMBER(h8_dma_channel_device::marbh_w) +void h8_dma_channel_device::marbh_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if(ACCESSING_BITS_0_7) mar[1] = ((data & 0x00ff) << 16) | (mar[1] & 0xffff); logerror("marbh_w %06x\n", mar[1]); } -READ16_MEMBER(h8_dma_channel_device::marbl_r) +uint16_t h8_dma_channel_device::marbl_r() { logerror("marbl_r %06x\n", mar[1]); return mar[1]; } -WRITE16_MEMBER(h8_dma_channel_device::marbl_w) +void h8_dma_channel_device::marbl_w(offs_t offset, uint16_t data, uint16_t mem_mask) { mar[1] = (mar[1] & ~mem_mask) | (data & mem_mask); logerror("marbl_w %06x\n", mar[1]); } -READ16_MEMBER(h8_dma_channel_device::ioarb_r) +uint16_t h8_dma_channel_device::ioarb_r() { logerror("ioarb_r %04x\n", ioar[1]); return ioar[1]; } -WRITE16_MEMBER(h8_dma_channel_device::ioarb_w) +void h8_dma_channel_device::ioarb_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&ioar[1]); logerror("ioarb_w %04x\n", ioar[1]); } -READ16_MEMBER(h8_dma_channel_device::etcrb_r) +uint16_t h8_dma_channel_device::etcrb_r() { logerror("etcrb_r %04x\n", etcr[1]); return etcr[1]; } -WRITE16_MEMBER(h8_dma_channel_device::etcrb_w) +void h8_dma_channel_device::etcrb_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&etcr[1]); logerror("etcrb_w %04x\n", etcr[1]); } -READ16_MEMBER(h8_dma_channel_device::dmacr_r) +uint16_t h8_dma_channel_device::dmacr_r() { logerror("dmacr_r %04x\n", dmacr); return dmacr; } -WRITE16_MEMBER(h8_dma_channel_device::dmacr_w) +void h8_dma_channel_device::dmacr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&dmacr); logerror("dmacr_w %04x\n", dmacr); @@ -276,13 +276,13 @@ WRITE16_MEMBER(h8_dma_channel_device::dmacr_w) } // H8H DMA -READ8_MEMBER(h8_dma_channel_device::dtcra_r) +uint8_t h8_dma_channel_device::dtcra_r() { logerror("dtcra_r %02x\n", dtcr[0]); return dtcr[0]; } -WRITE8_MEMBER(h8_dma_channel_device::dtcra_w) +void h8_dma_channel_device::dtcra_w(uint8_t data) { dtcr[0] = data; logerror("dtcra_w %02x\n", dtcr[0]); @@ -291,13 +291,13 @@ WRITE8_MEMBER(h8_dma_channel_device::dtcra_w) } } -READ8_MEMBER(h8_dma_channel_device::dtcrb_r) +uint8_t h8_dma_channel_device::dtcrb_r() { logerror("dtcrb_r %02x\n", dtcr[1]); return dtcr[1]; } -WRITE8_MEMBER(h8_dma_channel_device::dtcrb_w) +void h8_dma_channel_device::dtcrb_w(uint8_t data) { dtcr[1] = data; logerror("dtcrb_w %02x\n", dtcr[1]); diff --git a/src/devices/cpu/h8/h8_dma.h b/src/devices/cpu/h8/h8_dma.h index d244f53ebd1..72d33105349 100644 --- a/src/devices/cpu/h8/h8_dma.h +++ b/src/devices/cpu/h8/h8_dma.h @@ -45,12 +45,12 @@ class h8_dma_device : public device_t { public: h8_dma_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ8_MEMBER(dmawer_r); - DECLARE_WRITE8_MEMBER(dmawer_w); - DECLARE_READ8_MEMBER(dmatcr_r); - DECLARE_WRITE8_MEMBER(dmatcr_w); - DECLARE_READ16_MEMBER(dmabcr_r); - DECLARE_WRITE16_MEMBER(dmabcr_w); + uint8_t dmawer_r(); + void dmawer_w(uint8_t data); + uint8_t dmatcr_r(); + void dmatcr_w(uint8_t data); + uint16_t dmabcr_r(); + void dmabcr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); bool trigger_dma(int vector); void count_last(int id); @@ -104,30 +104,30 @@ public: } void set_info(const char *intc, int irq_base, int v0, int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8, int v9, int va, int vb, int vc, int vd, int ve, int vf); - DECLARE_READ16_MEMBER(marah_r); - DECLARE_WRITE16_MEMBER(marah_w); - DECLARE_READ16_MEMBER(maral_r); - DECLARE_WRITE16_MEMBER(maral_w); - DECLARE_READ16_MEMBER(ioara_r); - DECLARE_WRITE16_MEMBER(ioara_w); - DECLARE_READ16_MEMBER(etcra_r); - DECLARE_WRITE16_MEMBER(etcra_w); - DECLARE_READ16_MEMBER(marbh_r); - DECLARE_WRITE16_MEMBER(marbh_w); - DECLARE_READ16_MEMBER(marbl_r); - DECLARE_WRITE16_MEMBER(marbl_w); - DECLARE_READ16_MEMBER(ioarb_r); - DECLARE_WRITE16_MEMBER(ioarb_w); - DECLARE_READ16_MEMBER(etcrb_r); - DECLARE_WRITE16_MEMBER(etcrb_w); - DECLARE_READ16_MEMBER(dmacr_r); - DECLARE_WRITE16_MEMBER(dmacr_w); + uint16_t marah_r(); + void marah_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t maral_r(); + void maral_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t ioara_r(); + void ioara_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t etcra_r(); + void etcra_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t marbh_r(); + void marbh_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t marbl_r(); + void marbl_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t ioarb_r(); + void ioarb_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t etcrb_r(); + void etcrb_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t dmacr_r(); + void dmacr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); // H8H DMA - DECLARE_READ8_MEMBER(dtcra_r); - DECLARE_WRITE8_MEMBER(dtcra_w); - DECLARE_READ8_MEMBER(dtcrb_r); - DECLARE_WRITE8_MEMBER(dtcrb_w); + uint8_t dtcra_r(); + void dtcra_w(uint8_t data); + uint8_t dtcrb_r(); + void dtcrb_w(uint8_t data); void set_id(int id); void set_bcr(bool fae, bool sae, uint8_t dta, uint8_t dte, uint8_t dtie); diff --git a/src/devices/cpu/h8/h8_dtc.cpp b/src/devices/cpu/h8/h8_dtc.cpp index f600b71c6a8..a2668456414 100644 --- a/src/devices/cpu/h8/h8_dtc.cpp +++ b/src/devices/cpu/h8/h8_dtc.cpp @@ -51,25 +51,25 @@ void h8_dtc_device::device_reset() cur_active_vector = -1; } -READ8_MEMBER(h8_dtc_device::dtcer_r) +uint8_t h8_dtc_device::dtcer_r(offs_t offset) { if(V>=2) logerror("dtcer_r %x, %02x\n", offset, dtcer[offset]); return dtcer[offset]; } -WRITE8_MEMBER(h8_dtc_device::dtcer_w) +void h8_dtc_device::dtcer_w(offs_t offset, uint8_t data) { dtcer[offset] = data; if(V>=2) logerror("dtcer_w %x, %02x\n", offset, data); } -READ8_MEMBER(h8_dtc_device::dtvecr_r) +uint8_t h8_dtc_device::dtvecr_r() { if(V>=2) logerror("dtvecr_r %02x\n", dtvecr); return dtvecr; } -WRITE8_MEMBER(h8_dtc_device::dtvecr_w) +void h8_dtc_device::dtvecr_w(uint8_t data) { dtvecr = data; if(V>=2) logerror("dtvecr_w %02x\n", data); diff --git a/src/devices/cpu/h8/h8_dtc.h b/src/devices/cpu/h8/h8_dtc.h index f3e33795190..6b1a32b8a9b 100644 --- a/src/devices/cpu/h8/h8_dtc.h +++ b/src/devices/cpu/h8/h8_dtc.h @@ -37,10 +37,10 @@ public: } void set_info(const char *intc, int irq); - DECLARE_READ8_MEMBER(dtcer_r); - DECLARE_WRITE8_MEMBER(dtcer_w); - DECLARE_READ8_MEMBER(dtvecr_r); - DECLARE_WRITE8_MEMBER(dtvecr_w); + uint8_t dtcer_r(offs_t offset); + void dtcer_w(offs_t offset, uint8_t data); + uint8_t dtvecr_r(); + void dtvecr_w(uint8_t data); bool trigger_dtc(int vector); void count_done(int id); diff --git a/src/devices/cpu/h8/h8_intc.cpp b/src/devices/cpu/h8/h8_intc.cpp index 2dda3b5faa2..94e6e3fdad0 100644 --- a/src/devices/cpu/h8/h8_intc.cpp +++ b/src/devices/cpu/h8/h8_intc.cpp @@ -103,12 +103,12 @@ void h8_intc_device::set_filter(int _icr_filter, int _ipr_filter) update_irq_state(); } -READ8_MEMBER(h8_intc_device::ier_r) +uint8_t h8_intc_device::ier_r() { return ier; } -WRITE8_MEMBER(h8_intc_device::ier_w) +void h8_intc_device::ier_w(uint8_t data) { ier = data; logerror("ier = %02x\n", data); @@ -131,12 +131,12 @@ void h8_intc_device::check_level_irqs(bool force_update) } -READ8_MEMBER(h8_intc_device::iscr_r) +uint8_t h8_intc_device::iscr_r() { return iscr; } -WRITE8_MEMBER(h8_intc_device::iscr_w) +void h8_intc_device::iscr_w(uint8_t data) { iscr = data; logerror("iscr = %02x\n", iscr); @@ -216,57 +216,57 @@ void h8h_intc_device::device_reset() icr = 0x000000; } -READ8_MEMBER(h8h_intc_device::isr_r) +uint8_t h8h_intc_device::isr_r() { return isr; } -WRITE8_MEMBER(h8h_intc_device::isr_w) +void h8h_intc_device::isr_w(uint8_t data) { isr &= data; // edge/level logerror("isr = %02x / %02x\n", data, isr); check_level_irqs(true); } -READ8_MEMBER(h8h_intc_device::icr_r) +uint8_t h8h_intc_device::icr_r(offs_t offset) { return icr >> (8*offset); } -WRITE8_MEMBER(h8h_intc_device::icr_w) +void h8h_intc_device::icr_w(offs_t offset, uint8_t data) { icr = (icr & (0xff << (8*offset))) | (data << (8*offset)); logerror("icr %d = %02x\n", offset, data); } -READ8_MEMBER(h8h_intc_device::icrc_r) +uint8_t h8h_intc_device::icrc_r() { - return icr_r(space, 2, mem_mask); + return icr_r(2); } -WRITE8_MEMBER(h8h_intc_device::icrc_w) +void h8h_intc_device::icrc_w(uint8_t data) { - icr_w(space, 2, data, mem_mask); + icr_w(2, data); } -READ8_MEMBER(h8h_intc_device::iscrh_r) +uint8_t h8h_intc_device::iscrh_r() { return iscr >> 8; } -WRITE8_MEMBER(h8h_intc_device::iscrh_w) +void h8h_intc_device::iscrh_w(uint8_t data) { iscr = (iscr & 0x00ff) | (data << 8); logerror("iscr = %04x\n", iscr); update_irq_types(); } -READ8_MEMBER(h8h_intc_device::iscrl_r) +uint8_t h8h_intc_device::iscrl_r() { return iscr; } -WRITE8_MEMBER(h8h_intc_device::iscrl_w) +void h8h_intc_device::iscrl_w(uint8_t data) { iscr = (iscr & 0xff00) | data; logerror("iscr = %04x\n", iscr); @@ -331,25 +331,25 @@ void h8s_intc_device::device_reset() memset(ipr, 0x77, sizeof(ipr)); } -READ8_MEMBER(h8s_intc_device::ipr_r) +uint8_t h8s_intc_device::ipr_r(offs_t offset) { return ipr[offset]; } -WRITE8_MEMBER(h8s_intc_device::ipr_w) +void h8s_intc_device::ipr_w(offs_t offset, uint8_t data) { ipr[offset] = data; logerror("ipr %d = %02x\n", offset, data); } -READ8_MEMBER(h8s_intc_device::iprk_r) +uint8_t h8s_intc_device::iprk_r() { - return ipr_r(space, 10, mem_mask); + return ipr_r(10); } -WRITE8_MEMBER(h8s_intc_device::iprk_w) +void h8s_intc_device::iprk_w(uint8_t data) { - ipr_w(space, 10, data, mem_mask); + ipr_w(10, data); } const int h8s_intc_device::vector_to_slot[92] = { diff --git a/src/devices/cpu/h8/h8_intc.h b/src/devices/cpu/h8/h8_intc.h index 20bd830f45f..787bafc48cc 100644 --- a/src/devices/cpu/h8/h8_intc.h +++ b/src/devices/cpu/h8/h8_intc.h @@ -26,10 +26,10 @@ public: void set_input(int inputnum, int state); void set_filter(int icr_filter, int ipr_filter); - DECLARE_READ8_MEMBER(ier_r); - DECLARE_WRITE8_MEMBER(ier_w); - DECLARE_READ8_MEMBER(iscr_r); - DECLARE_WRITE8_MEMBER(iscr_w); + uint8_t ier_r(); + void ier_w(uint8_t data); + uint8_t iscr_r(); + void iscr_w(uint8_t data); protected: enum { IRQ_LEVEL, IRQ_EDGE, IRQ_DUAL_EDGE }; @@ -64,16 +64,16 @@ class h8h_intc_device : public h8_intc_device { public: h8h_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ8_MEMBER(isr_r); - DECLARE_WRITE8_MEMBER(isr_w); - DECLARE_READ8_MEMBER(icr_r); - DECLARE_WRITE8_MEMBER(icr_w); - DECLARE_READ8_MEMBER(icrc_r); - DECLARE_WRITE8_MEMBER(icrc_w); - DECLARE_READ8_MEMBER(iscrh_r); - DECLARE_WRITE8_MEMBER(iscrh_w); - DECLARE_READ8_MEMBER(iscrl_r); - DECLARE_WRITE8_MEMBER(iscrl_w); + uint8_t isr_r(); + void isr_w(uint8_t data); + uint8_t icr_r(offs_t offset); + void icr_w(offs_t offset, uint8_t data); + uint8_t icrc_r(); + void icrc_w(uint8_t data); + uint8_t iscrh_r(); + void iscrh_w(uint8_t data); + uint8_t iscrl_r(); + void iscrl_w(uint8_t data); protected: static const int vector_to_slot[]; @@ -93,10 +93,10 @@ class h8s_intc_device : public h8h_intc_device { public: h8s_intc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock = 0); - DECLARE_READ8_MEMBER(ipr_r); - DECLARE_WRITE8_MEMBER(ipr_w); - DECLARE_READ8_MEMBER(iprk_r); - DECLARE_WRITE8_MEMBER(iprk_w); + uint8_t ipr_r(offs_t offset); + void ipr_w(offs_t offset, uint8_t data); + uint8_t iprk_r(); + void iprk_w(uint8_t data); private: static const int vector_to_slot[]; uint8_t ipr[11]; diff --git a/src/devices/cpu/h8/h8_port.cpp b/src/devices/cpu/h8/h8_port.cpp index bc21c99d6df..078a8c92a84 100644 --- a/src/devices/cpu/h8/h8_port.cpp +++ b/src/devices/cpu/h8/h8_port.cpp @@ -18,27 +18,27 @@ void h8_port_device::set_info(int _address, uint8_t _default_ddr, uint8_t _mask) mask = _mask; } -WRITE8_MEMBER(h8_port_device::ddr_w) +void h8_port_device::ddr_w(uint8_t data) { // logerror("ddr_w %02x\n", data); ddr = data; update_output(); } -WRITE8_MEMBER(h8_port_device::dr_w) +void h8_port_device::dr_w(uint8_t data) { // logerror("dr_w %02x\n", data); dr = data; update_output(); } -READ8_MEMBER(h8_port_device::dr_r) +uint8_t h8_port_device::dr_r() { // logerror("dr_r %02x\n", (dr | mask) & 0xff); return dr | mask; } -READ8_MEMBER(h8_port_device::port_r) +uint8_t h8_port_device::port_r() { uint8_t res = mask | (dr & ddr); if((ddr & ~mask) != uint8_t(~mask)) @@ -48,25 +48,25 @@ READ8_MEMBER(h8_port_device::port_r) return res; } -WRITE8_MEMBER(h8_port_device::pcr_w) +void h8_port_device::pcr_w(uint8_t data) { logerror("pcr_w %02x\n", data); pcr = data; } -READ8_MEMBER(h8_port_device::pcr_r) +uint8_t h8_port_device::pcr_r() { logerror("dr_r %02x\n", (pcr | mask) & 0xff); return pcr | mask; } -WRITE8_MEMBER(h8_port_device::odr_w) +void h8_port_device::odr_w(uint8_t data) { logerror("odr_w %02x\n", data); odr = data; } -READ8_MEMBER(h8_port_device::odr_r) +uint8_t h8_port_device::odr_r() { logerror("odr_r %02x\n", (odr | mask) & 0xff); return odr | ~mask; diff --git a/src/devices/cpu/h8/h8_port.h b/src/devices/cpu/h8/h8_port.h index 033aee4484d..887efcebf47 100644 --- a/src/devices/cpu/h8/h8_port.h +++ b/src/devices/cpu/h8/h8_port.h @@ -27,14 +27,14 @@ public: void set_info(int address, uint8_t default_ddr, uint8_t mask); - DECLARE_WRITE8_MEMBER(ddr_w); - DECLARE_WRITE8_MEMBER(dr_w); - DECLARE_READ8_MEMBER(dr_r); - DECLARE_READ8_MEMBER(port_r); - DECLARE_WRITE8_MEMBER(pcr_w); - DECLARE_READ8_MEMBER(pcr_r); - DECLARE_WRITE8_MEMBER(odr_w); - DECLARE_READ8_MEMBER(odr_r); + void ddr_w(uint8_t data); + void dr_w(uint8_t data); + uint8_t dr_r(); + uint8_t port_r(); + void pcr_w(uint8_t data); + uint8_t pcr_r(); + void odr_w(uint8_t data); + uint8_t odr_r(); protected: required_device cpu; diff --git a/src/devices/cpu/h8/h8_sci.cpp b/src/devices/cpu/h8/h8_sci.cpp index c511ea664f9..b5d8b586f94 100644 --- a/src/devices/cpu/h8/h8_sci.cpp +++ b/src/devices/cpu/h8/h8_sci.cpp @@ -40,7 +40,7 @@ void h8_sci_device::set_external_clock_period(const attotime &period) external_clock_period = period; } -WRITE8_MEMBER(h8_sci_device::smr_w) +void h8_sci_device::smr_w(uint8_t data) { smr = data; if(V>=2) logerror("smr_w %02x %s %c%c%c%s /%d (%06x)\n", data, @@ -54,20 +54,20 @@ WRITE8_MEMBER(h8_sci_device::smr_w) clock_update(); } -READ8_MEMBER(h8_sci_device::smr_r) +uint8_t h8_sci_device::smr_r() { if(V>=2) logerror("smr_r %02x (%06x)\n", smr, cpu->pc()); return smr; } -WRITE8_MEMBER(h8_sci_device::brr_w) +void h8_sci_device::brr_w(uint8_t data) { brr = data; if(V>=2) logerror("brr_w %02x (%06x)\n", data, cpu->pc()); clock_update(); } -READ8_MEMBER(h8_sci_device::brr_r) +uint8_t h8_sci_device::brr_r() { if(V>=2) logerror("brr_r %02x (%06x)\n", brr, cpu->pc()); return brr; @@ -83,7 +83,7 @@ bool h8_sci_device::has_recv_error() const return ssr & (SSR_ORER|SSR_PER|SSR_FER); } -WRITE8_MEMBER(h8_sci_device::scr_w) +void h8_sci_device::scr_w(uint8_t data) { if(V>=2) logerror("scr_w %02x%s%s%s%s%s%s clk=%d (%06x)\n", data, data & SCR_TIE ? " txi" : "", @@ -116,13 +116,13 @@ WRITE8_MEMBER(h8_sci_device::scr_w) intc->internal_interrupt(eri_int); } -READ8_MEMBER(h8_sci_device::scr_r) +uint8_t h8_sci_device::scr_r() { if(V>=2) logerror("scr_r %02x (%06x)\n", scr, cpu->pc()); return scr; } -WRITE8_MEMBER(h8_sci_device::tdr_w) +void h8_sci_device::tdr_w(uint8_t data) { if(V>=2) logerror("tdr_w %02x (%06x)\n", data, cpu->pc()); tdr = data; @@ -133,13 +133,13 @@ WRITE8_MEMBER(h8_sci_device::tdr_w) } } -READ8_MEMBER(h8_sci_device::tdr_r) +uint8_t h8_sci_device::tdr_r() { if(V>=2) logerror("tdr_r %02x (%06x)\n", tdr, cpu->pc()); return tdr; } -WRITE8_MEMBER(h8_sci_device::ssr_w) +void h8_sci_device::ssr_w(uint8_t data) { if(!(scr & SCR_TE)) { data |= SSR_TDRE; @@ -157,13 +157,13 @@ WRITE8_MEMBER(h8_sci_device::ssr_w) rx_start(); } -READ8_MEMBER(h8_sci_device::ssr_r) +uint8_t h8_sci_device::ssr_r() { if(V>=3) logerror("ssr_r %02x (%06x)\n", ssr, cpu->pc()); return ssr; } -READ8_MEMBER(h8_sci_device::rdr_r) +uint8_t h8_sci_device::rdr_r() { if(V>=2) logerror("rdr_r %02x (%06x)\n", rdr, cpu->pc()); if(cpu->access_is_dma()) @@ -171,12 +171,12 @@ READ8_MEMBER(h8_sci_device::rdr_r) return rdr; } -WRITE8_MEMBER(h8_sci_device::scmr_w) +void h8_sci_device::scmr_w(uint8_t data) { if(V>=2) logerror("scmr_w %02x (%06x)\n", data, cpu->pc()); } -READ8_MEMBER(h8_sci_device::scmr_r) +uint8_t h8_sci_device::scmr_r() { if(V>=2) logerror("scmr_r (%06x)\n", cpu->pc()); return 0x00; diff --git a/src/devices/cpu/h8/h8_sci.h b/src/devices/cpu/h8/h8_sci.h index aa15f491160..bf3d5b8bcbb 100644 --- a/src/devices/cpu/h8/h8_sci.h +++ b/src/devices/cpu/h8/h8_sci.h @@ -29,19 +29,19 @@ public: void set_info(const char *intc, int eri, int rxi, int txi, int tei); void set_external_clock_period(const attotime &_period); - DECLARE_WRITE8_MEMBER(smr_w); - DECLARE_READ8_MEMBER(smr_r); - DECLARE_WRITE8_MEMBER(brr_w); - DECLARE_READ8_MEMBER(brr_r); - DECLARE_WRITE8_MEMBER(scr_w); - DECLARE_READ8_MEMBER(scr_r); - DECLARE_WRITE8_MEMBER(tdr_w); - DECLARE_READ8_MEMBER(tdr_r); - DECLARE_WRITE8_MEMBER(ssr_w); - DECLARE_READ8_MEMBER(ssr_r); - DECLARE_READ8_MEMBER(rdr_r); - DECLARE_WRITE8_MEMBER(scmr_w); - DECLARE_READ8_MEMBER(scmr_r); + void smr_w(uint8_t data); + uint8_t smr_r(); + void brr_w(uint8_t data); + uint8_t brr_r(); + void scr_w(uint8_t data); + uint8_t scr_r(); + void tdr_w(uint8_t data); + uint8_t tdr_r(); + void ssr_w(uint8_t data); + uint8_t ssr_r(); + uint8_t rdr_r(); + void scmr_w(uint8_t data); + uint8_t scmr_r(); DECLARE_WRITE_LINE_MEMBER(rx_w); DECLARE_WRITE_LINE_MEMBER(clk_w); diff --git a/src/devices/cpu/h8/h8_timer16.cpp b/src/devices/cpu/h8/h8_timer16.cpp index 5c4294e542c..fdb0e3ddd05 100644 --- a/src/devices/cpu/h8/h8_timer16.cpp +++ b/src/devices/cpu/h8/h8_timer16.cpp @@ -41,12 +41,12 @@ void h8_timer16_channel_device::set_info(int _tgr_count, int _tbr_count, const c interrupt[5] = irq_base; } -READ8_MEMBER(h8_timer16_channel_device::tcr_r) +uint8_t h8_timer16_channel_device::tcr_r() { return tcr; } -WRITE8_MEMBER(h8_timer16_channel_device::tcr_w) +void h8_timer16_channel_device::tcr_w(uint8_t data) { update_counter(); tcr = data; @@ -55,22 +55,22 @@ WRITE8_MEMBER(h8_timer16_channel_device::tcr_w) recalc_event(); } -READ8_MEMBER(h8_timer16_channel_device::tmdr_r) +uint8_t h8_timer16_channel_device::tmdr_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_channel_device::tmdr_w) +void h8_timer16_channel_device::tmdr_w(uint8_t data) { if(V>=1) logerror("tmdr_w %02x\n", data); } -READ8_MEMBER(h8_timer16_channel_device::tior_r) +uint8_t h8_timer16_channel_device::tior_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_channel_device::tior_w) +void h8_timer16_channel_device::tior_w(offs_t offset, uint8_t data) { if(V>=1) logerror("tior_w %d, %02x\n", offset, data); } @@ -89,12 +89,12 @@ void h8_timer16_channel_device::set_enable(bool enable) recalc_event(); } -READ8_MEMBER(h8_timer16_channel_device::tier_r) +uint8_t h8_timer16_channel_device::tier_r() { return tier; } -WRITE8_MEMBER(h8_timer16_channel_device::tier_w) +void h8_timer16_channel_device::tier_w(uint8_t data) { update_counter(); if(V>=1) logerror("tier_w %02x\n", data); @@ -111,24 +111,24 @@ WRITE8_MEMBER(h8_timer16_channel_device::tier_w) recalc_event(); } -READ8_MEMBER(h8_timer16_channel_device::tsr_r) +uint8_t h8_timer16_channel_device::tsr_r() { return isr_to_sr(); } -WRITE8_MEMBER(h8_timer16_channel_device::tsr_w) +void h8_timer16_channel_device::tsr_w(uint8_t data) { if(V>=1) logerror("tsr_w %02x\n", data); isr_update(data); } -READ16_MEMBER(h8_timer16_channel_device::tcnt_r) +uint16_t h8_timer16_channel_device::tcnt_r() { update_counter(); return tcnt; } -WRITE16_MEMBER(h8_timer16_channel_device::tcnt_w) +void h8_timer16_channel_device::tcnt_w(offs_t offset, uint16_t data, uint16_t mem_mask) { update_counter(); COMBINE_DATA(&tcnt); @@ -136,12 +136,12 @@ WRITE16_MEMBER(h8_timer16_channel_device::tcnt_w) recalc_event(); } -READ16_MEMBER(h8_timer16_channel_device::tgr_r) +uint16_t h8_timer16_channel_device::tgr_r(offs_t offset) { return tgr[offset]; } -WRITE16_MEMBER(h8_timer16_channel_device::tgr_w) +void h8_timer16_channel_device::tgr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { update_counter(); COMBINE_DATA(tgr + offset); @@ -149,12 +149,12 @@ WRITE16_MEMBER(h8_timer16_channel_device::tgr_w) recalc_event(); } -READ16_MEMBER(h8_timer16_channel_device::tbr_r) +uint16_t h8_timer16_channel_device::tbr_r(offs_t offset) { return tgr[offset+tgr_count]; } -WRITE16_MEMBER(h8_timer16_channel_device::tbr_w) +void h8_timer16_channel_device::tbr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(tgr + offset + tgr_count); if(V>=1) logerror("tbr%c_w %04x\n", 'a'+offset, tgr[offset]); @@ -345,12 +345,12 @@ void h8_timer16_device::device_reset() } -READ8_MEMBER(h8_timer16_device::tstr_r) +uint8_t h8_timer16_device::tstr_r() { return tstr; } -WRITE8_MEMBER(h8_timer16_device::tstr_w) +void h8_timer16_device::tstr_w(uint8_t data) { if(V>=1) logerror("tstr_w %02x\n", data); tstr = data; @@ -358,57 +358,57 @@ WRITE8_MEMBER(h8_timer16_device::tstr_w) timer_channel[i]->set_enable((tstr >> i) & 1); } -READ8_MEMBER(h8_timer16_device::tsyr_r) +uint8_t h8_timer16_device::tsyr_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_device::tsyr_w) +void h8_timer16_device::tsyr_w(uint8_t data) { if(V>=1) logerror("tsyr_w %02x\n", data); } -READ8_MEMBER(h8_timer16_device::tmdr_r) +uint8_t h8_timer16_device::tmdr_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_device::tmdr_w) +void h8_timer16_device::tmdr_w(uint8_t data) { if(V>=1) logerror("tmdr_w %02x\n", data); } -READ8_MEMBER(h8_timer16_device::tfcr_r) +uint8_t h8_timer16_device::tfcr_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_device::tfcr_w) +void h8_timer16_device::tfcr_w(uint8_t data) { if(V>=1) logerror("tfcr_w %02x\n", data); } -READ8_MEMBER(h8_timer16_device::toer_r) +uint8_t h8_timer16_device::toer_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_device::toer_w) +void h8_timer16_device::toer_w(uint8_t data) { if(V>=1) logerror("toer_w %02x\n", data); } -READ8_MEMBER(h8_timer16_device::tocr_r) +uint8_t h8_timer16_device::tocr_r() { return 0x00; } -WRITE8_MEMBER(h8_timer16_device::tocr_w) +void h8_timer16_device::tocr_w(uint8_t data) { if(V>=1) logerror("tocr_w %02x\n", data); } -READ8_MEMBER(h8_timer16_device::tisr_r) +uint8_t h8_timer16_device::tisr_r(offs_t offset) { uint8_t r = 0; for(int i=0; i=1) logerror("tisr%c_w %02x\n", 'a'+offset, data); for(int i=0; itisr_w(offset, data >> i); } -READ8_MEMBER(h8_timer16_device::tisrc_r) +uint8_t h8_timer16_device::tisrc_r() { - return tisr_r(space, 2, mem_mask); + return tisr_r(2); } -WRITE8_MEMBER(h8_timer16_device::tisrc_w) +void h8_timer16_device::tisrc_w(uint8_t data) { - tisr_w(space, 2, data, mem_mask); + tisr_w(2, data); } -WRITE8_MEMBER(h8_timer16_device::tolr_w) +void h8_timer16_device::tolr_w(uint8_t data) { if(V>=1) logerror("tocr_w %02x\n", data); } diff --git a/src/devices/cpu/h8/h8_timer16.h b/src/devices/cpu/h8/h8_timer16.h index a22c68eb53d..6543b9ccb7c 100644 --- a/src/devices/cpu/h8/h8_timer16.h +++ b/src/devices/cpu/h8/h8_timer16.h @@ -65,22 +65,22 @@ public: void set_info(int tgr_count, int tbr_count, const char *intc, int irq_base); - DECLARE_READ8_MEMBER(tcr_r); - DECLARE_WRITE8_MEMBER(tcr_w); - DECLARE_READ8_MEMBER(tmdr_r); - DECLARE_WRITE8_MEMBER(tmdr_w); - DECLARE_READ8_MEMBER(tior_r); - DECLARE_WRITE8_MEMBER(tior_w); - DECLARE_READ8_MEMBER(tier_r); - DECLARE_WRITE8_MEMBER(tier_w); - DECLARE_READ8_MEMBER(tsr_r); - DECLARE_WRITE8_MEMBER(tsr_w); - DECLARE_READ16_MEMBER(tcnt_r); - DECLARE_WRITE16_MEMBER(tcnt_w); - DECLARE_READ16_MEMBER(tgr_r); - DECLARE_WRITE16_MEMBER(tgr_w); - DECLARE_READ16_MEMBER(tbr_r); - DECLARE_WRITE16_MEMBER(tbr_w); + uint8_t tcr_r(); + void tcr_w(uint8_t data); + uint8_t tmdr_r(); + void tmdr_w(uint8_t data); + uint8_t tior_r(); + void tior_w(offs_t offset, uint8_t data); + uint8_t tier_r(); + void tier_w(uint8_t data); + uint8_t tsr_r(); + void tsr_w(uint8_t data); + uint16_t tcnt_r(); + void tcnt_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t tgr_r(offs_t offset); + void tgr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t tbr_r(offs_t offset); + void tbr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); uint64_t internal_update(uint64_t current_time); void set_ier(uint8_t value); @@ -172,23 +172,23 @@ public: } void set_info(int timer_count, uint8_t default_tstr); - DECLARE_READ8_MEMBER(tstr_r); - DECLARE_WRITE8_MEMBER(tstr_w); - DECLARE_READ8_MEMBER(tsyr_r); - DECLARE_WRITE8_MEMBER(tsyr_w); - DECLARE_READ8_MEMBER(tmdr_r); - DECLARE_WRITE8_MEMBER(tmdr_w); - DECLARE_READ8_MEMBER(tfcr_r); - DECLARE_WRITE8_MEMBER(tfcr_w); - DECLARE_READ8_MEMBER(toer_r); - DECLARE_WRITE8_MEMBER(toer_w); - DECLARE_READ8_MEMBER(tocr_r); - DECLARE_WRITE8_MEMBER(tocr_w); - DECLARE_READ8_MEMBER(tisr_r); - DECLARE_WRITE8_MEMBER(tisr_w); - DECLARE_READ8_MEMBER(tisrc_r); - DECLARE_WRITE8_MEMBER(tisrc_w); - DECLARE_WRITE8_MEMBER(tolr_w); + uint8_t tstr_r(); + void tstr_w(uint8_t data); + uint8_t tsyr_r(); + void tsyr_w(uint8_t data); + uint8_t tmdr_r(); + void tmdr_w(uint8_t data); + uint8_t tfcr_r(); + void tfcr_w(uint8_t data); + uint8_t toer_r(); + void toer_w(uint8_t data); + uint8_t tocr_r(); + void tocr_w(uint8_t data); + uint8_t tisr_r(offs_t offset); + void tisr_w(offs_t offset, uint8_t data); + uint8_t tisrc_r(); + void tisrc_w(uint8_t data); + void tolr_w(uint8_t data); protected: required_device cpu; diff --git a/src/devices/cpu/h8/h8_timer8.cpp b/src/devices/cpu/h8/h8_timer8.cpp index 7a95717471d..352b4a7f7d9 100644 --- a/src/devices/cpu/h8/h8_timer8.cpp +++ b/src/devices/cpu/h8/h8_timer8.cpp @@ -42,12 +42,12 @@ void h8_timer8_channel_device::set_info(const char *intc, int _irq_ca, int _irq_ div_tab[5] = div6; } -READ8_MEMBER(h8_timer8_channel_device::tcr_r) +uint8_t h8_timer8_channel_device::tcr_r() { return tcr; } -WRITE8_MEMBER(h8_timer8_channel_device::tcr_w) +void h8_timer8_channel_device::tcr_w(uint8_t data) { update_counter(); tcr = data; @@ -134,12 +134,12 @@ void h8_timer8_channel_device::update_tcr() logerror(buf); } -READ8_MEMBER(h8_timer8_channel_device::tcsr_r) +uint8_t h8_timer8_channel_device::tcsr_r() { return tcsr; } -WRITE8_MEMBER(h8_timer8_channel_device::tcsr_w) +void h8_timer8_channel_device::tcsr_w(uint8_t data) { update_counter(); @@ -152,12 +152,12 @@ WRITE8_MEMBER(h8_timer8_channel_device::tcsr_w) recalc_event(); } -READ8_MEMBER(h8_timer8_channel_device::tcor_r) +uint8_t h8_timer8_channel_device::tcor_r(offs_t offset) { return tcor[offset]; } -WRITE8_MEMBER(h8_timer8_channel_device::tcor_w) +void h8_timer8_channel_device::tcor_w(offs_t offset, uint8_t data) { update_counter(); tcor[offset] = data; @@ -165,14 +165,14 @@ WRITE8_MEMBER(h8_timer8_channel_device::tcor_w) recalc_event(); } -READ8_MEMBER(h8_timer8_channel_device::tcnt_r) +uint8_t h8_timer8_channel_device::tcnt_r() { update_counter(); recalc_event(); return tcnt; } -WRITE8_MEMBER(h8_timer8_channel_device::tcnt_w) +void h8_timer8_channel_device::tcnt_w(uint8_t data) { update_counter(); tcnt = data; diff --git a/src/devices/cpu/h8/h8_timer8.h b/src/devices/cpu/h8/h8_timer8.h index b08c51556d2..0ba06d933ba 100644 --- a/src/devices/cpu/h8/h8_timer8.h +++ b/src/devices/cpu/h8/h8_timer8.h @@ -39,14 +39,14 @@ public: void set_info(const char *intc, int irq_ca, int irq_cb, int irq_v, int div1, int div2, int div3, int div4, int div5, int div6); - DECLARE_READ8_MEMBER(tcr_r); - DECLARE_WRITE8_MEMBER(tcr_w); - DECLARE_READ8_MEMBER(tcsr_r); - DECLARE_WRITE8_MEMBER(tcsr_w); - DECLARE_READ8_MEMBER(tcor_r); - DECLARE_WRITE8_MEMBER(tcor_w); - DECLARE_READ8_MEMBER(tcnt_r); - DECLARE_WRITE8_MEMBER(tcnt_w); + uint8_t tcr_r(); + void tcr_w(uint8_t data); + uint8_t tcsr_r(); + void tcsr_w(uint8_t data); + uint8_t tcor_r(offs_t offset); + void tcor_w(offs_t offset, uint8_t data); + uint8_t tcnt_r(); + void tcnt_w(uint8_t data); uint64_t internal_update(uint64_t current_time); void set_extra_clock_bit(bool bit); diff --git a/src/devices/cpu/h8/h8_watchdog.cpp b/src/devices/cpu/h8/h8_watchdog.cpp index b4e5080c104..acbdf3db31c 100644 --- a/src/devices/cpu/h8/h8_watchdog.cpp +++ b/src/devices/cpu/h8/h8_watchdog.cpp @@ -65,7 +65,7 @@ void h8_watchdog_device::tcnt_update(uint64_t cur_time) } -READ16_MEMBER(h8_watchdog_device::wd_r) +uint16_t h8_watchdog_device::wd_r() { if (!machine().side_effects_disabled()) { @@ -75,7 +75,7 @@ READ16_MEMBER(h8_watchdog_device::wd_r) return 0; } -WRITE16_MEMBER(h8_watchdog_device::wd_w) +void h8_watchdog_device::wd_w(offs_t offset, uint16_t data, uint16_t mem_mask) { if(mem_mask != 0xffff) return; @@ -99,14 +99,14 @@ WRITE16_MEMBER(h8_watchdog_device::wd_w) } } -READ16_MEMBER(h8_watchdog_device::rst_r) +uint16_t h8_watchdog_device::rst_r() { if (!machine().side_effects_disabled()) logerror("rst_r\n"); return 0; } -WRITE16_MEMBER(h8_watchdog_device::rst_w) +void h8_watchdog_device::rst_w(uint16_t data) { if((data & 0xff00) == 0xa500) logerror("wowf_w %02x\n", data & 0xff); diff --git a/src/devices/cpu/h8/h8_watchdog.h b/src/devices/cpu/h8/h8_watchdog.h index 0cad0e67020..1cb63025141 100644 --- a/src/devices/cpu/h8/h8_watchdog.h +++ b/src/devices/cpu/h8/h8_watchdog.h @@ -60,10 +60,10 @@ public: uint64_t internal_update(uint64_t current_time); - DECLARE_READ16_MEMBER(wd_r); - DECLARE_WRITE16_MEMBER(wd_w); - DECLARE_READ16_MEMBER(rst_r); - DECLARE_WRITE16_MEMBER(rst_w); + uint16_t wd_r(); + void wd_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t rst_r(); + void rst_w(uint16_t data); protected: virtual void device_start() override; diff --git a/src/devices/cpu/h8/h8s2245.cpp b/src/devices/cpu/h8/h8s2245.cpp index c5e68c9bb4f..b5101017f07 100644 --- a/src/devices/cpu/h8/h8s2245.cpp +++ b/src/devices/cpu/h8/h8s2245.cpp @@ -316,24 +316,24 @@ void h8s2245_device::device_reset() mstpcr = 0x3fff; } -READ8_MEMBER(h8s2245_device::syscr_r) +uint8_t h8s2245_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h8s2245_device::syscr_w) +void h8s2245_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); logerror("syscr = %02x\n", data); } -READ16_MEMBER(h8s2245_device::mstpcr_r) +uint16_t h8s2245_device::mstpcr_r() { return mstpcr; } -WRITE16_MEMBER(h8s2245_device::mstpcr_w) +void h8s2245_device::mstpcr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { uint16_t omstpcr = mstpcr; COMBINE_DATA(&mstpcr); diff --git a/src/devices/cpu/h8/h8s2245.h b/src/devices/cpu/h8/h8s2245.h index 732f4c02692..4fca522bbc5 100644 --- a/src/devices/cpu/h8/h8s2245.h +++ b/src/devices/cpu/h8/h8s2245.h @@ -37,10 +37,10 @@ class h8s2245_device : public h8s2000_device { public: h8s2245_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); - DECLARE_READ16_MEMBER(mstpcr_r); - DECLARE_WRITE16_MEMBER(mstpcr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); + uint16_t mstpcr_r(); + void mstpcr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); protected: required_device intc; diff --git a/src/devices/cpu/h8/h8s2320.cpp b/src/devices/cpu/h8/h8s2320.cpp index 48b8a299f63..14cd0e0a396 100644 --- a/src/devices/cpu/h8/h8s2320.cpp +++ b/src/devices/cpu/h8/h8s2320.cpp @@ -443,12 +443,12 @@ void h8s2320_device::device_reset() syscr = 0x01; } -READ8_MEMBER(h8s2320_device::syscr_r) +uint8_t h8s2320_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h8s2320_device::syscr_w) +void h8s2320_device::syscr_w(uint8_t data) { syscr = data; mac_saturating = syscr & 0x80; diff --git a/src/devices/cpu/h8/h8s2320.h b/src/devices/cpu/h8/h8s2320.h index def1cb3ab4c..4ea272d283f 100644 --- a/src/devices/cpu/h8/h8s2320.h +++ b/src/devices/cpu/h8/h8s2320.h @@ -43,8 +43,8 @@ class h8s2320_device : public h8s2000_device { public: h8s2320_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); protected: required_device intc; diff --git a/src/devices/cpu/h8/h8s2357.cpp b/src/devices/cpu/h8/h8s2357.cpp index 02b9e7bf09b..eda704291c5 100644 --- a/src/devices/cpu/h8/h8s2357.cpp +++ b/src/devices/cpu/h8/h8s2357.cpp @@ -382,12 +382,12 @@ void h8s2357_device::device_reset() syscr = 0x01; } -READ8_MEMBER(h8s2357_device::syscr_r) +uint8_t h8s2357_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h8s2357_device::syscr_w) +void h8s2357_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); diff --git a/src/devices/cpu/h8/h8s2357.h b/src/devices/cpu/h8/h8s2357.h index e0e8348256d..3f20c062d01 100644 --- a/src/devices/cpu/h8/h8s2357.h +++ b/src/devices/cpu/h8/h8s2357.h @@ -38,8 +38,8 @@ class h8s2357_device : public h8s2000_device { public: h8s2357_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); protected: required_device intc; diff --git a/src/devices/cpu/h8/h8s2655.cpp b/src/devices/cpu/h8/h8s2655.cpp index f09b08bcab0..eb29b29bdc3 100644 --- a/src/devices/cpu/h8/h8s2655.cpp +++ b/src/devices/cpu/h8/h8s2655.cpp @@ -394,12 +394,12 @@ void h8s2655_device::device_reset() syscr = 0x01; } -READ8_MEMBER(h8s2655_device::syscr_r) +uint8_t h8s2655_device::syscr_r() { return syscr; } -WRITE8_MEMBER(h8s2655_device::syscr_w) +void h8s2655_device::syscr_w(uint8_t data) { syscr = data; update_irq_filter(); diff --git a/src/devices/cpu/h8/h8s2655.h b/src/devices/cpu/h8/h8s2655.h index c7841af0c26..aa8384bce73 100644 --- a/src/devices/cpu/h8/h8s2655.h +++ b/src/devices/cpu/h8/h8s2655.h @@ -30,8 +30,8 @@ class h8s2655_device : public h8s2600_device { public: h8s2655_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ8_MEMBER(syscr_r); - DECLARE_WRITE8_MEMBER(syscr_w); + uint8_t syscr_r(); + void syscr_w(uint8_t data); protected: required_device intc; diff --git a/src/devices/cpu/i386/athlon.cpp b/src/devices/cpu/i386/athlon.cpp index 7da09ef271b..dddfa80fa35 100644 --- a/src/devices/cpu/i386/athlon.cpp +++ b/src/devices/cpu/i386/athlon.cpp @@ -32,7 +32,7 @@ void athlonxp_device::device_start() space(AS_OPCODES).specific(m_opcodes); space(AS_DATA).cache(mmacache32); - space(AS_OPCODES).install_read_handler(0, 0xffffffff, read32_delegate(*this, FUNC(athlonxp_device::debug_read_memory))); + space(AS_OPCODES).install_read_handler(0, 0xffffffff, read32sm_delegate(*this, FUNC(athlonxp_device::debug_read_memory))); build_x87_opcode_table(); build_opcode_table(OP_I386 | OP_FPU | OP_I486 | OP_PENTIUM | OP_PPRO | OP_MMX | OP_SSE); @@ -188,7 +188,7 @@ int athlonxp_device::address_mode(offs_t address) return 1; } -READ32_MEMBER(athlonxp_device::debug_read_memory) +u32 athlonxp_device::debug_read_memory(offs_t offset) { offs_t address = offset << 2; int mode = check_cacheable(address); diff --git a/src/devices/cpu/i386/athlon.h b/src/devices/cpu/i386/athlon.h index f7ee68ce962..69cc6d84794 100644 --- a/src/devices/cpu/i386/athlon.h +++ b/src/devices/cpu/i386/athlon.h @@ -52,7 +52,7 @@ private: uint32_t program_read_cache(offs_t address, uint32_t mask); void program_write_cache(offs_t address, uint32_t data, uint32_t mask); - DECLARE_READ32_MEMBER(debug_read_memory); + u32 debug_read_memory(offs_t offset); address_space_config m_data_config; address_space_config m_opcodes_config; diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp index 5a9772a9846..b530af629b7 100644 --- a/src/devices/cpu/i86/i186.cpp +++ b/src/devices/cpu/i86/i186.cpp @@ -742,9 +742,9 @@ uint8_t i80186_cpu_device::read_port_byte(uint16_t port) if(!(m_reloc & 0x1000) && (port >> 8) == (m_reloc & 0xff)) { if(port & 1) - return internal_port_r(*m_io, (port >> 1) & 0x7f, 0xff00) >> 8; + return internal_port_r((port >> 1) & 0x7f, 0xff00) >> 8; else - return internal_port_r(*m_io, (port >> 1) & 0x7f, 0x00ff) & 0xff; + return internal_port_r((port >> 1) & 0x7f, 0x00ff) & 0xff; } return m_io->read_byte(port); } @@ -755,9 +755,9 @@ uint16_t i80186_cpu_device::read_port_word(uint16_t port) { // Unaligned reads from the internal bus are swapped rather than split if(port & 1) - return swapendian_int16(internal_port_r(*m_io, (port >> 1) & 0x7f)); + return swapendian_int16(internal_port_r((port >> 1) & 0x7f)); else - return internal_port_r(*m_io, (port >> 1) & 0x7f); + return internal_port_r((port >> 1) & 0x7f); } return m_io->read_word_unaligned(port); } @@ -767,9 +767,9 @@ void i80186_cpu_device::write_port_byte(uint16_t port, uint8_t data) if(!(m_reloc & 0x1000) && (port >> 8) == (m_reloc & 0xff)) { if(port & 1) - internal_port_w(*m_io, (port >> 1) & 0x7f, data << 8, 0xff00); + internal_port_w((port >> 1) & 0x7f, data << 8); else - internal_port_w(*m_io, (port >> 1) & 0x7f, data, 0x00ff); + internal_port_w((port >> 1) & 0x7f, data); } else m_io->write_byte(port, data); @@ -781,9 +781,9 @@ void i80186_cpu_device::write_port_byte_al(uint16_t port) { // Both AH and AL are written onto the internal bus if(port & 1) - internal_port_w(*m_io, (port >> 1) & 0x7f, swapendian_int16(m_regs.w[AX]), 0xff00); + internal_port_w((port >> 1) & 0x7f, swapendian_int16(m_regs.w[AX])); else - internal_port_w(*m_io, (port >> 1) & 0x7f, m_regs.w[AX], 0x00ff); + internal_port_w((port >> 1) & 0x7f, m_regs.w[AX]); } else m_io->write_byte(port, m_regs.w[AL]); @@ -795,9 +795,9 @@ void i80186_cpu_device::write_port_word(uint16_t port, uint16_t data) { // Unaligned writes to the internal bus are swapped rather than split if(port & 1) - internal_port_w(*m_io, (port >> 1) & 0x7f, swapendian_int16(data)); + internal_port_w((port >> 1) & 0x7f, swapendian_int16(data)); else - internal_port_w(*m_io, (port >> 1) & 0x7f, data); + internal_port_w((port >> 1) & 0x7f, data); } else m_io->write_word_unaligned(port, data); @@ -807,7 +807,7 @@ uint8_t i80186_cpu_device::read_byte(uint32_t addr) { if((m_reloc & 0x1000) && (addr >> 8) == (m_reloc & 0xfff)) { - uint16_t ret = internal_port_r(*m_program, (addr >> 1) & 0x7f, (addr & 1) ? 0xff00 : 0x00ff); + uint16_t ret = internal_port_r((addr >> 1) & 0x7f, (addr & 1) ? 0xff00 : 0x00ff); return (addr & 1) ? (ret >> 8) : (ret & 0xff); } return m_program->read_byte(addr); @@ -819,9 +819,9 @@ uint16_t i80186_cpu_device::read_word(uint32_t addr) { // Unaligned reads from the internal bus are swapped rather than split if(addr & 1) - return swapendian_int16(internal_port_r(*m_program, (addr >> 1) & 0x7f)); + return swapendian_int16(internal_port_r((addr >> 1) & 0x7f)); else - return internal_port_r(*m_program, (addr >> 1) & 0x7f); + return internal_port_r((addr >> 1) & 0x7f); } return m_program->read_word_unaligned(addr); } @@ -829,7 +829,7 @@ uint16_t i80186_cpu_device::read_word(uint32_t addr) void i80186_cpu_device::write_byte(uint32_t addr, uint8_t data) { if((m_reloc & 0x1000) && (addr >> 8) == (m_reloc & 0xfff)) - internal_port_w(*m_program, (addr >> 1) & 0x7f, (addr & 1) ? (data << 8) : data, (addr & 1) ? 0xff00 : 0x00ff); + internal_port_w((addr >> 1) & 0x7f, (addr & 1) ? (data << 8) : data); else m_program->write_byte(addr, data); } @@ -840,9 +840,9 @@ void i80186_cpu_device::write_word(uint32_t addr, uint16_t data) { // Unaligned writes from the internal bus are swapped rather than split if(addr & 1) - internal_port_w(*m_program, (addr >> 1) & 0x7f, swapendian_int16(data)); + internal_port_w((addr >> 1) & 0x7f, swapendian_int16(data)); else - internal_port_w(*m_program, (addr >> 1) & 0x7f, data); + internal_port_w((addr >> 1) & 0x7f, data); } else m_program->write_word_unaligned(addr, data); @@ -1555,7 +1555,7 @@ void i80186_cpu_device::drq_callback(int which) } } -READ16_MEMBER(i80186_cpu_device::internal_port_r) +uint16_t i80186_cpu_device::internal_port_r(offs_t offset, uint16_t mem_mask) { int temp, which; @@ -1759,7 +1759,7 @@ READ16_MEMBER(i80186_cpu_device::internal_port_r) * *************************************/ -WRITE16_MEMBER(i80186_cpu_device::internal_port_w) +void i80186_cpu_device::internal_port_w(offs_t offset, uint16_t data) { int which; diff --git a/src/devices/cpu/i86/i186.h b/src/devices/cpu/i86/i186.h index 46055622486..f1bd6aa91b5 100644 --- a/src/devices/cpu/i86/i186.h +++ b/src/devices/cpu/i86/i186.h @@ -91,8 +91,8 @@ private: void update_dma_control(int which, int new_control); void drq_callback(int which); void inc_timer(int which); - DECLARE_READ16_MEMBER(internal_port_r); - DECLARE_WRITE16_MEMBER(internal_port_w); + uint16_t internal_port_r(offs_t offset, uint16_t mem_mask = ~0); + void internal_port_w(offs_t offset, uint16_t data); struct mem_state { diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp index 7aeddda468a..983df1ec4a9 100644 --- a/src/devices/cpu/jaguar/jaguar.cpp +++ b/src/devices/cpu/jaguar/jaguar.cpp @@ -1316,12 +1316,12 @@ void jaguardsp_cpu_device::io_map(address_map &map) map(0x20, 0x23).r(FUNC(jaguardsp_cpu_device::high_accum_r)); } -READ32_MEMBER(jaguar_cpu_device::flags_r) +u32 jaguar_cpu_device::flags_r() { return (m_flags & 0x1c1f7) | (m_imask << 3); } -WRITE32_MEMBER(jaguar_cpu_device::flags_w) +void jaguar_cpu_device::flags_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_flags); // clear imask only on bit 3 clear (1 has no effect) @@ -1345,21 +1345,21 @@ WRITE32_MEMBER(jaguar_cpu_device::flags_w) check_irqs(); } -WRITE32_MEMBER(jaguar_cpu_device::matrix_control_w) +void jaguar_cpu_device::matrix_control_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_io_mtxc); m_mwidth = m_io_mtxc & 0xf; m_maddw = BIT(m_io_mtxc, 4); } -WRITE32_MEMBER(jaguar_cpu_device::matrix_address_w) +void jaguar_cpu_device::matrix_address_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_io_mtxa); // matrix can be long word address only, and only read from internal RAM m_mtxaddr = m_internal_ram_start | (m_io_mtxa & 0xffc); } -WRITE32_MEMBER(jaguar_cpu_device::pc_w) +void jaguar_cpu_device::pc_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_io_pc); if (m_go == false) @@ -1377,7 +1377,7 @@ WRITE32_MEMBER(jaguar_cpu_device::pc_w) * ---- ---x I/O endianness */ // TODO: just log if anything farts for now, change to bit struct once we have something to test out -WRITE32_MEMBER(jaguar_cpu_device::end_w) +void jaguar_cpu_device::end_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_io_end); // sburnout sets bit 1 == 0 @@ -1385,7 +1385,7 @@ WRITE32_MEMBER(jaguar_cpu_device::end_w) throw emu_fatalerror("%s: fatal endian setup %08x", this->tag(), m_io_end); } -WRITE32_MEMBER(jaguardsp_cpu_device::dsp_end_w) +void jaguardsp_cpu_device::dsp_end_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_io_end); // wolfn3d writes a '0' to bit 1 (which is a NOP for DSP) @@ -1405,7 +1405,7 @@ WRITE32_MEMBER(jaguardsp_cpu_device::dsp_end_w) * - ---- ---- ---- ---x GPUGO or DSPGO flag * */ -READ32_MEMBER(jaguar_cpu_device::status_r) +u32 jaguar_cpu_device::status_r() { u32 result = ((m_version & 0xf)<<12) | (m_bus_hog<<11) | m_go; result|= (m_int_latch & 0x1f) << 6; @@ -1422,7 +1422,7 @@ WRITE_LINE_MEMBER(jaguar_cpu_device::go_w) yield(); } -WRITE32_MEMBER(jaguar_cpu_device::control_w) +void jaguar_cpu_device::control_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_io_status); bool new_go = BIT(m_io_status, 0); @@ -1447,33 +1447,33 @@ WRITE32_MEMBER(jaguar_cpu_device::control_w) logerror("%s: bus hog enabled\n", this->tag()); } -READ32_MEMBER(jaguargpu_cpu_device::hidata_r) +u32 jaguargpu_cpu_device::hidata_r() { return m_hidata; } -WRITE32_MEMBER(jaguargpu_cpu_device::hidata_w) +void jaguargpu_cpu_device::hidata_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_hidata); } -READ32_MEMBER(jaguar_cpu_device::div_remainder_r) +u32 jaguar_cpu_device::div_remainder_r() { // TODO: truly 32-bit? return m_div_remainder; } -WRITE32_MEMBER(jaguar_cpu_device::div_control_w) +void jaguar_cpu_device::div_control_w(u32 data) { m_div_offset = BIT(data, 0); } -WRITE32_MEMBER(jaguardsp_cpu_device::modulo_w) +void jaguardsp_cpu_device::modulo_w(offs_t offset, u32 data, u32 mem_mask) { COMBINE_DATA(&m_modulo); } -READ32_MEMBER(jaguardsp_cpu_device::high_accum_r) +u32 jaguardsp_cpu_device::high_accum_r() { printf("%s: high 16-bit accumulator read\n", this->tag()); return (m_accum >> 32) & 0xff; diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h index f9e8189b739..5cd4c616a69 100644 --- a/src/devices/cpu/jaguar/jaguar.h +++ b/src/devices/cpu/jaguar/jaguar.h @@ -84,16 +84,16 @@ protected: virtual void state_string_export(const device_state_entry &entry, std::string &str) const override; // I/Os (common) - DECLARE_READ32_MEMBER(flags_r); - DECLARE_WRITE32_MEMBER(flags_w); - DECLARE_WRITE32_MEMBER(matrix_control_w); - DECLARE_WRITE32_MEMBER(matrix_address_w); - DECLARE_WRITE32_MEMBER(end_w); - DECLARE_WRITE32_MEMBER(pc_w); - DECLARE_READ32_MEMBER(status_r); - DECLARE_WRITE32_MEMBER(control_w); - DECLARE_READ32_MEMBER(div_remainder_r); - DECLARE_WRITE32_MEMBER(div_control_w); + u32 flags_r(); + void flags_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void matrix_control_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void matrix_address_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void end_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void pc_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 status_r(); + void control_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 div_remainder_r(); + void div_control_w(u32 data); // defines inline void CLR_Z(); @@ -278,8 +278,8 @@ protected: virtual void execute_run() override; virtual std::unique_ptr create_disassembler() override; - DECLARE_WRITE32_MEMBER(hidata_w); - DECLARE_READ32_MEMBER(hidata_r); + void hidata_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 hidata_r(); }; @@ -296,9 +296,9 @@ protected: virtual void execute_run() override; virtual std::unique_ptr create_disassembler() override; - DECLARE_WRITE32_MEMBER(modulo_w); - DECLARE_WRITE32_MEMBER(dsp_end_w); - DECLARE_READ32_MEMBER(high_accum_r); + void modulo_w(offs_t offset, u32 data, u32 mem_mask = ~0); + void dsp_end_w(offs_t offset, u32 data, u32 mem_mask = ~0); + u32 high_accum_r(); }; diff --git a/src/devices/cpu/m6502/m3745x.cpp b/src/devices/cpu/m6502/m3745x.cpp index 6d75dcfda15..218e16853ec 100644 --- a/src/devices/cpu/m6502/m3745x.cpp +++ b/src/devices/cpu/m6502/m3745x.cpp @@ -243,7 +243,7 @@ uint8_t m3745x_device::read_port(uint8_t offset) return incoming; } -READ8_MEMBER(m3745x_device::ports_r) +uint8_t m3745x_device::ports_r(offs_t offset) { switch (offset) { @@ -272,7 +272,7 @@ READ8_MEMBER(m3745x_device::ports_r) return 0xff; } -WRITE8_MEMBER(m3745x_device::ports_w) +void m3745x_device::ports_w(offs_t offset, uint8_t data) { switch (offset) { @@ -313,7 +313,7 @@ WRITE8_MEMBER(m3745x_device::ports_w) } } -READ8_MEMBER(m3745x_device::intregs_r) +uint8_t m3745x_device::intregs_r(offs_t offset) { switch (offset) { @@ -335,7 +335,7 @@ READ8_MEMBER(m3745x_device::intregs_r) return 0; } -WRITE8_MEMBER(m3745x_device::intregs_w) +void m3745x_device::intregs_w(offs_t offset, uint8_t data) { switch (offset) { @@ -359,7 +359,7 @@ WRITE8_MEMBER(m3745x_device::intregs_w) recalc_irqs(); } -READ8_MEMBER(m3745x_device::adc_r) +uint8_t m3745x_device::adc_r(offs_t offset) { switch (offset) { @@ -375,7 +375,7 @@ READ8_MEMBER(m3745x_device::adc_r) return 0; } -WRITE8_MEMBER(m3745x_device::adc_w) +void m3745x_device::adc_w(offs_t offset, uint8_t data) { switch (offset) { diff --git a/src/devices/cpu/m6502/m3745x.h b/src/devices/cpu/m6502/m3745x.h index ff31e3b5a23..92d31030236 100644 --- a/src/devices/cpu/m6502/m3745x.h +++ b/src/devices/cpu/m6502/m3745x.h @@ -44,12 +44,12 @@ public: template auto write_p() { return m_write_p[Bit-3].bind(); } template auto read_ad() { return m_read_ad[Bit].bind(); } - DECLARE_READ8_MEMBER(ports_r); - DECLARE_WRITE8_MEMBER(ports_w); - DECLARE_READ8_MEMBER(adc_r); - DECLARE_WRITE8_MEMBER(adc_w); - DECLARE_READ8_MEMBER(intregs_r); - DECLARE_WRITE8_MEMBER(intregs_w); + uint8_t ports_r(offs_t offset); + void ports_w(offs_t offset, uint8_t data); + uint8_t adc_r(offs_t offset); + void adc_w(offs_t offset, uint8_t data); + uint8_t intregs_r(offs_t offset); + void intregs_w(offs_t offset, uint8_t data); bool are_port_bits_output(uint8_t port, uint8_t mask) { return ((m_ddrs[port] & mask) == mask) ? true : false; } diff --git a/src/devices/cpu/m6502/m5074x.cpp b/src/devices/cpu/m6502/m5074x.cpp index e3f6e43a967..794ef338e31 100644 --- a/src/devices/cpu/m6502/m5074x.cpp +++ b/src/devices/cpu/m6502/m5074x.cpp @@ -275,7 +275,7 @@ void m5074x_device::recalc_timer(int timer) } } -void m5074x_device::send_port(address_space &space, uint8_t offset, uint8_t data) +void m5074x_device::send_port(uint8_t offset, uint8_t data) { m_write_p[offset](data); } @@ -292,7 +292,7 @@ uint8_t m5074x_device::read_port(uint8_t offset) return incoming; } -READ8_MEMBER(m5074x_device::ports_r) +uint8_t m5074x_device::ports_r(offs_t offset) { switch (offset) { @@ -324,53 +324,53 @@ READ8_MEMBER(m5074x_device::ports_r) return 0xff; } -WRITE8_MEMBER(m5074x_device::ports_w) +void m5074x_device::ports_w(offs_t offset, uint8_t data) { switch (offset) { case 0: // p0 - send_port(space, 0, data & m_ddrs[0]); + send_port(0, data & m_ddrs[0]); m_ports[0] = data; break; case 1: // p0 ddr - send_port(space, 0, m_ports[0] & data); + send_port(0, m_ports[0] & data); m_ddrs[0] = data; break; case 2: // p1 - send_port(space, 1, data & m_ddrs[1]); + send_port(1, data & m_ddrs[1]); m_ports[1] = data; break; case 3: // p1 ddr - send_port(space, 1, m_ports[1] & data); + send_port(1, m_ports[1] & data); m_ddrs[1] = data; break; case 4: // p2 - send_port(space, 2, data & m_ddrs[2]); + send_port(2, data & m_ddrs[2]); m_ports[2] = data; break; case 5: // p2 ddr - send_port(space, 2, m_ports[2] & data); + send_port(2, m_ports[2] & data); m_ddrs[2] = data; break; case 8: // p3 - send_port(space, 3, data & m_ddrs[3]); + send_port(3, data & m_ddrs[3]); m_ports[3] = data; break; case 9: // p3 ddr - send_port(space, 3, m_ports[3] & data); + send_port(3, m_ports[3] & data); m_ddrs[3] = data; break; } } -READ8_MEMBER(m5074x_device::tmrirq_r) +uint8_t m5074x_device::tmrirq_r(offs_t offset) { switch (offset) { @@ -399,7 +399,7 @@ READ8_MEMBER(m5074x_device::tmrirq_r) return 0xff; } -WRITE8_MEMBER(m5074x_device::tmrirq_w) +void m5074x_device::tmrirq_w(offs_t offset, uint8_t data) { // printf("%02x to tmrirq @ %d\n", data, offset); diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h index d9b39f3cce3..165a7cc7599 100644 --- a/src/devices/cpu/m6502/m5074x.h +++ b/src/devices/cpu/m6502/m5074x.h @@ -48,10 +48,10 @@ public: template auto read_p() { return m_read_p[Bit].bind(); } template auto write_p() { return m_write_p[Bit].bind(); } - DECLARE_READ8_MEMBER(ports_r); - DECLARE_WRITE8_MEMBER(ports_w); - DECLARE_READ8_MEMBER(tmrirq_r); - DECLARE_WRITE8_MEMBER(tmrirq_w); + uint8_t ports_r(offs_t offset); + void ports_w(offs_t offset, uint8_t data); + uint8_t tmrirq_r(offs_t offset); + void tmrirq_w(offs_t offset, uint8_t data); bool are_port_bits_output(uint8_t port, uint8_t mask) { return ((m_ddrs[port] & mask) == mask) ? true : false; } @@ -66,7 +66,7 @@ protected: virtual void execute_set_input(int inputnum, int state) override; virtual space_config_vector memory_space_config() const override; - void send_port(address_space &space, uint8_t offset, uint8_t data); + void send_port(uint8_t offset, uint8_t data); uint8_t read_port(uint8_t offset); void recalc_irqs(); diff --git a/src/devices/cpu/m6502/m6500_1.cpp b/src/devices/cpu/m6502/m6500_1.cpp index d72c57bdd3a..5d7c2d0b485 100644 --- a/src/devices/cpu/m6502/m6500_1.cpp +++ b/src/devices/cpu/m6502/m6500_1.cpp @@ -108,17 +108,17 @@ void m6500_1_device::pa_w(uint8_t data) machine().scheduler().synchronize(timer_expired_delegate(FUNC(m6500_1_device::set_port_in<0>), this), unsigned(data)); } -WRITE8_MEMBER(m6500_1_device::pb_w) +void m6500_1_device::pb_w(u8 data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(m6500_1_device::set_port_in<1>), this), unsigned(data)); } -WRITE8_MEMBER(m6500_1_device::pc_w) +void m6500_1_device::pc_w(u8 data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(m6500_1_device::set_port_in<2>), this), unsigned(data)); } -WRITE8_MEMBER(m6500_1_device::pd_w) +void m6500_1_device::pd_w(u8 data) { machine().scheduler().synchronize(timer_expired_delegate(FUNC(m6500_1_device::set_port_in<3>), this), unsigned(data)); } @@ -272,13 +272,13 @@ void m6500_1_device::internal_update(u64 current_time) } -READ8_MEMBER(m6500_1_device::read_control_register) +u8 m6500_1_device::read_control_register() { internal_update(); return m_cr; } -WRITE8_MEMBER(m6500_1_device::write_control_register) +void m6500_1_device::write_control_register(u8 data) { internal_update(); m_cr = (m_cr & (CR_A1ED | CR_A0ED | CR_CTRO)) | (data & (CR_CMC0 | CR_CMC1 | CR_A1IE | CR_A0IE | CR_CIE)); @@ -294,7 +294,7 @@ void m6500_1_device::update_irq() } -READ8_MEMBER(m6500_1_device::read_port) +u8 m6500_1_device::read_port(offs_t offset) { if (!machine().side_effects_disabled() && m_port_in_cb[offset]) { @@ -314,7 +314,7 @@ READ8_MEMBER(m6500_1_device::read_port) return m_port_in[offset] & m_port_buf[offset]; } -WRITE8_MEMBER(m6500_1_device::write_port) +void m6500_1_device::write_port(offs_t offset, u8 data) { u8 const prev(m_port_in[offset] & m_port_buf[offset]); if (m_port_buf[offset] != data) @@ -334,7 +334,7 @@ WRITE8_MEMBER(m6500_1_device::write_port) } } -WRITE8_MEMBER(m6500_1_device::clear_edge) +void m6500_1_device::clear_edge(offs_t offset, u8 data) { m_cr &= BIT(offset, 0) ? ~CR_A1ED : ~CR_A0ED; update_irq(); @@ -357,13 +357,13 @@ template TIMER_CALLBACK_MEMBER(m6500_1_device::set_port_in) } -READ8_MEMBER(m6500_1_device::read_upper_count) +u8 m6500_1_device::read_upper_count() { internal_update(); return u8(m_counter >> 8); } -READ8_MEMBER(m6500_1_device::read_lower_count) +u8 m6500_1_device::read_lower_count() { internal_update(); if (!machine().side_effects_disabled()) @@ -375,7 +375,7 @@ READ8_MEMBER(m6500_1_device::read_lower_count) return u8(m_counter); } -template WRITE8_MEMBER(m6500_1_device::write_upper_latch) +template void m6500_1_device::write_upper_latch(u8 data) { m_latch = (m_latch & 0x00ffU) | u16(data << 8); if (Transfer) @@ -389,7 +389,7 @@ template WRITE8_MEMBER(m6500_1_device::write_upper_latch) } } -WRITE8_MEMBER(m6500_1_device::write_lower_latch) +void m6500_1_device::write_lower_latch(u8 data) { m_latch = (m_latch & 0xff00U) | u16(data); } diff --git a/src/devices/cpu/m6502/m6500_1.h b/src/devices/cpu/m6502/m6500_1.h index 86f9621463b..0a4a07a6ff9 100644 --- a/src/devices/cpu/m6502/m6500_1.h +++ b/src/devices/cpu/m6502/m6500_1.h @@ -56,14 +56,14 @@ public: auto pd_out_cb() { return m_port_out_cb[3].bind(); } auto cntr_out_cb() { return m_cntr_out_cb.bind(); } - DECLARE_READ8_MEMBER(pa_r) { return m_port_buf[0]; } - DECLARE_READ8_MEMBER(pb_r) { return m_port_buf[1]; } - DECLARE_READ8_MEMBER(pc_r) { return m_port_buf[2]; } - DECLARE_READ8_MEMBER(pd_r) { return m_port_buf[3]; } - void pa_w(uint8_t data); - DECLARE_WRITE8_MEMBER(pb_w); - DECLARE_WRITE8_MEMBER(pc_w); - DECLARE_WRITE8_MEMBER(pd_w); + u8 pa_r() { return m_port_buf[0]; } + u8 pb_r() { return m_port_buf[1]; } + u8 pc_r() { return m_port_buf[2]; } + u8 pd_r() { return m_port_buf[3]; } + void pa_w(u8 data); + void pb_w(u8 data); + void pc_w(u8 data); + void pd_w(u8 data); DECLARE_WRITE_LINE_MEMBER(cntr_w); @@ -90,19 +90,19 @@ protected: virtual void internal_update(u64 current_time) override; using m6502_mcu_device::internal_update; - DECLARE_READ8_MEMBER(read_control_register); - DECLARE_WRITE8_MEMBER(write_control_register); + u8 read_control_register(); + void write_control_register(u8 data); void update_irq(); - DECLARE_READ8_MEMBER(read_port); - DECLARE_WRITE8_MEMBER(write_port); - DECLARE_WRITE8_MEMBER(clear_edge); + u8 read_port(offs_t offset); + void write_port(offs_t offset, u8 data); + void clear_edge(offs_t offset, u8 data); template TIMER_CALLBACK_MEMBER(set_port_in); - DECLARE_READ8_MEMBER(read_upper_count); - DECLARE_READ8_MEMBER(read_lower_count); - template DECLARE_WRITE8_MEMBER(write_upper_latch); - DECLARE_WRITE8_MEMBER(write_lower_latch); + u8 read_upper_count(); + u8 read_lower_count(); + template void write_upper_latch(u8 data); + void write_lower_latch(u8 data); u64 update_counter(u64 current_time); bool should_count() const; bool pulse_generator_mode() const; diff --git a/src/devices/cpu/m6502/n2a03.cpp b/src/devices/cpu/m6502/n2a03.cpp index b4c05185441..f303f1bf1b6 100644 --- a/src/devices/cpu/m6502/n2a03.cpp +++ b/src/devices/cpu/m6502/n2a03.cpp @@ -14,22 +14,22 @@ DEFINE_DEVICE_TYPE(N2A03, n2a03_device, "n2a03", "Ricoh N2A03") -READ8_MEMBER(n2a03_device::psg1_4014_r) +uint8_t n2a03_device::psg1_4014_r() { return m_apu->read(0x14); } -READ8_MEMBER(n2a03_device::psg1_4015_r) +uint8_t n2a03_device::psg1_4015_r() { return m_apu->read(0x15); } -WRITE8_MEMBER(n2a03_device::psg1_4015_w) +void n2a03_device::psg1_4015_w(uint8_t data) { m_apu->write(0x15, data); } -WRITE8_MEMBER(n2a03_device::psg1_4017_w) +void n2a03_device::psg1_4017_w(uint8_t data) { m_apu->write(0x17, data); } diff --git a/src/devices/cpu/m6502/n2a03.h b/src/devices/cpu/m6502/n2a03.h index 2eb1128665b..5a57bcbed2b 100644 --- a/src/devices/cpu/m6502/n2a03.h +++ b/src/devices/cpu/m6502/n2a03.h @@ -24,10 +24,10 @@ public: virtual void do_exec_full() override; virtual void do_exec_partial() override; - READ8_MEMBER(psg1_4014_r); - READ8_MEMBER(psg1_4015_r); - WRITE8_MEMBER(psg1_4015_w); - WRITE8_MEMBER(psg1_4017_w); + uint8_t psg1_4014_r(); + uint8_t psg1_4015_r(); + void psg1_4015_w(uint8_t data); + void psg1_4017_w(uint8_t data); void n2a03_map(address_map &map); protected: diff --git a/src/devices/cpu/m6805/m68705.cpp b/src/devices/cpu/m6805/m68705.cpp index 12e3b8d1384..067cd06b811 100644 --- a/src/devices/cpu/m6805/m68705.cpp +++ b/src/devices/cpu/m6805/m68705.cpp @@ -239,7 +239,7 @@ m68705_device::m68705_device(machine_config const &mconfig, char const *tag, dev { } -template READ8_MEMBER(m68705_device::eprom_r) +template u8 m68705_device::eprom_r(offs_t offset) { if (pcr_vpon() && !pcr_ple()) LOGEPROM("read EPROM %04X prevented when Vpp high and /PLE = 0\n", B + offset); @@ -248,7 +248,7 @@ template READ8_MEMBER(m68705_device::eprom_r) return (!pcr_vpon() || !pcr_ple()) ? m_user_rom[B + offset] : 0xff; } -template WRITE8_MEMBER(m68705_device::eprom_w) +template void m68705_device::eprom_w(offs_t offset, u8 data) { LOGEPROM("EPROM programming latch write%s%s: %04X = %02X\n", !pcr_vpon() ? " [Vpp low]" : "", !pcr_ple() ? " [disabled]" : "", B + offset, data); @@ -281,7 +281,7 @@ template void m6805_hmos_device::set_port_mask(u8 mask) m_port_mask[N] = mask; } -template READ8_MEMBER(m6805_hmos_device::port_r) +template u8 m6805_hmos_device::port_r() { if (!m_port_cb_r[N].isnull()) { @@ -296,7 +296,7 @@ template READ8_MEMBER(m6805_hmos_device::port_r) return m_port_mask[N] | (m_port_latch[N] & m_port_ddr[N]) | (m_port_input[N] & ~m_port_ddr[N]); } -template WRITE8_MEMBER(m6805_hmos_device::port_latch_w) +template void m6805_hmos_device::port_latch_w(u8 data) { data &= ~m_port_mask[N]; u8 const diff = m_port_latch[N] ^ data; @@ -307,7 +307,7 @@ template WRITE8_MEMBER(m6805_hmos_device::port_latch_w) port_cb_w(); } -template WRITE8_MEMBER(m6805_hmos_device::port_ddr_w) +template void m6805_hmos_device::port_ddr_w(u8 data) { data &= ~m_port_mask[N]; if (data != m_port_ddr[N]) @@ -325,12 +325,12 @@ template void m6805_hmos_device::port_cb_w() m_port_cb_w[N](0, data, mask); } -READ8_MEMBER(m68705_device::pcr_r) +u8 m68705_device::pcr_r() { return m_pcr; } -WRITE8_MEMBER(m68705_device::pcr_w) +void m68705_device::pcr_w(u8 data) { // 7 1 // 6 1 @@ -358,13 +358,13 @@ WRITE8_MEMBER(m68705_device::pcr_w) m_pcr = (m_pcr & 0xfc) | (data & 0x03); } -READ8_MEMBER(m6805_hmos_device::acr_r) +u8 m6805_hmos_device::acr_r() { logerror("unsupported read ACR\n"); return 0xff; } -WRITE8_MEMBER(m6805_hmos_device::acr_w) +void m6805_hmos_device::acr_w(u8 data) { // 7 conversion complete // 6 @@ -392,13 +392,13 @@ WRITE8_MEMBER(m6805_hmos_device::acr_w) logerror("unsupported write ACR = %02X\n", data); } -READ8_MEMBER(m6805_hmos_device::arr_r) +u8 m6805_hmos_device::arr_r() { logerror("unsupported read ARR\n"); return 0xff; } -WRITE8_MEMBER(m6805_hmos_device::arr_w) +void m6805_hmos_device::arr_w(u8 data) { logerror("unsupported write ARR = %02X\n", data); } @@ -463,10 +463,10 @@ void m6805_hmos_device::device_reset() m6805_base_device::device_reset(); // reset digital I/O - port_ddr_w<0>(space(AS_PROGRAM), 0, 0x00, 0xff); - port_ddr_w<1>(space(AS_PROGRAM), 0, 0x00, 0xff); - port_ddr_w<2>(space(AS_PROGRAM), 0, 0x00, 0xff); - port_ddr_w<3>(space(AS_PROGRAM), 0, 0x00, 0xff); + port_ddr_w<0>(0x00); + port_ddr_w<1>(0x00); + port_ddr_w<2>(0x00); + port_ddr_w<3>(0x00); // reset timer/counter m_timer.reset(); diff --git a/src/devices/cpu/m6805/m68705.h b/src/devices/cpu/m6805/m68705.h index d6998c08322..f6e02430acc 100644 --- a/src/devices/cpu/m6805/m68705.h +++ b/src/devices/cpu/m6805/m68705.h @@ -172,19 +172,19 @@ protected: template void set_port_open_drain(bool value); template void set_port_mask(u8 mask); template void port_input_w(uint8_t data) { m_port_input[N] = data & ~m_port_mask[N]; } - template DECLARE_READ8_MEMBER(port_r); - template DECLARE_WRITE8_MEMBER(port_latch_w); - template DECLARE_WRITE8_MEMBER(port_ddr_w); + template u8 port_r(); + template void port_latch_w(u8 data); + template void port_ddr_w(u8 data); template void port_cb_w(); - DECLARE_READ8_MEMBER(misc_r) { return m_mr; } - DECLARE_WRITE8_MEMBER(misc_w) { m_mr = data; } + u8 misc_r() { return m_mr; } + void misc_w(u8 data) { m_mr = data; } // A/D converter - DECLARE_READ8_MEMBER(acr_r); - DECLARE_WRITE8_MEMBER(acr_w); - DECLARE_READ8_MEMBER(arr_r); - DECLARE_WRITE8_MEMBER(arr_w); + u8 acr_r(); + void acr_w(u8 data); + u8 arr_r(); + void arr_w(u8 data); virtual void device_start() override; virtual void device_reset() override; @@ -250,11 +250,11 @@ protected: m68705_device(machine_config const &mconfig, char const *tag, device_t *owner, u32 clock, device_type type, u32 addr_width, unsigned ram_size); - template DECLARE_READ8_MEMBER(eprom_r); - template DECLARE_WRITE8_MEMBER(eprom_w); + template u8 eprom_r(offs_t offset); + template void eprom_w(offs_t offset, u8 data); - DECLARE_READ8_MEMBER(pcr_r); - DECLARE_WRITE8_MEMBER(pcr_w); + u8 pcr_r(); + void pcr_w(u8 data); virtual void device_start() override; virtual void device_reset() override; diff --git a/src/devices/cpu/mips/ps2vif1.cpp b/src/devices/cpu/mips/ps2vif1.cpp index 12b8185fe49..b12c39253e6 100644 --- a/src/devices/cpu/mips/ps2vif1.cpp +++ b/src/devices/cpu/mips/ps2vif1.cpp @@ -131,7 +131,7 @@ void ps2_vif1_device::device_reset() m_unpack_format = FMT_S32; } -READ32_MEMBER(ps2_vif1_device::regs_r) +uint32_t ps2_vif1_device::regs_r(offs_t offset) { uint32_t ret = 0; switch (offset) @@ -235,7 +235,7 @@ READ32_MEMBER(ps2_vif1_device::regs_r) return ret; } -WRITE32_MEMBER(ps2_vif1_device::regs_w) +void ps2_vif1_device::regs_w(offs_t offset, uint32_t data) { logerror("%s: Write: Unknown %08x = %08x\n", machine().describe_context(), 0x10003c00 + (offset << 2), data); } diff --git a/src/devices/cpu/mips/ps2vif1.h b/src/devices/cpu/mips/ps2vif1.h index 1c5ca79547b..171a3839f8f 100644 --- a/src/devices/cpu/mips/ps2vif1.h +++ b/src/devices/cpu/mips/ps2vif1.h @@ -36,8 +36,8 @@ public: uint64_t mmio_r(offs_t offset); void mmio_w(offs_t offset, uint64_t data); - DECLARE_READ32_MEMBER(regs_r); - DECLARE_WRITE32_MEMBER(regs_w); + uint32_t regs_r(offs_t offset); + void regs_w(offs_t offset, uint32_t data); void dma_write(const uint64_t hi, const uint64_t lo); void tag_write(uint32_t *data); diff --git a/src/devices/cpu/mips/ps2vu.cpp b/src/devices/cpu/mips/ps2vu.cpp index 1f7e579e0e9..473979587d8 100644 --- a/src/devices/cpu/mips/ps2vu.cpp +++ b/src/devices/cpu/mips/ps2vu.cpp @@ -975,12 +975,12 @@ void sonyvu0_device::device_reset() m_cmsar1 = 0; } -READ32_MEMBER(sonyvu0_device::vu1_reg_r) +uint32_t sonyvu0_device::vu1_reg_r(offs_t offset) { return m_vu1_regs[offset]; } -WRITE32_MEMBER(sonyvu0_device::vu1_reg_w) +void sonyvu0_device::vu1_reg_w(offs_t offset, uint32_t data) { m_vu1_regs[offset] = data; } diff --git a/src/devices/cpu/mips/ps2vu.h b/src/devices/cpu/mips/ps2vu.h index c8d7c7b97e6..cc898ffa58d 100644 --- a/src/devices/cpu/mips/ps2vu.h +++ b/src/devices/cpu/mips/ps2vu.h @@ -230,8 +230,8 @@ protected: void execute_xgkick(uint32_t rs) override; - DECLARE_READ32_MEMBER(vu1_reg_r); - DECLARE_WRITE32_MEMBER(vu1_reg_w); + uint32_t vu1_reg_r(offs_t offset); + void vu1_reg_w(offs_t offset, uint32_t data); required_device m_vu1; diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp index 7f0b9ba70dd..9de3131ba19 100644 --- a/src/devices/cpu/pps4/pps4.cpp +++ b/src/devices/cpu/pps4/pps4.cpp @@ -1656,7 +1656,7 @@ void pps4_2_device::device_reset() m_DIO = 15; // DIO clamp } -READ16_MEMBER(pps4_device::address_bus_r) +u16 pps4_device::address_bus_r(address_space &space) { int id = space.spacenum(); if (id == AS_IO || id == AS_DATA) diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h index f4047e68e99..ab6e58c5554 100644 --- a/src/devices/cpu/pps4/pps4.h +++ b/src/devices/cpu/pps4/pps4.h @@ -47,7 +47,7 @@ public: auto dib_cb() { return m_dib_cb.bind(); } auto do_cb() { return m_do_cb.bind(); } - DECLARE_READ16_MEMBER(address_bus_r); + u16 address_bus_r(address_space &space); protected: pps4_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, u32 clock); diff --git a/src/devices/cpu/psx/dma.cpp b/src/devices/cpu/psx/dma.cpp index 5ec8e29fdbd..36078c5b499 100644 --- a/src/devices/cpu/psx/dma.cpp +++ b/src/devices/cpu/psx/dma.cpp @@ -211,7 +211,7 @@ void psxdma_device::install_write_handler( int index, write_delegate p_fn_dma_wr m_channel[ index ].fn_write = p_fn_dma_write; } -WRITE32_MEMBER( psxdma_device::write ) +void psxdma_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) { int index = offset / 4; psx_dma_channel *dma = &m_channel[ index ]; @@ -382,7 +382,7 @@ WRITE32_MEMBER( psxdma_device::write ) } } -READ32_MEMBER( psxdma_device::read ) +uint32_t psxdma_device::read(offs_t offset, uint32_t mem_mask) { int index = offset / 4; psx_dma_channel *dma = &m_channel[ index ]; diff --git a/src/devices/cpu/psx/dma.h b/src/devices/cpu/psx/dma.h index 3e368c23ad3..1bd743614b2 100644 --- a/src/devices/cpu/psx/dma.h +++ b/src/devices/cpu/psx/dma.h @@ -29,8 +29,8 @@ public: void install_read_handler( int n_channel, read_delegate p_fn_dma_read ); void install_write_handler( int n_channel, write_delegate p_fn_dma_write ); - DECLARE_WRITE32_MEMBER( write ); - DECLARE_READ32_MEMBER( read ); + void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t read(offs_t offset, uint32_t mem_mask = ~0); uint32_t *m_ram; size_t m_ramsize; diff --git a/src/devices/cpu/psx/irq.cpp b/src/devices/cpu/psx/irq.cpp index 94aafc73b2f..ace6d69d4e6 100644 --- a/src/devices/cpu/psx/irq.cpp +++ b/src/devices/cpu/psx/irq.cpp @@ -78,7 +78,7 @@ void psxirq_device::psx_irq_update( void ) } } -WRITE32_MEMBER( psxirq_device::write ) +void psxirq_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) { switch( offset ) { @@ -102,7 +102,7 @@ WRITE32_MEMBER( psxirq_device::write ) } } -READ32_MEMBER( psxirq_device::read ) +uint32_t psxirq_device::read(offs_t offset) { switch( offset ) { diff --git a/src/devices/cpu/psx/irq.h b/src/devices/cpu/psx/irq.h index 11d637921f7..b4ee28e712a 100644 --- a/src/devices/cpu/psx/irq.h +++ b/src/devices/cpu/psx/irq.h @@ -23,8 +23,8 @@ public: // configuration helpers auto irq() { return m_irq_handler.bind(); } - DECLARE_READ32_MEMBER( read ); - DECLARE_WRITE32_MEMBER( write ); + uint32_t read(offs_t offset); + void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER( intin0 ); DECLARE_WRITE_LINE_MEMBER( intin1 ); diff --git a/src/devices/cpu/psx/mdec.cpp b/src/devices/cpu/psx/mdec.cpp index 6a177255da9..826005a52d4 100644 --- a/src/devices/cpu/psx/mdec.cpp +++ b/src/devices/cpu/psx/mdec.cpp @@ -542,7 +542,7 @@ void psxmdec_device::dma_read( uint32_t *p_n_psxram, uint32_t n_address, int32_t n_1_status &= ~( 1L << 29 ); } -WRITE32_MEMBER( psxmdec_device::write ) +void psxmdec_device::write(offs_t offset, uint32_t data) { switch( offset ) { @@ -557,7 +557,7 @@ WRITE32_MEMBER( psxmdec_device::write ) } } -READ32_MEMBER( psxmdec_device::read ) +uint32_t psxmdec_device::read(offs_t offset) { switch( offset ) { diff --git a/src/devices/cpu/psx/mdec.h b/src/devices/cpu/psx/mdec.h index 941ba2f2f58..8d9da890069 100644 --- a/src/devices/cpu/psx/mdec.h +++ b/src/devices/cpu/psx/mdec.h @@ -20,8 +20,8 @@ class psxmdec_device : public device_t public: psxmdec_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_WRITE32_MEMBER( write ); - DECLARE_READ32_MEMBER( read ); + void write(offs_t offset, uint32_t data); + uint32_t read(offs_t offset); void dma_write( uint32_t *ram, uint32_t n_address, int32_t n_size ); void dma_read( uint32_t *ram, uint32_t n_address, int32_t n_size ); diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp index 36f390df5d4..174eb4298d8 100644 --- a/src/devices/cpu/psx/psx.cpp +++ b/src/devices/cpu/psx/psx.cpp @@ -205,25 +205,25 @@ static const uint32_t mtc0_writemask[]= 0x00000000 /* PRID */ }; -READ32_MEMBER( psxcpu_device::berr_r ) +uint32_t psxcpu_device::berr_r() { if( !machine().side_effects_disabled() ) m_berr = 1; return 0; } -WRITE32_MEMBER( psxcpu_device::berr_w ) +void psxcpu_device::berr_w(uint32_t data) { if( !machine().side_effects_disabled() ) m_berr = 1; } -READ32_MEMBER( psxcpu_device::exp_base_r ) +uint32_t psxcpu_device::exp_base_r() { return m_exp_base; } -WRITE32_MEMBER( psxcpu_device::exp_base_w ) +void psxcpu_device::exp_base_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA( &m_exp_base ); // TODO: check byte writes @@ -235,24 +235,24 @@ uint32_t psxcpu_device::exp_base() return m_exp_base; } -READ32_MEMBER( psxcpu_device::exp_config_r ) +uint32_t psxcpu_device::exp_config_r() { return m_exp_config; } -WRITE32_MEMBER( psxcpu_device::exp_config_w ) +void psxcpu_device::exp_config_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA( &m_exp_config ); // TODO: check byte writes m_exp_config &= 0xaf1fffff; } -READ32_MEMBER( psxcpu_device::ram_config_r ) +uint32_t psxcpu_device::ram_config_r() { return m_ram_config; } -WRITE32_MEMBER( psxcpu_device::ram_config_w ) +void psxcpu_device::ram_config_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint32_t old = m_ram_config; @@ -264,12 +264,12 @@ WRITE32_MEMBER( psxcpu_device::ram_config_w ) } } -READ32_MEMBER( psxcpu_device::rom_config_r ) +uint32_t psxcpu_device::rom_config_r() { return m_rom_config; } -WRITE32_MEMBER( psxcpu_device::rom_config_w ) +void psxcpu_device::rom_config_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint32_t old = m_rom_config; @@ -281,24 +281,24 @@ WRITE32_MEMBER( psxcpu_device::rom_config_w ) } } -READ32_MEMBER( psxcpu_device::com_delay_r ) +uint32_t psxcpu_device::com_delay_r(offs_t offset, uint32_t mem_mask) { //verboselog( p_psx, 1, "psx_com_delay_r( %08x )\n", mem_mask ); return m_com_delay; } -WRITE32_MEMBER( psxcpu_device::com_delay_w ) +void psxcpu_device::com_delay_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA( &m_com_delay ); // TODO: check byte writes //verboselog( p_psx, 1, "psx_com_delay_w( %08x %08x )\n", data, mem_mask ); } -READ32_MEMBER( psxcpu_device::biu_r ) +uint32_t psxcpu_device::biu_r() { return m_biu; } -WRITE32_MEMBER( psxcpu_device::biu_w ) +void psxcpu_device::biu_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint32_t old = m_biu; @@ -1338,11 +1338,11 @@ void psxcpu_device::update_scratchpad() { if( ( m_biu & BIU_RAM ) == 0 ) { - m_program->install_readwrite_handler( 0x1f800000, 0x1f8003ff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0x1f800000, 0x1f8003ff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); } else if( ( m_biu & BIU_DS ) == 0 ) { - m_program->install_read_handler( 0x1f800000, 0x1f8003ff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)) ); + m_program->install_read_handler( 0x1f800000, 0x1f8003ff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)) ); m_program->nop_write( 0x1f800000, 0x1f8003ff ); } else @@ -1397,9 +1397,9 @@ void psxcpu_device::update_ram_config() } } - m_program->install_readwrite_handler( 0x00000000 + window_size, 0x1effffff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); - m_program->install_readwrite_handler( 0x80000000 + window_size, 0x9effffff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); - m_program->install_readwrite_handler( 0xa0000000 + window_size, 0xbeffffff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0x00000000 + window_size, 0x1effffff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0x80000000 + window_size, 0x9effffff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0xa0000000 + window_size, 0xbeffffff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); } void psxcpu_device::update_rom_config() @@ -1434,9 +1434,9 @@ void psxcpu_device::update_rom_config() if( window_size < max_window_size && !m_disable_rom_berr) { - m_program->install_readwrite_handler( 0x1fc00000 + window_size, 0x1fffffff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); - m_program->install_readwrite_handler( 0x9fc00000 + window_size, 0x9fffffff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); - m_program->install_readwrite_handler( 0xbfc00000 + window_size, 0xbfffffff, read32_delegate(*this, FUNC(psxcpu_device::berr_r)), write32_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0x1fc00000 + window_size, 0x1fffffff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0x9fc00000 + window_size, 0x9fffffff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); + m_program->install_readwrite_handler( 0xbfc00000 + window_size, 0xbfffffff, read32smo_delegate(*this, FUNC(psxcpu_device::berr_r)), write32smo_delegate(*this, FUNC(psxcpu_device::berr_w)) ); } } @@ -3401,32 +3401,32 @@ void psxcpu_device::setcp3cr( int reg, uint32_t value ) { } -READ32_MEMBER( psxcpu_device::gpu_r ) +uint32_t psxcpu_device::gpu_r(offs_t offset, uint32_t mem_mask) { return m_gpu_read_handler( offset, mem_mask ); } -WRITE32_MEMBER( psxcpu_device::gpu_w ) +void psxcpu_device::gpu_w(offs_t offset, uint32_t data, uint32_t mem_mask) { m_gpu_write_handler( offset, data, mem_mask ); } -READ16_MEMBER( psxcpu_device::spu_r ) +uint16_t psxcpu_device::spu_r(offs_t offset, uint16_t mem_mask) { return m_spu_read_handler( offset, mem_mask ); } -WRITE16_MEMBER( psxcpu_device::spu_w ) +void psxcpu_device::spu_w(offs_t offset, uint16_t data, uint16_t mem_mask) { m_spu_write_handler( offset, data, mem_mask ); } -READ8_MEMBER( psxcpu_device::cd_r ) +uint8_t psxcpu_device::cd_r(offs_t offset, uint8_t mem_mask) { return m_cd_read_handler( offset, mem_mask ); } -WRITE8_MEMBER( psxcpu_device::cd_w ) +void psxcpu_device::cd_w(offs_t offset, uint8_t data, uint8_t mem_mask) { m_cd_write_handler( offset, data, mem_mask ); } diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h index 57be9a19de9..e02c4471bae 100644 --- a/src/devices/cpu/psx/psx.h +++ b/src/devices/cpu/psx/psx.h @@ -128,37 +128,37 @@ public: auto cd_write() { return m_cd_write_handler.bind(); } // public interfaces - DECLARE_WRITE32_MEMBER( berr_w ); - DECLARE_READ32_MEMBER( berr_r ); + void berr_w(uint32_t data); + uint32_t berr_r(); uint32_t exp_base(); - DECLARE_WRITE32_MEMBER( exp_base_w ); - DECLARE_READ32_MEMBER( exp_base_r ); + void exp_base_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t exp_base_r(); - DECLARE_WRITE32_MEMBER( exp_config_w ); - DECLARE_READ32_MEMBER( exp_config_r ); + void exp_config_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t exp_config_r(); - DECLARE_WRITE32_MEMBER( ram_config_w ); - DECLARE_READ32_MEMBER( ram_config_r ); + void ram_config_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t ram_config_r(); - DECLARE_WRITE32_MEMBER( rom_config_w ); - DECLARE_READ32_MEMBER( rom_config_r ); + void rom_config_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rom_config_r(); - DECLARE_WRITE32_MEMBER( biu_w ); - DECLARE_READ32_MEMBER( biu_r ); + void biu_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t biu_r(); - DECLARE_WRITE32_MEMBER( gpu_w ); - DECLARE_READ32_MEMBER( gpu_r ); + void gpu_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t gpu_r(offs_t offset, uint32_t mem_mask = ~0); - DECLARE_WRITE16_MEMBER( spu_w ); - DECLARE_READ16_MEMBER( spu_r ); + void spu_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t spu_r(offs_t offset, uint16_t mem_mask = ~0); - DECLARE_WRITE8_MEMBER( cd_w ); - DECLARE_READ8_MEMBER( cd_r ); + void cd_w(offs_t offset, uint8_t data, uint8_t mem_mask = ~0); + uint8_t cd_r(offs_t offset, uint8_t mem_mask = ~0); - DECLARE_WRITE32_MEMBER( com_delay_w ); - DECLARE_READ32_MEMBER( com_delay_r ); + void com_delay_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t com_delay_r(offs_t offset, uint32_t mem_mask = ~0); static psxcpu_device *getcpu( device_t &device, const char *cputag ) { return downcast( device.subdevice( cputag ) ); } void set_disable_rom_berr(bool mode); diff --git a/src/devices/cpu/psx/rcnt.cpp b/src/devices/cpu/psx/rcnt.cpp index e0ac985fa0a..37932db2d8d 100644 --- a/src/devices/cpu/psx/rcnt.cpp +++ b/src/devices/cpu/psx/rcnt.cpp @@ -70,7 +70,7 @@ void psxrcnt_device::device_start() } } -WRITE32_MEMBER( psxrcnt_device::write ) +void psxrcnt_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) { int n_counter = offset / 4; psx_root *root = &root_counter[ n_counter ]; @@ -115,7 +115,7 @@ WRITE32_MEMBER( psxrcnt_device::write ) root_timer_adjust( n_counter ); } -READ32_MEMBER( psxrcnt_device::read ) +uint32_t psxrcnt_device::read(offs_t offset, uint32_t mem_mask) { int n_counter = offset / 4; psx_root *root = &root_counter[ n_counter ]; diff --git a/src/devices/cpu/psx/rcnt.h b/src/devices/cpu/psx/rcnt.h index b6e4e46dab9..4e44e365466 100644 --- a/src/devices/cpu/psx/rcnt.h +++ b/src/devices/cpu/psx/rcnt.h @@ -34,8 +34,8 @@ public: auto irq1() { return m_irq1_handler.bind(); } auto irq2() { return m_irq2_handler.bind(); } - DECLARE_WRITE32_MEMBER( write ); - DECLARE_READ32_MEMBER( read ); + void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t read(offs_t offset, uint32_t mem_mask = ~0); protected: virtual void device_start() override; diff --git a/src/devices/cpu/psx/sio.cpp b/src/devices/cpu/psx/sio.cpp index 5ff3e671109..2fac592bb59 100644 --- a/src/devices/cpu/psx/sio.cpp +++ b/src/devices/cpu/psx/sio.cpp @@ -209,7 +209,7 @@ void psxsio_device::device_timer(emu_timer &timer, device_timer_id tid, int para sio_timer_adjust(); } -WRITE32_MEMBER( psxsio_device::write ) +void psxsio_device::write(offs_t offset, uint32_t data, uint32_t mem_mask) { switch( offset % 4 ) { @@ -285,7 +285,7 @@ WRITE32_MEMBER( psxsio_device::write ) } } -READ32_MEMBER( psxsio_device::read ) +uint32_t psxsio_device::read(offs_t offset, uint32_t mem_mask) { uint32_t data; diff --git a/src/devices/cpu/psx/sio.h b/src/devices/cpu/psx/sio.h index 7e02b57330f..3662ea01a53 100644 --- a/src/devices/cpu/psx/sio.h +++ b/src/devices/cpu/psx/sio.h @@ -43,8 +43,8 @@ public: auto dtr_handler() { return m_dtr_handler.bind(); } auto rts_handler() { return m_rts_handler.bind(); } - DECLARE_WRITE32_MEMBER( write ); - DECLARE_READ32_MEMBER( read ); + void write(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t read(offs_t offset, uint32_t mem_mask = ~0); DECLARE_WRITE_LINE_MEMBER(write_rxd); DECLARE_WRITE_LINE_MEMBER(write_dsr); diff --git a/src/devices/cpu/scudsp/scudsp.cpp b/src/devices/cpu/scudsp/scudsp.cpp index 920d75ac4f5..7db8e88cb80 100644 --- a/src/devices/cpu/scudsp/scudsp.cpp +++ b/src/devices/cpu/scudsp/scudsp.cpp @@ -340,12 +340,12 @@ uint32_t scudsp_cpu_device::scudsp_get_mem_source_dma( uint32_t memcode, uint32_ } -READ32_MEMBER( scudsp_cpu_device::program_control_r ) +uint32_t scudsp_cpu_device::program_control_r() { return (m_pc & 0xff) | (m_flags & FLAGS_MASK); } -WRITE32_MEMBER( scudsp_cpu_device::program_control_w ) +void scudsp_cpu_device::program_control_w(offs_t offset, uint32_t data, uint32_t mem_mask) { uint32_t oldval, newval; @@ -362,13 +362,13 @@ WRITE32_MEMBER( scudsp_cpu_device::program_control_w ) set_input_line(INPUT_LINE_RESET, (EXF) ? CLEAR_LINE : ASSERT_LINE); } -WRITE32_MEMBER( scudsp_cpu_device::program_w ) +void scudsp_cpu_device::program_w(uint32_t data) { //printf("%02x %08x PRG\n",m_pc,data); scudsp_writeop(m_pc++, data); } -WRITE32_MEMBER( scudsp_cpu_device::ram_address_control_w ) +void scudsp_cpu_device::ram_address_control_w(uint32_t data) { //printf("%02x %08x PRG\n",m_pc,data); m_ra = data & 0xff; @@ -382,7 +382,7 @@ WRITE32_MEMBER( scudsp_cpu_device::ram_address_control_w ) } } -READ32_MEMBER( scudsp_cpu_device::ram_address_r ) +uint32_t scudsp_cpu_device::ram_address_r() { uint32_t data; @@ -391,7 +391,7 @@ READ32_MEMBER( scudsp_cpu_device::ram_address_r ) return data; } -WRITE32_MEMBER( scudsp_cpu_device::ram_address_w ) +void scudsp_cpu_device::ram_address_w(uint32_t data) { scudsp_set_dest_mem_reg( (m_ra & 0xc0) >> 6, data ); } diff --git a/src/devices/cpu/scudsp/scudsp.h b/src/devices/cpu/scudsp/scudsp.h index 963a2d63871..eba4ed5903c 100644 --- a/src/devices/cpu/scudsp/scudsp.h +++ b/src/devices/cpu/scudsp/scudsp.h @@ -49,15 +49,15 @@ public: auto out_dma_callback() { return m_out_dma_cb.bind(); } /* port 0 */ - DECLARE_READ32_MEMBER( program_control_r ); - DECLARE_WRITE32_MEMBER( program_control_w ); + uint32_t program_control_r(); + void program_control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); /* port 1 */ - DECLARE_WRITE32_MEMBER( program_w ); + void program_w(uint32_t data); /* port 2 */ - DECLARE_WRITE32_MEMBER( ram_address_control_w ); + void ram_address_control_w(uint32_t data); /* port 3 */ - DECLARE_READ32_MEMBER( ram_address_r ); - DECLARE_WRITE32_MEMBER( ram_address_w ); + uint32_t ram_address_r(); + void ram_address_w(uint32_t data); void data_map(address_map &map); void program_map(address_map &map); diff --git a/src/devices/cpu/sh/sh2.cpp b/src/devices/cpu/sh/sh2.cpp index 9d1014f1648..d46a2f5fdc0 100644 --- a/src/devices/cpu/sh/sh2.cpp +++ b/src/devices/cpu/sh/sh2.cpp @@ -113,7 +113,7 @@ DEFINE_DEVICE_TYPE(SH2A, sh2a_device, "sh21", "Hitachi SH-2A") SH2 internal map -------------------------------------------------*/ -READ32_MEMBER(sh2_device::sh2_internal_a5) +uint32_t sh2_device::sh2_internal_a5() { return 0xa5a5a5a5; } diff --git a/src/devices/cpu/sh/sh2.h b/src/devices/cpu/sh/sh2.h index 8eaad7ad6c4..c0ba7340d8b 100644 --- a/src/devices/cpu/sh/sh2.h +++ b/src/devices/cpu/sh/sh2.h @@ -66,92 +66,92 @@ public: template void set_ftcsr_read_callback(T &&... args) { m_ftcsr_read_cb.set(std::forward(args)...); } - DECLARE_READ32_MEMBER(sh2_internal_a5); + uint32_t sh2_internal_a5(); // SCI - DECLARE_READ8_MEMBER( smr_r ); - DECLARE_WRITE8_MEMBER( smr_w ); - DECLARE_READ8_MEMBER( brr_r ); - DECLARE_WRITE8_MEMBER( brr_w ); - DECLARE_READ8_MEMBER( scr_r ); - DECLARE_WRITE8_MEMBER( scr_w ); - DECLARE_READ8_MEMBER( tdr_r ); - DECLARE_WRITE8_MEMBER( tdr_w ); - DECLARE_READ8_MEMBER( ssr_r ); - DECLARE_WRITE8_MEMBER( ssr_w ); - DECLARE_READ8_MEMBER( rdr_r ); + uint8_t smr_r(); + void smr_w(uint8_t data); + uint8_t brr_r(); + void brr_w(uint8_t data); + uint8_t scr_r(); + void scr_w(uint8_t data); + uint8_t tdr_r(); + void tdr_w(uint8_t data); + uint8_t ssr_r(); + void ssr_w(uint8_t data); + uint8_t rdr_r(); // FRT / FRC - DECLARE_READ8_MEMBER( tier_r ); - DECLARE_WRITE8_MEMBER( tier_w ); - DECLARE_READ16_MEMBER( frc_r ); - DECLARE_WRITE16_MEMBER( frc_w ); - DECLARE_READ8_MEMBER( ftcsr_r ); - DECLARE_WRITE8_MEMBER( ftcsr_w ); - DECLARE_READ16_MEMBER( ocra_b_r ); - DECLARE_WRITE16_MEMBER( ocra_b_w ); - DECLARE_READ8_MEMBER( frc_tcr_r ); - DECLARE_WRITE8_MEMBER( frc_tcr_w ); - DECLARE_READ8_MEMBER( tocr_r ); - DECLARE_WRITE8_MEMBER( tocr_w ); - DECLARE_READ16_MEMBER( frc_icr_r ); + uint8_t tier_r(); + void tier_w(uint8_t data); + uint16_t frc_r(); + void frc_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint8_t ftcsr_r(); + void ftcsr_w(uint8_t data); + uint16_t ocra_b_r(); + void ocra_b_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint8_t frc_tcr_r(); + void frc_tcr_w(uint8_t data); + uint8_t tocr_r(); + void tocr_w(uint8_t data); + uint16_t frc_icr_r(); // INTC - DECLARE_READ16_MEMBER( ipra_r ); - DECLARE_WRITE16_MEMBER( ipra_w ); - DECLARE_READ16_MEMBER( iprb_r ); - DECLARE_WRITE16_MEMBER( iprb_w ); - DECLARE_READ16_MEMBER( vcra_r ); - DECLARE_WRITE16_MEMBER( vcra_w ); - DECLARE_READ16_MEMBER( vcrb_r ); - DECLARE_WRITE16_MEMBER( vcrb_w ); - DECLARE_READ16_MEMBER( vcrc_r ); - DECLARE_WRITE16_MEMBER( vcrc_w ); - DECLARE_READ16_MEMBER( vcrd_r ); - DECLARE_WRITE16_MEMBER( vcrd_w ); - DECLARE_READ16_MEMBER( vcrwdt_r ); - DECLARE_WRITE16_MEMBER( vcrwdt_w ); - DECLARE_READ32_MEMBER( vcrdiv_r ); - DECLARE_WRITE32_MEMBER( vcrdiv_w ); - DECLARE_READ16_MEMBER( intc_icr_r ); - DECLARE_WRITE16_MEMBER( intc_icr_w ); + uint16_t ipra_r(); + void ipra_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t iprb_r(); + void iprb_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vcra_r(); + void vcra_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vcrb_r(); + void vcrb_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vcrc_r(); + void vcrc_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vcrd_r(); + void vcrd_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t vcrwdt_r(); + void vcrwdt_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint32_t vcrdiv_r(); + void vcrdiv_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint16_t intc_icr_r(); + void intc_icr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); // DIVU - DECLARE_READ32_MEMBER( dvsr_r ); - DECLARE_WRITE32_MEMBER( dvsr_w ); - DECLARE_READ32_MEMBER( dvdnt_r ); - DECLARE_WRITE32_MEMBER( dvdnt_w ); - DECLARE_READ32_MEMBER( dvdnth_r ); - DECLARE_WRITE32_MEMBER( dvdnth_w ); - DECLARE_READ32_MEMBER( dvdntl_r ); - DECLARE_WRITE32_MEMBER( dvdntl_w ); - - DECLARE_READ32_MEMBER( dvcr_r ); - DECLARE_WRITE32_MEMBER( dvcr_w ); + uint32_t dvsr_r(); + void dvsr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t dvdnt_r(); + void dvdnt_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t dvdnth_r(); + void dvdnth_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t dvdntl_r(); + void dvdntl_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + + uint32_t dvcr_r(); + void dvcr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // DMAC - template READ32_MEMBER(vcrdma_r) + template uint32_t vcrdma_r() { return m_vcrdma[Channel] & 0x7f; } - template WRITE32_MEMBER(vcrdma_w) + template void vcrdma_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { COMBINE_DATA(&m_vcrdma[Channel]); m_irq_vector.dmac[Channel] = m_vcrdma[Channel] & 0x7f; sh2_recalc_irq(); } - template READ8_MEMBER(drcr_r) { return m_dmac[Channel].drcr & 3; } - template WRITE8_MEMBER(drcr_w) { m_dmac[Channel].drcr = data & 3; sh2_recalc_irq(); } - template READ32_MEMBER(sar_r) { return m_dmac[Channel].sar; } - template WRITE32_MEMBER(sar_w) { COMBINE_DATA(&m_dmac[Channel].sar); } - template READ32_MEMBER(dar_r) { return m_dmac[Channel].dar; } - template WRITE32_MEMBER(dar_w) { COMBINE_DATA(&m_dmac[Channel].dar); } - template READ32_MEMBER(dmac_tcr_r) { return m_dmac[Channel].tcr; } - template WRITE32_MEMBER(dmac_tcr_w) { COMBINE_DATA(&m_dmac[Channel].tcr); m_dmac[Channel].tcr &= 0xffffff; } - template READ32_MEMBER(chcr_r) { return m_dmac[Channel].chcr; } - template WRITE32_MEMBER(chcr_w) + template uint8_t drcr_r() { return m_dmac[Channel].drcr & 3; } + template void drcr_w(uint8_t data) { m_dmac[Channel].drcr = data & 3; sh2_recalc_irq(); } + template uint32_t sar_r() { return m_dmac[Channel].sar; } + template void sar_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { COMBINE_DATA(&m_dmac[Channel].sar); } + template uint32_t dar_r() { return m_dmac[Channel].dar; } + template void dar_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { COMBINE_DATA(&m_dmac[Channel].dar); } + template uint32_t dmac_tcr_r() { return m_dmac[Channel].tcr; } + template void dmac_tcr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { COMBINE_DATA(&m_dmac[Channel].tcr); m_dmac[Channel].tcr &= 0xffffff; } + template uint32_t chcr_r() { return m_dmac[Channel].chcr; } + template void chcr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { uint32_t old; old = m_dmac[Channel].chcr; @@ -159,8 +159,8 @@ public: m_dmac[Channel].chcr = (data & ~2) | (old & m_dmac[Channel].chcr & 2); sh2_dmac_check(Channel); } - READ32_MEMBER( dmaor_r ) { return m_dmaor & 0xf; } - WRITE32_MEMBER( dmaor_w ) + uint32_t dmaor_r() { return m_dmaor & 0xf; } + void dmaor_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0) { if(ACCESSING_BITS_0_7) { @@ -173,32 +173,32 @@ public: } // WTC - DECLARE_READ16_MEMBER( wtcnt_r ); - DECLARE_WRITE16_MEMBER( wtcnt_w ); - DECLARE_READ16_MEMBER( rstcsr_r ); - DECLARE_WRITE16_MEMBER( rstcsr_w ); + uint16_t wtcnt_r(); + void wtcnt_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t rstcsr_r(); + void rstcsr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); // misc - DECLARE_READ16_MEMBER( fmr_sbycr_r ); - DECLARE_WRITE16_MEMBER( fmr_sbycr_w ); - DECLARE_READ8_MEMBER( ccr_r ); - DECLARE_WRITE8_MEMBER( ccr_w ); + uint16_t fmr_sbycr_r(); + void fmr_sbycr_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint8_t ccr_r(); + void ccr_w(uint8_t data); // BSC - DECLARE_READ32_MEMBER( bcr1_r ); - DECLARE_WRITE32_MEMBER( bcr1_w ); - DECLARE_READ32_MEMBER( bcr2_r ); - DECLARE_WRITE32_MEMBER( bcr2_w ); - DECLARE_READ32_MEMBER( wcr_r ); - DECLARE_WRITE32_MEMBER( wcr_w ); - DECLARE_READ32_MEMBER( mcr_r ); - DECLARE_WRITE32_MEMBER( mcr_w ); - DECLARE_READ32_MEMBER( rtcsr_r ); - DECLARE_WRITE32_MEMBER( rtcsr_w ); - DECLARE_READ32_MEMBER( rtcor_r ); - DECLARE_WRITE32_MEMBER( rtcor_w ); - DECLARE_READ32_MEMBER( rtcnt_r ); - DECLARE_WRITE32_MEMBER( rtcnt_w ); + uint32_t bcr1_r(); + void bcr1_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t bcr2_r(); + void bcr2_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t wcr_r(); + void wcr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t mcr_r(); + void mcr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rtcsr_r(); + void rtcsr_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rtcor_r(); + void rtcor_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t rtcnt_r(); + void rtcnt_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); virtual void set_frt_input(int state) override; @@ -368,18 +368,18 @@ public: // construction/destruction sh2a_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ32_MEMBER(dma_sar0_r); - DECLARE_WRITE32_MEMBER(dma_sar0_w); - DECLARE_READ32_MEMBER(dma_dar0_r); - DECLARE_WRITE32_MEMBER(dma_dar0_w); - DECLARE_READ16_MEMBER(dmaor_r); - DECLARE_WRITE16_MEMBER(dmaor_w); - DECLARE_READ16_MEMBER(dma_tcr0_r); - DECLARE_WRITE16_MEMBER(dma_tcr0_w); - DECLARE_READ16_MEMBER(dma_chcr0_r); - DECLARE_WRITE16_MEMBER(dma_chcr0_w); - DECLARE_READ16_MEMBER(sh7021_r); - DECLARE_WRITE16_MEMBER(sh7021_w); + uint32_t dma_sar0_r(); + void dma_sar0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t dma_dar0_r(); + void dma_dar0_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint16_t dmaor_r(); + void dmaor_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t dma_tcr0_r(); + void dma_tcr0_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t dma_chcr0_r(); + void dma_chcr0_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t sh7021_r(offs_t offset); + void sh7021_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void sh7032_dma_exec(int ch); void sh7021_map(address_map &map); @@ -402,8 +402,8 @@ public: // construction/destruction sh1_device(const machine_config &mconfig, const char *_tag, device_t *_owner, uint32_t _clock); - DECLARE_READ16_MEMBER(sh7032_r); - DECLARE_WRITE16_MEMBER(sh7032_w); + uint16_t sh7032_r(offs_t offset); + void sh7032_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); void sh7032_map(address_map &map); private: uint16_t m_sh7032_regs[0x200]; diff --git a/src/devices/cpu/sh/sh2comn.cpp b/src/devices/cpu/sh/sh2comn.cpp index fc39aacd1f0..6a9286649c2 100644 --- a/src/devices/cpu/sh/sh2comn.cpp +++ b/src/devices/cpu/sh/sh2comn.cpp @@ -480,59 +480,59 @@ void sh2_device::sh2_dmac_check(int dmach) */ // TODO: identical to H8 counterpart -READ8_MEMBER( sh2_device::smr_r ) +uint8_t sh2_device::smr_r() { return m_smr; } -WRITE8_MEMBER( sh2_device::smr_w ) +void sh2_device::smr_w(uint8_t data) { m_smr = data; } -READ8_MEMBER( sh2_device::brr_r ) +uint8_t sh2_device::brr_r() { return m_brr; } -WRITE8_MEMBER( sh2_device::brr_w ) +void sh2_device::brr_w(uint8_t data) { m_brr = data; } -READ8_MEMBER( sh2_device::scr_r ) +uint8_t sh2_device::scr_r() { return m_scr; } -WRITE8_MEMBER( sh2_device::scr_w ) +void sh2_device::scr_w(uint8_t data) { m_scr = data; } -READ8_MEMBER( sh2_device::tdr_r ) +uint8_t sh2_device::tdr_r() { return m_tdr; } -WRITE8_MEMBER( sh2_device::tdr_w ) +void sh2_device::tdr_w(uint8_t data) { m_tdr = data; // printf("%c",data & 0xff); } -READ8_MEMBER( sh2_device::ssr_r ) +uint8_t sh2_device::ssr_r() { // 0x84 is needed by EGWord on Saturn to make it to boot for some reason. return m_ssr | 0x84; } -WRITE8_MEMBER( sh2_device::ssr_w ) +void sh2_device::ssr_w(uint8_t data) { m_ssr = data; } -READ8_MEMBER( sh2_device::rdr_r ) +uint8_t sh2_device::rdr_r() { return 0; } @@ -541,12 +541,12 @@ READ8_MEMBER( sh2_device::rdr_r ) * FRC */ -READ8_MEMBER( sh2_device::tier_r ) +uint8_t sh2_device::tier_r() { return m_tier; } -WRITE8_MEMBER( sh2_device::tier_w ) +void sh2_device::tier_w(uint8_t data) { sh2_timer_resync(); m_tier = data; @@ -554,7 +554,7 @@ WRITE8_MEMBER( sh2_device::tier_w ) sh2_recalc_irq(); } -READ8_MEMBER( sh2_device::ftcsr_r ) +uint8_t sh2_device::ftcsr_r() { // TODO: to be tested if (!m_ftcsr_read_cb.isnull()) @@ -563,7 +563,7 @@ READ8_MEMBER( sh2_device::ftcsr_r ) return m_ftcsr; } -WRITE8_MEMBER( sh2_device::ftcsr_w ) +void sh2_device::ftcsr_w(uint8_t data) { uint8_t old; old = m_ftcsr; @@ -575,13 +575,13 @@ WRITE8_MEMBER( sh2_device::ftcsr_w ) sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::frc_r ) +uint16_t sh2_device::frc_r() { sh2_timer_resync(); return m_frc; } -WRITE16_MEMBER( sh2_device::frc_w ) +void sh2_device::frc_w(offs_t offset, uint16_t data, uint16_t mem_mask) { sh2_timer_resync(); COMBINE_DATA(&m_frc); @@ -589,12 +589,12 @@ WRITE16_MEMBER( sh2_device::frc_w ) sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::ocra_b_r ) +uint16_t sh2_device::ocra_b_r() { return (m_tocr & 0x10) ? m_ocrb : m_ocra; } -WRITE16_MEMBER( sh2_device::ocra_b_w ) +void sh2_device::ocra_b_w(offs_t offset, uint16_t data, uint16_t mem_mask) { sh2_timer_resync(); if(m_tocr & 0x10) @@ -605,12 +605,12 @@ WRITE16_MEMBER( sh2_device::ocra_b_w ) sh2_recalc_irq(); } -READ8_MEMBER( sh2_device::frc_tcr_r ) +uint8_t sh2_device::frc_tcr_r() { return m_frc_tcr & 0x83; } -WRITE8_MEMBER( sh2_device::frc_tcr_w ) +void sh2_device::frc_tcr_w(uint8_t data) { sh2_timer_resync(); m_frc_tcr = data & 0x83; @@ -618,12 +618,12 @@ WRITE8_MEMBER( sh2_device::frc_tcr_w ) sh2_recalc_irq(); } -READ8_MEMBER( sh2_device::tocr_r ) +uint8_t sh2_device::tocr_r() { return (m_tocr & 0x13) | 0xe0; } -WRITE8_MEMBER( sh2_device::tocr_w ) +void sh2_device::tocr_w(uint8_t data) { sh2_timer_resync(); // TODO: output levels A/B (bits 1-0) @@ -632,7 +632,7 @@ WRITE8_MEMBER( sh2_device::tocr_w ) sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::frc_icr_r ) +uint16_t sh2_device::frc_icr_r() { return m_frc_icr; } @@ -641,26 +641,26 @@ READ16_MEMBER( sh2_device::frc_icr_r ) * INTC */ -READ16_MEMBER( sh2_device::intc_icr_r ) +uint16_t sh2_device::intc_icr_r() { // TODO: flip meaning based off NMI edge select bit (NMIE) uint16_t nmilv = m_nmi_line_state == ASSERT_LINE ? 0 : 0x8000; return (nmilv) | (m_intc_icr & 0x0101); } -WRITE16_MEMBER( sh2_device::intc_icr_w ) +void sh2_device::intc_icr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_intc_icr); m_nmie = bool(BIT(m_intc_icr, 8)); m_vecmd = bool(BIT(m_intc_icr, 0)); } -READ16_MEMBER( sh2_device::ipra_r ) +uint16_t sh2_device::ipra_r() { return m_ipra & 0xfff0; } -WRITE16_MEMBER( sh2_device::ipra_w ) +void sh2_device::ipra_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_ipra); m_irq_level.divu = (m_ipra >> 12) & 0xf; @@ -669,12 +669,12 @@ WRITE16_MEMBER( sh2_device::ipra_w ) sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::iprb_r ) +uint16_t sh2_device::iprb_r() { return m_iprb & 0xff00; } -WRITE16_MEMBER( sh2_device::iprb_w ) +void sh2_device::iprb_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_iprb); m_irq_level.sci = (m_iprb >> 12) & 0xf; @@ -682,36 +682,36 @@ WRITE16_MEMBER( sh2_device::iprb_w ) sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::vcra_r ) +uint16_t sh2_device::vcra_r() { return m_vcra & 0x7f7f; } -WRITE16_MEMBER( sh2_device::vcra_w ) +void sh2_device::vcra_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_vcra); // ... sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::vcrb_r ) +uint16_t sh2_device::vcrb_r() { return m_vcrb; } -WRITE16_MEMBER( sh2_device::vcrb_w ) +void sh2_device::vcrb_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_vcrb); // ... sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::vcrc_r ) +uint16_t sh2_device::vcrc_r() { return m_vcrc & 0x7f7f; } -WRITE16_MEMBER( sh2_device::vcrc_w ) +void sh2_device::vcrc_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_vcrc); m_irq_vector.fic = (m_vcrc >> 8) & 0x7f; @@ -719,36 +719,36 @@ WRITE16_MEMBER( sh2_device::vcrc_w ) sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::vcrd_r ) +uint16_t sh2_device::vcrd_r() { return m_vcrd & 0x7f00; } -WRITE16_MEMBER( sh2_device::vcrd_w ) +void sh2_device::vcrd_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_vcrd); m_irq_vector.fov = (m_vcrc >> 8) & 0x7f; sh2_recalc_irq(); } -READ16_MEMBER( sh2_device::vcrwdt_r ) +uint16_t sh2_device::vcrwdt_r() { return m_vcrwdt & 0x7f7f; } -WRITE16_MEMBER( sh2_device::vcrwdt_w ) +void sh2_device::vcrwdt_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_vcrwdt); // ... sh2_recalc_irq(); } -READ32_MEMBER( sh2_device::vcrdiv_r ) +uint32_t sh2_device::vcrdiv_r() { return m_vcrdiv & 0x7f; } -WRITE32_MEMBER( sh2_device::vcrdiv_w ) +void sh2_device::vcrdiv_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_vcrdiv); // TODO: unemulated, level is seemingly not documented/settable? @@ -760,12 +760,12 @@ WRITE32_MEMBER( sh2_device::vcrdiv_w ) * DIVU */ -READ32_MEMBER( sh2_device::dvcr_r ) +uint32_t sh2_device::dvcr_r() { return (m_divu_ovfie == true ? 2 : 0) | (m_divu_ovf == true ? 1 : 0); } -WRITE32_MEMBER( sh2_device::dvcr_w ) +void sh2_device::dvcr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if(ACCESSING_BITS_0_7) { @@ -781,22 +781,22 @@ WRITE32_MEMBER( sh2_device::dvcr_w ) } } -READ32_MEMBER( sh2_device::dvsr_r ) +uint32_t sh2_device::dvsr_r() { return m_dvsr; } -WRITE32_MEMBER( sh2_device::dvsr_w ) +void sh2_device::dvsr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_dvsr); } -READ32_MEMBER( sh2_device::dvdnt_r ) +uint32_t sh2_device::dvdnt_r() { return m_dvdntl; } -WRITE32_MEMBER( sh2_device::dvdnt_w ) +void sh2_device::dvdnt_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_dvdntl); int32_t a = m_dvdntl; @@ -816,22 +816,22 @@ WRITE32_MEMBER( sh2_device::dvdnt_w ) } } -READ32_MEMBER( sh2_device::dvdnth_r ) +uint32_t sh2_device::dvdnth_r() { return m_dvdnth; } -READ32_MEMBER( sh2_device::dvdntl_r ) +uint32_t sh2_device::dvdntl_r() { return m_dvdntl; } -WRITE32_MEMBER( sh2_device::dvdnth_w ) +void sh2_device::dvdnth_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_dvdnth); } -WRITE32_MEMBER( sh2_device::dvdntl_w ) +void sh2_device::dvdntl_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_dvdntl); int64_t a = m_dvdntl | ((uint64_t)(m_dvdnth) << 32); @@ -866,18 +866,18 @@ WRITE32_MEMBER( sh2_device::dvdntl_w ) * WTC */ -READ16_MEMBER( sh2_device::wtcnt_r ) +uint16_t sh2_device::wtcnt_r() { sh2_wtcnt_recalc(); return ((m_wtcsr | 0x18) << 8) | (m_wtcnt & 0xff); } -READ16_MEMBER( sh2_device::rstcsr_r ) +uint16_t sh2_device::rstcsr_r() { return (m_rstcsr & 0xe0) | 0x1f; } -WRITE16_MEMBER( sh2_device::wtcnt_w ) +void sh2_device::wtcnt_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_wtcw[0]); switch (m_wtcw[0] & 0xff00) @@ -911,7 +911,7 @@ WRITE16_MEMBER( sh2_device::wtcnt_w ) } } -WRITE16_MEMBER( sh2_device::rstcsr_w ) +void sh2_device::rstcsr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_wtcw[1]); switch (m_wtcw[1] & 0xff00) @@ -927,12 +927,12 @@ WRITE16_MEMBER( sh2_device::rstcsr_w ) } } -READ16_MEMBER( sh2_device::fmr_sbycr_r ) +uint16_t sh2_device::fmr_sbycr_r() { return m_sbycr; } -WRITE16_MEMBER( sh2_device::fmr_sbycr_w ) +void sh2_device::fmr_sbycr_w(offs_t offset, uint16_t data, uint16_t mem_mask) { switch (mem_mask) { @@ -952,12 +952,12 @@ WRITE16_MEMBER( sh2_device::fmr_sbycr_w ) } } -READ8_MEMBER( sh2_device::ccr_r ) +uint8_t sh2_device::ccr_r() { return m_ccr & ~0x30; } -WRITE8_MEMBER( sh2_device::ccr_w ) +void sh2_device::ccr_w(uint8_t data) { /* xx-- ---- Way 0/1 @@ -970,73 +970,73 @@ WRITE8_MEMBER( sh2_device::ccr_w ) m_ccr = data; } -READ32_MEMBER( sh2_device::bcr1_r ) +uint32_t sh2_device::bcr1_r() { return (m_bcr1 & ~0xe008) | (m_is_slave ? 0x8000 : 0); } -WRITE32_MEMBER( sh2_device::bcr1_w ) +void sh2_device::bcr1_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_bcr1); } -READ32_MEMBER( sh2_device::bcr2_r ) +uint32_t sh2_device::bcr2_r() { return m_bcr2; } -WRITE32_MEMBER( sh2_device::bcr2_w ) +void sh2_device::bcr2_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_bcr2); } -READ32_MEMBER( sh2_device::wcr_r ) +uint32_t sh2_device::wcr_r() { return m_wcr; } -WRITE32_MEMBER( sh2_device::wcr_w ) +void sh2_device::wcr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_wcr); } -READ32_MEMBER( sh2_device::mcr_r ) +uint32_t sh2_device::mcr_r() { return m_mcr & ~0x103; } -WRITE32_MEMBER( sh2_device::mcr_w ) +void sh2_device::mcr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_mcr); } -READ32_MEMBER( sh2_device::rtcsr_r ) +uint32_t sh2_device::rtcsr_r() { return m_rtcsr & 0xf8; } -WRITE32_MEMBER( sh2_device::rtcsr_w ) +void sh2_device::rtcsr_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_rtcsr); } -READ32_MEMBER( sh2_device::rtcnt_r ) +uint32_t sh2_device::rtcnt_r() { return m_rtcnt & 0xff; } -WRITE32_MEMBER( sh2_device::rtcnt_w ) +void sh2_device::rtcnt_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_rtcnt); m_rtcnt &= 0xff; } -READ32_MEMBER( sh2_device::rtcor_r ) +uint32_t sh2_device::rtcor_r() { return m_rtcor & 0xff; } -WRITE32_MEMBER( sh2_device::rtcor_w ) +void sh2_device::rtcor_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_rtcor); m_rtcor &= 0xff; @@ -1171,55 +1171,55 @@ void sh2a_device::sh7032_dma_exec(int ch) printf("%02x %02x %02x %1d\n",sm,dm,rs,ts); } -READ32_MEMBER(sh2a_device::dma_sar0_r) +uint32_t sh2a_device::dma_sar0_r() { return m_dma[0].sar; } -WRITE32_MEMBER(sh2a_device::dma_sar0_w) +void sh2a_device::dma_sar0_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_dma[0].sar); } -READ32_MEMBER(sh2a_device::dma_dar0_r) +uint32_t sh2a_device::dma_dar0_r() { return m_dma[0].dar; } -WRITE32_MEMBER(sh2a_device::dma_dar0_w) +void sh2a_device::dma_dar0_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_dma[0].dar); } -READ16_MEMBER(sh2a_device::dma_tcr0_r) +uint16_t sh2a_device::dma_tcr0_r() { return m_dma[0].tcr; } -WRITE16_MEMBER(sh2a_device::dma_tcr0_w) +void sh2a_device::dma_tcr0_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //printf("%04x\n",data); COMBINE_DATA(&m_dma[0].tcr); } -READ16_MEMBER(sh2a_device::dma_chcr0_r) +uint16_t sh2a_device::dma_chcr0_r() { return m_dma[0].chcr; } -WRITE16_MEMBER(sh2a_device::dma_chcr0_w) +void sh2a_device::dma_chcr0_w(offs_t offset, uint16_t data, uint16_t mem_mask) { //printf("%04x CHCR0\n",data); COMBINE_DATA(&m_dma[0].chcr); sh7032_dma_exec(0); } -READ16_MEMBER(sh2a_device::dmaor_r) +uint16_t sh2a_device::dmaor_r() { return m_dmaor; } -WRITE16_MEMBER(sh2a_device::dmaor_w) +void sh2a_device::dmaor_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_dmaor); sh7032_dma_exec(0); @@ -1228,7 +1228,7 @@ WRITE16_MEMBER(sh2a_device::dmaor_w) /*! @brief Dummy debug interface */ -READ16_MEMBER(sh1_device::sh7032_r) +uint16_t sh1_device::sh7032_r(offs_t offset) { return m_sh7032_regs[offset]; } @@ -1236,12 +1236,12 @@ READ16_MEMBER(sh1_device::sh7032_r) /*! @brief Dummy debug interface */ -WRITE16_MEMBER(sh1_device::sh7032_w) +void sh1_device::sh7032_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_sh7032_regs[offset]); } -READ16_MEMBER(sh2a_device::sh7021_r) +uint16_t sh2a_device::sh7021_r(offs_t offset) { return m_sh7021_regs[offset]; } @@ -1249,7 +1249,7 @@ READ16_MEMBER(sh2a_device::sh7021_r) /*! @brief Dummy debug interface */ -WRITE16_MEMBER(sh2a_device::sh7021_w) +void sh2a_device::sh7021_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_sh7021_regs[offset]); } diff --git a/src/devices/cpu/sh/sh3comn.cpp b/src/devices/cpu/sh/sh3comn.cpp index 77f4b079414..b8bb6f0b8a4 100644 --- a/src/devices/cpu/sh/sh3comn.cpp +++ b/src/devices/cpu/sh/sh3comn.cpp @@ -12,7 +12,7 @@ /* High internal area (ffffxxxx) */ -WRITE32_MEMBER( sh3_base_device::sh3_internal_high_w ) +void sh3_base_device::sh3_internal_high_w(offs_t offset, uint32_t data, uint32_t mem_mask) { COMBINE_DATA(&m_sh3internal_upper[offset]); @@ -73,7 +73,7 @@ WRITE32_MEMBER( sh3_base_device::sh3_internal_high_w ) } -READ32_MEMBER( sh3_base_device::sh3_internal_high_r ) +uint32_t sh3_base_device::sh3_internal_high_r(offs_t offset, uint32_t mem_mask) { uint32_t ret = 0; @@ -138,7 +138,7 @@ READ32_MEMBER( sh3_base_device::sh3_internal_high_r ) } -READ32_MEMBER( sh3_base_device::sh3_internal_r ) +uint32_t sh3_base_device::sh3_internal_r(offs_t offset, uint32_t mem_mask) { if (offset<0x1000) { @@ -376,7 +376,7 @@ READ32_MEMBER( sh3_base_device::sh3_internal_r ) /* Lower internal area */ -WRITE32_MEMBER( sh3_base_device::sh3_internal_w ) +void sh3_base_device::sh3_internal_w(offs_t offset, uint32_t data, uint32_t mem_mask) { if (offset<0x1000) { diff --git a/src/devices/cpu/sh/sh4.h b/src/devices/cpu/sh/sh4.h index 6af65a31b34..87fe2e84f70 100644 --- a/src/devices/cpu/sh/sh4.h +++ b/src/devices/cpu/sh/sh4.h @@ -682,11 +682,11 @@ private: class sh3_base_device : public sh34_base_device { public: - DECLARE_WRITE32_MEMBER( sh3_internal_w ); - DECLARE_READ32_MEMBER( sh3_internal_r ); + void sh3_internal_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t sh3_internal_r(offs_t offset, uint32_t mem_mask = ~0); - DECLARE_WRITE32_MEMBER( sh3_internal_high_w ); - DECLARE_READ32_MEMBER( sh3_internal_high_r ); + void sh3_internal_high_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t sh3_internal_high_r(offs_t offset, uint32_t mem_mask = ~0); void sh3_internal_map(address_map &map); protected: @@ -700,8 +700,8 @@ protected: class sh4_base_device : public sh34_base_device { public: - DECLARE_WRITE32_MEMBER( sh4_internal_w ); - DECLARE_READ32_MEMBER( sh4_internal_r ); + void sh4_internal_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t sh4_internal_r(offs_t offset, uint32_t mem_mask = ~0); uint64_t sh4_utlb_address_array_r(offs_t offset); void sh4_utlb_address_array_w(offs_t offset, uint64_t data); diff --git a/src/devices/cpu/sh/sh4comn.cpp b/src/devices/cpu/sh/sh4comn.cpp index f7678767e68..9c1d3bd3380 100644 --- a/src/devices/cpu/sh/sh4comn.cpp +++ b/src/devices/cpu/sh/sh4comn.cpp @@ -673,7 +673,7 @@ void sh34_base_device::sh4_handler_ipra_w(uint32_t data, uint32_t mem_mask) } -WRITE32_MEMBER( sh4_base_device::sh4_internal_w ) +void sh4_base_device::sh4_internal_w(offs_t offset, uint32_t data, uint32_t mem_mask) { int a; uint32_t addr = (offset << 2) + 0xfe000000; @@ -980,7 +980,7 @@ WRITE32_MEMBER( sh4_base_device::sh4_internal_w ) } } -READ32_MEMBER( sh4_base_device::sh4_internal_r ) +uint32_t sh4_base_device::sh4_internal_r(offs_t offset, uint32_t mem_mask) { if (m_cpu_type != CPU_TYPE_SH4) fatalerror("sh4_internal_r uses m_m[] with SH3\n"); diff --git a/src/devices/cpu/sh/sh7604_bus.cpp b/src/devices/cpu/sh/sh7604_bus.cpp index 6175fd9a5b2..a4b61bddae6 100644 --- a/src/devices/cpu/sh/sh7604_bus.cpp +++ b/src/devices/cpu/sh/sh7604_bus.cpp @@ -30,12 +30,12 @@ DEFINE_DEVICE_TYPE(SH7604_BUS, sh7604_bus_device, "sh7604bus", "SH7604 BUS Contr // LIVE DEVICE //************************************************************************** -READ16_MEMBER(sh7604_bus_device::bus_control_1_r) +uint16_t sh7604_bus_device::bus_control_1_r() { return (m_bcr1 & 0x1ff7) | (m_is_slave == true ? 0x8000 : 0); } -WRITE16_MEMBER(sh7604_bus_device::bus_control_1_w) +void sh7604_bus_device::bus_control_1_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_bcr1); if(m_bcr1 & 0x1000) // ENDIAN @@ -44,26 +44,26 @@ WRITE16_MEMBER(sh7604_bus_device::bus_control_1_w) throw emu_fatalerror("%s: enabled partial space share mode\n", tag()); } -READ16_MEMBER(sh7604_bus_device::bus_control_2_r) { return m_bcr2 & 0x00fc; } -WRITE16_MEMBER(sh7604_bus_device::bus_control_2_w) +uint16_t sh7604_bus_device::bus_control_2_r() { return m_bcr2 & 0x00fc; } +void sh7604_bus_device::bus_control_2_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_bcr2); if(m_bcr2 != 0x00fc) throw emu_fatalerror("%s: unexpected bus size register set %04x\n", tag(),data); } -READ16_MEMBER(sh7604_bus_device::wait_control_r) { return m_wcr; } -WRITE16_MEMBER(sh7604_bus_device::wait_control_w) { COMBINE_DATA(&m_wcr); } +uint16_t sh7604_bus_device::wait_control_r() { return m_wcr; } +void sh7604_bus_device::wait_control_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_wcr); } -READ16_MEMBER(sh7604_bus_device::memory_control_r) { return m_mcr & 0xfefc; } -WRITE16_MEMBER(sh7604_bus_device::memory_control_w) { COMBINE_DATA(&m_mcr); } +uint16_t sh7604_bus_device::memory_control_r() { return m_mcr & 0xfefc; } +void sh7604_bus_device::memory_control_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_mcr); } -READ16_MEMBER(sh7604_bus_device::refresh_timer_status_r) +uint16_t sh7604_bus_device::refresh_timer_status_r() { return m_rtcsr & 0x00f8; } -WRITE16_MEMBER(sh7604_bus_device::refresh_timer_control_w) +void sh7604_bus_device::refresh_timer_control_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_rtcsr); @@ -71,24 +71,24 @@ WRITE16_MEMBER(sh7604_bus_device::refresh_timer_control_w) throw emu_fatalerror("%s: enabled timer irq register with clock setting = %02x\n",tag(),data & 0x38); } -READ16_MEMBER(sh7604_bus_device::refresh_timer_counter_r) +uint16_t sh7604_bus_device::refresh_timer_counter_r() { throw emu_fatalerror("%s: reading timer counter!\n",tag()); return 0; } -WRITE16_MEMBER(sh7604_bus_device::refresh_timer_counter_w) +void sh7604_bus_device::refresh_timer_counter_w(offs_t offset, uint16_t data, uint16_t mem_mask) { throw emu_fatalerror("%s: writing timer counter %04x\n",tag(),data); //COMBINE_DATA(&m_rtcnt); } -READ16_MEMBER(sh7604_bus_device::refresh_timer_constant_r) +uint16_t sh7604_bus_device::refresh_timer_constant_r() { return m_rtcor & 0xff; } -WRITE16_MEMBER(sh7604_bus_device::refresh_timer_constant_w) +void sh7604_bus_device::refresh_timer_constant_w(offs_t offset, uint16_t data, uint16_t mem_mask) { COMBINE_DATA(&m_rtcor); } @@ -142,13 +142,13 @@ void sh7604_bus_device::device_reset() // READ/WRITE HANDLERS //************************************************************************** -READ32_MEMBER( sh7604_bus_device::read ) +uint32_t sh7604_bus_device::read(address_space &space, offs_t offset) { // 16 bit access only, TODO return space.read_word(offset) & 0xffff; } -WRITE32_MEMBER( sh7604_bus_device::write ) +void sh7604_bus_device::write(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask) { // TODO: 8 bit access is invalid // if accessing bits 16-31, one must write ID = 0xa55a diff --git a/src/devices/cpu/sh/sh7604_bus.h b/src/devices/cpu/sh/sh7604_bus.h index 672934aa5ae..9d2915b6b6b 100644 --- a/src/devices/cpu/sh/sh7604_bus.h +++ b/src/devices/cpu/sh/sh7604_bus.h @@ -28,22 +28,22 @@ public: // I/O operations void bus_regs(address_map &map); - DECLARE_WRITE32_MEMBER( write ); - DECLARE_READ32_MEMBER( read ); - DECLARE_READ16_MEMBER( bus_control_1_r ); - DECLARE_WRITE16_MEMBER( bus_control_1_w ); - DECLARE_READ16_MEMBER( bus_control_2_r ); - DECLARE_WRITE16_MEMBER( bus_control_2_w ); - DECLARE_READ16_MEMBER( wait_control_r ); - DECLARE_WRITE16_MEMBER( wait_control_w ); - DECLARE_READ16_MEMBER( memory_control_r ); - DECLARE_WRITE16_MEMBER( memory_control_w ); - DECLARE_READ16_MEMBER( refresh_timer_status_r ); - DECLARE_WRITE16_MEMBER( refresh_timer_control_w ); - DECLARE_READ16_MEMBER( refresh_timer_counter_r ); - DECLARE_WRITE16_MEMBER( refresh_timer_counter_w ); - DECLARE_READ16_MEMBER( refresh_timer_constant_r ); - DECLARE_WRITE16_MEMBER( refresh_timer_constant_w ); + void write(address_space &space, offs_t offset, uint32_t data, uint32_t mem_mask = ~0); + uint32_t read(address_space &space, offs_t offset); + uint16_t bus_control_1_r(); + void bus_control_1_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t bus_control_2_r(); + void bus_control_2_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t wait_control_r(); + void wait_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t memory_control_r(); + void memory_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t refresh_timer_status_r(); + void refresh_timer_control_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t refresh_timer_counter_r(); + void refresh_timer_counter_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); + uint16_t refresh_timer_constant_r(); + void refresh_timer_constant_w(offs_t offset, uint16_t data, uint16_t mem_mask = ~0); protected: // device-level overrides diff --git a/src/devices/cpu/sh/sh7604_wdt.cpp b/src/devices/cpu/sh/sh7604_wdt.cpp index f18ca8ad501..2b5ea9eb499 100644 --- a/src/devices/cpu/sh/sh7604_wdt.cpp +++ b/src/devices/cpu/sh/sh7604_wdt.cpp @@ -67,12 +67,12 @@ void sh7604_wdt_device::device_reset() // READ/WRITE HANDLERS //************************************************************************** -READ8_MEMBER( sh7604_wdt_device::read ) +uint8_t sh7604_wdt_device::read(address_space &space, offs_t offset) { return space.read_byte(offset); } -WRITE16_MEMBER( sh7604_wdt_device::write ) +void sh7604_wdt_device::write(address_space &space, offs_t offset, uint16_t data) { uint8_t id_param = data >> 8; switch(id_param) diff --git a/src/devices/cpu/sh/sh7604_wdt.h b/src/devices/cpu/sh/sh7604_wdt.h index 70490ba8153..dd39f4be514 100644 --- a/src/devices/cpu/sh/sh7604_wdt.h +++ b/src/devices/cpu/sh/sh7604_wdt.h @@ -28,8 +28,8 @@ public: // I/O operations void wdt_regs(address_map &map); - DECLARE_WRITE16_MEMBER( write ); - DECLARE_READ8_MEMBER( read ); + void write(address_space &space, offs_t offset, uint16_t data); + uint8_t read(address_space &space, offs_t offset); protected: // device-level overrides diff --git a/src/devices/cpu/sharc/sharc.cpp b/src/devices/cpu/sharc/sharc.cpp index a2e6d9f7b82..d11f7dd96cd 100644 --- a/src/devices/cpu/sharc/sharc.cpp +++ b/src/devices/cpu/sharc/sharc.cpp @@ -244,7 +244,7 @@ void adsp21062_device::pm1_w(offs_t offset, uint64_t data, uint64_t mem_mask) } } -READ32_MEMBER( adsp21062_device::dmw0_r) +uint32_t adsp21062_device::dmw0_r(offs_t offset) { if(offset & 1) return m_block0[offset >> 1] >> 16; @@ -252,7 +252,7 @@ READ32_MEMBER( adsp21062_device::dmw0_r) return m_block0[offset >> 1] & 0xffff; } -WRITE32_MEMBER(adsp21062_device::dmw0_w) +void adsp21062_device::dmw0_w(offs_t offset, uint32_t data) { if(offset & 1) m_block0[offset >> 1] = (m_block0[offset >> 1] & 0xffff) | (data << 16); @@ -260,7 +260,7 @@ WRITE32_MEMBER(adsp21062_device::dmw0_w) m_block0[offset >> 1] = (m_block0[offset >> 1] & 0xffff0000) | (data & 0xffff); } -READ32_MEMBER( adsp21062_device::dmw1_r) +uint32_t adsp21062_device::dmw1_r(offs_t offset) { if(offset & 1) return m_block1[offset >> 1] >> 16; @@ -268,7 +268,7 @@ READ32_MEMBER( adsp21062_device::dmw1_r) return m_block1[offset >> 1] & 0xffff; } -WRITE32_MEMBER(adsp21062_device::dmw1_w) +void adsp21062_device::dmw1_w(offs_t offset, uint32_t data) { if(offset & 1) m_block1[offset >> 1] = (m_block1[offset >> 1] & 0xffff) | (data << 16); @@ -277,7 +277,7 @@ WRITE32_MEMBER(adsp21062_device::dmw1_w) } /* IOP registers */ -READ32_MEMBER( adsp21062_device::iop_r) +uint32_t adsp21062_device::iop_r(offs_t offset) { switch (offset) { @@ -295,7 +295,7 @@ READ32_MEMBER( adsp21062_device::iop_r) } } -WRITE32_MEMBER(adsp21062_device::iop_w) +void adsp21062_device::iop_w(offs_t offset, uint32_t data) { switch (offset) { diff --git a/src/devices/cpu/sharc/sharc.h b/src/devices/cpu/sharc/sharc.h index 9cd61fe89a6..6c9292c5193 100644 --- a/src/devices/cpu/sharc/sharc.h +++ b/src/devices/cpu/sharc/sharc.h @@ -123,12 +123,12 @@ public: void pm0_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); uint64_t pm1_r(offs_t offset); void pm1_w(offs_t offset, uint64_t data, uint64_t mem_mask = ~0); - DECLARE_READ32_MEMBER( dmw0_r); - DECLARE_WRITE32_MEMBER(dmw0_w); - DECLARE_READ32_MEMBER( dmw1_r); - DECLARE_WRITE32_MEMBER(dmw1_w); - DECLARE_READ32_MEMBER( iop_r); - DECLARE_WRITE32_MEMBER(iop_w); + uint32_t dmw0_r(offs_t offset); + void dmw0_w(offs_t offset, uint32_t data); + uint32_t dmw1_r(offs_t offset); + void dmw1_w(offs_t offset, uint32_t data); + uint32_t iop_r(offs_t offset); + void iop_w(offs_t offset, uint32_t data); enum ASTAT_FLAGS { diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp index 7d07c2f43df..11444c83b23 100644 --- a/src/devices/cpu/tms32025/tms32025.cpp +++ b/src/devices/cpu/tms32025/tms32025.cpp @@ -292,22 +292,22 @@ std::unique_ptr tms32025_device::create_disassembler() return std::make_unique(); } -READ16_MEMBER( tms32025_device::drr_r) +uint16_t tms32025_device::drr_r() { return m_drr; } -WRITE16_MEMBER(tms32025_device::drr_w) +void tms32025_device::drr_w(uint16_t data) { m_drr = data; } -READ16_MEMBER( tms32025_device::dxr_r) +uint16_t tms32025_device::dxr_r() { return m_dxr; } -WRITE16_MEMBER(tms32025_device::dxr_w) +void tms32025_device::dxr_w(uint16_t data) { m_dxr = data; @@ -319,42 +319,42 @@ WRITE16_MEMBER(tms32025_device::dxr_w) } } -READ16_MEMBER( tms32025_device::tim_r) +uint16_t tms32025_device::tim_r() { return m_tim; } -WRITE16_MEMBER(tms32025_device::tim_w) +void tms32025_device::tim_w(uint16_t data) { m_tim = data; } -READ16_MEMBER( tms32025_device::prd_r) +uint16_t tms32025_device::prd_r() { return m_prd; } -WRITE16_MEMBER(tms32025_device::prd_w) +void tms32025_device::prd_w(uint16_t data) { m_prd = data; } -READ16_MEMBER( tms32025_device::imr_r) +uint16_t tms32025_device::imr_r() { return m_imr; } -WRITE16_MEMBER(tms32025_device::imr_w) +void tms32025_device::imr_w(uint16_t data) { m_imr = data; } -READ16_MEMBER( tms32025_device::greg_r) +uint16_t tms32025_device::greg_r() { return m_greg; } -WRITE16_MEMBER(tms32025_device::greg_w) +void tms32025_device::greg_w(uint16_t data) { m_greg = data; } diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h index e2e2c799897..de8b4442c08 100644 --- a/src/devices/cpu/tms32025/tms32025.h +++ b/src/devices/cpu/tms32025/tms32025.h @@ -75,19 +75,6 @@ public: void set_mp_mc(bool state) { m_mp_mc = state; } - DECLARE_READ16_MEMBER( drr_r); - DECLARE_WRITE16_MEMBER(drr_w); - DECLARE_READ16_MEMBER( dxr_r); - DECLARE_WRITE16_MEMBER(dxr_w); - DECLARE_READ16_MEMBER( tim_r); - DECLARE_WRITE16_MEMBER(tim_w); - DECLARE_READ16_MEMBER( prd_r); - DECLARE_WRITE16_MEMBER(prd_w); - DECLARE_READ16_MEMBER( imr_r); - DECLARE_WRITE16_MEMBER(imr_w); - DECLARE_READ16_MEMBER( greg_r); - DECLARE_WRITE16_MEMBER(greg_w); - //void tms32025_program(address_map &map); void tms32025_data(address_map &map); void tms32026_data(address_map &map); @@ -185,6 +172,19 @@ protected: int m_waiting_for_serial_frame; bool m_mp_mc; + uint16_t drr_r(); + void drr_w(uint16_t data); + uint16_t dxr_r(); + void dxr_w(uint16_t data); + uint16_t tim_r(); + void tim_w(uint16_t data); + uint16_t prd_r(); + void prd_w(uint16_t data); + uint16_t imr_r(); + void imr_w(uint16_t data); + uint16_t greg_r(); + void greg_w(uint16_t data); + inline void CLR0(uint16_t flag); inline void SET0(uint16_t flag); inline void CLR1(uint16_t flag); diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp index a90455c8bd4..98365fbbc8a 100644 --- a/src/devices/cpu/tms32031/tms32031.cpp +++ b/src/devices/cpu/tms32031/tms32031.cpp @@ -983,7 +983,7 @@ void tms3203x_device::execute_run() } // internal peripherals -WRITE32_MEMBER(tms3203x_device::primary_bus_control_w) +void tms3203x_device::primary_bus_control_w(offs_t offset, uint32_t data, uint32_t mem_mask) { // change in internal hold state if ((m_primary_bus_control ^ data) & HIZ) diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h index 5f998920089..f27f0757244 100644 --- a/src/devices/cpu/tms32031/tms32031.h +++ b/src/devices/cpu/tms32031/tms32031.h @@ -172,8 +172,8 @@ protected: virtual std::unique_ptr create_disassembler() override; // internal peripheral device handlers - DECLARE_READ32_MEMBER(primary_bus_control_r) { return m_primary_bus_control; } - DECLARE_WRITE32_MEMBER(primary_bus_control_w); + uint32_t primary_bus_control_r() { return m_primary_bus_control; } + void primary_bus_control_w(offs_t offset, uint32_t data, uint32_t mem_mask = ~0); // memory helpers uint32_t ROPCODE(offs_t pc); diff --git a/src/devices/cpu/tms32051/tms32051.cpp b/src/devices/cpu/tms32051/tms32051.cpp index 1691c66b2e2..29fb4f14f29 100644 --- a/src/devices/cpu/tms32051/tms32051.cpp +++ b/src/devices/cpu/tms32051/tms32051.cpp @@ -444,7 +444,7 @@ void tms32051_device::execute_run() /*****************************************************************************/ -READ16_MEMBER( tms32051_device::cpuregs_r ) +uint16_t tms32051_device::cpuregs_r(offs_t offset) { switch (offset) { @@ -529,7 +529,7 @@ READ16_MEMBER( tms32051_device::cpuregs_r ) return 0; } -WRITE16_MEMBER( tms32051_device::cpuregs_w ) +void tms32051_device::cpuregs_w(offs_t offset, uint16_t data) { switch (offset) { diff --git a/src/devices/cpu/tms32051/tms32051.h b/src/devices/cpu/tms32051/tms32051.h index 06f69489032..63552d7e605 100644 --- a/src/devices/cpu/tms32051/tms32051.h +++ b/src/devices/cpu/tms32051/tms32051.h @@ -59,8 +59,8 @@ public: // construction/destruction tms32051_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock); - DECLARE_READ16_MEMBER( cpuregs_r ); - DECLARE_WRITE16_MEMBER( cpuregs_w ); + uint16_t cpuregs_r(offs_t offset); + void cpuregs_w(offs_t offset, uint16_t data); void tms32051_internal_data(address_map &map); void tms32051_internal_pgm(address_map &map); diff --git a/src/devices/machine/ra17xx.cpp b/src/devices/machine/ra17xx.cpp index 66fc3163da5..3cf2c5775e7 100644 --- a/src/devices/machine/ra17xx.cpp +++ b/src/devices/machine/ra17xx.cpp @@ -97,7 +97,7 @@ void ra17xx_device::io_w(address_space &space, offs_t offset, uint8_t data) { assert(offset < 16); - m_bl = m_cpu->address_bus_r(space, 0) & 63; + m_bl = m_cpu->address_bus_r(space) & 63; if (offset & 1) { diff --git a/src/emu/emumem.h b/src/emu/emumem.h index ce51c35e604..87e5af0d977 100644 --- a/src/emu/emumem.h +++ b/src/emu/emumem.h @@ -1885,25 +1885,6 @@ private: // MACROS //************************************************************************** -// space read/write handler function macros -#define READ8_MEMBER(name) u8 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u8 mem_mask) -#define WRITE8_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u8 data, ATTR_UNUSED u8 mem_mask) -#define READ16_MEMBER(name) u16 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u16 mem_mask) -#define WRITE16_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u16 data, ATTR_UNUSED u16 mem_mask) -#define READ32_MEMBER(name) u32 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u32 mem_mask) -#define WRITE32_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u32 data, ATTR_UNUSED u32 mem_mask) -#define READ64_MEMBER(name) u64 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u64 mem_mask) -#define WRITE64_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u64 data, ATTR_UNUSED u64 mem_mask) - -#define DECLARE_READ8_MEMBER(name) u8 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u8 mem_mask = 0xff) -#define DECLARE_WRITE8_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u8 data, ATTR_UNUSED u8 mem_mask = 0xff) -#define DECLARE_READ16_MEMBER(name) u16 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u16 mem_mask = 0xffff) -#define DECLARE_WRITE16_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u16 data, ATTR_UNUSED u16 mem_mask = 0xffff) -#define DECLARE_READ32_MEMBER(name) u32 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u32 mem_mask = 0xffffffff) -#define DECLARE_WRITE32_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u32 data, ATTR_UNUSED u32 mem_mask = 0xffffffff) -#define DECLARE_READ64_MEMBER(name) u64 name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u64 mem_mask = 0xffffffffffffffffU) -#define DECLARE_WRITE64_MEMBER(name) void name(ATTR_UNUSED address_space &space, ATTR_UNUSED offs_t offset, ATTR_UNUSED u64 data, ATTR_UNUSED u64 mem_mask = 0xffffffffffffffffU) - // helper macro for merging data with the memory mask #define COMBINE_DATA(varptr) (*(varptr) = (*(varptr) & ~mem_mask) | (data & mem_mask)) diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp index 132a4b4a8ec..4e471a75007 100644 --- a/src/emu/machine.cpp +++ b/src/emu/machine.cpp @@ -1339,12 +1339,12 @@ void system_time::full_time::set(struct tm &t) // DUMMY ADDRESS SPACE //************************************************************************** -READ8_MEMBER(dummy_space_device::read) +u8 dummy_space_device::read(offs_t offset) { throw emu_fatalerror("Attempted to read from generic address space (offs %X)\n", offset); } -WRITE8_MEMBER(dummy_space_device::write) +void dummy_space_device::write(offs_t offset, u8 data) { throw emu_fatalerror("Attempted to write to generic address space (offs %X = %02X)\n", offset, data); } diff --git a/src/emu/machine.h b/src/emu/machine.h index 53ebe7f5f87..3ea100fab7f 100644 --- a/src/emu/machine.h +++ b/src/emu/machine.h @@ -119,8 +119,8 @@ class dummy_space_device : public device_t, public: dummy_space_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock); - DECLARE_READ8_MEMBER(read); - DECLARE_WRITE8_MEMBER(write); + u8 read(offs_t offset); + void write(offs_t offset, u8 data); void dummy(address_map &map); protected: diff --git a/src/emu/memarray.h b/src/emu/memarray.h index d7bbd51df1c..be44831c9e8 100644 --- a/src/emu/memarray.h +++ b/src/emu/memarray.h @@ -12,7 +12,7 @@ arranged logically. A memory array is stored in "natural" order, i.e., read/writes to it - are done via AM_RAM, or standard COMBINE_DATA, even if the width of + are done via ram(), or standard COMBINE_DATA, even if the width of the CPU is different from the array width. The read_entry/write_entry functions serve to read/write entries of diff --git a/src/mame/drivers/gba.cpp b/src/mame/drivers/gba.cpp index f095ef7cdb8..dcd863fcf9a 100644 --- a/src/mame/drivers/gba.cpp +++ b/src/mame/drivers/gba.cpp @@ -1344,8 +1344,8 @@ void gba_state::machine_start() membank("rom2")->set_base(cart_rom->base()); membank("rom3")->set_base(cart_rom->base()); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x80000c4, 0x80000cb, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_gpio))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x80000c4, 0x80000cb, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_gpio))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x80000c4, 0x80000cb, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_gpio))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x80000c4, 0x80000cb, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_gpio))); // add nvram to save state m_cart->save_nvram(); @@ -1353,40 +1353,40 @@ void gba_state::machine_start() // install the cart NVRAM handlers if necessary if (m_cart->get_type() == GBA_SRAM || m_cart->get_type() == GBA_DRILLDOZ || m_cart->get_type() == GBA_WARIOTWS) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000000, 0xe00ffff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000000, 0xe00ffff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe010000, 0xe01ffff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xe010000, 0xe01ffff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000000, 0xe00ffff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000000, 0xe00ffff, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xe010000, 0xe01ffff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xe010000, 0xe01ffff, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); } if (m_cart->get_type() == GBA_EEPROM || m_cart->get_type() == GBA_EEPROM4 || m_cart->get_type() == GBA_EEPROM64 || m_cart->get_type() == GBA_BOKTAI) { // for games larger than 16MB the actual range is smaller but read_ram/write_ram handles that! - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd000000, 0xdffffff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd000000, 0xdffffff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd000000, 0xdffffff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd000000, 0xdffffff, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); } if (m_cart->get_type() == GBA_YOSHIUG) { // EEPROM - m_maincpu->space(AS_PROGRAM).install_read_handler(0xd000000, 0xdffffff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xd000000, 0xdffffff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xd000000, 0xdffffff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xd000000, 0xdffffff, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); // Tilt Sensor - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe008000, 0xe0085ff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_tilt))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xe008000, 0xe0085ff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_tilt))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xe008000, 0xe0085ff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_tilt))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xe008000, 0xe0085ff, write32sm_delegate(*m_cart, FUNC(gba_cart_slot_device::write_tilt))); } // merge the two flash and mask accesses in read_ram?!? if (m_cart->get_type() == GBA_FLASH || m_cart->get_type() == GBA_FLASH512 || m_cart->get_type() == GBA_FLASH_RTC) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000000, 0xe00ffff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000000, 0xe00ffff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000000, 0xe00ffff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000000, 0xe00ffff, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); } if (m_cart->get_type() == GBA_FLASH1M || m_cart->get_type() == GBA_FLASH1M_RTC) { - m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000000, 0xe01ffff, read32_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000000, 0xe01ffff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0xe000000, 0xe01ffff, read32s_delegate(*m_cart, FUNC(gba_cart_slot_device::read_ram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xe000000, 0xe01ffff, write32s_delegate(*m_cart, FUNC(gba_cart_slot_device::write_ram))); } if (m_cart->get_type() == GBA_3DMATRIX) { - m_maincpu->space(AS_PROGRAM).install_write_handler(0x08800000, 0x088001ff, write32_delegate(*m_cart, FUNC(gba_cart_slot_device::write_mapper))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x08800000, 0x088001ff, write32sm_delegate(*m_cart, FUNC(gba_cart_slot_device::write_mapper))); memory_region *cart_romhlp = memregion(region_tag.assign(m_cart->tag()).append(GBAHELP_ROM_REGION_TAG)); membank("rom1")->set_base(cart_romhlp->base()); } diff --git a/src/mame/drivers/hp9825.cpp b/src/mame/drivers/hp9825.cpp index 73578da06ae..9f69d976a88 100644 --- a/src/mame/drivers/hp9825.cpp +++ b/src/mame/drivers/hp9825.cpp @@ -206,8 +206,8 @@ void hp9825_state::device_reset() // Then, set r/w handlers of all installed I/O cards int sc; - read16_delegate rhandler(*this); - write16_delegate whandler(*this); + read16m_delegate rhandler(*this); + write16m_delegate whandler(*this); for (unsigned i = 0; i < 3; i++) { if ((sc = m_io_slot[ i ]->get_rw_handlers(rhandler , whandler)) >= 0) { logerror("Install R/W handlers for slot %u @ SC = %d\n", i, sc); diff --git a/src/mame/drivers/hp9845.cpp b/src/mame/drivers/hp9845.cpp index ac6c63de9f0..f504196011a 100644 --- a/src/mame/drivers/hp9845.cpp +++ b/src/mame/drivers/hp9845.cpp @@ -473,8 +473,8 @@ void hp9845_base_state::device_reset() // Then, set r/w handlers of all installed I/O cards int sc; - read16_delegate rhandler(*this); - write16_delegate whandler(*this); + read16m_delegate rhandler(*this); + write16m_delegate whandler(*this); for (unsigned i = 0; 4 > i; ++i) { if ((sc = m_io_slot[i]->get_rw_handlers(rhandler , whandler)) >= 0) { logerror("Install R/W handlers for slot %u @ SC = %d\n", i, sc); diff --git a/src/mame/drivers/megadriv.cpp b/src/mame/drivers/megadriv.cpp index f8797232eff..57f4ba7e7bb 100644 --- a/src/mame/drivers/megadriv.cpp +++ b/src/mame/drivers/megadriv.cpp @@ -298,10 +298,11 @@ MACHINE_START_MEMBER(md_cons_state, md_common) void md_cons_state::install_cartslot() { // for now m_cartslot is only in MD and not 32x and SegaCD - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(*m_cart, FUNC(base_md_cart_slot_device::read)), write16_delegate(*m_cart, FUNC(base_md_cart_slot_device::write))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(*m_cart, FUNC(base_md_cart_slot_device::read_a13)), write16_delegate(*m_cart, FUNC(base_md_cart_slot_device::write_a13))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(*m_cart, FUNC(base_md_cart_slot_device::read_a15)), write16_delegate(*m_cart, FUNC(base_md_cart_slot_device::write_a15))); -// m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(*m_cart, FUNC(base_md_cart_slot_device::write_tmss_bank))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x000000, 0x7fffff, read16sm_delegate(*m_cart, FUNC(base_md_cart_slot_device::read))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x000000, 0x7fffff, write16s_delegate(*m_cart, FUNC(base_md_cart_slot_device::write))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16sm_delegate(*m_cart, FUNC(base_md_cart_slot_device::read_a13)), write16sm_delegate(*m_cart, FUNC(base_md_cart_slot_device::write_a13))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16sm_delegate(*m_cart, FUNC(base_md_cart_slot_device::read_a15)), write16sm_delegate(*m_cart, FUNC(base_md_cart_slot_device::write_a15))); +// m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16sm_delegate(*m_cart, FUNC(base_md_cart_slot_device::write_tmss_bank))); } uint16_t md_cons_state::tmss_r(offs_t offset) diff --git a/src/mame/drivers/saturn.cpp b/src/mame/drivers/saturn.cpp index d0ae82752ca..94a6309610c 100644 --- a/src/mame/drivers/saturn.cpp +++ b/src/mame/drivers/saturn.cpp @@ -622,39 +622,39 @@ MACHINE_START_MEMBER(sat_console_state, saturn) case 0x22: case 0x23: case 0x24: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x04000000, 0x047fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x04000000, 0x047fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); - m_slave->space(AS_PROGRAM).install_read_handler(0x04000000, 0x047fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); - m_slave->space(AS_PROGRAM).install_write_handler(0x04000000, 0x047fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x24000000, 0x247fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x24000000, 0x247fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); - m_slave->space(AS_PROGRAM).install_read_handler(0x24000000, 0x247fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); - m_slave->space(AS_PROGRAM).install_write_handler(0x24000000, 0x247fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x04000000, 0x047fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x04000000, 0x047fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); + m_slave->space(AS_PROGRAM).install_read_handler(0x04000000, 0x047fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); + m_slave->space(AS_PROGRAM).install_write_handler(0x04000000, 0x047fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x24000000, 0x247fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x24000000, 0x247fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); + m_slave->space(AS_PROGRAM).install_read_handler(0x24000000, 0x247fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_bram))); + m_slave->space(AS_PROGRAM).install_write_handler(0x24000000, 0x247fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_bram))); break; case 0x5a: // Data RAM cart case 0x5c: - m_maincpu->space(AS_PROGRAM).install_read_handler(0x02400000, 0x025fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x02400000, 0x025fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x02600000, 0x027fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x02600000, 0x027fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); - m_slave->space(AS_PROGRAM).install_read_handler(0x02400000, 0x025fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); - m_slave->space(AS_PROGRAM).install_write_handler(0x02400000, 0x025fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); - m_slave->space(AS_PROGRAM).install_read_handler(0x02600000, 0x027fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); - m_slave->space(AS_PROGRAM).install_write_handler(0x02600000, 0x027fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x22400000, 0x225fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x22400000, 0x225fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x22600000, 0x227fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0x22600000, 0x227fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); - m_slave->space(AS_PROGRAM).install_read_handler(0x22400000, 0x225fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); - m_slave->space(AS_PROGRAM).install_write_handler(0x22400000, 0x225fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); - m_slave->space(AS_PROGRAM).install_read_handler(0x22600000, 0x227fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); - m_slave->space(AS_PROGRAM).install_write_handler(0x22600000, 0x227fffff, write32_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x02400000, 0x025fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x02400000, 0x025fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x02600000, 0x027fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x02600000, 0x027fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); + m_slave->space(AS_PROGRAM).install_read_handler(0x02400000, 0x025fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); + m_slave->space(AS_PROGRAM).install_write_handler(0x02400000, 0x025fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); + m_slave->space(AS_PROGRAM).install_read_handler(0x02600000, 0x027fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); + m_slave->space(AS_PROGRAM).install_write_handler(0x02600000, 0x027fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x22400000, 0x225fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x22400000, 0x225fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x22600000, 0x227fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x22600000, 0x227fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); + m_slave->space(AS_PROGRAM).install_read_handler(0x22400000, 0x225fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram0))); + m_slave->space(AS_PROGRAM).install_write_handler(0x22400000, 0x225fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram0))); + m_slave->space(AS_PROGRAM).install_read_handler(0x22600000, 0x227fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_ext_dram1))); + m_slave->space(AS_PROGRAM).install_write_handler(0x22600000, 0x227fffff, write32s_delegate(*m_exp, FUNC(sat_cart_slot_device::write_ext_dram1))); break; case 0xff: // ROM cart + mirror - m_maincpu->space(AS_PROGRAM).install_read_handler(0x02000000, 0x023fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); - m_maincpu->space(AS_PROGRAM).install_read_handler(0x22000000, 0x223fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); - m_slave->space(AS_PROGRAM).install_read_handler(0x02000000, 0x023fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); - m_slave->space(AS_PROGRAM).install_read_handler(0x22000000, 0x223fffff, read32_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x02000000, 0x023fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x22000000, 0x223fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); + m_slave->space(AS_PROGRAM).install_read_handler(0x02000000, 0x023fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); + m_slave->space(AS_PROGRAM).install_read_handler(0x22000000, 0x223fffff, read32sm_delegate(*m_exp, FUNC(sat_cart_slot_device::read_rom))); break; } } diff --git a/src/mame/drivers/segapico.cpp b/src/mame/drivers/segapico.cpp index 44561f563b2..0f3a5d58bae 100644 --- a/src/mame/drivers/segapico.cpp +++ b/src/mame/drivers/segapico.cpp @@ -385,10 +385,11 @@ static void pico_cart(device_slot_interface &device) MACHINE_START_MEMBER(pico_state,pico) { - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read)), write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a13)), write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a13))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a15)), write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a15))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_tmss_bank))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x000000, 0x7fffff, read16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x000000, 0x7fffff, write16s_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a13)), write16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a13))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a15)), write16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a15))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_tmss_bank))); m_vdp->stop_timers(); } @@ -600,10 +601,11 @@ static void copera_cart(device_slot_interface &device) MACHINE_START_MEMBER(copera_state,copera) { - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0x000000, 0x7fffff, read16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read)), write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a13)), write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a13))); - m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a15)), write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a15))); - m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_tmss_bank))); + m_maincpu->space(AS_PROGRAM).install_read_handler(0x000000, 0x7fffff, read16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0x000000, 0x7fffff, write16s_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa13000, 0xa130ff, read16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a13)), write16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a13))); + m_maincpu->space(AS_PROGRAM).install_readwrite_handler(0xa15000, 0xa150ff, read16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::read_a15)), write16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_a15))); + m_maincpu->space(AS_PROGRAM).install_write_handler(0xa14000, 0xa14003, write16sm_delegate(*m_picocart, FUNC(base_md_cart_slot_device::write_tmss_bank))); m_sega_315_5641_pcm->reset_w(0); m_sega_315_5641_pcm->start_w(0); diff --git a/src/mame/machine/3dom2.cpp b/src/mame/machine/3dom2.cpp index 9c2b49c4ff6..dee32da9369 100644 --- a/src/mame/machine/3dom2.cpp +++ b/src/mame/machine/3dom2.cpp @@ -473,7 +473,7 @@ void m2_bda_device::configure_ppc_address_map(address_space &space) space.install_readwrite_handler(MEMCTL_BASE, MEMCTL_BASE + DEVICE_MASK, read32s_delegate(*m_memctl, FUNC(m2_memctl_device::read)), write32s_delegate(*m_memctl, FUNC(m2_memctl_device::write)), 0xffffffffffffffffULL); space.install_readwrite_handler(VDU_BASE, VDU_BASE + DEVICE_MASK, read32s_delegate(*m_vdu, FUNC(m2_vdu_device::read)), write32s_delegate(*m_vdu, FUNC(m2_vdu_device::write)), 0xffffffffffffffffULL); space.install_readwrite_handler(TE_BASE, TE_BASE + DEVICE_MASK, read32sm_delegate(*m_te, FUNC(m2_te_device::read)), write32sm_delegate(*m_te, FUNC(m2_te_device::write)), 0xffffffffffffffffULL); - space.install_readwrite_handler(DSP_BASE, DSP_BASE + DEVICE_MASK, read32_delegate(*m_dspp, FUNC(dspp_device::read)), write32_delegate(*m_dspp, FUNC(dspp_device::write)), 0xffffffffffffffffULL); + space.install_readwrite_handler(DSP_BASE, DSP_BASE + DEVICE_MASK, read32sm_delegate(*m_dspp, FUNC(dspp_device::read)), write32sm_delegate(*m_dspp, FUNC(dspp_device::write)), 0xffffffffffffffffULL); space.install_readwrite_handler(CTRLPORT_BASE, CTRLPORT_BASE + DEVICE_MASK,read32sm_delegate(*m_ctrlport, FUNC(m2_ctrlport_device::read)), write32sm_delegate(*m_ctrlport, FUNC(m2_ctrlport_device::write)), 0xffffffffffffffffULL); space.install_readwrite_handler(MPEG_BASE, MPEG_BASE + DEVICE_MASK, read32sm_delegate(*m_mpeg, FUNC(m2_mpeg_device::read)), write32sm_delegate(*m_mpeg, FUNC(m2_mpeg_device::write)), 0xffffffffffffffffULL); diff --git a/src/zexall/zexall.cpp b/src/zexall/zexall.cpp index f9fff9b2526..8de1121304d 100644 --- a/src/zexall/zexall.cpp +++ b/src/zexall/zexall.cpp @@ -23,12 +23,12 @@ public: { } - DECLARE_READ8_MEMBER( output_ack_r ); - DECLARE_READ8_MEMBER( output_req_r ); - DECLARE_READ8_MEMBER( output_data_r ); - DECLARE_WRITE8_MEMBER( output_ack_w ); - DECLARE_WRITE8_MEMBER( output_req_w ); - DECLARE_WRITE8_MEMBER( output_data_w ); + uint8_t output_ack_r(); + uint8_t output_req_r(); + uint8_t output_data_r(); + void output_ack_w(uint8_t data); + void output_req_w(uint8_t data); + void output_data_w(uint8_t data); void z80_mem(address_map &map); private: @@ -69,7 +69,7 @@ void zexall_state::machine_reset() I/O Handlers ******************************************************************************/ -READ8_MEMBER( zexall_state::output_ack_r ) +uint8_t zexall_state::output_ack_r() { // spit out the byte in out_byte if out_req is not equal to out_req_last if (m_out_req != m_out_req_last) @@ -89,28 +89,28 @@ READ8_MEMBER( zexall_state::output_ack_r ) return m_out_ack; } -WRITE8_MEMBER( zexall_state::output_ack_w ) +void zexall_state::output_ack_w(uint8_t data) { m_out_ack = data; } -READ8_MEMBER( zexall_state::output_req_r ) +uint8_t zexall_state::output_req_r() { return m_out_req; } -WRITE8_MEMBER( zexall_state::output_req_w ) +void zexall_state::output_req_w(uint8_t data) { m_out_req_last = m_out_req; m_out_req = data; } -READ8_MEMBER( zexall_state::output_data_r ) +uint8_t zexall_state::output_data_r() { return m_out_data; } -WRITE8_MEMBER( zexall_state::output_data_w ) +void zexall_state::output_data_w(uint8_t data) { m_out_data = data; } -- cgit v1.2.3