]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Always allocate 32-bit address debug memwatch point table, even if CPU is 24-bit...
authorToni Wilen <twilen@winuae.net>
Sun, 9 Feb 2020 12:12:50 +0000 (14:12 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 9 Feb 2020 12:12:50 +0000 (14:12 +0200)
custom.cpp
debug.cpp

index 00431de9191c3c47e5c09c4711c75e5f249f39c1..07c27b792ff89503952f7ca371ab1bbaa905099d 100644 (file)
@@ -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();
index 4f60cbd926cde6efa8d0c6da20445f9cf8d9ce6f..f0ef24129f6540c50c89fbce190ebf090c3975cf 100644 (file)
--- 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++) {