summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/source/techspecs/device_memory_interface.rst82
-rw-r--r--src/devices/bus/cbm2/hrg.cpp8
-rw-r--r--src/devices/bus/compis/hrg.cpp8
-rw-r--r--src/devices/bus/hp_dio/hp_dio.h2
-rw-r--r--src/devices/bus/isa/isa.cpp94
-rw-r--r--src/devices/bus/isa/isa.h49
-rw-r--r--src/devices/bus/isa/num9rev.cpp4
-rw-r--r--src/devices/bus/msx_cart/konami.cpp4
-rw-r--r--src/devices/bus/msx_cart/moonsound.cpp4
-rw-r--r--src/devices/bus/pet/hsg.cpp8
-rw-r--r--src/devices/bus/vme/vme.cpp7
-rw-r--r--src/devices/bus/vme/vme.h10
-rw-r--r--src/devices/bus/wangpc/tig.cpp8
-rw-r--r--src/devices/cpu/8x300/8x300.cpp8
-rw-r--r--src/devices/cpu/8x300/8x300.h10
-rw-r--r--src/devices/cpu/adsp2100/adsp2100.cpp29
-rw-r--r--src/devices/cpu/adsp2100/adsp2100.h6
-rw-r--r--src/devices/cpu/alph8201/alph8201.cpp7
-rw-r--r--src/devices/cpu/alph8201/alph8201.h2
-rw-r--r--src/devices/cpu/alto2/alto2cpu.cpp18
-rw-r--r--src/devices/cpu/alto2/alto2cpu.h2
-rw-r--r--src/devices/cpu/am29000/am29000.cpp8
-rw-r--r--src/devices/cpu/am29000/am29000.h11
-rw-r--r--src/devices/cpu/amis2000/amis2000.cpp8
-rw-r--r--src/devices/cpu/amis2000/amis2000.h2
-rw-r--r--src/devices/cpu/apexc/apexc.cpp8
-rw-r--r--src/devices/cpu/apexc/apexc.h2
-rw-r--r--src/devices/cpu/arc/arc.h2
-rw-r--r--src/devices/cpu/arcompact/arcompact.cpp7
-rw-r--r--src/devices/cpu/arcompact/arcompact.h2
-rw-r--r--src/devices/cpu/arm/arm.cpp7
-rw-r--r--src/devices/cpu/arm/arm.h2
-rw-r--r--src/devices/cpu/arm7/arm7.cpp9
-rw-r--r--src/devices/cpu/arm7/arm7.h4
-rw-r--r--src/devices/cpu/arm7/lpc210x.cpp10
-rw-r--r--src/devices/cpu/arm7/lpc210x.h2
-rw-r--r--src/devices/cpu/asap/asap.cpp6
-rw-r--r--src/devices/cpu/asap/asap.h2
-rw-r--r--src/devices/cpu/avr8/avr8.cpp20
-rw-r--r--src/devices/cpu/avr8/avr8.h2
-rw-r--r--src/devices/cpu/ccpu/ccpu.cpp8
-rw-r--r--src/devices/cpu/ccpu/ccpu.h11
-rw-r--r--src/devices/cpu/clipper/clipper.cpp14
-rw-r--r--src/devices/cpu/clipper/clipper.h2
-rw-r--r--src/devices/cpu/cop400/cop400.cpp8
-rw-r--r--src/devices/cpu/cop400/cop400.h5
-rw-r--r--src/devices/cpu/cosmac/cosmac.cpp17
-rw-r--r--src/devices/cpu/cosmac/cosmac.h2
-rw-r--r--src/devices/cpu/cp1610/cp1610.cpp6
-rw-r--r--src/devices/cpu/cp1610/cp1610.h2
-rw-r--r--src/devices/cpu/cubeqcpu/cubeqcpu.cpp19
-rw-r--r--src/devices/cpu/cubeqcpu/cubeqcpu.h6
-rw-r--r--src/devices/cpu/drcuml.cpp12
-rw-r--r--src/devices/cpu/drcuml.h12
-rw-r--r--src/devices/cpu/dsp16/dsp16.cpp9
-rw-r--r--src/devices/cpu/dsp16/dsp16.h2
-rw-r--r--src/devices/cpu/dsp32/dsp32.cpp6
-rw-r--r--src/devices/cpu/dsp32/dsp32.h2
-rw-r--r--src/devices/cpu/dsp56k/dsp56k.cpp8
-rw-r--r--src/devices/cpu/dsp56k/dsp56k.h2
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.cpp8
-rw-r--r--src/devices/cpu/e0c6200/e0c6200.h2
-rw-r--r--src/devices/cpu/e132xs/e132xs.cpp18
-rw-r--r--src/devices/cpu/e132xs/e132xs.h2
-rw-r--r--src/devices/cpu/es5510/es5510.cpp6
-rw-r--r--src/devices/cpu/es5510/es5510.h2
-rw-r--r--src/devices/cpu/esrip/esrip.cpp10
-rw-r--r--src/devices/cpu/esrip/esrip.h2
-rw-r--r--src/devices/cpu/f8/f8.cpp8
-rw-r--r--src/devices/cpu/f8/f8.h2
-rw-r--r--src/devices/cpu/g65816/g65816.cpp8
-rw-r--r--src/devices/cpu/g65816/g65816.h2
-rw-r--r--src/devices/cpu/g65816/g65816cm.h2
-rw-r--r--src/devices/cpu/g65816/g65816op.h22
-rw-r--r--src/devices/cpu/h6280/h6280.cpp9
-rw-r--r--src/devices/cpu/h6280/h6280.h4
-rw-r--r--src/devices/cpu/h8/h8.cpp9
-rw-r--r--src/devices/cpu/h8/h8.h2
-rw-r--r--src/devices/cpu/hcd62121/hcd62121.cpp6
-rw-r--r--src/devices/cpu/hcd62121/hcd62121.h2
-rw-r--r--src/devices/cpu/hd61700/hd61700.cpp7
-rw-r--r--src/devices/cpu/hd61700/hd61700.h2
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.cpp7
-rw-r--r--src/devices/cpu/hmcs40/hmcs40.h2
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.cpp8
-rw-r--r--src/devices/cpu/hphybrid/hphybrid.h2
-rw-r--r--src/devices/cpu/i386/i386.cpp9
-rw-r--r--src/devices/cpu/i386/i386.h4
-rw-r--r--src/devices/cpu/i8008/i8008.cpp9
-rw-r--r--src/devices/cpu/i8008/i8008.h2
-rw-r--r--src/devices/cpu/i8085/i8085.cpp8
-rw-r--r--src/devices/cpu/i8085/i8085.h2
-rw-r--r--src/devices/cpu/i8089/i8089.cpp12
-rw-r--r--src/devices/cpu/i8089/i8089.h2
-rw-r--r--src/devices/cpu/i86/i186.cpp21
-rw-r--r--src/devices/cpu/i86/i186.h2
-rw-r--r--src/devices/cpu/i86/i286.cpp22
-rw-r--r--src/devices/cpu/i86/i286.h4
-rw-r--r--src/devices/cpu/i86/i86.cpp20
-rw-r--r--src/devices/cpu/i86/i86.h2
-rw-r--r--src/devices/cpu/i860/i860.cpp6
-rw-r--r--src/devices/cpu/i860/i860.h2
-rw-r--r--src/devices/cpu/i960/i960.cpp8
-rw-r--r--src/devices/cpu/i960/i960.h2
-rw-r--r--src/devices/cpu/ie15/ie15.cpp9
-rw-r--r--src/devices/cpu/ie15/ie15.h2
-rw-r--r--src/devices/cpu/jaguar/jaguar.cpp7
-rw-r--r--src/devices/cpu/jaguar/jaguar.h2
-rw-r--r--src/devices/cpu/lc8670/lc8670.cpp11
-rw-r--r--src/devices/cpu/lc8670/lc8670.h2
-rw-r--r--src/devices/cpu/lh5801/lh5801.cpp7
-rw-r--r--src/devices/cpu/lh5801/lh5801.h2
-rw-r--r--src/devices/cpu/lr35902/lr35902.cpp6
-rw-r--r--src/devices/cpu/lr35902/lr35902.h2
-rw-r--r--src/devices/cpu/m37710/m37710.cpp7
-rw-r--r--src/devices/cpu/m37710/m37710.h2
-rw-r--r--src/devices/cpu/m37710/m37710cm.h2
-rw-r--r--src/devices/cpu/m37710/m37710op.h48
-rw-r--r--src/devices/cpu/m6502/deco16.cpp20
-rw-r--r--src/devices/cpu/m6502/deco16.h2
-rw-r--r--src/devices/cpu/m6502/m3745x.cpp6
-rw-r--r--src/devices/cpu/m6502/m3745x.h2
-rw-r--r--src/devices/cpu/m6502/m4510.cpp2
-rw-r--r--src/devices/cpu/m6502/m4510.h2
-rw-r--r--src/devices/cpu/m6502/m5074x.h2
-rw-r--r--src/devices/cpu/m6502/m6502.cpp17
-rw-r--r--src/devices/cpu/m6502/m6502.h2
-rw-r--r--src/devices/cpu/m6502/n2a03.cpp19
-rw-r--r--src/devices/cpu/m6502/n2a03.h2
-rw-r--r--src/devices/cpu/m6800/m6800.cpp18
-rw-r--r--src/devices/cpu/m6800/m6800.h2
-rw-r--r--src/devices/cpu/m6800/m6801.cpp11
-rw-r--r--src/devices/cpu/m6800/m6801.h2
-rw-r--r--src/devices/cpu/m68000/m68000.h6
-rw-r--r--src/devices/cpu/m68000/m68k_in.cpp100
-rw-r--r--src/devices/cpu/m68000/m68kcpu.cpp21
-rw-r--r--src/devices/cpu/m68000/m68kcpu.h10
-rw-r--r--src/devices/cpu/m6805/m6805.cpp9
-rw-r--r--src/devices/cpu/m6805/m6805.h2
-rw-r--r--src/devices/cpu/m6809/m6809.cpp17
-rw-r--r--src/devices/cpu/m6809/m6809.h2
-rw-r--r--src/devices/cpu/mb86233/mb86233.cpp8
-rw-r--r--src/devices/cpu/mb86233/mb86233.h2
-rw-r--r--src/devices/cpu/mb86235/mb86235.cpp8
-rw-r--r--src/devices/cpu/mb86235/mb86235.h2
-rw-r--r--src/devices/cpu/mb88xx/mb88xx.cpp7
-rw-r--r--src/devices/cpu/mb88xx/mb88xx.h2
-rw-r--r--src/devices/cpu/mc68hc11/mc68hc11.cpp7
-rw-r--r--src/devices/cpu/mc68hc11/mc68hc11.h5
-rw-r--r--src/devices/cpu/mcs40/mcs40.cpp18
-rw-r--r--src/devices/cpu/mcs40/mcs40.h2
-rw-r--r--src/devices/cpu/mcs48/mcs48.cpp8
-rw-r--r--src/devices/cpu/mcs48/mcs48.h5
-rw-r--r--src/devices/cpu/mcs51/mcs51.cpp9
-rw-r--r--src/devices/cpu/mcs51/mcs51.h5
-rw-r--r--src/devices/cpu/mcs96/i8x9x.cpp7
-rw-r--r--src/devices/cpu/mcs96/i8x9x.h2
-rw-r--r--src/devices/cpu/mcs96/mcs96.cpp6
-rw-r--r--src/devices/cpu/mcs96/mcs96.h2
-rw-r--r--src/devices/cpu/melps4/melps4.cpp8
-rw-r--r--src/devices/cpu/melps4/melps4.h2
-rw-r--r--src/devices/cpu/minx/minx.cpp6
-rw-r--r--src/devices/cpu/minx/minx.h2
-rw-r--r--src/devices/cpu/mips/mips3.cpp9
-rw-r--r--src/devices/cpu/mips/mips3.h4
-rw-r--r--src/devices/cpu/mips/r3000.cpp9
-rw-r--r--src/devices/cpu/mips/r3000.h2
-rw-r--r--src/devices/cpu/mn10200/mn10200.cpp8
-rw-r--r--src/devices/cpu/mn10200/mn10200.h2
-rw-r--r--src/devices/cpu/nanoprocessor/nanoprocessor.cpp8
-rw-r--r--src/devices/cpu/nanoprocessor/nanoprocessor.h4
-rw-r--r--src/devices/cpu/nec/nec.cpp8
-rw-r--r--src/devices/cpu/nec/nec.h2
-rw-r--r--src/devices/cpu/nec/v25.cpp7
-rw-r--r--src/devices/cpu/nec/v25.h2
-rw-r--r--src/devices/cpu/nec/v53.cpp7
-rw-r--r--src/devices/cpu/nec/v53.h10
-rw-r--r--src/devices/cpu/patinhofeio/patinho_feio.cpp7
-rw-r--r--src/devices/cpu/patinhofeio/patinhofeio_cpu.h2
-rw-r--r--src/devices/cpu/pdp1/pdp1.cpp6
-rw-r--r--src/devices/cpu/pdp1/pdp1.h2
-rw-r--r--src/devices/cpu/pdp1/tx0.cpp7
-rw-r--r--src/devices/cpu/pdp1/tx0.h2
-rw-r--r--src/devices/cpu/pdp8/pdp8.cpp2
-rw-r--r--src/devices/cpu/pdp8/pdp8.h2
-rw-r--r--src/devices/cpu/pic16c5x/pic16c5x.cpp7
-rw-r--r--src/devices/cpu/pic16c5x/pic16c5x.h5
-rw-r--r--src/devices/cpu/pic16c62x/pic16c62x.h5
-rw-r--r--src/devices/cpu/powerpc/ppc.h4
-rw-r--r--src/devices/cpu/powerpc/ppccom.cpp9
-rw-r--r--src/devices/cpu/pps4/pps4.cpp9
-rw-r--r--src/devices/cpu/pps4/pps4.h5
-rw-r--r--src/devices/cpu/psx/psx.cpp6
-rw-r--r--src/devices/cpu/psx/psx.h2
-rw-r--r--src/devices/cpu/rsp/rsp.cpp7
-rw-r--r--src/devices/cpu/rsp/rsp.h2
-rw-r--r--src/devices/cpu/s2650/s2650.cpp17
-rw-r--r--src/devices/cpu/s2650/s2650.h2
-rw-r--r--src/devices/cpu/saturn/saturn.cpp7
-rw-r--r--src/devices/cpu/saturn/saturn.h2
-rw-r--r--src/devices/cpu/sc61860/sc61860.cpp7
-rw-r--r--src/devices/cpu/sc61860/sc61860.h2
-rw-r--r--src/devices/cpu/scmp/scmp.cpp7
-rw-r--r--src/devices/cpu/scmp/scmp.h2
-rw-r--r--src/devices/cpu/score/score.cpp6
-rw-r--r--src/devices/cpu/score/score.h2
-rw-r--r--src/devices/cpu/scudsp/scudsp.cpp8
-rw-r--r--src/devices/cpu/scudsp/scudsp.h2
-rw-r--r--src/devices/cpu/se3208/se3208.cpp6
-rw-r--r--src/devices/cpu/se3208/se3208.h2
-rw-r--r--src/devices/cpu/sh2/sh2.cpp17
-rw-r--r--src/devices/cpu/sh2/sh2.h2
-rw-r--r--src/devices/cpu/sh2/sh7604_bus.cpp10
-rw-r--r--src/devices/cpu/sh2/sh7604_bus.h6
-rw-r--r--src/devices/cpu/sh2/sh7604_sci.cpp9
-rw-r--r--src/devices/cpu/sh2/sh7604_sci.h7
-rw-r--r--src/devices/cpu/sh2/sh7604_wdt.cpp11
-rw-r--r--src/devices/cpu/sh2/sh7604_wdt.h6
-rw-r--r--src/devices/cpu/sh4/sh4.cpp8
-rw-r--r--src/devices/cpu/sh4/sh4.h2
-rw-r--r--src/devices/cpu/sharc/sharc.cpp7
-rw-r--r--src/devices/cpu/sharc/sharc.h2
-rw-r--r--src/devices/cpu/sm510/sm510.h2
-rw-r--r--src/devices/cpu/sm510/sm510base.cpp8
-rw-r--r--src/devices/cpu/sm8500/sm8500.cpp7
-rw-r--r--src/devices/cpu/sm8500/sm8500.h2
-rw-r--r--src/devices/cpu/sparc/mb86901.cpp12
-rw-r--r--src/devices/cpu/sparc/sparc.h2
-rw-r--r--src/devices/cpu/spc700/spc700.cpp23
-rw-r--r--src/devices/cpu/spc700/spc700.h2
-rw-r--r--src/devices/cpu/ssem/ssem.cpp10
-rw-r--r--src/devices/cpu/ssem/ssem.h2
-rw-r--r--src/devices/cpu/ssp1601/ssp1601.cpp8
-rw-r--r--src/devices/cpu/ssp1601/ssp1601.h2
-rw-r--r--src/devices/cpu/superfx/superfx.cpp7
-rw-r--r--src/devices/cpu/superfx/superfx.h2
-rw-r--r--src/devices/cpu/t11/t11.cpp7
-rw-r--r--src/devices/cpu/t11/t11.h2
-rw-r--r--src/devices/cpu/tlcs870/tlcs870.cpp8
-rw-r--r--src/devices/cpu/tlcs870/tlcs870.h2
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.cpp7
-rw-r--r--src/devices/cpu/tlcs90/tlcs90.h2
-rw-r--r--src/devices/cpu/tlcs900/tlcs900.cpp7
-rw-r--r--src/devices/cpu/tlcs900/tlcs900.h5
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.cpp7
-rw-r--r--src/devices/cpu/tms1000/tms1k_base.h2
-rw-r--r--src/devices/cpu/tms32010/tms32010.cpp8
-rw-r--r--src/devices/cpu/tms32010/tms32010.h2
-rw-r--r--src/devices/cpu/tms32025/tms32025.cpp9
-rw-r--r--src/devices/cpu/tms32025/tms32025.h2
-rw-r--r--src/devices/cpu/tms32031/tms32031.cpp6
-rw-r--r--src/devices/cpu/tms32031/tms32031.h2
-rw-r--r--src/devices/cpu/tms32051/tms32051.cpp9
-rw-r--r--src/devices/cpu/tms32051/tms32051.h2
-rw-r--r--src/devices/cpu/tms32082/tms32082.cpp13
-rw-r--r--src/devices/cpu/tms32082/tms32082.h18
-rw-r--r--src/devices/cpu/tms34010/tms34010.cpp6
-rw-r--r--src/devices/cpu/tms34010/tms34010.h2
-rw-r--r--src/devices/cpu/tms57002/tms57002.cpp11
-rw-r--r--src/devices/cpu/tms57002/tms57002.h2
-rw-r--r--src/devices/cpu/tms7000/tms7000.cpp8
-rw-r--r--src/devices/cpu/tms7000/tms7000.h2
-rw-r--r--src/devices/cpu/tms9900/ti990_10.cpp17
-rw-r--r--src/devices/cpu/tms9900/ti990_10.h2
-rw-r--r--src/devices/cpu/tms9900/tms9900.cpp17
-rw-r--r--src/devices/cpu/tms9900/tms9900.h2
-rw-r--r--src/devices/cpu/tms9900/tms9995.cpp17
-rw-r--r--src/devices/cpu/tms9900/tms9995.h2
-rw-r--r--src/devices/cpu/ucom4/ucom4.cpp8
-rw-r--r--src/devices/cpu/ucom4/ucom4.h2
-rw-r--r--src/devices/cpu/unsp/unsp.cpp6
-rw-r--r--src/devices/cpu/unsp/unsp.h2
-rw-r--r--src/devices/cpu/upd7725/upd7725.cpp9
-rw-r--r--src/devices/cpu/upd7725/upd7725.h2
-rw-r--r--src/devices/cpu/upd7810/upd7810.cpp7
-rw-r--r--src/devices/cpu/upd7810/upd7810.h2
-rw-r--r--src/devices/cpu/v30mz/v30mz.cpp8
-rw-r--r--src/devices/cpu/v30mz/v30mz.h2
-rw-r--r--src/devices/cpu/v60/v60.cpp8
-rw-r--r--src/devices/cpu/v60/v60.h2
-rw-r--r--src/devices/cpu/v810/v810.cpp8
-rw-r--r--src/devices/cpu/v810/v810.h2
-rw-r--r--src/devices/cpu/z180/z180.cpp22
-rw-r--r--src/devices/cpu/z180/z180.h4
-rw-r--r--src/devices/cpu/z8/z8.cpp7
-rw-r--r--src/devices/cpu/z8/z8.h11
-rw-r--r--src/devices/cpu/z80/tmpz84c011.cpp6
-rw-r--r--src/devices/cpu/z80/tmpz84c011.h9
-rw-r--r--src/devices/cpu/z80/tmpz84c015.cpp7
-rw-r--r--src/devices/cpu/z80/tmpz84c015.h9
-rw-r--r--src/devices/cpu/z80/z80.cpp22
-rw-r--r--src/devices/cpu/z80/z80.h2
-rw-r--r--src/devices/cpu/z8000/z8000.cpp28
-rw-r--r--src/devices/cpu/z8000/z8000.h33
-rw-r--r--src/devices/machine/at28c16.cpp6
-rw-r--r--src/devices/machine/at28c16.h2
-rw-r--r--src/devices/machine/bankdev.cpp7
-rw-r--r--src/devices/machine/bankdev.h2
-rw-r--r--src/devices/machine/er2055.cpp6
-rw-r--r--src/devices/machine/er2055.h2
-rw-r--r--src/devices/machine/gt64xxx.cpp85
-rw-r--r--src/devices/machine/gt64xxx.h5
-rw-r--r--src/devices/machine/i8155.cpp8
-rw-r--r--src/devices/machine/i8155.h2
-rw-r--r--src/devices/machine/linflash.cpp14
-rw-r--r--src/devices/machine/linflash.h2
-rw-r--r--src/devices/machine/mcf5206e.cpp8
-rw-r--r--src/devices/machine/mcf5206e.h2
-rw-r--r--src/devices/machine/netlist.cpp6
-rw-r--r--src/devices/machine/netlist.h5
-rw-r--r--src/devices/machine/pci.cpp12
-rw-r--r--src/devices/machine/pci.h4
-rw-r--r--src/devices/machine/tc009xlvc.cpp8
-rw-r--r--src/devices/machine/tc009xlvc.h2
-rw-r--r--src/devices/machine/tmp68301.cpp12
-rw-r--r--src/devices/machine/tmp68301.h2
-rw-r--r--src/devices/machine/vrc4373.cpp43
-rw-r--r--src/devices/machine/vrc4373.h5
-rw-r--r--src/devices/machine/vrc5074.cpp7
-rw-r--r--src/devices/machine/vrc5074.h5
-rw-r--r--src/devices/machine/x2212.cpp15
-rw-r--r--src/devices/machine/x2212.h2
-rw-r--r--src/devices/sound/cdp1869.cpp8
-rw-r--r--src/devices/sound/cdp1869.h4
-rw-r--r--src/devices/sound/dave.cpp12
-rw-r--r--src/devices/sound/dave.h2
-rw-r--r--src/devices/sound/mos6560.cpp20
-rw-r--r--src/devices/sound/mos6560.h14
-rw-r--r--src/devices/sound/mos7360.cpp16
-rw-r--r--src/devices/sound/mos7360.h4
-rw-r--r--src/devices/sound/upd7752.cpp8
-rw-r--r--src/devices/sound/upd7752.h2
-rw-r--r--src/devices/sound/ymf278b.cpp2
-rw-r--r--src/devices/video/315_5124.cpp10
-rw-r--r--src/devices/video/315_5124.h2
-rw-r--r--src/devices/video/cesblit.cpp7
-rw-r--r--src/devices/video/cesblit.h2
-rw-r--r--src/devices/video/crt9007.cpp8
-rw-r--r--src/devices/video/crt9007.h2
-rw-r--r--src/devices/video/ef9345.cpp8
-rw-r--r--src/devices/video/ef9345.h2
-rw-r--r--src/devices/video/ef9364.cpp8
-rw-r--r--src/devices/video/ef9364.h2
-rw-r--r--src/devices/video/ef9365.cpp8
-rw-r--r--src/devices/video/ef9365.h2
-rw-r--r--src/devices/video/hd61830.cpp8
-rw-r--r--src/devices/video/hd61830.h2
-rw-r--r--src/devices/video/hd63484.cpp6
-rw-r--r--src/devices/video/hd63484.h6
-rw-r--r--src/devices/video/hd66421.cpp8
-rw-r--r--src/devices/video/hd66421.h2
-rw-r--r--src/devices/video/huc6271.cpp11
-rw-r--r--src/devices/video/huc6271.h2
-rw-r--r--src/devices/video/huc6272.cpp12
-rw-r--r--src/devices/video/huc6272.h2
-rw-r--r--src/devices/video/m50458.cpp8
-rw-r--r--src/devices/video/m50458.h2
-rw-r--r--src/devices/video/mb90082.cpp8
-rw-r--r--src/devices/video/mb90082.h2
-rw-r--r--src/devices/video/mb_vcu.cpp24
-rw-r--r--src/devices/video/mb_vcu.h2
-rw-r--r--src/devices/video/mc6845.cpp16
-rw-r--r--src/devices/video/mc6845.h6
-rw-r--r--src/devices/video/mos6566.cpp20
-rw-r--r--src/devices/video/mos6566.h2
-rw-r--r--src/devices/video/msm6255.cpp8
-rw-r--r--src/devices/video/msm6255.h2
-rw-r--r--src/devices/video/ppu2c0x.cpp8
-rw-r--r--src/devices/video/ppu2c0x.h2
-rw-r--r--src/devices/video/ramdac.cpp8
-rw-r--r--src/devices/video/ramdac.h4
-rw-r--r--src/devices/video/scn2674.cpp9
-rw-r--r--src/devices/video/scn2674.h2
-rw-r--r--src/devices/video/sed1330.cpp8
-rw-r--r--src/devices/video/sed1330.h4
-rw-r--r--src/devices/video/tms3556.cpp8
-rw-r--r--src/devices/video/tms3556.h2
-rw-r--r--src/devices/video/tms9928a.cpp7
-rw-r--r--src/devices/video/tms9928a.h2
-rw-r--r--src/devices/video/upd7220.cpp8
-rw-r--r--src/devices/video/upd7220.h2
-rw-r--r--src/devices/video/upd7227.cpp6
-rw-r--r--src/devices/video/upd7227.h2
-rw-r--r--src/devices/video/v9938.cpp7
-rw-r--r--src/devices/video/v9938.h2
-rw-r--r--src/emu/addrmap.cpp6
-rw-r--r--src/emu/addrmap.h8
-rw-r--r--src/emu/debug/debugcmd.cpp4
-rw-r--r--src/emu/debug/debugcpu.cpp18
-rw-r--r--src/emu/debug/debugcpu.h13
-rw-r--r--src/emu/debug/dvmemory.cpp2
-rw-r--r--src/emu/debug/dvwpoints.cpp2
-rw-r--r--src/emu/devcb.cpp4
-rw-r--r--src/emu/devcb.h4
-rw-r--r--src/emu/dimemory.cpp49
-rw-r--r--src/emu/dimemory.h32
-rw-r--r--src/emu/dirom.cpp6
-rw-r--r--src/emu/dirom.h2
-rw-r--r--src/emu/divtlb.cpp2
-rw-r--r--src/emu/divtlb.h4
-rw-r--r--src/emu/emumem.cpp15
-rw-r--r--src/emu/emumem.h29
-rw-r--r--src/emu/machine.cpp8
-rw-r--r--src/emu/machine.h2
-rw-r--r--src/frontend/mame/luaengine.cpp2
-rw-r--r--src/lib/netlist/nl_errstr.h2
-rw-r--r--src/lib/netlist/nl_setup.cpp2
-rw-r--r--src/mame/audio/atarijsa.cpp8
-rw-r--r--src/mame/audio/decobsmt.cpp4
-rw-r--r--src/mame/audio/segam1audio.cpp8
-rw-r--r--src/mame/audio/turrett.cpp6
-rw-r--r--src/mame/audio/williams.cpp4
-rw-r--r--src/mame/drivers/a5105.cpp4
-rw-r--r--src/mame/drivers/adp.cpp8
-rw-r--r--src/mame/drivers/aerofgt.cpp4
-rw-r--r--src/mame/drivers/alto2.cpp6
-rw-r--r--src/mame/drivers/apc.cpp8
-rw-r--r--src/mame/drivers/apollo.cpp4
-rw-r--r--src/mame/drivers/attckufo.cpp4
-rw-r--r--src/mame/drivers/bfcobra.cpp2
-rw-r--r--src/mame/drivers/blitz68k.cpp2
-rw-r--r--src/mame/drivers/blmbycar.cpp4
-rw-r--r--src/mame/drivers/bmcbowl.cpp2
-rw-r--r--src/mame/drivers/bmcpokr.cpp2
-rw-r--r--src/mame/drivers/bw2.cpp4
-rw-r--r--src/mame/drivers/c128.cpp14
-rw-r--r--src/mame/drivers/c64.cpp16
-rw-r--r--src/mame/drivers/cave.cpp16
-rw-r--r--src/mame/drivers/cbm2.cpp12
-rw-r--r--src/mame/drivers/chsuper.cpp2
-rw-r--r--src/mame/drivers/cischeat.cpp8
-rw-r--r--src/mame/drivers/clpoker.cpp2
-rw-r--r--src/mame/drivers/coinmvga.cpp4
-rw-r--r--src/mame/drivers/cultures.cpp4
-rw-r--r--src/mame/drivers/ddribble.cpp4
-rw-r--r--src/mame/drivers/dmv.cpp4
-rw-r--r--src/mame/drivers/dreamwld.cpp8
-rw-r--r--src/mame/drivers/dunhuang.cpp2
-rw-r--r--src/mame/drivers/expro02.cpp10
-rw-r--r--src/mame/drivers/gaelco.cpp8
-rw-r--r--src/mame/drivers/galgames.cpp9
-rw-r--r--src/mame/drivers/galpanic.cpp4
-rw-r--r--src/mame/drivers/glass.cpp4
-rw-r--r--src/mame/drivers/goldstar.cpp2
-rw-r--r--src/mame/drivers/highvdeo.cpp2
-rw-r--r--src/mame/drivers/if800.cpp4
-rw-r--r--src/mame/drivers/indiana.cpp4
-rw-r--r--src/mame/drivers/interpro.cpp18
-rw-r--r--src/mame/drivers/jailbrek.cpp4
-rw-r--r--src/mame/drivers/kaneko16.cpp12
-rw-r--r--src/mame/drivers/koftball.cpp2
-rw-r--r--src/mame/drivers/lastfght.cpp2
-rw-r--r--src/mame/drivers/lordgun.cpp4
-rw-r--r--src/mame/drivers/lwings.cpp4
-rw-r--r--src/mame/drivers/magicard.cpp2
-rw-r--r--src/mame/drivers/mediagx.cpp2
-rw-r--r--src/mame/drivers/megasys1.cpp4
-rw-r--r--src/mame/drivers/metro.cpp8
-rw-r--r--src/mame/drivers/mpu4vid.cpp4
-rw-r--r--src/mame/drivers/mquake.cpp4
-rw-r--r--src/mame/drivers/mz3500.cpp8
-rw-r--r--src/mame/drivers/mz6500.cpp4
-rw-r--r--src/mame/drivers/nemesis.cpp14
-rw-r--r--src/mame/drivers/nmk16.cpp54
-rw-r--r--src/mame/drivers/octopus.cpp4
-rw-r--r--src/mame/drivers/ohmygod.cpp4
-rw-r--r--src/mame/drivers/overdriv.cpp6
-rw-r--r--src/mame/drivers/pc9801.cpp14
-rw-r--r--src/mame/drivers/pcxt.cpp2
-rw-r--r--src/mame/drivers/pinball2k.cpp2
-rw-r--r--src/mame/drivers/pinkiri8.cpp8
-rw-r--r--src/mame/drivers/playmark.cpp16
-rw-r--r--src/mame/drivers/plus4.cpp2
-rw-r--r--src/mame/drivers/pofo.cpp4
-rw-r--r--src/mame/drivers/pokechmp.cpp4
-rw-r--r--src/mame/drivers/powerbal.cpp6
-rw-r--r--src/mame/drivers/powerins.cpp4
-rw-r--r--src/mame/drivers/psikyo.cpp4
-rw-r--r--src/mame/drivers/psikyo4.cpp4
-rw-r--r--src/mame/drivers/pt68k4.cpp4
-rw-r--r--src/mame/drivers/punchout.cpp4
-rw-r--r--src/mame/drivers/pwrview.cpp2
-rw-r--r--src/mame/drivers/qx10.cpp4
-rw-r--r--src/mame/drivers/r2dx_v33.cpp4
-rw-r--r--src/mame/drivers/rainbow.cpp4
-rw-r--r--src/mame/drivers/relief.cpp4
-rw-r--r--src/mame/drivers/rltennis.cpp2
-rw-r--r--src/mame/drivers/rockrage.cpp4
-rw-r--r--src/mame/drivers/segae.cpp8
-rw-r--r--src/mame/drivers/segajw.cpp4
-rw-r--r--src/mame/drivers/sfbonus.cpp2
-rw-r--r--src/mame/drivers/shanghai.cpp2
-rw-r--r--src/mame/drivers/sigmab52.cpp2
-rw-r--r--src/mame/drivers/skylncr.cpp4
-rw-r--r--src/mame/drivers/sliver.cpp6
-rw-r--r--src/mame/drivers/speedspn.cpp4
-rw-r--r--src/mame/drivers/subsino.cpp2
-rw-r--r--src/mame/drivers/subsino2.cpp2
-rw-r--r--src/mame/drivers/supduck.cpp4
-rw-r--r--src/mame/drivers/system16.cpp4
-rw-r--r--src/mame/drivers/taito_b.cpp2
-rw-r--r--src/mame/drivers/tandy1t.cpp2
-rw-r--r--src/mame/drivers/tandy2k.cpp4
-rw-r--r--src/mame/drivers/targeth.cpp4
-rw-r--r--src/mame/drivers/thoop2.cpp4
-rw-r--r--src/mame/drivers/toaplan2.cpp8
-rw-r--r--src/mame/drivers/trackfld.cpp6
-rw-r--r--src/mame/drivers/turrett.cpp4
-rw-r--r--src/mame/drivers/twins.cpp2
-rw-r--r--src/mame/drivers/vgmplay.cpp41
-rw-r--r--src/mame/drivers/vic10.cpp8
-rw-r--r--src/mame/drivers/vic20.cpp4
-rw-r--r--src/mame/drivers/vt240.cpp4
-rw-r--r--src/mame/drivers/wildpkr.cpp4
-rw-r--r--src/mame/drivers/wrally.cpp4
-rw-r--r--src/mame/drivers/yiear.cpp4
-rw-r--r--src/mame/drivers/yunsun16.cpp4
-rw-r--r--src/mame/etc/template_cpu.h2
-rw-r--r--src/mame/includes/turrett.h2
-rw-r--r--src/mame/machine/6883sam.h4
-rw-r--r--src/mame/machine/abc1600mac.cpp6
-rw-r--r--src/mame/machine/abc1600mac.h2
-rw-r--r--src/mame/machine/c117.cpp7
-rw-r--r--src/mame/machine/c117.h2
-rw-r--r--src/mame/machine/cammu.cpp22
-rw-r--r--src/mame/machine/cammu.h2
-rw-r--r--src/mame/machine/coco.cpp6
-rw-r--r--src/mame/machine/fd1089.cpp2
-rw-r--r--src/mame/machine/inder_vid.cpp2
-rw-r--r--src/mame/machine/interpro_ioga.cpp2
-rw-r--r--src/mame/machine/namco_c139.cpp6
-rw-r--r--src/mame/machine/namco_c139.h2
-rw-r--r--src/mame/machine/prof80mmu.cpp7
-rw-r--r--src/mame/machine/prof80mmu.h2
-rw-r--r--src/mame/machine/seicop.cpp8
-rw-r--r--src/mame/machine/seicop.h2
-rw-r--r--src/mame/machine/st0016.cpp9
-rw-r--r--src/mame/machine/st0016.h11
-rw-r--r--src/mame/video/abc1600.cpp8
-rw-r--r--src/mame/video/abc1600.h2
-rw-r--r--src/mame/video/c45.cpp6
-rw-r--r--src/mame/video/c45.h2
-rw-r--r--src/mame/video/cidelsa.cpp4
-rw-r--r--src/mame/video/comx35.cpp2
-rw-r--r--src/mame/video/gp9001.cpp6
-rw-r--r--src/mame/video/gp9001.h2
-rw-r--r--src/mame/video/igs017_igs031.cpp6
-rw-r--r--src/mame/video/igs017_igs031.h2
-rw-r--r--src/mame/video/kyocera.cpp4
-rw-r--r--src/mame/video/mikromik.cpp4
-rw-r--r--src/mame/video/nick.cpp8
-rw-r--r--src/mame/video/nick.h2
-rw-r--r--src/mame/video/pc8401a.cpp4
-rw-r--r--src/mame/video/pc_t1t.cpp8
-rw-r--r--src/mame/video/pcd.cpp4
-rw-r--r--src/mame/video/pecom.cpp2
-rw-r--r--src/mame/video/seibu_crtc.cpp8
-rw-r--r--src/mame/video/seibu_crtc.h2
-rw-r--r--src/mame/video/tmc600.cpp2
-rw-r--r--src/mame/video/zx8301.cpp8
-rw-r--r--src/mame/video/zx8301.h2
-rw-r--r--src/osd/modules/debugger/osx/deviceinfoviewer.mm2
-rw-r--r--src/osd/modules/debugger/qt/deviceinformationwindow.cpp2
563 files changed, 2369 insertions, 1678 deletions
diff --git a/docs/source/techspecs/device_memory_interface.rst b/docs/source/techspecs/device_memory_interface.rst
index 857bfa987a5..d38faf8c996 100644
--- a/docs/source/techspecs/device_memory_interface.rst
+++ b/docs/source/techspecs/device_memory_interface.rst
@@ -9,40 +9,57 @@ creating address spaces, to which address maps can be associated.
It's used for any device that provides a (logically) address/data bus
other devices can be connected to. It's mainly, but not only, cpus.
-The interface allows for up to four address spaces, numbered 0-3, with
-symbolic names associated to them in emumem.h for historical reasons.
-
-+------------+-------------+---------------+
-| Numeric ID | Symbolic ID | Symbolic name |
-+============+=============+===============+
-| 0 | AS_0 | AS_PROGRAM |
-+------------+-------------+---------------+
-| 1 | AS_1 | AS_DATA |
-+------------+-------------+---------------+
-| 2 | AS_2 | AS_IO |
-+------------+-------------+---------------+
-| 3 | AS_3 | AS_OPCODES |
-+------------+-------------+---------------+
+The interface allows for an unlimited set of address spaces, numbered
+with small positive values. The IDs should stay small because they
+index vectors to keep the lookup fast. Spaces number 0-3 have an
+associated constant name:
+
++----+---------------+
+| ID | Name |
++====+===============+
+| 0 | AS_PROGRAM |
++----+---------------+
+| 1 | AS_DATA |
++----+---------------+
+| 2 | AS_IO |
++----+---------------+
+| 3 | AS_OPCODES |
++----+---------------+
+
+Spaces 0 and 3, e.g. AS_PROGRAM and AS_OPCODE, are special for the
+debugger and some CPUs. AS_PROGRAM is use by the debugger and the
+cpus as the space from with the cpu reads its instructions for the
+disassembler. When present, AS_OPCODE is used by the debugger and
+some cpus to read the opcode part of the instruction. What opcode
+means is device-dependant, for instance for the z80 it's the initial
+byte(s) which are read with the M1 signal asserted. For the 68000 is
+means every instruction word plus the PC-relative accesses. The main,
+but not only, use of AS_OPCODE is to implement hardware decrypting
+instructions separately from the data.
2. Setup
--------
-| const address_space_config *\ **memory_space_config**\ (address_spacenum spacenum) const
+| std::vector<std::pair<int, const address_space_config *>>\ **memory_space_config**\ (int spacenum) const
+
+The device must override that method to provide a vector of pairs
+comprising of a space number and its associated
+**address_space_config** describing its configuration. Some examples
+to look up when needed:
+* Standard two-space vector: v60_device
+* Conditional AS_OPCODE: z80_device
+* Inherit config and add a space: m6801_device
+* Inherit config and patch a space: tmpz84c011_device
-The device must override that method to provide, for each of the four
-address spaces, either an **address_space_config** describing the
-space's configucation or **nullptr** if the space is not to be
-created.
| bool **has_configured_map**\ () const
| bool **has_configured_map**\ (int index) const
-| bool **has_configured_map**\ (address_spacenum index) const
The **has_configured_map** method allows to test in the
**memory_space_config** method whether an **address_map** has been
associated with a given space. That allows to implement optional
memory spaces, such as AS_OPCODES in certain cpu cores. The
-parameterless version tests for AS_PROGRAM/AS_0.
+parameterless version tests for space 0.
3. Associating maps to spaces
-----------------------------
@@ -71,29 +88,28 @@ derivative.
| address_space &\ **space**\ () const
| address_space &\ **space**\ (int index) const
-| address_space &\ **space**\ (address_spacenum index) const
Returns a given address space post-initialization. The parameterless
version tests for AS_PROGRAM/AS_0. Aborts if the space doesn't exist.
| bool **has_space**\ () const
| bool **has_space**\ (int index) const
-| bool **has_space**\ (address_spacenum index) const
Indicates whether a given space actually exists. The parameterless
version tests for AS_PROGRAM/AS_0.
-5. Weird/to deprecate stuff
----------------------------
+5. MMU support for disassembler
+-------------------------------
-| bool **translate**\ (address_spacenum spacenum, int intention, offs_t &address)
-| bool **read**\ (address_spacenum spacenum, offs_t offset, int size, UINT64 &value)
-| bool **write**\ (address_spacenum spacenum, offs_t offset, int size, UINT64 value)
-| bool **readop**\ (offs_t offset, int size, UINT64 &value)
+| bool **translate**\ (int spacenum, int intention, offs_t &address)
-These methods override how the debugger accesses memory for a cpu.
-Avoid them if you can. Otherwise, prepare for heavy-duty spelunking in
-complicated code.
+Does a logical to physical address translation through the device's
+MMU. spacenum gives the space number, intention the type of the
+future access (TRANSLATE_(READ|WRITE|FETCH)(|_USER|_DEBUG)) and
+address is an inout parameter with the address to translate and its
+translated version. Should return true if the translation went
+correctly, false if the address is unmapped.
-If really required, should probably be part of cpu_device directly.
+Note that for some historical reason the device itself must override
+the virtual method **memory_translate** with the same signature.
diff --git a/src/devices/bus/cbm2/hrg.cpp b/src/devices/bus/cbm2/hrg.cpp
index dacb75cbaa5..0439759d928 100644
--- a/src/devices/bus/cbm2/hrg.cpp
+++ b/src/devices/bus/cbm2/hrg.cpp
@@ -66,7 +66,7 @@ const tiny_rom_entry *cbm2_hrg_device::device_rom_region() const
// ADDRESS_MAP( hrg_a_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( hrg_a_map, AS_0, 8, cbm2_hrg_a_device )
+static ADDRESS_MAP_START( hrg_a_map, 0, 8, cbm2_hrg_a_device )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x7fff) AM_RAM
ADDRESS_MAP_END
@@ -76,7 +76,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( hrg_b_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( hrg_b_map, AS_0, 8, cbm2_hrg_b_device )
+static ADDRESS_MAP_START( hrg_b_map, 0, 8, cbm2_hrg_b_device )
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
AM_RANGE(0x0000, 0x3fff) AM_RAM
ADDRESS_MAP_END
@@ -96,7 +96,7 @@ MACHINE_CONFIG_MEMBER( cbm2_hrg_a_device::device_add_mconfig )
MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, hrg_a_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, hrg_a_map)
MCFG_EF936X_PALETTE("palette")
MCFG_EF936X_BITPLANES_CNT(1);
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x512);
@@ -112,7 +112,7 @@ MACHINE_CONFIG_MEMBER( cbm2_hrg_b_device::device_add_mconfig )
MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, hrg_b_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, hrg_b_map)
MCFG_EF936X_PALETTE("palette")
MCFG_EF936X_BITPLANES_CNT(1);
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x256);
diff --git a/src/devices/bus/compis/hrg.cpp b/src/devices/bus/compis/hrg.cpp
index a28deba73d1..bdfe930dc5c 100644
--- a/src/devices/bus/compis/hrg.cpp
+++ b/src/devices/bus/compis/hrg.cpp
@@ -32,12 +32,12 @@ DEFINE_DEVICE_TYPE(COMPIS_UHRG, compis_uhrg_device, "compis_uhrg", "Compis UHRG"
// ADDRESS_MAP( upd7220_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( hrg_map, AS_0, 16, compis_hrg_device )
+static ADDRESS_MAP_START( hrg_map, 0, 16, compis_hrg_device )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x00000, 0x7fff) AM_RAM AM_SHARE("video_ram")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( uhrg_map, AS_0, 16, compis_uhrg_device )
+static ADDRESS_MAP_START( uhrg_map, 0, 16, compis_uhrg_device )
ADDRESS_MAP_GLOBAL_MASK(0x1ffff)
AM_RANGE(0x00000, 0x1ffff) AM_RAM AM_SHARE("video_ram")
ADDRESS_MAP_END
@@ -85,7 +85,7 @@ MACHINE_CONFIG_MEMBER( compis_hrg_device::device_add_mconfig )
MCFG_SCREEN_UPDATE_DEVICE(UPD7220_TAG, upd7220_device, screen_update)
MCFG_DEVICE_ADD(UPD7220_TAG, UPD7220, 2252500) // unknown clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, hrg_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, hrg_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(compis_hrg_device, display_pixels)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
@@ -103,7 +103,7 @@ MACHINE_CONFIG_MEMBER( compis_uhrg_device::device_add_mconfig )
MCFG_SCREEN_UPDATE_DEVICE(UPD7220_TAG, upd7220_device, screen_update)
MCFG_DEVICE_ADD(UPD7220_TAG, UPD7220, 2252500*2) // unknown clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, uhrg_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, uhrg_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(compis_uhrg_device, display_pixels)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
diff --git a/src/devices/bus/hp_dio/hp_dio.h b/src/devices/bus/hp_dio/hp_dio.h
index 1c3c1fc6b7b..483815ab4bb 100644
--- a/src/devices/bus/hp_dio/hp_dio.h
+++ b/src/devices/bus/hp_dio/hp_dio.h
@@ -113,7 +113,7 @@ public:
protected:
dio16_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
- void install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
+ void install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/bus/isa/isa.cpp b/src/devices/bus/isa/isa.cpp
index 263d4452f98..740df102b8f 100644
--- a/src/devices/bus/isa/isa.cpp
+++ b/src/devices/bus/isa/isa.cpp
@@ -129,13 +129,13 @@ isa8_device::isa8_device(const machine_config &mconfig, const char *tag, device_
isa8_device::isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock) :
device_t(mconfig, type, tag, owner, clock),
device_memory_interface(mconfig, *this),
- m_program_config("ISA 8-bit program", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
+ m_mem_config("ISA 8-bit mem", ENDIANNESS_LITTLE, 8, 24, 0, nullptr),
m_io_config("ISA 8-bit I/O", ENDIANNESS_LITTLE, 8, 16, 0, nullptr),
- m_program16_config("ISA 16-bit program", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
+ m_mem16_config("ISA 16-bit mem", ENDIANNESS_LITTLE, 16, 24, 0, nullptr),
m_io16_config("ISA 16-bit I/O", ENDIANNESS_LITTLE, 16, 16, 0, nullptr),
m_maincpu(nullptr),
m_iospace(nullptr),
- m_prgspace(nullptr),
+ m_memspace(nullptr),
m_out_irq2_cb(*this),
m_out_irq3_cb(*this),
m_out_irq4_cb(*this),
@@ -153,18 +153,38 @@ isa8_device::isa8_device(const machine_config &mconfig, device_type type, const
m_dma_eop[i] = false;
}
m_nmi_enabled = false;
- m_iowidth = m_prgwidth = 0;
+ m_iowidth = m_memwidth = 0;
m_allocspaces = false;
}
-READ8_MEMBER(isa8_device::prog_r)
+std::vector<std::pair<int, const address_space_config *>> isa8_device::memory_space_config() const
{
- return m_prgspace->read_byte(offset);
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_ISA_MEM, &m_mem_config),
+ std::make_pair(AS_ISA_IO, &m_io_config),
+ std::make_pair(AS_ISA_MEMALT, &m_mem16_config),
+ std::make_pair(AS_ISA_IOALT, &m_io16_config)
+ };
}
-WRITE8_MEMBER(isa8_device::prog_w)
+std::vector<std::pair<int, const address_space_config *>> isa16_device::memory_space_config() const
{
- m_prgspace->write_byte(offset, data);
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_ISA_MEM, &m_mem16_config),
+ std::make_pair(AS_ISA_IO, &m_io16_config),
+ std::make_pair(AS_ISA_MEMALT, &m_mem_config),
+ std::make_pair(AS_ISA_IOALT, &m_io_config)
+ };
+}
+
+READ8_MEMBER(isa8_device::mem_r)
+{
+ return m_memspace->read_byte(offset);
+}
+
+WRITE8_MEMBER(isa8_device::mem_w)
+{
+ m_memspace->write_byte(offset, data);
}
READ8_MEMBER(isa8_device::io_r)
@@ -206,17 +226,17 @@ void isa8_device::device_start()
if (m_allocspaces)
{
- m_iospace = &space(AS_IO);
- m_prgspace = &space(AS_PROGRAM);
+ m_iospace = &space(AS_ISA_IO);
+ m_memspace = &space(AS_ISA_MEM);
m_iowidth = m_iospace->data_width();
- m_prgwidth = m_prgspace->data_width();
+ m_memwidth = m_memspace->data_width();
}
else // use host CPU's program and I/O spaces directly
{
m_iospace = &m_maincpu->space(AS_IO);
m_iowidth = m_maincpu->space_config(AS_IO)->m_databus_width;
- m_prgspace = &m_maincpu->space(AS_PROGRAM);
- m_prgwidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
+ m_memspace = &m_maincpu->space(AS_PROGRAM);
+ m_memwidth = m_maincpu->space_config(AS_PROGRAM)->m_databus_width;
}
}
@@ -229,20 +249,20 @@ void isa8_device::device_reset()
}
-void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
+void isa8_device::install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
{
int buswidth;
address_space *space;
- if (spacenum == AS_IO)
+ if (spacenum == AS_ISA_IO)
{
space = m_iospace;
buswidth = m_iowidth;
}
- else if (spacenum == AS_PROGRAM)
+ else if (spacenum == AS_ISA_MEM)
{
- space = m_prgspace;
- buswidth = m_prgwidth;
+ space = m_memspace;
+ buswidth = m_memwidth;
}
else
{
@@ -277,24 +297,24 @@ void isa8_device::install_space(address_spacenum spacenum, offs_t start, offs_t
void isa8_device::install_memory(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
{
- install_space(AS_PROGRAM, start, end, rhandler, whandler);
+ install_space(AS_ISA_MEM, start, end, rhandler, whandler);
}
void isa8_device::install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler)
{
- install_space(AS_IO, start, end, rhandler, whandler);
+ install_space(AS_ISA_IO, start, end, rhandler, whandler);
}
void isa8_device::install_bank(offs_t start, offs_t end, const char *tag, uint8_t *data)
{
- m_prgspace->install_readwrite_bank(start, end, 0, tag );
- machine().root_device().membank(m_prgspace->device().siblingtag(tag).c_str())->set_base(data);
+ m_memspace->install_readwrite_bank(start, end, 0, tag );
+ machine().root_device().membank(m_memspace->device().siblingtag(tag).c_str())->set_base(data);
}
void isa8_device::unmap_bank(offs_t start, offs_t end)
{
- m_prgspace->unmap_readwrite(start, end);
+ m_memspace->unmap_readwrite(start, end);
}
void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, const char *tag, const char *region)
@@ -304,22 +324,22 @@ void isa8_device::install_rom(device_t *dev, offs_t start, offs_t end, const cha
uint8_t *dest = machine().root_device().memregion("isa")->base() + start - 0xc0000;
memcpy(dest,src, end - start + 1);
} else {
- m_prgspace->install_read_bank(start, end, 0, tag);
- m_prgspace->unmap_write(start, end);
- machine().root_device().membank(m_prgspace->device().siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
+ m_memspace->install_read_bank(start, end, 0, tag);
+ m_memspace->unmap_write(start, end);
+ machine().root_device().membank(m_memspace->device().siblingtag(tag).c_str())->set_base(machine().root_device().memregion(dev->subtag(region).c_str())->base());
}
}
void isa8_device::unmap_rom(offs_t start, offs_t end)
{
- m_prgspace->unmap_read(start, end);
+ m_memspace->unmap_read(start, end);
}
bool isa8_device::is_option_rom_space_available(offs_t start, int size)
{
m_maincpu = machine().device<cpu_device>(m_cputag);
for(int i = 0; i < size; i += 4096) // 4KB granularity should be enough
- if(m_prgspace->get_read_ptr(start + i)) return false;
+ if(m_memspace->get_read_ptr(start + i)) return false;
return true;
}
@@ -465,7 +485,7 @@ void isa16_device::device_start()
void isa16_device::install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler)
{
- int buswidth = m_prgwidth;
+ int buswidth = m_memwidth;
switch(buswidth)
{
case 16:
@@ -490,14 +510,14 @@ void isa16_device::install16_device(offs_t start, offs_t end, read16_delegate rh
}
}
-READ16_MEMBER(isa16_device::prog16_r)
+READ16_MEMBER(isa16_device::mem16_r)
{
- return m_prgspace->read_word(offset<<1, mem_mask);
+ return m_memspace->read_word(offset<<1, mem_mask);
}
-WRITE16_MEMBER(isa16_device::prog16_w)
+WRITE16_MEMBER(isa16_device::mem16_w)
{
- m_prgspace->write_word(offset<<1, data, mem_mask);
+ m_memspace->write_word(offset<<1, data, mem_mask);
}
READ16_MEMBER(isa16_device::io16_r)
@@ -510,21 +530,21 @@ WRITE16_MEMBER(isa16_device::io16_w)
m_iospace->write_word(offset<<1, data, mem_mask);
}
-READ16_MEMBER(isa16_device::prog16_swap_r)
+READ16_MEMBER(isa16_device::mem16_swap_r)
{
uint16_t rv;
mem_mask = (mem_mask<<8) | (mem_mask>>8);
- rv = m_prgspace->read_word(offset<<1, mem_mask);
+ rv = m_memspace->read_word(offset<<1, mem_mask);
return (rv<<8) | (rv>>8);
}
-WRITE16_MEMBER(isa16_device::prog16_swap_w)
+WRITE16_MEMBER(isa16_device::mem16_swap_w)
{
mem_mask = (mem_mask<<8) | (mem_mask>>8);
data = (data<<8) | (data>>8);
- m_prgspace->write_word(offset<<1, data, mem_mask);
+ m_memspace->write_word(offset<<1, data, mem_mask);
}
READ16_MEMBER(isa16_device::io16_swap_r)
diff --git a/src/devices/bus/isa/isa.h b/src/devices/bus/isa/isa.h
index 36e949fc76f..d1f45c81d98 100644
--- a/src/devices/bus/isa/isa.h
+++ b/src/devices/bus/isa/isa.h
@@ -186,6 +186,11 @@ class isa8_device : public device_t,
public device_memory_interface
{
public:
+ static constexpr int AS_ISA_MEM = 0;
+ static constexpr int AS_ISA_IO = 1;
+ static constexpr int AS_ISA_MEMALT = 2;
+ static constexpr int AS_ISA_IOALT = 3;
+
// construction/destruction
isa8_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// inline configuration
@@ -203,17 +208,7 @@ public:
template <class Object> static devcb_base &set_out_drq3_callback(device_t &device, Object &&cb) { return downcast<isa8_device &>(device).m_out_drq3_cb.set_callback(std::forward<Object>(cb)); }
// for ISA8, put the 8-bit configs in the primary slots and the 16-bit configs in the secondary
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_DATA: return &m_program16_config;
- case AS_3: return &m_io16_config;
- default: fatalerror("isa: invalid memory space!\n");
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
void install_device(offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
template<typename T> void install_device(offs_t addrstart, offs_t addrend, T &device, void (T::*map)(class address_map &map), int bits = 8)
@@ -244,8 +239,8 @@ public:
DECLARE_WRITE_LINE_MEMBER( drq3_w );
// 8 bit accessors for ISA-defined address spaces
- DECLARE_READ8_MEMBER(prog_r);
- DECLARE_WRITE8_MEMBER(prog_w);
+ DECLARE_READ8_MEMBER(mem_r);
+ DECLARE_WRITE8_MEMBER(mem_w);
DECLARE_READ8_MEMBER(io_r);
DECLARE_WRITE8_MEMBER(io_w);
@@ -258,12 +253,12 @@ public:
virtual void set_dma_channel(uint8_t channel, device_isa8_card_interface *dev, bool do_eop);
- const address_space_config m_program_config, m_io_config, m_program16_config, m_io16_config;
+ const address_space_config m_mem_config, m_io_config, m_mem16_config, m_io16_config;
protected:
isa8_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
- void install_space(address_spacenum spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
+ void install_space(int spacenum, offs_t start, offs_t end, read8_delegate rhandler, write8_delegate whandler);
// device-level overrides
virtual void device_start() override;
@@ -273,8 +268,8 @@ protected:
cpu_device *m_maincpu;
// address spaces
- address_space *m_iospace, *m_prgspace;
- int m_iowidth, m_prgwidth;
+ address_space *m_iospace, *m_memspace;
+ int m_iowidth, m_memwidth;
bool m_allocspaces;
devcb_write_line m_out_irq2_cb;
@@ -370,17 +365,7 @@ public:
void install16_device(offs_t start, offs_t end, read16_delegate rhandler, write16_delegate whandler);
// for ISA16, put the 16-bit configs in the primary slots and the 8-bit configs in the secondary
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program16_config;
- case AS_IO: return &m_io16_config;
- case AS_DATA: return &m_program_config;
- case AS_3: return &m_io_config;
- default: fatalerror("isa: invalid memory space!\n");
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
DECLARE_WRITE_LINE_MEMBER( irq10_w );
DECLARE_WRITE_LINE_MEMBER( irq11_w );
@@ -397,13 +382,13 @@ public:
void dack16_w(int line,uint16_t data);
// 16 bit accessors for ISA-defined address spaces
- DECLARE_READ16_MEMBER(prog16_r);
- DECLARE_WRITE16_MEMBER(prog16_w);
+ DECLARE_READ16_MEMBER(mem16_r);
+ DECLARE_WRITE16_MEMBER(mem16_w);
DECLARE_READ16_MEMBER(io16_r);
DECLARE_WRITE16_MEMBER(io16_w);
// byte-swapped versions of 16-bit accessors
- DECLARE_READ16_MEMBER(prog16_swap_r);
- DECLARE_WRITE16_MEMBER(prog16_swap_w);
+ DECLARE_READ16_MEMBER(mem16_swap_r);
+ DECLARE_WRITE16_MEMBER(mem16_swap_w);
DECLARE_READ16_MEMBER(io16_swap_r);
DECLARE_WRITE16_MEMBER(io16_swap_w);
diff --git a/src/devices/bus/isa/num9rev.cpp b/src/devices/bus/isa/num9rev.cpp
index 61176c4a7ec..3cb8078c864 100644
--- a/src/devices/bus/isa/num9rev.cpp
+++ b/src/devices/bus/isa/num9rev.cpp
@@ -14,7 +14,7 @@
DEFINE_DEVICE_TYPE(ISA8_NUM_9_REV, isa8_number_9_rev_device, "number_9_rev", "Number Nine Revolution 512x32/1024x8")
-static ADDRESS_MAP_START( upd7220_map, AS_0, 16, isa8_number_9_rev_device )
+static ADDRESS_MAP_START( upd7220_map, 0, 16, isa8_number_9_rev_device )
AM_RANGE(0x00000, 0x3ffff) AM_NOP
ADDRESS_MAP_END
@@ -61,7 +61,7 @@ MACHINE_CONFIG_MEMBER( isa8_number_9_rev_device::device_add_mconfig )
MCFG_PALETTE_ADD("palette", 4096)
MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_4_433619MHz/2) // unknown clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(isa8_number_9_rev_device, hgdc_display_pixels)
MCFG_VIDEO_SET_SCREEN("screen")
MACHINE_CONFIG_END
diff --git a/src/devices/bus/msx_cart/konami.cpp b/src/devices/bus/msx_cart/konami.cpp
index a6606333767..46633807d9c 100644
--- a/src/devices/bus/msx_cart/konami.cpp
+++ b/src/devices/bus/msx_cart/konami.cpp
@@ -866,7 +866,7 @@ msx_cart_keyboard_master_device::msx_cart_keyboard_master_device(const machine_c
}
-static ADDRESS_MAP_START( vlm_map, AS_0, 8, msx_cart_keyboard_master_device )
+static ADDRESS_MAP_START( vlm_map, 0, 8, msx_cart_keyboard_master_device )
AM_RANGE(0x0000, 0xffff) AM_READ(read_vlm)
ADDRESS_MAP_END
@@ -876,7 +876,7 @@ MACHINE_CONFIG_MEMBER( msx_cart_keyboard_master_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_SOUND_ADD("vlm5030", VLM5030, XTAL_3_579545MHz)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.40)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vlm_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vlm_map)
MACHINE_CONFIG_END
diff --git a/src/devices/bus/msx_cart/moonsound.cpp b/src/devices/bus/msx_cart/moonsound.cpp
index ddcd072e281..6debc9e5e84 100644
--- a/src/devices/bus/msx_cart/moonsound.cpp
+++ b/src/devices/bus/msx_cart/moonsound.cpp
@@ -29,7 +29,7 @@ msx_cart_moonsound_device::msx_cart_moonsound_device(const machine_config &mconf
}
-static ADDRESS_MAP_START( ymf278b_map, AS_0, 8, msx_cart_moonsound_device )
+static ADDRESS_MAP_START( ymf278b_map, 0, 8, msx_cart_moonsound_device )
AM_RANGE(0x000000, 0x1fffff) AM_ROM
AM_RANGE(0x200000, 0x3fffff) AM_RAM // 2MB sram for testing
ADDRESS_MAP_END
@@ -39,7 +39,7 @@ MACHINE_CONFIG_MEMBER( msx_cart_moonsound_device::device_add_mconfig )
// The moonsound cartridge has a separate stereo output.
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_SOUND_ADD("ymf278b", YMF278B, YMF278B_STD_CLOCK)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, ymf278b_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, ymf278b_map)
MCFG_YMF278B_IRQ_HANDLER(WRITELINE(msx_cart_moonsound_device, irq_w))
MCFG_SOUND_ROUTE(0, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(1, "rspeaker", 0.50)
diff --git a/src/devices/bus/pet/hsg.cpp b/src/devices/bus/pet/hsg.cpp
index c77246dc65b..a12e9adec0c 100644
--- a/src/devices/bus/pet/hsg.cpp
+++ b/src/devices/bus/pet/hsg.cpp
@@ -69,7 +69,7 @@ const tiny_rom_entry *cbm8000_hsg_device::device_rom_region() const
// ADDRESS_MAP( hsg_a_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( hsg_a_map, AS_0, 8, cbm8000_hsg_a_device )
+static ADDRESS_MAP_START( hsg_a_map, 0, 8, cbm8000_hsg_a_device )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x7fff) AM_RAM
ADDRESS_MAP_END
@@ -79,7 +79,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( hsg_b_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( hsg_b_map, AS_0, 8, cbm8000_hsg_b_device )
+static ADDRESS_MAP_START( hsg_b_map, 0, 8, cbm8000_hsg_b_device )
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
AM_RANGE(0x0000, 0x3fff) AM_RAM
ADDRESS_MAP_END
@@ -99,7 +99,7 @@ MACHINE_CONFIG_MEMBER( cbm8000_hsg_a_device::device_add_mconfig )
MCFG_DEVICE_ADD(EF9365_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, hsg_a_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, hsg_a_map)
MCFG_EF936X_PALETTE("palette")
MCFG_EF936X_BITPLANES_CNT(1);
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x512);
@@ -115,7 +115,7 @@ MACHINE_CONFIG_MEMBER( cbm8000_hsg_b_device::device_add_mconfig )
MCFG_DEVICE_ADD(EF9366_TAG, EF9365, 1750000)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, hsg_b_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, hsg_b_map)
MCFG_EF936X_PALETTE("palette")
MCFG_EF936X_BITPLANES_CNT(1);
MCFG_EF936X_DISPLAYMODE(DISPLAY_MODE_512x256);
diff --git a/src/devices/bus/vme/vme.cpp b/src/devices/bus/vme/vme.cpp
index d397d45789f..7c79fc99cf3 100644
--- a/src/devices/bus/vme/vme.cpp
+++ b/src/devices/bus/vme/vme.cpp
@@ -205,6 +205,13 @@ SLOT_INTERFACE_END
DEFINE_DEVICE_TYPE(VME, vme_device, "vme", "VME bus")
+std::vector<std::pair<int, const address_space_config *>> vme_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_a32_config)
+ };
+}
+
// static_set_cputag - used to be able to lookup the CPU owning this VME bus
void vme_device::static_set_cputag(device_t &device, const char *tag)
{
diff --git a/src/devices/bus/vme/vme.h b/src/devices/bus/vme/vme.h
index ed4bd7efd5f..0352bc8c2f9 100644
--- a/src/devices/bus/vme/vme.h
+++ b/src/devices/bus/vme/vme.h
@@ -142,14 +142,8 @@ public:
static void static_set_cputag(device_t &device, const char *tag);
static void static_use_owner_spaces(device_t &device);
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_a32_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+
const address_space_config m_a32_config;
void add_vme_card(device_vme_card_interface *card);
diff --git a/src/devices/bus/wangpc/tig.cpp b/src/devices/bus/wangpc/tig.cpp
index 94c84cfa8e1..d1549eeb15d 100644
--- a/src/devices/bus/wangpc/tig.cpp
+++ b/src/devices/bus/wangpc/tig.cpp
@@ -83,7 +83,7 @@ const tiny_rom_entry *wangpc_tig_device::device_rom_region() const
// UPD7220_INTERFACE( hgdc0_intf )
//-------------------------------------------------
-static ADDRESS_MAP_START( upd7220_0_map, AS_0, 16, wangpc_tig_device )
+static ADDRESS_MAP_START( upd7220_0_map, 0, 16, wangpc_tig_device )
ADDRESS_MAP_GLOBAL_MASK(0x7fff)
AM_RANGE(0x0000, 0x0fff) AM_MIRROR(0x1000) AM_RAM // frame buffer
AM_RANGE(0x4000, 0x7fff) AM_RAM // font memory
@@ -98,7 +98,7 @@ UPD7220_DRAW_TEXT_LINE_MEMBER( wangpc_tig_device::hgdc_draw_text )
// UPD7220_INTERFACE( hgdc1_intf )
//-------------------------------------------------
-static ADDRESS_MAP_START( upd7220_1_map, AS_0, 16, wangpc_tig_device )
+static ADDRESS_MAP_START( upd7220_1_map, 0, 16, wangpc_tig_device )
ADDRESS_MAP_GLOBAL_MASK(0xffff)
AM_RANGE(0x0000, 0xffff) AM_RAM // graphics memory
ADDRESS_MAP_END
@@ -123,12 +123,12 @@ MACHINE_CONFIG_MEMBER( wangpc_tig_device::device_add_mconfig )
MCFG_PALETTE_ADD_MONOCHROME_HIGHLIGHT("palette")
MCFG_DEVICE_ADD(UPD7720_0_TAG, UPD7220, XTAL_52_832MHz/28)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_0_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_0_map)
MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(wangpc_tig_device, hgdc_draw_text)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MCFG_DEVICE_ADD(UPD7720_1_TAG, UPD7220, XTAL_52_832MHz/28)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_1_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(wangpc_tig_device, hgdc_display_pixels)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MACHINE_CONFIG_END
diff --git a/src/devices/cpu/8x300/8x300.cpp b/src/devices/cpu/8x300/8x300.cpp
index c3929144aa3..63259adb8ae 100644
--- a/src/devices/cpu/8x300/8x300.cpp
+++ b/src/devices/cpu/8x300/8x300.cpp
@@ -47,6 +47,14 @@ n8x300_cpu_device::n8x300_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> n8x300_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
void n8x300_cpu_device::set_reg(uint8_t reg, uint8_t val)
{
switch(reg)
diff --git a/src/devices/cpu/8x300/8x300.h b/src/devices/cpu/8x300/8x300.h
index 532fc58a6c1..86910fdccca 100644
--- a/src/devices/cpu/8x300/8x300.h
+++ b/src/devices/cpu/8x300/8x300.h
@@ -60,15 +60,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/adsp2100/adsp2100.cpp b/src/devices/cpu/adsp2100/adsp2100.cpp
index a3c7f26abdb..c9a049991b7 100644
--- a/src/devices/cpu/adsp2100/adsp2100.cpp
+++ b/src/devices/cpu/adsp2100/adsp2100.cpp
@@ -649,26 +649,29 @@ void adsp21xx_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *adsp2100_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> adsp2100_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_DATA) ? &m_data_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
}
-const address_space_config *adsp2101_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> adsp2101_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_DATA) ? &m_data_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
}
-const address_space_config *adsp2181_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> adsp2181_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_DATA) ? &m_data_config :
- (spacenum == AS_IO) ? &m_io_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
diff --git a/src/devices/cpu/adsp2100/adsp2100.h b/src/devices/cpu/adsp2100/adsp2100.h
index 661879a576b..df8bb9f1bc8 100644
--- a/src/devices/cpu/adsp2100/adsp2100.h
+++ b/src/devices/cpu/adsp2100/adsp2100.h
@@ -494,7 +494,7 @@ protected:
virtual uint32_t execute_input_lines() const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// interrupts
virtual bool generate_irq(int which, int indx) override;
@@ -517,7 +517,7 @@ protected:
virtual uint32_t execute_input_lines() const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// interrupts
virtual bool generate_irq(int which, int indx) override;
@@ -538,7 +538,7 @@ protected:
virtual uint32_t execute_input_lines() const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// interrupts
virtual bool generate_irq(int which, int indx) override;
diff --git a/src/devices/cpu/alph8201/alph8201.cpp b/src/devices/cpu/alph8201/alph8201.cpp
index ea7bf566657..2a0e76ddbe4 100644
--- a/src/devices/cpu/alph8201/alph8201.cpp
+++ b/src/devices/cpu/alph8201/alph8201.cpp
@@ -203,6 +203,13 @@ alpha8301_cpu_device::alpha8301_cpu_device(const machine_config &mconfig, const
{
}
+std::vector<std::pair<int, const address_space_config *>> alpha8201_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
/* Get next opcode argument and increment program counter */
unsigned alpha8201_cpu_device::M_RDMEM_OPCODE()
diff --git a/src/devices/cpu/alph8201/alph8201.h b/src/devices/cpu/alph8201/alph8201.h
index e5c3151d341..b355c6f514b 100644
--- a/src/devices/cpu/alph8201/alph8201.h
+++ b/src/devices/cpu/alph8201/alph8201.h
@@ -75,7 +75,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/alto2/alto2cpu.cpp b/src/devices/cpu/alto2/alto2cpu.cpp
index ad6fae3c282..b6ea55047e4 100644
--- a/src/devices/cpu/alto2/alto2cpu.cpp
+++ b/src/devices/cpu/alto2/alto2cpu.cpp
@@ -794,15 +794,13 @@ static const prom_load_t pl_madr_a91 =
// device_memory_interface overrides
//-------------------------------------------------
-const address_space_config*alto2_cpu_device::memory_space_config(address_spacenum spacenum) const
-{
- if (AS_0 == spacenum)
- return &m_ucode_config;
- if (AS_1 == spacenum)
- return &m_const_config;
- if (AS_2 == spacenum)
- return &m_iomem_config;
- return nullptr;
+std::vector<std::pair<int, const address_space_config *>> alto2_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_ucode_config),
+ std::make_pair(1, &m_const_config),
+ std::make_pair(2, &m_iomem_config)
+ };
}
//-------------------------------------------------
@@ -812,7 +810,7 @@ const address_space_config*alto2_cpu_device::memory_space_config(address_spacenu
void alto2_cpu_device::device_start()
{
// get a pointer to the IO address space
- m_iomem = &space(AS_2);
+ m_iomem = &space(2);
// Decode 2 pages of micro code PROMs to CROM
// If m_cram_config == 1 or 3, only the first page will be used
diff --git a/src/devices/cpu/alto2/alto2cpu.h b/src/devices/cpu/alto2/alto2cpu.h
index 440a8f972ba..04d37363ec4 100644
--- a/src/devices/cpu/alto2/alto2cpu.h
+++ b/src/devices/cpu/alto2/alto2cpu.h
@@ -230,7 +230,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
//! device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
//! device (P)ROMs
virtual const tiny_rom_entry *device_rom_region() const override;
diff --git a/src/devices/cpu/am29000/am29000.cpp b/src/devices/cpu/am29000/am29000.cpp
index 691b23edfb3..d3826de0c17 100644
--- a/src/devices/cpu/am29000/am29000.cpp
+++ b/src/devices/cpu/am29000/am29000.cpp
@@ -118,6 +118,14 @@ am29000_cpu_device::am29000_cpu_device(const machine_config &mconfig, const char
m_next_pc = 0;
}
+std::vector<std::pair<int, const address_space_config *>> am29000_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
void am29000_cpu_device::device_start()
{
diff --git a/src/devices/cpu/am29000/am29000.h b/src/devices/cpu/am29000/am29000.h
index 16b8ebccd67..4a58d5d4adb 100644
--- a/src/devices/cpu/am29000/am29000.h
+++ b/src/devices/cpu/am29000/am29000.h
@@ -451,16 +451,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_DATA: return &m_data_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/amis2000/amis2000.cpp b/src/devices/cpu/amis2000/amis2000.cpp
index e1bdc09970e..16f490d2453 100644
--- a/src/devices/cpu/amis2000/amis2000.cpp
+++ b/src/devices/cpu/amis2000/amis2000.cpp
@@ -68,6 +68,14 @@ amis2152_cpu_device::amis2152_cpu_device(const machine_config &mconfig, const ch
: amis2000_base_device(mconfig, AMI_S2152, tag, owner, clock, 3, 11, 3, 13, ADDRESS_MAP_NAME(program_1_5k), 7, ADDRESS_MAP_NAME(data_80x4))
{ }
+std::vector<std::pair<int, const address_space_config *>> amis2000_base_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
//-------------------------------------------------
// state_string_export - export state as a string
diff --git a/src/devices/cpu/amis2000/amis2000.h b/src/devices/cpu/amis2000/amis2000.h
index dc4b6d8e832..1d90f1c64f1 100644
--- a/src/devices/cpu/amis2000/amis2000.h
+++ b/src/devices/cpu/amis2000/amis2000.h
@@ -84,7 +84,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual u32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/apexc/apexc.cpp b/src/devices/cpu/apexc/apexc.cpp
index aad7126433d..c0e7a99364f 100644
--- a/src/devices/cpu/apexc/apexc.cpp
+++ b/src/devices/cpu/apexc/apexc.cpp
@@ -351,6 +351,14 @@ apexc_cpu_device::apexc_cpu_device(const machine_config &mconfig, const char *ta
{
}
+std::vector<std::pair<int, const address_space_config *>> apexc_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
/*
word accessor functions
diff --git a/src/devices/cpu/apexc/apexc.h b/src/devices/cpu/apexc/apexc.h
index bf753180dd8..9175ca92333 100644
--- a/src/devices/cpu/apexc/apexc.h
+++ b/src/devices/cpu/apexc/apexc.h
@@ -34,7 +34,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/arc/arc.h b/src/devices/cpu/arc/arc.h
index 78975cdad87..b240027716a 100644
--- a/src/devices/cpu/arc/arc.h
+++ b/src/devices/cpu/arc/arc.h
@@ -36,7 +36,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/arcompact/arcompact.cpp b/src/devices/cpu/arcompact/arcompact.cpp
index 3aa939be868..01cf3746e38 100644
--- a/src/devices/cpu/arcompact/arcompact.cpp
+++ b/src/devices/cpu/arcompact/arcompact.cpp
@@ -56,6 +56,13 @@ arcompact_device::arcompact_device(const machine_config &mconfig, const char *ta
{
}
+std::vector<std::pair<int, const address_space_config *>> arcompact_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
offs_t arcompact_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/arcompact/arcompact.h b/src/devices/cpu/arcompact/arcompact.h
index f061091a341..26868114a20 100644
--- a/src/devices/cpu/arcompact/arcompact.h
+++ b/src/devices/cpu/arcompact/arcompact.h
@@ -95,7 +95,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp
index ab8dff26921..8b0fe10351a 100644
--- a/src/devices/cpu/arm/arm.cpp
+++ b/src/devices/cpu/arm/arm.cpp
@@ -228,6 +228,13 @@ DEFINE_DEVICE_TYPE(ARM, arm_cpu_device, "arm_le", "ARM (little)")
DEFINE_DEVICE_TYPE(ARM_BE, arm_be_cpu_device, "arm_be", "ARM (big)")
+std::vector<std::pair<int, const address_space_config *>> arm_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
arm_cpu_device::arm_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: arm_cpu_device(mconfig, ARM, tag, owner, clock, ENDIANNESS_LITTLE)
{
diff --git a/src/devices/cpu/arm/arm.h b/src/devices/cpu/arm/arm.h
index e3d1e77dfec..37f11f5fb9b 100644
--- a/src/devices/cpu/arm/arm.h
+++ b/src/devices/cpu/arm/arm.h
@@ -58,7 +58,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/arm7/arm7.cpp b/src/devices/cpu/arm7/arm7.cpp
index eaeb3052393..362fd95819c 100644
--- a/src/devices/cpu/arm7/arm7.cpp
+++ b/src/devices/cpu/arm7/arm7.cpp
@@ -118,6 +118,13 @@ sa1110_cpu_device::sa1110_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> arm7_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
void arm7_cpu_device::update_reg_ptr()
{
m_reg_group = sRegisterTable[GET_MODE];
@@ -436,7 +443,7 @@ bool arm7_cpu_device::arm7_tlb_translate(offs_t &addr, int flags)
}
-bool arm7_cpu_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool arm7_cpu_device::memory_translate(int spacenum, int intention, offs_t &address)
{
/* only applies to the program address space and only does something if the MMU's enabled */
if( spacenum == AS_PROGRAM && ( m_control & COPRO_CTRL_MMU_EN ) )
diff --git a/src/devices/cpu/arm7/arm7.h b/src/devices/cpu/arm7/arm7.h
index ca994db6a32..49379f4df6c 100644
--- a/src/devices/cpu/arm7/arm7.h
+++ b/src/devices/cpu/arm7/arm7.h
@@ -67,8 +67,8 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/arm7/lpc210x.cpp b/src/devices/cpu/arm7/lpc210x.cpp
index 67238a6b987..87ad3310ed3 100644
--- a/src/devices/cpu/arm7/lpc210x.cpp
+++ b/src/devices/cpu/arm7/lpc210x.cpp
@@ -66,13 +66,11 @@ WRITE32_MEMBER(lpc210x_device::flash_w)
}
-const address_space_config *lpc210x_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> lpc210x_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/arm7/lpc210x.h b/src/devices/cpu/arm7/lpc210x.h
index e566256890f..1b52af81f60 100644
--- a/src/devices/cpu/arm7/lpc210x.h
+++ b/src/devices/cpu/arm7/lpc210x.h
@@ -77,7 +77,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
uint32_t m_TxPR[2];
diff --git a/src/devices/cpu/asap/asap.cpp b/src/devices/cpu/asap/asap.cpp
index 17d00735a7a..c235f45d5b5 100644
--- a/src/devices/cpu/asap/asap.cpp
+++ b/src/devices/cpu/asap/asap.cpp
@@ -235,9 +235,11 @@ void asap_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *asap_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> asap_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/asap/asap.h b/src/devices/cpu/asap/asap.h
index 1f4c3a6e070..0ddbf286d8c 100644
--- a/src/devices/cpu/asap/asap.h
+++ b/src/devices/cpu/asap/asap.h
@@ -81,7 +81,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/avr8/avr8.cpp b/src/devices/cpu/avr8/avr8.cpp
index 01193dfa289..e047e2c16c3 100644
--- a/src/devices/cpu/avr8/avr8.cpp
+++ b/src/devices/cpu/avr8/avr8.cpp
@@ -876,21 +876,13 @@ void avr8_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *avr8_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> avr8_device::memory_space_config() const
{
- if (spacenum == AS_PROGRAM)
- {
- return &m_program_config;
- }
- else if (spacenum == AS_DATA)
- {
- return &m_data_config;
- }
- else if (spacenum == AS_IO)
- {
- return &m_io_config;
- }
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
diff --git a/src/devices/cpu/avr8/avr8.h b/src/devices/cpu/avr8/avr8.h
index cfcaec7ae45..02d64216c87 100644
--- a/src/devices/cpu/avr8/avr8.h
+++ b/src/devices/cpu/avr8/avr8.h
@@ -120,7 +120,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/ccpu/ccpu.cpp b/src/devices/cpu/ccpu/ccpu.cpp
index 5ec2ae0a7c8..bbace924e05 100644
--- a/src/devices/cpu/ccpu/ccpu.cpp
+++ b/src/devices/cpu/ccpu/ccpu.cpp
@@ -72,6 +72,14 @@ ccpu_cpu_device::ccpu_cpu_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> ccpu_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
READ8_MEMBER( ccpu_cpu_device::read_jmi )
{
diff --git a/src/devices/cpu/ccpu/ccpu.h b/src/devices/cpu/ccpu/ccpu.h
index f08936e190a..4b5753c9547 100644
--- a/src/devices/cpu/ccpu/ccpu.h
+++ b/src/devices/cpu/ccpu/ccpu.h
@@ -72,16 +72,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_DATA: return &m_data_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/clipper/clipper.cpp b/src/devices/cpu/clipper/clipper.cpp
index 357cd4b3f08..ab98d1c8007 100644
--- a/src/devices/cpu/clipper/clipper.cpp
+++ b/src/devices/cpu/clipper/clipper.cpp
@@ -262,16 +262,12 @@ void clipper_device::execute_set_input(int inputnum, int state)
* The CLIPPER has a true Harvard architecture. In the InterPro, these are tied back together
* again by the MMU, which then directs the access to one of 3 address spaces: main, i/o or boot.
*/
-const address_space_config *clipper_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> clipper_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_insn_config;
- case AS_DATA: return &m_data_config;
- default: break;
- }
-
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_insn_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
}
/*
diff --git a/src/devices/cpu/clipper/clipper.h b/src/devices/cpu/clipper/clipper.h
index 07f81dc8685..a3756a5b7e1 100644
--- a/src/devices/cpu/clipper/clipper.h
+++ b/src/devices/cpu/clipper/clipper.h
@@ -195,7 +195,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
#if 0
diff --git a/src/devices/cpu/cop400/cop400.cpp b/src/devices/cpu/cop400/cop400.cpp
index 7c04e615e2a..71e7b910444 100644
--- a/src/devices/cpu/cop400/cop400.cpp
+++ b/src/devices/cpu/cop400/cop400.cpp
@@ -314,6 +314,14 @@ cop446c_cpu_device::cop446c_cpu_device(const machine_config &mconfig, const char
{
}
+std::vector<std::pair<int, const address_space_config *>> cop400_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
/***************************************************************************
diff --git a/src/devices/cpu/cop400/cop400.h b/src/devices/cpu/cop400/cop400.h
index 8802df460b9..1d7b665291d 100644
--- a/src/devices/cpu/cop400/cop400.h
+++ b/src/devices/cpu/cop400/cop400.h
@@ -157,10 +157,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/cosmac/cosmac.cpp b/src/devices/cpu/cosmac/cosmac.cpp
index e1b5e728c23..6fe11bf4228 100644
--- a/src/devices/cpu/cosmac/cosmac.cpp
+++ b/src/devices/cpu/cosmac/cosmac.cpp
@@ -408,19 +408,12 @@ void cosmac_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *cosmac_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> cosmac_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM:
- return &m_program_config;
-
- case AS_IO:
- return &m_io_config;
-
- default:
- return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
diff --git a/src/devices/cpu/cosmac/cosmac.h b/src/devices/cpu/cosmac/cosmac.h
index 9adb9e1ec4d..32c396e5a0b 100644
--- a/src/devices/cpu/cosmac/cosmac.h
+++ b/src/devices/cpu/cosmac/cosmac.h
@@ -229,7 +229,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/cp1610/cp1610.cpp b/src/devices/cpu/cp1610/cp1610.cpp
index edaa32795e8..3b9be656b32 100644
--- a/src/devices/cpu/cp1610/cp1610.cpp
+++ b/src/devices/cpu/cp1610/cp1610.cpp
@@ -3401,6 +3401,12 @@ cp1610_cpu_device::cp1610_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> cp1610_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
void cp1610_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
diff --git a/src/devices/cpu/cp1610/cp1610.h b/src/devices/cpu/cp1610/cp1610.h
index 677e86ae0ab..22e9b06375b 100644
--- a/src/devices/cpu/cp1610/cp1610.h
+++ b/src/devices/cpu/cp1610/cp1610.h
@@ -54,7 +54,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
index 46b5e871a08..cc137ff5273 100644
--- a/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
+++ b/src/devices/cpu/cubeqcpu/cubeqcpu.cpp
@@ -83,6 +83,13 @@ cquestsnd_cpu_device::cquestsnd_cpu_device(const machine_config &mconfig, const
{
}
+std::vector<std::pair<int, const address_space_config *>> cquestsnd_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
offs_t cquestsnd_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
@@ -121,6 +128,12 @@ cquestlin_cpu_device::cquestlin_cpu_device(const machine_config &mconfig, const
{
}
+std::vector<std::pair<int, const address_space_config *>> cquestlin_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
offs_t cquestlin_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
@@ -362,6 +375,12 @@ void cquestrot_cpu_device::state_string_export(const device_state_entry &entry,
}
}
+std::vector<std::pair<int, const address_space_config *>> cquestrot_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
/***************************************************************************
LINE DRAWER INITIALIZATION AND SHUTDOWN
diff --git a/src/devices/cpu/cubeqcpu/cubeqcpu.h b/src/devices/cpu/cubeqcpu/cubeqcpu.h
index c63893a0a42..0f1ddc56b76 100644
--- a/src/devices/cpu/cubeqcpu/cubeqcpu.h
+++ b/src/devices/cpu/cubeqcpu/cubeqcpu.h
@@ -84,7 +84,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 8; }
@@ -184,7 +184,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
@@ -298,7 +298,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/drcuml.cpp b/src/devices/cpu/drcuml.cpp
index b017b6a64c8..6bc65ef8c3e 100644
--- a/src/devices/cpu/drcuml.cpp
+++ b/src/devices/cpu/drcuml.cpp
@@ -88,21 +88,27 @@ drcbe_interface::drcbe_interface(drcuml_state &drcuml, drc_cache &cache, device_
m_cache(cache),
m_device(device),
m_state(*(drcuml_machine_state *)cache.alloc_near(sizeof(m_state))),
- m_accessors((data_accessors *)cache.alloc_near(sizeof(*m_accessors) * ADDRESS_SPACES))
+ m_accessors(nullptr)
{
// reset the machine state
- memset(m_accessors, 0, sizeof(*m_accessors) * ADDRESS_SPACES);
memset(&m_state, 0, sizeof(m_state));
// find the spaces and fetch memory accessors
device_memory_interface *memory;
if (device.interface(memory))
- for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_space); ++spacenum)
+ {
+ int count = memory->max_space_count();
+ m_accessors = ((data_accessors *)cache.alloc_near(sizeof(*m_accessors) * count));
+ memset(m_accessors, 0, sizeof(*m_accessors) * count);
+ m_space.resize(count, nullptr);
+
+ for (int spacenum = 0; spacenum < count; ++spacenum)
if (memory->has_space(spacenum))
{
m_space[spacenum] = &memory->space(spacenum);
m_space[spacenum]->accessors(m_accessors[spacenum]);
}
+ }
}
diff --git a/src/devices/cpu/drcuml.h b/src/devices/cpu/drcuml.h
index 0d90c9412aa..ce808595e57 100644
--- a/src/devices/cpu/drcuml.h
+++ b/src/devices/cpu/drcuml.h
@@ -141,12 +141,12 @@ public:
protected:
// internal state
- drcuml_state & m_drcuml; // pointer back to our owner
- drc_cache & m_cache; // pointer to the cache
- device_t & m_device; // CPU device we are associated with
- address_space * m_space[ADDRESS_SPACES];// pointers to CPU's address space
- drcuml_machine_state & m_state; // state of the machine (in near cache)
- data_accessors * m_accessors; // memory accessors (in near cache)
+ drcuml_state & m_drcuml; // pointer back to our owner
+ drc_cache & m_cache; // pointer to the cache
+ device_t & m_device; // CPU device we are associated with
+ std::vector<address_space *> m_space; // pointers to CPU's address space
+ drcuml_machine_state & m_state; // state of the machine (in near cache)
+ data_accessors * m_accessors; // memory accessors (in near cache)
};
diff --git a/src/devices/cpu/dsp16/dsp16.cpp b/src/devices/cpu/dsp16/dsp16.cpp
index fc210f818d1..fa8c3cb1d2e 100644
--- a/src/devices/cpu/dsp16/dsp16.cpp
+++ b/src/devices/cpu/dsp16/dsp16.cpp
@@ -201,11 +201,12 @@ void dsp16_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *dsp16_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> dsp16_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_DATA) ? &m_data_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
}
diff --git a/src/devices/cpu/dsp16/dsp16.h b/src/devices/cpu/dsp16/dsp16.h
index 26768a4a862..75cda324cbc 100644
--- a/src/devices/cpu/dsp16/dsp16.h
+++ b/src/devices/cpu/dsp16/dsp16.h
@@ -77,7 +77,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/dsp32/dsp32.cpp b/src/devices/cpu/dsp32/dsp32.cpp
index f87fa710fb8..abfdcee2953 100644
--- a/src/devices/cpu/dsp32/dsp32.cpp
+++ b/src/devices/cpu/dsp32/dsp32.cpp
@@ -305,9 +305,11 @@ void dsp32c_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *dsp32c_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> dsp32c_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/dsp32/dsp32.h b/src/devices/cpu/dsp32/dsp32.h
index 6efdebdbf21..1c27014a6d5 100644
--- a/src/devices/cpu/dsp32/dsp32.h
+++ b/src/devices/cpu/dsp32/dsp32.h
@@ -118,7 +118,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/dsp56k/dsp56k.cpp b/src/devices/cpu/dsp56k/dsp56k.cpp
index e7ac94434e9..e5df7bec204 100644
--- a/src/devices/cpu/dsp56k/dsp56k.cpp
+++ b/src/devices/cpu/dsp56k/dsp56k.cpp
@@ -127,6 +127,14 @@ dsp56k_device::dsp56k_device(const machine_config &mconfig, const char *tag, dev
{
}
+std::vector<std::pair<int, const address_space_config *>> dsp56k_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
/***************************************************************************
MEMORY ACCESSORS
***************************************************************************/
diff --git a/src/devices/cpu/dsp56k/dsp56k.h b/src/devices/cpu/dsp56k/dsp56k.h
index fe186684655..1cacdd75d2d 100644
--- a/src/devices/cpu/dsp56k/dsp56k.h
+++ b/src/devices/cpu/dsp56k/dsp56k.h
@@ -229,7 +229,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/e0c6200/e0c6200.cpp b/src/devices/cpu/e0c6200/e0c6200.cpp
index 7e20728f549..2a50105187d 100644
--- a/src/devices/cpu/e0c6200/e0c6200.cpp
+++ b/src/devices/cpu/e0c6200/e0c6200.cpp
@@ -173,6 +173,14 @@ void e0c6200_cpu_device::do_interrupt()
standard_irq_callback(m_irq_id);
}
+std::vector<std::pair<int, const address_space_config *>> e0c6200_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
void e0c6200_cpu_device::execute_run()
{
while (m_icount > 0)
diff --git a/src/devices/cpu/e0c6200/e0c6200.h b/src/devices/cpu/e0c6200/e0c6200.h
index 6539abfda88..64b2d2974b6 100644
--- a/src/devices/cpu/e0c6200/e0c6200.h
+++ b/src/devices/cpu/e0c6200/e0c6200.h
@@ -31,7 +31,7 @@ protected:
virtual void do_interrupt();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual u32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/e132xs/e132xs.cpp b/src/devices/cpu/e132xs/e132xs.cpp
index 56ab898685b..a6ec074ce28 100644
--- a/src/devices/cpu/e132xs/e132xs.cpp
+++ b/src/devices/cpu/e132xs/e132xs.cpp
@@ -1880,21 +1880,15 @@ void hyperstone_device::device_stop()
//-------------------------------------------------
// memory_space_config - return the configuration
-// of the specified address space, or nullptr if
-// the space doesn't exist
+// of the address spaces
//-------------------------------------------------
-const address_space_config *hyperstone_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> hyperstone_device::memory_space_config() const
{
- if (spacenum == AS_PROGRAM)
- {
- return &m_program_config;
- }
- else if (spacenum == AS_IO)
- {
- return &m_io_config;
- }
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
diff --git a/src/devices/cpu/e132xs/e132xs.h b/src/devices/cpu/e132xs/e132xs.h
index 436d462fe11..23c62f70e6f 100644
--- a/src/devices/cpu/e132xs/e132xs.h
+++ b/src/devices/cpu/e132xs/e132xs.h
@@ -115,7 +115,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/es5510/es5510.cpp b/src/devices/cpu/es5510/es5510.cpp
index 204975d0abf..71150b7974b 100644
--- a/src/devices/cpu/es5510/es5510.cpp
+++ b/src/devices/cpu/es5510/es5510.cpp
@@ -569,8 +569,10 @@ void es5510_device::device_reset() {
memset(&ram_pp, 0, sizeof(ram_t));
}
-const address_space_config *es5510_device::memory_space_config(address_spacenum spacenum) const {
- return nullptr;
+std::vector<std::pair<int, const address_space_config *>> es5510_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ };
}
uint64_t es5510_device::execute_clocks_to_cycles(uint64_t clocks) const {
diff --git a/src/devices/cpu/es5510/es5510.h b/src/devices/cpu/es5510/es5510.h
index d3524aa5324..acdb8f0ea05 100644
--- a/src/devices/cpu/es5510/es5510.h
+++ b/src/devices/cpu/es5510/es5510.h
@@ -124,7 +124,7 @@ public:
protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual uint64_t execute_clocks_to_cycles(uint64_t clocks) const override;
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override;
virtual uint32_t execute_min_cycles() const override;
diff --git a/src/devices/cpu/esrip/esrip.cpp b/src/devices/cpu/esrip/esrip.cpp
index 77f2401200d..ae939ffe414 100644
--- a/src/devices/cpu/esrip/esrip.cpp
+++ b/src/devices/cpu/esrip/esrip.cpp
@@ -338,13 +338,11 @@ void esrip_device::device_stop()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *esrip_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> esrip_device::memory_space_config() const
{
- if (spacenum == AS_PROGRAM)
- {
- return &m_program_config;
- }
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ };
}
diff --git a/src/devices/cpu/esrip/esrip.h b/src/devices/cpu/esrip/esrip.h
index 873a8bf1580..086c2facafe 100644
--- a/src/devices/cpu/esrip/esrip.h
+++ b/src/devices/cpu/esrip/esrip.h
@@ -133,7 +133,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/f8/f8.cpp b/src/devices/cpu/f8/f8.cpp
index 1b26b4ab638..6c34cde8c6c 100644
--- a/src/devices/cpu/f8/f8.cpp
+++ b/src/devices/cpu/f8/f8.cpp
@@ -75,6 +75,14 @@ f8_cpu_device::f8_cpu_device(const machine_config &mconfig, const char *tag, dev
memset(m_r, 0x00, sizeof(m_r));
}
+std::vector<std::pair<int, const address_space_config *>> f8_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
/******************************************************************************
* ROMC (ROM cycles)
diff --git a/src/devices/cpu/f8/f8.h b/src/devices/cpu/f8/f8.h
index 558c0b2a468..336a86a124e 100644
--- a/src/devices/cpu/f8/f8.h
+++ b/src/devices/cpu/f8/f8.h
@@ -48,7 +48,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/g65816/g65816.cpp b/src/devices/cpu/g65816/g65816.cpp
index b68fccce743..6eb6e0a568d 100644
--- a/src/devices/cpu/g65816/g65816.cpp
+++ b/src/devices/cpu/g65816/g65816.cpp
@@ -117,6 +117,14 @@ g65816_device::g65816_device(const machine_config &mconfig, device_type type, co
}
+std::vector<std::pair<int, const address_space_config *>> g65816_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
+
static ADDRESS_MAP_START(_5a22_map, AS_PROGRAM, 8, _5a22_device)
AM_RANGE(0x4202, 0x4202) AM_MIRROR(0xbf0000) AM_WRITE(wrmpya_w)
AM_RANGE(0x4203, 0x4203) AM_MIRROR(0xbf0000) AM_WRITE(wrmpyb_w)
diff --git a/src/devices/cpu/g65816/g65816.h b/src/devices/cpu/g65816/g65816.h
index ab85e1513fc..a9a48197155 100644
--- a/src/devices/cpu/g65816/g65816.h
+++ b/src/devices/cpu/g65816/g65816.h
@@ -77,7 +77,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/g65816/g65816cm.h b/src/devices/cpu/g65816/g65816cm.h
index d28ae770b20..11804987d86 100644
--- a/src/devices/cpu/g65816/g65816cm.h
+++ b/src/devices/cpu/g65816/g65816cm.h
@@ -235,7 +235,7 @@
#define NFLAG_8(A) (A)
#define NFLAG_16(A) ((A)>>8)
-#define CFLAG_AS_1() ((FLAG_C>>8)&1)
+#define CFLAG_1() ((FLAG_C>>8)&1)
diff --git a/src/devices/cpu/g65816/g65816op.h b/src/devices/cpu/g65816/g65816op.h
index 9def2ae4287..dc6d86366a9 100644
--- a/src/devices/cpu/g65816/g65816op.h
+++ b/src/devices/cpu/g65816/g65816op.h
@@ -240,7 +240,7 @@
int32_t result, r0, r1, carry; \
r0 = REGISTER_A; \
r1 = SRC; \
- carry = CFLAG_AS_1(); \
+ carry = CFLAG_1(); \
result = (r0 & 0x0f) + (r1 & 0x0f) + (carry << 0); \
if (result > 0x09) result += 0x06; \
carry = result > 0x0f; \
@@ -253,7 +253,7 @@
} \
else \
{ \
- FLAG_C = tmp16 = REGISTER_A + SRC + CFLAG_AS_1(); \
+ FLAG_C = tmp16 = REGISTER_A + SRC + CFLAG_1(); \
FLAG_V = VFLAG_ADD_8(SRC, REGISTER_A, FLAG_C); \
FLAG_N = FLAG_Z = REGISTER_A = MAKE_UINT_8(tmp16); \
} \
@@ -266,7 +266,7 @@
int32_t result, r0, r1, carry; \
r0 = REGISTER_A; \
r1 = SRC; \
- carry = CFLAG_AS_1(); \
+ carry = CFLAG_1(); \
if (!FLAG_D) \
{ \
result = r0 + r1 + carry; \
@@ -994,12 +994,12 @@
#if FLAG_SET_M
#define OP_ROL() \
CLK(CLK_OP + CLK_IMPLIED); \
- FLAG_C = (REGISTER_A<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REGISTER_A<<1) | CFLAG_1(); \
FLAG_N = FLAG_Z = REGISTER_A = MAKE_UINT_8(FLAG_C)
#else
#define OP_ROL() \
CLK(CLK_OP + CLK_IMPLIED); \
- FLAG_C = (REGISTER_A<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REGISTER_A<<1) | CFLAG_1(); \
FLAG_Z = REGISTER_A = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(FLAG_C); \
FLAG_C = CFLAG_16(FLAG_C)
@@ -1011,14 +1011,14 @@
#define OP_ROLM(MODE) \
CLK(CLK_OP + CLK_RMW8 + CLK_W_##MODE); \
DST = EA_##MODE(); \
- FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_AS_1(); \
+ FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_1(); \
FLAG_N = FLAG_Z = MAKE_UINT_8(FLAG_C); \
write_8_##MODE(DST, FLAG_Z)
#else
#define OP_ROLM(MODE) \
CLK(CLK_OP + CLK_RMW16 + CLK_W_##MODE); \
DST = EA_##MODE(); \
- FLAG_C = (read_16_##MODE(DST)<<1) | CFLAG_AS_1(); \
+ FLAG_C = (read_16_##MODE(DST)<<1) | CFLAG_1(); \
FLAG_Z = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(FLAG_C); \
FLAG_C = CFLAG_16(FLAG_C); \
@@ -1102,7 +1102,7 @@
if(!FLAG_D) \
{ \
FLAG_C = ~FLAG_C; \
- FLAG_C = REGISTER_A - SRC - CFLAG_AS_1(); \
+ FLAG_C = REGISTER_A - SRC - CFLAG_1(); \
FLAG_V = VFLAG_SUB_8(SRC, REGISTER_A, FLAG_C); \
FLAG_N = FLAG_Z = REGISTER_A = MAKE_UINT_8(FLAG_C); \
FLAG_C = ~FLAG_C; \
@@ -1114,7 +1114,7 @@
r0 = REGISTER_A; \
r1 = SRC; \
r1 ^= 0xff; \
- carry = CFLAG_AS_1(); \
+ carry = CFLAG_1(); \
result = (r0 & 0x0f) + (r1 & 0x0f) + (carry << 0); \
if (result <= 0x0f) result -= 0x06; \
carry = result > 0x0f; \
@@ -1133,7 +1133,7 @@
r0 = REGISTER_A; \
r1 = SRC; \
r1 ^= 0xffff; \
- carry = CFLAG_AS_1(); \
+ carry = CFLAG_1(); \
if (!FLAG_D) \
{ \
result = r0 + r1 + carry; \
@@ -1450,7 +1450,7 @@
#undef OP_XCE
#define OP_XCE() \
CLK(CLK_OP + CLK_IMPLIED); \
- SRC = CFLAG_AS_1(); \
+ SRC = CFLAG_1(); \
FLAG_C = FLAG_E<<8; \
g65816i_set_flag_e(SRC)
diff --git a/src/devices/cpu/h6280/h6280.cpp b/src/devices/cpu/h6280/h6280.cpp
index fb0d2dc70a7..39d2f2d5b5a 100644
--- a/src/devices/cpu/h6280/h6280.cpp
+++ b/src/devices/cpu/h6280/h6280.cpp
@@ -169,6 +169,13 @@ h6280_device::h6280_device(const machine_config &mconfig, const char *tag, devic
m_opcode[op] = s_opcodetable[op];
}
+std::vector<std::pair<int, const address_space_config *>> h6280_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
const h6280_device::ophandler h6280_device::s_opcodetable[256] =
{
@@ -2564,7 +2571,7 @@ WRITE8_MEMBER( h6280_device::timer_w )
}
}
-bool h6280_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool h6280_device::memory_translate(int spacenum, int intention, offs_t &address)
{
if (spacenum == AS_PROGRAM)
address = translated(address);
diff --git a/src/devices/cpu/h6280/h6280.h b/src/devices/cpu/h6280/h6280.h
index 92bb9ca8bec..f2f1be5d86f 100644
--- a/src/devices/cpu/h6280/h6280.h
+++ b/src/devices/cpu/h6280/h6280.h
@@ -85,8 +85,8 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/h8/h8.cpp b/src/devices/cpu/h8/h8.cpp
index 1416b4c19b5..2631e7522e8 100644
--- a/src/devices/cpu/h8/h8.cpp
+++ b/src/devices/cpu/h8/h8.cpp
@@ -236,11 +236,12 @@ void h8_device::internal_update()
internal_update(total_cycles());
}
-const address_space_config *h8_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> h8_device::memory_space_config() const
{
- return
- spacenum == AS_PROGRAM ? &program_config :
- spacenum == AS_IO ? &io_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_IO, &io_config)
+ };
}
diff --git a/src/devices/cpu/h8/h8.h b/src/devices/cpu/h8/h8.h
index ac1cb6dd2fe..8cc858109f2 100644
--- a/src/devices/cpu/h8/h8.h
+++ b/src/devices/cpu/h8/h8.h
@@ -167,7 +167,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/hcd62121/hcd62121.cpp b/src/devices/cpu/hcd62121/hcd62121.cpp
index 7d7ee5fa62e..34a5f0cc768 100644
--- a/src/devices/cpu/hcd62121/hcd62121.cpp
+++ b/src/devices/cpu/hcd62121/hcd62121.cpp
@@ -73,6 +73,12 @@ hcd62121_cpu_device::hcd62121_cpu_device(const machine_config &mconfig, const ch
{
}
+std::vector<std::pair<int, const address_space_config *>> hcd62121_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
u8 hcd62121_cpu_device::read_op()
{
diff --git a/src/devices/cpu/hcd62121/hcd62121.h b/src/devices/cpu/hcd62121/hcd62121.h
index 65f67e90bda..8b96502a6f3 100644
--- a/src/devices/cpu/hcd62121/hcd62121.h
+++ b/src/devices/cpu/hcd62121/hcd62121.h
@@ -54,7 +54,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/hd61700/hd61700.cpp b/src/devices/cpu/hd61700/hd61700.cpp
index 2fc84f0eb15..110366d4268 100644
--- a/src/devices/cpu/hd61700/hd61700.cpp
+++ b/src/devices/cpu/hd61700/hd61700.cpp
@@ -120,6 +120,13 @@ hd61700_cpu_device::hd61700_cpu_device(const machine_config &mconfig, const char
{
}
+std::vector<std::pair<int, const address_space_config *>> hd61700_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
//-------------------------------------------------
// device_start - start up the device
diff --git a/src/devices/cpu/hd61700/hd61700.h b/src/devices/cpu/hd61700/hd61700.h
index 559cda51dab..dd7f78cfe37 100644
--- a/src/devices/cpu/hd61700/hd61700.h
+++ b/src/devices/cpu/hd61700/hd61700.h
@@ -87,7 +87,7 @@ protected:
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/hmcs40/hmcs40.cpp b/src/devices/cpu/hmcs40/hmcs40.cpp
index 092a6417c32..265ca25b97d 100644
--- a/src/devices/cpu/hmcs40/hmcs40.cpp
+++ b/src/devices/cpu/hmcs40/hmcs40.cpp
@@ -149,6 +149,13 @@ hd44828_device::hd44828_device(const machine_config &mconfig, const char *tag, d
: hmcs45_cpu_device(mconfig, HD44828, tag, owner, clock, IS_CMOS)
{ }
+std::vector<std::pair<int, const address_space_config *>> hmcs40_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
// disasm
void hmcs40_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
diff --git a/src/devices/cpu/hmcs40/hmcs40.h b/src/devices/cpu/hmcs40/hmcs40.h
index af933a999a7..77004de1e24 100644
--- a/src/devices/cpu/hmcs40/hmcs40.h
+++ b/src/devices/cpu/hmcs40/hmcs40.h
@@ -155,7 +155,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual u32 disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/hphybrid/hphybrid.cpp b/src/devices/cpu/hphybrid/hphybrid.cpp
index c00ba6e6471..6cdfcaf945d 100644
--- a/src/devices/cpu/hphybrid/hphybrid.cpp
+++ b/src/devices/cpu/hphybrid/hphybrid.cpp
@@ -152,6 +152,14 @@ hp_hybrid_cpu_device::hp_hybrid_cpu_device(const machine_config &mconfig, device
{
}
+std::vector<std::pair<int, const address_space_config *>> hp_hybrid_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
void hp_hybrid_cpu_device::device_start()
{
m_reg_A = 0;
diff --git a/src/devices/cpu/hphybrid/hphybrid.h b/src/devices/cpu/hphybrid/hphybrid.h
index 57960e01d2c..bdc096f90e7 100644
--- a/src/devices/cpu/hphybrid/hphybrid.h
+++ b/src/devices/cpu/hphybrid/hphybrid.h
@@ -79,7 +79,7 @@ protected:
virtual uint16_t execute_no_bpc_ioc(uint16_t opcode) = 0;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/i386/i386.cpp b/src/devices/cpu/i386/i386.cpp
index 69ed56d46fc..10019d0c57b 100644
--- a/src/devices/cpu/i386/i386.cpp
+++ b/src/devices/cpu/i386/i386.cpp
@@ -131,6 +131,13 @@ pentium4_device::pentium4_device(const machine_config &mconfig, const char *tag,
set_vtlb_dynamic_entries(196);
}
+std::vector<std::pair<int, const address_space_config *>> i386_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
int i386_parity_table[256];
MODRM_TABLE i386_MODRM_table[256];
@@ -4005,7 +4012,7 @@ void i386_device::execute_run()
/*************************************************************************/
-bool i386_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool i386_device::memory_translate(int spacenum, int intention, offs_t &address)
{
bool ret = true;
if(spacenum == AS_PROGRAM)
diff --git a/src/devices/cpu/i386/i386.h b/src/devices/cpu/i386/i386.h
index 401619e9602..6c8ba85f6eb 100644
--- a/src/devices/cpu/i386/i386.h
+++ b/src/devices/cpu/i386/i386.h
@@ -59,8 +59,8 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : (spacenum == AS_IO) ? &m_io_config : nullptr; }
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/i8008/i8008.cpp b/src/devices/cpu/i8008/i8008.cpp
index f5e6aa4b62e..5a17622b3e0 100644
--- a/src/devices/cpu/i8008/i8008.cpp
+++ b/src/devices/cpu/i8008/i8008.cpp
@@ -139,11 +139,12 @@ void i8008_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *i8008_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i8008_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_IO) ? &m_io_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
//-------------------------------------------------
diff --git a/src/devices/cpu/i8008/i8008.h b/src/devices/cpu/i8008/i8008.h
index 60b2414d61d..80d4934f460 100644
--- a/src/devices/cpu/i8008/i8008.h
+++ b/src/devices/cpu/i8008/i8008.h
@@ -35,7 +35,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/i8085/i8085.cpp b/src/devices/cpu/i8085/i8085.cpp
index 23362ba1242..dcd27b68c39 100644
--- a/src/devices/cpu/i8085/i8085.cpp
+++ b/src/devices/cpu/i8085/i8085.cpp
@@ -211,6 +211,14 @@ i8080a_cpu_device::i8080a_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> i8085a_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
void i8085a_cpu_device::device_config_complete()
{
diff --git a/src/devices/cpu/i8085/i8085.h b/src/devices/cpu/i8085/i8085.h
index 96f49d9e107..6cc71ca65e5 100644
--- a/src/devices/cpu/i8085/i8085.h
+++ b/src/devices/cpu/i8085/i8085.h
@@ -91,7 +91,7 @@ protected:
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 2); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/i8089/i8089.cpp b/src/devices/cpu/i8089/i8089.cpp
index 681eb630444..0be01115b6e 100644
--- a/src/devices/cpu/i8089/i8089.cpp
+++ b/src/devices/cpu/i8089/i8089.cpp
@@ -135,14 +135,12 @@ void i8089_device::device_reset()
// space configurations
//-------------------------------------------------
-const address_space_config *i8089_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i8089_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
//-------------------------------------------------
diff --git a/src/devices/cpu/i8089/i8089.h b/src/devices/cpu/i8089/i8089.h
index eae74ca1cb2..0bb83c5d66d 100644
--- a/src/devices/cpu/i8089/i8089.h
+++ b/src/devices/cpu/i8089/i8089.h
@@ -76,7 +76,7 @@ protected:
int m_icount;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
address_space_config m_program_config;
address_space_config m_io_config;
diff --git a/src/devices/cpu/i86/i186.cpp b/src/devices/cpu/i86/i186.cpp
index e3ece9dbe1c..0ef1e83d732 100644
--- a/src/devices/cpu/i86/i186.cpp
+++ b/src/devices/cpu/i86/i186.cpp
@@ -149,16 +149,19 @@ i80186_cpu_device::i80186_cpu_device(const machine_config &mconfig, device_type
{
}
-
-const address_space_config *i80186_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i80186_cpu_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_opcodes_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_opcodes_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
uint8_t i80186_cpu_device::fetch_op()
diff --git a/src/devices/cpu/i86/i186.h b/src/devices/cpu/i86/i186.h
index 54ab1d20fae..91d5f1c27bc 100644
--- a/src/devices/cpu/i86/i186.h
+++ b/src/devices/cpu/i86/i186.h
@@ -32,7 +32,7 @@ public:
DECLARE_WRITE_LINE_MEMBER(int3_w) { external_int(3, state); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
protected:
i80186_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size);
diff --git a/src/devices/cpu/i86/i286.cpp b/src/devices/cpu/i86/i286.cpp
index 2a2b8d5d1bb..9d78bfc21e9 100644
--- a/src/devices/cpu/i86/i286.cpp
+++ b/src/devices/cpu/i86/i286.cpp
@@ -282,15 +282,19 @@ void i80286_cpu_device::device_start()
m_out_shutdown_func.resolve_safe();
}
-const address_space_config *i80286_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i80286_cpu_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_opcodes_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_opcodes_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
@@ -367,7 +371,7 @@ void i80286_cpu_device::state_string_export(const device_state_entry &entry, std
}
}
-bool i80286_cpu_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool i80286_cpu_device::memory_translate(int spacenum, int intention, offs_t &address)
{
if(spacenum == AS_PROGRAM)
address &= m_amask;
diff --git a/src/devices/cpu/i86/i286.h b/src/devices/cpu/i86/i286.h
index e0a2c1600ed..50aa61ec293 100644
--- a/src/devices/cpu/i86/i286.h
+++ b/src/devices/cpu/i86/i286.h
@@ -69,7 +69,7 @@ public:
i80286_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
typedef delegate<uint32_t (bool)> a20_cb;
static void static_set_a20_callback(device_t &device, a20_cb object) { downcast<i80286_cpu_device &>(device).m_a20_callback = object; }
@@ -86,7 +86,7 @@ protected:
virtual uint32_t execute_input_lines() const override { return 1; }
virtual void execute_set_input(int inputnum, int state) override;
- bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ bool memory_translate(int spacenum, int intention, offs_t &address) override;
virtual void interrupt(int int_num, int trap = 1) override { if(trap) throw TRAP(int_num, (uint16_t)-1); else interrupt_descriptor(int_num, 0, 0); }
virtual uint8_t read_port_byte(uint16_t port) override;
diff --git a/src/devices/cpu/i86/i86.cpp b/src/devices/cpu/i86/i86.cpp
index 0a11d31352d..aa0e2ab4266 100644
--- a/src/devices/cpu/i86/i86.cpp
+++ b/src/devices/cpu/i86/i86.cpp
@@ -112,15 +112,19 @@ i8086_cpu_device::i8086_cpu_device(const machine_config &mconfig, device_type ty
{
}
-const address_space_config *i8086_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i8086_cpu_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_opcodes_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_opcodes_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
uint8_t i8086_cpu_device::fetch_op()
diff --git a/src/devices/cpu/i86/i86.h b/src/devices/cpu/i86/i86.h
index 626246c8dde..38b0db568ab 100644
--- a/src/devices/cpu/i86/i86.h
+++ b/src/devices/cpu/i86/i86.h
@@ -344,7 +344,7 @@ public:
i8086_cpu_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
protected:
i8086_cpu_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, int data_bus_size);
diff --git a/src/devices/cpu/i860/i860.cpp b/src/devices/cpu/i860/i860.cpp
index f33eaf37fae..458b38389da 100644
--- a/src/devices/cpu/i860/i860.cpp
+++ b/src/devices/cpu/i860/i860.cpp
@@ -41,6 +41,12 @@ i860_cpu_device::i860_cpu_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> i860_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
void i860_cpu_device::device_start()
{
diff --git a/src/devices/cpu/i860/i860.h b/src/devices/cpu/i860/i860.h
index e0b86665bf2..a796723051b 100644
--- a/src/devices/cpu/i860/i860.h
+++ b/src/devices/cpu/i860/i860.h
@@ -73,7 +73,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/i960/i960.cpp b/src/devices/cpu/i960/i960.cpp
index 6eedf8206a9..946c5690ca5 100644
--- a/src/devices/cpu/i960/i960.cpp
+++ b/src/devices/cpu/i960/i960.cpp
@@ -25,6 +25,14 @@ i960_cpu_device::i960_cpu_device(const machine_config &mconfig, const char *tag,
}
+std::vector<std::pair<int, const address_space_config *>> i960_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
+
uint32_t i960_cpu_device::i960_read_dword_unaligned(uint32_t address)
{
if (!DWORD_ALIGNED(address))
diff --git a/src/devices/cpu/i960/i960.h b/src/devices/cpu/i960/i960.h
index 1bc29a7c6f9..0ac065fbb68 100644
--- a/src/devices/cpu/i960/i960.h
+++ b/src/devices/cpu/i960/i960.h
@@ -91,7 +91,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/ie15/ie15.cpp b/src/devices/cpu/ie15/ie15.cpp
index 322d2b5753d..1a70df26a49 100644
--- a/src/devices/cpu/ie15/ie15.cpp
+++ b/src/devices/cpu/ie15/ie15.cpp
@@ -88,11 +88,12 @@ void ie15_cpu_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *ie15_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ie15_cpu_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_IO) ? &m_io_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
//-------------------------------------------------
diff --git a/src/devices/cpu/ie15/ie15.h b/src/devices/cpu/ie15/ie15.h
index 0b4d6fbdf8f..50fbcb40f79 100644
--- a/src/devices/cpu/ie15/ie15.h
+++ b/src/devices/cpu/ie15/ie15.h
@@ -36,7 +36,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/jaguar/jaguar.cpp b/src/devices/cpu/jaguar/jaguar.cpp
index f76bd49f1db..00055ffa6be 100644
--- a/src/devices/cpu/jaguar/jaguar.cpp
+++ b/src/devices/cpu/jaguar/jaguar.cpp
@@ -173,6 +173,13 @@ jaguardsp_cpu_device::jaguardsp_cpu_device(const machine_config &mconfig, const
{
}
+std::vector<std::pair<int, const address_space_config *>> jaguar_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
void jaguar_cpu_device::update_register_banks()
{
diff --git a/src/devices/cpu/jaguar/jaguar.h b/src/devices/cpu/jaguar/jaguar.h
index de5f296a936..6d91160edb4 100644
--- a/src/devices/cpu/jaguar/jaguar.h
+++ b/src/devices/cpu/jaguar/jaguar.h
@@ -115,7 +115,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/lc8670/lc8670.cpp b/src/devices/cpu/lc8670/lc8670.cpp
index f35cce529c5..9b43643b4d6 100644
--- a/src/devices/cpu/lc8670/lc8670.cpp
+++ b/src/devices/cpu/lc8670/lc8670.cpp
@@ -392,12 +392,13 @@ void lc8670_cpu_device::state_string_export(const device_state_entry &entry, std
// the space doesn't exist
//-------------------------------------------------
-const address_space_config * lc8670_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> lc8670_cpu_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_DATA) ? &m_data_config :
- (spacenum == AS_IO) ? &m_io_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
//-------------------------------------------------
diff --git a/src/devices/cpu/lc8670/lc8670.h b/src/devices/cpu/lc8670/lc8670.h
index cec7274a567..10b4b155bc5 100644
--- a/src/devices/cpu/lc8670/lc8670.h
+++ b/src/devices/cpu/lc8670/lc8670.h
@@ -112,7 +112,7 @@ protected:
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/lh5801/lh5801.cpp b/src/devices/cpu/lh5801/lh5801.cpp
index 3ab8bd38a35..21d324474de 100644
--- a/src/devices/cpu/lh5801/lh5801.cpp
+++ b/src/devices/cpu/lh5801/lh5801.cpp
@@ -74,6 +74,13 @@ lh5801_cpu_device::lh5801_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> lh5801_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
/***************************************************************
* include the opcode macros, functions and tables
diff --git a/src/devices/cpu/lh5801/lh5801.h b/src/devices/cpu/lh5801/lh5801.h
index 4e7433dfb5d..50e5775de21 100644
--- a/src/devices/cpu/lh5801/lh5801.h
+++ b/src/devices/cpu/lh5801/lh5801.h
@@ -87,7 +87,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : (spacenum == AS_IO) ? &m_io_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/lr35902/lr35902.cpp b/src/devices/cpu/lr35902/lr35902.cpp
index c4b454c8719..dcfa1f34fa8 100644
--- a/src/devices/cpu/lr35902/lr35902.cpp
+++ b/src/devices/cpu/lr35902/lr35902.cpp
@@ -86,6 +86,12 @@ lr35902_cpu_device::lr35902_cpu_device(const machine_config &mconfig, const char
{
}
+std::vector<std::pair<int, const address_space_config *>> lr35902_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
/****************************************************************************/
/* Memory functions */
diff --git a/src/devices/cpu/lr35902/lr35902.h b/src/devices/cpu/lr35902/lr35902.h
index 120cf6836b7..9d6cc8c7149 100644
--- a/src/devices/cpu/lr35902/lr35902.h
+++ b/src/devices/cpu/lr35902/lr35902.h
@@ -83,7 +83,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/m37710/m37710.cpp b/src/devices/cpu/m37710/m37710.cpp
index b17e9d5e2e5..754f1f0c2e9 100644
--- a/src/devices/cpu/m37710/m37710.cpp
+++ b/src/devices/cpu/m37710/m37710.cpp
@@ -125,6 +125,13 @@ m37710s4_device::m37710s4_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> m37710_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
/* interrupt control mapping */
diff --git a/src/devices/cpu/m37710/m37710.h b/src/devices/cpu/m37710/m37710.h
index 64a9c21b692..745f08fb42d 100644
--- a/src/devices/cpu/m37710/m37710.h
+++ b/src/devices/cpu/m37710/m37710.h
@@ -112,7 +112,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/m37710/m37710cm.h b/src/devices/cpu/m37710/m37710cm.h
index 9924a4ee3f0..90f35d7ba4e 100644
--- a/src/devices/cpu/m37710/m37710cm.h
+++ b/src/devices/cpu/m37710/m37710cm.h
@@ -233,7 +233,7 @@ static inline int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
#define NFLAG_8(A) (A)
#define NFLAG_16(A) ((A)>>8)
-#define CFLAG_AS_1() ((FLAG_C>>8)&1)
+#define CFLAG_1() ((FLAG_C>>8)&1)
/* ======================================================================== */
/* ========================== EFFECTIVE ADDRESSES ========================= */
diff --git a/src/devices/cpu/m37710/m37710op.h b/src/devices/cpu/m37710/m37710op.h
index 268ef277f18..2e7d9c2d6d5 100644
--- a/src/devices/cpu/m37710/m37710op.h
+++ b/src/devices/cpu/m37710/m37710op.h
@@ -281,7 +281,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
#define OP_ADC(MODE) \
CLK(CLK_OP + CLK_R8 + CLK_##MODE); \
SRC = OPER_8_##MODE(); \
- FLAG_C = REG_A + SRC + CFLAG_AS_1(); \
+ FLAG_C = REG_A + SRC + CFLAG_1(); \
if(FLAG_D) \
{ \
if((FLAG_C & 0xf) > 9) \
@@ -297,21 +297,21 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
SRC = OPER_16_##MODE(); \
if(!FLAG_D) \
{ \
- FLAG_C = REG_A + SRC + CFLAG_AS_1(); \
+ FLAG_C = REG_A + SRC + CFLAG_1(); \
FLAG_V = VFLAG_ADD_16(SRC, REG_A, FLAG_C); \
FLAG_Z = REG_A = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(REG_A); \
FLAG_C = CFLAG_16(FLAG_C); \
BREAKOUT; \
} \
- FLAG_C = MAKE_UINT_8(REG_A) + MAKE_UINT_8(SRC) + CFLAG_AS_1(); \
+ FLAG_C = MAKE_UINT_8(REG_A) + MAKE_UINT_8(SRC) + CFLAG_1(); \
if((FLAG_C & 0xf) > 9) \
FLAG_C+=6; \
if((FLAG_C & 0xf0) > 0x90) \
FLAG_C+=0x60; \
FLAG_Z = MAKE_UINT_8(FLAG_C); \
\
- FLAG_C = MAKE_UINT_8(REG_A>>8) + MAKE_UINT_8(SRC>>8) + CFLAG_AS_1(); \
+ FLAG_C = MAKE_UINT_8(REG_A>>8) + MAKE_UINT_8(SRC>>8) + CFLAG_1(); \
if((FLAG_C & 0xf) > 9) \
FLAG_C+=6; \
if((FLAG_C & 0xf0) > 0x90) \
@@ -328,7 +328,7 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
#define OP_ADCB(MODE) \
CLK(CLK_OP + CLK_R8 + CLK_##MODE); \
SRC = OPER_8_##MODE(); \
- FLAG_C = REG_BA + SRC + CFLAG_AS_1(); \
+ FLAG_C = REG_BA + SRC + CFLAG_1(); \
if(FLAG_D) \
{ \
if((FLAG_C & 0xf) > 9) \
@@ -344,21 +344,21 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
SRC = OPER_16_##MODE(); \
if(!FLAG_D) \
{ \
- FLAG_C = REG_BA + SRC + CFLAG_AS_1(); \
+ FLAG_C = REG_BA + SRC + CFLAG_1(); \
FLAG_V = VFLAG_ADD_16(SRC, REG_BA, FLAG_C); \
FLAG_Z = REG_BA = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(REG_BA); \
FLAG_C = CFLAG_16(FLAG_C); \
BREAKOUT; \
} \
- FLAG_C = MAKE_UINT_8(REG_BA) + MAKE_UINT_8(SRC) + CFLAG_AS_1(); \
+ FLAG_C = MAKE_UINT_8(REG_BA) + MAKE_UINT_8(SRC) + CFLAG_1(); \
if((FLAG_C & 0xf) > 9) \
FLAG_C+=6; \
if((FLAG_C & 0xf0) > 0x90) \
FLAG_C+=0x60; \
FLAG_Z = MAKE_UINT_8(FLAG_C); \
\
- FLAG_C = MAKE_UINT_8(REG_BA>>8) + MAKE_UINT_8(SRC>>8) + CFLAG_AS_1(); \
+ FLAG_C = MAKE_UINT_8(REG_BA>>8) + MAKE_UINT_8(SRC>>8) + CFLAG_1(); \
if((FLAG_C & 0xf) > 9) \
FLAG_C+=6; \
if((FLAG_C & 0xf0) > 0x90) \
@@ -1244,12 +1244,12 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
#if FLAG_SET_M
#define OP_ROL() \
CLK(CLK_OP + CLK_IMPLIED); \
- FLAG_C = (REG_A<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REG_A<<1) | CFLAG_1(); \
FLAG_N = FLAG_Z = REG_A = MAKE_UINT_8(FLAG_C)
#else
#define OP_ROL() \
CLK(CLK_OP + CLK_IMPLIED); \
- FLAG_C = (REG_A<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REG_A<<1) | CFLAG_1(); \
FLAG_Z = REG_A = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(FLAG_C); \
FLAG_C = CFLAG_16(FLAG_C)
@@ -1260,12 +1260,12 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
#if FLAG_SET_M
#define OP_ROLB() \
CLK(CLK_OP + CLK_IMPLIED); \
- FLAG_C = (REG_BA<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REG_BA<<1) | CFLAG_1(); \
FLAG_N = FLAG_Z = REG_BA = MAKE_UINT_8(FLAG_C)
#else
#define OP_ROLB() \
CLK(CLK_OP + CLK_IMPLIED); \
- FLAG_C = (REG_BA<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REG_BA<<1) | CFLAG_1(); \
FLAG_Z = REG_BA = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(FLAG_C); \
FLAG_C = CFLAG_16(FLAG_C)
@@ -1287,14 +1287,14 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
#define OP_ROLM(MODE) \
CLK(CLK_OP + CLK_RMW8 + CLK_W_##MODE); \
DST = EA_##MODE(); \
- FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_AS_1(); \
+ FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_1(); \
FLAG_N = FLAG_Z = MAKE_UINT_8(FLAG_C); \
write_8_##MODE(DST, FLAG_Z)
#else
#define OP_ROLM(MODE) \
CLK(CLK_OP + CLK_RMW16 + CLK_W_##MODE); \
DST = EA_##MODE(); \
- FLAG_C = (read_16_##MODE(DST)<<1) | CFLAG_AS_1(); \
+ FLAG_C = (read_16_##MODE(DST)<<1) | CFLAG_1(); \
FLAG_Z = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(FLAG_C); \
FLAG_C = CFLAG_16(FLAG_C); \
@@ -1389,13 +1389,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
FLAG_C = ~FLAG_C; \
if(!FLAG_D) \
{ \
- FLAG_C = REG_A - SRC - CFLAG_AS_1(); \
+ FLAG_C = REG_A - SRC - CFLAG_1(); \
FLAG_V = VFLAG_SUB_8(SRC, REG_A, FLAG_C); \
FLAG_N = FLAG_Z = REG_A = MAKE_UINT_8(FLAG_C); \
FLAG_C = ~FLAG_C; \
BREAKOUT; \
} \
- DST = CFLAG_AS_1(); \
+ DST = CFLAG_1(); \
FLAG_C = REG_A - SRC - DST; \
FLAG_V = VFLAG_SUB_8(SRC, REG_A, FLAG_C); \
if((FLAG_C & 0xf) > 9) \
@@ -1411,21 +1411,21 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
FLAG_C = ~FLAG_C; \
if(!FLAG_D) \
{ \
- FLAG_C = REG_A - SRC - CFLAG_AS_1(); \
+ FLAG_C = REG_A - SRC - CFLAG_1(); \
FLAG_V = VFLAG_SUB_16(SRC, REG_A, FLAG_C); \
FLAG_Z = REG_A = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(REG_A); \
FLAG_C = ~CFLAG_16(FLAG_C); \
BREAKOUT; \
} \
- DST = CFLAG_AS_1(); \
+ DST = CFLAG_1(); \
FLAG_C = MAKE_UINT_8(REG_A) - MAKE_UINT_8(SRC) - DST; \
if((FLAG_C & 0xf) > 9) \
FLAG_C-=6; \
if((FLAG_C & 0xf0) > 0x90) \
FLAG_C-=0x60; \
FLAG_Z = MAKE_UINT_8(FLAG_C); \
- DST = CFLAG_AS_1(); \
+ DST = CFLAG_1(); \
FLAG_C = MAKE_UINT_8(REG_A>>8) - MAKE_UINT_8(SRC>>8) - DST; \
if((FLAG_C & 0xf) > 9) \
FLAG_C-=6; \
@@ -1448,13 +1448,13 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
FLAG_C = ~FLAG_C; \
if(!FLAG_D) \
{ \
- FLAG_C = REG_BA - SRC - CFLAG_AS_1(); \
+ FLAG_C = REG_BA - SRC - CFLAG_1(); \
FLAG_V = VFLAG_SUB_8(SRC, REG_BA, FLAG_C); \
FLAG_N = FLAG_Z = REG_BA = MAKE_UINT_8(FLAG_C); \
FLAG_C = ~FLAG_C; \
BREAKOUT; \
} \
- DST = CFLAG_AS_1(); \
+ DST = CFLAG_1(); \
FLAG_C = REG_BA - SRC - DST; \
FLAG_V = VFLAG_SUB_8(SRC, REG_BA, FLAG_C); \
if((FLAG_C & 0xf) > 9) \
@@ -1470,21 +1470,21 @@ void m37710_cpu_device::m37710i_set_reg_p(uint32_t value)
FLAG_C = ~FLAG_C; \
if(!FLAG_D) \
{ \
- FLAG_C = REG_BA - SRC - CFLAG_AS_1(); \
+ FLAG_C = REG_BA - SRC - CFLAG_1(); \
FLAG_V = VFLAG_SUB_16(SRC, REG_BA, FLAG_C); \
FLAG_Z = REG_BA = MAKE_UINT_16(FLAG_C); \
FLAG_N = NFLAG_16(REG_BA); \
FLAG_C = ~CFLAG_16(FLAG_C); \
BREAKOUT; \
} \
- DST = CFLAG_AS_1(); \
+ DST = CFLAG_1(); \
FLAG_C = MAKE_UINT_8(REG_BA) - MAKE_UINT_8(SRC) - DST; \
if((FLAG_C & 0xf) > 9) \
FLAG_C-=6; \
if((FLAG_C & 0xf0) > 0x90) \
FLAG_C-=0x60; \
FLAG_Z = MAKE_UINT_8(FLAG_C); \
- DST = CFLAG_AS_1(); \
+ DST = CFLAG_1(); \
FLAG_C = MAKE_UINT_8(REG_A>>8) - MAKE_UINT_8(SRC>>8) - DST; \
if((FLAG_C & 0xf) > 9) \
FLAG_C-=6; \
diff --git a/src/devices/cpu/m6502/deco16.cpp b/src/devices/cpu/m6502/deco16.cpp
index a73f8e12db0..6d80bb6b5ab 100644
--- a/src/devices/cpu/m6502/deco16.cpp
+++ b/src/devices/cpu/m6502/deco16.cpp
@@ -40,15 +40,19 @@ void deco16_device::device_start()
io = &space(AS_IO);
}
-const address_space_config *deco16_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> deco16_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &program_config;
- case AS_IO: return &io_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &sprogram_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_OPCODES, &sprogram_config),
+ std::make_pair(AS_IO, &io_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_IO, &io_config)
+ };
}
#include "cpu/m6502/deco16.hxx"
diff --git a/src/devices/cpu/m6502/deco16.h b/src/devices/cpu/m6502/deco16.h
index 73c2314d945..065937ea331 100644
--- a/src/devices/cpu/m6502/deco16.h
+++ b/src/devices/cpu/m6502/deco16.h
@@ -27,7 +27,7 @@ protected:
address_space *io;
address_space_config io_config;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual void device_start() override;
#define O(o) void o ## _full(); void o ## _partial()
diff --git a/src/devices/cpu/m6502/m3745x.cpp b/src/devices/cpu/m6502/m3745x.cpp
index d92e2835e57..62a4c3f655c 100644
--- a/src/devices/cpu/m6502/m3745x.cpp
+++ b/src/devices/cpu/m6502/m3745x.cpp
@@ -112,6 +112,12 @@ void m3745x_device::device_start()
m_last_all_ints = 0;
}
+std::vector<std::pair<int, const address_space_config *>> m3745x_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
//-------------------------------------------------
// device_reset - device-specific reset
diff --git a/src/devices/cpu/m6502/m3745x.h b/src/devices/cpu/m6502/m3745x.h
index 2b592ae4e9e..a9be38254f2 100644
--- a/src/devices/cpu/m6502/m3745x.h
+++ b/src/devices/cpu/m6502/m3745x.h
@@ -125,7 +125,7 @@ protected:
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
virtual void execute_set_input(int inputnum, int state) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
void send_port(address_space &space, uint8_t offset, uint8_t data);
uint8_t read_port(uint8_t offset);
diff --git a/src/devices/cpu/m6502/m4510.cpp b/src/devices/cpu/m6502/m4510.cpp
index fb84a15112a..852d3e5807a 100644
--- a/src/devices/cpu/m6502/m4510.cpp
+++ b/src/devices/cpu/m6502/m4510.cpp
@@ -56,7 +56,7 @@ void m4510_device::device_reset()
m65ce02_device::device_reset();
}
-bool m4510_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool m4510_device::memory_translate(int spacenum, int intention, offs_t &address)
{
if (spacenum == AS_PROGRAM)
{
diff --git a/src/devices/cpu/m6502/m4510.h b/src/devices/cpu/m6502/m4510.h
index 4b25f0c9c26..b093c8aeb56 100644
--- a/src/devices/cpu/m6502/m4510.h
+++ b/src/devices/cpu/m6502/m4510.h
@@ -54,7 +54,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
inline uint32_t map(uint16_t adr) {
if(map_enable & (1 << (adr >> 13))) {
diff --git a/src/devices/cpu/m6502/m5074x.h b/src/devices/cpu/m6502/m5074x.h
index 635c0d9f552..3947cb6d6f8 100644
--- a/src/devices/cpu/m6502/m5074x.h
+++ b/src/devices/cpu/m6502/m5074x.h
@@ -101,7 +101,7 @@ protected:
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
virtual void execute_set_input(int inputnum, int state) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
void send_port(address_space &space, uint8_t offset, uint8_t data);
uint8_t read_port(uint8_t offset);
diff --git a/src/devices/cpu/m6502/m6502.cpp b/src/devices/cpu/m6502/m6502.cpp
index a3e889bea2f..3e00e8b53da 100644
--- a/src/devices/cpu/m6502/m6502.cpp
+++ b/src/devices/cpu/m6502/m6502.cpp
@@ -402,14 +402,17 @@ void m6502_device::execute_set_input(int inputnum, int state)
}
-const address_space_config *m6502_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m6502_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &program_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &sprogram_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_OPCODES, &sprogram_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config)
+ };
}
diff --git a/src/devices/cpu/m6502/m6502.h b/src/devices/cpu/m6502/m6502.h
index d764e906ab8..d636d5e9765 100644
--- a/src/devices/cpu/m6502/m6502.h
+++ b/src/devices/cpu/m6502/m6502.h
@@ -137,7 +137,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/m6502/n2a03.cpp b/src/devices/cpu/m6502/n2a03.cpp
index ff180a8adea..7548089cc15 100644
--- a/src/devices/cpu/m6502/n2a03.cpp
+++ b/src/devices/cpu/m6502/n2a03.cpp
@@ -119,14 +119,17 @@ void n2a03_device::device_clock_changed()
m_apu->set_unscaled_clock(clock());
}
-const address_space_config *n2a03_device::memory_space_config(address_spacenum spacenum) const
-{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &sprogram_config : nullptr;
- default: return nullptr;
- }
+std::vector<std::pair<int, const address_space_config *>> n2a03_device::memory_space_config() const
+{
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_OPCODES, &sprogram_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config)
+ };
}
diff --git a/src/devices/cpu/m6502/n2a03.h b/src/devices/cpu/m6502/n2a03.h
index d27b0904d5d..da378fc3dbd 100644
--- a/src/devices/cpu/m6502/n2a03.h
+++ b/src/devices/cpu/m6502/n2a03.h
@@ -66,7 +66,7 @@ protected:
#undef O
virtual void device_add_mconfig(machine_config &config) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
address_space_config m_program_config;
diff --git a/src/devices/cpu/m6800/m6800.cpp b/src/devices/cpu/m6800/m6800.cpp
index 33d34350716..f84423939fa 100644
--- a/src/devices/cpu/m6800/m6800.cpp
+++ b/src/devices/cpu/m6800/m6800.cpp
@@ -358,17 +358,19 @@ nsc8105_cpu_device::nsc8105_cpu_device(const machine_config &mconfig, const char
{
}
-const address_space_config *m6800_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m6800_cpu_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_decrypted_opcodes_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_decrypted_opcodes_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
-
uint32_t m6800_cpu_device::RM16(uint32_t Addr )
{
uint32_t result = RM(Addr) << 8;
diff --git a/src/devices/cpu/m6800/m6800.h b/src/devices/cpu/m6800/m6800.h
index 902f6bc2932..09ac5b86c98 100644
--- a/src/devices/cpu/m6800/m6800.h
+++ b/src/devices/cpu/m6800/m6800.h
@@ -59,7 +59,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/m6800/m6801.cpp b/src/devices/cpu/m6800/m6801.cpp
index 0ef6439cb83..0f806c448fa 100644
--- a/src/devices/cpu/m6800/m6801.cpp
+++ b/src/devices/cpu/m6800/m6801.cpp
@@ -294,16 +294,13 @@ hd6303y_cpu_device::hd6303y_cpu_device(const machine_config &mconfig, const char
{
}
-const address_space_config *m6801_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m6801_cpu_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_IO: return &m_io_config;
- default: return m6800_cpu_device::memory_space_config(spacenum);
- }
+ auto r = m6800_cpu_device::memory_space_config();
+ r.emplace_back(std::make_pair(AS_IO, &m_io_config));
+ return r;
}
-
void m6801_cpu_device::m6800_check_irq2()
{
if ((m_tcsr & (TCSR_EICI|TCSR_ICF)) == (TCSR_EICI|TCSR_ICF))
diff --git a/src/devices/cpu/m6800/m6801.h b/src/devices/cpu/m6800/m6801.h
index 23bc7b4a28a..2211a4f0421 100644
--- a/src/devices/cpu/m6800/m6801.h
+++ b/src/devices/cpu/m6800/m6801.h
@@ -84,7 +84,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
diff --git a/src/devices/cpu/m68000/m68000.h b/src/devices/cpu/m68000/m68000.h
index c3aae63b454..0ad63651d6a 100644
--- a/src/devices/cpu/m68000/m68000.h
+++ b/src/devices/cpu/m68000/m68000.h
@@ -149,7 +149,7 @@ public:
virtual void device_stop() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address spaces
const address_space_config m_program_config, m_oprogram_config;
@@ -395,7 +395,7 @@ public:
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
- virtual bool memory_translate(address_spacenum space, int intention, offs_t &address) override;
+ virtual bool memory_translate(int space, int intention, offs_t &address) override;
};
@@ -596,7 +596,7 @@ public:
virtual uint32_t execute_default_irq_vector() const override { return -1; };
- virtual bool memory_translate(address_spacenum space, int intention, offs_t &address) override;
+ virtual bool memory_translate(int space, int intention, offs_t &address) override;
// device-level overrides
virtual void device_start() override;
diff --git a/src/devices/cpu/m68000/m68k_in.cpp b/src/devices/cpu/m68000/m68k_in.cpp
index 835054753fa..dd58233b747 100644
--- a/src/devices/cpu/m68000/m68k_in.cpp
+++ b/src/devices/cpu/m68000/m68k_in.cpp
@@ -928,7 +928,7 @@ M68KMAKE_OP(abcd, 8, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = DY(mc68kcpu);
uint32_t dst = *r_dst;
- uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_1(mc68kcpu);
(mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
@@ -954,7 +954,7 @@ M68KMAKE_OP(abcd, 8, mm, ax7)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_1(mc68kcpu);
(mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
@@ -980,7 +980,7 @@ M68KMAKE_OP(abcd, 8, mm, ay7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_1(mc68kcpu);
(mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
@@ -1006,7 +1006,7 @@ M68KMAKE_OP(abcd, 8, mm, axy7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_1(mc68kcpu);
(mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
@@ -1032,7 +1032,7 @@ M68KMAKE_OP(abcd, 8, mm, .)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(src) + LOW_NIBBLE(dst) + XFLAG_1(mc68kcpu);
(mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
@@ -1493,7 +1493,7 @@ M68KMAKE_OP(addx, 8, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
@@ -1511,7 +1511,7 @@ M68KMAKE_OP(addx, 16, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_16(res);
(mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
@@ -1529,7 +1529,7 @@ M68KMAKE_OP(addx, 32, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = DY(mc68kcpu);
uint32_t dst = *r_dst;
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_32(res);
(mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
@@ -1547,7 +1547,7 @@ M68KMAKE_OP(addx, 8, mm, ax7)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
@@ -1565,7 +1565,7 @@ M68KMAKE_OP(addx, 8, mm, ay7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
@@ -1583,7 +1583,7 @@ M68KMAKE_OP(addx, 8, mm, axy7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
@@ -1601,7 +1601,7 @@ M68KMAKE_OP(addx, 8, mm, .)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->v_flag = VFLAG_ADD_8(src, dst, res);
@@ -1619,7 +1619,7 @@ M68KMAKE_OP(addx, 16, mm, .)
uint32_t src = OPER_AY_PD_16(mc68kcpu);
uint32_t ea = EA_AX_PD_16(mc68kcpu);
uint32_t dst = m68ki_read_16((mc68kcpu), ea);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_16(res);
(mc68kcpu)->v_flag = VFLAG_ADD_16(src, dst, res);
@@ -1637,7 +1637,7 @@ M68KMAKE_OP(addx, 32, mm, .)
uint32_t src = OPER_AY_PD_32(mc68kcpu);
uint32_t ea = EA_AX_PD_32(mc68kcpu);
uint32_t dst = m68ki_read_32((mc68kcpu), ea);
- uint32_t res = src + dst + XFLAG_AS_1(mc68kcpu);
+ uint32_t res = src + dst + XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_32(res);
(mc68kcpu)->v_flag = VFLAG_ADD_32(src, dst, res);
@@ -7606,7 +7606,7 @@ M68KMAKE_OP(nbcd, 8, ., d)
{
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t dst = *r_dst;
- uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+ uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_1(mc68kcpu));
if(res != 0x9a)
{
@@ -7639,7 +7639,7 @@ M68KMAKE_OP(nbcd, 8, ., .)
{
uint32_t ea = M68KMAKE_GET_EA_AY_8;
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_AS_1(mc68kcpu));
+ uint32_t res = MASK_OUT_ABOVE_8(0x9a - dst - XFLAG_1(mc68kcpu));
if(res != 0x9a)
{
@@ -7758,7 +7758,7 @@ M68KMAKE_OP(neg, 32, ., .)
M68KMAKE_OP(negx, 8, ., d)
{
uint32_t* r_dst = &DY(mc68kcpu);
- uint32_t res = 0 - MASK_OUT_ABOVE_8(*r_dst) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = 0 - MASK_OUT_ABOVE_8(*r_dst) - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -7775,7 +7775,7 @@ M68KMAKE_OP(negx, 8, ., .)
{
uint32_t ea = M68KMAKE_GET_EA_AY_8;
uint32_t src = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = 0 - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = 0 - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -7791,7 +7791,7 @@ M68KMAKE_OP(negx, 8, ., .)
M68KMAKE_OP(negx, 16, ., d)
{
uint32_t* r_dst = &DY(mc68kcpu);
- uint32_t res = 0 - MASK_OUT_ABOVE_16(*r_dst) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = 0 - MASK_OUT_ABOVE_16(*r_dst) - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_16(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
@@ -7808,7 +7808,7 @@ M68KMAKE_OP(negx, 16, ., .)
{
uint32_t ea = M68KMAKE_GET_EA_AY_16;
uint32_t src = m68ki_read_16((mc68kcpu), ea);
- uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = 0 - MASK_OUT_ABOVE_16(src) - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_16(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
@@ -7824,7 +7824,7 @@ M68KMAKE_OP(negx, 16, ., .)
M68KMAKE_OP(negx, 32, ., d)
{
uint32_t* r_dst = &DY(mc68kcpu);
- uint32_t res = 0 - MASK_OUT_ABOVE_32(*r_dst) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = 0 - MASK_OUT_ABOVE_32(*r_dst) - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_32(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(*r_dst, 0, res);
@@ -7841,7 +7841,7 @@ M68KMAKE_OP(negx, 32, ., .)
{
uint32_t ea = M68KMAKE_GET_EA_AY_32;
uint32_t src = m68ki_read_32((mc68kcpu), ea);
- uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = 0 - MASK_OUT_ABOVE_32(src) - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_32(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, 0, res);
@@ -8624,7 +8624,7 @@ M68KMAKE_OP(roxr, 8, s, .)
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
- uint32_t res = ROR_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+ uint32_t res = ROR_9(src | (XFLAG_1(mc68kcpu) << 8), shift);
if(shift != 0)
(mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
@@ -8645,7 +8645,7 @@ M68KMAKE_OP(roxr, 16, s, .)
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
- uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+ uint32_t res = ROR_17(src | (XFLAG_1(mc68kcpu) << 16), shift);
if(shift != 0)
(mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
@@ -8666,7 +8666,7 @@ M68KMAKE_OP(roxr, 32, s, .)
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
uint64_t src = *r_dst;
- uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
+ uint64_t res = src | (((uint64_t)XFLAG_1(mc68kcpu)) << 32);
if(shift != 0)
(mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
@@ -8693,7 +8693,7 @@ M68KMAKE_OP(roxr, 8, r, .)
{
uint32_t shift = orig_shift % 9;
uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
- uint32_t res = ROR_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+ uint32_t res = ROR_9(src | (XFLAG_1(mc68kcpu) << 8), shift);
(mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
@@ -8723,7 +8723,7 @@ M68KMAKE_OP(roxr, 16, r, .)
{
uint32_t shift = orig_shift % 17;
uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
- uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+ uint32_t res = ROR_17(src | (XFLAG_1(mc68kcpu) << 16), shift);
(mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
@@ -8753,7 +8753,7 @@ M68KMAKE_OP(roxr, 32, r, .)
{
uint32_t shift = orig_shift % 33;
uint64_t src = *r_dst;
- uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
+ uint64_t res = src | (((uint64_t)XFLAG_1(mc68kcpu)) << 32);
res = ROR_33_64(res, shift);
@@ -8780,7 +8780,7 @@ M68KMAKE_OP(roxr, 16, ., .)
{
uint32_t ea = M68KMAKE_GET_EA_AY_16;
uint32_t src = m68ki_read_16((mc68kcpu), ea);
- uint32_t res = ROR_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+ uint32_t res = ROR_17(src | (XFLAG_1(mc68kcpu) << 16), 1);
(mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
res = MASK_OUT_ABOVE_16(res);
@@ -8798,7 +8798,7 @@ M68KMAKE_OP(roxl, 8, s, .)
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
- uint32_t res = ROL_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+ uint32_t res = ROL_9(src | (XFLAG_1(mc68kcpu) << 8), shift);
if(shift != 0)
(mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
@@ -8819,7 +8819,7 @@ M68KMAKE_OP(roxl, 16, s, .)
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
- uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+ uint32_t res = ROL_17(src | (XFLAG_1(mc68kcpu) << 16), shift);
if(shift != 0)
(mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
@@ -8840,7 +8840,7 @@ M68KMAKE_OP(roxl, 32, s, .)
uint32_t* r_dst = &DY(mc68kcpu);
uint32_t shift = ((((mc68kcpu)->ir >> 9) - 1) & 7) + 1;
uint64_t src = *r_dst;
- uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
+ uint64_t res = src | (((uint64_t)XFLAG_1(mc68kcpu)) << 32);
if(shift != 0)
(mc68kcpu)->remaining_cycles -= shift<<(mc68kcpu)->cyc_shift;
@@ -8868,7 +8868,7 @@ M68KMAKE_OP(roxl, 8, r, .)
{
uint32_t shift = orig_shift % 9;
uint32_t src = MASK_OUT_ABOVE_8(*r_dst);
- uint32_t res = ROL_9(src | (XFLAG_AS_1(mc68kcpu) << 8), shift);
+ uint32_t res = ROL_9(src | (XFLAG_1(mc68kcpu) << 8), shift);
(mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
@@ -8898,7 +8898,7 @@ M68KMAKE_OP(roxl, 16, r, .)
{
uint32_t shift = orig_shift % 17;
uint32_t src = MASK_OUT_ABOVE_16(*r_dst);
- uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), shift);
+ uint32_t res = ROL_17(src | (XFLAG_1(mc68kcpu) << 16), shift);
(mc68kcpu)->remaining_cycles -= orig_shift<<(mc68kcpu)->cyc_shift;
@@ -8928,7 +8928,7 @@ M68KMAKE_OP(roxl, 32, r, .)
{
uint32_t shift = orig_shift % 33;
uint64_t src = *r_dst;
- uint64_t res = src | (((uint64_t)XFLAG_AS_1(mc68kcpu)) << 32);
+ uint64_t res = src | (((uint64_t)XFLAG_1(mc68kcpu)) << 32);
res = ROL_33_64(res, shift);
@@ -8955,7 +8955,7 @@ M68KMAKE_OP(roxl, 16, ., .)
{
uint32_t ea = M68KMAKE_GET_EA_AY_16;
uint32_t src = m68ki_read_16((mc68kcpu), ea);
- uint32_t res = ROL_17(src | (XFLAG_AS_1(mc68kcpu) << 16), 1);
+ uint32_t res = ROL_17(src | (XFLAG_1(mc68kcpu) << 16), 1);
(mc68kcpu)->c_flag = (mc68kcpu)->x_flag = res >> 8;
res = MASK_OUT_ABOVE_16(res);
@@ -9180,7 +9180,7 @@ M68KMAKE_OP(sbcd, 8, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = DY(mc68kcpu);
uint32_t dst = *r_dst;
- uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_1(mc68kcpu);
// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
(mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to assume cleared. */
@@ -9212,7 +9212,7 @@ M68KMAKE_OP(sbcd, 8, mm, ax7)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_1(mc68kcpu);
// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
(mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
@@ -9244,7 +9244,7 @@ M68KMAKE_OP(sbcd, 8, mm, ay7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_1(mc68kcpu);
// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
(mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
@@ -9276,7 +9276,7 @@ M68KMAKE_OP(sbcd, 8, mm, axy7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_1(mc68kcpu);
// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
(mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
@@ -9308,7 +9308,7 @@ M68KMAKE_OP(sbcd, 8, mm, .)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = LOW_NIBBLE(dst) - LOW_NIBBLE(src) - XFLAG_1(mc68kcpu);
// (mc68kcpu)->v_flag = ~res; /* Undefined V behavior */
(mc68kcpu)->v_flag = VFLAG_CLEAR; /* Undefined in Motorola's M68000PM/AD rev.1 and safer to return zero. */
@@ -9831,7 +9831,7 @@ M68KMAKE_OP(subx, 8, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = MASK_OUT_ABOVE_8(DY(mc68kcpu));
uint32_t dst = MASK_OUT_ABOVE_8(*r_dst);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -9849,7 +9849,7 @@ M68KMAKE_OP(subx, 16, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = MASK_OUT_ABOVE_16(DY(mc68kcpu));
uint32_t dst = MASK_OUT_ABOVE_16(*r_dst);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_16(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
@@ -9867,7 +9867,7 @@ M68KMAKE_OP(subx, 32, rr, .)
uint32_t* r_dst = &DX(mc68kcpu);
uint32_t src = DY(mc68kcpu);
uint32_t dst = *r_dst;
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_32(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
@@ -9885,7 +9885,7 @@ M68KMAKE_OP(subx, 8, mm, ax7)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -9903,7 +9903,7 @@ M68KMAKE_OP(subx, 8, mm, ay7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -9921,7 +9921,7 @@ M68KMAKE_OP(subx, 8, mm, axy7)
uint32_t src = OPER_A7_PD_8(mc68kcpu);
uint32_t ea = EA_A7_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -9939,7 +9939,7 @@ M68KMAKE_OP(subx, 8, mm, .)
uint32_t src = OPER_AY_PD_8(mc68kcpu);
uint32_t ea = EA_AX_PD_8(mc68kcpu);
uint32_t dst = m68ki_read_8((mc68kcpu), ea);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_8(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_8(res);
@@ -9957,7 +9957,7 @@ M68KMAKE_OP(subx, 16, mm, .)
uint32_t src = OPER_AY_PD_16(mc68kcpu);
uint32_t ea = EA_AX_PD_16(mc68kcpu);
uint32_t dst = m68ki_read_16((mc68kcpu), ea);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_16(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_16(res);
@@ -9975,7 +9975,7 @@ M68KMAKE_OP(subx, 32, mm, .)
uint32_t src = OPER_AY_PD_32(mc68kcpu);
uint32_t ea = EA_AX_PD_32(mc68kcpu);
uint32_t dst = m68ki_read_32((mc68kcpu), ea);
- uint32_t res = dst - src - XFLAG_AS_1(mc68kcpu);
+ uint32_t res = dst - src - XFLAG_1(mc68kcpu);
(mc68kcpu)->n_flag = NFLAG_32(res);
(mc68kcpu)->x_flag = (mc68kcpu)->c_flag = CFLAG_SUB_32(src, dst, res);
diff --git a/src/devices/cpu/m68000/m68kcpu.cpp b/src/devices/cpu/m68000/m68kcpu.cpp
index 77ed9ff89c7..0c03bb615fb 100644
--- a/src/devices/cpu/m68000/m68kcpu.cpp
+++ b/src/devices/cpu/m68000/m68kcpu.cpp
@@ -704,7 +704,7 @@ static void m68k_cause_bus_error(m68000_base_device *m68k)
m68ki_jump_vector(m68k, EXCEPTION_BUS_ERROR);
}
-bool m68000_base_device::memory_translate(address_spacenum space, int intention, offs_t &address)
+bool m68000_base_device::memory_translate(int space, int intention, offs_t &address)
{
/* only applies to the program address space and only does something if the MMU's enabled */
{
@@ -2483,14 +2483,17 @@ void m68000_base_device::execute_set_input(int inputnum, int state)
}
-const address_space_config *m68000_base_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m68000_base_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_oprogram_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_oprogram_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
@@ -2624,7 +2627,7 @@ void m68020pmmu_device::device_start()
init_cpu_m68020pmmu();
}
-bool m68020hmmu_device::memory_translate(address_spacenum space, int intention, offs_t &address)
+bool m68020hmmu_device::memory_translate(int space, int intention, offs_t &address)
{
/* only applies to the program address space and only does something if the MMU's enabled */
{
diff --git a/src/devices/cpu/m68000/m68kcpu.h b/src/devices/cpu/m68000/m68kcpu.h
index 41d9e93c883..df2a754a13f 100644
--- a/src/devices/cpu/m68000/m68kcpu.h
+++ b/src/devices/cpu/m68000/m68kcpu.h
@@ -375,11 +375,11 @@ class m68000_base_device;
#define MFLAG_CLEAR 0
/* Turn flag values into 1 or 0 */
-#define XFLAG_AS_1(M) (((M)->x_flag>>8)&1)
-#define NFLAG_AS_1(M) (((M)->n_flag>>7)&1)
-#define VFLAG_AS_1(M) (((M)->v_flag>>7)&1)
-#define ZFLAG_AS_1(M) (!(M)->not_z_flag)
-#define CFLAG_AS_1(M) (((M)->c_flag>>8)&1)
+#define XFLAG_1(M) (((M)->x_flag>>8)&1)
+#define NFLAG_1(M) (((M)->n_flag>>7)&1)
+#define VFLAG_1(M) (((M)->v_flag>>7)&1)
+#define ZFLAG_1(M) (!(M)->not_z_flag)
+#define CFLAG_1(M) (((M)->c_flag>>8)&1)
/* Conditions */
diff --git a/src/devices/cpu/m6805/m6805.cpp b/src/devices/cpu/m6805/m6805.cpp
index a4b8a1c10e9..4d3009b0c8c 100644
--- a/src/devices/cpu/m6805/m6805.cpp
+++ b/src/devices/cpu/m6805/m6805.cpp
@@ -319,12 +319,11 @@ void m6805_base_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *m6805_base_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m6805_base_device::memory_space_config() const
{
- if (spacenum == AS_PROGRAM)
- return &m_program_config;
- else
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/m6805/m6805.h b/src/devices/cpu/m6805/m6805.h
index aad9b371751..b71aabb105a 100644
--- a/src/devices/cpu/m6805/m6805.h
+++ b/src/devices/cpu/m6805/m6805.h
@@ -116,7 +116,7 @@ protected:
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/m6809/m6809.cpp b/src/devices/cpu/m6809/m6809.cpp
index b6e66f82a0b..573da2d477f 100644
--- a/src/devices/cpu/m6809/m6809.cpp
+++ b/src/devices/cpu/m6809/m6809.cpp
@@ -292,14 +292,17 @@ void m6809_base_device::device_post_load()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *m6809_base_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m6809_base_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_sprogram_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_sprogram_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/m6809/m6809.h b/src/devices/cpu/m6809/m6809.h
index bfe82224b4d..4d67d7977a2 100644
--- a/src/devices/cpu/m6809/m6809.h
+++ b/src/devices/cpu/m6809/m6809.h
@@ -68,7 +68,7 @@ protected:
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/mb86233/mb86233.cpp b/src/devices/cpu/mb86233/mb86233.cpp
index 3d7a4be3155..b071a964c51 100644
--- a/src/devices/cpu/mb86233/mb86233.cpp
+++ b/src/devices/cpu/mb86233/mb86233.cpp
@@ -37,6 +37,14 @@ mb86233_cpu_device::mb86233_cpu_device(const machine_config &mconfig, const char
{
}
+std::vector<std::pair<int, const address_space_config *>> mb86233_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
offs_t mb86233_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/mb86233/mb86233.h b/src/devices/cpu/mb86233/mb86233.h
index d95fbd9b1f5..3d1383e874d 100644
--- a/src/devices/cpu/mb86233/mb86233.h
+++ b/src/devices/cpu/mb86233/mb86233.h
@@ -71,7 +71,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/mb86235/mb86235.cpp b/src/devices/cpu/mb86235/mb86235.cpp
index e1f6c6ec41f..781a848f712 100644
--- a/src/devices/cpu/mb86235/mb86235.cpp
+++ b/src/devices/cpu/mb86235/mb86235.cpp
@@ -215,6 +215,14 @@ mb86235_device::mb86235_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> mb86235_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_dataa_config),
+ std::make_pair(AS_IO, &m_datab_config)
+ };
+}
void mb86235_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
diff --git a/src/devices/cpu/mb86235/mb86235.h b/src/devices/cpu/mb86235/mb86235.h
index c5826ea8960..99864e9aec5 100644
--- a/src/devices/cpu/mb86235/mb86235.h
+++ b/src/devices/cpu/mb86235/mb86235.h
@@ -65,7 +65,7 @@ protected:
//virtual void execute_set_input(int inputnum, int state);
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_dataa_config : (spacenum == AS_IO) ? &m_datab_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/mb88xx/mb88xx.cpp b/src/devices/cpu/mb88xx/mb88xx.cpp
index 864ac02d184..eb0e3ebc422 100644
--- a/src/devices/cpu/mb88xx/mb88xx.cpp
+++ b/src/devices/cpu/mb88xx/mb88xx.cpp
@@ -154,6 +154,13 @@ mb8844_cpu_device::mb8844_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> mb88_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
offs_t mb88_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/mb88xx/mb88xx.h b/src/devices/cpu/mb88xx/mb88xx.h
index 25264d3db5d..d3c5be393cc 100644
--- a/src/devices/cpu/mb88xx/mb88xx.h
+++ b/src/devices/cpu/mb88xx/mb88xx.h
@@ -157,7 +157,7 @@ protected:
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 6); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : (spacenum == AS_DATA) ? &m_data_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.cpp b/src/devices/cpu/mc68hc11/mc68hc11.cpp
index 3bac6f74f14..098d7c18c4d 100644
--- a/src/devices/cpu/mc68hc11/mc68hc11.cpp
+++ b/src/devices/cpu/mc68hc11/mc68hc11.cpp
@@ -53,6 +53,13 @@ mc68hc11_cpu_device::mc68hc11_cpu_device(const machine_config &mconfig, const ch
{
}
+std::vector<std::pair<int, const address_space_config *>> mc68hc11_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
offs_t mc68hc11_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/mc68hc11/mc68hc11.h b/src/devices/cpu/mc68hc11/mc68hc11.h
index 1156eed45c3..15d148cc6d5 100644
--- a/src/devices/cpu/mc68hc11/mc68hc11.h
+++ b/src/devices/cpu/mc68hc11/mc68hc11.h
@@ -64,10 +64,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/mcs40/mcs40.cpp b/src/devices/cpu/mcs40/mcs40.cpp
index 4608545b33a..a2090eb4c20 100644
--- a/src/devices/cpu/mcs40/mcs40.cpp
+++ b/src/devices/cpu/mcs40/mcs40.cpp
@@ -323,16 +323,14 @@ void mcs40_cpu_device_base::execute_run()
device_memory_interface implementation
***********************************************************************/
-address_space_config const *mcs40_cpu_device_base::memory_space_config(address_spacenum spacenum) const
-{
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_DATA: return &m_data_config;
- case AS_IO: return &m_io_config;
- case AS_OPCODES: return &m_opcodes_config;
- default: return nullptr;
- }
+std::vector<std::pair<int, const address_space_config *>> mcs40_cpu_device_base::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config),
+ std::make_pair(AS_OPCODES, &m_opcodes_config)
+ };
}
diff --git a/src/devices/cpu/mcs40/mcs40.h b/src/devices/cpu/mcs40/mcs40.h
index 248bc66617a..40838d40fd4 100644
--- a/src/devices/cpu/mcs40/mcs40.h
+++ b/src/devices/cpu/mcs40/mcs40.h
@@ -128,7 +128,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface configuration
- virtual address_space_config const *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface implementation
virtual void state_import(device_state_entry const &entry) override;
diff --git a/src/devices/cpu/mcs48/mcs48.cpp b/src/devices/cpu/mcs48/mcs48.cpp
index 0a1bf4432cb..35072a38589 100644
--- a/src/devices/cpu/mcs48/mcs48.cpp
+++ b/src/devices/cpu/mcs48/mcs48.cpp
@@ -332,6 +332,14 @@ i8742_device::i8742_device(const machine_config &mconfig, const char *tag, devic
{
}
+std::vector<std::pair<int, const address_space_config *>> mcs48_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
offs_t mcs48_cpu_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/mcs48/mcs48.h b/src/devices/cpu/mcs48/mcs48.h
index 274224099e9..dd1693558a2 100644
--- a/src/devices/cpu/mcs48/mcs48.h
+++ b/src/devices/cpu/mcs48/mcs48.h
@@ -172,10 +172,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/mcs51/mcs51.cpp b/src/devices/cpu/mcs51/mcs51.cpp
index 997f475ccbc..99ccb6774dc 100644
--- a/src/devices/cpu/mcs51/mcs51.cpp
+++ b/src/devices/cpu/mcs51/mcs51.cpp
@@ -374,6 +374,15 @@ ds5002fp_device::ds5002fp_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> mcs51_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
/***************************************************************************
MACROS
diff --git a/src/devices/cpu/mcs51/mcs51.h b/src/devices/cpu/mcs51/mcs51.h
index e9c9109c860..62f9840cec0 100644
--- a/src/devices/cpu/mcs51/mcs51.h
+++ b/src/devices/cpu/mcs51/mcs51.h
@@ -107,10 +107,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/mcs96/i8x9x.cpp b/src/devices/cpu/mcs96/i8x9x.cpp
index 1118ef80c36..4266aaf2a1f 100644
--- a/src/devices/cpu/mcs96/i8x9x.cpp
+++ b/src/devices/cpu/mcs96/i8x9x.cpp
@@ -23,9 +23,12 @@ offs_t i8x9x_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u
return disasm_generic(stream, pc, oprom, opram, options, disasm_entries);
}
-const address_space_config *i8x9x_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i8x9x_device::memory_space_config() const
{
- return spacenum == AS_PROGRAM ? &program_config : spacenum == AS_IO ? &io_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_IO, &io_config)
+ };
}
void i8x9x_device::device_start()
diff --git a/src/devices/cpu/mcs96/i8x9x.h b/src/devices/cpu/mcs96/i8x9x.h
index 1951f672ada..ef9c8b0ab74 100644
--- a/src/devices/cpu/mcs96/i8x9x.h
+++ b/src/devices/cpu/mcs96/i8x9x.h
@@ -28,7 +28,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
static const disasm_entry disasm_entries[0x100];
diff --git a/src/devices/cpu/mcs96/mcs96.cpp b/src/devices/cpu/mcs96/mcs96.cpp
index 11d9cf23f30..ff229b231ce 100644
--- a/src/devices/cpu/mcs96/mcs96.cpp
+++ b/src/devices/cpu/mcs96/mcs96.cpp
@@ -116,9 +116,11 @@ void mcs96_device::execute_set_input(int inputnum, int state)
}
}
-const address_space_config *mcs96_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mcs96_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &program_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config)
+ };
}
void mcs96_device::state_import(const device_state_entry &entry)
diff --git a/src/devices/cpu/mcs96/mcs96.h b/src/devices/cpu/mcs96/mcs96.h
index 57c4e2cedd4..1023b794e27 100644
--- a/src/devices/cpu/mcs96/mcs96.h
+++ b/src/devices/cpu/mcs96/mcs96.h
@@ -88,7 +88,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/melps4/melps4.cpp b/src/devices/cpu/melps4/melps4.cpp
index 4205851634b..6a888e5165d 100644
--- a/src/devices/cpu/melps4/melps4.cpp
+++ b/src/devices/cpu/melps4/melps4.cpp
@@ -234,7 +234,13 @@ void melps4_cpu_device::device_start()
m_icountptr = &m_icount;
}
-
+std::vector<std::pair<int, const address_space_config *>> melps4_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
//-------------------------------------------------
// device_reset - device-specific reset
diff --git a/src/devices/cpu/melps4/melps4.h b/src/devices/cpu/melps4/melps4.h
index 627bca9042d..f90c6f4bfa5 100644
--- a/src/devices/cpu/melps4/melps4.h
+++ b/src/devices/cpu/melps4/melps4.h
@@ -132,7 +132,7 @@ protected:
virtual void execute_one();
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/minx/minx.cpp b/src/devices/cpu/minx/minx.cpp
index 2b91305d28d..0fa38b5db73 100644
--- a/src/devices/cpu/minx/minx.cpp
+++ b/src/devices/cpu/minx/minx.cpp
@@ -81,6 +81,12 @@ minx_cpu_device::minx_cpu_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> minx_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
uint16_t minx_cpu_device::rd16( uint32_t offset )
{
diff --git a/src/devices/cpu/minx/minx.h b/src/devices/cpu/minx/minx.h
index a9640ecd132..0c146fb95da 100644
--- a/src/devices/cpu/minx/minx.h
+++ b/src/devices/cpu/minx/minx.h
@@ -33,7 +33,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/mips/mips3.cpp b/src/devices/cpu/mips/mips3.cpp
index 544bcb5c86c..ca46c8a00ae 100644
--- a/src/devices/cpu/mips/mips3.cpp
+++ b/src/devices/cpu/mips/mips3.cpp
@@ -195,6 +195,13 @@ mips3_device::mips3_device(const machine_config &mconfig, device_type type, cons
set_vtlb_fixed_entries(2 * m_tlbentries + 2);
}
+std::vector<std::pair<int, const address_space_config *>> mips3_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
void mips3_device::device_stop()
{
@@ -945,7 +952,7 @@ void mips3_device::device_reset()
}
-bool mips3_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool mips3_device::memory_translate(int spacenum, int intention, offs_t &address)
{
/* only applies to the program address space */
if (spacenum == AS_PROGRAM)
diff --git a/src/devices/cpu/mips/mips3.h b/src/devices/cpu/mips/mips3.h
index c8b5657f481..ea157c398b7 100644
--- a/src/devices/cpu/mips/mips3.h
+++ b/src/devices/cpu/mips/mips3.h
@@ -304,8 +304,8 @@ protected:
virtual void execute_burn(int32_t cycles) override { m_totalcycles += cycles; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/mips/r3000.cpp b/src/devices/cpu/mips/r3000.cpp
index b8fbfa26b91..f60cb7bc9f0 100644
--- a/src/devices/cpu/mips/r3000.cpp
+++ b/src/devices/cpu/mips/r3000.cpp
@@ -394,12 +394,11 @@ void r3000_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *r3000_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> r3000_device::memory_space_config() const
{
- if (spacenum == AS_PROGRAM)
- return (m_endianness == ENDIANNESS_BIG) ? &m_program_config_be : &m_program_config_le;
- else
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, (m_endianness == ENDIANNESS_BIG) ? &m_program_config_be : &m_program_config_le)
+ };
}
diff --git a/src/devices/cpu/mips/r3000.h b/src/devices/cpu/mips/r3000.h
index 8274202c0e9..b4a339dc584 100644
--- a/src/devices/cpu/mips/r3000.h
+++ b/src/devices/cpu/mips/r3000.h
@@ -123,7 +123,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/mn10200/mn10200.cpp b/src/devices/cpu/mn10200/mn10200.cpp
index 07fc55a3723..c4ec36ba5d7 100644
--- a/src/devices/cpu/mn10200/mn10200.cpp
+++ b/src/devices/cpu/mn10200/mn10200.cpp
@@ -58,6 +58,14 @@ mn1020012a_device::mn1020012a_device(const machine_config &mconfig, const char *
{ }
+std::vector<std::pair<int, const address_space_config *>> mn10200_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
+
// disasm
void mn10200_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
diff --git a/src/devices/cpu/mn10200/mn10200.h b/src/devices/cpu/mn10200/mn10200.h
index 7831d5cfeb1..71d00f7eb01 100644
--- a/src/devices/cpu/mn10200/mn10200.h
+++ b/src/devices/cpu/mn10200/mn10200.h
@@ -81,7 +81,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.cpp b/src/devices/cpu/nanoprocessor/nanoprocessor.cpp
index 47d9091b46e..a210a531da1 100644
--- a/src/devices/cpu/nanoprocessor/nanoprocessor.cpp
+++ b/src/devices/cpu/nanoprocessor/nanoprocessor.cpp
@@ -108,6 +108,14 @@ void hp_nanoprocessor_device::device_reset()
dc_update();
}
+std::vector<std::pair<int, const address_space_config *>> hp_nanoprocessor_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
void hp_nanoprocessor_device::execute_run()
{
do {
diff --git a/src/devices/cpu/nanoprocessor/nanoprocessor.h b/src/devices/cpu/nanoprocessor/nanoprocessor.h
index acdb40cb862..6d489896354 100644
--- a/src/devices/cpu/nanoprocessor/nanoprocessor.h
+++ b/src/devices/cpu/nanoprocessor/nanoprocessor.h
@@ -85,9 +85,7 @@ public:
virtual uint32_t execute_default_irq_vector() const override { return 0xff; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr);
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/nec/nec.cpp b/src/devices/cpu/nec/nec.cpp
index 3b61283ce41..18dded0cdb4 100644
--- a/src/devices/cpu/nec/nec.cpp
+++ b/src/devices/cpu/nec/nec.cpp
@@ -145,6 +145,14 @@ v30_device::v30_device(const machine_config &mconfig, const char *tag, device_t
{
}
+std::vector<std::pair<int, const address_space_config *>> nec_common_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
/* FIXME: Need information about prefetch size and cycles for V33.
* complete guess below, nbbatman will not work
diff --git a/src/devices/cpu/nec/nec.h b/src/devices/cpu/nec/nec.h
index f4f95ad6788..90e96b84f4d 100644
--- a/src/devices/cpu/nec/nec.h
+++ b/src/devices/cpu/nec/nec.h
@@ -40,7 +40,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/nec/v25.cpp b/src/devices/cpu/nec/v25.cpp
index 66d4e6885e8..9c3a8ad007a 100644
--- a/src/devices/cpu/nec/v25.cpp
+++ b/src/devices/cpu/nec/v25.cpp
@@ -82,6 +82,13 @@ v35_device::v35_device(const machine_config &mconfig, const char *tag, device_t
{
}
+std::vector<std::pair<int, const address_space_config *>> v25_common_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
TIMER_CALLBACK_MEMBER(v25_common_device::v25_timer_callback)
{
diff --git a/src/devices/cpu/nec/v25.h b/src/devices/cpu/nec/v25.h
index 00bf192f22f..9ebbffe57e4 100644
--- a/src/devices/cpu/nec/v25.h
+++ b/src/devices/cpu/nec/v25.h
@@ -84,7 +84,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/nec/v53.cpp b/src/devices/cpu/nec/v53.cpp
index 4d6aa65b08c..cb4ff9cd84b 100644
--- a/src/devices/cpu/nec/v53.cpp
+++ b/src/devices/cpu/nec/v53.cpp
@@ -172,6 +172,13 @@ m_DST = 0x00;
m_DMK = 0x0f;
*/
+std::vector<std::pair<int, const address_space_config *>> v53_base_device::memory_space_config() const
+{
+ auto r = nec_common_device::memory_space_config();
+ r.emplace_back(std::make_pair(AS_IO, &m_io_space_config));
+ return r;
+}
+
void v53_base_device::device_reset()
{
nec_common_device::device_reset();
diff --git a/src/devices/cpu/nec/v53.h b/src/devices/cpu/nec/v53.h
index 86dfab2b829..49fa66e5134 100644
--- a/src/devices/cpu/nec/v53.h
+++ b/src/devices/cpu/nec/v53.h
@@ -205,15 +205,7 @@ protected:
const address_space_config m_io_space_config;
- const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_IO: return &m_io_space_config;
- default: return nec_common_device::memory_space_config(spacenum);
- }
- }
-
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
uint8_t m_SCTL;
uint8_t m_OPSEL;
diff --git a/src/devices/cpu/patinhofeio/patinho_feio.cpp b/src/devices/cpu/patinhofeio/patinho_feio.cpp
index f482e2d3b19..48cd8b3494c 100644
--- a/src/devices/cpu/patinhofeio/patinho_feio.cpp
+++ b/src/devices/cpu/patinhofeio/patinho_feio.cpp
@@ -69,6 +69,13 @@ patinho_feio_cpu_device::patinho_feio_cpu_device(const machine_config &mconfig,
{
}
+std::vector<std::pair<int, const address_space_config *>> patinho_feio_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
uint16_t patinho_feio_cpu_device::read_panel_keys_register(){
if (!m_rc_read_cb.isnull())
m_rc = m_rc_read_cb(0);
diff --git a/src/devices/cpu/patinhofeio/patinhofeio_cpu.h b/src/devices/cpu/patinhofeio/patinhofeio_cpu.h
index 1f7de74638a..065a21daec9 100644
--- a/src/devices/cpu/patinhofeio/patinhofeio_cpu.h
+++ b/src/devices/cpu/patinhofeio/patinhofeio_cpu.h
@@ -119,7 +119,7 @@ protected:
virtual uint32_t execute_max_cycles() const override { return 2; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/pdp1/pdp1.cpp b/src/devices/cpu/pdp1/pdp1.cpp
index c79e612191d..56f6fb25c90 100644
--- a/src/devices/cpu/pdp1/pdp1.cpp
+++ b/src/devices/cpu/pdp1/pdp1.cpp
@@ -387,6 +387,12 @@ pdp1_device::pdp1_device(const machine_config &mconfig, const char *tag, device_
m_program_config.m_is_octal = true;
}
+std::vector<std::pair<int, const address_space_config *>> pdp1_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
void pdp1_device::device_config_complete()
{
diff --git a/src/devices/cpu/pdp1/pdp1.h b/src/devices/cpu/pdp1/pdp1.h
index 4604069d33b..546735f425b 100644
--- a/src/devices/cpu/pdp1/pdp1.h
+++ b/src/devices/cpu/pdp1/pdp1.h
@@ -106,7 +106,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/pdp1/tx0.cpp b/src/devices/cpu/pdp1/tx0.cpp
index b3ae8567d3a..3d3be72838e 100644
--- a/src/devices/cpu/pdp1/tx0.cpp
+++ b/src/devices/cpu/pdp1/tx0.cpp
@@ -75,6 +75,13 @@ tx0_64kw_device::tx0_64kw_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> tx0_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
int tx0_device::tx0_read(offs_t address)
{
diff --git a/src/devices/cpu/pdp1/tx0.h b/src/devices/cpu/pdp1/tx0.h
index 7f4a094521a..8272fe478b4 100644
--- a/src/devices/cpu/pdp1/tx0.h
+++ b/src/devices/cpu/pdp1/tx0.h
@@ -65,7 +65,7 @@ protected:
virtual uint32_t execute_max_cycles() const override { return 3; }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 4; }
diff --git a/src/devices/cpu/pdp8/pdp8.cpp b/src/devices/cpu/pdp8/pdp8.cpp
index 52141e9d1ac..1a9150a236d 100644
--- a/src/devices/cpu/pdp8/pdp8.cpp
+++ b/src/devices/cpu/pdp8/pdp8.cpp
@@ -121,7 +121,7 @@ void pdp8_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *pdp8_device::memory_space_config(address_spacenum spacenum) const
+const address_space_config *pdp8_device::memory_space_config(int spacenum) const
{
if (spacenum == AS_PROGRAM)
{
diff --git a/src/devices/cpu/pdp8/pdp8.h b/src/devices/cpu/pdp8/pdp8.h
index 2184d965099..21d5a25a0cf 100644
--- a/src/devices/cpu/pdp8/pdp8.h
+++ b/src/devices/cpu/pdp8/pdp8.h
@@ -37,7 +37,7 @@ public:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/pic16c5x/pic16c5x.cpp b/src/devices/cpu/pic16c5x/pic16c5x.cpp
index 9c21dd2c737..cb162c58c09 100644
--- a/src/devices/cpu/pic16c5x/pic16c5x.cpp
+++ b/src/devices/cpu/pic16c5x/pic16c5x.cpp
@@ -175,6 +175,13 @@ pic1655_device::pic1655_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> pic16c5x_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
offs_t pic16c5x_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/pic16c5x/pic16c5x.h b/src/devices/cpu/pic16c5x/pic16c5x.h
index 8642ae8da43..bbf9bb84486 100644
--- a/src/devices/cpu/pic16c5x/pic16c5x.h
+++ b/src/devices/cpu/pic16c5x/pic16c5x.h
@@ -125,10 +125,7 @@ protected:
virtual void execute_set_input(int line, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/pic16c62x/pic16c62x.h b/src/devices/cpu/pic16c62x/pic16c62x.h
index b873d5e19b6..35104d4e994 100644
--- a/src/devices/cpu/pic16c62x/pic16c62x.h
+++ b/src/devices/cpu/pic16c62x/pic16c62x.h
@@ -71,10 +71,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/powerpc/ppc.h b/src/devices/cpu/powerpc/ppc.h
index 8a31bc5c5f6..558f702b376 100644
--- a/src/devices/cpu/powerpc/ppc.h
+++ b/src/devices/cpu/powerpc/ppc.h
@@ -259,8 +259,8 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
// device_state_interface overrides
virtual void state_export(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/powerpc/ppccom.cpp b/src/devices/cpu/powerpc/ppccom.cpp
index ef24a09fc45..50f69f0f035 100644
--- a/src/devices/cpu/powerpc/ppccom.cpp
+++ b/src/devices/cpu/powerpc/ppccom.cpp
@@ -300,6 +300,13 @@ ppc405gp_device::ppc405gp_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> ppc_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
/***************************************************************************
INLINE FUNCTIONS
@@ -1460,7 +1467,7 @@ uint32_t ppc_device::ppccom_translate_address_internal(int intention, offs_t &ad
from logical to physical
-------------------------------------------------*/
-bool ppc_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool ppc_device::memory_translate(int spacenum, int intention, offs_t &address)
{
/* only applies to the program address space */
if (spacenum != AS_PROGRAM)
diff --git a/src/devices/cpu/pps4/pps4.cpp b/src/devices/cpu/pps4/pps4.cpp
index 57865f58659..7b9a9a6e52e 100644
--- a/src/devices/cpu/pps4/pps4.cpp
+++ b/src/devices/cpu/pps4/pps4.cpp
@@ -108,6 +108,15 @@ pps4_2_device::pps4_2_device(const machine_config &mconfig, const char *tag, dev
{
}
+std::vector<std::pair<int, const address_space_config *>> pps4_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
/**
* @brief pps4_device::M Return the memory at address B
* @return ROM/RAM(B)
diff --git a/src/devices/cpu/pps4/pps4.h b/src/devices/cpu/pps4/pps4.h
index 59493f89c7b..72100fb358b 100644
--- a/src/devices/cpu/pps4/pps4.h
+++ b/src/devices/cpu/pps4/pps4.h
@@ -76,10 +76,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) );
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/psx/psx.cpp b/src/devices/cpu/psx/psx.cpp
index d436572cf08..b03c57c3a5e 100644
--- a/src/devices/cpu/psx/psx.cpp
+++ b/src/devices/cpu/psx/psx.cpp
@@ -3385,6 +3385,12 @@ void psxcpu_device::set_disable_rom_berr(bool mode)
m_disable_rom_berr = mode;
}
+std::vector<std::pair<int, const address_space_config *>> psxcpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ };
+}
//-------------------------------------------------
// device_add_mconfig - add device configuration
diff --git a/src/devices/cpu/psx/psx.h b/src/devices/cpu/psx/psx.h
index 05bc0266940..d05495481a0 100644
--- a/src/devices/cpu/psx/psx.h
+++ b/src/devices/cpu/psx/psx.h
@@ -211,7 +211,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/rsp/rsp.cpp b/src/devices/cpu/rsp/rsp.cpp
index 5bdf36fd046..2f781344800 100644
--- a/src/devices/cpu/rsp/rsp.cpp
+++ b/src/devices/cpu/rsp/rsp.cpp
@@ -143,6 +143,13 @@ rsp_device::rsp_device(const machine_config &mconfig, const char *tag, device_t
{
}
+std::vector<std::pair<int, const address_space_config *>> rsp_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
offs_t rsp_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( rsp );
diff --git a/src/devices/cpu/rsp/rsp.h b/src/devices/cpu/rsp/rsp.h
index 170315ec69f..3c55ed00265 100644
--- a/src/devices/cpu/rsp/rsp.h
+++ b/src/devices/cpu/rsp/rsp.h
@@ -152,7 +152,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override { }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/s2650/s2650.cpp b/src/devices/cpu/s2650/s2650.cpp
index 50492b36069..e342f570b74 100644
--- a/src/devices/cpu/s2650/s2650.cpp
+++ b/src/devices/cpu/s2650/s2650.cpp
@@ -50,23 +50,20 @@ offs_t s2650_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u
}
-const address_space_config *s2650_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> s2650_device::memory_space_config() const
{
- switch (spacenum)
- {
+ return std::vector<std::pair<int, const address_space_config *>> {
// Memory-mapped: M/~IO=1
- case AS_PROGRAM: return &m_program_config;
-
- // Extended I/O: M/~IO=0 ADR13(E)=1 ADR14=Don't Care
- case AS_IO: return &m_io_config;
+ std::make_pair(AS_PROGRAM, &m_program_config),
// Non-extended I/O: M/~IO=0 ADR13(~NE)=0 ADR14=D/~C
// "The D/~C line can be used as a 1-bit device address in simple systems."
// -- Signetics 2650 Microprocessor databook, page 41
- case AS_DATA: return &m_data_config;
+ std::make_pair(AS_DATA, &m_data_config),
- default: return nullptr;
- }
+ // Extended I/O: M/~IO=0 ADR13(E)=1 ADR14=Don't Care
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
diff --git a/src/devices/cpu/s2650/s2650.h b/src/devices/cpu/s2650/s2650.h
index 119f7f9b38f..bd7838a94cc 100644
--- a/src/devices/cpu/s2650/s2650.h
+++ b/src/devices/cpu/s2650/s2650.h
@@ -60,7 +60,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/saturn/saturn.cpp b/src/devices/cpu/saturn/saturn.cpp
index a3d7b912f46..ac42fb2adf8 100644
--- a/src/devices/cpu/saturn/saturn.cpp
+++ b/src/devices/cpu/saturn/saturn.cpp
@@ -57,6 +57,13 @@ saturn_device::saturn_device(const machine_config &mconfig, const char *tag, dev
{
}
+std::vector<std::pair<int, const address_space_config *>> saturn_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
offs_t saturn_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/saturn/saturn.h b/src/devices/cpu/saturn/saturn.h
index a8a221995b6..f291506d18a 100644
--- a/src/devices/cpu/saturn/saturn.h
+++ b/src/devices/cpu/saturn/saturn.h
@@ -101,7 +101,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/sc61860/sc61860.cpp b/src/devices/cpu/sc61860/sc61860.cpp
index 5b636dcfb94..fabda561b1e 100644
--- a/src/devices/cpu/sc61860/sc61860.cpp
+++ b/src/devices/cpu/sc61860/sc61860.cpp
@@ -62,6 +62,13 @@ sc61860_device::sc61860_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> sc61860_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
offs_t sc61860_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/sc61860/sc61860.h b/src/devices/cpu/sc61860/sc61860.h
index 2131673616b..8bd1473102b 100644
--- a/src/devices/cpu/sc61860/sc61860.h
+++ b/src/devices/cpu/sc61860/sc61860.h
@@ -101,7 +101,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/scmp/scmp.cpp b/src/devices/cpu/scmp/scmp.cpp
index 6cb366ae97f..0e270e0360b 100644
--- a/src/devices/cpu/scmp/scmp.cpp
+++ b/src/devices/cpu/scmp/scmp.cpp
@@ -40,6 +40,13 @@ scmp_device::scmp_device(const machine_config &mconfig, device_type type, const
{
}
+std::vector<std::pair<int, const address_space_config *>> scmp_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
ins8060_device::ins8060_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: scmp_device(mconfig, INS8060, tag, owner, clock)
diff --git a/src/devices/cpu/scmp/scmp.h b/src/devices/cpu/scmp/scmp.h
index fcfc3bb01cc..acdbff5af1b 100644
--- a/src/devices/cpu/scmp/scmp.h
+++ b/src/devices/cpu/scmp/scmp.h
@@ -48,7 +48,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/score/score.cpp b/src/devices/cpu/score/score.cpp
index e8f049fb53f..031c76afaf9 100644
--- a/src/devices/cpu/score/score.cpp
+++ b/src/devices/cpu/score/score.cpp
@@ -153,9 +153,11 @@ void score7_cpu_device::state_string_export(const device_state_entry &entry, std
// the space doesn't exist
//-------------------------------------------------
-const address_space_config * score7_cpu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> score7_cpu_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config: nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/score/score.h b/src/devices/cpu/score/score.h
index 797a2bedf3d..de03eda5498 100644
--- a/src/devices/cpu/score/score.h
+++ b/src/devices/cpu/score/score.h
@@ -51,7 +51,7 @@ protected:
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/scudsp/scudsp.cpp b/src/devices/cpu/scudsp/scudsp.cpp
index 8898dd5fa34..f0d64863b4c 100644
--- a/src/devices/cpu/scudsp/scudsp.cpp
+++ b/src/devices/cpu/scudsp/scudsp.cpp
@@ -897,6 +897,14 @@ void scudsp_cpu_device::execute_run()
} while( m_icount > 0 );
}
+std::vector<std::pair<int, const address_space_config *>> scudsp_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
void scudsp_cpu_device::device_start()
{
m_pc = 0;
diff --git a/src/devices/cpu/scudsp/scudsp.h b/src/devices/cpu/scudsp/scudsp.h
index 6012748257c..98af1ad9cd0 100644
--- a/src/devices/cpu/scudsp/scudsp.h
+++ b/src/devices/cpu/scudsp/scudsp.h
@@ -82,7 +82,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/se3208/se3208.cpp b/src/devices/cpu/se3208/se3208.cpp
index 13b0ec92f22..d2af5871258 100644
--- a/src/devices/cpu/se3208/se3208.cpp
+++ b/src/devices/cpu/se3208/se3208.cpp
@@ -53,6 +53,12 @@ se3208_device::se3208_device(const machine_config &mconfig, const char *tag, dev
, m_PC(0), m_SR(0), m_SP(0), m_ER(0), m_PPC(0), m_program(nullptr), m_direct(nullptr), m_IRQ(0), m_NMI(0), m_icount(0)
{
}
+std::vector<std::pair<int, const address_space_config *>> se3208_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
uint32_t se3208_device::read_dword_unaligned(address_space &space, uint32_t address)
diff --git a/src/devices/cpu/se3208/se3208.h b/src/devices/cpu/se3208/se3208.h
index bb00f3f06ad..af40bf6d8d5 100644
--- a/src/devices/cpu/se3208/se3208.h
+++ b/src/devices/cpu/se3208/se3208.h
@@ -33,7 +33,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/sh2/sh2.cpp b/src/devices/cpu/sh2/sh2.cpp
index ea79565f4cc..a0de2a0b966 100644
--- a/src/devices/cpu/sh2/sh2.cpp
+++ b/src/devices/cpu/sh2/sh2.cpp
@@ -219,14 +219,17 @@ sh1_device::sh1_device(const machine_config &mconfig, const char *tag, device_t
{
}
-const address_space_config *sh2_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> sh2_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_decrypted_program_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_decrypted_program_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
offs_t sh2_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
diff --git a/src/devices/cpu/sh2/sh2.h b/src/devices/cpu/sh2/sh2.h
index 77095149254..decec04c6ea 100644
--- a/src/devices/cpu/sh2/sh2.h
+++ b/src/devices/cpu/sh2/sh2.h
@@ -128,7 +128,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/sh2/sh7604_bus.cpp b/src/devices/cpu/sh2/sh7604_bus.cpp
index 596172879e4..f4000a46300 100644
--- a/src/devices/cpu/sh2/sh7604_bus.cpp
+++ b/src/devices/cpu/sh2/sh7604_bus.cpp
@@ -93,7 +93,7 @@ WRITE16_MEMBER(sh7604_bus_device::refresh_timer_constant_w)
COMBINE_DATA(&m_rtcor);
}
-static ADDRESS_MAP_START( bus_regs, AS_0, 16, sh7604_bus_device )
+DEVICE_ADDRESS_MAP_START( bus_regs, 16, sh7604_bus_device )
AM_RANGE(0x00, 0x01) AM_READWRITE(bus_control_1_r, bus_control_1_w)
AM_RANGE(0x02, 0x03) AM_READWRITE(bus_control_2_r, bus_control_2_w)
AM_RANGE(0x04, 0x05) AM_READWRITE(wait_control_r, wait_control_w)
@@ -110,17 +110,9 @@ ADDRESS_MAP_END
sh7604_bus_device::sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SH7604_BUS, tag, owner, clock)
- , device_memory_interface(mconfig, *this)
- , m_space_config("regs", ENDIANNESS_BIG, 16, 4, 0, nullptr, *ADDRESS_MAP_NAME(bus_regs))
{
}
-
-const address_space_config *sh7604_bus_device::memory_space_config(address_spacenum spacenum) const
-{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
-}
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/devices/cpu/sh2/sh7604_bus.h b/src/devices/cpu/sh2/sh7604_bus.h
index 8c907a13e06..486ff93558f 100644
--- a/src/devices/cpu/sh2/sh7604_bus.h
+++ b/src/devices/cpu/sh2/sh7604_bus.h
@@ -26,14 +26,15 @@
// ======================> sh7604_bus_device
-class sh7604_bus_device : public device_t,
- public device_memory_interface
+class sh7604_bus_device : public device_t
{
public:
// construction/destruction
sh7604_bus_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
+ DECLARE_ADDRESS_MAP( bus_regs, 16 );
+
DECLARE_WRITE32_MEMBER( write );
DECLARE_READ32_MEMBER( read );
DECLARE_READ16_MEMBER( bus_control_1_r );
@@ -50,7 +51,6 @@ public:
DECLARE_WRITE16_MEMBER( refresh_timer_counter_w );
DECLARE_READ16_MEMBER( refresh_timer_constant_r );
DECLARE_WRITE16_MEMBER( refresh_timer_constant_w );
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
protected:
// device-level overrides
diff --git a/src/devices/cpu/sh2/sh7604_sci.cpp b/src/devices/cpu/sh2/sh7604_sci.cpp
index e49c7d988e6..248e0112622 100644
--- a/src/devices/cpu/sh2/sh7604_sci.cpp
+++ b/src/devices/cpu/sh2/sh7604_sci.cpp
@@ -99,7 +99,7 @@ READ8_MEMBER(sh7604_sci_device::receive_data_r)
return 0;
}
-static ADDRESS_MAP_START( sci_regs, AS_0, 8, sh7604_sci_device )
+DEVICE_ADDRESS_MAP_START( sci_regs, 8, sh7604_sci_device )
AM_RANGE(0x00, 0x00) AM_READWRITE(serial_mode_r, serial_mode_w)
AM_RANGE(0x01, 0x01) AM_READWRITE(bitrate_r, bitrate_w)
AM_RANGE(0x02, 0x02) AM_READWRITE(serial_control_r,serial_control_w)
@@ -114,18 +114,11 @@ ADDRESS_MAP_END
sh7604_sci_device::sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SH7604_SCI, tag, owner, clock)
- , device_memory_interface(mconfig, *this)
- , m_space_config("regs", ENDIANNESS_BIG, 8, 4, 0, nullptr, *ADDRESS_MAP_NAME(sci_regs))
{
}
-const address_space_config *sh7604_sci_device::memory_space_config(address_spacenum spacenum) const
-{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
-}
-
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/devices/cpu/sh2/sh7604_sci.h b/src/devices/cpu/sh2/sh7604_sci.h
index 082e8c37ae9..d7a290f6946 100644
--- a/src/devices/cpu/sh2/sh7604_sci.h
+++ b/src/devices/cpu/sh2/sh7604_sci.h
@@ -26,14 +26,15 @@
// ======================> sh7604_sci_device
-class sh7604_sci_device : public device_t,
- public device_memory_interface
+class sh7604_sci_device : public device_t
{
public:
// construction/destruction
sh7604_sci_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
+ DECLARE_ADDRESS_MAP( sci_regs, 8 );
+
DECLARE_WRITE8_MEMBER( write );
DECLARE_READ8_MEMBER( read );
@@ -50,8 +51,6 @@ public:
DECLARE_WRITE8_MEMBER( serial_ack_w );
DECLARE_READ8_MEMBER( receive_data_r );
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
-
protected:
enum {
STATUS_MPBT = 1 << 0,
diff --git a/src/devices/cpu/sh2/sh7604_wdt.cpp b/src/devices/cpu/sh2/sh7604_wdt.cpp
index 9db87131378..16b40f30768 100644
--- a/src/devices/cpu/sh2/sh7604_wdt.cpp
+++ b/src/devices/cpu/sh2/sh7604_wdt.cpp
@@ -27,7 +27,7 @@ DEFINE_DEVICE_TYPE(SH7604_WDT, sh7604_wdt_device, "sh7604wdt", "SH7604 Watchdog
// LIVE DEVICE
//**************************************************************************
-static ADDRESS_MAP_START( wdt_regs, AS_0, 8, sh7604_wdt_device )
+DEVICE_ADDRESS_MAP_START( wdt_regs, 8, sh7604_wdt_device )
// AM_RANGE(0x00, 0x00) timer control/status
// AM_RANGE(0x01, 0x01) timer counter
// AM_RANGE(0x02, 0x02) write only, reset control register
@@ -40,16 +40,7 @@ ADDRESS_MAP_END
sh7604_wdt_device::sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SH7604_WDT, tag, owner, clock)
- , device_memory_interface(mconfig, *this)
- , m_space_config("regs", ENDIANNESS_BIG, 8, 4, 0, nullptr, *ADDRESS_MAP_NAME(wdt_regs))
-
-{
-}
-
-
-const address_space_config *sh7604_wdt_device::memory_space_config(address_spacenum spacenum) const
{
- return &m_space_config;
}
diff --git a/src/devices/cpu/sh2/sh7604_wdt.h b/src/devices/cpu/sh2/sh7604_wdt.h
index 352b94e3190..7e014745f19 100644
--- a/src/devices/cpu/sh2/sh7604_wdt.h
+++ b/src/devices/cpu/sh2/sh7604_wdt.h
@@ -26,18 +26,18 @@
// ======================> sh7604_wdt_device
-class sh7604_wdt_device : public device_t,
- public device_memory_interface
+class sh7604_wdt_device : public device_t
{
public:
// construction/destruction
sh7604_wdt_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
// I/O operations
+ DECLARE_ADDRESS_MAP( wdt_regs, 8 );
+
DECLARE_WRITE16_MEMBER( write );
DECLARE_READ8_MEMBER( read );
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
protected:
// device-level overrides
// virtual void device_validity_check(validity_checker &valid) const;
diff --git a/src/devices/cpu/sh4/sh4.cpp b/src/devices/cpu/sh4/sh4.cpp
index c9741c19ac5..6c2271ddfea 100644
--- a/src/devices/cpu/sh4/sh4.cpp
+++ b/src/devices/cpu/sh4/sh4.cpp
@@ -119,6 +119,14 @@ sh34_base_device::sh34_base_device(const machine_config &mconfig, device_type ty
#endif
}
+std::vector<std::pair<int, const address_space_config *>> sh34_base_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
sh3_base_device::sh3_base_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, endianness_t endianness)
: sh34_base_device(mconfig, type, tag, owner, clock, endianness, ADDRESS_MAP_NAME(sh3_internal_map))
diff --git a/src/devices/cpu/sh4/sh4.h b/src/devices/cpu/sh4/sh4.h
index 29977b286dd..bb24712f7d1 100644
--- a/src/devices/cpu/sh4/sh4.h
+++ b/src/devices/cpu/sh4/sh4.h
@@ -243,7 +243,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/sharc/sharc.cpp b/src/devices/cpu/sharc/sharc.cpp
index c6faeb367ef..1b37cd1273f 100644
--- a/src/devices/cpu/sharc/sharc.cpp
+++ b/src/devices/cpu/sharc/sharc.cpp
@@ -88,6 +88,13 @@ adsp21062_device::adsp21062_device(const machine_config &mconfig, const char *ta
{
}
+std::vector<std::pair<int, const address_space_config *>> adsp21062_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
offs_t adsp21062_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/sharc/sharc.h b/src/devices/cpu/sharc/sharc.h
index a55fa5facf7..0eedd1e9297 100644
--- a/src/devices/cpu/sharc/sharc.h
+++ b/src/devices/cpu/sharc/sharc.h
@@ -217,7 +217,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
static constexpr uint32_t OPCODE_BYTES = 8; // actually 6, but emulation requires padding to 64 bits
diff --git a/src/devices/cpu/sm510/sm510.h b/src/devices/cpu/sm510/sm510.h
index 9e86ad75cf1..be2c3bb16c0 100644
--- a/src/devices/cpu/sm510/sm510.h
+++ b/src/devices/cpu/sm510/sm510.h
@@ -145,7 +145,7 @@ protected:
virtual void execute_one() { } // -> child class
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual u32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/sm510/sm510base.cpp b/src/devices/cpu/sm510/sm510base.cpp
index 0a52759be02..4df1118db8a 100644
--- a/src/devices/cpu/sm510/sm510base.cpp
+++ b/src/devices/cpu/sm510/sm510base.cpp
@@ -183,6 +183,14 @@ inline u16 sm510_base_device::get_lcd_row(int column, u8* ram)
return rowdata;
}
+std::vector<std::pair<int, const address_space_config *>> sm510_base_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
void sm510_base_device::lcd_update()
{
// 4 columns
diff --git a/src/devices/cpu/sm8500/sm8500.cpp b/src/devices/cpu/sm8500/sm8500.cpp
index d7fecc10d31..1c7111a39f7 100644
--- a/src/devices/cpu/sm8500/sm8500.cpp
+++ b/src/devices/cpu/sm8500/sm8500.cpp
@@ -45,6 +45,13 @@ sm8500_cpu_device::sm8500_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> sm8500_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ };
+}
+
void sm8500_cpu_device::get_sp()
{
diff --git a/src/devices/cpu/sm8500/sm8500.h b/src/devices/cpu/sm8500/sm8500.h
index b8889ce51e1..ee2d4b3f2f2 100644
--- a/src/devices/cpu/sm8500/sm8500.h
+++ b/src/devices/cpu/sm8500/sm8500.h
@@ -68,7 +68,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/sparc/mb86901.cpp b/src/devices/cpu/sparc/mb86901.cpp
index cc18ae551de..b86f010062d 100644
--- a/src/devices/cpu/sparc/mb86901.cpp
+++ b/src/devices/cpu/sparc/mb86901.cpp
@@ -433,15 +433,11 @@ void mb86901_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *mb86901_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mb86901_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM:
- return &m_program_config;
- default:
- return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/sparc/sparc.h b/src/devices/cpu/sparc/sparc.h
index 3eef8c29170..f3274833fc2 100644
--- a/src/devices/cpu/sparc/sparc.h
+++ b/src/devices/cpu/sparc/sparc.h
@@ -40,7 +40,7 @@ public:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/spc700/spc700.cpp b/src/devices/cpu/spc700/spc700.cpp
index 0d4ed75098e..14c72f28c5c 100644
--- a/src/devices/cpu/spc700/spc700.cpp
+++ b/src/devices/cpu/spc700/spc700.cpp
@@ -193,7 +193,7 @@ static inline int MAKE_INT_8(int A) {return (A & 0x80) ? A | ~0xff : A & 0xff;}
#define VFLAG_SUB_8(S, D, R) ((S^D) & (R^D))
#define VFLAG_SUB_16(S, D, R) (((S^D) & (R^D))>>8)
-#define CFLAG_AS_1() ((FLAG_C>>8)&1)
+#define CFLAG_1() ((FLAG_C>>8)&1)
#define CFLAG_AS_NOT_1() (!(FLAG_C&CFLAG_SET))
#define NZFLAG_16(A) (((A)&0x7f) | (((A)>>1)&0x40) | (((A)>>8)&0xff))
@@ -234,6 +234,13 @@ spc700_device::spc700_device(const machine_config &mconfig, const char *tag, dev
{
}
+std::vector<std::pair<int, const address_space_config *>> spc700_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
/* ======================================================================== */
/* ============================ UTILITY MACROS ============================ */
@@ -449,7 +456,7 @@ void spc700_device::SET_REG_YA(uint32_t value)
(FLAG_H& HFLAG_SET) | \
FLAG_I | \
((!FLAG_Z) << 1) | \
- CFLAG_AS_1())
+ CFLAG_1())
/* Set the Process Status Register */
void spc700_device::SET_REG_P(uint32_t value)
@@ -514,8 +521,8 @@ void spc700_device::SET_FLAG_I(uint32_t value)
/* ======================================================================== */
#define SUBOP_ADC(A, B) \
- m_spc_int16 = (A) + (B) + CFLAG_AS_1(); \
- TMP1 = ((A) & 0x0f) + (CFLAG_AS_1()); \
+ m_spc_int16 = (A) + (B) + CFLAG_1(); \
+ TMP1 = ((A) & 0x0f) + (CFLAG_1()); \
FLAG_C = (m_spc_int16 > 0xff) ? CFLAG_SET : 0; \
FLAG_V = (~((A) ^ (B))) & (((A) ^ m_spc_int16) & 0x80); \
FLAG_H = (((m_spc_int16 & 0x0f) - TMP1) & 0x10) >> 1; \
@@ -1069,14 +1076,14 @@ void spc700_device::SET_FLAG_I(uint32_t value)
/* Rotate Left the accumulator */
#define OP_ROL(BCLK) \
CLK(BCLK); \
- FLAG_C = (REG_A<<1) | CFLAG_AS_1(); \
+ FLAG_C = (REG_A<<1) | CFLAG_1(); \
FLAG_NZ = REG_A = MAKE_UINT_8(FLAG_C)
/* Rotate Left an operand */
#define OP_ROLM(BCLK, MODE) \
CLK(BCLK); \
DST = EA_##MODE(); \
- FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_AS_1(); \
+ FLAG_C = (read_8_##MODE(DST)<<1) | CFLAG_1(); \
FLAG_NZ = MAKE_UINT_8(FLAG_C); \
write_8_##MODE(DST, FLAG_NZ)
@@ -1100,7 +1107,7 @@ void spc700_device::SET_FLAG_I(uint32_t value)
#define OP_SBC(BCLK, MODE) \
CLK(BCLK); \
SRC = OPER_8_##MODE(); \
- TMP2 = REG_A - SRC - (CFLAG_AS_1() ^ 1); \
+ TMP2 = REG_A - SRC - (CFLAG_1() ^ 1); \
SUBOP_ADC(REG_A, ~SRC); \
FLAG_C = (TMP2 <= 0xff) ? CFLAG_SET : 0; \
REG_A = (uint8_t)m_spc_int16;
@@ -1111,7 +1118,7 @@ void spc700_device::SET_FLAG_I(uint32_t value)
SRC = OPER_8_##SMODE(); \
DST = EA_##DMODE(); \
TMP3 = read_8_##DMODE(DST); \
- TMP2 = TMP3 - SRC - (CFLAG_AS_1() ^ 1); \
+ TMP2 = TMP3 - SRC - (CFLAG_1() ^ 1); \
SUBOP_ADC(~SRC, TMP3); \
FLAG_C = (TMP2 <= 0xff) ? CFLAG_SET : 0; \
write_8_##DMODE(DST, (uint8_t)m_spc_int16)
diff --git a/src/devices/cpu/spc700/spc700.h b/src/devices/cpu/spc700/spc700.h
index bef136b2815..52802d99e15 100644
--- a/src/devices/cpu/spc700/spc700.h
+++ b/src/devices/cpu/spc700/spc700.h
@@ -25,7 +25,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/ssem/ssem.cpp b/src/devices/cpu/ssem/ssem.cpp
index c15b984c546..b441ff926d2 100644
--- a/src/devices/cpu/ssem/ssem.cpp
+++ b/src/devices/cpu/ssem/ssem.cpp
@@ -135,13 +135,11 @@ void ssem_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *ssem_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ssem_device::memory_space_config() const
{
- if (spacenum == AS_PROGRAM)
- {
- return &m_program_config;
- }
- return nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/ssem/ssem.h b/src/devices/cpu/ssem/ssem.h
index a62d8bb79c9..233a9ead024 100644
--- a/src/devices/cpu/ssem/ssem.h
+++ b/src/devices/cpu/ssem/ssem.h
@@ -38,7 +38,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override;
diff --git a/src/devices/cpu/ssp1601/ssp1601.cpp b/src/devices/cpu/ssp1601/ssp1601.cpp
index c50e75a1886..7468e131040 100644
--- a/src/devices/cpu/ssp1601/ssp1601.cpp
+++ b/src/devices/cpu/ssp1601/ssp1601.cpp
@@ -200,6 +200,14 @@ ssp1601_device::ssp1601_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> ssp1601_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
offs_t ssp1601_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/ssp1601/ssp1601.h b/src/devices/cpu/ssp1601/ssp1601.h
index 7f241a83067..51aed1f04b1 100644
--- a/src/devices/cpu/ssp1601/ssp1601.h
+++ b/src/devices/cpu/ssp1601/ssp1601.h
@@ -37,7 +37,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/superfx/superfx.cpp b/src/devices/cpu/superfx/superfx.cpp
index a44d8bd7781..b39e4a98cc3 100644
--- a/src/devices/cpu/superfx/superfx.cpp
+++ b/src/devices/cpu/superfx/superfx.cpp
@@ -16,6 +16,13 @@ superfx_device::superfx_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> superfx_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
#define SUPERFX_SFR_OV_SET ((m_sfr & SUPERFX_SFR_OV) ? 1 : 0)
#define SUPERFX_SFR_OV_CLEAR ((m_sfr & SUPERFX_SFR_OV) ? 0 : 1)
diff --git a/src/devices/cpu/superfx/superfx.h b/src/devices/cpu/superfx/superfx.h
index f17c0e8349e..724d588f3ae 100644
--- a/src/devices/cpu/superfx/superfx.h
+++ b/src/devices/cpu/superfx/superfx.h
@@ -119,7 +119,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/t11/t11.cpp b/src/devices/cpu/t11/t11.cpp
index 9ff4654cce7..ceae5d9354d 100644
--- a/src/devices/cpu/t11/t11.cpp
+++ b/src/devices/cpu/t11/t11.cpp
@@ -60,6 +60,13 @@ t11_device::t11_device(const machine_config &mconfig, const char *tag, device_t
{
}
+std::vector<std::pair<int, const address_space_config *>> t11_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
/*************************************
*
diff --git a/src/devices/cpu/t11/t11.h b/src/devices/cpu/t11/t11.h
index dbf62e6f5e5..31e05c34464 100644
--- a/src/devices/cpu/t11/t11.h
+++ b/src/devices/cpu/t11/t11.h
@@ -60,7 +60,7 @@ protected:
virtual uint32_t execute_default_irq_vector() const override { return -1; };
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tlcs870/tlcs870.cpp b/src/devices/cpu/tlcs870/tlcs870.cpp
index 62f7a8de450..591ef004b8b 100644
--- a/src/devices/cpu/tlcs870/tlcs870.cpp
+++ b/src/devices/cpu/tlcs870/tlcs870.cpp
@@ -247,6 +247,14 @@ tmp87ph40an_device::tmp87ph40an_device(const machine_config &mconfig, const char
{
}
+std::vector<std::pair<int, const address_space_config *>> tlcs870_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
uint8_t tlcs870_device::RM8 (uint32_t a) { return m_program->read_byte( a ); }
uint16_t tlcs870_device::RM16(uint32_t a) { return RM8(a) | (RM8( (a+1) & 0xffff ) << 8); }
diff --git a/src/devices/cpu/tlcs870/tlcs870.h b/src/devices/cpu/tlcs870/tlcs870.h
index 7d93d2abf22..ca4e98ad6d5 100644
--- a/src/devices/cpu/tlcs870/tlcs870.h
+++ b/src/devices/cpu/tlcs870/tlcs870.h
@@ -98,7 +98,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tlcs90/tlcs90.cpp b/src/devices/cpu/tlcs90/tlcs90.cpp
index c80aaa1195f..c6a21d96c0b 100644
--- a/src/devices/cpu/tlcs90/tlcs90.cpp
+++ b/src/devices/cpu/tlcs90/tlcs90.cpp
@@ -103,6 +103,13 @@ tmp90ph44_device::tmp90ph44_device(const machine_config &mconfig, const char *ta
{
}
+std::vector<std::pair<int, const address_space_config *>> tlcs90_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
enum {
T90_B, T90_C, T90_D, T90_E, T90_H, T90_L, T90_A,
diff --git a/src/devices/cpu/tlcs90/tlcs90.h b/src/devices/cpu/tlcs90/tlcs90.h
index ea0c90917e7..a9b610b79cd 100644
--- a/src/devices/cpu/tlcs90/tlcs90.h
+++ b/src/devices/cpu/tlcs90/tlcs90.h
@@ -125,7 +125,7 @@ protected:
virtual void execute_burn(int32_t cycles) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tlcs900/tlcs900.cpp b/src/devices/cpu/tlcs900/tlcs900.cpp
index d627fcf044e..b5f6141cc5c 100644
--- a/src/devices/cpu/tlcs900/tlcs900.cpp
+++ b/src/devices/cpu/tlcs900/tlcs900.cpp
@@ -69,6 +69,13 @@ tmp95c061_device::tmp95c061_device(const machine_config &mconfig, const char *ta
{
}
+std::vector<std::pair<int, const address_space_config *>> tlcs900h_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
//-------------------------------------------------
// device_config_complete - perform any
// operations now that the configuration is
diff --git a/src/devices/cpu/tlcs900/tlcs900.h b/src/devices/cpu/tlcs900/tlcs900.h
index 197b11f1398..ff3ad4b66ae 100644
--- a/src/devices/cpu/tlcs900/tlcs900.h
+++ b/src/devices/cpu/tlcs900/tlcs900.h
@@ -66,10 +66,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tms1000/tms1k_base.cpp b/src/devices/cpu/tms1000/tms1k_base.cpp
index ba526ad9367..da10efd063c 100644
--- a/src/devices/cpu/tms1000/tms1k_base.cpp
+++ b/src/devices/cpu/tms1000/tms1k_base.cpp
@@ -260,6 +260,13 @@ void tms1k_base_device::device_reset()
m_power_off(0);
}
+std::vector<std::pair<int, const address_space_config *>> tms1k_base_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
//-------------------------------------------------
diff --git a/src/devices/cpu/tms1000/tms1k_base.h b/src/devices/cpu/tms1000/tms1k_base.h
index 16e095744c9..aab5e9407c1 100644
--- a/src/devices/cpu/tms1000/tms1k_base.h
+++ b/src/devices/cpu/tms1000/tms1k_base.h
@@ -166,7 +166,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual u32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/tms32010/tms32010.cpp b/src/devices/cpu/tms32010/tms32010.cpp
index da23e95eb76..c757ed91fc5 100644
--- a/src/devices/cpu/tms32010/tms32010.cpp
+++ b/src/devices/cpu/tms32010/tms32010.cpp
@@ -125,6 +125,14 @@ tms32016_device::tms32016_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> tms32010_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
offs_t tms32010_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/tms32010/tms32010.h b/src/devices/cpu/tms32010/tms32010.h
index e6728ec165e..95fa2ce5c9c 100644
--- a/src/devices/cpu/tms32010/tms32010.h
+++ b/src/devices/cpu/tms32010/tms32010.h
@@ -64,7 +64,7 @@ protected:
virtual uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return (cycles * 4); }
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : (spacenum == AS_IO) ? &m_io_config : (spacenum == AS_DATA) ? &m_data_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tms32025/tms32025.cpp b/src/devices/cpu/tms32025/tms32025.cpp
index 119ffaa6d96..209d9ed368a 100644
--- a/src/devices/cpu/tms32025/tms32025.cpp
+++ b/src/devices/cpu/tms32025/tms32025.cpp
@@ -244,6 +244,15 @@ tms32026_device::tms32026_device(const machine_config &mconfig, const char *tag,
m_fixed_STR1 = 0x0100;
}
+std::vector<std::pair<int, const address_space_config *>> tms32025_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
offs_t tms32025_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/tms32025/tms32025.h b/src/devices/cpu/tms32025/tms32025.h
index 1abd9f107ef..7a6df9e680b 100644
--- a/src/devices/cpu/tms32025/tms32025.h
+++ b/src/devices/cpu/tms32025/tms32025.h
@@ -119,7 +119,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : (spacenum == AS_IO) ? &m_io_config : (spacenum == AS_DATA) ? &m_data_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tms32031/tms32031.cpp b/src/devices/cpu/tms32031/tms32031.cpp
index 944af23df89..b9b674c51e8 100644
--- a/src/devices/cpu/tms32031/tms32031.cpp
+++ b/src/devices/cpu/tms32031/tms32031.cpp
@@ -456,9 +456,11 @@ void tms3203x_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *tms3203x_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tms3203x_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
}
diff --git a/src/devices/cpu/tms32031/tms32031.h b/src/devices/cpu/tms32031/tms32031.h
index b2d38dae11b..7cbdf9cf9ce 100644
--- a/src/devices/cpu/tms32031/tms32031.h
+++ b/src/devices/cpu/tms32031/tms32031.h
@@ -174,7 +174,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/tms32051/tms32051.cpp b/src/devices/cpu/tms32051/tms32051.cpp
index f88dc0fc69d..c5c198ff1ba 100644
--- a/src/devices/cpu/tms32051/tms32051.cpp
+++ b/src/devices/cpu/tms32051/tms32051.cpp
@@ -82,6 +82,15 @@ tms32051_device::tms32051_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> tms32051_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
/**************************************************************************
* TMS32053 Internal memory map
diff --git a/src/devices/cpu/tms32051/tms32051.h b/src/devices/cpu/tms32051/tms32051.h
index 43553203dc2..bb678871db6 100644
--- a/src/devices/cpu/tms32051/tms32051.h
+++ b/src/devices/cpu/tms32051/tms32051.h
@@ -77,7 +77,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : ( (spacenum == AS_DATA) ? &m_data_config : nullptr ) ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_min_opcode_bytes() const override { return 2; }
diff --git a/src/devices/cpu/tms32082/tms32082.cpp b/src/devices/cpu/tms32082/tms32082.cpp
index 749a8657d6e..a405dd3da6a 100644
--- a/src/devices/cpu/tms32082/tms32082.cpp
+++ b/src/devices/cpu/tms32082/tms32082.cpp
@@ -50,6 +50,19 @@ tms32082_mp_device::tms32082_mp_device(const machine_config &mconfig, const char
{
}
+std::vector<std::pair<int, const address_space_config *>> tms32082_mp_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
+std::vector<std::pair<int, const address_space_config *>> tms32082_pp_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
offs_t tms32082_mp_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/tms32082/tms32082.h b/src/devices/cpu/tms32082/tms32082.h
index 852f3833363..384327c0fb6 100644
--- a/src/devices/cpu/tms32082/tms32082.h
+++ b/src/devices/cpu/tms32082/tms32082.h
@@ -87,14 +87,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
@@ -182,14 +175,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tms34010/tms34010.cpp b/src/devices/cpu/tms34010/tms34010.cpp
index e437af461c5..0b7fd81df60 100644
--- a/src/devices/cpu/tms34010/tms34010.cpp
+++ b/src/devices/cpu/tms34010/tms34010.cpp
@@ -59,6 +59,12 @@ tms34020_device::tms34020_device(const machine_config &mconfig, const char *tag,
m_is_34020 = 1;
}
+std::vector<std::pair<int, const address_space_config *>> tms340x0_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
#include "34010ops.h"
diff --git a/src/devices/cpu/tms34010/tms34010.h b/src/devices/cpu/tms34010/tms34010.h
index 32b445629a9..67efacdc008 100644
--- a/src/devices/cpu/tms34010/tms34010.h
+++ b/src/devices/cpu/tms34010/tms34010.h
@@ -271,7 +271,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tms57002/tms57002.cpp b/src/devices/cpu/tms57002/tms57002.cpp
index 92da5cd8c72..5152cef06fd 100644
--- a/src/devices/cpu/tms57002/tms57002.cpp
+++ b/src/devices/cpu/tms57002/tms57002.cpp
@@ -908,11 +908,10 @@ offs_t tms57002_device::disasm_disassemble(std::ostream &stream, offs_t pc, cons
return CPU_DISASSEMBLE_NAME(tms57002)(this, stream, pc, oprom, opram, options);
}
-const address_space_config *tms57002_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tms57002_device::memory_space_config() const
{
- switch(spacenum) {
- case AS_PROGRAM: return &program_config;
- case AS_DATA: return &data_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &program_config),
+ std::make_pair(AS_DATA, &data_config)
+ };
}
diff --git a/src/devices/cpu/tms57002/tms57002.h b/src/devices/cpu/tms57002/tms57002.h
index 97fec1739c2..833728adef0 100644
--- a/src/devices/cpu/tms57002/tms57002.h
+++ b/src/devices/cpu/tms57002/tms57002.h
@@ -30,7 +30,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual uint32_t execute_min_cycles() const override;
virtual uint32_t execute_max_cycles() const override;
virtual uint32_t execute_input_lines() const override;
diff --git a/src/devices/cpu/tms7000/tms7000.cpp b/src/devices/cpu/tms7000/tms7000.cpp
index dbeeec2ac5e..2610a129bcb 100644
--- a/src/devices/cpu/tms7000/tms7000.cpp
+++ b/src/devices/cpu/tms7000/tms7000.cpp
@@ -174,6 +174,14 @@ tms70c46_device::tms70c46_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> tms7000_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/devices/cpu/tms7000/tms7000.h b/src/devices/cpu/tms7000/tms7000.h
index c6553e51c4c..2e9380226c2 100644
--- a/src/devices/cpu/tms7000/tms7000.h
+++ b/src/devices/cpu/tms7000/tms7000.h
@@ -76,7 +76,7 @@ protected:
virtual void execute_set_input(int extline, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/tms9900/ti990_10.cpp b/src/devices/cpu/tms9900/ti990_10.cpp
index 9b724533a55..1b715deaa1c 100644
--- a/src/devices/cpu/tms9900/ti990_10.cpp
+++ b/src/devices/cpu/tms9900/ti990_10.cpp
@@ -83,19 +83,12 @@ void ti990_10_device::device_reset()
if (TRACE_EMU) logerror("ti990_10: Device reset by emulator\n");
}
-const address_space_config *ti990_10_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ti990_10_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM:
- return &m_program_config;
-
- case AS_IO:
- return &m_io_config;
-
- default:
- return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
void ti990_10_device::execute_run()
diff --git a/src/devices/cpu/tms9900/ti990_10.h b/src/devices/cpu/tms9900/ti990_10.h
index f1c27d809d6..832b1d5dd86 100644
--- a/src/devices/cpu/tms9900/ti990_10.h
+++ b/src/devices/cpu/tms9900/ti990_10.h
@@ -38,7 +38,7 @@ protected:
uint32_t disasm_max_opcode_bytes() const override;
offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
- const address_space_config* memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
const address_space_config m_program_config;
const address_space_config m_io_config;
diff --git a/src/devices/cpu/tms9900/tms9900.cpp b/src/devices/cpu/tms9900/tms9900.cpp
index 7cc7552c502..4860c0a172e 100644
--- a/src/devices/cpu/tms9900/tms9900.cpp
+++ b/src/devices/cpu/tms9900/tms9900.cpp
@@ -434,19 +434,12 @@ void tms99xx_device::write_workspace_register_debug(int reg, uint16_t data)
m_icount = temp;
}
-const address_space_config *tms99xx_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tms99xx_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM:
- return &m_program_config;
-
- case AS_IO:
- return &m_io_config;
-
- default:
- return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
/**************************************************************************
diff --git a/src/devices/cpu/tms9900/tms9900.h b/src/devices/cpu/tms9900/tms9900.h
index 57d6bdfe5be..386a5af85f8 100644
--- a/src/devices/cpu/tms9900/tms9900.h
+++ b/src/devices/cpu/tms9900/tms9900.h
@@ -86,7 +86,7 @@ protected:
virtual uint32_t disasm_max_opcode_bytes() const override;
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
- const address_space_config* memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// Let these methods be overloaded by the TMS9980.
virtual void mem_read(void);
diff --git a/src/devices/cpu/tms9900/tms9995.cpp b/src/devices/cpu/tms9900/tms9995.cpp
index 70deeb97026..c9fd8ca4616 100644
--- a/src/devices/cpu/tms9900/tms9995.cpp
+++ b/src/devices/cpu/tms9900/tms9995.cpp
@@ -484,19 +484,12 @@ void tms9995_device::write_workspace_register_debug(int reg, uint16_t data)
m_icount = temp;
}
-const address_space_config *tms9995_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tms9995_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM:
- return &m_program_config;
-
- case AS_IO:
- return &m_io_config;
-
- default:
- return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
/**************************************************************************
diff --git a/src/devices/cpu/tms9900/tms9995.h b/src/devices/cpu/tms9900/tms9995.h
index f9e63051b4c..e6916c5bd41 100644
--- a/src/devices/cpu/tms9900/tms9995.h
+++ b/src/devices/cpu/tms9900/tms9995.h
@@ -98,7 +98,7 @@ protected:
virtual uint32_t disasm_max_opcode_bytes() const override;
virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
- const address_space_config* memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
uint64_t execute_clocks_to_cycles(uint64_t clocks) const override { return clocks / 4.0; }
uint64_t execute_cycles_to_clocks(uint64_t cycles) const override { return cycles * 4.0; }
diff --git a/src/devices/cpu/ucom4/ucom4.cpp b/src/devices/cpu/ucom4/ucom4.cpp
index 0f3529c9bb9..381f779586f 100644
--- a/src/devices/cpu/ucom4/ucom4.cpp
+++ b/src/devices/cpu/ucom4/ucom4.cpp
@@ -107,6 +107,14 @@ upd552_cpu_device::upd552_cpu_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> ucom4_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
+
// disasm
void ucom4_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
diff --git a/src/devices/cpu/ucom4/ucom4.h b/src/devices/cpu/ucom4/ucom4.h
index eb505917906..1a9e5bc5dd5 100644
--- a/src/devices/cpu/ucom4/ucom4.h
+++ b/src/devices/cpu/ucom4/ucom4.h
@@ -131,7 +131,7 @@ protected:
virtual void execute_run() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return(spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_DATA) ? &m_data_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual u32 disasm_min_opcode_bytes() const override { return 1; }
diff --git a/src/devices/cpu/unsp/unsp.cpp b/src/devices/cpu/unsp/unsp.cpp
index 302642d941d..70f12060f9e 100644
--- a/src/devices/cpu/unsp/unsp.cpp
+++ b/src/devices/cpu/unsp/unsp.cpp
@@ -23,6 +23,12 @@ unsp_device::unsp_device(const machine_config &mconfig, const char *tag, device_
{
}
+std::vector<std::pair<int, const address_space_config *>> unsp_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
offs_t unsp_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/unsp/unsp.h b/src/devices/cpu/unsp/unsp.h
index 85e46a44292..4ed412c6973 100644
--- a/src/devices/cpu/unsp/unsp.h
+++ b/src/devices/cpu/unsp/unsp.h
@@ -68,7 +68,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/upd7725/upd7725.cpp b/src/devices/cpu/upd7725/upd7725.cpp
index 4164ced9dd0..a49ee9e9a96 100644
--- a/src/devices/cpu/upd7725/upd7725.cpp
+++ b/src/devices/cpu/upd7725/upd7725.cpp
@@ -206,11 +206,12 @@ void necdsp_device::device_reset()
// the space doesn't exist
//-------------------------------------------------
-const address_space_config *necdsp_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> necdsp_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? &m_program_config :
- (spacenum == AS_DATA) ? &m_data_config :
- nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
}
diff --git a/src/devices/cpu/upd7725/upd7725.h b/src/devices/cpu/upd7725/upd7725.h
index ac4270729df..a1e3f55aa98 100644
--- a/src/devices/cpu/upd7725/upd7725.h
+++ b/src/devices/cpu/upd7725/upd7725.h
@@ -99,7 +99,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/upd7810/upd7810.cpp b/src/devices/cpu/upd7810/upd7810.cpp
index 8509b133d63..c2136cf9bd4 100644
--- a/src/devices/cpu/upd7810/upd7810.cpp
+++ b/src/devices/cpu/upd7810/upd7810.cpp
@@ -483,6 +483,13 @@ upd78c06_device::upd78c06_device(const machine_config &mconfig, const char *tag,
m_opXX = s_opXX_78c06;
}
+std::vector<std::pair<int, const address_space_config *>> upd7810_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
offs_t upd7810_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
extern CPU_DISASSEMBLE( upd7810 );
diff --git a/src/devices/cpu/upd7810/upd7810.h b/src/devices/cpu/upd7810/upd7810.h
index 1f49ba3cad0..0db2c77313b 100644
--- a/src/devices/cpu/upd7810/upd7810.h
+++ b/src/devices/cpu/upd7810/upd7810.h
@@ -221,7 +221,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/v30mz/v30mz.cpp b/src/devices/cpu/v30mz/v30mz.cpp
index ad20e1349d4..af89c09144b 100644
--- a/src/devices/cpu/v30mz/v30mz.cpp
+++ b/src/devices/cpu/v30mz/v30mz.cpp
@@ -134,6 +134,14 @@ v30mz_cpu_device::v30mz_cpu_device(const machine_config &mconfig, const char *ta
memset(&m_regs, 0x00, sizeof(m_regs));
}
+std::vector<std::pair<int, const address_space_config *>> v30mz_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
void v30mz_cpu_device::device_start()
{
diff --git a/src/devices/cpu/v30mz/v30mz.h b/src/devices/cpu/v30mz/v30mz.h
index bd7019757a1..b9949878d68 100644
--- a/src/devices/cpu/v30mz/v30mz.h
+++ b/src/devices/cpu/v30mz/v30mz.h
@@ -41,7 +41,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/v60/v60.cpp b/src/devices/cpu/v60/v60.cpp
index a445f8c7dac..1950b64c788 100644
--- a/src/devices/cpu/v60/v60.cpp
+++ b/src/devices/cpu/v60/v60.cpp
@@ -106,6 +106,14 @@ v70_device::v70_device(const machine_config &mconfig, const char *tag, device_t
{
}
+std::vector<std::pair<int, const address_space_config *>> v60_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
offs_t v60_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/v60/v60.h b/src/devices/cpu/v60/v60.h
index 3348262624e..b69f15dbe90 100644
--- a/src/devices/cpu/v60/v60.h
+++ b/src/devices/cpu/v60/v60.h
@@ -103,7 +103,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ( (spacenum == AS_IO) ? &m_io_config : nullptr ); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/v810/v810.cpp b/src/devices/cpu/v810/v810.cpp
index f7cd28bc44d..eb162d3af93 100644
--- a/src/devices/cpu/v810/v810.cpp
+++ b/src/devices/cpu/v810/v810.cpp
@@ -45,6 +45,14 @@ v810_device::v810_device(const machine_config &mconfig, const char *tag, device_
{
}
+std::vector<std::pair<int, const address_space_config *>> v810_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
offs_t v810_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options)
{
diff --git a/src/devices/cpu/v810/v810.h b/src/devices/cpu/v810/v810.h
index 04dd7e68327..04c8c8882ea 100644
--- a/src/devices/cpu/v810/v810.h
+++ b/src/devices/cpu/v810/v810.h
@@ -98,7 +98,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : ((spacenum == AS_IO) ? &m_io_config : nullptr); }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/cpu/z180/z180.cpp b/src/devices/cpu/z180/z180.cpp
index a80e4850e29..d28b9f45337 100644
--- a/src/devices/cpu/z180/z180.cpp
+++ b/src/devices/cpu/z180/z180.cpp
@@ -779,15 +779,19 @@ static std::unique_ptr<uint8_t[]> SZHVC_sub;
#include "z180op.hxx"
-const address_space_config *z180_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> z180_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_decrypted_opcodes_config : nullptr;
- default: return nullptr;
- }
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_decrypted_opcodes_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
uint8_t z180_device::z180_readcontrol(offs_t port)
@@ -2548,7 +2552,7 @@ void z180_device::execute_set_input(int irqline, int state)
}
/* logical to physical address translation */
-bool z180_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool z180_device::memory_translate(int spacenum, int intention, offs_t &address)
{
if (spacenum == AS_PROGRAM)
{
diff --git a/src/devices/cpu/z180/z180.h b/src/devices/cpu/z180/z180.h
index 13d558f0425..96c0d812fad 100644
--- a/src/devices/cpu/z180/z180.h
+++ b/src/devices/cpu/z180/z180.h
@@ -149,8 +149,8 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address) override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address) override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/z8/z8.cpp b/src/devices/cpu/z8/z8.cpp
index 5d4b63f1096..b75f651cff1 100644
--- a/src/devices/cpu/z8/z8.cpp
+++ b/src/devices/cpu/z8/z8.cpp
@@ -204,6 +204,13 @@ offs_t z8_device::disasm_disassemble(std::ostream &stream, offs_t pc, const uint
return CPU_DISASSEMBLE_NAME(z8)(this, stream, pc, oprom, opram, options);
}
+std::vector<std::pair<int, const address_space_config *>> z8_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config)
+ };
+}
/***************************************************************************
INLINE FUNCTIONS
diff --git a/src/devices/cpu/z8/z8.h b/src/devices/cpu/z8/z8.h
index e8485a65b12..17ec3525d82 100644
--- a/src/devices/cpu/z8/z8.h
+++ b/src/devices/cpu/z8/z8.h
@@ -83,16 +83,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch ( spacenum )
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_DATA: return &m_data_config;
- default: return nullptr;
- }
- return nullptr;
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/z80/tmpz84c011.cpp b/src/devices/cpu/z80/tmpz84c011.cpp
index 17d71eab222..d2e0a749a4a 100644
--- a/src/devices/cpu/z80/tmpz84c011.cpp
+++ b/src/devices/cpu/z80/tmpz84c011.cpp
@@ -53,6 +53,12 @@ tmpz84c011_device::tmpz84c011_device(const machine_config &mconfig, const char *
memset(m_pio_latch, 0, 5);
}
+std::vector<std::pair<int, const address_space_config *>> tmpz84c011_device::memory_space_config() const
+{
+ auto r = z80_device::memory_space_config();
+ r.back().second = &m_io_space_config;
+ return r;
+}
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/devices/cpu/z80/tmpz84c011.h b/src/devices/cpu/z80/tmpz84c011.h
index a713657f194..c614ac2bc78 100644
--- a/src/devices/cpu/z80/tmpz84c011.h
+++ b/src/devices/cpu/z80/tmpz84c011.h
@@ -131,14 +131,7 @@ protected:
const address_space_config m_io_space_config;
- const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_IO: return &m_io_space_config;
- default: return z80_device::memory_space_config(spacenum);
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
// devices/pointers
diff --git a/src/devices/cpu/z80/tmpz84c015.cpp b/src/devices/cpu/z80/tmpz84c015.cpp
index f80a690f706..1af7fbedf16 100644
--- a/src/devices/cpu/z80/tmpz84c015.cpp
+++ b/src/devices/cpu/z80/tmpz84c015.cpp
@@ -64,6 +64,13 @@ tmpz84c015_device::tmpz84c015_device(const machine_config &mconfig, const char *
{
}
+std::vector<std::pair<int, const address_space_config *>> tmpz84c015_device::memory_space_config() const
+{
+ auto r = z80_device::memory_space_config();
+ r.back().second = &m_io_space_config;
+ return r;
+}
+
//-------------------------------------------------
// device_start - device-specific startup
diff --git a/src/devices/cpu/z80/tmpz84c015.h b/src/devices/cpu/z80/tmpz84c015.h
index b9230c6a09b..e24ab6d33ec 100644
--- a/src/devices/cpu/z80/tmpz84c015.h
+++ b/src/devices/cpu/z80/tmpz84c015.h
@@ -183,14 +183,7 @@ protected:
const address_space_config m_io_space_config;
- const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_IO: return &m_io_space_config;
- default: return z80_device::memory_space_config(spacenum);
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
// devices/pointers
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index 4be4da50e8c..55c9f33c729 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -3707,15 +3707,19 @@ z80_device::z80_device(const machine_config &mconfig, device_type type, const ch
{
}
-const address_space_config *z80_device::memory_space_config(address_spacenum spacenum) const
-{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- case AS_OPCODES: return has_configured_map(AS_OPCODES) ? &m_decrypted_opcodes_config : nullptr;
- default: return nullptr;
- }
+std::vector<std::pair<int, const address_space_config *>> z80_device::memory_space_config() const
+{
+ if(has_configured_map(AS_OPCODES))
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_OPCODES, &m_decrypted_opcodes_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+ else
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
}
DEFINE_DEVICE_TYPE(Z80, z80_device, "z80", "Z80")
diff --git a/src/devices/cpu/z80/z80.h b/src/devices/cpu/z80/z80.h
index 80e3bdabcbd..85020b9a054 100644
--- a/src/devices/cpu/z80/z80.h
+++ b/src/devices/cpu/z80/z80.h
@@ -58,7 +58,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_import(const device_state_entry &entry) override;
diff --git a/src/devices/cpu/z8000/z8000.cpp b/src/devices/cpu/z8000/z8000.cpp
index b3edc18ada2..5d006b5274b 100644
--- a/src/devices/cpu/z8000/z8000.cpp
+++ b/src/devices/cpu/z8000/z8000.cpp
@@ -61,6 +61,22 @@ offs_t z8002_device::disasm_disassemble(std::ostream &stream, offs_t pc, const u
return CPU_DISASSEMBLE_NAME(z8000)(this, stream, pc, oprom, opram, options);
}
+std::vector<std::pair<int, const address_space_config *>> z8002_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
+
+std::vector<std::pair<int, const address_space_config *>> z8001_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config),
+ std::make_pair(AS_DATA, &m_data_config),
+ std::make_pair(AS_IO, &m_io_config)
+ };
+}
/* opcode execution table */
std::unique_ptr<z8002_device::Z8000_exec const []> z8002_device::z8000_exec;
@@ -194,7 +210,7 @@ uint32_t z8001_device::adjust_addr_for_nonseg_mode(uint32_t addr)
}
}
-uint8_t z8002_device::RDMEM_B(address_spacenum spacenum, uint32_t addr)
+uint8_t z8002_device::RDMEM_B(int spacenum, uint32_t addr)
{
addr = adjust_addr_for_nonseg_mode(addr);
if (spacenum == AS_PROGRAM)
@@ -203,7 +219,7 @@ uint8_t z8002_device::RDMEM_B(address_spacenum spacenum, uint32_t addr)
return m_data->read_byte(addr);
}
-uint16_t z8002_device::RDMEM_W(address_spacenum spacenum, uint32_t addr)
+uint16_t z8002_device::RDMEM_W(int spacenum, uint32_t addr)
{
addr = adjust_addr_for_nonseg_mode(addr);
addr &= ~1;
@@ -218,7 +234,7 @@ uint16_t z8002_device::RDMEM_W(address_spacenum spacenum, uint32_t addr)
return m_data->read_word(addr);
}
-uint32_t z8002_device::RDMEM_L(address_spacenum spacenum, uint32_t addr)
+uint32_t z8002_device::RDMEM_L(int spacenum, uint32_t addr)
{
uint32_t result;
addr = adjust_addr_for_nonseg_mode(addr);
@@ -235,7 +251,7 @@ uint32_t z8002_device::RDMEM_L(address_spacenum spacenum, uint32_t addr)
}
}
-void z8002_device::WRMEM_B(address_spacenum spacenum, uint32_t addr, uint8_t value)
+void z8002_device::WRMEM_B(int spacenum, uint32_t addr, uint8_t value)
{
addr = adjust_addr_for_nonseg_mode(addr);
if (spacenum == AS_PROGRAM)
@@ -244,7 +260,7 @@ void z8002_device::WRMEM_B(address_spacenum spacenum, uint32_t addr, uint8_t val
m_data->write_byte(addr, value);
}
-void z8002_device::WRMEM_W(address_spacenum spacenum, uint32_t addr, uint16_t value)
+void z8002_device::WRMEM_W(int spacenum, uint32_t addr, uint16_t value)
{
addr = adjust_addr_for_nonseg_mode(addr);
addr &= ~1;
@@ -254,7 +270,7 @@ void z8002_device::WRMEM_W(address_spacenum spacenum, uint32_t addr, uint16_t va
m_data->write_word(addr, value);
}
-void z8002_device::WRMEM_L(address_spacenum spacenum, uint32_t addr, uint32_t value)
+void z8002_device::WRMEM_L(int spacenum, uint32_t addr, uint32_t value)
{
addr = adjust_addr_for_nonseg_mode(addr);
addr &= ~1;
diff --git a/src/devices/cpu/z8000/z8000.h b/src/devices/cpu/z8000/z8000.h
index 8186a0d57cc..1feb973e2b4 100644
--- a/src/devices/cpu/z8000/z8000.h
+++ b/src/devices/cpu/z8000/z8000.h
@@ -65,15 +65,7 @@ protected:
virtual void execute_set_input(int inputnum, int state) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_IO: return &m_io_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
@@ -126,12 +118,12 @@ protected:
inline uint32_t get_addr_operand(int opnum);
inline uint32_t get_raw_addr_operand(int opnum);
virtual uint32_t adjust_addr_for_nonseg_mode(uint32_t addr);
- inline uint8_t RDMEM_B(address_spacenum spacenum, uint32_t addr);
- inline uint16_t RDMEM_W(address_spacenum spacenum, uint32_t addr);
- inline uint32_t RDMEM_L(address_spacenum spacenum, uint32_t addr);
- inline void WRMEM_B(address_spacenum spacenum, uint32_t addr, uint8_t value);
- inline void WRMEM_W(address_spacenum spacenum, uint32_t addr, uint16_t value);
- inline void WRMEM_L(address_spacenum spacenum, uint32_t addr, uint32_t value);
+ inline uint8_t RDMEM_B(int spacenum, uint32_t addr);
+ inline uint16_t RDMEM_W(int spacenum, uint32_t addr);
+ inline uint32_t RDMEM_L(int spacenum, uint32_t addr);
+ inline void WRMEM_B(int spacenum, uint32_t addr, uint8_t value);
+ inline void WRMEM_W(int spacenum, uint32_t addr, uint16_t value);
+ inline void WRMEM_L(int spacenum, uint32_t addr, uint32_t value);
inline uint8_t RDPORT_B(int mode, uint16_t addr);
virtual uint16_t RDPORT_W(int mode, uint16_t addr);
inline void WRPORT_B(int mode, uint16_t addr, uint8_t value);
@@ -669,16 +661,7 @@ protected:
virtual void device_reset() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_config;
- case AS_DATA: return &m_data_config;
- case AS_IO: return &m_io_config;
- default: return nullptr;
- }
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_disasm_interface overrides
virtual uint32_t disasm_max_opcode_bytes() const override { return 8; }
diff --git a/src/devices/machine/at28c16.cpp b/src/devices/machine/at28c16.cpp
index 06188c190be..7ebc30943f9 100644
--- a/src/devices/machine/at28c16.cpp
+++ b/src/devices/machine/at28c16.cpp
@@ -57,9 +57,11 @@ at28c16_device::at28c16_device(const machine_config &mconfig, const char *tag, d
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *at28c16_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> at28c16_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/machine/at28c16.h b/src/devices/machine/at28c16.h
index 1339a7ce85c..4edd2a00a46 100644
--- a/src/devices/machine/at28c16.h
+++ b/src/devices/machine/at28c16.h
@@ -49,7 +49,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_nvram_interface overrides
virtual void nvram_default() override;
diff --git a/src/devices/machine/bankdev.cpp b/src/devices/machine/bankdev.cpp
index 50000e8942f..7a0e158d92b 100644
--- a/src/devices/machine/bankdev.cpp
+++ b/src/devices/machine/bankdev.cpp
@@ -18,6 +18,13 @@ address_map_bank_device::address_map_bank_device( const machine_config &mconfig,
{
}
+std::vector<std::pair<int, const address_space_config *>> address_map_bank_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
+
DEVICE_ADDRESS_MAP_START(amap8, 8, address_map_bank_device)
AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(read8, write8)
ADDRESS_MAP_END
diff --git a/src/devices/machine/bankdev.h b/src/devices/machine/bankdev.h
index 5fb049fd3af..11a90e33639 100644
--- a/src/devices/machine/bankdev.h
+++ b/src/devices/machine/bankdev.h
@@ -54,7 +54,7 @@ protected:
virtual void device_config_complete() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override { return (spacenum == AS_PROGRAM) ? &m_program_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
// internal state
diff --git a/src/devices/machine/er2055.cpp b/src/devices/machine/er2055.cpp
index 4504a7e07c9..0053a13759e 100644
--- a/src/devices/machine/er2055.cpp
+++ b/src/devices/machine/er2055.cpp
@@ -65,9 +65,11 @@ void er2055_device::device_start()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *er2055_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> er2055_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/machine/er2055.h b/src/devices/machine/er2055.h
index 6dae6d1d424..eef642e5c29 100644
--- a/src/devices/machine/er2055.h
+++ b/src/devices/machine/er2055.h
@@ -51,7 +51,7 @@ protected:
virtual void device_start() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_nvram_interface overrides
virtual void nvram_default() override;
diff --git a/src/devices/machine/gt64xxx.cpp b/src/devices/machine/gt64xxx.cpp
index b163a9ef99f..e54aaa7c55a 100644
--- a/src/devices/machine/gt64xxx.cpp
+++ b/src/devices/machine/gt64xxx.cpp
@@ -32,10 +32,10 @@
/* Galileo registers - 0x000-0x3ff */
#define GREG_CPU_CONFIG (0x000/4)
-#define GREG_RAS_1_0_LO (0x008/4)
-#define GREG_RAS_1_0_HI (0x010/4)
-#define GREG_RAS_3_2_LO (0x018/4)
-#define GREG_RAS_3_2_HI (0x020/4)
+#define GREG_R1_0_LO (0x008/4)
+#define GREG_R1_0_HI (0x010/4)
+#define GREG_R3_2_LO (0x018/4)
+#define GREG_R3_2_HI (0x020/4)
#define GREG_CS_2_0_LO (0x028/4)
#define GREG_CS_2_0_HI (0x030/4)
#define GREG_CS_3_BOOT_LO (0x038/4)
@@ -113,8 +113,8 @@
/* Galileo registers - 0xc00-0xfff */
#define GREG_PCI_COMMAND (0xc00/4)
#define GREG_PCI_TIMEOUT (0xc04/4)
-#define GREG_PCI_RAS_1_0 (0xc08/4)
-#define GREG_PCI_RAS_3_2 (0xc0c/4)
+#define GREG_PCI_R1_0 (0xc08/4)
+#define GREG_PCI_R3_2 (0xc0c/4)
#define GREG_PCI_CS_2_0 (0xc10/4)
#define GREG_PCI_CS_3_BOOT (0xc14/4)
#define GREG_INT_STATE (0xc18/4)
@@ -181,18 +181,21 @@ void gt64xxx_device::set_map(int id, const address_map_delegate &map, device_t *
m_cs_devices[id] = device;
}
-const address_space_config *gt64xxx_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> gt64xxx_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? pci_bridge_device::memory_space_config(spacenum) : (spacenum == AS_DATA) ? &m_mem_config : (spacenum == AS_IO) ? &m_io_config : nullptr;
+ auto r = pci_bridge_device::memory_space_config();
+ r.emplace_back(std::make_pair(AS_PCI_MEM, &m_mem_config));
+ r.emplace_back(std::make_pair(AS_PCI_IO, &m_io_config));
+ return r;
}
void gt64xxx_device::device_start()
{
pci_host_device::device_start();
m_cpu = machine().device<mips3_device>(cpu_tag);
- m_cpu_space = &m_cpu->space(AS_PROGRAM);
- memory_space = &space(AS_DATA);
- io_space = &space(AS_IO);
+ m_cpu_space = &m_cpu->space(AS_PCI_CONFIG);
+ memory_space = &space(AS_PCI_MEM);
+ io_space = &space(AS_PCI_IO);
memory_window_start = 0;
memory_window_end = 0xffffffff;
@@ -266,10 +269,10 @@ void gt64xxx_device::device_reset()
// Configuration register defaults
m_reg[GREG_CPU_CONFIG] = m_be ? 0 : (1<<12);
- m_reg[GREG_RAS_1_0_LO] = 0x0;
- m_reg[GREG_RAS_1_0_HI] = 0x7;
- m_reg[GREG_RAS_3_2_LO] = 0x8;
- m_reg[GREG_RAS_3_2_HI] = 0xf;
+ m_reg[GREG_R1_0_LO] = 0x0;
+ m_reg[GREG_R1_0_HI] = 0x7;
+ m_reg[GREG_R3_2_LO] = 0x8;
+ m_reg[GREG_R3_2_HI] = 0xf;
m_reg[GREG_CS_2_0_LO] = 0xe0;
m_reg[GREG_CS_2_0_HI] = 0x70;
m_reg[GREG_CS_3_BOOT_LO] = 0xf8;
@@ -340,8 +343,8 @@ void gt64xxx_device::map_cpu_space()
// RAS[0:3]
for (int ramIndex = 0; ramIndex < 4; ++ramIndex)
{
- winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex/2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
- winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
+ winStart = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex/2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
+ winEnd = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
// Cap window end at physical memory bounds
uint32_t winSize = winEnd - winStart + 1;
if (winSize > m_ram[ramIndex].size() * 4)
@@ -389,8 +392,8 @@ void gt64xxx_device::map_cpu_space()
for (size_t index = 0; index < proc_addr_bank::ADDR_NUM; ++index)
{
if (index < proc_addr_bank::ADDR_PCI_MEM1) {
- dma_addr_map[index].low_addr = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * index] << 21);
- dma_addr_map[index].high_addr = (dma_addr_map[index].low_addr & 0xf0000000) | (m_reg[GREG_RAS_1_0_HI + 0x10 / 4 * index] << 21) | 0x1fffff;
+ dma_addr_map[index].low_addr = (m_reg[GREG_R1_0_LO + 0x10 / 4 * index] << 21);
+ dma_addr_map[index].high_addr = (dma_addr_map[index].low_addr & 0xf0000000) | (m_reg[GREG_R1_0_HI + 0x10 / 4 * index] << 21) | 0x1fffff;
}
else {
dma_addr_map[index].low_addr = (m_reg[GREG_PCI_MEM1_LO] << 21);
@@ -399,11 +402,11 @@ void gt64xxx_device::map_cpu_space()
switch (index) {
case proc_addr_bank::ADDR_PCI_IO:
- dma_addr_map[index].space = &this->space(AS_IO);
+ dma_addr_map[index].space = &this->space(AS_PCI_IO);
break;
case proc_addr_bank::ADDR_PCI_MEM0:
case proc_addr_bank::ADDR_PCI_MEM1:
- dma_addr_map[index].space = &this->space(AS_DATA);
+ dma_addr_map[index].space = &this->space(AS_PCI_MEM);
break;
default:
dma_addr_map[index].space = m_cpu_space;
@@ -418,11 +421,11 @@ void gt64xxx_device::map_extra(uint64_t memory_window_start, uint64_t memory_win
int ramIndex;
uint32_t winStart, winEnd, winSize;
- // Not sure if GREG_RAS_1_0_LO should be added on PCI address map side.
+ // Not sure if GREG_R1_0_LO should be added on PCI address map side.
// RAS0
ramIndex = 0;
- winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
- winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
+ winStart = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
+ winEnd = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
winSize = winEnd - winStart + 1;
memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_0_r), this));
memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_0_w), this));
@@ -430,8 +433,8 @@ void gt64xxx_device::map_extra(uint64_t memory_window_start, uint64_t memory_win
// RAS1
ramIndex = 1;
- winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
- winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
+ winStart = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
+ winEnd = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
winSize = winEnd - winStart + 1;
memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_1_r), this));
memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_1_w), this));
@@ -439,8 +442,8 @@ void gt64xxx_device::map_extra(uint64_t memory_window_start, uint64_t memory_win
// RAS2
ramIndex = 2;
- winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
- winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
+ winStart = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
+ winEnd = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
winSize = winEnd - winStart + 1;
memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_2_r), this));
memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_2_w), this));
@@ -448,8 +451,8 @@ void gt64xxx_device::map_extra(uint64_t memory_window_start, uint64_t memory_win
// RAS3
ramIndex = 3;
- winStart = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
- winEnd = (m_reg[GREG_RAS_1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
+ winStart = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_LO + 0x8 / 4 * ramIndex] << 20);
+ winEnd = (m_reg[GREG_R1_0_LO + 0x10 / 4 * (ramIndex / 2)] << 21) | (m_reg[GREG_RAS0_HI + 0x8 / 4 * ramIndex] << 20) | 0xfffff;
winSize = winEnd - winStart + 1;
memory_space->install_read_handler(winStart, winEnd, read32_delegate(FUNC(gt64xxx_device::ras_3_r), this));
memory_space->install_write_handler(winStart, winEnd, write32_delegate(FUNC(gt64xxx_device::ras_3_w), this));
@@ -471,7 +474,7 @@ WRITE_LINE_MEMBER(gt64xxx_device::pci_stall)
if (m_pci_cpu_stalled) {
m_pci_cpu_stalled = 0;
// master_mem0_w -- Should actually be checking for master_mem1_w as well
- this->space(AS_DATA).write_dword((m_reg[GREG_PCI_MEM0_LO] << 21) | (m_cpu_stalled_offset * 4), m_cpu_stalled_data, m_cpu_stalled_mem_mask);
+ this->space(AS_PCI_MEM).write_dword((m_reg[GREG_PCI_MEM0_LO] << 21) | (m_cpu_stalled_offset * 4), m_cpu_stalled_data, m_cpu_stalled_mem_mask);
/* resume CPU execution */
machine().scheduler().trigger(45678);
LOGGALILEO("Resuming CPU on PCI Stall offset=0x%08X data=0x%08X\n", m_cpu_stalled_offset * 4, m_cpu_stalled_data);
@@ -496,7 +499,7 @@ WRITE32_MEMBER (gt64xxx_device::pci_config_w)
// PCI Master Window 0
READ32_MEMBER (gt64xxx_device::master_mem0_r)
{
- uint32_t result = this->space(AS_DATA).read_dword((m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_PCI_MEM).read_dword((m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), mem_mask);
LOGPCI("%06X:galileo pci mem0 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), result, mem_mask);
return result;
}
@@ -513,27 +516,27 @@ WRITE32_MEMBER (gt64xxx_device::master_mem0_w)
LOGMASKED(LOG_GALILEO | LOG_PCI, "%08X:Stalling CPU on PCI Stall\n", m_cpu_space->device().safe_pc());
return;
}
- this->space(AS_DATA).write_dword((m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), data, mem_mask);
+ this->space(AS_PCI_MEM).write_dword((m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), data, mem_mask);
LOGPCI("%06X:galileo pci mem0 write to offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_MEM0_LO]<<21) | (offset*4), data, mem_mask);
}
// PCI Master Window 1
READ32_MEMBER (gt64xxx_device::master_mem1_r)
{
- uint32_t result = this->space(AS_DATA).read_dword((m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_PCI_MEM).read_dword((m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), mem_mask);
LOGPCI("%06X:galileo pci mem1 read from offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), result, mem_mask);
return result;
}
WRITE32_MEMBER (gt64xxx_device::master_mem1_w)
{
- this->space(AS_DATA).write_dword((m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), data, mem_mask);
+ this->space(AS_PCI_MEM).write_dword((m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), data, mem_mask);
LOGPCI("%06X:galileo pci mem1 write to offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_MEM1_LO]<<21) | (offset*4), data, mem_mask);
}
// PCI Master IO
READ32_MEMBER (gt64xxx_device::master_io_r)
{
- uint32_t result = this->space(AS_IO).read_dword((m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), mem_mask);
+ uint32_t result = this->space(AS_PCI_IO).read_dword((m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), mem_mask);
if (m_prev_addr != offset) {
m_prev_addr = offset;
LOGPCI("%06X:galileo pci io read from offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), result, mem_mask);
@@ -542,7 +545,7 @@ READ32_MEMBER (gt64xxx_device::master_io_r)
}
WRITE32_MEMBER (gt64xxx_device::master_io_w)
{
- this->space(AS_IO).write_dword((m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), data, mem_mask);
+ this->space(AS_PCI_IO).write_dword((m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), data, mem_mask);
if (m_prev_addr != offset) {
m_prev_addr = offset;
LOGPCI("%06X:galileo pci io write to offset %08X = %08X & %08X\n", space.device().safe_pc(), (m_reg[GREG_PCI_IO_LO] << 21) | (offset * 4), data, mem_mask);
@@ -678,10 +681,10 @@ WRITE32_MEMBER(gt64xxx_device::cpu_if_w)
/* switch off the offset for special cases */
switch (offset)
{
- case GREG_RAS_1_0_LO:
- case GREG_RAS_1_0_HI:
- case GREG_RAS_3_2_LO:
- case GREG_RAS_3_2_HI:
+ case GREG_R1_0_LO:
+ case GREG_R1_0_HI:
+ case GREG_R3_2_LO:
+ case GREG_R3_2_HI:
case GREG_CS_2_0_LO:
case GREG_CS_2_0_HI:
case GREG_CS_3_BOOT_LO:
diff --git a/src/devices/machine/gt64xxx.h b/src/devices/machine/gt64xxx.h
index 192672b8c3a..3b713985530 100644
--- a/src/devices/machine/gt64xxx.h
+++ b/src/devices/machine/gt64xxx.h
@@ -107,12 +107,15 @@ public:
protected:
address_space *m_cpu_space;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual void device_start() override;
virtual void device_reset() override;
private:
+ static constexpr int AS_PCI_MEM = 1;
+ static constexpr int AS_PCI_IO = 2;
+
struct galileo_timer
{
emu_timer * timer;
diff --git a/src/devices/machine/i8155.cpp b/src/devices/machine/i8155.cpp
index c1bc13f3568..bc25d416878 100644
--- a/src/devices/machine/i8155.cpp
+++ b/src/devices/machine/i8155.cpp
@@ -98,7 +98,7 @@ enum
//**************************************************************************
// default address map
-static ADDRESS_MAP_START( i8155, AS_0, 8, i8155_device )
+static ADDRESS_MAP_START( i8155, 0, 8, i8155_device )
AM_RANGE(0x00, 0xff) AM_RAM
ADDRESS_MAP_END
@@ -344,9 +344,11 @@ void i8155_device::device_timer(emu_timer &timer, device_timer_id id, int param,
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *i8155_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> i8155_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/machine/i8155.h b/src/devices/machine/i8155.h
index 09bcb1d93b5..b96527f629f 100644
--- a/src/devices/machine/i8155.h
+++ b/src/devices/machine/i8155.h
@@ -100,7 +100,7 @@ protected:
virtual void device_reset() override;
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
inline uint8_t get_timer_mode();
inline void timer_output();
diff --git a/src/devices/machine/linflash.cpp b/src/devices/machine/linflash.cpp
index cb808616eb2..3c99d9297dc 100644
--- a/src/devices/machine/linflash.cpp
+++ b/src/devices/machine/linflash.cpp
@@ -18,12 +18,14 @@ linear_flash_pccard_device::linear_flash_pccard_device(const machine_config &mco
void linear_flash_pccard_device::device_start()
{
- m_space = &space(AS_0);
+ m_space = &space(0);
}
-const address_space_config *linear_flash_pccard_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> linear_flash_pccard_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
READ16_MEMBER( linear_flash_pccard_device::read_memory )
@@ -40,7 +42,7 @@ WRITE16_MEMBER( linear_flash_pccard_device::write_memory )
}
-static ADDRESS_MAP_START(linear_flash_pccard_16mb, AS_0, 16, linear_flash_pccard_16mb_device)
+static ADDRESS_MAP_START(linear_flash_pccard_16mb, 0, 16, linear_flash_pccard_16mb_device)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE8("1l", intelfsh8_device, read, write, 0x00ff)
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE8("1u", intelfsh8_device, read, write, 0xff00)
@@ -70,7 +72,7 @@ MACHINE_CONFIG_MEMBER( linear_flash_pccard_16mb_device::device_add_mconfig )
MACHINE_CONFIG_END
-static ADDRESS_MAP_START(linear_flash_pccard_32mb, AS_0, 16, linear_flash_pccard_32mb_device)
+static ADDRESS_MAP_START(linear_flash_pccard_32mb, 0, 16, linear_flash_pccard_32mb_device)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE8("1l", intelfsh8_device, read, write, 0x00ff)
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE8("1u", intelfsh8_device, read, write, 0xff00)
@@ -116,7 +118,7 @@ MACHINE_CONFIG_MEMBER( linear_flash_pccard_32mb_device::device_add_mconfig )
MACHINE_CONFIG_END
-static ADDRESS_MAP_START(linear_flash_pccard_64mb, AS_0, 16, linear_flash_pccard_64mb_device)
+static ADDRESS_MAP_START(linear_flash_pccard_64mb, 0, 16, linear_flash_pccard_64mb_device)
ADDRESS_MAP_UNMAP_HIGH
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE8("1l", intelfsh8_device, read, write, 0x00ff)
AM_RANGE(0x00000000, 0x003fffff) AM_DEVREADWRITE8("1u", intelfsh8_device, read, write, 0xff00)
diff --git a/src/devices/machine/linflash.h b/src/devices/machine/linflash.h
index 969ea7fbf02..39d6abd21c9 100644
--- a/src/devices/machine/linflash.h
+++ b/src/devices/machine/linflash.h
@@ -24,7 +24,7 @@ protected:
virtual void device_start() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
address_space_config m_space_config;
address_space *m_space;
diff --git a/src/devices/machine/mcf5206e.cpp b/src/devices/machine/mcf5206e.cpp
index e3b0b669257..b0b8254017d 100644
--- a/src/devices/machine/mcf5206e.cpp
+++ b/src/devices/machine/mcf5206e.cpp
@@ -19,7 +19,7 @@ static void CLIB_DECL ATTR_PRINTF(1,2) nolog(const char *format, ...) {}
//#define debuglogtimer logerror
#define debuglogtimer nolog
-static ADDRESS_MAP_START( coldfire_regs_map, AS_0, 32, mcf5206e_peripheral_device )
+static ADDRESS_MAP_START( coldfire_regs_map, 0, 32, mcf5206e_peripheral_device )
AM_RANGE(0x014, 0x017) AM_READWRITE8(ICR1_ICR2_ICR3_ICR4_r, ICR1_ICR2_ICR3_ICR4_w, 0xffffffff)
@@ -836,9 +836,11 @@ mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mco
{
}
-const address_space_config *mcf5206e_peripheral_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mcf5206e_peripheral_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//-------------------------------------------------
diff --git a/src/devices/machine/mcf5206e.h b/src/devices/machine/mcf5206e.h
index b6fbd55a6aa..36781c1c827 100644
--- a/src/devices/machine/mcf5206e.h
+++ b/src/devices/machine/mcf5206e.h
@@ -161,7 +161,7 @@ protected:
virtual void device_reset() override;
virtual void device_post_load() override { }
virtual void device_clock_changed() override { }
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
TIMER_CALLBACK_MEMBER(timer1_callback);
diff --git a/src/devices/machine/netlist.cpp b/src/devices/machine/netlist.cpp
index 5029b6a973c..b4f6b18fa1a 100644
--- a/src/devices/machine/netlist.cpp
+++ b/src/devices/machine/netlist.cpp
@@ -486,6 +486,12 @@ void netlist_mame_ram_pointer_device::device_timer(emu_timer &timer, device_time
m_data = (*m_param)();
}
+std::vector<std::pair<int, const address_space_config *>> netlist_mame_cpu_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_config)
+ };
+}
void netlist_mame_cpu_device::state_string_export(const device_state_entry &entry, std::string &str) const
{
diff --git a/src/devices/machine/netlist.h b/src/devices/machine/netlist.h
index 55af64ecd8e..c83e10fb6a9 100644
--- a/src/devices/machine/netlist.h
+++ b/src/devices/machine/netlist.h
@@ -180,10 +180,7 @@ protected:
ATTR_COLD virtual offs_t disasm_disassemble(std::ostream &stream, offs_t pc, const uint8_t *oprom, const uint8_t *opram, uint32_t options) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override
- {
- return (AS_PROGRAM == spacenum) ? &m_program_config : nullptr;
- }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_state_interface overrides
virtual void state_string_export(const device_state_entry &entry, std::string &str) const override;
diff --git a/src/devices/machine/pci.cpp b/src/devices/machine/pci.cpp
index fec52315a23..3f2dc2ff4bb 100644
--- a/src/devices/machine/pci.cpp
+++ b/src/devices/machine/pci.cpp
@@ -448,9 +448,11 @@ READ8_MEMBER(pci_bridge_device::header_type_r)
return 0x01;
}
-const address_space_config *pci_bridge_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> pci_bridge_device::memory_space_config() const
{
- return spacenum == AS_PROGRAM ? &configure_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PCI_CONFIG, &configure_space_config)
+ };
}
device_t *pci_bridge_device::bus_root()
@@ -548,7 +550,7 @@ void pci_bridge_device::map_device(uint64_t memory_window_start, uint64_t memory
void pci_bridge_device::regenerate_config_mapping()
{
- address_space *config_space = &space(AS_PROGRAM);
+ address_space *config_space = &space(AS_PCI_CONFIG);
config_space->unmap_readwrite(0x00000, 0xfffff);
for(int i=0; i<32*8; i++)
if(sub_devices[i])
@@ -558,7 +560,7 @@ void pci_bridge_device::regenerate_config_mapping()
uint32_t pci_bridge_device::do_config_read(uint8_t bus, uint8_t device, uint16_t reg, uint32_t mem_mask)
{
if(sub_devices[device]) {
- uint32_t data = space(AS_PROGRAM).read_dword((device << 12) | reg, mem_mask);
+ uint32_t data = space(AS_PCI_CONFIG).read_dword((device << 12) | reg, mem_mask);
logerror("config_read %02x:%02x.%x:%02x %08x @ %08x\n", bus, device >> 3, device & 7, reg, data, mem_mask);
return data;
} else
@@ -587,7 +589,7 @@ uint32_t pci_bridge_device::config_read(uint8_t bus, uint8_t device, uint16_t re
void pci_bridge_device::do_config_write(uint8_t bus, uint8_t device, uint16_t reg, uint32_t data, uint32_t mem_mask)
{
if(sub_devices[device]) {
- space(AS_PROGRAM).write_dword((device << 12) | reg, data, mem_mask);
+ space(AS_PCI_CONFIG).write_dword((device << 12) | reg, data, mem_mask);
logerror("config_write %02x:%02x.%x:%02x %08x @ %08x\n", bus, device >> 3, device & 7, reg, data, mem_mask);
}
}
diff --git a/src/devices/machine/pci.h b/src/devices/machine/pci.h
index d1f16287043..c8a28a72050 100644
--- a/src/devices/machine/pci.h
+++ b/src/devices/machine/pci.h
@@ -200,11 +200,13 @@ public:
DECLARE_WRITE16_MEMBER(bridge_control_w);
protected:
+ static constexpr int AS_PCI_CONFIG = 0;
+
pci_bridge_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock);
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual device_t *bus_root();
virtual void regenerate_config_mapping();
diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp
index b5022a342eb..96ca73a463e 100644
--- a/src/devices/machine/tc009xlvc.cpp
+++ b/src/devices/machine/tc009xlvc.cpp
@@ -156,7 +156,7 @@ WRITE8_MEMBER(tc0091lvc_device::tc0091lvc_spr_w)
tx_tilemap->mark_all_dirty();
}
-static ADDRESS_MAP_START( tc0091lvc_map8, AS_0, 8, tc0091lvc_device )
+static ADDRESS_MAP_START( tc0091lvc_map8, 0, 8, tc0091lvc_device )
AM_RANGE(0x014000, 0x017fff) AM_READWRITE(tc0091lvc_pcg1_r, tc0091lvc_pcg1_w)
AM_RANGE(0x018000, 0x018fff) AM_READWRITE(tc0091lvc_vram0_r, tc0091lvc_vram0_w)
AM_RANGE(0x019000, 0x019fff) AM_READWRITE(tc0091lvc_vram1_r, tc0091lvc_vram1_w)
@@ -281,9 +281,11 @@ void tc0091lvc_device::device_start()
m_gfxdecode->set_gfx(m_gfx_index, std::make_unique<gfx_element>(&palette, char_layout, (uint8_t *)m_pcg_ram, 0, palette.entries() / 16, 0));
}
-const address_space_config *tc0091lvc_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tc0091lvc_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/machine/tc009xlvc.h b/src/devices/machine/tc009xlvc.h
index 2a4cb000c27..e3388bf177c 100644
--- a/src/devices/machine/tc009xlvc.h
+++ b/src/devices/machine/tc009xlvc.h
@@ -49,7 +49,7 @@ public:
protected:
virtual void device_start() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
void draw_sprites(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, uint8_t global_flip);
diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp
index 3f5b22e8bf7..c2abfcdc018 100644
--- a/src/devices/machine/tmp68301.cpp
+++ b/src/devices/machine/tmp68301.cpp
@@ -21,7 +21,7 @@
DEFINE_DEVICE_TYPE(TMP68301, tmp68301_device, "tmp68301", "Toshiba TMP68301")
-static ADDRESS_MAP_START( tmp68301_regs, AS_0, 16, tmp68301_device )
+static ADDRESS_MAP_START( tmp68301_regs, 0, 16, tmp68301_device )
// AM_RANGE(0x000,0x3ff) AM_RAM
AM_RANGE(0x094,0x095) AM_READWRITE(imr_r,imr_w)
AM_RANGE(0x098,0x099) AM_READWRITE(iisr_r,iisr_w)
@@ -159,9 +159,11 @@ void tmp68301_device::device_reset()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *tmp68301_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tmp68301_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//**************************************************************************
@@ -174,7 +176,7 @@ const address_space_config *tmp68301_device::memory_space_config(address_spacenu
inline uint16_t tmp68301_device::read_word(offs_t address)
{
- return space(AS_0).read_word(address << 1);
+ return space(0).read_word(address << 1);
}
//-------------------------------------------------
@@ -183,7 +185,7 @@ inline uint16_t tmp68301_device::read_word(offs_t address)
inline void tmp68301_device::write_word(offs_t address, uint16_t data)
{
- space(AS_0).write_word(address << 1, data);
+ space(0).write_word(address << 1, data);
}
IRQ_CALLBACK_MEMBER(tmp68301_device::irq_callback)
diff --git a/src/devices/machine/tmp68301.h b/src/devices/machine/tmp68301.h
index facb06a9e65..0471db112f5 100644
--- a/src/devices/machine/tmp68301.h
+++ b/src/devices/machine/tmp68301.h
@@ -58,7 +58,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
TIMER_CALLBACK_MEMBER( timer_callback );
diff --git a/src/devices/machine/vrc4373.cpp b/src/devices/machine/vrc4373.cpp
index 9c480244c5c..ac10b41a567 100644
--- a/src/devices/machine/vrc4373.cpp
+++ b/src/devices/machine/vrc4373.cpp
@@ -99,18 +99,21 @@ vrc4373_device::vrc4373_device(const machine_config &mconfig, const char *tag, d
{
}
-const address_space_config *vrc4373_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> vrc4373_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? pci_bridge_device::memory_space_config(spacenum) : (spacenum == AS_DATA) ? &m_mem_config : (spacenum == AS_IO) ? &m_io_config : nullptr;
+ auto r = pci_bridge_device::memory_space_config();
+ r.emplace_back(std::make_pair(AS_PCI_MEM, &m_mem_config));
+ r.emplace_back(std::make_pair(AS_PCI_IO, &m_io_config));
+ return r;
}
void vrc4373_device::device_start()
{
pci_host_device::device_start();
m_cpu = machine().device<mips3_device>(cpu_tag);
- m_cpu_space = &m_cpu->space(AS_PROGRAM);
- memory_space = &space(AS_DATA);
- io_space = &space(AS_IO);
+ m_cpu_space = &m_cpu->space(AS_PCI_CONFIG);
+ memory_space = &space(AS_PCI_MEM);
+ io_space = &space(AS_PCI_IO);
memset(m_cpu_regs, 0, sizeof(m_cpu_regs));
@@ -297,65 +300,65 @@ WRITE32_MEMBER (vrc4373_device::pcictrl_w)
// PCI Master Window 1
READ32_MEMBER (vrc4373_device::master1_r)
{
- uint32_t result = this->space(AS_DATA).read_dword(m_pci1_laddr | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_PCI_MEM).read_dword(m_pci1_laddr | (offset*4), mem_mask);
LOGNILEMASTER("%06X:nile master1 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
return result;
}
WRITE32_MEMBER (vrc4373_device::master1_w)
{
- this->space(AS_DATA).write_dword(m_pci1_laddr | (offset*4), data, mem_mask);
+ this->space(AS_PCI_MEM).write_dword(m_pci1_laddr | (offset*4), data, mem_mask);
LOGNILEMASTER("%06X:nile master1 write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
}
// PCI Master Window 2
READ32_MEMBER (vrc4373_device::master2_r)
{
- uint32_t result = this->space(AS_DATA).read_dword(m_pci2_laddr | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_PCI_MEM).read_dword(m_pci2_laddr | (offset*4), mem_mask);
LOGNILEMASTER("%06X:nile master2 read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
return result;
}
WRITE32_MEMBER (vrc4373_device::master2_w)
{
- this->space(AS_DATA).write_dword(m_pci2_laddr | (offset*4), data, mem_mask);
+ this->space(AS_PCI_MEM).write_dword(m_pci2_laddr | (offset*4), data, mem_mask);
LOGNILEMASTER("%06X:nile master2 write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
}
// PCI Master IO Window
READ32_MEMBER (vrc4373_device::master_io_r)
{
- uint32_t result = this->space(AS_IO).read_dword(m_pci_io_laddr | (offset*4), mem_mask);
+ uint32_t result = this->space(AS_PCI_IO).read_dword(m_pci_io_laddr | (offset*4), mem_mask);
LOGNILEMASTER("%06X:nile master io read from offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, result, mem_mask);
return result;
}
WRITE32_MEMBER (vrc4373_device::master_io_w)
{
- this->space(AS_IO).write_dword(m_pci_io_laddr | (offset*4), data, mem_mask);
+ this->space(AS_PCI_IO).write_dword(m_pci_io_laddr | (offset*4), data, mem_mask);
LOGNILEMASTER("%06X:nile master io write to offset %02X = %08X & %08X\n", space.device().safe_pc(), offset*4, data, mem_mask);
}
// PCI Target Window 1
READ32_MEMBER (vrc4373_device::target1_r)
{
- uint32_t result = m_cpu->space(AS_PROGRAM).read_dword(m_target1_laddr | (offset*4), mem_mask);
+ uint32_t result = m_cpu->space(AS_PCI_CONFIG).read_dword(m_target1_laddr | (offset*4), mem_mask);
LOGNILETARGET("%08X:nile target1 read from offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, result, mem_mask);
return result;
}
WRITE32_MEMBER (vrc4373_device::target1_w)
{
- m_cpu->space(AS_PROGRAM).write_dword(m_target1_laddr | (offset*4), data, mem_mask);
+ m_cpu->space(AS_PCI_CONFIG).write_dword(m_target1_laddr | (offset*4), data, mem_mask);
LOGNILETARGET("%08X:nile target1 write to offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, data, mem_mask);
}
// PCI Target Window 2
READ32_MEMBER (vrc4373_device::target2_r)
{
- uint32_t result = m_cpu->space(AS_PROGRAM).read_dword(m_target2_laddr | (offset*4), mem_mask);
+ uint32_t result = m_cpu->space(AS_PCI_CONFIG).read_dword(m_target2_laddr | (offset*4), mem_mask);
LOGNILETARGET("%08X:nile target2 read from offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, result, mem_mask);
return result;
}
WRITE32_MEMBER (vrc4373_device::target2_w)
{
- m_cpu->space(AS_PROGRAM).write_dword(m_target2_laddr | (offset*4), data, mem_mask);
+ m_cpu->space(AS_PCI_CONFIG).write_dword(m_target2_laddr | (offset*4), data, mem_mask);
LOGNILETARGET("%08X:nile target2 write to offset %02X = %08X & %08X\n", m_cpu->device_t::safe_pc(), offset*4, data, mem_mask);
}
@@ -366,23 +369,23 @@ TIMER_CALLBACK_MEMBER (vrc4373_device::dma_transfer)
// Check for dma suspension
if (m_cpu_regs[NREG_DMACR1 + which * 0xc] & DMA_SUS) {
- LOGNILE("%08X:nile DMA Suspended PCI: %08X MEM: %08X Words: %X\n", m_cpu->space(AS_PROGRAM).device().safe_pc(), m_cpu_regs[NREG_DMA_CPAR], m_cpu_regs[NREG_DMA_CMAR], m_cpu_regs[NREG_DMA_REM]);
+ LOGNILE("%08X:nile DMA Suspended PCI: %08X MEM: %08X Words: %X\n", m_cpu->space(AS_PCI_CONFIG).device().safe_pc(), m_cpu_regs[NREG_DMA_CPAR], m_cpu_regs[NREG_DMA_CMAR], m_cpu_regs[NREG_DMA_REM]);
return;
}
- int pciSel = (m_cpu_regs[NREG_DMACR1+which*0xC] & DMA_MIO) ? AS_DATA : AS_IO;
+ int pciSel = (m_cpu_regs[NREG_DMACR1+which*0xC] & DMA_MIO) ? AS_PCI_MEM : AS_PCI_IO;
address_space *src, *dst;
uint32_t srcAddr, dstAddr;
if (m_cpu_regs[NREG_DMACR1+which*0xC]&DMA_RW) {
// Read data from PCI and write to cpu
src = &this->space(pciSel);
- dst = &m_cpu->space(AS_PROGRAM);
+ dst = &m_cpu->space(AS_PCI_CONFIG);
srcAddr = m_cpu_regs[NREG_DMA_CPAR];
dstAddr = m_cpu_regs[NREG_DMA_CMAR];
} else {
// Read data from cpu and write to PCI
- src = &m_cpu->space(AS_PROGRAM);
+ src = &m_cpu->space(AS_PCI_CONFIG);
dst = &this->space(pciSel);
srcAddr = m_cpu_regs[NREG_DMA_CMAR];
dstAddr = m_cpu_regs[NREG_DMA_CPAR];
@@ -508,7 +511,7 @@ WRITE32_MEMBER(vrc4373_device::cpu_if_w)
// Start the transfer
m_dma_timer->set_param(which);
m_dma_timer->adjust(attotime::zero, 0, DMA_TIMER_PERIOD);
- LOGNILE("%08X:nile Start DMA Lane %i PCI: %08X MEM: %08X Words: %X\n", m_cpu->space(AS_PROGRAM).device().safe_pc(), which, m_cpu_regs[NREG_DMA_CPAR], m_cpu_regs[NREG_DMA_CMAR], m_cpu_regs[NREG_DMA_REM]);
+ LOGNILE("%08X:nile Start DMA Lane %i PCI: %08X MEM: %08X Words: %X\n", m_cpu->space(AS_PCI_CONFIG).device().safe_pc(), which, m_cpu_regs[NREG_DMA_CPAR], m_cpu_regs[NREG_DMA_CMAR], m_cpu_regs[NREG_DMA_REM]);
}
break;
case NREG_BMCR:
diff --git a/src/devices/machine/vrc4373.h b/src/devices/machine/vrc4373.h
index 9555ee777ba..176aed79e0c 100644
--- a/src/devices/machine/vrc4373.h
+++ b/src/devices/machine/vrc4373.h
@@ -63,13 +63,16 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
TIMER_CALLBACK_MEMBER(dma_transfer);
address_space *m_cpu_space;
private:
+ static constexpr int AS_PCI_MEM = 1;
+ static constexpr int AS_PCI_IO = 2;
+
DECLARE_ADDRESS_MAP(cpu_map, 32);
void map_cpu_space();
diff --git a/src/devices/machine/vrc5074.cpp b/src/devices/machine/vrc5074.cpp
index b427d25c97c..2936f696fd7 100644
--- a/src/devices/machine/vrc5074.cpp
+++ b/src/devices/machine/vrc5074.cpp
@@ -163,9 +163,12 @@ void vrc5074_device::set_map(int id, const address_map_delegate &map, device_t *
m_cs_devices[id - 2] = device;
}
-const address_space_config *vrc5074_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> vrc5074_device::memory_space_config() const
{
- return (spacenum == AS_PROGRAM) ? pci_bridge_device::memory_space_config(spacenum) : (spacenum == AS_DATA) ? &m_mem_config : (spacenum == AS_IO) ? &m_io_config : nullptr;
+ auto r = pci_bridge_device::memory_space_config();
+ r.emplace_back(std::make_pair(AS_PCI_MEM, &m_mem_config));
+ r.emplace_back(std::make_pair(AS_PCI_IO, &m_io_config));
+ return r;
}
void vrc5074_device::device_start()
diff --git a/src/devices/machine/vrc5074.h b/src/devices/machine/vrc5074.h
index 8b31e2c4f54..375a02677b5 100644
--- a/src/devices/machine/vrc5074.h
+++ b/src/devices/machine/vrc5074.h
@@ -67,11 +67,14 @@ public:
protected:
address_space *m_cpu_space;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual void device_start() override;
virtual void device_reset() override;
private:
+ static constexpr int AS_PCI_MEM = 1;
+ static constexpr int AS_PCI_IO = 2;
+
mips3_device *m_cpu;
const char *cpu_tag;
int m_sdram_size[2];
diff --git a/src/devices/machine/x2212.cpp b/src/devices/machine/x2212.cpp
index a78e5992246..a13edde1824 100644
--- a/src/devices/machine/x2212.cpp
+++ b/src/devices/machine/x2212.cpp
@@ -16,11 +16,11 @@
// GLOBAL VARIABLES
//**************************************************************************
-static ADDRESS_MAP_START( x2212_sram_map, AS_0, 8, x2212_device )
+static ADDRESS_MAP_START( x2212_sram_map, 0, 8, x2212_device )
AM_RANGE(0x0000, 0x00ff) AM_RAM
ADDRESS_MAP_END
-static ADDRESS_MAP_START( x2212_e2prom_map, AS_1, 8, x2212_device )
+static ADDRESS_MAP_START( x2212_e2prom_map, 1, 8, x2212_device )
AM_RANGE(0x0000, 0x00ff) AM_RAM
ADDRESS_MAP_END
@@ -76,8 +76,8 @@ void x2212_device::device_start()
{
save_item(NAME(m_store));
save_item(NAME(m_array_recall));
- m_sram = &space(AS_0);
- m_e2prom = &space(AS_1);
+ m_sram = &space(0);
+ m_e2prom = &space(1);
}
@@ -86,9 +86,12 @@ void x2212_device::device_start()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *x2212_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> x2212_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_sram_space_config : (spacenum == 1) ? &m_e2prom_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_sram_space_config),
+ std::make_pair(1, &m_e2prom_space_config)
+ };
}
diff --git a/src/devices/machine/x2212.h b/src/devices/machine/x2212.h
index f819cb350b1..8a3581a3308 100644
--- a/src/devices/machine/x2212.h
+++ b/src/devices/machine/x2212.h
@@ -71,7 +71,7 @@ protected:
virtual void device_start() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_nvram_interface overrides
virtual void nvram_default() override;
diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp
index de927b2795c..da5ade9d6a3 100644
--- a/src/devices/sound/cdp1869.cpp
+++ b/src/devices/sound/cdp1869.cpp
@@ -78,7 +78,7 @@ DEVICE_ADDRESS_MAP_START( page_map, 8, cdp1869_device )
ADDRESS_MAP_END
// default address map
-static ADDRESS_MAP_START( cdp1869, AS_0, 8, cdp1869_device )
+static ADDRESS_MAP_START( cdp1869, 0, 8, cdp1869_device )
AM_RANGE(0x000, 0x7ff) AM_RAM
ADDRESS_MAP_END
@@ -460,9 +460,11 @@ void cdp1869_device::device_timer(emu_timer &timer, device_timer_id id, int para
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *cdp1869_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> cdp1869_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/sound/cdp1869.h b/src/devices/sound/cdp1869.h
index 8023da30d61..998a69dfa5c 100644
--- a/src/devices/sound/cdp1869.h
+++ b/src/devices/sound/cdp1869.h
@@ -88,7 +88,7 @@
#define MCFG_CDP1869_ADD(_tag, _pixclock, _map) \
MCFG_DEVICE_ADD(_tag, CDP1869, _pixclock) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _map)
#define MCFG_CDP1869_SCREEN_PAL_ADD(_cdptag, _tag, _clock) \
MCFG_SCREEN_ADD(_tag, RASTER) \
@@ -224,7 +224,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// device_sound_interface callbacks
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
diff --git a/src/devices/sound/dave.cpp b/src/devices/sound/dave.cpp
index c67385cef71..2cc9cfc25a3 100644
--- a/src/devices/sound/dave.cpp
+++ b/src/devices/sound/dave.cpp
@@ -173,14 +173,12 @@ void dave_device::device_timer(emu_timer &timer, device_timer_id id, int param,
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *dave_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> dave_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_PROGRAM: return &m_program_space_config;
- case AS_IO: return &m_io_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_space_config),
+ std::make_pair(AS_IO, &m_io_space_config)
+ };
}
diff --git a/src/devices/sound/dave.h b/src/devices/sound/dave.h
index 6630ff27115..90d4ec52f14 100644
--- a/src/devices/sound/dave.h
+++ b/src/devices/sound/dave.h
@@ -72,7 +72,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp
index 8738fbc58ea..b8b7af6cc9b 100644
--- a/src/devices/sound/mos6560.cpp
+++ b/src/devices/sound/mos6560.cpp
@@ -157,14 +157,14 @@ static const rgb_t PALETTE_MOS[] =
inline uint8_t mos6560_device::read_videoram(offs_t offset)
{
- m_last_data = space(AS_0).read_byte(offset & 0x3fff);
+ m_last_data = space(0).read_byte(offset & 0x3fff);
return m_last_data;
}
inline uint8_t mos6560_device::read_colorram(offs_t offset)
{
- return space(AS_1).read_byte(offset & 0x3ff);
+ return space(1).read_byte(offset & 0x3ff);
}
/*-------------------------------------------------
@@ -680,11 +680,11 @@ DEFINE_DEVICE_TYPE(MOS6561, mos6561_device, "mos6561",
DEFINE_DEVICE_TYPE(MOS656X_ATTACK_UFO, mos656x_attack_ufo_device, "mos656x_attack_ufo", "MOS 656X VIC (Attack UFO)")
// default address maps
-static ADDRESS_MAP_START( mos6560_videoram_map, AS_0, 8, mos6560_device )
+static ADDRESS_MAP_START( mos6560_videoram_map, 0, 8, mos6560_device )
AM_RANGE(0x0000, 0x3fff) AM_RAM
ADDRESS_MAP_END
-static ADDRESS_MAP_START( mos6560_colorram_map, AS_1, 8, mos6560_device )
+static ADDRESS_MAP_START( mos6560_colorram_map, 1, 8, mos6560_device )
AM_RANGE(0x000, 0x3ff) AM_RAM
ADDRESS_MAP_END
@@ -722,14 +722,12 @@ mos656x_attack_ufo_device::mos656x_attack_ufo_device(const machine_config &mconf
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *mos6560_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mos6560_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_0: return &m_videoram_space_config;
- case AS_1: return &m_colorram_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_videoram_space_config),
+ std::make_pair(1, &m_colorram_space_config)
+ };
}
diff --git a/src/devices/sound/mos6560.h b/src/devices/sound/mos6560.h
index 761017b55b5..8d652204d3f 100644
--- a/src/devices/sound/mos6560.h
+++ b/src/devices/sound/mos6560.h
@@ -50,8 +50,8 @@
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS6560, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
- MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _videoram_map) \
+ MCFG_DEVICE_ADDRESS_MAP(1, _colorram_map)
#define MCFG_MOS6561_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -62,8 +62,8 @@
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS6561, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
- MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _videoram_map) \
+ MCFG_DEVICE_ADDRESS_MAP(1, _colorram_map)
#define MCFG_MOS656X_ATTACK_UFO_ADD(_tag, _screen_tag, _clock, _videoram_map, _colorram_map) \
MCFG_SCREEN_ADD(_screen_tag, RASTER) \
@@ -74,8 +74,8 @@
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos6560_device, screen_update) \
MCFG_SOUND_ADD(_tag, MOS656X_ATTACK_UFO, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
- MCFG_DEVICE_ADDRESS_MAP(AS_1, _colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _videoram_map) \
+ MCFG_DEVICE_ADDRESS_MAP(1, _colorram_map)
#define MCFG_MOS6560_POTX_CALLBACK(_read) \
@@ -139,7 +139,7 @@ public:
template <class Object> static devcb_base &set_potx_rd_callback(device_t &device, Object &&cb) { return downcast<mos6560_device &>(device).m_read_potx.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_poty_rd_callback(device_t &device, Object &&cb) { return downcast<mos6560_device &>(device).m_read_poty.set_callback(std::forward<Object>(cb)); }
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp
index 37799e1830e..a312263bf36 100644
--- a/src/devices/sound/mos7360.cpp
+++ b/src/devices/sound/mos7360.cpp
@@ -170,7 +170,7 @@ DEFINE_DEVICE_TYPE(MOS7360, mos7360_device, "mos7360", "MOS 7360 TED")
// default address maps
-static ADDRESS_MAP_START( mos7360_videoram_map, AS_0, 8, mos7360_device )
+static ADDRESS_MAP_START( mos7360_videoram_map, 0, 8, mos7360_device )
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -180,13 +180,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *mos7360_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mos7360_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_0: return &m_videoram_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_videoram_space_config)
+ };
}
@@ -232,7 +230,7 @@ inline uint8_t mos7360_device::read_ram(offs_t offset)
int rom = m_rom;
m_rom = 0;
- m_last_data = space(AS_0).read_byte(offset);
+ m_last_data = space(0).read_byte(offset);
m_rom = rom;
@@ -244,7 +242,7 @@ inline uint8_t mos7360_device::read_rom(offs_t offset)
int rom = m_rom;
m_rom = 1;
- m_last_data = space(AS_0).read_byte(offset);
+ m_last_data = space(0).read_byte(offset);
m_rom = rom;
diff --git a/src/devices/sound/mos7360.h b/src/devices/sound/mos7360.h
index 3cdeb6fb368..48353bca33a 100644
--- a/src/devices/sound/mos7360.h
+++ b/src/devices/sound/mos7360.h
@@ -49,7 +49,7 @@
MCFG_SCREEN_VISIBLE_AREA(0, 336 - 1, 0, 216 - 1) \
MCFG_SCREEN_UPDATE_DEVICE(_tag, mos7360_device, screen_update) \
MCFG_DEVICE_ADD(_tag, MOS7360, _clock) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _videoram_map) \
+ MCFG_DEVICE_ADDRESS_MAP(0, _videoram_map) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
downcast<mos7360_device *>(device)->set_callbacks(_cpu_tag, DEVCB_##_irq, DEVCB_##_k);
@@ -102,7 +102,7 @@ public:
m_read_k.set_callback(std::forward<K>(k));
}
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
uint8_t read(address_space &space, offs_t offset, int &cs0, int &cs1);
void write(address_space &space, offs_t offset, uint8_t data, int &cs0, int &cs1);
diff --git a/src/devices/sound/upd7752.cpp b/src/devices/sound/upd7752.cpp
index 1e368a0db1a..250b4645257 100644
--- a/src/devices/sound/upd7752.cpp
+++ b/src/devices/sound/upd7752.cpp
@@ -29,7 +29,7 @@ DEFINE_DEVICE_TYPE(UPD7752, upd7752_device, "upd7752", "NEC uPD7752")
/* TODO: unknown exact size */
-static ADDRESS_MAP_START( upd7752_ram, AS_0, 8, upd7752_device )
+static ADDRESS_MAP_START( upd7752_ram, 0, 8, upd7752_device )
// AM_RANGE(0x0000, 0x7fff) AM_ROM
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -56,9 +56,11 @@ upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, d
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *upd7752_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> upd7752_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/sound/upd7752.h b/src/devices/sound/upd7752.h
index af3988bd46c..f25dc53a764 100644
--- a/src/devices/sound/upd7752.h
+++ b/src/devices/sound/upd7752.h
@@ -36,7 +36,7 @@ protected:
virtual void device_reset() override;
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
sound_stream *m_stream;
diff --git a/src/devices/sound/ymf278b.cpp b/src/devices/sound/ymf278b.cpp
index ab76ffa4a90..d44f8cdaf00 100644
--- a/src/devices/sound/ymf278b.cpp
+++ b/src/devices/sound/ymf278b.cpp
@@ -640,7 +640,7 @@ void ymf278b_device::C_w(uint8_t reg, uint8_t data)
case 0x06:
// memory data
- space(AS_0).write_byte(m_memadr, data);
+ space(0).write_byte(m_memadr, data);
m_memadr = (m_memadr + 1) & 0x3fffff;
break;
diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp
index 21473f6d018..2a1f684ad88 100644
--- a/src/devices/video/315_5124.cpp
+++ b/src/devices/video/315_5124.cpp
@@ -160,7 +160,7 @@ PALETTE_INIT_MEMBER(sega315_5378_device, sega315_5378)
// default address map
-static ADDRESS_MAP_START( sega315_5124, AS_0, 8, sega315_5124_device )
+static ADDRESS_MAP_START( sega315_5124, 0, 8, sega315_5124_device )
AM_RANGE(0x0000, VRAM_SIZE-1) AM_RAM
ADDRESS_MAP_END
@@ -200,6 +200,14 @@ sega315_5378_device::sega315_5378_device(const machine_config &mconfig, const ch
}
+std::vector<std::pair<int, const address_space_config *>> sega315_5124_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
+}
+
+
void sega315_5124_device::set_display_settings()
{
const bool M1 = m_reg[0x01] & 0x10;
diff --git a/src/devices/video/315_5124.h b/src/devices/video/315_5124.h
index 8038abdcd7c..cf0646987fa 100644
--- a/src/devices/video/315_5124.h
+++ b/src/devices/video/315_5124.h
@@ -92,7 +92,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
virtual void device_add_mconfig(machine_config &config) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_0) ? &m_space_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
void set_display_settings();
void set_frame_timing();
diff --git a/src/devices/video/cesblit.cpp b/src/devices/video/cesblit.cpp
index e25b4cb56c5..6acd772fb4c 100644
--- a/src/devices/video/cesblit.cpp
+++ b/src/devices/video/cesblit.cpp
@@ -79,6 +79,13 @@ cesblit_device::cesblit_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> cesblit_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_space_config)
+ };
+}
+
//-------------------------------------------------
// device_start - device-specific startup
//-------------------------------------------------
diff --git a/src/devices/video/cesblit.h b/src/devices/video/cesblit.h
index 93b0598c830..8125ec6eadd 100644
--- a/src/devices/video/cesblit.h
+++ b/src/devices/video/cesblit.h
@@ -59,7 +59,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_stop() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_PROGRAM) ? &m_space_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
void do_blit();
diff --git a/src/devices/video/crt9007.cpp b/src/devices/video/crt9007.cpp
index bf018d821f7..a8d37392034 100644
--- a/src/devices/video/crt9007.cpp
+++ b/src/devices/video/crt9007.cpp
@@ -222,7 +222,7 @@ const int STATUS_LIGHT_PEN_UPDATE = 0x20;
//**************************************************************************
// default address map
-static ADDRESS_MAP_START( crt9007, AS_0, 8, crt9007_device )
+static ADDRESS_MAP_START( crt9007, 0, 8, crt9007_device )
AM_RANGE(0x0000, 0x3fff) AM_RAM
ADDRESS_MAP_END
@@ -656,9 +656,11 @@ void crt9007_device::device_timer(emu_timer &timer, device_timer_id id, int para
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *crt9007_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> crt9007_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/crt9007.h b/src/devices/video/crt9007.h
index 0618a62853e..d7d80900d4f 100644
--- a/src/devices/video/crt9007.h
+++ b/src/devices/video/crt9007.h
@@ -122,7 +122,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
enum
diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp
index e0385007b7b..d3c58fb5670 100644
--- a/src/devices/video/ef9345.cpp
+++ b/src/devices/video/ef9345.cpp
@@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(EF9345, ef9345_device, "ef9345", "EF9345")
DEFINE_DEVICE_TYPE(TS9347, ts9347_device, "ts9347", "TS9347")
// default address map
-static ADDRESS_MAP_START( ef9345, AS_0, 8, ef9345_device )
+static ADDRESS_MAP_START( ef9345, 0, 8, ef9345_device )
AM_RANGE(0x0000, 0x3fff) AM_RAM
ADDRESS_MAP_END
@@ -42,9 +42,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *ef9345_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ef9345_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/ef9345.h b/src/devices/video/ef9345.h
index 8f58eb2c4a6..beece436015 100644
--- a/src/devices/video/ef9345.h
+++ b/src/devices/video/ef9345.h
@@ -56,7 +56,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address space configurations
const address_space_config m_space_config;
diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp
index 5be327900f4..6ac4c8008ad 100644
--- a/src/devices/video/ef9364.cpp
+++ b/src/devices/video/ef9364.cpp
@@ -33,7 +33,7 @@ DEFINE_DEVICE_TYPE(EF9364, ef9364_device, "ef9364", "Thomson EF9364")
//-------------------------------------------------
// default address map
//-------------------------------------------------
-static ADDRESS_MAP_START( ef9364, AS_0, 8, ef9364_device )
+static ADDRESS_MAP_START( ef9364, 0, 8, ef9364_device )
AM_RANGE(0x00000, ( ( ef9364_device::TXTPLANE_MAX_SIZE * ef9364_device::MAX_TXTPLANES ) - 1 ) ) AM_RAM
ADDRESS_MAP_END
@@ -42,9 +42,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *ef9364_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ef9364_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/ef9364.h b/src/devices/video/ef9364.h
index 2a6f20c0f48..b33e19f6e93 100644
--- a/src/devices/video/ef9364.h
+++ b/src/devices/video/ef9364.h
@@ -60,7 +60,7 @@ protected:
virtual void device_reset() override;
// device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address space configurations
const address_space_config m_space_config;
diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp
index 5e62a34c369..3fc83abbf8b 100644
--- a/src/devices/video/ef9365.cpp
+++ b/src/devices/video/ef9365.cpp
@@ -166,7 +166,7 @@ const tiny_rom_entry *ef9365_device::device_rom_region() const
// default address map
// Up to 512*512 per bitplane, 8 bitplanes max.
//-------------------------------------------------
-static ADDRESS_MAP_START( ef9365, AS_0, 8, ef9365_device )
+static ADDRESS_MAP_START( ef9365, 0, 8, ef9365_device )
AM_RANGE(0x00000, ( ( ef9365_device::BITPLANE_MAX_SIZE * ef9365_device::MAX_BITPLANES ) - 1 ) ) AM_RAM
ADDRESS_MAP_END
@@ -175,9 +175,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *ef9365_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ef9365_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/ef9365.h b/src/devices/video/ef9365.h
index 5593c743552..fdf084ffd7b 100644
--- a/src/devices/video/ef9365.h
+++ b/src/devices/video/ef9365.h
@@ -74,7 +74,7 @@ protected:
virtual const tiny_rom_entry *device_rom_region() const override;
// device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address space configurations
const address_space_config m_space_config;
diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp
index f235b1b3d12..fcde5279b28 100644
--- a/src/devices/video/hd61830.cpp
+++ b/src/devices/video/hd61830.cpp
@@ -25,7 +25,7 @@ const device_type HD61830B = HD61830;
// default address map
-static ADDRESS_MAP_START( hd61830, AS_0, 8, hd61830_device )
+static ADDRESS_MAP_START( hd61830, 0, 8, hd61830_device )
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -148,9 +148,11 @@ void hd61830_device::device_timer(emu_timer &timer, device_timer_id id, int para
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *hd61830_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> hd61830_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/hd61830.h b/src/devices/video/hd61830.h
index e454ec79a97..60d6cee9fd0 100644
--- a/src/devices/video/hd61830.h
+++ b/src/devices/video/hd61830.h
@@ -55,7 +55,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
uint8_t readbyte(offs_t address) { return space().read_byte(address); }
void writebyte(offs_t address, uint8_t data) { space().write_byte(address, data); }
diff --git a/src/devices/video/hd63484.cpp b/src/devices/video/hd63484.cpp
index 0345362ebd6..b781000c9d6 100644
--- a/src/devices/video/hd63484.cpp
+++ b/src/devices/video/hd63484.cpp
@@ -344,9 +344,11 @@ ROM_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *hd63484_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> hd63484_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/hd63484.h b/src/devices/video/hd63484.h
index 0bdb703f388..22c3ddbbb1a 100644
--- a/src/devices/video/hd63484.h
+++ b/src/devices/video/hd63484.h
@@ -20,10 +20,10 @@
#define MCFG_HD63484_ADD(_tag, _clock, _map) \
MCFG_DEVICE_ADD(_tag, HD63484, _clock) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _map)
#define MCFG_HD63484_ADDRESS_MAP(_map) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _map)
#define MCFG_HD63484_DISPLAY_CALLBACK_OWNER(_class, _method) \
hd63484_device::static_set_display_callback(*device, hd63484_device::display_delegate(&_class::_method, #_class "::" #_method, downcast<_class *>(owner)));
@@ -61,7 +61,7 @@ public:
uint32_t update_screen(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
protected:
// device-level overrides
diff --git a/src/devices/video/hd66421.cpp b/src/devices/video/hd66421.cpp
index ad6349f999a..937bebd3996 100644
--- a/src/devices/video/hd66421.cpp
+++ b/src/devices/video/hd66421.cpp
@@ -72,7 +72,7 @@ DEFINE_DEVICE_TYPE(HD66421, hd66421_device, "hd66421", "Hitachi HD66421 LCD Cont
// default address map
-static ADDRESS_MAP_START( hd66421, AS_0, 8, hd66421_device )
+static ADDRESS_MAP_START( hd66421, 0, 8, hd66421_device )
AM_RANGE(0x0000, HD66421_RAM_SIZE) AM_RAM
ADDRESS_MAP_END
@@ -81,9 +81,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *hd66421_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> hd66421_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/hd66421.h b/src/devices/video/hd66421.h
index 331f91e12e2..23c65501c03 100644
--- a/src/devices/video/hd66421.h
+++ b/src/devices/video/hd66421.h
@@ -50,7 +50,7 @@ protected:
virtual void device_add_mconfig(machine_config &config) override;
// device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address space configurations
const address_space_config m_space_config;
diff --git a/src/devices/video/huc6271.cpp b/src/devices/video/huc6271.cpp
index a17d85f9679..c44d47cf3eb 100644
--- a/src/devices/video/huc6271.cpp
+++ b/src/devices/video/huc6271.cpp
@@ -66,14 +66,11 @@ void huc6271_device::device_reset()
{
}
-const address_space_config *huc6271_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> huc6271_device::memory_space_config() const
{
- switch(spacenum)
- {
-// case AS_PROGRAM: return &m_program_space_config;
- case AS_DATA: return &m_data_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_DATA, &m_data_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/huc6271.h b/src/devices/video/huc6271.h
index eba09821ff0..64311033520 100644
--- a/src/devices/video/huc6271.h
+++ b/src/devices/video/huc6271.h
@@ -41,7 +41,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
const address_space_config m_data_space_config;
diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp
index 12e5cfb3046..bd28aa0baee 100644
--- a/src/devices/video/huc6272.cpp
+++ b/src/devices/video/huc6272.cpp
@@ -95,14 +95,12 @@ void huc6272_device::device_reset()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *huc6272_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> huc6272_device::memory_space_config() const
{
- switch(spacenum)
- {
- case AS_PROGRAM: return &m_program_space_config;
- case AS_DATA: return &m_data_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_program_space_config),
+ std::make_pair(AS_DATA, &m_data_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/huc6272.h b/src/devices/video/huc6272.h
index c6f372e9fcf..638aebdf0d6 100644
--- a/src/devices/video/huc6272.h
+++ b/src/devices/video/huc6272.h
@@ -56,7 +56,7 @@ protected:
virtual void device_start() override;
virtual void device_reset() override;
virtual void device_add_mconfig(machine_config &config) override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_PROGRAM) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
const char *m_huc6271_tag;
diff --git a/src/devices/video/m50458.cpp b/src/devices/video/m50458.cpp
index 1b34b718c8e..bb79ba1faaa 100644
--- a/src/devices/video/m50458.cpp
+++ b/src/devices/video/m50458.cpp
@@ -29,7 +29,7 @@
// device type definition
DEFINE_DEVICE_TYPE(M50458, m50458_device, "m50458", "Mitsubishi M50458 OSD")
-static ADDRESS_MAP_START( m50458_vram, AS_0, 16, m50458_device )
+static ADDRESS_MAP_START( m50458_vram, 0, 16, m50458_device )
AM_RANGE(0x0000, 0x023f) AM_RAM // vram
AM_RANGE(0x0240, 0x0241) AM_WRITE(vreg_120_w)
AM_RANGE(0x0242, 0x0243) AM_WRITE(vreg_121_w)
@@ -137,9 +137,11 @@ const tiny_rom_entry *m50458_device::device_rom_region() const
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *m50458_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> m50458_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/m50458.h b/src/devices/video/m50458.h
index d4eebc4e9a8..dc2c7d7d70a 100644
--- a/src/devices/video/m50458.h
+++ b/src/devices/video/m50458.h
@@ -63,7 +63,7 @@ protected:
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
int m_latch;
int m_reset_line;
diff --git a/src/devices/video/mb90082.cpp b/src/devices/video/mb90082.cpp
index ef668a91732..8007f283e2f 100644
--- a/src/devices/video/mb90082.cpp
+++ b/src/devices/video/mb90082.cpp
@@ -23,7 +23,7 @@
// device type definition
DEFINE_DEVICE_TYPE(MB90082, mb90082_device, "mb90082", "Fujitsu MB90082 OSD")
-static ADDRESS_MAP_START( mb90082_vram, AS_0, 16, mb90082_device )
+static ADDRESS_MAP_START( mb90082_vram, 0, 16, mb90082_device )
AM_RANGE(0x0000, 0x023f) AM_RAM // main screen vram
AM_RANGE(0x0400, 0x063f) AM_RAM // main screen attr
// AM_RANGE(0x0800, 0x0a3f) AM_RAM // sub screen vram
@@ -50,9 +50,11 @@ const tiny_rom_entry *mb90082_device::device_rom_region() const
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *mb90082_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mb90082_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//**************************************************************************
diff --git a/src/devices/video/mb90082.h b/src/devices/video/mb90082.h
index 9014b14a79e..0bdeae355d2 100644
--- a/src/devices/video/mb90082.h
+++ b/src/devices/video/mb90082.h
@@ -46,7 +46,7 @@ protected:
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
enum
diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp
index d149d5880a0..08f082fa920 100644
--- a/src/devices/video/mb_vcu.cpp
+++ b/src/devices/video/mb_vcu.cpp
@@ -43,12 +43,12 @@ void mb_vcu_device::static_set_palette_tag(device_t &device, const char *tag)
}
-static ADDRESS_MAP_START( mb_vcu_vram, AS_0, 8, mb_vcu_device )
+static ADDRESS_MAP_START( mb_vcu_vram, 0, 8, mb_vcu_device )
AM_RANGE(0x00000,0x7ffff) AM_RAM // enough for a 256x256x4 x 2 pages of framebuffer with 4 layers (TODO: doubled for simplicity)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( mb_vcu_pal_ram, AS_1, 8, mb_vcu_device )
+static ADDRESS_MAP_START( mb_vcu_pal_ram, 1, 8, mb_vcu_device )
AM_RANGE(0x0000, 0x00ff) AM_RAM
AM_RANGE(0x0200, 0x02ff) AM_RAM
AM_RANGE(0x0400, 0x04ff) AM_RAM
@@ -91,14 +91,12 @@ WRITE8_MEMBER( mb_vcu_device::mb_vcu_paletteram_w )
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *mb_vcu_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mb_vcu_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_0: return &m_videoram_space_config;
- case AS_1: return &m_paletteram_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_videoram_space_config),
+ std::make_pair(1, &m_paletteram_space_config)
+ };
}
//**************************************************************************
@@ -111,7 +109,7 @@ const address_space_config *mb_vcu_device::memory_space_config(address_spacenum
inline uint8_t mb_vcu_device::read_byte(offs_t address)
{
- return space(AS_0).read_byte(address);
+ return space(0).read_byte(address);
}
//-------------------------------------------------
@@ -120,7 +118,7 @@ inline uint8_t mb_vcu_device::read_byte(offs_t address)
inline void mb_vcu_device::write_byte(offs_t address, uint8_t data)
{
- space(AS_0).write_byte(address, data);
+ space(0).write_byte(address, data);
}
//-------------------------------------------------
@@ -129,7 +127,7 @@ inline void mb_vcu_device::write_byte(offs_t address, uint8_t data)
inline uint8_t mb_vcu_device::read_io(offs_t address)
{
- return space(AS_1).read_byte(address);
+ return space(1).read_byte(address);
}
//-------------------------------------------------
@@ -138,7 +136,7 @@ inline uint8_t mb_vcu_device::read_io(offs_t address)
inline void mb_vcu_device::write_io(offs_t address, uint8_t data)
{
- space(AS_1).write_byte(address, data);
+ space(1).write_byte(address, data);
}
diff --git a/src/devices/video/mb_vcu.h b/src/devices/video/mb_vcu.h
index 4171f14b03b..2c2d820e238 100644
--- a/src/devices/video/mb_vcu.h
+++ b/src/devices/video/mb_vcu.h
@@ -45,7 +45,7 @@ protected:
virtual void device_validity_check(validity_checker &valid) const override;
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
inline uint8_t read_byte(offs_t address);
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index e99a53c24d5..ee3b2ae291d 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -464,12 +464,12 @@ WRITE8_MEMBER( hd6345_device::register_w )
inline uint8_t mos8563_device::read_videoram(offs_t offset)
{
- return space(AS_0).read_byte(offset);
+ return space(0).read_byte(offset);
}
inline void mos8563_device::write_videoram(offs_t offset, uint8_t data)
{
- space(AS_0).write_byte(offset, data);
+ space(0).write_byte(offset, data);
}
@@ -1425,17 +1425,15 @@ void mos8568_device::device_reset() { mos8563_device::device_reset(); }
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *mos8563_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mos8563_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_0: return &m_videoram_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_videoram_space_config),
+ };
}
// default address maps
-static ADDRESS_MAP_START( mos8563_videoram_map, AS_0, 8, mos8563_device )
+static ADDRESS_MAP_START( mos8563_videoram_map, 0, 8, mos8563_device )
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
diff --git a/src/devices/video/mc6845.h b/src/devices/video/mc6845.h
index e6927bb7ed7..2d6f9761b2f 100644
--- a/src/devices/video/mc6845.h
+++ b/src/devices/video/mc6845.h
@@ -19,12 +19,12 @@
#define MCFG_MOS8563_ADD(_tag, _screen_tag, _clock, _map) \
MCFG_DEVICE_ADD(_tag, MOS8563, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _map)
#define MCFG_MOS8568_ADD(_tag, _screen_tag, _clock, _map) \
MCFG_DEVICE_ADD(_tag, MOS8568, _clock) \
MCFG_VIDEO_SET_SCREEN(_screen_tag) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map)
+ MCFG_DEVICE_ADDRESS_MAP(0, _map)
#define MCFG_MC6845_SHOW_BORDER_AREA(_show) \
@@ -429,7 +429,7 @@ class mos8563_device : public mc6845_device,
public:
mos8563_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
DECLARE_WRITE8_MEMBER( address_w );
DECLARE_READ8_MEMBER( status_r );
diff --git a/src/devices/video/mos6566.cpp b/src/devices/video/mos6566.cpp
index a521238515e..81082d5a8c8 100644
--- a/src/devices/video/mos6566.cpp
+++ b/src/devices/video/mos6566.cpp
@@ -225,11 +225,11 @@ DEFINE_DEVICE_TYPE(MOS8566, mos8566_device, "mos8566", "MOS 8566 VIC-II")
// default address maps
-static ADDRESS_MAP_START( mos6566_videoram_map, AS_0, 8, mos6566_device )
+static ADDRESS_MAP_START( mos6566_videoram_map, 0, 8, mos6566_device )
AM_RANGE(0x0000, 0x3fff) AM_RAM
ADDRESS_MAP_END
-static ADDRESS_MAP_START( mos6566_colorram_map, AS_1, 8, mos6566_device )
+static ADDRESS_MAP_START( mos6566_colorram_map, 1, 8, mos6566_device )
AM_RANGE(0x000, 0x3ff) AM_RAM
ADDRESS_MAP_END
@@ -239,14 +239,12 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *mos6566_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> mos6566_device::memory_space_config() const
{
- switch (spacenum)
- {
- case AS_0: return &m_videoram_space_config;
- case AS_1: return &m_colorram_space_config;
- default: return nullptr;
- }
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_videoram_space_config),
+ std::make_pair(1, &m_colorram_space_config)
+ };
}
@@ -283,14 +281,14 @@ inline void mos6566_device::clear_interrupt( int mask )
inline uint8_t mos6566_device::read_videoram(offs_t offset)
{
//logerror("cycle %u VRAM %04x BA %u AEC %u\n", m_cycle, offset & 0x3fff, m_ba, m_aec);
- m_last_data = space(AS_0).read_byte(offset & 0x3fff);
+ m_last_data = space(0).read_byte(offset & 0x3fff);
return m_last_data;
}
inline uint8_t mos6566_device::read_colorram(offs_t offset)
{
- return space(AS_1).read_byte(offset & 0x3ff);
+ return space(1).read_byte(offset & 0x3ff);
}
// Idle access
diff --git a/src/devices/video/mos6566.h b/src/devices/video/mos6566.h
index b045286f1cf..18e03743738 100644
--- a/src/devices/video/mos6566.h
+++ b/src/devices/video/mos6566.h
@@ -218,7 +218,7 @@ public:
template <class Object> static devcb_base &set_aec_wr_callback(device_t &device, Object &&cb) { return downcast<mos6566_device &>(device).m_write_aec.set_callback(std::forward<Object>(cb)); }
template <class Object> static devcb_base &set_k_wr_callback(device_t &device, Object &&cb) { return downcast<mos6566_device &>(device).m_write_k.set_callback(std::forward<Object>(cb)); }
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
DECLARE_READ8_MEMBER( read );
DECLARE_WRITE8_MEMBER( write );
diff --git a/src/devices/video/msm6255.cpp b/src/devices/video/msm6255.cpp
index d7ee5ce7903..25618a69b10 100644
--- a/src/devices/video/msm6255.cpp
+++ b/src/devices/video/msm6255.cpp
@@ -60,7 +60,7 @@ DEVICE_ADDRESS_MAP_START( map, 8, msm6255_device )
ADDRESS_MAP_END
// default address map
-static ADDRESS_MAP_START( msm6255, AS_0, 8, msm6255_device )
+static ADDRESS_MAP_START( msm6255, 0, 8, msm6255_device )
AM_RANGE(0x00000, 0xfffff) AM_RAM
ADDRESS_MAP_END
@@ -121,9 +121,11 @@ void msm6255_device::device_reset()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *msm6255_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> msm6255_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/msm6255.h b/src/devices/video/msm6255.h
index 8028d69f86c..583b6da2b55 100644
--- a/src/devices/video/msm6255.h
+++ b/src/devices/video/msm6255.h
@@ -43,7 +43,7 @@ protected:
virtual void device_reset() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
// registers
diff --git a/src/devices/video/ppu2c0x.cpp b/src/devices/video/ppu2c0x.cpp
index bf0f74549eb..ff294c6f968 100644
--- a/src/devices/video/ppu2c0x.cpp
+++ b/src/devices/video/ppu2c0x.cpp
@@ -87,7 +87,7 @@ DEFINE_DEVICE_TYPE(PPU_2C05_04, ppu2c05_04_device, "ppu2c05_04", "2C05_04 PPU")
// default address map
-static ADDRESS_MAP_START( ppu2c0x, AS_0, 8, ppu2c0x_device )
+static ADDRESS_MAP_START( ppu2c0x, 0, 8, ppu2c0x_device )
AM_RANGE(0x0000, 0x3eff) AM_RAM
AM_RANGE(0x3f00, 0x3fff) AM_READWRITE(palette_read, palette_write)
// AM_RANGE(0x0000, 0x3fff) AM_RAM
@@ -98,9 +98,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *ppu2c0x_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ppu2c0x_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/ppu2c0x.h b/src/devices/video/ppu2c0x.h
index 321b2ecaeb0..1dad69741e4 100644
--- a/src/devices/video/ppu2c0x.h
+++ b/src/devices/video/ppu2c0x.h
@@ -203,7 +203,7 @@ protected:
virtual void device_config_complete() override;
// device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address space configurations
const address_space_config m_space_config;
diff --git a/src/devices/video/ramdac.cpp b/src/devices/video/ramdac.cpp
index af8423b9179..7b9da1c54af 100644
--- a/src/devices/video/ramdac.cpp
+++ b/src/devices/video/ramdac.cpp
@@ -17,7 +17,7 @@
#include "video/ramdac.h"
// default address map
-static ADDRESS_MAP_START( ramdac_palram, AS_0, 8, ramdac_device )
+static ADDRESS_MAP_START( ramdac_palram, 0, 8, ramdac_device )
AM_RANGE(0x000, 0x0ff) AM_RAM // R bank
AM_RANGE(0x100, 0x1ff) AM_RAM // G bank
AM_RANGE(0x200, 0x2ff) AM_RAM // B bank
@@ -65,9 +65,11 @@ void ramdac_device::static_set_palette_tag(device_t &device, const char *tag)
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *ramdac_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> ramdac_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
//-------------------------------------------------
diff --git a/src/devices/video/ramdac.h b/src/devices/video/ramdac.h
index 92b739e7cff..4705f491089 100644
--- a/src/devices/video/ramdac.h
+++ b/src/devices/video/ramdac.h
@@ -19,7 +19,7 @@
#define MCFG_RAMDAC_ADD(_tag, _map, _palette_tag) \
MCFG_DEVICE_ADD(_tag, RAMDAC, 0) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
+ MCFG_DEVICE_ADDRESS_MAP(0, _map) \
ramdac_device::static_set_palette_tag(*device, "^" _palette_tag);
#define MCFG_RAMDAC_COLOR_BASE(_color_base) \
@@ -60,7 +60,7 @@ public:
DECLARE_WRITE8_MEMBER( ramdac_rgb666_w );
DECLARE_WRITE8_MEMBER( ramdac_rgb888_w );
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
protected:
// device-level overrides
diff --git a/src/devices/video/scn2674.cpp b/src/devices/video/scn2674.cpp
index e5058e3a90c..78df5d1f939 100644
--- a/src/devices/video/scn2674.cpp
+++ b/src/devices/video/scn2674.cpp
@@ -17,7 +17,7 @@ DEFINE_DEVICE_TYPE(SCN2674_VIDEO, scn2674_device, "scn2674", "Signetics SCN2674
// default address map
-static ADDRESS_MAP_START( scn2674_vram, AS_0, 8, scn2674_device )
+static ADDRESS_MAP_START( scn2674_vram, 0, 8, scn2674_device )
AM_RANGE(0x0000, 0xffff) AM_NOP
ADDRESS_MAP_END
@@ -53,6 +53,13 @@ scn2674_device::scn2674_device(const machine_config &mconfig, const char *tag, d
{
}
+std::vector<std::pair<int, const address_space_config *>> scn2674_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
+}
+
void scn2674_device::device_start()
{
// resolve callbacks
diff --git a/src/devices/video/scn2674.h b/src/devices/video/scn2674.h
index 1c7c724a399..e1580e0a0b6 100644
--- a/src/devices/video/scn2674.h
+++ b/src/devices/video/scn2674.h
@@ -42,7 +42,7 @@ public:
DECLARE_WRITE8_MEMBER( buffer_w ) { m_buffer = data; }
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_0) ? &m_space_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
protected:
virtual void device_start() override;
diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp
index 0336205784a..689ce522ad0 100644
--- a/src/devices/video/sed1330.cpp
+++ b/src/devices/video/sed1330.cpp
@@ -66,7 +66,7 @@ DEFINE_DEVICE_TYPE(SED1330, sed1330_device, "sed1330", "Epson SED1330")
// default address map
-static ADDRESS_MAP_START( sed1330, AS_0, 8, sed1330_device )
+static ADDRESS_MAP_START( sed1330, 0, 8, sed1330_device )
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -219,9 +219,11 @@ void sed1330_device::device_reset()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *sed1330_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> sed1330_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/sed1330.h b/src/devices/video/sed1330.h
index fd38f03e689..73b6da22be4 100644
--- a/src/devices/video/sed1330.h
+++ b/src/devices/video/sed1330.h
@@ -20,7 +20,7 @@
#define MCFG_SED1330_ADD(_tag, _clock, _screen_tag, _map) \
MCFG_DEVICE_ADD(_tag, SED1330, _clock) \
- MCFG_DEVICE_ADDRESS_MAP(AS_0, _map) \
+ MCFG_DEVICE_ADDRESS_MAP(0, _map) \
MCFG_VIDEO_SET_SCREEN(_screen_tag)
@@ -56,7 +56,7 @@ protected:
virtual void device_reset() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
inline uint8_t readbyte(offs_t address);
inline void writebyte(offs_t address, uint8_t m_data);
diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp
index ce110948f3e..c2043076204 100644
--- a/src/devices/video/tms3556.cpp
+++ b/src/devices/video/tms3556.cpp
@@ -57,7 +57,7 @@ DEFINE_DEVICE_TYPE(TMS3556, tms3556_device, "tms3556", "Texas Instruments TMS355
// default address map
-static ADDRESS_MAP_START( tms3556, AS_0, 8, tms3556_device )
+static ADDRESS_MAP_START( tms3556, 0, 8, tms3556_device )
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -66,9 +66,11 @@ ADDRESS_MAP_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *tms3556_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> tms3556_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/tms3556.h b/src/devices/video/tms3556.h
index 8788225ec62..bcdbc008d13 100644
--- a/src/devices/video/tms3556.h
+++ b/src/devices/video/tms3556.h
@@ -62,7 +62,7 @@ protected:
virtual void device_start() override;
// device_config_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
// address space configurations
const address_space_config m_space_config;
diff --git a/src/devices/video/tms9928a.cpp b/src/devices/video/tms9928a.cpp
index a225d0db181..bbc543335eb 100644
--- a/src/devices/video/tms9928a.cpp
+++ b/src/devices/video/tms9928a.cpp
@@ -110,6 +110,13 @@ tms9929a_device::tms9929a_device(const machine_config &mconfig, const char *tag,
{
}
+std::vector<std::pair<int, const address_space_config *>> tms9928a_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_DATA, &m_space_config)
+ };
+}
+
READ8_MEMBER( tms9928a_device::read )
{
uint8_t value = 0;
diff --git a/src/devices/video/tms9928a.h b/src/devices/video/tms9928a.h
index 7db5991b5a5..06b53962625 100644
--- a/src/devices/video/tms9928a.h
+++ b/src/devices/video/tms9928a.h
@@ -116,7 +116,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_DATA) const override { return (spacenum == AS_DATA) ? &m_space_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
void change_register(uint8_t reg, uint8_t val);
diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp
index c4b5650cf76..f1444738296 100644
--- a/src/devices/video/upd7220.cpp
+++ b/src/devices/video/upd7220.cpp
@@ -149,7 +149,7 @@ DEFINE_DEVICE_TYPE(UPD7220, upd7220_device, "upd7220", "NEC uPD7220")
// default address map
-static ADDRESS_MAP_START( upd7220_vram, AS_0, 16, upd7220_device )
+static ADDRESS_MAP_START( upd7220_vram, 0, 16, upd7220_device )
AM_RANGE(0x00000, 0x3ffff) AM_RAM
ADDRESS_MAP_END
@@ -167,9 +167,11 @@ ROM_END
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *upd7220_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> upd7220_device::memory_space_config() const
{
- return (spacenum == AS_0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/upd7220.h b/src/devices/video/upd7220.h
index df99a7556aa..087789bdb58 100644
--- a/src/devices/video/upd7220.h
+++ b/src/devices/video/upd7220.h
@@ -101,7 +101,7 @@ public:
uint32_t screen_update(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
virtual const tiny_rom_entry *device_rom_region() const override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
protected:
// device-level overrides
diff --git a/src/devices/video/upd7227.cpp b/src/devices/video/upd7227.cpp
index 864d1a23935..88e9ac2d9ac 100644
--- a/src/devices/video/upd7227.cpp
+++ b/src/devices/video/upd7227.cpp
@@ -91,9 +91,11 @@ void upd7227_device::device_reset()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *upd7227_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> upd7227_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/devices/video/upd7227.h b/src/devices/video/upd7227.h
index 725137bc376..73405b57818 100644
--- a/src/devices/video/upd7227.h
+++ b/src/devices/video/upd7227.h
@@ -53,7 +53,7 @@ protected:
virtual void device_reset() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
address_space_config m_space_config;
diff --git a/src/devices/video/v9938.cpp b/src/devices/video/v9938.cpp
index ac7fd4575dc..ee69b1f26fc 100644
--- a/src/devices/video/v9938.cpp
+++ b/src/devices/video/v9938.cpp
@@ -132,6 +132,13 @@ v9958_device::v9958_device(const machine_config &mconfig, const char *tag, devic
{
}
+std::vector<std::pair<int, const address_space_config *>> v99x8_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_DATA, &m_space_config)
+ };
+}
+
void v99x8_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
diff --git a/src/devices/video/v9938.h b/src/devices/video/v9938.h
index ff8e4d27b28..0cc6eb9a4cd 100644
--- a/src/devices/video/v9938.h
+++ b/src/devices/video/v9938.h
@@ -129,7 +129,7 @@ protected:
virtual void device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr) override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override { return (spacenum == AS_DATA) ? &m_space_config : nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual void palette_init() = 0;
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp
index abcc2799025..0616947af03 100644
--- a/src/emu/addrmap.cpp
+++ b/src/emu/addrmap.cpp
@@ -335,7 +335,7 @@ bool address_map_entry::unitmask_is_appropriate(u8 width, u64 unitmask, const ch
// address_map - constructor
//-------------------------------------------------
-address_map::address_map(device_t &device, address_spacenum spacenum)
+address_map::address_map(device_t &device, int spacenum)
: m_spacenum(spacenum),
m_device(&device),
m_databits(0xff),
@@ -425,7 +425,7 @@ address_map::~address_map()
// values
//-------------------------------------------------
-void address_map::configure(address_spacenum, u8 databits)
+void address_map::configure(int, u8 databits)
{
if (m_databits == 0xff)
m_databits = databits;
@@ -605,7 +605,7 @@ void address_map::uplift_submaps(running_machine &machine, device_t &owner, endi
// one of the device's address maps
//-------------------------------------------------
-void address_map::map_validity_check(validity_checker &valid, address_spacenum spacenum) const
+void address_map::map_validity_check(validity_checker &valid, int spacenum) const
{
// it's safe to assume here that the device has a memory interface and a config for this space
const address_space_config &spaceconfig = *m_device->memory().space_config(spacenum);
diff --git a/src/emu/addrmap.h b/src/emu/addrmap.h
index 675b90ff2ff..441273f1950 100644
--- a/src/emu/addrmap.h
+++ b/src/emu/addrmap.h
@@ -191,13 +191,13 @@ class address_map
{
public:
// construction/destruction
- address_map(device_t &device, address_spacenum spacenum);
+ address_map(device_t &device, int spacenum);
address_map(device_t &device, address_map_entry *entry);
address_map(const address_space &space, offs_t start, offs_t end, int bits, u64 unitmask, device_t &device, address_map_delegate submap_delegate);
~address_map();
// configuration
- void configure(address_spacenum _spacenum, u8 _databits);
+ void configure(int _spacenum, u8 _databits);
// setters
void global_mask(offs_t mask);
@@ -209,7 +209,7 @@ public:
address_map_entry &range(offs_t start, offs_t end);
// public data
- address_spacenum m_spacenum; // space number of the map
+ int m_spacenum; // space number of the map
device_t * m_device; // associated device
u8 m_databits; // data bits represented by the map
u8 m_unmapval; // unmapped memory value
@@ -217,7 +217,7 @@ public:
simple_list<address_map_entry> m_entrylist; // list of entries
void uplift_submaps(running_machine &machine, device_t &owner, endianness_t endian);
- void map_validity_check(validity_checker &valid, address_spacenum spacenum) const;
+ void map_validity_check(validity_checker &valid, int spacenum) const;
};
diff --git a/src/emu/debug/debugcmd.cpp b/src/emu/debug/debugcmd.cpp
index 3b7b06b06ba..415d9056324 100644
--- a/src/emu/debug/debugcmd.cpp
+++ b/src/emu/debug/debugcmd.cpp
@@ -1398,7 +1398,7 @@ void debugger_commands::execute_wplist(int ref, const std::vector<std::string> &
/* loop over all CPUs */
for (device_t &device : device_iterator(m_machine.root_device()))
- for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
+ for (int spacenum = 0; spacenum < device.debug()->watchpoint_space_count(); ++spacenum)
if (device.debug()->watchpoint_first(spacenum) != nullptr)
{
static const char *const types[] = { "unkn ", "read ", "write", "r/w " };
@@ -2786,7 +2786,7 @@ void debugger_commands::execute_pcatmem(int ref, const std::vector<std::string>
const u64 data = m_cpu.read_memory(*space, space->address_to_byte(address), native_data_width, true);
// Recover the pc & print
- const address_spacenum space_num = (address_spacenum)ref;
+ const int space_num = (int)ref;
const offs_t result = space->device().debug()->track_mem_pc_from_space_address_data(space_num, address, data);
if (result != (offs_t)(-1))
m_console.printf("%02x\n", result);
diff --git a/src/emu/debug/debugcpu.cpp b/src/emu/debug/debugcpu.cpp
index 14208503bb7..5124204a500 100644
--- a/src/emu/debug/debugcpu.cpp
+++ b/src/emu/debug/debugcpu.cpp
@@ -1528,7 +1528,6 @@ device_debug::device_debug(device_t &device)
, m_track_mem(false)
{
memset(m_pc_history, 0, sizeof(m_pc_history));
- memset(m_wplist, 0, sizeof(m_wplist));
// find out which interfaces we have to work with
device.interface(m_exec);
@@ -2113,7 +2112,8 @@ void device_debug::breakpoint_enable_all(bool enable)
int device_debug::watchpoint_set(address_space &space, int type, offs_t address, offs_t length, const char *condition, const char *action)
{
- assert(space.spacenum() < ARRAY_LENGTH(m_wplist));
+ if (space.spacenum() >= int(m_wplist.size()))
+ m_wplist.resize(space.spacenum()+1, nullptr);
// allocate a new one
u32 id = m_device.machine().debugger().cpu().get_watchpoint_index();
@@ -2137,7 +2137,7 @@ int device_debug::watchpoint_set(address_space &space, int type, offs_t address,
bool device_debug::watchpoint_clear(int index)
{
// scan the list to see if we own this breakpoint
- for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
+ for (int spacenum = 0; spacenum < int(m_wplist.size()); ++spacenum)
for (watchpoint **wp = &m_wplist[spacenum]; *wp != nullptr; wp = &(*wp)->m_next)
if ((*wp)->m_index == index)
{
@@ -2161,7 +2161,7 @@ bool device_debug::watchpoint_clear(int index)
void device_debug::watchpoint_clear_all()
{
// clear the head until we run out
- for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
+ for (int spacenum = 0; spacenum < int(m_wplist.size()); ++spacenum)
while (m_wplist[spacenum] != nullptr)
watchpoint_clear(m_wplist[spacenum]->index());
}
@@ -2175,7 +2175,7 @@ void device_debug::watchpoint_clear_all()
bool device_debug::watchpoint_enable(int index, bool enable)
{
// scan the list to see if we own this watchpoint
- for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
+ for (int spacenum = 0; spacenum < int(m_wplist.size()); ++spacenum)
for (watchpoint *wp = m_wplist[spacenum]; wp != nullptr; wp = wp->next())
if (wp->m_index == index)
{
@@ -2197,7 +2197,7 @@ bool device_debug::watchpoint_enable(int index, bool enable)
void device_debug::watchpoint_enable_all(bool enable)
{
// apply the enable to all watchpoints we own
- for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_wplist); ++spacenum)
+ for (int spacenum = 0; spacenum < int(m_wplist.size()); ++spacenum)
for (watchpoint *wp = m_wplist[spacenum]; wp != nullptr; wp = wp->next())
watchpoint_enable(wp->index(), enable);
}
@@ -2369,7 +2369,7 @@ void device_debug::set_track_pc_visited(const offs_t& pc)
// 'not available'.
//-------------------------------------------------
-offs_t device_debug::track_mem_pc_from_space_address_data(const address_spacenum& space,
+offs_t device_debug::track_mem_pc_from_space_address_data(const int& space,
const offs_t& address,
const u64& data) const
{
@@ -2744,7 +2744,7 @@ void device_debug::watchpoint_check(address_space& space, int type, offs_t addre
space.machine().debugger().cpu().watchpoint_check(space, type, address, value_to_write, mem_mask, m_wplist);
}
-void debugger_cpu::watchpoint_check(address_space& space, int type, offs_t address, u64 value_to_write, u64 mem_mask, device_debug::watchpoint** wplist)
+void debugger_cpu::watchpoint_check(address_space& space, int type, offs_t address, u64 value_to_write, u64 mem_mask, std::vector<device_debug::watchpoint *> &wplist)
{
// if we're within debugger code, don't stop
if (m_within_instruction_hook || m_machine.side_effect_disabled())
@@ -3332,7 +3332,7 @@ device_debug::dasm_pc_tag::dasm_pc_tag(const offs_t& address, const u32& crc)
// dasm_memory_access - constructor
//-------------------------------------------------
-device_debug::dasm_memory_access::dasm_memory_access(const address_spacenum& address_space,
+device_debug::dasm_memory_access::dasm_memory_access(const int& address_space,
const offs_t& address,
const u64& data,
const offs_t& pc)
diff --git a/src/emu/debug/debugcpu.h b/src/emu/debug/debugcpu.h
index 1cc50740249..2ea78c3fe20 100644
--- a/src/emu/debug/debugcpu.h
+++ b/src/emu/debug/debugcpu.h
@@ -215,7 +215,8 @@ public:
void breakpoint_enable_all(bool enable = true);
// watchpoints
- watchpoint *watchpoint_first(address_spacenum spacenum) const { return m_wplist[spacenum]; }
+ int watchpoint_space_count() const { return m_wplist.size(); }
+ watchpoint *watchpoint_first(int spacenum) const { return m_wplist[spacenum]; }
int watchpoint_set(address_space &space, int type, offs_t address, offs_t length, const char *condition, const char *action);
bool watchpoint_clear(int wpnum);
void watchpoint_clear_all();
@@ -255,7 +256,7 @@ public:
// memory tracking
void set_track_mem(bool value) { m_track_mem = value; }
- offs_t track_mem_pc_from_space_address_data(const address_spacenum& space,
+ offs_t track_mem_pc_from_space_address_data(const int& space,
const offs_t& address,
const u64& data) const;
void track_mem_data_clear() { m_track_mem_set.clear(); }
@@ -328,7 +329,7 @@ private:
// breakpoints and watchpoints
breakpoint * m_bplist; // list of breakpoints
- watchpoint * m_wplist[ADDRESS_SPACES]; // watchpoint lists for each address space
+ std::vector<watchpoint *> m_wplist; // watchpoint lists for each address space
registerpoint * m_rplist; // list of registerpoints
// tracing
@@ -408,7 +409,7 @@ private:
class dasm_memory_access
{
public:
- dasm_memory_access(const address_spacenum& address_space,
+ dasm_memory_access(const int& address_space,
const offs_t& address,
const u64& data,
const offs_t& pc);
@@ -425,7 +426,7 @@ private:
}
// Stores the PC for a given address, memory region, and data value
- address_spacenum m_address_space;
+ int m_address_space;
offs_t m_address;
u64 m_data;
mutable offs_t m_pc;
@@ -569,7 +570,7 @@ public:
void ensure_comments_loaded();
void reset_transient_flags();
void process_source_file();
- void watchpoint_check(address_space& space, int type, offs_t address, u64 value_to_write, u64 mem_mask, device_debug::watchpoint** wplist);
+ void watchpoint_check(address_space& space, int type, offs_t address, u64 value_to_write, u64 mem_mask, std::vector<device_debug::watchpoint *> &wplist);
private:
static const size_t NUM_TEMP_VARIABLES;
diff --git a/src/emu/debug/dvmemory.cpp b/src/emu/debug/dvmemory.cpp
index 7505e68222e..a5de89adb30 100644
--- a/src/emu/debug/dvmemory.cpp
+++ b/src/emu/debug/dvmemory.cpp
@@ -137,7 +137,7 @@ void debug_view_memory::enumerate_sources()
// first add all the devices' address spaces
for (device_memory_interface &memintf : memory_interface_iterator(machine().root_device()))
- for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
+ for (int spacenum = 0; spacenum < memintf.max_space_count(); ++spacenum)
if (memintf.has_space(spacenum))
{
address_space &space = memintf.space(spacenum);
diff --git a/src/emu/debug/dvwpoints.cpp b/src/emu/debug/dvwpoints.cpp
index 5609d3559b5..138bfc8fac4 100644
--- a/src/emu/debug/dvwpoints.cpp
+++ b/src/emu/debug/dvwpoints.cpp
@@ -227,7 +227,7 @@ void debug_view_watchpoints::gather_watchpoints()
{
// Collect
device_debug &debugInterface = *source.device()->debug();
- for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
+ for (int spacenum = 0; spacenum < debugInterface.watchpoint_space_count(); ++spacenum)
{
for (device_debug::watchpoint *wp = debugInterface.watchpoint_first(spacenum); wp != nullptr; wp = wp->next())
m_buffer.push_back(wp);
diff --git a/src/emu/devcb.cpp b/src/emu/devcb.cpp
index a3655cf8e87..f6b0e090830 100644
--- a/src/emu/devcb.cpp
+++ b/src/emu/devcb.cpp
@@ -26,7 +26,7 @@ devcb_base::devcb_base(device_t &device, u64 defmask)
m_target_tag(nullptr),
m_target_int(0),
m_space_tag(nullptr),
- m_space_num(AS_0),
+ m_space_num(0),
m_space(nullptr),
m_rshift(0),
m_mask(defmask),
@@ -56,7 +56,7 @@ void devcb_base::reset(callback_type type)
m_target_tag = nullptr;
m_target_int = 0;
m_space_tag = nullptr;
- m_space_num = AS_0;
+ m_space_num = 0;
m_space = nullptr;
m_target.ptr = nullptr;
m_rshift = 0;
diff --git a/src/emu/devcb.h b/src/emu/devcb.h
index 8c6a5781d8e..13f83275c25 100644
--- a/src/emu/devcb.h
+++ b/src/emu/devcb.h
@@ -118,7 +118,7 @@ public:
bool isnull() const { return (m_type == CALLBACK_NONE); }
// additional configuration
- devcb_base &set_space(const char *device, address_spacenum space = AS_0) { m_space_tag = device; m_space_num = space; return *this; }
+ devcb_base &set_space(const char *device, int space = 0) { m_space_tag = device; m_space_num = space; return *this; }
devcb_base &set_rshift(int rshift) { m_rshift = rshift; return *this; }
devcb_base &set_mask(u64 mask) { m_mask = mask; return *this; }
devcb_base &set_xor(u64 xorval) { m_xor = xorval; return *this; }
@@ -226,7 +226,7 @@ protected:
const char * m_target_tag; // tag of target object
u64 m_target_int; // integer value of target object
const char * m_space_tag; // tag of address space device
- address_spacenum m_space_num; // address space number of space device
+ int m_space_num; // address space number of space device
// derived state
address_space * m_space; // target address space
diff --git a/src/emu/dimemory.cpp b/src/emu/dimemory.cpp
index cdb234cde79..03549cd876d 100644
--- a/src/emu/dimemory.cpp
+++ b/src/emu/dimemory.cpp
@@ -122,9 +122,6 @@ address_space_config::address_space_config(const char *name, endianness_t endian
device_memory_interface::device_memory_interface(const machine_config &mconfig, device_t &device)
: device_interface(device, "memory")
{
- memset(m_address_map, 0, sizeof(m_address_map));
- memset(m_addrspace, 0, sizeof(m_addrspace));
-
// configure the fast accessor
device.interfaces().m_memory = this;
}
@@ -144,14 +141,24 @@ device_memory_interface::~device_memory_interface()
// to connect an address map to a device
//-------------------------------------------------
-void device_memory_interface::static_set_addrmap(device_t &device, address_spacenum spacenum, address_map_constructor map)
+void device_memory_interface::static_set_addrmap(device_t &device, int spacenum, address_map_constructor map)
{
device_memory_interface *memory;
if (!device.interface(memory))
throw emu_fatalerror("MCFG_DEVICE_ADDRESS_MAP called on device '%s' with no memory interface", device.tag());
- if (spacenum >= ARRAY_LENGTH(memory->m_address_map))
- throw emu_fatalerror("MCFG_DEVICE_ADDRESS_MAP called on device '%s' with out-of-range space number %d", device.tag(), spacenum);
- memory->m_address_map[spacenum] = map;
+ memory->set_addrmap(spacenum, map);
+}
+
+
+//-------------------------------------------------
+// set_addrmap - connect an address map to a device
+//-------------------------------------------------
+
+void device_memory_interface::set_addrmap(int spacenum, address_map_constructor map)
+{
+ if (spacenum >= int(m_address_map.size()))
+ m_address_map.resize(spacenum+1, nullptr);
+ m_address_map[spacenum] = map;
}
@@ -160,21 +167,37 @@ void device_memory_interface::static_set_addrmap(device_t &device, address_space
// to a device
//-------------------------------------------------
-void device_memory_interface::set_address_space(address_spacenum spacenum, address_space &space)
+void device_memory_interface::set_address_space(int spacenum, address_space &space)
{
- assert(spacenum < ARRAY_LENGTH(m_addrspace));
+ if (spacenum >= int(m_addrspace.size()))
+ m_addrspace.resize(spacenum+1, nullptr);
m_addrspace[spacenum] = &space;
}
//-------------------------------------------------
+// load_configs - retrieve the space configs
+//-------------------------------------------------
+
+void device_memory_interface::load_configs()
+{
+ auto r = memory_space_config();
+ for (const auto &entry : r) {
+ if (entry.first >= int(m_address_config.size()))
+ m_address_config.resize(entry.first + 1);
+ m_address_config[entry.first] = entry.second;
+ }
+}
+
+
+//-------------------------------------------------
// memory_translate - translate from logical to
// phyiscal addresses; designed to be overridden
// by the actual device implementation if address
// translation is supported
//-------------------------------------------------
-bool device_memory_interface::memory_translate(address_spacenum spacenum, int intention, offs_t &address)
+bool device_memory_interface::memory_translate(int spacenum, int intention, offs_t &address)
{
// by default it maps directly
return true;
@@ -188,10 +211,12 @@ bool device_memory_interface::memory_translate(address_spacenum spacenum, int in
void device_memory_interface::interface_validity_check(validity_checker &valid) const
{
+ const_cast<device_memory_interface *>(this)->load_configs();
+
// loop over all address spaces
- for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
+ for (int spacenum = 0; spacenum < int(m_address_config.size()); ++spacenum)
{
- if (space_config(spacenum) != nullptr)
+ if (space_config(spacenum))
{
// construct the map
::address_map addrmap(const_cast<device_t &>(device()), spacenum);
diff --git a/src/emu/dimemory.h b/src/emu/dimemory.h
index 9c16d85bbc3..40e123e2fb8 100644
--- a/src/emu/dimemory.h
+++ b/src/emu/dimemory.h
@@ -79,46 +79,48 @@ public:
virtual ~device_memory_interface();
// configuration access
- address_map_constructor address_map(address_spacenum spacenum = AS_0) const { return (spacenum < ARRAY_LENGTH(m_address_map)) ? m_address_map[spacenum] : nullptr; }
- const address_space_config *space_config(address_spacenum spacenum = AS_0) const { return memory_space_config(spacenum); }
+ address_map_constructor address_map(int spacenum = 0) const { return spacenum >= 0 && spacenum < int(m_address_map.size()) ? m_address_map[spacenum] : nullptr; }
+ const address_space_config *space_config(int spacenum = 0) const { return spacenum >= 0 && spacenum < int(m_address_config.size()) ? m_address_config[spacenum] : nullptr; }
+ int max_space_count() const { return m_address_config.size(); }
// static inline configuration helpers
- static void static_set_addrmap(device_t &device, address_spacenum spacenum, address_map_constructor map);
+ static void static_set_addrmap(device_t &device, int spacenum, address_map_constructor map);
+ void set_addrmap(int spacenum, address_map_constructor map);
// basic information getters
- bool has_space(int index = 0) const { return (m_addrspace[index] != nullptr); }
- bool has_space(address_spacenum index) const { return (m_addrspace[int(index)] != nullptr); }
- bool has_configured_map(int index = 0) const { return (m_address_map[index] != nullptr); }
- bool has_configured_map(address_spacenum index) const { return (m_address_map[int(index)] != nullptr); }
- address_space &space(int index = 0) const { assert(m_addrspace[index] != nullptr); return *m_addrspace[index]; }
- address_space &space(address_spacenum index) const { assert(m_addrspace[int(index)] != nullptr); return *m_addrspace[int(index)]; }
+ bool has_space(int index = 0) const { return index >= 0 && index < int(m_addrspace.size()) && m_addrspace[index]; }
+ bool has_configured_map(int index = 0) const { return index >= 0 && index < int(m_address_map.size()) && m_address_map[index]; }
+ address_space &space(int index = 0) const { assert(index >= 0 && index < int(m_addrspace.size()) && m_addrspace[index]); return *m_addrspace[index]; }
// address space accessors
- void set_address_space(address_spacenum spacenum, address_space &space);
+ void set_address_space(int spacenum, address_space &space);
// address translation
- bool translate(address_spacenum spacenum, int intention, offs_t &address) { return memory_translate(spacenum, intention, address); }
+ bool translate(int spacenum, int intention, offs_t &address) { return memory_translate(spacenum, intention, address); }
// deliberately ambiguous functions; if you have the memory interface
// just use it
device_memory_interface &memory() { return *this; }
+ void load_configs();
+
protected:
// required overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const = 0;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const = 0;
// optional operation overrides
- virtual bool memory_translate(address_spacenum spacenum, int intention, offs_t &address);
+ virtual bool memory_translate(int spacenum, int intention, offs_t &address);
// interface-level overrides
virtual void interface_validity_check(validity_checker &valid) const override;
// configuration
- address_map_constructor m_address_map[ADDRESS_SPACES]; // address maps for each address space
+ std::vector<address_map_constructor> m_address_map; // address maps for each address space
private:
// internal state
- address_space * m_addrspace[ADDRESS_SPACES]; // reported address spaces
+ std::vector<const address_space_config *> m_address_config; // configuration for each space
+ std::vector<address_space *> m_addrspace; // reported address spaces
};
// iterator
diff --git a/src/emu/dirom.cpp b/src/emu/dirom.cpp
index 5351534ec06..b0caedc721a 100644
--- a/src/emu/dirom.cpp
+++ b/src/emu/dirom.cpp
@@ -21,9 +21,11 @@ void device_rom_interface::static_set_device_rom_tag(device_t &device, const cha
romintf->m_rom_tag = tag;
}
-const address_space_config *device_rom_interface::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> device_rom_interface::memory_space_config() const
{
- return spacenum ? nullptr : &m_rom_config;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_rom_config)
+ };
}
void device_rom_interface::rom_bank_updated()
diff --git a/src/emu/dirom.h b/src/emu/dirom.h
index 96cb7688634..345c58dbd5c 100644
--- a/src/emu/dirom.h
+++ b/src/emu/dirom.h
@@ -47,7 +47,7 @@ private:
memory_bank *m_bank;
int m_cur_bank, m_bank_count;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
virtual void interface_pre_start() override;
DECLARE_READ8_MEMBER(z8_r);
diff --git a/src/emu/divtlb.cpp b/src/emu/divtlb.cpp
index b629ec81007..0689bb9c68a 100644
--- a/src/emu/divtlb.cpp
+++ b/src/emu/divtlb.cpp
@@ -29,7 +29,7 @@
// device_vtlb_interface - constructor
//-------------------------------------------------
-device_vtlb_interface::device_vtlb_interface(const machine_config &mconfig, device_t &device, address_spacenum space)
+device_vtlb_interface::device_vtlb_interface(const machine_config &mconfig, device_t &device, int space)
: device_interface(device, "vtlb"),
m_space(space),
m_dynamic(0),
diff --git a/src/emu/divtlb.h b/src/emu/divtlb.h
index 56b874e3915..3acfec4f215 100644
--- a/src/emu/divtlb.h
+++ b/src/emu/divtlb.h
@@ -46,7 +46,7 @@ class device_vtlb_interface : public device_interface
{
public:
// construction/destruction
- device_vtlb_interface(const machine_config &mconfig, device_t &device, address_spacenum space);
+ device_vtlb_interface(const machine_config &mconfig, device_t &device, int space);
virtual ~device_vtlb_interface();
// configuration helpers
@@ -74,7 +74,7 @@ protected:
private:
// private state
- address_spacenum m_space; // address space
+ int m_space; // address space
int m_dynamic; // number of dynamic entries
int m_fixed; // number of fixed entries
int m_dynindex; // index of next dynamic entry
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index a6aaa1d86cb..cdbda64f396 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -892,7 +892,7 @@ class address_space_specific : public address_space
public:
// construction/destruction
- address_space_specific(memory_manager &manager, device_memory_interface &memory, address_spacenum spacenum)
+ address_space_specific(memory_manager &manager, device_memory_interface &memory, int spacenum)
: address_space(manager, memory, spacenum, _Large),
m_read(*this, _Large),
m_write(*this, _Large),
@@ -1559,7 +1559,8 @@ memory_manager::memory_manager(running_machine &machine)
void memory_manager::allocate(device_memory_interface &memory)
{
- for (address_spacenum spacenum = AS_0; spacenum < ADDRESS_SPACES; ++spacenum)
+ memory.load_configs();
+ for (int spacenum = 0; spacenum < memory.max_space_count(); ++spacenum)
{
// if there is a configuration for this space, we need an address space
const address_space_config *spaceconfig = memory.space_config(spacenum);
@@ -1730,7 +1731,7 @@ void memory_manager::bank_reattach()
// address_space - constructor
//-------------------------------------------------
-address_space::address_space(memory_manager &manager, device_memory_interface &memory, address_spacenum spacenum, bool large)
+address_space::address_space(memory_manager &manager, device_memory_interface &memory, int spacenum, bool large)
: m_config(*memory.space_config(spacenum)),
m_device(memory.device()),
m_addrmask(0xffffffffUL >> (32 - m_config.m_addrbus_width)),
@@ -1765,7 +1766,7 @@ address_space::~address_space()
// allocate - static smart allocator of subtypes
//-------------------------------------------------
-void address_space::allocate(std::vector<std::unique_ptr<address_space>> &space_list,memory_manager &manager, const address_space_config &config, device_memory_interface &memory, address_spacenum spacenum)
+void address_space::allocate(std::vector<std::unique_ptr<address_space>> &space_list,memory_manager &manager, const address_space_config &config, device_memory_interface &memory, int spacenum)
{
// allocate one of the appropriate type
bool large = (config.addr2byte_end(0xffffffffUL >> (32 - config.m_addrbus_width)) >= (1 << 18));
@@ -2000,7 +2001,7 @@ void address_space::check_address(const char *function, offs_t addrstart, offs_t
void address_space::prepare_map()
{
- memory_region *devregion = (m_spacenum == AS_0) ? machine().root_device().memregion(m_device.tag()) : nullptr;
+ memory_region *devregion = (m_spacenum == 0) ? machine().root_device().memregion(m_device.tag()) : nullptr;
u32 devregionsize = (devregion != nullptr) ? devregion->bytes() : 0;
// allocate the address map
@@ -2040,7 +2041,7 @@ void address_space::prepare_map()
}
// if this is a ROM handler without a specified region, attach it to the implicit region
- if (m_spacenum == AS_0 && entry.m_read.m_type == AMH_ROM && entry.m_region == nullptr)
+ if (m_spacenum == 0 && entry.m_read.m_type == AMH_ROM && entry.m_region == nullptr)
{
// make sure it fits within the memory region before doing so, however
if (entry.m_byteend < devregionsize)
@@ -2830,7 +2831,7 @@ bool address_space::needs_backing_store(const address_map_entry &entry)
// if we're reading from RAM or from ROM outside of address space 0 or its region, then yes, we do need backing
memory_region *region = machine().root_device().memregion(m_device.tag());
if (entry.m_read.m_type == AMH_RAM ||
- (entry.m_read.m_type == AMH_ROM && (m_spacenum != AS_0 || region == nullptr || entry.m_addrstart >= region->bytes())))
+ (entry.m_read.m_type == AMH_ROM && (m_spacenum != 0 || region == nullptr || entry.m_addrstart >= region->bytes())))
return true;
// all other cases don't need backing
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 0c2797d31ad..dd6ff5df38e 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -25,22 +25,11 @@
enum { TOTAL_MEMORY_BANKS = 512 };
-// address spaces
-enum address_spacenum
-{
- AS_0, // first address space
- AS_1, // second address space
- AS_2, // third address space
- AS_3, // fourth address space
- ADDRESS_SPACES, // maximum number of address spaces
-
- // alternate address space names for common use
- AS_PROGRAM = AS_0, // program address space
- AS_DATA = AS_1, // data address space
- AS_IO = AS_2, // I/O address space
- AS_OPCODES = AS_3 // decrypted opcodes, when separate from data accesses
-};
-DECLARE_ENUM_OPERATORS(address_spacenum)
+// address space names for common use
+constexpr int AS_PROGRAM = 0; // program address space
+constexpr int AS_DATA = 1; // data address space
+constexpr int AS_IO = 2; // I/O address space
+constexpr int AS_OPCODES = 3; // (decrypted) opcodes, when separate from data accesses
// read or write constants
enum class read_or_write
@@ -233,19 +222,19 @@ class address_space
protected:
// construction/destruction
- address_space(memory_manager &manager, device_memory_interface &memory, address_spacenum spacenum, bool large);
+ address_space(memory_manager &manager, device_memory_interface &memory, int spacenum, bool large);
public:
virtual ~address_space();
// public allocator
- static void allocate(std::vector<std::unique_ptr<address_space>> &space_list, memory_manager &manager, const address_space_config &config, device_memory_interface &memory, address_spacenum spacenum);
+ static void allocate(std::vector<std::unique_ptr<address_space>> &space_list, memory_manager &manager, const address_space_config &config, device_memory_interface &memory, int spacenum);
// getters
memory_manager &manager() const { return m_manager; }
device_t &device() const { return m_device; }
running_machine &machine() const { return m_machine; }
const char *name() const { return m_name; }
- address_spacenum spacenum() const { return m_spacenum; }
+ int spacenum() const { return m_spacenum; }
address_map *map() const { return m_map.get(); }
direct_read_data &direct() const { return *m_direct; }
@@ -431,7 +420,7 @@ protected:
offs_t m_logaddrmask; // logical address mask
offs_t m_logbytemask; // byte-converted logical address mask
u64 m_unmap; // unmapped value
- address_spacenum m_spacenum; // address space index
+ int m_spacenum; // address space index
bool m_log_unmap; // log unmapped accesses in this space?
std::unique_ptr<direct_read_data> m_direct; // fast direct-access read info
const char * m_name; // friendly name of the address space
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 6712951b0ae..3906671587c 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -1276,7 +1276,7 @@ WRITE8_MEMBER(dummy_space_device::write)
throw emu_fatalerror("Attempted to write to generic address space (offs %X = %02X)\n", offset, data);
}
-static ADDRESS_MAP_START(dummy, AS_0, 8, dummy_space_device)
+static ADDRESS_MAP_START(dummy, 0, 8, dummy_space_device)
AM_RANGE(0x00000000, 0xffffffff) AM_READWRITE(read, write)
ADDRESS_MAP_END
@@ -1298,9 +1298,11 @@ void dummy_space_device::device_start()
// any address spaces owned by this device
//-------------------------------------------------
-const address_space_config *dummy_space_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> dummy_space_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/emu/machine.h b/src/emu/machine.h
index a9b30425ec3..584d2e419ba 100644
--- a/src/emu/machine.h
+++ b/src/emu/machine.h
@@ -127,7 +127,7 @@ protected:
virtual void device_start() override;
// device_memory_interface overrides
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_0) const override;
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
private:
const address_space_config m_space_config;
diff --git a/src/frontend/mame/luaengine.cpp b/src/frontend/mame/luaengine.cpp
index 6b62cfe726b..67d6cfecf17 100644
--- a/src/frontend/mame/luaengine.cpp
+++ b/src/frontend/mame/luaengine.cpp
@@ -1202,7 +1202,7 @@ void lua_engine::initialize()
sol::table sp_table = sol().create_table();
if(!memdev)
return sp_table;
- for(address_spacenum sp = AS_0; sp < ADDRESS_SPACES; ++sp)
+ for(int sp = 0; sp < memdev->max_space_count(); ++sp)
{
if(memdev->has_space(sp))
sp_table[memdev->space(sp).name()] = addr_space(memdev->space(sp), *memdev);
diff --git a/src/lib/netlist/nl_errstr.h b/src/lib/netlist/nl_errstr.h
index 947103b6948..35b1e4f6c60 100644
--- a/src/lib/netlist/nl_errstr.h
+++ b/src/lib/netlist/nl_errstr.h
@@ -58,7 +58,7 @@
//#define MF_1_CLASS_1_NOT_FOUND "Class {1} not found!"
#define MF_1_UNABLE_TO_PARSE_MODEL_1 "Unable to parse model: {1}"
#define MF_1_MODEL_ALREADY_EXISTS_1 "Model already exists: {1}"
-#define MF_1_ADDING_ALIAS_1_TO_ALIAS_LIST "Error adding alias {1} to alias list"
+#define MF_1_ADDING_ALI1_TO_ALIAS_LIST "Error adding alias {1} to alias list"
#define MF_1_DIP_PINS_MUST_BE_AN_EQUAL_NUMBER_OF_PINS_1 "You must pass an equal number of pins to DIPPINS {1}"
#define MF_1_UNKNOWN_OBJECT_TYPE_1 "Unknown object type {1}"
#define MF_2_INVALID_NUMBER_CONVERSION_1_2 "Invalid number conversion {1} : {2}"
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 616502dedeb..df761bc3f88 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -106,7 +106,7 @@ void setup_t::register_model(const pstring &model_in)
void setup_t::register_alias_nofqn(const pstring &alias, const pstring &out)
{
if (!m_alias.insert({alias, out}).second)
- log().fatal(MF_1_ADDING_ALIAS_1_TO_ALIAS_LIST, alias);
+ log().fatal(MF_1_ADDING_ALI1_TO_ALIAS_LIST, alias);
}
void setup_t::register_alias(const pstring &alias, const pstring &out)
diff --git a/src/mame/audio/atarijsa.cpp b/src/mame/audio/atarijsa.cpp
index eeef37392a5..9b6f54ebe3b 100644
--- a/src/mame/audio/atarijsa.cpp
+++ b/src/mame/audio/atarijsa.cpp
@@ -145,13 +145,13 @@ static ADDRESS_MAP_START( atarijsa3_map, AS_PROGRAM, 8, atari_jsa_iii_device )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( jsa3_oki1_map, AS_0, 8, atari_jsa_iii_device )
+static ADDRESS_MAP_START( jsa3_oki1_map, 0, 8, atari_jsa_iii_device )
AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("oki1lo")
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("oki1hi")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( jsa3_oki2_map, AS_0, 8, atari_jsa_iiis_device )
+static ADDRESS_MAP_START( jsa3_oki2_map, 0, 8, atari_jsa_iiis_device )
AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("oki2lo")
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("oki2hi")
ADDRESS_MAP_END
@@ -921,7 +921,7 @@ MACHINE_CONFIG_MEMBER( atari_jsa_iii_device::device_add_mconfig )
MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.60, 0)
MCFG_OKIM6295_ADD("oki1", JSA_MASTER_CLOCK/3, PIN7_HIGH)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, jsa3_oki1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, jsa3_oki1_map)
MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.75, 0)
MACHINE_CONFIG_END
@@ -966,5 +966,5 @@ MACHINE_CONFIG_MEMBER( atari_jsa_iiis_device::device_add_mconfig )
MCFG_OKIM6295_ADD("oki2", JSA_MASTER_CLOCK/3, PIN7_HIGH)
MCFG_MIXER_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.75, 1)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, jsa3_oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, jsa3_oki2_map)
MACHINE_CONFIG_END
diff --git a/src/mame/audio/decobsmt.cpp b/src/mame/audio/decobsmt.cpp
index 56a290bf440..4f44be9987a 100644
--- a/src/mame/audio/decobsmt.cpp
+++ b/src/mame/audio/decobsmt.cpp
@@ -26,7 +26,7 @@ static ADDRESS_MAP_START( decobsmt_map, AS_PROGRAM, 8, decobsmt_device )
AM_RANGE(0x2000, 0xffff) AM_ROM AM_REGION(":soundcpu", 0x2000)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( bsmt_map, AS_0, 8, decobsmt_device )
+static ADDRESS_MAP_START( bsmt_map, 0, 8, decobsmt_device )
AM_RANGE(0x000000, 0xffffff) AM_ROM AM_REGION(":bsmt", 0)
ADDRESS_MAP_END
@@ -53,7 +53,7 @@ MACHINE_CONFIG_MEMBER( decobsmt_device::device_add_mconfig )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_BSMT2000_ADD(BSMT_TAG, 24000000)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, bsmt_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, bsmt_map)
MCFG_BSMT2000_READY_CALLBACK(decobsmt_device, bsmt_ready_callback)
MCFG_SOUND_ROUTE(0, "lspeaker", 2.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 2.0)
diff --git a/src/mame/audio/segam1audio.cpp b/src/mame/audio/segam1audio.cpp
index 0926b080195..c9724c21f55 100644
--- a/src/mame/audio/segam1audio.cpp
+++ b/src/mame/audio/segam1audio.cpp
@@ -34,11 +34,11 @@ static ADDRESS_MAP_START( segam1audio_map, AS_PROGRAM, 16, segam1audio_device )
AM_RANGE(0xf00000, 0xf0ffff) AM_RAM
ADDRESS_MAP_END
-static ADDRESS_MAP_START( mpcm1_map, AS_0, 8, segam1audio_device )
+static ADDRESS_MAP_START( mpcm1_map, 0, 8, segam1audio_device )
AM_RANGE(0x000000, 0x3fffff) AM_ROM AM_REGION(":m1pcm1", 0)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( mpcm2_map, AS_0, 8, segam1audio_device )
+static ADDRESS_MAP_START( mpcm2_map, 0, 8, segam1audio_device )
AM_RANGE(0x000000, 0x3fffff) AM_ROM AM_REGION(":m1pcm2", 0)
ADDRESS_MAP_END
@@ -63,12 +63,12 @@ MACHINE_CONFIG_MEMBER( segam1audio_device::device_add_mconfig )
MCFG_SOUND_ROUTE(1, "rspeaker", 0.60)
MCFG_SOUND_ADD(MULTIPCM_1_TAG, MULTIPCM, 8000000)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, mpcm1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, mpcm1_map)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
MCFG_SOUND_ADD(MULTIPCM_2_TAG, MULTIPCM, 8000000)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, mpcm2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, mpcm2_map)
MCFG_SOUND_ROUTE(0, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
diff --git a/src/mame/audio/turrett.cpp b/src/mame/audio/turrett.cpp
index 8fa19efdb72..4f4e402e7a6 100644
--- a/src/mame/audio/turrett.cpp
+++ b/src/mame/audio/turrett.cpp
@@ -29,9 +29,11 @@ turrett_device::turrett_device(const machine_config &mconfig, const char *tag, d
// memory_space_config - configure address space
//-------------------------------------------------
-const address_space_config *turrett_device::memory_space_config(address_spacenum spacenum) const
+std::vector<std::pair<int, const address_space_config *>> turrett_device::memory_space_config() const
{
- return (spacenum == 0) ? &m_space_config : nullptr;
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(0, &m_space_config)
+ };
}
diff --git a/src/mame/audio/williams.cpp b/src/mame/audio/williams.cpp
index 349743b5a37..f9174d44105 100644
--- a/src/mame/audio/williams.cpp
+++ b/src/mame/audio/williams.cpp
@@ -735,7 +735,7 @@ ADDRESS_MAP_END
// OKI6295 map
//-------------------------------------------------
-static ADDRESS_MAP_START( williams_adpcm_oki_map, AS_0, 8, williams_adpcm_sound_device )
+static ADDRESS_MAP_START( williams_adpcm_oki_map, 0, 8, williams_adpcm_sound_device )
AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("okibank")
AM_RANGE(0x20000, 0x3ffff) AM_ROM AM_REGION("oki", 0x60000)
ADDRESS_MAP_END
@@ -758,7 +758,7 @@ MACHINE_CONFIG_MEMBER( williams_adpcm_sound_device::device_add_mconfig )
MCFG_SOUND_ROUTE_EX(0, "dac", 1.0, DAC_VREF_POS_INPUT) MCFG_SOUND_ROUTE_EX(0, "dac", -1.0, DAC_VREF_NEG_INPUT)
MCFG_OKIM6295_ADD("oki", ADPCM_MASTER_CLOCK/8, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, williams_adpcm_oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, williams_adpcm_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, DEVICE_SELF_OWNER, 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/a5105.cpp b/src/mame/drivers/a5105.cpp
index 39389733bf7..3deccb7e4c7 100644
--- a/src/mame/drivers/a5105.cpp
+++ b/src/mame/drivers/a5105.cpp
@@ -536,7 +536,7 @@ void a5105_state::video_start()
m_char_ram = memregion("pcg")->base();
}
-static ADDRESS_MAP_START( upd7220_map, AS_0, 16, a5105_state)
+static ADDRESS_MAP_START( upd7220_map, 0, 16, a5105_state)
ADDRESS_MAP_GLOBAL_MASK(0x1ffff)
AM_RANGE(0x00000, 0x1ffff) AM_RAM AM_SHARE("video_ram")
ADDRESS_MAP_END
@@ -583,7 +583,7 @@ static MACHINE_CONFIG_START( a5105 )
/* Devices */
MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_15MHz / 16) // unk clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(a5105_state, hgdc_display_pixels)
MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(a5105_state, hgdc_draw_text)
diff --git a/src/mame/drivers/adp.cpp b/src/mame/drivers/adp.cpp
index e12f46bec30..682938053f4 100644
--- a/src/mame/drivers/adp.cpp
+++ b/src/mame/drivers/adp.cpp
@@ -518,17 +518,17 @@ INTERRUPT_GEN_MEMBER(adp_state::adp_int)
}
*/
-static ADDRESS_MAP_START( adp_hd63484_map, AS_0, 16, adp_state )
+static ADDRESS_MAP_START( adp_hd63484_map, 0, 16, adp_state )
AM_RANGE(0x00000, 0x1ffff) AM_MIRROR(0x60000) AM_RAM
AM_RANGE(0x80000, 0x9ffff) AM_MIRROR(0x60000) AM_ROM AM_REGION("gfx1", 0)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( fashiong_hd63484_map, AS_0, 16, adp_state )
+static ADDRESS_MAP_START( fashiong_hd63484_map, 0, 16, adp_state )
AM_RANGE(0x00000, 0x1ffff) AM_MIRROR(0x60000) AM_RAM
AM_RANGE(0x80000, 0xfffff) AM_ROM AM_REGION("gfx1", 0)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( fstation_hd63484_map, AS_0, 16, adp_state )
+static ADDRESS_MAP_START( fstation_hd63484_map, 0, 16, adp_state )
AM_RANGE(0x00000, 0x7ffff) AM_ROM AM_REGION("gfx1", 0)
AM_RANGE(0x80000, 0xfffff) AM_RAM
ADDRESS_MAP_END
@@ -601,7 +601,7 @@ static MACHINE_CONFIG_DERIVED( fashiong, skattv )
MCFG_HD63484_ADDRESS_MAP(fashiong_hd63484_map)
MACHINE_CONFIG_END
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, adp_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, adp_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/aerofgt.cpp b/src/mame/drivers/aerofgt.cpp
index 65d4991ca1c..3c4c8575375 100644
--- a/src/mame/drivers/aerofgt.cpp
+++ b/src/mame/drivers/aerofgt.cpp
@@ -452,7 +452,7 @@ static ADDRESS_MAP_START( karatblzbl_sound_portmap, AS_IO, 8, aerofgt_state )
AM_RANGE(0x80, 0x80) AM_WRITE(karatblzbl_d7759_reset_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki_map, AS_0, 8, aerofgt_state ) //only for aerfboot for now
+static ADDRESS_MAP_START( oki_map, 0, 8, aerofgt_state ) //only for aerfboot for now
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -1906,7 +1906,7 @@ static MACHINE_CONFIG_START( aerfboot )
MCFG_GENERIC_LATCH_SEPARATE_ACKNOWLEDGE(false)
MCFG_OKIM6295_ADD("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/alto2.cpp b/src/mame/drivers/alto2.cpp
index 8ec29569952..d7d6cff55d5 100644
--- a/src/mame/drivers/alto2.cpp
+++ b/src/mame/drivers/alto2.cpp
@@ -260,15 +260,15 @@ ROM_END
// ADDRESS MAPS
//**************************************************************************
-ADDRESS_MAP_START( alto2_ucode_map, AS_0, 32, alto2_state )
+ADDRESS_MAP_START( alto2_ucode_map, 0, 32, alto2_state )
AM_RANGE(0, 4*ALTO2_UCODE_PAGE_SIZE-1) AM_DEVICE32( "maincpu", alto2_cpu_device, ucode_map, 0xffffffffUL )
ADDRESS_MAP_END
-ADDRESS_MAP_START( alto2_const_map, AS_1, 16, alto2_state )
+ADDRESS_MAP_START( alto2_const_map, 1, 16, alto2_state )
AM_RANGE(0, ALTO2_CONST_SIZE-1) AM_DEVICE16( "maincpu", alto2_cpu_device, const_map, 0xffffU )
ADDRESS_MAP_END
-ADDRESS_MAP_START( alto2_iomem_map, AS_2, 16, alto2_state )
+ADDRESS_MAP_START( alto2_iomem_map, 2, 16, alto2_state )
AM_RANGE(0, 2*ALTO2_RAM_SIZE-1) AM_DEVICE16( "maincpu", alto2_cpu_device, iomem_map, 0xffffU )
ADDRESS_MAP_END
diff --git a/src/mame/drivers/apc.cpp b/src/mame/drivers/apc.cpp
index 91f27c3d382..9f49de1e0f0 100644
--- a/src/mame/drivers/apc.cpp
+++ b/src/mame/drivers/apc.cpp
@@ -785,11 +785,11 @@ GFXDECODE_END
-static ADDRESS_MAP_START( upd7220_1_map, AS_0, 16, apc_state)
+static ADDRESS_MAP_START( upd7220_1_map, 0, 16, apc_state)
AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_1")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( upd7220_2_map, AS_0, 16, apc_state )
+static ADDRESS_MAP_START( upd7220_2_map, 0, 16, apc_state )
AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram_2")
ADDRESS_MAP_END
@@ -960,11 +960,11 @@ static MACHINE_CONFIG_START( apc )
MCFG_GFXDECODE_ADD("gfxdecode", "palette", apc)
MCFG_DEVICE_ADD("upd7220_chr", UPD7220, 3579545) // unk clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_1_map)
MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(apc_state, hgdc_draw_text)
MCFG_DEVICE_ADD("upd7220_btm", UPD7220, 3579545) // unk clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_2_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(apc_state, hgdc_display_pixels)
/* sound hardware */
diff --git a/src/mame/drivers/apollo.cpp b/src/mame/drivers/apollo.cpp
index 8e75ef15ece..ce9ec5b76ad 100644
--- a/src/mame/drivers/apollo.cpp
+++ b/src/mame/drivers/apollo.cpp
@@ -562,7 +562,7 @@ READ16_MEMBER(apollo_state::apollo_atbus_memory_r)
uint16_t data;
// Motorola CPU is MSB first, ISA Bus is LSB first
- data = m_isa->prog16_swap_r(space, offset, mem_mask);
+ data = m_isa->mem16_swap_r(space, offset, mem_mask);
SLOG2(("apollo_atbus_memory_r at %08x = %04x & %04x", ATBUS_MEMORY_BASE + offset * 2, data, mem_mask));
return data;
@@ -573,7 +573,7 @@ WRITE16_MEMBER(apollo_state::apollo_atbus_memory_w)
SLOG2(("apollo_atbus_memory_w at %08x = %04x & %04x", ATBUS_MEMORY_BASE + offset*2, data, mem_mask));
// Motorola CPU is MSB first, ISA Bus is LSB first
- m_isa->prog16_swap_w(space, offset, data, mem_mask);
+ m_isa->mem16_swap_w(space, offset, data, mem_mask);
}
/***************************************************************************
diff --git a/src/mame/drivers/attckufo.cpp b/src/mame/drivers/attckufo.cpp
index 6fc3635ccd4..5d4eac1be22 100644
--- a/src/mame/drivers/attckufo.cpp
+++ b/src/mame/drivers/attckufo.cpp
@@ -50,11 +50,11 @@ static ADDRESS_MAP_START( cpu_map, AS_PROGRAM, 8, attckufo_state )
AM_RANGE(0x2000, 0x3fff) AM_ROM AM_REGION("maincpu", 0)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( vic_videoram_map, AS_0, 8, attckufo_state )
+static ADDRESS_MAP_START( vic_videoram_map, 0, 8, attckufo_state )
AM_RANGE(0x0000, 0x3fff) AM_READ(vic_videoram_r)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( vic_colorram_map, AS_1, 8, attckufo_state )
+static ADDRESS_MAP_START( vic_colorram_map, 1, 8, attckufo_state )
AM_RANGE(0x000, 0x3ff) AM_READ(vic_colorram_r)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/bfcobra.cpp b/src/mame/drivers/bfcobra.cpp
index f97a735a284..c67b8af85e0 100644
--- a/src/mame/drivers/bfcobra.cpp
+++ b/src/mame/drivers/bfcobra.cpp
@@ -1276,7 +1276,7 @@ ADDRESS_MAP_GLOBAL_MASK(0xff)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, bfcobra_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, bfcobra_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac", ramdac_device, ramdac_pal_r, ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/blitz68k.cpp b/src/mame/drivers/blitz68k.cpp
index 632a5d1d812..601f8900c93 100644
--- a/src/mame/drivers/blitz68k.cpp
+++ b/src/mame/drivers/blitz68k.cpp
@@ -1669,7 +1669,7 @@ MC6845_ON_UPDATE_ADDR_CHANGED(blitz68k_state::crtc_addr)
{
}
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, blitz68k_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, blitz68k_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/blmbycar.cpp b/src/mame/drivers/blmbycar.cpp
index 98a47c95fc5..69a3028c46d 100644
--- a/src/mame/drivers/blmbycar.cpp
+++ b/src/mame/drivers/blmbycar.cpp
@@ -144,7 +144,7 @@ static ADDRESS_MAP_START( watrball_map, AS_PROGRAM, 16, blmbycar_state )
AM_RANGE(0x70000a, 0x70000b) AM_WRITEONLY // ?? busy
ADDRESS_MAP_END
-static ADDRESS_MAP_START( blmbycar_oki_map, AS_0, 8, blmbycar_state )
+static ADDRESS_MAP_START( blmbycar_oki_map, 0, 8, blmbycar_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -371,7 +371,7 @@ static MACHINE_CONFIG_START( blmbycar )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, blmbycar_oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, blmbycar_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 1.0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/bmcbowl.cpp b/src/mame/drivers/bmcbowl.cpp
index 6bff1856186..1a1c8093422 100644
--- a/src/mame/drivers/bmcbowl.cpp
+++ b/src/mame/drivers/bmcbowl.cpp
@@ -446,7 +446,7 @@ WRITE8_MEMBER(bmcbowl_state::input_mux_w)
m_bmc_input=data;
}
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, bmcbowl_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, bmcbowl_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/bmcpokr.cpp b/src/mame/drivers/bmcpokr.cpp
index a4565f91f3a..ad69cf5634f 100644
--- a/src/mame/drivers/bmcpokr.cpp
+++ b/src/mame/drivers/bmcpokr.cpp
@@ -795,7 +795,7 @@ TIMER_DEVICE_CALLBACK_MEMBER(bmcpokr_state::interrupt)
if (m_irq_enable & (1<<6)) m_maincpu->set_input_line(6, ASSERT_LINE);
}
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, bmcpokr_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, bmcpokr_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/bw2.cpp b/src/mame/drivers/bw2.cpp
index 7af11dd172d..a5d7853aae3 100644
--- a/src/mame/drivers/bw2.cpp
+++ b/src/mame/drivers/bw2.cpp
@@ -231,7 +231,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( lcdc_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( lcdc_map, AS_0, 8, bw2_state )
+static ADDRESS_MAP_START( lcdc_map, 0, 8, bw2_state )
ADDRESS_MAP_GLOBAL_MASK(0x3fff)
AM_RANGE(0x0000, 0x3fff) AM_RAM AM_SHARE("videoram")
ADDRESS_MAP_END
@@ -608,7 +608,7 @@ static MACHINE_CONFIG_START( bw2 )
MCFG_I8255_OUT_PORTC_CB(WRITE8(bw2_state, ppi_pc_w))
MCFG_DEVICE_ADD(MSM6255_TAG, MSM6255, XTAL_16MHz)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, lcdc_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, lcdc_map)
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MCFG_CENTRONICS_ADD(CENTRONICS_TAG, centronics_devices, "printer")
diff --git a/src/mame/drivers/c128.cpp b/src/mame/drivers/c128.cpp
index b61047dfef3..c1d9b288db2 100644
--- a/src/mame/drivers/c128.cpp
+++ b/src/mame/drivers/c128.cpp
@@ -684,7 +684,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vic_videoram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vic_videoram_map, AS_0, 8, c128_state )
+static ADDRESS_MAP_START( vic_videoram_map, 0, 8, c128_state )
AM_RANGE(0x0000, 0x3fff) AM_READ(vic_videoram_r)
ADDRESS_MAP_END
@@ -693,7 +693,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vic_colorram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vic_colorram_map, AS_1, 8, c128_state )
+static ADDRESS_MAP_START( vic_colorram_map, 1, 8, c128_state )
AM_RANGE(0x000, 0x3ff) AM_READ(vic_colorram_r)
ADDRESS_MAP_END
@@ -702,7 +702,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vdc_videoram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vdc_videoram_map, AS_0, 8, c128_state )
+static ADDRESS_MAP_START( vdc_videoram_map, 0, 8, c128_state )
AM_RANGE(0x0000, 0xffff) AM_RAM
ADDRESS_MAP_END
@@ -1701,8 +1701,8 @@ static MACHINE_CONFIG_START( ntsc )
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(c128_state, vic_irq_w))
MCFG_MOS8564_K_CALLBACK(WRITE8(c128_state, vic_k_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_VIC_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_VIC_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6567_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6567_COLUMNS, VIC6567_LINES)
@@ -1872,8 +1872,8 @@ static MACHINE_CONFIG_START( pal )
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(c128_state, vic_irq_w))
MCFG_MOS8564_K_CALLBACK(WRITE8(c128_state, vic_k_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_VIC_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_VIC_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6569_COLUMNS, VIC6569_LINES)
diff --git a/src/mame/drivers/c64.cpp b/src/mame/drivers/c64.cpp
index 6f4dfc5955b..e9f3f1ee2c5 100644
--- a/src/mame/drivers/c64.cpp
+++ b/src/mame/drivers/c64.cpp
@@ -533,7 +533,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vic_videoram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vic_videoram_map, AS_0, 8, c64_state )
+static ADDRESS_MAP_START( vic_videoram_map, 0, 8, c64_state )
AM_RANGE(0x0000, 0x3fff) AM_READ(vic_videoram_r)
ADDRESS_MAP_END
@@ -542,7 +542,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vic_colorram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vic_colorram_map, AS_1, 8, c64_state )
+static ADDRESS_MAP_START( vic_colorram_map, 1, 8, c64_state )
AM_RANGE(0x000, 0x3ff) AM_READ(vic_colorram_r)
ADDRESS_MAP_END
@@ -1325,8 +1325,8 @@ static MACHINE_CONFIG_START( ntsc )
MCFG_MOS6566_CPU(M6510_TAG)
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(c64_state, vic_irq_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6567_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6567_COLUMNS, VIC6567_LINES)
@@ -1481,8 +1481,8 @@ static MACHINE_CONFIG_START( pal )
MCFG_MOS6566_CPU(M6510_TAG)
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(c64_state, vic_irq_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6569_COLUMNS, VIC6569_LINES)
@@ -1616,8 +1616,8 @@ static MACHINE_CONFIG_START( pal_gs )
MCFG_MOS6566_CPU(M6510_TAG)
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(c64_state, vic_irq_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6569_COLUMNS, VIC6569_LINES)
diff --git a/src/mame/drivers/cave.cpp b/src/mame/drivers/cave.cpp
index e184b0edcab..9a443a17bb9 100644
--- a/src/mame/drivers/cave.cpp
+++ b/src/mame/drivers/cave.cpp
@@ -1161,12 +1161,12 @@ ADDRESS_MAP_END
***************************************************************************/
-static ADDRESS_MAP_START( oki_map, AS_0, 8, cave_state )
+static ADDRESS_MAP_START( oki_map, 0, 8, cave_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("okibank1")
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank2")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki2_map, AS_0, 8, cave_state )
+static ADDRESS_MAP_START( oki2_map, 0, 8, cave_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROMBANK("oki2bank1")
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("oki2bank2")
ADDRESS_MAP_END
@@ -2307,7 +2307,7 @@ static MACHINE_CONFIG_START( hotdogst )
MCFG_OKIM6295_ADD("oki", XTAL_32MHz/16, PIN7_HIGH) // pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MACHINE_CONFIG_END
@@ -2410,7 +2410,7 @@ static MACHINE_CONFIG_START( mazinger )
MCFG_OKIM6295_ADD("oki", XTAL_1_056MHz, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MACHINE_CONFIG_END
@@ -2463,11 +2463,11 @@ static MACHINE_CONFIG_START( metmqstr )
MCFG_OKIM6295_ADD("oki1", XTAL_32MHz / 16 , PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_OKIM6295_ADD("oki2", XTAL_32MHz / 16 , PIN7_HIGH)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.5)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki2_map)
MACHINE_CONFIG_END
@@ -2713,11 +2713,11 @@ static MACHINE_CONFIG_START( sailormn )
MCFG_OKIM6295_ADD("oki1", 2112000, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_OKIM6295_ADD("oki2", 2112000, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki2_map)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/cbm2.cpp b/src/mame/drivers/cbm2.cpp
index 092d3cfb262..14dd1adcd86 100644
--- a/src/mame/drivers/cbm2.cpp
+++ b/src/mame/drivers/cbm2.cpp
@@ -1172,7 +1172,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vic_videoram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vic_videoram_map, AS_0, 8, p500_state )
+static ADDRESS_MAP_START( vic_videoram_map, 0, 8, p500_state )
AM_RANGE(0x0000, 0x3fff) AM_READ(vic_videoram_r)
ADDRESS_MAP_END
@@ -1181,7 +1181,7 @@ ADDRESS_MAP_END
// ADDRESS_MAP( vic_colorram_map )
//-------------------------------------------------
-static ADDRESS_MAP_START( vic_colorram_map, AS_1, 8, p500_state )
+static ADDRESS_MAP_START( vic_colorram_map, 1, 8, p500_state )
AM_RANGE(0x000, 0x3ff) AM_READ(vic_colorram_r)
ADDRESS_MAP_END
@@ -2294,8 +2294,8 @@ static MACHINE_CONFIG_START( p500_ntsc )
MCFG_MOS6566_CPU(M6509_TAG)
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(p500_state, vic_irq_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6567_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6567_COLUMNS, VIC6567_LINES)
@@ -2410,8 +2410,8 @@ static MACHINE_CONFIG_START( p500_pal )
MCFG_MOS6566_CPU(M6509_TAG)
MCFG_MOS6566_IRQ_CALLBACK(WRITELINE(p500_state, vic_irq_w))
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vic_videoram_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, vic_colorram_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vic_videoram_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, vic_colorram_map)
MCFG_SCREEN_ADD(SCREEN_TAG, RASTER)
MCFG_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE)
MCFG_SCREEN_SIZE(VIC6569_COLUMNS, VIC6569_LINES)
diff --git a/src/mame/drivers/chsuper.cpp b/src/mame/drivers/chsuper.cpp
index c5919845220..801d490ff8e 100644
--- a/src/mame/drivers/chsuper.cpp
+++ b/src/mame/drivers/chsuper.cpp
@@ -342,7 +342,7 @@ static GFXDECODE_START( chsuper )
GFXDECODE_ENTRY( "gfx1", 0x00000, charlayout, 0, 1 )
GFXDECODE_END
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, chsuper_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, chsuper_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/cischeat.cpp b/src/mame/drivers/cischeat.cpp
index 55367f347e0..22cdefce06a 100644
--- a/src/mame/drivers/cischeat.cpp
+++ b/src/mame/drivers/cischeat.cpp
@@ -820,12 +820,12 @@ static ADDRESS_MAP_START( captflag_map, AS_PROGRAM, 16, cischeat_state )
AM_RANGE(0x100060, 0x10007d) AM_RAM // 7-seg? NVRAM?
ADDRESS_MAP_END
-static ADDRESS_MAP_START( captflag_oki1_map, AS_0, 8, cischeat_state )
+static ADDRESS_MAP_START( captflag_oki1_map, 0, 8, cischeat_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("oki1_bank")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( captflag_oki2_map, AS_0, 8, cischeat_state )
+static ADDRESS_MAP_START( captflag_oki2_map, 0, 8, cischeat_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("oki2_bank")
ADDRESS_MAP_END
@@ -2214,12 +2214,12 @@ static MACHINE_CONFIG_START( captflag )
MCFG_SPEAKER_STANDARD_STEREO("lspeaker", "rspeaker")
MCFG_OKIM6295_ADD("oki1", 2112000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, captflag_oki1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, captflag_oki1_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
MCFG_OKIM6295_ADD("oki2", 2112000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, captflag_oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, captflag_oki2_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.5)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.5)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/clpoker.cpp b/src/mame/drivers/clpoker.cpp
index 561bb2ef758..2a9410d4f58 100644
--- a/src/mame/drivers/clpoker.cpp
+++ b/src/mame/drivers/clpoker.cpp
@@ -94,7 +94,7 @@ static ADDRESS_MAP_START( io_map, AS_IO, 8, clpoker_state )
AM_RANGE(0xc0, 0xc0) AM_READNOP // mystery read at startup
ADDRESS_MAP_END
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, clpoker_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, clpoker_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac", ramdac_device, ramdac_pal_r, ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/coinmvga.cpp b/src/mame/drivers/coinmvga.cpp
index bf1d3671855..48d8f8b6dc4 100644
--- a/src/mame/drivers/coinmvga.cpp
+++ b/src/mame/drivers/coinmvga.cpp
@@ -617,11 +617,11 @@ INTERRUPT_GEN_MEMBER(coinmvga_state::vblank_irq)
* Machine Drivers *
*************************/
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, coinmvga_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, coinmvga_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( ramdac2_map, AS_0, 8, coinmvga_state )
+static ADDRESS_MAP_START( ramdac2_map, 0, 8, coinmvga_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac2",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/cultures.cpp b/src/mame/drivers/cultures.cpp
index 47cfadc907e..0cf708fa830 100644
--- a/src/mame/drivers/cultures.cpp
+++ b/src/mame/drivers/cultures.cpp
@@ -183,7 +183,7 @@ WRITE8_MEMBER(cultures_state::bg_bank_w)
}
-static ADDRESS_MAP_START( oki_map, AS_0, 8, cultures_state )
+static ADDRESS_MAP_START( oki_map, 0, 8, cultures_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -428,7 +428,7 @@ static MACHINE_CONFIG_START( cultures )
MCFG_OKIM6295_ADD("oki", MCLK/8, PIN7_HIGH) // clock frequency & pin 7 not verified
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.30)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/ddribble.cpp b/src/mame/drivers/ddribble.cpp
index 51c6d41ba90..89e9e55e985 100644
--- a/src/mame/drivers/ddribble.cpp
+++ b/src/mame/drivers/ddribble.cpp
@@ -143,7 +143,7 @@ static ADDRESS_MAP_START( cpu2_map, AS_PROGRAM, 8, ddribble_state )
AM_RANGE(0x8000, 0xffff) AM_ROM /* ROM */
ADDRESS_MAP_END
-static ADDRESS_MAP_START( vlm_map, AS_0, 8, ddribble_state )
+static ADDRESS_MAP_START( vlm_map, 0, 8, ddribble_state )
AM_RANGE(0x0000, 0xffff) AM_ROMBANK("vlmbank")
ADDRESS_MAP_END
@@ -304,7 +304,7 @@ static MACHINE_CONFIG_START( ddribble )
MCFG_SOUND_ADD("vlm", VLM5030, XTAL_3_579545MHz) /* verified on pcb */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vlm_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vlm_map)
MCFG_FILTER_RC_ADD("filter1", 0)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
diff --git a/src/mame/drivers/dmv.cpp b/src/mame/drivers/dmv.cpp
index 2d0e62d98ed..169a292c672 100644
--- a/src/mame/drivers/dmv.cpp
+++ b/src/mame/drivers/dmv.cpp
@@ -554,7 +554,7 @@ WRITE8_MEMBER(dmv_state::kb_mcu_port2_w)
m_slot7->keyint_w(BIT(data, 4));
}
-static ADDRESS_MAP_START( upd7220_map, AS_0, 16, dmv_state )
+static ADDRESS_MAP_START( upd7220_map, 0, 16, dmv_state )
ADDRESS_MAP_GLOBAL_MASK(0x1ffff)
AM_RANGE(0x00000, 0x1ffff) AM_RAM AM_SHARE("video_ram")
ADDRESS_MAP_END
@@ -740,7 +740,7 @@ static MACHINE_CONFIG_START( dmv )
// devices
MCFG_DEVICE_ADD("upd7220", UPD7220, XTAL_5MHz/2) // unk clock
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(dmv_state, hgdc_display_pixels)
MCFG_UPD7220_DRAW_TEXT_CALLBACK_OWNER(dmv_state, hgdc_draw_text)
diff --git a/src/mame/drivers/dreamwld.cpp b/src/mame/drivers/dreamwld.cpp
index d63e70cd1de..c5e19c19f72 100644
--- a/src/mame/drivers/dreamwld.cpp
+++ b/src/mame/drivers/dreamwld.cpp
@@ -425,12 +425,12 @@ READ32_MEMBER(dreamwld_state::dreamwld_protdata_r)
return dat << 24;
}
-static ADDRESS_MAP_START( oki1_map, AS_0, 8, dreamwld_state )
+static ADDRESS_MAP_START( oki1_map, 0, 8, dreamwld_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("oki1bank")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki2_map, AS_0, 8, dreamwld_state )
+static ADDRESS_MAP_START( oki2_map, 0, 8, dreamwld_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("oki2bank")
ADDRESS_MAP_END
@@ -819,7 +819,7 @@ static MACHINE_CONFIG_START( baryon )
MCFG_OKIM6295_ADD("oki1", XTAL_32MHz/32, PIN7_LOW) /* 1MHz verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki1_map)
MACHINE_CONFIG_END
@@ -833,7 +833,7 @@ static MACHINE_CONFIG_DERIVED( dreamwld, baryon )
MCFG_OKIM6295_ADD("oki2", XTAL_32MHz/32, PIN7_LOW) /* 1MHz verified */
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "lspeaker", 0.50)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki2_map)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/dunhuang.cpp b/src/mame/drivers/dunhuang.cpp
index 3c9744ea225..aac431e18a4 100644
--- a/src/mame/drivers/dunhuang.cpp
+++ b/src/mame/drivers/dunhuang.cpp
@@ -523,7 +523,7 @@ static ADDRESS_MAP_START( dunhuang_io_map, AS_IO, 8, dunhuang_state )
AM_RANGE( 0x0098, 0x0098 ) AM_DEVWRITE("ay8910", ay8910_device, address_w )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, dunhuang_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, dunhuang_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac", ramdac_device, ramdac_pal_r, ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/expro02.cpp b/src/mame/drivers/expro02.cpp
index 691fcd9b5d1..c52b2673535 100644
--- a/src/mame/drivers/expro02.cpp
+++ b/src/mame/drivers/expro02.cpp
@@ -798,7 +798,7 @@ static ADDRESS_MAP_START( smissw_map, AS_PROGRAM, 16, expro02_state )
AM_RANGE(0xf00000, 0xf00001) AM_READ8(comad_okim6295_r, 0xff00) AM_DEVWRITE8("oki", okim6295_device, write, 0xff00) /* fantasia, missw96 */
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki_map, AS_0, 8, expro02_state )
+static ADDRESS_MAP_START( oki_map, 0, 8, expro02_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -922,7 +922,7 @@ static MACHINE_CONFIG_START( expro02 )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", 12000000/6, PIN7_LOW)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -961,7 +961,7 @@ static MACHINE_CONFIG_DERIVED( supmodel, comad_noview2 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(supmodel_map)
MCFG_OKIM6295_REPLACE("oki", 1584000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -979,7 +979,7 @@ static MACHINE_CONFIG_DERIVED( galhustl, comad_noview2 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(galhustl_map)
MCFG_OKIM6295_REPLACE("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SCREEN_MODIFY("screen")
@@ -991,7 +991,7 @@ static MACHINE_CONFIG_DERIVED( zipzap, comad_noview2 )
MCFG_CPU_MODIFY("maincpu")
MCFG_CPU_PROGRAM_MAP(zipzap_map)
MCFG_OKIM6295_REPLACE("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MCFG_SCREEN_MODIFY("screen") // doesn't work with original kaneko_spr implementation
diff --git a/src/mame/drivers/gaelco.cpp b/src/mame/drivers/gaelco.cpp
index fee5dc06cc1..b316ed27026 100644
--- a/src/mame/drivers/gaelco.cpp
+++ b/src/mame/drivers/gaelco.cpp
@@ -186,7 +186,7 @@ static ADDRESS_MAP_START( thoop_map, AS_PROGRAM, 16, gaelco_state )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki_map, AS_0, 8, gaelco_state )
+static ADDRESS_MAP_START( oki_map, 0, 8, gaelco_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -565,7 +565,7 @@ static MACHINE_CONFIG_START( maniacsq )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -598,7 +598,7 @@ static MACHINE_CONFIG_START( squash )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
@@ -631,7 +631,7 @@ static MACHINE_CONFIG_START( thoop )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", 1056000, PIN7_HIGH) // clock frequency & pin 7 not verified
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/galgames.cpp b/src/mame/drivers/galgames.cpp
index 4e9801eea50..f915a2eb2e8 100644
--- a/src/mame/drivers/galgames.cpp
+++ b/src/mame/drivers/galgames.cpp
@@ -277,7 +277,7 @@ protected:
// device-level overrides
virtual void device_start() override;
virtual void device_reset() override;
- virtual const address_space_config *memory_space_config(address_spacenum spacenum = AS_PROGRAM) const override { return (spacenum == AS_PROGRAM) ? &m_space_config: nullptr; }
+ virtual std::vector<std::pair<int, const address_space_config *>> memory_space_config() const override;
address_space_config m_space_config;
address_space *m_space;
@@ -300,6 +300,13 @@ protected:
bool m_is_ram_active;
};
+std::vector<std::pair<int, const address_space_config *>> galgames_slot_device::memory_space_config() const
+{
+ return std::vector<std::pair<int, const address_space_config *>> {
+ std::make_pair(AS_PROGRAM, &m_space_config)
+ };
+}
+
// device type definition
DEFINE_DEVICE_TYPE(GALGAMES_SLOT, galgames_slot_device, "starpak_slot", "Galaxy Games Slot")
diff --git a/src/mame/drivers/galpanic.cpp b/src/mame/drivers/galpanic.cpp
index 155a36a3cfe..82442e0ca0d 100644
--- a/src/mame/drivers/galpanic.cpp
+++ b/src/mame/drivers/galpanic.cpp
@@ -157,7 +157,7 @@ static ADDRESS_MAP_START( galpanica_map, AS_PROGRAM, 16, galpanic_state )
AM_RANGE(0xe00000, 0xe00015) AM_DEVREADWRITE("calc1_mcu", kaneko_hit_device, kaneko_hit_r,kaneko_hit_w)
ADDRESS_MAP_END
-static ADDRESS_MAP_START( galpanic_oki_map, AS_0, 8, galpanic_state )
+static ADDRESS_MAP_START( galpanic_oki_map, 0, 8, galpanic_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -262,7 +262,7 @@ static MACHINE_CONFIG_START( galpanic )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", XTAL_12MHz/6, PIN7_LOW) /* verified on pcb */
- MCFG_DEVICE_ADDRESS_MAP(AS_0, galpanic_oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, galpanic_oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/glass.cpp b/src/mame/drivers/glass.cpp
index a20990f28de..7ff320ec5f8 100644
--- a/src/mame/drivers/glass.cpp
+++ b/src/mame/drivers/glass.cpp
@@ -100,7 +100,7 @@ static ADDRESS_MAP_START( glass_map, AS_PROGRAM, 16, glass_state )
ADDRESS_MAP_END
-static ADDRESS_MAP_START( oki_map, AS_0, 8, glass_state )
+static ADDRESS_MAP_START( oki_map, 0, 8, glass_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("okibank")
ADDRESS_MAP_END
@@ -224,7 +224,7 @@ static MACHINE_CONFIG_START( glass )
MCFG_SPEAKER_STANDARD_MONO("mono")
MCFG_OKIM6295_ADD("oki", XTAL_1MHz, PIN7_HIGH) /* 1MHz Resonator & pin 7 high verified on PCB */
- MCFG_DEVICE_ADDRESS_MAP(AS_0, oki_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, oki_map)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/goldstar.cpp b/src/mame/drivers/goldstar.cpp
index eb429ce4450..358bbd6f7be 100644
--- a/src/mame/drivers/goldstar.cpp
+++ b/src/mame/drivers/goldstar.cpp
@@ -479,7 +479,7 @@ ADDRESS_MAP_END
E1: W Reels enable/disable register
*/
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, goldstar_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, goldstar_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac", ramdac_device, ramdac_pal_r, ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/highvdeo.cpp b/src/mame/drivers/highvdeo.cpp
index 6fa7329ea31..11a49be7062 100644
--- a/src/mame/drivers/highvdeo.cpp
+++ b/src/mame/drivers/highvdeo.cpp
@@ -1119,7 +1119,7 @@ INTERRUPT_GEN_MEMBER(highvdeo_state::vblank_irq_80186)
device.execute().set_input_line(INPUT_LINE_NMI, PULSE_LINE);
}
-static ADDRESS_MAP_START( ramdac_map, AS_0, 8, highvdeo_state )
+static ADDRESS_MAP_START( ramdac_map, 0, 8, highvdeo_state )
AM_RANGE(0x000, 0x3ff) AM_DEVREADWRITE("ramdac",ramdac_device,ramdac_pal_r,ramdac_rgb666_w)
ADDRESS_MAP_END
diff --git a/src/mame/drivers/if800.cpp b/src/mame/drivers/if800.cpp
index cd747ad7597..bbb4cff5895 100644
--- a/src/mame/drivers/if800.cpp
+++ b/src/mame/drivers/if800.cpp
@@ -76,7 +76,7 @@ void if800_state::machine_reset()
{
}
-static ADDRESS_MAP_START( upd7220_map, AS_0, 16, if800_state )
+static ADDRESS_MAP_START( upd7220_map, 0, 16, if800_state )
AM_RANGE(0x00000, 0x3ffff) AM_RAM AM_SHARE("video_ram")
ADDRESS_MAP_END
@@ -89,7 +89,7 @@ static MACHINE_CONFIG_START( if800 )
// MCFG_PIC8259_ADD( "pic8259", if800_pic8259_config )
MCFG_DEVICE_ADD("upd7220", UPD7220, 8000000/4)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, upd7220_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, upd7220_map)
MCFG_UPD7220_DISPLAY_PIXELS_CALLBACK_OWNER(if800_state, hgdc_display_pixels)
/* video hardware */
diff --git a/src/mame/drivers/indiana.cpp b/src/mame/drivers/indiana.cpp
index 693aa262e87..8b7e6df2600 100644
--- a/src/mame/drivers/indiana.cpp
+++ b/src/mame/drivers/indiana.cpp
@@ -47,9 +47,9 @@ static ADDRESS_MAP_START(indiana_mem, AS_PROGRAM, 32, indiana_state)
AM_RANGE(0x00100000, 0x00107fff) AM_MIRROR(0x7f8f8000) AM_RAM // SRAM 32Kb of SRAM
AM_RANGE(0x00200000, 0x002fffff) AM_DEVREADWRITE8(MFP_TAG, mc68901_device, read, write, 0xffffffff) AM_MIRROR(0x7f800000) // MFP
AM_RANGE(0x00400000, 0x004fffff) AM_DEVREADWRITE16(ISABUS_TAG, isa16_device, io16_swap_r, io16_swap_w, 0xffffffff) AM_MIRROR(0x7f800000) // 16 bit PC IO
- AM_RANGE(0x00500000, 0x005fffff) AM_DEVREADWRITE16(ISABUS_TAG, isa16_device, prog16_swap_r, prog16_swap_w, 0xffffffff) AM_MIRROR(0x7f800000) // 16 bit PC MEM
+ AM_RANGE(0x00500000, 0x005fffff) AM_DEVREADWRITE16(ISABUS_TAG, isa16_device, mem16_swap_r, mem16_swap_w, 0xffffffff) AM_MIRROR(0x7f800000) // 16 bit PC MEM
AM_RANGE(0x00600000, 0x006fffff) AM_DEVREADWRITE8(ISABUS_TAG, isa16_device, io_r, io_w, 0xffffffff) AM_MIRROR(0x7f800000) // 8 bit PC IO
- AM_RANGE(0x00700000, 0x007fffff) AM_DEVREADWRITE8(ISABUS_TAG, isa16_device, prog_r, prog_w, 0xffffffff) AM_MIRROR(0x7f800000) // 8 bit PC MEM
+ AM_RANGE(0x00700000, 0x007fffff) AM_DEVREADWRITE8(ISABUS_TAG, isa16_device, mem_r, mem_w, 0xffffffff) AM_MIRROR(0x7f800000) // 8 bit PC MEM
AM_RANGE(0x80000000, 0x803fffff) AM_RAM // 4 MB RAM
AM_RANGE(0xfffe0000, 0xfffe7fff) AM_RAM // SRAM mirror?
ADDRESS_MAP_END
diff --git a/src/mame/drivers/interpro.cpp b/src/mame/drivers/interpro.cpp
index 794363adacb..8747c865ad0 100644
--- a/src/mame/drivers/interpro.cpp
+++ b/src/mame/drivers/interpro.cpp
@@ -345,7 +345,7 @@ DRIVER_INIT_MEMBER(interpro_state, ip2800)
// 256 = reports 256M, 32x8
// grab the main memory space from the mmu
- address_space &space = m_mmu->space(AS_0);
+ address_space &space = m_mmu->space(0);
// map the configured ram
space.install_ram(0, m_ram->mask(), m_ram->pointer());
@@ -374,7 +374,7 @@ static ADDRESS_MAP_START(clipper_data_map, AS_DATA, 32, interpro_state)
AM_RANGE(0x00000000, 0xffffffff) AM_DEVREADWRITE32(INTERPRO_MMU_TAG, cammu_device, data_r, data_w, 0xffffffff)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(interpro_common_map, AS_0, 32, interpro_state)
+static ADDRESS_MAP_START(interpro_common_map, 0, 32, interpro_state)
AM_RANGE(0x40000000, 0x4000004f) AM_DEVICE(INTERPRO_MCGA_TAG, interpro_fmcc_device, map)
AM_RANGE(0x4f007e00, 0x4f007eff) AM_DEVICE(INTERPRO_SGA_TAG, interpro_sga_device, map)
@@ -404,7 +404,7 @@ static ADDRESS_MAP_START(interpro_common_map, AS_0, 32, interpro_state)
ADDRESS_MAP_END
// these maps represent the real main, i/o and boot spaces of the system
-static ADDRESS_MAP_START(interpro_main_map, AS_0, 32, interpro_state)
+static ADDRESS_MAP_START(interpro_main_map, 0, 32, interpro_state)
AM_RANGE(0x00000000, 0x00ffffff) AM_RAM AM_SHARE(RAM_TAG)
AM_RANGE(0x7f100000, 0x7f11ffff) AM_ROM AM_REGION(INTERPRO_EPROM_TAG, 0)
@@ -413,13 +413,13 @@ static ADDRESS_MAP_START(interpro_main_map, AS_0, 32, interpro_state)
AM_IMPORT_FROM(interpro_common_map)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(interpro_io_map, AS_1, 32, interpro_state)
+static ADDRESS_MAP_START(interpro_io_map, 1, 32, interpro_state)
AM_RANGE(0x00000000, 0x00001fff) AM_DEVICE(INTERPRO_MMU_TAG, cammu_device, map)
AM_IMPORT_FROM(interpro_common_map)
ADDRESS_MAP_END
-static ADDRESS_MAP_START(interpro_boot_map, AS_2, 32, interpro_state)
+static ADDRESS_MAP_START(interpro_boot_map, 2, 32, interpro_state)
AM_RANGE(0x00000000, 0x00001fff) AM_RAM
ADDRESS_MAP_END
@@ -443,9 +443,9 @@ static MACHINE_CONFIG_START(ip2800)
MCFG_CPU_IRQ_ACKNOWLEDGE_DEVICE(INTERPRO_IOGA_TAG, interpro_ioga_device, inta_cb)
MCFG_DEVICE_ADD(INTERPRO_MMU_TAG, CAMMU_C4T, 0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, interpro_main_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_1, interpro_io_map)
- MCFG_DEVICE_ADDRESS_MAP(AS_2, interpro_boot_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, interpro_main_map)
+ MCFG_DEVICE_ADDRESS_MAP(1, interpro_io_map)
+ MCFG_DEVICE_ADDRESS_MAP(2, interpro_boot_map)
MCFG_CAMMU_SSW_CB(DEVREAD32(INTERPRO_CPU_TAG, clipper_device, ssw))
MCFG_RAM_ADD(RAM_TAG)
@@ -537,7 +537,7 @@ static MACHINE_CONFIG_START(ip2800)
MCFG_INTERPRO_IOGA_DMA_CB(IOGA_DMA_FLOPPY, DEVREAD8(INTERPRO_FDC_TAG, n82077aa_device, mdma_r), DEVWRITE8(INTERPRO_FDC_TAG, n82077aa_device, mdma_w))
MCFG_INTERPRO_IOGA_DMA_CB(IOGA_DMA_SERIAL, DEVREAD8(INTERPRO_SCC1_TAG, z80scc_device, da_r), DEVWRITE8(INTERPRO_SCC1_TAG, z80scc_device, da_w))
MCFG_INTERPRO_IOGA_FDCTC_CB(DEVWRITELINE(INTERPRO_FDC_TAG, n82077aa_device, tc_line_w))
- MCFG_INTERPRO_IOGA_DMA_BUS(INTERPRO_CAMMU_TAG, AS_0)
+ MCFG_INTERPRO_IOGA_DMA_BUS(INTERPRO_CAMMU_TAG, 0)
// memory control gate array
MCFG_DEVICE_ADD(INTERPRO_MCGA_TAG, INTERPRO_FMCC, 0)
diff --git a/src/mame/drivers/jailbrek.cpp b/src/mame/drivers/jailbrek.cpp
index 96e5171613e..47da5cd5807 100644
--- a/src/mame/drivers/jailbrek.cpp
+++ b/src/mame/drivers/jailbrek.cpp
@@ -161,7 +161,7 @@ static ADDRESS_MAP_START( jailbrek_map, AS_PROGRAM, 8, jailbrek_state )
AM_RANGE(0x8000, 0xffff) AM_ROM
ADDRESS_MAP_END
-static ADDRESS_MAP_START( vlm_map, AS_0, 8, jailbrek_state )
+static ADDRESS_MAP_START( vlm_map, 0, 8, jailbrek_state )
ADDRESS_MAP_GLOBAL_MASK(0x1fff)
AM_RANGE(0x0000, 0x1fff) AM_ROM
ADDRESS_MAP_END
@@ -288,7 +288,7 @@ static MACHINE_CONFIG_START( jailbrek )
MCFG_SOUND_ADD("vlm", VLM5030, VOICE_CLOCK)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, vlm_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, vlm_map)
MACHINE_CONFIG_END
diff --git a/src/mame/drivers/kaneko16.cpp b/src/mame/drivers/kaneko16.cpp
index 26804b6c377..69ebe05cb9b 100644
--- a/src/mame/drivers/kaneko16.cpp
+++ b/src/mame/drivers/kaneko16.cpp
@@ -2359,12 +2359,12 @@ static const uint16_t shogwarr_default_eeprom[64] = {
0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000, 0xFFFF
};
-static ADDRESS_MAP_START( shogwarr_oki1_map, AS_0, 8, kaneko16_shogwarr_state )
+static ADDRESS_MAP_START( shogwarr_oki1_map, 0, 8, kaneko16_shogwarr_state )
AM_RANGE(0x00000, 0x2ffff) AM_ROM
AM_RANGE(0x30000, 0x3ffff) AM_ROMBANK("bank10")
ADDRESS_MAP_END
-static ADDRESS_MAP_START( shogwarr_oki2_map, AS_0, 8, kaneko16_shogwarr_state )
+static ADDRESS_MAP_START( shogwarr_oki2_map, 0, 8, kaneko16_shogwarr_state )
AM_RANGE(0x00000, 0x3ffff) AM_ROMBANK("bank11")
ADDRESS_MAP_END
@@ -2420,11 +2420,11 @@ static MACHINE_CONFIG_START( shogwarr )
MCFG_OKIM6295_ADD("oki1", XTAL_16MHz/8, PIN7_LOW)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, shogwarr_oki1_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, shogwarr_oki1_map)
MCFG_OKIM6295_ADD("oki2", XTAL_16MHz/8, PIN7_LOW)
MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
- MCFG_DEVICE_ADDRESS_MAP(AS_0, shogwarr_oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, shogwarr_oki2_map)
MACHINE_CONFIG_END
@@ -2439,14 +2439,14 @@ static const uint16_t brapboys_default_eeprom[64] = {
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0x0035, 0xFFFF, 0xFFFF, 0xFFFF
};
-static ADDRESS_MAP_START( brapboys_oki2_map, AS_0, 8, kaneko16_shogwarr_state )
+static ADDRESS_MAP_START( brapboys_oki2_map, 0, 8, kaneko16_shogwarr_state )
AM_RANGE(0x00000, 0x1ffff) AM_ROM
AM_RANGE(0x20000, 0x3ffff) AM_ROMBANK("bank11")
ADDRESS_MAP_END
static MACHINE_CONFIG_DERIVED( brapboys, shogwarr )
MCFG_SOUND_MODIFY("oki2")
- MCFG_DEVICE_ADDRESS_MAP(AS_0, brapboys_oki2_map)
+ MCFG_DEVICE_ADDRESS_MAP(0, brapboys_oki2_map)
MCFG_DEVICE_MODIFY("kan_hit")
kaneko_hit_device::set_type(*device, 2);
diff --git a/src/mame/drivers/koftball.cpp b/src/mame/drivers/koftball.cpp
index 2dcd56578bd..9bbd465f80d 100644
--- a/src/mame/drivers/koftball.cpp
+