There has been some very exciting accelerator projects recently. Of course the TerribleFire and Vampire accelerators are incredibly popular but there are some new kids on the block such as Buffee (the Vampire slayer) and PiStorm. I recently obtained a PiStorm and this is how I set it up.

PiStorm is a community project which consists of a board which connects a Raspberry Pi 3A+ to the 68000 CPU socket of an Amiga, along with the software to emulate the 68000 range of CPUs. The community are a really smart, friendly and engaging bunch of people. They can be found on Discord and even organise “group buys” so that it is very cheap for anyone who wants to purchase one.

I was added to a recent group buy and received my PiStorm with the pins and headers to solder on.

It was a quick job to solder on the pins at the bottom and the header. I used slightly different pins for the bottom to the ones supplied as the ones I typically use are about 1/3rd longer.

Then the Pi 3A+ sits on top.

Next up is the software install. The PiStorm README has some instructions on how to set things up using an HDMI cable and keyboard connected to the Pi. But I did things a little differently. Here is how I did it (using Linux, this should work on macOS too):

  1. Download Raspbian Lite from: https://www.raspberrypi.org/software/operating-systems/
  2. Restore the Raspbian image onto an SD card
  3. Mount the boot partition from the SD card
  4. Run “touch ssh”, this will create a blank file called SSH which will enable SSH connections
  5. Create a file called wpa_supplicant.conf with the following contents (alter for your WiFi settings):
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
    ssid="YOUR_SSID"
    psk="YOUR_WIFI_PASSWORD"
    key_mgmt=WPA-PSK
}
  1. Eject the SD card and put it into the Pi
  2. Put the PiStorm into the Amiga
  1. Power on the Amiga (it won’t boot, but the Pi will). The Pi will take a few minutes to boot and resize the FS
  2. SSH to pi@raspberrypi.local and the password “raspberry”
  3. Change the hostname using “sudo hostnamectl set-hostname pistorm.local”
  4. Run the following, it will build the emulator and flash the CPLD:
sudo apt update
sudo apt install git libsdl2-dev openocd
git clone https://github.com/captain-amygdala/pistorm.git
cd pistorm
make
chmod +x nprog_240.sh
sudo ./nprog_240.sh
  1. Make any changes to default.cfg you want, the defaults are pretty good, but if you have a hard drive image you can copy it over, enable PiSCSI and point to that image. You can also copy a ROM file over and change the kick.rom to point to it if you want to use a different ROM.
  2. Create a systemd config file in /etc/systemd/system/pistorm.service with the following contents:
[Unit]
Description=PiStorm emulator
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/home/pi/pistorm/emulator
WorkingDirectory=/home/pi/pistorm
[Install]
WantedBy=multi-user.target
  1. Run “sudo systemctl enable pistorm.service”
  2. Run “sudo shutdown -h now”
  3. Power down the Amiga
  4. Wait a few seconds
  5. Power up the Amiga

The Amiga powers up, the Pi boots and automatically runs the CPU emulator, at which point the Amiga will boot.

The end result is a nice fast emulated 68020, 128MB of FastRAM and an incredibly fast emulated SCSI drive, the screenshots below are with sysbench and my Amiga 500 Plus hard drive image copied to the card used as a SCSI device.

At the moment C+A+A reboots do not work correctly (edit: this now works great), if you need to reboot you can SSH into the Pi (now using pi@pistorm.local) and do “systemctl restart pistorm.service”.

There are lots of things I haven’t even begun to cover yet, including RTG graphics using the Pi’s HDMI and a bunch of things currently being worked on. This has the potential to be a a massive project with endless options. It is also very useful for debugging what is going through the CPU for other hardware features.

If you are interested in the PiStorm project I highly recommend checking out their Discord chat.

Edit 2021-04-16

There was a bug in the PiStorm software on the day I took the above screenshots which caused a large performance regression. Things are now back to normal, so here is an updated SysInfo:

10 responses to “Lightning Amiga Performance With PiStorm”

  1. […] Lightning Amiga Performance With PiStorm (LinuxJedi) […]

  2. Nice solution. Just curious why emulating an entire Amiga directly on a Pi 3 with Amibian yields much faster results. Theoretically the Pi is doing less work this way.

    1. That is a really good question and I think the answer is different for different people. I think for a lot of people (including me) there is nothing that beats the feel of using real hardware, particularly if you are still using CRTs. But at the same time accelerating that hardware so that it works with the later Amiga software can be difficult. This is a nice cheap alternative to trying to buy a 68030 based accelerator (likely upwards of £180).

      In my case I used it to test my other hardware designs. On the fly I can completely change the Zorro II memory bus configuration, boot ROM, CPU emulation and a bunch of other things. You can actually step through that the CPU is doing in real time if you want to debug to that level.

      This solution definitely isn’t for everyone and there are some awesome full system emulators out there.

      I hope that answers the question.

  3. 792 MHZ on an AMiga ? how? and also, is this an emulated Amiga os running on the Pi via Winuae or something else? or is the amiga booting its own is from its HD via the Pi? how is this working?

    1. 792MHz is due to the funky way that SysInfo tries to work out the MHz and shouldn’t be trusted. That said, it is accelerated.

      PiStorm sits in the CPU socket and emulates the CPU, keeping the rest of the Amiga motherboard in-tact. It can add certain things such as a virtual SCSI which maps HDF files as hard drives on the Amiga (and is extremely fast).

      1. Why does it sit on top of the 68k socket? If I recall correctly, all the 68k pins can be overridden through the side port expansion in the A500, thus eliminating the need to remove the CPU. That’s how the Apollo and GVP accelerators did it back in the day.

        1. Yes, you can totally do that. But getting hold of the expansion connector is expensive and the board size would need to be at least 2x larger (probably more like 4x) and still 4 layer, incurring higher PCB fab costs. This goes against one of the goals of PiStorm which is to be an accelerator which doesn’t hurt your wallet.

          There is also an additional board in development for PiStorm which captures Denise digital RGB signals (similar to the RGBtoHDMI project) and injects them into PiStorm so that Amiga RGB and RTG are on the same HDMI cable. That would likely be a neater solution if it was all internal. That said, Claude is looking into the viability of an external solution amongst other things.

          There are reolcator solutions out there which would let you plug the PiStorm as-in into that slot if that is something you wanted to do.

  4. My apologies….but I’m skeptical. What is the Amiga hardware actually doing? I haven’t seen proof in any online videos that genuine classic Amiga keyboard mouse input actually is reaching the Pi. I want to believe….

    1. The source code is available so you can see for yourself (https://github.com/captain-amygdala/pistorm). All the Amiga custom chips (Agnus, Denise, Paula, etc…) are still functioning as intended, there isn’t any source code in the repository to replace those. This just replaces the CPU and adds a few extra things such as FastRAM (it can’t add more chip RAM), virtual SCSI and RTG graphics on the Pi’s HDMI.

      Some video evidence:
      https://www.youtube.com/watch?v=-CwVofNogDI
      https://www.youtube.com/watch?v=ECJJXFKdR-I
      https://www.youtube.com/watch?v=ZnKQYWEbEvM

      In the first video you can also see what we believe is a timing issue for CIA interrupts causing a few genuine floppy disk based games to fail. The mouse can be seen being used in the last two and the keyboard can be seen in the last one whilst he is setting up the RTG.

Leave a Reply

Your email address will not be published. Required fields are marked *