comparison multi_game.c @ 2499:d74d3998482c

Make some progress on compiling full emulator with new 68K core
author Michael Pavone <pavone@retrodev.com>
date Tue, 30 Apr 2024 00:02:14 -0700
parents adb62000d296
children
comparison
equal deleted inserted replaced
2498:dffda054d218 2499:d74d3998482c
5 m68k_context *context = vcontext; 5 m68k_context *context = vcontext;
6 genesis_context *gen = context->system; 6 genesis_context *gen = context->system;
7 gen->bank_regs[0] = address; 7 gen->bank_regs[0] = address;
8 uint32_t base = (address & 0x3F) << 16, start = 0, end = 0x400000; 8 uint32_t base = (address & 0x3F) << 16, start = 0, end = 0x400000;
9 //find the memmap chunk, so we can properly mask the base value 9 //find the memmap chunk, so we can properly mask the base value
10 for (int i = 0; i < context->options->gen.memmap_chunks; i++) 10 for (int i = 0; i < context->opts->gen.memmap_chunks; i++)
11 { 11 {
12 if (context->options->gen.memmap[i].flags & MMAP_PTR_IDX) { 12 if (context->opts->gen.memmap[i].flags & MMAP_PTR_IDX) {
13 base &= context->options->gen.memmap[i].mask; 13 base &= context->opts->gen.memmap[i].mask;
14 start = context->options->gen.memmap[i].start; 14 start = context->opts->gen.memmap[i].start;
15 end = context->options->gen.memmap[i].end; 15 end = context->opts->gen.memmap[i].end;
16 break; 16 break;
17 } 17 }
18 } 18 }
19 context->mem_pointers[gen->mapper_start_index] = gen->cart + base/2; 19 context->mem_pointers[gen->mapper_start_index] = gen->cart + base/2;
20 m68k_invalidate_code_range(context, start, end); 20 m68k_invalidate_code_range(context, start, end);