]> git.sesse.net Git - pistorm/blobdiff - m68k_in.c
removed most traces of direct access to the m68ki_cpu global variable
[pistorm] / m68k_in.c
index d0d50d7bc407578d882649b83d2fb77f42e7681a..f8acc6014dd591eeb8adf7b09c54e17fe37828aa 100644 (file)
--- a/m68k_in.c
+++ b/m68k_in.c
@@ -6931,7 +6931,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x003:                             /* TC */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_tc;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_tc;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6939,7 +6939,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x004:                             /* ITT0 */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_itt0;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_itt0;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6947,7 +6947,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x005:                             /* ITT1 */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_itt1;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_itt1;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6955,7 +6955,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x006:                             /* DTT0 */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_dtt0;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_dtt0;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6963,7 +6963,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x007:                             /* DTT1 */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_dtt1;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_dtt1;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6971,7 +6971,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x805:                             /* MMUSR */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_sr_040;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_sr_040;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6979,7 +6979,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x806:                             /* URP */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_urp_aptr;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_urp_aptr;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -6987,7 +6987,7 @@ M68KMAKE_OP(movec, 32, cr, .)
                        case 0x807:                             /* SRP */
                                if(CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       REG_DA[(word2 >> 12) & 15] = m68ki_cpu.mmu_srp_aptr;
+                                       REG_DA[(word2 >> 12) & 15] = state->mmu_srp_aptr;
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7090,15 +7090,15 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x003:                     /* TC */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_tc = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_tc = REG_DA[(word2 >> 12) & 15];
 
-                                       if (m68ki_cpu.mmu_tc & 0x8000)
+                                       if (state->mmu_tc & 0x8000)
                                        {
-                                               m68ki_cpu.pmmu_enabled = 1;
+                                               state->pmmu_enabled = 1;
                                        }
                                        else
                                        {
-                                               m68ki_cpu.pmmu_enabled = 0;
+                                               state->pmmu_enabled = 0;
                                        }
                                        return;
                                }
@@ -7107,7 +7107,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x004:                     /* ITT0 */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_itt0 = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_itt0 = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7115,7 +7115,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x005:                     /* ITT1 */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_itt1 = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_itt1 = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7123,7 +7123,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x006:                     /* DTT0 */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_dtt0 = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_dtt0 = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7131,7 +7131,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x007:                     /* DTT1 */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_dtt1 = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_dtt1 = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7139,7 +7139,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x805:                     /* MMUSR */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_sr_040 = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_sr_040 = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7147,7 +7147,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x806:                     /* URP */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_urp_aptr = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_urp_aptr = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);
@@ -7155,7 +7155,7 @@ M68KMAKE_OP(movec, 32, rc, .)
                        case 0x807:                     /* SRP */
                                if (CPU_TYPE_IS_040_PLUS(CPU_TYPE))
                                {
-                                       m68ki_cpu.mmu_srp_aptr = REG_DA[(word2 >> 12) & 15];
+                                       state->mmu_srp_aptr = REG_DA[(word2 >> 12) & 15];
                                        return;
                                }
                                m68ki_exception_illegal(state);