System 7 coexisting with macOS X

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

User avatar
gingerbeardman
Tinkerer
Posts: 88
Joined: Mon Aug 06, 2018 2:58 pm
Location: UK
Contact:

System 7 coexisting with macOS X

Post by gingerbeardman »

BasiliskII System 7 coexisting with macOS X

Similar to Unity mode in VMware Fusion.

https://twitter.com/maczydeco/status/11 ... 31778?s=21

Not mine, but very cool !

Image
• BasiliskII on iPad Pro 12.9": Macintosh IIci 32MB + System 7.5.5 + Deneba artWORKS & UltraPaint
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

Wow, that’s very cool indeed!

Any chance to do this with SheepShaver as well?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

I was able to build this under Mojave by doing this:

Download the source code from:

https://github.com/zydeco/macemu/tree/rootless

Open a terminal in the BasiliskII/src/Unix folder and run:

.autogen.sh

Then open the BasiliskII MacOS Xcode project. Change the schemes to release; change the Build System to Legacy Build System. Build BasiliskII. (EDIT: unnecessary steps removed.)

EDIT: Run it once with the normal settings in the prefs file. Choose an app that you want to run in a window and place an alias to it in the System/Startup Items folder.

Then edit the prefs file so that win is set to "rootless" (no quotation marks), not win/nnn/nnn or anything else.

Launch BasiliskII; you'll see the startup screen briefly, then a window with the app that you started from the Startup Items group. The macOS topline menu will be hidden by a System 7 top-line menu for the app that you started (I'm using WordPerfect). Use that to open files, save them to the Unix folder, etc.. When you quit your application, you'll see the Finder menu in the top-line menu and can quit BasiliskII. (I have a shortcut to a Shut Down script in the Apple Menu, so I don't need to do this.)

With my disk image, at least, it seems unstable (as the author warns), and launches correctly about one in five or more tries, but it's very impressive to see when it starts. There are screen artifacts in the application window, which I can clear out by launching and then quitting SimpleText. All this will probably get fixed in the future. Again, this very impressive.

EDIT: If it doesn't launch, try again and again until it does. As I said above, I typically have to double-click on the app at least five or six times. Typically, it shows the System 7 start screen briefly on the fourth try, then finally opens correctly on the sixth or seventh try.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

And if anyone wants to experiment with this, here's a copy built under Mojave and notarized:

http://www.columbia.edu/~em36/BasiliskI ... -prefs.zip

I made two changes in the source code, so that this build can coexist with your existing BII setup: the prefs file for this build is

.basilisk_rootless_prefs

and the PRAM file is

.basilisk_rootless_xpram

To run the new build, simply copy your existing .basilisk_ii_prefs file to .basilisk_rootless_prefs. Then you can edit the file to replace the line

screen win/nnn/nnn (or whatever)

with

screen rootless
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: System 7 coexisting with macOS X

Post by kanjitalk755 »

Zydeco's rootless is unstable because using JIT-enabled BasiliskII.
So I have made JIT-disabled version and its pull request.

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

https://github.com/zydeco/macemu/pull/1
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

Great, thank you!

I don’t use or need Basilisk II but am tempted to test it only for the rootless mode. It will be somewhere in the beginning of next year as I have no time at the moment.

If this turns out to be stable in the long run, do you guys think it would make sense to add rootless mode to the master branch?

And a question to kanjitalk755: Do you think the code for rootless mode could be added to SheepShaver as well?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

Using kanjitalk755's new code (thank you!) I've updated the notarized build that I posted earlier. Same download link:

http://www.columbia.edu/~em36/BasiliskI ... -prefs.zip

As before, I made two changes in the source code, so that this build can coexist with your existing BII setup: the prefs file for this build is

.basilisk_rootless_prefs

and the PRAM file is

.basilisk_rootless_xpram

To run the new build, simply copy your existing .basilisk_ii_prefs file to .basilisk_rootless_prefs. Then you can edit the file to replace the line

screen win/nnn/nnn (or whatever)

with

screen rootless
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: System 7 coexisting with macOS X

Post by kanjitalk755 »

mabam wrote:And a question to kanjitalk755: Do you think the code for rootless mode could be added to SheepShaver as well?
Zydeco patched ToolBox with 68k code to achieve rootless behavior.
If the same is possible with PowerPC, I think that SheepShaver will be rootless.
I don't know if it can actually be coded.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

I’ve just tested this on two different machines, one running High Sierra and one Mountain Lion. But there’s just a black/gray background on both of them. Could this be related to the ROM? I’m using the Performa ROM.

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

Re: System 7 coexisting with macOS X

Post by emendelson »

I use Performa630.Rom and built under High Sierra. I use system 7.6.1. Maybe try that version?
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

I tried 7.6 with your ROM, but same result.
Maybe the amended code or the build isn’t compatible with High Sierra and older?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

mabam wrote:I tried 7.6 with your ROM, but same result.
Maybe the amended code or the build isn’t compatible with High Sierra and older?
That could be true. Maybe someone else would care to test it?
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

I never built something in Xcode before, but I eventually succeeded for Basilisk II with the instructions found at https://github.com/kanjitalk755/macemu/ ... /README.md and https://emaculation.com/forum/viewtopic ... 999#p59999 (building on the command line failed, though). I built in a High Sierra VM.

However, when running the build in rootless mode, I get the same black/gray background as before. So it really looks like the code doesn’t work on High Sierra and older.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

mabam wrote:I tried 7.6 with your ROM, but same result.
Maybe the amended code or the build isn’t compatible with High Sierra and older?
I tried it in a VMware Sierra setup, and got the same black screen that you got. Probably this needs Mojave or later, but maybe someone else can confirm this on real hardware.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: System 7 coexisting with macOS X

Post by kanjitalk755 »

El Capitan was the same, so I fixed it.
But the drawing when dragging a window is strange...

https://github.com/kanjitalk755/macemu/ ... o_rootless
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

kanjitalk755 wrote:El Capitan was the same, so I fixed it.
Wow, that was very quick. Thank you!
Works fine here on High Sierra.
kanjitalk755 wrote:But the drawing when dragging a window is strange...
You probably mean this:
Image

Same with the mouse:
Image
zydeco
Space Cadet
Posts: 7
Joined: Tue May 24, 2016 9:11 pm
Location: Stockholm, Sweden

Re: System 7 coexisting with macOS X

Post by zydeco »

kanjitalk755 wrote: But the drawing when dragging a window is strange...
That's probably the hackiest part of it, since there's no good place to hook that, and it doesn't work properly on Mac OS 8. As a workaround you can use Power Windows, so windows are solid while they're dragged.

I'll look into adding it SheepShaver when I have some more time, but I'm not that familiar with how the toolbox works on PowerPC.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

zydeco wrote:As a workaround you can use Power Windows, so windows are solid while they're dragged.
Good tip, thank you!
zydeco wrote: I'll look into adding it SheepShaver when I have some more time, but I'm not that familiar with how the toolbox works on PowerPC.
Would be a very nice feature to have in SheepShaver …

Thanks for all your work on this!
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

Probably this is impossible, but is there any way for rootless Basilisk to refresh its windows? The apps that I've been trying (like WordPerfect for the Mac) tend to create blank windows, or windows that only show in part until you move the mouse pointer over them. I'm not at all sure that this is (1) possible and (2) practical because of the CPU power it would take, but I hope it's worth asking about.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

emendelson wrote:Probably this is impossible, but is there any way for rootless Basilisk to refresh its windows? The apps that I've been trying (like WordPerfect for the Mac) tend to create blank windows, or windows that only show in part until you move the mouse pointer over them. I'm not at all sure that this is (1) possible and (2) practical because of the CPU power it would take, but I hope it's worth asking about.
Is that with “Power Windows” installed?
I just followed Zydeco’s suggestion and tried that, but it resulted in what you seemed to describe here, only in Finder. After moving the frontmost window, the one in the back didn’t redraw:
Image

Instead, I succeeded with “DragAnyWindow”. But the option “Center” has to be disabled, else the menus aren’t masked:
Image Image

I haven’t installed any more complex application yet, so I can’t test that.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

Yes, Power Windows is running, with the solid drag option selected, but the windows have a lot of artifacts.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

“DragAnyWindow” can be found on Macintosh Garden. Curious whether that will eliminate the artifacts in your applications.
zydeco
Space Cadet
Posts: 7
Joined: Tue May 24, 2016 9:11 pm
Location: Stockholm, Sweden

Re: System 7 coexisting with macOS X

Post by zydeco »

I have PowerWindows set up like this:
Image
Do not activate "Use Multitasking", or it will mess up redrawing completely (even on the normal version of BasiliskII, so maybe it's a bug in BasiliskII, or in Power Windows).

I've experienced issues with menus not being masked only rarely, but when it happened, it would be for the whole session (since BasiliskII was started, and only restarting it would fix it).

Making the emulated mac's menu bar match the native menu bar size (extending it from 20 to 23 pixels) also causes some glitches occasionally, especially when dragging windows up there. But keeping it the same size would be ugly, as part of the native menu bar would be visible under it, and I didn't find a way to hide the menu bar without also hiding the dock.
emendelson wrote:Probably this is impossible, but is there any way for rootless Basilisk to refresh its windows? The apps that I've been trying (like WordPerfect for the Mac) tend to create blank windows, or windows that only show in part until you move the mouse pointer over them. I'm not at all sure that this is (1) possible and (2) practical because of the CPU power it would take, but I hope it's worth asking about.
This happens sometimes, I think it's some desync between when BasiliskII finds changes in the emulated screen, and when the transparency mask is applied. Unfortunately I haven't been able to reproduce it consistently enough to debug. If it's consistent for you, what's your setup?
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: System 7 coexisting with macOS X

Post by mabam »

zydeco wrote:Do not activate "Use Multitasking", or it will mess up redrawing completely […]
Thanks for the tip! I should have tried that before I shouted.

Using it with this option switched off, the area behind the original place of a window is now redrawn when I release the window. EDIT: Setting the Screen Update Frequency to “Immediate” doesn’t change that behaviour for me.
However, when using “DragAnyWindow”, it is redrawn immediately while I’m still moving the window away.
So I’ll stick with the latter, but would never have tested it without your suggesting “Power Windows”. Thanks again!
Last edited by mabam on Thu Jan 16, 2020 1:50 am, edited 1 time in total.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: System 7 coexisting with macOS X

Post by emendelson »

That doesn't help on this MacBook Air 2015, non-retina (of course) running Mojave:

https://imgur.com/a/2pgwUDA

Image
Post Reply