E-Maculation
https://www.emaculation.com/forum/

SheepShaver test builds for macOS and Retina screen
https://www.emaculation.com/forum/viewtopic.php?f=20&t=10075
Page 1 of 1

Author:  Ronald P. Regensburg [ Sat Feb 23, 2019 11:04 am ]
Post subject:  SheepShaver test builds for macOS and Retina screen

In order to shortcut discussions in different topics about possible causes for issues with Retina screens, I built two versions of SheepShaver from current kanjitalk755/macemu source using Xcode 10.1, "SheepShavertest1" and "SheepShavertest2".

Both are flagged high-resolution capable and both use SDL2-2.0.9 (Until now, my builds used SDL2-2.0.8.)
The only difference between the two is that in SheepShavertest2 the fix for high-resolution screens was applied as described by "DrLex" here: viewtopic.php?f=20&t=10072

On my late 2013 iMac with 1920 x 1080 screen and running High Sierra 10.13.6 I see no difference at all with my previous builds, not in display quality nor in performance.

Test results on Macs with Retina screens much appreciated.

Downloads:
http://ronaldpr.home.xs4all.nl/sheepsha ... rtest1.zip
http://ronaldpr.home.xs4all.nl/sheepsha ... rtest2.zip

Author:  adespoton [ Sat Feb 23, 2019 4:36 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

Here you go, from my mid-2015 MBP
ImageSheepShavertest1

ImageSheepShavertest2

I can't really see any difference myself there... I was noticing that earlier too; the latest kanjitalk sdl2 builds aren't showing the blurriness that was being described.

Author:  Ronald P. Regensburg [ Sat Feb 23, 2019 5:08 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

And in Finder Info for the applications the option "Open in Low Resolution" was not checked?

Then, as far as I can tell, the issue where only the lower left corner of the SheepShaver desktop was shown in the window, was a bug in SDL2-2.0.8.

According to 'DrLex', the advantages of the test2 application should only be manifest, especially in full-screen mode, when the 'scale_nearest true' option is activated in the prefs.
See example: viewtopic.php?f=20&t=10072
See how-to: https://www.emaculation.com/doku.php/sh ... uilds_only

Author:  adespoton [ Sat Feb 23, 2019 5:29 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

"Open in Low Resolution" was not checked. It does appear this was an SDL2.0.8 issue. That also explains the errors I reported when I was still running my previous SDL2 (which I think was 2.06).

I don't think I set scale_nearest true though; let me test again with that.

[edit] That's the ticket; with scale_nearest true, there's a marked difference between the two. But the other error seems to be a 2.0.8 issue.

ImageSheepShavertest2-scale_nearest

Author:  Ronald P. Regensburg [ Sat Feb 23, 2019 5:50 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

Thanks. Now have the fix by 'DrLex' be added to kanjitalk755/macemu.

Author:  DrLex [ Sat Feb 23, 2019 6:11 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

Thanks for making these test builds. The SheepShavertest2 build runs fine and has crisp graphics when using scale_nearest.

In the meantime I have done a test with SDL 2.0.8 and I can confirm that it has the ‘zoom’ bug if the hi-res flag was set in the plist but not in the source code. With both flags enabled, it works correctly, but these results are only of academic value if all builds will now be made with 2.0.9 of course :smile:
I also have compared performance and I can't see a difference between builds with either high resolution enabled or not.

Author:  Ronald P. Regensburg [ Sat Feb 23, 2019 6:20 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

Great. Will you open a pull request at kanjitalk/macemu with your fix in BasiliskII/src/SDL/video_sdl2.cpp?

Author:  DrLex [ Sat Feb 23, 2019 7:12 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

Done
Ronald P. Regensburg wrote:
Great. Will you open a pull request at kanjitalk/macemu with your fix in BasiliskII/src/SDL/video_sdl2.cpp?

Done.

Author:  Elyus [ Tue Feb 26, 2019 1:32 am ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

The new scaling is great! I hadn't realized how blurry most of the UI had been until I saw the upscaled version. Thanks to everyone for the work that's gone into this.

When testing, I came across the SDL2 freezing bug kanjitalk and I discussed back in this topic. He had fixed the crashing with mutexes, and I had patched my local build's update_display_static_bbox function to always redraw. That didn't work for the latest version, so I did some more testing and found the deadlock condition:

Image

The buffer update thread (green), is locking the buffer and then the palette, but the drawing thread (in red) locks the palette and then the buffer. I've only encountered this hang when playing old games like Warcraft II, but it is a potential deadlock that could occur during any task if the timing is just right to be wrong.

Aside from using try_lock or some multi-mutex locking function, I think the easiest fix is to change the palette function to lock the video buffer before locking and checking the palette. I've tested this on my local build, and it appears to remove the deadlock. I'll add a pull request for kanjitalk so he can take a look as well.

Edit: here's the pr

Author:  kanjitalk755 [ Wed Feb 27, 2019 6:26 am ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

I have merged the PR.
Thanks to Elyus the stability of BII/SS is improved.

Author:  adespoton [ Wed Feb 27, 2019 4:53 pm ]
Post subject:  Re: SheepShaver test builds for macOS and Retina screen

Well done! That's a long-standing bug (I remember experiencing it back in 2006), and I've never had the time to chase it down.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/