The Apple IIgs

My History with the Apple II

Apple //e

My first computer was an Apple //e, which started off as the "family" computer but, when a blended family brought an Apple //c into the fold, moved into my room for late night hacking sessions. (I was 9 or 10.)

That machine was pretty nicely equipped, for the day. It had an Apple IIe Extended 80-Column RGB Card that boosted the RAM from 64K to 128K, a DuoDisk unit with dual 143K SS/SD floppy disk drives, an AppleColor 100 RGB monitor, an Apple ][ Mouse Card and mouse, an Applied Engineering Datalink 1200 modem, a SuperSerial Card, and a Kensington System Saver (fan/surge protector/front-facing power switch). It was a pretty bomb little machine, running AppleWorks 3.0 with Beagle add-on software, Publish It!, etc. I also hacked out a lot of AppleSoft BASIC and 6502 assembly code on that thing. It was eventually "enhanced" with the 65c02 chip and updated ROMs. It's still in boxes back in Missouri.

Apple IIGS

Also back in St. Louis, I still have an Apple IIGS. It's a ROM3 machine I picked up at a hotel sale (mislabeled as a ROM01 machine), with a RAM expansion card that took 30 pin SIMMs (IIRC) and boosted it to 2MB with room for another 3MB (I think it was the Harris Laboratories GS Sauce). It had a mismash of connected drives; (2) 800K 3.5" and (1) Laser-brand 5.25", again if memory serves. I think I swapped the stock A9M0330 for the Apple Standard Keyboard off my brother's Macintosh LC (somehow his Mac didn't come with the stock M0487). It has the standard AppleColor RGB monitor, and a System Saver IIgs.

New IIGS

Hit with nostalgia, a while ago I joined the Apple IIGS Enthusiasts Facebook group, and a few weeks ago saw a post from a college student unloading his ROM01 IIgs, already setup with a CFFA3000 (v1.0 Rev C) mass storage controller, GBS-8220 video adapter, etc. The asking price was reasonable, so I bit. (Eventually I'll probably bring "my" IIgs back out from St. Louis and transfer a lot of the tech over.)

I want to use it for some light retro gaming, but also to write. Towards that end, it needed to be connected to my network somehow, to get documents off of it and into the modern world.

Connectivity

Raspberry Pi

First thing I did was pick up a Raspberry Pi 3+ B board and associated kit, and loaded Raspbian Stretch Lite (June 2018), a/k/a Debian 9.4, onto a 32GB MicroSD card.

Serial Terminal

To get my IIgs talking to the Raspberry Pi via a serial link, I started with a Gearmo FTDI2-LED USB RS-232 Serial Adapter with LED Indicators (I wanted the blinkenlights):

Plugged it into the RPi and it was immediately detected:

[  304.651328] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[  304.808870] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[  304.808884] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  304.808893] usb 1-1.3: Product: FT232R USB UART
[  304.808901] usb 1-1.3: Manufacturer: FTDI
[  304.808909] usb 1-1.3: SerialNumber: AL01N92J
[  304.854945] usbcore: registered new interface driver usbserial
[  304.855018] usbcore: registered new interface driver usbserial_generic
[  304.855077] usbserial: USB Serial support registered for generic
[  304.867085] usbcore: registered new interface driver ftdi_sio
[  304.867162] usbserial: USB Serial support registered for FTDI USB Serial Device
[  304.867641] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[  304.867794] usb 1-1.3: Detected FT232RL
[  304.869297] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0

This was connected to the IIgs via this Apple IIgs, IIc+, LC III null modem cable. 

Next, I setup serial utilities; slirp will easily create a SLIP or PPP link, and the rz / sz utilities enable sending files via XModem (etc) until I can get FTP working:

pi@raspberrypi:~ $ sudo apt-get install slirp lrzsz

Made sure the 'pi' user was in a group that could use the USB serial device:

pi@raspberrypi:~ $ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Aug 22 07:49 /dev/ttyUSB0
pi@raspberrypi:~ $ id
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),101(input),108(netdev),997(gpio),998(i2c),999(spi)

So, Raspbian Stretch (Debian 9.4) is, unsurprisingly, a systemd distribution, which I don't fully grok yet:

pi@raspberrypi:~ $ ps -p1

  PID TTY          TIME CMD

    1 ?        00:00:05 systemd

Modified the serial getty service definition file to limit the speed to 19200 (I may try to make this 38400 later), which is where the IIgs seems to natively top out (e.g., in the control panel; in the communications module for AppleWorks GS):

pi@raspberrypi:~ $ sudo vi /lib/systemd/system/serial-getty@.service

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
BindsTo=dev-%i.device
After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

[Service]
#ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
ExecStart=-/sbin/agetty 19200 -J %I $TERM
Type=idle
Restart=always
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
SendSIGHUP=yes

[Install]
WantedBy=getty.target

Activated the terminal within systemd:

pi@raspberrypi:~ $ sudo systemctl daemon-reload

pi@raspberrypi:~ $ sudo systemctl enable serial-getty@ttyUSB0
Created symlink /etc/systemd/system/getty.target.wants/serial-getty@ttyUSB0.service → /lib/systemd/system/serial-getty@.service.



pi@raspberrypi:~ $ sudo systemctl restart serial-getty@ttyUSB0.service

Was then able to login to the terminal from the IIgs using the communications module for AppleWorks GS. Files could be transferred between the systems using 'sx' for XModem transfers or, more conveniently, 'sb' for batch transfers where the filename(s) get set automatically, e.g.:

pi@raspberrypi:~ $ sx gshk.sea

pi@raspberrypi:~ $ sb Marinetti3.0b1.SHK PPPX.1.3d4.SHK safe231.bxy

Getting Software onto the IIgs

I tried repeatedly to get software transferred over to the GS over the serial link, but it mostly failed. For whatever reason, even after massaging with tchange, etc. (e.g., to set the type of a downloaded file to $B3), the executables tended to be unusable. So I used AppleCommander (requires an old Java version to run) to create a disk image and put that image on the USB drive to mount using the CFFA3000 control panel. Software I needed (by the way, explore all of the Asimov FTP archive, lots of gems there):
In AppleCommander, click the "Create" icon to start the Disk Image Wizard. You're creating a disk image for the ProDOS operating system, and 32MB is as good as size as any. I used "Install" and "Install" as the name for the disk image, and the ProDOS volume name. In the Disk View window, use the Import... button to bring in the files (e.g., tchange.bin, gshk.v1.1.sea, etc), and then the Save icon to write the disk image (Instal.hdv). (This will be a block device that the CFFA3000 can use natively; the file size is an exact multiple of 512.)

To make the SEA file executable, open the ProDOS command line (BASIC.system on the IIgs system disk) and:

]PREFIX /INSTAL
]BLOAD TCHANGE.BIN, TTXT, A2048

]DELETE TCHANGE.BIN
]BSAVE TCHANGE.BIN, A2048, L15711
]BRUN TCHANGE.BIN

TCP/IP

Connecting the Raspberry Pi to the Network

At first I just hooked up an Ethernet cable, which, as you'd expect, worked immediately. But I wanted it WiFi connected, too, which turned out to be as simple as running raspi-config:

pi@raspberrypi:~ $ sudo raspi-config

pi@raspberrypi:~ $ ifconfig wlan0



wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500

        inet 192.168.215.141  netmask 255.255.255.0  broadcast 192.168.215.255

        inet6 fe80::2345:a074:9292:41f7  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:b3:cd:4a  txqueuelen 1000  (Ethernet)
        RX packets 46  bytes 8849 (8.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 33  bytes 5745 (5.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Telnet.

Note that telnet is inherently insecure and shouldn't be used, yada yada, but I'm hooking up a 30 year old 16-bit Apple II computer to this system, I'll take what I can get.

First, installed the telnet client:
pi@raspberrypi:~ $ sudo apt-get install telnet

Then, installed the server software:

pi@raspberrypi:~ $ sudo apt-get install telnetd
pi@raspberrypi:~ $ sudo /etc/init.d/openbsd-inetd restart

Marchetti

On the IIgs, the TCP/IP stack is supplied by the Marchetti software suite, which is relatively straightforward to configure:


The username and password are the standard pi / raspberry Raspbian ships with. Not secure, but by using the dialog box username and password, they can be easily changed without mucking with the connection script (below).

SLIP via slirp.

For whatever reason, I wasn't able to get the 'ppp-scripted' link layer working with slirp, but SLIP is working fine. (I did have to troubleshoot the connection script by running 'minicom' on the RPi to see what was being output - turns out the double quotes are important if your string has any whitespace).

Here's the script I use to connect to SLIP (via slirp on the RPi):

speed 19200
send cr
delay
* username$ represents the username entered into the Setup connection dialog
send username$ cr
wait 600 assword:
* password$ represents the password entered into the Setup connection dialog
send password$ cr
wait 600 pi
send "slirp -b 19200" cr
wait 600 'Your address is'
getip 300
end

And here's the script used to disconnect (the five zeros tells slirp to quit):

send 00000 cr
send exit cr
end

FTP

Ideally, I want to use SAFE2 for FTP purposes, but it requires "a minimum of 1Mb of free memory" and I don't have that in the current configuration. So for now, I'm just using the SOS.FTP NDA, which works well enough to upload files, but doesn't provide any indication when a transfer fails (e.g., when you mistakenly run it before connecting to the network).

IIgs Shopping List

This ROM01 machine came with a CFFA3000 card, 128MB CF drive, USB cable, 128MB USB thumb drive, and remote switch, so I was already starting ahead of the pack. It also arrived with a RAMWorks GS card populated with 1MB, for a total of 1.25MB (including the 256MB on-board on a ROM01 GS motherboard). It had the original keyboard and mouse, in good condition, and arrived with a GBS-8220 V3.0 VGA adapter board and a IIgs RGB -> HD15 cable, but no power supply.
I'm using the GS with an old Dell 2007WFP I happened to have, which so far seems to work well enough...



Comments