Apple II expansion card using a Raspberry Pi for I/O
The purpose of this project is to provide I/O for an Apple II series 8 bit computer via a Raspberry Pi Zero W which is powered by the Apple II expansion bus. This includes using the attached RPi Zero W for it's storage, network and processor to provide new functionality for the Apple II.
So far, this is a project and not a finished product. The current prototype is on the fifth revision and a few have been assembled and tested. It is now possible for the Apple II to boot from and write to a virutal hard drive image stored on the RPi in any slot and run a bash shell on the RPi via the Apple II. The code has very few tests and is incomplete. Note that currently the firmware assumes an 80 column card is in slot 3 and than you have lowercase support. If you have a problem or idea for enhancement, log an issue here. I recommend starring/watching the project for updates on GitHub. You are welcome to fork the project and submit pull requests which I will review.
- Boot message which waits for RPi to be ready
- ProDOS bootable drive from image stored on RPi
- Execute Linux bash shell on the RPi from the Apple II
- Load binary files directly from the RPi to the II
- Update Apple II firmware in place from image on RPi
- Supports two drive images at the same time (Note: backward compatible with previous firmware but requires firmware update in order to work with two drives)
- Supports "RPI" command from BASIC to execute Linux commands from the command prompt or inside BASIC programs:
10 PRINT CHR$(4);"RPI ls -al /"
- Extend BASIC.SYSTEM commands
- RPI - Execute a single Linux command (DONE)
- SH - Open a Linux shell
- WGET - Download and save to file
- Shell improvements
- Proper ProDOS clock driver (currently just directly sets values on block reads)
- Bi-directional image conversion between common formats and HIRES
- Remote code execution
- Proxy VNC connection, rendering as Apple II compatible graphics
- Have PCBs made from PCBWay or from the gerber and drill files in the Hardware folder or email me for a blank or fully assembled board
- Solder chips, header and capacitors in place
- Attach Raspberry Pi Zero W facing outward from the card
- Install Raspberry Pi OS on microSD card
- Configure wifi in boot/wpa_supplicant.conf
- Add empty ssh file boot (for ssh access over wifi)
- Put microSD card in the RPi
- Install the expansion card into the Apple II
- Power on the Apple II
- Update firmware with utility (can be found on Apple2-IO-RPi.hdv drive image) or use EPROM programmer
- Install Golang (note that
sudo apt install golang
will install an older version that doesn't work with this code)sudo apt install git
wget https://golang.org/dl/go1.17.3.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.17.3.linux-armv6l.tar.gz
- Edit
~/.profile
with your favourite editor and add the following:PATH=$PATH:/usr/local/go/bin
GOPATH=$HOME/golang
git clone https://github.com/tjboldt/ProDOS-Utilities.git
cd ProDOS-Utilities
go build
cd ~
git clone https://github.com/tjboldt/Apple2-IO-RPi.git
cd Apple2-IO-RPi/RaspberryPi/apple2driver
go build
./apple2driver
- Optional to step above,
./apple2driver -d1 YOUR_DRIVE.hdv
(Apple2-IO-RPi.hdv is automatically selected as drive 2), or./apple2driver -d1 YOUR_DRIVE.hdv -d2 YOUR_SECOND_DRIVE.hdv
- Setup the Driver as a service or to autostart via cronjob (
crontab -e
then add the line@reboot /home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver -d1 YOUR_DRIVE.hdv -d2 /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.hdv > /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.log
) - If you want to assemble 6502 code on the RPi:
- Add to your ~/.profile
PATH=$PATH:/home/pi/ProDOS-Utilities
- Install cc65 with
sudo apt install cc65
- Add to your ~/.profile
- Put in any slot (slot 7 preferred as it is the first to boot)
- Turn on your Apple II
- Wait for the RPi to start up (will show ... until it connects)
- After ProDOS boots, type
-RPI.COMMAND
- Type
RPI a2wifi list
- Type
RPI a2wifi select YOUR_SSID YOUR_WIFI_PASSWORD YOUR_TWO_LETTER_COUNTRY_CODE
- Star and Watch this repo on GitHub for the latest updates
- Restart Apple II
- Select run command
cd /home/pi/Apple2-IO-RPi
git pull
cd RaspberryPi/apple2driver
go build
sudo reboot
- Restart Apple II
- Select boot
-UPDATE.FIRMWARE
- Enter slot number the card is in
- Wait for firmware update to complete all four pages
Additional steps to upgrade Golang and use new command line parameters for the service (if you had set up before October 11, 2021)
This must be done via ssh directly into the RPi:
sudo apt remove golang
wget https://golang.org/dl/go1.17.3.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.17.3.linux-armv6l.tar.gz
- Edit
~/.profile
with your favourite editor and add the following:PATH=$PATH:/usr/local/go/bin
GOPATH=$HOME/golang
cd ~/
git clone https://github.com/tjboldt/ProDOS-Utilities.git
cd ProDOS-Utilities
cd ~/Apple2-IO-RPi/RaspberryPi/apple2driver
go build
- Edit the Driver autostart via cronjob (
crontab -e
then edit the line to be@reboot . /home/pi/.profile; /home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver -d1 YOUR_DRIVE.hdv -d2 /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.hdv > /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.log
) or simply@reboot /home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver > /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.log
if you don't need your own drive image.
If you prefer having Apple II peripherals control a Raspberry Pi rather than simply using the Raspberry Pi to provide storage, network access and processing to the Apple II, have a look at David Schmenk's excellent Apple2Pi project.