Re: [hatari-devel] Calls to video_getPosition killing :) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On 09/03/2012 20:09, Laurent Sallafranque wrote:
Hi,
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:
MFP_ActiveEdge_WriteByte ()
IKBD_KeyboardControl_WriteByte ()
IKBD_KeyboardData_WriteByte ()
DC_ResetDMA ()
FDC_DmaModeControl_WriteWord ()
FDC_DiskController_WriteWord ()
FDC_DiskControllerStatus_ReadWord ()
FDC_WriteSectorRegister ()
FDC_DmaAddress_WriteByte ()
FDC_WriteCommandRegister ()
FDC_TypeI_Restore ()
FDC_Check_MotorON ()
FDC_CmdCompleteCommon ()
FDC_WriteTrackRegister ()
FDC_TypeI_Seek ()
FDC_TypeIV_ForceInterrupt ()
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
exact ?
- 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 ?
Regards
Laurent
Hello
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).
Nicolas