Mercurial > repos > blastem
comparison romdb.c @ 1281:34113230fd88
Fix heuristic detection of SRAM for 3MB ROMs with SRAM at the 3MB mark
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 14 Mar 2017 00:06:19 -0700 |
parents | 23c94f5266d1 |
children | 65f03a0a426a |
comparison
equal
deleted
inserted
replaced
1280:6a6cc3b3949b | 1281:34113230fd88 |
---|---|
527 memset(info->map, 0, sizeof(memmap_chunk)*2); | 527 memset(info->map, 0, sizeof(memmap_chunk)*2); |
528 memcpy(info->map+2, base_map, sizeof(memmap_chunk) * base_chunks); | 528 memcpy(info->map+2, base_map, sizeof(memmap_chunk) * base_chunks); |
529 | 529 |
530 if (ram_start >= rom_end) { | 530 if (ram_start >= rom_end) { |
531 info->map[0].end = rom_end < 0x400000 ? nearest_pow2(rom_end) - 1 : 0xFFFFFF; | 531 info->map[0].end = rom_end < 0x400000 ? nearest_pow2(rom_end) - 1 : 0xFFFFFF; |
532 if (info->map[0].end > ram_start) { | |
533 info->map[0].end = ram_start; | |
534 } | |
532 //TODO: ROM mirroring | 535 //TODO: ROM mirroring |
533 info->map[0].mask = 0xFFFFFF; | 536 info->map[0].mask = 0xFFFFFF; |
534 info->map[0].flags = MMAP_READ; | 537 info->map[0].flags = MMAP_READ; |
535 info->map[0].buffer = rom; | 538 info->map[0].buffer = rom; |
536 | 539 |