Jump to content

CloudMax's OoT NTSC 1.0 Stuff


CloudMax
 Share

Recommended Posts

My OoT Hacking Website: http://cloudmodding.com/zelda/oot

 

Make Slingshot & Bow (+magical arrows) usable by Adult & Child Link

#FIX SLING & BOW FUNCTIONALITY FOR ADULT & CHILD
#This is the first ASM Hack I wrote.
#0x8038AD88 is the address of the instruction that sets T6 to adult/child
#If you're adult (T6==0), the game uses the bow, if you're child (T6==1), the game uses slingshot
#So we create a function to set T6 to 0 when you're using bow, and 1 when you're using slingshot, instead of using the age.#This ASM Hack will fix the Projectile Model, Ammunition Usage, and Magical Arrows, all in one go.##I write the ASM Hack to 0x80600000, so you must have 8mb RAM enabled or move it to another location.##0x801DAB73 stores what item button you last pressed with a value of 0 to 3 (B, C-Left, C-Down, C-Right)
#T0 = Save RAM offset
#We can use: T4, T6
.ORG 0x8038AD84
J code                        #This'll overwrite the T6 = Age instruction
.ORG 0x80600000
code:
LUI T4, 0x801E                #T4 = Used Button Index Offset (upper bits)
LW T4, 0xAB73(T4)             #T4 = Used Button Index
ADDIU T4, T4, 0x0068          #T4 = Used Button Item Index Offset relative to Save RAM
ADDU T4, T0, T4               #T4 = Used Button Item Index Offset
LB T4, 0x0000(T4)             #T4 = Used Item Index
ADDIU T6, R0, 0x0006          #T6 = 0x6 (Slingshot)
BEQL T4, T6, end              #If (Used Item Index == Slingshot) Execute Delay Slot & Branch to End
ADDIU T6, R0, 0x0001          #T6 = 1 (Sling)
ADDIU T6, R0, 0x0000          #T6 = 0 (Bow)
end:
J 0x8038AD8C                  #Jump back to the address after the initial Jumps delay slot
NOP
I've written a partial ASM hack so that child & adult also load different Display Lists, but since I do not know how to do Display List Porting (and I'm only doing RAM hacks at the moment), I didn't finish the code.   And here's a hack I wrote to go along with it (and also fix several "issues" with the inventory)

#Inventory Slot to Item Usability
#This ASM Hack will change the Inventory ASM to read from the Item Usability Table instead of the Slot Usability Table.
#Normally the inventory uses the Item Usability Table when setting item icon color, and Item Slot Usability Table for equipping, item name color, ammunition color and enlarging icons when they're selected. As a result, if you were to have an item that you can equip, in a slot that you can't use, you wouldn't be able to use the item.
#It also makes it possible to equip slingshot, bow & magical arrows as child & adult (to go with my other code)
##I write the ASM Hack to 0x80600100, so you must have 8mb RAM enabled or move it to another location.
##The ASM is injected after the Inventory has been loaded into to the RAM
##Overwrite:#0x8009A074 LUI A0, 0x8010#0x8009A078 LW A0, 0xE4BC(A0)
##We can use: A0, A1, A3, T0, T9#T4 + A78 = Item Usability Offset#
.ORG 0x8009A074
J 0x80600100
NOP
.ORG 0x80600100
ADDIU T0, T4, 0x0A78 #T0 = Item Usability Offset
LUI T9, 0x8012       
ADDIU T9, T9, 0xA65C #T9 = Item Offset
#CHILD & ADULT
ADDIU A0, R0, 0x0009 #A0 = 9
SB A0, 0x0003(T0)    #Bow
SB A0, 0x0004(T0)    #Fire Arrow
SB A0, 0x0006(T0)    #Sling
SB A0, 0x000C(T0)    #Ice Arrow
SB A0, 0x0012(T0)    #Light Arrow
SB A0, 0x0038(T0)    #Bow + Fire Arrow
SB A0, 0x0039(T0)    #Bow + Ice Arrow
SB A0, 0x003A(T0)    #Bow + Light Arrow
#REPLACE THE USAGE OF SLOT ID WITH ITEM ID FOR ALL CHECKS
LUI A0, 0x8039       #A0 = Check offsets
ADDIU A1, R0, 0x0186 #A1 = New Command
SB A1, 0xEA61(A0)    #Change Ammunition instructions to use Item ID instead of Slot ID
ADDIU A1, R0, 0xF13C #A1 = New Command
SB A1, 0xEA67(A0)    #Change Ammunition instructions Usability RAM offset from Slots to Items
ADDIU A1, R0, 0x0059 #A1 = New Command
SB A1, 0xFAC1(A0)    #Change Icon Enlarge instructions to use Item ID instead of Slot ID
ADDIU A1, R0, 0xF13C #A1 = New Command
SB A1, 0xFACF(A0)    #Change Icon Enlarge instructions Usability RAM offset from Slots to Items
ADDIU A1, R0, 0x018F #A1 = New Command
SB A1, 0xF609(A0)    #Change Name Color instructions Usability RAM offset from Slots to Items
ADDIU A1, R0, 0xF13C #A1 = New Command
SB A1, 0xF5EF(A0)    #Change Name Color instructions to use Item ID instead of Slot ID
#END
LUI A0, 0x8010       #Restore A0
LW A0, 0xE4BC(A0)    #Restore A0
J 0x8009A07C
  • Like 1
Link to comment
Share on other sites

Not at the moment, no. I am currently looking into the function that runs when using items, attempting to add new item functionalities. (Making Iron Boots into an item to be precise)

Maybe later on, or if the request is something I'd find interesting.

 

Edit: I've made some progress.

http://wiki.spinout182.com/w/Zelda_64:_OoT_Action_Parameters That is a list (which isn't perfectly accurate, but it is good enough) with all the existing Actions.

0x803AA6FC is the location of the Item Action table.

So I changed the byte used by Iron Boots (0x803AA6FC + 0x45) to 0x43 as that is the first unused Action ID.

Basically what I did was I added a new Action (43, as it is the first unused one).

After that I found an injection point in the function that runs the Actions and made it so that it jumps to my own function when the Action ID is higher than 42.

In there I check if the Action ID is 43, if it is, I change the equipped boots byte and jump to the end of my custom function which properly returns you into the action function.

 

Edit 2:

Managed to solve all remaining issues that I had with the code.

Link no longer put away the sword when using a custom action. (Made a minor change to the Jump that takes you back, it not set a register properly so that the code knows that it is done)

There's still one issue though (not related to my code). Iron Boots can't be used under water, the C-Button is greyed out. I'll made a hack for that too while I'm at it.

The function I'm injecting in isn't located in the static RAM either, so I'll have to make it only inject while not pausing, which is a pain... Unless it makes a jump to the static section somewhere in the function, if it does, I could easily fix it.

 

Edit 3:

Found parts of the code that makes Hookshot & Longshot usable under water. (it is hardcoded). I made it so that Iron Boots also should be usable under water, but clicking on them while under water doesn't even seem to trigger the function for using items, so there must be a code somewhere else that checks for hookshot and longshot again.

 

Edit 4:

I found the location where the game checks which action you're attempting to perform while standing under water. So I can now equip boots while standing under water.

Still need to enable them while swimming in water.

I already know where it checks if you're standing in water or swimming in water, so I should be able to enable specific items when swimming.

 

Edit 5:

Things are working. However, since parts of the code is in the Temporary RAM I'm having some trouble. I attempted to simply edit those functions by storing bytes over the function locations, but that didn't seem to work. I had to do a break in nemu to get it to update, and sometimes even that didn't work. I have no idea why this is the case, or how to solve it, so I'm stuck.

The only other issue I'm still having is the C-Button Opacity, it isn't updated properly for items that are enabled when standing under water.

  • Like 1
Link to comment
Share on other sites

I've put the Item Restriction Engine mentioned in the previous post on hold for now.

Instead I've started working more on the Custom Item Action Engine, I'm adding examples to show it off before releasing it.

So far I've made it so that the Hover & Iron Boots can be used as items.

The Bullet Bags, Quivers & Bomb Bags can also be used as items, they read how much they're able to store from the RAM, and give you that amount, then the item is removed.

Example: You have 7 bullets and can hold a total of 30 bullets.

You use the Bullet Bag on C-Right.

It'll give you 30 bullets, but since you can't hold more than 30, it'll stay at 30. (I call the Set Item Amount Function so it does all the calculations manually, I just pass the Item ID & Amount Arguments to it)

After that, the Bullet Bag on C-Right is removed, and the Inventory Slot is cleared.

 

The next thing I'm going to do is add the possibility to set Magic Requirement for actions. (Or at least try too)

Another thing I want to do (Which is low priority right now), is the ability to change what sound plays when using an item. At the moment it always play the standard sound from when you pull out an item (or a mask to be exact, but it's the same sound)

 

Note that unlike the previous ASM Hacks I wrote, I'm attempting to write a small Custom Action Framework this time around to allow people to easily create their own actions with proper documentation, assuming they know ASM.

 

Edit 1: I've added Minimum Magic Requirement & Magic Cost now. If you do not have enough, it properly plays the error sound and exits the function like any other item.

 

Edit 2: Added a function in the initial post for playing sound effects, I'll be using it to play the error sound when an item can't be used, as well as allowing you to set what sound'll play when using a specific item.

 

Edit 3: Added yet another function in the initial post. This time it's the one that'll update the amount of rupees you're gaining/loosing by the amount specified in A0, it'll be used for Rupee requirements on items.

I am almost ready to release an alpha version of the code.

  • Like 2
Link to comment
Share on other sites

Okey, here it is. This is far from done though, and do not expect it to be perfectly stable, the location I inject the code at holds other functions while in menues, so there may very well be crashes in menues and such, I haven't experienced any crashes related to the ASM Hack yet though. The ideal way would be to make the hook (or the entire code) into a ROM patch instead.

#CloudMax's Custom Action Engine Alpha v1.0#You do not have to touch anything above the functions section.#I've prepared 2 example actions:#1 for Iron & Hover Boots (Action ID 43 & 44)#This function will equip the specified boots, unless you already have them equipped, if that's the case, you will unequip them. It costs 2 magic to use.#1 for Quiver, Bullet Bag & Bomb Bag (Action ID 45 to 4D)#This function will turn the items into portable bags with ammo for the 3 different items that when used will give you the amount that specific quiver/bag can carry. It will cost 5 rupees to use.##A basic Action would look something like this:#customaction1:   #   #Setup Start (Setup is optional, if item doesn't have any requirements, just skip it)#   ADDIU T1, R0, 0x0001       #Magic Required: 0x1 (You need at least 1 magic to use the item)#   ADDIU T2, R0, 0x0001       #Magic Cost: 0x1 (Using the item will cost you 1 magic)#   ADDIU T3, R0, 0x0001       #Ammo Cost: 0x1 (I've not yet implemented this, since actions aren't actually linked to items)#   ADDIU T4, R0, 0x0001       #Health Required: 0x1 (You need at least 1 health to use the item)#   ADDIU T5, R0, 0x0001       #Rupee Cost: 0x1 (It'll cost you 1 rupee to use the item)#   JALR AT, V0                #Run the setup#   NOP#   #Setup End#   ...#   ASM Code for the specified Action#   ... #   J end                      #Function is over, jump to end#   ADDIU A0, R0, 0x0835       #Set sound to play to 0x0835 (Pull out Item)#.org 0x8038CCAC    J start    NOP    mask:    LBU T0, 0x014F(A3)         #T0 = Current Mask    ADDIU T1, A2, 0xFFC7       #T1 = Mask you're Equipping    BNEL T0, T1, 0x8038CCC8    #If Current Mask != Mask you're Equipping Execute Delay Slot and Branch to JAL        SB T1, 0x014F(A3)      #Then Equip Mask    SB R0, 0x014F(A3)          #Otherwise, Unequip Mask    JAL 0x80389284             #Return.org 0x80600300start:    SLTI T0, A2, 0x43          #Set T0 if A2 is less than 0x43    BEQ T0, R0, setup          #Branch if action is NOT less than 0x43    NOP                       J mask                     #Jump to the Mask function    NOPend:    JAL 0x800646F0             #Play sound    NOP    J 0x8038CE9C               #    LW RA, 0x0014(SP)          #unusable:    J end                      #Jump to End    ADDIU A0, R0, 0x4806       #Set sound to play to Unusable Itemsetup:    #V1 = 0x8011A5D0 (SRAM Address)    #A2 = Action ID    #RA = Default Return Address, do not change unless you know what you're doing    LI RA, end                 #Set RA to end so that it can be used at the end of a function.    ADDU T1, R0, R0            #Clear T1 for function setups    ADDU T2, R0, R0            #Clear T2 for function setups    ADDU T3, R0, R0            #Clear T3 for function setups    ADDU T4, R0, R0            #Clear T4 for function setups    ADDU T5, R0, R0            #Clear T5 for function setups    LI V0, verify              #Prepare V0 for function setup verification    B functions                #Jump to functions    NOPverify:    #AT = Return Address       Address to return to after verifying the item.    #T1 = Magic Required       You need atleast this much magic to use it.    #T2 = Magic Cost           This is the amount of magic it'll cost when using it. This'll be the required amount if it is higher than T1.    #T3 = Ammo Cost (Not added)The amount of Ammo you need to use the item, you'll also loose the same amount. (ONLY WORKS FOR ITEMS WITH AMMO)    #T4 = Health Required      The amount of health you need to use the item.    #T5 = Rupee Cost           The amount of rupees it'll cost to use the item.    #T8                        Used for verification    #T9                        Used for verification    #V1 = 0x8011A5D0           SRAM Address    #Check health    LH T8, 0x0030(V1)          #T8 = Current Health    SLT T9, T8, T4             #If (Current Health < Health Required) {T9 = 0x1} Else {T9 = 0x0}    BNE T9, R0, unusable       #Branch to unusable if you do not have enough health    NOP    #Check Magic    LB T8, 0x0033(V1)          #T8 = Current Magic    SLT T9, T8, T1             #If (Current Magic < Magic Required) {T9 = 0x1} Else {T9 = 0x0}    BNE T9, R0, unusable       #Branch to unusable if you do not have enough magic    NOP    SUB T8, T8, T2             #T8 = T8 - T2 (New Magic)    BLTZ T8, unusable          #Branch to unusable if you do not have enough magic    NOP    #Check Rupees    LH T9, 0x0034(V1)          #T9 = Current Rupees    SUB T9, T9, T5             #T9 = T9 - T5 (New Rupees)    BLTZ T9, unusable          #Branch to unusable if you do not have rupees    NOP    #Update    SB T8, 0x0033(V1)          #Current Magic = T8    JAL 0x800721CC             #Rupee Modifier Function    SUB A0, R0, T5             #Rupees to decrease by    LI RA, end                 #Set RA to end so that it can be used at the end of a function.    JR AT                      #Jump Back    NOPfunctions:    SLTI T0, A2, 0x45          #Set T0 if A2 is less than 0x45    BNE T0, R0, boots          #Branch to boots if action is less than 0x45    NOP    SLTI T0, A2, 0x4E          #Set T0 if A2 is less than 0x4E    BNE T0, R0, refill         #Branch to refill if action is less than 0x4E    NOP    B end                      #Branch to end if action doesn't exist    NOPboots:    #Setup Start    JALR AT, V0                #Verify that you can use the item    ADDIU T2, R0, 0x0002       #Magic Cost: 0x2    #Setup End    ADDIU T0, A2, 0xFFBE       #T0 = A2 - 0x42 = New Boots    LUI T1, 0x801E             #Boot Type Address (Upper Bytes)    LB A1, 0xAB6F(T1)          #A1 = Current Boots    BEQL A1, R0, updatespeed   #Execute Delay Slot and Branch if you don't have any boots equipped        SB T0, 0xAB6F(T1)      #Current Boots = T0    SB R0, 0xAB6F(T1)          #Current Boots = None    updatespeed:    LI A1, 0x801DAA30          #Required Argument    JAL 0x80079200             #Movement Speed Update Function    NOP    J end                      #Function is over, jump to end    ADDIU A0, R0, 0x0835       #Set sound to play to Pull out Itemrefill:       #Setup Start     JALR AT, V0                #Verify that you can use the item    ADDIU T5, R0, 0x0005       #Rupee Cost: 0x5    #Setup End    ADDIU T0, A2, 0xFFBC       #T0 = A2 - 0x44 = Type (1 to 9)    ADDIU A1, R0, 0x0002       #A1 = 0x2    MULTU T0, A1               #LO = T0 * 0x2    MFLO T1                    #T1 = LO (Offset used to get upgrade size)    LUI A1, 0x8010             #A1 = 0x800F0000 (Capacity Offset Upper Byte)    OR A1, A1, T1              #A1 = Capacity Global Offset    SLTIU T1, T0, 0x0004       #If T0 < 0x4 Then T1 = 1 Else T1 = 0    BEQL T1, R0, quiver        #Branch Likely if T0 isn't below 0x4        SLTIU T1, T0, 0x0007       #If T0 < 0x7 Then T1 = 1 Else T1 = 0    ADDIU A0, R0, 0x0006       #Slingshot    J setammo    LH A1, 0x8CF4(A1)          #A1 = Bullet Bag Capacity Amount    quiver:    BEQ T1, R0, bombbag        #Branch Likely if T0 isn't below 0x7    ADDIU A0, R0, 0x0003       #Bow    J setammo    LH A1, 0x8CCC(A1)          #A1 = Quiver Capacity Amount    bombbag:    ADDIU A0, R0, 0x0002       #Bomb    LH A1, 0x8CD4(A1)          #A1 = Bomb Bag Capacity Amount    setammo:    JAL 0x800721F4             #Jump to set Item Amount    NOP    J end                      #Function is over, jump to end    ADDIU A0, R0, 0x0835       #Set sound to play to Pull out Item
The ASM Hack above will only create custom actions, we still need to set items to use these specified actions.

Which Action each item will use is located at 0x803AA6FC in the RAM. So if you want to set Iron Boots to use Action 0x43 you'd write 0x43 over address 0x803AA6FC + 0x44 (iron boots ID)

For the sake of the example actions I provided, here's a code with all the proper actions set:

CheatName8=Set Item Action IDsCheatName8Count=11CheatName8Code0=803AA741 0043CheatName8Code1=803AA742 0044CheatName8Code2=803AA743 0045CheatName8Code3=803AA744 0046CheatName8Code4=803AA745 0047CheatName8Code5=803AA746 0048CheatName8Code6=803AA747 0049CheatName8Code7=803AA748 004ACheatName8Code8=803AA749 004BCheatName8Code9=803AA74A 004CCheatName8Code10=803AA74B 004D
And here's the item IDs so that you can test them out:

Iron Boots		45Hover Boots		46Bullet Bag (Holds 30)	47Bullet Bag (Holds 40)	48Bullet Bag (Holds 50)	49Quiver (Holds 30)	4AQuiver (Holds 40)	4BQuiver (Holds 50)	4CBomb Bag (Holds 20)	4DBomb Bag (Holds 30)	4EBomb Bag (Holds 40)	4F
Currently working on limiting where items can be used. (midair & while standing for now), this will only affect the action itself though, not if the item button is disabled.

After that I'll start working on Ammo support for items.

 

Edit 1:

Okay, I've added the option to disable items from being used while in midair, and while on the ground.

I accomplished this by checking for the same flag that using hookshot & longshot under water does. (It checks if link is on a surface while using them under water)

If you attempt to use an item in the air that can't be used in midair, it won't play the error sound. I set it up like this because that is the way attempting to use cutscene items in midair does.

However, if there is something else preventing the item from being use (like not enough magic for example), it'll still play the error sound. that has priority.

 

Edit 2:

I've added features that interact with the item being used now. (I get the last used item button index, then look up what item slot the button is linked with)

And with that I've added Ammo requirement to the verification, and the V0reg will be set to the item slot index after the verification for easy access.

As we all know, only the first 14 item slots in the game support item amount, so I've added in a check in the code to prevent actions that requires ammo from being used if the item is in a slot that doesn't have ammunition, ultimatelly preventing people from manipulating the RAM located directly after the Ammo.

 

I also changed which registries are used in the verification. It previously reserved T8 and T9 for calculations, now it doesn't reserve any reg (it only uses V0, which was already used for the jump), so I'll be able to add in 2 additional conditions using T8 & T9.

 

Edit 3:

I've taken a pause from the code for the time being, and decided to start patching various glitches.

 

Patch ISG (Regular method):

Set RAM 0x80079718 to 0xA0800833 (Can be injected at all time)

This will overwrite a NOP used in a function that is called in numerous situations (changing item, unpausing, putting away ocarina, dialogs, etc.) to unset the Is Attacking flag.

 

Patch being able to open chests under water after using hookshot to land at bottom of water:

Set RAM 0x803A73B0 to 0x2401FFFF (Do not inject while in the file select, this address is used by other functions at that time)

This will make it so that using hookshot/longshot doesn't remove the flag that prevents you from opening chests under water.

There may very well be a reason as to why they remove the flag when using hookshot/longshot in the first palce, so I do not know if there's any side-effects of this.

 

Patch Bottle Dupe & Ocarina Items (Jump Methods):

Set RAM 0x8038CA88 to 0xA0E0069D (Do not inject while in a menu, this address is used by other functions at that time)

The reason why Bottle Dupe & Ocarina Item work is because there's a flag telling you to use an action when you land.

This flag is not cleared when using other items afterwards while still in the air.

If you use another item while in the air and land, the game will still want to perform an action, and the result is the ocarina action.

If you press on an item that can't be used, the game will simply change the index of the last used button, and as a result you'll empty the bottle over that button index instead when landing.

The code I provided will remove the flag mentioned earlier whenever you use an item in midair and it runs the main item action function.

 

Patch Golden Scale Early:

Set RAM 0x80022BE8 to 0x3C010038

The glitch works because of collection delay. When you climb up on a ledge from water with Z-Targeting, there's a flag that i temporarily set while climbing.

However, if you exit water on a shore (a perfect transition from water to ground) while Z-Targeting, this flag is not unset after exiting water.

This is one of the flags that aren't allowed to be set while collecting an item, causing the game to delay the collection.

Now, the programmers of the game really messed up and made it so that when you delay the reward in the fishing pond, the game always store Golden Scale, and not the item you're actually supposed to get.

So I simply fixed Golden Scale early by making it so that the flag in question doesn't cause collection delay, you're allowed to pick up items even when it is set.

 

I've also tried to fix the Pause and Shield Swipe method of Bottle Dupe, but haven't succeeded yet.

  • Like 4
Link to comment
Share on other sites

I'm aware that this is a triple post, but I figured that this is something that people may find useful.

 

Scene item group & song restriction

RAM address 0x801D8BF3 to 0x801D8BFD is used as flags to disable item groups and songs in different scenes.

Item group restriction uses 0x1 to set the flags

Song restriction uses 0x3 to set the flags

0x801D8BF3 disables the B Button when set (The game uses the B button itself instead of restricting swords)

0x801D8BF4 Unused?

0x801D8BF5 Bottles

0x801D8BF6 Trade Items

0x801D8BF7 disables Hookshot & Longshot when set (The global flag has priority over this one)

0x801D8BF8 Ocarina

0x801D8BF9 Warp Songs (A dialog appears telling you that you can't warp away)

0x801D8BFA Sun's Song (Nothing happens when you play the song)

0x801D8BFB Farore's Wind (The global flag has priority over this one)

0x801D8BFC Din's Fire & Nayru's Love (The global flag has priority over this one)

0x801D8BFD Global (This is used to disable all remaining items)

These flags are set when entering a scene.

 

The game uses a item restriction scene table located at 0x800F7350 in the RAM to set these flags. (the table is ordered the same way the zelda level select is)

Table Format:

Each scene is 1 word longIDXXYYZZID = Scene IDXX = Restriction Flags    0x01, 0x02, 0x03 Bottles    0x04, 0x08, 0x0C Unused?    0x10, 0x20, 0x30 B Button    0x40, 0x80, 0xC0 Unused?YY = Restriction Flags    0x01, 0x02, 0x03 Warp Songs    0x04, 0x08, 0x0C Ocarina    0x10, 0x20, 0x30 Hookshot & Longshot    0x40, 0x80, 0xC0 Trade ItemsZZ = Restriction Flags    0x01, 0x02, 0x03 Global    0x04, 0x08, 0x0C Din's Fire & Nayru's Love    0x10, 0x20, 0x30 Farore's Wind    0x40, 0x80, 0xC0 Sun's Song
You may notice a pattern in the format that's being used. This is because you can choose to set each flag to a value from 0 to 3.

Song Flags seem to always use value 3, while item restrictions always seem to use value 1.

Item restricted appears to work when set to any number.

Song restriction appears to only work when set to 3.

 

ID1157D5 will disable everything, just like IDFFFFFF would.

 

I've also picked up my Item Restriction Engine again. The goal is to allow people to choose exactly which items that can be used in different scenes as well as different situations.

The idea is that you set up your own item restriction groups, and apply them to scenes.

So you could have an item group with ID 1 that disables dekustick & deku nuts, then you apply item group 1 to the scene, and it'll disable all the items in the group.

It will also feature slightly more "advanced" restrictions, like being able to use item while in water, or while standing under water. (this is the only part that has been implemented so far, I want to make sure that I set everything up in a good way)

 

And here's some RAM notes for hookshot & longshot:

0x8038BDA4 is the location in the RAM that branches when you attempt to use hookshot & longshot in midair. Remove the branch to allow hookshot/longshot to be used in midair.

0x8021FB44 Hookshot range (measured in time)

0x8021FB54 Longshot range (measured in time)

 

Also, here's some stuff about fishes:

I looked into it because we didn't seem to havbe proper documentation on where they're stored in savefiles, etc.

0x8011B490 (word): This is the location in the RAM where they store data related to fishing.

The size of the biggest fish you've turned in is stored as a 32bit fixed point (rounded down), with a maximum value of 0x7F (127), 7 bits. This is stored in the last byte of the word.

A fish with the size of 0x7F fills the entire fish bowl.

I didn't look much into the first 3 bytes of the word, but I did notice one of them changing when I got the golden scale, may be used as flags in the fishing pond for rewards & unlocking sinking lure?

0x801F2950 (word): This is where the game stores the size of the fish you are currently holding, it is a floating point stored as a word. It is converted to a 32bit fixed point (rounded down) when you turn it in.

 

Skulltula Token Flags:

Located at 0x8011B46C in RAM (0xE9C in a save file) and are grouped into bytes based on Dungeon/World Map location.

This is the order they're displayed in:

Deku Tree

Dodongo's Cavern

Jabu Jabu's Belly

Forest Temple

 

Fire Temple

Water Temple

Spirit Temple

Shadow Temple

 

Well or Ice Cavern

Well or Ice Cavern

Hyrule Field

Lon Lon Ranch

 

Kokiri Forest

Lost Woods

Market

Death Mountain

 

Kakariko Village

Zora's Domain

Lake Hylia

Gerudo Valley

 

Gerudo Fortress

Haunted Wasteland

Unused

Unused

 

This data is affected by endianness, so you have to reverse the order within each group.

So the 1st byte is for Forest Temple, the 5th for Shadow Temple, etc.

 

0x8039F194 is the RAM address for the Golden Skulltula Requirement Table.

This table uses the order mentioned above, but the order is NOT reversed within each group.

So the first byte which is 0x0F (4 bitflags) is used for Deku Tree, and the 5th is for Fire Temple.

When the byte in the Save Data is equal to the one in the Table, the skulltula token will appear on the Pause Screen Map.

 

Maximum Skulltula amount is hardcoded, the instruction at RAM address 0x8038AD8C is used to decide Maximum Skulltula Amount (or rather this is the number that turns the text red)

 

If you have any questions, suggestions or requests, feel free to tell me and I'll see what I can do.

 

Edit: I just noticed that I had forgot to post one of the most interesting things I've found so far. The Menu State Byte, located at 0x801D8DD5

This byte allows you to open up various menu screens by setting it to different values.

Some states are used in combination with the Selected Menu Option flag located at 0x801D8E60

I've ordered them by their uses, and not value.

Open Pause Menu:0x01 Open Pause Menu 		(Only run when a menu isn't open) 	The menu won't finish opening unless you apply the 0x06 state manually0x02 Open Pause Menu 		(Only run when a menu is open) 		The menu won't finish opening unless you apply the 0x06 state manually0x01 to 0x05 is used for the Opening process of the Pause Menu0x06 Finish Opening Pause Menu	(Only run when a menu is open) This is the state applied when in the menu, stops the menu opening statePause Menu Save Panel:0x07 Open Pause Menu Save Panel (Only run when pause menu is open) 	The game will crash if the pause menu isn't open, as this screen is a part of the pause menuClose Pause Menu:0x12 Close Menu 		(Only run when pause menu is open) 	This will close the Pause Menu. If the menu isn't available, the game will crash.0x13 is used for the Closing process of the Pause Menu, after the menu has been closed. The game will crash if this is set when a menu is still open.Open Game Over Panel:0x08 Open Game Over Panel 	(Only run when a menu isn't open) 	This will spawn the menu and open the Game Over Panel, preventing a crash0x09 Open Game Over Panel 	(Only run when a menu is open) 		This will open the Game Over Panel, causing a crash if the menu isn't already available0x08 to 0x0D is used for the Opening process of the Game Over Panel0x0E Finish Opening GO Panel 	(Only run when Game Over Panel is open)	This will instantly open up the Game Over Save Panel, causing a crash if the menu isn't already available.Game Over Panel:0x0F Saved 			(Only run when a menu is open) 		Applied after saving in game over panel, brings up "Game Saved." screen. Will crash if a menu isn't available.0x10 Open Continue / Quit Panel (Only run when a menu is open) 		This will open the Continue / Quit Panel, but doesn't load the menu, causing a crash if it isn't open.0x11 Run Continue / Quit 	(Does not require a menu) 		Uses Selected Menu Option Flag. 0x0 = Continue, 0x4 = Quit. Same effect as when normally applied.
You may notice a pattern in the opening sequences. The first value will initialize it, loading the menu. So if a menu is already loaded, you can just use the second value.

 

 

CloudMax's Text Color Engine v2 (GameShark)

This will allow you to have up to 0xA3 (163) text colors.

This engine will overwrite the entire Text Color Function used by the game, which is why the limit is 0xA1, that's all the space I had to work with.

Preview: https://dl.dropboxusercontent.com/u/6440063/OoT/ASM/custom%20colors.png

Nemu64:

CheatName17=CloudMax's Text Color Engine v2CheatName17Count=42CheatName17Code0=810D90E0 2621CheatName17Code1=810D90E2 7FFFCheatName17Code2=810D90E4 3C04CheatName17Code3=810D90E6 800DCheatName17Code4=810D90F0 0005CheatName17Code5=810D90F2 1080CheatName17Code6=810D6BA8 0082CheatName17Code7=810D6BAA 2025CheatName17Code8=810D6BAC 8082CheatName17Code9=810D6BAE 6BD0CheatName17Code10=810D6BB0 A022CheatName17Code11=810D6BB2 63DECheatName17Code12=810D6BB4 8082CheatName17Code13=810D6BB6 6BD1CheatName17Code14=810D6BB8 A022CheatName17Code15=810D6BBA 63E0CheatName17Code16=810D6BBC 8082CheatName17Code17=810D6BBE 6BD2CheatName17Code18=810D6BC0 A022CheatName17Code19=810D6BC2 63E2CheatName17Code20=810D6BC4 8082CheatName17Code21=810D6BC6 6BD3CheatName17Code22=810D6BC8 03E0CheatName17Code23=810D6BCA 0008CheatName17Code24=810D6BCC A022CheatName17Code25=810D6BCE 63E4CheatName17Code26=810D6CD0 FFFFCheatName17Code27=810D6CD2 FFFFCheatName17Code28=810D6CD4 FF3CCheatName17Code29=810D6CD6 3CFFCheatName17Code30=810D6CD8 46FFCheatName17Code31=810D6CDA 50FFCheatName17Code32=810D6CDC 506ECheatName17Code33=810D6CDE FFFFCheatName17Code34=810D6CE0 64B4CheatName17Code35=810D6CE2 FFFFCheatName17Code36=810D6CE4 D264CheatName17Code37=810D6CE6 FFFFCheatName17Code38=810D6CE8 E1FFCheatName17Code39=810D6CEA 32FFCheatName17Code40=810D6CEC 0000CheatName17Code41=810D6CEE 00FF
Clean:

810D90E0 2621810D90E2 7FFF810D90E4 3C04810D90E6 800D810D90F0 0005810D90F2 1080810D6BA8 0082810D6BAA 2025810D6BAC 8082810D6BAE 6BD0810D6BB0 A022810D6BB2 63DE810D6BB4 8082810D6BB6 6BD1810D6BB8 A022810D6BBA 63E0810D6BBC 8082810D6BBE 6BD2810D6BC0 A022810D6BC2 63E2810D6BC4 8082810D6BC6 6BD3810D6BC8 03E0810D6BCA 0008810D6BCC A022810D6BCE 63E4810D6CD0 FFFF810D6CD2 FFFF810D6CD4 FF3C810D6CD6 3CFF810D6CD8 46FF810D6CDA 50FF810D6CDC 506E810D6CDE FFFF810D6CE0 64B4810D6CE2 FFFF810D6CE4 D264810D6CE6 FFFF810D6CE8 E1FF810D6CEA 32FF810D6CEC 0000810D6CEE 00FF
Text Color Table RAM Address: 0x800D6BD0 - 0x800D6E5C

Table Entry Format:

RRGGBBAA

 

To use a color you use the regular 05 XX command with XX being the ID of the text color table entry, ranging from 0x00 to 0xA2.

The default text colors (0x40 to 0x47) has been added to the table so that the engine can be implemented smoothly.

 

CloudMax's Text Color Engine v3 (ROM Patch)

This patch is for the decompressed NTSC 1.0 ROM

The ROM Patch is superior to the RAM Hack as it contains a total of 0x92 (146) preset colors. The 8 default ones from OoT, and the rest from the X11 Color Table http://en.wikipedia.org/wiki/Web_colors#X11_color_names

Here's the Color Table with IDs included: http://pastebin.com/br9i2BXu

Preview: https://dl.dropboxusercontent.com/u/6440063/OoT/ASM/163_Colors_ROM_Patch.png

Download: http://cloudmodding.com/oot/releases/cloudmaxs_163_colors_engine.ppf

Download (Mirror): https://dl.dropboxusercontent.com/u/6440063/OoT/ASM/Patches/cloudmaxs_163_colors_engine.ppf

Text Color Table ROM Address: 0x00B4CB30 - 0x00B4CDBB

To use a color you use the regular 05 XX command with XX being the ID of the text color table entry, ranging from 0x00 to 0xA2.

 

The 4th Wallet (GameShark & ROM Patch available)

This Hack will add an additional wallet to the game.

You receive the wallet by getting a second Giant's Wallet in the game.

By default the wallet will fit 999 rupees. For that GameShark code you can change this by modifying the last line in the code.

For the ROM Patch you can change it at ROM Address 0x00B6EC52

You can get the code from here: http://cloudmodding.com/oot/

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.