# HG changeset patch # User Michael Pavone # Date 1644648901 28800 # Node ID 522d04e2adcd940db9be1e86ef678e61196092a6 # Parent f3fb7e2c727a4ab303017b71c5c59fde64ff8b29 Fix regression in booting games with Japanese Mega CD BIOS diff -r f3fb7e2c727a -r 522d04e2adcd m68k_core_x86.c --- a/m68k_core_x86.c Fri Feb 11 22:31:40 2022 -0800 +++ b/m68k_core_x86.c Fri Feb 11 22:55:01 2022 -0800 @@ -2507,7 +2507,11 @@ { m68k_options *opts = context->options; native_map_slot *native_code_map = opts->gen.native_code_map; - start -= M68K_MAX_INST_SIZE - 2; + if (start > M68K_MAX_INST_SIZE - 2) { + start -= M68K_MAX_INST_SIZE - 2; + } else { + start = 0; + } memmap_chunk const *mem_chunk = find_map_chunk(start, &opts->gen, 0, NULL); if (mem_chunk) { //calculate the lowest alias for this address