Skip to content
 
 

Repository files navigation

Zelda3 - A Link to the Past

A reverse-engineered C reimplementation of The Legend of Zelda: A Link to the Past for SNES.

License

About

This is a ~70-80kLOC C reimplementation of the original SNES game, reverse-engineered with function and variable names from community disassembly efforts. The game is fully playable from start to finish.

Supported Platforms: Linux, macOS, Windows, Nintendo Switch, and Android

Key Features

  • Complete reimplementation - All game logic recreated in portable C
  • Frame-perfect verification - Can run alongside original ROM for validation
  • Enhanced features - Optional widescreen support, MSU audio, pixel shaders
  • Cross-platform - Runs on desktop, mobile, and console platforms
  • Snapshot system - Save/load/replay game state with input history
  • Multiple renderers - SDL software, OpenGL/OpenGL ES, Vulkan support
  • GTK3 launcher - Graphical settings editor (optional, desktop only)

Quick Start

1. Build

Linux/macOS:

# Install dependencies
# Ubuntu/Debian: sudo apt install libsdl2-dev libopus-dev libyaml-dev cmake build-essential
# macOS: brew install sdl2 opus libyaml cmake

# Optional: Install GTK3 for graphical launcher
# Ubuntu/Debian: sudo apt install libgtk-3-dev
# macOS: brew install gtk+3

# Build
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . -j$(nproc)

Windows:

# Using vcpkg for dependencies:
vcpkg install sdl2:x64-windows opus:x64-windows libyaml:x64-windows

# Build with CMake
mkdir build && cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build . --config Release

See detailed instructions: Installation Guide | Platform-Specific Guides

2. Extract Assets

You need a US region ROM (SHA256: 66871d66be19ad2c34c927d6b14cd8eb6fc3181965b6e517cb361f7316009cfb):

# Extract and compile assets from ROM
./zelda3-restool --extract-from-rom /path/to/zelda3.sfc --compile

This creates zelda3_assets.dat containing all game resources.

3. Run

./zelda3

Or on Windows: zelda3.exe

Optional: Use the graphical launcher to configure settings (if GTK3 is installed):

./zelda3-launcher

Controls

Button Default Key
D-Pad Arrow Keys
A X
B Z
Start Enter
Select Right Shift

Gamepad: Plug-and-play support with quick save (L2+R3) and quick load (L2+L3).

Customize controls in zelda3.ini after first run.

Useful shortcuts:

  • Alt+Enter - Toggle fullscreen
  • F1-F10 - Load snapshot
  • Shift+F1-F10 - Save snapshot
  • Tab - Turbo mode

Full controls and features →

Documentation

Browse all documentation →

Enhanced Features

Optional enhancements not in the original game:

  • Widescreen support (16:9, 16:10 aspect ratios)
  • MSU audio (high-quality soundtrack tracks)
  • Pixel shaders (custom visual effects)
  • Higher quality world map
  • Secondary item slot on button X
  • L/R item switching

All features are disabled by default to preserve original behavior. Enable in zelda3.ini.

Community

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Quick links:

License

This project is licensed under the MIT License. See LICENSE.txt for details.

Credits

Releases

Packages

Contributors

Languages