← All Famous Bugs

The Sketch Glitch — Save Corruption and Chaos

Final Fantasy VI · SNES · 1994 · Impact: Data Loss

The Relm ability Sketch, under specific conditions involving a nearly-full inventory, executes a memory write that overwrites the game's save data and game state with garbage values, potentially erasing saves and spawning large numbers of unintended items.

Final Fantasy VI's Sketch command — available to the character Relm — is designed to create a copy of an enemy's sprite for use in combat. The implementation uses a pointer into the enemy data table and copies a portion of that data into a temporary buffer. The glitch arises when the game's item inventory is nearly full (254 or 255 items in the bag) at the time Sketch is executed. Under these conditions, the pointer arithmetic overflows past the end of the enemy data table and begins reading from adjacent memory — which includes sections of the game's RAM used for other purposes, including parts of the save state buffer. The subsequent write, intended to place the copied data into the temporary buffer, instead writes to addresses that include or overlap the save file region. Depending on the exact memory state, this can produce a cascade of effects: large quantities of items appearing in the inventory (quantities in the hundreds or thousands), the party's gold total changing to an extreme value, equipped items or spells changing without player input, and in severe cases, the save file becoming corrupted to a state the game cannot read. Japanese player reports of vanishing saves led to awareness of the glitch before it was formally documented by Western players, and Square issued a replacement cartridge programme in Japan for affected users — an extremely rare consumer response that reflects how serious the data loss potential was judged to be.

Key Facts:
  • Triggered by using the Sketch command with 254 or 255 items in inventory, causing pointer overflow into adjacent memory regions
  • Can produce massive unintended item duplications, gold value changes, and in worst cases, permanent save file corruption
  • Square offered a cartridge replacement programme in Japan — one of the few instances of a SNES publisher replacing software due to a bug
  • A corrected ROM was issued for later Japanese printings; Western releases were never officially patched but the bug is present in all SNES versions

The Pointer Overflow Mechanism

Sketch reads an enemy's data from a table indexed by the enemy's ID number. The implementation calculates the read address by multiplying the enemy ID by the size of an enemy data record and adding a base address. When the item inventory is at or near maximum capacity, a related inventory-tracking value occupies an adjacent memory location in a state that causes the multiplication result to overflow the expected range of the enemy data table.

The overflow directs the read pointer into RAM regions beyond the table — regions that at the moment of execution may contain save data, event flags, or active game state variables. The write that follows, intended to fill Relm's temporary "sketch" buffer with the copied data, executes against these unintended addresses. Because the destination is save-file memory, values the game interprets as item quantities, gold, and equipment flags are overwritten with arbitrary data from the enemy table read, producing the chaotic effects players reported.

The exact outcome varies depending on which enemy is being Sketched and the precise inventory state, which is why player reports described a wide range of effects from mild to catastrophic.

Square's Response and Legacy

Square's cartridge replacement programme in Japan was a significant corporate response that acknowledged both the bug's existence and its severity. The programme required affected players to mail their cartridges to Square for exchange — logistically complex, but a genuine acknowledgement that the bug constituted a defect rather than player error. Western subsidiaries did not implement an equivalent programme, and North American players who encountered the bug had no formal recourse.

The Sketch glitch's legacy in the speedrunning community is as a tool rather than a hazard: in glitch-enabled categories, runners deliberately trigger it to manipulate inventory contents, acquiring late-game items or equipment at points in the game where they would normally be unobtainable. The same memory confusion that corrupts saves in normal play can be directed to write specific beneficial values if the runner controls inventory state carefully. This dual nature — catastrophic bug and powerful exploit — makes Sketch one of the most studied single commands in SNES RPG history.