How zeldaret/oot works
This repository is a work-in-progress decompilation of The Legend of Zelda: Ocarina of Time, not a PC port. Its runtime recreates the game’s boot and frame loop, gameplay and actor behavior, menus, graphics, audio, and platform services. The sampled sources show selected calls among audio scheduling, overlay loading, and the Wallmaster actor; other major game subsystems are represented from the repository tree and README, so their internal links are omitted where evidence was unavailable.
Main entry points: main.c Game Entry · audio_thread_manager.c Audio Scheduling · z_en_wallmas.c Wallmaster Actor · z_kaleido_manager.c Menus and HUD
Components 18
Runtime
- Game Entry
src/code/main.c - Game States
src/code/game.c - Play State
include/play_state.h
Gameplay
- Scenes and Rooms
src/code/z_scene.c - Actor System
src/code/z_actor.c - Wallmaster Actor
src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c - Collision
src/code/z_collision_check.c - Messages
src/code/z_message.c
Presentation
- Menus and HUD
src/code/z_kaleido_manager.c - Overlay Loading
src/code/z_kaleido_manager.c - Graphics
src/code/graph.c - Audio Driver
src/audio/game/session_init.c
Platform Services
- Audio Scheduling
src/code/audio_thread_manager.c - Task Scheduler
src/code/sched.c - Controller Input
src/code/padmgr.c - DMA and ROM
src/boot/z_std_dma.c - Save Data
src/code/z_sram.c
Other components
- Player
Connections 11
- Player → Game Entry: starts game
- Wallmaster Actor → Play State: uses state
src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c - Wallmaster Actor → Player: targets player
src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c - Wallmaster Actor → Menus and HUD: starts cutscene
src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c - Menus and HUD → Overlay Loading: loads overlay
src/code/z_kaleido_manager.c - Audio Scheduling → Task Scheduler: submits tasks
src/code/audio_thread_manager.c - Audio Scheduling → Audio Driver: updates driver
src/code/audio_thread_manager.c - Game Entry → Audio Scheduling: starts manager
src/code/main.c - Game Entry → Graphics: uses graphics
src/code/main.c - Game Entry → Controller Input: uses input
src/code/main.c - Audio Scheduling → DMA and ROM: sets DMA handler
src/code/audio_thread_manager.c