Anna: The “Leon”-bug and its fix

A game-breaking bug in the upcoming game Anna: The Magic of Words (NES/Famicom) where the player stuck in a wall sometimes. The bug was found by 8-year-old Leon at LNC 2026 in Leipzig/Germany in May 2026. The linked video shows the bug and its fix.

Video: Game-breaking bug found in Anna: The Magic of Words (for NES/Famicom)

 

Technical description of the bug

Simply said, the game Anna: The Magic of Words (and nearly all NES games) is divided into individual screens.

Scrolling sections are—in memory—contiguous screens.
Static sections are loaded one after another as individual screens.

Several factors came together in this bug: The logic for collecting the heart and its counting, the character’s downward movement into the hole, the invisible “trigger” in the hole that discards the current screen and simultaneously starts loading the next screen to memory. At the same time, graphics are removed from memory and new graphics (tiles) for the new screen are loaded, including color palettes, sound, collision data, etc.

Due to the limited size of the NES’s working memory (2 KB of RAM), unfortunately not all individual metadata for every screen can be kept in memory at all times.
Therefore, much of the screen-specific metadata is stored statically and must be loaded dynamically. (This includes “spawn” points – the X/Y coordinates where the player character appears on a newly loaded screen.)

When switching screens, some character information is reset (acceleration, movement, etc.), as this information would otherwise automatically carry over to a new screen and could lead to undesirable results. This and other aforementioned functions require CPU time.

In this particular bug, under certain conditions of joypad operation, the CPU was occupied with data processing for too long, and the new screen was already fully rendered and displayed even though not all metadata was yet available correctly.

While the “spawn” point Y (character’s vertical position) was loaded and set correctly, the “spawn” point X could no longer be set correctly because it wasn’t loaded; instead, this new information was ignored, and the character was simply positioned at the same X-coordinate as on the previous screen. The logic check for the X-coordinate also failed, since a value had already been set (the previous value, which could just as easily have been the new one). However, no further check was performed to verify whether this value was correct.

On the new screen, there was a “wall” at this position, and the character became stuck.

The fix

To trigger this scenario, several specific conditions must be met, and these can occur at various points in the game.

That’s why I modified the loading routine and memory management.

Please note: As you can see in the video, the level structure (on the new screen) was adjusted; this is no longer necessary after the bug fixes, but it can’t be removed from the video now. 😉