Super Mario 64s source code (from a leak on 4chan so be careful)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

428 lines
14 KiB

6 years ago
  1. .include "macros.inc"
  2. .include "PR/gbi.inc"
  3. .section .rodata
  4. .balign 8
  5. glabel textureHandOpen # 0x801A8730
  6. .incbin "bin/intro_raw/hand_open.rgba16"
  7. #! stray EndDisplayList
  8. gsSPEndDisplayList
  9. .balign 8
  10. glabel textureHandClosed # 0x801A8F38
  11. .incbin "bin/intro_raw/hand_closed.rgba16"
  12. texture_red_star_0:
  13. .incbin "bin/intro_raw/red_star_0.rgba16"
  14. texture_red_star_1:
  15. .incbin "bin/intro_raw/red_star_1.rgba16"
  16. texture_red_star_2:
  17. .incbin "bin/intro_raw/red_star_2.rgba16"
  18. texture_red_star_3:
  19. .incbin "bin/intro_raw/red_star_3.rgba16"
  20. texture_red_star_4:
  21. .incbin "bin/intro_raw/red_star_4.rgba16"
  22. texture_red_star_5:
  23. .incbin "bin/intro_raw/red_star_5.rgba16"
  24. texture_red_star_6:
  25. .incbin "bin/intro_raw/red_star_6.rgba16"
  26. texture_red_star_7:
  27. .incbin "bin/intro_raw/red_star_7.rgba16"
  28. texture_white_star_0:
  29. .incbin "bin/intro_raw/white_star_0.rgba16"
  30. texture_white_star_1:
  31. .incbin "bin/intro_raw/white_star_1.rgba16"
  32. texture_white_star_2:
  33. .incbin "bin/intro_raw/white_star_2.rgba16"
  34. texture_white_star_3:
  35. .incbin "bin/intro_raw/white_star_3.rgba16"
  36. texture_white_star_4:
  37. .incbin "bin/intro_raw/white_star_4.rgba16"
  38. texture_white_star_5:
  39. .incbin "bin/intro_raw/white_star_5.rgba16"
  40. texture_white_star_6:
  41. .incbin "bin/intro_raw/white_star_6.rgba16"
  42. texture_white_star_7:
  43. .incbin "bin/intro_raw/white_star_7.rgba16"
  44. star_vertex_801B1738:
  45. vertex -64, 0, 0, 0, 992, 0x00, 0x00, 0x7F, 0x00
  46. vertex 64, 0, 0, 992, 992, 0x00, 0x00, 0x7F, 0x00
  47. vertex 64, 128, 0, 992, 0, 0x00, 0x00, 0x7F, 0x00
  48. vertex -64, 128, 0, 0, 0, 0x00, 0x00, 0x7F, 0x00
  49. D_vertex_801B1778: #! no references to these vertices
  50. vertex 16384, 0, 0, 0, 16384, 0x00, 0x00, 0x00, 0x00
  51. vertex 0, 0, 16384, 0, 0, 0x00, 0x00, 0x40, 0x00
  52. vertex 0, 0, 0, 0, 0, 0x00, 0x00, 0x00, 0x00
  53. vertex 0, 0, 0, 0, 0, 0x00, 0x00, 0x00, 0x00
  54. star_dl_common:
  55. gsDPSetCombineMode1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_TEXEL0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_TEXEL0
  56. gsSPClearGeometryMode 0x000C0000
  57. gsDPSetRenderMode G_RM_AA_ZB_TEX_EDGE, G_RM_NOOP2
  58. gsSPTexture -1, -1, 0, 0, 1
  59. gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD
  60. gsDPLoadSync
  61. gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100
  62. gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD, G_TX_CLAMP | G_TX_NOMIRROR, 5, G_TX_NOLOD
  63. gsDPSetTileSize 0, 0, 0, 124, 124
  64. gsSPVertex star_vertex_801B1738, 4, 0
  65. gsSP2Triangles 0, 1, 2, 0x0, 0, 2, 3, 0x0
  66. gsSPTexture -1, -1, 0, 0, 0
  67. gsDPSetCombineMode1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE
  68. gsDPSetRenderMode G_RM_AA_ZB_OPA_INTER, G_RM_NOOP2
  69. gsSPEndDisplayList
  70. red_star_dl_801B1838:
  71. gsDPPipeSync
  72. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_0
  73. gsSPBranchList star_dl_common
  74. red_star_dl_801B1850:
  75. gsDPPipeSync
  76. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_1
  77. gsSPBranchList star_dl_common
  78. red_star_dl_801B1868:
  79. gsDPPipeSync
  80. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_2
  81. gsSPBranchList star_dl_common
  82. red_star_dl_801B1880:
  83. gsDPPipeSync
  84. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_3
  85. gsSPBranchList star_dl_common
  86. red_star_dl_801B1898:
  87. gsDPPipeSync
  88. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_4
  89. gsSPBranchList star_dl_common
  90. red_star_dl_801B18B0:
  91. gsDPPipeSync
  92. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_5
  93. gsSPBranchList star_dl_common
  94. red_star_dl_801B18C8:
  95. gsDPPipeSync
  96. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_6
  97. gsSPBranchList star_dl_common
  98. red_star_dl_801B18E0:
  99. gsDPPipeSync
  100. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_red_star_7
  101. gsSPBranchList star_dl_common
  102. white_star_dl_801B18F8:
  103. gsDPPipeSync
  104. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_0
  105. gsSPBranchList star_dl_common
  106. white_star_dl_801B1910:
  107. gsDPPipeSync
  108. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_1
  109. gsSPBranchList star_dl_common
  110. white_star_dl_801B1928:
  111. gsDPPipeSync
  112. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_2
  113. gsSPBranchList star_dl_common
  114. white_star_dl_801B1940:
  115. gsDPPipeSync
  116. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_3
  117. gsSPBranchList star_dl_common
  118. white_star_dl_801B1958:
  119. gsDPPipeSync
  120. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_4
  121. gsSPBranchList star_dl_common
  122. white_star_dl_801B1970:
  123. gsDPPipeSync
  124. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_5
  125. gsSPBranchList star_dl_common
  126. white_star_dl_801B1988:
  127. gsDPPipeSync
  128. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_6
  129. gsSPBranchList star_dl_common
  130. white_star_dl_801B19A0:
  131. gsDPPipeSync
  132. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_white_star_7
  133. gsSPBranchList star_dl_common
  134. glabel redStarDlArray # 0x801B19B8
  135. .word red_star_dl_801B1838
  136. .word red_star_dl_801B1838
  137. .word red_star_dl_801B1850
  138. .word red_star_dl_801B1850
  139. .word red_star_dl_801B1868
  140. .word red_star_dl_801B1868
  141. .word red_star_dl_801B1880
  142. .word red_star_dl_801B1880
  143. .word red_star_dl_801B1898
  144. .word red_star_dl_801B1898
  145. .word red_star_dl_801B18B0
  146. .word red_star_dl_801B18B0
  147. .word red_star_dl_801B18C8
  148. .word red_star_dl_801B18C8
  149. .word red_star_dl_801B18E0
  150. .word red_star_dl_801B18E0
  151. glabel silverStarDlArray # 0x801B19F8
  152. .word white_star_dl_801B18F8
  153. .word white_star_dl_801B18F8
  154. .word white_star_dl_801B1910
  155. .word white_star_dl_801B1910
  156. .word white_star_dl_801B1928
  157. .word white_star_dl_801B1928
  158. .word white_star_dl_801B1940
  159. .word white_star_dl_801B1940
  160. .word white_star_dl_801B1958
  161. .word white_star_dl_801B1958
  162. .word white_star_dl_801B1970
  163. .word white_star_dl_801B1970
  164. .word white_star_dl_801B1988
  165. .word white_star_dl_801B1988
  166. .word white_star_dl_801B19A0
  167. .word white_star_dl_801B19A0
  168. texture_sparkle_0:
  169. .incbin "bin/intro_raw/sparkle_0.rgba16"
  170. texture_sparkle_1:
  171. .incbin "bin/intro_raw/sparkle_1.rgba16"
  172. texture_sparkle_2:
  173. .incbin "bin/intro_raw/sparkle_2.rgba16"
  174. texture_sparkle_3:
  175. .incbin "bin/intro_raw/sparkle_3.rgba16"
  176. texture_sparkle_4:
  177. .incbin "bin/intro_raw/sparkle_4.rgba16"
  178. texture_sparkle_5: #! no references to this texture 0x801B4238
  179. .incbin "bin/intro_raw/sparkle_5.rgba16"
  180. sparkle_vertex_801B4A38:
  181. vertex -32, 0, 0, 0, 1984, 0x00, 0x00, 0x7F, 0x00
  182. vertex 32, 0, 0, 1984, 1984, 0x00, 0x00, 0x7F, 0x00
  183. vertex 32, 64, 0, 1984, 0, 0x00, 0x00, 0x7F, 0x00
  184. vertex -32, 64, 0, 0, 0, 0x00, 0x00, 0x7F, 0x00
  185. sparkle_dl_common: # 0x801B4A78
  186. gsDPSetCombineMode1Cycle G_CCMUX_TEXEL0, G_CCMUX_0, G_CCMUX_PRIMITIVE, G_CCMUX_0, G_ACMUX_TEXEL0, G_ACMUX_0, G_ACMUX_PRIMITIVE, G_ACMUX_0
  187. gsSPClearGeometryMode 0x000C0000
  188. gsDPSetRenderMode G_RM_AA_ZB_TEX_EDGE, G_RM_NOOP2
  189. gsSPTexture -32768, -32768, 0, 0, 1
  190. gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD
  191. gsDPLoadSync
  192. gsDPLoadBlock 7, 0, 0, 0x3FF, 0x100
  193. gsDPSetTile G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD
  194. gsDPSetTileSize 0, 0, 0, 124, 124
  195. gsSPVertex sparkle_vertex_801B4A38, 4, 0
  196. gsSP2Triangles 0, 1, 2, 0x0, 0, 2, 3, 0x0
  197. gsSPTexture 1, 1, 0, 0, 0
  198. gsDPSetCombineMode1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE
  199. gsDPSetRenderMode G_RM_AA_ZB_OPA_INTER, G_RM_NOOP2
  200. gsSPEndDisplayList
  201. red_dl_801B4AF8:
  202. gsDPSetPrimColor 0, 0, 0xFF, 0x00, 0x00, 0xFF
  203. gsSPEndDisplayList
  204. white_dl_801B4B08:
  205. gsDPSetPrimColor 0, 0, 0xFF, 0xFF, 0xFF, 0xFF
  206. gsSPEndDisplayList
  207. sparkle_dl_801B4B18:
  208. gsDPPipeSync
  209. gsSPDisplayList red_dl_801B4AF8
  210. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_0
  211. gsSPBranchList sparkle_dl_common
  212. sparkle_dl_801B4B38:
  213. gsDPPipeSync
  214. gsSPDisplayList red_dl_801B4AF8
  215. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_1
  216. gsSPBranchList sparkle_dl_common
  217. sparkle_dl_801B4B58:
  218. gsDPPipeSync
  219. gsSPDisplayList red_dl_801B4AF8
  220. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_2
  221. gsSPBranchList sparkle_dl_common
  222. sparkle_dl_801B4B78:
  223. gsDPPipeSync
  224. gsSPDisplayList red_dl_801B4AF8
  225. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_3
  226. gsSPBranchList sparkle_dl_common
  227. sparkle_dl_801B4B98:
  228. gsDPPipeSync
  229. gsSPDisplayList red_dl_801B4AF8
  230. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_4
  231. gsSPBranchList sparkle_dl_common
  232. sparkle_dl_801B4BB8:
  233. gsDPPipeSync
  234. gsSPDisplayList red_dl_801B4AF8
  235. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_4
  236. gsSPBranchList sparkle_dl_common
  237. sparkle_dl_801B4BD8:
  238. gsDPPipeSync
  239. gsSPDisplayList white_dl_801B4B08
  240. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_0
  241. gsSPBranchList sparkle_dl_common
  242. sparkle_dl_801B4BF8:
  243. gsDPPipeSync
  244. gsSPDisplayList white_dl_801B4B08
  245. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_1
  246. gsSPBranchList sparkle_dl_common
  247. sparkle_dl_801B4C18:
  248. gsDPPipeSync
  249. gsSPDisplayList white_dl_801B4B08
  250. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_2
  251. gsSPBranchList sparkle_dl_common
  252. sparkle_dl_801B4C38:
  253. gsDPPipeSync
  254. gsSPDisplayList white_dl_801B4B08
  255. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_3
  256. gsSPBranchList sparkle_dl_common
  257. sparkle_dl_801B4C58:
  258. gsDPPipeSync
  259. gsSPDisplayList white_dl_801B4B08
  260. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_4
  261. gsSPBranchList sparkle_dl_common
  262. sparkle_dl_801B4C78:
  263. gsDPPipeSync
  264. gsSPDisplayList white_dl_801B4B08
  265. gsDPSetTextureImage G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, texture_sparkle_4
  266. gsSPBranchList sparkle_dl_common
  267. glabel redSparkleDlArray # 0x801B4C98
  268. .word sparkle_dl_801B4B98
  269. .word sparkle_dl_801B4B98
  270. .word sparkle_dl_801B4B78
  271. .word sparkle_dl_801B4B78
  272. .word sparkle_dl_801B4B58
  273. .word sparkle_dl_801B4B58
  274. .word sparkle_dl_801B4B38
  275. .word sparkle_dl_801B4B38
  276. .word sparkle_dl_801B4B18
  277. .word sparkle_dl_801B4B18
  278. .word sparkle_dl_801B4BB8
  279. .word sparkle_dl_801B4BB8
  280. glabel silverSparkleDlArray # 0x801B4CC8
  281. .word sparkle_dl_801B4C58
  282. .word sparkle_dl_801B4C58
  283. .word sparkle_dl_801B4C38
  284. .word sparkle_dl_801B4C38
  285. .word sparkle_dl_801B4C18
  286. .word sparkle_dl_801B4C18
  287. .word sparkle_dl_801B4BF8
  288. .word sparkle_dl_801B4BF8
  289. .word sparkle_dl_801B4BD8
  290. .word sparkle_dl_801B4BD8
  291. .word sparkle_dl_801B4C78
  292. .word sparkle_dl_801B4C78
  293. #! stray EndDisplayList
  294. gsSPEndDisplayList
  295. texture_mario_face_shine: # 0x801B4D00
  296. .incbin "bin/intro_raw/mario_face_shine.ia8"
  297. glabel marioHeadDl801B5100
  298. gsSPSetGeometryMode G_TEXTURE_GEN
  299. gsSPTexture 1984, 1984, 0, 0, 1
  300. gsDPSetTexturePersp G_TP_PERSP
  301. gsDPSetTextureFilter G_TF_BILERP
  302. gsDPSetCombineMode1Cycle G_CCMUX_PRIMITIVE, G_CCMUX_SHADE, G_CCMUX_TEXEL0, G_CCMUX_SHADE, G_ACMUX_PRIMITIVE, G_ACMUX_SHADE, G_ACMUX_TEXEL0, G_ACMUX_SHADE
  303. gsDPLoadTextureBlock texture_mario_face_shine, G_IM_FMT_IA, G_IM_SIZ_8b, 32, 32, 0, G_TX_WRAP | G_TX_NOMIRROR, G_TX_WRAP | G_TX_NOMIRROR, 5, 5, G_TX_NOLOD, G_TX_NOLOD
  304. gsDPPipeSync
  305. gsSPEndDisplayList
  306. glabel marioHeadDl801B5170
  307. gsSPGeometryMode 0xFFFFFFFF, G_SHADING_SMOOTH | G_SHADE, G_ORDER_CFIRST
  308. gsSPEndDisplayList
  309. glabel marioHeadDl801B5188
  310. gsDPPipeSync
  311. gsDPSetCombineMode1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_SHADE, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_SHADE
  312. gsDPSetCycleType G_CYC_1CYCLE
  313. gsDPSetTextureLOD G_TL_TILE
  314. gsDPSetTextureLUT G_TT_NONE
  315. gsDPSetTextureDetail G_TD_CLAMP
  316. gsDPSetTexturePersp G_TP_PERSP
  317. gsDPSetTextureFilter G_TF_BILERP
  318. gsDPSetTextureConvert G_TC_FILT
  319. gsDPSetCombineKey G_CK_NONE
  320. gsDPSetAlphaCompare G_AC_NONE
  321. # There were multiple matching pairs, so I don't know if this is correct or not.
  322. gsDPSetRenderMode G_RM_OPA_SURF, G_RM_OPA_SURF2
  323. # It could also be one of these:
  324. # G_RM_OPA_SURF, G_RM_OPA_CI2; G_RM_OPA_CI, G_RM_OPA_SURF2; G_RM_PASS, G_RM_OPA_SURF2;
  325. gsDPNoOp
  326. gsDPSetColorDither G_CD_MAGICSQ
  327. gsDPPipeSync
  328. gsSPEndDisplayList
  329. .word 0
  330. glabel D_801B520C
  331. .float 1.0
  332. .word 0
  333. .word 0
  334. #! no references to display list
  335. gsDPPipeSync
  336. gsSPEndDisplayList
  337. vertex_801B5228:
  338. vertex -8, 8, 0, 0, 0, 0x00, 0x00, 0x00, 0xFF
  339. vertex 8, -2, 0, 0, 0, 0x00, 0x00, 0x00, 0xFF
  340. vertex 2, -8, 0, 0, 0, 0x00, 0x00, 0x00, 0xFF
  341. vertex_801B5258:
  342. vertex -6, 6, 0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF
  343. vertex 7, -3, 0, 0, 0, 0xFF, 0x00, 0x00, 0xFF
  344. vertex 3, -7, 0, 0, 0, 0xFF, 0x00, 0x00, 0xFF
  345. glabel dl_801B5288 #! no references to display list
  346. gsDPPipeSync
  347. # There were multiple matching pairs, so I don't know if this is correct or not.
  348. gsDPSetRenderMode G_RM_OPA_SURF, G_RM_OPA_SURF2
  349. # It could also be one of these:
  350. # G_RM_OPA_SURF, G_RM_OPA_CI2; G_RM_OPA_CI, G_RM_OPA_SURF2; G_RM_PASS, G_RM_OPA_SURF2;
  351. gsSPGeometryMode 0xFFFFFFFF, G_SHADING_SMOOTH | G_SHADE, G_ORDER_CFIRST
  352. gsDPPipeSync
  353. gsSPVertex vertex_801B5228, 3, 0
  354. gsSP1Triangle 0, 1, 2, 0x0
  355. gsSPVertex vertex_801B5258, 3, 0
  356. gsSP1Triangle 0, 1, 2, 0x0
  357. gsSPEndDisplayList
  358. glabel marioHeadDl801B52D8
  359. gsDPPipeSync
  360. gsDPSetCycleType G_CYC_1CYCLE
  361. gsSPTexture -32768, -32768, 0, 0, 1
  362. gsDPSetAlphaCompare G_AC_THRESHOLD
  363. gsDPSetBlendColor 0, 0, 0, 1
  364. gsDPSetRenderMode G_RM_AA_ZB_TEX_EDGE, G_RM_NOOP2
  365. gsDPSetCombineMode1Cycle G_CCMUX_0, G_CCMUX_0, G_CCMUX_0, G_CCMUX_TEXEL0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_0, G_ACMUX_TEXEL0
  366. gsDPSetTextureFilter G_TF_BILERP
  367. gsDPSetTexturePersp G_TP_NONE
  368. gsSPEndDisplayList