music_constants.asm 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. ; HW sound channel register base addresses
  2. HW_CH1_BASE EQU (rNR10 % $100)
  3. HW_CH2_BASE EQU ((rNR21 % $100) - 1)
  4. HW_CH3_BASE EQU (rNR30 % $100)
  5. HW_CH4_BASE EQU ((rNR41 % $100) - 1)
  6. ; HW sound channel enable bit masks
  7. HW_CH1_ENABLE_MASK EQU %00010001
  8. HW_CH2_ENABLE_MASK EQU %00100010
  9. HW_CH3_ENABLE_MASK EQU %01000100
  10. HW_CH4_ENABLE_MASK EQU %10001000
  11. ; HW sound channel disable bit masks
  12. HW_CH1_DISABLE_MASK EQU (~HW_CH1_ENABLE_MASK & $ff)
  13. HW_CH2_DISABLE_MASK EQU (~HW_CH2_ENABLE_MASK & $ff)
  14. HW_CH3_DISABLE_MASK EQU (~HW_CH3_ENABLE_MASK & $ff)
  15. HW_CH4_DISABLE_MASK EQU (~HW_CH4_ENABLE_MASK & $ff)
  16. REG_DUTY_SOUND_LEN EQU 1
  17. REG_VOLUME_ENVELOPE EQU 2
  18. REG_FREQUENCY_LO EQU 3
  19. MAX_SFX_ID EQU $B9
  20. CRY_SFX_START EQU $14
  21. CRY_SFX_END EQU $86
  22. ; wChannelFlags1 constants
  23. BIT_PERFECT_PITCH EQU 0 ; controlled by toggleperfectpitch command
  24. BIT_CHANNEL_CALL EQU 1 ; if in channel call
  25. BIT_NOISE_OR_SFX EQU 2 ; if channel is the music noise channel or an SFX channel
  26. BIT_VIBRATO_DIRECTION EQU 3 ; if the pitch is above or below normal (cycles)
  27. BIT_PITCH_BEND_ON EQU 4 ; if pitch bend is active
  28. BIT_PITCH_BEND_DECREASING EQU 5 ; if the pitch bend frequency is decreasing (instead of increasing)
  29. BIT_ROTATE_DUTY EQU 6 ; if rotating duty
  30. ; wChannelFlags2 constant (only has one flag)
  31. BIT_EXECUTE_MUSIC EQU 0 ; if in execute music
  32. ; Song ids are calculated by address to save space.
  33. music_const: MACRO
  34. \1 EQUS "((\2 - SFX_Headers_1) / 3)"
  35. ENDM
  36. ; AUDIO_1
  37. music_const MUSIC_PALLET_TOWN, Music_PalletTown
  38. music_const MUSIC_POKECENTER, Music_Pokecenter
  39. music_const MUSIC_GYM, Music_Gym
  40. music_const MUSIC_CITIES1, Music_Cities1
  41. music_const MUSIC_CITIES2, Music_Cities2
  42. music_const MUSIC_CELADON, Music_Celadon
  43. music_const MUSIC_CINNABAR, Music_Cinnabar
  44. music_const MUSIC_VERMILION, Music_Vermilion
  45. music_const MUSIC_LAVENDER, Music_Lavender
  46. music_const MUSIC_SS_ANNE, Music_SSAnne
  47. music_const MUSIC_MEET_PROF_OAK, Music_MeetProfOak
  48. music_const MUSIC_MEET_RIVAL, Music_MeetRival
  49. music_const MUSIC_MUSEUM_GUY, Music_MuseumGuy
  50. music_const MUSIC_SAFARI_ZONE, Music_SafariZone
  51. music_const MUSIC_PKMN_HEALED, Music_PkmnHealed
  52. music_const MUSIC_ROUTES1, Music_Routes1
  53. music_const MUSIC_ROUTES2, Music_Routes2
  54. music_const MUSIC_ROUTES3, Music_Routes3
  55. music_const MUSIC_ROUTES4, Music_Routes4
  56. music_const MUSIC_INDIGO_PLATEAU, Music_IndigoPlateau
  57. ; AUDIO_2
  58. music_const MUSIC_GYM_LEADER_BATTLE, Music_GymLeaderBattle
  59. music_const MUSIC_TRAINER_BATTLE, Music_TrainerBattle
  60. music_const MUSIC_WILD_BATTLE, Music_WildBattle
  61. music_const MUSIC_FINAL_BATTLE, Music_FinalBattle
  62. music_const MUSIC_DEFEATED_TRAINER, Music_DefeatedTrainer
  63. music_const MUSIC_DEFEATED_WILD_MON, Music_DefeatedWildMon
  64. music_const MUSIC_DEFEATED_GYM_LEADER, Music_DefeatedGymLeader
  65. ; AUDIO_3
  66. music_const MUSIC_TITLE_SCREEN, Music_TitleScreen
  67. music_const MUSIC_CREDITS, Music_Credits
  68. music_const MUSIC_HALL_OF_FAME, Music_HallOfFame
  69. music_const MUSIC_OAKS_LAB, Music_OaksLab
  70. music_const MUSIC_JIGGLYPUFF_SONG, Music_JigglypuffSong
  71. music_const MUSIC_BIKE_RIDING, Music_BikeRiding
  72. music_const MUSIC_SURFING, Music_Surfing
  73. music_const MUSIC_GAME_CORNER, Music_GameCorner
  74. music_const MUSIC_INTRO_BATTLE, Music_IntroBattle
  75. music_const MUSIC_DUNGEON1, Music_Dungeon1
  76. music_const MUSIC_DUNGEON2, Music_Dungeon2
  77. music_const MUSIC_DUNGEON3, Music_Dungeon3
  78. music_const MUSIC_CINNABAR_MANSION, Music_CinnabarMansion
  79. music_const MUSIC_POKEMON_TOWER, Music_PokemonTower
  80. music_const MUSIC_SILPH_CO, Music_SilphCo
  81. music_const MUSIC_MEET_EVIL_TRAINER, Music_MeetEvilTrainer
  82. music_const MUSIC_MEET_FEMALE_TRAINER, Music_MeetFemaleTrainer
  83. music_const MUSIC_MEET_MALE_TRAINER, Music_MeetMaleTrainer
  84. ; AUDIO_1 AUDIO_2 AUDIO_3
  85. music_const SFX_SNARE_1, SFX_Snare1_1
  86. music_const SFX_SNARE_2, SFX_Snare2_1
  87. music_const SFX_SNARE_3, SFX_Snare3_1
  88. music_const SFX_SNARE_4, SFX_Snare4_1
  89. music_const SFX_SNARE_5, SFX_Snare5_1
  90. music_const SFX_TRIANGLE_1, SFX_Triangle1_1
  91. music_const SFX_TRIANGLE_2, SFX_Triangle2_1
  92. music_const SFX_SNARE_6, SFX_Snare6_1
  93. music_const SFX_SNARE_7, SFX_Snare7_1
  94. music_const SFX_SNARE_8, SFX_Snare8_1
  95. music_const SFX_SNARE_9, SFX_Snare9_1
  96. music_const SFX_CYMBAL_1, SFX_Cymbal1_1
  97. music_const SFX_CYMBAL_2, SFX_Cymbal2_1
  98. music_const SFX_CYMBAL_3, SFX_Cymbal3_1
  99. music_const SFX_MUTED_SNARE_1, SFX_Muted_Snare1_1
  100. music_const SFX_TRIANGLE_3, SFX_Triangle3_1
  101. music_const SFX_MUTED_SNARE_2, SFX_Muted_Snare2_1
  102. music_const SFX_MUTED_SNARE_3, SFX_Muted_Snare3_1
  103. music_const SFX_MUTED_SNARE_4, SFX_Muted_Snare4_1
  104. music_const SFX_CRY_00, SFX_Cry00_1
  105. music_const SFX_CRY_01, SFX_Cry01_1
  106. music_const SFX_CRY_02, SFX_Cry02_1
  107. music_const SFX_CRY_03, SFX_Cry03_1
  108. music_const SFX_CRY_04, SFX_Cry04_1
  109. music_const SFX_CRY_05, SFX_Cry05_1
  110. music_const SFX_CRY_06, SFX_Cry06_1
  111. music_const SFX_CRY_07, SFX_Cry07_1
  112. music_const SFX_CRY_08, SFX_Cry08_1
  113. music_const SFX_CRY_09, SFX_Cry09_1
  114. music_const SFX_CRY_0A, SFX_Cry0A_1
  115. music_const SFX_CRY_0B, SFX_Cry0B_1
  116. music_const SFX_CRY_0C, SFX_Cry0C_1
  117. music_const SFX_CRY_0D, SFX_Cry0D_1
  118. music_const SFX_CRY_0E, SFX_Cry0E_1
  119. music_const SFX_CRY_0F, SFX_Cry0F_1
  120. music_const SFX_CRY_10, SFX_Cry10_1
  121. music_const SFX_CRY_11, SFX_Cry11_1
  122. music_const SFX_CRY_12, SFX_Cry12_1
  123. music_const SFX_CRY_13, SFX_Cry13_1
  124. music_const SFX_CRY_14, SFX_Cry14_1
  125. music_const SFX_CRY_15, SFX_Cry15_1
  126. music_const SFX_CRY_16, SFX_Cry16_1
  127. music_const SFX_CRY_17, SFX_Cry17_1
  128. music_const SFX_CRY_18, SFX_Cry18_1
  129. music_const SFX_CRY_19, SFX_Cry19_1
  130. music_const SFX_CRY_1A, SFX_Cry1A_1
  131. music_const SFX_CRY_1B, SFX_Cry1B_1
  132. music_const SFX_CRY_1C, SFX_Cry1C_1
  133. music_const SFX_CRY_1D, SFX_Cry1D_1
  134. music_const SFX_CRY_1E, SFX_Cry1E_1
  135. music_const SFX_CRY_1F, SFX_Cry1F_1
  136. music_const SFX_CRY_20, SFX_Cry20_1
  137. music_const SFX_CRY_21, SFX_Cry21_1
  138. music_const SFX_CRY_22, SFX_Cry22_1
  139. music_const SFX_CRY_23, SFX_Cry23_1
  140. music_const SFX_CRY_24, SFX_Cry24_1
  141. music_const SFX_CRY_25, SFX_Cry25_1
  142. music_const SFX_GET_ITEM_2, SFX_Get_Item2_1
  143. music_const SFX_TINK, SFX_Tink_1
  144. music_const SFX_HEAL_HP, SFX_Heal_HP_1
  145. music_const SFX_HEAL_AILMENT, SFX_Heal_Ailment_1
  146. music_const SFX_START_MENU, SFX_Start_Menu_1
  147. music_const SFX_PRESS_AB, SFX_Press_AB_1
  148. ; AUDIO_1 AUDIO_3
  149. music_const SFX_GET_ITEM_1, SFX_Get_Item1_1
  150. music_const SFX_POKEDEX_RATING, SFX_Pokedex_Rating_1
  151. music_const SFX_GET_KEY_ITEM, SFX_Get_Key_Item_1
  152. music_const SFX_POISONED, SFX_Poisoned_1
  153. music_const SFX_TRADE_MACHINE, SFX_Trade_Machine_1
  154. music_const SFX_TURN_ON_PC, SFX_Turn_On_PC_1
  155. music_const SFX_TURN_OFF_PC, SFX_Turn_Off_PC_1
  156. music_const SFX_ENTER_PC, SFX_Enter_PC_1
  157. music_const SFX_SHRINK, SFX_Shrink_1
  158. music_const SFX_SWITCH, SFX_Switch_1
  159. music_const SFX_HEALING_MACHINE, SFX_Healing_Machine_1
  160. music_const SFX_TELEPORT_EXIT_1, SFX_Teleport_Exit1_1
  161. music_const SFX_TELEPORT_ENTER_1, SFX_Teleport_Enter1_1
  162. music_const SFX_TELEPORT_EXIT_2, SFX_Teleport_Exit2_1
  163. music_const SFX_LEDGE, SFX_Ledge_1
  164. music_const SFX_TELEPORT_ENTER_2, SFX_Teleport_Enter2_1
  165. music_const SFX_FLY, SFX_Fly_1
  166. music_const SFX_DENIED, SFX_Denied_1
  167. music_const SFX_ARROW_TILES, SFX_Arrow_Tiles_1
  168. music_const SFX_PUSH_BOULDER, SFX_Push_Boulder_1
  169. music_const SFX_SS_ANNE_HORN, SFX_SS_Anne_Horn_1
  170. music_const SFX_WITHDRAW_DEPOSIT, SFX_Withdraw_Deposit_1
  171. music_const SFX_CUT, SFX_Cut_1
  172. music_const SFX_GO_INSIDE, SFX_Go_Inside_1
  173. music_const SFX_SWAP, SFX_Swap_1
  174. music_const SFX_59, SFX_59_1 ; unused, sounds similar to SFX_SLOTS_STOP_WHEEL
  175. music_const SFX_PURCHASE, SFX_Purchase_1
  176. music_const SFX_COLLISION, SFX_Collision_1
  177. music_const SFX_GO_OUTSIDE, SFX_Go_Outside_1
  178. music_const SFX_SAVE, SFX_Save_1
  179. ; AUDIO_1
  180. music_const SFX_POKEFLUTE, SFX_Pokeflute
  181. music_const SFX_SAFARI_ZONE_PA, SFX_Safari_Zone_PA
  182. ; AUDIO_2
  183. music_const SFX_LEVEL_UP, SFX_Level_Up
  184. music_const SFX_BALL_TOSS, SFX_Ball_Toss
  185. music_const SFX_BALL_POOF, SFX_Ball_Poof
  186. music_const SFX_FAINT_THUD, SFX_Faint_Thud
  187. music_const SFX_RUN, SFX_Run
  188. music_const SFX_DEX_PAGE_ADDED, SFX_Dex_Page_Added
  189. music_const SFX_CAUGHT_MON, SFX_Caught_Mon
  190. music_const SFX_PECK, SFX_Peck
  191. music_const SFX_FAINT_FALL, SFX_Faint_Fall
  192. music_const SFX_BATTLE_09, SFX_Battle_09
  193. music_const SFX_POUND, SFX_Pound
  194. music_const SFX_BATTLE_0B, SFX_Battle_0B
  195. music_const SFX_BATTLE_0C, SFX_Battle_0C
  196. music_const SFX_BATTLE_0D, SFX_Battle_0D
  197. music_const SFX_BATTLE_0E, SFX_Battle_0E
  198. music_const SFX_BATTLE_0F, SFX_Battle_0F
  199. music_const SFX_DAMAGE, SFX_Damage
  200. music_const SFX_NOT_VERY_EFFECTIVE, SFX_Not_Very_Effective
  201. music_const SFX_BATTLE_12, SFX_Battle_12
  202. music_const SFX_BATTLE_13, SFX_Battle_13
  203. music_const SFX_BATTLE_14, SFX_Battle_14
  204. music_const SFX_VINE_WHIP, SFX_Vine_Whip
  205. music_const SFX_BATTLE_16, SFX_Battle_16 ; unused?
  206. music_const SFX_BATTLE_17, SFX_Battle_17
  207. music_const SFX_BATTLE_18, SFX_Battle_18
  208. music_const SFX_BATTLE_19, SFX_Battle_19
  209. music_const SFX_SUPER_EFFECTIVE, SFX_Super_Effective
  210. music_const SFX_BATTLE_1B, SFX_Battle_1B
  211. music_const SFX_BATTLE_1C, SFX_Battle_1C
  212. music_const SFX_DOUBLESLAP, SFX_Doubleslap
  213. music_const SFX_BATTLE_1E, SFX_Battle_1E
  214. music_const SFX_HORN_DRILL, SFX_Horn_Drill
  215. music_const SFX_BATTLE_20, SFX_Battle_20
  216. music_const SFX_BATTLE_21, SFX_Battle_21
  217. music_const SFX_BATTLE_22, SFX_Battle_22
  218. music_const SFX_BATTLE_23, SFX_Battle_23
  219. music_const SFX_BATTLE_24, SFX_Battle_24
  220. music_const SFX_BATTLE_25, SFX_Battle_25
  221. music_const SFX_BATTLE_26, SFX_Battle_26
  222. music_const SFX_BATTLE_27, SFX_Battle_27
  223. music_const SFX_BATTLE_28, SFX_Battle_28
  224. music_const SFX_BATTLE_29, SFX_Battle_29
  225. music_const SFX_BATTLE_2A, SFX_Battle_2A
  226. music_const SFX_BATTLE_2B, SFX_Battle_2B
  227. music_const SFX_BATTLE_2C, SFX_Battle_2C
  228. music_const SFX_PSYBEAM, SFX_Psybeam
  229. music_const SFX_BATTLE_2E, SFX_Battle_2E
  230. music_const SFX_BATTLE_2F, SFX_Battle_2F
  231. music_const SFX_PSYCHIC_M, SFX_Psychic_M
  232. music_const SFX_BATTLE_31, SFX_Battle_31
  233. music_const SFX_BATTLE_32, SFX_Battle_32
  234. music_const SFX_BATTLE_33, SFX_Battle_33
  235. music_const SFX_BATTLE_34, SFX_Battle_34
  236. music_const SFX_BATTLE_35, SFX_Battle_35
  237. music_const SFX_BATTLE_36, SFX_Battle_36
  238. music_const SFX_SILPH_SCOPE, SFX_Silph_Scope
  239. ; AUDIO_3
  240. music_const SFX_INTRO_LUNGE, SFX_Intro_Lunge
  241. music_const SFX_INTRO_HIP, SFX_Intro_Hip
  242. music_const SFX_INTRO_HOP, SFX_Intro_Hop
  243. music_const SFX_INTRO_RAISE, SFX_Intro_Raise
  244. music_const SFX_INTRO_CRASH, SFX_Intro_Crash
  245. music_const SFX_INTRO_WHOOSH, SFX_Intro_Whoosh
  246. music_const SFX_SLOTS_STOP_WHEEL, SFX_Slots_Stop_Wheel
  247. music_const SFX_SLOTS_REWARD, SFX_Slots_Reward
  248. music_const SFX_SLOTS_NEW_SPIN, SFX_Slots_New_Spin
  249. music_const SFX_SHOOTING_STAR, SFX_Shooting_Star