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
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] video freq set to 60 Hz instead of 50 Hz for Falcon VGA
- From: Anders Eriksson <evldhs@xxxxxxxxxxxxxx>
- Date: Wed, 06 Mar 2024 12:53:24 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1709729627; x=1709988827; bh=NBeCDxum9uPvKtuKkAlrGiTPccugM5C/dOuttruT2ec=; h=Date:To:From:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=npKqxU8YlP+qA624xNgQwqJxUNKhkQU7bU0Zs6W1ZbJCSKxpQ1fDa882oDRfqIcgo u8HVlvKi7sWutlUEYJcbusqZOmW4Eu2Wf6VreCv+I+7fVXy6fTQ2l51hViZg2gDEi4 /VK57JgAalBt9nhI1cZGNwvcuXxIQl6ib3k/P+vE/sYzUQ9KlctMASLn4hZy4V/6Dx 3uSVastZ5VaDKtP2GLeFhvhwSSW4QbbXbN1DhzewGCsL+OHmFkzr7yYa5CeyKARYfJ Ss0ON+eVskKDZvFDdXop671PN2X/vpxdPU5cyneIVAaUQpcKEU2mtGhpndACJB2q4Q LJKY8FIPXq2Ow==
- Feedback-id: 41365795:user:proton
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.
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/
--
Anders Eriksson
ae@xxxxxx