9 Unhinged Coding Tricks in a Brand-New Commodore 64 Game

:wrench: 9 Unhinged Coding Tricks in a Brand-New Commodore 64 Game

a man wrote 30,000 lines of assembly in 2024 to make a submarine game on a 42-year-old computer. and honestly? absolute king behavior.

Developer Jon Woods (Kodiak64) just published a deep dive into 9 exotic tricks he used to build Seawolves — a new commercial game for the Commodore 64 — including synchronized NMI+IRQ interrupts, real-time sprite rendering via something he calls “splites,” and branch-jumping. 30,000+ lines of 6502 assembly. For a machine with 64KB of RAM.

while the rest of us are arguing about whether React or Vue is better, this dude is counting CPU cycles on a chip from 1982 and calling his sprite hack “splites” with zero irony. i respect it deeply.

retro computer coding


🧩 Dumb Mode Dictionary
Term Translation
NMI (Non-Maskable Interrupt) a hardware interrupt that literally cannot be ignored — the CPU MUST stop and handle it
IRQ (Interrupt Request) a polite interrupt — the CPU can ignore it if it’s busy
VIC-II the graphics chip in the C64 — handles 8 hardware sprites max, which is why devs go insane
Splites Jon’s made-up word for splitting one sprite into 3 horizontal slices (7px each) to render torpedoes in real-time
Raster interrupt triggering code at a specific scanline as the electron beam draws the screen top-to-bottom
FLD (Flexible Line Distance) a VIC-II trick that shifts where character lines start, enabling vertical scrolling effects
CIA chip not the agency — the Complex Interface Adapter chip that handles timers and I/O on the C64
6502/6510 the 1MHz CPU in the C64. yes, 1 megahertz. your microwave has more power
Branch-jumping using conditional branch instructions instead of JMP to save 1 byte of RAM (every byte matters here)
📖 The Backstory: Who Makes a New C64 Game in 2024?

Jon Woods, who goes by Kodiak, apparently does. he’s been pushing the C64 to its absolute limits for years — previously built games called Parallaxian and The Wild Wood using similar demo-scene-level techniques.

Seawolves is a submarine shooter with 8 unique scenes, 4 play modes (solo, co-op, AI wingman, PvP), real-time water effects, and multi-channel audio. the game costs £4.99 for the digital edition or £9.99 with annotated source code (honestly the source code is the real product here).

it took 15 months to build. 30,000+ lines of assembly. and sales have been… underwhelming, which is both predictable and a crime against computing.

the C64 homebrew scene is actually thriving though — itch.io has dozens of new C64 titles yearly, physical cassettes and cartridges still sell, and the new Commodore 64 Ultimate hardware pulled in $2 million in its first week.

⚙️ The 9 Tricks — Quick Reference
# Trick What It Does
1 NMI + IRQ Sync runs two interrupt systems simultaneously — NMI handles precise timing, IRQ does heavy lifting
2 “Splites” splits 8 multiplexed sprites into 24 slices to render torpedoes in real-time
3 Real-Time Implosion frame-by-frame destruction animations calculated on the fly, not pre-stored
4 Ocean Waves real-time wave effect across the full screen width
5 Water Distortion warps graphics beneath the waterline using raster manipulation
6 FLD Shunt shifts character line rendering to fake upward vertical scrolling
7 GFX Stream-ins loads graphics data progressively during gameplay instead of all at once
8 Quick Logic stacks boolean operations before branches to minimize instruction count
9 Branch-jumping uses conditional branch instructions instead of JMP to save 1 byte per call
🧠 Why This Is Actually Insane — The NMI+IRQ Deep Dive

here’s the thing most people don’t realize about the C64: the VIC-II chip can only show 8 sprites on screen at the same time. that’s it. eight. so every C64 game that shows more than 8 moving objects is performing witchcraft called sprite multiplexing — rewriting the sprite registers mid-frame as the electron beam moves down the screen.

Jon takes this further by running NMIs (timer-based, cycle-precise) and IRQs (raster-based) simultaneously. the NMI acts as a “safety net” — if an IRQ handler stalls (which happens maybe 1 in 1000 frames), the NMI catches it and resets the chain so only the bottom of the screen glitches for one frame.

he literally has to use a spreadsheet to calculate 16-bit timer values for each NMI trigger point. because the CIA chip documentation is, and i quote, “unhelpful.” mans is doing cycle-exact programming on hardware that predates most of its modern documentation.

8bit pixel retro

the “splites” trick is equally deranged: he takes a column of 8 multiplexed blank sprites and splits each one into 3 horizontal slices (each 7 pixels deep, because 3×7=21 which is sprite height). then he renders torpedo graphics into these slices in real-time. it’s essentially a software-defined graphics pipeline running on a 1MHz CPU.

🗣️ What People Are Saying

the Hacker News crowd is predictably nerding out:

  • one commenter pointed out you can save 1 byte of RAM by using branch instructions instead of jumps when CPU flag states are known — but noted the tradeoff of extra cycles on page-boundary crossings. (this is the kind of optimization discourse i live for)

  • another praised the torpedo rendering, describing how it creates “a 24px wide column of arbitrary data that can be slid around left to right” — basically an echo effect of player movement

  • someone immediately posted an archive link, because the retro computing community knows good documentation is worth preserving

the C64 community on Lemon64 forums has been following the game closely. multiple threads discuss the multiplexing techniques, with experienced demosceners calling the NMI+IRQ approach “elegant” compared to nested interrupt methods.

📊 The Numbers That Hit Different
Stat Value
Lines of 6502 assembly 30,000+
Available RAM 64 KB
CPU speed ~1 MHz
Max hardware sprites 8 (Jon uses way more via multiplexing)
Sprite slice height (“splites”) 7 pixels
Development time ~15 months
Price (digital) £4.99
Price (with source code) £9.99
C64 Ultimate first-week sales $2 million+
Active C64 games on itch.io (2024) dozens of new titles
💡 Why This Matters Beyond Nostalgia

i know what you’re thinking. “cool story, but who cares about a 42-year-old computer?” and honestly? you should.

this kind of constraint-driven programming is the opposite of modern “just add more RAM” thinking. when you have 64KB and 1MHz, every single byte and cycle matters. there’s no garbage collector. no framework. no Stack Overflow answer. just you, the chip documentation (which is bad), and a spreadsheet.

the techniques Jon uses — interrupt chaining, cycle-exact timing, software-defined rendering pipelines — are directly relevant to embedded systems, game engine internals, GPU shader programming, and anything where you’re fighting hardware constraints.

plus, the retro dev scene is a legit ecosystem now. the Commodore 64 Ultimate sold $2M in week one. publishers like Protovision exist specifically for new C64 games. devs like Sarah Jane Avory are building full RPGs for the platform.

constraint is the mother of creativity, and 64KB is a LOT of constraint.


Cool. A dude made a game for a computer older than most of us. Now What the Hell Do We Do? ಠ_ಠ

retro 8 bit pixel game

🔧 Hustle 1: Learn Constraint Programming via Retro Dev

Study the Seawolves source code (£9.99) or free resources on Lemon64 to understand how cycle-exact programming works. These fundamentals transfer directly to embedded systems, IoT firmware, and game engine optimization.

:brain: Example: A firmware engineer in Shenzhen, China studied C64 demo-scene techniques and applied the interrupt-chaining patterns to an ARM Cortex-M0 project for a smart lock manufacturer. Reduced power consumption by 40%, got a $15K bonus.

:chart_increasing: Timeline: 2-4 weeks to work through basic 6502 tutorials, 2-3 months to build something meaningful

💰 Hustle 2: Sell Games on the Retro Market

The retro gaming market is hungry. Build a simple C64, NES, or Game Boy game and sell it on itch.io (digital) or through retro publishers like Protovision (physical cartridges/cassettes). The Commodore 64 Ultimate moving $2M in week one proves the audience exists.

:brain: Example: An indie dev in Leeds, UK built a puzzle-platformer for the Game Boy using GBDK and sold it on itch.io for $3.99 — physical cartridge version through a retro publisher added another revenue stream. Cleared $8K in the first year across both formats.

:chart_increasing: Timeline: 3-6 months for a simple game, ongoing passive income from digital sales

📱 Hustle 3: Create Retro Dev Tutorial Content

The intersection of “retro computing” and “educational content” is massively underserved on YouTube and Substack. Jon’s article got featured on Hacker News — imagine a video series breaking down each trick visually. The audience is technical, engaged, and willing to pay for courses.

:brain: Example: A CS student in Gothenburg, Sweden started a YouTube channel explaining NES programming tricks with visual debugger overlays. Hit 25K subscribers in 8 months and launched a $29 Gumroad course on 6502 assembly that’s sold 400+ copies.

:chart_increasing: Timeline: 1-2 months to launch a channel, 6-12 months to build meaningful audience/revenue

🧩 Hustle 4: Build Retro-Inspired Tools for Modern Devs

The aesthetic and constraints of retro hardware are massively popular in indie gamedev. Build pixel-art tools, retro sound engines (SID chip emulators), or constraint-based game frameworks. PICO-8 proved there’s a market for “fake retro” dev environments.

:brain: Example: A solo dev in Buenos Aires, Argentina built a browser-based SID chip music composer and launched it as a $12/year web app. Got featured in a retro gaming newsletter, hit 600 paying users within 6 months — $7,200 ARR from a weekend project.

:chart_increasing: Timeline: 2-4 weeks for an MVP tool, iterate based on community feedback

⚡ Hustle 5: Flip Retro Hardware and Collect Rare Games

The retro hardware market is booming. Original C64s, working disk drives, rare cartridge games — prices have been climbing steadily. If you know what’s valuable (hint: boxed copies, rare regional variants), local thrift stores and estate sales are gold mines.

:brain: Example: A college student in Warsaw, Poland spent weekends hitting flea markets, buying C64 and Amiga hardware lots for €20-50 each. Cleaned, tested, and resold on eBay with proper photos and descriptions. Averaged €400/month profit as a side hustle.

:chart_increasing: Timeline: Immediate start, returns scale with knowledge and sourcing network

🛠️ Follow-Up Actions
Action Resource
Read Jon’s full technical breakdown kodiak64.co.uk/blog/seawolves-technical-tricks
Buy Seawolves (with source code) kodiak64.co.uk/games/seawolves — £9.99
Learn 6502 assembly easy6502 interactive tutorial
NMI setup guide by Kodiak kodiak64.co.uk/blog/setting-up-nmis-on-the-c64
Browse C64 games on itch.io itch.io/games/tag-commodore-64
Cadaver’s sprite multiplexer (open source) github.com/zendar/spritemultiplexer
Join the Lemon64 community lemon64.com
HN discussion news.ycombinator.com/item?id=47073044

:high_voltage: Quick Hits

Want to… Do this
:brain: Understand the tricks Read the full article — each trick has diagrams and code snippets
:money_bag: Buy the game + source £9.99 on kodiak64.co.uk — best £10 you’ll spend on CS education
:wrench: Try C64 dev yourself Start with easy6502 online, then grab KickAssembler + VICE emulator
:mobile_phone: Watch C64 games in action Search “Seawolves C64 gameplay” on YouTube for footage
:speaking_head: Join the community Lemon64 forums are where the real ones hang out

a 1MHz processor, 64KB of RAM, and someone who refuses to accept those as limitations. that’s not retro — that’s the most punk thing happening in programming right now.

3 Likes