Free · Daily brief + weekly playbookDaily 60-sec AI Voice Brief + Weekly Production AI Agent PlaybookGet the brief →
ReleaseInsight · On RadarSimon Willison→ original

NES CPU Emulator Baked Into Qwen3.5-4B Weights: Super Mario Runs Inside the Model

Drew Breunig embedded a working MOS 6502 CPU emulator from the NES directly into the weights of Qwen3.5-4B. ROM files such as Super Mario Bros now run inside the neural network, though the game runs very slowly. The idea builds on Divyansh Agrawal's article on Qwenputer, and the code was written by Opus 5.5 following Breunig's prompts. The takeaway: LLM weights can be turned into an exact executor of logic, though for now it's a fun experiment.

AI-processed from Simon Willison; edited by Hamidun News
NES CPU Emulator Baked Into Qwen3.5-4B Weights: Super Mario Runs Inside the Model
Source: Simon Willison. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceSimon Willison ↗
Editor-in-Chief
Key metric #1Testing relied on a 6502 conformance test suite by Christopher Pow, dating back 15 years
Key metric #2Opus 5.5 estimated what model size would be needed to run an NES at real-time speed
The project goalweights plus a CLI that accepts a ROM; speed doesn't matter

Usually we ask a language model to write code, then run it on a real processor. Developer Drew Breunig went the other way: he placed the processor itself inside the model. In the nesformer project, a working emulator of the 6502 CPU from the Nintendo Entertainment System is baked into the weights of Qwen3.5-4B. NES games, such as Super Mario Bros, now run inside the neural network. According to the author, it works very slowly, but it works.

For those following what LLMs are capable of, this is an intriguing experiment. It shows that model weights can be used not only to predict the next word, but also as an executor of strict, deterministic rules.

Where the idea came from

The starting point was an article by Divyansh Agrawal titled Qwenputer. It describes a technique in which a Qwen model acts as a computing device. Breunig read the piece and asked whether the same technique could be used to emulate the processor and memory of the Nintendo Entertainment System.

Today such emulators are usually built on FPGAs, for example in MiSTer projects. Breunig offered this analogy to the coding assistant: if the console can be reproduced in programmable logic, perhaps it can also be reproduced in the weights of a transformer.

He structured his first prompt as a research task. Opus 5.5 had to read the article and the related source code, assess whether this was actually feasible, and determine what size of model it would require. It was also asked to consider whether smaller, faster models could get close to the NES's native clock speed.

How the project was built

The second prompt was shorter and more candid: "Let's just do it, for fun." Breunig made clear right away that speed was not a requirement. He needed two outcomes: the weights themselves and a command-line utility where you could specify the path to a ROM file and run the game.

To check that the emulated processor behaved correctly, an existing conformance test suite served as the reference. As Simon Willison writes, Opus itself found and wired in a collection of NES CPU conformance tests that Christopher Pow released 15 years ago. This is an important detail. When an AI agent builds something this intricate, it is nearly impossible to locate errors without an external measure of correctness. Tests give an unambiguous answer: either the instruction was executed correctly or it was not.

The work on the project itself deserves attention too: the bulk of the research and implementation was carried out by a coding agent working from several paragraphs of task description. The human set the goal and constraints, and the agent found the materials, chose a verification method, and brought the work to a functioning result.

What this means for practitioners

First, do not expect nesformer to be practically useful. The game runs very slowly, and nobody will run a console inside a four-billion-parameter model for the sake of speed. This is a demonstration, not a replacement for a proper emulator. The author himself calls the project a pursuit "just for fun."

Still, the experiment offers several useful lessons:

  • Mid-sized models can be made to reproduce formal systems exactly, where every instruction has a strictly defined result.
  • Ready-made test suites remain the best way to keep an AI agent on track. If a task has a reference check, the agent can cover a long path with almost no human involvement.
  • A research prompt of the form "study whether this is possible and estimate the size" proved a good starting point before asking for a build. The agent first checks whether the idea is realistic, then takes on the implementation.

It is also worth noting that the material was published as a post on Simon Willison's blog, with links to the original sources. It contains no detailed speed measurements or final weight sizes, so it is too early to judge the approach's effectiveness from a single post. For implementation details, look at the dbreunig/nesformer repository and the Qwenputer article.

Nevertheless, the fact itself is telling: an open four-billion-parameter model can act as an emulator of a real processor, and such a project can be built with a coding agent and a few clear requests.

Story

Key Questions Answered

Where the idea came from?

The starting point was an article by Divyansh Agrawal titled Qwenputer. It describes a technique in which a Qwen model acts as a computing device. Breunig read the piece and asked whether the same technique could be used to emulate the processor and memory of the Nintendo Entertainment System. Today such emulators are usually built on FPGAs, for example in MiSTer projects.

How the project was built?

The second prompt was shorter and more candid: "Let's just do it, for fun." Breunig made clear right away that speed was not a requirement. He needed two outcomes: the weights themselves and a command-line utility where you could specify the path to a ROM file and run the game. To check that the emulated processor behaved correctly, an existing conformance test suite served as the reference.

What this means for practitioners?

First, do not expect nesformer to be practically useful. The game runs very slowly, and nobody will run a console inside a four-billion-parameter model for the sake of speed. This is a demonstration, not a replacement for a proper emulator. The author himself calls the project a pursuit "just for fun." Still, the experiment offers several useful lessons: Mid-sized models can be made to reproduce formal systems exactly, where every instruction has a strictly defined result.

ZK
Zhemal Khamidun — Head of AI at Alpina Digital · MIPT (academic supervisor of the Tech Entrepreneurship department). Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
Jemal Hamidun

Editor-in-chief · Cite this analysis

Jemal Hamidun

Head of AI at Alpina Digital · Academic Supervisor of the Tech Entrepreneurship Department at MIPT

Head of AI & CPO of AlpinaGPT at Alpina Digital, Academic Lead of Tech Entrepreneurship at MIPT. Founder of Hamidun News and Vibe Academy.

Ready-to-paste citation for journalists, blogs and Telegram channels

Source: Hamidun News — NES CPU Emulator Baked Into Qwen3.5-4B Weights: Super Mario Runs Inside the Model https://news.hamidun.com/en/news/17598/nes-cpu-emulator-baked-into-qwen3-5-4b-weights-super-mario-r

What do you think?
Loading comments…