# HG changeset patch # User Michael Pavone # Date 1585885286 25200 # Node ID 6ece1e2c7a15852a7f18701a4b57788a0bccc18d # Parent 53faef14cbdb2b85d3b0aa56b731f602ef86d5e0 Make sure fallback memory region is always last diff -r 53faef14cbdb -r 6ece1e2c7a15 romdb.c --- a/romdb.c Thu Apr 02 20:32:09 2020 -0700 +++ b/romdb.c Thu Apr 02 20:41:26 2020 -0700 @@ -384,8 +384,13 @@ info->map[1].write_16 = (write_16_fun)write_sram_area_w;//these will be called all writes to the area info->map[1].write_8 = (write_8_fun)write_sram_area_b; info->map[1].buffer = rom + 0x200000; - + + //Last entry in the base map is a catch all one that needs to be + //after all the other entries + memmap_chunk *unused = info->map + info->map_chunks - 2; memmap_chunk *last = info->map + info->map_chunks - 1; + *last = *unused; + last = unused; memset(last, 0, sizeof(memmap_chunk)); last->start = 0xA13000; last->end = 0xA13100;