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.

105 lines
1.7 KiB

6 years ago
  1. .set noat # allow manual use of $at
  2. .set noreorder # don't insert nops after branches
  3. .set gp=64
  4. .include "macros.inc"
  5. .eqv MI_INTR_MASK_REG, 0xA430000C
  6. .section .text, "ax"
  7. glabel osSetIntMask
  8. mfc0 $t1, $12
  9. andi $v0, $t1, 0xff01
  10. lui $t2, %hi(MI_INTR_MASK_REG) # $t2, 0xa430
  11. lw $t2, %lo(MI_INTR_MASK_REG)($t2)
  12. sll $t2, $t2, 0x10
  13. or $v0, $v0, $t2
  14. lui $at, 0x3f
  15. and $t0, $a0, $at
  16. srl $t0, $t0, 0xf
  17. lui $t2, %hi(D_803386D0)
  18. addu $t2, $t2, $t0
  19. lhu $t2, %lo(D_803386D0)($t2)
  20. lui $at, %hi(MI_INTR_MASK_REG) # $at, 0xa430
  21. sw $t2, %lo(MI_INTR_MASK_REG)($at)
  22. andi $t0, $a0, 0xff01
  23. lui $at, (0xFFFF00FF >> 16) # lui $at, 0xffff
  24. ori $at, (0xFFFF00FF & 0xFFFF) # ori $at, $at, 0xff
  25. and $t1, $t1, $at
  26. or $t1, $t1, $t0
  27. mtc0 $t1, $12
  28. nop
  29. nop
  30. jr $ra
  31. nop
  32. .section .rodata
  33. glabel D_803386D0
  34. .half 0x0555
  35. .half 0x0556
  36. .half 0x0559
  37. .half 0x055A
  38. .half 0x0565
  39. .half 0x0566
  40. .half 0x0569
  41. .half 0x056A
  42. .half 0x0595
  43. .half 0x0596
  44. .half 0x0599
  45. .half 0x059A
  46. .half 0x05A5
  47. .half 0x05A6
  48. .half 0x05A9
  49. .half 0x05AA
  50. .half 0x0655
  51. .half 0x0656
  52. .half 0x0659
  53. .half 0x065A
  54. .half 0x0665
  55. .half 0x0666
  56. .half 0x0669
  57. .half 0x066A
  58. .half 0x0695
  59. .half 0x0696
  60. .half 0x0699
  61. .half 0x069A
  62. .half 0x06A5
  63. .half 0x06A6
  64. .half 0x06A9
  65. .half 0x06AA
  66. .half 0x0955
  67. .half 0x0956
  68. .half 0x0959
  69. .half 0x095A
  70. .half 0x0965
  71. .half 0x0966
  72. .half 0x0969
  73. .half 0x096A
  74. .half 0x0995
  75. .half 0x0996
  76. .half 0x0999
  77. .half 0x099A
  78. .half 0x09A5
  79. .half 0x09A6
  80. .half 0x09A9
  81. .half 0x09AA
  82. .half 0x0A55
  83. .half 0x0A56
  84. .half 0x0A59
  85. .half 0x0A5A
  86. .half 0x0A65
  87. .half 0x0A66
  88. .half 0x0A69
  89. .half 0x0A6A
  90. .half 0x0A95
  91. .half 0x0A96
  92. .half 0x0A99
  93. .half 0x0A9A
  94. .half 0x0AA5
  95. .half 0x0AA6
  96. .half 0x0AA9
  97. .half 0x0AAA