[hatari-devel] I'm lucky ;) K.prg is working
npomarede at corp.free.fr
npomarede at corp.free.fr
Wed Feb 24 00:30:24 CET 2010
On Tue, 23 Feb 2010, Laurent Sallafranque wrote:
> I've detected something else too.
>
> Instructions > 50 cycles are always the same :
>
> Movem.L
> ADD.L
> CLR.L
>
> Are these instructions's cycles correctly computed ?
>
>
> I've also this line :
>
> cpu exception 33 currpc 31262 buspc 31260 newpc fa002a fault_e3 0 op_e3 0
> addr_e3 0
> I don't know 68000 as much as you do.
exception 33 is a trap #0, it should add 34 cycles to the current
instruction.
Nearly all cycles are correctly computed (this is required to run
fullscreens demos), but the problem is that they're based on a 68000 cpu.
The 68020+ cpu will often execute .l instruction as fast as a .w
instruction on a 68000 and many arithmetic instr are also faster.
So this is a problem for falcon : we don't have the correct cpu cycles
as used on a 68020+ (and as those cpu had a small cache, cycles can vary
even further than the motorola doc). Winuae has a preliminary support for
cycle correct 68020+.
What this means is that DSP_Run won't be called as often as it should be
(which may not be a problem, it depends on what the dsp is doing).
I'm surprised by your clr.l and add.l cycles :
clr.l $0000186e should take 28 cycles on a 68000, so I think there's a
problem with the value 58 you get. What are the instructions before/after
this clr ?
Even your cycle for movem #$7fff is wrong, it should be approx 140
cycles, not 266.
Nicolas
>
>
>
> Some examples :
>
> cpu video_cyc= 2372 324@ 4 : 00e08352: 4cdf 38f8 4e5e 4e75 4e56 MVMEL.L
> #$38f8,(A7)+
> cycles > 50 : 154
>
> cpu video_cyc= 2372 324@ 4 : 00e08352: 4cdf 38f8 4e5e 4e75 4e56 MVMEL.L
> #$38f8,(A7)+
> cycles > 50 : 154
>
> cpu video_cyc= 332 332@ 0 : 00e00d0e: 4cdf 0180 51cf ffec 4eb9 MVMEL.L
> #$0180,(A7)+
> cycles > 50 : 58
>
> cpu video_cyc= 640 128@ 1 : 00e00d48: 4cdf 7fff 5279 0000 0452 MVMEL.L
> #$7fff,(A7)+
> cycles > 50 : 266
>
> cpu video_cyc= 774 262@ 1 : 00e00dc8: 4cd9 f8f8 4a78 059e 6702 MVMEL.L
> #$f8f8,(A1)+
> cycles > 50 : 186
>
> cpu video_cyc= 1018 506@ 1 : 00e00d94: 48e1 1f1f 23c9 0000 04a2 MVMLE.L
> #$1f1f,-(A1)
> cycles > 50 : 178
>
> cpu video_cyc= 2038 502@ 3 : 00e0810e: 42b9 0000 186e 0839 0002 CLR.L
> $0000186e
> cycles > 50 : 58
>
> cpu video_cyc=143794 434 at 280 : 00e356b0: 52b9 0000 9a4e 4ab9 0000 ADD.L
> #$00000001,$00009a4e
> cycles > 50 : 58
>
> cpu video_cyc= 190 190@ 0 : 00e00cc4: 52b9 0000 0462 2038 045a ADD.L
> #$00000001,$00000462
> cycles > 50 : 58
>
>
>
>
More information about the hatari-devel
mailing list