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

Current SheepShaver code, built for macOS
https://www.emaculation.com/forum/viewtopic.php?f=20&t=9535
Page 2 of 4

Author:  Ronald P. Regensburg [ Sat Nov 25, 2017 8:21 am ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  emendelson [ Sat Nov 25, 2017 11:16 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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!

Author:  Ronald P. Regensburg [ Sun Nov 26, 2017 9:29 am ]
Post subject:  Re: Current SheepShaver code, built for macOS

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

Author:  24bit [ Sun Nov 26, 2017 11:07 am ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  Ronald P. Regensburg [ Sun Nov 26, 2017 12:03 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.)

Author:  emendelson [ Sun Nov 26, 2017 12:26 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

Ronald,

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

Author:  Ronald P. Regensburg [ Thu Nov 30, 2017 8:04 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.)

Author:  emendelson [ Thu Nov 30, 2017 9:23 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  Ronald P. Regensburg [ Fri Dec 01, 2017 10:25 am ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  kanjitalk755 [ Fri Dec 01, 2017 4:20 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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

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

Author:  adespoton [ Fri Dec 01, 2017 5:41 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

Are you developing with David Ludwig's SDL2 code in mind? SDL 1.2 will likely have issues with macOS 14 as well.

Author:  emendelson [ Fri Dec 01, 2017 7:45 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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:
// 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:
// 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.

Author:  emendelson [ Fri Dec 01, 2017 8:00 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  adespoton [ Fri Dec 01, 2017 8:04 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  emendelson [ Fri Dec 01, 2017 8:06 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  Ronald P. Regensburg [ Fri Dec 01, 2017 8:18 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  emendelson [ Fri Dec 01, 2017 8:23 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  Ronald P. Regensburg [ Fri Dec 01, 2017 8:44 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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:
         // 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.

Author:  emendelson [ Fri Dec 01, 2017 8:48 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

Unfortunately that doesn't work - it leaves the screen blank after restoring from the minimized state.

Author:  Ronald P. Regensburg [ Fri Dec 01, 2017 9:21 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

emendelson wrote:
Unfortunately that doesn't work - it leaves the screen blank after restoring from the minimized state.

Oh well...

Quote:
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.

Author:  emendelson [ Fri Dec 01, 2017 9:25 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

Quote:
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.

Author:  emendelson [ Fri Dec 01, 2017 9:44 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  kanjitalk755 [ Sat Dec 02, 2017 11:47 am ]
Post subject:  Re: Current SheepShaver code, built for macOS

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.

Author:  emendelson [ Sat Dec 02, 2017 1:23 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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!

Author:  Ronald P. Regensburg [ Sat Dec 02, 2017 2:14 pm ]
Post subject:  Re: Current SheepShaver code, built for macOS

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

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