• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
Retro Game Coders

Retro Game Coders

Retro computer/console game + dev community

  • About
    • Retro Computer Collection
    • Contact
  • Blog
  • Retro Resources
    • Retro Gaming Timeline
    • Online Retro IDE
    • Retro Pixel Art Editor
    • Dungeon Loom Map Editor
    • 6502 Programmer’s Reference
    • Emulators
      • Acorn Electron
      • Amstrad CPC Emulator
      • Online BBC Micro Emulator
      • Commodore PET Emulator
      • Browser C64 Emulator
      • DOSBox/DOS PC emulator
      • Tandy CoCo/Dragon
    • Best Retro YouTube Channels
    • New Retro Books
    • Raspberry Pi Amiga Emulation
    • MiSTer FPGA Tutorial
    • BMC64 C64 Pi
  • Community

Home » Retro Game Coders Blog » Programming

C64 Ultimate Enhanced Game for Christmas

A Christmas game enhanced for the C64U, custom palette with 16 colours for every pixel, but still runs at 50fps on a stock C64. Same game, two different approaches. Let me show you how.

In my C64 Ultimate review I complained that the ZX Spectrum Next lets games use its enhancements, while the C64U’s extras mostly sit in the menu waiting for the user to enable them.

Things changed for the better with the latest firmware update. Now we can set a custom palette in code, for example. This makes a huge difference, games can now take advantage of the extra abilities of the Commodore 64 Ultimate without complicated instructions!

Unfortunately there is still no enhanced graphics mode built-in to match the ZX Spectrum Next’s 256 colours on screen, but we can offer a better visual experience than the stock C64.

Step Into Christmas title screen on the C64U
Step Into Christmas title screen on the C64U
Step Into Christmas title screen on a stock C64
Step Into Christmas title screen on a stock C64

Martin Piper’s “Mega Multicolour” trick shows a stock C64U can show any of the 16 colours on any pixel, from software. With the ability to perform the palette change in code, and the 64 MHz turbo feature, that now offers a decent “games can use the enhancements” answer.

But I didn’t want a game only C64U owners can play, so the same game had to work on a plain 1 MHz C64 too.

Join Retro Game Coders Community
Join the Retro Game Coders Community

Two C64 Versions, One Game

Optimising for the C64 meant using a different approach to creating the visuals. The answer was to make one core game, then work on two different graphics approaches.

Just at the right time I discovered crustyBASIC, Brian Sturk’s compiler, so I left my original code from last year and started over. Now the game logic is shared and each machine’s own code in a small imported “hooks” file.

You can now follow the tutorials and edit the code right in your web browser with the Online Retro IDE

– No downloads, configuration, etc necessary, and it is free!

The Game: Step Into Christmas

The game has you playing as a Christmas elf who drops down a chimney that scrolls upwards past him. You can slow down your descent if you push up to open his parachute, let go and gravity takes over and you speed up again.

Step Into Christmas in play on the C64U
Step Into Christmas in play on the C64U
Step Into Christmas in play on a stock C64
Step Into Christmas in play on a stock C64

Bats flap side to side across the shaft and spiders hang in the way. A hit hurts, it makes him flash and stops his fall momentarily.

You must collect the gifts that randomly appear in the brickwork on the way down.

Control the elf with a joystick in port 2, or W A S D on the keyboard.

Play the demo in your browser (stock C64 version)

Step Into Christmas in the IDE

The C64U Enhancements

You would think 64 MHz is enough to do basically anything you want, but a lot of clock cycles are being taken to offer the better graphics. Every pixel’s colour is written to the background colour register ($D021) as the “beam” draws it. At 64 MHz the CPU gets 63 cycles per normal bus cycle, which is 8 hires pixels, so 15.75 cycles per pair of pixels. This means, unfortunately, regular speed-boosted C64, and even VICE emulator, wouldn’t keep up.

The CPU is busy the whole time while the picture is drawn, so the game only gets the processor during border time. That’s roughly 105 raster lines per frame.

This approach does, though, give 320 x 200, any of 16 colours on every pixel, and the text screen and sprites still draw on top.

Getting there started with Mosaicus by Brandon Staggs. This tool outputs the graphics for us to use. The racer code then lives under the KERNAL, LZ packed, and the compiled crustyBASIC program is called once a frame.

The VIC normally stalls the CPU every 8th line (“badlines”), which shears a cycle-counted picture. The game’s racer turns the display off before raster $30, so the VIC allows no badlines that frame, then back on at $32. You can see the glitch in the C64U screenshots below.

Early test on the C64U, before the badline fix
Early test on the C64U, before the badline fix
Badlines shearing the title picture on the C64U
Badlines shearing the title picture on the C64U

Scrolling using the default approach would have taken 81% of the spare CPU time. The chimney repeats, so instead the racer uses a lookup table of which picture row to show on each screen line, and scrolling just rotates that table. That drops CPU usage down to about 28% (34 to 36 of the ~105 lines on the real machine).

💬 Questions or comments? Head over to the community to discuss!

Getting it to work on a stock C64

The standard C64 doesn’t have a high-res 16 colours per pixel mode, so instead I redrew the art for the chunky multicolour mode.

Scrolling uses the same idea as the C64U row table so when the picture repeats, the game changes what the rows show instead of moving them. The shaft is 16 brick and wall characters, and every frame those 16 custom characters are rewritten with the tile at the new offset. Instead of copying 1000 screen bytes every 8 pixels, we only need to consider 128 bytes per frame.

Gifts are characters too, and they rise with the bricks in step with the pattern, so every gift shares one set of characters drawn at 8 offsets.

Your player character sprite is two hardware sprites stacked, this means his body can have green for his jacket but his hat can still be red. The parachute is two sprites side by side. That leaves four for enemies on screen at once. Not a lot but enough for a silly little Christmas game!

Using this approach it runs at 50 frames a second on a 1 MHz C64, no turbo needed.

What Next?

While there is a playable demo, the game is still a work in progress. There is no scoring, difficulty increase, or damage counter.

Maybe I will have time to add some music too? We will see!

Subscribe to the newsletter so you don’t miss the finished game.

Credit where it’s due!

  • crustyBASIC by Brian Sturk.
  • Mega Multicolour idea by Martin Piper.
  • Viewer code from Mosaicus by Brandon Staggs (MIT).
Category: ProgrammingTag: basic programming, Commodore 64 (C64), crustybasic
Previous Post:ZX Spectrum Next Kickstarter 3 ReviewZX Spectrum Next Kickstarter 3 (Board-Only) Review

Retro Game Coders

Retro computer/console game + dev programming community by Chris Garrett

  • Bluesky
  • Threads
  • Facebook
  • Instagram
  • YouTube
  • Mastodon

Maker Hacks ・ D6Combat・chrisg.com

© Copyright 2026 Chris Garrett

Privacy ﹒ Terms of Service

Return to top