New System 7 setup on OSx Catalina

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
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: New System 7 setup on OSx Catalina

Post by Ronald P. Regensburg »

I built both BasiliskII and SheepShaver with etherhelpertool, both notarized. I have no time now or tomorrow to post them. Family gathering. Maybe Sunday.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: New System 7 setup on OSx Catalina

Post by RichCini »

Yes, during building. I'm looking at the log now. 2 categorized errors (both having to do with the missing file) and 178 issues in 7 categories: Format String Issue, Depreciations, Unused Entity Issue, Value Conversion Issue, Semantic Issue and Warnings.

There are also two project warnings about localization (migrating english.lproj to en.lproj) and updating recommended project settings.

Two other notes. I couldn't find where to change the build to "Release" so I set it to Profile. The deployment target is set in the project to 10.7 and the project format is Xcode 3.2.

I kind of feel that I have the build type wrong. Here's the error with the missing file:
clang: error: no such file or directory: '/Users/racini/Library/Developer/Xcode/DerivedData/BasiliskII-eedamcnnvfgqgnecudaqxokswvxz/Build/Products/Release/gencpu_output/defs68k.c

It looks like that file is built from the makefile.gencpu, and here's the line:
$(DST)/defs68k.c: $(DST)/build68k
$< < $(SRC)/table68k > $@

Not sure why it's not being made.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: New System 7 setup on OSx Catalina

Post by kanjitalk755 »

Did you install Xcode Command Line Tools?
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: New System 7 setup on OSx Catalina

Post by RichCini »

Yes. /Library/Developer/CommandLineTools. "xcode-select -v" reports version 2373.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: New System 7 setup on OSx Catalina

Post by emendelson »

You may have mixed together an old version and a new version of the code. Download the code again, extract it into a completely new and empty folder, and open it in Xcode. To set the target to release, use the menu Product, Scheme, Ediit Scheme..., select Run and change Build Configuration to Release.

This part you probably know, but I'm posting here for the sake of people who might want to experiment. To build and run, click on the right-pointing "run" triangle in the toolbar. When the build is complete, use File, Project Settings, look for the folder path immediately above the "Advanced" button, click on the little arrow at the right of that path line, and you'll find the executable in the folder tree under DerivedData, BasiliskII-aLongStringOfCharacters, Build, Product, Release.

I just tested this in Xcode 11 and it all worked perfectly. I encountered a similar error to the one you described when I tried installing a new version of the code over an old version.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: New System 7 setup on OSx Catalina

Post by RichCini »

Thanks. I didn't have a previous build of this, so there was no code leakage so to speak. So, I unzipped the archive again (macemu-master from kanjitalk755), navigated to the project file in src/MacOS and opened it. I changed the settings to Release, cleaned the build folder (just in case) and ran the build. Still the same issue. 176 warnings and 2 errors.

A lot of the warnings are for unused variables or functions, uninitialized variables, missing parentheses when using &&, implicit variable conversions. A whole bunch of stuff. It just doesn't make sense to me, but most of my experience is with VisualStudio on Windows. I wonder if I should reinstall XCode?

{EDIT}
Well, I uninstalled XCode and the command line tools, removed preferences, etc. and started from scratch. Still the same problem -- 176 warnings and 2 errors in Release. The "Apple Clang - Warnings" section seems pretty aggressive -- everything set for "Yes". Even if setting them to a less aggressive reporting produces 27 warnings and two errors. Many of them are semantic, so they can be fixed (automatically by XCode), which I did.

What's left are 5 warnings:
* AuthorizationCopyPrivilegedReference (in etherhelper.c) is depreciated. Even if changing the warning doesn't seem to matter.
* two variable promotions in ip_icmp.c:icmp_error can't be auto-fixed
* two related to a missing cpustbl.cpp (assuming related to the cpu68k script).

So, clearly progress, but not there yet.

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

Re: New System 7 setup on OSx Catalina

Post by emendelson »

Maybe reinstall Xcode. BasiliskII builds successfully here in both Catalina and Mojave.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: New System 7 setup on OSx Catalina

Post by RichCini »

Yup, already did — started from scratch with 11.3.1. Very frustrating.

I have a Parallels VM setup with OS X Sierra and Xcode 8.3.3. I'm going to see if the results are any different with that configuration.

{...later...}

Indeed, it still doesn't work, but it throws only one warning (about the depreciated AuthorizationCopyPrivilegedReference call in etherhelpertool.c) and then the missing defs68k.c file.

So, closer, but not there yet.
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

RichCini wrote: Indeed, it still doesn't work, but it throws only one warning (about the depreciated AuthorizationCopyPrivilegedReference call in etherhelpertool.c) and then the missing defs68k.c file.

So, closer, but not there yet.
I tried to compile with another machine and now it compiles OK. On the other machine I get the exact same error as you reported. - Interesting!

tab0 file will be created OK, but yet no IP access.
I am running WIFI on en0 and do recall, there was something special about it.

Question: What ethernet preferences should I take? - Right now I have:

Code: Select all

etherhelper/tap0/bridge0/en0
On the TCP/IP settings, I tried DHCP and manual. - Both without success so far.
Any hint?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: New System 7 setup on OSx Catalina

Post by Cat_7 »

I got the Basilisk compilation error on Mojave, but not on Catalina.
SheepShaver compiles on both.

If you have a machine with thunderbolt, it might be the thunderbolt connection is bridged with a bridge0. So you would need bridge1 in the etherhelper parameter list.

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

Re: New System 7 setup on OSx Catalina

Post by emendelson »

I don't get the Basilisk compilation error on Mojave, but I'm using Xcode 11 in Mojave. Are you using a different Xcode version.
RichCini
Inquisitive Elf
Posts: 38
Joined: Fri Feb 28, 2020 3:10 am

Re: New System 7 setup on OSx Catalina

Post by RichCini »

I’m using 11.3.1 on Catalina and 8.3.3 on Sierra.

Rich
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

Cat_7 wrote:If you have a machine with thunderbolt, it might be the thunderbolt connection is bridged with a bridge0. So you would need bridge1 in the etherhelper parameter list.
Cat_7
Thank you for the hint, Cat_7!

I also tried it with bridge1, but no change.

The following details are vague/missing on my side:

o Which BasiliskII ethernet preferences? -> etherhelper/tap0/bridge0/en0
o TCP settings --> Manual or DHCP? -> manual
o Any script to call? ->

#!/bin/bash
sudo kextutil -b net.tunnelblick.tap
sudo /Users/hsp/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII & sleep 5
sudo ifconfig bridge0 addm tap0

Looks like being close, but something is still not matching.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: New System 7 setup on OSx Catalina

Post by Cat_7 »

It seems bridging with a wifi connection will not work (has not worked earlier, also).
DHCP will only get a non-routable address so is of no use, and after setting the tcp/ip address manually, Basilisk also fails to connect.

@KnuddlMac; if you have your own build with etherhelper enabled, you do not need a script. But you have to use a network device that is connected by cable.
You only need to make sure you load the kext with sudo kextutil -b net.tunnelblick.tap (on Catalina) or sudo kextload -b net.tunnelblick.tap (on Mojave) once after every reboot.

Then start Basilisk. It will (after you entered your password) create exactly that bridge, add exactly that network device and exactly that tap device you set in the preferences. So if you set etherhelper/tap0/bridge0/en0 it will create bridge0 and add tap0 and en0 to it.

You can check which devices are present by default on your machine right after a reboot with the terminal command "ifconfig"
You can also check the names of the devices present with the system report tool. And check whether any bridge might already exist with Network preferences.

On my Mojave host, I see a thunderbolt device that is a bridge. If I choose Manage virtual devices, I see it is bridge called bridge0. So I need to create a different bridge with the etherhelper, f.i.: etherhelper/tap0/bridge1/en0

In my case my wired network connection is called en0, so etherhelper/tap0/bridge1/en0 would be OK.
If your wired connection has a different name, you should use that name with the helper, f.i. like this: etherhelper/tap0/bridge1/en1

There are still some issues to be resolved (I believe my conversation with the original developer stopped at that point)
After messing around with bridging, the bridge that was created by the etherhelper will not be deleted after you quit Basilisk/SheepShaver. This can cause problems adding the wired ethernet connection more than once after Basilisk/SheepShaver are stopped. One has to delete the bridge by using the terminal and issuing the following command: sudo ifconfig "brigdename" destroy (where "bridgename" (without quotes) is the name of the bridge created by the etherhelper parameter).

A good solution might be to check for already existing bridges at start and create a new one when a bridge (not created by Basilisk/SheepShaver) already exists. And destroy the new bridge after Basilisk/SheepShaver are stopped. Or to not try to add the wired ethernet connection a second time to the same bridge.

Best,
Cat_7
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

Wow! I got it finally run-in', but it works just with my old KEXT on High Sierra.
I think I made something wrong in conjunction with the SIP procedure.

I could create the KEXT from Tunnelblick and the bridge file gets created OK, but I feel BII has no rights to access that path on Catalina and maybe also Mojave.

But this is already a great success, as Kanjitalk provided many bugfixes and significantly contributed to an increased system stability.


Image
Last edited by KnuddlMac on Sat Mar 07, 2020 10:46 pm, edited 3 times in total.
Elyus
Tinkerer
Posts: 94
Joined: Wed Mar 21, 2012 12:35 am

Re: New System 7 setup on OSx Catalina

Post by Elyus »

I've encountered similar issues in the past. Not sure if this will fix any of the problems, but here's what I do:

---
Regarding the BasiliskII build error, the Xcode project for BII seems a bit flaky when it comes to making dependencies. I usually explicitly select the "gencpu" and "build68k" schemes and build them separately (from under the Product menu), and after those build, the BasiliskII scheme should be able to run.

---
Ethernet bridging used to rely on 3rd party tools, but when Apple began integrating Thunderbolt, bridging control was rolled into ifconfig to support ethernet traffic through any TB port (for hubs, dongles, etc.). As Cat_7 pointed out, newer Apple machines already use bridge0 for Thunderbolt, so you'd need to create something like bridge1.

When setting up bridging with BasiliskII or SheepShaver, you want the emulator to create an interface endpoint which can be bridged to an actual ethernet connection via ifconfig. The script I use looks like this:

Code: Select all

#!/bin/bash
sudo /Emulators/BasiliskII/BasiliskII.app/Contents/MacOS/BasiliskII & sleep 10
sudo ifconfig bridge1 create
sudo ifconfig bridge1 addm tap0
sudo ifconfig bridge1 up
sudo ifconfig bridge1 addm tap1
First you must start the emulator, which will create the virtual endpoint you specified in preferences. In my case, I have BII set to create "tap1". Then you need to create a new bridge to which an actual interface and the emulator's one can be added. Usually, I use Tunnelblick to connect to a VPN which creates tap0 and then add BII's tap1. If you have a physical ethernet port, the last few lines could be:

Code: Select all

sudo ifconfig bridge1 addm eth0
sudo ifconfig bridge1 up
sudo ifconfig bridge1 addm tap1
This assumes BII is creating "tap1" and the ethernet port is "eth0". Using ifconfig, you can check which are the actual interfaces, and using the BII preferences, you can change the virtual tap interface as desired. For instance, you could leave it at tap1 or use tap0 if it's not in use.

It's also important to keep in mind the distinction between Ethernet and TCP/IP. Ethernet is a higher layer of the networking stack while TCP and IP are protocols for how data is sent. You won't be able to bridge a WiFi interface to BasiliskII or SheepShaver because the traffic is different, at least it wouldn't work "out of the box". A physical ethernet port or adapter should work, as well as something like NucAr's excellent guide on bridging wireless through OpenVPN. It's a bit frustrating since we're so used to wireless connectivity these days, but at least there's a workaround for these comparatively ancient operating systems. I hope this helps!

EDIT: I see while I was slowly writing this post, Cat_7 has helped resolve your issue. I'm glad to see you got it running! I also understand now that you're using a separate helper to manage the bridge creation, which helps abbreviate the steps. It looks great, and I may have to start using that myself to simplify the process. Enjoy having classic connectivity again! :smile:
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

Elyus wrote: It's also important to keep in mind the distinction between Ethernet and TCP/IP. Ethernet is a higher layer of the networking stack while TCP and IP are protocols for how data is sent. You won't be able to bridge a WiFi interface to BasiliskII or SheepShaver because the traffic is different. A physical ethernet port or adapter should work, as well as something like NucAr's excellent guide on bridging wireless through OpenVPN. It's a bit frustrating since we're so used to wireless connectivity these days, but at least there's a workaround for these comparatively ancient operating systems. I hope this helps! :smile:
Thank you very much for confirming, that WiFI is a different beast!
I did remember there was something special about it, but wasn't sure, if this is still the obvious case. - Good, then I'd better stop here and continue with a real ETH port instead. J

...late enough anyway!
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

Cat_7 wrote:It seems bridging with a wifi connection will not work (has not worked earlier, also).
DHCP will only get a non-routable address so is of no use, and after setting the tcp/ip address manually, Basilisk also fails to connect.

@KnuddlMac; if you have your own build with etherhelper enabled, you do not need a script. But you have to use a network device that is connected by cable.
You only need to make sure you load the kext with sudo kextutil -b net.tunnelblick.tap (on Catalina) or sudo kextload -b net.tunnelblick.tap (on Mojave) once after every reboot.

Then start Basilisk. It will (after you entered your password) create exactly that bridge, add exactly that network device and exactly that tap device you set in the preferences. So if you set etherhelper/tap0/bridge0/en0 it will create bridge0 and add tap0 and en0 to it.

You can check which devices are present by default on your machine right after a reboot with the terminal command "ifconfig"
You can also check the names of the devices present with the system report tool. And check whether any bridge might already exist with Network preferences.

On my Mojave host, I see a thunderbolt device that is a bridge. If I choose Manage virtual devices, I see it is bridge called bridge0. So I need to create a different bridge with the etherhelper, f.i.: etherhelper/tap0/bridge1/en0

In my case my wired network connection is called en0, so etherhelper/tap0/bridge1/en0 would be OK.
If your wired connection has a different name, you should use that name with the helper, f.i. like this: etherhelper/tap0/bridge1/en1

There are still some issues to be resolved (I believe my conversation with the original developer stopped at that point)
After messing around with bridging, the bridge that was created by the etherhelper will not be deleted after you quit Basilisk/SheepShaver. This can cause problems adding the wired ethernet connection more than once after Basilisk/SheepShaver are stopped. One has to delete the bridge by using the terminal and issuing the following command: sudo ifconfig "brigdename" destroy (where "bridgename" (without quotes) is the name of the bridge created by the etherhelper parameter).

A good solution might be to check for already existing bridges at start and create a new one when a bridge (not created by Basilisk/SheepShaver) already exists. And destroy the new bridge after Basilisk/SheepShaver are stopped. Or to not try to add the wired ethernet connection a second time to the same bridge.

Best,
Cat_7
I see your reply just now. - OK, so my WiFi approach was kind of helpless!
The machine I used for the screenshot, has a fixed ethernet port.

Handling the taps and bridges in a sophisticated way, will be our challenge. - But for now I'd be simply happy to have a connection to my Macintosh file share successfully established. J
Tomorrow, I'll start experimenting with a 'real' ethernet port.

Bottom line: Great step ahead this week with Kanijatalk's updated Etherhelper! We're coming closer to a System 7 on MacOS without ancient hw problems and dying capacitors.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: New System 7 setup on OSx Catalina

Post by kanjitalk755 »

Cat_7 wrote:There are still some issues to be resolved (I believe my conversation with the original developer stopped at that point)
After messing around with bridging, the bridge that was created by the etherhelper will not be deleted after you quit Basilisk/SheepShaver. This can cause problems adding the wired ethernet connection more than once after Basilisk/SheepShaver are stopped. One has to delete the bridge by using the terminal and issuing the following command: sudo ifconfig "brigdename" destroy (where "bridgename" (without quotes) is the name of the bridge created by the etherhelper parameter).
Fixed.
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

kanjitalk755 wrote: Fixed.
- no words, just a big smile! - J

I just connected again the good ol’ SE30 and yes, I wasn‘t dreaming last night!
1 MB download (1 File) took about 2 seconds. That‘s great, as the Ethernetcard of the SE is just 10MBit and the old SCSI-Drive is far from SSD speed.

I should have an AppleTalk file server running on Ubuntu, but obviously damaged the settings during my tests over the past weeks. I‘m already curious about the data rates, that can be achieved.

About missing connectivity over WiFi, I‘d assume the DDP packets need to be tunneled. These LocalTalk bridges did a similar approach, didn‘t they?
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: New System 7 setup on OSx Catalina

Post by Cat_7 »

I usually explicitly select the "gencpu" and "build68k" schemes and build them separately (from under the Product menu), and after those build, the BasiliskII scheme should be able to run.
How to do that?

Best,
Cat_7
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

Cat_7 wrote:
I usually explicitly select the "gencpu" and "build68k" schemes and build them separately (from under the Product menu), and after those build, the BasiliskII scheme should be able to run.
How to do that?

Best,
Cat_7
Exactly that's also my question:

I can select 5 different schemes with Xcode Version 9.4 (on High Sierra) but there is just only one scheme visible and selectable on Xcode 11.3.1 (on Catalina).
Modifying the project settings from Legacy to the new one yield no change.
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: New System 7 setup on OSx Catalina

Post by kanjitalk755 »

KnuddlMac wrote:I can select 5 different schemes with Xcode Version 9.4 (on High Sierra) but there is just only one scheme visible and selectable on Xcode 11.3.1 (on Catalina).
Modifying the project settings from Legacy to the new one yield no change.
To avoid error in New Build System of Xcode10+, I ceased using sub target.
The alternative is Makefile.gencpu.
User avatar
KnuddlMac
Granny Smith
Posts: 123
Joined: Thu Apr 06, 2017 9:32 am
Location: Southern Bavaria

Re: New System 7 setup on OSx Catalina

Post by KnuddlMac »

kanjitalk755 wrote:
KnuddlMac wrote:I can select 5 different schemes with Xcode Version 9.4 (on High Sierra) but there is just only one scheme visible and selectable on Xcode 11.3.1 (on Catalina).
Modifying the project settings from Legacy to the new one yield no change.
To avoid error in New Build System of Xcode10+, I ceased using sub target.
The alternative is Makefile.gencpu.
Thank you, that makes sense and simplifies the approach. -
However, I still can't build on Catalina with Xcode 11.3.1:

No such file or directory: '/Users/mickeymouse/Library/Developer/Xcode/DerivedData/BasiliskII-djdqnmejupnklsdqbwwlffivpolb/Build/Products/Debug/gencpu_output/defs68k.c'

Compared most settings Xcode massively offers and tried here & there, but no change.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: New System 7 setup on OSx Catalina

Post by Ronald P. Regensburg »

Strange. Today I built again both BasiliskII and SheepShaver from a freshly downloaded kanjitalk755 source using Xcode 11.3.1 on Catalina 10.15.3. No issues whatsoever. (As always, Xcode pruduces a lot of warnings.)

The new builds are notarized and can be downloaded from the sticky download topics in BasiliskII and SheepShaver forums.
Post Reply