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 06/03/2024 à 13:53, Anders Eriksson a écrit :

On Sunday, March 3rd, 2024 at 21:56, Nicolas Pomarède <npomarede@xxxxxxxxxxxx> wrote:

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
Hello,

that explains why 80 Hz didn't work, thanks. Personally I'd prefer 60 Hz as fallback as that's the default standard VGA mode of the Falcon.
However, one detail that still is pending; if switching to 32 MHz videl clock, Hatari falls back to 50 Hz VBL even if the vertical freq is 60 Hz.


Hi

I didn't try screenpain yet ; when generating asm source for vga 32 Mhz, can you compare it to vga 25 Mhz to see what is changing ?

I had the feeling that register-wise only bit 2 in ff82c0 was involved in RGB/VGA, by setting clock to 25 or 32 MHz.

I don't see which setting allows vga with a "non vga" clock.


You asked aout Falcon demos running in 60 Hz VGA, I think that is most of the VGA-able ones. Here's an example: https://demozoo.org/productions/312278/

I will have a look at this.

Nicolas



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