summaryrefslogtreecommitdiffstats
path: root/src/devices/cpu
diff options
context:
space:
mode:
authorGravatarGravatar Olivier Galibert <galibert@pobox.com>2017-07-01 12:11:28 +0200
committerGravatarGravatar Olivier Galibert <galibert@pobox.com>2017-07-03 08:03:57 +0200
commitcbbbd07484c736eae2069b294ec666f231e64bff (patch) (github)
treeb94a690f0ab10635eb6d11837425744208c7e8a4 /src/devices/cpu
parentcb1930f6e6a6b460577f01207888eab402469e9f (diff)
downloadmame-cbbbd07484c736eae2069b294ec666f231e64bff.tar.bz2
mame-cbbbd07484c736eae2069b294ec666f231e64bff.zip
dimemory: Lift the cap on the number of address spaces per device [O. Galibert]
Diffstat (limited to 'src/devices/cpu')
-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
281 files changed, 1256 insertions, 749 deletions
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; }