Guest User

Hextator

a guest
Sep 11th, 2008
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.07 KB | None | 0 0
  1. Offset is +0x8C0 from 1.0 to 1.2
  2.  
  3. 0x801DB498 - Hitstun byte
  4.  
  5. 0x801DAA30 - Pointer used for loading from Link's Z targeting variable
  6. Also used for loading how far he has dived
  7. 0x801DAA54 - 3 position floats (also occasionally used as base pointer)
  8. 0x801DAA80 - H, L, W scalars
  9. 0x801DAA90 - Falling speed
  10. 0x801DAAB4 - Float of distance dived
  11. 0x801DB084 - Pointer to struct of which character Link is Z targeting for version 1.0
  12. 0x801DB0B4 - Pointer to struct of which character Link is Z targeting for version 1.2
  13.  
  14. 0x801E6240 - 0x801E6430 - Ingo of Lon Lon Ranch (near beginning of game) is stored here
  15.  
  16. 0x8008CC54 - NOP'ing this eliminates JAL to movement update routine for characters
  17.  
  18. //////////////////////////////
  19. Never Drown:
  20.  
  21. 810786A8 1400
  22.  
  23. Never Burn to Death:
  24.  
  25. 8107864C 1400
  26. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  27.  
  28. //////////////////////////////
  29. Kill Enemies in One Hit:
  30.  
  31. 8102839C 1400
  32. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  33.  
  34. //////////////////////////////
  35. Infinite bombs:
  36.  
  37. 801CA0EB 0000
  38. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  39.  
  40. //////////////////////////////
  41. Struct Map (based on other characters):
  42.  
  43. Size = 0x1F0
  44.  
  45. +0x000 Word of interaction flags
  46. Changing to 0x01B00500 (flags for Stalkid) changes Z targeting color,
  47. sound effect, and A button action description
  48. +0x004 Unknown word
  49. +0x038 12 bytes: X, Z, Y position floats
  50. +0x050 12 bytes: Heighth, Length and Width scaling floats
  51. +0x05C 12 bytes: X, Z, Y speed vector floats?
  52. +0x098 Pointer to damage table
  53. NULL for NPCs
  54. Points to array of bytes:
  55. Upper nibble is unknown, written to +0x0B1
  56. after being right shifted by 4
  57. Lower nibble AND 0xF is damage to deal
  58. written to +0x0B0
  59. +0x0AE Byte of weight
  60. Unsigned
  61. 0 weight means object can be pushed around, but some objects
  62. have their position constantly updated
  63. Maximum weight (0xFF) means immobile
  64. Pots have 0x32 weight
  65. +0x0AF Byte of health
  66. Unsigned
  67. Guards and pots have 0x8 HP?!
  68. +0x0B0 Byte of damage to take
  69. Unsigned
  70. +0x0B1 Byte of hitstun?
  71. Unsigned
  72. +0x0B4 Word of rotation
  73. Only lower 16 bits are used
  74. +0x130 Pointer to damage routine to use
  75. +0x144 Weird RAM index for object data pointer fetching.
  76. Replacing Ingo's +0x144 with a Stalkid's
  77. makes Ingo warp all over the place with caved in geometry;
  78. Z targeting him gives the "attack" option but the sucker either won't
  79. take damage and/or the warping makes him too hard to hit (he's
  80. actually moving in a fixed circle it seems)
  81. This pointer seems to be related to movement data that is loaded into RAM
  82. +0x1CC Word of flags that are dangerous to change
  83. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  84.  
  85. Base pointer of annoying kid that doesn't let you leave Kokiri forest:
  86.  
  87. 0x801EE5D0
  88.  
  89. Press L to delete annoying kid:
  90.  
  91. D01C84B5 0020
  92. 5000F802 0000
  93. 811EE5D0 0000
  94.  
  95. Doesn't work because the gameshark can't overwrite that area for God knows why
  96.  
  97. //////////////////////////////
  98. ;Infinite diving
  99.  
  100. Dive infinitely:
  101.  
  102. 811DAAB4 4200
  103.  
  104. Freezes distance dived; doesn't work
  105.  
  106. 0x803AAFE4 - Float of distance able to dive
  107.  
  108. Dive infinitely:
  109.  
  110. 813AAFE4 7F7F
  111. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  112.  
  113. //////////////////////////////
  114. 0x802041D8 - Possible damage table start
  115. 0x802041E0 - Using above example pointer this
  116. would be the Kokiri sword damage byte
  117. 0x801DAF9C - Number of times this value must be right shifted
  118. to equal 1 is the index to use from damage table
  119. when Link hits an enemy with his sword
  120.  
  121. 800504B4
  122. LBU A3, $0000 (T4) ;Loads damage to deal
  123. ;-------------------------------;Comes from object specific damage
  124. ;-------------------------------;table pointed to by (object pointer
  125. ;-------------------------------;+ 0x098)
  126. ANDI T5, A3, $000F ;Damage is only in lower 4 bits
  127. ;-------------------------------;Upper 4 bits appears to be hit stun?
  128.  
  129. 8005058C
  130. SB T2, $00B0 (V0) ;Stores damage to deal to queue
  131.  
  132. 80050600
  133. JAL 0x800503DC
  134. ;-------------------------------;Jump and Link to routine that
  135. ;-------------------------------;checks for damage collision and
  136. ;-------------------------------;loads/deals damage
  137. ;-------------------------------;Arguments are S4, S5, S2, and
  138. ;-------------------------------;T7 + S1
  139. ;A0 - 801C84A0 (Always this?)
  140. ;A1 - 801DA300 (Always this?)
  141. ;A2 - 801ED2DC (Seems to require (base pointer of object +0x294) as argument)
  142. ;A3 - 801ED2FC (= T7 + S1)
  143. ;T7 - 801ED2FC (= [S2 + 0x001C]) (Always seems to be A2 + 0x20)
  144. ;S1 - 00000000
  145. ;ZT - 80204410 (was -0x294 from S2 when obtained during damage write break)
  146.  
  147. 80050798
  148. JALR RA, T9 ;Calls routine that breaches
  149. ;-------------------------------;0x80050600
  150.  
  151. 0x80122E90 - Array of 0x18 byte structs containing something related
  152. to damage animation
  153. Guard in pot room uses entry 0xB2
  154.  
  155. ;Damage all objects code
  156. 8004F9E0
  157. J 0x80400014
  158. LW T1, $0020 (SP) ;
  159.  
  160. ;A0 is available
  161. ;Base pointer of object that is colliding with target
  162. ;is in T0
  163. ;Base pointer of object that has been collided with
  164. ;is in T1
  165. 80400014
  166. LUI A0, $8040 ;
  167. SW A1, $0000 (A0) ;
  168. ;SW A2, $0004 (A0) ;
  169. ;SW A3, $0008 (A0) ;
  170. ;SW V0, $000C (A0) ;
  171. ;SW V1, $0010 (A0) ;
  172.  
  173. LUI A0, $801D ;
  174. ADDIU A0, A0, $84A0 ;
  175. JAL 0x80025B4C
  176. OR A1, T1, R0 ;
  177.  
  178. ;-------------------------------;Exit
  179. Exit:
  180. LUI A0, $8040 ;
  181. LW A1, $0000 (A0) ;
  182. ;LW A2, $0004 (A0) ;
  183. ;LW A3, $0008 (A0) ;
  184. ;LW V0, $000C (A0) ;
  185. ;LW V1, $0010 (A0) ;
  186. J 0x8004F9E8
  187. LBU A0, $00AE (T1) ;
  188.  
  189. ;Need to escape if not attacking
  190. ;Need to escape if target is not NPC
  191. ;Need to test in both directions
  192. ;Need manual routine to write to +0x0B0 and +0x0B1
  193. ;Need more info on how to index damage table
  194. ;Need to create custom damage table for objects with
  195. ;null damage table pointer
  196. ;Needs to call 0x80028390 (damage sub)
  197. ;Highlight routine is a bit screwy
  198. ;Need sound effect ID for NPCs taking damage/dying
  199. ;Needs to call death routine if HP is 0 or less
  200. ;Needs to deconstruct object thereafter
  201. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  202.  
  203. //////////////////////////////
  204. ;In pot room as Young Link
  205. ;Gold Skulltula may be at 0x801E4EA0
  206. ;or 0x801EED40
  207. ;Gold Skulltula's damage routine begins at
  208. ;0x801EE204
  209. ;Guard's damage routine pointer is at
  210. ;0x801E3470 and points to 0x801E2F78
  211. ;Swapping makes the game freeze D:
  212.  
  213. 800240CC
  214. LW T9, $0130 (S0) ;
  215. OR A0, S0, R0 ;Puts target base pointer into arg 0
  216. OR A1, S1, R0 ;Puts S1 into arg 1
  217. 800240D8
  218. JALR RA, T9 ;For Gold Skulltula, calls
  219. ;-------------------------------;routine containing 0x801EE224
  220.  
  221. 801EC1C8
  222. ADDIU V1, R0, $0001 ;Sets V1 to true
  223. ;-------------------------------;Nested within some branches
  224. ;-------------------------------;Shortly before check at 0x801EC1F4
  225.  
  226. 801EC1F4
  227. BEQL V1, R0, 0x801EC330
  228. ;-------------------------------;Instruction always executed
  229. ;-------------------------------;Last branch before damage routine call
  230. ;-------------------------------;NOP'ing makes enemies die over and over :P
  231.  
  232. 801EC21C
  233. JAL 0x80028390
  234. ;-------------------------------;Calls damage sub, which returns
  235. ;-------------------------------;target's health in V0
  236.  
  237. 801EE224
  238. JAL 0x801EC16C
  239. ;-------------------------------;Calls routine to check if target was hit
  240.  
  241. 801EE238
  242. ;-------------------------------;JALR here calls routine at +0x180 of some
  243. ;-------------------------------;pointer (0x801EED40 for skulltula)
  244. ;-------------------------------;It will call the dying animation
  245. ;-------------------------------;(located at 0x801ED000 for skulltula)
  246.  
  247. ;Location independent
  248. ;Highlight routine
  249. JAL 0x80027090
  250. ;-------------------------------;Called when a target is damaged
  251. ;-------------------------------;Arg 0 is base pointer of target obj
  252. ;-------------------------------;Arg 1 is immediate value 0x4000
  253. ;-------------------------------;0x4000 uses red flash, 0x0 is blue
  254. ;-------------------------------;Arg 2 is immediate value 0x00C8
  255. ;-------------------------------;Duration of flash
  256. ;-------------------------------;Arg 3 is immediate value 0x0000
  257. ;-------------------------------;Probably best not to mess with this
  258.  
  259. ;Location independent
  260. ;Play sound effect routine
  261. JAL 0x80022FD0
  262. ;-------------------------------;Called when a target is damaged
  263. ;-------------------------------;Arg 0 is base pointer of object
  264. ;-------------------------------;Arg 1 is the immediate 0x386B
  265. ;-------------------------------;Seems to be a sound effect index
  266. ;-------------------------------;So using 0x386B for NPCs will make
  267. ;-------------------------------;them hiss like skulltulas when hit
  268. ;-------------------------------;0x3885 is the death cry of a GS
  269.  
  270. ;Location independent
  271. ;Calls white screen flash and plays death sound effect
  272. ;Temporarily pauses all object movement as well
  273. JAL 0x80025B4C
  274. ;-------------------------------;Called when a target is killed
  275. ;-------------------------------;Arg 0 is 0x801C84A0
  276. ;-------------------------------;Arg 1 is base pointer of object
  277. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  278.  
  279. //////////////////////////////
  280. Test of making guard routine jump to check if hit routine of skulltula
  281. instead of his own sub
  282.  
  283. 801E2FB4: 0C07B05B
  284. 801E2FB8: 8FA50024
  285. 801E2FC4: 8E221C44
  286.  
  287. Results:
  288.  
  289. - Doesn't let you hit guard
  290. - "Attacking" guard by skipping branches that exit routine that checks if guard was
  291. hit will "hit" him, make him flash red, play the dying skulltula animation,
  292. make him jiggle in place quickly and indefinitely
  293.  
  294. Code to kill guard infinitely after above patch:
  295.  
  296. 811EC1B0 1400
  297. 811EC1BC 1400
  298. 811EC1D4 1400
  299.  
  300. Test of making guard dissipate like a golden skulltula:
  301.  
  302. 801E2FB4: 0C07B400
  303. 801E2FB8: 8FA50024
  304. 801E2FC4: 8E221C44
  305.  
  306. Results:
  307.  
  308. - Nothing D:
  309. - Except it seems to be returning wrong O_o
  310.  
  311. 0x8004F9D0 - Read of +0x0AE that occurs when any objects collide
  312. 0x8004F9E4 - Similar to above (same routine :P)
  313.  
  314. ;Pots get their 0x32 weight from here
  315.  
  316. 803A08F4
  317. ADDIU T4, R0, $0032 ;This code might not be static
  318. ADDIU T3, R0, $00FF ;Might be for general objects
  319.  
  320. Pushable Pots:
  321.  
  322. 813A08F6 0000
  323.  
  324. Code doesn't work, but it does set weight to 0 for all pots
  325.  
  326. Weightless objects:
  327.  
  328. 8104F9D0 2404
  329. 8104F9D2 0000
  330.  
  331. 8104F9E4 2404
  332. 8104F9E6 0000
  333.  
  334. Allows you to push many objects (but lots of the fun ones
  335. can't be moved; probably have static position updates)
  336. \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  337.  
Advertisement
Add Comment
Please, Sign In to add comment