| Re: [hatari-devel] EXA demo Entracte : Improvement in search | 
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Le 05/02/2017 à 11:48, Christian Zietz a écrit :
Laurent Sallafranque schrieb:The problem is in the 5 last lines : the code test for a min and max value for register DO. if D0 is not between $4100 and $4200, the code goes to $4eb1c and this quit the demo immediatly.To me this simply looks like a CPU speed test, counting the number of loop iterations between two VBLs. I'd assume that the demo requires a certain CPU speed to run correctly and so it wants to quit on (for example) over-clocked CPUs. I think the 68030 cycle accuracy of Hatari is not good enough here for this test to pass.
You're right, this compute cpu speed.At the moment with my dev version I get D0=$3e65, which is ~5% too slow compared to real HW $4100-$4200 for this code loop :
$0001cd1e : 4a78 0468 tst.w $0468.w $0001cd22 : 6600 0006 bne $1cd2a $0001cd26 : 5240 addq.w #1,d0 $0001cd28 : 60f4 bra.s $1cd1eUnfortunately, 100 % accuracy will not be reached immediately in Hatari, some complex parts of the 68020/68030 pipeline and bus sequencer are not known yet to ensure exact similar behaviour regarding how the cpu order the memory accesses to be optimum.
Nicolas
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |