Apple2-IO-RPi/README.md

105 lines
6.5 KiB
Markdown
Raw Normal View History

2020-11-03 02:02:52 +00:00
# Apple2-IO-RPi
Apple II expansion card using a Raspberry Pi for I/O
2020-11-03 02:46:28 +00:00
2020-11-17 00:25:02 +00:00
![Image of Board](/Hardware/Apple2IORPi.jpg)
## Purpose
2021-03-29 12:47:21 +00:00
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.
2020-11-03 02:46:28 +00:00
## Project Status
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 execute simple commands on the RPi via the Apple II. The code has no error handling or tests yet 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](https://github.com/tjboldt/Apple2-IO-RPi/issues). 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.
2020-11-03 02:46:28 +00:00
2021-06-01 00:46:55 +00:00
## Features
1. Boot menu which waits for RPi to be ready
2. ProDOS bootable drive from image stored on RPi
3. Execute Linux commands on the RPi from the Apple II
4. Load binary files directly from the RPi to the II
5. Update Apple II firmware in place from image on RPi
2021-10-07 00:39:08 +00:00
6. 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)
2021-06-01 00:46:55 +00:00
## Roadmap
2021-06-01 00:46:55 +00:00
1. Proper ProDOS clock driver (currently just directly sets values on block reads)
2. Support for direct file read/write without drive image
3. Image conversion on download
4. Web service call support
5. Full terminal emulation
6. Remote code execution
7. Proxy VNC connection, rendering as Apple II compatible graphics
2020-11-03 02:46:28 +00:00
## Setup starting from scratch
2021-03-29 12:18:58 +00:00
1. Have PCBs made from the gerber and drill files in the Hardware folder or email me for a blank or fully assembled board
2020-12-04 00:28:10 +00:00
2. Solder chips, header and capacitors in place
3. Attach Raspberry Pi Zero W facing outward from the card
2021-03-28 21:00:08 +00:00
4. Install Raspberry Pi OS on microSD card https://www.raspberrypi.org/software/
5. Configure wifi in boot/wpa_supplicant.conf https://howtoraspberrypi.com/how-to-raspberry-pi-headless-setup/
2020-12-04 00:28:10 +00:00
6. Add empty ssh file boot (for ssh access over wifi)
7. Put microSD card in the RPi
8. Install the expansion card into the Apple II
9. Power on the Apple II
2021-06-01 10:54:34 +00:00
10. Update firmware with utility (can be found on Apple2-IO-RPi.hdv drive image) or use EPROM programmer
11. Install Golang (note that `sudo apt install golang` will install an older version that doesn't work with this code)
1. `sudo apt install git`
2. `sudo apt remove golang`
3. `export GOLANG="$(curl https://golang.org/dl/|grep linux-armv6l|grep -v beta|head -1|awk -F\> {'print $3'}|awk -F\< {'print $1'})"`
4. `wget https://golang.org/dl/$GOLANG`
5. `sudo tar -C /usr/local -xzf $GOLANG`
6. Edit `~/.profile` with your favourite editor and add the following:
1. `PATH=$PATH:/usr/local/go/bin`
2. `GOPATH=$HOME/golang`
12. `git clone https://github.com/tjboldt/ProDOS-Utilities.git`
13. `cd ProDOS-Utilities`
2021-10-07 00:39:08 +00:00
14. `go get`
15. `go build`
16. `cd ~`
17. `git clone https://github.com/tjboldt/Apple2-IO-RPi.git`
18. `cd Apple2-IO-RPi/RaspberryPi/apple2driver`
19. `go get`
21. `go build`
22. `./apple2driver`
23. 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`
24. 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`)
2020-12-04 00:28:10 +00:00
## Setup if you received a complete board from me
1. Put in any slot (slot 7 preferred as it is the first to boot)
2. Turn on your Apple II
3. Wait for the RPi to start up (will show ... until it connects)
2021-10-07 00:39:08 +00:00
4. Select `2` from the menu to run a command
5. Type `a2wifi list` to check that you have a wireless network in range
6. Type `a2wifi select YOUR_SSID YOUR_PASSWORD` to connect the RPi to your network
7. Once connected, you should be able to ssh to the RPi from any computer if you want. From a Mac or Linux (or Windows with Bash) shell, type `ssh pi@raspberrypi`. The default password is `raspberry`.
8. Rebooting the Apple II, you can then select `1` from the menu and it will boot to ProDOS 2.4.2 and you will have a mostly blank 32 MB drive with a couple of utilities for updating firmware and such.
9. Star and Watch this repo on GitHub for the latest updates
2021-06-01 00:46:55 +00:00
## Update
1. Restart Apple II
2. Select run command
2021-10-07 00:39:08 +00:00
3. `cd /home/pi/Apple2-IO-RPi`
4. `git pull`
5. `cd RaspberryPi/apple2driver`
6. `go build`
7. `sudo reboot`
8. Restart Apple II
9. Select boot
10. `-UPDATE.FIRMWARE`
11. Enter slot number the card is in
12. Wait for firmware update to complete all four pages
2021-10-11 15:23:23 +00:00
### 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:
1. `sudo apt remove golang`
2. `export GOLANG="$(curl https://golang.org/dl/|grep linux-armv6l|grep -v beta|head -1|awk -F\> {'print $3'}|awk -F\< {'print $1'})"`
3. `wget https://golang.org/dl/$GOLANG`
4. `sudo tar -C /usr/local -xzf $GOLANG`
5. Edit `~/.profile` with your favourite editor and add the following:
1. `PATH=$PATH:/usr/local/go/bin`
2. `GOPATH=$HOME/golang`
6. `cd ~/`
7. `git clone https://github.com/tjboldt/ProDOS-Utilities.git`
8. `cd ProDOS-Utilities`
9. `cd ~/Apple2-IO-RPi/RaspberryPi/apple2driver`
10. `go build`
11. Edit the Driver autostart via cronjob (`crontab -e` then edit the line to be `@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`) 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.
2021-06-01 00:46:55 +00:00
2020-11-03 02:46:28 +00:00
## Similar Project
2021-03-28 21:16:31 +00:00
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](https://github.com/dschmenk/apple2pi) project.