From a9e6f19320a9f0c8489c6001b23a72ab232b23a0 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Thu, 20 Dec 2018 20:25:33 +0100 Subject: emumem: remove m_baseptr, may fix the save state issues [O. Galibert] --- src/emu/emumem.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/emu/emumem.cpp') diff --git a/src/emu/emumem.cpp b/src/emu/emumem.cpp index 3fde5702fd1..80aaaf32c42 100644 --- a/src/emu/emumem.cpp +++ b/src/emu/emumem.cpp @@ -2739,7 +2739,6 @@ memory_block::~memory_block() memory_bank::memory_bank(address_space &space, int index, offs_t addrstart, offs_t addrend, const char *tag) : m_machine(space.m_manager.machine()), - m_baseptr(nullptr), m_anonymous(tag == nullptr), m_addrstart(addrstart), m_addrend(addrend), @@ -2815,7 +2814,7 @@ void memory_bank::set_base(void *base) m_entries.resize(1); m_curentry = 0; } - m_baseptr = m_entries[m_curentry] = reinterpret_cast(base); + m_entries[m_curentry] = reinterpret_cast(base); for(auto cb : m_alloc_notifier) cb(base); m_alloc_notifier.clear(); @@ -2846,7 +2845,6 @@ void memory_bank::set_entry(int entrynum) throw emu_fatalerror("memory_bank::set_entry called for bank '%s' with invalid bank entry %d", m_tag.c_str(), entrynum); m_curentry = entrynum; - m_baseptr = m_entries[entrynum]; } @@ -2866,10 +2864,6 @@ void memory_bank::configure_entry(int entrynum, void *base) // set the entry m_entries[entrynum] = reinterpret_cast(base); - - // if the bank base is not configured, and we're the first entry, set us up - if (!m_baseptr && !entrynum) - m_baseptr = m_entries[0]; } @@ -2885,8 +2879,6 @@ void memory_bank::configure_entries(int startentry, int numentries, void *base, // fill in the requested bank entries for (int entrynum = 0; entrynum < numentries; entrynum ++) m_entries[entrynum + startentry] = reinterpret_cast(base) + entrynum * stride ; - if(!m_baseptr && !startentry) - m_baseptr = reinterpret_cast(base); } -- cgit v1.2.3