diff options
author | 2019-02-17 11:50:17 -0500 | |
---|---|---|
committer | 2019-02-17 11:50:17 -0500 | |
commit | 50f045ba741d575a3e558744d744c2df223214ad (patch) | |
tree | 34b01176d691c0918dcaac9fe9f4432766fccddc /src/devices/video/ramdac.cpp | |
parent | 836abb0d63fc44fda201b76023612b1f5a21a8ac (diff) |
Eliminate the default address map member of address_space_config (nw)
Since all device address maps are now class methods defined in ordinary C++, default RAM maps can be provided more simply with an explicit has_configured_map check in an internal map definition.
A number of default address maps that probably weren't meant to be overridden have also been changed to ordinary internal maps.
Diffstat (limited to 'src/devices/video/ramdac.cpp')
-rw-r--r-- | src/devices/video/ramdac.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/devices/video/ramdac.cpp b/src/devices/video/ramdac.cpp index dc45e106711..d651235f60c 100644 --- a/src/devices/video/ramdac.cpp +++ b/src/devices/video/ramdac.cpp @@ -19,10 +19,13 @@ // default address map void ramdac_device::ramdac_palram(address_map &map) { - map(0x000, 0x0ff).ram(); // R bank - map(0x100, 0x1ff).ram(); // G bank - map(0x200, 0x2ff).ram(); // B bank - map(0x300, 0x3ff).noprw(); + if (!has_configured_map(0)) + { + map(0x000, 0x0ff).ram(); // R bank + map(0x100, 0x1ff).ram(); // G bank + map(0x200, 0x2ff).ram(); // B bank + map(0x300, 0x3ff).noprw(); + } } //************************************************************************** @@ -44,7 +47,7 @@ DEFINE_DEVICE_TYPE(RAMDAC, ramdac_device, "ramdac", "RAMDAC") ramdac_device::ramdac_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) : device_t(mconfig, RAMDAC, tag, owner, clock), device_memory_interface(mconfig, *this), - m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(), address_map_constructor(FUNC(ramdac_device::ramdac_palram), this)), + m_space_config("videoram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(ramdac_device::ramdac_palram), this)), m_palette(*this, finder_base::DUMMY_TAG), m_color_base(0), m_split_read_reg(0) |