Felix
Felix copied to clipboard
Suzy - Math timing wrong
The timing either SuzyMath or Timers seems to be wrong. Using cycle_check I see that multiplication takes 36 cycles and multiplication with sign and accu 41 cycles.
@42Bastian could you attach some some code testing it? I'll debug it.
Here two versions of cycle_check. Signed + Accu and one w/o. Signed/Accu shows 160 the other 154. Both do 1024 multiplications, time in in 64us ticks
Sorry, the test was wrong. I'll try something different
@42Bastian I was looking into it and it's hard to obtain desired timing without some "magic constants". I'll try to work with some simpler tests before this.
Well, I think most important is that timers are correct and math cycles are not more than on hardware. Cycle accurate emulation of the Lynx is hard to achieve esp. when then manual says that you should not rely on exact timing ;-)
@42Bastian I thing that generally top priority have the issues to make Felix correct and stable, especially to run all official games. Achieving cycle-exactness should be next and to that we should devise a set of possible simple tests to check and correct relation between CPU cycles and timers. Hardest part could be to obtain cycle exact sprite blitting.
That's what I wanted to say. Even the official docs state, that one should no rely on exact cycles. So yes, first step should be to have the sprite engine work correctly. There are still many flaws (xor sprite, tilt/stretch). I will try to prepare simple tests.
@42Bastian Official docs instruct game developer. We're doing something completely different, as we are here emulator developers and trying to make cycle-exact emulator is perfectly OK ;)