Replacing a Powermacintosh G3 with an emulator

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
gacaffe
Space Cadet
Posts: 6
Joined: Sun Mar 14, 2021 5:12 pm

Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Hello everyone,

I would like to ask you for some advice. I've just starting researching in a University Lab and I have been assigned with a wonderful task. We have an old lab equipment (Mac Pile II from he company BioLogic) that is connected to a PowerMacintosh G3 (beige model) directly through the AppleTalk connection. The software runs from a Floppy disk.

We would like to keep the Mac Pile equipment (a new one is around $40K) but replace the G3 with a modern computer. Do you think it would be feasible to use an emulator? The setup would be something like a Linux/Windows/Mac modern computer (or mini computer) running an G3 emulator and using an AppleTalk to Ethernet bridge to connect the Mac Pile. If you think that this setup is possible, could you please recommend an emulator with network capabilities. I would appreciate it.

I started chekcing Qemu but I think that the G3 model can only emulate OS X Server 1.2v3 with no network capabilities.

Thanks!

Regards,

Gabriel
User avatar
Cat_7
Expert User
Posts: 5335
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Replacing a Powermacintosh G3 with an emulator

Post by Cat_7 »

Hi,

That is an interesting use case for an emulator, but your description of the current setup is in need of some clarification before we can answer your question.

-What operating system is the current G3 running?
-What do you mean by Appletalk connection? If I understand correctly, the G3 has a Serial to Ethernet adapter connected to it and the Mac Pile is connected to Ethernet? Do they talk Appletalk over TCP/IP?
-What exactly is running from the floppy. Can the software on there also run when copied to the hard disk in the G3? Or is there some protection in place?

I assume the actual CPU emulated is not that relevant, but as the G3 is a PowerPC processor, I assume the software you have to run requires that. Then both SheepShaver and Qemu might come into question. Qemu can be configured to run with a G3 processor if need be.

When it comes to Appletalk, both SheepShaver and Qemu can do that over a network.

Best,
Cat_7
gacaffe
Space Cadet
Posts: 6
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Thanks Cat_7 for your prompt answer. It's encouraging that the G3 with networking capabilities can be emulated, but it's true that I still need to gather all the details of the system setup.

I will find out the details and I will post back soon.

Cheers,

Gabriel
gacaffe
Space Cadet
Posts: 6
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Hi again,

I tried to copy the program that controls the lab equipment using 1.44MB floppy disks. The copy went well and I could see the files from the Mac. However, from Windows I can see all the files, but the executable ones have a size of 0KB (instead of 128KB).
I tried copying the files to a pendrive with the same result.
And finally, I compressed the files with MacGzip, and the compressed files had 1 KB (Windows), instead of 32 KB (Mac)

I was thinking of creating a floppy disk images with the DiskCopy application.

Any ideas? Thanks a lot.

Cheers,

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

Re: Replacing a Powermacintosh G3 with an emulator

Post by adespoton »

You're running into resource fork issues. Try using something like this: https://www.gryphel.com/c/sw/archive/zipit/ to compress both forks prior to transport off an HFS volume.

Disk Copy will also do the trick, but then you need to have somewhere to load the data on the other end, and DC42 archives still contain a (losable) resource fork.

Stuffit is the compressor of choice, but Zipit archives are more extractable in other places (any modern OS should at least be able to extract something by default, even if the resource fork data will likely be garbled).
gacaffe
Space Cadet
Posts: 6
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Thank you very much adespoton. I will try that. The lab was closed for several days for bank holidays and I will try this week.

Now, I have a question. How can I transfer the files I would like to execute in the virtual G3 to the disk image? I do not really understand the qemu-img utility.

Can I transfer files from my PC to the emulated G3?

If you could recommend some documentation that would be great.

Thanks a lot again.

Gabriel
gacaffe
Space Cadet
Posts: 6
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Good news!

Zipit worked like a charm. I created a CDROM iso with the zip file and I was able to unzip it correctly using Qemu.

I have it running on a Mac99 with MacOS9.2. When I run the program it asks to connect a printer to the appletalk device. The printer is not really a printer, but the lab equipment that I guess is using a pinter communication protocol.
The command I use to run the emulation is:
qemu-system-ppc -L pc-bios -prom-env "auto-boot?=true" -cpu "g4" -M mac99,via=pmu -m 512 -hda c:\mac_files\HD2.img -cdrom c:\mac_files\CDROM.iso -g 1024x768x32

The next step will be to see if netowrking works.
Do you think that if I buy an Appletalk to Ethernet bridge to connect the lab equipment the emulator will be able to see it at all?

Another question, is it possible to use a x86 machine to emulate MacOS9.2? I think that the emulation is ver slow with the G4 (well, maybe the G4 is slow).

Many thanks again for all your help.

Cheers,

Gabriel
User avatar
Cat_7
Expert User
Posts: 5335
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Replacing a Powermacintosh G3 with an emulator

Post by Cat_7 »

Hi,

On what kind of computer are you running Qemu? On a G4 or a Windows computer?

Next step would be to get the appletalk network connection going. If your host machine is a windows computer, you'll need to install the openvpn tap driver. When doing so, take care to only install the tap driver.
Then use the network/change adapter settings to bridge the default network connection with the tap adapter connection.

tbc.

Best,
Cat_7
gacaffe
Space Cadet
Posts: 6
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Hi,

Thanks Cat_7.

I think that my last question was misleading. I am using W10 to run qemu. My question was about if I could emulate something more powerfull than a G4 and run MacOs 9.2. in order to have a faster emulated machine.

I had already installed OpenVPN and the G4 can access the internet with IE 5. I did not configure anything and it seems to work. Does this mean that the next step is to look for an Appletalk/Ethernet bridge?


Thanks.

Gabriel
User avatar
Cat_7
Expert User
Posts: 5335
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Replacing a Powermacintosh G3 with an emulator

Post by Cat_7 »

Hi,

We need to take this step by step:
1. Make sure you have bridged the default network connection in windows with the tap device. You go into the network settings and rename the tap device connection to e.g. TapQemu. This will make things easier later on. Then, to create the bridge, select both the default connection and the TapQemu by holding shift while clicking on both and then right click and select bridge.

2. Make sure you are actually using the tap device for networking. You current command line does not do this. You can check this by looking into the tcp/ip settings in Mac OS 9.2. I gather your emulated mac has as ip address 10.0.2.15. This will not do, as this kind of connection will not allow appletalk to travel into the network your windows machine is on.
Use the following command line: (I'm assuming here you do no longer need the cdrom, and am omitting stuff that is default anyway)
Notice the name of the tap device you changed earlier in step 1.

qemu-system-ppc.exe -L pc-bios -M mac99,via=pmu -m 512 -hda c:\mac_files\HD2.img -device sungem,netdev=network01 -netdev tap,ifname=TapQemu,id=network01

Run Qemu and check the ip address you now have in Mac OS 9.2, it should be on the same network your windows host machine is on.

Once this is running, we can then see how to proceed, but please check the following:
3. Check the actual cable coming from the device you are trying to connect to. Is it connected directly to a round printer/modem port on the G3? Or to a network with e.g. an RJ45 connector, or some other intermediate device?

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

Re: Replacing a Powermacintosh G3 with an emulator

Post by adespoton »

To answer some questions and clarify some things:

1. By default, QEMU-PPC uses SLIP networking via a virtual NAT gateway. This only supports TCP/IP. To send/receive AppleTalk packets over Ethernet, Cat_7's instructions are required to use tap networking and a bridged network device. At this point, if the other device can do AppleTalk over IP, you're done with networking: the two should be able to talk.

2. If the device instead talks AppleTalk over LocalTalk/PhoneNet, you'll need an Ethernet bridge to connect the device to the Ethernet network your Win10 machine is on. At this point, the two should be able to talk.

3. Regarding "faster emulated machine" -- the speed of the emulation goes down as the emulated machine gets more modern/complex. Mac OS 9 ran on all PowerPC Macintosh computers from the original PowerPC604 (G1) through the G4. It did not run on the G5, and was never (publicly) compiled for x86 -- hence using QEMU to emulate a G4 PowerPC to run OS 9 on x86/IA64 computers. SheepShaver gets its speed from only emulating the bits required to get most software to run -- so it's not really a G1 OR G4, although it emulates enough instructions from each to do its job. It does so significantly faster than QEMU-PPC as a result, but since it doesn't emulate the MMU, the highest OS it can emulate is 9.0.4. And it doesn't emulate bi-directional serial well, and doesn't emulate/pass-through USB.

Hopefully these comments help with your current configuration issues!
Post Reply