summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author AJR <ajrhacker@users.noreply.github.com>2019-02-17 11:50:17 -0500
committer AJR <ajrhacker@users.noreply.github.com>2019-02-17 11:50:17 -0500
commit50f045ba741d575a3e558744d744c2df223214ad (patch)
tree34b01176d691c0918dcaac9fe9f4432766fccddc
parent836abb0d63fc44fda201b76023612b1f5a21a8ac (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.
-rw-r--r--src/devices/machine/mcf5206e.cpp2
-rw-r--r--src/devices/machine/smpc.cpp2
-rw-r--r--src/devices/machine/tc009xlvc.cpp2
-rw-r--r--src/devices/machine/tmp68301.cpp2
-rw-r--r--src/devices/sound/cdp1869.cpp5
-rw-r--r--src/devices/sound/mos6560.cpp10
-rw-r--r--src/devices/sound/mos7360.cpp5
-rw-r--r--src/devices/sound/upd7752.cpp6
-rw-r--r--src/devices/video/315_5124.cpp5
-rw-r--r--src/devices/video/crt9007.cpp5
-rw-r--r--src/devices/video/ef9345.cpp5
-rw-r--r--src/devices/video/ef9364.cpp5
-rw-r--r--src/devices/video/ef9365.cpp5
-rw-r--r--src/devices/video/hd61830.cpp5
-rw-r--r--src/devices/video/hd66421.cpp5
-rw-r--r--src/devices/video/huc6271.cpp5
-rw-r--r--src/devices/video/huc6272.cpp14
-rw-r--r--src/devices/video/m50458.cpp23
-rw-r--r--src/devices/video/mb90082.cpp9
-rw-r--r--src/devices/video/mb_vcu.cpp18
-rw-r--r--src/devices/video/mc6845.cpp5
-rw-r--r--src/devices/video/mos6566.cpp10
-rw-r--r--src/devices/video/msm6255.cpp5
-rw-r--r--src/devices/video/ppu2c0x.cpp9
-rw-r--r--src/devices/video/ramdac.cpp13
-rw-r--r--src/devices/video/scn2674.cpp7
-rw-r--r--src/devices/video/sed1330.cpp5
-rw-r--r--src/devices/video/tms3556.cpp5
-rw-r--r--src/devices/video/tms9928a.cpp6
-rw-r--r--src/devices/video/upd7220.cpp5
-rw-r--r--src/emu/addrmap.cpp6
-rw-r--r--src/emu/emumem.cpp14
-rw-r--r--src/emu/emumem.h5
-rw-r--r--src/emu/machine.cpp2
-rw-r--r--src/mame/machine/nb1412m2.cpp2
-rw-r--r--src/mame/machine/seicopbl.cpp2
-rw-r--r--src/mame/video/seibu_crtc.cpp2
-rw-r--r--src/mame/video/zx8301.cpp5
38 files changed, 138 insertions, 108 deletions
diff --git a/src/devices/machine/mcf5206e.cpp b/src/devices/machine/mcf5206e.cpp
index 085afac92ec..cea38ca7f0f 100644
--- a/src/devices/machine/mcf5206e.cpp
+++ b/src/devices/machine/mcf5206e.cpp
@@ -826,7 +826,7 @@ DEFINE_DEVICE_TYPE(MCF5206E_PERIPHERAL, mcf5206e_peripheral_device, "mcf5206e_pe
mcf5206e_peripheral_device::mcf5206e_peripheral_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MCF5206E_PERIPHERAL, tag, owner, clock),
device_memory_interface(mconfig, *this),
- m_space_config("coldfire_regs", ENDIANNESS_BIG, 32,10, 0, address_map_constructor(), address_map_constructor(FUNC(mcf5206e_peripheral_device::coldfire_regs_map), this))
+ m_space_config("coldfire_regs", ENDIANNESS_BIG, 32,10, 0, address_map_constructor(FUNC(mcf5206e_peripheral_device::coldfire_regs_map), this))
{
}
diff --git a/src/devices/machine/smpc.cpp b/src/devices/machine/smpc.cpp
index 042fc06d590..c62e65e1703 100644
--- a/src/devices/machine/smpc.cpp
+++ b/src/devices/machine/smpc.cpp
@@ -205,7 +205,7 @@ void smpc_hle_device::smpc_regs(address_map &map)
smpc_hle_device::smpc_hle_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, SMPC_HLE, tag, owner, clock),
device_memory_interface(mconfig, *this),
- m_space_config("regs", ENDIANNESS_LITTLE, 8, 7, 0, address_map_constructor(), address_map_constructor(FUNC(smpc_hle_device::smpc_regs), this)),
+ m_space_config("regs", ENDIANNESS_LITTLE, 8, 7, 0, address_map_constructor(FUNC(smpc_hle_device::smpc_regs), this)),
m_mini_nvram(*this, "smem"),
m_mshres(*this),
m_mshnmi(*this),
diff --git a/src/devices/machine/tc009xlvc.cpp b/src/devices/machine/tc009xlvc.cpp
index 4624e3fc79d..a870dee98a6 100644
--- a/src/devices/machine/tc009xlvc.cpp
+++ b/src/devices/machine/tc009xlvc.cpp
@@ -171,7 +171,7 @@ void tc0091lvc_device::tc0091lvc_map8(address_map &map)
tc0091lvc_device::tc0091lvc_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, TC0091LVC, tag, owner, clock)
, device_memory_interface(mconfig, *this)
- , m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, address_map_constructor(), address_map_constructor(FUNC(tc0091lvc_device::tc0091lvc_map8), this))
+ , m_space_config("tc0091lvc", ENDIANNESS_LITTLE, 8,20, 0, address_map_constructor(FUNC(tc0091lvc_device::tc0091lvc_map8), this))
, m_gfxdecode(*this, finder_base::DUMMY_TAG)
{
}
diff --git a/src/devices/machine/tmp68301.cpp b/src/devices/machine/tmp68301.cpp
index 2add964e4e5..ebc710bcde5 100644
--- a/src/devices/machine/tmp68301.cpp
+++ b/src/devices/machine/tmp68301.cpp
@@ -146,7 +146,7 @@ tmp68301_device::tmp68301_device(const machine_config &mconfig, const char *tag,
m_scr(0),
m_pdir(0),
m_pdr(0),
- m_space_config("regs", ENDIANNESS_LITTLE, 16, 10, 0, address_map_constructor(), address_map_constructor(FUNC(tmp68301_device::tmp68301_regs), this))
+ m_space_config("regs", ENDIANNESS_LITTLE, 16, 10, 0, address_map_constructor(FUNC(tmp68301_device::tmp68301_regs), this))
{
memset(m_regs, 0, sizeof(m_regs));
memset(m_icr, 0, sizeof(m_icr));
diff --git a/src/devices/sound/cdp1869.cpp b/src/devices/sound/cdp1869.cpp
index 1347081549a..661611531d8 100644
--- a/src/devices/sound/cdp1869.cpp
+++ b/src/devices/sound/cdp1869.cpp
@@ -88,7 +88,8 @@ void cdp1869_device::page_map(address_map &map)
// default address map
void cdp1869_device::cdp1869(address_map &map)
{
- map(0x000, 0x7ff).ram();
+ if (!has_configured_map(0))
+ map(0x000, 0x7ff).ram();
}
@@ -359,7 +360,7 @@ cdp1869_device::cdp1869_device(const machine_config &mconfig, const char *tag, d
m_color_clock(0),
m_stream(nullptr),
m_palette(*this, "palette"),
- m_space_config("pageram", ENDIANNESS_LITTLE, 8, 11, 0, address_map_constructor(), address_map_constructor(FUNC(cdp1869_device::cdp1869), this))
+ m_space_config("pageram", ENDIANNESS_LITTLE, 8, 11, 0, address_map_constructor(FUNC(cdp1869_device::cdp1869), this))
{
}
diff --git a/src/devices/sound/mos6560.cpp b/src/devices/sound/mos6560.cpp
index 45b944c5179..d332791ec7c 100644
--- a/src/devices/sound/mos6560.cpp
+++ b/src/devices/sound/mos6560.cpp
@@ -682,12 +682,14 @@ DEFINE_DEVICE_TYPE(MOS656X_ATTACK_UFO, mos656x_attack_ufo_device, "mos656x_attac
// default address maps
void mos6560_device::mos6560_videoram_map(address_map &map)
{
- map(0x0000, 0x3fff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0x3fff).ram();
}
void mos6560_device::mos6560_colorram_map(address_map &map)
{
- map(0x000, 0x3ff).ram();
+ if (!has_configured_map(1))
+ map(0x000, 0x3ff).ram();
}
mos6560_device::mos6560_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, uint32_t variant)
@@ -696,8 +698,8 @@ mos6560_device::mos6560_device(const machine_config &mconfig, device_type type,
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_variant(variant),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(), address_map_constructor(FUNC(mos6560_device::mos6560_videoram_map), this)),
- m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(), address_map_constructor(FUNC(mos6560_device::mos6560_colorram_map), this)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(FUNC(mos6560_device::mos6560_videoram_map), this)),
+ m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(mos6560_device::mos6560_colorram_map), this)),
m_read_potx(*this),
m_read_poty(*this)
{
diff --git a/src/devices/sound/mos7360.cpp b/src/devices/sound/mos7360.cpp
index f1ced2e6a9e..2c3f6cbd26d 100644
--- a/src/devices/sound/mos7360.cpp
+++ b/src/devices/sound/mos7360.cpp
@@ -172,7 +172,8 @@ DEFINE_DEVICE_TYPE(MOS7360, mos7360_device, "mos7360", "MOS 7360 TED")
// default address maps
void mos7360_device::mos7360_videoram_map(address_map &map)
{
- map(0x0000, 0xffff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0xffff).ram();
}
@@ -265,7 +266,7 @@ mos7360_device::mos7360_device(const machine_config &mconfig, const char *tag, d
device_memory_interface(mconfig, *this),
device_sound_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(mos7360_device::mos7360_videoram_map), this)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(mos7360_device::mos7360_videoram_map), this)),
m_write_irq(*this),
m_read_k(*this),
m_stream(nullptr)
diff --git a/src/devices/sound/upd7752.cpp b/src/devices/sound/upd7752.cpp
index f49171588e7..e2e28317d4c 100644
--- a/src/devices/sound/upd7752.cpp
+++ b/src/devices/sound/upd7752.cpp
@@ -31,8 +31,8 @@ DEFINE_DEVICE_TYPE(UPD7752, upd7752_device, "upd7752", "NEC uPD7752")
/* TODO: unknown exact size */
void upd7752_device::upd7752_ram(address_map &map)
{
-// AM_RANGE(0x0000, 0x7fff) AM_ROM
- map(0x0000, 0xffff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0xffff).ram();
}
//**************************************************************************
@@ -47,7 +47,7 @@ upd7752_device::upd7752_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, UPD7752, tag, owner, clock),
device_sound_interface(mconfig, *this),
device_memory_interface(mconfig, *this), m_stream(nullptr),
- m_space_config("ram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(upd7752_device::upd7752_ram), this)), m_status(0), m_ram_addr(0), m_mode(0)
+ m_space_config("ram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(upd7752_device::upd7752_ram), this)), m_status(0), m_ram_addr(0), m_mode(0)
{
}
diff --git a/src/devices/video/315_5124.cpp b/src/devices/video/315_5124.cpp
index e0c270062c0..90b94577376 100644
--- a/src/devices/video/315_5124.cpp
+++ b/src/devices/video/315_5124.cpp
@@ -164,7 +164,8 @@ void sega315_5377_device::sega315_5377_palette(palette_device &palette) const
// default address map
void sega315_5124_device::sega315_5124(address_map &map)
{
- map(0x0000, VRAM_SIZE-1).ram();
+ if (!has_configured_map(0))
+ map(0x0000, VRAM_SIZE-1).ram();
}
@@ -189,7 +190,7 @@ sega315_5124_device::sega315_5124_device(const machine_config &mconfig, device_t
, m_int_cb(*this)
, m_csync_cb(*this)
, m_pause_cb(*this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(), address_map_constructor(FUNC(sega315_5124_device::sega315_5124), this))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(FUNC(sega315_5124_device::sega315_5124), this))
, m_palette(*this, "palette")
, m_snsnd(*this, "snsnd")
{
diff --git a/src/devices/video/crt9007.cpp b/src/devices/video/crt9007.cpp
index 40279d1316a..ff3893a4ca6 100644
--- a/src/devices/video/crt9007.cpp
+++ b/src/devices/video/crt9007.cpp
@@ -222,7 +222,8 @@ const int STATUS_LIGHT_PEN_UPDATE = 0x20;
// default address map
void crt9007_device::crt9007(address_map &map)
{
- map(0x0000, 0x3fff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0x3fff).ram();
}
@@ -456,7 +457,7 @@ crt9007_device::crt9007_device(const machine_config &mconfig, const char *tag, d
device_t(mconfig, CRT9007, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(), address_map_constructor(FUNC(crt9007_device::crt9007), this)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(FUNC(crt9007_device::crt9007), this)),
m_write_int(*this),
m_write_dmar(*this),
m_write_hs(*this),
diff --git a/src/devices/video/ef9345.cpp b/src/devices/video/ef9345.cpp
index 129dddebbf2..32b5e3adf48 100644
--- a/src/devices/video/ef9345.cpp
+++ b/src/devices/video/ef9345.cpp
@@ -35,7 +35,8 @@ DEFINE_DEVICE_TYPE(TS9347, ts9347_device, "ts9347", "TS9347")
// default address map
void ef9345_device::ef9345(address_map &map)
{
- map(0x0000, 0x3fff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0x3fff).ram();
}
//-------------------------------------------------
@@ -113,7 +114,7 @@ ef9345_device::ef9345_device(const machine_config &mconfig, device_type type, co
device_t(mconfig, type, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(ef9345_device::ef9345), this)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(ef9345_device::ef9345), this)),
m_charset(*this, DEVICE_SELF),
m_variant(variant),
m_palette(*this, finder_base::DUMMY_TAG)
diff --git a/src/devices/video/ef9364.cpp b/src/devices/video/ef9364.cpp
index ec324ff0e52..858b7309ca6 100644
--- a/src/devices/video/ef9364.cpp
+++ b/src/devices/video/ef9364.cpp
@@ -35,7 +35,8 @@ DEFINE_DEVICE_TYPE(EF9364, ef9364_device, "ef9364", "Thomson EF9364")
//-------------------------------------------------
void ef9364_device::ef9364(address_map &map)
{
- map(0x00000, ef9364_device::TXTPLANE_MAX_SIZE * ef9364_device::MAX_TXTPLANES - 1).ram();
+ if (!has_configured_map(0))
+ map(0x00000, ef9364_device::TXTPLANE_MAX_SIZE * ef9364_device::MAX_TXTPLANES - 1).ram();
}
//-------------------------------------------------
@@ -66,7 +67,7 @@ ef9364_device::ef9364_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, EF9364, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, address_map_constructor(), address_map_constructor(FUNC(ef9364_device::ef9364), this)),
+ m_space_config("textram", ENDIANNESS_LITTLE, 8, 12, 0, address_map_constructor(FUNC(ef9364_device::ef9364), this)),
m_charset(*this, DEVICE_SELF),
m_palette(*this, finder_base::DUMMY_TAG)
{
diff --git a/src/devices/video/ef9365.cpp b/src/devices/video/ef9365.cpp
index 5023348c99e..96e4b9e4776 100644
--- a/src/devices/video/ef9365.cpp
+++ b/src/devices/video/ef9365.cpp
@@ -168,7 +168,8 @@ const tiny_rom_entry *ef9365_device::device_rom_region() const
//-------------------------------------------------
void ef9365_device::ef9365(address_map &map)
{
- map(0x00000, ef9365_device::BITPLANE_MAX_SIZE * ef9365_device::MAX_BITPLANES - 1).ram();
+ if (!has_configured_map(0))
+ map(0x00000, ef9365_device::BITPLANE_MAX_SIZE * ef9365_device::MAX_BITPLANES - 1).ram();
}
//-------------------------------------------------
@@ -200,7 +201,7 @@ ef9365_device::ef9365_device(const machine_config &mconfig, const char *tag, dev
device_t(mconfig, EF9365, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 18, 0, address_map_constructor(), address_map_constructor(FUNC(ef9365_device::ef9365), this)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 18, 0, address_map_constructor(FUNC(ef9365_device::ef9365), this)),
m_charset(*this, "ef9365"),
m_palette(*this, finder_base::DUMMY_TAG),
m_irq_handler(*this)
diff --git a/src/devices/video/hd61830.cpp b/src/devices/video/hd61830.cpp
index 7d0427ff2ba..a608c096b1e 100644
--- a/src/devices/video/hd61830.cpp
+++ b/src/devices/video/hd61830.cpp
@@ -27,7 +27,8 @@ decltype(HD61830) HD61830B = HD61830;
// default address map
void hd61830_device::hd61830(address_map &map)
{
- map(0x0000, 0xffff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0xffff).ram();
}
@@ -84,7 +85,7 @@ hd61830_device::hd61830_device(const machine_config &mconfig, const char *tag, d
m_cac(0),
m_blink(0),
m_cursor(0),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(hd61830_device::hd61830), this)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(hd61830_device::hd61830), this)),
m_char_rom(*this, "hd61830")
{
}
diff --git a/src/devices/video/hd66421.cpp b/src/devices/video/hd66421.cpp
index 63283f498b0..bb03b80252e 100644
--- a/src/devices/video/hd66421.cpp
+++ b/src/devices/video/hd66421.cpp
@@ -74,7 +74,8 @@ DEFINE_DEVICE_TYPE(HD66421, hd66421_device, "hd66421", "Hitachi HD66421 LCD Cont
// default address map
void hd66421_device::hd66421(address_map &map)
{
- map(0x0000, HD66421_RAM_SIZE).ram();
+ if (!has_configured_map(0))
+ map(0x0000, HD66421_RAM_SIZE).ram();
}
//-------------------------------------------------
@@ -125,7 +126,7 @@ inline void hd66421_device::writebyte(offs_t address, uint8_t data)
hd66421_device::hd66421_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HD66421, tag, owner, clock)
, device_memory_interface(mconfig, *this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(hd66421_device::hd66421), this))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(FUNC(hd66421_device::hd66421), this))
, m_cmd(0)
, m_x(0)
, m_y(0)
diff --git a/src/devices/video/huc6271.cpp b/src/devices/video/huc6271.cpp
index 7af976a820a..9f90ba8c3b3 100644
--- a/src/devices/video/huc6271.cpp
+++ b/src/devices/video/huc6271.cpp
@@ -29,13 +29,14 @@ DEFINE_DEVICE_TYPE(HUC6271, huc6271_device, "huc6271", "Hudson HuC6271 \"Rainbow
void huc6271_device::data_map(address_map &map)
{
- map(0x000000, 0x0fffff).ram();
+ if (!has_configured_map(0))
+ map(0x000000, 0x0fffff).ram();
}
huc6271_device::huc6271_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, HUC6271, tag, owner, clock)
, device_memory_interface(mconfig, *this)
- , m_data_space_config("data", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(), address_map_constructor(FUNC(huc6271_device::data_map), this))
+ , m_data_space_config("data", ENDIANNESS_LITTLE, 32, 32, 0, address_map_constructor(FUNC(huc6271_device::data_map), this))
{
}
diff --git a/src/devices/video/huc6272.cpp b/src/devices/video/huc6272.cpp
index c6e94bb9810..0fe5ec52159 100644
--- a/src/devices/video/huc6272.cpp
+++ b/src/devices/video/huc6272.cpp
@@ -25,13 +25,17 @@ DEFINE_DEVICE_TYPE(HUC6272, huc6272_device, "huc6272", "Hudson HuC6272 \"King\""
void huc6272_device::microprg_map(address_map &map)
{
- map(0x00, 0x0f).ram().share("microprg_ram");
+ if (!has_configured_map(0))
+ map(0x00, 0x0f).ram().share("microprg_ram");
}
void huc6272_device::kram_map(address_map &map)
{
- map(0x000000, 0x0fffff).ram().share("kram_page0");
- map(0x100000, 0x1fffff).ram().share("kram_page1");
+ if (!has_configured_map(1))
+ {
+ map(0x000000, 0x0fffff).ram().share("kram_page0");
+ map(0x100000, 0x1fffff).ram().share("kram_page1");
+ }
}
@@ -49,8 +53,8 @@ huc6272_device::huc6272_device(const machine_config &mconfig, const char *tag, d
m_huc6271(*this, finder_base::DUMMY_TAG),
m_cdda_l(*this, "cdda_l"),
m_cdda_r(*this, "cdda_r"),
- m_program_space_config("microprg", ENDIANNESS_LITTLE, 16, 4, 0, address_map_constructor(), address_map_constructor(FUNC(huc6272_device::microprg_map), this)),
- m_data_space_config("kram", ENDIANNESS_LITTLE, 32, 21, 0, address_map_constructor(), address_map_constructor(FUNC(huc6272_device::kram_map), this)),
+ m_program_space_config("microprg", ENDIANNESS_LITTLE, 16, 4, 0, address_map_constructor(FUNC(huc6272_device::microprg_map), this)),
+ m_data_space_config("kram", ENDIANNESS_LITTLE, 32, 21, 0, address_map_constructor(FUNC(huc6272_device::kram_map), this)),
m_microprg_ram(*this, "microprg_ram"),
m_kram_page0(*this, "kram_page0"),
m_kram_page1(*this, "kram_page1"),
diff --git a/src/devices/video/m50458.cpp b/src/devices/video/m50458.cpp
index 41a6bd1651f..59e0f44cc43 100644
--- a/src/devices/video/m50458.cpp
+++ b/src/devices/video/m50458.cpp
@@ -31,15 +31,18 @@ DEFINE_DEVICE_TYPE(M50458, m50458_device, "m50458", "Mitsubishi M50458 OSD")
void m50458_device::m50458_vram(address_map &map)
{
- map(0x0000, 0x023f).ram(); // vram
- map(0x0240, 0x0241).w(FUNC(m50458_device::vreg_120_w));
- map(0x0242, 0x0243).w(FUNC(m50458_device::vreg_121_w));
- map(0x0244, 0x0245).w(FUNC(m50458_device::vreg_122_w));
- map(0x0246, 0x0247).w(FUNC(m50458_device::vreg_123_w));
- map(0x0248, 0x0249).w(FUNC(m50458_device::vreg_124_w));
- map(0x024a, 0x024b).w(FUNC(m50458_device::vreg_125_w));
- map(0x024c, 0x024d).w(FUNC(m50458_device::vreg_126_w));
- map(0x024e, 0x024f).w(FUNC(m50458_device::vreg_127_w));
+ if (!has_configured_map(0))
+ {
+ map(0x0000, 0x023f).ram(); // vram
+ map(0x0240, 0x0241).w(FUNC(m50458_device::vreg_120_w));
+ map(0x0242, 0x0243).w(FUNC(m50458_device::vreg_121_w));
+ map(0x0244, 0x0245).w(FUNC(m50458_device::vreg_122_w));
+ map(0x0246, 0x0247).w(FUNC(m50458_device::vreg_123_w));
+ map(0x0248, 0x0249).w(FUNC(m50458_device::vreg_124_w));
+ map(0x024a, 0x024b).w(FUNC(m50458_device::vreg_125_w));
+ map(0x024c, 0x024d).w(FUNC(m50458_device::vreg_126_w));
+ map(0x024e, 0x024f).w(FUNC(m50458_device::vreg_127_w));
+ }
}
// internal GFX ROM (TODO: GFXs in here should be 12x18, not 16x18)
@@ -180,7 +183,7 @@ m50458_device::m50458_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, M50458, tag, owner, clock)
, device_memory_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor(), address_map_constructor(FUNC(m50458_device::m50458_vram), this))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor(FUNC(m50458_device::m50458_vram), this))
{
}
diff --git a/src/devices/video/mb90082.cpp b/src/devices/video/mb90082.cpp
index a3026aeb179..957669fb48b 100644
--- a/src/devices/video/mb90082.cpp
+++ b/src/devices/video/mb90082.cpp
@@ -25,10 +25,13 @@ DEFINE_DEVICE_TYPE(MB90082, mb90082_device, "mb90082", "Fujitsu MB90082 OSD")
void mb90082_device::mb90082_vram(address_map &map)
{
- map(0x0000, 0x023f).ram(); // main screen vram
- map(0x0400, 0x063f).ram(); // main screen attr
+ if (!has_configured_map(0))
+ {
+ map(0x0000, 0x023f).ram(); // main screen vram
+ map(0x0400, 0x063f).ram(); // main screen attr
// AM_RANGE(0x0800, 0x0a3f) AM_RAM // sub screen vram
// AM_RANGE(0x0c00, 0x0e3f) AM_RAM // sub screen attr
+ }
}
/* charset is undumped, but apparently a normal ASCII one is enough for the time being (for example "fnt0808.x1" in Sharp X1) */
@@ -91,7 +94,7 @@ inline void mb90082_device::write_word(offs_t address, uint16_t data)
mb90082_device::mb90082_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, MB90082, tag, owner, clock)
, device_memory_interface(mconfig, *this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor(), address_map_constructor(FUNC(mb90082_device::mb90082_vram), this))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 16, 16, 0, address_map_constructor(FUNC(mb90082_device::mb90082_vram), this))
{
}
diff --git a/src/devices/video/mb_vcu.cpp b/src/devices/video/mb_vcu.cpp
index 1624a045ceb..96acc945359 100644
--- a/src/devices/video/mb_vcu.cpp
+++ b/src/devices/video/mb_vcu.cpp
@@ -38,16 +38,20 @@ DEFINE_DEVICE_TYPE(MB_VCU, mb_vcu_device, "mb_vcu", "Mazer Blazer custom VCU")
void mb_vcu_device::mb_vcu_vram(address_map &map)
{
- map(0x00000, 0x7ffff).ram(); // enough for a 256x256x4 x 2 pages of framebuffer with 4 layers (TODO: doubled for simplicity)
+ if (!has_configured_map(0))
+ map(0x00000, 0x7ffff).ram(); // enough for a 256x256x4 x 2 pages of framebuffer with 4 layers (TODO: doubled for simplicity)
}
void mb_vcu_device::mb_vcu_pal_ram(address_map &map)
{
- map(0x0000, 0x00ff).ram();
- map(0x0200, 0x02ff).ram();
- map(0x0400, 0x04ff).ram();
- map(0x0600, 0x06ff).rw(FUNC(mb_vcu_device::mb_vcu_paletteram_r), FUNC(mb_vcu_device::mb_vcu_paletteram_w));
+ if (!has_configured_map(1))
+ {
+ map(0x0000, 0x00ff).ram();
+ map(0x0200, 0x02ff).ram();
+ map(0x0400, 0x04ff).ram();
+ map(0x0600, 0x06ff).rw(FUNC(mb_vcu_device::mb_vcu_paletteram_r), FUNC(mb_vcu_device::mb_vcu_paletteram_w));
+ }
}
READ8_MEMBER( mb_vcu_device::mb_vcu_paletteram_r )
@@ -147,8 +151,8 @@ mb_vcu_device::mb_vcu_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, MB_VCU, tag, owner, clock)
, device_memory_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
- , m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 19, 0, address_map_constructor(), address_map_constructor(FUNC(mb_vcu_device::mb_vcu_vram), this))
- , m_paletteram_space_config("palram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(mb_vcu_device::mb_vcu_pal_ram), this))
+ , m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 19, 0, address_map_constructor(FUNC(mb_vcu_device::mb_vcu_vram), this))
+ , m_paletteram_space_config("palram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(mb_vcu_device::mb_vcu_pal_ram), this))
, m_cpu(*this, finder_base::DUMMY_TAG)
, m_palette(*this, finder_base::DUMMY_TAG)
{
diff --git a/src/devices/video/mc6845.cpp b/src/devices/video/mc6845.cpp
index 13c1c8a6155..1177e15078a 100644
--- a/src/devices/video/mc6845.cpp
+++ b/src/devices/video/mc6845.cpp
@@ -1438,7 +1438,8 @@ device_memory_interface::space_config_vector mos8563_device::memory_space_config
// default address maps
void mos8563_device::mos8563_videoram_map(address_map &map)
{
- map(0x0000, 0xffff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0xffff).ram();
}
@@ -1505,7 +1506,7 @@ mos8563_device::mos8563_device(const machine_config &mconfig, device_type type,
: mc6845_device(mconfig, type, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_palette_interface(mconfig, *this),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(mos8563_device::mos8563_videoram_map), this))
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(mos8563_device::mos8563_videoram_map), this))
{
set_clock_scale(1.0/8);
}
diff --git a/src/devices/video/mos6566.cpp b/src/devices/video/mos6566.cpp
index a671448a4ab..a7c9cb30422 100644
--- a/src/devices/video/mos6566.cpp
+++ b/src/devices/video/mos6566.cpp
@@ -227,12 +227,14 @@ DEFINE_DEVICE_TYPE(MOS8566, mos8566_device, "mos8566", "MOS 8566 VIC-II")
// default address maps
void mos6566_device::mos6566_videoram_map(address_map &map)
{
- map(0x0000, 0x3fff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0x3fff).ram();
}
void mos6566_device::mos6566_colorram_map(address_map &map)
{
- map(0x000, 0x3ff).ram();
+ if (!has_configured_map(1))
+ map(0x000, 0x3ff).ram();
}
@@ -587,8 +589,8 @@ mos6566_device::mos6566_device(const machine_config &mconfig, device_type type,
device_execute_interface(mconfig, *this),
m_icount(0),
m_variant(variant),
- m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(), address_map_constructor(FUNC(mos6566_device::mos6566_videoram_map), this)),
- m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(), address_map_constructor(FUNC(mos6566_device::mos6566_colorram_map), this)),
+ m_videoram_space_config("videoram", ENDIANNESS_LITTLE, 8, 14, 0, address_map_constructor(FUNC(mos6566_device::mos6566_videoram_map), this)),
+ m_colorram_space_config("colorram", ENDIANNESS_LITTLE, 8, 10, 0, address_map_constructor(FUNC(mos6566_device::mos6566_colorram_map), this)),
m_write_irq(*this),
m_write_ba(*this),
m_write_aec(*this),
diff --git a/src/devices/video/msm6255.cpp b/src/devices/video/msm6255.cpp
index ffca4414314..b1c83556103 100644
--- a/src/devices/video/msm6255.cpp
+++ b/src/devices/video/msm6255.cpp
@@ -63,7 +63,8 @@ void msm6255_device::map(address_map &map)
// default address map
void msm6255_device::msm6255(address_map &map)
{
- map(0x00000, 0xfffff).ram();
+ if (!has_configured_map(0))
+ map(0x00000, 0xfffff).ram();
}
@@ -80,7 +81,7 @@ msm6255_device::msm6255_device(const machine_config &mconfig, const char *tag, d
device_t(mconfig, MSM6255, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 20, 0, address_map_constructor(), address_map_constructor(FUNC(msm6255_device::msm6255), this)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 20, 0, address_map_constructor(FUNC(msm6255_device::msm6255), this)),
m_cursor(0)
{
}
diff --git a/src/devices/video/ppu2c0x.cpp b/src/devices/video/ppu2c0x.cpp
index 9db07fea461..8aa57660318 100644
--- a/src/devices/video/ppu2c0x.cpp
+++ b/src/devices/video/ppu2c0x.cpp
@@ -89,9 +89,12 @@ DEFINE_DEVICE_TYPE(PPU_2C05_04, ppu2c05_04_device, "ppu2c05_04", "2C05_04 PPU")
// default address map
void ppu2c0x_device::ppu2c0x(address_map &map)
{
- map(0x0000, 0x3eff).ram();
- map(0x3f00, 0x3fff).rw(FUNC(ppu2c0x_device::palette_read), FUNC(ppu2c0x_device::palette_write));
+ if (!has_configured_map(0))
+ {
+ map(0x0000, 0x3eff).ram();
+ map(0x3f00, 0x3fff).rw(FUNC(ppu2c0x_device::palette_read), FUNC(ppu2c0x_device::palette_write));
// AM_RANGE(0x0000, 0x3fff) AM_RAM
+ }
}
//-------------------------------------------------
@@ -125,7 +128,7 @@ ppu2c0x_device::ppu2c0x_device(const machine_config &mconfig, device_type type,
, device_memory_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
, device_palette_interface(mconfig, *this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(ppu2c0x_device::ppu2c0x), this))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(FUNC(ppu2c0x_device::ppu2c0x), this))
, m_cpu(*this, finder_base::DUMMY_TAG)
, m_scanline(0) // reset the scanline count
, m_int_callback(*this)
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)
diff --git a/src/devices/video/scn2674.cpp b/src/devices/video/scn2674.cpp
index 7eb29163884..1e6cf3d68b5 100644
--- a/src/devices/video/scn2674.cpp
+++ b/src/devices/video/scn2674.cpp
@@ -25,7 +25,8 @@ DEFINE_DEVICE_TYPE(SCN2674, scn2674_device, "scn2674", "Signetics SCN2674 AVDC")
// default address map
void scn2674_device::scn2674_vram(address_map &map)
{
- map(0x0000, (1 << space_config(0)->addr_width()) - 1).noprw();
+ if (!has_configured_map(0))
+ map(0x0000, (1 << space_config(0)->addr_width()) - 1).noprw();
}
scn2672_device::scn2672_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
@@ -89,8 +90,8 @@ scn2674_device::scn2674_device(const machine_config &mconfig, device_type type,
, m_breq_timer(nullptr)
, m_vblank_timer(nullptr)
, m_char_space(nullptr), m_attr_space(nullptr)
- , m_char_space_config("charram", ENDIANNESS_LITTLE, 8, extend_addressing ? 16 : 14, 0, address_map_constructor(), address_map_constructor(FUNC(scn2674_device::scn2674_vram), this))
- , m_attr_space_config("attrram", ENDIANNESS_LITTLE, 8, extend_addressing ? 16 : 14, 0, address_map_constructor(), address_map_constructor(FUNC(scn2674_device::scn2674_vram), this))
+ , m_char_space_config("charram", ENDIANNESS_LITTLE, 8, extend_addressing ? 16 : 14, 0, address_map_constructor(FUNC(scn2674_device::scn2674_vram), this))
+ , m_attr_space_config("attrram", ENDIANNESS_LITTLE, 8, extend_addressing ? 16 : 14, 0)
{
}
diff --git a/src/devices/video/sed1330.cpp b/src/devices/video/sed1330.cpp
index 5015bb0d43b..75eefb18c9d 100644
--- a/src/devices/video/sed1330.cpp
+++ b/src/devices/video/sed1330.cpp
@@ -68,7 +68,8 @@ DEFINE_DEVICE_TYPE(SED1330, sed1330_device, "sed1330", "Epson SED1330")
// default address map
void sed1330_device::sed1330(address_map &map)
{
- map(0x0000, 0xffff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0xffff).ram();
}
@@ -145,7 +146,7 @@ sed1330_device::sed1330_device(const machine_config &mconfig, const char *tag, d
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
m_bf(0),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(), address_map_constructor(FUNC(sed1330_device::sed1330), this))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 16, 0, address_map_constructor(FUNC(sed1330_device::sed1330), this))
{
}
diff --git a/src/devices/video/tms3556.cpp b/src/devices/video/tms3556.cpp
index c856735756f..80280fe5364 100644
--- a/src/devices/video/tms3556.cpp
+++ b/src/devices/video/tms3556.cpp
@@ -59,7 +59,8 @@ DEFINE_DEVICE_TYPE(TMS3556, tms3556_device, "tms3556", "Texas Instruments TMS355
// default address map
void tms3556_device::tms3556(address_map &map)
{
- map(0x0000, 0xffff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0xffff).ram();
}
//-------------------------------------------------
@@ -111,7 +112,7 @@ tms3556_device::tms3556_device(const machine_config &mconfig, const char *tag, d
: device_t(mconfig, TMS3556, tag, owner, clock),
device_memory_interface(mconfig, *this),
device_video_interface(mconfig, *this),
- m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(tms3556_device::tms3556), this)),
+ m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(FUNC(tms3556_device::tms3556), this)),
m_reg(0), m_reg2(0),
m_reg_access_phase(0),
m_row_col_written(0),
diff --git a/src/devices/video/tms9928a.cpp b/src/devices/video/tms9928a.cpp
index bc31b1b1db9..265cc3bb9c6 100644
--- a/src/devices/video/tms9928a.cpp
+++ b/src/devices/video/tms9928a.cpp
@@ -52,8 +52,8 @@ DEFINE_DEVICE_TYPE(EFO90501, efo90501_device, "efo90501", "EFO90501 VDP")
*/
void tms9928a_device::memmap(address_map &map)
{
- map.global_mask(0x3fff);
- map(0x0000, 0x3fff).ram();
+ if (!has_configured_map(0))
+ map(0x0000, 0x3fff).ram();
}
tms9928a_device::tms9928a_device(const machine_config &mconfig, device_type type, const char *tag, device_t *owner, uint32_t clock, bool is_50hz, bool is_reva, bool is_99)
@@ -67,7 +67,7 @@ tms9928a_device::tms9928a_device(const machine_config &mconfig, device_type type
, m_50hz(is_50hz)
, m_reva(is_reva)
, m_99(is_99)
- , m_space_config("vram", ENDIANNESS_BIG, 8, 14, 0, address_map_constructor(), address_map_constructor(FUNC(tms9928a_device::memmap), this))
+ , m_space_config("vram", ENDIANNESS_BIG, 8, 14, 0, address_map_constructor(FUNC(tms9928a_device::memmap), this))
{
}
diff --git a/src/devices/video/upd7220.cpp b/src/devices/video/upd7220.cpp
index 16bbc507a5a..75cc9daa01b 100644
--- a/src/devices/video/upd7220.cpp
+++ b/src/devices/video/upd7220.cpp
@@ -151,7 +151,8 @@ DEFINE_DEVICE_TYPE(UPD7220, upd7220_device, "upd7220", "NEC uPD7220")
// default address map
void upd7220_device::upd7220_vram(address_map &map)
{
- map(0x00000, 0x3ffff).ram();
+ if (!has_configured_map(0))
+ map(0x00000, 0x3ffff).ram();
}
@@ -649,7 +650,7 @@ upd7220_device::upd7220_device(const machine_config &mconfig, const char *tag, d
m_disp(0),
m_gchr(0),
m_bitmap_mod(0),
- m_space_config("videoram", ENDIANNESS_LITTLE, 16, 18, 0, address_map_constructor(), address_map_constructor(FUNC(upd7220_device::upd7220_vram), this))
+ m_space_config("videoram", ENDIANNESS_LITTLE, 16, 18, 0, address_map_constructor(FUNC(upd7220_device::upd7220_vram), this))
{
for (int i = 0; i < 16; i++)
{
diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp
index 06410945815..0a2e7a15c98 100644
--- a/src/emu/addrmap.cpp
+++ b/src/emu/addrmap.cpp
@@ -759,12 +759,6 @@ address_map::address_map(device_t &device, int spacenum)
memintf->get_addrmap(spacenum)(*this);
m_device = &device;
}
- else
- {
- // if the owner didn't provide a map, use the default device map
- if (!spaceconfig->m_default_map.isnull())
- spaceconfig->m_default_map(*this);
- }
// construct the internal device map (last so it takes priority)
if (!spaceconfig->m_internal_map.isnull())
diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp
index 80aaaf32c42..e49a0f626b2 100644
--- a/src/emu/emumem.cpp
+++ b/src/emu/emumem.cpp
@@ -962,8 +962,7 @@ address_space_config::address_space_config()
m_logaddr_width(0),
m_page_shift(0),
m_is_octal(false),
- m_internal_map(address_map_constructor()),
- m_default_map(address_map_constructor())
+ m_internal_map(address_map_constructor())
{
}
@@ -974,9 +973,8 @@ address_space_config::address_space_config()
@param addrwidth address bits
@param addrshift
@param internal
- @param defmap
*/
-address_space_config::address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift, address_map_constructor internal, address_map_constructor defmap)
+address_space_config::address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift, address_map_constructor internal)
: m_name(name),
m_endianness(endian),
m_data_width(datawidth),
@@ -985,12 +983,11 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_logaddr_width(addrwidth),
m_page_shift(0),
m_is_octal(false),
- m_internal_map(internal),
- m_default_map(defmap)
+ m_internal_map(internal)
{
}
-address_space_config::address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift, u8 logwidth, u8 pageshift, address_map_constructor internal, address_map_constructor defmap)
+address_space_config::address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift, u8 logwidth, u8 pageshift, address_map_constructor internal)
: m_name(name),
m_endianness(endian),
m_data_width(datawidth),
@@ -999,8 +996,7 @@ address_space_config::address_space_config(const char *name, endianness_t endian
m_logaddr_width(logwidth),
m_page_shift(pageshift),
m_is_octal(false),
- m_internal_map(internal),
- m_default_map(defmap)
+ m_internal_map(internal)
{
}
diff --git a/src/emu/emumem.h b/src/emu/emumem.h
index 4521b8335a6..0bd3de898ca 100644
--- a/src/emu/emumem.h
+++ b/src/emu/emumem.h
@@ -1137,8 +1137,8 @@ class address_space_config
public:
// construction/destruction
address_space_config();
- address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift = 0, address_map_constructor internal = address_map_constructor(), address_map_constructor defmap = address_map_constructor());
- address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift, u8 logwidth, u8 pageshift, address_map_constructor internal = address_map_constructor(), address_map_constructor defmap = address_map_constructor());
+ address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift = 0, address_map_constructor internal = address_map_constructor());
+ address_space_config(const char *name, endianness_t endian, u8 datawidth, u8 addrwidth, s8 addrshift, u8 logwidth, u8 pageshift, address_map_constructor internal = address_map_constructor());
// getters
const char *name() const { return m_name; }
@@ -1172,7 +1172,6 @@ public:
bool m_is_octal; // to determine if messages/debugger will show octal or hex
address_map_constructor m_internal_map;
- address_map_constructor m_default_map;
};
diff --git a/src/emu/machine.cpp b/src/emu/machine.cpp
index 904644e104f..72bdf764ee5 100644
--- a/src/emu/machine.cpp
+++ b/src/emu/machine.cpp
@@ -1329,7 +1329,7 @@ DEFINE_DEVICE_TYPE(DUMMY_SPACE, dummy_space_device, "dummy_space", "Dummy Space"
dummy_space_device::dummy_space_device(const machine_config &mconfig, const char *tag, device_t *owner, u32 clock) :
device_t(mconfig, DUMMY_SPACE, tag, owner, clock),
device_memory_interface(mconfig, *this),
- m_space_config("dummy", ENDIANNESS_LITTLE, 8, 32, 0, address_map_constructor(), address_map_constructor(FUNC(dummy_space_device::dummy), this))
+ m_space_config("dummy", ENDIANNESS_LITTLE, 8, 32, 0, address_map_constructor(FUNC(dummy_space_device::dummy), this))
{
}
diff --git a/src/mame/machine/nb1412m2.cpp b/src/mame/machine/nb1412m2.cpp
index 9370a32f54f..f0216b886ff 100644
--- a/src/mame/machine/nb1412m2.cpp
+++ b/src/mame/machine/nb1412m2.cpp
@@ -126,7 +126,7 @@ void nb1412m2_device::nb1412m2_map(address_map &map)
nb1412m2_device::nb1412m2_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
: device_t(mconfig, NB1412M2, tag, owner, clock)
, device_memory_interface(mconfig, *this)
- , m_space_config("regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(), address_map_constructor(FUNC(nb1412m2_device::nb1412m2_map), this))
+ , m_space_config("regs", ENDIANNESS_LITTLE, 8, 8, 0, address_map_constructor(FUNC(nb1412m2_device::nb1412m2_map), this))
, m_data(*this, DEVICE_SELF)
, m_dac_cb(*this)
{
diff --git a/src/mame/machine/seicopbl.cpp b/src/mame/machine/seicopbl.cpp
index b6db3793117..b36f8130c90 100644
--- a/src/mame/machine/seicopbl.cpp
+++ b/src/mame/machine/seicopbl.cpp
@@ -407,7 +407,7 @@ seibu_cop_bootleg_device::seibu_cop_bootleg_device(const machine_config &mconfig
: device_t(mconfig, SEIBU_COP_BOOTLEG, tag, owner, clock),
device_memory_interface(mconfig, *this),
m_host_cpu(*this, finder_base::DUMMY_TAG),
- m_space_config("regs", ENDIANNESS_BIG, 16, 9, 0, address_map_constructor(), address_map_constructor(FUNC(seibu_cop_bootleg_device::seibucopbl_map), this))
+ m_space_config("regs", ENDIANNESS_BIG, 16, 9, 0, address_map_constructor(FUNC(seibu_cop_bootleg_device::seibucopbl_map), this))
{
}
diff --git a/src/mame/video/seibu_crtc.cpp b/src/mame/video/seibu_crtc.cpp
index 9abc3453b0a..059fdff517b 100644
--- a/src/mame/video/seibu_crtc.cpp
+++ b/src/mame/video/seibu_crtc.cpp
@@ -279,7 +279,7 @@ seibu_crtc_device::seibu_crtc_device(const machine_config &mconfig, const char *
m_layer_scroll_cb(*this),
m_reg_1a_cb(*this),
m_layer_scroll_base_cb(*this),
- m_space_config("vregs", ENDIANNESS_LITTLE, 16, 7, 0, address_map_constructor(), address_map_constructor(FUNC(seibu_crtc_device::seibu_crtc_vregs), this))
+ m_space_config("vregs", ENDIANNESS_LITTLE, 16, 7, 0, address_map_constructor(FUNC(seibu_crtc_device::seibu_crtc_vregs), this))
{
}
diff --git a/src/mame/video/zx8301.cpp b/src/mame/video/zx8301.cpp
index 213327afb3a..dd07316ef4b 100644
--- a/src/mame/video/zx8301.cpp
+++ b/src/mame/video/zx8301.cpp
@@ -58,7 +58,8 @@ DEFINE_DEVICE_TYPE(ZX8301, zx8301_device, "zx8301", "Sinclair ZX8301")
// default address map
void zx8301_device::zx8301(address_map &map)
{
- map(0x00000, 0x1ffff).ram();
+ if (!has_configured_map(0))
+ map(0x00000, 0x1ffff).ram();
}
@@ -113,7 +114,7 @@ zx8301_device::zx8301_device(const machine_config &mconfig, const char *tag, dev
: device_t(mconfig, ZX8301, tag, owner, clock)
, device_memory_interface(mconfig, *this)
, device_video_interface(mconfig, *this)
- , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(), address_map_constructor(FUNC(zx8301_device::zx8301), this))
+ , m_space_config("videoram", ENDIANNESS_LITTLE, 8, 17, 0, address_map_constructor(FUNC(zx8301_device::zx8301), this))
, m_cpu(*this, finder_base::DUMMY_TAG)
, m_write_vsync(*this)
, m_dispoff(1)