comparison romdb.c @ 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 ebf124803a93
children 42c12d141f6e
comparison
equal deleted inserted replaced
1915:53faef14cbdb 1916:6ece1e2c7a15
382 info->map[1].read_16 = (read_16_fun)read_sram_w;//these will only be called when mem_pointers[2] == NULL 382 info->map[1].read_16 = (read_16_fun)read_sram_w;//these will only be called when mem_pointers[2] == NULL
383 info->map[1].read_8 = (read_8_fun)read_sram_b; 383 info->map[1].read_8 = (read_8_fun)read_sram_b;
384 info->map[1].write_16 = (write_16_fun)write_sram_area_w;//these will be called all writes to the area 384 info->map[1].write_16 = (write_16_fun)write_sram_area_w;//these will be called all writes to the area
385 info->map[1].write_8 = (write_8_fun)write_sram_area_b; 385 info->map[1].write_8 = (write_8_fun)write_sram_area_b;
386 info->map[1].buffer = rom + 0x200000; 386 info->map[1].buffer = rom + 0x200000;
387 387
388 //Last entry in the base map is a catch all one that needs to be
389 //after all the other entries
390 memmap_chunk *unused = info->map + info->map_chunks - 2;
388 memmap_chunk *last = info->map + info->map_chunks - 1; 391 memmap_chunk *last = info->map + info->map_chunks - 1;
392 *last = *unused;
393 last = unused;
389 memset(last, 0, sizeof(memmap_chunk)); 394 memset(last, 0, sizeof(memmap_chunk));
390 last->start = 0xA13000; 395 last->start = 0xA13000;
391 last->end = 0xA13100; 396 last->end = 0xA13100;
392 last->mask = 0xFF; 397 last->mask = 0xFF;
393 last->write_16 = (write_16_fun)write_bank_reg_w; 398 last->write_16 = (write_16_fun)write_bank_reg_w;