comparison m68k_core_x86.c @ 1084:193db42e702b

Remove hacky assumption about Genesis memory map in M68K core
author Michael Pavone <pavone@retrodev.com>
date Thu, 06 Oct 2016 21:11:58 -0700
parents 2ec5e6eaf81d
children faa3a4617f62
comparison
equal deleted inserted replaced
1083:f6e998227300 1084:193db42e702b
2265 2265
2266 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context) 2266 m68k_context * m68k_handle_code_write(uint32_t address, m68k_context * context)
2267 { 2267 {
2268 m68k_options * options = context->options; 2268 m68k_options * options = context->options;
2269 //TODO: Modify gen_mem_fun so that it passes the raw address instead of the masked one, then remove the OR below 2269 //TODO: Modify gen_mem_fun so that it passes the raw address instead of the masked one, then remove the OR below
2270 uint32_t inst_start = get_instruction_start(options, context->native_code_map, address | 0xE00000); 2270 uint32_t inst_start = get_instruction_start(options, context->native_code_map, address);
2271 if (inst_start) { 2271 if (inst_start) {
2272 code_info *code = &options->gen.code; 2272 code_info *code = &options->gen.code;
2273 code_ptr dst = get_native_address(context->options, inst_start); 2273 code_ptr dst = get_native_address(context->options, inst_start);
2274 code_info orig = {dst, dst + 128, 0}; 2274 code_info orig = {dst, dst + 128, 0};
2275 mov_ir(&orig, inst_start, options->gen.scratch2, SZ_D); 2275 mov_ir(&orig, inst_start, options->gen.scratch2, SZ_D);