Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Offset is +0x8C0 from 1.0 to 1.2
- 0x801DB498 - Hitstun byte
- 0x801DAA30 - Pointer used for loading from Link's Z targeting variable
- Also used for loading how far he has dived
- 0x801DAA54 - 3 position floats (also occasionally used as base pointer)
- 0x801DAA80 - H, L, W scalars
- 0x801DAA90 - Falling speed
- 0x801DAAB4 - Float of distance dived
- 0x801DB084 - Pointer to struct of which character Link is Z targeting for version 1.0
- 0x801DB0B4 - Pointer to struct of which character Link is Z targeting for version 1.2
- 0x801E6240 - 0x801E6430 - Ingo of Lon Lon Ranch (near beginning of game) is stored here
- 0x8008CC54 - NOP'ing this eliminates JAL to movement update routine for characters
- //////////////////////////////
- Never Drown:
- 810786A8 1400
- Never Burn to Death:
- 8107864C 1400
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //////////////////////////////
- Kill Enemies in One Hit:
- 8102839C 1400
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //////////////////////////////
- Infinite bombs:
- 801CA0EB 0000
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //////////////////////////////
- Struct Map (based on other characters):
- Size = 0x1F0
- +0x000 Word of interaction flags
- Changing to 0x01B00500 (flags for Stalkid) changes Z targeting color,
- sound effect, and A button action description
- +0x004 Unknown word
- +0x038 12 bytes: X, Z, Y position floats
- +0x050 12 bytes: Heighth, Length and Width scaling floats
- +0x05C 12 bytes: X, Z, Y speed vector floats?
- +0x098 Pointer to damage table
- NULL for NPCs
- Points to array of bytes:
- Upper nibble is unknown, written to +0x0B1
- after being right shifted by 4
- Lower nibble AND 0xF is damage to deal
- written to +0x0B0
- +0x0AE Byte of weight
- Unsigned
- 0 weight means object can be pushed around, but some objects
- have their position constantly updated
- Maximum weight (0xFF) means immobile
- Pots have 0x32 weight
- +0x0AF Byte of health
- Unsigned
- Guards and pots have 0x8 HP?!
- +0x0B0 Byte of damage to take
- Unsigned
- +0x0B1 Byte of hitstun?
- Unsigned
- +0x0B4 Word of rotation
- Only lower 16 bits are used
- +0x130 Pointer to damage routine to use
- +0x144 Weird RAM index for object data pointer fetching.
- Replacing Ingo's +0x144 with a Stalkid's
- makes Ingo warp all over the place with caved in geometry;
- Z targeting him gives the "attack" option but the sucker either won't
- take damage and/or the warping makes him too hard to hit (he's
- actually moving in a fixed circle it seems)
- This pointer seems to be related to movement data that is loaded into RAM
- +0x1CC Word of flags that are dangerous to change
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- Base pointer of annoying kid that doesn't let you leave Kokiri forest:
- 0x801EE5D0
- Press L to delete annoying kid:
- D01C84B5 0020
- 5000F802 0000
- 811EE5D0 0000
- Doesn't work because the gameshark can't overwrite that area for God knows why
- //////////////////////////////
- ;Infinite diving
- Dive infinitely:
- 811DAAB4 4200
- Freezes distance dived; doesn't work
- 0x803AAFE4 - Float of distance able to dive
- Dive infinitely:
- 813AAFE4 7F7F
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //////////////////////////////
- 0x802041D8 - Possible damage table start
- 0x802041E0 - Using above example pointer this
- would be the Kokiri sword damage byte
- 0x801DAF9C - Number of times this value must be right shifted
- to equal 1 is the index to use from damage table
- when Link hits an enemy with his sword
- 800504B4
- LBU A3, $0000 (T4) ;Loads damage to deal
- ;-------------------------------;Comes from object specific damage
- ;-------------------------------;table pointed to by (object pointer
- ;-------------------------------;+ 0x098)
- ANDI T5, A3, $000F ;Damage is only in lower 4 bits
- ;-------------------------------;Upper 4 bits appears to be hit stun?
- 8005058C
- SB T2, $00B0 (V0) ;Stores damage to deal to queue
- 80050600
- JAL 0x800503DC
- ;-------------------------------;Jump and Link to routine that
- ;-------------------------------;checks for damage collision and
- ;-------------------------------;loads/deals damage
- ;-------------------------------;Arguments are S4, S5, S2, and
- ;-------------------------------;T7 + S1
- ;A0 - 801C84A0 (Always this?)
- ;A1 - 801DA300 (Always this?)
- ;A2 - 801ED2DC (Seems to require (base pointer of object +0x294) as argument)
- ;A3 - 801ED2FC (= T7 + S1)
- ;T7 - 801ED2FC (= [S2 + 0x001C]) (Always seems to be A2 + 0x20)
- ;S1 - 00000000
- ;ZT - 80204410 (was -0x294 from S2 when obtained during damage write break)
- 80050798
- JALR RA, T9 ;Calls routine that breaches
- ;-------------------------------;0x80050600
- 0x80122E90 - Array of 0x18 byte structs containing something related
- to damage animation
- Guard in pot room uses entry 0xB2
- ;Damage all objects code
- 8004F9E0
- J 0x80400014
- LW T1, $0020 (SP) ;
- ;A0 is available
- ;Base pointer of object that is colliding with target
- ;is in T0
- ;Base pointer of object that has been collided with
- ;is in T1
- 80400014
- LUI A0, $8040 ;
- SW A1, $0000 (A0) ;
- ;SW A2, $0004 (A0) ;
- ;SW A3, $0008 (A0) ;
- ;SW V0, $000C (A0) ;
- ;SW V1, $0010 (A0) ;
- LUI A0, $801D ;
- ADDIU A0, A0, $84A0 ;
- JAL 0x80025B4C
- OR A1, T1, R0 ;
- ;-------------------------------;Exit
- Exit:
- LUI A0, $8040 ;
- LW A1, $0000 (A0) ;
- ;LW A2, $0004 (A0) ;
- ;LW A3, $0008 (A0) ;
- ;LW V0, $000C (A0) ;
- ;LW V1, $0010 (A0) ;
- J 0x8004F9E8
- LBU A0, $00AE (T1) ;
- ;Need to escape if not attacking
- ;Need to escape if target is not NPC
- ;Need to test in both directions
- ;Need manual routine to write to +0x0B0 and +0x0B1
- ;Need more info on how to index damage table
- ;Need to create custom damage table for objects with
- ;null damage table pointer
- ;Needs to call 0x80028390 (damage sub)
- ;Highlight routine is a bit screwy
- ;Need sound effect ID for NPCs taking damage/dying
- ;Needs to call death routine if HP is 0 or less
- ;Needs to deconstruct object thereafter
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //////////////////////////////
- ;In pot room as Young Link
- ;Gold Skulltula may be at 0x801E4EA0
- ;or 0x801EED40
- ;Gold Skulltula's damage routine begins at
- ;0x801EE204
- ;Guard's damage routine pointer is at
- ;0x801E3470 and points to 0x801E2F78
- ;Swapping makes the game freeze D:
- 800240CC
- LW T9, $0130 (S0) ;
- OR A0, S0, R0 ;Puts target base pointer into arg 0
- OR A1, S1, R0 ;Puts S1 into arg 1
- 800240D8
- JALR RA, T9 ;For Gold Skulltula, calls
- ;-------------------------------;routine containing 0x801EE224
- 801EC1C8
- ADDIU V1, R0, $0001 ;Sets V1 to true
- ;-------------------------------;Nested within some branches
- ;-------------------------------;Shortly before check at 0x801EC1F4
- 801EC1F4
- BEQL V1, R0, 0x801EC330
- ;-------------------------------;Instruction always executed
- ;-------------------------------;Last branch before damage routine call
- ;-------------------------------;NOP'ing makes enemies die over and over :P
- 801EC21C
- JAL 0x80028390
- ;-------------------------------;Calls damage sub, which returns
- ;-------------------------------;target's health in V0
- 801EE224
- JAL 0x801EC16C
- ;-------------------------------;Calls routine to check if target was hit
- 801EE238
- ;-------------------------------;JALR here calls routine at +0x180 of some
- ;-------------------------------;pointer (0x801EED40 for skulltula)
- ;-------------------------------;It will call the dying animation
- ;-------------------------------;(located at 0x801ED000 for skulltula)
- ;Location independent
- ;Highlight routine
- JAL 0x80027090
- ;-------------------------------;Called when a target is damaged
- ;-------------------------------;Arg 0 is base pointer of target obj
- ;-------------------------------;Arg 1 is immediate value 0x4000
- ;-------------------------------;0x4000 uses red flash, 0x0 is blue
- ;-------------------------------;Arg 2 is immediate value 0x00C8
- ;-------------------------------;Duration of flash
- ;-------------------------------;Arg 3 is immediate value 0x0000
- ;-------------------------------;Probably best not to mess with this
- ;Location independent
- ;Play sound effect routine
- JAL 0x80022FD0
- ;-------------------------------;Called when a target is damaged
- ;-------------------------------;Arg 0 is base pointer of object
- ;-------------------------------;Arg 1 is the immediate 0x386B
- ;-------------------------------;Seems to be a sound effect index
- ;-------------------------------;So using 0x386B for NPCs will make
- ;-------------------------------;them hiss like skulltulas when hit
- ;-------------------------------;0x3885 is the death cry of a GS
- ;Location independent
- ;Calls white screen flash and plays death sound effect
- ;Temporarily pauses all object movement as well
- JAL 0x80025B4C
- ;-------------------------------;Called when a target is killed
- ;-------------------------------;Arg 0 is 0x801C84A0
- ;-------------------------------;Arg 1 is base pointer of object
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
- //////////////////////////////
- Test of making guard routine jump to check if hit routine of skulltula
- instead of his own sub
- 801E2FB4: 0C07B05B
- 801E2FB8: 8FA50024
- 801E2FC4: 8E221C44
- Results:
- - Doesn't let you hit guard
- - "Attacking" guard by skipping branches that exit routine that checks if guard was
- hit will "hit" him, make him flash red, play the dying skulltula animation,
- make him jiggle in place quickly and indefinitely
- Code to kill guard infinitely after above patch:
- 811EC1B0 1400
- 811EC1BC 1400
- 811EC1D4 1400
- Test of making guard dissipate like a golden skulltula:
- 801E2FB4: 0C07B400
- 801E2FB8: 8FA50024
- 801E2FC4: 8E221C44
- Results:
- - Nothing D:
- - Except it seems to be returning wrong O_o
- 0x8004F9D0 - Read of +0x0AE that occurs when any objects collide
- 0x8004F9E4 - Similar to above (same routine :P)
- ;Pots get their 0x32 weight from here
- 803A08F4
- ADDIU T4, R0, $0032 ;This code might not be static
- ADDIU T3, R0, $00FF ;Might be for general objects
- Pushable Pots:
- 813A08F6 0000
- Code doesn't work, but it does set weight to 0 for all pots
- Weightless objects:
- 8104F9D0 2404
- 8104F9D2 0000
- 8104F9E4 2404
- 8104F9E6 0000
- Allows you to push many objects (but lots of the fun ones
- can't be moved; probably have static position updates)
- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
Advertisement
Add Comment
Please, Sign In to add comment