Testing coding agent on an old ZX Spectrum machine code and Rust

Published: (February 28, 2026 at 10:00 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Introduction

When I was a child I owned a ZX Spectrum (Didaktik M). I didn’t play much on it – I was more interested in programming – but there was one game I loved: Jet Set Willy. I spent long hours solving its absurd, funny levels and wondered how so many rooms, graphics, tricks and secrets could fit into just 48 KB of code.

Decades later I still think about that game. I never became a regular gamer; I only played Tetris occasionally. I tried several times to rewrite Jet Set Willy for PC using C and C++, relying on fan‑published machine‑code listings, but I never got very far.

Yesterday I decided to give an AI‑based coding agent a try and rewrite Jet Set Willy in Rust, using a disassembled source I found online.

Rewriting Jet Set Willy in Rust

The AI helped translate the original Z80 assembly into idiomatic Rust. I was careful to keep the music, graphics and game logic faithful to the original, so the Rust version feels authentic. The main challenges were:

  • Mapping Z80 hardware registers to Rust abstractions.
  • Re‑implementing the timing‑critical routines that drive the sprite engine.
  • Preserving the exact behaviour of the original level data.

With barely a day of work the game was playable again. Because the whole codebase is now Rust, fixing bugs or adding small tweaks is straightforward.

Results

  • All 60 rooms are implemented and compile cleanly in Rust.
  • The game runs smoothly with no remaining Z80 machine code – it is 100 % Rust.
  • Due to copyright restrictions I cannot publish the source or binaries publicly; the project remains for private use only.

Screenshots

Jet Set Willy – Title screen

Jet Set Willy – Room 21

Jet Set Willy – Game Over screen

I can finally play my favourite game again after three decades. <3 Jet Set Willy

0 views
Back to Blog

Related posts

Read more »