Re: [hatari-devel] Videl Emu and TimerB |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
On 07/03/2012 23:32, Laurent Sallafranque wrote:
Thanks Nicolas,
The first problem actually is that many code in mfp.c calls video_...
functions
like video_get_position, video_getTimerBPos, ...
And as I don't want to call anything from video (which is no more
initialized), it goes wrong.
Do you thing we should encapsulate every mfp.c functions with something
like :
if (machine == falcon)
do_ videl (or do_nothing)
else
call video_...
I don't think the falcon need many code in mfp.c for timer B
In MFP_TimerBData_ReadByte, you should just do 1 line for falcon case in
mfp.c :
IoMem[0xfffa21] = MFP_TB_MAINCOUNTER;
All the rest is cycle precise code that is useful only for border
removal on STF/STE, it would not work on falcon.
And MFP_TimerB_EventCount_Interrupt should remain unchanged ; just call
it from videl.c with sthg like that (in the HBL handler for now) :
if ( ( nHBL >= nStartHBL ) && ( nHBL < nEndHBL + BlankLines ) )
{
if (MFP_TBCR == 0x08)
MFP_TimerB_EventCount_Interrupt();
}
That's all you will need fot Falcon's timer B.
What could explain that the mouse doesn't work anymore ?
hundreds of things, but I have no idea :)
Nicolas