|Re: [hatari-devel] Calls to video_getPosition killing :)|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
On 09/03/2012 20:09, Laurent Sallafranque wrote:
I'm trying to remove all the calls to video_getPosition(),
Video_GetPosition_OnWriteAccess() and Video_GetPosition_OnReadAccess()
when in Falcon mode.
I've launched hatari under gdb with 3 breakpoints:
- 1 in video_getPosition()
- 1 in Video_GetPosition_OnWriteAccess()
- 1 in Video_GetPosition_OnReadAccess()
I've broken on all these functions:
It seems that the FDC calls loops indefinitely (it always sequence).
This brings me one question:
- do these "cycle exact" functions need to be related to video cycles
- couldn't they be related to an internal "clock" ?
- couldn't there be some internal clocks for the different values we
need that would act a bit like cycint ?
you're mixing 2 things :
- video_getPosition is used in many places when --trace mode is enabled,
it has nothing to do with real emulation, it's used to print precise
position when the log happens. In falcon mode, you need to have a
similar function. It can return less precise result for now, but it's
needed to keep readable traces.
- Video_GetPosition_OnWriteAccess and Video_GetPosition_OnReadAccess are
really useful only in video.c , mfp.c and psg.c to do precise access
when emulating sound or video in STF/STE. These 2 functions will not
exist in videl.c, so the problem will disappear (and they should not be
used in mfp.c when in falcon mode too, see the example code I sent
previously to handle timer B for videl in mfp.c).