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

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


Am Sun, 24 Jul 2022 10:15:19 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:

> Le 24/07/2022 à 08:31, Thomas Huth a écrit :
> 
> > 
> > Looks good! ... but now I wonder whether we have an issue here in Falcon
> > mode, too? Since VIDEL_VideoRasterHBL() does not take nStartHBL into account
> > yet?  
> 
> VIDEL_VideoRasterHBL() does a "+=" every HBL, starting from 
> Video_GetScreenBaseAddr() so it should be good too (but this means it 
> increments videl.videoRaster on every HBL, even those where we only 
> display border and counter should not increment ; if so that's a small 
> bug that could be improved later)

That's what I meant! Shall we add a patch like this there:

diff a/src/falcon/videl.c b/src/falcon/videl.c
--- a/src/falcon/videl.c
+++ b/src/falcon/videl.c
@@ -619,6 +619,9 @@ void VIDEL_VideoRasterHBL(void)
        int lineoffset = IoMem_ReadWord(0xff820e) & 0x01ff; /* 9 bits */
        int linewidth = IoMem_ReadWord(0xff8210) & 0x03ff;  /* 10 bits */
 
+       if (nHBL <= nStartHBL)
+               return;
+
        videl.videoRaster += linewidth + lineoffset;
 
        /* TODO: VFC is incremented every half line, here, we increment it every line */

?

 Thomas



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