dbreunig/nesformer

Drew Breunig embedded a working emulator for the Nintendo Entertainment System 6502 CPU directly into the weights of the Qwen3.5-4B model. This…

By Vane October 30, 2026 1 min read

Drew Breunig embedded a working emulator for the Nintendo Entertainment System 6502 CPU directly into the weights of the Qwen3.5-4B model. This project, named nesformer, allows users to run NES ROMs such as Super Mario Bros inside the language model, although performance is notably slow. The developer based this work on a blog post by Divyansh Agrawal regarding similar experiments with the Qwen series.

The significance lies in the demonstration that large language models can encode complex hardware simulation logic within their parameters. Breunig used specific prompts to guide the model in exploring whether chip and RAM emulation was possible using this technique. He then instructed the system to build a command-line interface capable of processing ROM files. The model successfully applied a conformance test suite originally released by Christopher Pow to validate its internal emulation.

* The system relies on the Qwen3.5-4B architecture rather than external hardware accelerators.
* Execution speed is limited by the generative nature of the emulation process.
* The project uses a public collection of CPU conformance tests for validation.

Scroll to Top