piStorm – Getting started

Work in progress – I will add more instructions to this page while I’m discovering the piStorms’ features.

Pi setup

Write Lite version of Raspberry OS to SD-card and start up the pi
Set wifi-credentials and activate SSH
(everything except the basic installation can be done without network connectivity, but it is easier to do it over SSH than at the terminal)

apt update
apt upgrade
(will take about 10 minutes)

Install required packages

sudo apt install git
sudo apt install libsdl2-dev
sudo apt install openocd

Testing your Pi’s GPIO pins

Testing your Pi’s GPIO pins. This MUST be run disconnected from the PiStorm, just power up the Pi with USB and do it outside the Amiga entirely.
Info from https://www.raspberrypi.org/forums/viewtopic.php?t=180505

sudo apt install pigpio
wget http://abyz.me.uk/rpi/pigpio/code/gpiotest.zip
unzip gpiotest.zip
sudo pigpiod

Get and build piStorm software (wip-crap tree)

git clone https://github.com/beeanyew/pistorm.git
cd pistorm
git checkout wip-crap

Update FPGA bitstream

For EPM240
(check the release channel on discord for the latest one, this one is dated 29 March 2021)

wget https://cdn.discordapp.com/attachments/826122776615190559/826123462615236658/EPM240_bitstream.svf
mv EPM240_bitstream.svf rtl/bitstream.svf

For both EPM240 and EPM570 (original design)
Shut down the pi, disconnect power and connect the piStorm adapter to the GPIO

Connect power and let the pi start, check network connectivity or re-setup if necessary.

cd pistorm
chmod +x nprog.sh
sudo ./nprog.sh
chmod +x ./build_buptest.sh

Installing the piStorm in the Amiga

Shut down the pi, disconnect everything and separate the adapter from it.
Replace the CPU in the Amiga with the adapter board (the Pi connector should be on the left side). Align both rows of pins with the CPU socket, then, without any pressure on the board, move the adapter up and down (front and back) on the socket to feel the point in which the pins are centered in the socket.
Check that all pins go into the socket an press it down until it bottoms.

Mount the pi on the adapter with the USB port facing towards you, and the HDMI connector on the right side.

Connect the HDMI output and a keyboard.

Starting the emulator

Power on the Amiga, the pi will be powered and boot up (the output from the Amiga will be just a black (synced) screen until the CPU emulator is started).
Login as ‘pi’ and change directory to ‘pistorm’.

Initial check – can the piStorm read and write to the CHIP RAM ?

sudo ./buptest

Start the emulator

sudo ./emulator

From here on, you can use the Amiga as any other floppy-only Amiga. I will document the features (kickstart switch, RAM, hard drive, RTG) in another post to keep these at readable length.

Autostart the emulator on system boot – the simple method

In /etc/rc.local, add before the “exit 0” line:

cd /home/pi/pistorm/ && sudo ./emulator&

Autostart the emulator on system boot – advanced method

The CPU-emulator will be started a lot earlier if adding it as a systemd service.
Become root (the ugly way):

sudo su -

Create the file “pistorm.service” in /lib/systemd/system:

Description=Start piStorm 68k emulator



Create the file “start-emulator.sh” in /home/pi:

cd /home/pi/pistorm/
sudo ./emulator
exit 0

Make “start-emulator.sh” executable:

chmod 755 /home/pi/start-emulator.sh

Reload/regenerate systemd configuration files:

systemctl daemon-reload

Enable the automatic start of the CPU-emulator:

systemctl enable pistorm.service

Now, in case you need to restart the emulator (and Amiga as well), this can be done without having to find the ’emulator’ process:

systemctl restart pistorm