Skip to content

Ocarina of Time cheats: GBAtemp's rupees and ammo (moved for this host's heap), max hearts, Link speed ×1.5–×3, one-hit kill, no damage to Link - #1718

Closed
Amost- wants to merge 3 commits into
seedds:mainfrom
Amost-:pr/ocarina-cheats

Conversation

@Amost-

@Amost- Amost- commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Cheats for The Legend of Zelda: Ocarina of Time (Switch 2, update v131072, build E0F3CCFAF50065AE) as a cheats source (OcarinaOfTime.cheats.toml), with a Cheats section in the game's README and one sentence in docs/reference/cheats.md. Everything compiles only for this build: the first entries are heap addresses, and the code patches keep their stubs in the padding after the text and their switches in unused .bss, at this build's offsets.

GBAtemp codes. rainbowkittypaw posted six on GBAtemp on 2026-11-06 for the Lichii emulator: https://gbatemp.net/threads/cheat-codes-ams-and-sx-os-add-and-request.520293/page-3738#post-10942642 (Infinite Rupees, Deku Nuts, Deku Sticks, Seeds, Bombs and Bombchus, each a heap store of 9999).

  • As posted they change nothing here: the game keeps these counts in its game-data table (the s32 flags of progress.sav), and this host's heap holds that table 0x2000 bytes higher than Lichii's. The README gives the layout (hash slots, then 0x28-byte records at heap+0x7F374AB0, value at +0xC), found by matching DM_CTL memdumps against a save's hashes: 1143 of 1144 values matched, at the same offsets on two boots.
  • Each entry adds 0x2000, sets r0 to 0 and writes only while the flag's slot holds the flag's hash.
  • Tested headless with all six on: the pause menu shows 9999 / 200 rupees (1 / 200 with them off), only those six values change in the table, and no write was refused.

Hearts. Max health is flag fbe01da1 (index 964), in quarter hearts: "20 heart containers" sets it to 80 (20 containers on the HUD). The "Infinite health" of the second commit is removed: current health, flag 31ab5580, is only the copy the game makes of Link's life, so writing it refilled him on a load or a retry but could not stop a death (Link burned down to Game Over with it on). "Link takes no damage" below replaces it.

Link speed ×1.5 / ×2 / ×3 (one at a time).

  • main+0x9352F0 hands the player a move direction and a speed in metres per frame. Walking and running call it at main+0x934990 with the length of the frame's animation root-motion step; rolls go through the player's virtual set-speed method, which tail-calls it at main+0x933E30 / main+0x933E74. Each factor sends those three branches through its own 3-instruction stub (fmov s16, #k; fmul s0, s0, s16; b main+0x9352F0) in the zero padding after the text.
  • Scaling at the function's entry would compound, because main+0x93528C re-applies the stored speed every frame. The function's other call sites (climbing, swimming, scripted walks) keep their speed.
  • The three sites are the ones afiaka87's oots2-release "faster-movement-extra" doubles (MIT, a Lichii .pchtxt for this build): https://github.com/afiaka87/oots2-release
  • Tested headless, with Link's velocity read every frame on the same push from a save's spawn: walking 4.50 m/s off, 6.74 at ×1.5, 8.98 at ×2, 13.48 at ×3; roll peaks 5.67, 8.47 and 11.23 m/s. No write was refused.

One-hit kill and Link takes no damage (separate switches, fine together).

  • Every actor that can be hurt has a damage component (slot 0x2B8 of its component table). Its +0x1C10 / +0x1C18 point at the current / max life holders (s32 at +8). Each frame main+0x49DCDC computes new life = life − damage, clamps it and stores it with a compare-and-swap.
  • Enemies' holders are a plain value (class main+0x4B4C400). Link's is the game-data-synced kind (main+0x4B63438, carrying flag 963's hash).
  • The site goes to one 16-instruction stub that reads two switch words in unused .bss. One-hit kill sets a plain holder's new life to 0 on any damage; no damage keeps a game-data holder's life. Both entries install the same stub and flip only their own word, and with both off the stub does the original subtraction.
  • Bosses use the same holder but keep their last point until the fight's finishing moment: Gohma went 21 → 1 and stayed at 1.
  • Tested:
    • A player confirmed one-hit kills in a window, on a save copy beside a Dodongo in Dodongo's Cavern.
    • Headless, one point of damage was put into the routine (lldb sets the damage register at the site for one actor). A Dodongo went 6 → 5 with one-hit kill off and was removed with it on. The untouched Dodongo stayed at 6 / 6.
    • Link (16 / 16) took 4 with no change while no damage was on.
  • Not tested: adult weapons, arrows and bombs, friendly actors with life (cuccos).

The speed, damage and boss tests started from saves that load Link at a chosen place (beside the Dodongo, in Gohma's room). The tool that made them builds on the save-format work of Traiver's OOT-SW2SE save editor (MIT): https://github.com/Traiver/OOT-SW2SE

Compiled with cheat_anchor.py, all 17 entries with code give the words of the tested file; cheat_anchor.py check passes. test_docs, test_cheat_anchor, test_game_profile and test_architecture pass. No Python changed.

🤖 Generated with Claude Code

@github-actions github-actions Bot added docs Documentation game: 0400486024DEC000 A game labels Nov 7, 2026
@Amost- Amost- changed the title Ocarina of Time: infinite rupees and ammo cheats (GBAtemp codes by rainbowkittypaw, moved for this host's heap) Ocarina of Time: infinite rupees, ammo and hearts cheats (GBAtemp codes by rainbowkittypaw, moved for this host's heap) Nov 8, 2026
Amost- and others added 3 commits November 9, 2026 15:52
…this host's heap

Six codes rainbowkittypaw posted on GBAtemp on 2026-11-06 for the Lichii
emulator (post 10942642 in "Cheat Codes AMS and Sx Os, Add and Request"):
Infinite Rupees, Deku Nuts, Deku Sticks, Seeds, Bombs and Bombchus, each
a heap store of 9999 into one of the game's s32 game-data flags. This
host keeps that table 0x2000 bytes higher in the heap than Lichii does,
so the posted addresses change nothing here. The source
(OcarinaOfTime.cheats.toml, build E0F3CCFAF50065AE only) adds 0x2000
and writes only while the flag's hash is in its table slot. The README's
Cheats section has the table's layout and the test; the cheats reference
notes that heap codes can differ between hosts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…game-data table

Two entries found here from the game-data table the GBAtemp codes use,
not from the post: current health is flag 31ab5580 (index 963) and max
health fbe01da1 (964), both in quarter hearts (12 on a new file).
"20 heart containers" sets max health to 80; "Infinite health" copies max
health into current health every pass (opcode 5 into r1, opcode A stores
it). Both are gated on the two flags' hash slots, like the six codes, and
compile only for build E0F3CCFAF50065AE. Tested headless: 20 full hearts
on the HUD with both on; damage not tested. The game README's Cheats
section has the flags and the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e to Link, code patches for build E0F3CCFAF50065AE; "Infinite health" goes, as flag 963 is only the copy the game makes of Link's life

Speed: the three branches that hand the player a new speed (main+0x934990 walk / run, +0x933E30 / +0x933E74 rolls, into
main+0x9352F0) go through a per-factor stub in the padding after the text; the sites are the ones afiaka87's oots2-release
faster-movement-extra doubles (MIT). Damage: the routine's sub at main+0x49DCDC goes to one stub with two switch words in
unused .bss: a plain life holder (enemies) goes to 0 on any damage, a game-data holder (Link's) keeps its life. Compiled
with cheat_anchor.py, all 17 entries with code give the words of the tested file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Amost-
Amost- force-pushed the pr/ocarina-cheats branch from be3dc35 to 0a244b0 Compare November 9, 2026 14:52
@Amost- Amost- changed the title Ocarina of Time: infinite rupees, ammo and hearts cheats (GBAtemp codes by rainbowkittypaw, moved for this host's heap) Ocarina of Time cheats: GBAtemp's rupees and ammo (moved for this host's heap), max hearts, Link speed ×1.5–×3, one-hit kill, no damage to Link Nov 9, 2026
@seedds

seedds commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Thanks @Amost- for adapting these Ocarina of Time cheats and documenting the heap layout.

We are closing this PR because game-specific, build-bound cheat tables are outside the scope of the core nxnative repository. Community cheats are best shared externally rather than maintained per build in main.

@seedds seedds closed this Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 0400486024DEC000 A game

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants