invalidation
Exploiting sprite memory tables through custom eight-controller wiring allows players to commandeer console hardware and execute entirely new games without cartridge modifications.
AI-assisted summary of Super Mario World: Arbitrary Code Injection At AGDQ 2014, Performed Live — original source. Check the original for full context.
Source published:
Key ideas
- At AGDQ 2014, a TASBot demonstration used arbitrary code execution in Super Mario World to reprogram the console into running playable versions of Snake, Pong, and Tetris. (1:40)
- Custom cables utilizing all 7 pins of both SNES controller ports emulated two multi-taps, effectively streaming input data across eight controllers simultaneously to inject game logic into RAM on the fly. (3:06)
- The project originally aimed for 'Total Control' by attempting to inject and play the entire original NES Super Mario Bros. inside Super Mario World, but it was scrapped due to per-frame data transmission bandwidth limits. (3:06)
Detailed notes
## Background Published on YouTube by invalidation on January 21, 2014, this video documents a live demonstration titled "Super Mario World: Arbitrary Code Injection At AGDQ 2014, Performed Live." The description provides no extensive summary, directing viewers to the Games Done Quick website for further information.
## TL;DR At AGDQ 2014, a top-secret tool-assisted run of Super Mario World authored by Master Jun demonstrated live Arbitrary Code Execution on an unmodified Super Nintendo console. By performing frame-perfect sprite and P-Switch manipulations in Yoshi's Island 2, the run corrupted the console's Object Attribute Memory to redirect the processor into running custom code. Utilizing custom seven-pin wiring to emulate two multitaps and stream eight controllers' worth of input per frame, TASBot injected entirely separate playable games—including Snake, Pong, and Tetris—directly into console RAM on the fly.
## Atmosphere & style The presentation opens with palpable mystery and nervous tension amid a false start and uncleared save data, compounded by the fact that almost no one in the room knew what was planned. That suspense explodes into stunned disbelief and roaring cheers the second Super Mario World glitch-cuts into a fully working arcade game. The mood is electric, technical, and celebratory, shifting from frantic technical explanations to communal delight as attendees are invited up to play the freshly injected games live.
## Bulletin - [01:40](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=100s) At AGDQ 2014, a TASBot demonstration used arbitrary code execution in Super Mario World to reprogram the console into running playable versions of Snake, Pong, and Tetris. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) Custom cables utilizing all 7 pins of both SNES controller ports emulated two multi-taps, effectively streaming input data across eight controllers simultaneously to inject game logic into RAM on the fly. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) The project originally aimed for 'Total Control' by attempting to inject and play the entire original NES Super Mario Bros. inside Super Mario World, but it was scrapped due to per-frame data transmission bandwidth limits.
## Key takeaways - [00:05](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=5s) The secret TAS run was finalized at midnight just hours before its AGDQ 2014 showcase, with only two people in the room knowing what payload would execute. - [00:05](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=5s) Before the run could begin, operators had to reset the SNES and clear existing cartridge save data to ensure proper synchronization. - [00:05](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=5s) The initial chaotic movements in Yoshi's Island 2 were intentional manipulations required to set up the exploit rather than player mistakes. - [01:40](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=100s) The exploit manipulated the SNES Object Attribute Memory (OAM) table by controlling sprite rendering and enemy interactions in precise sequences. - [01:40](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=100s) Stunning a flying item box tricked the game engine into assigning it Koopa shell properties, helping reshape memory tables into executable machine instructions. - [01:40](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=100s) Redirecting execution into manipulated memory transferred complete CPU control over to the injected payload, immediately transforming the game into Snake. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) No ROM patches or cartridge modifications were used; all injected mini-game data was streamed directly through the console's standard controller ports. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) Standard retail SNES controller cords wire only 5 lines, but custom wiring hooked up all 7 pins to exploit the secondary data line and I/O select pin. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) Emulating two multi-taps provided TASBot with the bandwidth of eight simultaneous controllers to write new game code directly into SNES RAM frame by frame. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) Live audience members and attendees were able to plug in controllers and actively play the injected games like Pong on stream. - [03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) Hardware throughput limits prevented the team from achieving their original 'Total Control' goal of streaming and playing the complete NES Super Mario Bros. live.
## Detailed walkthrough ### [00:05](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=5s) Setup, False Starts, and Introduction of the Secret Run
The run opens with an air of mystery and tension as the commentators scramble to get the console properly prepared. The announcer confesses that even the event staff were kept in the dark about what was about to happen: “Whatever this run is, they wouldn't even tell me what it was.” After counting down to power on the system, the operators realize that the save file has not been cleared from the cartridge. Wondering if the wrong game cartridge was inserted, they quickly reset, restart the console, delete the necessary save data, and switch the display feed back over to the Super Nintendo.
Once the display syncs, the nature of the demonstration is officially revealed. The commentary explains that this run is a *Super Mario World* tool-assisted speedrun (TAS) authored by Master Jun. While earlier remarks suggested it might already be archived online, the speaker corrects the record, noting that this run was not yet featured on the TASVideos site. The run had literally been completed around midnight the previous evening, with the team testing it late into the night. Because of the extreme secrecy surrounding the run, only two people present in the room knew what was actually about to unfold on screen: Allan and the co-host. As Mario enters Yoshi's Island 2 and begins executing bizarre movements, the audience is warned not to dismiss the chaos as mistakes: “Everything that you're going to see here is seemingly random, completely intended, despite what it might what it might look like.”
```mermaid flowchart TD accTitle: TAS Execution Setup and Initialization accDescr: Sequence showing setup fixes leading into Master Jun's Super Mario World TAS run at AGDQ 2014. subgraph Setup ["Setup & Console Reset"] A["Console Power On"] --> B{"Save File Deleted?"} B -->|No| C["Reset & Clear Save Data"] C --> D["Switch Video Feed"] end subgraph RunStart ["Live Execution"] D --> E["Initialize Master Jun TAS"] E --> F["Enter Yoshi's Island 2"] end ```
- The run was finalized at midnight just the day before its AGDQ 2014 appearance. - Only Allan and his co-presenter were aware of what the payload would do when executed.
---
[01:40](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=100s) Glitching OAM and Executing Arbitrary Code Live
Mario begins executing frame-perfect item manipulations inside the level, prompting baffled reactions from the room. The commentator explains that Mario is deliberately manipulating the Object Attribute Memory (OAM), a memory table inside the SNES hardware that governs the visual and physical properties of all active sprites and tiles currently displayed on screen. By manipulating items and enemies in a exact sequence, the run forces specific numerical data directly into memory addresses that normally handle gameplay objects.
A critical mechanic of the setup involves a P-Switch. Mario manipulates a flying item box by stunning it, causing the game engine to treat the box as though it were a standard Koopa shell. By carrying, throwing, and interacting with these glitched entity states in tandem with coin transformations and block positions, the player can reshape the internal memory tables into executable machine instructions. The moment execution jumps from the level code into the manipulated memory buffer, the game violently glitches out and cuts away from *Super Mario World* entirely. The console screen turns into a fully functional clone of the classic arcade game *Snake*, drawing stunned gasps and a massive round of applause from the crowd. Over the applause, a $500 donation from "Tommy ref friends" is read: “I'm loving this TASBot run, great work everybody.”
- **OAM Table Manipulation:** The precise positioning and spawning order of on-screen sprites forces specific byte values into the SNES's Object Attribute Memory. - **Flying Box Glitch:** Stunning a flying item box forces the engine to handle it with Koopa shell properties. - **Arbitrary Code Execution (ACE):** Shifting program execution into memory written by player inputs hands full processor control over to the injected payload.
---
[03:06](https://www.youtube.com/watch?v=jnZ2NNYySuE&t=186s) Multi-Game Mini-Games, Custom Multitap Wiring, and the "Total Control" Vision
As the *Snake* demo plays out on screen, the presenters invite an attendee named Tampa to grab an extra controller, hook it into the console, and play along. The commentator admits that the sequence escalated far too quickly to explain all the technical intricacies in real time: “I guess I'll take this opportunity to say I was hoping to be able to explain this in more detail, but I forgot how quickly everything happens.” Through arbitrary code injection, TASBot did not merely beat the game or trigger the credits—it took over the Super Nintendo's CPU to dynamically write and run completely separate games, including *Snake*, *Pong*, and *Tetris*, directly through the standard controller ports without any cartridge hardware modification or ROM patching.
To pump enough data into the console fast enough to assemble whole games on the fly, Allan had to construct custom controller cables. A standard retail Super Nintendo controller cable contains five functional wires, but seven physical pins exist. Allan wired up custom cables utilizing all seven lines to exploit the extra data line and I/O select pin found in multi-tap peripherals. By emulating two multi-taps via TASBot, the setup simulated eight SNES controllers simultaneously:
> “Each multi-tap can serve four controllers, so if you're keeping score, that means we just hooked up eight controllers to a Super Nintendo with really interesting results.”
This massive injection bandwidth made it possible to write new game logic directly into console RAM frame by frame. Once *Pong* appears on screen, players begin competing head-to-head on the live broadcast.
```mermaid flowchart LR accTitle: Custom Hardware Data Pipeline for Arbitrary Code Injection accDescr: TASBot routing data across eight emulated controllers into the SNES hardware. subgraph Inputs ["TASBot Interface"] TB["TASBot Replay Rig"] --> MT1["Emulated Multitap 1 (4 Controllers)"] TB --> MT2["Emulated Multitap 2 (4 Controllers)"] end subgraph Hardware ["Custom Cables"] MT1 --> C1["7-Pin Controller Port 1"] MT2 --> C2["7-Pin Controller Port 2"] end subgraph SNES ["Console Execution"] C1 --> RAM["SNES RAM / OAM Buffer"] C2 --> RAM RAM --> Games["Injected Games:\nSnake, Pong, Tetris"] end ```
Allan then reveals that he just received permission to discuss the original ambition behind the project, internally known as "Total Control." The developers had originally intended to stream the entirety of the original NES *Super Mario Bros.* game into *Super Mario World*'s memory and TAS it live on stream. However, the bandwidth limitations of the SNES hardware ultimately prevented this feat: “We don't have enough time per frame to be able to do it, to be able to write the whole game.” Despite scaling back from a full NES emulator injection to a suite of classic arcade titles, the crowd and commentators celebrated the historic demonstration, with Allan taking a moment to thank the entire development and TASBot team who made the live run possible.
- Standard SNES controller cords wire only 5 pins, whereas Allan's custom cables wired all 7 to read the secondary data line and I/O select line. - Simulating two 4-player multi-taps allowed 8 controller inputs worth of data to be transmitted concurrently on every video frame. - The original "Total Control" goal of assembling and running all of NES *Super Mario Bros.* inside *Super Mario World* was scrapped due to per-frame data transmission constraints.
## Mentioned Super Mario World, AGDQ 2014, Master Jun, TASVideos, Allan, Tampa, TASBot, Tommy ref friends, Super Nintendo Entertainment System, Nintendo Entertainment System, Super Mario Bros., Snake, Pong, Tetris, Yoshi's Island 2
## Video description See http://gamesdonequick.com/ for more information.
[Source](https://www.youtube.com/watch?v=jnZ2NNYySuE)