]> git.sesse.net Git - pistorm/blobdiff - m68kcpu.c
Merge pull request #27 from TheRealTachyon/patch-1
[pistorm] / m68kcpu.c
index 4cc48c5f75044fc636e4da876bd9b0a55f939fcf..7883bddcef8e786366180e6bbf827cf35e449c94 100644 (file)
--- a/m68kcpu.c
+++ b/m68kcpu.c
@@ -990,9 +990,6 @@ int m68k_execute(int num_cycles)
                /* Main loop.  Keep going until we run out of clock cycles */
                do
                {
-#ifdef M68K_BUSERR_THING
-                       int i;
-#endif
                        /* Set tracing accodring to T1. (T0 is done inside instruction) */
                        m68ki_trace_t1(); /* auto-disable (see m68kcpu.h) */
 
@@ -1006,8 +1003,9 @@ int m68k_execute(int num_cycles)
                        REG_PPC = REG_PC;
 
                        /* Record previous D/A register state (in case of bus error) */
+//#define M68K_BUSERR_THING
 #ifdef M68K_BUSERR_THING
-                       for (i = 15; i >= 0; i--){
+                       for (int i = 15; i >= 0; i--){
                                REG_DA_SAVE[i] = REG_DA[i];
                        }
 #endif
@@ -1161,9 +1159,6 @@ void m68k_pulse_reset(void)
 
        /* Read the initial stack pointer and program counter */
        m68ki_jump(0);
-       REG_SP = m68ki_read_imm_32();
-       REG_PC = m68ki_read_imm_32();
-       m68ki_jump(REG_PC);
 
        CPU_RUN_MODE = RUN_MODE_NORMAL;