Back to AI News
Simon Willison

dbreunig/nesformer: A Working NES 6502 CPU Emulator Baked Into Qwen3.5-4B Weights

Drew Breunig built a working emulator for the Nintendo Entertainment System 6502 CPU directly into the weights of Qwen3.5-4B, inspired by Divyansh Agrawal's qwenputer project. The result can run NES ROMs such as Super Mario Bros inside Qwen, though very slowly. In a Hacker News comment, Breunig shared the Opus 5.5 prompts he used to scope and build the system, which led to a 15-year-old NES CPU conformance test suite released by Christopher Pow. The project is a playful but concrete demonstration of encoding executable logic in model weights rather than in conventional code.

AI Brief

It offers a concrete, reproducible example of embedding a real CPU emulator in model weights, plus the prompting path and conformance tests used to validate it.

dbreunig/nesformer

Inspired by qwenputer by Divyansh Agrawal, Drew Breunig baked a working emulator for a Nintendo Entertainment System 6502 CPU into the weights of Qwen3.5-4B. You can now play NES ROMs such as Super Mario Bros (very slowly) running inside Qwen!

In a comment on Hacker News Drew reveals the Opus 5.5 prompts he used to build this system:

Read this article and any relevant source code: https://divagr.com/blog/qwenputer. Then explore if you could emulate the chip and ram in a Nintendo Entertainment System (as people do today with FPGAs in MISTRs) using this technique. If so, what size model would you have to build and if you could use smaller faster ones, could you get it to be at the standard clockspeed.

Followed by:

I think we should build it! Just for fun. It's okay if it's not fast. We want to be able to have the weights, and a cli to run them that we can point at a ROM.

Apparently Opus found and then used this collection of conformance tests for the NES CPU released 15 years ago by Christopher Pow.

Via Hacker News

Tags: games, ai, generative-ai, llms, drew-breunig, qwen, conformance-suites

Be the first to rate this article.

Comments & Questions (0)

Captcha
Please be respectful — let's keep the conversation friendly.

No comments yet

Be the first to comment!