piStorm – Getting started

In this guide, I explain how I set up the piStorm, beginning from a fresh board (with just the pins and pi header soldered onto it) until it starts up the Kickstart “insert disk” screen. This is not the only way to do things, and necessarily not the best way, it’s my way πŸ™‚

Pi setup

Use the official Raspberry Pi Imager or a third party tool like BalenaEtcher to write the Lite version of Raspberry Pi OS to a SD-card and start up the pi
Using raspi-config, set wifi-credentials (System Options) and activate SSH (Interface Options).
(everything except the basic installation can be done without network connectivity, but it is easier to do it over SSH than at the terminal)

sudo su -
apt -y update
apt -y upgrade

Updating will take about 10 minutes. Usually a reboot is recommended here, but in this case not necessary, so continue with the section below and install some packages and test the GPIOs.

Install required packages

apt -y install git
apt -y install libsdl2-dev
apt -y install openocd
exit

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 -y install pigpio
wget http://abyz.me.uk/rpi/pigpio/code/gpiotest.zip
unzip gpiotest.zip
sudo pigpiod
./gpiotest

Expected output:

Get and build piStorm software

git clone https://github.com/captain-amygdala/pistorm.git
cd pistorm
make

Expected output:

Optional step, get and build wip-crap development version

Only build the emulator for use/test later on – skip the CPLD update for now and do that when the wip-crap build is going to be used.
piStorm – experimental stuff wip-crap

Shut down the pi

This is as far as you get without the piStorm connected, so it’s time to shut down the pi and then stuff it away until you get your piStorm (- shutdown and continue as below if you already have it).
‘pigpiod’ (for testing the GPIOs) above keeps the pi waiting for 90 sec if not killed before shutdown.

sudo killall -9 pigpiod
sudo halt -p

Update CPLD bitstream

Shut down the pi, take a look 20 pixels above :), 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.

Build the program to test access to chip RAM

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

For EPM240

chmod +x nprog_240.sh
./nprog_240.sh

For EPM570

chmod +x nprog.sh
./nprog.sh

Expected output (nprog.sh for EPM240):

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 screen (or any other single-colored screen, I usually get a red one before the emulator starts) 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

Expected output:

In case of any error, check that the piStorm adapter is pressed down firmly in the CPU-socket. It should be pressed down so it bottoms (plastic on the pins touching the socket). Once fixed, re-run buptest. Repeat until zero errors are reported.

Start the emulator

sudo ./emulator

Expected output (untouched default.cfg in pistorm directory). If the kickstart file (kick.rom) for softkicking is not found it defaults to using the KS on the mainboard.

On my test computer (A500 r6) it falls back to the 3.1.4 ROM:

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:

[Unit]
Description=Start piStorm 68k emulator
After=local-fs.target

[Service]
ExecStart=/home/pi/start-emulator.sh

[Install]
WantedBy=local-fs.target

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

#!/bin/sh
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

Other similar guides for the piStorm

Lightning Amiga Performance With PiStorm (LinuxJedi)

piStorm – raw interview from Discord/IRC

26 March 2021 @20:10

Claude Schwartz was interviewed by Bob1969 for the French Amiga fan website “Amiga Impact”.

<Bob1969> let’s start
<Claude> ok

<Bob1969> Q1: Who are you ? engineer, hobbist, selfmademan ..
<Claude> I’m a hobbist but also work as electronic engineer since 20 years now

<Bob1969> What is your relationship with Amiga community ?
<Bob1969> How does this idea of Pi storm comes to you ?
<Claude> Hmm difficult question πŸ™‚ I was using Amiga when I was around 12 years or so. My first Amiga was an A500 which i got from my father because he bought himself a A2000 and he gave me his A500. I used the Amiga mostly for games . But at one point all my friends turned to PC , so I had of course to buy also a PC πŸ™‚ Then i took a break from Amiga for a long time, around 2018 I saw the Vampire V600 and immediatly tought i need to have that too
<Claude> I bought an A600 from Ebay and placed an order for a V600. While waiting for the V600 to arrive I started to buy more Amigas and Accelerators (Yes I was addicted again lol) . Then shortly after I recived the V600 i was invited by the Vampire Team to join in. So I did and I had a fun time there of about 2 Years, helping testing and some vhdl coding. Around 2020 I decided that I want something different
So I started with Pistorm , it was a idea i had for longer. Using an small CPU board to emulate an 68000 in place of a real 68000

<Bob1969> What are the main technical issue to connect GPIO to 68000 socket ?
<Claude> Its the timing, the 68000 is not a fast processor. but the pins of a 68000 needs to follow a very strict timing. Because of that Pistorm has a small CPLD/FPGA which does the timing in hardware and recives commands from the Raspberry over the GPIO pins. This relax the timing for the Raspberry
<Bob1969> U4 ?
<Claude> yes the big chip . Thats a Altera MAX2 CPLD

<Bob1969> Which ressouces from Pi will be available under Amiga system (Ram,Gfx,Sound,storage )?
<Claude> First is the CPU Emulation , this is currently using Mushashi, Musashi is a very popular CPU also used by MAME. Then some ammount of RAM from the PI is also directly usable by the CPU Emulator . This RAM can be up to 256MB (limited by the Raspberry Pi RAM size)
<Claude> Then there is a RTG system. The RTG Memory is also directly accessible by the CPU emulation. As the RAM on the Raspberry is very fast , the RTG system is very fast compared to regular Zorro Based RTG cards
<Claude> Then there are two storage systems. One is by emulation of Amiga Gayle IDE , this makes it possible to boot directly from a emulated HDD with a Kickstart ROM >2.x . Lately a full SCSI emulation was added , the SCSI emulation bypasses most of the bottlenecks the Gayle IDE emulation brings. To make it possible to boot from that emulated SCSI thre is also a bootrom and driver written for it. This makes it possible to use a standard kickstart and still use the SCSI emulation
<Claude> Further Kickstart ROMs can be used on the Mainboard, but also used as File from the Raspberry SD Card

<Bob1969> What Performance Do you expect ?
<Claude> Most of these advanced features were programmed by Bnu ( Famous for his NES works and also for working on mntmn’s great ZZ9000 RTG card)
<Claude> Currently the performance is at 15 to 18 MIPS , which is roughly equalivent to a 68030 at 60MHz

<Claude> There are plans to extend this further πŸ™‚
<Bob1969> It will depend which Pi you use …zero , 3+,4
<Claude> Yes the current version of PiStorm is very optimized using a Raspberry Pi3 . Future versions of PiStorm will be optimized for Pi4 / CM4

<Bob1969> How many time do you estimate that the project will be in stage 1.0 ?
<Claude> It has some bugs were we working on currently . Mostly its about timing and irqs . The Amiga is sometimes demaning when it comes to this πŸ™‚ Version 1.0 , good question … I would say the journey to 1.0 is the interesting part , so i might take some time to reach 1.0 .

<Claude> Bob1969: was this the question ?
<Claude> i understand it how far/stable it is currently
<Bob1969> it’s an introduction to the next question πŸ˜‰
<Claude> ok πŸ™‚

<Bob1969> after validate a prototype, Do you plan to start a mass production (industry production) ?
<Claude> No πŸ™‚ The fundamental idea of PiStorm is to make it free and open. The Hardware itself is not very complicated. So advanced hobbiest can build them by themself. For not so advanced hobbiest (or people who are lazy like me πŸ™‚ ) All the design files are published. These desgin files are readymade for a Chinese PCB manufacturer who also does PCB assembly. So the idea is to upload the desgin files to these PCB service in China and get back a mostly readymade PiStorm for roughly 15€ πŸ™‚ I don’t know if it okay for amigaimpact , it’s not meant as free advertisment for them, but the company is called JLCPCB
<Claude> Only the pins for the CPU Socket and the Raspberry PI needs to be soldered manually. But I think most Amiga users have already touched a soldering iron
<Bob1969> Why can’t Chinese factory do the soldering ?
<Bob1969> PCB makers are linked with assembling factories
<Claude> Yes the company is a PCB maker with assembly factory. They do the soldering of all SMD components, they would probably also do the soldering of the Pins . But I have not tried it yet there to let them solder also the pins.

<Bob1969> last question , How do you think this kind of project ( if the graft live ) can involve in the future ?
<Claude> The next step is to add a little extra hardware (also opensource of course) to make it possible to output the Amiga Video and Audio over the same HDMI Plug which outputs RTG. Then there is PiStorm2 in planing, PiStorm2 targets “32 Bit” Amigas like A1200,CD32,A3K,A4k and will be using the new Rasperry Compute Module 4. In parallel there are works on using PiStorm on other 68000 Computers like Atari. Also MAC and Sharp X68000 are very interesting Platforms for PiStorm πŸ™‚

<ShK> Here’s some random bringup pictures. if they are ok for Claude to use
https://usercontent.irccloud-cdn.com/file/tJRggCLf/BringUp.7z
<Claude> thanks ShK πŸ™‚ i have no idea whats inside but i (almost) fully trust you πŸ™‚
<ShK> ok
<ShK> …. but you will be fine πŸ™‚
<Claude> looks good πŸ™‚
<Bob1969> Amazing pictures !!!

<Bob1969> It’s the End of this interview, i will say : Claude you’re a gentleman
<Claude> thank you Bob1969 , but can i say something?
<Bob1969> You have been very kind.
<Bob1969> of course !
<Claude> The whole PiStorm project is only possible trough all the people who help on it. Without the great contributions and help I got with it , it would still only have 2 MIPS and boot only from Floppy πŸ™‚ So I like to thank very much Bnu,Niklas,Shanshe,ShK,Flype… and all the people at the PiStorm Discord πŸ™‚

<Bob1969> Do you allow me to publish this interview in a web site ?
<Claude> yes of course πŸ™‚
<Bob1969> it will be translated for your future French fans

peo β€” Today at 9:07 PM
@Claude you did not get any question about currently supported systems (and also the work in progress with the A600 version) , can you toss that in for @Bob

<Claude> Peo , oh yes . Sorry if i forgot some things! Yes people working currently on other Versions of PiStorm. There is a A2000 CPU slot version in the works and a A600 Version
<Claude> Also the Spanish Retrowiki.es did a own version of PiStorm for themself

[HAJ] β€” Today at 9:16 PM
Thank you for doing the whole interview in this channel, very interesting and superb work @Claude !!

Claude β€” Today at 9:17 PM
if i forgot something then please speak up i have a very short memory and often forget things to mention

peo β€” Today at 9:17 PM
in which models is piStorm currently working ? All 68000, except for some flaws with the A600 ?
(A1000 possibly needs relocator as the CPU is on the opposite side)

Claude β€” Today at 9:18 PM
personally i tested in A500, A2000 Rev4 . I have seen it running in CDTV too

peo β€” Today at 9:20 PM
are there any (longer) videos of it running (I know, but hidden here in the chats) ?

<Claude> hmm on my twitter maybe

peo β€” Today at 9:24 PM
(asking for my short info page), is it ok to use videos and pictures you have shared here and on Twitter ? Ofcourse mentioning the source, but I might have to download and share them through other channels to use them on the page ?
@_Bnu is it ok with your photos and videos too ?

<Claude> yes of course

<ShK> i find one bringup video


<Claude> haha ShK that was the first boot of pinball dreams
<ShK> yes! πŸ™‚

_Bnu β€” Today at 9:26 PM
All my videos are top secret classified by NASA and the Martian Government.

<Bob1969> Time of expansive accelerator is over..:)
<Claude> Hmm I don’t see it that way πŸ™‚ Warp,Vampire,ACA all these are great products. PiStorm is just different , but it can’t replace the feel of a real 68060 or the features of a Apollo Core or the pureness of a ACA on a A500

peo β€” Today at 9:30 PM
not when retrorewind starts selling piStorm at $150-$250 …

<Bob1969> Thank you Claude & all your team for time !

mark sealey β€” Today at 9:34 PM
@peo I have a few videos on my YouTube…. mobile phone camera videos tho

<Claude> thank you Bob1969
<Bob1969> New competitors are goods and create dynamic
<Claude> yes , but I love peace . better life together friendly than in stupid Amiga wars πŸ™‚
<ShK> pistorm opens a lots of possibilities

peo β€” Today at 9:35 PM
@mark sealey yes, I have seen some of those (some abit shaky), I guess ok to use/reupload these too ?

mark sealey β€” Today at 9:37 PM
@peo lol yeh sorry about that….now my PiStorm is quite stable I hope to get a HDMI capture device..,..I’m left handed too that doesn’t help

peo β€” Today at 9:38 PM
@mark sealey I do not want to make the viewers sea-sick πŸ™‚

mark sealey β€” Today at 9:38 PM
I uploaded a doom video today
@peo lol I understand

piStorm – A 68000 CPU replacement

What is piStorm ?

piStorm is an opensource project started by Claude Schwartz. The board fits inside the Amiga 500, Amiga 2000 and CDTV models and boosts their performance close to a 25MHz 68040 equipped Amiga 4000 (60-70MHz 68030).
Native boards for the A600 and A2000 (CPU slot) are under development.

Besides a fast CPU, which is provided by the Pi through the Musashi 680×0 emulator, piStorm with the recommended Raspberry Pi 3A+ gives you:
* FastRAM configurations up to and above 256MB without starving the Pi of RAM (3A+ has 512MB)
* piSCSI – allows you to mount up to 7 hard disk devices; supports hard drive images and even physical drives
* autoboot from hard drive image or physical drive
* RTG – gives you together with the P96 software 16 and 24 bit graphics in high resolution
* kickstart switch – specify which kickstart to use (but not really switch it other than changing from configuration file)
* keyboard and mouse passthrough – use the keyboard and mouse connected to the pi as Amiga devices
* real time clock (RTC) – passes the date and time over to the Amiga from the Pi
* networking (new) – allows connecting to internet or local network with the SANA-II driver and a TCP/IP stack
* folder sharing (new) – share a folder on the sd-card with the Amiga for simple file transfers
* remapping of DF0: to DF1/DF2/DF3 (new)
* remapping of slow-fast ($00C00000) as chip-RAM (new) – no more JP2/JP7A modification needed for 1MB chip-RAM

What do I need ?

* The piStorm 68000 replacement adapter
* A Raspberry Pi 3A+ or similar (Pi 3A+ is recommended because of its low profile)
* A microSD card for the piStorm software

Where do I get the 68000 adapter ?

Check out the “groupbuy” channel on Discord
You will find the invite link to Discord at the main piStorm repo on Github:
https://github.com/captain-amygdala/pistorm

How much does it cost ?

It differs depending on how countries add expenses on imported PCBs and components and what the shipping rates for these are at the time, but you should not accept to pay (unless you really WANT to) more than 25-30 EUR for the assembled adapter board. I have (in the Discord channel) seen prices as low as about 13 EUR + shipping. Because of the ongoing semiconductor shortage, components are getting harder and more expensive to source, which drives the prices up a bit, still not anything near $149.99 or such (more close to the double mentioned above, which I have left in).
List prices at retrorewind.ca should NOT be accepted (as for example, the RGBtoHDMI A500 adapter at $40, and the A2000 video slot version at $70!).
To that you have to add the cost of the recommended Pi 3A+ (about 30-35 EUR), and a suitable microSD card (up to 32GB is reasonable).

The piStorm software and getting started

The main Github repository is located at:
https://github.com/captain-amygdala/pistorm

New features are added to the “wip-crap” tree:
https://github.com/beeanyew/pistorm/tree/wip-crap

My Getting Started Guide, updated as I discover the piStorm for myself. Refer the official documentation (in the GitHub Readme.md files spread across some the repository folders) for most up-to-date information.

My Basic Configuration Guide, which also links to some advanced topics like configuration switching using ‘irexec’.

piStorm tests and reviews

The very first video-review of piStorm was published by Chris Edwards on 25 April 2021
25 April 2021: PiStorm 68K CPU replacement and more (Chris Edwards)


1 May 2021: Amiga PiStorm P2 – ROMS, Hard drives, RTG and more (Chris Edwards)

2 May 2021: PiStorm: Turbo Boost Amiga 500 With Raspberry Pi (Dan Wood)

4 May 2021: Mounting the PiStorm in the Amiga 1000 (Chris Edwards)

9-10 May 2021: Introducing the piStorm & livestream (Mikes Retro Tech)


16 May 2021: Lets build a PISTORM (CRG / Casual Retro Gamer)

18 May 2021: Amiga PiStorm – Retro Power on a Budget – Tech Nibble (RMC / Retro Man Cave)

piStorm articles

26 March 2021:
Claude Schwartz was interviewed in public through Discord/IRC
https://www.amigaimpact.org/2021/03/article-entrevue-avec-claude-schwarz-createur-du-pistorm/
See the raw interview in English here
19 April 2021:
Hackaday: piStorm Brings Modern Muscle To The Amiga
Toms Hardware: Raspberry Pi Turbo Boosts Amiga 500 Retro Computer
21 April 2021:
Hackster.io: Hands-On with the PiStorm, the Ultimate Raspberry Pi-Powered Accelerator for Your Commodore Amiga

piStorm mentions

30 April 2021: The Retro Hour Ep273