From: Toni Wilen Date: Sun, 9 Feb 2020 12:12:50 +0000 (+0200) Subject: Always allocate 32-bit address debug memwatch point table, even if CPU is 24-bit... X-Git-Tag: 4400~134 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=7cde4500d605674b3357e2f2abc5d2e0603d0c63;p=francis%2Fwinuae.git Always allocate 32-bit address debug memwatch point table, even if CPU is 24-bit only. --- diff --git a/custom.cpp b/custom.cpp index 00431de9..07c27b79 100644 --- a/custom.cpp +++ b/custom.cpp @@ -11845,7 +11845,6 @@ void do_cycles_ce020 (unsigned long cycles) bool is_cycle_ce(uaecptr addr) { - addr &= currprefs.address_space_24 ? 0x00ffffff : 0xffffffff; addrbank *ab = get_mem_bank_real(addr); if (!ab || (ab->flags & ABFLAG_CHIPRAM) || ab == &custom_bank) { int hpos = current_hpos(); diff --git a/debug.cpp b/debug.cpp index 4f60cbd9..f0ef2412 100644 --- a/debug.cpp +++ b/debug.cpp @@ -3485,7 +3485,14 @@ static void initialize_memwatch (int mode) { membank_total = currprefs.address_space_24 ? 256 : 65536; deinitialize_memwatch (); - debug_mem_banks = xcalloc (addrbank*, membank_total); + debug_mem_banks = xcalloc (addrbank*, 65536); + if (!debug_mem_banks) + return; + if (membank_total < 65536) { + for (int i = 256; i < 65536; i++) { + debug_mem_banks[i] = &dummy_bank; + } + } debug_mem_area = xcalloc (addrbank, membank_total); membank_stores = xcalloc (struct membank_store, MEMWATCH_STORE_SLOTS); for (int i = 0; i < MEMWATCH_TOTAL; i++) {