code · retro
Matrix Math on a Commodore 64
Matrix fundamentals from the ground up. Definitions, the operations that matter, plain Python, numpy for comparison, and a complete BASIC program on a …
Jun 8, 2026 · 15 min
commodore · c64
The SID Chip Is a Reservoir Computer
Reservoir computing says don’t train the dynamics, just train the readout. I used the SID’s analog filter as the dynamics and one ridge …
Jun 3, 2026 · 19 min
code · retro
Forty-Three Quintillion on a Commodore 64
Where the famous 43 quintillion comes from, why a C64 can’t print it the easy way, and a tiny multi-precision multiplier in BASIC that gets …
May 8, 2026 · 9 min
code · retro
Biological Processing Units and a Commodore 64
The fruit fly has a brain structure that acts like a hash function. I built it in Python, matched the 2017 paper’s MNIST results against a …
Apr 24, 2026 · 35 min
code · How-To
Breaking Enigma with Index of Coincidence on a Commodore 64
The Bombe needs a crib. What if you don’t have one? Index of coincidence measures how much an output looks like real language vs random noise. …
Mar 31, 2026 · 30 min
code · How-To
The Wallis Product for Pi on the C64
John Wallis found an infinite product for pi in 1655. Multiply enough fractions together and pi falls out. We run it on the C64 in BASIC and assembly, …
Mar 14, 2026 · 13 min
code · How-To
Enigma Ring Settings on the Commodore 64
Ring settings multiply Enigma’s keyspace by 17,576. We add them to our C64 emulator, see why brute force alone can’t keep up, and set the …
Feb 25, 2026 · 16 min
code · How-To
Breaking Enigma on the Commodore 64
The Commodore 64 searches nearly six million Enigma M3 configurations to find the one that matches a known plaintext crib. First the concept, then …
Feb 24, 2026 · 22 min
code · How-To
Enigma Emulator on the Commodore 64
A working Enigma M3 emulator on the Commodore 64. First in BASIC for clarity, then in 6502 assembly for speed. Eight rotors with dual notches, …
Feb 20, 2026 · 23 min
code · Getting Started
Sorting Algorithms Visualized on the Commodore 64
Visualizing sorting algorithms in real-time on the Commodore 64 using PETSCII characters. Three classic algorithms rendered as animated bar charts in …
Dec 17, 2025 · 14 min
code · Getting Started
Three Maze Generators on the Commodore 64
Exploring three different maze generation algorithms on the Commodore 64: Depth-First Search, Randomized Prim’s, and the classic 1981 algorithm …
May 30, 2025 · 10 min
code · How-To
16-bit Unsigned AND on Commodore 64
Implementing 16-bit unsigned AND operations in Commodore BASIC using two’s complement to work around the signed integer limitation.
May 20, 2025 · 2 min
C64 · code
Back to the basics with BASIC (and Python): Binary Search
Why your algorithm choice matters: comparing linear search O(n) vs binary search O(log n) with implementations in Commodore BASIC and Python.
Mar 13, 2024 · 7 min
C64 · code
Machine Language: Count Faster on 6502
Optimizing a simple counting loop on the 6502, progressing from slow BASIC to increasingly faster assembly implementations. A practical guide to 6502 …
Jan 11, 2024 · 7 min
C64 · code
Visualize and verify the reverse engineered Commodore 64 SID LFSR
Building and verifying the Commodore 64 SID chip’s 23-bit LFSR in hardware on a breadboard and comparing the output against the actual SID chip.
Jan 3, 2024 · 8 min
C64 · code
A Gentle Introduction to LFSRs
An introduction to Linear Feedback Shift Registers: how they work, building one on a breadboard with shift registers and XOR gates, and implementing …
Dec 21, 2023 · 6 min
C64 · code
Quick Post: Printing binary numbers in Commodore BASIC 2.0
Commodore BASIC 2.0 A lot of fun with binary numbers can be had by printing them to the screen. This is a quick post to show how to do that with …
Dec 19, 2023 · 2 min
C64 · code
A gentle introduction to two's complement
Understanding two’s complement: how computers represent negative numbers, why it simplifies hardware design, and how to work with signed …
Nov 21, 2023 · 12 min
C64 · code
N-Queens problem
Solving the classic N-Queens puzzle using backtracking. Covers both iterative and recursive approaches with implementations on the Commodore 64.
Oct 12, 2023 · 7 min
C64 · code
Rail Fence Cipher on Commoodore 64 and TI 99/4A
Implementing the Rail Fence Cipher on the Commodore 64 and TI 99/4A. A fun transposition cipher for secret messages with kids.
Sep 8, 2023 · 6 min
C64
A grid drawing rabbit hole
Drawing grids for screen layout planning on the Commodore 64 and VIC-20. Comparing BASIC, Simon’s BASIC, and Super Expander approaches.
Aug 11, 2023 · 6 min
C64 · code
Building a software serial bridge
Modern and retro mix One of my favorite peices of retro clone hardware is Bob Corsham’s KIM-1 Clone. I’ve featured it many places like the …
May 5, 2023 · 5 min
C64 · code
Blinkenlights
Driving LEDs from the VIC-20 and KIM-1 USR ports. Binary counting in the real world with vintage hardware.
Mar 2, 2023 · 7 min
C64 · code
40 years on, this is still the best maze algorithm
Exploring the elegant maze generator from Compute! magazine (December 1981). A line-by-line breakdown of how this classic BASIC algorithm works.
Jan 26, 2023 · 5 min
C64 · code
Validating Pilish
Writing code to validate Pilish text—prose where word lengths match the digits of Pi. Implementations in Julia and Commodore BASIC.
Dec 1, 2022 · 5 min
C64 · code
My mostly retro writing platform contenders in National Novel Writing Month for 2022 NaNoWriMo
Evaluating vintage computers for NaNoWriMo 2022: VIC-20, Plus/4, Commodore 64, and PET. Word processing on 8-bit machines with SpeedScript and other …
Oct 21, 2022 · 6 min
C64 · code
A little more speed from the 6502
Optimizing 6502 memory transfers beyond the general-purpose approach. Testing on a 1MHz KIM-1 clone with precise timing measurements.
Jun 22, 2022 · 4 min
C64 · code
How fast can a 6502 transfer memory
Testing real-world memory transfer speeds on 6502 machines. Inspired by Apple M2 marketing, let’s see what Commodore hardware can actually do.
Jun 14, 2022 · 8 min
C64 · code
64 Bit Addition and Products on Commodore: The Wheat and Chessboard problem
Implementing 64-bit arithmetic in 6502 assembly to solve the wheat and chessboard problem. Handling numbers too large for standard calculators on …
May 10, 2022 · 5 min
C64 · code
Yet another version of the 100 door problem; this time, let's extend Commodore BASIC to add PRINT @, shall we?
Extending Commodore BASIC with a PRINT AT command using machine language, then using it to visualize the 100 door problem.
May 4, 2022 · 4 min
C64 · code
The terrible random number generation in the Commodore 64 (and 128)
Visualizing the poor randomness of RND() on the Commodore 64 and 128 compared to the PET and Plus/4. Clear patterns emerge when you plot the output.
Mar 21, 2022 · 4 min
C64 · code
Simple splitting the screen with two colors on the Commodore 64
A quick technique for splitting the Commodore 64 screen into two solid colors by manipulating VIC registers and screen memory.
Feb 28, 2022 · 1 min
C64 · code
Permutations of 1 to 9 in Python, BASIC, and 6502 Assembly
Generating all 362,880 permutations of 1-9 the hard way: understanding algorithms instead of relying on library functions. Implementations in Python, …
Dec 20, 2021 · 6 min
C64 · code
Can you do Advent of Code on 8-Bit Machines?
Attempting the annual Advent of Code challenge on vintage 8-bit computers. Completing about 60% of puzzles on Commodore hardware.
Dec 14, 2021 · 5 min
C64 · code
Quick Tower of Hanoi with Sound on the Commodore 64
Implementing Tower of Hanoi with SID sound on the Commodore 64, inspired by Numberphile’s Ayliean MacDonald video.
Oct 28, 2021 · 1 min
C64 · code
Dice frequency
Testing the Commodore 64’s random number generator by simulating dice rolls and comparing the frequency distribution to theoretical values.
Oct 28, 2021 · 3 min
C64 · code
Calculating Pi via the Gregory-Leibniz series in BASIC on the Tandy Color Computer 2
Calculating Pi on a Tandy Color Computer 2 with basic (non-Extended) BASIC. Working around the missing exponent function.
Sep 3, 2021 · 2 min
C64 · code
Just for fun, the 100 door problem on several different systems
Solving the classic 100 door problem with visual output on multiple vintage systems: VIC-20, C64, PET, Atari, and Color Maximite.
Aug 5, 2021 · 6 min
C64 · code
Running Commodore 64 BASIC Programs on a PET
How to load and run Commodore 64 BASIC programs on a PET. Working around the PET’s lack of program relocation.
Jul 18, 2021 · 3 min
C64 · code
Making and breaking Ciphers on the Commodore 64, er VIC-20 - Lagged Fibonacci Sequence and a little Monte Carlo while embracing contraints
Generating pseudo-random numbers with the Lagged Fibonacci Sequence on the VIC-20. Building reusable BASIC subroutines for the cipher toolbox.
Jun 9, 2021 · 7 min
C64 · code
Running the 8 Bit Show and Tell VIC-20 Super Expander Programming Challenge on the Commodore 64
Porting Robin’s VIC-20 Super Expander programming challenge to the Commodore 64 using Super Expander 64 and Simon’s BASIC.
May 19, 2021 · 3 min
C64 · Commodore
The retro pinout project
Documenting oscilloscope readings from working vintage computer chips to help diagnose faulty machines. A collaborative troubleshooting resource.
May 18, 2021 · 3 min
C64 · code
Quick Post: Modulus in BASIC 2 without a cartridge
How to perform modulo operations in Commodore BASIC 2 without a cartridge. A one-line solution for VIC-20 and C64.
May 15, 2021 · 1 min
C64 · code
Making and breaking Ciphers on the Commodore 64 Part 12 - Pontifex - Solitaire from Cryptonomicon
Implementing Pontifex/Solitaire—the playing card cipher from Cryptonomicon designed by Bruce Schneier—on the Commodore 64.
May 13, 2021 · 9 min
C64 · code
Making and breaking Ciphers on the Commodore 64 Part 11 - One time pads on a Commodore 64, probably a bad idea
Generating one-time pads on a Commodore 64. Probably a bad idea for real security, but it looks cool.
May 10, 2021 · 3 min
C64 · code
Making and breaking Ciphers on the Commodore 64 Part 10 - Finding hash collisions with a type in game from 1984
Understanding hash collisions by finding them in a simple checksum from a 1984 type-in game. Demonstrating why weak hashes fail.
Apr 28, 2021 · 8 min
C64 · code
Making and Breaking Ciphers with Commodore 64 Part 9 - Finding Smallish Primes
Finding prime numbers on the Commodore 64 for cryptographic purposes. A practical introduction to primes and primality testing.
Apr 26, 2021 · 7 min
C64 · code
Quick Post: Slow text on the Commodore
How to display text character by character with delays in 6502 assembly using Turbo Macro Pro. A quick tip for a 12-year-old learning assembly.
Apr 22, 2021 · 2 min
C64 · Commodore
The Commodore 64 N.O.O.C.U.L.A.R. futbal project
Building a portable Commodore 64 development rig using a Pelican case, external monitor, and either TheC64 or Ultimate 64 for on-the-go retro …
Apr 21, 2021 · 6 min
C64 · code
Making and breaking Ciphers on the Commodore 64 Part 8 - RC4
Implementing the RC4 stream cipher on the Commodore 64, exploring the algorithm that powered WEP, WPA, and many other encryption protocols.
Apr 19, 2021 · 9 min
C64 · Commodore
Repairing a Commodore 128 and DIY Chris's RAM tester review
Repairing a Commodore 128 with bad RAM using DIY Chris’s RAM tester to diagnose and replace faulty 4164 memory chips.
Apr 14, 2021 · 3 min
C64 · code
Making and breaking Ciphers on the Commodore 64 Part 7 - Pseudo Random with Linear Congruential Generators
Exploring pseudo-random number generation on the Commodore 64 using Linear Congruential Generators, a key building block for cryptographic …
Apr 6, 2021 · 9 min
C64 · code
Making and Breaking Ciphers with a Commodore 64 - Part 6: XOR is Magical - Data recovery
Understanding the XOR operation and its magical properties for data recovery in cryptography and disk storage on the Commodore 64.
Apr 1, 2021 · 3 min
C64 · code
Finding the Prodigal Easter Egg inside the Easter Egg on a Commodore 64
A deep dive video exploring hidden Easter eggs within an Easter egg on a 35-year-old album discovered using a Commodore 64.
Mar 29, 2021 · 1 min
C64 · code
Quick post: Determining length in Commodore Assembly
A quick tutorial on determining string length in 6510 assembly language, comparing the approach to Python’s simple len() function.
Mar 29, 2021 · 1 min
C64 · code
Benchmarking Retro Computers (mostly Commodore) with marginal methods
Benchmarking BASIC execution speed across various retro computers using jiffy timing, comparing Commodore machines and other vintage systems.
Mar 18, 2021 · 7 min
C64 · Commodore
Jiffies in Assembly
How to use the Commodore 64’s jiffy clock for benchmarking in both BASIC and assembly language, measuring time in 1/60th second increments.
Mar 18, 2021 · 3 min
C64 · Commodore
Making and Breaking Ciphers with a Commodore 64 - Part 5: Wargames
Recreating the WarGames movie launch code sequence on the Commodore 64, implementing brute-force hash table searching in assembly.
Mar 16, 2021 · 7 min
code · Commodore
Calculating Pi via the Gregory-Leibniz series in BASIC on the VIC-20
Calculating Pi using the Gregory-Leibniz series in BASIC on the VIC-20 for Pi Day, demonstrating the inefficient but educational iterative approach.
Mar 13, 2021 · 2 min
C64 · code
Quick Post: Commodore 64 Simple Addition Efficiency
Comparing two assembly language approaches to counting to 16 million on the Commodore 64, demonstrating significant performance differences.
Mar 13, 2021 · 3 min
C64 · Commodore
c0pperdragon verdict
Comparing various video output improvements for vintage Commodore computers including RF modulator replacement, chroma resistor mod, and the …
Mar 10, 2021 · 4 min
C64 · Commodore
Making and Breaking Ciphers with a Commodore 64 - Part 4: The PIN Program from Terminator 2
Recreating the Terminator 2 ATM PIN cracker scene on the Commodore 64, using SID chip random numbers and 6502 assembly.
Mar 8, 2021 · 4 min
C64 · Commodore
Making and Breaking Ciphers with a Commodore 64 - Part 3: The Caesar Cipher
Building a Caesar cipher encoder and brute-force decoder on the Commodore 64, demonstrating how to crack simple substitution ciphers programmatically.
Mar 7, 2021 · 6 min
C64 · code
Making and Breaking Ciphers with Python, er Commodore- Part 2: The Shift Cipher
Implementing the shift cipher on the Commodore 64, encoding messages by rotating alphabet positions similar to a physical code wheel.
Mar 1, 2021 · 8 min
C64 · Commodore
Replacing an RF Modulator on a Commodore 64C
Replacing the RF modulator on a PAL Commodore 64C with an S-Video bypass board to dramatically improve video output quality.
Feb 26, 2021 · 3 min
C64 · Commodore
Making and Breaking Ciphers with Python, er, a Commodore- Part 1: The Reverse Cipher
Starting a series on implementing ciphers in Commodore assembly language, beginning with a simple string reversal as the first building block.
Feb 24, 2021 · 4 min
C64 · Commodore
Simple, 'unbreakable' encryption with a pencil
Implementing a one-time pad cipher by hand using dice-generated random numbers, inspired by the encryption methods in Cryptonomicon.
Feb 10, 2021 · 8 min
C64 · Commodore
Getting started with Native Commodore 64 Assembly
A beginner’s guide to learning 6502 assembly programming on the Commodore 64, including recommended tools, resources, and development …
Jan 26, 2021 · 8 min
C64 · Commodore
Friday fun: Games I'm playing in Jan 2021
Reviewing Soul Force and Outrage, two modern Commodore 64 games from Protovision being played on a PAL 64C.
Jan 22, 2021 · 2 min
C64 · retro
Did you do that on real hardware?
A defense of using modern conveniences like LCD monitors, SD2IEC devices, and flash cartridges with vintage computers, explaining the practical …
Dec 31, 2020 · 3 min
Commodore · C64
Merry Christmas
A Christmas greeting featuring a Commodore 64 holiday demo video.
Dec 24, 2020 · 0 min
C64 · Commodore
Why does there have to be a why?
Reflections on getting back into 8-bit computing after building Ben Eater’s breadboard 6502, and why learning vintage assembly language …
Nov 25, 2020 · 2 min