Skip to content

Add opt-in Ocarina of Time developer debug tools - #785

Merged
shayderrr merged 5 commits into
NotRexed:mainfrom
ArmstrongThomas:codex/oot-debug-tools
Nov 9, 2026
Merged

shayderrr merged 5 commits into
NotRexed:mainfrom
ArmstrongThomas:codex/oot-debug-tools

Conversation

@ArmstrongThomas

@ArmstrongThomas ArmstrongThomas commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What this adds

An opt-in Ocarina of Time developer debug panel for reproducing gameplay and rendering issues. It can move Link or the camera to inspect a scene, return Link to a marked position, travel to another map, switch Link's age, edit his inventory, and set up time-of-day or damage test cases.

  • Player movement gives Link camera-relative no-clip flight with gradual acceleration, braking, and turning. Enable No-clip flight in the panel to allow double-tap Jump to take off or land. Switching the setting off disables the shortcut and ends flight. Hold Jump to climb, or use L or Page Down to descend.
  • Free camera routes movement and look input to the view while Link stays in place.
  • Scene setup adds a same-scene position mark and return, a world-clock control, and quantity adjustments for supported consumables.
  • Heart protection preserves health while retaining hit reactions and knockback.
  • Teleport travels to another map through the game's own map change: it requests the same Dm_SY_BancChangeGo event an entrance uses, with the destination map, spawn anchor and arrival event, picking the child or adult map from Link's current age. Destinations: 19 overworld areas (Kokiri Forest through Desert Colossus, including Lake Hylia) and 12 dungeons; Hyrule Castle is Ganon's Castle grounds as an adult and Gerudo Fortress is adult only. Enter on the Teleport row opens a list page grouped into Overworld and Dungeons. Requests are refused while an event plays or a map loads.
  • Switch age flips the game's Sequence_IsChildhood flag, as the Temple of Time does, and reloads the current map in the other age through the same map change (the Market when the current map is not in the teleport list). The flag is restored if the map change cannot be requested. The Temple of Time event's equipment swap is not reproduced.
  • Inventory opens a list of about 85 pouch contents in five sections (Equipment, Items, Masks, Upgrades, Quest) with live counts read from the game twice a second. Enter unlocks a missing item or relocks a held one, and Left/Right change amounts. Edits go through the game's own OneShotAddOrRemovePouchContent; counts come from QueryGetPouchContentNumByActorName. Masks share one slot as in the game, so choosing a mask first returns the one held. The item list lives in gpu/vk/oot_cheat_items.h, shared by the menu and the game side.
  • List navigation: the list pages show 20 rows; holding an arrow or the D-pad repeats with acceleration, Page Up/Down jump a screen, Home/End go to the ends, and Q/E or the bumpers jump between sections.

The panel is hidden by default. On Windows, add HOS_OOT_CHEATS=1 to hookshot_env.txt, then open Insert → Gameplay → Cheats. The translated hooks are gated to the supported OOT build (e0f3ccfa). Flight, free camera, and the position mark reset at exit.

Validation

  • The local Windows build linked successfully.
  • On a copied Sacred Grove save, verified Jump-to-climb, descent, opposite headings, forward movement after rotating the camera, and landing after disabling flight.
  • Verified free-camera movement with Link stationary, return to a marked position, and a consumable edit that survived saving and restarting. The game clock read back the selected hours.
  • The double-tap shortcut was confirmed in gameplay by the local tester.
  • The tester tried a handful of the 31 teleport destinations. Each reached the intended area, though some arrival spots could be improved. The full destination list still needs coverage.
  • The tester confirmed that Switch age and the inventory editor worked. An edited item count may take until the next refresh to appear.
  • Heart protection was checked in gameplay. Linux runtime coverage is outside this implementation.

ArmstrongThomas and others added 5 commits November 8, 2026 16:05
Teleport: the Cheats page gains a Teleport list (31 destinations: 19
overworld areas including Lake Hylia, and 12 dungeons). A request builds
the same EventRequestArg an entrance actor does and asks the EventMgr for
Dm_SY_BancChangeGo with NextBanc / NextStartPos / BootEventName, so the
game's own ReserveBancChange and ChangeBancOnEvent load the map. The map
follows Link's age (Sequence_IsChildhood); requests are refused while an
event plays or a map loads.

Switch age: flips Sequence_IsChildhood in GameData storage and reloads the
current map in the other age through the teleport (the Market when the
map is not in the list). The Temple of Time's equipment swap is not
reproduced.

Inventory: a list of about 85 pouch contents (gpu/vk/oot_cheat_items.h,
shared by the menu and the game side) with live counts from
QueryGetPouchContentNumByActorName, edited through
OneShotAddOrRemovePouchContent. Masks share one slot as in the game.

List pages: section headings, 20 rows, hold-to-repeat on the arrows and
D-pad, Page Up/Down and Home/End. Test runs can send any Cheats action
with a "!cheat <action>" line in the HOS_INPUT_LIVE file.

All guest addresses are for build e0f3ccfa, like the existing tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shayderrr

Copy link
Copy Markdown
Collaborator

Thanks!

@shayderrr
shayderrr merged commit 32df58e into NotRexed:main Nov 9, 2026
6 of 9 checks passed
AR51AurA added a commit to AR51AurA/Hookshot that referenced this pull request Nov 9, 2026
Conflicts with the OoT debug tools (NotRexed#785) in the host table: take_key_press first, then mic_count and
mic_name, in the same order in host/rx_backend.c; MKWVK_API_VERSION 7. tests/test_audio_in.py reads the
table across lines.

Assisted-by: Claude Opus 5.5 (Anthropic)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NotRexed pushed a commit that referenced this pull request Nov 9, 2026
…light state and jump shortcut, stubbed off)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NotRexed pushed a commit that referenced this pull request Nov 9, 2026
…0.6 lacked oot_cheat_items.h: no Linux build finished)

#785's debug tools added gpu/vk/oot_cheat_items.h, which host/hos_main.c includes, but scripts/linux/appimage.sh copied
only gpu/vk/vk_api.h, so every Linux/Steam Deck build of v2.0.6 stopped there (issue 990). The script now copies each
gpu/vk/<name>.h that host/ mentions; tests/test_appimage_headers.py fails if host/ includes a gpu header the AppImage
does not ship. Checked: the copy loop under bash (set -e) picks oot_cheat_items.h and vk_api.h.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KrysGG added a commit to KrysGG/Hookshot that referenced this pull request Nov 10, 2026
…ugh walls

The flight stays on the Cheats page, behind HOS_OOT_CHEATS as NotRexed#785 has it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NotRexed added a commit that referenced this pull request Nov 10, 2026
…ug tab, sharper shadows (#1485)

Tested together in the v2.0.12 candidate builds (verify215-219: flash checks, smoothness walks, an 8 GB card simulated).
- Stutter: a frame's uploads have a budget (40 ms): new ASTC textures a draw samples past it come a frame or more later
  (RX_VK_UPLOAD_BUDGET_MS); descriptors are rebuilt when a texture is destroyed (RX_VK_DESC_REUSE_DGEN=0: off).
- VRAM: on a card of 8 GB or less the textures' budget is 45% of what the driver allows, not 70% (the 3060 Ti/3070
  slowdowns); RX_VK_TEST_ALLOWED_MB=<n> simulates a smaller card.
- Shadows: depth-compare samplers filter linearly (percentage-closer): shadow edges no longer in stair steps
  (RX_VK_SHADOW_PCF=0: off). Nearest samplers named in the log; RX_VK_FORCE_LINEAR=1 (issue 1117's A/B).
- Translator: Ampere LDSM between subgroup barriers (MEMBAR's subgroup scope); EDEN_NX2_GM_SPLIT/GM_PORT_PROGS.
- HDR10 out (Insert menu: HDR Off / On / Native, paper white, peak brightness), applied at once.
- A Frame rate cap row (60, 90, 120, 144, 165, 240; HOS_FPS_MAX), read at the start.
- Discord status: "Playing Hookshot" with the time played through a local Discord client (Gameplay > Discord status).
- The Debug tab: the OoT debug tools (#785) turned on from the menu (HOS_OOT_CHEATS=1 as before).
- Diagnostics: the frame trace (RX_VK_FRAME_TRACE=1), slow uploads, self-sampling draws, slow program preparation and
  staging arena creation in the log; RX_VK_ASYNC_IMPORT=1 (opt-in) and RX_VK_PASS_BARRIER=game (off) to try.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
KrysGG added a commit to KrysGG/Hookshot that referenced this pull request Nov 10, 2026
NotRexed#1485 gave the OoT debug tools (NotRexed#785) a tab of their own, DEBUG, with the free
camera turned on from the menu. So no Cheats/Mods tab: the Screen filter and
Filter strength rows join the Debug tab, the free camera row goes (main's
Debug tools has it), and the HUD hiding stays, following the free camera.
The menu's width and tab code are main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants