Advertisement
Guest User

Untitled

a guest
Jun 15th, 2017
10,994
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .org 0x861c0
  2. !start:
  3. addiu sp, sp, $ffe8
  4. sw ra, $14 (SP)
  5. lui a1, $8034
  6. lh a0, $afa0 (A1)
  7. andi a0, a0, $0020
  8. beq a0, r0, !end
  9. nop
  10. lui v1, $8037
  11. lw t1, $0000 (v1)
  12. bne t1, r0, !end
  13. nop
  14. lbu t2, $b177 (a1)
  15. andi t2, t2, $0010
  16. beq t2, r0, !end
  17. nop
  18. lui a0, $8036
  19. lw a0, $1160 (A0)
  20. addiu a1, r0, $0088
  21. lui a2, $1300
  22. jal $29edcc
  23. ori a2, a2, $0278
  24. lwc1 f2, $00a4 (V0)
  25. lui at, $42e8
  26. mtc1 at, f4
  27. add.s f2, f2, f4
  28. swc1 f2, $00a4 (V0)
  29. sw v0, $0000 (v1)
  30. lui t1, $8034
  31. lbu t2, $b177 (t1)
  32. andi t2, t2, $FFEF
  33. sb t2, $b177 (T1)
  34. lui at, $41f0
  35. mtc1 at, f2
  36. lwc1 f12, $b1c4 (T1)
  37. add.s f2, f2, f12
  38. swc1 f2, $00b8 (V0)
  39.  
  40. !end:
  41. jal $2C5DC0
  42. nop
  43. lw ra, $14 (SP)
  44. jr ra
  45. addiu sp, sp, $0018
  46.  
  47. //make collision 0x400000000 intangible during this
  48. //2C5DC0 to 2C5F48
  49. //lookup table at 2B 2D 10 (6DD10) behavior offset in bank 13 height as float
  50. //fix being grabable and colliding with normal collision
  51. //cheep cheep 220C in DDD
  52. .org 0x80DC0
  53. !ntrolsomething:
  54. addiu sp, sp, $ffe8
  55. sw ra, $14 (SP)
  56. lui t0, $8037
  57. lw t1, $0004 (T0)
  58. beq t1, r0, !endofcntrolsomething
  59. nop
  60. lui t3, $8034
  61. lhu t5, $afa0 (T3)
  62. andi t5, t5, $1fff
  63. sh t5, $afa0 (T3)
  64. lhu t5, $afa2 (T3)
  65. andi t5, t5, $1fff
  66. sh t5, $afa2 (T3)
  67.  
  68. lw t2, $0000 (T0)
  69. bne t2, r0, !nonewhatspawnhat
  70. nop
  71. addiu a1, r0, $0088
  72. lui a0, $8036
  73. lw a0, $1158 (A0)
  74. lui a2, $1300
  75. jal $29edcc
  76. ori a2, a2, $2a48
  77. lui t0, $8037
  78. sw v0, $0000 (T0)
  79. !nonewhatspawnhat:
  80. lw t4, $0004 (T0)
  81. lh t5, $0074 (T4)
  82. beq t5, r0, !enditasnoifnasuof
  83. nop
  84. lw t5, $0120 (T4)
  85. beq t5, r0, !enditasnoifnasuof
  86. nop
  87. lui a0, $8034
  88. lh a1, $afa0 (a0)
  89. andi a2, a1, $0020
  90. beq a2, r0, !dontendityet
  91. nop
  92. !enditasnoifnasuof:
  93. lw t1, $0000 (T0)
  94. sh r0, $0074 (T1)
  95. sw r0, $0000 (T0)
  96. sw r0, $0004 (T0)
  97. jal $2a04c0
  98. addiu a0, r0, $0001
  99. lui t0, $8034
  100. lbu t2, $b177 (T0)
  101. ori t2, t2, $0010
  102. sb t2, $b177 (T0)
  103. beq r0, r0, !endofcntrolsomething
  104. nop
  105. !dontendityet:
  106. lui t3, $8037
  107. lw t2, $0000 (T3)
  108. lw t1, $0004 (T3)
  109. addiu at, r0, $ff
  110. sw at, $017c (T2)
  111.  
  112. lui t0, $8034
  113. lw a0, $00a0 (T1)
  114. sw a0, $b1ac (t0)
  115. sw a0, $00a0 (T2)
  116.  
  117. lwc1 f2, $00a4 (T1)
  118. lw t5, $20c (T1)
  119. lui a3, $802b
  120. ori a3, a3, $2d10
  121. addiu a2, a3, $0098
  122. !lookuplook:
  123. lwc1 f4, $0004 (A3)
  124. lw t7, $0000 (A3)
  125. beq t7, t5, !endoflasfnuiasbuhfbzuasfbzuasbzuhf
  126. nop
  127. addiu a3, a3, $8
  128. bne a2, a3, !lookuplook
  129. nop
  130. !endoflasfnuiasbuhfbzuasfbzuasbzuhf:
  131. swc1 f2, $b1b0 (t0)
  132. add.s f2, f2, f4
  133. swc1 f2, $00a4 (T2)
  134.  
  135. lw a0, $00a8 (T1)
  136. sw a0, $b1b4 (t0)
  137. sw a0, $00a8 (T2)
  138.  
  139. lw t8, $00c8 (T1)
  140. sw t8, $00d4 (T2)
  141.  
  142. addiu at, r0, $000f
  143. sh at, $b196 (T0)
  144.  
  145.  
  146.  
  147.  
  148. !endofcntrolsomething:
  149. lw ra, $14 (SP)
  150. jr ra
  151. addiu sp, sp, $18
  152.  
  153.  
  154. .org 0xA57E0
  155. !tangible:
  156. addiu sp, sp, $ffe8
  157. sw ra, $14 (SP)
  158. addiu a0, v1, $00a0
  159. lui a1, $4348
  160. JAL $80251A48
  161. lui a2, $42c8
  162. lw t0, $014c (V1)
  163. bne t0, r0, !skiprotate
  164. nop
  165. lw t0, $0154 (V1)
  166. bne t0, r0, !skiprotate
  167. nop
  168. lui t0, $8034
  169. lw t1, $b17c (T0)
  170. lui a0, $0100
  171. ori a0, a0, $0887
  172. bne t1, a0, !skiprotate
  173. nop
  174. lw t0, $00c8 (V1)
  175. addiu t0, t0, $8000
  176. sw t0, $00c8 (V1)
  177. !skiprotate:
  178. LWC1 F12, $00A0 (V1)
  179. LWC1 F10, $00A4 (V1)
  180. LW A2, $00A8 (V1)
  181. LUI AT, $4348
  182. MTC1 AT, F16
  183. JAL $80381794
  184. ADD.S F14, F10, F16
  185. lwc1 f2, $00a4 (V1)
  186. lui at, $4248
  187. mtc1 at, f4
  188. sub.s f2, f2, f4
  189. c.lt.s f2, f0
  190. nop
  191. bc1f !tangibleend
  192. nop
  193. add.s f0, f0, f4
  194. SWC1 F0, $00A4 (V1)
  195.  
  196. !tangibleend:
  197. lw ra, $14 (SP)
  198. jr ra
  199. addiu sp, sp, $0018
  200.  
  201.  
  202. //2aedc0 to 02AEF1C
  203. .org 0x69DC0
  204. !checkcollisionwithasdfuiasbu9df:
  205. addiu sp, sp, $ffe8
  206. sw ra, $14 (SP)
  207. lw t0, $014c (V1)
  208. bne t0, r0, !skipthisfirstcheckything
  209. nop
  210. lui t2, $8034
  211. lhu t2, $b196 (T2)
  212. bne t2, r0, !endofobjectcheck
  213. nop
  214. !skipthisfirstcheckything:
  215. lui a0, $8033
  216. ori a0, a0, $d488
  217. lui a1, $8036
  218. ori a1, a1, $0e88
  219. !targetloop:
  220. addiu v0, r0, $0000
  221. lw t2, $0130 (A0)
  222. addiu at, r0, $0010
  223. beq t2, at, !coinjoindistance
  224. nop
  225. addiu v0, r0, $0001
  226. lw t2, $0120 (A0)
  227. beq t2, r0, !endofloop
  228. nop
  229. !coinjoindistance:
  230. lwc1 f2, $00a0 (A0)
  231. lwc1 f12, $00a0 (V1)
  232. lwc1 f4, $00a4 (A0)
  233. lwc1 f14, $00a4 (V1)
  234. lwc1 f6, $00a8 (A0)
  235. lwc1 f16, $00a8 (V1)
  236. sub.s f2, f2, f12
  237. sub.s f4, f4, f14
  238. sub.s f6, f6, f16
  239. mul.s f2, f2, f2
  240. mul.s f4, f4, f4
  241. mul.s f6, f6, f6
  242. add.s f2, f2, f4
  243. add.s f12, f2, f6
  244. sqrt.s f12, f12
  245. lui at, $437a
  246. mtc1 at, f4
  247. c.lt.s f12, f4
  248. nop
  249. bc1f !endofloop
  250. nop
  251. beq v0, r0, !docoinstuff
  252. nop
  253. lui at, $8036
  254. lw v0, $1158 (At)
  255. sw r0, $0014 (V0)
  256. sh r0, $0074 (V1)
  257. lui t0, $8037
  258. sw r0, $0000 (T0)
  259. sw a0, $0004 (T0)
  260. beq r0, r0, !endofobjectcheck
  261. nop
  262. beq r0, r0, !endofloop
  263. nop
  264. !docoinstuff:
  265. lui at, $8036
  266. lw v0, $1158 (At)
  267. lw at, $00a0 (a0)
  268. sw at, $00a0 (V0)
  269. lw at, $00a4 (a0)
  270. sw at, $00a4 (V0)
  271. lw at, $00a8 (a0)
  272. sw at, $00a8 (V0)
  273. !endofloop:
  274. addiu a0, a0, $260
  275. bne a0, a1, !targetloop
  276. nop
  277.  
  278.  
  279. !endofobjectcheck:
  280. lw ra, $14 (SP)
  281. jr ra
  282. addiu sp, sp, $0018
  283.  
  284.  
  285.  
  286. .org 0x6316c
  287. !hat:
  288. addiu sp, sp, $ffe8
  289. sw ra, $14 (SP)
  290. lui v1, $8036
  291. jal $2aedc0
  292. lw v1, $1160 (V1)
  293. jal $2EA7E0
  294. nop
  295. addiu at, r0, $ffff
  296. sw at, $009c (V1)
  297. lw t0, $014c (V1)
  298. beq t0, r0, !moveforward
  299. nop
  300. addiu at, r0, $1
  301. beq at, t0, !wait
  302. nop
  303. !moveback:
  304. lw t0, $0154 (V1)
  305. mtc1 t0, f4
  306. cvt.s.w f4, f4
  307. lui at, $4080
  308. mtc1 at, f6
  309. div.s f6, f4, f6
  310.  
  311. lui at, $3da3
  312. mtc1 at, f4
  313. mul.s f4, f4, f6
  314. lui t0, $8034
  315. lwc1 f2, $00a0 (V1)
  316. lwc1 f12, $b1ac (t0)
  317. sub.s f12, f12, f2
  318. mul.s f12, f12, f4
  319. add.s f2, f2, f12
  320. swc1 f2, $00a0 (V1)
  321.  
  322. lwc1 f2, $00a4 (V1)
  323. lwc1 f12, $b1b0 (t0)
  324. lui at, $42e8
  325. mtc1 at, f0
  326. add.s f12, f12, f0
  327.  
  328.  
  329. sub.s f12, f12, f2
  330. mul.s f12, f12, f4
  331. add.s f2, f2, f12
  332. swc1 f2, $00a4 (V1)
  333.  
  334. lwc1 f2, $00a8 (V1)
  335. lwc1 f12, $b1b4 (t0)
  336. sub.s f12, f12, f2
  337. mul.s f12, f12, f4
  338. add.s f2, f2, f12
  339. swc1 f2, $00a8 (V1)
  340.  
  341.  
  342. lwc1 f2, $002c (V1)
  343. lui at, $3f80
  344. mtc1 at, f12
  345. sub.s f12, f12, f2
  346. mul.s f12, f12, f4
  347. add.s f2, f2, f12
  348. swc1 f2, $002c (V1)
  349. swc1 f2, $0034 (V1)
  350.  
  351.  
  352.  
  353.  
  354. lwc1 f2, $015c (V1)
  355. lui at, $4308
  356. mtc1 at, f4
  357. c.lt.s f2, f4
  358. nop
  359. bc1f !endhattttdshsd
  360. nop
  361. lui t1, $8034
  362. lbu t2, $b177 (T1)
  363. ori t2, t2, $0010
  364. sb t2, $b177 (T1)
  365. sh r0, $0074 (V1)
  366. lui t2, $8037
  367. sw r0, $0000 (T2)
  368. beq r0, r0, !endhattttdshsd
  369. nop
  370. !wait:
  371. sw r0, $00b8 (V1)
  372. lw t0, $0154 (V1)
  373. addiu at, r0, $20
  374. bne at, t0, !endhat
  375. nop
  376. addiu at, r0, $2
  377. sw at, $014c (V1)
  378. beq r0, r0, !endhat
  379. nop
  380. !moveforward:
  381. lui at, $3c23
  382. mtc1 at, f4
  383. lui t0, $8034
  384. lwc1 f2, $00a4 (V1)
  385. lwc1 f12, $b1b0 (t0)
  386. sub.s f12, f12, f2
  387. mul.s f12, f12, f4
  388. add.s f2, f2, f12
  389. swc1 f2, $00a4 (V1)
  390.  
  391. lwc1 f2, $002c (V1)
  392. lui at, $3d00
  393. mtc1 at, f4
  394. add.s f2, f2, f4
  395. swc1 f2, $002c (V1)
  396. swc1 f2, $0034 (V1)
  397.  
  398.  
  399. lw t0, $0154 (V1)
  400. lwc1 f4, $00b8 (V1)
  401. lui at, $3f77
  402. mtc1 at, f2
  403. mul.s f4, f4, f2
  404. swc1 f4, $00b8 (V1)
  405. slti at, t0, $0006
  406. bne at, r0, !endhattttdshsd
  407. nop
  408. addiu at, r0, $001d
  409. bne t0, at, !endhat
  410. nop
  411. addiu at, r0, $1
  412. sw at, $014c (V1)
  413. !endhat:
  414. jal $2B25AC
  415. nop
  416.  
  417. !endhattttdshsd:
  418. jal $2a1308
  419. nop
  420. jal $29f070
  421. nop
  422. lw t0, $00d4 (V1)
  423. addiu t0, t0, $1100
  424. sw t0, $00d4 (V1)
  425. lw t0, $0154 (V1)
  426. andi t0, t0, $1
  427. beq t0, r0, !realend
  428. nop
  429. or a0, v1, r0
  430. addiu a1, r0, $0
  431. lui a2, $1300
  432. jal $29edcc
  433. ori a2, a2, $2Af0
  434. !realend:
  435. lw ra, $14 (SP)
  436. jr ra
  437. addiu sp, sp, $0018
  438.  
  439.  
  440. .org 0x6D5AC
  441. !othercheck:
  442. addiu sp, sp, $ffe8
  443. sw ra, $14 (SP)
  444. lw t1, $0180 (V1)
  445. bne t1, r0, !endotheruasbfu
  446. nop
  447. lui a0, $8036
  448. lw a1, $1158 (A0)
  449. jal $29E27C
  450. lw a0, $1160 (A0)
  451. lui at, $42a8
  452. mtc1 at, f2
  453. c.lt.s f0, f2
  454. nop
  455. bc1f !endotheruasbfu
  456. nop
  457. lwc1 f2, $00a4 (V1)
  458. lui a0, $8036
  459. lw a1, $1158 (A0)
  460. lwc1 f12, $00a4 (a1)
  461. sub.s f2, f2, f12
  462. abs.s f2, f2
  463. lui at, $41f0
  464. mtc1 at, f4
  465. c.lt.s f2, f4
  466. nop
  467. bc1f !endotheruasbfu
  468. nop
  469. addiu at, r0, $0001
  470. sw at, $0180 (V1)
  471. lui t0, $8034
  472. lui t1, $4260
  473. sw t1, $b1bc (T0)
  474. lui a0, $0300
  475. ori a0, a0, $0881
  476. sw a0, $b17c (T0)
  477. lui a0, $307c
  478. jal $2ca144
  479. ori a0, a0, $0081
  480.  
  481.  
  482. !endotheruasbfu:
  483. lui v1, $8036
  484. lw v1, $1160 (V1)
  485. lw ra, $14 (SP)
  486. jr ra
  487. addiu sp, sp, $0018
  488.  
  489. .org 0xFB3A0
  490. !hotfix:
  491. lui t6, $8039
  492. lw t7, $b8b0 (T6)
  493. addiu t7,t7, $fffc
  494. sw t7, $b8b0 (T6)
  495. lw t8, $0000 (T7)
  496. sw t8, $be28 (T6)
  497. lui t0, $8037
  498. sw r0, $0004 (T0)
  499. jr ra
  500. sw r0, $0000 (T0)
  501.  
  502.  
  503.  
  504. //hex behavior of new chest at 021A078
  505. //00 04 00 00 11 01 00 41 0E 2A 00 02 10 3D 00 FF 10 05 00 00 08 00 00 00 0C 00 00 00 80 2A 81 6C 09 00 00 00
  506.  
  507.  
  508.  
  509.  
  510. .org 0x9778
  511. !fixnormalcollision:
  512. ADDIU SP, SP, 0xFFE8
  513. SW RA, 0x0014 (SP)
  514. lui t0, $8037
  515. lw t0, $0004 (T0)
  516. bne t0, r0, !endnormalcollision
  517. nop
  518. SW A0, 0x0018 (SP)
  519. SW A1, 0x001C (SP)
  520. SW A2, 0x0020 (SP)
  521. LW T6, 0x0020 (SP)
  522. LW T7, 0x0018 (SP)
  523. SW T6, 0x0078 (T7)
  524. LW T8, 0x0020 (SP)
  525. LW T9, 0x0018 (SP)
  526. SW T8, 0x0080 (T9)
  527. LW A0, 0x0018 (SP)
  528. LW A1, 0x0020 (SP)
  529. JAL 0x8024D578
  530. LUI A2, 0x40A0
  531. !endnormalcollision:
  532. LW RA, 0x0014 (SP)
  533. JR RA
  534. ADDIU SP, SP, 0x0018
  535.  
  536.  
  537. .org 0xB198
  538. !fixtalkcollision:
  539. ADDIU SP, SP, 0xFFE0
  540. SW RA, 0x0014 (SP)
  541. SW A0, 0x0020 (SP)
  542. SW A1, 0x0024 (SP)
  543. SW A2, 0x0028 (SP)
  544. SW R0, 0x001C (SP)
  545. lui t0, $8037
  546. lw t0, $0004 (T0)
  547. bne t0, r0, !talkend
  548. nop
  549. LW T6, 0x0028 (SP)
  550. LW T7, 0x0190 (T6)
  551. ANDI T8, T7, 0x1000
  552. BEQ T8, R0, !labeltalk1
  553. NOP
  554. LW A0, 0x0020 (SP)
  555. JAL 0x8024FF04
  556. LW A1, 0x0028 (SP)
  557. BEQ R0, R0, !talkend
  558. SW V0, 0x001C (SP)
  559. !labeltalk1:
  560. LW T9, 0x0028 (SP)
  561. LW T0, 0x0190 (T9)
  562. ANDI T1, T0, 0x4000
  563. BEQ T1, R0, !labeltalk2
  564. NOP
  565. LW A0, 0x0020 (SP)
  566. JAL 0x80250098
  567. LW A1, 0x0028 (SP)
  568. BEQ R0, R0, !talkend
  569. SW V0, 0x001C (SP)
  570. !labeltalk2:
  571. LW A0, 0x0020 (SP)
  572. LW A1, 0x0028 (SP)
  573. JAL 0x8024D578
  574. LUI A2, 0x4000
  575. !talkend:
  576. LW V0, 0x001C (SP)
  577. LW RA, 0x0014 (SP)
  578. JR RA
  579. ADDIU SP, SP, 0x0020
  580.  
  581.  
  582.  
  583.  
  584.  
  585. .org 0xAD2C
  586. !fixgrabable:
  587. ADDIU SP, SP, 0xFFE0
  588. SW RA, 0x0014 (SP)
  589. SW A0, 0x0020 (SP)
  590. SW A1, 0x0024 (SP)
  591. SW A2, 0x0028 (SP)
  592. lui t0, $8037
  593. lw t0, $0004 (T0)
  594. bne t0, r0, !grabableend
  595. nop
  596. LW T6, 0x0028 (SP)
  597. ADDIU A0, R0, 0x0013
  598. JAL 0x80277FA8
  599. LW A1, 0x020C (T6)
  600. SW V0, 0x001C (SP)
  601. LW T7, 0x0028 (SP)
  602. LW T8, 0x0190 (T7)
  603. ANDI T9, T8, 0x0100
  604. BEQ T9, R0, !grabablelabel1
  605. NOP
  606. LW A0, 0x0020 (SP)
  607. JAL 0x8024C1D8
  608. LW A1, 0x0028 (SP)
  609. SW V0, 0x0018 (SP)
  610. LW T0, 0x0018 (SP)
  611. ANDI T1, T0, 0x000C
  612. BEQ T1, R0, !grabablelabel1
  613. NOP
  614. LW A0, 0x0028 (SP)
  615. JAL 0x8024C51C
  616. LW A1, 0x0018 (SP)
  617. LW A0, 0x0020 (SP)
  618. JAL 0x8024D72C
  619. LW A1, 0x0018 (SP)
  620. BEQ R0, R0, !grabableend
  621. OR V0, R0, R0
  622. !grabablelabel1:
  623. LW T2, 0x0028 (SP)
  624. LW T3, 0x0190 (T2)
  625. ANDI T4, T3, 0x0004
  626. BEQ T4, R0, !grabablelabel2
  627. NOP
  628. LW A0, 0x0020 (SP)
  629. LW A1, 0x0024 (SP)
  630. JAL 0x8024F7A8
  631. LW A2, 0x0028 (SP)
  632. BEQ V0, R0, !grabablelabel2
  633. NOP
  634. BEQ R0, R0, !grabableend
  635. ADDIU V0, R0, 0x0001
  636. !grabablelabel2:
  637. LW A0, 0x0020 (SP)
  638. JAL 0x8024CB58
  639. LW A1, 0x0028 (SP)
  640. BEQ V0, R0, !grabablelabel4
  641. NOP
  642. LW T5, 0x0028 (SP)
  643. LW T6, 0x0190 (T5)
  644. ANDI T7, T6, 0x0200
  645. BNEZ T7, !grabablelabel4
  646. NOP
  647. LW T8, 0x0028 (SP)
  648. LW T9, 0x0020 (SP)
  649. SW T8, 0x0078 (T9)
  650. LW T0, 0x0020 (SP)
  651. LHU T1, 0x0002 (T0)
  652. ORI T2, T1, 0x0800
  653. SH T2, 0x0002 (T0)
  654. BEQ R0, R0, !grabableend
  655. ADDIU V0, R0, 0x0001
  656. !grabablelabel4:
  657. LW T4, 0x001C (SP)
  658. LUI T3, 0x1300
  659. ADDIU T3, T3, 0x1850
  660. BEQ T3, T4, !grabablelabel3
  661. NOP
  662. LW A0, 0x0020 (SP)
  663. LW A1, 0x0028 (SP)
  664. JAL 0x8024D578
  665. LUI A2, 0xC0A0
  666. !grabablelabel3:
  667. OR V0, R0, R0
  668. !grabableend:
  669. LW RA, 0x0014 (SP)
  670. JR RA
  671. ADDIU SP, SP, 0x0020
Advertisement
RAW Paste Data Copied
Advertisement