diff options
author | 2011-03-27 07:37:24 +0000 | |
---|---|---|
committer | 2011-03-27 07:37:24 +0000 | |
commit | 202d7680a44bec9fa1016e8ba6eeaaba51ef15ab (patch) | |
tree | 6021eb4c3d7324779eaeeab30875f68d42ea2348 /src/emu/devcpu.c | |
parent | 382e3998b1ca12e6af774cc2652ae515f526ff44 (diff) |
Created new enum type address_spacenum for specifying an address
space by index. Update functions and methods that accepted an
address space index to take an address_spacenum instead. Note that
this means you can't use a raw integer in ADDRESS_SPACE macros, so
instead of 0 use the enumerated AS_0.
Standardized the project on the shortened constants AS_* over the
older ADDRESS_SPACE_*. Removed the latter to prevent confusion.
Also centralized the location of these definitions to memory.h.
Diffstat (limited to 'src/emu/devcpu.c')
-rw-r--r-- | src/emu/devcpu.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/devcpu.c b/src/emu/devcpu.c index 23462efbf39..9585949b348 100644 --- a/src/emu/devcpu.c +++ b/src/emu/devcpu.c @@ -70,7 +70,7 @@ legacy_cpu_device_config::legacy_cpu_device_config(const machine_config &mconfig { // build up our address spaces; legacy devices don't have logical spaces memset(m_space_config, 0, sizeof(m_space_config)); - for (int spacenum = 0; spacenum < ARRAY_LENGTH(m_space_config); spacenum++) + for (address_spacenum spacenum = AS_0; spacenum < ARRAY_LENGTH(m_space_config); spacenum++) { m_space_config[spacenum].m_name = (spacenum == 1) ? "data" : (spacenum == 2) ? "i/o" : "program"; m_space_config[spacenum].m_endianness = static_cast<endianness_t>(get_legacy_config_int(DEVINFO_INT_ENDIANNESS)); @@ -347,7 +347,7 @@ void legacy_cpu_device::execute_burn(INT32 cycles) // on the provided address //------------------------------------------------- -bool legacy_cpu_device::memory_translate(int spacenum, int intention, offs_t &address) +bool legacy_cpu_device::memory_translate(address_spacenum spacenum, int intention, offs_t &address) { if (m_translate != NULL) return (*m_translate)(this, spacenum, intention, &address) ? true : false; @@ -360,7 +360,7 @@ bool legacy_cpu_device::memory_translate(int spacenum, int intention, offs_t &ad // device specific overrides //------------------------------------------------- -bool legacy_cpu_device::memory_read(int spacenum, offs_t offset, int size, UINT64 &value) +bool legacy_cpu_device::memory_read(address_spacenum spacenum, offs_t offset, int size, UINT64 &value) { if (m_read != NULL) return (*m_read)(this, spacenum, offset, size, &value) ? true : false; @@ -373,7 +373,7 @@ bool legacy_cpu_device::memory_read(int spacenum, offs_t offset, int size, UINT6 // for device specific overrides //------------------------------------------------- -bool legacy_cpu_device::memory_write(int spacenum, offs_t offset, int size, UINT64 value) +bool legacy_cpu_device::memory_write(address_spacenum spacenum, offs_t offset, int size, UINT64 value) { if (m_write != NULL) return (*m_write)(this, spacenum, offset, size, value) ? true : false; |