Test/Demo SW for 50-60 Hz framerate conversion

News,announcements,programming,fixes,game patches & discussions.

Moderator: Petari

Post Reply
Petari
Posts: 174
Joined: Tue Nov 28, 2017 1:32 pm

Test/Demo SW for 50-60 Hz framerate conversion

Post by Petari » Sat Dec 30, 2017 1:04 pm

As we know, today is problematic to find monitor, newer monitor, what can properly display Atari ST(E) color signal, especially PAL (50 Hz) video mode. LCD monitors usually need min 60 Hz refresh rate. And even when there is PAL input on many newer LCD TVs, or some monitors too, problems may appear, because ST produces not regular interlaced video. For instance, on some TV cards you may get vertically shacking picture because that.

I'm thinking about ways how to add conversion from ST(E) video output (actually, right at shifter's 9 digital outputs) to VGA signal.
This SW is mostly for testing diverse ways - how it will look with real HW, before going in some concrete HW design and prototype making.


Diverse test programs to test and see how Atari ST 50 Hz (PAL) scrolling video would look on 60 Hz monitor after different ways of conversion.

This is only for emulators on PC. Recommended is Steem 3.2 . If possible Debugger version - then can see even better it - using Run to next Vbl option.

Proper emulation of real HW situation is only in fullscreen mode, with Vsync to PC display checked on. In windowed mode there is no proper sync with PC monitor, so some extra judder will happen.

Because here all is on ST SW, so not only scrolling, but conversion to 60 Hz VGA, Steem must be set to higher CPU clock than normal. 20-36 MHz should be fine. Above it problems happen again, probably because then MFP works faster too, and maybe even video.

And of course, make sure that your video card is set to exact 60 Hz refresh rate in video card settings. Steem on 100% speed in General Options.

Methods:

50-60 Hz conversion by duplicating every 5-th frame:

STVG4.TOS , STVG2.TOS, STVG1.TOS
Number in filename indicates how much pixels content scrolls at each frame.

25-60 Hz conversion, using pattern: 2,2,3,2,3 - numbers indicate how many times source frame is displayed :

ST25VG4.TOS, ST25VG2.TOS, ST25VG1.TOS
Numbers indicate pixel count at scrolling too. But half of it is invisible, so real scroll px count is 2-4-8 .

STVG4H.TOS :
50-60 Hz conv. but with 4px scroll only at every second frame, so it is basically 25 Hz scroll content. And it looks identical as ST25VG2 .

STVGI4.TOS :
50-60 Hz conv. Where instead frame duplication interlace is used.
Indeed, it is not smoother in scrolling. Code is not perfect - interlace is OK only when map moves to left on screen, when goes right it interlaces previous instead next frame - but I will not fix it, since whole idea with interlacing is not really good.

Conclusion: best method is 50-60 Hz conv. with duplicating each 5-th frame of source. It is good for 50 fps material, as well for 25 fps material.
ST_VGAT.ZIP
(86.42 KiB) Downloaded 12 times
Will not work on TT - needs blitter. Falcon is probably too slow for this SW . So, again: Steem, if possible Debugger .

Petari
Posts: 174
Joined: Tue Nov 28, 2017 1:32 pm

Re: Test/Demo SW for 50-60 Hz framerate conversion

Post by Petari » Sat Dec 30, 2017 5:32 pm

I made 2 short videos with help of Steem SSE and Fraps to demonstrate how conversion 50-60 fps looks with some games.
One is not so good scroller, other is good scroller. Basically, I don't see any judder effect in it, but it is present for sure, and can see that scrolling is not at same rate always, if use single frame step.
Win. fullscreen set to 60 Hz, emulator in PAL mode, so 50 Hz, V sync of course off. Fraps set to 60 Hz recording rate. So, this is actually what you will see via good PAL RGB-VGA converter on your LCD.
Mercs50_60.zip
(1.26 MiB) Downloaded 8 times
Potsw50_60.zip
(2.12 MiB) Downloaded 9 times

User avatar
Smonson
Posts: 82
Joined: Sat Oct 28, 2017 10:21 am

Re: Test/Demo SW for 50-60 Hz framerate conversion

Post by Smonson » Mon Jan 01, 2018 11:06 am

Petari wrote:
Sat Dec 30, 2017 1:04 pm
I'm thinking about ways how to add conversion from ST(E) video output (actually, right at shifter's 9 digital outputs) to VGA signal.
This SW is mostly for testing diverse ways - how it will look with real HW, before going in some concrete HW design and prototype making.
Hi Petari, I'm quite sure that your plan to produce VGA output from the shifter's digital outputs is a good one. This is similar to how the Gonbes CGA-to-VGA cards work, except that they're digitising the analogue video output and they produce a really crappy picture, while yours wouldn't suffer from those problems.

Dunno if you saw my thread about generating HDMI from the shifter, but by using HDMI it can be connected straight to a PAL LCD TV without needing to convert the frame rate from 50Hz to 60Hz. That thread is here, it might have some info you could use: viewtopic.php?t=330.

Petari
Posts: 174
Joined: Tue Nov 28, 2017 1:32 pm

Re: Test/Demo SW for 50-60 Hz framerate conversion

Post by Petari » Mon Jan 01, 2018 11:42 am

Hi Simonson, and Happy New Year :D
I seen that thread and practically same one at AF. As said here already, I don't think that I invented hot water. It is just that I like to go in some design with mine ideas, based on my long (30 years with ST) experience. And I think that exxos-s new ST motherboard project is ideal one, where can add PAL/NTSC digital RGB to VGA converter.

Indeed, there are diverse LCD TVs and even only monitors what can accept PAL freq. video (50 Hz) . Some newer TVs still have even Scart input, beside HDMI . That does not seem like real challenge for me :D And some people say, that internally they still work at 60 Hz - LCD panel freq. I guess, that such data is not visible in product specs. Only way would be that do proper tests. We can discuss about it, and even make some test SW - actually this here can be adapted very easily. I need only TVs for test :D

Why internal converter can be much better than external ? :
No need for analog-digital conversion - we connect to digital outputs of ST shifter.
Picture can be much sharper and actually pixel accurate if set size and shift properly on monitor. Talking here about VGA output. I did not go in looking how pure digital output for HDMI could be done - and then it could automatically adjust to monitor, so pixel accuracy without need for setting.
But, for pixel accuracy, first condition is to sample shifter outputs syncronized - and with internal it can be done - we need just to take 32 MHz clock from shifter CLK pin. In low res 1px is exactly 125 nS (funny, exactly as CPU's 1 clock cycle). In med. res it is 62.5 nS . And in high res. it is 31.25 Active line period is 40 micro secs. in color modes. High res does not need any conversion, it may go straight via switcher. Color modes at 60 Hz may go via scan doubling. At 50 Hz framerate conversion is needed. This is what is hardest part, so I focus at moment on it. Indeed, some demos will not look exactly as should, but that's what is possible, I'm sure.

Petari
Posts: 174
Joined: Tue Nov 28, 2017 1:32 pm

Re: Test/Demo SW for 50-60 Hz framerate conversion

Post by Petari » Thu Jan 04, 2018 11:40 am

STV50_75.ZIP
(11.14 KiB) Downloaded 7 times
This little program is for demonstrating how Atari ST's 50 Hz (PAL)
video would look on some LCD monitor set to 75 Hz refresh rate.

75 Hz should be available on most of modern LCD monitors - in lower
resolutions - and we don't need some high ones for ST video.

This is for running in emulators.
Set Steem CPU clock to 28 MHz or around it, Full Screen refresh rate to 72 Hz (it will give 75 then), and V-sync on . Then run this SW. Will see pretty much smooth scrolling, without tear and other artifacts. Much better than with refresh rate of 60 Hz .

So, I think that 75 Hz should be preferred for Atari ST PAL mode displaying on modern LCD
monitors. You can check is your monitor capable of it - by looking specs, then by activating it's info screen - usually there is actual refresh rate shown. And in video card setting should see available refresh rates for diverse resolutions. And Steem even can test which refresh rates work.

P.S. Checked with older 1280x1024 monitor. It can even 72 Hz - but then it is not smooth scrolling, of course. Since Steem offers only 72, not 75, choose default refresh rate instead - after setting res. of 800x600 (or in what is possible to set 75 Hz) and refresh rate to 75 Hz in video card settings.

Post Reply