Hello -
I know this is an old thread, but for some reason I hadn't heard of pce-macplus until very recently and wanted to try to contribute. The originally posted guide was excellent on its own, but even more so because it was the only documentation I could find. I've always been a fan of Basilisk II, but I sometimes have some stability issues on modern Mac OS. Also, I thought it'd be neat to emulate a compact Mac with serial support.
I was able to compile tun support for Mac OS X 10.11, at least on the surface, after a couple of hours of research. Granted, I haven't made an Internet connection yet, but I'm hoping that this could be because of my inexperience with tuntap on OS X. I wrote some quick notes in hopes that someone could make use of them and get some actual results. I'll just post the link because it got fairly lengthy:
http:/kb3tix.net/pce-macplus-macosx-tun/
The original guide game me another idea after I re-read it and I actually had a little bit more success with that. Although tty0tty relies on a Linux kernel module, another utility called "socat" runs on a wider range of platforms and is available through homebrew for OS X.
Code:
iMac:~ matt$ socat -d -d pty,raw,ignoreeof,echo=0,link=/tmp/modem1 pty,raw,ignoreeof,echo=0,link=/tmp/modem2
2017/11/22 18:56:55 socat[1708] N PTY is /dev/ttys007
2017/11/22 18:56:55 socat[1708] N PTY is /dev/ttys008
The above basically creates a fake null modem cable as originally suggested. The "link" parameter allowed me to maintain some degree of consistency between calling socat; the ttys are allocated numbers at random, but you can link a filename to put in your .cfg. I chose /tmp instead of /dev because even after disabling SIP on the Mac, I couldn't easily write to /dev. On a side note, you'll have to disable SIP eventually to write the pppd options in /etc because apparently /etc/ppp/options is hardcoded into pppd. Here's the snippet of my config when I configure the serial port:
Code:
serial {
port = 0
multichar = 1
driver = "stdio:file=/tmp/modem1"
#driver = "ppp:if=tap0:host-ip=10.10.10.2:guest-ip=10.10.10.3"
}
In true form, I got ahead of myself and immediately tried to fire up FreePPP on Mac TCP. I ran pppd as described on the guide with the exception of the device name which is the second generated device from above, /dev/ttys008. pppd gets angry if you specify a "device" file outside of /dev, so that's necessary. You can use the following commands to monitor the two sides of the "cable:"
Code:
cat < /tmp/modem1
cat < /tmp/modem2
After I had introduced way too many variable into my "equation," I stepped back and tried ZTerm on System 7 and minicom on Mac OS X through the "cable". I chose minicom because it's much more agnostic about allowing non-standard device names compared to something more GUI friendly and it's also available on homebrew. I chose the modem port on System 7, which the .cfg pointed to /tmp/modem1 and /tmp/modem2 in minicom. When I typed on the emulator I could see appropriate characters on minicom, but the reverse wasn't true (I saw nothing on the Mac Plus). I had the cat commands running in two other terminals and they produced output as expected for the corresponding cable ends.
Hopefully, someone can take this and run with it to make something usable. I hope it helps.