High Sierra

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

macman
Space Cadet
Posts: 7
Joined: Fri Jul 13, 2012 7:21 pm

High Sierra

Post by macman »

Anyone know if SheepShaver works under MacOS High Sierra?
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: High Sierra

Post by adespoton »

I don't know, but I will in 3 days :)

I'm pretty sure we would have heard from beta testers by now if it didn't though. And it's possible we've already had a thread on this from when the DP1 came out.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: High Sierra

Post by Ronald P. Regensburg »

If it will work, the existing builds here will only work in 32-bit mode.

I wonder if there will be differences in behaviour on HFS+ or APFS drives, especially regarding preservation or loss of classic Mac file properties when files are moved between guest and host systems. Will things like resource forks or Type an Creator metadata survive on a APFS file system?

(On a Mac with SSD boot drive, the upgrade to High Sierra will convert that drive from HFS+ to APFS.)
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

The beta is public, so there's no reason not to post this image. You can draw your own conclusions, though it may be worth making clear that files dragged from the unix folder to the emulated disk image run as ordinary OS 9 files, with their filetypes recognized. You can also infer this from the fact that they show the correct icons in the unix folder, which is only possible if the resource fork is present.

(The OS 9 system in the picture is my Mac OS 9 app described in the Other SheepShaver Configurations forum.)

Image
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: High Sierra

Post by adespoton »

Yeah; APFS still supports named forks, so resource handling should still work just fine.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: High Sierra

Post by adespoton »

High Sierra will, in Apple's own words, be the last macOS release that can support 32-bit macOS apps “without compromise.” And for apps distributed through the Mac App Store, there are two new dates to add to the timeline:

January 2018: All new apps submitted to the Mac App Store need to be 64-bit only.
June 2018: All new apps and updates to existing apps submitted to the Mac App Store need to be 64-bit only.

Apple hasn’t clarified what “without compromise” means, and presumably 32-bit apps from outside the Mac App Store will continue to run for at least the next year or two (if only via some kind of Rosetta-esque downloadable compatibility layer). But sooner rather than later, Apple is going to strip all the 32-bit libraries, apps, and codes out of macOS, just like it already did in iOS 11 this year.
Looks like October 2018 may be the end of the line for 32-bit SheepShaver on OS X, or it may be the beginning of the end, depending on how Apple handles things.

So we may want to put more energy into either the 64-bit build, or QEMU feature parity, or both.
macandnews
Student Driver
Posts: 13
Joined: Sun Nov 05, 2017 9:02 am

Re: High Sierra

Post by macandnews »

I have a square around the mouse cursor since installing High Sierra.

Does anyone have a solution?

Thank you
Sorry for my English, I use Google translation.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: High Sierra

Post by kanjitalk755 »

*** SDL_QuartzWM.m.orig 2012-01-19 01:30:06.000000000 +0900
--- SDL_QuartzWM.m 2017-11-09 19:14:13.000000000 +0900
*************** WMcursor* QZ_CreateWMCursor (_THIS,
*** 55,62 ****

/* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
for (i = 0; i < (w+7)/8*h; i++) {
! planes[0] = data ^ 0xFF;
! planes[1] = mask | data;
}

/* create image and cursor */
--- 55,62 ----

/* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
for (i = 0; i < (w+7)/8*h; i++) {
! planes[0] = ~data & mask;
! planes[1] = mask;
}

/* create image and cursor */
macandnews
Student Driver
Posts: 13
Joined: Sun Nov 05, 2017 9:02 am

Re: High Sierra

Post by macandnews »

Good evening,
Thanks for the answer, but I'm not a developer, what does it take for this code?

Thank you ;)
Sorry for my English, I use Google translation.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: High Sierra

Post by kanjitalk755 »

Handling of the alpha channel of mouse cursor has changed on High Sierra.
# I don't know this change is a bug or a specification.
The presented code is for adapting to this change.
You need to patch the SDL library and build SheepShaver to fix that problem.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: High Sierra

Post by kanjitalk755 »

Sorry, I modified the patch as follows.


*** SDL_QuartzWM.m.orig 2012-01-19 01:30:06.000000000 +0900
--- SDL_QuartzWM.m 2017-11-10 16:29:14.000000000 +0900
*************** WMcursor* QZ_CreateWMCursor (_THIS,
*** 55,61 ****

/* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
for (i = 0; i < (w+7)/8*h; i++) {
! planes[0] = data ^ 0xFF;
planes[1] = mask | data;
}

--- 55,61 ----

/* copy data and mask, extending the mask to all black pixels because the inversion effect doesn't work with Cocoa's alpha-blended cursors */
for (i = 0; i < (w+7)/8*h; i++) {
! planes[0] = ~data & mask;
planes[1] = mask | data[i];
}
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

I tried building with your first patch (in a Snow Leopard VMware system), but didn't see any change in the results. Will try again later today with your second patch - but, meanwhile, could you post a binary of the patched version? If I manage to make the patch work, I'll post something here, but you know a lot more about what is going on than I do...

Thank you!
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: High Sierra

Post by kanjitalk755 »

In my environment (Mac mini 2014, 10.13.1),
the transparent part of the mouse cursor becomes black.
It is a patch to make this phenomenon normal,
there will be no appearance change in previous OS.
And I can not upload the binary, sorry.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

I meant that I compiled in Snow Leopard in order to run it in High Sierra - I only know how to build SheepShaver in Snow Leopard. If you are able to build it in High Sierra, please let us know the details. Thank you!
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

A no-progress report. I'm trying to build SheepShaver under Snow Leopard in order to fix this bug in High Sierra. But obviously I don't understand the right way to go about this.

I tried patching SDL in Snow Leopard, building with Xcode and then copying the framework, but I then kept getting build errors when I used Xcode to build SheepShaver. After a couple of hours of failure, I think it's time for me to give up.

If anyone on the forum could explain how to apply this patch, and how to build SheepShaver with it, a lot of us will be grateful. Alternatively, if someone could build SheepShaver and link to a binary, at least we would be able to use SheepShaver without the bug.

Meanwhile, thanks to kanjitalk755 for providing the patch. I only hope someone can give more information on how to use it or provide a binary.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: High Sierra

Post by Ronald P. Regensburg »

I did not upgrade to macOS 10.13 yet, so I cannot check this. I suppose this issue with the cursor will only be manifest with the "hardware cursor" and not with the "software cursor". Does the problem only exist with SheepShaver in window mode and not with SheepShaver in full-screen mode? Then the problem is with the hardware cursor only and a simple edit in the file "video_sdl.cpp" could prevent the cursor change and thus make the software cursor be used in window mode also.
Last edited by Ronald P. Regensburg on Fri Nov 10, 2017 7:33 pm, edited 1 time in total.
Reason:  
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

The problem seems only to occur in windowed mode. Could you let us know what to change and where? (Presumably this requires rebuilding in Snow Leopard...?)
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: High Sierra

Post by kanjitalk755 »

I'll describe how to build SDL and SheepShaver in High Sierra using Xcode8.3.3

(1) download SDL-1.2.15.zip and unzip
(2) open SDL-1.2.15/Xcode/SDL/SDL.xcode
(3) set Deployment Target to 10.7
(4) set Header Search Paths to the directory contains X11 include files
(5) set Build Configuration to Release
(6) comment out #94 of SDL_QuartsVideo.h

Code: Select all

//      CGDirectPaletteRef palette;            /* palette of an 8-bit display */
(7) apply patch #58 of SDL_QuartsWM.m

Code: Select all

        planes[0][i] = ~data[i] & mask[i];
(8) build
(9) copy SDL.framework to /Library/Frameworks/

(10) download current source code of SheepShaver (cebix-macemu-e076409.zip) and unzip
(11) open SheepShaver/src/MacOSX/SheepShaver_Xcode8.xcodeprj
(12) set Build Configuration to Release
(13) build

On the other hand, I have confirmed to fix the problem by video_can_change_cursor() returning false.
This way is easier!
thanks to Ronald.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: High Sierra

Post by Ronald P. Regensburg »

emendelson wrote:The problem seems only to occur in windowed mode. Could you let us know what to change and where? (Presumably this requires rebuilding in Snow Leopard...?)
Search for "video_can_change_cursor" in BasiliskII/src/SDL/video_sdl.cpp. Make it to return false always. Though not very elegant, just changing "return quartzok;" to "return false;" will do.

Yes, you then need to compile SheepShaver again.

Cursor movements will be a little less smooth, now depending on refresh rate (frameskip) settings.
Last edited by Ronald P. Regensburg on Sat Nov 11, 2017 11:31 am, edited 1 time in total.
Reason:  
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

Thank you for this. Before I saw your post, I changed "video_can_change_cursor" by replacing "return quartzok" with "return false" and by replacing "return true" with "return false" and compiled. Here is my version:

https://www.dropbox.com/s/d7ow0uqscb3ic ... a.zip?dl=1

It uses my own minor changes in keyboard assignments, which you can see in the About SheepShaver box, and a different icon. Otherwise, it's standard 2014 SheepShaver code. (I should probably add something to indicate that it's a new build.) If no one posts a generic SheepShaver with the patch, I'll try to get around to it later.

Now that kanjitalk755 has posted instructions for building in High Sierra, I'll try to do that with the other patch, probably next week. My one question is: exactly where do you get the X1 includes, and where should they go? This isn't an issue in Snow Leopard, which includes X1, but it seems worth asking about it in later versions.

Thanks again.
Last edited by emendelson on Sat Nov 11, 2017 4:07 pm, edited 2 times in total.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: High Sierra

Post by Ronald P. Regensburg »

emendelson wrote:Thank you for this. Before I saw your post, I changed all the "return"s to "false"
all the "return"s?

Since Apple does not include X11 with OSX 10.8 and later, I use XQuartz:
https://www.xquartz.org/index.html
Last edited by Ronald P. Regensburg on Sat Nov 11, 2017 4:03 pm, edited 1 time in total.
Reason:  
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

Ronald P. Regensburg wrote:all the "return"s?
I edited my post to clarify!
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

I followed the instructions for building SDL-1.2.15 under High Sierra; I set the additional header files to /opt/X11/include, which seems to be where they are installed by XQuartz (which I installed per Ronald's advice).

The build failed with this error:

/Users/edward/Development/SDL-1.2.15/src/video/quartz/SDL_QuartzVideo.h:94:5: Unknown type name 'CGDirectPaletteRef'

which I fixed by applying this patch:

http://hg.libsdl.org/SDL/rev/bbfb41c13a87

Then I got this error:

/Users/edward/Development/SDL-1.2.15/src/video/x11/SDL_x11sym.h:168:17: Conflicting types for '_XData32'

But I solved that by applying the change in the first post in this thread:

https://bugs.archlinux.org/task/36179

I used that because I could do it by hand, changing only one line, unlike the other patches shown in the same thread.

Then I applied kanjitext755's patch, and built successfully in High Sierra.

The message at the top of the Xcode window is "SDL | Build Framework: Succeeded" - but I can't find SDL.framework anywhere. I realize that this is a very stupid question, but where is it??? I think (maybe stupidly) that I need to set something in the Installation directory (currently @rpath) and maybe the Runpath Search Paths (currently blank), but I have no idea of where to go next.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: High Sierra

Post by emendelson »

Following up on my last post:

If anyone can tell me how to create SDL.framework in the current version of Xcode, I'll be grateful. When I build it according to the steps in the previous message, Xcode says the build is successful, but I can't find SDL.framework anywhere, and a lot of time searching the web doesn't provide any clues.

EDIT: Some progress: I figured out that the DMG was not being built because the build script was trying to find some binaries in /Developer that are now in Xcode.app. I seem to have an SDL.framework built, but I still get an error message at the end of the SDL build. Still working on that.

Meanwhile, SheepShaver seems to build, but won't run. More about this tomorrow...
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: High Sierra

Post by kanjitalk755 »

Execute following command at terminal, and you'll find SDL.framework

open ~/Library/Developer/Xcode/DerivedData/SDL-*/Build/Products/Release
Post Reply