Mercurial > repos > blastem
changeset 1916:6ece1e2c7a15
Make sure fallback memory region is always last
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 02 Apr 2020 20:41:26 -0700 |
parents | 53faef14cbdb |
children | b91c35bce3e9 |
files | romdb.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;