ZSR Forums

=> Ocarina of Time => Topic started by: mzxrules on May 29, 2010, 03:50:31 AM



Title: Ocarina of Time Event Bitflag mapping.
Post by: mzxrules on May 29, 2010, 03:50:31 AM
I decided to map out the various addresses containing game event memory because of a rumor that suggests it's possible to defrost King Zora without blue fire. From what I've seen so far, OoT records events with a single flip of a bit, exactly like how the equipment is stored. However, it doesn't seem like everything is stored in a nice pattern like the inventory stuff is.

Interesting Discoveries

In theory, it's possible to obtain the Zora Tunic from King Zora as a Kid. What I did was I showed King Zora the Letter to make him slide over, used a code to reset the flag that tells the game that King Zora moved over, then gave him a second Ruto Letter.
Unfortunately, King Zora will not accept a second Ruto Letter once the flag that tells him to slide over is set, meaning it's highly unlikely that we'll be able to get the Zora Tunic this way.

11B4C9

00 Link hasn't left house
01 Saria says Yahoo
02 Talked to Saria once

11B4BD

00 Didn't happen
02 Fairy Ocarina Cutscene

11B4B0

00 Default
80 Talked to Kaepora near the entrance to Koriki Forest

11B4B7
00 Default
20 Nabooru Kidnapped Cutscene

11B50A / 11B50B -- Discovered land, Map Screen

11B4BB

00 Default
02 Lake Hylia visited
04 Gerudo Valley visited
08 Gerudo Fortress visited
10 Lon Lon Ranch
40 Graveyard

11B4BA

00 Default
01 Desert Collossus
02 Death Mountain Crater

11B4B8

00 Default
10 Requiem Cutscene

11B4B9

00 Default
01 Hyrule Field Op Cutscene
02 Death Mountain Trail
08 Kakariko Village
40 Goron City

11B4EE
00 King Zora's Frozen (adult)
01 King Zora Thawed (adult)
02 King Zora Given Zora Armor

11B4AA

00 Default
01 Beat the first Diving Game

11B4AB

00 Default
02 Obtained the Zora Bottle

11B4AB

00 Default
08 King Zora's Butt has moved

11B4C8

00 Default
10 Mido gave his Need Sword & Shield speech

11B4A4
00 Default
10 Met The Deku Tree for the First Time

11B4A5

00 Default
10 Mido Stops blocking the Deku Tree
20 Deku Tree Opens Mouth

11B4AD

00 Default
01 Gotten Zelda's Letter, Impa appears to teach lullaby

11B4AE

00 Default
02 Talk to Impa for the First time, learn Zelda's Lullaby


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: Lexkeeta on May 29, 2010, 05:26:56 AM
what's the event for arwing?


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: UchihaSasuke on June 05, 2010, 08:01:24 AM
what's the event for arwing?

doing a barrel roll.


finding the flag for the escape sequence would be interesting.


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: mzxrules on April 30, 2012, 04:04:48 AM
Damn, old thread is old.

Anyway, I made quite a bit of progress on this. I've mapped out I think all the scene flags for the Fire, Water, Shadow Temples and Dodongo's Cavern, and their skulltula flags. I also mapped out the Deku Tree but I plan on going back for skulltulas.

I think that once I map out Jabu, Forest, Shadow, Ganon's Tower, I'll upload the tables to a few places.


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: Pheenoh on April 30, 2012, 05:09:28 AM
Excellent work mzx. I'm interested in seeing the completed table when you're done.


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: mzxrules on May 22, 2012, 06:20:07 AM
Aside from missing probably the Scarecrow Flags, I believe I have fully mapped out every permanent flag stored for the 8 major dungeons.

All address values are listed via a 4 digit shorthand, based on how they would be stored in the SRAM block in v1.0. Therefore, A5D0 corresponds with offset 0000 into a game file.

Actor Bits stores a collection of flags that appear to be either tied to actors, or are stored after the Scene Flag block (as it doesn't seem to have any form to it atm).

The Scene Flags sheet contains flags stored within the Scene Flag block. It works like this... each scene is allocated 1Ch bytes for storing permanent flags. The first four flags store whether a chest has been opened. The next 4 are switches which are sort of like your general purpose flags. Locked Doors for dungeons are stored here. The 4 bytes after this are the Clear Trigger Flags... when set, these flags typically cause all enemies within a room to disappear.
The 4 bytes after the Clear Trigger flags store Heart Pieces. The next 4 bytes seem to be unused, but the last 8 bytes are used by dungeon maps.

The Temp Flags sheet documents the 3 of the 4 temporary switch flags that can be preserved by Farore's Wind. These are grouped by the relative area in which they are unset. One not about the Spirit Temple; If you leave the main entrance the temp switch flags are reset. They are only preserved if you use the secondary exits.

Edit: Oh one more important thing. Because it would have been a pain in the ass to describe some 100 something rooms, I refer to dungeon rooms by their internal map number. In v1.0, the the internal map number for the current map is stored at 801DA15F. Alternatively I'd think you can also use some sort of a map viewer.


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: Jason777 on March 19, 2013, 03:03:32 AM
I've been waiting for awhile to be accepted as member to download that attachment mzx... nice work!


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: mzxrules on March 19, 2013, 07:29:08 PM
Sorry. Email has been broken for some time so it doesn't notify you when I accepted your account.


Title: Re: Ocarina of Time Event Bitflag mapping.
Post by: mzxrules on April 06, 2013, 05:32:21 AM
So I've been looking into writing a mod, and have been writing a program that can read scene/map data (a program that has helped me tremendously in understanding what causes Wrong Warping to crash). And I've been working towards a few goals, one of which is being able to determine if there are any conflicts between switch flags.

To help improve the documentation of actors, I created a printout showing where every actor is used in a scene or map file, and what values they are initialized to. And then I put it into a table.

http://www.mediafire.com/?to0bzej11nig3z4