Agents In Use
What’s new todayLast update
499 additions

How to use Claude to build Commodore 64 Tetris

The author reports that Claude produced complete Tetris with all seven pieces, rotation, line clearing, level progression, and a self-playing demo mode.

TRY A BOUNDED VERSION

Prompt to try

Editorial adaptation, not the source author’s exact prompt. Replace bracketed inputs and review tool permissions first.

Build [game specification] in 6510 assembly for the Commodore 64 using [cc65 setup] and [VICE toolchain]. Compile, inject, and inspect screen RAM after each change. Debug pointer ownership, rendering order, register corruption, and carry flags before adding optional features.

What happened

The author reports that Claude produced complete Tetris with all seven pieces, rotation, line clearing, level progression, and a self-playing demo mode.

Reported by dexmac221 on dev.to

How the agent did it

  1. Compile and inject assembly code into VICE.
  2. Read screen RAM as ASCII feedback for the model.
  3. Fix pointer corruption using dedicated variables.

Where a person stepped in

The author ran both models with the same toolchain and later analyzed the implementations for low-level bugs.

A person approved each step before the agent continued.

The author gave Claude Opus 4.5 and Gemini 3 the same challenge: write Tetris in 6510 assembly for the Commodore 64. A Python toolchain compiled code with cc65, injected it into the VICE emulator, read screen RAM, and converted that memory to ASCII so the models could inspect execution results.

Claude ran as an agent in GitHub Copilot. Its first iteration produced a playable core with falling pieces, joystick response, and a score display, although phantom blocks and flicker remained. The reported fixes followed a specific sequence. Dedicated pointer variables corrected zero-page corruption. VBlank synchronization addressed flickering. A dedicated zero-page loop counter replaced an X register corrupted by subroutine calls. Missing CLC instructions were added to avoid carry-related address errors.

The author reports a complete final Claude game with seven pieces, rotation, line clearing, level progression, and a self-playing demo mode. Gemini's comparison implementation remained visually compromised after more than 20 iterations. The author subsequently analyzed both implementations and identified a missing carry clear in Gemini's board calculation. Who it's for: developers experimenting with agent coding on constrained hardware who can provide emulator feedback and inspect low-level failures.

Prompt
Suggested prompt (written by Agents In Use, not the author's)

Source: dev.to · dexmac221

Frequently asked questions

How did the model inspect the game?

A Python script read VICE screen memory and converted it to ASCII, giving the model feedback about what its assembly code displayed.

What fixed the phantom blocks?

The author attributes them to zero-page pointer corruption and reports fixing them by giving the renderer dedicated pointer variables.

More details

Remaining steps

  1. Synchronize screen updates to address flickering.
  2. Fix loop counting and missing carry-clear instructions.

About this account

Claude generated assembly and iterated using emulator screen-memory feedback supplied by the Python toolchain.

Platform: dev.to. Attribution: https://dev.to/dexmac221/i-made-claude-and-gemini-write-tetris-for-a-1982-computer-54nk. Prompt: Suggested (written by Agents In Use, not the author's). Sourced by the Agents In Use pipeline.

Credit: dexmac221 on dev.to

Source published 6 Dec 2025

Source checked 14 Oct 2026

Tools and topics

GitHub Copilot · Python · cc65 · VICE

Tetris · Assembly · Commodore 64

Editorial completeness: 100/100. Measures documented fields, not agent performance or verified outcomes.