When I started writing this weeks post I thought it was going to be a short one, but it turned out to be a bumper week this week! So, let’s get started…

Too Many MAXs?

The CPLD (Complex Programmable Logic Device) is the square chip at the centre of the PiStorm, it translates the logic between the Pi’s GPIO and the Amiga, so is essentially the glue logic for the PiStorm to function. The firmware you flash onto the PiStorm goes directly onto this chip. Since it is the heart of the PiStorm, it is important that the chip be correct.

There has been some confusion this week over some PiStorm boards that were sold with MAX CPLD chips on them that are not compatible with PiStorm, so I figured I would dive into which chips are compatible and which are not, as well as why not, for any builders out there.

Intel’s Altera make two different versions of the MAX CPLDs, the MAX II and the MAX V. PiStorm was designed with the MAX II in mind. This is due to it being freely and cheeply available at the time on JLCPCBs build service whilst meeting the requirements of PiStorm. The revision B was altered with the idea that eventually PiStorm might be able to switch to MAX V, this is because MAX II is reaching end of life. There are still thousands of MAX II CPLDs out there for now even if JLCPCB do not have stock. So, let’s dive into the model number and see what is and is not compatible.


This is pretty simple, MAX II chips have “EPM” at the start and MAX V chips have “5M” at the start. They both also have the type in bold text on the chip. Only MAX II are compatible at the moment and we will see why when we get to the variant section.


This is essentially the size of the logic inside the chip. PiStorm was originally designed with the “570” in mind but so little logic was used that the “240” model became standard (and there is still lots of space left in that one).


This is where things get a little tricky, there are three different things that can be here:

  • Nothing – This is the regular 3.3v variant that is most commonly used in PiStorm.
  • G – This is a lower voltage variant, it is only compatible with PiStorm Rev. B and some adjustments are needed to the PiStorm to support it (an extra voltage regulator and a resistor change).
  • Z – This a lower power variant which is useful for things like battery powered applications.

Now, the “Z” variant here is where I want to focus. To become lower power it halves the maximum frequency I/O it can work with. The regular and “G” variants can handle 304MHz, the “Z” variant can only handle 152MHz. PiStorm’s synchronisation clock runs at 200MHz. So the “Z” variant cannot keep up.

This is important because the MAX V CPLDs only come in “Z” variants and therefore are not fast enough for the current PiStorm communication protocol.


For PiStorm this likely will always be “T” to signify a TQFP. There are other codes such as “F” and “M” to signify different BGA configurations, but it is unlikely PiStorm will use those as those are too difficult for many builders to solder in comparison.


This signifies the number of pins on the chip, PiStorm’s revisions use the 100pin version.


This is the application the CPLD is intended to be used in:

  • C – Commercial
  • I – Industrial
  • A – Automotive

All are fine for PiStorm but the “I” and “A” variants are built to wider temperature tolerances so will typically be more expensive.


This is the reaction speed grade. The MAX II comes in three different speed grades (3, 4 or 5). With 3 being the fastest. PiStorm is designed for / tested with speed grade 5 only. Whilst others may work with the current Proto 3 firmware, we cannot guarantee they will work with Proto 4 which is currently in development. It is recommended sticking with grade 5, it is the cheapest anyway.


The “N” signifies RoHS compliance (lead-free packaging). Since PiStorm is an upgrade to a pre-RoHS machine this doesn’t really matter whether it is there or not.


Hopefully this clears up which CPLDs can be used for PiStorm and which cannot. The short story is MAX Vs cannot be used and your choice of MAX II needs to be considered.

Protocol 4 is currently in development, the firmware for this might work out to be compatible with MAX Vs but it could also prove to impact performance. Our recommendation is that no one tries to pre-empt this by building MAX V versions of PiStorm as the developers simply do not know if they will ever be compatible.

Another Large Main Merge

The current work from wip-crap has been merged into the main branch. Which includes:

  • More PiSCSI fixes, mounting physical FAT32 partitions should now work properly, boot priority specified in for instance HDToolBox is now respected, multiple partitions with the same name are now handled.
  • Some initial platform work has been done for the Mac Classic, but this is still in need of a lot of work before it can work reliably.
  • More Musashi performance enhancements by runehol, general SysInfo MIPS should now be up to the range of around 23+, bringing a rather sizeable performance boost to RTG and other productivity applications.
  • An experimental CPLD hax firmware is included, this is optional may or may not work properly on your specific computer, but it does attempt to improve 68k bus bandwidth a fair bit, which can help with the performance problems in some demanding games, demos and other software.
  • Some keyboard forwarding fixes by ChaosPif, which allow using the keyboard connected to the Pi in more cases than before. The mouse and keyboard forwarding still does not work completely properly.
  • Flashing script improvements by LinuxJedi, you no longer have to worry about using the correct script to program your CPLD firmware, simply type ./flash.sh to have the script auto detect and run the openocd commands for your particular PiStorm board.

To update your PiStorm you need to backup any configuration changes you made to the default configuration file and the a314 configuration. Then run the following commands from your PiStorm directory:

git reset --hard
git pull --ff-only
make clean && make

The first command will reset any conflicting changes made to the PiStorm files so that the second command can succeed. The third command rebuilds the software. The main firmware remains the same so you do not need to flash that. But you can run ./flash_experimental.sh if you wish to try the experimental firmware, running ./flash.sh will revert this.

PiStorm Tester

Alistair Brugsch (abrugsch on Discord) has created a PiStorm tester which can help diagnose things such as soldering issues with PiStorms, indicating where the problem lies. The project can be found on GitHub and there is a slow-motion video of a prototype working below.

One of the PCBs for these turned up on my doorstep whilst I was writing this section so I’ll be looking forward to building it in the next couple of weeks.

Amazing Software Updates

Some of these came in as late as last night but are awesome so definitely need to be covered. There has been the following that made it to wip-crap after main was synchronised (so are not in main). UPDATE: 2 hours after I published this these changes also made it into main.

  • Compatibility improvements for the PiGFX Installer (thanks to Lemaru)
  • New option move-slow-to-chip which if you have an 8372 Agnus moves your trapdoor slow RAM to chip RAM to give you 1MB of chip, essentially the same as changing JP2 on the motherboard (thanks to LIV2)
  • New option swap-df0-df which is a bit like a CIA based DF1 switch, but built into the PiStorm, and it can switch any DF to be DF0 (thanks to LIV2)

I’m especially looking forward to trying out move-slow-to-chip with my A500 test board and the spare 8372 I have.

The End

I leave you with a screenshot from many years ago when Guybrush Threepwood predicted the original (pre-chipageddon) price of PiStorm…

Did I miss anything? Or is there anything that you want covered next week? Let me know! I can be found as LinuxJedi on the PiStorm Discord or LinuxJedi on Twitter.