diff options
author | 2017-07-01 12:11:28 +0200 | |
---|---|---|
committer | 2017-07-03 08:03:57 +0200 | |
commit | cbbbd07484c736eae2069b294ec666f231e64bff (patch) | |
tree | b94a690f0ab10635eb6d11837425744208c7e8a4 /src/devices/cpu/mcs96 | |
parent | cb1930f6e6a6b460577f01207888eab402469e9f (diff) |
dimemory: Lift the cap on the number of address spaces per device [O. Galibert]
Diffstat (limited to 'src/devices/cpu/mcs96')
-rw-r--r-- | src/devices/cpu/mcs96/i8x9x.cpp | 7 | ||||
-rw-r--r-- | src/devices/cpu/mcs96/i8x9x.h | 2 | ||||
-rw-r--r-- | src/devices/cpu/mcs96/mcs96.cpp | 6 | ||||
-rw-r--r-- | src/devices/cpu/mcs96/mcs96.h | 2 |
4 files changed, 11 insertions, 6 deletions
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; |