summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/alto2/alto2cpu.cpp
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2017-07-01 12:11:28 +0200
committer Olivier Galibert <galibert@pobox.com>2017-07-03 08:03:57 +0200
commitcbbbd07484c736eae2069b294ec666f231e64bff (patch)
treeb94a690f0ab10635eb6d11837425744208c7e8a4 /src/devices/cpu/alto2/alto2cpu.cpp
parentcb1930f6e6a6b460577f01207888eab402469e9f (diff)
dimemory: Lift the cap on the number of address spaces per device [O. Galibert]
Diffstat (limited to 'src/devices/cpu/alto2/alto2cpu.cpp')
-rw-r--r--src/devices/cpu/alto2/alto2cpu.cpp18
1 files changed, 8 insertions, 10 deletions
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