Hatari 2.1.0 has been released

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

Moderators: simonsunnyboy, thothy, Moderator Team

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

Re: Hatari 2.1.0 has been released

Postby Eero Tamminen » Sat Apr 07, 2018 3:57 pm

Eero Tamminen wrote:try whether reverting changeset 6445:dca750f303bb ("Choose the default font depending on the choosen VDI height") would change anything. It's the only one between 2.0 and 2.1 that seemed like it could affect this.


Reverting that and few VDI related commits didn't fix the crash.

It seems that any widths >= 1024 and heights >= 768 trigger this in monochrome, regardless of how small the other resolution is. I.e. the issue isn't the size of the total screen buffer but the actual values themselves. Do these numbers ring any bells for anybody?

I guess I need to bisect when this started happening (as it's pretty easy to reproduce). I'm starting to think that for largest VDI hack modes in Hatari, it's best just to use latest EmuTOS though, as it's not as buggy as those old TOS versions.

EDIT: added some additional size experiment results.

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

Re: Hatari 2.1.0 has been released

Postby Eero Tamminen » Sat Apr 07, 2018 7:21 pm

Bisect try didn't produce correct results as I forgot that memory setting had changed between 2.0 and 2.1.

But I found out that VDI crash happens only with 4MB or more. And it happens also with Hatari v2.0, i.e. this is not a regression!

Everything works fine with 0.5 - 2.5 MB of RAM.

Maybe VDI size should be restricted to <1024x768 when 4MB or more memory is used with TOS version <= 3?

(Also found unrelated bug in the current memory option setting code.)

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Hatari 2.1.0 has been released

Postby Foxie » Sat Apr 07, 2018 8:02 pm

npomarede wrote:Hi
but if you set ST to Mono, it will refresh frames (including sound) at 70 Hz, but as vsync is ON, the main vsync loop in Hatari will pause until the next 1/60 of sec.


Thanks for the info. I was hoping it would use a multi-buffer approach, to generate 70 frames per second but only deliver 60 of those to the screen with vsync.

As it turns out, I think OS X vsyncs every screen update under all conditions anyway. Unlike when I was using Linux, I can't see any tearing even when vsync is turned off. Somehow OS X queues up graphics updates until the right time. So the vsync option on OS X may be redundant and could be removed?

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Sat Apr 07, 2018 9:53 pm

Foxie wrote:
npomarede wrote:Hi
but if you set ST to Mono, it will refresh frames (including sound) at 70 Hz, but as vsync is ON, the main vsync loop in Hatari will pause until the next 1/60 of sec.


Thanks for the info. I was hoping it would use a multi-buffer approach, to generate 70 frames per second but only deliver 60 of those to the screen with vsync.

As it turns out, I think OS X vsyncs every screen update under all conditions anyway. Unlike when I was using Linux, I can't see any tearing even when vsync is turned off. Somehow OS X queues up graphics updates until the right time. So the vsync option on OS X may be redundant and could be removed?

I can't really say about OSX. Some people maintaining the OSX port of Hatari who knows better OSX might be able to give mor details.
Maybe OSX buffers each new frame until the next vsync in all cases, I don't know. Perhaps SDL2 docs talks abour this.

But about generating 70 frames and displaying only 60 of them to the screen, this would give really choppy results. Maybe not in monochrome, because you usually don't use monochrome for games with scrolling for example. But a few demos were coded for monochrome and I think they would look really choppy in such conditions with vsync=on as you described (you might try Monogatari http://www.pouet.net/prod.php?which=62120)

Nicolas

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Hatari 2.1.0 has been released

Postby Foxie » Sun Apr 08, 2018 12:10 am

npomarede wrote:But about generating 70 frames and displaying only 60 of them to the screen, this would give really choppy results. Maybe not in monochrome, because you usually don't use monochrome for games with scrolling for example. But a few demos were coded for monochrome and I think they would look really choppy in such conditions with vsync=on as you described (you might try Monogatari http://www.pouet.net/prod.php?which=62120)


Yeah, this is something that keeps me up at night. With 60Hz the new world standard for all things video, media produced in the age of 50Hz (or 70Hz DOS demos) is being ruined.

Dynamic refresh technologies look interesting. It would make sense to lower refresh rate to the bare minimum when idle to save power. I hope this will lead to computers in the future using freely adjustable refresh rates.

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Sun Apr 08, 2018 9:35 am

Foxie wrote:Yeah, this is something that keeps me up at night. With 60Hz the new world standard for all things video, media produced in the age of 50Hz (or 70Hz DOS demos) is being ruined.

Dynamic refresh technologies look interesting. It would make sense to lower refresh rate to the bare minimum when idle to save power. I hope this will lead to computers in the future using freely adjustable refresh rates.

Well, this already exists since some years (even if it was not designed for emulator at first). Nvidia's G-sync and AMD's freesync allow to choose the monitor refresh rate amongst a variable range (for example 30-144 Hz).
With such lcd monitor (and the corresponding video card), you can force your PC to run at 50 Hz and this will perfectly matches the emulated ST.
So far, it's not used in Hatari (as I don't have such HW setup to test it (but I'm planning to replace my aging PC soon, so maybe later)), but WinUAE already uses it successfully.

Nicolas

User avatar
Foxie
Captain Atari
Captain Atari
Posts: 354
Joined: Wed Feb 03, 2016 7:12 pm

Re: Hatari 2.1.0 has been released

Postby Foxie » Sat Apr 14, 2018 6:27 pm

Eero Tamminen wrote:Maybe VDI size should be restricted to <1024x768 when 4MB or more memory is used with TOS version <= 3?


Unfortunately it also happens with some resolutions less than 1024x768. Here's some tests using a MegaSTE 4MB TOS 2.06 (no NVDI):

16 colours

768x720: CRASH (size mod 256 = 0)
832x720: CRASH (size mod 256 = 0)
864x728: CRASH (size mod 256 = $80)
896x736: CRASH (size mod 256 = 0)
928x744: OK (size mod 256 = $80)
960x752: OK (size mod 256 = 0)
992x760: CRASH (size mod 256 = $80)
1024x768: CRASH (size mod 256 = 0)

Monochrome

768x720: CRASH
896x736: CRASH
896x752: OK
896x768: CRASH
1024x752: CRASH
1024x768: CRASH

The crashes also happen with 14MB.

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

Re: Hatari 2.1.0 has been released

Postby Eero Tamminen » Mon Apr 16, 2018 8:15 pm

Ok, I got the pattern now:
* On TOS <= 2.x and >= 4MB of RAM, screen width needs to be 128 + multiply of 256 pixels, regardless of how many planes there are
* With less RAM, TOS v3 or EmuTOS, it's enough for width to be multiply of 16 bytes (i.e. 128/planes)

I've commited a fix for this and update to documentation.

SuperBabyHix
Atariator
Atariator
Posts: 27
Joined: Sun Jan 24, 2016 10:36 pm

Re: Hatari 2.1.0 has been released

Postby SuperBabyHix » Mon Apr 16, 2018 9:47 pm

npomarede wrote:So far, it's not used in Hatari (as I don't have such HW setup to test it (but I'm planning to replace my aging PC soon, so maybe later)), but WinUAE already uses it successfully.

Nicolas


I'll have to double check when I get a chance, but I remember Hatari 2.1.0 working perfectly with my Freesync monitor.

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Mon Apr 16, 2018 10:19 pm

SuperBabyHix wrote:
npomarede wrote:So far, it's not used in Hatari (as I don't have such HW setup to test it (but I'm planning to replace my aging PC soon, so maybe later)), but WinUAE already uses it successfully.

Nicolas


I'll have to double check when I get a chance, but I remember Hatari 2.1.0 working perfectly with my Freesync monitor.

It should work correctly with freesync, but what I meant is that Hatari itself doesn't do anything with regard to freesync/gsync to try to force the PC's display to a specific refresh rate.
But of course if you manually set your video card under your OS to run at 50 Hz for example, then you should have a very smooth result when emulating games or demos runnig at 50 Hz.

SuperBabyHix
Atariator
Atariator
Posts: 27
Joined: Sun Jan 24, 2016 10:36 pm

Re: Hatari 2.1.0 has been released

Postby SuperBabyHix » Tue Apr 17, 2018 12:09 am

npomarede wrote:But of course if you manually set your video card under your OS to run at 50 Hz for example, then you should have a very smooth result when emulating games or demos runnig at 50 Hz.


So my experience with emulators and Freesync has been that you don't have to manually set the refresh rate if the emulator runs in exclusive fullscreen mode and lets you disable vsync. I've even noticed that it will kick in for some things running in borderless windowed mode. Mame is a good example. You don't have to manually set anything in the OS, no specific setting in Mame for variable refresh rate, it just automatically syncs to whatever the emulated games refreshes at.

Just tested Hatari again and it works perfectly. Drops to 50hz for color monitor mode and jumps up to 70hz for monochrome mode. Left my desktop set to 144Hz, didn't even have to exit out and relaunch the emulator. Just changed the screen setting and hit ok.

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Tue Apr 17, 2018 10:56 am

SuperBabyHix wrote:So my experience with emulators and Freesync has been that you don't have to manually set the refresh rate if the emulator runs in exclusive fullscreen mode and lets you disable vsync

Isn't that the opposite ? You need to enable vsync in Hatari screen option to have this to work.
I've even noticed that it will kick in for some things running in borderless windowed mode. Mame is a good example. You don't have to manually set anything in the OS, no specific setting in Mame for variable refresh rate, it just automatically syncs to whatever the emulated games refreshes at.

Just tested Hatari again and it works perfectly. Drops to 50hz for color monitor mode and jumps up to 70hz for monochrome mode. Left my desktop set to 144Hz, didn't even have to exit out and relaunch the emulator. Just changed the screen setting and hit ok.

But this was with "vsync" enabled in Hatari's setting ? Else I don't see how your monitor can switch to some different refresh rate.

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 700
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Hatari 2.1.0 has been released

Postby dhedberg » Tue Apr 17, 2018 1:04 pm

npomarede wrote:
SuperBabyHix wrote:Just tested Hatari again and it works perfectly. Drops to 50hz for color monitor mode and jumps up to 70hz for monochrome mode. Left my desktop set to 144Hz, didn't even have to exit out and relaunch the emulator. Just changed the screen setting and hit ok.

But this was with "vsync" enabled in Hatari's setting ? Else I don't see how your monitor can switch to some different refresh rate.

Please confirm that your monitor actually adapts to the refresh rate Hatari. If it does I'll buy one of those variable refresh rate monitors right away! :-)
Also, I have a question regarding the Falcon emulation of Hatari. If I remember correctly Hatari does not fully support all the features of the Videl of the Falcon030. Pleae excuse me if I'm mistaken. If I configure the Videl with a refresh rate to something like 55Hz, will Hatari respect that?
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

SuperBabyHix
Atariator
Atariator
Posts: 27
Joined: Sun Jan 24, 2016 10:36 pm

Re: Hatari 2.1.0 has been released

Postby SuperBabyHix » Tue Apr 17, 2018 1:52 pm

npomarede wrote:But this was with "vsync" enabled in Hatari's setting ? Else I don't see how your monitor can switch to some different refresh rate.


No, I have vsync disabled in Hatari. Vsync on would make the emulator try to sync to the monitors refresh rate. (144hz in my case) Vsync off with Freesync lets the monitor sync to whatever is being sent to the screen (It automatically drops down to 50hz). That's the whole deal with variable refresh rate monitors is that you don't have to manually set a refresh rate, they just adapt to whatever is being thrown at them.


dhedberg wrote:Please confirm that your monitor actually adapts to the refresh rate Hatari. If it does I'll buy one of those variable refresh rate monitors right away!


I'll try to make a video or something to show you when I get home. You won't be able to see how smooth it is or anything, but the monitor has a built in refresh rate counter that you should be able to see changing.

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 700
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Hatari 2.1.0 has been released

Postby dhedberg » Tue Apr 17, 2018 1:56 pm

SuperBabyHix wrote:
npomarede wrote:But this was with "vsync" enabled in Hatari's setting ? Else I don't see how your monitor can switch to some different refresh rate.


No, I have vsync disabled in Hatari. Vsync on would make the emulator try to sync to the monitors refresh rate. (144hz in my case) Vsync off with Freesync lets the monitor sync to whatever is being sent to the screen (It automatically drops down to 50hz). That's the whole deal with variable refresh rate monitors is that you don't have to manually set a refresh rate, they just adapt to whatever is being thrown at them.

I'll try to make a video or something to show you when I get home. You won't be able to see how smooth it is or anything, but the monitor has a built in refresh rate counter that you should be able to see changing.

Thanks! Appreciate it! I have a NVIDIA with G-Sync, but I guess with a G-Sync monitor things would work pretty much the same as with a Freesync card + monitor? As I understand it the technologies are pretty similar.
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Tue Apr 17, 2018 5:12 pm

SuperBabyHix wrote:
npomarede wrote:But this was with "vsync" enabled in Hatari's setting ? Else I don't see how your monitor can switch to some different refresh rate.


No, I have vsync disabled in Hatari. Vsync on would make the emulator try to sync to the monitors refresh rate. (144hz in my case) Vsync off with Freesync lets the monitor sync to whatever is being sent to the screen (It automatically drops down to 50hz). That's the whole deal with variable refresh rate monitors is that you don't have to manually set a refresh rate, they just adapt to whatever is being thrown at them.

OK, my mistake then. I thought variable refresh rate needed some special system call to be sent to the video driver, which Hatari doesn't do at all, but it seems SDL2 handles this automatically when Hatari calls SDL_RenderPresent() and vsync is off to put each new emulated frame on screen.

I need to update my PC setup to sthg more recent and a new monitor with gsync is already planned on my shopping list :) So hopefully I will be able to do more tests with variable refresh rates (as I don't think any of the main Hatari developers are already working with freesync/gsync monitor).
What OS are you using in your case ?

Nicolas

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Tue Apr 17, 2018 5:15 pm

dhedberg wrote:Also, I have a question regarding the Falcon emulation of Hatari. If I remember correctly Hatari does not fully support all the features of the Videl of the Falcon030. Pleae excuse me if I'm mistaken. If I configure the Videl with a refresh rate to something like 55Hz, will Hatari respect that?

I don't know, I don't use Falcon mode that much and this part of the videl emulation was not written by me. Falcon will support some VGA modes, but I don't know what refresh rate this will imply during emulation.

Nicolas

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 700
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Hatari 2.1.0 has been released

Postby dhedberg » Tue Apr 17, 2018 5:31 pm

npomarede wrote:
dhedberg wrote:Also, I have a question regarding the Falcon emulation of Hatari. If I remember correctly Hatari does not fully support all the features of the Videl of the Falcon030. Pleae excuse me if I'm mistaken. If I configure the Videl with a refresh rate to something like 55Hz, will Hatari respect that?

I don't know, I don't use Falcon mode that much and this part of the videl emulation was not written by me. Falcon will support some VGA modes, but I don't know what refresh rate this will imply during emulation.

Is it something that is actively worked on? If not I might be interested in contributing as I have an interest in the Videl part (demo programming). Need to find some time first though. :-)
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

User avatar
npomarede
Atari God
Atari God
Posts: 1237
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Hatari 2.1.0 has been released

Postby npomarede » Tue Apr 17, 2018 7:52 pm

dhedberg wrote:Is it something that is actively worked on? If not I might be interested in contributing as I have an interest in the Videl part (demo programming). Need to find some time first though. :-)

There was some interest by Laurent S (thadoss) who worked on the videl part some times ago, but there was not much improvements lately. Some parts might require more accurate cycle counting for 68030, which is not always correct at the moment, but there're certainly other parts to improve that don't depend on cpu timings.
You can have a look to videl.c but as you say, time is the main limiting factor for everybody :)

User avatar
LaurentS
Captain Atari
Captain Atari
Posts: 267
Joined: Mon Jan 05, 2009 5:41 pm

Re: Hatari 2.1.0 has been released

Postby LaurentS » Tue Apr 17, 2018 8:45 pm

Hi,

Feel free to improve videl as you want. I really have too few spare time actually to work on it.
Best regards
Thadoss

SuperBabyHix
Atariator
Atariator
Posts: 27
Joined: Sun Jan 24, 2016 10:36 pm

Re: Hatari 2.1.0 has been released

Postby SuperBabyHix » Wed Apr 18, 2018 1:55 am

dhedberg wrote:Thanks! Appreciate it! I have a NVIDIA with G-Sync, but I guess with a G-Sync monitor things would work pretty much the same as with a Freesync card + monitor? As I understand it the technologies are pretty similar.


Ok, I made a quick video so you can see how Freesync functions with Hatari. https://youtu.be/OfVgewGqYRM

I would assume G-sync would behave the same way, but I have no experience with it. I loaded up a game at random and oddly it seemed to be a 60hz game. If you would like me to try a particular game or demo, or any other emulator just let me know.

npomarede, I forgot to mention, I am using Windows 10.

User avatar
dhedberg
Atari Super Hero
Atari Super Hero
Posts: 700
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Hatari 2.1.0 has been released

Postby dhedberg » Wed Apr 18, 2018 8:43 am

SuperBabyHix wrote:
dhedberg wrote:Thanks! Appreciate it! I have a NVIDIA with G-Sync, but I guess with a G-Sync monitor things would work pretty much the same as with a Freesync card + monitor? As I understand it the technologies are pretty similar.

Ok, I made a quick video so you can see how Freesync functions with Hatari. https://youtu.be/OfVgewGqYRM

I would assume G-sync would behave the same way, but I have no experience with it. I loaded up a game at random and oddly it seemed to be a 60hz game. If you would like me to try a particular game or demo, or any other emulator just let me know.

Seems a bit odd to me. I used to own that game and I can't remember it being 60Hz? Could you try a demo? Thanks!
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

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

Re: Hatari 2.1.0 has been released

Postby Eero Tamminen » Wed Apr 18, 2018 10:19 pm

Probably the main gap in Videl emulation is that it gets palette only at VBL, so none of the raster effects works with it. There are also few other gaps which are mentioned in the compatibility.html and todo.txt docs.

SuperBabyHix
Atariator
Atariator
Posts: 27
Joined: Sun Jan 24, 2016 10:36 pm

Re: Hatari 2.1.0 has been released

Postby SuperBabyHix » Thu Apr 19, 2018 12:21 am

dhedberg wrote:Seems a bit odd to me. I used to own that game and I can't remember it being 60Hz? Could you try a demo? Thanks!


I recorded a few more games and a demo https://youtu.be/0s6acXdJfJY. Also, I think the release of Ikari Warriors I ran before was NTSC fixed, so I ran a different one and it ran at 50.

User avatar
Estrayk
Captain Atari
Captain Atari
Posts: 185
Joined: Mon Nov 23, 2015 2:52 pm
Location: Spain

Re: Hatari 2.1.0 has been released

Postby Estrayk » Mon Apr 23, 2018 12:25 am

Btw, a curiosity, had testing today the MorphOS port, works like a charm!

https://www.youtube.com/watch?v=n8m7bM6IkeM

・Falcon ct60e・Atari MegaSTE ・Atari STe ・MIST ・


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 1 guest