diff options
author | Nigel Barnes <Pernod70@users.noreply.github.com> | 2019-04-22 17:34:03 +0100 |
---|---|---|
committer | Nigel Barnes <Pernod70@users.noreply.github.com> | 2019-04-22 17:34:03 +0100 |
commit | c1f9701a39384745b071df3a4087088788052b01 (patch) | |
tree | 52e1123a39d477fc2030bac3cdcc50be273ec36f | |
parent | 95a30976caa80c86cc241dbb4b9a0ec8f8544c0a (diff) |
sam6883: Mirror 32K RAM in 64K mode, prevents segfault when Dunjunz checks for 32/64K.
-rw-r--r-- | src/mame/machine/6883sam.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mame/machine/6883sam.cpp b/src/mame/machine/6883sam.cpp index 3f455fc3954..6c525eaea72 100644 --- a/src/mame/machine/6883sam.cpp +++ b/src/mame/machine/6883sam.cpp @@ -270,9 +270,9 @@ void sam6883_device::update_memory(void) { // full 64k RAM m_space_0000.point(m_banks[0], 0x0000, m_banks[0].m_memory_size); - m_space_8000.point(m_banks[0], 0x8000); - m_space_A000.point(m_banks[0], 0xA000); - m_space_C000.point(m_banks[0], 0xC000); + m_space_8000.point(m_banks[0], 0x8000 & (m_banks[0].m_memory_size - 1)); + m_space_A000.point(m_banks[0], 0xA000 & (m_banks[0].m_memory_size - 1)); + m_space_C000.point(m_banks[0], 0xC000 & (m_banks[0].m_memory_size - 1)); m_counter_mask = 0xFFFF; setup_rom = false; } |