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.

111 lines
2.1 KiB

6 years ago
  1. .include "macros.inc"
  2. .section .data
  3. .macro adsrtable name
  4. .word (\name - gSoundDataADSR), (\name\()_end - \name)
  5. .endm
  6. .macro adsr name
  7. \name:
  8. .ifdef VERSION_JP
  9. .incbin "assets/sound/adsr/jp/\name\().bin"
  10. .endif
  11. .ifdef VERSION_US
  12. .incbin "assets/sound/adsr/us/\name\().bin"
  13. .endif
  14. \name\()_end:
  15. .endm
  16. glabel gSoundDataADSR # US: 57B720
  17. .hword 1 # current sequence
  18. .hword (adsr_entry_end - adsr_entry_start) / 8 # number of entries
  19. adsr_entry_start:
  20. adsrtable adsr_00
  21. adsrtable adsr_01
  22. adsrtable adsr_02
  23. adsrtable adsr_03
  24. adsrtable adsr_04
  25. adsrtable adsr_05
  26. adsrtable adsr_06
  27. adsrtable adsr_07
  28. adsrtable adsr_08
  29. adsrtable adsr_09
  30. adsrtable adsr_0A
  31. adsrtable adsr_0B
  32. adsrtable adsr_0C
  33. adsrtable adsr_0D
  34. adsrtable adsr_0E
  35. adsrtable adsr_0F
  36. adsrtable adsr_10
  37. adsrtable adsr_11
  38. adsrtable adsr_12
  39. adsrtable adsr_13
  40. adsrtable adsr_14
  41. adsrtable adsr_15
  42. adsrtable adsr_16
  43. adsrtable adsr_17
  44. adsrtable adsr_18
  45. adsrtable adsr_19
  46. adsrtable adsr_1A
  47. adsrtable adsr_1B
  48. adsrtable adsr_1C
  49. adsrtable adsr_1D
  50. adsrtable adsr_1E
  51. adsrtable adsr_1F
  52. adsrtable adsr_20
  53. adsrtable adsr_21
  54. adsrtable adsr_22
  55. adsrtable adsr_23
  56. adsrtable adsr_24
  57. adsrtable adsr_25
  58. adsr_entry_end:
  59. .word 0, 0, 0 # you cant use an align 4, 0x00 here or else the table calculation above will not work.
  60. adsr adsr_00
  61. adsr adsr_01
  62. adsr adsr_02
  63. adsr adsr_03
  64. adsr adsr_04
  65. adsr adsr_05
  66. adsr adsr_06
  67. adsr adsr_07
  68. adsr adsr_08
  69. adsr adsr_09
  70. adsr adsr_0A
  71. adsr adsr_0B
  72. adsr adsr_0C
  73. adsr adsr_0D
  74. adsr adsr_0E
  75. adsr adsr_0F
  76. adsr adsr_10
  77. adsr adsr_11
  78. adsr adsr_12
  79. adsr adsr_13
  80. adsr adsr_14
  81. adsr adsr_15
  82. adsr adsr_16
  83. adsr adsr_17
  84. adsr adsr_18
  85. adsr adsr_19
  86. adsr adsr_1A
  87. adsr adsr_1B
  88. adsr adsr_1C
  89. adsr adsr_1D
  90. adsr adsr_1E
  91. adsr adsr_1F
  92. adsr adsr_20
  93. adsr adsr_21
  94. adsr adsr_22
  95. adsr adsr_23
  96. adsr adsr_24
  97. adsr adsr_25
  98. .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  99. .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  100. .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  101. .ifdef VERSION_US
  102. .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  103. .endif