comparison m68k_core.c @ 2151:01ad74197414

Fix regression in Sonic & Knuckles
author Michael Pavone <pavone@retrodev.com>
date Wed, 30 Mar 2022 23:20:45 -0700
parents 8554751f17b5
children 3247bec692a4
comparison
equal deleted inserted replaced
2150:a418fa599b2e 2151:01ad74197414
1033 if (existing) { 1033 if (existing) {
1034 jmp(code, existing); 1034 jmp(code, existing);
1035 break; 1035 break;
1036 } 1036 }
1037 memmap_chunk const *chunk = find_map_chunk(address, &opts->gen, 0, NULL); 1037 memmap_chunk const *chunk = find_map_chunk(address, &opts->gen, 0, NULL);
1038 if (!(chunk->flags & MMAP_READ)) {
1039 code_ptr start = code->cur;
1040 defer_translation(&opts->gen, address, opts->retrans_stub);
1041 code_ptr after = code->cur;
1042 map_native_address(context, address, start, 2, after-start);
1043 break;
1044 }
1038 if (!starting_chunk) { 1045 if (!starting_chunk) {
1039 starting_chunk = chunk; 1046 starting_chunk = chunk;
1040 } else if (starting_chunk != chunk) { 1047 } else if (starting_chunk != chunk) {
1041 if (chunk->flags & MMAP_CODE) { 1048 if (chunk->flags & MMAP_CODE) {
1042 code_ptr start = code->cur; 1049 code_ptr start = code->cur;