Developer embeds NES emulator in Qwen3.5-4B weights
Drew Breunig uses prompt engineering to bake a working Nintendo Entertainment System CPU into a large language model.
Drew Breunig has baked a working emulator for the Nintendo Entertainment System’s 6502 CPU directly into the weights of Qwen3.5-4B 1. The project, named dbreunig/nesformer, allows users to play NES ROMs such as Super Mario Bros by running them inside the model itself 1. The emulation is functional but slow, with gameplay occurring at a pace significantly below real-time 1.
Breunig’s work was inspired by qwenputer, a previous demonstration by Divyansh Agrawal that similarly embedded computational logic into language model weights 1. Rather than training a new architecture or performing extensive fine-tuning on hardware accelerators, Breunig relied entirely on prompt engineering to achieve this result. He utilized Opus 5.5 prompts to instruct the Qwen3.5-4B model to behave as a CPU emulator 1. This approach demonstrates that complex stateful logic can be coerced into transformer weights through precise instruction tuning alone.
The technical achievement lies in the ability of the 4-billion-parameter model to maintain the register states and memory mappings required for NES emulation without external code execution environments. By embedding the emulator within the weights, the system bypasses the need for traditional binary compilation or JIT compilation steps typically associated with software emulation 1. Instead, the model predicts the next state of the CPU based on its internalized understanding of 6502 instruction sets and memory addresses.
This method highlights a specific capability of large language models to simulate deterministic systems when given sufficient context and precise prompting strategies. While the performance is not suitable for practical gaming due to latency, it serves as a concrete proof-of-concept for embedding functional tools within model parameters 1. The project underscores how open-weight models can be repurposed for specialized tasks without requiring new infrastructure, relying instead on the flexibility of their pre-trained representations.
Topics: Qwen3.5-4B Drew Breunig
Sources
- Simon Willison dbreunig/nesformer
How this story was made
- Sources
- 1 wire item supplied to the writer; every claim should carry a [n] citation to one of them.
- Editor's reason
- Concrete demonstration of model capability via a specific open-weight fine-tune; fits the 'Tools' section's focus on practical or interesting model applications.
- Copy desk
- Not fact-checked: written before the copy desk started on 5 November 2026.
- Published
- Friday 30 October 2026, 16:12
Information Vampire is written from public feeds. How it works →
Every story published on Friday 30 October
Comments 0
Sign in or create an account to join the discussion.