Re: [hatari-devel] error reading video counter on TT since commit 5316b4081e9d3 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] error reading video counter on TT since commit 5316b4081e9d3
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 24 Jul 2022 14:14:58 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1658672100; bh=a57vwLGOo8YOKAx+FoD06f3dTzmw1yc3IYnrRD1/Hkk=; h=Date:From:To:Subject:From; b=CvJF6kN2H13UZTt5NbLNEnKFXMXyr9iJJfWN1/8HvUOb60wkO03NUZs+F7zvMEjkr pRk8G+q17eLXW8wSR6ypF5YjNYig9FM6XMaznXRbJ2VeYCQL8eAIMPo6Nk9XYzHLc9 OuTgh9wNnvJXi2cMbtfldSpgTTn4qVvk2aVoNL8fuWmGTvgJlqIv30FdkNnGnlLXN7 aX4tSckGswKuX8bqVZNyHeUAeSIf0Vy679MEqkb0DahQS5Sxdyv8BBw4y1W6lkDxyP OvZqvX74nQgqgF0FcCYUN9oCvABvNHV12+mkIH+mZssMZDU8EtiG42dSf/ihPHvBlQ vHAFmKCUtzL1w==
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