Page 2 of 4

Re: Current SheepShaver code, built for macOS

Posted: Sat Nov 25, 2017 8:21 am
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.

Re: Current SheepShaver code, built for macOS

Posted: Sat Nov 25, 2017 11:16 pm
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!

Re: Current SheepShaver code, built for macOS

Posted: Sun Nov 26, 2017 9:29 am
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

Re: Current SheepShaver code, built for macOS

Posted: Sun Nov 26, 2017 11:07 am
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.

Re: Current SheepShaver code, built for macOS

Posted: Sun Nov 26, 2017 12:03 pm
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.)

Re: Current SheepShaver code, built for macOS

Posted: Sun Nov 26, 2017 12:26 pm
by emendelson
Ronald,

Could you post details on GitHub? It looks as if the developers are interested in solving these things!

Re: Current SheepShaver code, built for macOS

Posted: Thu Nov 30, 2017 8:04 pm
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.)

Re: Current SheepShaver code, built for macOS

Posted: Thu Nov 30, 2017 9:23 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 10:25 am
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 4:20 pm
by kanjitalk755
I'm developing 64-bit SheepShaver for current macOS.
JIT is also available.

https://github.com/kanjitalk755/macemu/releases

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 5:41 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 7:45 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:00 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:04 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:06 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:18 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:23 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:44 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 8:48 pm
by emendelson
Unfortunately that doesn't work - it leaves the screen blank after restoring from the minimized state.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 9:21 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 9:25 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Fri Dec 01, 2017 9:44 pm
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.

Re: Current SheepShaver code, built for macOS

Posted: Sat Dec 02, 2017 11:47 am
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.

Re: Current SheepShaver code, built for macOS

Posted: Sat Dec 02, 2017 1:23 pm
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!

Re: Current SheepShaver code, built for macOS

Posted: Sat Dec 02, 2017 2:14 pm
by Ronald P. Regensburg
Even more grateful if these changes could eventually be merged with the main branch in cebix-macemu.