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

gacaffe
Student Driver
Posts: 13
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: 6121
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
Student Driver
Posts: 13
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
Student Driver
Posts: 13
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: 4208
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
Student Driver
Posts: 13
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
Student Driver
Posts: 13
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: 6121
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
Student Driver
Posts: 13
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: 6121
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: 4208
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!
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Hi everyone!

It took me a very long time to get back to this project for work and personal reasons. I am very grateful to all the people that have answered so far (Cat_7 and adespoton :) ).

The current status is the following:
- I am able now to get an IP from the same LAN as the host PC. I followed Cat_7 advice about bridging the OpenVPN tap interface and it worked like a charm. I have succesfully browsed the internet and check that the IP is coherent (it's actually the next to the one assigned to the host PC)
- The connector that the lab equipment is using rond and it is connected at the G3 to the modem port (the one with a phone).

Shall I then go ahead and acquire an AppleTalk-2-Ethernet bridge?
Can you give me some advice on this?

Cheers!

Gabriel
User avatar
Cat_7
Expert User
Posts: 6121
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,

Please remember we are still in experimental waters here, so there is no guarantee all of this will work in the end ;-)

I see one device as possible solution here:
https://www.ecrater.com/p/12689362/asan ... et-adapter

ps: is this the equipment we are talking about? https://www.ebay.com/itm/143266108797

Best,
Cat_7
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Replacing a Powermacintosh G3 with an emulator

Post by mabam »

gacaffe wrote: Tue Sep 28, 2021 4:39 pm Shall I then go ahead and acquire an AppleTalk-2-Ethernet bridge?
Can you give me some advice on this?
There are a number of such bridges listed here: https://en.wikipedia.org/wiki/LocalTalk ... net_bridge
You can find used ones on eBay but the more rare they get, the more expensive they are.

Actually, Asante still has a few “AsanteTalk” in their webshop. They’re still new and cheaper than on eBay. But they only ship within the US: https://store.asante.com/asantetalk-us.html


EDIT:
Cat_7 was quicker finishing his post and found the better deal. :-)
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Replacing a Powermacintosh G3 with an emulator

Post by adespoton »

Here's a question: how difficult would it be to create a bridge using a Raspberry Pi or an Arduino?

The original bridge hardware is beginning to get rare enough that it might be worth having a modern open source solution... if that's reasonably possible.

Since LocalTalk is essentially a serial solution, it seems to me that it should technically be possible to create a LocalTalk <-> USB dongle and drive most of the logic in software.
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Cat_7 wrote: Tue Sep 28, 2021 6:48 pm Hi,

Please remember we are still in experimental waters here, so there is no guarantee all of this will work in the end ;-)

I see one device as possible solution here:
https://www.ecrater.com/p/12689362/asan ... et-adapter

ps: is this the equipment we are talking about? https://www.ebay.com/itm/143266108797

Best,
Cat_7
Thanks Cat_7,

I am aware that there is no guarantee. But it's worth a try.

That is the equipment, yes.

I think I will go ahead and by the bridge.

Cheers!
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

mabam wrote: Tue Sep 28, 2021 6:49 pm
gacaffe wrote: Tue Sep 28, 2021 4:39 pm Shall I then go ahead and acquire an AppleTalk-2-Ethernet bridge?
Can you give me some advice on this?
There are a number of such bridges listed here: https://en.wikipedia.org/wiki/LocalTalk ... net_bridge
You can find used ones on eBay but the more rare they get, the more expensive they are.

Actually, Asante still has a few “AsanteTalk” in their webshop. They’re still new and cheaper than on eBay. But they only ship within the US: https://store.asante.com/asantetalk-us.html


EDIT:
Cat_7 was quicker finishing his post and found the better deal. :-)
Thanks!
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Adespoton, that's an interesting point. I have found lots of debate about using raspberry pi for that, but no actual project.

I'l keep searching.

Thanks
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Hi guys,

I have just tried connecting the lab device (MacPile II) to the emulated machine via the AssanteTalk bridge.
This is the setup:
- The emulated machine is connected to the same network as the host machine. I checked that they are in the same TCP/IP subnet and I managed to ping the emulated PPC from Windows.
- My laptop and the AssanteTalk bridge are conencted to a switch
- Originally:
++ the AppleTalk connector was connected to the Mac port with a telephone icon
++ in Control panels/AppleTalk is selected "printer port"
++ In chooser AppleTalk is "active"
- However, in the virtual machine I have only two options in the Control Panels/AppleTalk: "Ethernet" or "Remote only". I guess that Qemu is not emulating the printer port
- When I clicked on the application I get the following message: "Select first a printer connected to the printer port or to the AppleTalk net".
- If the lab device is unplugged in the real MAC the message is "Error initializing the Mac serial port used to communicate with the MacPile controller"

I would appreciate any ideas. Thanks.

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

Re: Replacing a Powermacintosh G3 with an emulator

Post by adespoton »

What you need is the emulated serial port -- the original Mac had two serial ports, one with a printer icon, one with a telephone icon. The telephone icon one had slightly more robust throughput (I can't currently remember the details, something about asynchronous communication) and was usually the one LocalTalk was connected to. The printer port was a regular serial connection, but for most functions, the two were interchangeable.

Under QEMU-PPC, you'd need to use the -serial flag to redirect the virtual serial port to some other location. If the software insists on using a serial connection instead of Ethernet, you'll need to explore how to use this flag (it takes a few parameters that can be used to bind "serial" to a number of interfaces, including a file, a console, a telnet connection, etc.)

However, since AsanteTalk is plugged into the same switch, it seems to me there should be some means to use Ethernet to get the remote device that's plugged into it to show up via AppleTalk IP in the Chooser. Ethernet will, of course, have to be via Tun/Tap, not the default SLIrP, but I think you've already got that sorted?
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Adespoton, I did set up the ethernet connection bridging the physical ethernet port with the openVPN tap port and the IP of the emulated PPC was in the subnet of the rest of machines of the lab. Also, I check that the ARP table contained the virtual PPC from the host and it was OK.

I will investigate about the serial connection. Many thanks.
User avatar
Cat_7
Expert User
Posts: 6121
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,

Take a look here on how to get some serial connection going:
https://www.emaculation.com/doku.php/pp ... o_the_host

With this I can open a serial connection to Windows. Whether or not that provides the correct port or directs the traffic correctly I don't know.
At least the driver mentioned there gives you the option to select a serial port in Qemu.

Best,
Cat_7
Mickael_Fr
Space Cadet
Posts: 2
Joined: Thu Jan 13, 2022 7:24 am

Re: Replacing a Powermacintosh G3 with an emulator

Post by Mickael_Fr »

Hello to all,

Actually, I do the same procedure as Gacaffe except that I connect my equipment to a PC with a serial port.
I managed to install Basilisk with Mac OS 7.5.3. Now I would like to know how to make a copy of the disk of my old Mac computer? Using DiskCopy?
The program to drive the hardware is old and I don't have the floppy disk with the installer... I would like to create a copy of my old disk to put it in the emulator.

Thank you very much for your answer,
Best regards,
Mickaël
gacaffe
Student Driver
Posts: 13
Joined: Sun Mar 14, 2021 5:12 pm

Re: Replacing a Powermacintosh G3 with an emulator

Post by gacaffe »

Hi guys,

I am back, it took me a while. Thank you for all your comments.
I managed to install the FDTI drivers but it seems that they only allow you to link the Mac serial ports to Windows USB ports. In my case the serial device (MacPile II) is connected to an ethernet bridge, so I do not see how it is possible to linke a windows COM port to the ethernet connection.

Actually, when calling qemu I have to specify the port I am using for the serial connection:

qemu-system-ppc -L pc-bios -prom-env "auto-boot?=true" -M mac99,via=pmu -m 512 -hda c:\mac_pile_files\HD2.img -cdrom c:\mac_pile_files\MAC_PILE.iso -g 1024x768x32 -device sungem,netdev=network01 -netdev tap,ifname=TapQemu,id=network01 -device usb-serial,chardev=com -chardev serial,path=com9,id=com

I used COM9, since it was the only that responded, but this is actually a bluetooth connection.

I do not see how I can go on. I was wondering if I could use a device such as the Keyspan USB. Do you have any experienced with this?

Cheers!

Gabriel
Mickael_Fr
Space Cadet
Posts: 2
Joined: Thu Jan 13, 2022 7:24 am

Re: Replacing a Powermacintosh G3 with an emulator

Post by Mickael_Fr »

Hello gacaffe,

Normally on the Mac stack you have a DB25 cable to a mini DIN 8 pin (serial port) right?
I advise you to find an adapter DB25 to usb directly or DB25 to DB9 then to USB. You can then allocate the right port like in your emulator.

What is your version of MacPile? I would like to install a version 3.10 but I don't have an installation floppy disk, did copying the disk allow you to have the software in the emulator?

Thank you in advance for all these answers
Post Reply