I wasn't by any means the first person to write a "turbo loader", I remember the day I first saw one, I was stood in a local computer shop when the assistant popped Jeff Minter's "Revenge of the Mutant Camels" into the cassette deck. About five minutes later up pops the game! Turns out that Jeff had licensed a new fangled fast loader from a German company called Kingsoft.
I've gotta do one of these! To cut a long story short, I took a look at the ROM load and save routines and was just flabbergasted at just how poor they were; No wonder loading was slow; it effectively stored more than four times the data it needed to! Every byte stored required 20 pulses (two for each bit sent, plus a couple of parity bits and a couple of bits to mark that this byte was the last byte (!). This data was then stored again to verify to load!
I took a different approach to the IO timings; everything in Freeload was done with Non-Maskable Interrupts, which meant that the timings could be really tight so I could seriously shorten the pulse lengths and more importantly I could free up the main processing loop to do other things whilst the load was going on in the background.
(For the curious, at the end of the load the system setup a non-maskable timer interrupt with a very short countdown. When the interrupt went off and jumped to the interrupt manager it "forgot" to acknowledge the interrupt had happened. When the punter pressed his "Freeze" button the cartridge generated a new interrupt, which unfortunately wouldn't do anything because there was already an interrupt blocking the queue).
The first version of Freeload went on Uridium - it didn't do anything fancy - but it loaded fast, could keep the screen on during the load, and was a pain in the ass to copy both tape-to-tape and to disk.
A couple of months after I joined the chap that did all the tape protection left, and Ocean were left with a chunk of very cryptic undocumented code, which no one really understood, and a whole bunch of games to put out.
Thanks to Martin Galway (!) who mentioned to Gary Bracey (Ocean's supremo Software Manager) that I'd done "a few loaders, and a bit of tape protection" I ended up being roped into every tape, disk, and compilation that came out of the Ocean doors for five years.
If you need to know why there were so many Ocean loading tunes, its simple, its because I did the mastering for so many Ocean / Imagine games tha music drove me nuts! Luckily for my sanity Jon Dunn was very accomodating with the new tunes.
Over time, the load times improved, the mastering software became fully automated, the multi-load routines had proper cyclic redundancy checking to minimise duff loads, and the loader itself started finding things to do during the load...
It started with keeping the screen on and flashing the border as each new bit streamed in, then a countdown timer, then I introduced loading music, animations and smooth scrolling finally ending up playing mini games during the load - I did versions of Breakout, Space Invaders and Asteroids to pass the time whilst the games loaded!!! (note: Not to be confused with Ivade-a-Load by Richard Aplin at around the same time)
These games retailed at £3.99 and so the price had to be kept down; the packaging changed to the old fashion, simple single cassette plastic box and we changed duplicators for the budget titles to further reduce the price. One problem. The new duplicator couldn't reliable duplicate Freeload. I'm not entirely sure why not, but it had something to do with Freeload's short pulse widths when duplicated at high speed on cheap duplicating equipment caused very dodgy yields.
And thus, Hit Load was born. A significantly slowed down version of Freeload so that the tapes could be duplicated. However there was one practical upshot of this; as the load now took longer, the Ocean loading music ran out way before the load had finished, so I had to get Jon Dunn to write a new piece of music that lasted a minute longer!
Tedious info, only
for the seriously interested / curious / nostalgic
/ nerdy
Over the years the outer layers
of Freeload changed with new protection schemes,
new sneaky methods of detecting Freeze cartridges,
and new encryption and compression techniques, but,
fundamentally the core save and load routines
stayed the same.
All Freeload titles load in 14 parts (excluding the
initial boot load that pulls in the loader) at
roughly 3000 baud (which is x10 faster than the
orignal Commodore routines).
At three points during the loading sequence
Freeload loaded the Freeloop control software -
once to actually kick things off, loading the music
and scrolling the boot messages, and twice more
during parts of the load (over the top of itself)
to counter any changes that a hacker may have made
to the initial loading software.
Some Freeload titles didn't actually "jump" into
the game code at the end, the loader actually
loaded the start address directly into the stack,
fudged the stack point and just executed a RTS to
start the game.
Once Martin Galway left Ocean I wrote a new music
driver for Jon and Matt with a more compact data
format and faster playback. All of the loading
music (including the driver code) post Hyper Sports
was just a fraction over 4K bytes.
Nearing the end of the C64's tape life, Freeload
started doing some crazy stuff under the hood to
deter the hackers; The freeload code and the
incoming data was encrypted. The protection code
would decyrpt multiple times over the top of itself
and the executing code would "fall in" to the newly
decoded sections. At one point the decryption key
was based on how long certain parts of the loader
took to execute - if you changed any of the loader
it would mess the timings and thus scramble up the
incoming data.
In the end, all protection gets cracked - its
fundamental - anyone that says their system is
un-hackable quite frankly has a screw loose!
Compilation Trivia
Some of the really big sellers in the nineties were the compilation boxes that Ocean used to sell. Little did people know what an absolute nightmare they were to put together! When the compilation contained purely Ocean titles the casette versions weren't an issue as I had more than likely mastered the game myself. When it came to disk versions and compilations with third party titles on, well, that's when the fun began.
Disk versions were the catalyst to my data compression fascination; With disk versions the fewer disks you crammed the compilation on, the more profit Ocean made, so it was always an "interesting" challenge to find newer and unique ways to compact the games down. I had many long nights trying to save a disk here and there to maximise revenue.
The really tricky stuff however were the third party games; nine times out of ten I wouldn't get raw data, or code, or even a master maker, I would just get a tape copy of the game. In order to get it on the compilations I'd have to first break the original copy protection (with the third party's blessing obviously!), and, in the case of a multiload title, patch in my own Freeload routines, and finally put the Freeload protection on the main load.
Let me tell you, there were a lot of very clever protetion systems back then!
Freeload? For
other companies?
I did an interview with
a Retro gaming magazine a few years ago and they
were asking about all the other companies that used
Freeload for their 'C64 games. I looked on blankly
- huh? Once I joined Ocean I only ever wrote
protection code for them (I didn't have the
lifeforce left to do EVEN more tape loaders)
whaddya mean?
So, I go looking at the .TAP archives (actual
images of C64 tapes loading for the emulators) and
see hundreds of supposed Freeload based titles. No,
says Paulie, they're just confusing the pulse
widths with some other loader from the day. To cut
a VERY long story short I got curious and started
dissasembling a couple of the game loaders, and
lo-and-behold hundreds of games did indeed use
Freeload that were line for line, byte for byte
identical.
So it looks like industrial piracy was rife even
back in the 80's and 90's. Not that I'm bitter -
its actually quite a compliment I suppose that the
system worked well enough for people to reverse
engineer it and reuse it.
Freeload in the
Public Domain
About eighteen months ago someone that was still creating C64 games asked if I still had the source code as he'd love to see how it worked, and could potentially use it on his own titles. As I wrote Freeload before I joined Ocean and held the copyright on it I decided to stick it out in the public domain for nostalgia's sake. I managed to find and convert a bunch of old 'C64 disks, and so you can find the 6502 source code for Freeload, Freesave and Freeload Multiload on my DOWNLOADS page.