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: Sat, 23 Jul 2022 06:09:24 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1658556567; bh=iFwvOpTc2B04iL9Ox+0dHUg4hPweuqGTKjvGMBJ5mUI=; h=Date:From:To:Subject:From; b=LgsEiZ82UulkQJ8fb5aG9MvkJDDj6qWL/aPJn2h/EQvZ6TvzHKaR6SF9TTi7IzbiY 2XjtkpldVw01vjUztdrqek5U6ndINSzyjQwPJJ7YGiIQaby6stIo0uLtsSW4ob4Ck9 OcPIAtkRUb4+2Ywe8fb4q4SJCbp4f+0kd7vlWFtFI4YXrMYuueo9/mR6KK2tW69o8O VsUJ38sD7ar1ddvQagimgWjQ6GY4xayiGWsJhWOvxxxGZBuWAyKt2qmhhiqg8wOxF/ LHWI69ChXZdHocVvvKPk8YlkXhFIyCeEbUHeJac5GVdUw1ub0IVp+/FFNbn97b/mtx RIJcVQPLJR/SA==
Am Fri, 22 Jul 2022 18:20:01 +0200
schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
[...]
> the problem is that in TT mode pVideoRaster is not updated anymore when
> entering Video_CalculateAddress. It's always the same value.
>
> This is due to this change that don't call Video_EndHBL() and
> Video_CopyScreenLineColor() on each HBL (as it was the case in Hatari
> 2.3.1).
>
> commit 5316b4081e9d3fa177ed14419369bc13892af4e8
>
> --- a/src/video.c
> +++ b/src/video.c
> @@ -2990,7 +2990,7 @@ void Video_InterruptHandler_HBL ( void )
> M68000_Exception(EXCEPTION_NR_HBLANK , M68000_EXC_SRC_AUTOVEC); /*
> Horizontal blank interrupt, level 2 */
>
>
> - if (!Config_IsMachineFalcon())
> + if (!Config_IsMachineTT() && !Config_IsMachineFalcon())
> {
> Video_EndHBL(); /* Check some borders removal and copy line to
> display buffer */
> }
>
> Thomas, is there any reason why you excluded TT from the Video_EndHBL()
> case ? Or is it a bad copy/paste ?
Yes, there is a reason: Video_EndHBL() is very specific to the ST/STE
screen renderning functions from screen.c and thus should not be called in
TT mode (which uses the rendering functions from screenConvert.c instead).
> I think it should be restored like previously, unless it has impact on
> some other part of TT video ?
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?
Alternatively, we could also introduce TT-specific versions of
Video_ScreenCounter_ReadByte(), just like we did with
VIDEL_ScreenCounter_ReadByte() already.
Thomas