Mercurial > repos > blastem
comparison romdb.c @ 1091:9a74eb24e53c
Fix segfault in certain games that have SRAM and ROM bankswitched at the same address
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 16 Oct 2016 21:58:29 -0700 |
parents | 219de1d64aa1 |
children | 22e87b739ad6 |
comparison
equal
deleted
inserted
replaced
1090:a68274a25e2f | 1091:9a74eb24e53c |
---|---|
541 info->map[1].ptr_index = info->mapper_start_index = 0; | 541 info->map[1].ptr_index = info->mapper_start_index = 0; |
542 info->map[1].read_16 = (read_16_fun)read_sram_w;//these will only be called when mem_pointers[2] == NULL | 542 info->map[1].read_16 = (read_16_fun)read_sram_w;//these will only be called when mem_pointers[2] == NULL |
543 info->map[1].read_8 = (read_8_fun)read_sram_b; | 543 info->map[1].read_8 = (read_8_fun)read_sram_b; |
544 info->map[1].write_16 = (write_16_fun)write_sram_area_w;//these will be called all writes to the area | 544 info->map[1].write_16 = (write_16_fun)write_sram_area_w;//these will be called all writes to the area |
545 info->map[1].write_8 = (write_8_fun)write_sram_area_b; | 545 info->map[1].write_8 = (write_8_fun)write_sram_area_b; |
546 info->map[1].buffer = cart + 0x200000; | 546 info->map[1].buffer = cart + 0x200000 / sizeof(uint16_t); |
547 | 547 |
548 memmap_chunk *last = info->map + info->map_chunks - 1; | 548 memmap_chunk *last = info->map + info->map_chunks - 1; |
549 memset(last, 0, sizeof(memmap_chunk)); | 549 memset(last, 0, sizeof(memmap_chunk)); |
550 last->start = 0xA13000; | 550 last->start = 0xA13000; |
551 last->end = 0xA13100; | 551 last->end = 0xA13100; |