Tech News
← Back to articles

How the Final Cartridge III Freezer Works

read original related products more articles

by Daniël Mantione

Daniël contributed the commented disassembly of the FC3 freezer functionality to the reverse engineering effort at github.com/mist64/final_cartridge. Thanks to Eric Schlaepfer for his input on 6502 timing.

Freezer cartridge theory

One key reason why the Commodore 64 was so successful in the 80s was that it was able to do things it wasn’t designed for. Freezer cartridges, which allowed stopping any running program or game, applying cheat codes and resuming, or saving the complete computer’s state to disk so it could be continued from later, were one of those clever innovations: They were possible on the Commodore 64, but not on many other computers. A Commodore 64 with a good cartridge was a significantly more capable computer than a Commodore 64 without, this did contribute to the longetivity of the computer and is one reason why the Commodore 64 could remain in production for more than a decade.

However, because the Commodore 64 wasn’t designed at all to support freezing, a cartridge has to exploit quirks in the hardware in order to achieve its functionality. The C64 feature that is essential to freezer cartridges is the so-called Ultimax mode.

The Commodore Ultimax or Max machine was a games console that uses the same custom chips as the Commodore 64: It has a VIC-II and SID. The Ultimax had 2 KB of RAM and no ROM. Instead, the ROM on the cartridge is mapped into memory. The Ultimax was a commercial flop: Commodore only sold it in Japan, and it wasn’t a success there either. However, it somehow happened that the Commodore 64 was designed to be compatible with game cartridges developed for the Ultimax.

If an Ultimax cartridge is inserted, the Commodore 64 disables most of its RAM. 4 KB of RAM remains active and the C64 maps the cartridge ROM into memory, just like the Ultimax. This ROM is mapped from $E000..$FFFF, the place in memory where you will normally find the KERNAL.

Ultimax mode is activated when the cartridge pulls the GAME pin on the cartridge port low. It mode can be activated and deactivated in real-time. This means that if a cartridge activates Ultimax mode, it forces cartridge ROM memory into the C64’s memory map. Software on the C64 cannot prevent this from happening.

The ROM is mapped into the KERNAL memory region, and this means that the 6502 interrupt vectors at the end of memory will be read from cartridge ROM. A freezer cartridge will use an NMI interrupt to take control of the C64: Software cannot prevent an NMI interrupt from happening. So by combining NMI and Ultimax, a freezer cartridge can make the C64 execute code from cartridge ROM when the freeze button is pressed.

Doing the freeze correctly

... continue reading