Re: [hatari-devel] video freq set to 60 Hz instead of 50 Hz for Falcon VGA

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


Le 02/03/2024 à 20:13, Anders Eriksson a écrit :

On Friday, 1 March 2024 at 23:08, Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:

Le 25/02/2024 à 21:39, Daniel Hedberg a écrit :

Actually, a lot of Falcon demos sets a 50Hz vertical refresh rate on VGA
monitors by directly writing to the Videl hardware registers, while a
few uses the standard 60Hz VGA video mode. I'm afraid that forcing 60Hz
on VGA will break more demos than it will fix, as 50Hz on VGA is pretty
common. A better solution would of course be to emulate/respect the
Videl registers.



Hi

you're right about that, using the monitor type is not good.

I changed the code to use VFT at $ff82a2 and VC0 at $ff82c0 to compute
the vertical freq for the current video mode.

VFreq = ( HFreq / (VFT+1) ) * 2

It's possible I don't handle all the cases at the moment, but it should
give good default results (at least better than what was previously used
by reading $ff820a in Falcon mode)

Thanks to Zerkman for providing an article about Videl he wrote in
french ST Magazine 101
http://zerkman.sector1.fr/archive/videl.html

(and thanks to Anders Eriksson for reporting this to Zerkman :) )

Nicolas



Hello,

thanks for looking into this, I think it's partly correct now, but not quite there.

Sadly I'm not a Videl specialist, but I'm used to handle the Screenspain tool, in which it's possible to set Videl clock, refreshrates and much more.

1. VGA mode: Set Videl to 32 MHz (normally 25 MHz in VGA). Hatari change the screen to 50 Hz (should be 60)
2. VGA mode: Set refresh to 71 Hz, Hatari changes to 71 Hz. Very good.
3. VGA mode: Set refresh to 80 Hz, Hatari changes to 50 Hz (should be 80)
4. RGB mode: Set Videl to 25 MHz (normally 32 MHz in RGB). Hatari keeps the screen at 50 Hz, seems to be working.
5. Change PAL/NTSC mode with Xbios; Hatari changes refresh accordingly.

It would seem like the RGB mode works fine in these limited tests, while VGA mode needs further work.

The screenspain tool can be downloaded here:
https://demozoo.org/productions/65128/


While doing the above tests, I recorded the screen, watch the Hatari statusbar refreshrate and compare to Screenspain:
https://www.youtube.com/watch?v=-9oFW742xFg


You might be wondering why people set RGB Videl clock in VGA mode and vice versa.

* For VGA, it allows to use higher resolutions when running the Videl in 32 MHz instead of the usual 25 MHz.
* For RGB it lowers the horizontal resolution, creating wider pixels ("cinemascope"), useful when demos (or games) wants overscan without the additional resolution.
* And there is another reason for 25 MHz RGB too: Bus accelerators rises the 32 MHz clock (sometimes above 50 MHz) which isn't very nice for an old CRT RGB screen.

Hopefully I'm not too far off with this rambling, it wouldn't hurt if some Videl expert spoke up :)


Hi

thanks for your detailed test, always valuable !

I already heard about Screenpain, I need to have a look at it, as this tools allows to compare the expected video mode with the emulated result.

so far, I just allowed falcon vfreq to be 50, 60 or 71 Hz, 50Hz being the fallback for not supported freq (which is why 80 Hz becomes 50 Hz in one of your test). I kept these freqs because that's the ones that Hatari already handles.

Adding more vfreq for Falcon means also supporting more Hfreq, number of HBL, ... and in the end a much larger work to support all this and the corresponding Videl regs. So this will be for a second step :)

Nicolas





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