summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/m6502/deco16.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/m6502/deco16.cpp')
-rw-r--r--src/devices/cpu/m6502/deco16.cpp20
1 files changed, 12 insertions, 8 deletions
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"