From 0f58e987f11f92a0d42160905fa8846f0e397301 Mon Sep 17 00:00:00 2001 From: Terence Boldt Date: Fri, 29 Mar 2024 11:46:32 -0400 Subject: [PATCH] Update setup and instructions --- ClassicSetup.md | 27 +++++++++++++++++++++++++++ PicoSetup.md | 23 +++++++++++++++++++++++ README.md | 6 ++---- RaspberryPi/setup.sh | 24 +++++++++++++++++++++++- RaspberryPiPico/setup.sh | 2 ++ 5 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 ClassicSetup.md create mode 100644 PicoSetup.md diff --git a/ClassicSetup.md b/ClassicSetup.md new file mode 100644 index 0000000..c97b128 --- /dev/null +++ b/ClassicSetup.md @@ -0,0 +1,27 @@ +## Setup starting from scratch +1. Have PCBs made from [PCBWay](https://www.pcbway.com/project/shareproject/Apple2_IO_RPi_v6_bfa4be82.html) or from the gerber and drill files in the Hardware folder or email me for a blank or fully assembled board +2. Solder chips, header and capacitors in place +3. If you have an EPROM programmer, it is preferred to pre-populate the EEPROM with the contents of AT28C68B.bin +4. Attach Raspberry Pi Zero 2 W facing outward from the card +5. Install [Raspberry Pi OS](https://www.raspberrypi.org/software/) on microSD card using a modern computer + 1. Use Raspberry Pi Imager + 2. Click "Choose OS" + 3. Select Other => "Raspberry Pi OS Lite (64 bit)" for the Zero 2 W + 4. Click on the gear icon in the bottom right + 5. Enable ssh + 6. Set password + 7. Configure wifi + 8. Set locale settings +6. Put microSD card in the RPi +7. Install the expansion card into the Apple II +8. Power on the Apple II +9. Only if you didn't have an EPROM programmer in step 3, install firmware with utility (can be found on Apple2-IO-RPi.hdv drive image in the release on GitHub) +10. Use `ssh` to connect to the RPi using the password you configured +11. `wget --no-cache -O - https://raw.githubusercontent.com/tjboldt/Apple2-IO-RPi/main/RaspberryPi/setup.sh | bash` + +## Options +You can support two drives and change their drive images. +1. Modify the `ExecStart` line in `/etc/systemd/system/apple2driver.service` and make it something like the following: `ExecStart=/home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver -d1 /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.hdv -d2 /home/pi/Apple2-IO-RPi/RaspberryPi/TotalReplay401.hdv` +2. `sudo systemctl daemon-reload` +3. `sudo systemctl restart apple2driver.service` + diff --git a/PicoSetup.md b/PicoSetup.md new file mode 100644 index 0000000..4af37bb --- /dev/null +++ b/PicoSetup.md @@ -0,0 +1,23 @@ +## Setup starting from scratch +1. DIY instructions and PCB coming but it is recommended to buy a board from Ralle Palaveev +2. Attach Raspberry Pi Zero 2 W with a micro USB OTG cable +3. Install [Raspberry Pi OS](https://www.raspberrypi.org/software/) on microSD card using a modern computer + 1. Use Raspberry Pi Imager + 2. Click "Choose OS" + 3. Select Other => "Raspberry Pi OS Lite (64 bit)" for the Zero 2 W + 4. Click on the gear icon in the bottom right + 5. Enable ssh + 6. Set password + 7. Configure wifi + 8. Set locale settings +6. Put microSD card in the RPi +7. Install the expansion card into the Apple II +8. Power on the Apple II +9. Use `ssh` to connect to the RPi using the password you configured +10. `wget --no-cache -O - https://raw.githubusercontent.com/tjboldt/Apple2-IO-RPi/main/RaspberryPi/setup.sh 1 | bash` + +## Options +You can support two drives and change their drive images. +1. Modify the `ExecStart` line in `/etc/systemd/system/apple2driver.service` and make it something like the following: `ExecStart=/home/pi/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver -cdc=true -d1 /home/pi/Apple2-IO-RPi/RaspberryPi/Apple2-IO-RPi.hdv -d2 /home/pi/Apple2-IO-RPi/RaspberryPi/TotalReplay401.hdv` +2. `sudo systemctl daemon-reload` +3. `sudo systemctl restart apple2driver.service` diff --git a/README.md b/README.md index c4b3bbb..31bff75 100644 --- a/README.md +++ b/README.md @@ -31,14 +31,12 @@ Ralle Palaveev has a version of the hardware that uses a RPi Pico to handle firm See [List of issues tagged roadmap](https://github.com/tjboldt/Apple2-IO-RPi/issues?q=is%3Aissue+is%3Aopen+label%3Aroadmap+author%3Atjboldt) ## Setup on classic hardware -[Setup card from scratch](https://github.com/tjboldt/Apple2-IO-RPi/discussions/63) - -[Setup if you received a complete board from me](https://github.com/tjboldt/Apple2-IO-RPi/discussions/64) +[Setup card from scratch](/ClassicSetup.md) [Update to latest](https://github.com/tjboldt/Apple2-IO-RPi/discussions/65) ## Setup on Pico based hardware -[Setup card with Pico hardware](https://github.com/tjboldt/Apple2-IO-RPi/discussions/162) +[Setup card with Pico hardware](/PicoSetup.md) ## Contributions/Thanks - Hans Hübner ([@hanshuebner](https://github.com/hanshuebner)) for help cleaning up schematics diff --git a/RaspberryPi/setup.sh b/RaspberryPi/setup.sh index 83247ae..bd8ed7c 100644 --- a/RaspberryPi/setup.sh +++ b/RaspberryPi/setup.sh @@ -36,6 +36,9 @@ go mod tidy go build sudo apt install cc65 vim -y cd ~ || exit +cd Apple2-IO-RPI/Apple2 || exit +./assemble $1 +cd ~ || exit sudo bash -c 'cat > /boot/config.txt << EOF disable_splash=1 @@ -43,9 +46,27 @@ dtoverlay=disable-bt boot_delay=0 EOF' sudo bash -c 'echo " quiet" >> /boot/cmdline.txt' +if [ "$1" = '1' ]; then sudo --preserve-env=HOME --preserve-env=USER bash -c 'cat > apple2driver.service << EOF [Unit] -Description=Apple2-IO-RPi Driver +Description=Apple2-IO-RPi Driver (Pico edition) + +[Service] +ExecStart=$HOME/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver -cdc=true +StandardOutput=syslog +StandardError=syslog +SyslogIdentifier=apple2driver +User=$USER +Group=$USER +WorkingDirectory=$HOME/Apple2-IO-RPi/RaspberryPi/apple2driver + +[Install] +WantedBy=basic.target +EOF' +else +sudo --preserve-env=HOME --preserve-env=USER bash -c 'cat > apple2driver.service << EOF +[Unit] +Description=Apple2-IO-RPi Driver (Classic edition) [Service] ExecStart=$HOME/Apple2-IO-RPi/RaspberryPi/apple2driver/apple2driver @@ -59,6 +80,7 @@ WorkingDirectory=$HOME/Apple2-IO-RPi/RaspberryPi/apple2driver [Install] WantedBy=basic.target EOF' +fi sudo mv apple2driver.service /etc/systemd/system/apple2driver.service sudo chown root:root /etc/systemd/system/apple2driver.service sudo systemctl start apple2driver diff --git a/RaspberryPiPico/setup.sh b/RaspberryPiPico/setup.sh index 4ceea80..f3a77d3 100755 --- a/RaspberryPiPico/setup.sh +++ b/RaspberryPiPico/setup.sh @@ -1,3 +1,5 @@ +#!/bin/sh + sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib -y cd ~ git clone https://github.com/raspberrypi/pico-sdk.git