Files
oracle-of-secrets/oracle.org
scawful eeeb9ffeb4 Add detailed documentation for memory mapping, quest flow, and sprite creation
- Created MemoryMap.md to outline WRAM and SRAM structures, including key variables and custom regions.
- Added QuestFlow.md to document main quest progression and major side-quests, detailing triggers, events, rewards, and flags.
- Introduced SpriteCreationGuide.md to provide a comprehensive guide for creating custom sprites, including file setup, properties, main structure, initialization, logic, and drawing routines.
- Updated oracle.org to include new documentation links and improve project organization with infrastructure suggestions.
2025-10-01 22:40:58 -04:00

21 KiB

Oracle of Secrets

Oracle of Secrets

ROM Hack for The Legend of Zelda: A Link to the Past Based on the Oracle series and using elements from Minish Cap, Link's Awakening, and other Zelda games.

Infrastructure and Organization Improvements

This section outlines suggestions for improving the overall structure and maintainability of the "Oracle of Secrets" codebase, primarily by leveraging advanced features of asar.

Rationale: As the project grows, a well-organized codebase becomes crucial for efficient development, debugging, and long-term maintenance. These suggestions aim to increase modularity, reduce errors, and improve readability.

TODO Reorganize Patches into a Dedicated File

  • Current State: Numerous small `org` patches are located at the end of Sprites/all_sprites.asm.
  • Suggestion: Create a new top-level file, perhaps Core/patches.asm, and move all vanilla code patches there. This file can be organized by bank or functionality.
  • Benefits:

    • Separation of Concerns: all_sprites.asm would only be responsible for including sprite code, not patching the ROM.
    • Maintainability: Centralizes all direct modifications to original code, making them easier to find, manage, and debug.

TODO Use incbin for All Binary Data

  • Current State: GFX data is already well-handled with `incbin`. This is a reminder to continue this practice for all non-code data.
  • Suggestion: Ensure all graphics, palettes, level data, etc., are included via `incbin`.
  • Benefits:

    • Cleanliness: Keeps assembly files focused on logic.
    • Tooling: Allows for easier use of external tools to edit binary data.

TODO Leverage struct for Complex Data

  • Current State: RAM addresses are defined with labels (e.g., in Core/ram.asm). This is standard, but for complex related data, it can be improved.
  • Suggestion: Use asar's `struct` directive for things like sprite state, player data, or complex SRAM layouts.
  • Benefits:

    • Clarity: Defines data structures in a high-level, readable format.
    • Maintainability: Reduces "magic numbers" when accessing data fields. If the structure changes, you only need to update the `struct` definition.

TODO Use table for Jump Tables

  • Current State: Jump tables are created manually with `dw` directives, like in Items/all_items.asm for Link_ConsumeMagicBagItem.
  • Suggestion: Use the `table` directive to create these tables automatically.
  • Benefits:

    • Simplicity: Less boilerplate code.
    • Safety: Can help prevent errors from misaligned table entries.

TODO Combine custom room tags into a table system

  • Current State: Custom room tags are defined in Dungeons/crumblefloor_tag.asm and similar files.
  • Suggestion: Create a unified table system for all custom room tags, possibly in a new file like Dungeons/room_tags.asm.
  • Benefits:

    • Organization: Easier to find and manage all custom room tags.
    • Extensibility: Simplifies adding new tags in the future.

Levels

S0 Shrine of Origins

Item: Moon Pearl

Located in the Temporal Pyramid where you get transported after your first encounter with Kydrog.

D1 Mushroom Grotto

Item: Bow

Miniboss: Vampire Bat

Boss: Mothra

Located in the Mushroom Grotto west of the Maku Tree and Wayward Village

D2 Tail Palace

Boss: Big Moldorm (Vanilla)

Item: Roc's Feather

D3 Kalyxo Castle

Boss: Armos Knights (Vanilla)

Item: Meadow Blade (Lv2 Sword)

TODO: Castle Guard Ambush Sequence using overlord sprites and dungeon warp

S1 Shrine of Wisdom

Item: Zora Flippers

TODO [C] Shrine of Wisdom Swamp Overworld Improvements   planning

  • Warp Zones to return the player to the start in case they screw up.
  • Shrubs with Plentiful magic restoring items
  • NPCs to help navigate the player.
  • A possible heart-piece/treasure to reward curious players for venturing off the intended route.

D4 Zora Temple

Boss: Advanced Arrghus (Vanilla variant)

Item: Hookshot, Zora Mask

TODO [B] Zora Temple Tasks [0/2]   code bugfix

  • Zora Follower Sprite Logic
  • Fix Water Gate Collision

D5 Glacia Estate

Boss: Twinrova

Item: Fire Rod

TODO [B] Glacia Estate Tasks [0/4]   design polish

  • Improve Ice Block sprite collision detection
  • Tune enemies in dungeon, adjust positioning
  • Exterior gfx improvements
  • Add indicator for pushable block in ice puzzle

S2 Shrine of Power

Item: Power Glove

TODO [A] Shrine of Power Tasks [0/3]   design

  • Fix collision of lava pit corner tiles

D6 Goron Mines

Boss: King Dodongo (Helmasaur variant)

Miniboss: Lanmolas (Large room variant)

Item: Hammer

Dungeon Ideas

  • Goron Follower

    • Requires gfx
    • Affects `Dungeons/crumblefloor_tag.asm` cracks, can fall down
  • Lifting `Sprites/Objects/minecart.asm` to another location

    • only works if it is a small corridor so he can't walk back another route
  • a puzzle similar to star puzzle in minish grotto? (if you step on the same star twice, you fail the puzzle).
  • walk to the other side of the room without any part of the floor falling down. enemies or other things can make it difficult for you. If you fail, the door to the next room wont open.
  • only some parts of thefloor are normal and other parts break. you put an item in front of you but if it ends up on weak parts of the floor it falls down and you have to start over. kind of like somaria block try and error on invisible floors
  • when you enter the room there are already cracks on the floor. you need an item to fix the floor so that you can walk over it once. maybe the song of healing
  • make a crack and fall down in the right place so that you end up in the right place on the floor below

D7 Dragon Ship

Boss: KydrogBoss

Item: Somaria Rod

TODO [C] Dragon Ship Tasks [0/1]   design

  • Extended section???

S3 Shrine of Courage

Boss: Vaati (Vitreous variant)

Item: Mirror Shield

S4 Bonus Shrine (Underwater Eon Abyss)

Item: Red Tunic

D8 Fortress of Secrets

Boss: Dark Link

Item: Portal Rod

D9 Eon Core (Endgame)

Boss Part 1: Kydreeok (Kydrog Gleeok variant)

Boss Part 2: Ganon

Item: Triforce

Quests

Main Quests

Lost Ranch Girl Quest

  1. Get Mushroom from Old Woman house in Mushroom Grotto
  2. Trade Mushroom to Potion Shop
  3. Leave Mountains and return to Potion Shop later for Magic Powder
  4. Use Magic Powder on Cucco in the Ranch House for Ocarina

Mask Salesman Quest

  1. Requires Ocarina from Lost Ranch Girl Quest
  2. Mask Salesman teaches Song of Healing
  3. Play Song of Healing for Deku NPC near the shop for Deku Mask

TODO [B] Tail Palace Kiki Quest [1/2]   quest code

  1. Kiki asks for Bananas instead of Rupees
  2. Deku NPCs inhabit Tail Palace OW after dungeon completion

Book of Secrets

  1. Play Song of Healing for sick village child for Running Boots
  2. Use Running Boots to get the Book from the village library.
TODO Journal mode   menu
  • Track quests completed
  • Track items obtained
  • Track dungeon completion

TODO [A] Kalyxo Castle Questline   quest

Bridge Opening
  • Requires Book of Secrets from Wayward Village library.
TODO Prison Sequence [0/2]   sequence code
  1. Occurs after obtaining the Meadow Blade in Kalyxo Castle
  2. Ambushed by castle guards and locked away in castle prison dungeon room
  3. Escape the prison cell and sneak past guards to exit the castle using minish form, requires minish dungeon object tile types and interactions with `probe_ref.asm` (unused) to do player detection by guards.

ACTIVE [A] Zora Sanctuary Questline [2/2]   quest

  • Meet lone Sea Zora left at the Sanctuary, learn of Zora Princess
  • Conflict over territory lead to Zora Princesses imprisonment
  • Waterfall Song of Storms Event apart of `Items/ocarina.asm` and `Overworld/overlays.asm`

Old Man Mountain Quest

  1. Take the warp portal at the northwest most point on Mount Snowpeak
  2. Enter the Lava Lands cave to find the Old Man.
  3. Escort the Old Man to a rock formation on the mountain and use magic mirror.
  4. Receive the Goldstar before continuing to Glacia Estate

ACTIVE [B] Goron Mines Quest [2/4]   quest

  1. Collectible Goron Rock Meat from Lupo Mountain

    • Eon Gorons workers protesting labor, Piratians involved somehow
    • Requires Power Glove from Shrine of Power
  2. Kalyxian Goron NPC in the desert asks for five sirloins to open the mines.
  3. Garo NPC easter egg warps around the map
  4. Gossip Stones provide some hint related to the Shrines?

Side Quests

Masks for Sale

Bunny Hood - 100 Rupees
Stone Mask - 850 Rupees

Wolf Mask Quest

  1. Wolfos appears outside of Kalyxo Castle at Night, defeat and play Song of Healing for Wolf Mask.

DONE Magic Bean Quest [4/4]   quest

  1. Buy Magic Bean from Bean Vendor, requires Bottle.
  2. Take Magic Bean to the Ranch and plant it in empty soil north of the houses.
  3. Requires rain (Song of Storms), Pollination (Good Bee) and 3 in game days.
  4. Flower the player can ride to a heart container appears.

TODO [C] Swordsmith Rescue [0/3]   quest

  1. Use the Bomb Shop Big Bomb in the Eon Abyss Beach
  2. Return the Lost Brother to the Smiths house west of Waywrd Village
  3. Swordsmith brothers improve your Meadow Blade to the Tempered Sword (Lv3)

TODO [C] Korok Cove   quest

  1. Find the Korok Cove entrance in graveyard
  2. Hide and seek minigame with `Sprites/NPCs/korok.asm`

TODO [C] East Kalyxo Zora River Region   quest

  1. Use the flippers to swim down the river east of Korok Cove
  2. Find the hidden grotto with a heart piece
  3. Come up with more ideas for this area

TODO [C] Fishing Minigame   minigame

TODO [B] Sky Area Special Overworld Events   quest

  • Song of Soaring to access Sky Area
  • Sky Area NPCs and Enemies
  • Ideas for Cloud area (weather puzzles)

    • Some clouds are very thin and Link will fall through them if he is not minish Link.
    • Other clouds have strong wind currents so Minish Link will be blown away immediately.
    • Some clouds are too far apart to jump over with Roc's feather or hookshot. Then you have to use the flute and switch between sun and rain: New cloud platforms will appear when it rains (water fills them)
    • Some clouds are charged with electricity and damage Link if you walk on them. Play the flute to get sunshine so they turn into normal clouds. Or maybe somehow lead the electricity to a mechanism that opens a gate? (for example, playing the melody again so that a normal cloud becomes a thundercloud and conducts the electricity further)

TODO [B] Dream Sequences [0/6]   sequence

  • Deku Business Scrub Dream
  • Twinrova Ranch Girl Dream
  • Hyrule Castle Dream (Song of Time)
  • River Zora King Dream
  • Kydrog Sealing Dream
  • Mine Collapse Dream

Items

Y Items

Name Description
Bow Vanilla
Boomerang Vanilla
Hookshot Goldstar ball and chain upgrade, L/R to swap
Bombs Vanilla
Magic Powder Press A on menu to open Magic Bag
Hammer Vanilla
Lamp Vanilla
Fire Rod Vanilla
Ice Rod Freezes water tiles to walk on
Magic Mirror Allows dual warping with all essences
Ocarina Song of Storms, Soaring, Time, Healing
Book of Secrets Activates special overworld events
Cane of Byrna Vanilla
Fishing Rod Press Y to cast reel in water
Portal Rod Press Y to create blue and orange portals
Roc's Feather Press Y to jump
Deku Mask Shoot magic bubbles, interact with Deku leaf
Zora Mask Press Y to dive underwater
Wolf Mask Press Y to dig for treasure
Bunny Hood Press R to transform and run faster
Stone Mask Reskinned Magic Cape
Bottles No longer requires Bug Catching Net to use

Equipment

Name Location
Moon Pearl Shrine of Origins
Small Sword (Lv1) Forest of Dreams
Small Shield (Lv1) Forest of Dreams
Meadow Blade (Lv2) Kalyxo Castle
Tempered Blade (Lv3) Swordsmiths Hut
Master Sword (Lv4) Temporal Pyramid
Hero Shield Shops
Mirror Shield ???
Blue Tunic Zora Sanctuary Waterfall
Red Tunic Shrine of ??????
Power Glove Shrine of Power
Titans Mitt Fortress of Secrets?
Running Boots Sick Kid Wayward Village

Rings

Name Description
Power Ring Increase attack
Armor Ring Increase defense
Heart Ring Slowly regenerate health
Light Ring Sword beams work at -2 hearts
Blast Ring Higher bomb damage, bombos class
Steadfast Ring No knockback

Ocarina Songs

Name Effect
Song of Storms Makes it rain and grow plants
Song of Soaring Warp to previously visited locations
Song of Time Change day to night and vice versa
Song of Healing Heals a character and gives Deku Mask

Sprites

NPCs

Impa

Maku Tree

Ranch Girl

TODO Garo

[#0A] Kaepora Gaebora / Eon Owl

  • Return to the Hall of Secrets with Six Essences
  • Kaepora Gaebora teaches you the Song of Soaring

[#0E] Piratian

[#07] Bean Vendor / Village Elder

[#22] Tingle

  • Player can buy maps for each dungeon from Tingle

[#25] Village Dog

[#39] Sea Zora Baby

[#73] Farore

[#A0] Deku Scrub (Mask) and NPCs

[#B8] Zora Princess and NPCs

[#D7] Vasu

[#E8] Happy Mask Salesman

[#F0] Mermaid / Maple / Librarian

[#F1] Korok

[#F2] Goron

Bosses

[#88] Manhandla

Advanced Arrghus

King Dodongo

[#CE] Twinrova

[#C1] Dark Link

Kydrog

[#7A] Kydreeok

Enemies

[#05] Helmet Chuchu

[#14] Business Scrub (Kaly/Eon)

[#1D] Darknut (Eon)

[#2C] Goriya

Octorok (Kaly/Eon)

TODO Water Octorok

[#A4] Pols Voice

[#A8] Anti-Kirby

[#A9] Wolfos

Castle Variant
TODO Ice Variant

[#AE] Sea Urchin (Kaly/Eon)

[#B1] Puffstool

[#EF] Poltergeist

[#CC] Booki

[#CD] Thunder Ghost

Objects

Collectibles

Deku Leaf

[#D5] Ice Block

Minecart

Mineswitch

Switch track

Portal Sprite

Tasks

DONE Add Librarian translations

DONE Goron Mines Opening Animation [2/2]

  • Setup Goron Sprite

    • Kalyxian Variant
    • Eon Abyss Variant
  • Animate mines opening animation

DONE Fortress of Secrets Cutscene

Should use the Ganons Tower Crystal Cutscene as the base.

DONE Fix Minecart mechanics [3/3]

  • Follower cart controls
  • Tile behavior for follower cart mode
  • Center based hitbox detection

ACTIVE [B] Collectible Item Quests [2/6]   quest

  • Bananas
  • Pineapples
  • Rock Meat
  • Seashells
  • Honeycombs
  • Deku Sticks

ACTIVE [A] Add Dungeon Maps [0/11]   assets map

Apart of yaze dungeon map editor task.

  • Mushroom Grotto
  • Tail Palace
  • Kalyxo Castle
  • Zora Temple
  • Glacia Estate
  • Goron Mines
  • Dragon Ship
  • Fortress of Secrets
  • Shrine of Wisdom
  • Shrine of Power
  • Shrine of Courage

TODO [A] Update Kydrog boss [1/3]   boss code

  • Track offspring sprites spawned, more dynamic spawns
  • Improve Kydrog movement, add additional stage in fight
  • Cinematic opening and ending cutscene with dialogue

TODO [A] Update Kydreeok boss [0/9]   boss code

  • Improve fireball attack
  • Improve head/neck rotation
  • pause and neck stretch out attack ala Chain Chomp style
  • neck stretch out and spin around the main body while shooting fire attack
  • A bone throwing attack in the second half
  • heads detach after you kill them and then float around the room like the original gleeok or like blind And then re-attach themselves instead of having them just pop back in like you have it now You could do it in both phases or just in the second bone phase
  • bullet hell section where it just sucks in its heads so you can't hit it and then just shoots fireballs in every direction
  • function that checks if you hit the head and if you do, don't electrocute the player to avoid some potential frustration there
  • pre-fight transformation cutscene with kydrog

TODO [C] End Credits   sequence

Timeline

Event Items
Start Game Lamp
Shrine of Origins Moon Pearl
Forest of Dreams Lv1 Sword and Shield
  • Beginning

    • Farore Intro

      • GameState 7EF3C5:02
      • StoryState B6:01
    • Kydrog Intro

      • OosProg2 7EF3C6:04
      • IntroFlag 7EF300:01
    • Maku Tree Return from Eon Abyss

      • OosProg 7EF3D6:02
  • Kalyxo General

    • Impa Hall of Secrets

      • OosProg 7EF3D6:04
    • Village Elder

      • MAPICON interaction
    • Ranch Kid

      • MAPICON interaction
  • Toadstool Woods Mushroom -> Magic Powder from Potion Shop
  • Magic Powder -> Ocarina from chicken at Toto Ranch
  • Ocarina -> Song of Healing from Mask Salesman near village
  • Song of Healing -> Deku Mask from Deku Scrub near Mask Shop
  • Song of Healing -> Running Boots from Sick Kid in village
  • Running Boots -> Book of Secrets from village library
  • Book of Secrets

    • Lifts the Kalyxo Castle gates

ROM Map

Expanded space used by ZScream as of 1/16/2024 Addresses are PC unless stated otherwise. ZS reserves everything up to 1.5mb or up to 0x150000

Location Contents
0x100000 - 0x107FFF Nothing?
0x108000 - 0x10FFFF Title Screen, Dungeon Map
0x110000 - 0x117FFF Default room header location
0x118000 - 0x11FFFF Unknown
0x120000 - 0x127FFF Expanded overlay data
0x128000 - 0x12FFFF Custom collision data
0x130000 - 0x137FFF Overworld map data overflow
0x138000 - 0x13FFFF Expanded dungeon object data
0x140000 - 0x147FFF Custom overworld data
0x148000 - 0x14FFFF Expanded dungeon object data

Credits

Zarby89 - ZScream, Code, Graphics Jared Brian - Shrine of Power, ZScream, Code Jeimuzu - Shrine of Wisdom, Tail Palace Letterbomb - Shrine of Courage, Music, Graphics NEONswift - Legends of Hyrule Maps

SePH - Overworld, Graphics Ghillie - Overworld, Graphics

DarkLink45 - Deku Link GFX

W*E*R*D*N*A - Graphics GameyFireBro - Graphics Fruttielicious - Beta Testing LEGO_Vince - Beta Testing Spacewiki - Beta Testing Evolvingfetus - Beta Testing Discodragn - Beta Testing BIGLOU - Beta Testing HonorThyFamily - Beta Testing