From 3a3520e916aca63457dd668fdb696884254cf62f Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Thu, 9 Mar 2017 06:26:08 -0500 Subject: Adds a new addrmap.cpp validation intended to catch AM_REGION declarations not tied to anything meaningful --- src/emu/addrmap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/emu/addrmap.cpp b/src/emu/addrmap.cpp index 31fabbea1a5..5b12f139026 100644 --- a/src/emu/addrmap.cpp +++ b/src/emu/addrmap.cpp @@ -665,6 +665,10 @@ void address_map::map_validity_check(validity_checker &valid, address_spacenum s // if this entry references a memory region, validate it if (entry.m_region != nullptr && entry.m_share == nullptr) { + // address map entries that reference regions but are NOPs are pointless + if (entry.m_read.m_type == AMH_NONE && entry.m_write.m_type == AMH_NONE) + osd_printf_error("%s space references memory region %s, but is AM_NOP\n", spaceconfig.m_name, entry.m_region); + // make sure we can resolve the full path to the region bool found = false; std::string entry_region = entry.m_devbase.subtag(entry.m_region); -- cgit v1.2.3