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.

npomarede wrote:Hibut 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?

npomarede wrote:Hibut 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)

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.

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.

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)

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.

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.

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.

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?

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.

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.

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 ?

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.

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.

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

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.

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.

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.

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!

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.