説明なし

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // songtable repointing
  2. .org 0x081DD11C
  3. .word _songtable
  4. .org 0x081DD150
  5. .word _songtable
  6. .org 0x081DD19C
  7. .word _songtable
  8. .org 0x081DD1F0
  9. .word _songtable
  10. .org 0x081DD224
  11. .word _songtable
  12. // titlescreen cry id fix
  13. .org 0x080791EE
  14. mov r0, #80
  15. bl (m4aSongNumStart-1) // -1 because armips apparently cannot deal with that +1 in the symbol
  16. nop
  17. // titlescreen music length extension
  18. .org 0x08078C1C
  19. .word 0x18D8 // 53 seconds * 2 (loops) * 60 fps
  20. // high quality mixer installation stuff
  21. .org 0x080007B4
  22. .word 0x0203E000 // new PCM work area
  23. .org 0x081DD0B4
  24. .word main_mixer // new mixer ROM location
  25. .word 0x03005F50 // new mixer RAM location (used for loading)
  26. .halfword mixer_size
  27. .halfword 0x400 // CpuSet, copy code by 32 bit units
  28. .word 0x0203E000 // new PCM work area
  29. .org 0x081DD0C8
  30. // set correct sound driver operation mode
  31. // 12 channels at 31536 Hz samplerate
  32. .byte 0x00, 0xCC, 0x99, 0x00
  33. .org 0x081DC094
  34. .word 0x03005F50+1 // new mixer RAM location (used for branch)
  35. // new cry tables
  36. .org 0x080720C8
  37. .include "patches/disable_cry_table_blocks.s"
  38. .org 0x08043304 // cry-ID = poke-ID
  39. lsl r0, r0, #0x10
  40. lsr r0, r0, #0x10
  41. bx lr
  42. // trainer music overrides
  43. .org 0x0808064C // encounter music ([!] Box) song hook
  44. LDR R1, =mhk_intro_music_id_to_song|1
  45. BL _call_via_r1
  46. B 0x080806BA
  47. .pool
  48. .org 0x08044090
  49. LDR R1, =mhk_current_map_music_set_default_for_battle|1
  50. BX R1
  51. .pool
  52. .org 0x080156FE // trainer victory music hook
  53. LDR R0, =mhk_trainer_battle_play_defeat|1
  54. BL _call_via_r0
  55. B 0x0801576E
  56. .pool
  57. .org 0x08021D46 // wild poke defeated
  58. BL _call_via_r0
  59. .org 0x08021D94
  60. .word mhk_wild_poke_def_music|1
  61. .org 0x0807F9F8
  62. LDR R1, =0x0807FA3E
  63. BL _call_via_r1
  64. MOV R1, R0
  65. B 0x0807FA3E
  66. .pool
  67. .org 0x080159D0
  68. LDR R0, =mhk_fadeout|1
  69. BL _call_via_r0
  70. B 0x080159DC
  71. .pool