]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Generic 680x0 cores should also have (dummy) 68030 MMU instructions.
authorToni Wilen <twilen@winuae.net>
Sat, 30 Apr 2016 13:54:37 +0000 (16:54 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 30 Apr 2016 13:54:37 +0000 (16:54 +0300)
gencpu.cpp

index 23007803f9dd56b38f1b58702b0973d98c4594d3..541836c2ce34a9981d1c487c628de06caf0792d0 100644 (file)
@@ -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++)