Hatari windows and vsync

A forum about the Hatari ST/STE/Falcon emulator - the current version is v2.1.0

Moderators: simonsunnyboy, thothy, Moderator Team

theelf
Atarian
Atarian
Posts: 7
Joined: Tue Jun 10, 2014 10:50 pm

Hatari windows and vsync

Postby theelf » Tue Jun 10, 2014 10:59 pm

Hi! greetings to all

Sorry my english, im spanish


I have a question about hatari emulator


I have a computer runing windows XP, connected to a CRT TV, using VGA to RGB at 15khz (soft15khz)

I can use any resolution at 240p, from 50hz to 60hz, NTSC, PAL, etc no problem


Hatari runs great, i think is using 320x240 ? but the problem the screen updates very bad, like not vsync, and a lot tearing


Any ideas?


thanks

Hippy Dave
Atari Super Hero
Atari Super Hero
Posts: 515
Joined: Sat Jan 10, 2009 5:40 am

Re: Hatari windows and vsync

Postby Hippy Dave » Wed Jun 11, 2014 4:56 am

Hatari will work best connected to a CRT VGA monitor without the 15KHz interlaced mode.
Try 416x312 @75 Hz video mode. Vsync is not supported.

theelf
Atarian
Atarian
Posts: 7
Joined: Tue Jun 10, 2014 10:50 pm

Re: Hatari windows and vsync

Postby theelf » Wed Jun 11, 2014 9:04 am

Hi!! thanks for your reply

But my computer is connected to a CRT TV,is impossible to use 416x312 75hz

First, because any resolution over 288 is interlaced, and second, because i cant go over NTSC 60hz. My TV is a normal 15khz one, i wanna use only ST Low/Medium

XXXx240 NTSC 60hz OK, XXXx288 50hz is OK

XXX means from 160 to any horizontal reoslution i want


For example, i can use 640x224 60hz, or 384x288 50hz, 1280x288 50hz, 1536x240.. or any resolution in middle like , 400x256 at 55hz



If hatari have no vsync, how can you make the scroll smoth? because Im using same HZ like original ST


Thanks!

Hippy Dave
Atari Super Hero
Atari Super Hero
Posts: 515
Joined: Sat Jan 10, 2009 5:40 am

Re: Hatari windows and vsync

Postby Hippy Dave » Wed Jun 11, 2014 5:25 pm

I believe you will get the best results by setting Hatari's resolution to your favorite video mode resolution (experiment a bit). Also you will probably get better results with vsync disabled for Hatari. PC vsync was not designed by an electronics engineer, thus, has as many problems as no vsync. Programmers are left with the messy result.

theelf
Atarian
Atarian
Posts: 7
Joined: Tue Jun 10, 2014 10:50 pm

Re: Hatari windows and vsync

Postby theelf » Wed Jun 11, 2014 6:08 pm

HI!!

I tried

320x200 - 50hz, 50.1hz, 50.2hz, 50.3hz, 50.4hz... until 52hz
640x200 - 50hz, 50.1hz, 50.2hz, 50.3hz, 50.4hz... until 52hz

320x200 - 59hz, 59.1hz, 59.2hz, 59.3hz, 59.4hz... until 60hz
640x200 - 59hz, 59.1hz, 59.2hz, 59.3hz, 59.4hz... until 60hz


In total, i tried more than 40 different modes, and still, a lot of tearing in all of them


I dont have tearing in any other emulator, and believe, I have a lot of emulators in this computer, from NES to Amiga


I tested other emulator, Steem, and I get perfect scroll for NTSC games in 60hz, and PAL in 50hz, without vsync. The problem is that Steem, dont support native resolutions



I cant have better results with or without vsync, because i dont see any option in hatari to enable vsync... or I miss something? what I say, is that i dont see any chance to have a option.. (vsync vs not) just one... no vsync.. :wink:


Any ideas? Atari ST is the only machine I still cant emulate properly in this PC

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1650
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari windows and vsync

Postby Eero Tamminen » Wed Jun 11, 2014 8:50 pm

theelf wrote:I cant have better results with or without vsync, because i dont see any option in hatari to enable vsync... or I miss something? what I say, is that i dont see any chance to have a option.. (vsync vs not) just one... no vsync.. :wink:


Hatari doesn't have control over Vsync. Whether that is done depends on libSDL backend for your OS. Have you tried newer libSDL version?

Additionally, you need to have fullscreen mode and potentially also double buffering enabled. Hatari doesn't enable latter for few reasons:
1. doesn't work with Hatari's partial screen updates (reason for them is to speed up drawing on really slow devices), in ST/e mode
2. they force Hatari screen updates to monitor screen refresh rate (typically 60Hz with LCDs), whereas Atari supports 50Hz, 60Hz and 71Hz (mono)

Because 1) isn't used by Videl emulation, you could add SDL_DOUBLEBUF to flags Falcon emulation code in src/falcon/hostscreen.c where other SDL surface flags are set to sdl_videoparams variable.

Hippy Dave
Atari Super Hero
Atari Super Hero
Posts: 515
Joined: Sat Jan 10, 2009 5:40 am

Re: Hatari windows and vsync

Postby Hippy Dave » Wed Jun 11, 2014 9:01 pm

Earlier you mentioned XXXx240 NTSC 60hz and XXXx288 50hz. Of the 40 modes you tried, did you try XXXx240 NTSC 60hz and XXXx288 50hz? Hopefully one is acceptable.

theelf
Atarian
Atarian
Posts: 7
Joined: Tue Jun 10, 2014 10:50 pm

Re: Hatari windows and vsync

Postby theelf » Wed Jun 11, 2014 9:51 pm

Eero Tamminen wrote:
theelf wrote:I cant have better results with or without vsync, because i dont see any option in hatari to enable vsync... or I miss something? what I say, is that i dont see any chance to have a option.. (vsync vs not) just one... no vsync.. :wink:


Hatari doesn't have control over Vsync. Whether that is done depends on libSDL backend for your OS. Have you tried newer libSDL version?

Additionally, you need to have fullscreen mode and potentially also double buffering enabled. Hatari doesn't enable latter for few reasons:
1. doesn't work with Hatari's partial screen updates (reason for them is to speed up drawing on really slow devices), in ST/e mode
2. they force Hatari screen updates to monitor screen refresh rate (typically 60Hz with LCDs), whereas Atari supports 50Hz, 60Hz and 71Hz (mono)

Because 1) isn't used by Videl emulation, you could add SDL_DOUBLEBUF to flags Falcon emulation code in src/falcon/hostscreen.c where other SDL surface flags are set to sdl_videoparams variable.


Hi! thanks for caring

Ok here is the problem, for a smoth scroll in SDL soudblebuffer is a must in my experience with other emulators that use sdl

I know, because every software that use SDL, without doublebuffer, have a bad scrolling or tearing, for example dosbox, or wolf4sdl, but is you use the option for doublebuffer, everything goes normal


71hz modes are not a problem, because this resolution is for 31khz screens, even back on time, I use AtariST only in 15khz TVs, i did not have any screen, then my only target is all 15khz modes, at 50 and 60hz



Where i can download the libSDL version you say? is a special version? to use the doublebuffer option


I need to ask, if doublebuffer is not in any option in normal version, how people get smoth scroll in hatari? this is the most important part of emulator, is scroll is not perfect, you can´t play any game, i feel i miss something here, a option or something


I tried to compile Hatari in mingw, to change the hostscreen.c, but no idea, i dont find any tutorial over there neither


EDIT: I tried hatari 1.8 from here

http://www.atari-forum.com/viewtopic.php?f=51&t=26567


But sadly it crash when loading TOS in my computer i use for emulators. Is a Athlon 1ghz. In my destktop PC, a C2D works OK

But the debug version works in the athlon, but sadly, same bad scroll



Thanks!!!




Hippy Dave wrote:Earlier you mentioned XXXx240 NTSC 60hz and XXXx288 50hz. Of the 40 modes you tried, did you try XXXx240 NTSC 60hz and XXXx288 50hz? Hopefully one is acceptable.


The hz is same for every resolution. 320x200 at 50.3hz is the same than 896x288 at 50.3hz, then the modes I tried are hz not resolution

But anyways, i tried 320x240, 640x240, 320x288, 640x288, 640x256, 640x224, etc at 50 and 60hz and same problem


BUT, I think, hatari dont care about my resolutions, and just change the resolution to 320x240 or similar!! can be? in my TV is difficult to say, ecause the resolutions change instantly, and i can see any flickering or nothing that indicate a screen change, but for the size of cursor, i can say, that hatari dont care about my custom resolutions, and just use 320x240 or similar


Thanks for reply!! and care about my problem

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1650
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari windows and vsync

Postby Eero Tamminen » Thu Jun 12, 2014 6:54 pm

theelf wrote:BUT, I think, hatari dont care about my resolutions, and just change the resolution to 320x240 or similar!! can be? in my TV is difficult to say, ecause the resolutions change instantly, and i can see any flickering or nothing that indicate a screen change, but for the size of cursor, i can say, that hatari dont care about my custom resolutions, and just use 320x240 or similar


Hatari gets list of supported resolutions from libSDL, which gets them from your display driver (X server on Linux). From those Hatari selects resolution closest (same or smaller) to the max resolution specified in your Hatari configuration (if specified max resolution is smaller than doubled ST screen with full borders). Based on this, Hatari will decide whether it can double the ST screen size and how much of the ST/e borders can be shown (if borders are enabled in Hatari configuration) for the max resolution you've specified.

Minimum resolution Hatari can use is 320x200, if you've disabled statusbar.

I.e. you should start by checking what kind of resolutions your display driver and monitor support. There are better programs for those kind of experiments than Hatari. After your display driver configuration is OK i.e. you have added there relevant (working) configs, and removed display configurations you're not interested about, it makes sense to try things with Hatari. If there are multiple configurations for the same resolution with different update frequencies, it's anybody's guess which one of those libSDL will present to Hatari and in which order (Hatari will pick first matching one).

theelf
Atarian
Atarian
Posts: 7
Joined: Tue Jun 10, 2014 10:50 pm

Re: Hatari windows and vsync

Postby theelf » Thu Jun 12, 2014 7:03 pm

Hi, my display driver can show this resolutions, well, this one I have configured, i can make any resolution i want up to 576 lines high

Modeline "256x224_60 16.4KHz" 60.2Hz"
Modeline "256x240_60 16.3KHz" 60.0Hz"
Modeline "256x256_60 16.3KHz" 54.0Hz"
Modeline "296x224_60 16.3KHz" 60.0Hz"
Modeline "304x224_60 16.3KHz" 60.0Hz"
Modeline "304x240_60 16.3KHz" 60.0Hz"
Modeline "320x200_60 15.8KHz" 60.0Hz"
Modeline "320x224_60 16.3KHz" 60.0Hz"
Modeline "320x240_60 16.3KHz" 60.0Hz"
Modeline "320x256_58 16.2KHz" 58.4Hz"
Modeline "320x288_50 16.2KHz" 50.0Hz"
Modeline "321x200_60 15.3KHz" 60.0Hz"
Modeline "336x224_60 15.7KHz" 60.0Hz"
Modeline "341x224_60 15.7KHz" 60.0Hz"
Modeline "384x224_60 16.3KHz" 60.0Hz"
Modeline "384x240_60 16.3KHz" 60.0Hz"
Modeline "384x247_60 16.3KHz" 60.0Hz"
Modeline "384x256_58 16.2KHz" 58.4Hz"
Modeline "384x272_50 16.2KHz" 50.0Hz"
Modeline "384x288_52 16.2KHz" 52.4Hz"
Modeline "400x254_53 16.3KHz" 53.2Hz"
Modeline "448x224_60 15.7KHz" 60.1Hz"
Modeline "448x288_60 16.2KHz" 51.5Hz"
Modeline "480x160_60 15.2KHz" 60.0Hz"
Modeline "512x224_60 16.3KHz" 60.0Hz"
Modeline "512x240_60 16.4KHz" 60.0Hz"
Modeline "512x256_52 15.3KHz" 50.0Hz"
Modeline "512x288_52 16.2KHz" 50.0Hz"
Modeline "512x384_60 15.9KHz" 60.0Hz"
Modeline "512x512_56 15.7KHz" 55.5Hz"
Modeline "640x200_60 16.3KHz" 60.0Hz"
Modeline "640x224_60 16.3KHz" 60.0Hz"
Modeline "640x232_60 15.8KHz" 55.0Hz"
Modeline "640x240_60 16.4KHz" 60.0Hz"
Modeline "640x256_58 15.2KHz" 50.0Hz"
Modeline "640x260_58 15.8KHz" 55.0Hz"
Modeline "640x288_60 15.8KHz" 50.0Hz"
Modeline "640x400_60 15.7KHz" 60.0Hz"
Modeline "640x448_60 16.2KHz" 60.0Hz"
Modeline "640x480_60 16.3KHz" 60.0Hz"
Modeline "720x288_60 15.6KHz" 50.0Hz"
Modeline "768x224_60 16.3KHz" 60.0Hz"
Modeline "768x240_60 16.0KHz" 60.0Hz"
Modeline "768x480_52 16.2KHz" 60.0Hz"
Modeline "768x512_55 15.6KHz" 55.4Hz"
Modeline "768x576_52 16.1KHz" 51.0Hz"
Modeline "792x576_49 16.2KHz" 50.0Hz"
Modeline "960x240_60 16.3KHz" 60.0Hz"
Modeline "1024x240_60 15.1KHz" 50.0Hz"
Modeline "1280x224_60 16.3KHz" 60.0Hz"
Modeline "1280x240_60 16.4KHz" 60.0Hz"
Modeline "1280x242_60 16.4KHz" 59.6Hz"
Modeline "1280x254_60 16.2KHz" 60.0Hz"
Modeline "1280x256_60 16.4KHz" 60.0Hz"
Modeline "1280x480_49 15.5KHz" 60.0Hz"
Modeline "1536x240_60 15.1KHz" 60.0Hz"
Modeline "1920x240_60 15.8KHz" 50.0Hz"

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1650
Joined: Sun Jul 31, 2011 1:11 pm

Re: Hatari windows and vsync

Postby Eero Tamminen » Thu Jun 12, 2014 7:35 pm

theelf wrote:Hi, my display driver can show this resolutions, well, this one I have configured, i can make any resolution i want up to 576 lines high
...
Modeline "321x200_60 15.3KHz" 60.0Hz"
Modeline "336x224_60 15.7KHz" 60.0Hz"
Modeline "341x224_60 15.7KHz" 60.0Hz"
...


I don't think Hatari's going to select resolutions with odd widths. They need to be divisable with a bit larger value, maybe 16...

theelf
Atarian
Atarian
Posts: 7
Joined: Tue Jun 10, 2014 10:50 pm

Re: Hatari windows and vsync

Postby theelf » Thu Jun 12, 2014 7:47 pm

HI!

Well, is plenty of resolutions divisable by 16... 320, 384, 640...

Hatari have some problems with HZ?? or something?


Someone else test hatari in a REAL 15khz 240p enviroment?? because TFT is totally different...



EDIT: I tested Hatari in a TFT, (i dont have any TFT in my home, i ask one my brother) and the scroll is not good, full of tearing, exactly like in my CRT TV, then is not a problem of CRT


How people you get smoth scroll in TFT or CRT or whatever??

Thanks!!

Hippy Dave
Atari Super Hero
Atari Super Hero
Posts: 515
Joined: Sat Jan 10, 2009 5:40 am

Re: Hatari windows and vsync

Postby Hippy Dave » Fri Jun 13, 2014 5:10 pm

theelf wrote:I have a computer runing windows XP, connected to a CRT TV, using VGA to RGB at 15khz (soft15khz)
--
But sadly it crash when loading TOS in my computer i use for emulators. Is a Athlon 1ghz. In my destktop PC, a C2D works OK
But the debug version works in the athlon, but sadly, same bad scroll
--
EDIT: I tested Hatari in a TFT, (i dont have any TFT in my home, i ask one my brother) and the scroll is not good, full of tearing, exactly like in my CRT TV, then is not a problem of CRT

How people you get smooth scroll in TFT or CRT or whatever??

I made a summary across a few posts to get a better view of the problem.
Here are my thoughts.
- Maybe the Windows compliation of Hatari (or included .DLLs for SDL etc.) doesn't get along with an Athlon.
- Maybe the Windows version of Hatari doesn't get along with Windows XP (or incompatibility of drivers).
- Maybe your system is on the edge of being too slow to emulate the demo.

How do people get smooth scroll?
Normally, it just works. I get very little tearing and an occasional judder. I've noticed that CRTs have smoother display action than LCD monitors.

Try this:

Run Hatari

Press F12
Click on Atari Screen
Make sure Show Borders is selected
Click on Back To Main Menu
Click on OK

Press F12
Click on Hatari Screen
Make sure Full Screen is selected
Make sure Indicators: None is selected
Make sure Frame Skip: Off is selected
Make sure Keep Desktop Resolution: ST/STE is Not selected
Make sure Max Zoomed Win: 416 x 312
Click on Back To Main Menu
Click on OK

Save the settings if they work.


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 3 guests