How the Final Cartridge III Freezer Works
pagetable.com71 points by ingve 20 hours ago
71 points by ingve 20 hours ago
One important detail the article omits: it is possible for the software running on the Commodore 64 to prevent being "frozen" by this technique. Because the processor needs the NMI interrupt to run the freeze routine, the software can pre-empt it by pulling down the NMI line on its own. This can be done using the second CIA I/O chip, whose interrupt output pin is connected to the NMI line. By making the CIA chip generate the NMI and never acknowledging it, the software will ensure that the NMI line is always pulled low and the freezer will not work.
Clarification question, having read OP yet having missed some fine details: I presume you mean that software could set some CIA-II register to keep the NMI line to the CPU down indefinitely. Since what triggers the handling of an NMI is the transition from high to low, that means no other handler (in particular the Freeze Frame's) would get executed. And one'd also need to redirect the NMI vector, which normally is in Kernel ROM, to a dummy handler consisting of an RTI or little more. Correct?
Yes, that's absolutely correct
Thank you!
An addendum: the way you would program the CIA registers to pull the NMI low would most likely be to set up one of its timers on a very short count period (IIRC four system clock cycles is the lowest the chip can do) and make it generate the underflow interrupt. The chip holds the interrupt line low until you acknowledge the interrupt by reading the interrupt source register. If you never get to read it, the interrupt line stays low forever.
That's a clever trick, but giving up all the useful types of NMIs seems like a steep price to pay.
Commodore 64 software hardly ever uses the NMI interrupt, because there is also the maskable IRQ interrupt which can be generated by the first CIA chip, and also, unlike NMI, by the video chip VIC for the raster interrupt. It is also much more useful because it is maskable - the software can temporarily turn it off when it is not desirable to be interrupted. The only thing the NMI can do that IRQ cannot is detecting that the Restore key was pressed, but that is seldom useful.
I had forgotten what a big deal 'freezer' cartridges were on the C64!
A friend's uncle manufactured these himself using an EPROM burner and God knows where he got the casings, and sold them to us kids. Worked great. I had no idea about the amount of hacking that went into making them work.
Those were fun times. A friend had a Power Cartridge and I reverse engineered it and re-implemented its features in the programmable Expert Express cartridge, using assembly language. It could also save/restore games, turbo loader and screenshots.
I liked the interface of the FC3, but I always seemed to have trouble with it on NTSC systems, likely the fastloader. I ended up using ICEPIC or Super Snapshot most of the time instead.
I always found Action Replay to be superior and easier to use than Final Cartridge.
Very interesting. I was m always amazed by the code complexity behind C/64. Also, all this logic was squeezed in so few bytes!
I love how the Action Replay FLOPPY disk for Amiga 1200 loads into the high 1MB RAM space. No need for hardware. (note: Amiga 1200 has 2MB RAM by default).
I presume that the lack of an Ultimax-style bypass is why, as I understand it, there are no freezer cartridges for Atari 8-bit. (The piracy problem was just as bad, however, because of Happy Computers <https://en.wikipedia.org/wiki/Happy_drives>.)
On the other hand, Atari 8-bit's design allows for FujiNet to work without the workarounds/disadvantages a Commodore equivalent would have. <https://news.ycombinator.com/item?id=37424773>
There were freezer's for the Atari line. They plugged into the parallel bus IIRC.
I never owned one, I only know because I've just spent the last 3 or 4 days putting together a site to browse my mirror of pigwa.net (the Atari software archive site), and I happened to be using the 'Projects' directory for my testing.
If you:
1) go to http://atari-archive.net/
2) Double-click the 'Cloud drive' icon to open the window
3) Double-click on 'Projects', then 'Turbo Freezer 2005 & 2011' [1]
You can see the project, including a PDF of English documentation in the turbo-freezer-2011 subfolder.
[1] The icon isn't wide enough for the entire filename but it's obvious what's what. There's an 'As list' mode if it bothers you :)
I think the Atari version uses the /IRQ on the parallel bus, I know you can do some funky stuff with that - like take over the bus from the CPU (by keeping it in halt) and as long as you respect Antic's bus cycles (the true master of the "cpu" bus) you can read/write to RAM and do whatever you want.