Decompiler Technologies - RetroFit Project

Last updated March 17th 2013

What is RetroFit?

The basic idea is to modify old games so that they take advantage of modern, higher resolutions.

Mainly, these old games were written for old monitors and televisions, which were around 320x200 pixels. Modern displays are around 1024x768.

Example RetroFit

For this example, we'll be using Lords of Chaos on the Commodore 64. It's running under Frodo for Windows.

For instance, here is 317x210 (7 tiles by 7):

Why don't we just double up on the screen size? Well, here's why:

614x405 (7 tiles by 7):

Bigger size, but still 7 tiles by 7!

The RetroFit Process

Old computer games are written in assembly language and it's hard to decipher what's going on.

So what do we do if we want to run an old game on a new monitor, without just doubling the screen size as above?

Well, it's possible!

Decompiled Drawing Function

Here is the original 6502 code of the drawing function.
Here is the decompiled code, of the function which prints the game screen. You see the constant '7', which draws Y rows of X tiles wide.

Download Lords of Chaos Demo Installer

Download

Keys are Q,A,O,P and Space (or select joystick).

Finished Result

Here is a fully playable RetroFitted 567x229 (19 tiles by 8):

It's hard to argue the smaller screen is more fun to play! ;-)

Preserving Gameplay

In 1981, when programmers at Commodore wanted to port an arcade game to the Vic-20 computer, they were given upright arcade cabinets and told to get on with it, and they couldn't have the original source code. The finished Vic-20 game would include everything they could figure out from the arcade game, and no more. So if there was a secret level that required not losing any lives by level 20 (eg, Bubble Bobble), they could probably not realise that level ever existed.

Platforms

Any platform with an emulator and a vintage-sized screen can be RetroFitted.

This is because the debugging techniques used to find graphical code work on any emulator.

Also, we can decompile any platform because the RightBack decompiler can decompile any CPU.

One requirement is that the game must have a scrolling viewport, as in tile-based RPGs (like Lords of Chaos and Ultima VI), or side-scrolling shoot-em-ups (Bounder and Xenon Megablast).

Length of Time To RetroFit a Game

It took about 3 weeks to reverse engineer Lords of Chaos's graphic routines, and then a day or two to patch the game's graphic code.

Who Else Has Done This?

MathFigure was a huge inspiration, even though we use different techniques to enhance old games.

Retro Remakes is just one of many sites porting old games to modern machines.

Copyright 2012 Decompiler Technologies (jeremy@decompiler.org)