Advertisement
bogaa

Castlevania Music Format v1.1

May 9th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.70 KB | None | 0 0
  1. Castlevania Music Format v1.1
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. by Sliver X and bogaa
  4.  
  5. Music Rom Address and Master Pointers
  6.  
  7. Opening: Sq1:9b80 pointer_address: 825 ROM 1b90
  8. seperator 827 value 04
  9. Sq2:9bce pointer_address: 828 1bde
  10. seperator 82a value 08
  11. Tri:9bf1 pointer_address: 82b 1c01
  12. pointer_address: 82d value 80
  13.  
  14. VampireKiller lvl 1: Sq1:9c83 pointer_address: 82e 1c93
  15. seperator
  16. Sq2:9d18 pointer_address 831 1d28
  17. seperator
  18. Tri:9db5 pointer_address 834 1dc5
  19.  
  20. Stalker lvl 2: Sq1:8dd0 pointer_address 837 de0
  21. Sq2:8e3a
  22. Tri:8ea2
  23.  
  24. Wicked Child lvl 3: Sq1:a10f
  25. Sq2:9fc1
  26. Tri:a2be
  27.  
  28. Walking on the edge 4: Sq1:a3ac
  29. Sq2:a478
  30. Tri:a505
  31.  
  32. Heart of Fire lvl 5: Sq1:a792
  33. Sq2:a895
  34. Tri:a96c
  35.  
  36. Out of Time lvl 6: Sq1:aabe
  37. Sq2:ab1d
  38. Tri:ab82
  39.  
  40. Nothing to lose Dracula:Sq1:acca
  41. Sq2:ad53
  42. Tri:ae97
  43.  
  44. Poisen Mind Boss : Sq1:8c35
  45. Sq2:8c3e
  46. Tri:8c86
  47.  
  48. Battle Dracula Sq1:af52
  49. Sq2:afab
  50. Tri:afe8
  51.  
  52. Voyager Ending: Sq1:b1db
  53. Sq2:b274
  54. Tri:b312
  55.  
  56. Game Over: Sq1:8d2f
  57. Sq2:8d4a
  58. Tri:8d6b
  59.  
  60.  
  61. MASTER POINTERS
  62. ~~~~~~~~~~~~~~~
  63.  
  64. This is the list of pointers that tells the game where the start of each channel is; these can
  65. be manipulated to move music data elsewhere in ROM, if you can find the space.
  66.  
  67. The format is six bytes for Square 1, Square 2, and Triangle, (Two byte pointer per),
  68. then a seperator byte that should not be messed with...
  69.  
  70. Music
  71. #####
  72.  
  73. Track 1 Track 2 Track 3 Track 4 Track 5 Track 6
  74. -------- -------- -------- -------- -------- --------
  75. Sq1: 825 Sq1: 82E Sq1: 837 Sq1: 840 Sq1: 849 Sq1: 852
  76. Sq2: 828 Sq2: 831 Sq2: 83A Sq2: 843 Sq2: 84C Sq2: 855
  77. Tri: 82B Tri: 834 Tri: 83D Tri: 846 Tri: 84F Tri: 858
  78.  
  79. Track 7 Track 8 Track 9 Track 10 Track 11 Track 12
  80. -------- -------- -------- -------- -------- --------
  81. Sq1: 85B Sq1: 864 Sq1: 86D Sq1: 876 Sq1: 87F Sq1: 888
  82. Sq2: 85E Sq2: 867 Sq2: 870 Sq2: 879 Sq2: 882 Sq2: 88B
  83. Tri: 861 Tri: 86A Tri: 873 Tri: 87C Tri: 885 Tri: 88E
  84.  
  85. Track 13 Track 14 Track 15
  86. -------- -------- --------
  87. Sq1: 891 Sq1: 89A Sq1: 8A3
  88. Sq2: 894 Sq2: 89D Sq2: 8A6
  89. Tri: 897 Tri: 8A0 Tri: 8A9
  90.  
  91.  
  92. Calculating:
  93. ~~~~~~~~~~~~
  94.  
  95. Pointer to Address:
  96.  
  97. B59D
  98.  
  99. Now take the pointer and swap the bytes:
  100.  
  101. 9DB5
  102.  
  103. Now subtract $8000:
  104.  
  105. 1DB5
  106.  
  107. Now add $10:
  108.  
  109. 1DC5 (Address)
  110.  
  111. Address to Pointer:
  112.  
  113. 1DC5
  114.  
  115. 1DB5
  116.  
  117. 9DB5
  118.  
  119. B59D (Pointer)
  120.  
  121. Notes
  122. ~~~~~
  123. First nibble denotes pitch, second denotes time
  124.  
  125. First nibble: Range: 0 - B ("C" to "B")
  126. {C C# D D# E F F# G G# A A# B}
  127. {0 1 2 3 4 5 6 7 8 9 A B}
  128.  
  129. Second nibble: 0 - F (0 is fastest, F is slowest)
  130. CX is a rest.
  131.  
  132. Octaves
  133. ~~~~~~~
  134.  
  135. E0 - E4 (Highest octave to lowest)
  136.  
  137. E0 is high pitched, E1 is lower, E2 is very low, E3 is barely audiable,
  138. E4 is so low it's silent. (The silent values seem to be used for "drum solos", i.e.
  139. stretches of noise: see Noise Data below for more info)
  140. Remains silent until E8, which is highest again.
  141.  
  142. Instruments
  143. ~~~~~~~~~~~
  144. 00 - FF
  145.  
  146. Instrument sets. x0 is harshest duty cycle, while xF is smoothest. Each range of 16
  147. employs different ASDR techniques (Fade, attack, etc).
  148.  
  149. An instrument change *must* be preceded by a tempo change (See below), otherwise you'll just
  150. make it a note.
  151.  
  152. Tempo
  153. ~~~~~
  154. D1 - DF (Fastest to slowest)
  155.  
  156. Controls the entire speed of the following notes until a new D* is encountred.
  157. D1 is so fast it's retarded, while DF is really slow. Note that D0 is *EXTREMELY* slow.
  158.  
  159. Noise Data
  160. ~~~~~~~~~~
  161. Range: E9 - EA
  162.  
  163. This is used for percussion effects. These can be located in any channel's data. The way it
  164. works is that it follows a note definition to determine its speed. So B0E9 would be a very
  165. fast hit, and BFE9 would be a hit followed by a long pause. If you do not precede a noise
  166. byte with a note value, things will get *VERY* badly messed up. It should also be noted that
  167. that the "drum" will sound at the same time as the preceding note. If you're simply wanting
  168. a stretch of percussion, set the octave to E4 beforehand.
  169.  
  170. E9 sounds like a snare.
  171. EA sounds like a closed high-hat.
  172.  
  173. Repeating
  174. ~~~~~~~~~
  175.  
  176. FEXXXXXX
  177.  
  178. FE followed by three bytes is a repeat control. Second byte is the number of times to repeat (FF is infinity), and the third
  179. and fourth are the pointer to loop to. Note that this must come after a note (As opposed to a noise "drum" sound),
  180. otherwise the drums won't repeat. This would mean you can't put a drum effect at the very end of a song.
  181.  
  182. Figure 1: Triangle/Noise Repeat
  183. *******************************
  184. (FEFF)B59D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement