SheepShaver test builds for macOS and Retina screen

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

SheepShaver test builds for macOS and Retina screen

Post by Ronald P. Regensburg »

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
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SheepShaver test builds for macOS and Retina screen

Post by adespoton »

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.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: SheepShaver test builds for macOS and Retina screen

Post by Ronald P. Regensburg »

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
Last edited by Ronald P. Regensburg on Sat Feb 23, 2019 5:12 pm, edited 1 time in total.
Reason:  
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SheepShaver test builds for macOS and Retina screen

Post by adespoton »

"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
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: SheepShaver test builds for macOS and Retina screen

Post by Ronald P. Regensburg »

Thanks. Now have the fix by 'DrLex' be added to kanjitalk755/macemu.
DrLex
Tinkerer
Posts: 84
Joined: Sun Nov 19, 2006 6:01 pm
Location: Belgium

Re: SheepShaver test builds for macOS and Retina screen

Post by DrLex »

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.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: SheepShaver test builds for macOS and Retina screen

Post by Ronald P. Regensburg »

Great. Will you open a pull request at kanjitalk/macemu with your fix in BasiliskII/src/SDL/video_sdl2.cpp?
DrLex
Tinkerer
Posts: 84
Joined: Sun Nov 19, 2006 6:01 pm
Location: Belgium

Re: SheepShaver test builds for macOS and Retina screen

Post by DrLex »

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.
Elyus
Tinkerer
Posts: 94
Joined: Wed Mar 21, 2012 12:35 am

Re: SheepShaver test builds for macOS and Retina screen

Post by Elyus »

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
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: SheepShaver test builds for macOS and Retina screen

Post by kanjitalk755 »

I have merged the PR.
Thanks to Elyus the stability of BII/SS is improved.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SheepShaver test builds for macOS and Retina screen

Post by adespoton »

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.
Post Reply