diff options
author | Michael Pavone <pavone@retrodev.com> | 2017-03-14 00:06:19 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2017-03-14 00:06:19 -0700 |
commit | 926bcf6bcb4b661a78e0a30fc087bb409be7228e (patch) | |
tree | 4543514a6ed2c24894a5a27913be7d15acda6b6c /romdb.c | |
parent | 53d50fb4e789fc0c318292dfe699505681cb148b (diff) |
Fix heuristic detection of SRAM for 3MB ROMs with SRAM at the 3MB mark
Diffstat (limited to 'romdb.c')
-rw-r--r-- | romdb.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -529,6 +529,9 @@ void add_memmap_header(rom_info *info, uint8_t *rom, uint32_t size, memmap_chunk if (ram_start >= rom_end) { info->map[0].end = rom_end < 0x400000 ? nearest_pow2(rom_end) - 1 : 0xFFFFFF; + if (info->map[0].end > ram_start) { + info->map[0].end = ram_start; + } //TODO: ROM mirroring info->map[0].mask = 0xFFFFFF; info->map[0].flags = MMAP_READ; |