MacOSX/OSX/macOS 64-bit build for testing

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

emendelson
Forum All-Star
Posts: 1228
Joined: Tue Oct 14, 2008 12:12 am

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by emendelson »

Ronald P. Regensburg wrote:
emendelson wrote:Which source code did you use?
From here: https://github.com/kanjitalk755/macemu
Or from here: https://github.com/kanjitalk755/macemu/ ... nd_jvernet
My latest build is from the second source. It uses SDL2.framework and has some display improvements. Especially the improvement with window mode - full screen mode toggling is striking. Also getting back from hiding or window minimizing is now smooth, without the forced redraw.
Ah! I didn't realize that the second source was there! Thank you. I'll wait a few days to see if kanjitalk755 makes any further changes, and if not, I'll build from that source instead.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

emendelson wrote:Ah! I didn't realize that the second source was there! Thank you. I'll wait a few days to see if kanjitalk755 makes any further changes, and if not, I'll build from that source instead.
After I complained that different people were each doing their own thing without communicating back to cebix/macemu, kanjitalk755 merged the work in jvernet/macemu and DavidLudwig/macemu with his source. He then fixed several issues that I encountered while building and testing from that source. Most of it is discussed earlier in this thread.

When you build from this source, note that SDL2.framework not only needs to be installed in /Library/Frameworks/ but also in /Users/Library/Frameworks/. That last location is where the project looks for the SDL2.framework to be embedded in the application package.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

@ kanjitalk755
In builds from the combined source, I noticed a View menu with greyed out "Toggle Full Screen" item. Even if it would work, it cannot be used in full-screen mode to get back to window mode. May be better to remove that menu?
User avatar
Cat_7
Expert User
Posts: 5017
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Cat_7 »

@ kanjitalk755

Would you be able to look at mounting real cd's in OSX?

Best,
Cat_7
kanjitalk755
Mac Mechanic
Posts: 153
Joined: Thu Nov 09, 2017 12:06 pm

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by kanjitalk755 »

I have merged all my branches to master.

https://github.com/kanjitalk755/macemu
Ronald P. Regensburg wrote:@ kanjitalk755
In builds from the combined source, I noticed a View menu with greyed out "Toggle Full Screen" item. Even if it would work, it cannot be used in full-screen mode to get back to window mode. May be better to remove that menu?
Removed.
Cat_7 wrote:@ kanjitalk755

Would you be able to look at mounting real cd's in OSX?
I have compared device file of current macOS and 10.6.8.
When CD is mounted, its partition /dev/disk?s? is owned by user in 10.6.8, by root in 10.13.5.
Because the partition can be read by owner and operator group, you have to belong to operator group in case current macOS.
To do this, execute following command.

Code: Select all

$ sudo dscl . -append /Groups/operator GroupMembership <user name>
Take care this may make safety lower.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

kanjitalk755 wrote:I have merged all my branches to master.
When trying to build, I get an error:

/macemu-master/SheepShaver/src/kpx_cpu/sheepshaver_glue.cpp:50:10: 'SDL_events.h' file not found
kanjitalk755
Mac Mechanic
Posts: 153
Joined: Thu Nov 09, 2017 12:06 pm

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by kanjitalk755 »

Is /Library/Frameworks/SDL2.framework/Headers/SDL_events.h exist?
If not, you need re-install SDL2.framework.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

Ah, of course! I forgot that I removed SDL2.framework from Library/Frameworks/ to see if the embedded one did work in my previous build.

- I notice that you set the minimum system version to 10.7. Does it actually work in 10.7?

- I wonder if, with all these changes, the version number should not be raised to 2.5 or even 3.0.
kanjitalk755
Mac Mechanic
Posts: 153
Joined: Thu Nov 09, 2017 12:06 pm

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by kanjitalk755 »

Ronald P. Regensburg wrote:- I notice that you set the minimum system version to 10.7. Does it actually work in 10.7?
I can't confirm it because I don't have OS X 10.7.
Probably, the full screen feature is introduced in 10.7.
If someone reports that SheepShaver doesn't run in 10.7, I'll change deployment target to 10.8.
Ronald P. Regensburg wrote:- I wonder if, with all these changes, the version number should not be raised to 2.5 or even 3.0.
Yes, I have changed version number to 2.5.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

I will post this one for testing. In a new thread.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

kanjitalk755 wrote:
Ronald P. Regensburg wrote:@ kanjitalk755
In builds from the combined source, I noticed a View menu with greyed out "Toggle Full Screen" item. Even if it would work, it cannot be used in full-screen mode to get back to window mode. May be better to remove that menu?
Removed.
Mainly a cosmetic issue: When I launch SheepShaver, the View menu now appears for a moment in the menu bar and then immediately disappears.
kanjitalk755
Mac Mechanic
Posts: 153
Joined: Thu Nov 09, 2017 12:06 pm

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by kanjitalk755 »

Ronald P. Regensburg wrote:Mainly a cosmetic issue: When I launch SheepShaver, the View menu now appears for a moment in the menu bar and then immediately disappears.
SDL2 appends the View menu in its initialize sequence.
After that, SheepShaver deletes it.
Probably, to prevent display it at all, we need a patched SDL2.framework.
I think it's better to use standard framework than modified.
User avatar
adespoton
Forum All-Star
Posts: 3068
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by adespoton »

Agreed. It means that in the future we will have a much easier job updating.

We could always put something else in the View menu; but it's using the 10.7+ fullscreen right? So to get the menubar back, you just need to mouse to the top of the screen? If so, why not keep it there?
emendelson
Forum All-Star
Posts: 1228
Joined: Tue Oct 14, 2008 12:12 am

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by emendelson »

This is related to my question in another thread about building a Help menu under SDL2. I've been experimenting with this, but I don't know nearly enough to get it started, although I got it working under SDL1.2. If anyone (adespoton? you said you use these menus, if I remember) can get this started, I'll try to continue the work.
User avatar
adespoton
Forum All-Star
Posts: 3068
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by adespoton »

My understanding of SDL2 is limited, and so is my time, but I'll see if I can test some things out this summer. Can't promise more than that, unfortunately.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

adespoton wrote:We could always put something else in the View menu; but it's using the 10.7+ fullscreen right? So to get the menubar back, you just need to mouse to the top of the screen? If so, why not keep it there?
This possibility is intentionally disabled in SheepShaver because it would make it impossible to use the menu bar in the emulated machine. If one could "toggle" full screen through the View menu, a user who is not familiar with using control-return would not know how to get back to window mode.

See file /macemu-master/BasiliskII/src/SDL/video_sdl2.cpp

Code: Select all

#if __MACOSX__
						// HACK-FIX: on OSX hosts, make sure that the OSX menu
						// bar does not show up in fullscreen mode, when the
						// cursor is near the top of the screen, lest the
						// guest OS' menu bar be obscured.
						if (is_full) {
							extern void set_menu_bar_visible_osx(bool);
							set_menu_bar_visible_osx(false);
						}
#endif
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

kanjitalk755 wrote:I think it's better to use standard framework than modified.
I fully agree.
uyjulian
Apple Corer
Posts: 241
Joined: Fri Aug 27, 2010 1:02 am

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by uyjulian »

I can confirm that the 2018-06-16 build works fine on macOS 10.14 Mojave Beta 2 (18A314h) with JIT
emendelson
Forum All-Star
Posts: 1228
Joined: Tue Oct 14, 2008 12:12 am

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by emendelson »

Standard SheepShaver uses Ctrl-Return for full-screen toggle, but there are old applications that use Ctrl-Return, etc., for their own purposes, which you can't use if SheepShaver captures the keystroke for the full-screen toggle.

So here is a build of kanjitalk755's code that uses Ctrl-Option-Return, Ctrl-Option-Esc, and Ctrl-Option-F5 instead of the Ctrl-only keystrokes used by standard SheepShaver. It also has a smiling-Mac icon, for what that's worth, and the About SheepShaver menu item brings up a list of the three special keystrokes. Also, for what it's worth, it's codesigned.

http://www.columbia.edu/~em36/SheepShav ... n-SDL2.zip

Request to kanjitalk755: could you add to your code an is_alt_down function to match is_ctrl_down? I've added it to my code in order to use the Ctrl-Option keystrokes, and it seems to me that it can't do any harm to add it the standard code, so that developers can use it for custom keystrokes.

I'm still hoping for more advice on modifying the top-line menu to add a Help item as I've already done for SDL1.2. Kanjitalk755 showed which file to work with, but I haven't been able to figure out how to integrate it into his code.
Last edited by Ronald P. Regensburg on Wed Jun 27, 2018 6:05 pm, edited 1 time in total.
Reason: Corrected keystrokes. Edit requested by emendelson
kanjitalk755
Mac Mechanic
Posts: 153
Joined: Thu Nov 09, 2017 12:06 pm

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by kanjitalk755 »

I have appended "hotkey" keyword to preference item.
Conventionally hotkey is control key, you can now change it by adding "hotkey" keyword to pref file.

Code: Select all

1: control(default)
2: option
3: control+option
4: command
5: control+command
6: option+command
7: control+option+command
One more, if "ramsize" of preference item is less or equal than 1000, it is interpreted as mega bytes.
For example, following specifies 64MB.

Code: Select all

ramsize 64
emendelson
Forum All-Star
Posts: 1228
Joined: Tue Oct 14, 2008 12:12 am

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by emendelson »

kanjitalk755 wrote:I have appended "hotkey" keyword to preference item.
Conventionally hotkey is control key, you can now change it by adding "hotkey" keyword to pref file.

Code: Select all

1: control(default)
2: option
3: control+option
4: command
5: control+command
6: option+command
7: control+option+command
One more, if "ramsize" of preference item is less or equal than 1000, it is interpreted as mega bytes.
For example, following specifies 64MB.

Code: Select all

ramsize 64
Thank you for this! It all works perfectly.

I found only one aesthetic problem. If I edit .sheepshaver_prefs so that it has

Code: Select all

ramsize 128
then I correctly get 128MB in SheepShaver. But the Preferences pane shows 0 in the MB field. Is this something that's easy to fix?
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

emendelson wrote:I found only one aesthetic problem. If I edit .sheepshaver_prefs so that it has

Code: Select all

ramsize 128
then I correctly get 128MB in SheepShaver. But the Preferences pane shows 0 in the MB field. Is this something that's easy to fix?
Is this only aesthetic or does this break RAM setting in the preferences editor?
It used to be so that when RAM was set to 128MB, the prefs file would show

Code: Select all

ramsize 134217728
and vice versa.
kanjitalk755
Mac Mechanic
Posts: 153
Joined: Thu Nov 09, 2017 12:06 pm

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by kanjitalk755 »

Oh, I forgot. Fixed.
If you edit ram size by preferences editor, it's saved not megabytes but bytes.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

I see. One can set RAM size in MBs both in the prefs file and in the prefs editor. It will work either way. Nifty! :smile:

The choice of the 'hotkey' also works fine.

You are very quick with making small improvements. You must have a good overview over the code by now.
User avatar
Ronald P. Regensburg
Expert User
Posts: 6323
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: MacOSX/OSX/macOS 64-bit build for testing

Post by Ronald P. Regensburg »

Strange issue in the builds I have from kanjitalk755/macemu:

The key between between Z key and the shift key does not register.

In my latest build from cebix/macemu it works OK, with same prefs, same ROM file, same HD-image, same keycodes file.
Post Reply