Lunar Leeper

Lunar Leeper PAL Patch

Lunar Leeper for the VIC-20 was released as an NTSC cartridge. When you run an NTSC cartridge dump on a PAL machine, the picture is shoved into the upper-left corner of the screen. This page describes a two-byte patch that fixes that, and a small wrapper that turns the two original ROM dumps into a single autostart .prg file.

Title screenAttract-mode gameplay
NTSC bytes on PAL machineNTSC title screen on PAL machineNTSC gameplay on PAL machine
PAL-patched bytes on PAL machinePAL-patched title screen on PAL machinePAL-patched gameplay on PAL machine

NTSC and PAL TV signals have different geometry: NTSC runs at ~60 Hz with ~262 scanlines, PAL at ~50 Hz with ~312 scanlines. Because the picture starts in a different place on each kind of TV, the VIC-I chip uses different default values for where the picture begins.

Two registers control this:

Lunar Leeper's startup code copies a small table of bytes from $2008..$2018 straight into the VIC registers at $9000..$9010. The first two bytes of that table - at $2008 and $2009 - are the screen origin. In the NTSC dump they are $04 and $19. Change them to $0C and $26 and the game centers correctly on PAL.

Lunar Leeper shipped as a 16K cartridge split across two ROM chips: a 4K chip mapped at $2000-$2FFF and an 8K chip mapped at $A000-$BFFF. Dumping the cart gives you two separate files.

The wrapper is a one-line BASIC program (10 SYS 4621) that runs a tiny 71-byte machine-language stub. The stub copies each ROM dump into the memory location the cartridge would have mapped it to ($A000 and $2000), then executes JMP ($A000)- the same indirect jump through the cartridge's cold-start vector that a real cart would perform at power-on. The result is a single 12,373-byte autostart file you can just LOAD and RUN.

Running it needs a VIC-20 with RAM in both BLK1 ($2000-$3FFF) and BLK5 ($A000-$BFFF) - in practice a 24K+ expansion, or -memory all in VICE.

Get the patcher

The patcher program is available on GitHub: github.com/arttu76/vic20lunarleeperpalpatch.