mihaip / infinite-mac

A classic Mac loaded with everything you'd want
https://infinitemac.org
Apache License 2.0
1.12k stars 68 forks source link

Add Support for AppleTalk #53

Closed ahearn closed 1 year ago

ahearn commented 2 years ago

Add support for AppleTalk so old networked games like Strategic Conquest can be played.

elixx commented 2 years ago

I'd love to see Ethernet support in some fashion; the first thing I did was go hunting for MacTCP, and then tried for AppleTalk. It would be cool if an ethernet device could be provided and frames sent over a websock proxy similar to how jor1k and others do networking.

All instances configured to use the same websockproxy would effectively be on the same 'virtual segment', so things like LAN Bolo should then be possible 😍

mihaip commented 2 years ago

The most likely approach from this is to piggyback on the "tunneling" support that BasiliskII already has. From https://github.com/mihaip/macemu/blob/bas-emscripten-release/BasiliskII/TECH:

For situations in which access to raw Ethernet packets is not possible, Basilisk II implements a special "tunneling" mode in which it sends and receives packets via UDP, using BSD socket functions. It simply wraps the Ethernet packets into UDP packets, using dummy Ethernet addresses that are made up of the IP address of the host. Ethernet broadcast and AppleTalk multicast packets are sent to the IP broadcast address. Because of this non-standard way of tunneling, it is only possible to set up a "virtual" network amongst machines running Basilisk II in this way.

Instead of going over UDP, it should go over WebSockets to the Cloudflare Worker, similar to https://blog.cloudflare.com/doom-multiplayer-workers/#enter-the-net_websockets-c-driver

mihaip commented 2 years ago

This is now somewhat working, if you're interested in trying it out. AppleTalk is enabled when using a subdomain, and the subdomain determines who can communicate with each other. That is, everyone on https://foo.system7.app/ should be able to play together, but https://bar.system7.app/ is a separate zone (you can use whatever subdomain you want).

Marathon and Bolo appear to work, I have not tried others.

image
mihaip commented 1 year ago

Now officially announced: https://blog.persistent.info/2022/07/infinite-mac-networking.html