# NESformer: How a Nintendo CPU Runs Inside Qwen3.5 Weights

An experimental compiler puts a Nintendo CPU into a standard model checkpoint, but this is deterministic execution rather than an AI learning to play.

By Paras Madan | 2026-10-31

NESformer compiles a Nintendo Entertainment System CPU into a Qwen3.5-compatible model checkpoint. Released publicly on October 30, Drew Breunig's experiment uses constructed weights rather than training. The model executes instructions, while a separate host handles graphics and input. It is not a language model guessing how a game should behave.

## What NESformer puts inside the model

The [NESformer repository](https://github.com/dbreunig/nesformer) describes a compiled 6502 CPU, 2 KB of RAM and cartridge program ROM inside a standard `Qwen3_5ForCausalLM` checkpoint. The host handles the picture processing unit, controllers and vertical-blank interrupts.

That boundary matters. Saying that an entire console runs inside the model would hide work still performed by ordinary software. The experiment moves a particular stateful computation into model weights, rather than replacing every part of an emulator.

## How weights can execute instructions without training

NESformer builds on [Qwenputer](https://divagr.com/blog/qwenputer), an earlier project showing how a compiler can map digital circuit operations into a transformer-style architecture. Its recurrent GatedDeltaNet state can represent memory, with carefully chosen gates and addressing operations controlling reads and writes.

The useful distinction is between learned weights and constructed weights. Training adjusts parameters from examples in the hope of obtaining useful behavior. A compiler can instead assign parameters to implement specified operations directly. In this case, each step advances a machine state according to a designed rule.

That makes the experiment surprising without requiring an intelligence claim. A model file format normally associated with prediction can carry a deterministic program. Whether that is a good way to run the program is a separate question.

## Why this is not a practical replacement for an emulator

The repository reports substantial slowdown relative to the original console, even with its faster custom execution path. Its current scope is limited to NROM, or mapper 0, cartridges. Sound is unsupported, unofficial instructions halt execution and code running from RAM is not supported.

These are project-reported capabilities and limitations, not results from testing here. They point toward a research demonstration rather than something to choose for playing games. A conventional emulator is built for that job without needing to express the CPU through model operations.

**The result demonstrates that the computation can be represented, not that a neural architecture makes it more efficient.** Keeping those claims separate makes the technical achievement easier to appreciate.

## The coding-agent lesson is the availability of a test oracle

In the [Hacker News discussion](https://news.ycombinator.com/item?id=50306442), Breunig said he used Opus 5.5 to build the project with two prompts. That is his account of the development process, not an independently reproduced productivity benchmark.

The same discussion points to an important advantage: the task had a defined target, existing emulator behavior and conformance tests. A CPU instruction has a specific expected effect. Generated code can be checked against that effect rather than judged only by whether a demo looks convincing.

This is a useful way to think about ambitious coding-agent tasks. The challenge is not always writing a more elaborate prompt. Sometimes the higher-value work is defining what success means and giving the agent a reliable way to detect failure.

NESformer is an unusual place to see that principle, but a clear one. Its most transferable idea may be the combination of a precise specification, a reference implementation and tests that make incorrect behavior visible.

I'm Paras. I work at the intersection of AI, engineering and distribution.

I help technical founders turn complex engineering work into clear technical stories that developers and founders read and share.

[Book a 30-minute call](https://cal.com/paras-madan/30min).
