Looking for 68k Mac emulation with multiple network interfaces

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

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
User avatar
robin-fo
Space Cadet
Posts: 5
Joined: Fri Mar 31, 2023 6:07 pm

Looking for 68k Mac emulation with multiple network interfaces

Post by robin-fo »

Hi everyone, this is my first post here!

I'm currently writing a portable AppleTalk router stack in C and now came to the point where I need to test it in a real-life scenario with many other AppleTalk nodes, networks and zones.

I therefore need to set up a host of (virtual) Macintoshes of which some need to be able to run the Apple Internet Router software and have access to at least two different (virtual) networks, preferably both LocalTalk and EtherTalk. I'm currently working with Mini vMac (LToUDP) and UTM/Qemu (real Ethernet) nonrouter nodes. The problem however is that Mini vMac II currently doesn't support NuBus Ethernet cards and LToUDP is not implemented for the Modem port. 68k Qemu on the other hand does only support one "internal" Ethernet port while PPC Qemu doesn't support LocalTalk or AIR (although multiple NICs and AppleTalk routing using OS X might be possible, I still prefer to test against System 7.1). My development device is currently a M1 Pro MacBook Pro.

Other emulators I thought about are:
- Basilisk II/SheepShaver (no LocalTalk, single Ethernet)
- Shoebill (Multiple Ethernet might be possible but AIR probably won't run in A/UX; implementing the SCC/LocalTalk would probably be easiest here)
- PCE (no LocalTalk?)
- Mini vMac (see above, implementing second LocalTalk or NuBus Ethernet card would be unpleasant because of its "suboptimal" code style/architecture (I still like and appreciate Mini vMac as user))
- Qemu (see above, the serial port spits out data if LocalTalk is configured, but I wasn't able to read proper LocalTalk frames yet)

Do you have any ideas what I could do?

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

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by adespoton »

First off, thanks for jumping into this! It's an area that definitely needs more attention.

You might find https://docs.google.com/spreadsheets/d/ ... 2nWC9_t2w/ useful as far as testing other emulators (MESS, FusionPC, SoftMac XP), but I believe there's no direct implementation of LocalTalk for any of them. MESS should have the ability to use the modem port, so you may be able to implement your own shim alongside that, and SoftMac XP has really solid hardware support, but I've never actually tested how it handles LocalTalk (plus, you'd be running it under WINE in the first place). Mini vMac actually has options for two LocalTalk solutions; LToUDP probably isn't the one you want; that one assumes that all the other nodes are also using LToUDP.

Have you tried using the BPF method instead of the UDP method for Mini vMac yet?
mcayland
Mac Mechanic
Posts: 150
Joined: Sun Nov 01, 2015 10:33 pm

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by mcayland »

robin-fo wrote: Fri Mar 31, 2023 6:50 pm - Qemu (see above, the serial port spits out data if LocalTalk is configured, but I wasn't able to read proper LocalTalk frames yet)
(Disclaimer: I am the author of the QEMU 68k patches for booting MacOS)

The issue with QEMU and LocalTalk is that the ESCC serial emulation doesn't support synchronous SDLC mode which is required in order for LocalTalk to work successfully. At the moment the STATUS_SYNC bit is constantly held high rather than being held low when the flag byte is detected (see https://gitlab.com/qemu-project/qemu/-/ ... 3668375715) which is enough for OpenTransport to start up but not much else.

Whilst this isn't something on my TODO list, the datasheet for the ESCC is freely available and I can certainly provide some guidance if this is something you (or anyone else) is interested to work on.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by adespoton »

mcayland wrote: Wed Apr 05, 2023 8:30 pm
robin-fo wrote: Fri Mar 31, 2023 6:50 pm - Qemu (see above, the serial port spits out data if LocalTalk is configured, but I wasn't able to read proper LocalTalk frames yet)
(Disclaimer: I am the author of the QEMU 68k patches for booting MacOS)

The issue with QEMU and LocalTalk is that the ESCC serial emulation doesn't support synchronous SDLC mode which is required in order for LocalTalk to work successfully. At the moment the STATUS_SYNC bit is constantly held high rather than being held low when the flag byte is detected (see https://gitlab.com/qemu-project/qemu/-/ ... 3668375715) which is enough for OpenTransport to start up but not much else.

Whilst this isn't something on my TODO list, the datasheet for the ESCC is freely available and I can certainly provide some guidance if this is something you (or anyone else) is interested to work on.
Mark, is the SDLC mode on the Modem port for 68k the same as in non-GeoPort pre-USB PPC Macs? Just thinking that this may be useful in a more mainline architecture that's already stable, and so may be able to get more eyeballs for non-OT serial communications.
mcayland
Mac Mechanic
Posts: 150
Joined: Sun Nov 01, 2015 10:33 pm

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by mcayland »

adespoton wrote: Wed Apr 05, 2023 8:42 pm Mark, is the SDLC mode on the Modem port for 68k the same as in non-GeoPort pre-USB PPC Macs? Just thinking that this may be useful in a more mainline architecture that's already stable, and so may be able to get more eyeballs for non-OT serial communications.
I think it is, however QEMU uses the same virtual ESCC device for both PPC and 68K Macs so you still have the same problem that the synchronous SDLC emulation is missing.
User avatar
robin-fo
Space Cadet
Posts: 5
Joined: Fri Mar 31, 2023 6:07 pm

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by robin-fo »

Thanks guys. In the meantime, I had a closer look at MAME. It has an appealing coding style and supports multiple Ethernet cards! LocalTalk is currently not supported, but I was already able to extract meaningful LocalTalk TX data from the emulated SCC; so LocalTalk will probably be doable. The SCC implementation used with the IIvx emulation seems to be more progressed than the one used with the II emulation. I now need to find a way how to properly integrate LocalTalk networking into the MAME software architecture and implement any missing SCC code.
User avatar
adespoton
Forum All-Star
Posts: 4208
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by adespoton »

robin-fo wrote: Sat Apr 08, 2023 11:56 am Thanks guys. In the meantime, I had a closer look at MAME. It has an appealing coding style and supports multiple Ethernet cards! LocalTalk is currently not supported, but I was already able to extract meaningful LocalTalk TX data from the emulated SCC; so LocalTalk will probably be doable. The SCC implementation used with the IIvx emulation seems to be more progressed than the one used with the II emulation. I now need to find a way how to properly integrate LocalTalk networking into the MAME software architecture and implement any missing SCC code.
Once you've done that, please submit back upstream, and let us know, just in case any ideas can be easily implemented in QEMU and the Mac II profile as well!
User avatar
robin-fo
Space Cadet
Posts: 5
Joined: Fri Mar 31, 2023 6:07 pm

Re: Looking for 68k Mac emulation with multiple network interfaces

Post by robin-fo »

Ok after a surprisingly short time of hacking, I can now receive UDP-tunneled LocalTalk frames from MAME using Wireshark! Now trying the other direction...
Post Reply