From 0c889afe31fe104cb13708d87dd1020828ce1542 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 30 Apr 2016 16:54:37 +0300 Subject: [PATCH] Generic 680x0 cores should also have (dummy) 68030 MMU instructions. --- gencpu.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gencpu.cpp b/gencpu.cpp index 23007803..541836c2 100644 --- a/gencpu.cpp +++ b/gencpu.cpp @@ -39,7 +39,7 @@ static int using_ce; static int using_tracer; static int using_waitstates; static int using_simple_cycles; -static int cpu_level; +static int cpu_level, cpu_generic; static int count_read, count_write, count_cycles, count_ncycles; static int count_cycles_ce020; static int count_read_ea, count_write_ea, count_cycles_ea; @@ -3038,7 +3038,7 @@ static void gen_opcode (unsigned int opcode) // do not unnecessarily create useless mmuop030 // functions when CPU is not 68030 - if (curi->mnemo == i_MMUOP030 && cpu_level != 3) { + if (curi->mnemo == i_MMUOP030 && cpu_level != 3 && !cpu_generic) { printf("\top_illg (opcode);\n"); did_prefetch = -1; goto end; @@ -5798,6 +5798,7 @@ static void generate_cpu (int id, int mode) mmu_postfix = ""; using_simple_cycles = 0; using_indirect = 0; + cpu_generic = false; if (id == 11 || id == 12) { // 11 = 68010 prefetch, 12 = 68000 prefetch cpu_level = id == 11 ? 1 : 0; @@ -5884,8 +5885,10 @@ static void generate_cpu (int id, int mode) opcode_next_clev[rp] = cpu_level; } else if (id < 6) { cpu_level = 5 - (id - 0); // "generic" + cpu_generic = true; } else if (id >= 40 && id < 46) { cpu_level = 5 - (id - 40); // "generic" + direct + cpu_generic = true; if (id == 40) { read_counts(); for (rp = 0; rp < nr_cpuop_funcs; rp++) @@ -5894,6 +5897,7 @@ static void generate_cpu (int id, int mode) using_indirect = -1; } else if (id >= 50 && id < 56) { cpu_level = 5 - (id - 50); // "generic" + indirect + cpu_generic = true; if (id == 50) { read_counts(); for (rp = 0; rp < nr_cpuop_funcs; rp++) -- 2.47.3