[hatari-devel] I'm lucky ;) K.prg is working

Laurent Sallafranque laurent.sallafranque at free.fr
Tue Feb 23 15:01:59 CET 2010


Hello,

I've had a lot of chance today.
I was investigating about 68030 Cycles, and I saw in newcpu.c that DSP 
call was after a potential return.

I've inverted the DSP call and the potential return and I've tested K.prg
It's working.

Returning to previous state freezes K.prg

I've been really lucky, because I've tested all the non compatible 
programs and demos and they're not concerned by this patch.

Here is the patch.

diff -r 4a0c21b49fb4 src/uae-cpu/newcpu.c
--- a/src/uae-cpu/newcpu.c      Sun Feb 21 23:00:19 2010 +0200
+++ b/src/uae-cpu/newcpu.c      Tue Feb 23 13:41:23 2010 +0100
@@ -1759,15 +1759,15 @@
          }
 #endif

+       /* Run DSP 56k code if necessary */
+       if (bDspEnabled) {
+           DSP_Run(cycles);
+       }
+
        if (regs.spcflags) {
            if (do_specialties ())
                return;
        }
-
-       /* Run DSP 56k code if necessary */
-       if (bDspEnabled) {
-           DSP_Run(cycles);
-       }
     }
 }

@@ -1812,15 +1812,15 @@
        while (PendingInterruptCount <= 0 && PendingInterruptFunction)
          CALL_VAR(PendingInterruptFunction);

+       /* Run DSP 56k code if necessary */
+       if (bDspEnabled) {
+           DSP_Run(cycles);
+       }
+
        if (regs.spcflags) {
            if (do_specialties ())
                return;
        }
-
-       /* Run DSP 56k code if necessary */
-       if (bDspEnabled) {
-           DSP_Run(cycles);
-       }
     }
 }


Do you think there's no risk to apply it ?

It doesn't seem to break the working programs.

regards

Laurent




More information about the hatari-devel mailing list