[KongchangAI]
· 2 min read· 1,480 words

Rebuilding Super Mario World from Scratch with AI: GPT Has Been Running for Four Days and Counting

Rebuilding Super Mario World from Scratch with AI: GPT Has Been Running for Four Days and Counting

Creator uses GPT 6.1 Sol to replicate Super Mario World from scratch on a retro handheld, with AI autonomously iterating for over four days.

On a mod retro handheld from OpenAI Dev Day, a creator had GPT 6.1 Sol rewrite the entire Super Mario World from scratch. The AI works like a reverse engineer, referencing massive online documentation and continuously writing code, comparing results, and iterating in a write-verify-revise loop. The project has run autonomously for over four days without finishing. The core challenge is replicating tightly coupled systems like physics, collision detection, enemy AI, and sprite animation. It showcases AI's boundaries in project-level code generation and long-duration autonomous tasks—approaching complex goals without intervention, but with efficiency still a clear bottleneck. The creator expects results in a few more days.

At OpenAI Dev Day, every attendee received a mod retro handheld—essentially a replica of the original Game Boy. For one player who considers Super Mario World their all-time favorite, this device should have been the perfect way to relive a classic. The problem: this machine was never designed to run SNES games.

So the creator made a decision: let GPT 6.1 Sol rewrite the entire Super Mario World from scratch for the mod retro.

Unboxing the retro handheld mod retro

A Code Marathon with No Finish Line

The most surprising thing about this project isn't that AI can write game code—it's that it has been working continuously for over four days, and it's still not done.

According to the creator, GPT 6.1 Sol's workflow resembles a tireless reverse engineer: first observe what the game should look like, extract structural information from massive online documentation, then write code, compare results, and iterate. The creator described the process as "not exactly decompilation, but very close."

The logic behind this is actually quite clear: the AI isn't fabricating a Mario game out of thin air—it's using the "answer key" (the original game's visual and logical behavior) to continuously close the gap. Every generated batch of code gets compared against the reference target; deviations are fixed, then compared again. This write-verify-revise loop happens to be exactly the pattern large language models excel at in code tasks.

Running the game on mod retro

The Difference Between Reverse Engineering and Decompilation

Reverse engineering is a broad concept referring to deriving design principles and implementation methods from a finished product; decompilation is a specific technique within reverse engineering, referring to translating executable machine code back into high-level source code. The article's phrase "not exactly decompilation but very close" refers to behavioral replication: the AI doesn't need to restore the original SNES assembly instructions line by line, but instead observes the game's input-output behavior (graphics, sound, physics feedback) and reimplements equivalent effects on the target hardware using entirely new code. This approach resembles "black-box rewriting," avoiding copyright-protected code assets in the original ROM, but it's harder to replicate—because behavioral equivalence is often more difficult to verify than code equivalence.

Why Rebuilding an Old Game Is So Hard

On the surface, having AI rewrite a 2D platformer from over thirty years ago doesn't seem like it should take more than four days. But the reality is far more complex than it appears.

Super Mario World looks simple, but behind it lies a highly coupled system: a physics engine (acceleration, friction, inertia), collision detection, enemy AI behavior trees, level data structures, sprite animation state machines, and sound trigger logic. These things were deeply customized for specific hardware in the original game and can't be directly ported to the mod retro's hardware specifications.

What GPT 6.1 Sol faces isn't "write a Mario-style game" but "on this specific hardware, make every jump arc, every enemy patrol path, every coin pop-up feel exactly right." This level of fidelity requirement pushes the task from "creative generation" into the realm of "precise replication."

The creator mentioned that the AI has "a large amount of online documentation" to reference. This means community-accumulated ROM reverse engineering materials, level format specifications, memory address mappings, and other technical documents built up over years all become training material and reference sources for the AI.

GPT 6.1 Sol generating code

Sprite Animation State Machines

The "sprite animation state machine" mentioned in the article is a core technical architecture for 2D game characters. In Super Mario World, Mario, enemies, items, and every visible object are "sprites." Each sprite needs to switch between different animation frames under different circumstances (standing, walking, jumping, getting hurt, stomping enemies), while simultaneously changing hitboxes, velocity parameters, and executable actions. The state machine manages the transition conditions and priorities between these states—for example, "touching an enemy while jumping" should trigger a stomp check rather than damage. The original game hardcoded state transition logic into loops tied to SNES hardware timing. To reproduce the same feel on mod retro, you must rebuild a state machine that maintains equivalent behavior at the new hardware's frame rate—this is one of the most time-consuming parts of the project.

Long-Duration Tasks: The Boundary AI Programming Is Breaking

What's truly noteworthy about this case is the "working continuously for over four days" part itself.

Most current AI programming tools operate in a "question-and-answer" mode: you submit a request, it generates code, you verify and find it doesn't work, then you follow up. The entire process requires a human to be continuously present. But what GPT 6.1 Sol demonstrates here is an autonomous loop capability—it can judge for itself whether output meets expectations, decide on its own what to change next, without needing human intervention at every step.

This doesn't mean humans are entirely absent. The creator clearly set goals, provided reference resources, and built verification mechanisms. But within this framework, the density of AI's autonomous decision-making far exceeds traditional code completion or function generation.

The creator estimates it "might be done in a few more days." If that comes true, this would be a case of AI completing a medium-complexity game port using only general capabilities and online documentation, without any targeted fine-tuning.

AI's working state during continuous iteration

Autonomous Loops and Agentic Programming

The write-verify-revise loop described in the article corresponds to what the AI field currently calls the Agentic programming paradigm. Unlike traditional code completion or single-turn Q&A, Agentic systems allow models to autonomously plan tasks, invoke tools (such as compilers, test scripts, document retrieval), read execution results, and adjust next actions based on feedback. The core lies in building an environment for the model that can automatically judge success or failure. In this case, "the original game's graphics and feel" serves as the objective function, online reverse engineering documentation serves as the knowledge base, and code comparison constitutes the automatic feedback signal. This model frees humans from round-by-round instructions, but the cost is significantly increased time and compute consumption per task—which is precisely the fundamental reason this project has been running for four full days without finishing.

What This Means

In the short term, this is just an interesting personal project that proves the possibility of large language models replicating classic games on specific hardware.

But in a broader context, it touches on several changes that are currently happening: AI's long-duration autonomous work capability is moving from experiment to usability; the task granularity of code generation is rising from "function-level" to "project-level"; and work like game porting and reverse engineering—which previously required months of investment from professional teams—is being redefined.

Of course, the fact that it still hasn't finished after four days also shows that the current approach is far from efficient. It's more like a proof of concept: when AI has a clear objective function (the original game's behavior) and abundant reference materials (online documentation), it can continuously approach a complex engineering goal without sustained human intervention.

As for whether it will ultimately run, and whether the feel will be right once it does, the creator says we'll "find out in a few more days."

The Barrier to Project-Level Code Generation

The leap from function-level to project-level isn't just about code volume. Function-level generation only needs to satisfy a local interface contract, while project-level generation requires the model to maintain consistent architectural decisions, data flows, and module boundaries over a long time span. In game porting scenarios, this means the AI must remember the physics constants, sprite ID assignments, and level data structures it defined three days ago, and correctly reference them in subsequent code. Large language models have limited context windows, and "forgetting" or inconsistency is prone to occur in long-duration tasks. The fact that this project can continuously iterate over four days suggests its workflow likely includes memory management or state persistence mechanisms; at the same time, "still not finished after four days" also exposes the bottlenecks of such methods in efficiency and consistency.

One-line Summary

A creator used GPT 6.1 Sol to replicate Super Mario World from scratch on a retro handheld, with the AI autonomously iterating for over four days.

Paragraph Summary

On a mod retro handheld obtained at OpenAI Dev Day, a creator had GPT 6.1 Sol rewrite the entire Super Mario World from scratch. The AI works like a reverse engineer: referencing massive online documentation, continuously writing code, comparing target results, and iterating—forming a write-verify-revise loop. The project has been running autonomously for over four days and is still incomplete. The core challenge lies in replicating highly coupled systems like the physics engine, collision detection, enemy AI, and sprite animation. This case demonstrates the capability boundaries of AI in project-level code generation and long-duration autonomous tasks—it can approach complex engineering goals without intervention, but efficiency remains a clear bottleneck. The creator expects results in a few more days.

#GPT 6.1 Sol#Super Mario World#AI game development#mod retro#agentic programming#project-level code generation#reverse engineering#game porting
Share:

Related articles