Current SheepShaver code, built for macOS

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

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

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

I fixed the link. Some invisible characters were somehow inserted between "/" and "sheepshaverforum".

This build now works fine in Sierra.
(The only remaining issue is the initial blank screen after using Ctrl-return for changing between window and full-screen mode before any mouse clicks were made.)

Apparently there are more problems involved for the issue in High Sierra.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

The latest commit, dcbbf18, fixes Ctrl-F5 in High Sierra. The blank screen problem (when toggling between full-screen and windowed mode) seems to be reduced almost entirely; there is a brief pause before the screen is restored, but it does get restored.

I think it's now possible to use a build based on this code as the preferred build, but that's your decision!
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

If this build works, I will post it as recommended build for OSX 10.10 through macOS 10.13.

http://ronaldpr.home.xs4all.nl/sheepsha ... 7_test.zip
Last edited by Ronald P. Regensburg on Sun Nov 26, 2017 9:31 am, edited 2 times in total.
Reason:  
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Current SheepShaver code, built for macOS

Post by 24bit »

Thanks Ronald!
Looks good on my side (Sierra). I´m not using SS that much these days though.
The stack/heap collision in 7.6 was fixed obviously.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

There is still a white screen issue after minimizing or hiding the window. A right-click (or Control-click) brings back the content of the window, albeit with the color issue that is already known with all builds after 2010. (Solved by forcing a redraw by changing and changing back color depth or screen resolution inside SheepShaver.)
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

Ronald,

Could you post details on GitHub? It looks as if the developers are interested in solving these things!
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

Well, Alexei (asvitkine) reverted the pull request #112 after I identified it as the culprit

I am still trying to sort the bugs with clear screen and false colors that are probably all also SDL related.

1. The issue with false colors after hiding SheepShaver seems to be partly resolved and hiding is now even a quick solution for the false colors after minimizing the window. Not a complete resolution, but certainly an improvement:

- When showing SheepShaver again after hiding it, the window will now return with correct colors and those colors will stay correct when clicking inside the window.

- After minimizing the window, the window will come back with blank screen, but simply hiding and again showing SheepShaver will bring back the correct colors. This can be repeated again and again.

- Clicking or moving the mouse in that blank window will show the false colors. In the past we needed to force-redraw the window content by changing and changing back color depth or screen resolution inside SheepShaver. But now a simple hiding and again showing SheepShaver will make the window return with correct colors. Also this can be repeated again and again.

So, when you want SheepShaver window out of the way temporarily, hiding is the easiest way to do that now and there will be no problems with the colors.

2. Weird behavior will occur after toggling from window mode to full-screen mode and back again. Something seems to have changed permanently. After that, SheepShaver can be hidden only once.

3. Even stranger, when Night Shift is active (I have it set to work from sunset to sunrise) the brightness setting in macOS (Sierra) is up one step each time after repeating toggling from window mode to full-screen mode and back again.

Both 2. and 3. occur also with my 2014 build, so nothing new here. (Only Night Shift is new in macOS.)
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

What I hope for most for SheepShaver is an SDL2-based version. David Ludwig seems to be making progress on this. I also tried another SDL2 version (I forget whose), and it built successfully, but wouldn't run. But SDL2 should resolve these issues.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

Wiil be a lot of work to get it right. SDL2 is very different from previous versions.
And we need a 64-bit version that works in current macOS versions. Starting with macOS 14, 32-bit applications will no longer run in macOS.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Current SheepShaver code, built for macOS

Post by kanjitalk755 »

I'm developing 64-bit SheepShaver for current macOS.
JIT is also available.

https://github.com/kanjitalk755/macemu/releases
User avatar
adespoton
Forum All-Star
Posts: 4225
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Current SheepShaver code, built for macOS

Post by adespoton »

Are you developing with David Ludwig's SDL2 code in mind? SDL 1.2 will likely have issues with macOS 14 as well.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

This seems to solve the bug that changes the color palette when SheepShaver is minimized, etc., though I don't know whether it introduces any bad effects.

In video_sdl.cpp, comment out the line that I've indicated with "////// " below:

Code: Select all

// Application activate/deactivate
			case SDL_ACTIVEEVENT:
				// Force a complete window refresh when activating, to avoid redraw artifacts otherwise.
				////// if (event.active.gain && (event.active.state & SDL_APPACTIVE))
					force_complete_window_refresh();
				break;
There's a slight "snap" in the video when the app gets restored from the minimized state, but that's a lot better than the wrong palette colors.

I don't claim to understand any of this, but it seems that this also works (simply truncating the line that is commented out in the earlier code block, instead of removing it entirely):

Code: Select all

// Application activate/deactivate
			case SDL_ACTIVEEVENT:
				// Force a complete window refresh when activating, to avoid redraw artifacts otherwise.
            if (event.active.gain)           // changed by removing second condition
					force_complete_window_refresh();
				break;
Since I don't know what all this means, I hope someone who is more expert than I am can get it completely right.
Last edited by emendelson on Fri Dec 01, 2017 8:24 pm, edited 1 time in total.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

And here is a build of SheepShaver, made with kanjitalk755's project, with the color-palette fix described in the previous message. The only other changes are in the info.plist: the date has been added to the build, and the app will run only in 64-bit mode (and in fact runs in 64-bit mode when tested in Activity Monitor, unless I'm wrong about this):

EDIT: Replaced with a build in a later message, below.
Last edited by emendelson on Fri Dec 01, 2017 9:45 pm, edited 1 time in total.
User avatar
adespoton
Forum All-Star
Posts: 4225
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Current SheepShaver code, built for macOS

Post by adespoton »

My guess is that the SDL_APPACTIVE flag isn't set correctly under macOS 10.13. Since I've seen this issue in other SDL 1.2 projects as well, this makes sense.

End result is that the test fails even though the app is active, resulting in a failure to refresh.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

adespoton wrote:My guess is that the SDL_APPACTIVE flag isn't set correctly under macOS 10.13. Since I've seen this issue in other SDL 1.2 projects as well, this makes sense.

End result is that the test fails even though the app is active, resulting in a failure to refresh.
Yes, but the color-palette problem has existed in many earlier macOS/OS X versions, so it doesn't seem like 10.13 problem. But I don't know anything about the details, of course.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

The color palette bug must have been introduced in either BasiliskII/SheepShaver code or in SDL (at that time SDL1 was still in active development). My last SheepShaver build that does not exhibit this issue dates from October 2009.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

Ronald, please try the one I posted. And of course feel free to post it anywhere you like.

EDIT: But this isn't ready for the world yet, because Ctrl-F5 still causes problems that don't occur in the standard cebix/macemu code.

EDIT: But the fix works with the main cebix/macemu code also.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

emendelson wrote:Since I don't know what all this means, I hope someone who is more expert than I am can get it completely right.
I am no expert, far from, but I would be inclined to reverse the statements:

Code: Select all

			// Application activate/deactivate
			case SDL_ACTIVEEVENT:
				// Force a complete window refresh when activating, to avoid redraw artifacts otherwise.
				if ((event.active.state & SDL_APPACTIVE) && event.active.gain)
					force_complete_window_refresh();
				break;
I have no time at this moment to try this, maybe tomorrow.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

Unfortunately that doesn't work - it leaves the screen blank after restoring from the minimized state.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

emendelson wrote:Unfortunately that doesn't work - it leaves the screen blank after restoring from the minimized state.
Oh well...
Ronald, please try the one I posted. And of course feel free to post it anywhere you like.
Which one do you mean? I tried the one you posted earlier in this thread and commented on it. It uses the patched SDL but not yet the Ctrl-F5 fix.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

Ronald, please try the one I posted. And of course feel free to post it anywhere you like.
Which one do you mean? I tried the one you posted earlier in this thread and commented on it. It uses the patched SDL but not yet the Ctrl-F5 fix.[/quote]

Yes, I meant the one that I posted in the post that begins "And here is a build of SheepShaver, made with kanjitalk755's project, with the color-palette fix described in the previous message. The only other changes are in the info.plist: the date has been added to the build, and the app will run only in 64-bit mode (and in fact runs in 64-bit mode when tested in Activity Monitor, unless I'm wrong about this)."

Now that I realize that Ctrl-F5 doesn't work, the interesting thing about it is that it runs in 64-bit mode only. I hope Kanjitalk755 can bring Ctrl-F5 into the same working condition that it is in the cebix/macemu code, because then we would have a working 64-bit-only version.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

OK, I've now replaced video_sdl.cpp and adb.cpp in kanjitalk755's code with the current versions of those files in cebix/macemu, and applied the color-palette fix described above. This build now runs in 64-bit mode only, does not have the color-palette bug (or works around it, anyway), and works correctly with Ctrl-F5:

EDIT: Link removed; see a later post for current version.

Again, feel free to post or upload anywhere.
Last edited by emendelson on Sat Dec 02, 2017 3:10 pm, edited 1 time in total.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Current SheepShaver code, built for macOS

Post by kanjitalk755 »

adespoton wrote:Are you developing with David Ludwig's SDL2 code in mind? SDL 1.2 will likely have issues with macOS 14 as well.
I have confirmed that my code and David's one can be merged, built and run.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Current SheepShaver code, built for macOS

Post by emendelson »

kanjitalk755 wrote:
adespoton wrote:Are you developing with David Ludwig's SDL2 code in mind? SDL 1.2 will likely have issues with macOS 14 as well.
I have confirmed that my code and David's one can be merged, built and run.
We would be very grateful if you could post the merged code!
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Current SheepShaver code, built for macOS

Post by Ronald P. Regensburg »

Even more grateful if these changes could eventually be merged with the main branch in cebix-macemu.
Post Reply