Claude Fable 5.1 Just Shipped. I Made It Scroll a Commodore 64 in Eight Directions at 50 fps.
From the publisher’s feed, collected in the ZeroLabs newsroom.
Rung seven of the ladder, measured on release week: banded colour RAM, a raster HUD split and a dozen multiplexed sprites on a 1 MHz CPU — built by an agent that measured before it drew.The workspace as it feels from the outside: a 1 MHz machine on the desk, and the agent’s instruments floating over it. Image generated with Gemini.Two articles ago, at the end of the GPT-5.5 session, I wrote that the next test in this series should be something where the platform’s idiom is unfamiliar to both sides — raster interrupts with cycle-exact timing, sprite multiplexing across the visible scan, the kind of thing the demoscene built and training data only holds in fragments. One article later, ION RIFT closed with the other half of the same thought: the loop’s instruments have a resolution limit, the one-frame stutter sat below it, and the human in the loop is not a formality — he is an instrument.IRON VEIN is what happens when you take both of those seriously at once, with a model that has been out for days rather than months. It is an 8-way scrolling platformer on stock hardware, and the interesting result is not that the model wrote 6502. That was settled rungs ago. The interesting result is where the diagnoses came from. I supplied the symptoms. Every single time, the location came from a number the agent had built for itself — and twice the number was wrong and was caught by another number.The ladder so farThe workspace is C64AIToolChain: cc65, VICE with its remote monitor, Python tooling, a local vision model for eyes, and a human who plays the results and pushes back. The ladder as it stood at the end of the last article:Seven rungs of the benchmark. Each step adds a technique the one below it could not do; rung 7 is the first to carry its own profiler.TableRung 6 was built by Claude Code running Fable. Rung 7 is the same agent on Fable 5.1, and the brief was one sentence: push this project as far as it goes with a game of high complexity.We argued through four candidates — an 8-way scroller in the mould of the era’s successful platformers, a Dropzone-style horizontal blaster, an isometric room game, a wireframe Elite. The scroller won because its difficulty is engineering difficulty, the kind a profiler can arbitrate. Either the machine scrolls in eight directions with colour and a dozen sprites at 50 frames a second, or it does not, and no amount of prose changes which.The terms were the usual ones: it does not have to be a clone of anything, a demo that proves the technique is reliable is enough; keep notes on the development and the difficulties; then write about it. IRON VEIN is an original work inspired by the genre, not a reproduction of any specific commercial title, and is not affiliated with any of them.One rule was set before any code, and I would set it again on any project of this kind: spike first. A bare engine, profiled until it says 50 fps or says no, before a single tile is drawn. It turned out to be the most valuable decision of the exercise, because the first engine said no.Three wallsThe C64 does not want to scroll in eight directions. It offers hardware fine scroll of up to seven pixels per axis; after that the character screen has to move by a whole cell, and the 1000-byte colour RAM at $D800 is read live by the VIC and cannot be double-buffered. Three problems follow, and the agent hit all three.Colour RAM, again. Screen RAM can be double-buffered — two screens, flip $D018 in the border. Colour RAM cannot, so on every coarse step the colours have to move by one cell in the same frame the new screen appears, with the raster beam already on its way down. Copy behind the beam and every row shows wrong colours for a frame: a visible 6 Hz flicker. The first design kept a colour shadow in plain RAM, built ahead of time, and blasted it into $D800 from the top down starting in the bottom border — 880 playfield cells of unrolled lda abs / sta abs, about 7,000 cycles per crossing. It worked. Measured with the shadow shift included, a step cost 38,000 cycles. Two frames. Dead end.What replaced it is the same compromise ION RIFT made one rung down, taken one step further. There, colour RAM went fully static and terrain variety came from texture instead of hue. Here the constraint is dressed as an art direction: one colour per world row. The cave is banded — blue near the surface, cyan where the crystals are, green in the middle, red at the depths — and a row’s colour is a table lookup by world row. A horizontal step moves no colour at all. A vertical step repaints only the rows whose colour changes, which with four bands means one row at a band edge: forty stores. The art follows the engine, not the other way round, and the cave looks better for it.You cannot prepare what you cannot predict. Shifting 880 bytes of screen into the back buffer takes several frames, so the engine has to know the scroll direction before the boundary is crossed — and a player can reverse at any frame. The camera therefore commits: it prepares for the direction it is going, restarts if that changes, and may not cross a coarse boundary until the buffer for that exact crossing is ready. If it is not, the camera stalls for a frame. Diagonal motion with the axes out of phase would cross a boundary every four frames, alternating axes; so the nearer axis waits once for the other to catch up, and from then on both cross together, once every eight frames, with the preparation spread over seven of them.The vertical split. A HUD on top and a playfield below need different $D011 fine-scroll values, and the VIC fires a bad line whenever (raster & 7) == YSCROLL. Write the new value on a line whose low bits already match and you get a late bad line and a garbled row; cut a row before its eighth line and the VIC shows the same row twice. The layout that survived is two HUD rows, a blank spacer, and the playfield in 24-row mode, with the write at line $48 — or $49 when the value is zero. Worked out on paper, then verified on the machine in all eight phases by freezing the emulator and reading the floor's edge in 36 columns: y(fy) = y(0) − fy, exactly.What the machine saidThe spike ran, and the machine corrected the paper. In order of how long each took to find:The multiplexer table had no terminator before C built one, so the IRQ walked into the rest of BSS and used what it found as sprite slots. sta $d000,x with garbage in X sprayed the VIC registers; sta $47F8,x overwrote the hero's sprite pointer and six HUD characters. A vanished hero, wrong colours, garbled text. One missing memset.The split interrupt waited for its line with cpx $d012 / bne. When it landed one line late — sprite DMA is enough to do that — it spun until the next frame's line: 19,600 cycles inside an interrupt, and a frame drawn with the HUD's scroll value. That was the "background out of phase with the sprites" I had reported from the screen. Fix: fire a line early, wait with >=.The first profiler used raster-line deltas, which alias above line 255. Its numbers were fiction. A free-running CIA timer replaced it, with a self-test — 200 empty loop turns, an empty probe — that made the later numbers believable. The probes themselves cost 450 cycles each, six per frame, 14% of the budget; they went behind a compile flag.ION RIFT shipped a missed-frame counter at $033D and reported 38 overruns in 39,000 frames. IRON VEIN started with the same instrument and found it was the coarser of two. A second counter, for frames that arrived late — the flag already set when the loop came round to wait — found 20% of frames late in a build the first counter called clean. Lost is the symptom; late is what moves first.And the finding that shaped every line of game code afterwards: cc65 promotes byte arithmetic to int, keeps locals on a software stack at roughly forty cycles per touch, and turns r * 40 into a subroutine call. The edge fetch cost 27,000 cycles for 62 cells; the drone update 18,000 for twelve objects. The same work in assembly, byte-indexed, cost a quarter of that. The rule the agent adopted: anything per object or per cell is assembly, or C with static globals and no int in sight. C keeps whatever happens once per frame.The verdict, from counters rather than eyes: 8-way scrolling at one pixel per frame with colour and a HUD split, 50 fps, eight multiplexed sprites, one late frame in 1,057 on a route built to provoke stalls. With twelve sprites, 8% of frames lost. The engine’s worst frame costs about 8,000 cycles and most frames cost nothing, which left about 11,000 cycles a frame for a game.Making it a gameThen came the part the spike had deliberately postponed — in big steps, one measurement each, because I was paying for the tokens.Physics. My first remark when the drones flew past was “they lack physicality”. Gravity every other frame to a terminal speed; a jump measured at 42 pixels up and about 28 along; landing snapped to the tile top; walls probed at waist height. The solid-tile test is 90 cycles in assembly, and it became the unit of cost for everything else: a twelve-pixel object on 32-pixel tiles needs three probes a frame, not six. The camera follows through a dead zone, which is what makes the diagonal alignment stall invisible.Art the author can actually see. Sprites in this toolchain are ASCII in a Python file, and the only time anyone sees them is 21 pixels tall in a screenshot — which is to say never. The agent wrote assetsheet.py, which renders them magnified in the game's own colours. The hero's four run frames were judged as a strip before they were compiled, and six right-facing drawings became twelve by reversing each row of text.Shots, contact, HUD. Four shots live in the same structure-of-arrays as the enemies and go through the same multiplexer, now with a sprite pointer per object. Shot-against-enemy and hero-against-enemy are byte range tests in assembly: shot minus walker plus six must be 0..20 with a zero high byte. Enemies explode through three frames and drop back in from above the view.A designed level. The procedural cave was scaffolding — and after two rungs of procedural terrain, a change of question. The level is now a 64×32 drawing in the asset file — rock, air, decorations — with mossy tops, undersides and side walls derived at build time. Its four areas follow the four colour bands, and every gap is one tile or less, because the jump had been measured first.A boss. A 24×42 mech cut into four sprites: one object to C, four to the multiplexer. Nothing in the assembly knows the word “boss”. The shot test covers every target below the first shot, and the only branch is which counter a hit bumps.The budget, re-earnedThe boss build lost 116 frames in a minute. The profile build named the culprits, and none of them was the boss.The score went through ten 16-bit divisions on every kill — cc65’s udiv at 700 cycles each. Doing well cost the player 8,000 cycles and a lost frame. The score is now five decimal digits with a ripple carry. A death set eight enemies exploding on the same countdown, so sixteen frames later eight spawns landed together; those are staggered now.And the frame itself: with eight walkers, shots, boss, contact tests and HUD, the main loop crossed the frame boundary on 62% of iterations while losing almost nothing — the work was bunched, not uniformly over budget, and the margin had gone. The spike had said eight objects fit and twelve did not; the game had crept to eleven without anyone deciding it. Six walkers, then. Zero lost frames on the plateau and in the arena, 5% late in both. The object count is a budget line, not a default.Where the boundary is nowThree articles ago I described what I called the expert navigator pattern: the expert provides direction, the model provides velocity. The GPT-5.5 session was that pattern at its clearest — half a dozen moments where the model was converging on the wrong idiom and a human who grew up with the machine pointed at the deck and said that is not really a bitmap. Remove any one of them and the result is worse.This session moved the line. My reports were “out of phase”, “flashing box”, “lacks physicality”, “very fluid, great sprites” — symptoms, not directions. The diagnosis, every time, came from a counter, from a frozen capture with RAM read in the same session as the screenshot, or from a probe that had first been proven against known work. The instruments that lived in Python one rung ago now live inside the machine and run at 50 Hz. The human’s remaining job is the one ION RIFT ended on: noticing that something is wrong on screen. What the agent no longer needs is to be told where.Twice the numbers themselves were wrong, and the wrongness was found by another number: the raster deltas by the CIA self-test, and the shots that “died in their first frame” by noticing the addresses came from the previous build’s label file. That is the agent’s real limitation on the evidence of this diary — not the hardware, but the temptation to trust a reading without asking what produced it. The cure was the same each time: one more measurement, taken more carefully than the last.The Iron Vein GameI want to be careful not to overclaim. This is one game, one toolchain, one human in the loop who knows what a bad line looks like. Rung eight is the one that would settle it: the same brief, with no human watching the screen at all.Code, assets and the full development diary (ironvein/DEVLOG.md) are in the C64AIToolChain repository.Previous articles in this series:Testing LLM Creativity Through The Power of Constraints: The Commodore 64 Challenge — April 2025Breaking Through the Tetris Barrier: How Claude 4 Opus (Nearly) Conquered the Commodore 64 Challenge — May 2025The Commodore 64 Test: Why AI Code Generation Is Still a Game of Chance — August 2025The Commodore 64 Constraint: Why Gemini 3 Is the First AI to Beat the Tetris Test — November 2025Building a Modern C64 Assembly AI Toolchain using Google Gemini 3 — November 2025I Made Claude and Gemini Write Tetris for a 1982 Computer. One Worked Better and the Other Less Better — December 2025Claude 4.6 and the Commodore 64: When an LLM Writes, Builds, and Playtests Its Own Game — February 2026I Made GPT-5.5 Build a C64 Shoot ’Em Up. The Hard Part Wasn’t the Code. — April 2026Claude Fable vs. the Commodore 64: Two Rungs Up the Benchmark Ladder — July 2026Commodore 64 toolchainA note on AI assistance: This article was developed with the help of AI tools (Claude by Anthropic). AI assisted with structuring arguments, drafting prose. All results have been personally validated. The game itself was built by Claude Code running Claude Fable 5.1 inside the C64AIToolChain, with me directing, testing on the emulator and stopping it when the screen disagreed with the numbers; the figures are the ones recorded in ironvein/DEVLOG.md and in the commits.Claude Fable 5.1 Just Shipped. I Made It Scroll a Commodore 64 in Eight Directions at 50 fps. was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.