From f936ba058db3c2f184b0f36daeec78b21f13a001 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Thu, 9 Jul 2020 09:53:26 +0300 Subject: [PATCH] Always save and restore exception vectors if 68000 and no low test memory enabled. --- cputest/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cputest/main.c b/cputest/main.c index 853d8c6b..b19d83c5 100644 --- a/cputest/main.c +++ b/cputest/main.c @@ -410,7 +410,7 @@ static void start_test(void) safe_memcpy(low_memory_back + low_memory_offset, low_memory + low_memory_offset, low_memory_size - low_memory_offset); // always copy exception vectors if 68000 - if (cpu_lvl == 0 && low_memory_offset > 0x08) + if (cpu_lvl == 0 && (low_memory_offset > 0x08 || test_low_memory_start == 0xffffffff)) safe_memcpy(low_memory_back + 8, low_memory + 8, (192 - 2) * 4); if (!hmem_rom && test_high_memory_start != 0xffffffff) @@ -484,7 +484,7 @@ static void end_test(void) if (test_low_memory_start != 0xffffffff) safe_memcpy(low_memory + low_memory_offset, low_memory_back + low_memory_offset, low_memory_size - low_memory_offset); - if (cpu_lvl == 0 && low_memory_offset > 0x08) + if (cpu_lvl == 0 && (low_memory_offset > 0x08 || test_low_memory_start == 0xffffffff)) safe_memcpy(low_memory + 8, low_memory_back + 8, (192 - 2) * 4); if (!hmem_rom && test_high_memory_start != 0xffffffff) -- 2.47.3