Re: [hatari-devel] error reading video counter on TT since commit 5316b4081e9d3

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 23/07/2022 à 08:09, Thomas Huth a écrit :

Instead of reverting, I'd suggest that we just add a special "else" case
here to fake a video counter update in TT and Falcon mode, e.g.:

	if (!Config_IsMachineTT() && !Config_IsMachineFalcon())
	{
		Video_EndHBL();
	}
	else
	{
		/* Fake video counter update in TT and Falcon mode...
		 * should be replaced once we have more precise video
		 * emulation there: */
		pVideoRaster = ((pVideoRaster - STRam + SCREENBYTES_MIDDLE)
		                & 0xffffff) + STRam;
	}

SCREENBYTES_MIDDLE should maybe be adjusted depending on the video mode...
Does that sound acceptable?

Hi

I'm not sure this would be fail proof enough ; in the case of hextracker, it compares with video addr at start of screen, but some other program could wait for line 1 or end of screen for example. Also you should not return the above value unless DE has really started (ie not during top border) or it will mess with other cases/


Alternatively, we could also introduce TT-specific versions of
Video_ScreenCounter_ReadByte(), just like we did with
VIDEL_ScreenCounter_ReadByte() already.


Yes, I think it would be better. For example add a similar call to VIDEL_VideoRasterHBL() done in Video_InterruptHandler_HBL() to update pVideoRaster in TT case with sthg like "bytes per line * nHBL"

I will have a look if you don't plan doing it youself ? (I think I can patch it today)

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/