;;; General notes ;;; { ; The only calls to this bank are: ; $4:4000 (handle audio) from bank 0 ; $4:4003 (clear sound effects and song) from bank 0 ; $4:4006 (initialise audio) from $01FB (boot) } ;;; $4000: Handle audio ;;; { ; Externally called by: ; $01FB: Boot ; $2C5E: Wait a frame ; $36B0: Game mode 5: dead ; $371B: Game mode 7: game over ; $3A01: ; $3B2F: Game mode Fh ROM4:4000 C3 B3 42 jp 42B3 } ;;; $4003: Clear sound effects and song ;;; { ; Externally called by: ; $2FA2: Start death sequence ; $3ACE: Game mode Ah ; $3B43: Game mode 10h: game cleared ; $3E3F: Game mode 0: boot ROM4:4003 C3 7B 47 jp 477B } ;;; $4006: Initialise audio ;;; { ; Externally called by: ; $01FB: Boot ROM4:4006 C3 52 47 jp 4752 } ;;; $4009: Size of channel song processing state ;;; { ROM4:4009 db 09 } ;;; $400A: Size of all channel song processing states ;;; { ROM4:400A db 2D } ;;; $400B: Size of song processing state ;;; { ROM4:400B db 61 } ;;; $400C: Music notes ;;; { ROM4:400C dw 8000, ; Off-key 64Hz "tone" ; C Db D Eb E F Gb G Ab A Bb B 802C, 809C, 8106, 816B, 81C9, 8223, 8277, 82C6, 8312, 8356, 839B, 83DA, ; Octave 2 8416, 844E, 8483, 84B5, 84E5, 8511, 853B, 8563, 8589, 85AC, 85CE, 85ED, ; Octave 3 860A, 8627, 8642, 865B, 8672, 8689, 869E, 86B2, 86C4, 86D6, 86E7, 86F7, ; Octave 4 8706, 8714, 8721, 872D, 8739, 8744, 874F, 8759, 8762, 876B, 8773, 877B, ; Octave 5 8783, 878A, 8790, 8797, 879D, 87A2, 87A7, 87AC, 87B1, 87B6, 87BA, 87BE, ; Octave 6 87C1, 87C4, 87C8, 87CB, 87CE, 87D1, 87D4, 87D6, 87D9, 87DB, 87DD, 87DF ; Octave 7 } ;;; $409E: Song instruction timer arrays ;;; { ; One of these pointers will be loaded by an F2 pppp song instruction, then subsequent Ax instructions will set the next instruction timer ; Essentially, this means that the F2 pppp song instruction controls the tempo of the song ; _________________________________________________ 0: 1/64. Hemidemisemiquaver ; | _____________________________________________ 1: 1/32. Demisemiquaver ; | | _________________________________________ 2: 1/16. Semiquaver ; | | | _____________________________________ 3: 1/8. Quaver ; | | | | _________________________________ 4: 1/4. Crochet ; | | | | | _____________________________ 5: 1/2. Minum ; | | | | | | _________________________ 6: 3/32. Dotted semiquaver ; | | | | | | | _____________________ 7: 3/16. Dotted quaver ; | | | | | | | | _________________ 8: 3/8. Dotted crochet ; | | | | | | | | | _____________ 9: 1/24. Triplet semiquaver ; | | | | | | | | | | _________ Ah: 1/12. Triplet quaver ; | | | | | | | | | | | _____ Bh: 1/128. Semihemidemisemiquaver ; | | | | | | | | | | | | _ Ch: 1. Semibreve ; | | | | | | | | | | | | | ROM4:409E db 01, 01, 02, 04, 08, 10, 03, 06, 0C, 01, 03, 01, 20 ; 448 bpm ROM4:40AB db 01, 02, 04, 08, 10, 20, 06, 0C, 18, 02, 05, 01, 40 ; 224 bpm ROM4:40B8 db 02, 03, 06, 0C, 18, 30, 09, 12, 24, 04, 08, 01, 60 ; 149 bpm ROM4:40C5 db 02, 04, 08, 10, 20, 40, 0C, 18, 30, 05, 0A, 01, 80 ; 112 bpm ROM4:40D2 db 03, 05, 0A, 14, 28, 50, 0F, 1E, 3C, 07, 0E, 01, A0 ; 90 bpm ROM4:40DF db 03, 06, 0C, 18, 30, 60, 12, 24, 48, 08, 10, 02, C0 ; 75 bpm ROM4:40EC db 03, 07, 0E, 1C, 38, 70, 15, 2A, 54, 09, 12, 02, E0 ; 64 bpm ROM4:40F9 db 04, 08, 10, 20, 40, 80, 18, 30, 60, 0A, 14, 02, FF ; 56 bpm ROM4:4106 db 04, 09, 12, 24, 48, 90, 1B, 36, 6C, 0C, 1A, 02, FF ; 50 bpm } ;;; $4113: Wave patterns ;;; { ROM4:4113 db EE, EE, A5, E5, E0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ROM4:4123 db CC, CC, 82, C3, C0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00 ; Unused ROM4:4133 db 77, 77, 51, A2, 80, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, FE, DC, BA, 98, 8A, A8, 32, 10, FE, ED, DB, A9, 87, 65, 31, 00, 99, AA, BB, CC, BB, AA, 77, 33, 11, 34, 67, 89, AA, A7, 87, 78, AB, EF, FE, DA, 97, 43, 11, 31 ROM4:416B db EE, EE, EE, 00, 00, 00, EE, EE, EE, 00, 00, 00, EE, 00, EE, 00 ROM4:417B db AA, AA, AA, 00, 00, 00, AA, AA, AA, 00, 00, 00, AA, 00, AA, 00 ROM4:418B db 77, 77, 77, 00, 00, 00, 77, 77, 77, 00, 00, 00, 77, 00, 77, 00 ROM4:419B db 44, 00, 22, 00, 00, 00, 22, 44, 44, 00, 00, 00, 33, 00, 44, 00 ROM4:41AB db FF, FF, 00, 00, FF, FF, 00, 00, FF, FF, 00, 00, FF, FF, 00, 00 } ;;; $41BB: Song noise channel option sets ;;; { ; Used by songs ; Sound length ; 00tttttt ; Sound length = 0.25 * (1 - t/40h) seconds ; ; Envelope ; vvvvdttt ; Envelope step length = t/8 * 0.125 seconds ; d: Envelope direction. 0: Decrease, 1: Increase ; v: Initial volume ; ; Polynomial counter ; nnnnwaaa ; If a = 0: ; Frequency = 80000h / 2^n hertz ; Else: ; Frequency = 40000h / (a * 2^n) hertz ; w: Counter width. 0: 7 bits, 1: 15 bits ; ; Counter control ; rs000000 ; r: Restart sound ; s: Stop output after sound has finished (according to sound length) ; __________ Sound length ; | _______ Envelope ; | | ____ Polynomial counter ; | | | _ Counter control ; | | | | ROM4:41BB db 00,08,00,80, 00,21,3D,80, ; Can never be used (in song handler, '1' disables sound channel) 30,40,31,C0, 00,31,3E,80, 35,F7,6E,C0, 30,61,4B,C0, 30,C1,6D,C0, 00,81,4B,80, 00,F6,6D,80, 00,B6,6D,80, 00,77,6D,80, 00,47,6D,80, 00,97,6B,80, 00,77,6B,80, 00,57,6B,80, 00,37,6B,80, 00,80,6D,80, 00,40,4D,80, 00,1F,47,80, 00,40,47,80, 00,40,46,80, 00,40,45,80, 00,40,44,80, 00,40,43,80, 00,40,42,80, 00,40,41,80, 00,1B,37,80, 00,A5,27,80, 00,1F,37,80, 00,27,46,80, 00,27,45,80, 00,1B,6B,80, 00,1A,6B,80, 00,19,6B,80, 00,1F,37,80, 00,1C,6C,80, 00,51,4D,80, 30,F1,6F,C0, 38,A1,3B,C0, 38,A1,3A,C0, 00,F4,7A,80, 00,F4,7B,80 } ;;; $4263..B2: Song sound channel effect tables ;;; { ; $CF37 = 2 ROM4:4263 db 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 01 ; $CF37 = 3 ROM4:4273 db 08, 10, 18, 20, 28, 30, 38, 40, 38, 30, 28, 20, 18, 10, 08, 00 ; $CF37 = 4 ROM4:4283 db 00, 05, 00, 05, 00, 05, 00, 05, 05, 00, 05, 00, 05, 00, 05, 00 ; $CF37 = 9 ROM4:4293 db 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01, 01 ; $CF37 = Ah ROM4:42A3 db 03, 03, 03, 03, 03, 03, 03, 03, 03, 03, 03, 03, 03, 03, 03, 03 } ;;; $42B3: Handle audio ;;; { ; Called by main game loop, wait a frame, dead, game over, $3A01, game mode Fh ROM4:42B3 FA C7 CF ld a,(CFC7) ;\ ROM4:42B6 FE 01 cp 01 ;} If [audio pause control] = pause: go to audio pause ROM4:42B8 CA 01 48 jp z,4801 ;/ ROM4:42BB FE 02 cp 02 ;\ ROM4:42BD CA 46 48 jp z,4846 ;} If [audio pause control] = unpause: go to audio unpause ROM4:42C0 FA C8 CF ld a,(CFC8) ;\ ROM4:42C3 A7 and a ;} If [audio pause sound effect timer] != 0: go to handle audio - paused ROM4:42C4 C2 52 48 jp nz,4852 ;/ } ;;; $42C7: Handle audio - handle song interruption request ;;; { ; Called by handle audio and audio unpause ROM4:42C7 FA DE CE ld a,(CEDE) ;\ ROM4:42CA A7 and a ;} If [song interruption request] = 0: go to handle audio - handle song interruption playing ROM4:42CB 28 1D jr z,42EA ;/ ROM4:42CD FE 01 cp 01 ;\ ROM4:42CF 28 5A jr z,432B ;} If [song interruption request] = 1: go to play item-get music ROM4:42D1 FE 03 cp 03 ;\ ROM4:42D3 CA 90 43 jp z,4390 ;} If [song interruption request] = 3: go to start ending song interruption ROM4:42D6 FE 05 cp 05 ;\ ROM4:42D8 28 5B jr z,4335 ;} If [song interruption request] = 5: go to play missile pickup music ROM4:42DA FE 08 cp 08 ;\ ROM4:42DC CA FB 43 jp z,43FB ;} If [song interruption request] = 8: go to handle audio - initiate fading out music ROM4:42DF FE 0E cp 0E ;\ ROM4:42E1 28 5C jr z,433F ;} If [song interruption request] = Eh: go to play earthquake ROM4:42E3 FE FF cp FF ;\ ROM4:42E5 CC 23 43 call z,4323 ;} If [song interruption request] = FFh: clear song interruption ROM4:42E8 18 10 jr 42FA ; Go to handle song and sound effects } ;;; $42EA: Handle audio - handle song interruption playing ;;; { ROM4:42EA FA DF CE ld a,(CEDF) ROM4:42ED A7 and a ROM4:42EE 28 0A jr z,42FA ROM4:42F0 FE 02 cp 02 ;\ ROM4:42F2 CA C4 43 jp z,43C4 ;} If [song interruption playing] = 2: go to finish ending song interruption ROM4:42F5 FE 08 cp 08 ;\ ROM4:42F7 CA 18 44 jp z,4418 ;} If [song interruption playing] = 8: go to handle audio - handle fading out music } ;;; $42FA: Handle song and sound effects ;;; { ROM4:42FA CD 7C 45 call 457C ; Handle song ROM4:42FD CD CF 44 call 44CF ; Handle noise channel sound effect ROM4:4300 CD 6B 44 call 446B ; Handle tone/sweep channel sound effect ROM4:4303 CD A4 44 call 44A4 ; Handle tone channel sound effect ROM4:4306 CD 12 45 call 4512 ; Handle wave channel sound effect ROM4:4309 AF xor a ROM4:430A EA DC CE ld (CEDC),a ; Clear song request ROM4:430D EA D5 CE ld (CED5),a ;\ ROM4:4310 EA C0 CE ld (CEC0),a ;| ROM4:4313 EA C7 CE ld (CEC7),a ;} Clear sound effect requests ROM4:4316 EA CE CE ld (CECE),a ;/ ROM4:4319 EA DE CE ld (CEDE),a ; Clear song interruption request ROM4:431C EA E5 CF ld (CFE5),a ; Clear low health beep sound effect request ROM4:431F EA C7 CF ld (CFC7),a ; Clear audio pause control ROM4:4322 C9 ret } ;;; $4323: Clear song interruption ;;; { ; Called by $42C7: handle audio - handle song interruption request ROM4:4323 AF xor a ROM4:4324 EA DE CE ld (CEDE),a ; Clear song interruption request ROM4:4327 EA DF CE ld (CEDF),a ; Clear song interruption playing ROM4:432A C9 ret } ;;; $432B: Play song interruption - item-get ;;; { ROM4:432B EA DF CE ld (CEDF),a ; Song interruption playing = 1 ROM4:432E 3E 0A ld a,0A ;\ ROM4:4330 EA DC CE ld (CEDC),a ;} Song request = item-get ROM4:4333 18 10 jr 4345 ; Go to play song interruption } ;;; $4335: Play song interruption - missile pickup ;;; { ROM4:4335 EA DF CE ld (CEDF),a ; Song interruption playing = 5 ROM4:4338 3E 20 ld a,20 ;\ ROM4:433A EA DC CE ld (CEDC),a ;} Song request = missile pickup ROM4:433D 18 06 jr 4345 ; Go to play song interruption } ;;; $433F: Play song interruption - earthquake ;;; { ROM4:433F EA DF CE ld (CEDF),a ;\ ROM4:4342 EA DC CE ld (CEDC),a ;} Song request = song interruption playing = earthquake } ;;; $4345: Play song interruption ;;; { ROM4:4345 FA DD CE ld a,(CEDD) ;\ ROM4:4348 EA C5 CF ld (CFC5),a ;} Backup of song playing = [song playing] ROM4:434B FA DE CE ld a,(CEDE) ;\ ROM4:434E FE 0E cp 0E ;} If [song interruption request] != earthquake: ROM4:4350 28 0A jr z,435C ;/ ROM4:4352 FA E6 CF ld a,(CFE6) ;\ ROM4:4355 EA E7 CF ld (CFE7),a ;} Backup of low health beep sound effect playing = [low health beep sound effect playing] ROM4:4358 AF xor a ;\ ROM4:4359 EA E6 CF ld (CFE6),a ;} Low health beep sound effect playing = 0 ROM4:435C FA EC CF ld a,(CFEC) ;\ ROM4:435F EA ED CF ld (CFED),a ;} Backup of audio channel output stereo flags = [audio channel output stereo flags] ROM4:4362 FA 10 CF ld a,(CF10) ;\ ROM4:4365 EA C9 CF ld (CFC9),a ;} Backup of tone/sweep channel sweep = [tone/sweep channel sweep] ROM4:4368 21 61 CF ld hl,CF61 ;\ ROM4:436B 11 00 CF ld de,CF00 ;| ROM4:436E FA 0B 40 ld a,(400B) ;| ROM4:4371 47 ld b,a ;| ;| ROM4:4372 1A ld a,(de) ;| ROM4:4373 22 ldi (hl),a ;} Backup of song processing state = [song processing state] ROM4:4374 13 inc de ;| ROM4:4375 05 dec b ;| ROM4:4376 78 ld a,b ;| ROM4:4377 A7 and a ;| ROM4:4378 20 F8 jr nz,4372 ;/ ROM4:437A CD B3 47 call 47B3 ; Mute sound channels ROM4:437D EA DE CE ld (CEDE),a ; Clear song interruption request ROM4:4380 EA C0 CE ld (CEC0),a ; Clear tone/sweep channel sound effect request ROM4:4383 EA C1 CE ld (CEC1),a ; Clear tone/sweep channel sound effect playing ROM4:4386 EA D5 CE ld (CED5),a ; Clear noise channel sound effect request ROM4:4389 EA D6 CE ld (CED6),a ; Clear noise channel sound effect playing ROM4:438C EA E7 CE ld (CEE7),a ; Clear noise channel sound effect is playing flag ROM4:438F C9 ret } ;;; $4390: Start ending song interruption ;;; { ROM4:4390 3D dec a ;\ ROM4:4391 EA DF CE ld (CEDF),a ;} Song interruption playing = 2 ROM4:4394 21 00 CF ld hl,CF00 ;\ ROM4:4397 11 61 CF ld de,CF61 ;| ROM4:439A FA 0B 40 ld a,(400B) ;| ROM4:439D 47 ld b,a ;| ;| ROM4:439E 1A ld a,(de) ;| ROM4:439F 22 ldi (hl),a ;} Song processing state = [backup of song processing state] ROM4:43A0 13 inc de ;| ROM4:43A1 05 dec b ;| ROM4:43A2 78 ld a,b ;| ROM4:43A3 A7 and a ;| ROM4:43A4 20 F8 jr nz,439E ;/ ROM4:43A6 21 10 CF ld hl,CF10 ;\ ROM4:43A9 11 10 FF ld de,FF10 ;| ;| ROM4:43AC 2A ldi a,(hl) ;| ROM4:43AD 12 ld (de),a ;} Set IO audio channel options ROM4:43AE 1C inc e ;| ROM4:43AF 7B ld a,e ;| ROM4:43B0 FE 24 cp 24 ;| ROM4:43B2 20 F8 jr nz,43AC ;/ ROM4:43B4 AF xor a ;\ ROM4:43B5 EA DE CE ld (CEDE),a ;} Song interruption request = 0 ROM4:43B8 3E FF ld a,FF ;\ ROM4:43BA EA C0 CE ld (CEC0),a ;| ROM4:43BD EA C7 CE ld (CEC7),a ;} Sound effect requests = 0 ROM4:43C0 EA D5 CE ld (CED5),a ;/ ROM4:43C3 C9 ret } ;;; $43C4: Finish ending song interruption ;;; { ROM4:43C4 FA 09 CF ld a,(CF09) ;\ ROM4:43C7 5F ld e,a ;| ROM4:43C8 FA 0A CF ld a,(CF0A) ;} de = [song wave pattern data pointer] ROM4:43CB 57 ld d,a ;/ ROM4:43CC AF xor a ;\ ROM4:43CD E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:43CF CD C9 47 call 47C9 ; Write [[de]..[de]+Fh] to wave pattern RAM ROM4:43D2 FA DD CE ld a,(CEDD) ;\ ROM4:43D5 FE 0E cp 0E ;} If [song playing] != earthquake: ROM4:43D7 28 06 jr z,43DF ;/ ROM4:43D9 FA E7 CF ld a,(CFE7) ;\ ROM4:43DC EA E6 CF ld (CFE6),a ;} Low health beep sound effect playing = [backup of low health beep sound effect playing] ROM4:43DF FA ED CF ld a,(CFED) ;\ ROM4:43E2 EA EC CF ld (CFEC),a ;} Audio channel output stereo flags = [backup of audio channel output stereo flags] ROM4:43E5 E0 25 ld (FF00+25),a ; IO audio channel output stereo flags = [audio channel output stereo flags] ROM4:43E7 FA C9 CF ld a,(CFC9) ;\ ROM4:43EA EA 10 CF ld (CF10),a ;} Tone/sweep channel sweep = [backup of tone/sweep channel sweep] ROM4:43ED AF xor a ROM4:43EE EA DF CE ld (CEDF),a ; Song interruption playing = 0 ROM4:43F1 EA EB CF ld (CFEB),a ; $CFEB = 0 ROM4:43F4 FA C5 CF ld a,(CFC5) ;\ ROM4:43F7 EA DD CE ld (CEDD),a ;} Song playing = [backup of song playing] ROM4:43FA C9 ret } ;;; $43FB: Handle audio - initiate fading out music ;;; { ROM4:43FB EA DF CE ld (CEDF),a ; Song interruption playing = 8 ROM4:43FE 3E D0 ld a,D0 ;\ ROM4:4400 EA 5C CF ld (CF5C),a ;} Song fadeout timer = D0h ROM4:4403 FA 3E CF ld a,(CF3E) ;\ ROM4:4406 EA 5D CF ld (CF5D),a ;} $CF5D = [tone/sweep sound envelope] ROM4:4409 FA 47 CF ld a,(CF47) ;\ ROM4:440C EA 5E CF ld (CF5E),a ;} $CF5E = [tone sound envelope] ROM4:440F FA 50 CF ld a,(CF50) ;\ ROM4:4412 EA 5F CF ld (CF5F),a ;} $CF5F = [wave volume] ROM4:4415 C3 FA 42 jp 42FA ; Go to handle song and sound effects } ;;; $4418: Handle audio - handle fading out music ;;; { ROM4:4418 FA 5C CF ld a,(CF5C) ;\ ROM4:441B 3D dec a ;} Decrement song fadeout timer ROM4:441C EA 5C CF ld (CF5C),a ;/ ROM4:441F FE A0 cp A0 ;\ ROM4:4421 28 12 jr z,4435 ;} If [song fadeout timer] = A0h: go to BRANCH_A0 ROM4:4423 FE 70 cp 70 ;\ ROM4:4425 28 12 jr z,4439 ;} If [song fadeout timer] = 70h: go to BRANCH_70 ROM4:4427 FE 30 cp 30 ;\ ROM4:4429 28 1E jr z,4449 ;} If [song fadeout timer] = 30h: go to BRANCH_30 ROM4:442B FE 10 cp 10 ;\ ROM4:442D 28 1E jr z,444D ;} If [song fadeout timer] = 10h: go to BRANCH_10 ROM4:442F A7 and a ;\ ROM4:4430 28 2F jr z,4461 ;} If [song fadeout timer] = 0: go to BRANCH_0 ROM4:4432 C3 FA 42 jp 42FA ; Go to handle song and sound effects ; BRANCH_A0 ROM4:4435 3E 65 ld a,65 ; a = 65h ROM4:4437 18 16 jr 444F ; Go to BRANCH_MERGE ; BRANCH_70 ROM4:4439 AF xor a ;\ ROM4:443A EA 07 CF ld (CF07),a ;} Song noise channel enable = 0 ROM4:443D 3E 60 ld a,60 ;\ ROM4:443F EA 50 CF ld (CF50),a ;} Wave volume = $CF5F = 60h ROM4:4442 EA 5F CF ld (CF5F),a ;/ ROM4:4445 3E 45 ld a,45 ; a = 45h ROM4:4447 18 06 jr 444F ; Go to BRANCH_MERGE ; BRANCH_30 ROM4:4449 3E 25 ld a,25 ; a = 25h ROM4:444B 18 02 jr 444F ; Go to BRANCH_MERGE ; BRANCH_10 ROM4:444D 3E 13 ld a,13 ; a = 13h ; BRANCH_MERGE ROM4:444F EA 3E CF ld (CF3E),a ; Tone/sweep sound envelope = [a] ROM4:4452 EA 47 CF ld (CF47),a ; Tone sound envelope = [a] ROM4:4455 EA 59 CF ld (CF59),a ; Noise sound envelope = [a] ROM4:4458 EA 5D CF ld (CF5D),a ; $CF5D = [a] ROM4:445B EA 5E CF ld (CF5E),a ; $CF5E = [a] ROM4:445E C3 FA 42 jp 42FA ; Go to handle song and sound effects ; BRANCH_0 ROM4:4461 AF xor a ;\ ROM4:4462 EA DD CE ld (CEDD),a ;} Song playing = song interruption request = 0 ROM4:4465 EA DF CE ld (CEDF),a ;/ ROM4:4468 C3 B4 45 jp 45B4 ; Go to disable sound channels } ;;; $446B: Handle tone/sweep channel sound effect ;;; { ; Called by handle song and sound effects ROM4:446B FA C0 CE ld a,(CEC0) ;\ ROM4:446E A7 and a ;} If [tone/sweep channel sound effect request] = 0: go to handle tone/sweep channel sound effect playing ROM4:446F 28 1E jr z,448F ;/ ROM4:4471 FE FF cp FF ;\ ROM4:4473 CA F5 46 jp z,46F5 ;} If [tone/sweep channel sound effect request] = FFh: go to clear tone/sweep channel sound effect ROM4:4476 FE 1F cp 1F ;\ ROM4:4478 30 15 jr nc,448F ;} If [tone/sweep channel sound effect request] >= 1Fh: go to handle tone/sweep channel sound effect playing ROM4:447A FA C1 CE ld a,(CEC1) ;\ ROM4:447D FE 0C cp 0C ;} If [tone/sweep channel sound effect playing] = picked up missile drop: go to handle tone/sweep channel sound effect playing ROM4:447F 28 0E jr z,448F ;/ ROM4:4481 FE 18 cp 18 ;\ ROM4:4483 28 0A jr z,448F ;} If [tone/sweep channel sound effect playing] = Samus' health changed: go to handle tone/sweep channel sound effect playing ROM4:4485 FA C0 CE ld a,(CEC0) ;\ ROM4:4488 21 C4 4E ld hl,4EC4 ;| ROM4:448B CD DE 46 call 46DE ;} Go to [$4EC4 + ([tone/sweep channel sound effect request] - 1) * 2] ROM4:448E E9 jp hl ;/ } ;;; $448F: Handle tone/sweep channel sound effect playing ;;; { ROM4:448F FA C1 CE ld a,(CEC1) ;\ ROM4:4492 A7 and a ;} If [tone/sweep channel sound effect playing] = 0: return ROM4:4493 C8 ret z ;/ ROM4:4494 FE 1F cp 1F ;\ ROM4:4496 30 07 jr nc,449F ;} If [tone/sweep channel sound effect playing] < 1Fh: ROM4:4498 21 00 4F ld hl,4F00 ;\ ROM4:449B CD DE 46 call 46DE ;} Go to [$4F00 + ([tone/sweep channel sound effect playing] - 1) * 2] ROM4:449E E9 jp hl ;/ ROM4:449F AF xor a ;\ ROM4:44A0 EA C1 CE ld (CEC1),a ;} Tone/sweep channel sound effect playing = 0 ROM4:44A3 C9 ret } ;;; $44A4: Handle tone channel sound effect ;;; { ; Called by handle song and sound effects ROM4:44A4 FA C7 CE ld a,(CEC7) ;\ ROM4:44A7 A7 and a ;} If [tone channel sound effect request] != 0: ROM4:44A8 28 10 jr z,44BA ;/ ROM4:44AA FE FF cp FF ;\ ROM4:44AC CA 02 47 jp z,4702 ;} If [tone channel sound effect request] = FFh: go to clear tone channel sound effect ROM4:44AF FE 08 cp 08 ;\ ROM4:44B1 30 07 jr nc,44BA ;} If [tone channel sound effect request] < 8: ROM4:44B3 21 F2 55 ld hl,55F2 ;\ ROM4:44B6 CD DE 46 call 46DE ;} Go to [$55F2 + ([tone channel sound effect request] - 1) * 2] ROM4:44B9 E9 jp hl ;/ ROM4:44BA FA C8 CE ld a,(CEC8) ;\ ROM4:44BD A7 and a ;} If [tone channel sound effect playing] = 0: return ROM4:44BE C8 ret z ;/ ROM4:44BF FE 08 cp 08 ;\ ROM4:44C1 30 07 jr nc,44CA ;} If [tone channel sound effect playing] < 8: ROM4:44C3 21 00 56 ld hl,5600 ;\ ROM4:44C6 CD DE 46 call 46DE ;} Go to [$5600 + ([tone channel sound effect playing] - 1) * 2] ROM4:44C9 E9 jp hl ;/ ROM4:44CA AF xor a ;\ ROM4:44CB EA C8 CE ld (CEC8),a ;} Tone channel sound effect playing = 0 ROM4:44CE C9 ret } ;;; $44CF: Handle noise channel sound effect ;;; { ; Called by handle song and sound effects ROM4:44CF FA D5 CE ld a,(CED5) ;\ ROM4:44D2 A7 and a ;} If [noise channel sound effect request] = 0: go to handle noise channel sound effect playing ROM4:44D3 28 28 jr z,44FD ;/ ROM4:44D5 FE FF cp FF ;\ ROM4:44D7 CA 0F 47 jp z,470F ;} If [noise channel sound effect request] = FFh: go to clear noise channel sound effect ROM4:44DA FE 1B cp 1B ;\ ROM4:44DC 30 1F jr nc,44FD ;} If [noise channel sound effect request] >= 1Bh: go to handle noise channel sound effect playing ROM4:44DE FA DD CE ld a,(CEDD) ;\ ROM4:44E1 FE 0E cp 0E ;} If [song playing] = earthquake: return ROM4:44E3 C8 ret z ;/ ROM4:44E4 FA D6 CE ld a,(CED6) ;\ ROM4:44E7 FE 0D cp 0D ;} If [noise channel sound effect playing] = metroid killed: go to handle noise channel sound effect playing ROM4:44E9 28 12 jr z,44FD ;/ ROM4:44EB FE 0E cp 0E ;\ ROM4:44ED 28 0E jr z,44FD ;} If [noise channel sound effect playing] = Eh: go to handle noise channel sound effect playing ROM4:44EF FE 0F cp 0F ;\ ROM4:44F1 28 0A jr z,44FD ;} If [noise channel sound effect playing] = cleared save file: go to handle noise channel sound effect playing ROM4:44F3 FA D5 CE ld a,(CED5) ;\ ROM4:44F6 21 CC 56 ld hl,56CC ;| ROM4:44F9 CD DE 46 call 46DE ;} Go to [$56CC + ([noise channel sound effect request] - 1) * 2] ROM4:44FC E9 jp hl ;/ } ;;; $44FD: Handle noise channel sound effect playing ;;; { ROM4:44FD FA D6 CE ld a,(CED6) ;\ ROM4:4500 A7 and a ;} If [noise channel sound effect playing] = 0: return ROM4:4501 C8 ret z ;/ ROM4:4502 FE 1B cp 1B ;\ ROM4:4504 30 07 jr nc,450D ;} If [noise channel sound effect playing] < 1Bh: ROM4:4506 21 00 57 ld hl,5700 ;\ ROM4:4509 CD DE 46 call 46DE ;} Go to [$5700 + ([noise channel sound effect playing] - 1) * 2] ROM4:450C E9 jp hl ;/ ROM4:450D AF xor a ;\ ROM4:450E EA FD 44 ld (44FD),a ;} Bug, should be $CED6. This branch is never taken anyway though ROM4:4511 C9 ret } ;;; $4512: Handle wave channel sound effect ;;; { ; Called by handle song and sound effects ROM4:4512 FA E5 CF ld a,(CFE5) ;\ ROM4:4515 A7 and a ;} If [wave channel sound effect request] = 0: go to BRANCH_0 ROM4:4516 28 17 jr z,452F ;/ ROM4:4518 FE FF cp FF ;\ ROM4:451A 28 28 jr z,4544 ;} If [wave channel sound effect request] = FFh: go to BRANCH_FF ROM4:451C FE 06 cp 06 ;\ ROM4:451E D0 ret nc ;} If [wave channel sound effect request] >= 6: return ROM4:451F FA E5 CF ld a,(CFE5) ;\ ROM4:4522 EA E6 CE ld (CEE6),a ;} Wave channel sound effect playing = [wave channel sound effect request], set wave channel sound effect is playing flag ROM4:4525 EA E6 CF ld (CFE6),a ;/ ROM4:4528 21 3F 5D ld hl,5D3F ;\ ROM4:452B CD DE 46 call 46DE ;} Go to [$5D3F + ([wave channel sound effect request] - 1) * 2] ROM4:452E E9 jp hl ;/ ; BRANCH_0 ROM4:452F FA E6 CF ld a,(CFE6) ;\ ROM4:4532 A7 and a ;} If [wave channel sound effect playing] = 0: return ROM4:4533 C8 ret z ;/ ROM4:4534 FE 06 cp 06 ;\ ROM4:4536 30 07 jr nc,453F ;} If [wave channel sound effect playing] < 6: ROM4:4538 21 49 5D ld hl,5D49 ;\ ROM4:453B CD DE 46 call 46DE ;} Go to [$5D49 + ([wave channel sound effect playing] - 1) * 2] ROM4:453E E9 jp hl ;/ ROM4:453F AF xor a ;\ ROM4:4540 EA E6 CF ld (CFE6),a ;} Wave channel sound effect playing = 0 ROM4:4543 C9 ret ; BRANCH_FF ROM4:4544 AF xor a ;\ ROM4:4545 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:4547 FA 09 CF ld a,(CF09) ;\ ROM4:454A 5F ld e,a ;| ROM4:454B FA 0A CF ld a,(CF0A) ;} de = [song wave pattern data pointer] ROM4:454E 57 ld d,a ;/ ROM4:454F CD C9 47 call 47C9 ; Write [[de]..[de]+Fh] to wave pattern RAM ROM4:4552 AF xor a ROM4:4553 EA E6 CE ld (CEE6),a ; Clear wave channel sound effect is playing flag ROM4:4556 EA E5 CF ld (CFE5),a ; Wave channel sound effect request = 0 ROM4:4559 EA E6 CF ld (CFE6),a ; Wave channel sound effect playing = 0 ROM4:455C FA DD CE ld a,(CEDD) ;\ ROM4:455F FE 0E cp 0E ;} If [song playing] = earthquake: return ROM4:4561 C8 ret z ;/ ROM4:4562 FA 1A CF ld a,(CF1A) ;\ ROM4:4565 E0 1A ld (FF00+1A),a ;| ROM4:4567 FA 1B CF ld a,(CF1B) ;| ROM4:456A E0 1B ld (FF00+1B),a ;| ROM4:456C FA 1C CF ld a,(CF1C) ;| ROM4:456F E0 1C ld (FF00+1C),a ;} Write wave channel registers ROM4:4571 FA 1D CF ld a,(CF1D) ;| ROM4:4574 E0 1D ld (FF00+1D),a ;| ROM4:4576 FA 1E CF ld a,(CF1E) ;| ROM4:4579 E0 1E ld (FF00+1E),a ;/ ROM4:457B C9 ret } ;;; $457C: Handle song ;;; { ; Called by handle song and sound effects ROM4:457C FA DC CE ld a,(CEDC) ;\ ROM4:457F A7 and a ;} If [song request] = 0: go to handle song playing ROM4:4580 28 50 jr z,45D2 ;/ ROM4:4582 FE FF cp FF ;\ ROM4:4584 28 2E jr z,45B4 ;} If [song request] = FFh: go to disable sound channels ROM4:4586 FE 0F cp 0F ;\ ROM4:4588 20 09 jr nz,4593 ;} If [song request] = killed metroid: ROM4:458A CD 16 47 call 4716 ; Clear tone/sweep channel sound effect ROM4:458D CD 41 47 call 4741 ; Clear noise channel sound effect ROM4:4590 FA DC CE ld a,(CEDC) ROM4:4593 FE 21 cp 21 ;\ ROM4:4595 30 3B jr nc,45D2 ;} If [song request] >= 21h: go to handle song playing ROM4:4597 EA DD CE ld (CEDD),a ; Song playing = [song request] ROM4:459A 3D dec a ;\ ROM4:459B 5F ld e,a ;| ROM4:459C 16 00 ld d,00 ;| ROM4:459E 21 70 5F ld hl,5F70 ;| ROM4:45A1 19 add hl,de ;} Audio channel output stereo flags = [$5F70 + [song request] - 1] ROM4:45A2 7E ld a,(hl) ;| ROM4:45A3 EA EC CF ld (CFEC),a ;| ROM4:45A6 E0 25 ld (FF00+25),a ;/ ROM4:45A8 FA DC CE ld a,(CEDC) ;\ ROM4:45AB 21 30 5F ld hl,5F30 ;} hl = [$5F30 + ([song request] - 1) * 2] ROM4:45AE CD DE 46 call 46DE ;/ ROM4:45B1 C3 A0 48 jp 48A0 ; Go to load song header } ;;; $45B4: Disable sound channels ;;; { ROM4:45B4 AF xor a ROM4:45B5 EA 04 CF ld (CF04),a ; Song tone/sweep channel enable = 0 ROM4:45B8 EA 05 CF ld (CF05),a ; Song tone channel enable = 0 ROM4:45BB EA 06 CF ld (CF06),a ; Song wave channel enable = 0 ROM4:45BE EA 07 CF ld (CF07),a ; Song noise channel enable = 0 ROM4:45C1 CD 1D 47 call 471D ; Disable tone/sweep channel ROM4:45C4 CD 2E 47 call 472E ; Disable tone channel ROM4:45C7 CD 3C 47 call 473C ; Disable wave channel ROM4:45CA C3 48 47 jp 4748 ; Go to disable noise channel } ;;; $45CD: Clear song playing ;;; { ROM4:45CD AF xor a ROM4:45CE EA DD CE ld (CEDD),a ROM4:45D1 C9 ret } ;;; $45D2: Handle song playing ;;; { ROM4:45D2 FA DD CE ld a,(CEDD) ;\ ROM4:45D5 A7 and a ;} If [song playing] = 0: return ROM4:45D6 C8 ret z ;/ ROM4:45D7 FE 21 cp 21 ;\ ROM4:45D9 30 F2 jr nc,45CD ;} If [song playing] >= 21h: go to clear song playing ; Handle tone/sweep channel ROM4:45DB AF xor a ;\ ROM4:45DC EA 08 CF ld (CF08),a ;} Working sound channel options set flag = 0 ROM4:45DF FA 04 CF ld a,(CF04) ;\ ROM4:45E2 A7 and a ;} If [song tone/sweep channel enable] != 0: ROM4:45E3 28 38 jr z,461D ;/ ROM4:45E5 3E 01 ld a,01 ;\ ROM4:45E7 EA 03 CF ld (CF03),a ;} Song working sound channel = 1 ROM4:45EA FA 3F CF ld a,(CF3F) ;\ ROM4:45ED EA 36 CF ld (CF36),a ;} Song working channel instruction timer = [song tone/sweep channel instruction timer] ROM4:45F0 FE 01 cp 01 ;\ ROM4:45F2 CA 7A 49 jp z,497A ;} If [song tone/sweep channel instruction timer] = 1: go to handle song - load next tone/sweep channel sound ROM4:45F5 3D dec a ;\ ROM4:45F6 EA 3F CF ld (CF3F),a ;} Decrement song tone/sweep channel instruction timer ROM4:45F9 FA E4 CE ld a,(CEE4) ;\ ROM4:45FC A7 and a ;} If [tone/sweep channel sound effect is playing flag] = 0: ROM4:45FD 20 1E jr nz,461D ;/ ROM4:45FF FA 40 CF ld a,(CF40) ;\ ROM4:4602 EA 37 CF ld (CF37),a ;} Song working channel effect index = [song tone/sweep channel effect index] ROM4:4605 A7 and a ;\ ROM4:4606 28 15 jr z,461D ;} If [song working channel effect index] != 0: ROM4:4608 FA 13 CF ld a,(CF13) ;\ ROM4:460B 4F ld c,a ;| ROM4:460C FA 14 CF ld a,(CF14) ;} bc = [song tone/sweep channel frequency] ROM4:460F 47 ld b,a ;/ ROM4:4610 CD 75 4D call 4D75 ; Handle song sound channel effect ROM4:4613 FA 0E CF ld a,(CF0E) ;\ ROM4:4616 E0 13 ld (FF00+13),a ;| ROM4:4618 FA 0F CF ld a,(CF0F) ;} IO tone/sweep channel frequency = [song working sound channel frequency] ROM4:461B E0 14 ld (FF00+14),a ;/ } ;;; $461D: Handle song playing - tone channel ;;; { ROM4:461D AF xor a ;\ ROM4:461E EA 08 CF ld (CF08),a ;} Working sound channel options set flag = 0 ROM4:4621 FA 05 CF ld a,(CF05) ;\ ROM4:4624 A7 and a ;} If [song tone channel enable] != 0: ROM4:4625 28 38 jr z,465F ;/ ROM4:4627 3E 02 ld a,02 ;\ ROM4:4629 EA 03 CF ld (CF03),a ;} Song working sound channel = 2 ROM4:462C FA 48 CF ld a,(CF48) ;\ ROM4:462F EA 36 CF ld (CF36),a ;} Song working channel instruction timer = [song tone channel instruction timer] ROM4:4632 FE 01 cp 01 ;\ ROM4:4634 CA F3 49 jp z,49F3 ;} If [song tone channel instruction timer] = 1: go to handle song - load next tone channel sound ROM4:4637 3D dec a ;\ ROM4:4638 EA 48 CF ld (CF48),a ;} Decrement song tone channel instruction timer ROM4:463B FA E5 CE ld a,(CEE5) ;\ ROM4:463E A7 and a ;} If [tone channel sound effect is playing flag] = 0: ROM4:463F 20 1E jr nz,465F ;/ ROM4:4641 FA 49 CF ld a,(CF49) ;\ ROM4:4644 EA 37 CF ld (CF37),a ;} Song working channel effect index = [song tone channel effect index] ROM4:4647 A7 and a ;\ ROM4:4648 28 15 jr z,465F ;} If [song working channel effect index] != 0: ROM4:464A FA 18 CF ld a,(CF18) ;\ ROM4:464D 4F ld c,a ;| ROM4:464E FA 19 CF ld a,(CF19) ;} bc = [song tone channel frequency] ROM4:4651 47 ld b,a ;/ ROM4:4652 CD 75 4D call 4D75 ; Handle song sound channel effect ROM4:4655 FA 0E CF ld a,(CF0E) ;\ ROM4:4658 E0 18 ld (FF00+18),a ;| ROM4:465A FA 0F CF ld a,(CF0F) ;} IO tone channel frequency = [song working sound channel frequency] ROM4:465D E0 19 ld (FF00+19),a ;/ } ;;; $465F: Handle song playing - wave channel ;;; { ROM4:465F AF xor a ;\ ROM4:4660 EA 08 CF ld (CF08),a ;} Working sound channel options set flag = 0 (not used for wave) ROM4:4663 FA 06 CF ld a,(CF06) ;\ ROM4:4666 A7 and a ;} If [song wave channel enable] != 0: ROM4:4667 28 3A jr z,46A3 ;/ ROM4:4669 3E 03 ld a,03 ;\ ROM4:466B EA 03 CF ld (CF03),a ;} Song working sound channel = 3 ROM4:466E FA 51 CF ld a,(CF51) ;\ ROM4:4671 EA 36 CF ld (CF36),a ;} Song working channel instruction timer = [song wave channel instruction timer] ROM4:4674 FE 01 cp 01 ;\ ROM4:4676 CA 81 4A jp z,4A81 ;} If [song wave channel instruction timer] = 1: go to handle song - load next wave channel sound ROM4:4679 3D dec a ;\ ROM4:467A EA 51 CF ld (CF51),a ;} Decrement song wave channel instruction timer ROM4:467D FA E6 CE ld a,(CEE6) ;\ ROM4:4680 A7 and a ;} If [wave channel sound effect is playing flag] = 0: ROM4:4681 20 20 jr nz,46A3 ;/ ROM4:4683 FA 52 CF ld a,(CF52) ;\ ROM4:4686 EA 37 CF ld (CF37),a ;} Song working channel effect index = [song wave channel effect index] ROM4:4689 A7 and a ;\ ROM4:468A 28 17 jr z,46A3 ;} If [song working channel effect index] != 0: ROM4:468C FA 1D CF ld a,(CF1D) ;\ ROM4:468F 4F ld c,a ;| ROM4:4690 FA 1E CF ld a,(CF1E) ;} bc = [song wave channel frequency] ROM4:4693 47 ld b,a ;/ ROM4:4694 CD 75 4D call 4D75 ; Handle song sound channel effect ROM4:4697 FA 0E CF ld a,(CF0E) ;\ ROM4:469A E0 1D ld (FF00+1D),a ;| ROM4:469C FA 0F CF ld a,(CF0F) ;} IO wave channel frequency = [song working sound channel frequency] & 7FFFh ROM4:469F CB BF res 7,a ;| ROM4:46A1 E0 1E ld (FF00+1E),a ;/ } ;;; $46A3: Handle song playing - noise channel / finish ;;; { ROM4:46A3 AF xor a ;\ ROM4:46A4 EA 08 CF ld (CF08),a ;} Working sound channel options set flag = 0 (not used for noise) ROM4:46A7 FA 07 CF ld a,(CF07) ;\ ROM4:46AA A7 and a ;} If [song noise channel enable] != 0: ROM4:46AB 28 15 jr z,46C2 ;/ ROM4:46AD 3E 04 ld a,04 ;\ ROM4:46AF EA 03 CF ld (CF03),a ;} Song working sound channel = 4 ROM4:46B2 FA 5A CF ld a,(CF5A) ;\ ROM4:46B5 EA 36 CF ld (CF36),a ;} Song working channel instruction timer = [song noise channel instruction timer] ROM4:46B8 FE 01 cp 01 ;\ ROM4:46BA CA F6 4A jp z,4AF6 ;} If [song noise channel instruction timer] = 1: go to handle song - load next noise channel sound ROM4:46BD 3D dec a ;\ ROM4:46BE EA 5A CF ld (CF5A),a ;} Decrement song noise channel instruction timer ROM4:46C1 C9 ret ; Return ROM4:46C2 FA 04 CF ld a,(CF04) ;\ ROM4:46C5 A7 and a ;} If [song tone/sweep channel enable] != 0: return ROM4:46C6 C0 ret nz ;/ ROM4:46C7 FA 05 CF ld a,(CF05) ;\ ROM4:46CA A7 and a ;} If [song tone channel enable] != 0: return ROM4:46CB C0 ret nz ;/ ROM4:46CC FA 06 CF ld a,(CF06) ;\ ROM4:46CF A7 and a ;} If [song wave channel enable] != 0: return ROM4:46D0 C0 ret nz ;/ ROM4:46D1 FA 07 CF ld a,(CF07) ROM4:46D4 A7 and a ROM4:46D5 C0 ret nz ROM4:46D6 AF xor a ROM4:46D7 EA DD CE ld (CEDD),a ; Song playing = 0 ROM4:46DA EA DF CE ld (CEDF),a ; Song interruption playing = 0 ROM4:46DD C9 ret } ;;; $46DE: hl = [[hl] + ([a] - 1) * 2] ;;; { ; 1-indexed 2-byte entry table lookup ROM4:46DE 3D dec a ROM4:46DF 87 add a,a ROM4:46E0 06 00 ld b,00 ROM4:46E2 4F ld c,a ROM4:46E3 09 add hl,bc ROM4:46E4 4E ld c,(hl) ROM4:46E5 23 inc hl ROM4:46E6 46 ld b,(hl) ROM4:46E7 69 ld l,c ROM4:46E8 60 ld h,b ROM4:46E9 C9 ret } ;;; $46EA: Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ;;; { ROM4:46EA FA C3 CE ld a,(CEC3) ROM4:46ED A7 and a ROM4:46EE 28 05 jr z,46F5 ROM4:46F0 3D dec a ROM4:46F1 EA C3 CE ld (CEC3),a ROM4:46F4 C9 ret } ;;; $46F5: Clear tone/sweep channel sound effect ;;; { ROM4:46F5 18 1F jr 4716 } ;;; $46F7: Decrement tone channel sound effect timer or clear tone channel sound effect ;;; { ROM4:46F7 FA CA CE ld a,(CECA) ROM4:46FA A7 and a ROM4:46FB 28 05 jr z,4702 ROM4:46FD 3D dec a ROM4:46FE EA CA CE ld (CECA),a ROM4:4701 C9 ret } ;;; $4702: Clear tone channel sound effect ;;; { ROM4:4702 18 23 jr 4727 } ;;; $4704: Decrement noise channel sound effect timer or clear noise channel sound effect ;;; { ROM4:4704 FA D8 CE ld a,(CED8) ROM4:4707 A7 and a ROM4:4708 28 05 jr z,470F ROM4:470A 3D dec a ROM4:470B EA D8 CE ld (CED8),a ROM4:470E C9 ret } ;;; $470F: Clear noise channel sound effect ;;; { ROM4:470F 18 30 jr 4741 } ;;; $4711: Unused. Decrement a or clear sound effects and song ;;; { ROM4:4711 A7 and a ROM4:4712 28 67 jr z,477B ROM4:4714 3D dec a ROM4:4715 C9 ret } ;;; $4716: Clear tone/sweep channel sound effect ;;; { ROM4:4716 AF xor a ROM4:4717 EA C1 CE ld (CEC1),a ; Tone/sweep channel sound effect playing = 0 ROM4:471A EA E4 CE ld (CEE4),a ; Clear tone/sweep channel sound effect is playing flag } ;;; $471D: Disable tone/sweep channel ;;; { ROM4:471D 3E 08 ld a,08 ROM4:471F E0 12 ld (FF00+12),a ROM4:4721 3E 80 ld a,80 ROM4:4723 E0 14 ld (FF00+14),a ROM4:4725 AF xor a ROM4:4726 C9 ret } ;;; $4727: Clear tone channel sound effect ;;; { ROM4:4727 AF xor a ROM4:4728 EA C8 CE ld (CEC8),a ; Tone channel sound effect playing = 0 ROM4:472B EA E5 CE ld (CEE5),a ; Clear tone channel sound effect is playing flag } ;;; $472E: Disable tone channel ;;; { ROM4:472E 3E 08 ld a,08 ROM4:4730 E0 17 ld (FF00+17),a ROM4:4732 3E 80 ld a,80 ROM4:4734 E0 19 ld (FF00+19),a ROM4:4736 AF xor a ROM4:4737 C9 ret } ;;; $4738: Unused. Clear wave channel sound effect ;;; { ; For other sound effect channels, the clear channel sound effect is called by the respective handle channel sound effect. ; For wave channel sound effect though, the $4544 branch of handle wave channel sound effect is executed instead. ROM4:4738 AF xor a ;\ ROM4:4739 EA E6 CE ld (CEE6),a ;} Clear wave channel sound effect is playing flag } ;;; $473C: Disable wave channel ;;; { ROM4:473C AF xor a ROM4:473D E0 1A ld (FF00+1A),a ROM4:473F AF xor a ROM4:4740 C9 ret } ;;; $4741: Clear noise channel sound effect ;;; { ROM4:4741 AF xor a ROM4:4742 EA D6 CE ld (CED6),a ; Noise channel sound effect playing = 0 ROM4:4745 EA E7 CE ld (CEE7),a ; Clear noise channel sound effect is playing flag } ;;; $4748: Disable noise channel ;;; { ROM4:4748 3E 08 ld a,08 ROM4:474A E0 21 ld (FF00+21),a ROM4:474C 3E 80 ld a,80 ROM4:474E E0 23 ld (FF00+23),a ROM4:4750 AF xor a ROM4:4751 C9 ret } ;;; $4752: Initialise audio ;;; { ; Called by boot ROM4:4752 3E 80 ld a,80 ;\ ROM4:4754 E0 26 ld (FF00+26),a ;} Enable sound ROM4:4756 3E 77 ld a,77 ;\ ROM4:4758 E0 24 ld (FF00+24),a ;} Set volume of both outputs to maximum ROM4:475A 3E FF ld a,FF ;\ ROM4:475C E0 25 ld (FF00+25),a ;} Enable all sound channels to both sound outputs ROM4:475E 21 C0 CE ld hl,CEC0 ;\ ;| ROM4:4761 36 00 ld (hl),00 ;| ROM4:4763 23 inc hl ;} Clear audio data ROM4:4764 7C ld a,h ;| ROM4:4765 FE D0 cp D0 ;| ROM4:4767 20 F8 jr nz,4761 ;/ ROM4:4769 C9 ret } ;;; $476A: Clear sound channel 1/2/4 sound effect request ;;; { ROM4:476A AF xor a ROM4:476B EA C0 CE ld (CEC0),a ;\ ROM4:476E EA C7 CE ld (CEC7),a ;| ROM4:4771 EA CE CE ld (CECE),a ;} Clear sound channel 1/2/4 sound effect requests ROM4:4774 EA D5 CE ld (CED5),a ;/ ROM4:4777 EA C7 CF ld (CFC7),a ; Clear audio pause control ROM4:477A C9 ret } ;;; $477B: Clear sound effects and song ;;; { ; Called by start death sequence, game mode Ah, game cleared, boot, unused function $4711 and song instruction F6h+ ROM4:477B 3E FF ld a,FF ;\ ROM4:477D E0 25 ld (FF00+25),a ;} Enable all sound channels to both sound outputs ROM4:477F AF xor a ROM4:4780 EA C0 CE ld (CEC0),a ;\ ROM4:4783 EA C7 CE ld (CEC7),a ;| ROM4:4786 EA CE CE ld (CECE),a ;} Clear sound channel 1/2/4 sound effect requests ROM4:4789 EA D5 CE ld (CED5),a ;/ ROM4:478C EA C1 CE ld (CEC1),a ;\ ROM4:478F EA C8 CE ld (CEC8),a ;| ROM4:4792 EA CF CE ld (CECF),a ;} Clear sound channel 1/2/4 sound effects playing ROM4:4795 EA D6 CE ld (CED6),a ;/ ROM4:4798 3E FF ld a,FF ROM4:479A EA DC CE ld (CEDC),a ; Song request = FFh ROM4:479D EA DD CE ld (CEDD),a ; Song playing = FFh ROM4:47A0 AF xor a ROM4:47A1 EA DE CE ld (CEDE),a ; Clear song interruption request ROM4:47A4 EA DF CE ld (CEDF),a ; Clear song interruption playing ROM4:47A7 EA E5 CF ld (CFE5),a ; Clear low health beep sound effect request ROM4:47AA EA E6 CF ld (CFE6),a ; Clear low health beep sound effect playing ROM4:47AD EA C8 CF ld (CFC8),a ; Clear audio pause sound effect timer ROM4:47B0 EA C7 CF ld (CFC7),a ; Clear audio pause control } ;;; $47B3: Mute sound channels ;;; { ROM4:47B3 3E 08 ld a,08 ;\ ROM4:47B5 E0 12 ld (FF00+12),a ;| ROM4:47B7 E0 17 ld (FF00+17),a ;} Mute sound channels 1/2/4 ROM4:47B9 E0 21 ld (FF00+21),a ;/ ROM4:47BB 3E 80 ld a,80 ;\ ROM4:47BD E0 14 ld (FF00+14),a ;| ROM4:47BF E0 19 ld (FF00+19),a ;} Restart sound channels 1/2/4 (note that restarting sound channel 3 would destroy the contents of wave pattern RAM) ROM4:47C1 E0 23 ld (FF00+23),a ;/ ROM4:47C3 AF xor a ROM4:47C4 E0 10 ld (FF00+10),a ; Disable sweep ROM4:47C6 E0 1A ld (FF00+1A),a ; Disable wave output ROM4:47C8 C9 ret } ;;; $47C9: Write [[de]..[de]+Fh] to wave pattern RAM ;;; { ROM4:47C9 C5 push bc ROM4:47CA D5 push de ROM4:47CB 0E 30 ld c,30 ROM4:47CD 1A ld a,(de) ROM4:47CE E2 ld (FF00+c),a ROM4:47CF 13 inc de ROM4:47D0 0C inc c ROM4:47D1 79 ld a,c ROM4:47D2 FE 40 cp 40 ROM4:47D4 20 F7 jr nz,47CD ROM4:47D6 D1 pop de ROM4:47D7 C1 pop bc ROM4:47D8 C9 ret } ;;; $47D9: Set tone/sweep channel option set [de] ;;; { ROM4:47D9 E5 push hl ROM4:47DA 21 10 FF ld hl,FF10 ROM4:47DD 06 05 ld b,05 ROM4:47DF 18 18 jr 47F9 } ;;; $47E1: Set tone channel option set [de] ;;; { ROM4:47E1 E5 push hl ROM4:47E2 21 16 FF ld hl,FF16 ROM4:47E5 06 04 ld b,04 ROM4:47E7 18 10 jr 47F9 } ;;; $47E9: Set wave channel option set [de] ;;; { ROM4:47E9 E5 push hl ROM4:47EA 21 1A FF ld hl,FF1A ROM4:47ED 06 05 ld b,05 ROM4:47EF 18 08 jr 47F9 } ;;; $47F1: Set noise channel option set [de] ;;; { ROM4:47F1 E5 push hl ROM4:47F2 21 20 FF ld hl,FF20 ROM4:47F5 06 04 ld b,04 ROM4:47F7 18 00 jr 47F9 } ;;; $47F9: Copy [b] bytes from [de] to [hl] and pop hl ;;; { ROM4:47F9 1A ld a,(de) ROM4:47FA 22 ldi (hl),a ROM4:47FB 13 inc de ROM4:47FC 05 dec b ROM4:47FD 20 FA jr nz,47F9 ROM4:47FF E1 pop hl ROM4:4800 C9 ret } ;;; $4801: Audio pause ;;; { ; Execution of $4819 also clears audio pause control ROM4:4801 CD B3 47 call 47B3 ; Mute sound channels ROM4:4804 AF xor a ROM4:4805 EA C1 CE ld (CEC1),a ;\ ROM4:4808 EA C8 CE ld (CEC8),a ;| ROM4:480B EA CF CE ld (CECF),a ;} Clear sound channel 1/2/4 sound effects playing ROM4:480E EA D6 CE ld (CED6),a ;/ ROM4:4811 3E 40 ld a,40 ;\ ROM4:4813 EA C8 CF ld (CFC8),a ;} Audio pause sound effect timer = 40h ROM4:4816 11 7C 48 ld de,487C ; Set noise option set $487C and clear sound channel 1/2/4 sound effect requests } ;;; $4819: Set noise channel option set [de] and clear sound channel 1/2/4 sound effect requests ;;; { ; Also clears audio pause control ROM4:4819 CD F1 47 call 47F1 ; Set noise channel option set [de] ROM4:481C C3 6A 47 jp 476A ; Go to clear sound channel 1/2/4 sound effect requests } ;;; $481F: Handle audio - paused - frame 3Dh ;;; { ROM4:481F 11 80 48 ld de,4880 ;\ ROM4:4822 18 F5 jr 4819 ;} Set noise option set $4880 and clear sound channel 1/2/4 sound effect requests } ;;; $4824: Handle audio - paused - frame 32h ;;; { ROM4:4824 11 8E 48 ld de,488E ;\ ROM4:4827 18 F0 jr 4819 ;} Set noise option set $488E and clear sound channel 1/2/4 sound effect requests } ;;; $4829: Handle audio - paused - frame 27h ;;; { ROM4:4829 11 97 48 ld de,4897 ;\ ROM4:482C 18 EB jr 4819 ;} Set noise option set $4897 and clear sound channel 1/2/4 sound effect requests } ;;; $482E: Handle audio - paused - frame 3Fh ;;; { ROM4:482E 11 84 48 ld de,4884 ; Set tone/sweep option set $4884 and clear sound channel 1/2/4 sound effect requests } ;;; $4831: Set tone/sweep channel option set [de] and clear sound channel 1/2/4 sound effect requests ;;; { ; Also clears audio pause control ROM4:4831 CD D9 47 call 47D9 ; Set tone/sweep channel option set [de] ROM4:4834 C3 6A 47 jp 476A ; Go to clear sound channel 1/2/4 sound effect requests } ;;; $4837: Handle audio - paused - frame 3Ah ;;; { ROM4:4837 11 89 48 ld de,4889 ;\ ROM4:483A 18 F5 jr 4831 ;} Set tone/sweep option set $4889 and clear sound channel 1/2/4 sound effect requests } ;;; $483C: Handle audio - paused - frame 2Fh ;;; { ROM4:483C 11 92 48 ld de,4892 ;\ ROM4:483F 18 F0 jr 4831 ;} Set tone/sweep option set $4892 and clear sound channel 1/2/4 sound effect requests } ;;; $4841: Handle audio - paused - frame 24h ;;; { ROM4:4841 11 9B 48 ld de,489B ;\ ROM4:4844 18 EB jr 4831 ;} Set tone/sweep option set $489B and clear sound channel 1/2/4 sound effect requests } ;;; $4846: Audio unpause ;;; { ROM4:4846 AF xor a ;\ ROM4:4847 EA C8 CF ld (CFC8),a ;} Audio pause sound effect timer = 0 ROM4:484A 3E 1E ld a,1E ;\ ROM4:484C EA C0 CE ld (CEC0),a ;} Tone/sweep channel sound effect request = unpaused ROM4:484F C3 C7 42 jp 42C7 ; Go to handle audio - handle song interruption request } ;;; $4852: Handle audio - paused ;;; { ROM4:4852 21 C8 CF ld hl,CFC8 ;\ ROM4:4855 35 dec (hl) ;} Decrement audio pause sound effect timer ROM4:4856 7E ld a,(hl) ;\ ROM4:4857 FE 3F cp 3F ;} If [audio pause sound effect timer] = 3Fh: go to handle audio - paused - frame 3Fh ROM4:4859 28 D3 jr z,482E ;/ ROM4:485B FE 3D cp 3D ;\ ROM4:485D 28 C0 jr z,481F ;} If [audio pause sound effect timer] = 3Dh: go to handle audio - paused - frame 3Dh ROM4:485F FE 3A cp 3A ;\ ROM4:4861 28 D4 jr z,4837 ;} If [audio pause sound effect timer] = 3Ah: go to handle audio - paused - frame 3Ah ROM4:4863 FE 32 cp 32 ;\ ROM4:4865 28 BD jr z,4824 ;} If [audio pause sound effect timer] = 32h: go to handle audio - paused - frame 32h ROM4:4867 FE 2F cp 2F ;\ ROM4:4869 28 D1 jr z,483C ;} If [audio pause sound effect timer] = 2Fh: go to handle audio - paused - frame 2Fh ROM4:486B FE 27 cp 27 ;\ ROM4:486D 28 BA jr z,4829 ;} If [audio pause sound effect timer] = 27h: go to handle audio - paused - frame 27h ROM4:486F FE 24 cp 24 ;\ ROM4:4871 28 CE jr z,4841 ;} If [audio pause sound effect timer] = 24h: go to handle audio - paused - frame 24h ROM4:4873 FE 10 cp 10 ;\ ROM4:4875 C2 6A 47 jp nz,476A ;} If [audio pause sound effect timer] != 10h: go to clear sound channel 1/2/4 sound effect requests ROM4:4878 34 inc (hl) ; Increment audio pause sound effect timer ROM4:4879 C3 6A 47 jp 476A ; Go to clear sound channel 1/2/4 sound effect requests } ;;; $487C: Handle audio - paused - option sets ;;; { ; Frame 40h ; Noise channel ROM4:487C db 00,87,31,80 ; Frame 3Dh ; Noise channel ROM4:4880 db 00,83,5D,80 ; Frame 3Fh ; Tone/sweep channel ROM4:4884 dx 1D,80,F7,87C0 ; Frame 3Ah ; Tone/sweep channel ROM4:4889 dx 1D,80,C7,87D0 ; Frame 32h ; Noise channel ROM4:488E db 00,53,5C,80 ; Frame 2Fh ; Tone/sweep channel ROM4:4892 dx 1D,80,77,87D5 ; Frame 27h ; Noise channel ROM4:4897 db 00,36,5B,80 ; Frame 24h ; Tone/sweep channel ROM4:489B dx 1D,80,47,87D9 } ;;; $48A0: Load song header ;;; { ROM4:48A0 CD 8E 4E call 4E8E ; Reset song sound channel options ROM4:48A3 2A ldi a,(hl) ; a = [[hl++]] ROM4:48A4 CB 47 bit 0,a ;\ ROM4:48A6 28 07 jr z,48AF ;} If [a] & 1: ROM4:48A8 F5 push af ;\ ROM4:48A9 3E 01 ld a,01 ;| ROM4:48AB EA 60 CF ld (CF60),a ;} Tone channel frequency tweak = 1 ROM4:48AE F1 pop af ;/ ROM4:48AF CB 87 res 0,a ;\ ROM4:48B1 EA 00 CF ld (CF00),a ;} Song transpose = [a] & ~1 ROM4:48B4 2A ldi a,(hl) ;\ ROM4:48B5 EA 02 CF ld (CF02),a ;| ROM4:48B8 2A ldi a,(hl) ;} Song instruction timer array pointer = [[hl++]] ROM4:48B9 EA 01 CF ld (CF01),a ;/ ROM4:48BC 2A ldi a,(hl) ;\ ROM4:48BD EA 39 CF ld (CF39),a ;| ROM4:48C0 2A ldi a,(hl) ;} Song tone/sweep channel section pointer = [[hl++]] ROM4:48C1 EA 38 CF ld (CF38),a ;/ ROM4:48C4 2A ldi a,(hl) ;\ ROM4:48C5 EA 42 CF ld (CF42),a ;| ROM4:48C8 2A ldi a,(hl) ;} Song tone channel section pointer = [[hl++]] ROM4:48C9 EA 41 CF ld (CF41),a ;/ ROM4:48CC 2A ldi a,(hl) ;\ ROM4:48CD EA 4B CF ld (CF4B),a ;| ROM4:48D0 2A ldi a,(hl) ;} Song wave channel section pointer = [[hl++]] ROM4:48D1 EA 4A CF ld (CF4A),a ;/ ROM4:48D4 2A ldi a,(hl) ;\ ROM4:48D5 EA 54 CF ld (CF54),a ;| ROM4:48D8 7E ld a,(hl) ;} Song noise channel section pointer = [[hl]] ROM4:48D9 EA 53 CF ld (CF53),a ;/ ROM4:48DC FA 38 CF ld a,(CF38) ;\ ROM4:48DF 67 ld h,a ;| ROM4:48E0 FA 39 CF ld a,(CF39) ;| ROM4:48E3 6F ld l,a ;| ROM4:48E4 7D ld a,l ;} If [song tone/sweep channel section pointer] = 0: ROM4:48E5 B4 or h ;| ROM4:48E6 20 0E jr nz,48F6 ;/ ROM4:48E8 AF xor a ;\ ROM4:48E9 EA 04 CF ld (CF04),a ;} Song tone/sweep channel enable = 0 ROM4:48EC 3E 08 ld a,08 ;\ ROM4:48EE E0 12 ld (FF00+12),a ;} Disable tone/sweep channel envelope ROM4:48F0 3E 80 ld a,80 ;\ ROM4:48F2 E0 14 ld (FF00+14),a ;} Restart tone/sweep channel ROM4:48F4 18 0D jr 4903 ROM4:48F6 3E 01 ld a,01 ;\ Else ([song tone/sweep channel section pointer] != 0): ROM4:48F8 EA 04 CF ld (CF04),a ;} Song tone/sweep channel enable = 1 ROM4:48FB 2A ldi a,(hl) ;\ ROM4:48FC EA 27 CF ld (CF27),a ;| ROM4:48FF 7E ld a,(hl) ;} Song tone/sweep channel instruction pointer = [[song tone/sweep channel section pointer]] ROM4:4900 EA 26 CF ld (CF26),a ;/ ROM4:4903 FA 41 CF ld a,(CF41) ;\ ROM4:4906 67 ld h,a ;| ROM4:4907 FA 42 CF ld a,(CF42) ;| ROM4:490A 6F ld l,a ;} If [song tone channel section pointer] = 0: ROM4:490B 7D ld a,l ;| ROM4:490C B4 or h ;| ROM4:490D 20 0E jr nz,491D ;/ ROM4:490F AF xor a ;\ ROM4:4910 EA 05 CF ld (CF05),a ;} Song tone channel enable = 0 ROM4:4913 3E 08 ld a,08 ;\ ROM4:4915 E0 17 ld (FF00+17),a ;} Disable tone channel envelope ROM4:4917 3E 80 ld a,80 ;\ ROM4:4919 E0 19 ld (FF00+19),a ;} Restart tone channel ROM4:491B 18 0D jr 492A ROM4:491D 3E 02 ld a,02 ;\ Else ([song tone channel section pointer] != 0): ROM4:491F EA 05 CF ld (CF05),a ;} Song tone channel enable = 2 ROM4:4922 2A ldi a,(hl) ;\ ROM4:4923 EA 29 CF ld (CF29),a ;| ROM4:4926 7E ld a,(hl) ;} Song tone channel instruction pointer = [[song tone channel section pointer]] ROM4:4927 EA 28 CF ld (CF28),a ;/ ROM4:492A FA 4A CF ld a,(CF4A) ;\ ROM4:492D 67 ld h,a ;| ROM4:492E FA 4B CF ld a,(CF4B) ;| ROM4:4931 6F ld l,a ;} If [song wave channel section pointer] = 0: ROM4:4932 7D ld a,l ;| ROM4:4933 B4 or h ;| ROM4:4934 20 09 jr nz,493F ;/ ROM4:4936 AF xor a ;\ ROM4:4937 EA 06 CF ld (CF06),a ;} Song wave channel enable = 0 ROM4:493A AF xor a ;\ ROM4:493B E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:493D 18 0D jr 494C ROM4:493F 3E 03 ld a,03 ;\ Else ([song wave channel section pointer] != 0): ROM4:4941 EA 06 CF ld (CF06),a ;} Song wave channel enable = 3 ROM4:4944 2A ldi a,(hl) ;\ ROM4:4945 EA 2B CF ld (CF2B),a ;| ROM4:4948 7E ld a,(hl) ;} Song wave channel instruction pointer = [[song wave channel section pointer]] ROM4:4949 EA 2A CF ld (CF2A),a ;/ ROM4:494C FA 53 CF ld a,(CF53) ;\ ROM4:494F 67 ld h,a ;| ROM4:4950 FA 54 CF ld a,(CF54) ;| ROM4:4953 6F ld l,a ;} If [song noise channel section pointer] = 0: ROM4:4954 7D ld a,l ;| ROM4:4955 B4 or h ;| ROM4:4956 20 06 jr nz,495E ;/ ROM4:4958 AF xor a ;\ ROM4:4959 EA 07 CF ld (CF07),a ;} Song noise channel enable = 0 ROM4:495C 18 0D jr 496B ROM4:495E 3E 04 ld a,04 ;\ Else ([song noise channel section pointer] != 0): ROM4:4960 EA 07 CF ld (CF07),a ;} Song noise channel enable = 4 ROM4:4963 2A ldi a,(hl) ;\ ROM4:4964 EA 2D CF ld (CF2D),a ;| ROM4:4967 7E ld a,(hl) ;} Song noise channel instruction pointer = [[song noise channel section pointer]] ROM4:4968 EA 2C CF ld (CF2C),a ;/ ROM4:496B 3E 01 ld a,01 ROM4:496D EA 3F CF ld (CF3F),a ; Song tone/sweep channel instruction timer = 1 ROM4:4970 EA 48 CF ld (CF48),a ; Song tone channel instruction timer = 1 ROM4:4973 EA 51 CF ld (CF51),a ; Song wave channel instruction timer = 1 ROM4:4976 EA 5A CF ld (CF5A),a ; Song noise channel instruction timer = 1 ROM4:4979 C9 ret } ;;; $497A: Handle song - load next tone/sweep channel sound ;;; { ROM4:497A 11 38 CF ld de,CF38 ;\ ROM4:497D 21 2F CF ld hl,CF2F ;} Working channel song processing state = [tone/sweep channel song processing state] ROM4:4980 CD 68 4D call 4D68 ;/ ROM4:4983 FA 26 CF ld a,(CF26) ;\ ROM4:4986 67 ld h,a ;| ROM4:4987 FA 27 CF ld a,(CF27) ;} hl = [song tone/sweep channel instruction pointer] ROM4:498A 6F ld l,a ;/ ROM4:498B 3E 01 ld a,01 ; a = 1 ROM4:498D CD 47 4B call 4B47 ; Load next sound ROM4:4990 FA 03 CF ld a,(CF03) ;\ ROM4:4993 EA 04 CF ld (CF04),a ;} Song tone/sweep channel enable = [song working sound channel] ROM4:4996 A7 and a ;\ ROM4:4997 CA 44 4E jp z,4E44 ;} If [song tone/sweep channel enable] = 0: go to reset tone/sweep channel options ROM4:499A 7C ld a,h ;\ ROM4:499B EA 26 CF ld (CF26),a ;| ROM4:499E 7D ld a,l ;} Song tone/sweep channel instruction pointer = [hl] ROM4:499F EA 27 CF ld (CF27),a ;/ ROM4:49A2 21 38 CF ld hl,CF38 ;\ ROM4:49A5 11 2F CF ld de,CF2F ;} Tone/sweep channel song processing state = [working channel song processing state] ROM4:49A8 CD 68 4D call 4D68 ;/ ROM4:49AB FA 08 CF ld a,(CF08) ;\ ROM4:49AE FE 01 cp 01 ;} If [working sound channel options set flag] = 1: ROM4:49B0 20 0C jr nz,49BE ;/ ROM4:49B2 FA 0B CF ld a,(CF0B) ;\ ROM4:49B5 EA 10 CF ld (CF10),a ;} Tone/sweep channel sweep = [working sound channel sweep] ROM4:49B8 FA 0C CF ld a,(CF0C) ;\ ROM4:49BB EA 11 CF ld (CF11),a ;} Tone/sweep channel sound length / wave pattern duty = [working sound channel sound length / wave pattern duty] ROM4:49BE FA 0D CF ld a,(CF0D) ;\ ROM4:49C1 EA 12 CF ld (CF12),a ;} Tone/sweep channel envelope = [working sound channel envelope] ROM4:49C4 FA 0E CF ld a,(CF0E) ;\ ROM4:49C7 EA 13 CF ld (CF13),a ;| ROM4:49CA FA 0F CF ld a,(CF0F) ;} Tone/sweep channel frequency = [working sound channel frequency] ROM4:49CD EA 14 CF ld (CF14),a ;/ ROM4:49D0 FA E4 CE ld a,(CEE4) ;\ ROM4:49D3 A7 and a ;} If [tone/sweep channel sound effect is playing flag] != 0: go to handle song playing - tone channel ROM4:49D4 C2 1D 46 jp nz,461D ;/ ROM4:49D7 FA 10 CF ld a,(CF10) ;\ ROM4:49DA E0 10 ld (FF00+10),a ;| ROM4:49DC FA 11 CF ld a,(CF11) ;| ROM4:49DF E0 11 ld (FF00+11),a ;| ROM4:49E1 FA 12 CF ld a,(CF12) ;| ROM4:49E4 E0 12 ld (FF00+12),a ;} Set IO tone/sweep channel registers ROM4:49E6 FA 13 CF ld a,(CF13) ;| ROM4:49E9 E0 13 ld (FF00+13),a ;| ROM4:49EB FA 14 CF ld a,(CF14) ;| ROM4:49EE E0 14 ld (FF00+14),a ;/ ROM4:49F0 C3 1D 46 jp 461D ; Go to handle song playing - tone channel } ;;; $49F3: Handle song - load next tone channel sound ;;; { ROM4:49F3 11 41 CF ld de,CF41 ;\ ROM4:49F6 21 2F CF ld hl,CF2F ;} Working channel song processing state = [tone channel song processing state] ROM4:49F9 CD 68 4D call 4D68 ;/ ROM4:49FC FA 28 CF ld a,(CF28) ;\ ROM4:49FF 67 ld h,a ;| ROM4:4A00 FA 29 CF ld a,(CF29) ;} hl = [song tone channel instruction pointer] ROM4:4A03 6F ld l,a ;/ ROM4:4A04 3E 02 ld a,02 ; a = 2 ROM4:4A06 CD 47 4B call 4B47 ; Load next sound ROM4:4A09 FA 03 CF ld a,(CF03) ;\ ROM4:4A0C EA 05 CF ld (CF05),a ;} Song tone channel enable = [song working sound channel] ROM4:4A0F A7 and a ;\ ROM4:4A10 CA 59 4E jp z,4E59 ;} If [song tone channel enable] = 0: go to reset tone channel options ROM4:4A13 7C ld a,h ;\ ROM4:4A14 EA 28 CF ld (CF28),a ;| ROM4:4A17 7D ld a,l ;} Song tone channel instruction pointer = [hl] ROM4:4A18 EA 29 CF ld (CF29),a ;/ ROM4:4A1B 21 41 CF ld hl,CF41 ;\ ROM4:4A1E 11 2F CF ld de,CF2F ;} Tone channel song processing state = [working channel song processing state] ROM4:4A21 CD 68 4D call 4D68 ;/ ROM4:4A24 FA 08 CF ld a,(CF08) ;\ ROM4:4A27 FE 02 cp 02 ;} If [working sound channel options set flag] = 2: ROM4:4A29 20 06 jr nz,4A31 ;/ ROM4:4A2B FA 0C CF ld a,(CF0C) ;\ ROM4:4A2E EA 16 CF ld (CF16),a ;} Tone channel sound length / wave pattern duty = [working sound channel sound length / wave pattern duty] ROM4:4A31 FA 0D CF ld a,(CF0D) ;\ ROM4:4A34 EA 17 CF ld (CF17),a ;} Tone channel envelope = [working sound channel envelope] ROM4:4A37 FA 0E CF ld a,(CF0E) ;\ ROM4:4A3A EA 18 CF ld (CF18),a ;| ROM4:4A3D FA 0F CF ld a,(CF0F) ;} Tone channel frequency = [working sound channel frequency] ROM4:4A40 EA 19 CF ld (CF19),a ;/ ROM4:4A43 FA E5 CE ld a,(CEE5) ;\ ROM4:4A46 A7 and a ;} If [tone channel sound effect is playing flag] != 0: go to handle song playing - wave channel ROM4:4A47 C2 5F 46 jp nz,465F ;/ ROM4:4A4A FA 16 CF ld a,(CF16) ;\ ROM4:4A4D E0 16 ld (FF00+16),a ;} Set IO tone channel sound length / wave pattern duty ROM4:4A4F FA 60 CF ld a,(CF60) ;\ ROM4:4A52 FE 01 cp 01 ;} If [tone channel frequency tweak] != 1: go to BRANCH_NO_TWEAK ROM4:4A54 20 19 jr nz,4A6F ;/ ROM4:4A56 FA 18 CF ld a,(CF18) ;\ ROM4:4A59 6F ld l,a ;| ROM4:4A5A FA 19 CF ld a,(CF19) ;} hl = [tone channel frequency] ROM4:4A5D 67 ld h,a ;/ ROM4:4A5E FE 87 cp 87 ;\ ROM4:4A60 30 04 jr nc,4A66 ;} If [tone channel frequency] < 8700h: ROM4:4A62 23 inc hl ;\ ROM4:4A63 23 inc hl ;} hl += 2 ROM4:4A64 18 01 jr 4A67 ; Else ([tone channel frequency] >= 8700h): ROM4:4A66 23 inc hl ; hl += 1 ROM4:4A67 7D ld a,l ;\ ROM4:4A68 EA 18 CF ld (CF18),a ;| ROM4:4A6B 7C ld a,h ;} Tone channel frequency = [hl] ROM4:4A6C EA 19 CF ld (CF19),a ;/ ; BRANCH_NO_TWEAK ROM4:4A6F FA 17 CF ld a,(CF17) ;\ ROM4:4A72 E0 17 ld (FF00+17),a ;} Set IO tone channel envelope ROM4:4A74 FA 18 CF ld a,(CF18) ;\ ROM4:4A77 E0 18 ld (FF00+18),a ;| ROM4:4A79 FA 19 CF ld a,(CF19) ;} Set IO tone channel frequency ROM4:4A7C E0 19 ld (FF00+19),a ;/ ROM4:4A7E C3 5F 46 jp 465F ; Go to handle song playing - wave channel } ;;; $4A81: Handle song - load next wave channel sound ;;; { ROM4:4A81 11 4A CF ld de,CF4A ;\ ROM4:4A84 21 2F CF ld hl,CF2F ;} Working channel song processing state = [wave channel song processing state] ROM4:4A87 CD 68 4D call 4D68 ;/ ROM4:4A8A FA 2A CF ld a,(CF2A) ;\ ROM4:4A8D 67 ld h,a ;| ROM4:4A8E FA 2B CF ld a,(CF2B) ;} hl = [song wave channel instruction pointer] ROM4:4A91 6F ld l,a ;/ ROM4:4A92 3E 03 ld a,03 ; a = 3 ROM4:4A94 CD 47 4B call 4B47 ; Load next sound ROM4:4A97 FA 03 CF ld a,(CF03) ;\ ROM4:4A9A EA 06 CF ld (CF06),a ;} Song wave channel enable = [song working sound channel] ROM4:4A9D A7 and a ;\ ROM4:4A9E CA 6E 4E jp z,4E6E ;} If [song wave channel enable] = 0: go to reset wave channel options ROM4:4AA1 7C ld a,h ;\ ROM4:4AA2 EA 2A CF ld (CF2A),a ;| ROM4:4AA5 7D ld a,l ;} Song wave channel instruction pointer = [hl] ROM4:4AA6 EA 2B CF ld (CF2B),a ;/ ROM4:4AA9 21 4A CF ld hl,CF4A ;\ ROM4:4AAC 11 2F CF ld de,CF2F ;} Wave channel song processing state = [working channel song processing state] ROM4:4AAF CD 68 4D call 4D68 ;/ ROM4:4AB2 FA 0B CF ld a,(CF0B) ;\ ROM4:4AB5 EA 1A CF ld (CF1A),a ;} Wave channel enable = [Working sound channel enable] ROM4:4AB8 FA 0C CF ld a,(CF0C) ;\ ROM4:4ABB EA 1B CF ld (CF1B),a ;} Wave channel sound length = [working sound channel sound length] ROM4:4ABE FA 0D CF ld a,(CF0D) ;\ ROM4:4AC1 EA 1C CF ld (CF1C),a ;} Wave channel volume = [working sound channel volume] ROM4:4AC4 FA 0E CF ld a,(CF0E) ;\ ROM4:4AC7 EA 1D CF ld (CF1D),a ;| ROM4:4ACA FA 0F CF ld a,(CF0F) ;} Wave channel frequency = [working sound channel frequency] ROM4:4ACD EA 1E CF ld (CF1E),a ;/ ROM4:4AD0 FA E6 CE ld a,(CEE6) ;\ ROM4:4AD3 A7 and a ;} If [wave channel sound effect is playing flag] = 0: ROM4:4AD4 C2 A3 46 jp nz,46A3 ;/ ROM4:4AD7 AF xor a ROM4:4AD8 E0 1A ld (FF00+1A),a ROM4:4ADA FA 1A CF ld a,(CF1A) ;\ ROM4:4ADD E0 1A ld (FF00+1A),a ;| ROM4:4ADF FA 1B CF ld a,(CF1B) ;| ROM4:4AE2 E0 1B ld (FF00+1B),a ;| ROM4:4AE4 FA 1C CF ld a,(CF1C) ;| ROM4:4AE7 E0 1C ld (FF00+1C),a ;} Set wave channel registers ROM4:4AE9 FA 1D CF ld a,(CF1D) ;| ROM4:4AEC E0 1D ld (FF00+1D),a ;| ROM4:4AEE FA 1E CF ld a,(CF1E) ;| ROM4:4AF1 E0 1E ld (FF00+1E),a ;/ ROM4:4AF3 C3 A3 46 jp 46A3 ; Go to handle song playing - noise channel } ;;; $4AF6: Handle song - load next noise channel sound ;;; { ROM4:4AF6 11 53 CF ld de,CF53 ;\ ROM4:4AF9 21 2F CF ld hl,CF2F ;} Working channel song processing state = [noise channel song processing state] ROM4:4AFC CD 68 4D call 4D68 ;/ ROM4:4AFF FA 2C CF ld a,(CF2C) ;\ ROM4:4B02 67 ld h,a ;| ROM4:4B03 FA 2D CF ld a,(CF2D) ;} hl = [song noise channel instruction pointer] ROM4:4B06 6F ld l,a ;/ ROM4:4B07 3E 04 ld a,04 ; a = 4 ROM4:4B09 CD 47 4B call 4B47 ; Load next sound ROM4:4B0C FA 03 CF ld a,(CF03) ;\ ROM4:4B0F EA 07 CF ld (CF07),a ;} Song noise channel enable = [song working sound channel] ROM4:4B12 A7 and a ;\ ROM4:4B13 CA 7B 4E jp z,4E7B ;} If [song noise channel enable] = 0: go to reset noise channel options ROM4:4B16 7C ld a,h ;\ ROM4:4B17 EA 2C CF ld (CF2C),a ;| ROM4:4B1A 7D ld a,l ;} Song noise channel instruction pointer = [hl] ROM4:4B1B EA 2D CF ld (CF2D),a ;/ ROM4:4B1E 21 53 CF ld hl,CF53 ;\ ROM4:4B21 11 2F CF ld de,CF2F ;} Noise channel song processing state = [working channel song processing state] ROM4:4B24 CD 68 4D call 4D68 ;/ ROM4:4B27 FA E7 CE ld a,(CEE7) ;\ ROM4:4B2A A7 and a ;} If [noise channel sound effect is playing flag] != 0: return ROM4:4B2B C0 ret nz ;/ ROM4:4B2C FA 0C CF ld a,(CF0C) ;\ ROM4:4B2F E0 20 ld (FF00+20),a ;} IO noise channel sound length = [working sound channel sound length] ROM4:4B31 FA 0D CF ld a,(CF0D) ;\ ROM4:4B34 E0 21 ld (FF00+21),a ;} IO noise channel envelope = [working sound channel envelope] ROM4:4B36 FA 0E CF ld a,(CF0E) ;\ ROM4:4B39 E0 22 ld (FF00+22),a ;} IO noise channel polynomial counter = noise channel polynomial counter = [working sound channel polynomial counter] ROM4:4B3B EA 22 CF ld (CF22),a ;/ ROM4:4B3E FA 0F CF ld a,(CF0F) ;\ ROM4:4B41 E0 23 ld (FF00+23),a ;} IO noise channel counter control = noise channel counter control = [working sound channel counter control] ROM4:4B43 EA 23 CF ld (CF23),a ;/ ROM4:4B46 C9 ret } ;;; $4B47: Load next sound ;;; { ;; Parameters: ;; a: Working sound channel ;; hl: Song instruction pointer list ;; Returns: ;; a: Working sound channel frequency / polynomial counter ROM4:4B47 EA 03 CF ld (CF03),a ; Song working sound channel = [a] ROM4:4B4A 7E ld a,(hl) ;\ ROM4:4B4B A7 and a ;} If [[hl]] != 0: go to LOOP_BETA ROM4:4B4C C2 7F 4B jp nz,4B7F ;/ ; LOOP_ALPHA ROM4:4B4F FA 2F CF ld a,(CF2F) ;\ ROM4:4B52 67 ld h,a ;| ROM4:4B53 FA 30 CF ld a,(CF30) ;| ROM4:4B56 6F ld l,a ;| ROM4:4B57 23 inc hl ;| ROM4:4B58 23 inc hl ;} Song instruction pointer list += 2 ROM4:4B59 7C ld a,h ;| ROM4:4B5A EA 2F CF ld (CF2F),a ;| ROM4:4B5D 7D ld a,l ;| ROM4:4B5E EA 30 CF ld (CF30),a ;/ ROM4:4B61 7E ld a,(hl) ;\ ROM4:4B62 A7 and a ;| ROM4:4B63 20 0A jr nz,4B6F ;| ROM4:4B65 23 inc hl ;} If [[song instruction pointer list]] = 0: ROM4:4B66 3A ldd a,(hl) ;| ROM4:4B67 A7 and a ;| ROM4:4B68 20 05 jr nz,4B6F ;/ ROM4:4B6A AF xor a ;\ ROM4:4B6B EA 03 CF ld (CF03),a ;} Song working sound channel = 0 ROM4:4B6E C9 ret ; Return ROM4:4B6F 7E ld a,(hl) ;\ ROM4:4B70 FE F0 cp F0 ;| ROM4:4B72 20 06 jr nz,4B7A ;| ROM4:4B74 23 inc hl ;} If [[song instruction pointer list]] = 00F0h: ROM4:4B75 3A ldd a,(hl) ;| ROM4:4B76 A7 and a ;/ ROM4:4B77 CC 37 4D call z,4D37 ; Song instruction pointer list = [[song instruction pointer list] + 2] ROM4:4B7A 2A ldi a,(hl) ;\ ROM4:4B7B 47 ld b,a ;| ROM4:4B7C 7E ld a,(hl) ;} hl = [[song instruction pointer list]] ROM4:4B7D 67 ld h,a ;| ROM4:4B7E 68 ld l,b ;/ ; LOOP_BETA ; The song instructions set hl to point to the next instruction and a = [[hl]] ROM4:4B7F 7E ld a,(hl) ;\ ROM4:4B80 FE F1 cp F1 ;} If [[hl]] = F1h: set working sound channel options ROM4:4B82 CC B7 4C call z,4CB7 ;/ ROM4:4B85 FE F2 cp F2 ;\ ROM4:4B87 CC 25 4D call z,4D25 ;} If [[hl]] = F2h: set $CF01 ROM4:4B8A FE F3 cp F3 ;\ ROM4:4B8C CC 30 4D call z,4D30 ;} If [[hl]] = F3h: set music note offset ROM4:4B8F FE F4 cp F4 ;\ ROM4:4B91 CC 45 4D call z,4D45 ;} If [[hl]] = F4h: mark repeat point ROM4:4B94 FE F5 cp F5 ;\ ROM4:4B96 CC 54 4D call z,4D54 ;} If [[hl]] = F5h: repeat ROM4:4B99 A7 and a ;\ ROM4:4B9A CA 4F 4B jp z,4B4F ;} If [[hl]] = 0: go to LOOP_ALPHA ROM4:4B9D FE F6 cp F6 ;\ ROM4:4B9F D2 7B 47 jp nc,477B ;} If [[hl]] >= F6h: go to clear sound effects and song ROM4:4BA2 FE F1 cp F1 ;\ ROM4:4BA4 30 D9 jr nc,4B7F ;} If [[hl]] >= F1h: go to LOOP_BETA ROM4:4BA6 FE 9F cp 9F ;\ ROM4:4BA8 DA C7 4B jp c,4BC7 ;} If [[hl]] >= 9Fh: ROM4:4BAB CB BF res 7,a ;\ ROM4:4BAD CB AF res 5,a ;| ROM4:4BAF F5 push af ;| ROM4:4BB0 FA 01 CF ld a,(CF01) ;| ROM4:4BB3 47 ld b,a ;| ROM4:4BB4 FA 02 CF ld a,(CF02) ;| ROM4:4BB7 4F ld c,a ;| ROM4:4BB8 F1 pop af ;| ROM4:4BB9 E5 push hl ;} Working sound channel instruction length = working sound channel instruction timer = [[$CF01] + ([[hl]] & ~A0h)] ROM4:4BBA 6F ld l,a ;| ROM4:4BBB 26 00 ld h,00 ;| ROM4:4BBD 09 add hl,bc ;| ROM4:4BBE 7E ld a,(hl) ;| ROM4:4BBF E1 pop hl ;| ROM4:4BC0 EA 36 CF ld (CF36),a ;| ROM4:4BC3 EA 34 CF ld (CF34),a ;/ ROM4:4BC6 23 inc hl ; ++hl ROM4:4BC7 FA 34 CF ld a,(CF34) ;\ ROM4:4BCA EA 36 CF ld (CF36),a ;} Working sound channel instruction timer = [working sound channel instruction length] ROM4:4BCD FA 03 CF ld a,(CF03) ;\ ROM4:4BD0 FE 04 cp 04 ;} If [song working sound channel] = noise channel: go to BRANCH_NOISE ROM4:4BD2 CA 3D 4C jp z,4C3D ;/ ROM4:4BD5 2A ldi a,(hl) ; a = [[hl++]] ROM4:4BD6 FE 01 cp 01 ;\ ROM4:4BD8 28 49 jr z,4C23 ;} If [a] = 1: go to BRANCH_MUTE ROM4:4BDA FE 03 cp 03 ;\ ROM4:4BDC CA 5C 4C jp z,4C5C ;} If [a] = 3: go to BRANCH_BETA ROM4:4BDF FE 05 cp 05 ;\ ROM4:4BE1 CA 63 4C jp z,4C63 ;} If [a] = 5: go to BRANCH_GAMMA ROM4:4BE4 E5 push hl ROM4:4BE5 F5 push af ROM4:4BE6 FA 03 CF ld a,(CF03) ;\ ROM4:4BE9 FE 03 cp 03 ;} If [song working sound channel] = wave channel: ROM4:4BEB 20 12 jr nz,4BFF ;/ ROM4:4BED FA E6 CE ld a,(CEE6) ;\ ROM4:4BF0 A7 and a ;} If [wave channel sound effect is playing flag] = 0: ROM4:4BF1 20 0C jr nz,4BFF ;/ ROM4:4BF3 21 25 FF ld hl,FF25 ;\ ROM4:4BF6 CB F6 set 6,(hl) ;} Enable IO wave sound output ROM4:4BF8 CB D6 set 2,(hl) ;/ ROM4:4BFA 3E 80 ld a,80 ;\ ROM4:4BFC EA 0B CF ld (CF0B),a ;} Working sound channel sweep / enable = 80h ROM4:4BFF F1 pop af ROM4:4C00 47 ld b,a ;\ ROM4:4C01 FA 03 CF ld a,(CF03) ;| ROM4:4C04 FE 04 cp 04 ;} If [song working sound channel] = noise channel: a = 4 (fixed Eb note... bug? Working sound channel can never be noise anyway...) ROM4:4C06 28 04 jr z,4C0C ;} Else: a = [music note offset] + [a] ROM4:4C08 FA 00 CF ld a,(CF00) ;| ROM4:4C0B 80 add a,b ;/ ROM4:4C0C 4F ld c,a ROM4:4C0D 06 00 ld b,00 ROM4:4C0F 21 0C 40 ld hl,400C ROM4:4C12 09 add hl,bc ROM4:4C13 FA 35 CF ld a,(CF35) ;\ ROM4:4C16 EA 0D CF ld (CF0D),a ;} Working sound channel envelope / volume = [working song sound channel note envelope / volume] ROM4:4C19 2A ldi a,(hl) ;\ ROM4:4C1A EA 0E CF ld (CF0E),a ;| ROM4:4C1D 7E ld a,(hl) ;} Working sound channel frequency = [music notes + [a]] ROM4:4C1E EA 0F CF ld (CF0F),a ;/ ROM4:4C21 E1 pop hl ROM4:4C22 C9 ret ; Return ; BRANCH_MUTE ROM4:4C23 FA 03 CF ld a,(CF03) ;\ ROM4:4C26 FE 03 cp 03 ;} If [song working sound channel] != wave channel: ROM4:4C28 28 0B jr z,4C35 ;/ ROM4:4C2A 3E 08 ld a,08 ;\ ROM4:4C2C EA 0D CF ld (CF0D),a ;} Mute working sound channel ROM4:4C2F 3E 80 ld a,80 ;\ ROM4:4C31 EA 0F CF ld (CF0F),a ;} Restart working sound channel ROM4:4C34 C9 ret ; Return ROM4:4C35 AF xor a ROM4:4C36 EA 0B CF ld (CF0B),a ; Clear working sound channel enable ROM4:4C39 EA 0D CF ld (CF0D),a ; Clear working sound channel volume ROM4:4C3C C9 ret ; Return ; BRANCH_NOISE ROM4:4C3D 2A ldi a,(hl) ; a = [[hl++]] ROM4:4C3E FE 01 cp 01 ;\ ROM4:4C40 28 E1 jr z,4C23 ;} If [a] = 1: go to BRANCH_MUTE ROM4:4C42 E5 push hl ROM4:4C43 4F ld c,a ROM4:4C44 06 00 ld b,00 ROM4:4C46 21 BB 41 ld hl,41BB ROM4:4C49 09 add hl,bc ROM4:4C4A 2A ldi a,(hl) ;\ ROM4:4C4B EA 0C CF ld (CF0C),a ;} Working sound channel sound length = [$41BB + [a]] ROM4:4C4E 2A ldi a,(hl) ;\ ROM4:4C4F EA 0D CF ld (CF0D),a ;} Working sound channel envelope = [$41BB + [a] + 1] ROM4:4C52 2A ldi a,(hl) ;\ ROM4:4C53 EA 0E CF ld (CF0E),a ;} Working sound channel polynomial counter = [$41BB + [a] + 2] ROM4:4C56 7E ld a,(hl) ;\ ROM4:4C57 EA 0F CF ld (CF0F),a ;} Working sound channel counter control = [$41BB + [a] + 3] ROM4:4C5A E1 pop hl ROM4:4C5B C9 ret ; Return ; BRANCH_BETA ROM4:4C5C 3E 66 ld a,66 ;\ ROM4:4C5E EA 0D CF ld (CF0D),a ;} Working sound channel envelope / volume = 66h ROM4:4C61 18 07 jr 4C6A ; Go to BRANCH_DELTA ; BRANCH_GAMMA ROM4:4C63 3E 46 ld a,46 ;\ ROM4:4C65 EA 0D CF ld (CF0D),a ;} Working sound channel envelope / volume = 46h ROM4:4C68 18 00 jr 4C6A ; BRANCH_DELTA ROM4:4C6A FA DF CE ld a,(CEDF) ;\ ROM4:4C6D FE 08 cp 08 ;} If [song interruption playing] = fade out music: ROM4:4C6F 20 05 jr nz,4C76 ;/ ROM4:4C71 3E 08 ld a,08 ;\ ROM4:4C73 EA 0D CF ld (CF0D),a ;} Mute working sound channel ROM4:4C76 FA 03 CF ld a,(CF03) ;\ ROM4:4C79 FE 01 cp 01 ;} If [song working sound channel] = tone/sweep: go to BRANCH_TONE_SWEEP ROM4:4C7B 28 09 jr z,4C86 ;/ ROM4:4C7D FE 02 cp 02 ;\ ROM4:4C7F 28 12 jr z,4C93 ;} If [song working sound channel] = tone: go to BRANCH_TONE ROM4:4C81 FE 03 cp 03 ;\ ROM4:4C83 28 1B jr z,4CA0 ;} If [song working sound channel] = wave: go to BRANCH_WAVE ROM4:4C85 C9 ret ; Return ; BRANCH_TONE_SWEEP ROM4:4C86 FA 13 CF ld a,(CF13) ;\ ROM4:4C89 EA 0E CF ld (CF0E),a ;| ROM4:4C8C FA 14 CF ld a,(CF14) ;} Working sound channel frequency = [tone/sweep channel frequency] ROM4:4C8F EA 0F CF ld (CF0F),a ;/ ROM4:4C92 C9 ret ; Return ; BRANCH_TONE ROM4:4C93 FA 18 CF ld a,(CF18) ;\ ROM4:4C96 EA 0E CF ld (CF0E),a ;| ROM4:4C99 FA 19 CF ld a,(CF19) ;} Working sound channel frequency = [tone channel frequency] ROM4:4C9C EA 0F CF ld (CF0F),a ;/ ROM4:4C9F C9 ret ; Return ; BRANCH_WAVE ROM4:4CA0 FA E6 CE ld a,(CEE6) ;\ ROM4:4CA3 A7 and a ;} If [wave channel sound effect is playing flag] != 0: return ROM4:4CA4 C0 ret nz ;/ ROM4:4CA5 3E 80 ld a,80 ;\ ROM4:4CA7 EA 0B CF ld (CF0B),a ;} Enable working sound channel ROM4:4CAA FA 1D CF ld a,(CF1D) ;\ ROM4:4CAD EA 0E CF ld (CF0E),a ;| ROM4:4CB0 FA 1E CF ld a,(CF1E) ;} Working sound channel frequency = [wave channel frequency] ROM4:4CB3 EA 0F CF ld (CF0F),a ;/ ROM4:4CB6 C9 ret } ;;; $4CB7: Song instruction - F1h: set working sound channel options ;;; { ; [$CF0C] & 3Fh is only actively used for the sound length with the noise channel, otherwise it's repurposed as the effect index ROM4:4CB7 23 inc hl ; ++hl ROM4:4CB8 FA 03 CF ld a,(CF03) ;\ ROM4:4CBB EA 08 CF ld (CF08),a ;} Working sound channel options set flag = [song working sound channel] ROM4:4CBE FE 03 cp 03 ;\ ROM4:4CC0 28 2A jr z,4CEC ;} If [working sound channel] = wave channel: go to set wave channel options ROM4:4CC2 FA DF CE ld a,(CEDF) ;\ ROM4:4CC5 FE 08 cp 08 ;} If [song interruption playing] = fade out music: ROM4:4CC7 20 06 jr nz,4CCF ;/ ROM4:4CC9 2A ldi a,(hl) ;\ ROM4:4CCA EA 0D CF ld (CF0D),a ;} Working sound channel envelope = [[hl++]] ROM4:4CCD 18 07 jr 4CD6 ROM4:4CCF 2A ldi a,(hl) ;\ Else ([song interruption playing] != fade out music): ROM4:4CD0 EA 0D CF ld (CF0D),a ;} Working song sound channel note envelope = working sound channel envelope = [[hl++]] ROM4:4CD3 EA 35 CF ld (CF35),a ;/ ROM4:4CD6 2A ldi a,(hl) ;\ ROM4:4CD7 EA 0B CF ld (CF0B),a ;} Working sound channel sweep = [[hl++]] ROM4:4CDA 7E ld a,(hl) ;\ ROM4:4CDB EA 0C CF ld (CF0C),a ;} Working sound channel sound length / wave pattern duty = [[hl]] ROM4:4CDE CB B7 res 6,a ;\ ROM4:4CE0 CB BF res 7,a ;} a = working sound channel sound length (specifically) } ;;; $4CE2: Song working sound channel effect index = [a], a = [[++hl]] ;;; { ROM4:4CE2 A7 and a ROM4:4CE3 20 01 jr nz,4CE6 ROM4:4CE5 AF xor a ROM4:4CE6 EA 37 CF ld (CF37),a } ;;; $4CE9: a = [[++hl]] ;;; { ROM4:4CE9 23 inc hl } ;;; $4CEA: a = [[hl]] ;;; { ROM4:4CEA 7E ld a,(hl) ROM4:4CEB C9 ret } ;;; $4CEC: Song instruction - F1h - wave channel: set wave channel options ;;; { ROM4:4CEC 2A ldi a,(hl) ;\ ROM4:4CED EA 09 CF ld (CF09),a ;| ROM4:4CF0 EA E3 CF ld (CFE3),a ;| ROM4:4CF3 5F ld e,a ;} Song wave pattern data pointer = $CFE3 = [[hl++]] ROM4:4CF4 2A ldi a,(hl) ;| ROM4:4CF5 EA 0A CF ld (CF0A),a ;| ROM4:4CF8 EA E4 CF ld (CFE4),a ;/ ROM4:4CFB 57 ld d,a ROM4:4CFC FA DF CE ld a,(CEDF) ;\ ROM4:4CFF FE 08 cp 08 ;} If [song interruption playing] = fade out music: ROM4:4D01 20 06 jr nz,4D09 ;/ ROM4:4D03 7E ld a,(hl) ;\ ROM4:4D04 EA 0D CF ld (CF0D),a ;} Working sound channel volume = [[hl]] ROM4:4D07 18 07 jr 4D10 ROM4:4D09 7E ld a,(hl) ;\ Else ([song interruption playing] != fade out music): ROM4:4D0A EA 0D CF ld (CF0D),a ;} Working song sound channel note volume = working sound channel volume = [[hl]] ROM4:4D0D EA 35 CF ld (CF35),a ;/ ROM4:4D10 FA E6 CE ld a,(CEE6) ;\ ROM4:4D13 A7 and a ;} If [wave channel sound effect is playing flag] = 0: ROM4:4D14 20 06 jr nz,4D1C ;/ ROM4:4D16 AF xor a ;\ ROM4:4D17 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:4D19 CD C9 47 call 47C9 ; Write wave pattern RAM ROM4:4D1C FA 0D CF ld a,(CF0D) ;\ ROM4:4D1F CB AF res 5,a ;| ROM4:4D21 CB B7 res 6,a ;} Working song sound channel effect index = [working sound channel volume] & ~60h, go to a = [[++hl]] ROM4:4D23 18 BD jr 4CE2 ;/ } ;;; $4D25: Song instruction - F2h: set $CF01 ;;; { ROM4:4D25 23 inc hl ; ++hl ROM4:4D26 2A ldi a,(hl) ;\ ROM4:4D27 EA 02 CF ld (CF02),a ;| ROM4:4D2A 2A ldi a,(hl) ;} $CF01 = [[hl++]] ROM4:4D2B EA 01 CF ld (CF01),a ;/ ROM4:4D2E 18 BA jr 4CEA ; Go to a = [[hl]] } ;;; $4D30: Song instruction - F3h: set music note offset ;;; { ROM4:4D30 23 inc hl ; ++hl ROM4:4D31 2A ldi a,(hl) ;\ ROM4:4D32 EA 00 CF ld (CF00),a ;} Music note offset = [[hl++]] ROM4:4D35 18 B3 jr 4CEA ; Go to a = [[hl]] } ;;; $4D37: Song instruction - F0h: go to ;;; { ROM4:4D37 23 inc hl ;\ ROM4:4D38 23 inc hl ;} hl += 2 ROM4:4D39 2A ldi a,(hl) ;\ ROM4:4D3A EA 30 CF ld (CF30),a ;| ROM4:4D3D 47 ld b,a ;| ROM4:4D3E 7E ld a,(hl) ;} hl = song instruction pointer list = [[hl]] ROM4:4D3F EA 2F CF ld (CF2F),a ;| ROM4:4D42 67 ld h,a ;| ROM4:4D43 68 ld l,b ;/ ROM4:4D44 C9 ret } ;;; $4D45: Song instruction - F4h: repeat point ;;; { ROM4:4D45 23 inc hl ; ++hl ROM4:4D46 2A ldi a,(hl) ;\ ROM4:4D47 EA 33 CF ld (CF33),a ;} Repeat count = [[hl++]] ROM4:4D4A 7C ld a,h ;\ ROM4:4D4B EA 31 CF ld (CF31),a ;| ROM4:4D4E 7D ld a,l ;} Repeat point = [hl] ROM4:4D4F EA 32 CF ld (CF32),a ;/ ROM4:4D52 18 96 jr 4CEA ; Go to a = [[hl]] } ;;; $4D54: Song instruction - F5h: repeat ;;; { ROM4:4D54 FA 33 CF ld a,(CF33) ;\ ROM4:4D57 3D dec a ;} Decrement repeat count ROM4:4D58 EA 33 CF ld (CF33),a ;/ ROM4:4D5B A7 and a ;\ ROM4:4D5C 28 8B jr z,4CE9 ;} If [repeat count] = 0: go to a = [[++hl]] ROM4:4D5E FA 31 CF ld a,(CF31) ;\ ROM4:4D61 67 ld h,a ;| ROM4:4D62 FA 32 CF ld a,(CF32) ;} hl = [repeat point] ROM4:4D65 6F ld l,a ;/ ROM4:4D66 18 82 jr 4CEA ; Go to a = [[hl]] } ;;; $4D68: Copy 9 bytes from [de] to [hl] ;;; { ROM4:4D68 FA 09 40 ld a,(4009) ROM4:4D6B 47 ld b,a ROM4:4D6C 1A ld a,(de) ROM4:4D6D 22 ldi (hl),a ROM4:4D6E 13 inc de ROM4:4D6F 05 dec b ROM4:4D70 78 ld a,b ROM4:4D71 A7 and a ROM4:4D72 20 F8 jr nz,4D6C ROM4:4D74 C9 ret } ;;; $4D75: Handle song sound channel effect ;;; { ;; Parameters: ;; bc: Working sound channel's frequency ROM4:4D75 FA 37 CF ld a,(CF37) ;\ ROM4:4D78 FE 02 cp 02 ;} If [song working channel effect index] = 2: go to $4DC4 ROM4:4D7A 28 48 jr z,4DC4 ;/ ROM4:4D7C FE 03 cp 03 ;\ ROM4:4D7E 28 49 jr z,4DC9 ;} If [song working channel effect index] = 3: go to $4DC9 ROM4:4D80 FE 04 cp 04 ;\ ROM4:4D82 28 4A jr z,4DCE ;} If [song working channel effect index] = 4: go to $4DCE ROM4:4D84 FE 06 cp 06 ;\ ROM4:4D86 28 55 jr z,4DDD ;} If [song working channel effect index] = 6: go to working sound channel's frequency += 1 ROM4:4D88 FE 07 cp 07 ;\ ROM4:4D8A CA 21 4E jp z,4E21 ;} If [song working channel effect index] = 7: go to working sound channel's frequency += 4 ROM4:4D8D FE 08 cp 08 ;\ ROM4:4D8F CA 33 4E jp z,4E33 ;} If [song working channel effect index] = 8: go to working sound channel's frequency -= 3 ROM4:4D92 FE 09 cp 09 ;\ ROM4:4D94 CA D3 4D jp z,4DD3 ;} If [song working channel effect index] = 9: go to $4DD3 ROM4:4D97 FE 0A cp 0A ;\ ROM4:4D99 CA D8 4D jp z,4DD8 ;} If [song working channel effect index] = Ah: go to $4DD8 ROM4:4D9C C9 ret } ;;; $4D9D: Set working channel's frequency according to effect table ;;; { ROM4:4D9D FA 2E CF ld a,(CF2E) ;\ ROM4:4DA0 A7 and a ;} If [song sound channel effect timer] = 0: ROM4:4DA1 20 05 jr nz,4DA8 ;/ ROM4:4DA3 3E 11 ld a,11 ;\ ROM4:4DA5 EA 2E CF ld (CF2E),a ;} Song sound channel effect timer = 11h <-- pretty sure this is supposed to be 10h... ROM4:4DA8 3D dec a ;\ ROM4:4DA9 EA 2E CF ld (CF2E),a ;} Decrement song sound channel effect timer ROM4:4DAC 5F ld e,a ;\ ROM4:4DAD AF xor a ;| ROM4:4DAE 57 ld d,a ;| ROM4:4DAF 19 add hl,de ;| ROM4:4DB0 7E ld a,(hl) ;| ROM4:4DB1 5F ld e,a ;| ROM4:4DB2 79 ld a,c ;| ROM4:4DB3 6F ld l,a ;| ROM4:4DB4 78 ld a,b ;} Working sound channel frequency = [bc] + [[hl] + [song sound channel effect timer]] & 3FFFh ROM4:4DB5 67 ld h,a ;| ROM4:4DB6 19 add hl,de ;| ROM4:4DB7 7D ld a,l ;| ROM4:4DB8 EA 0E CF ld (CF0E),a ;| ROM4:4DBB 7C ld a,h ;| ROM4:4DBC CB BF res 7,a ;| ROM4:4DBE CB B7 res 6,a ;| ROM4:4DC0 EA 0F CF ld (CF0F),a ;/ ROM4:4DC3 C9 ret } ;;; $4DC4: Handle song sound channel effect - [song working channel effect index] = 2 ;;; { ROM4:4DC4 21 63 42 ld hl,4263 ROM4:4DC7 18 D4 jr 4D9D } ;;; $4DC9: Handle song sound channel effect - [song working channel effect index] = 3 ;;; { ROM4:4DC9 21 73 42 ld hl,4273 ROM4:4DCC 18 CF jr 4D9D } ;;; $4DCE: Handle song sound channel effect - [song working channel effect index] = 4 ;;; { ROM4:4DCE 21 83 42 ld hl,4283 ROM4:4DD1 18 CA jr 4D9D } ;;; $4DD3: Handle song sound channel effect - [song working channel effect index] = 9 ;;; { ROM4:4DD3 21 93 42 ld hl,4293 ROM4:4DD6 18 C5 jr 4D9D } ;;; $4DD8: Handle song sound channel effect - [song working channel effect index] = Ah ;;; { ROM4:4DD8 21 A3 42 ld hl,42A3 ROM4:4DDB 18 C0 jr 4D9D } ;;; $4DDD: Handle song sound channel effect - [song working channel effect index] = 6 ;;; { ROM4:4DDD 03 inc bc ; ++bc ROM4:4DDE 79 ld a,c ;\ ROM4:4DDF EA 0E CF ld (CF0E),a ;| ROM4:4DE2 78 ld a,b ;| ROM4:4DE3 CB BF res 7,a ;} Working sound channel frequency = [bc] & 3FFFh ROM4:4DE5 CB B7 res 6,a ;| ROM4:4DE7 EA 0F CF ld (CF0F),a ;/ } ;;; $4DEA: Set working channel's frequency ;;; { ROM4:4DEA FA 03 CF ld a,(CF03) ;\ ROM4:4DED FE 01 cp 01 ;} If [song working sound channel] = tone/sweep channel: ROM4:4DEF 20 0D jr nz,4DFE ;/ ROM4:4DF1 FA 0E CF ld a,(CF0E) ;\ ROM4:4DF4 EA 13 CF ld (CF13),a ;| ROM4:4DF7 FA 0F CF ld a,(CF0F) ;} Tone/sweep channel frequency = [working sound channel frequency] ROM4:4DFA EA 14 CF ld (CF14),a ;/ ROM4:4DFD C9 ret ROM4:4DFE FE 02 cp 02 ;\ ROM4:4E00 20 0D jr nz,4E0F ;} If [song working sound channel] = tone channel: ROM4:4E02 FA 0E CF ld a,(CF0E) ;\ ROM4:4E05 EA 18 CF ld (CF18),a ;| ROM4:4E08 FA 0F CF ld a,(CF0F) ;} Tone channel frequency = [working sound channel frequency] ROM4:4E0B EA 19 CF ld (CF19),a ;/ ROM4:4E0E C9 ret ROM4:4E0F FE 03 cp 03 ;\ ROM4:4E11 C0 ret nz ;} If [song working sound channel] != wave channel: return ROM4:4E12 FA 0E CF ld a,(CF0E) ;\ ROM4:4E15 EA 1D CF ld (CF1D),a ;| ROM4:4E18 FA 0F CF ld a,(CF0F) ;} Wave channel frequency = [working sound channel frequency] ROM4:4E1B CB BF res 7,a ;| ROM4:4E1D EA 1E CF ld (CF1E),a ;/ ROM4:4E20 C9 ret } ;;; $4E21: Handle song sound channel effect - [song working channel effect index] = 7 ;;; { ROM4:4E21 03 inc bc ;\ ROM4:4E22 03 inc bc ;| ROM4:4E23 03 inc bc ;} bc += 4 ROM4:4E24 03 inc bc ;/ ROM4:4E25 79 ld a,c ;\ ROM4:4E26 EA 0E CF ld (CF0E),a ;| ROM4:4E29 78 ld a,b ;| ROM4:4E2A CB BF res 7,a ;} Working sound channel frequency = [bc] & 3FFFh ROM4:4E2C CB B7 res 6,a ;| ROM4:4E2E EA 0F CF ld (CF0F),a ;/ ROM4:4E31 18 B7 jr 4DEA ; Go to set channel frequency of working channel } ;;; $4E33: Handle song sound channel effect - [song working channel effect index] = 8 ;;; { ROM4:4E33 0B dec bc ;\ ROM4:4E34 0B dec bc ;} bc -= 3 ROM4:4E35 0B dec bc ;/ ROM4:4E36 79 ld a,c ;\ ROM4:4E37 EA 0E CF ld (CF0E),a ;| ROM4:4E3A 78 ld a,b ;| ROM4:4E3B CB BF res 7,a ;} Working sound channel frequency = [bc] & 3FFFh ROM4:4E3D CB B7 res 6,a ;| ROM4:4E3F EA 0F CF ld (CF0F),a ;/ ROM4:4E42 18 A6 jr 4DEA ; Go to set channel frequency of working channel } ;;; $4E44: Reset tone/sweep channel options ;;; { ROM4:4E44 AF xor a ;\ ROM4:4E45 EA 04 CF ld (CF04),a ;} Song tone/sweep channel enable = 0 ROM4:4E48 3E 08 ld a,08 ;\ ROM4:4E4A E0 12 ld (FF00+12),a ;} Disable tone/sweep channel envelope ROM4:4E4C EA 12 CF ld (CF12),a ;/ ROM4:4E4F 3E 80 ld a,80 ;\ ROM4:4E51 E0 14 ld (FF00+14),a ;} Restart tone/sweep channel ROM4:4E53 EA 14 CF ld (CF14),a ;/ ROM4:4E56 C3 1D 46 jp 461D ; Go to handle song playing - tone channel } ;;; $4E59: Reset tone channel options ;;; { ROM4:4E59 AF xor a ;\ ROM4:4E5A EA 05 CF ld (CF05),a ;} Song tone channel enable = 0 ROM4:4E5D 3E 08 ld a,08 ;\ ROM4:4E5F E0 17 ld (FF00+17),a ;} Disable tone channel envelope ROM4:4E61 EA 17 CF ld (CF17),a ;/ ROM4:4E64 3E 80 ld a,80 ;\ ROM4:4E66 E0 19 ld (FF00+19),a ;} Restart tone channel ROM4:4E68 EA 19 CF ld (CF19),a ;/ ROM4:4E6B C3 5F 46 jp 465F ; Go to handle song playing - wave channel } ;;; $4E6E: Reset wave channel options ;;; { ROM4:4E6E AF xor a ;\ ROM4:4E6F EA 06 CF ld (CF06),a ;} Song wave channel enable = 0 ROM4:4E72 AF xor a ;\ ROM4:4E73 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:4E75 EA 1A CF ld (CF1A),a ;/ ROM4:4E78 C3 A3 46 jp 46A3 ; Go to handle song playing - noise channel } ;;; $4E7B: Reset noise channel options ;;; { ROM4:4E7B AF xor a ;\ ROM4:4E7C EA 07 CF ld (CF07),a ;} Song noise channel enable = 0 ROM4:4E7F 3E 08 ld a,08 ;\ ROM4:4E81 E0 21 ld (FF00+21),a ;} Disable noise channel envelope ROM4:4E83 EA 21 CF ld (CF21),a ;/ ROM4:4E86 3E 80 ld a,80 ;\ ROM4:4E88 E0 23 ld (FF00+23),a ;} Restart noise channel ROM4:4E8A EA 23 CF ld (CF23),a ;/ ROM4:4E8D C9 ret } ;;; $4E8E: Reset song sound channel options ;;; { ROM4:4E8E E5 push hl ;\ ROM4:4E8F 21 2F CF ld hl,CF2F ;| ROM4:4E92 FA 0A 40 ld a,(400A) ;| ROM4:4E95 47 ld b,a ;| ;| ROM4:4E96 36 00 ld (hl),00 ;| ROM4:4E98 23 inc hl ;} Clear song channel processing states ($CF2F..5B) ROM4:4E99 05 dec b ;| ROM4:4E9A 78 ld a,b ;| ROM4:4E9B A7 and a ;| ROM4:4E9C 20 F8 jr nz,4E96 ;| ROM4:4E9E E1 pop hl ;/ ROM4:4E9F AF xor a ROM4:4EA0 EA E4 CE ld (CEE4),a ;\ ROM4:4EA3 EA E5 CE ld (CEE5),a ;| ROM4:4EA6 EA E6 CE ld (CEE6),a ;} Clear channel sound effect is playing flags ROM4:4EA9 EA E7 CE ld (CEE7),a ;/ ROM4:4EAC EA 60 CF ld (CF60),a ; Clear tone channel frequency tweak ROM4:4EAF E0 10 ld (FF00+10),a ; Clear tone/sweep channel sweep ROM4:4EB1 E0 1A ld (FF00+1A),a ; Disable wave channel ROM4:4EB3 3E 08 ld a,08 ;\ ROM4:4EB5 E0 12 ld (FF00+12),a ;| ROM4:4EB7 E0 17 ld (FF00+17),a ;} Disable sound channel envelopes ROM4:4EB9 E0 21 ld (FF00+21),a ;/ ROM4:4EBB 3E 80 ld a,80 ROM4:4EBD E0 14 ld (FF00+14),a ; Restart tone/sweep channel ROM4:4EBF E0 19 ld (FF00+19),a ; Restart tone channel ROM4:4EC1 E0 23 ld (FF00+23),a ; Restart noise channel ROM4:4EC3 C9 ret } ;;; $4EC4..55F1: Tone/sweep channel sound effects ;;; { ;;; $4EC4: Tone/sweep channel sound effect initialisation function pointers ;;; { ROM4:4EC4 dw 4F4C, ; 1: Jumping 4FB9, ; 2: Hi-jumping 5030, ; 3: Screw attacking 50D5, ; 4: Uncrouching / turning around / landing 50FD, ; 5: Crouching / unmorphing 511D, ; 6: Morphing 5147, ; 7: Shooting beam 5187, ; 8: Shooting missile 51ED, ; 9: Shooting ice beam 5206, ; Ah: Shooting plasma beam 521F, ; Bh: Shooting spazer beam 5238, ; Ch: Picked up missile drop 5270, ; Dh: Spider ball 5284, ; Eh: Picked up energy drop 52B6, ; Fh: Shot missile door with beam 52CC, ; 10h 4769, ; 11h: ret 533C, ; 12h 5343, ; 13h: Bomb laid 534B, ; 14h 5361, ; 15h: Option select / missile select 5377, ; 16h: Shooting wave beam 53B7, ; 17h 53F7, ; 18h: Samus' health changed 5429, ; 19h: No missile dud shot 543F, ; 1Ah 5497, ; 1Bh: Metroid cry 54CE, ; 1Ch: Saved 54EE, ; 1Dh 551C ; 1Eh: Unpaused } ;;; $4F00: Tone/sweep channel sound effect playback function pointers ;;; { ROM4:4F00 dw 4F6C, ; 1: Jumping 4FD9, ; 2: Hi-jumping 5038, ; 3: Screw attacking 50E5, ; 4: Uncrouching / turning around / landing 5105, ; 5: Crouching / unmorphing 5125, ; 6: Morphing 514F, ; 7: Shooting beam 518F, ; 8: Shooting missile 51FA, ; 9: Shooting ice beam 5213, ; Ah: Shooting plasma beam 522C, ; Bh: Shooting spazer beam 5240, ; Ch: Picked up missile drop 5278, ; Dh: Spider ball 528F, ; Eh: Picked up energy drop 52BE, ; Fh: Shot missile door with beam 52D4, ; 10h 4769, ; 11h: ret 46EA, ; 12h 46EA, ; 13h: Bomb laid 5353, ; 14h 5369, ; 15h: Option select / missile select 537F, ; 16h: Shooting wave beam 53C2, ; 17h 46EA, ; 18h: Samus' health changed 5431, ; 19h: No missile dud shot 5447, ; 1Ah 54AE, ; 1Bh: Metroid cry 54D6, ; 1Ch: Saved 54F6, ; 1Dh 5524 ; 1Eh: Unpaused } ;;; $4F3C: Play short jump sound ;;; { ROM4:4F3C 3E 0B ld a,0B ;\ ROM4:4F3E 11 28 5A ld de,5A28 ;} Go to set tone/sweep sound effect request as playing with timer Bh and option set $5A28 ROM4:4F41 C3 E3 55 jp 55E3 ;/ } ;;; $4F44: Playing short jump sound ;;; { ROM4:4F44 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:4F47 FE 09 cp 09 ;\ ROM4:4F49 28 40 jr z,4F8B ;} If [tone/sweep channel sound effect timer] = 9: go to set jumping option set 1 ROM4:4F4B C9 ret } ;;; $4F4C: Tone/sweep sound effect initialisation - 1: jumping ;;; { ROM4:4F4C FA C1 CE ld a,(CEC1) ;\ ROM4:4F4F FE 16 cp 16 ;| ROM4:4F51 CA 8F 44 jp z,448F ;| ROM4:4F54 FE 07 cp 07 ;} If shooting projectile other than spazer beam: go to handle tone/sweep channel sound effect playing ROM4:4F56 38 05 jr c,4F5D ;| ROM4:4F58 FE 0B cp 0B ;| ROM4:4F5A DA 8F 44 jp c,448F ;/ ROM4:4F5D FA DD CE ld a,(CEDD) ;\ ROM4:4F60 FE 03 cp 03 ;} If [song playing] = chozo ruins: go to play short jump sound ROM4:4F62 28 D8 jr z,4F3C ;/ ROM4:4F64 3E 32 ld a,32 ;\ ROM4:4F66 11 28 5A ld de,5A28 ;} Go to set tone/sweep sound effect request as playing with timer 32h and option set $5A28 ROM4:4F69 C3 E3 55 jp 55E3 ;/ } ;;; $4F6C: Tone/sweep sound effect playback - 1: jumping ;;; { ROM4:4F6C FA DD CE ld a,(CEDD) ;\ ROM4:4F6F FE 03 cp 03 ;} If [song playing] = chozo ruins: go to playing short jump sound ROM4:4F71 28 D1 jr z,4F44 ;/ ROM4:4F73 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:4F76 FE 2D cp 2D ;\ ROM4:4F78 28 11 jr z,4F8B ;} If [tone/sweep channel sound effect timer] = 2Dh: go to set jumping option set 1 ROM4:4F7A FE 1E cp 1E ;\ ROM4:4F7C 28 13 jr z,4F91 ;} If [tone/sweep channel sound effect timer] = 1Eh: go to set jumping option set 2 ROM4:4F7E FE 18 cp 18 ;\ ROM4:4F80 28 15 jr z,4F97 ;} If [tone/sweep channel sound effect timer] = 18h: go to set jumping option set 3 ROM4:4F82 FE 06 cp 06 ;\ ROM4:4F84 28 17 jr z,4F9D ;} If [tone/sweep channel sound effect timer] = 6: go to set jumping option set 4 ROM4:4F86 FE 01 cp 01 ;\ ROM4:4F88 28 19 jr z,4FA3 ;} If [tone/sweep channel sound effect timer] = 1: go to set jumping option set 5 ROM4:4F8A C9 ret } ;;; $4F8B: Set jumping option set 1 ;;; { ROM4:4F8B 11 2D 5A ld de,5A2D ;\ ROM4:4F8E C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A2D } ;;; $4F91: Set jumping option set 2 ;;; { ROM4:4F91 11 32 5A ld de,5A32 ;\ ROM4:4F94 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A32 } ;;; $4F97: Set jumping option set 3 ;;; { ROM4:4F97 11 37 5A ld de,5A37 ;\ ROM4:4F9A C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A37 } ;;; $4F9D: Set jumping option set 4 ;;; { ROM4:4F9D 11 3C 5A ld de,5A3C ;\ ROM4:4FA0 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A3C } ;;; $4FA3: Set jumping option set 5 ;;; { ROM4:4FA3 11 41 5A ld de,5A41 ;\ ROM4:4FA6 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A41 } ;;; $4FA9: Play short hi-jump sound ;;; { ROM4:4FA9 3E 09 ld a,09 ;\ ROM4:4FAB 11 46 5A ld de,5A46 ;} Go to set tone/sweep sound effect request as playing with timer 9 and option set $5A46 ROM4:4FAE C3 E3 55 jp 55E3 ;/ } ;;; $4FB1: Playing short hi-jump sound ;;; { ROM4:4FB1 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:4FB4 FE 08 cp 08 ;\ ROM4:4FB6 28 4E jr z,5006 ;} If [tone/sweep channel sound effect timer] = 8: go to set hi-jumping option set 1 ROM4:4FB8 C9 ret } ;;; $4FB9: Tone/sweep sound effect initialisation - 2: hi-jumping ;;; { ROM4:4FB9 FA C1 CE ld a,(CEC1) ;\ ROM4:4FBC FE 16 cp 16 ;| ROM4:4FBE CA 8F 44 jp z,448F ;| ROM4:4FC1 FE 07 cp 07 ;} If shooting projectile other than spazer beam: go to handle tone/sweep channel sound effect playing ROM4:4FC3 38 05 jr c,4FCA ;| ROM4:4FC5 FE 0B cp 0B ;| ROM4:4FC7 DA 8F 44 jp c,448F ;/ ROM4:4FCA FA DD CE ld a,(CEDD) ;\ ROM4:4FCD FE 03 cp 03 ;} If [song playing] = chozo ruins: go to play short hi-jump sound ROM4:4FCF 28 D8 jr z,4FA9 ;/ ROM4:4FD1 3E 43 ld a,43 ;\ ROM4:4FD3 11 46 5A ld de,5A46 ;} Go to set tone/sweep sound effect request as playing with timer 43h and option set $5A46 ROM4:4FD6 C3 E3 55 jp 55E3 ;/ } ;;; $4FD9: Tone/sweep sound effect playback - 2: hi-jumping ;;; { ROM4:4FD9 FA DD CE ld a,(CEDD) ;\ ROM4:4FDC FE 03 cp 03 ;} If [song playing] = chozo ruins: go to playing short hi-jump sound ROM4:4FDE 28 D1 jr z,4FB1 ;/ ROM4:4FE0 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:4FE3 FE 41 cp 41 ;\ ROM4:4FE5 28 1F jr z,5006 ;} If [tone/sweep channel sound effect timer] = 41h: go to set hi-jumping option set 1 ROM4:4FE7 FE 2D cp 2D ;\ ROM4:4FE9 28 21 jr z,500C ;} If [tone/sweep channel sound effect timer] = 2Dh: go to set hi-jumping option set 2 ROM4:4FEB FE 2B cp 2B ;\ ROM4:4FED 28 23 jr z,5012 ;} If [tone/sweep channel sound effect timer] = 2Bh: go to set hi-jumping option set 3 ROM4:4FEF FE 18 cp 18 ;\ ROM4:4FF1 28 25 jr z,5018 ;} If [tone/sweep channel sound effect timer] = 18h: go to set hi-jumping option set 4 ROM4:4FF3 FE 15 cp 15 ;\ ROM4:4FF5 28 27 jr z,501E ;} If [tone/sweep channel sound effect timer] = 15h: go to set hi-jumping option set 5 ROM4:4FF7 FE 04 cp 04 ;\ ROM4:4FF9 28 29 jr z,5024 ;} If [tone/sweep channel sound effect timer] = 4: go to set hi-jumping option set 6 ROM4:4FFB FE 01 cp 01 ;\ ROM4:4FFD 28 2B jr z,502A ;} If [tone/sweep channel sound effect timer] = 1: go to set hi-jumping option set 7 ROM4:4FFF C9 ret } ;;; $5000: Unused. Set hi-jumping option set 0 ;;; { ROM4:5000 11 46 5A ld de,5A46 ;\ ROM4:5003 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A46 } ;;; $5006: Set hi-jumping option set 1 ;;; { ROM4:5006 11 4B 5A ld de,5A4B ;\ ROM4:5009 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A4B } ;;; $500C: Set hi-jumping option set 2 ;;; { ROM4:500C 11 50 5A ld de,5A50 ;\ ROM4:500F C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A50 } ;;; $5012: Set hi-jumping option set 3 ;;; { ROM4:5012 11 55 5A ld de,5A55 ;\ ROM4:5015 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A55 } ;;; $5018: Set hi-jumping option set 4 ;;; { ROM4:5018 11 5A 5A ld de,5A5A ;\ ROM4:501B C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A5A } ;;; $501E: Set hi-jumping option set 5 ;;; { ROM4:501E 11 5F 5A ld de,5A5F ;\ ROM4:5021 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A5F } ;;; $5024: Set hi-jumping option set 6 ;;; { ROM4:5024 11 64 5A ld de,5A64 ;\ ROM4:5027 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A64 } ;;; $502A: Set hi-jumping option set 7 ;;; { ROM4:502A 11 69 5A ld de,5A69 ;\ ROM4:502D C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A69 } ;;; $5030: Tone/sweep sound effect initialisation - 3: screw attacking ;;; { ROM4:5030 3E 3F ld a,3F ;\ ROM4:5032 11 6E 5A ld de,5A6E ;} Go to set tone/sweep sound effect request as playing with timer 3Fh and option set $5A6E ROM4:5035 C3 E3 55 jp 55E3 ;/ } ;;; $5038: Tone/sweep sound effect playback - 3: screw attacking ;;; { ROM4:5038 FA C3 CE ld a,(CEC3) ;\ ROM4:503B A7 and a ;} If [tone/sweep channel sound effect timer] = 0: tone/sweep channel sound effect timer = 10h ROM4:503C CC D2 50 call z,50D2 ;/ ROM4:503F 3D dec a ;\ ROM4:5040 EA C3 CE ld (CEC3),a ;} Decrement tone/sweep channel sound effect timer ROM4:5043 FE 3B cp 3B ;\ ROM4:5045 28 3D jr z,5084 ;} If [tone/sweep channel sound effect timer] = 3Bh: go to BRANCH_1 ROM4:5047 FE 37 cp 37 ;\ ROM4:5049 28 3F jr z,508A ;} If [tone/sweep channel sound effect timer] = 37h: go to BRANCH_2 ROM4:504B FE 33 cp 33 ;\ ROM4:504D 28 41 jr z,5090 ;} If [tone/sweep channel sound effect timer] = 33h: go to BRANCH_3 ROM4:504F FE 2F cp 2F ;\ ROM4:5051 28 43 jr z,5096 ;} If [tone/sweep channel sound effect timer] = 2Fh: go to BRANCH_4 ROM4:5053 FE 2B cp 2B ;\ ROM4:5055 28 45 jr z,509C ;} If [tone/sweep channel sound effect timer] = 2Bh: go to BRANCH_5 ROM4:5057 FE 27 cp 27 ;\ ROM4:5059 28 47 jr z,50A2 ;} If [tone/sweep channel sound effect timer] = 27h: go to BRANCH_6 ROM4:505B FE 23 cp 23 ;\ ROM4:505D 28 49 jr z,50A8 ;} If [tone/sweep channel sound effect timer] = 23h: go to BRANCH_7 ROM4:505F FE 1F cp 1F ;\ ROM4:5061 28 4B jr z,50AE ;} If [tone/sweep channel sound effect timer] = 1Fh: go to BRANCH_8 ROM4:5063 FE 1B cp 1B ;\ ROM4:5065 28 4D jr z,50B4 ;} If [tone/sweep channel sound effect timer] = 1Bh: go to BRANCH_9 ROM4:5067 FE 17 cp 17 ;\ ROM4:5069 28 4F jr z,50BA ;} If [tone/sweep channel sound effect timer] = 17h: go to BRANCH_A ROM4:506B FE 13 cp 13 ;\ ROM4:506D 28 51 jr z,50C0 ;} If [tone/sweep channel sound effect timer] = 13h: go to BRANCH_B ROM4:506F FE 0F cp 0F ;\ ROM4:5071 28 47 jr z,50BA ;} If [tone/sweep channel sound effect timer] = Fh: go to BRANCH_A ROM4:5073 FE 0C cp 0C ;\ ROM4:5075 28 49 jr z,50C0 ;} If [tone/sweep channel sound effect timer] = Ch: go to BRANCH_B ROM4:5077 FE 09 cp 09 ;\ ROM4:5079 28 4B jr z,50C6 ;} If [tone/sweep channel sound effect timer] = 9: go to BRANCH_C ROM4:507B FE 06 cp 06 ;\ ROM4:507D 28 4D jr z,50CC ;} If [tone/sweep channel sound effect timer] = 6: go to BRANCH_D ROM4:507F FE 03 cp 03 ;\ ROM4:5081 28 43 jr z,50C6 ;} If [tone/sweep channel sound effect timer] = 3: go to BRANCH_C ROM4:5083 C9 ret ; Return ; BRANCH_1 ROM4:5084 11 73 5A ld de,5A73 ;\ ROM4:5087 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A73 ; BRANCH_2 ROM4:508A 11 78 5A ld de,5A78 ;\ ROM4:508D C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A78 ; BRANCH_3 ROM4:5090 11 7D 5A ld de,5A7D ;\ ROM4:5093 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A7D ; BRANCH_4 ROM4:5096 11 82 5A ld de,5A82 ;\ ROM4:5099 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A82 ; BRANCH_5 ROM4:509C 11 87 5A ld de,5A87 ;\ ROM4:509F C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A87 ; BRANCH_6 ROM4:50A2 11 8C 5A ld de,5A8C ;\ ROM4:50A5 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A8C ; BRANCH_7 ROM4:50A8 11 91 5A ld de,5A91 ;\ ROM4:50AB C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A91 ; BRANCH_8 ROM4:50AE 11 96 5A ld de,5A96 ;\ ROM4:50B1 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A96 ; BRANCH_9 ROM4:50B4 11 9B 5A ld de,5A9B ;\ ROM4:50B7 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5A9B ; BRANCH_A ROM4:50BA 11 A0 5A ld de,5AA0 ;\ ROM4:50BD C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AA0 ; BRANCH_B ROM4:50C0 11 A5 5A ld de,5AA5 ;\ ROM4:50C3 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AA5 ; BRANCH_C ROM4:50C6 11 AA 5A ld de,5AAA ;\ ROM4:50C9 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AAA ; BRANCH_D ROM4:50CC 11 AF 5A ld de,5AAF ;\ ROM4:50CF C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AAF } ;;; $50D2: a = 10h ;;; { ; Best subroutine ever ROM4:50D2 3E 10 ld a,10 ROM4:50D4 C9 ret } ;;; $50D5: Tone/sweep sound effect initialisation - 4: uncrouching / turning around / landing / hurt by spike ;;; { ROM4:50D5 FA C1 CE ld a,(CEC1) ;\ ROM4:50D8 FE 04 cp 04 ;} If [tone/sweep channel sound effect playing] >= 4: go to handle tone/sweep channel sound effect playing ROM4:50DA D2 8F 44 jp nc,448F ;/ ROM4:50DD 3E 0A ld a,0A ;\ ROM4:50DF 11 B4 5A ld de,5AB4 ;} Go to set tone/sweep sound effect request as playing with timer Ah and option set $5AB4 ROM4:50E2 C3 E3 55 jp 55E3 ;/ } ;;; $50E5: Tone/sweep sound effect playback - 4: uncrouching / turning around / landing / hurt by spike ;;; { ROM4:50E5 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:50E8 FE 06 cp 06 ;\ ROM4:50EA 28 05 jr z,50F1 ;} If [tone/sweep channel sound effect timer] = 6: go to BRANCH_1 ROM4:50EC FE 02 cp 02 ;\ ROM4:50EE 28 07 jr z,50F7 ;} If [tone/sweep channel sound effect timer] = 2: go to BRANCH_2 ROM4:50F0 C9 ret ; Return ; BRANCH_1 ROM4:50F1 11 B9 5A ld de,5AB9 ;\ ROM4:50F4 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AB9 ; BRANCH_2 ROM4:50F7 11 BE 5A ld de,5ABE ;\ ROM4:50FA C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5ABE } ;;; $50FD: Tone/sweep sound effect initialisation - 5: crouching / unmorphing ;;; { ROM4:50FD 3E 0A ld a,0A ;\ ROM4:50FF 11 C3 5A ld de,5AC3 ;} Go to set tone/sweep sound effect request as playing with timer Ah and option set $5AC3 ROM4:5102 C3 E3 55 jp 55E3 ;/ } ;;; $5105: Tone/sweep sound effect playback - 5: crouching / unmorphing ;;; { ROM4:5105 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5108 FE 06 cp 06 ;\ ROM4:510A 28 05 jr z,5111 ;} If [tone/sweep channel sound effect timer] = 6: go to BRANCH_1 ROM4:510C FE 02 cp 02 ;\ ROM4:510E 28 07 jr z,5117 ;} If [tone/sweep channel sound effect timer] = 2: go to BRANCH_2 ROM4:5110 C9 ret ; Return ; BRANCH_1 ROM4:5111 11 C8 5A ld de,5AC8 ;\ ROM4:5114 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AC8 ; BRANCH_2 ROM4:5117 11 CD 5A ld de,5ACD ;\ ROM4:511A C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5ACD } ;;; $511D: Tone/sweep sound effect initialisation - 6: morphing ;;; { ROM4:511D 3E 0E ld a,0E ;\ ROM4:511F 11 D2 5A ld de,5AD2 ;} Go to set tone/sweep sound effect request as playing with timer Eh and option set $5AD2 ROM4:5122 C3 E3 55 jp 55E3 ;/ } ;;; $5125: Tone/sweep sound effect playback - 6: morphing ;;; { ROM4:5125 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5128 FE 0B cp 0B ;\ ROM4:512A 28 09 jr z,5135 ;} If [tone/sweep channel sound effect timer] = Bh: go to BRANCH_0 ROM4:512C FE 08 cp 08 ;\ ROM4:512E 28 0B jr z,513B ;} If [tone/sweep channel sound effect timer] = 8: go to BRANCH_1 ROM4:5130 FE 03 cp 03 ;\ ROM4:5132 28 0D jr z,5141 ;} If [tone/sweep channel sound effect timer] = 3: go to BRANCH_2 ROM4:5134 C9 ret ; Return ; BRANCH_0 ROM4:5135 11 D2 5A ld de,5AD2 ;\ ROM4:5138 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AD2 ; BRANCH_1 ROM4:513B 11 D7 5A ld de,5AD7 ;\ ROM4:513E C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AD7 ; BRANCH_2 ROM4:5141 11 DC 5A ld de,5ADC ;\ ROM4:5144 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5ADC } ;;; $5147: Tone/sweep sound effect initialisation - 7: shooting beam ;;; { ROM4:5147 3E 0F ld a,0F ;\ ROM4:5149 11 E1 5A ld de,5AE1 ;} Go to set tone/sweep sound effect request as playing with timer Fh and option set $5AE1 ROM4:514C C3 E3 55 jp 55E3 ;/ } ;;; $514F: Tone/sweep sound effect playback - 7: shooting beam ;;; { ROM4:514F CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5152 FE 0D cp 0D ;\ ROM4:5154 28 19 jr z,516F ;} If [tone/sweep channel sound effect timer] = Dh: go to BRANCH_1 ROM4:5156 FE 0B cp 0B ;\ ROM4:5158 28 15 jr z,516F ;} If [tone/sweep channel sound effect timer] = Bh: go to BRANCH_1 ROM4:515A FE 09 cp 09 ;\ ROM4:515C 28 17 jr z,5175 ;} If [tone/sweep channel sound effect timer] = 9: go to BRANCH_2 ROM4:515E FE 07 cp 07 ;\ ROM4:5160 28 13 jr z,5175 ;} If [tone/sweep channel sound effect timer] = 7: go to BRANCH_2 ROM4:5162 FE 05 cp 05 ;\ ROM4:5164 28 15 jr z,517B ;} If [tone/sweep channel sound effect timer] = 5: go to BRANCH_3 ROM4:5166 FE 03 cp 03 ;\ ROM4:5168 28 11 jr z,517B ;} If [tone/sweep channel sound effect timer] = 3: go to BRANCH_3 ROM4:516A FE 01 cp 01 ;\ ROM4:516C 28 13 jr z,5181 ;} If [tone/sweep channel sound effect timer] = 1: go to BRANCH_4 ROM4:516E C9 ret ; Return ; BRANCH_1 ROM4:516F 11 E6 5A ld de,5AE6 ;\ ROM4:5172 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AE6 ; BRANCH_2 ROM4:5175 11 EB 5A ld de,5AEB ;\ ROM4:5178 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AEB ; BRANCH_3 ROM4:517B 11 F0 5A ld de,5AF0 ;\ ROM4:517E C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AF0 ; BRANCH_4 ROM4:5181 11 F5 5A ld de,5AF5 ;\ ROM4:5184 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AF5 } ;;; $5187: Tone/sweep sound effect initialisation - 8: shooting missile ;;; { ROM4:5187 3E 31 ld a,31 ;\ ROM4:5189 11 FA 5A ld de,5AFA ;} Go to set tone/sweep sound effect request as playing with timer 31h and option set $5AFA ROM4:518C C3 E3 55 jp 55E3 ;/ } ;;; $518F: Tone/sweep sound effect playback - 8: shooting missile ;;; { ROM4:518F CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5192 FE 2D cp 2D ;\ ROM4:5194 28 21 jr z,51B7 ;} If [tone/sweep channel sound effect timer] = 2Dh: go to BRANCH_1 ROM4:5196 FE 25 cp 25 ;\ ROM4:5198 28 23 jr z,51BD ;} If [tone/sweep channel sound effect timer] = 25h: go to BRANCH_2 ROM4:519A FE 1A cp 1A ;\ ROM4:519C 28 25 jr z,51C3 ;} If [tone/sweep channel sound effect timer] = 1Ah: go to BRANCH_3 ROM4:519E FE 18 cp 18 ;\ ROM4:51A0 28 27 jr z,51C9 ;} If [tone/sweep channel sound effect timer] = 18h: go to BRANCH_4 ROM4:51A2 FE 15 cp 15 ;\ ROM4:51A4 28 29 jr z,51CF ;} If [tone/sweep channel sound effect timer] = 15h: go to BRANCH_5 ROM4:51A6 FE 12 cp 12 ;\ ROM4:51A8 28 2B jr z,51D5 ;} If [tone/sweep channel sound effect timer] = 12h: go to BRANCH_6 ROM4:51AA FE 0F cp 0F ;\ ROM4:51AC 28 2D jr z,51DB ;} If [tone/sweep channel sound effect timer] = Fh: go to BRANCH_7 ROM4:51AE FE 0C cp 0C ;\ ROM4:51B0 28 2F jr z,51E1 ;} If [tone/sweep channel sound effect timer] = Ch: go to BRANCH_8 ROM4:51B2 FE 09 cp 09 ;\ ROM4:51B4 28 31 jr z,51E7 ;} If [tone/sweep channel sound effect timer] = 9: go to BRANCH_9 ROM4:51B6 C9 ret ; Return ; BRANCH_1 ROM4:51B7 11 FF 5A ld de,5AFF ;\ ROM4:51BA C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5AFF ; BRANCH_2 ROM4:51BD 11 04 5B ld de,5B04 ;\ ROM4:51C0 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B04 ; BRANCH_3 ROM4:51C3 11 09 5B ld de,5B09 ;\ ROM4:51C6 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B09 ; BRANCH_4 ROM4:51C9 11 0E 5B ld de,5B0E ;\ ROM4:51CC C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B0E ; BRANCH_5 ROM4:51CF 11 13 5B ld de,5B13 ;\ ROM4:51D2 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B13 ; BRANCH_6 ROM4:51D5 11 18 5B ld de,5B18 ;\ ROM4:51D8 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B18 ; BRANCH_7 ROM4:51DB 11 1D 5B ld de,5B1D ;\ ROM4:51DE C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B1D ; BRANCH_8 ROM4:51E1 11 22 5B ld de,5B22 ;\ ROM4:51E4 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B22 ; BRANCH_9 ROM4:51E7 11 27 5B ld de,5B27 ;\ ROM4:51EA C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B27 } ;;; $51ED: Tone/sweep sound effect initialisation - 9: shooting ice beam ;;; { ROM4:51ED 3E D0 ld a,D0 ;\ ROM4:51EF EA D1 CF ld (CFD1),a ;} Variable tone/sweep channel frequency low byte = D0h ROM4:51F2 3E 14 ld a,14 ;\ ROM4:51F4 11 2C 5B ld de,5B2C ;} Go to set tone/sweep sound effect request as playing with timer 14h and option set $5B2C ROM4:51F7 C3 E3 55 jp 55E3 ;/ } ;;; $51FA: Tone/sweep sound effect playback - 9: shooting ice beam ;;; { ROM4:51FA CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:51FD FA D1 CF ld a,(CFD1) ;\ ROM4:5200 E0 13 ld (FF00+13),a ;} IO tone/sweep channel frequency = [variable tone/sweep channel frequency low byte] ROM4:5202 EA D1 CF ld (CFD1),a ROM4:5205 C9 ret } ;;; $5206: Tone/sweep sound effect initialisation - Ah: shooting plasma beam ;;; { ROM4:5206 3E D0 ld a,D0 ;\ ROM4:5208 EA D1 CF ld (CFD1),a ;} Variable tone/sweep channel frequency low byte = D0h ROM4:520B 3E 14 ld a,14 ;\ ROM4:520D 11 31 5B ld de,5B31 ;} Go to set tone/sweep sound effect request as playing with timer 14h and option set $5B31 ROM4:5210 C3 E3 55 jp 55E3 ;/ } ;;; $5213: Tone/sweep sound effect playback - Ah: shooting plasma beam ;;; { ROM4:5213 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5216 FA D1 CF ld a,(CFD1) ;\ ROM4:5219 E0 13 ld (FF00+13),a ;} IO tone/sweep channel frequency = [variable tone/sweep channel frequency low byte] ROM4:521B EA D1 CF ld (CFD1),a ROM4:521E C9 ret } ;;; $521F: Tone/sweep sound effect initialisation - Bh: shooting spazer beam ;;; { ROM4:521F 3E D0 ld a,D0 ;\ ROM4:5221 EA D1 CF ld (CFD1),a ;} Variable tone/sweep channel frequency low byte = D0h ROM4:5224 3E 14 ld a,14 ;\ ROM4:5226 11 36 5B ld de,5B36 ;} Go to set tone/sweep sound effect request as playing with timer 14h and option set $5B36 ROM4:5229 C3 E3 55 jp 55E3 ;/ } ;;; $522C: Tone/sweep sound effect playback - Bh: shooting spazer beam ;;; { ROM4:522C CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:522F FA D1 CF ld a,(CFD1) ;\ ROM4:5232 E0 13 ld (FF00+13),a ;} IO tone/sweep channel frequency = [variable tone/sweep channel frequency low byte] ROM4:5234 EA D1 CF ld (CFD1),a ROM4:5237 C9 ret } ;;; $5238: Tone/sweep sound effect initialisation - Ch: picking up missile drop ;;; { ROM4:5238 3E 14 ld a,14 ;\ ROM4:523A 11 3B 5B ld de,5B3B ;} Go to set tone/sweep sound effect request as playing with timer 14h and option set $5B3B ROM4:523D C3 E3 55 jp 55E3 ;/ } ;;; $5240: Tone/sweep sound effect playback - Ch: picking up missile drop ;;; { ROM4:5240 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5243 FE 0D cp 0D ;\ ROM4:5245 28 11 jr z,5258 ;} If [tone/sweep channel sound effect timer] = Dh: go to BRANCH_1 ROM4:5247 FE 0B cp 0B ;\ ROM4:5249 28 13 jr z,525E ;} If [tone/sweep channel sound effect timer] = Bh: go to BRANCH_2 ROM4:524B FE 08 cp 08 ;\ ROM4:524D 28 15 jr z,5264 ;} If [tone/sweep channel sound effect timer] = 8: go to BRANCH_3 ROM4:524F FE 05 cp 05 ;\ ROM4:5251 28 17 jr z,526A ;} If [tone/sweep channel sound effect timer] = 5: go to BRANCH_4 ROM4:5253 FE 03 cp 03 ;\ ROM4:5255 28 59 jr z,52B0 ;} If [tone/sweep channel sound effect timer] = 3: go to set picked up drop end option set ROM4:5257 C9 ret ; Return ; BRANCH_1 ROM4:5258 11 40 5B ld de,5B40 ;\ ROM4:525B C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B40 ; BRANCH_2 ROM4:525E 11 45 5B ld de,5B45 ;\ ROM4:5261 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B45 ; BRANCH_3 ROM4:5264 11 4A 5B ld de,5B4A ;\ ROM4:5267 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B4A ; BRANCH_4 ROM4:526A 11 4F 5B ld de,5B4F ;\ ROM4:526D C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B4F } ;;; $5270: Tone/sweep sound effect initialisation - Dh: spider ball ;;; { ROM4:5270 3E 0D ld a,0D ;\ ROM4:5272 11 54 5B ld de,5B54 ;} Go to set tone/sweep sound effect request as playing with timer Dh and option set $5B54 ROM4:5275 C3 E3 55 jp 55E3 ;/ } ;;; $5278: Tone/sweep sound effect playback - Dh: spider ball ;;; { ROM4:5278 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:527B FE 03 cp 03 ;\ ROM4:527D C0 ret nz ;} If [tone/sweep channel sound effect timer] != 3: return ROM4:527E 11 59 5B ld de,5B59 ;\ ROM4:5281 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B59 } ;;; $5284: Tone/sweep sound effect initialisation - Eh: picked up energy drop ;;; { ROM4:5284 CD BE 55 call 55BE ; Remember if screw attacking sound effect is playing ROM4:5287 3E 0A ld a,0A ;\ ROM4:5289 11 5E 5B ld de,5B5E ;} Go to set tone/sweep sound effect request as playing with timer Ah and option set $5B5E ROM4:528C C3 E3 55 jp 55E3 ;/ } ;;; $528F: Tone/sweep sound effect playback - Eh: picked up energy drop ;;; { ROM4:528F CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5292 FE 01 cp 01 ;\ ROM4:5294 CA C8 55 jp z,55C8 ;} If [tone/sweep channel sound effect timer] = 1: go to maybe resume screw attacking sound effect ROM4:5297 FE 08 cp 08 ;\ ROM4:5299 28 09 jr z,52A4 ;} If [tone/sweep channel sound effect timer] = 8: go to BRANCH_1 ROM4:529B FE 05 cp 05 ;\ ROM4:529D 28 0B jr z,52AA ;} If [tone/sweep channel sound effect timer] = 5: go to BRANCH_2 ROM4:529F FE 03 cp 03 ;\ ROM4:52A1 28 0D jr z,52B0 ;} If [tone/sweep channel sound effect timer] = 3: go to set picked up drop end option set ROM4:52A3 C9 ret ; Return ; BRANCH_1 ROM4:52A4 11 63 5B ld de,5B63 ;\ ROM4:52A7 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B63 ; BRANCH_2 ROM4:52AA 11 68 5B ld de,5B68 ;\ ROM4:52AD C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B68 } ;;; $52B0: Set picked up drop end option set ;;; { ROM4:52B0 11 6D 5B ld de,5B6D ;\ ROM4:52B3 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B6D } ;;; $52B6: Tone/sweep sound effect initialisation - Fh: shot missile door with beam ;;; { ROM4:52B6 3E 05 ld a,05 ;\ ROM4:52B8 11 72 5B ld de,5B72 ;} Go to set tone/sweep sound effect request as playing with timer 5 and option set $5B72 ROM4:52BB C3 E3 55 jp 55E3 ;/ } ;;; $52BE: Tone/sweep sound effect playback - Fh: shot missile door with beam ;;; { ROM4:52BE CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:52C1 FE 02 cp 02 ;\ ROM4:52C3 28 01 jr z,52C6 ;} If [tone/sweep channel sound effect timer] != 2: ROM4:52C5 C9 ret ; Return ROM4:52C6 11 77 5B ld de,5B77 ;\ ROM4:52C9 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B77 } ;;; $52CC: Tone/sweep sound effect initialisation - 10h: ;;; { ROM4:52CC 3E 16 ld a,16 ;\ ROM4:52CE 11 7C 5B ld de,5B7C ;} Go to set tone/sweep sound effect request as playing with timer 16h and option set $5B7C ROM4:52D1 C3 E3 55 jp 55E3 ;/ } ;;; $52D4: Tone/sweep sound effect playback - 10h: ;;; { ROM4:52D4 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:52D7 FE 14 cp 14 ;\ ROM4:52D9 28 25 jr z,5300 ;} If [tone/sweep channel sound effect timer] = 14h: go to BRANCH_1 ROM4:52DB FE 12 cp 12 ;\ ROM4:52DD 28 27 jr z,5306 ;} If [tone/sweep channel sound effect timer] = 12h: go to BRANCH_2 ROM4:52DF FE 10 cp 10 ;\ ROM4:52E1 28 29 jr z,530C ;} If [tone/sweep channel sound effect timer] = 10h: go to BRANCH_3 ROM4:52E3 FE 0E cp 0E ;\ ROM4:52E5 28 2B jr z,5312 ;} If [tone/sweep channel sound effect timer] = Eh: go to BRANCH_4 ROM4:52E7 FE 0C cp 0C ;\ ROM4:52E9 28 2D jr z,5318 ;} If [tone/sweep channel sound effect timer] = Ch: go to BRANCH_5 ROM4:52EB FE 0A cp 0A ;\ ROM4:52ED 28 2F jr z,531E ;} If [tone/sweep channel sound effect timer] = Ah: go to BRANCH_6 ROM4:52EF FE 08 cp 08 ;\ ROM4:52F1 28 31 jr z,5324 ;} If [tone/sweep channel sound effect timer] = 8: go to BRANCH_7 ROM4:52F3 FE 06 cp 06 ;\ ROM4:52F5 28 33 jr z,532A ;} If [tone/sweep channel sound effect timer] = 6: go to BRANCH_8 ROM4:52F7 FE 04 cp 04 ;\ ROM4:52F9 28 35 jr z,5330 ;} If [tone/sweep channel sound effect timer] = 4: go to BRANCH_9 ROM4:52FB FE 02 cp 02 ;\ ROM4:52FD 28 37 jr z,5336 ;} If [tone/sweep channel sound effect timer] = 2: go to BRANCH_A ROM4:52FF C9 ret ; BRANCH_1 ROM4:5300 11 81 5B ld de,5B81 ;\ ROM4:5303 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B81 ; BRANCH_2 ROM4:5306 11 86 5B ld de,5B86 ;\ ROM4:5309 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B86 ; BRANCH_2 ROM4:530C 11 8B 5B ld de,5B8B ;\ ROM4:530F C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B8B ; BRANCH_4 ROM4:5312 11 90 5B ld de,5B90 ;\ ROM4:5315 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B90 ; BRANCH_5 ROM4:5318 11 95 5B ld de,5B95 ;\ ROM4:531B C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B95 ; BRANCH_6 ROM4:531E 11 9A 5B ld de,5B9A ;\ ROM4:5321 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B9A ; BRANCH_7 ROM4:5324 11 9F 5B ld de,5B9F ;\ ROM4:5327 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5B9F ; BRANCH_8 ROM4:532A 11 A4 5B ld de,5BA4 ;\ ROM4:532D C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BA4 ; BRANCH_9 ROM4:5330 11 A9 5B ld de,5BA9 ;\ ROM4:5333 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BA9 ; BRANCH_A ROM4:5336 11 AE 5B ld de,5BAE ;\ ROM4:5339 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BAE } ;;; $533C: Tone/sweep sound effect initialisation - 12h: unused ;;; { ROM4:533C AF xor a ;\ ROM4:533D 11 B3 5B ld de,5BB3 ;} Go to set tone/sweep sound effect request as playing with timer 0 and option set $5BB3 ROM4:5340 C3 E3 55 jp 55E3 ;/ } ;;; $5343: Tone/sweep sound effect initialisation - 13h: bomb laid ;;; { ROM4:5343 3E 02 ld a,02 ;\ ROM4:5345 11 B8 5B ld de,5BB8 ;} Go to set tone/sweep sound effect request as playing with timer 2 and option set $5BB8 ROM4:5348 C3 E3 55 jp 55E3 ;/ } ;;; $534B: Tone/sweep sound effect initialisation - 14h: unused ;;; { ROM4:534B 3E 0E ld a,0E ;\ ROM4:534D 11 BD 5B ld de,5BBD ;} Go to set tone/sweep sound effect request as playing with timer Eh and option set $5BBD ROM4:5350 C3 E3 55 jp 55E3 ;/ } ;;; $5353: Tone/sweep sound effect playback - 14h: unused ;;; { ROM4:5353 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5356 FE 06 cp 06 ;\ ROM4:5358 28 01 jr z,535B ;} If [tone/sweep channel sound effect timer] != 6: ROM4:535A C9 ret ; Return ROM4:535B 11 C2 5B ld de,5BC2 ;\ ROM4:535E C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BC2 } ;;; $5361: Tone/sweep sound effect initialisation - 15h: option select / missile select ;;; { ROM4:5361 3E 04 ld a,04 ;\ ROM4:5363 11 C7 5B ld de,5BC7 ;} Go to set tone/sweep sound effect request as playing with timer 4 and option set $5BC7 ROM4:5366 C3 E3 55 jp 55E3 ;/ } ;;; $5369: Tone/sweep sound effect playback - 15h: option select / missile select ;;; { ROM4:5369 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:536C FE 02 cp 02 ;\ ROM4:536E 28 01 jr z,5371 ;} If [tone/sweep channel sound effect timer] != 2: ROM4:5370 C9 ret ; Return ROM4:5371 11 CC 5B ld de,5BCC ;\ ROM4:5374 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BCC } ;;; $5377: Tone/sweep sound effect initialisation - 16h: shooting wave beam ;;; { ROM4:5377 3E 1D ld a,1D ;\ ROM4:5379 11 D1 5B ld de,5BD1 ;} Go to set tone/sweep sound effect request as playing with timer 1Dh and option set $5BD1 ROM4:537C C3 E3 55 jp 55E3 ;/ } ;;; $537F: Tone/sweep sound effect playback - 16h: shooting wave beam ;;; { ROM4:537F CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5382 FE 1A cp 1A ;\ ROM4:5384 28 19 jr z,539F ;} If [tone/sweep channel sound effect timer] = 1Ah: go to BRANCH_1 ROM4:5386 FE 15 cp 15 ;\ ROM4:5388 28 15 jr z,539F ;} If [tone/sweep channel sound effect timer] = 15h: go to BRANCH_1 ROM4:538A FE 11 cp 11 ;\ ROM4:538C 28 17 jr z,53A5 ;} If [tone/sweep channel sound effect timer] = 11h: go to BRANCH_2 ROM4:538E FE 0D cp 0D ;\ ROM4:5390 28 13 jr z,53A5 ;} If [tone/sweep channel sound effect timer] = Dh: go to BRANCH_2 ROM4:5392 FE 09 cp 09 ;\ ROM4:5394 28 15 jr z,53AB ;} If [tone/sweep channel sound effect timer] = 9: go to BRANCH_3 ROM4:5396 FE 05 cp 05 ;\ ROM4:5398 28 11 jr z,53AB ;} If [tone/sweep channel sound effect timer] = 5: go to BRANCH_3 ROM4:539A FE 01 cp 01 ;\ ROM4:539C 28 13 jr z,53B1 ;} If [tone/sweep channel sound effect timer] = 1: go to BRANCH_4 ROM4:539E C9 ret ; Return ; BRANCH_1 ROM4:539F 11 D6 5B ld de,5BD6 ;\ ROM4:53A2 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BD6 ; BRANCH_2 ROM4:53A5 11 DB 5B ld de,5BDB ;\ ROM4:53A8 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BDB ; BRANCH_3 ROM4:53AB 11 E0 5B ld de,5BE0 ;\ ROM4:53AE C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BE0 ; BRANCH_4 ROM4:53B1 11 E5 5B ld de,5BE5 ;\ ROM4:53B4 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BE5 } ;;; $53B7: Tone/sweep sound effect initialisation - 17h: picked up large energy drop ;;; { ROM4:53B7 CD BE 55 call 55BE ; Remember if screw attacking sound effect is playing ROM4:53BA 3E 10 ld a,10 ;\ ROM4:53BC 11 EA 5B ld de,5BEA ;} Go to set tone/sweep sound effect request as playing with timer 10 and option set $5BEA ROM4:53BF C3 E3 55 jp 55E3 ;/ } ;;; $53C2: Tone/sweep sound effect playback - 17h: picked up large energy drop ;;; { ROM4:53C2 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:53C5 FE 01 cp 01 ;\ ROM4:53C7 CA C8 55 jp z,55C8 ;} If [tone/sweep channel sound effect timer] = 1: go to maybe resume screw attacking sound effect ROM4:53CA FE 0D cp 0D ;\ ROM4:53CC 28 11 jr z,53DF ;} If [tone/sweep channel sound effect timer] = Dh: go to BRANCH_1 ROM4:53CE FE 0A cp 0A ;\ ROM4:53D0 28 13 jr z,53E5 ;} If [tone/sweep channel sound effect timer] = Ah: go to BRANCH_2 ROM4:53D2 FE 08 cp 08 ;\ ROM4:53D4 28 15 jr z,53EB ;} If [tone/sweep channel sound effect timer] = 8: go to BRANCH_3 ROM4:53D6 FE 05 cp 05 ;\ ROM4:53D8 28 17 jr z,53F1 ;} If [tone/sweep channel sound effect timer] = 5: go to BRANCH_4 ROM4:53DA FE 02 cp 02 ;\ ROM4:53DC 28 13 jr z,53F1 ;} If [tone/sweep channel sound effect timer] = 2: go to BRANCH_4 ROM4:53DE C9 ret ; Return ; BRANCH_1 ROM4:53DF 11 EF 5B ld de,5BEF ;\ ROM4:53E2 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BEF ; BRANCH_2 ROM4:53E5 11 F4 5B ld de,5BF4 ;\ ROM4:53E8 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BF4 ; BRANCH_3 ROM4:53EB 11 F9 5B ld de,5BF9 ;\ ROM4:53EE C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BF9 ; BRANCH_4 ROM4:53F1 11 FE 5B ld de,5BFE ;\ ROM4:53F4 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5BFE } ;;; $53F7: Tone/sweep sound effect initialisation - 18h: Samus' health changed ;;; { ; Weird code alert. I think the `call nz` is supposed to be a `jr z`, ; with the intention of toggling which option set is used each time this sound effect is played; ; instead, it always uses option set $5C03 ROM4:53F7 FA C4 CE ld a,(CEC4) ;\ ROM4:53FA A7 and a ;} If [Samus' health changed option set index] != 0: execute $5403 ROM4:53FB C4 03 54 call nz,5403 ;/ ROM4:53FE 3E 02 ld a,02 ;\ ROM4:5400 EA C4 CE ld (CEC4),a ;} Samus' health changed option set index = 2 ROM4:5403 FE 01 cp 01 ;\ ROM4:5405 28 16 jr z,541D ;} If [Samus' health changed option set index] = 1: go to BRANCH_1 ROM4:5407 FE 02 cp 02 ;\ ROM4:5409 28 06 jr z,5411 ;} If [Samus' health changed option set index] = 2: go to BRANCH_2 ROM4:540B 3E 02 ld a,02 ;\ ROM4:540D EA C4 CE ld (CEC4),a ;} Samus' health changed option set index = 2 ROM4:5410 C9 ret ; Return ; BRANCH_2 ROM4:5411 3D dec a ;\ ROM4:5412 EA C4 CE ld (CEC4),a ;} Samus' health changed option set index = 1 ROM4:5415 3E 02 ld a,02 ;\ ROM4:5417 11 03 5C ld de,5C03 ;} Go to set tone/sweep sound effect request as playing with timer 2 and option set $5C03 ROM4:541A C3 E3 55 jp 55E3 ;/ ; BRANCH_1 ROM4:541D 3D dec a ;\ ROM4:541E EA C4 CE ld (CEC4),a ;} Samus' health changed option set index = 0 ROM4:5421 3E 02 ld a,02 ;\ ROM4:5423 11 08 5C ld de,5C08 ;} Go to set tone/sweep sound effect request as playing with timer 2 and option set $5C08 ROM4:5426 C3 E3 55 jp 55E3 ;/ } ;;; $5429: Tone/sweep sound effect initialisation - 19h: no missile dud shot ;;; { ROM4:5429 3E 04 ld a,04 ;\ ROM4:542B 11 0D 5C ld de,5C0D ;} Go to set tone/sweep sound effect request as playing with timer 4 and option set $5C0D ROM4:542E C3 E3 55 jp 55E3 ;/ } ;;; $5431: Tone/sweep sound effect playback - 19h: no missile dud shot ;;; { ROM4:5431 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5434 FE 02 cp 02 ;\ ROM4:5436 28 01 jr z,5439 ;} If [tone/sweep channel sound effect timer] != 2: ROM4:5438 C9 ret ; Return ROM4:5439 11 12 5C ld de,5C12 ;\ ROM4:543C C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C12 } ;;; $543F: Tone/sweep sound effect initialisation - 1Ah: ;;; { ROM4:543F 3E 16 ld a,16 ;\ ROM4:5441 11 17 5C ld de,5C17 ;} Go to set tone/sweep sound effect request as playing with timer 16h and option set $5C17 ROM4:5444 C3 E3 55 jp 55E3 ;/ } ;;; $5447: Tone/sweep sound effect playback - 1Ah: ;;; { ROM4:5447 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:544A FE 14 cp 14 ;\ ROM4:544C 28 25 jr z,5473 ;} If [tone/sweep channel sound effect timer] = 14h: go to BRANCH_1 ROM4:544E FE 12 cp 12 ;\ ROM4:5450 28 27 jr z,5479 ;} If [tone/sweep channel sound effect timer] = 12h: go to BRANCH_2 ROM4:5452 FE 10 cp 10 ;\ ROM4:5454 28 1D jr z,5473 ;} If [tone/sweep channel sound effect timer] = 10h: go to BRANCH_1 ROM4:5456 FE 0E cp 0E ;\ ROM4:5458 28 25 jr z,547F ;} If [tone/sweep channel sound effect timer] = Eh: go to BRANCH_3 ROM4:545A FE 0C cp 0C ;\ ROM4:545C 28 15 jr z,5473 ;} If [tone/sweep channel sound effect timer] = Ch: go to BRANCH_1 ROM4:545E FE 0A cp 0A ;\ ROM4:5460 28 23 jr z,5485 ;} If [tone/sweep channel sound effect timer] = Ah: go to BRANCH_4 ROM4:5462 FE 08 cp 08 ;\ ROM4:5464 28 0D jr z,5473 ;} If [tone/sweep channel sound effect timer] = 8: go to BRANCH_1 ROM4:5466 FE 06 cp 06 ;\ ROM4:5468 28 21 jr z,548B ;} If [tone/sweep channel sound effect timer] = 6: go to BRANCH_5 ROM4:546A FE 04 cp 04 ;\ ROM4:546C 28 05 jr z,5473 ;} If [tone/sweep channel sound effect timer] = 4: go to BRANCH_1 ROM4:546E FE 02 cp 02 ;\ ROM4:5470 28 1F jr z,5491 ;} If [tone/sweep channel sound effect timer] = 2: go to BRANCH_6 ROM4:5472 C9 ret ; Return ; BRANCH_1 ROM4:5473 11 1C 5C ld de,5C1C ;\ ROM4:5476 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C1C ; BRANCH_2 ROM4:5479 11 21 5C ld de,5C21 ;\ ROM4:547C C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C21 ; BRANCH_3 ROM4:547F 11 26 5C ld de,5C26 ;\ ROM4:5482 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C26 ; BRANCH_4 ROM4:5485 11 2B 5C ld de,5C2B ;\ ROM4:5488 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C2B ; BRANCH_5 ROM4:548B 11 30 5C ld de,5C30 ;\ ROM4:548E C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C30 ; BRANCH_6 ROM4:5491 11 35 5C ld de,5C35 ;\ ROM4:5494 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C35 } ;;; $5497: Tone/sweep sound effect initialisation - 1Bh: metroid cry ;;; { ROM4:5497 F0 04 ld a,(FF00+04) ;\ ROM4:5499 CB 37 swap a ;| ROM4:549B CB FF set 7,a ;| ROM4:549D CB F7 set 6,a ;} Variable tone/sweep channel frequency low byte = E0h | (random number) & ~2 ROM4:549F CB EF set 5,a ;| ROM4:54A1 CB 8F res 1,a ;| ROM4:54A3 EA D1 CF ld (CFD1),a ;/ ROM4:54A6 3E 30 ld a,30 ;\ ROM4:54A8 11 3A 5C ld de,5C3A ;} Go to set tone/sweep sound effect request as playing with timer 30h and option set $5C3A ROM4:54AB C3 E3 55 jp 55E3 ;/ } ;;; $54AE: Tone/sweep sound effect playback - 1Bh: metroid cry ;;; { ROM4:54AE CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:54B1 FE 20 cp 20 ;\ ROM4:54B3 38 0F jr c,54C4 ;} If [tone/sweep channel sound effect timer] >= 20h: ROM4:54B5 FA D1 CF ld a,(CFD1) ;\ ROM4:54B8 3C inc a ;| ROM4:54B9 3C inc a ;| ROM4:54BA 3C inc a ;} Variable tone/sweep channel frequency low byte += 6 ROM4:54BB 3C inc a ;| ROM4:54BC 3C inc a ;| ROM4:54BD 3C inc a ;/ ROM4:54BE E0 13 ld (FF00+13),a ; IO tone/sweep channel frequency low = [variable tone/sweep channel frequency low byte] ROM4:54C0 EA D1 CF ld (CFD1),a ROM4:54C3 C9 ret ; Return ROM4:54C4 FA D1 CF ld a,(CFD1) ;\ ROM4:54C7 3D dec a ;} Decrement variable tone/sweep channel frequency low byte ROM4:54C8 E0 13 ld (FF00+13),a ; IO tone/sweep channel frequency low = [variable tone/sweep channel frequency low byte] ROM4:54CA EA D1 CF ld (CFD1),a ROM4:54CD C9 ret } ;;; $54CE: Tone/sweep sound effect initialisation - 1Ch: saved ;;; { ROM4:54CE 3E 0F ld a,0F ;\ ROM4:54D0 11 3F 5C ld de,5C3F ;} Go to set tone/sweep sound effect request as playing with timer Fh and option set $5C3F ROM4:54D3 C3 E3 55 jp 55E3 ;/ } ;;; $54D6: Tone/sweep sound effect playback - 1Ch: saved ;;; { ROM4:54D6 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:54D9 FE 0A cp 0A ;\ ROM4:54DB 28 05 jr z,54E2 ;} If [tone/sweep channel sound effect timer] = Ah: go to BRANCH_1 ROM4:54DD FE 03 cp 03 ;\ ROM4:54DF 28 07 jr z,54E8 ;} If [tone/sweep channel sound effect timer] = 3: go to BRANCH_2 ROM4:54E1 C9 ret ; Return ; BRANCH_1 ROM4:54E2 11 44 5C ld de,5C44 ;\ ROM4:54E5 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C44 ; BRANCH_2 ROM4:54E8 11 49 5C ld de,5C49 ;\ ROM4:54EB C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C49 } ;;; $54EE: Tone/sweep sound effect initialisation - 1Dh: varia suit transformation ;;; { ROM4:54EE 3E 90 ld a,90 ;\ ROM4:54F0 11 4E 5C ld de,5C4E ;} Go to set tone/sweep sound effect request as playing with timer 90h and option set $5C4E ROM4:54F3 C3 E3 55 jp 55E3 ;/ } ;;; $54F6: Tone/sweep sound effect playback - 1Dh: varia suit transformation ;;; { ; This playback defines 7 points in the sound effect to change option sets; ; sadly, however, none of them change it from the initial $5C4E ROM4:54F6 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:54F9 FE 7E cp 7E ;\ ROM4:54FB 28 19 jr z,5516 ;} If [tone/sweep channel sound effect timer] != 7Eh: ROM4:54FD FE 6E cp 6E ;\ ROM4:54FF 28 15 jr z,5516 ;} If [tone/sweep channel sound effect timer] != 6Eh: ROM4:5501 FE 5E cp 5E ;\ ROM4:5503 28 11 jr z,5516 ;} If [tone/sweep channel sound effect timer] != 5Eh: ROM4:5505 FE 4E cp 4E ;\ ROM4:5507 28 0D jr z,5516 ;} If [tone/sweep channel sound effect timer] != 4Eh: ROM4:5509 FE 3E cp 3E ;\ ROM4:550B 28 09 jr z,5516 ;} If [tone/sweep channel sound effect timer] != 3Eh: ROM4:550D FE 2E cp 2E ;\ ROM4:550F 28 05 jr z,5516 ;} If [tone/sweep channel sound effect timer] != 2Eh: ROM4:5511 FE 1E cp 1E ;\ ROM4:5513 28 01 jr z,5516 ;} If [tone/sweep channel sound effect timer] != 1Eh: ROM4:5515 C9 ret ; Return ROM4:5516 11 4E 5C ld de,5C4E ;\ ROM4:5519 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C4E } ;;; $551C: Tone/sweep sound effect initialisation - 1Eh: unpaused ;;; { ROM4:551C 3E 0E ld a,0E ;\ ROM4:551E 11 53 5C ld de,5C53 ;} Go to set tone/sweep sound effect request as playing with timer Eh and option set $5C53 ROM4:5521 C3 E3 55 jp 55E3 ;/ } ;;; $5524: Tone/sweep sound effect playback - 1Eh: unpaused ;;; { ROM4:5524 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5527 FE 0A cp 0A ;\ ROM4:5529 28 05 jr z,5530 ;} If [tone/sweep channel sound effect timer] = Ah: go to BRANCH_1 ROM4:552B FE 03 cp 03 ;\ ROM4:552D 28 07 jr z,5536 ;} If [tone/sweep channel sound effect timer] = 3: go to BRANCH_2 ROM4:552F C9 ret ; Return ; BRANCH_1 ROM4:5530 11 58 5C ld de,5C58 ;\ ROM4:5533 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C58 ; BRANCH_2 ROM4:5536 11 5D 5C ld de,5C5D ;\ ROM4:5539 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C5D } ;;; $553C: Unused. Tone/sweep sound effect initialisation - example A ;;; { ROM4:553C 3E 50 ld a,50 ;\ ROM4:553E 11 62 5C ld de,5C62 ;} Go to set tone/sweep sound effect request as playing with timer 50h and option set $5C62 ROM4:5541 C3 E3 55 jp 55E3 ;/ } ;;; $5544: Unused. Tone/sweep sound effect playback - example A ;;; { ROM4:5544 11 62 5C ld de,5C62 ;\ ROM4:5547 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C62 } ;;; $554A: Unused. Tone/sweep sound effect initialisation - example B ;;; { ROM4:554A 3E 50 ld a,50 ;\ ROM4:554C 11 67 5C ld de,5C67 ;} Go to set tone/sweep sound effect request as playing with timer 50h and option set $5C67 ROM4:554F C3 E3 55 jp 55E3 ;/ } ;;; $5552: Unused. Set example B option set ;;; { ROM4:5552 11 67 5C ld de,5C67 ;\ ROM4:5555 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C67 } ;;; $5558: Unused. Tone/sweep sound effect playback - example B ;;; { ROM4:5558 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:555B FE 40 cp 40 ;\ ROM4:555D C0 ret nz ;} If [tone/sweep channel sound effect timer] != 40h: return ROM4:555E 11 67 5C ld de,5C67 ;\ ROM4:5561 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C67 } ;;; $5564: Unused. Tone/sweep sound effect initialisation - example C ;;; { ROM4:5564 3E 50 ld a,50 ;\ ROM4:5566 11 6C 5C ld de,5C6C ;} Go to set tone/sweep sound effect request as playing with timer 50h and option set $5C6C ROM4:5569 C3 E3 55 jp 55E3 ;/ } ;;; $556C: Unused. Set example C option set ;;; { ROM4:556C 11 6C 5C ld de,5C6C ;\ ROM4:556F C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C6C } ;;; $5572: Unused. Tone/sweep sound effect playback - example C ;;; { ROM4:5572 CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:5575 FE 40 cp 40 ;\ ROM4:5577 28 F3 jr z,556C ;} If [tone/sweep channel sound effect timer] = 40h: go to set example C option set ROM4:5579 FE 30 cp 30 ;\ ROM4:557B 28 EF jr z,556C ;} If [tone/sweep channel sound effect timer] = 30h: go to set example C option set ROM4:557D C9 ret ; Return } ;;; $557E: Unused. Tone/sweep sound effect initialisation - example D ;;; { ROM4:557E 3E 50 ld a,50 ;\ ROM4:5580 11 71 5C ld de,5C71 ;} Go to set tone/sweep sound effect request as playing with timer 50h and option set $5C71 ROM4:5583 C3 E3 55 jp 55E3 ;/ } ;;; $5586: Unused. Set example D option set ;;; { ROM4:5586 11 71 5C ld de,5C71 ;\ ROM4:5589 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C71 } ;;; $558C: Unused. Tone/sweep sound effect playback - example D ;;; { ROM4:558C CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:558F FE 40 cp 40 ;\ ROM4:5591 28 F3 jr z,5586 ;} If [tone/sweep channel sound effect timer] = 40h: go to set example D option set ROM4:5593 FE 30 cp 30 ;\ ROM4:5595 28 EF jr z,5586 ;} If [tone/sweep channel sound effect timer] = 30h: go to set example D option set ROM4:5597 FE 20 cp 20 ;\ ROM4:5599 28 EB jr z,5586 ;} If [tone/sweep channel sound effect timer] = 20h: go to set example D option set ROM4:559B C9 ret ; Return } ;;; $559C: Unused. Tone/sweep sound effect initialisation - example E ;;; { ROM4:559C 3E 50 ld a,50 ;\ ROM4:559E 11 76 5C ld de,5C76 ;} Go to set tone/sweep sound effect request as playing with timer 50h and option set $5C76 ROM4:55A1 C3 E3 55 jp 55E3 ;/ } ;;; $55A4: Unused. Set example E option set ;;; { ROM4:55A4 11 76 5C ld de,5C76 ;\ ROM4:55A7 C3 D9 47 jp 47D9 ;} Go to set tone/sweep channel option set $5C76 } ;;; $55AA: Unused. Tone/sweep sound effect playback - example E ;;; { ROM4:55AA CD EA 46 call 46EA ; Decrement tone/sweep channel sound effect timer or clear tone/sweep channel sound effect ROM4:55AD FE 40 cp 40 ;\ ROM4:55AF 28 F3 jr z,55A4 ;} If [tone/sweep channel sound effect timer] = 40h: go to set example E option set ROM4:55B1 FE 30 cp 30 ;\ ROM4:55B3 28 EF jr z,55A4 ;} If [tone/sweep channel sound effect timer] = 30h: go to set example E option set ROM4:55B5 FE 20 cp 20 ;\ ROM4:55B7 28 EB jr z,55A4 ;} If [tone/sweep channel sound effect timer] = 20h: go to set example E option set ROM4:55B9 FE 10 cp 10 ;\ ROM4:55BB 28 E7 jr z,55A4 ;} If [tone/sweep channel sound effect timer] = 10h: go to set example E option set ROM4:55BD C9 ret ; Return } ;;; $55BE: Remember if screw attacking sound effect is playing ;;; { ROM4:55BE FA C1 CE ld a,(CEC1) ;\ ROM4:55C1 FE 03 cp 03 ;} If [tone/sweep channel sound effect playing] != screw attacking: return ROM4:55C3 C0 ret nz ;/ ROM4:55C4 EA E8 CE ld (CEE8),a ; Set resume screw attack sound effect flag ROM4:55C7 C9 ret } ;;; $55C8: Maybe resume screw attacking sound effect ;;; { ROM4:55C8 FA E8 CE ld a,(CEE8) ;\ ROM4:55CB A7 and a ;} If [resume screw attack sound effect flag] = 0: return ROM4:55CC C8 ret z ;/ ROM4:55CD FA 20 D0 ld a,(D020) ;\ ROM4:55D0 FE 02 cp 02 ;} If [Samus' pose] != spin-jumping: return ROM4:55D2 C0 ret nz ;/ ROM4:55D3 FA 45 D0 ld a,(D045) ;\ ROM4:55D6 CB 57 bit 2,a ;} If screw attack not acquired: return ROM4:55D8 C8 ret z ;/ ROM4:55D9 3E 03 ld a,03 ;\ ROM4:55DB EA C1 CE ld (CEC1),a ;} Tone/sweep channel sound effect playing = screw attacking ROM4:55DE AF xor a ;\ ROM4:55DF EA E8 CE ld (CEE8),a ;} Resume screw attack sound effect = 0 ROM4:55E2 C9 ret } ;;; $55E3: Set tone/sweep sound effect request as playing with timer [a] and option set [de] ;;; { ROM4:55E3 EA C3 CE ld (CEC3),a ; Tone/sweep channel sound effect timer = [a] ROM4:55E6 FA C0 CE ld a,(CEC0) ;\ ROM4:55E9 EA C1 CE ld (CEC1),a ;} Tone/sweep channel sound effect playing = [tone/sweep channel sound effect request], set tone/sweep channel sound effect is playing flag ROM4:55EC EA E4 CE ld (CEE4),a ;/ ROM4:55EF C3 D9 47 jp 47D9 ; Set tone/sweep channel option set [de] } } ;;; $55F2..56CB: Tone channel sound effects ;;; { ;;; $55F2: Tone channel sound effect initialisation function pointers ;;; { ROM4:55F2 dw 4769, ; 1: ret 4769, ; 2: ret 560E, ; 3: Metroid Queen cry 5658, ; 4: Baby Metroid hatched / clearing blocks 568B, ; 5: Baby Metroid cry 56A2, ; 6: Metroid Queen hurt cry 56B5 ; 7: } ;;; $5600: Tone channel sound effect playback function pointers ;;; { ROM4:5600 dw 4769, ; 1: ret 4769, ; 2: ret 5623, ; 3: Metroid Queen cry 5669, ; 4: Baby Metroid hatched / clearing blocks 5623, ; 5: Baby Metroid cry 5623, ; 6: Metroid Queen hurt cry 46F7 ; 7: } ;;; $560E: Tone sound effect initialisation - 3: Metroid Queen cry ;;; { ROM4:560E F0 04 ld a,(FF00+04) ;\ ROM4:5610 CB 37 swap a ;| ROM4:5612 CB BF res 7,a ;| ROM4:5614 CB B7 res 6,a ;} Variable tone channel frequency low byte = (random number) & 1Fh ROM4:5616 CB AF res 5,a ;| ROM4:5618 EA CC CE ld (CECC),a ;/ ROM4:561B 3E 30 ld a,30 ;\ ROM4:561D 11 2B 5D ld de,5D2B ;} Go to set tone sound effect request as playing with timer 30h and option set $5D2B ROM4:5620 C3 BD 56 jp 56BD ;/ } ;;; $5623: Tone sound effect playback - 3: Metroid Queen cry / 5: Baby Metroid cry / 6: Metroid Queen hurt cry ;;; { ROM4:5623 CD F7 46 call 46F7 ; Decrement tone channel sound effect timer or clear tone channel sound effect ROM4:5626 CB 47 bit 0,a ;\ ROM4:5628 28 1A jr z,5644 ;} If [tone channel sound effect timer] % 2 = 0: go to BRANCH_EVEN ROM4:562A FA CC CE ld a,(CECC) ;\ ROM4:562D CB E7 set 4,a ;} Variable tone channel frequency low byte |= 10h ROM4:562F EA CC CE ld (CECC),a ;/ ; BRANCH_MERGE ROM4:5632 FA CA CE ld a,(CECA) ;\ ROM4:5635 FE 20 cp 20 ;} If [tone channel sound effect timer] < 20h: go to BRANCH_PART_2 ROM4:5637 38 15 jr c,564E ;/ ROM4:5639 FA CC CE ld a,(CECC) ;\ ROM4:563C C6 03 add a,03 ;} Variable tone channel frequency low byte += 3 ROM4:563E E0 18 ld (FF00+18),a ; IO tone channel frequency low = [variable tone channel frequency low byte] ROM4:5640 EA CC CE ld (CECC),a ROM4:5643 C9 ret ; Return ; BRANCH_EVEN ROM4:5644 FA CC CE ld a,(CECC) ;\ ROM4:5647 CB A7 res 4,a ;} Variable tone channel frequency low byte &= ~10h ROM4:5649 EA CC CE ld (CECC),a ;/ ROM4:564C 18 E4 jr 5632 ; Go to BRANCH_MERGE ; BRANCH_PART_2 ROM4:564E FA CC CE ld a,(CECC) ;\ ROM4:5651 3D dec a ;} Variable tone channel frequency low byte -= 1 ROM4:5652 E0 18 ld (FF00+18),a ; IO tone channel frequency low = [variable tone channel frequency low byte] ROM4:5654 EA CC CE ld (CECC),a ROM4:5657 C9 ret } ;;; $5658: Tone sound effect initialisation - 4: Baby Metroid hatched / clearing blocks ;;; { ROM4:5658 F0 04 ld a,(FF00+04) ;\ ROM4:565A CB FF set 7,a ;| ROM4:565C CB B7 res 6,a ;} Variable tone channel frequency low byte = 80h | (random number) & 3Fh ROM4:565E EA CC CE ld (CECC),a ;/ ROM4:5661 3E 1C ld a,1C ;\ ROM4:5663 11 2F 5D ld de,5D2F ;} Go to set tone sound effect request as playing with timer 1Ch and option set $5D2F ROM4:5666 C3 BD 56 jp 56BD ;/ } ;;; $5669: Tone sound effect playback - 4: Baby Metroid hatched / clearing blocks ;;; { ROM4:5669 CD F7 46 call 46F7 ; Decrement tone channel sound effect timer or clear tone channel sound effect ROM4:566C FE 13 cp 13 ;\ ROM4:566E 28 0F jr z,567F ;} If [tone channel sound effect timer] = 13h: go to BRANCH_PART_2 ROM4:5670 FE 0C cp 0C ;\ ROM4:5672 28 11 jr z,5685 ;} If [tone channel sound effect timer] = Ch: go to BRANCH_PART_3 ROM4:5674 FA CC CE ld a,(CECC) ;\ ROM4:5677 3C inc a ;| ROM4:5678 3C inc a ;} Variable tone channel frequency low byte += 2 ROM4:5679 EA CC CE ld (CECC),a ;/ ROM4:567C E0 18 ld (FF00+18),a ; IO tone channel frequency low = [variable tone channel frequency low byte] ROM4:567E C9 ret ; Return ; BRANCH_PART_2 ROM4:567F 3E A0 ld a,A0 ;\ ROM4:5681 EA CC CE ld (CECC),a ;} Variable tone channel frequency low byte = A0h ROM4:5684 C9 ret ; Return ; BRANCH_PART_3 ROM4:5685 3E 90 ld a,90 ;\ ROM4:5687 EA CC CE ld (CECC),a ;} Variable tone channel frequency low byte = 90h ROM4:568A C9 ret } ;;; $568B: Tone sound effect initialisation - 5: Baby Metroid cry ;;; { ROM4:568B F0 04 ld a,(FF00+04) ;\ ROM4:568D CB 37 swap a ;| ROM4:568F CB BF res 7,a ;| ROM4:5691 CB F7 set 6,a ;} Variable tone channel frequency low byte = 40h | (random number) & 2Bh ROM4:5693 CB A7 res 4,a ;| ROM4:5695 CB 97 res 2,a ;| ROM4:5697 EA CC CE ld (CECC),a ;/ ROM4:569A 3E 30 ld a,30 ;\ ROM4:569C 11 33 5D ld de,5D33 ;} Go to set tone sound effect request as playing with timer 30h and option set $5D33 ROM4:569F C3 BD 56 jp 56BD ;/ } ;;; $56A2: Tone sound effect initialisation - 6: Metroid Queen hurt cry ;;; { ROM4:56A2 F0 04 ld a,(FF00+04) ;\ ROM4:56A4 CB 37 swap a ;| ROM4:56A6 CB BF res 7,a ;} Variable tone channel frequency low byte = 40h | (random number) & 3Fh ROM4:56A8 CB F7 set 6,a ;| ROM4:56AA EA CC CE ld (CECC),a ;/ ROM4:56AD 3E 30 ld a,30 ;\ ROM4:56AF 11 37 5D ld de,5D37 ;} Go to set tone sound effect request as playing with timer 30h and option set $5D37 ROM4:56B2 C3 BD 56 jp 56BD ;/ } ;;; $56B5: Tone sound effect initialisation - 7: ;;; { ROM4:56B5 3E 01 ld a,01 ;\ ROM4:56B7 11 3B 5D ld de,5D3B ;} Go to set tone sound effect request as playing with timer 1 and option set $5D3B ROM4:56BA C3 BD 56 jp 56BD ;/ } ;;; $56BD: Set tone sound effect request as playing with timer [a] and option set [de] ;;; { ROM4:56BD EA CA CE ld (CECA),a ; Tone channel sound effect timer = [a] ROM4:56C0 FA C7 CE ld a,(CEC7) ;\ ROM4:56C3 EA C8 CE ld (CEC8),a ;} Tone channel sound effect playing = [tone channel sound effect request], set tone channel sound effect is playing flag ROM4:56C6 EA E5 CE ld (CEE5),a ;/ ROM4:56C9 C3 E1 47 jp 47E1 ; Set tone channel option set [de] } } ;;; $56CC..5A27: Noise channel sound effects ;;; { ;;; $56CC: Noise channel sound effect initialisation function pointers ;;; { ROM4:56CC dw 5734, ; 1: Enemy shot 573C, ; 2: Enemy killed 5752, ; 3: 575A, ; 4: Shot block destroyed 5762, ; 5: Metroid hurt 577D, ; 6: Samus hurt 57A1, ; 7: Acid damage 57B1, ; 8: Shot missile door with missile 57C7, ; 9: Metroid Queen cry 57E2, ; Ah: Metroid Queen hurt cry 57FD, ; Bh: Samus killed 5881, ; Ch: Bomb detonated 5897, ; Dh: Metroid killed 58C5, ; Eh: 590C, ; Fh: 5954, ; 10h Footsteps 5979, ; 11h: 598F, ; 12h: 5997, ; 13h: Unused 599F, ; 14h: 59C3, ; 15h: 59D9, ; 16h: Baby Metroid hatched / clearing blocks 59E6, ; 17h: Baby Metroid cry 59F3, ; 18h: 5A09, ; 19h: Unused 5A11 ; 1Ah: } ;;; $5700: Noise channel sound effect playback function pointers ;;; { ROM4:5700 dw 4704, ; 1: Enemy shot 5744, ; 2: Enemy killed 4704, ; 3: 4704, ; 4: Shot block destroyed 576F, ; 5: Metroid hurt 5785, ; 6: Samus hurt 57A9, ; 7: Acid damage 57B9, ; 8: Shot missile door with missile 57D4, ; 9: Metroid Queen cry 57EF, ; Ah: Metroid Queen hurt cry 5805, ; Bh: Samus killed 5889, ; Ch: Bomb detonated 589F, ; Dh: Metroid killed 58CD, ; Eh: 5914, ; Fh: 596A, ; 10h Footsteps 5981, ; 11h: 5981, ; 12h: 5981, ; 13h: Unused 59A7, ; 14h: 59CB, ; 15h: 4704, ; 16h: Baby Metroid hatched / clearing blocks 4704, ; 17h: Baby Metroid cry 59FB, ; 18h: 4704, ; 19h: Unused 4704 ; 1Ah: } ;;; $5734: Noise sound effect initialisation - 1: enemy shot ;;; { ROM4:5734 3E 0D ld a,0D ;\ ROM4:5736 11 7B 5C ld de,5C7B ;} Go to set noise sound effect request as playing with timer Dh and option set $5C7B ROM4:5739 C3 19 5A jp 5A19 ;/ } ;;; $573C: Noise sound effect initialisation - 2: enemy killed ;;; { ROM4:573C 3E 19 ld a,19 ;\ ROM4:573E 11 7F 5C ld de,5C7F ;} Go to set noise sound effect request as playing with timer 19h and option set $5C7F ROM4:5741 C3 19 5A jp 5A19 ;/ } ;;; $5744: Noise sound effect playback - 2: enemy killed ;;; { ROM4:5744 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:5747 FE 0D cp 0D ;\ ROM4:5749 28 01 jr z,574C ;} If [noise channel sound effect timer] != Dh: ROM4:574B C9 ret ; Return ROM4:574C 11 83 5C ld de,5C83 ;\ ROM4:574F C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5C83 } ;;; $5752: Noise sound effect initialisation - 3: ;;; { ROM4:5752 3E 1D ld a,1D ;\ ROM4:5754 11 87 5C ld de,5C87 ;} Go to set noise sound effect request as playing with timer 1Dh and option set $5C87 ROM4:5757 C3 19 5A jp 5A19 ;/ } ;;; $575A: Noise sound effect initialisation - 4: shot block destroyed ;;; { ROM4:575A 3E 08 ld a,08 ;\ ROM4:575C 11 8B 5C ld de,5C8B ;} Go to set noise sound effect request as playing with timer 8 and option set $5C8B ROM4:575F C3 19 5A jp 5A19 ;/ } ;;; $5762: Noise sound effect initialisation - 5: metroid hurt ;;; { ROM4:5762 3E 1B ld a,1B ;\ ROM4:5764 EA C0 CE ld (CEC0),a ;} Play metroid cry tone/sweep sound effect ROM4:5767 3E 40 ld a,40 ;\ ROM4:5769 11 8F 5C ld de,5C8F ;} Set noise sound effect request as playing with timer 40h and option set $5C8F ROM4:576C CD 19 5A call 5A19 ;/ } ;;; $576F: Noise sound effect playback - 5: metroid hurt ;;; { ROM4:576F CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:5772 FE 38 cp 38 ;\ ROM4:5774 28 01 jr z,5777 ;} If [noise channel sound effect timer] != 38h: ROM4:5776 C9 ret ; Return ROM4:5777 11 93 5C ld de,5C93 ;\ ROM4:577A C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5C93 } ;;; $577D: Noise sound effect initialisation - 6: Samus hurt ;;; { ROM4:577D 3E 14 ld a,14 ;\ ROM4:577F 11 97 5C ld de,5C97 ;} Go to set noise sound effect request as playing with timer 14h and option set $5C97 ROM4:5782 C3 19 5A jp 5A19 ;/ } ;;; $5785: Noise sound effect playback - 6: Samus hurt ;;; { ROM4:5785 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:5788 FE 10 cp 10 ;\ ROM4:578A 28 0F jr z,579B ;} If [noise channel sound effect timer] = 10h: go to set noise channel option set $5C9B ROM4:578C FE 0C cp 0C ;\ ROM4:578E 28 05 jr z,5795 ;} If [noise channel sound effect timer] != Ch: ROM4:5790 FE 08 cp 08 ;\ ROM4:5792 28 07 jr z,579B ;} If [noise channel sound effect timer] = 8: go to set noise channel option set $5C9B ROM4:5794 C9 ret ; Return ROM4:5795 11 97 5C ld de,5C97 ;\ ROM4:5798 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5C97 } ;;; $579B: Set noise channel option set $5C9B ;;; { ROM4:579B 11 9B 5C ld de,5C9B ;\ ROM4:579E C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5C9B } ;;; $57A1: Noise sound effect initialisation - 7: acid damage ;;; { ROM4:57A1 3E 08 ld a,08 ;\ ROM4:57A3 11 9F 5C ld de,5C9F ;} Go to set noise sound effect request as playing with timer 8 and option set $5C9F ROM4:57A6 C3 19 5A jp 5A19 ;/ } ;;; $57A9: Noise sound effect playback - 7: acid damage ;;; { ROM4:57A9 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:57AC FE 05 cp 05 ;\ ROM4:57AE 28 EB jr z,579B ;} If [noise channel sound effect timer] = 5: go to set noise channel option set $5C9B ROM4:57B0 C9 ret } ;;; $57B1: Noise sound effect initialisation - 8: shot missile door with missile ;;; { ROM4:57B1 3E 08 ld a,08 ;\ ROM4:57B3 11 A3 5C ld de,5CA3 ;} Go to set noise sound effect request as playing with timer 8 and option set $5CA3 ROM4:57B6 C3 19 5A jp 5A19 ;/ } ;;; $57B9: Noise sound effect playback - 8: shot missile door with missile ;;; { ROM4:57B9 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:57BC FE 05 cp 05 ;\ ROM4:57BE 28 01 jr z,57C1 ;} If [noise channel sound effect timer] != 5: ROM4:57C0 C9 ret ; Return ROM4:57C1 11 A7 5C ld de,5CA7 ;\ ROM4:57C4 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CA7 } ;;; $57C7: Noise sound effect initialisation - 9: Metroid Queen cry ;;; { ROM4:57C7 3E 03 ld a,03 ;\ ROM4:57C9 EA C7 CE ld (CEC7),a ;} Play Metroid Queen cry tone sound effect ROM4:57CC 3E 40 ld a,40 ;\ ROM4:57CE 11 AB 5C ld de,5CAB ;} Go to set noise sound effect request as playing with timer 40h and option set $5CAB ROM4:57D1 C3 19 5A jp 5A19 ;/ } ;;; $57D4: Noise sound effect playback - 9: Metroid Queen cry ;;; { ROM4:57D4 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:57D7 FE 38 cp 38 ;\ ROM4:57D9 28 01 jr z,57DC ;} If [noise channel sound effect timer] != 38h: ROM4:57DB C9 ret ; Return ROM4:57DC 11 AF 5C ld de,5CAF ;\ ROM4:57DF C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CAF } ;;; $57E2: Noise sound effect initialisation - Ah: Metroid Queen hurt cry ;;; { ROM4:57E2 3E 06 ld a,06 ;\ ROM4:57E4 EA C7 CE ld (CEC7),a ;} Play Metroid Queen hurt cry tone sound effect ROM4:57E7 3E 40 ld a,40 ;\ ROM4:57E9 11 B3 5C ld de,5CB3 ;} Go to set noise sound effect request as playing with timer 40h and option set $5CB3 ROM4:57EC C3 19 5A jp 5A19 ;/ } ;;; $57EF: Noise sound effect playback - Ah: Metroid Queen hurt cry ;;; { ROM4:57EF CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:57F2 FE 38 cp 38 ;\ ROM4:57F4 28 01 jr z,57F7 ;} If [noise channel sound effect timer] != 38h: ROM4:57F6 C9 ret ; Return ROM4:57F7 11 B7 5C ld de,5CB7 ;\ ROM4:57FA C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CB7 } ;;; $57FD: Noise sound effect initialisation - Bh: Samus killed ;;; { ROM4:57FD 3E B0 ld a,B0 ;\ ROM4:57FF 11 27 5D ld de,5D27 ;} Go to set noise sound effect request as playing with timer B0h and option set $5D27 ROM4:5802 C3 19 5A jp 5A19 ;/ } ;;; $5805: Noise sound effect playback - Bh: Samus killed ;;; { ROM4:5805 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:5808 FE 9F cp 9F ;\ ROM4:580A 28 31 jr z,583D ;} If [noise channel sound effect timer] = 9Fh: go to set noise channel option set $5CBB ROM4:580C FE 70 cp 70 ;\ ROM4:580E 28 33 jr z,5843 ;} If [noise channel sound effect timer] = 70h: go to set noise channel option set $5CBF ROM4:5810 FE 6C cp 6C ;\ ROM4:5812 28 35 jr z,5849 ;} If [noise channel sound effect timer] = 6Ch: go to noise channel polynomial counter = 27h ROM4:5814 FE 68 cp 68 ;\ ROM4:5816 28 36 jr z,584E ;} If [noise channel sound effect timer] = 68h: go to noise channel polynomial counter = 35h ROM4:5818 FE 64 cp 64 ;\ ROM4:581A 28 37 jr z,5853 ;} If [noise channel sound effect timer] = 64h: go to noise channel polynomial counter = 37h ROM4:581C FE 60 cp 60 ;\ ROM4:581E 28 38 jr z,5858 ;} If [noise channel sound effect timer] = 60h: go to noise channel polynomial counter = 45h ROM4:5820 FE 5C cp 5C ;\ ROM4:5822 28 39 jr z,585D ;} If [noise channel sound effect timer] = 5Ch: go to noise channel polynomial counter = 47h ROM4:5824 FE 58 cp 58 ;\ ROM4:5826 28 3A jr z,5862 ;} If [noise channel sound effect timer] = 58h: go to noise channel polynomial counter = 55h ROM4:5828 FE 54 cp 54 ;\ ROM4:582A 28 3B jr z,5867 ;} If [noise channel sound effect timer] = 54h: go to noise channel polynomial counter = 57h ROM4:582C FE 50 cp 50 ;\ ROM4:582E 28 3C jr z,586C ;} If [noise channel sound effect timer] = 50h: go to noise channel polynomial counter = 65h ROM4:5830 FE 4C cp 4C ;\ ROM4:5832 28 3D jr z,5871 ;} If [noise channel sound effect timer] = 4Ch: go to noise channel polynomial counter = 66h ROM4:5834 FE 48 cp 48 ;\ ROM4:5836 28 3E jr z,5876 ;} If [noise channel sound effect timer] = 48h: go to noise channel polynomial counter = 67h ROM4:5838 FE 40 cp 40 ;\ ROM4:583A 28 3F jr z,587B ;} If [noise channel sound effect timer] = 40h: go to set noise channel option set $5CC3 ROM4:583C C9 ret } ;;; $583D: Set noise channel option set $5CBB ;;; { ROM4:583D 11 BB 5C ld de,5CBB ;\ ROM4:5840 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CBB } ;;; $5843: Set noise channel option set $5CBF ;;; { ROM4:5843 11 BF 5C ld de,5CBF ;\ ROM4:5846 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CBF } ;;; $5849: Noise channel polynomial counter = 27h ;;; { ROM4:5849 3E 27 ld a,27 ROM4:584B E0 22 ld (FF00+22),a ROM4:584D C9 ret } ;;; $584E: Noise channel polynomial counter = 35h ;;; { ROM4:584E 3E 35 ld a,35 ROM4:5850 E0 22 ld (FF00+22),a ROM4:5852 C9 ret } ;;; $5853: Noise channel polynomial counter = 37h ;;; { ROM4:5853 3E 37 ld a,37 ROM4:5855 E0 22 ld (FF00+22),a ROM4:5857 C9 ret } ;;; $5858: Noise channel polynomial counter = 45h ;;; { ROM4:5858 3E 45 ld a,45 ROM4:585A E0 22 ld (FF00+22),a ROM4:585C C9 ret } ;;; $585D: Noise channel polynomial counter = 47h ;;; { ROM4:585D 3E 47 ld a,47 ROM4:585F E0 22 ld (FF00+22),a ROM4:5861 C9 ret } ;;; $5862: Noise channel polynomial counter = 55h ;;; { ROM4:5862 3E 55 ld a,55 ROM4:5864 E0 22 ld (FF00+22),a ROM4:5866 C9 ret } ;;; $5867: Noise channel polynomial counter = 57h ;;; { ROM4:5867 3E 57 ld a,57 ROM4:5869 E0 22 ld (FF00+22),a ROM4:586B C9 ret } ;;; $586C: Noise channel polynomial counter = 65h ;;; { ROM4:586C 3E 65 ld a,65 ROM4:586E E0 22 ld (FF00+22),a ROM4:5870 C9 ret } ;;; $5871: Noise channel polynomial counter = 66h ;;; { ROM4:5871 3E 66 ld a,66 ROM4:5873 E0 22 ld (FF00+22),a ROM4:5875 C9 ret } ;;; $5876: Noise channel polynomial counter = 67h ;;; { ROM4:5876 3E 67 ld a,67 ROM4:5878 E0 22 ld (FF00+22),a ROM4:587A C9 ret } ;;; $587B: Set noise channel option set $5CC3 ;;; { ROM4:587B 11 C3 5C ld de,5CC3 ;\ ROM4:587E C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CC3 } ;;; $5881: Noise sound effect initialisation - Ch: bomb detonated ;;; { ROM4:5881 3E 14 ld a,14 ;\ ROM4:5883 11 C7 5C ld de,5CC7 ;} Go to set noise sound effect request as playing with timer 14h and option set $5CC7 ROM4:5886 C3 19 5A jp 5A19 ;/ } ;;; $5889: Noise sound effect playback - Ch: bomb detonated ;;; { ROM4:5889 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:588C FE 0C cp 0C ;\ ROM4:588E 28 01 jr z,5891 ;} If [noise channel sound effect timer] != Ch: ROM4:5890 C9 ret ; Return ROM4:5891 11 CB 5C ld de,5CCB ;\ ROM4:5894 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CCB } ;;; $5897: Noise sound effect initialisation - Dh: metroid killed ;;; { ROM4:5897 3E 35 ld a,35 ;\ ROM4:5899 11 CF 5C ld de,5CCF ;} Go to set noise sound effect request as playing with timer 35h and option set $5CCF ROM4:589C C3 19 5A jp 5A19 ;/ } ;;; $589F: Noise sound effect playback - Dh: metroid killed ;;; { ROM4:589F CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:58A2 FE 30 cp 30 ;\ ROM4:58A4 28 C1 jr z,5867 ;} If [noise channel sound effect timer] = 30h: go to noise channel polynomial counter = 57h ROM4:58A6 FE 2C cp 2C ;\ ROM4:58A8 28 A4 jr z,584E ;} If [noise channel sound effect timer] = 2Ch: go to noise channel polynomial counter = 35h ROM4:58AA FE 27 cp 27 ;\ ROM4:58AC 28 A5 jr z,5853 ;} If [noise channel sound effect timer] = 27h: go to noise channel polynomial counter = 37h ROM4:58AE FE 23 cp 23 ;\ ROM4:58B0 28 B0 jr z,5862 ;} If [noise channel sound effect timer] = 23h: go to noise channel polynomial counter = 55h ROM4:58B2 FE 20 cp 20 ;\ ROM4:58B4 28 A7 jr z,585D ;} If [noise channel sound effect timer] = 20h: go to noise channel polynomial counter = 47h ROM4:58B6 FE 1D cp 1D ;\ ROM4:58B8 28 9E jr z,5858 ;} If [noise channel sound effect timer] = 1Dh: go to noise channel polynomial counter = 45h ROM4:58BA FE 1A cp 1A ;\ ROM4:58BC 28 01 jr z,58BF ;} If [noise channel sound effect timer] != 1Ah: ROM4:58BE C9 ret ; Return ROM4:58BF 11 D3 5C ld de,5CD3 ;\ ROM4:58C2 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CD3 } ;;; $58C5: Noise sound effect initialisation - Eh: ;;; { ROM4:58C5 3E 4F ld a,4F ;\ ROM4:58C7 11 D7 5C ld de,5CD7 ;} Go to set noise sound effect request as playing with timer 4Fh and option set $5CD7 ROM4:58CA C3 19 5A jp 5A19 ;/ } ;;; $58CD: Noise sound effect playback - Eh: ;;; { ROM4:58CD CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:58D0 FE 4D cp 4D ;\ ROM4:58D2 28 98 jr z,586C ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 65h ROM4:58D4 FE 4A cp 4A ;\ ROM4:58D6 CA 67 58 jp z,5867 ;} If [noise channel sound effect timer] = 4Ah: go to noise channel polynomial counter = 57h ROM4:58D9 FE 47 cp 47 ;\ ROM4:58DB CA 62 58 jp z,5862 ;} If [noise channel sound effect timer] = 47h: go to noise channel polynomial counter = 55h ROM4:58DE FE 44 cp 44 ;\ ROM4:58E0 CA 5D 58 jp z,585D ;} If [noise channel sound effect timer] = 44h: go to noise channel polynomial counter = 47h ROM4:58E3 FE 41 cp 41 ;\ ROM4:58E5 CA 6C 58 jp z,586C ;} If [noise channel sound effect timer] = 41h: go to noise channel polynomial counter = 65h ROM4:58E8 FE 3E cp 3E ;\ ROM4:58EA CA 67 58 jp z,5867 ;} If [noise channel sound effect timer] = 3Eh: go to noise channel polynomial counter = 57h ROM4:58ED FE 3B cp 3B ;\ ROM4:58EF CA 62 58 jp z,5862 ;} If [noise channel sound effect timer] = 3Bh: go to noise channel polynomial counter = 55h ROM4:58F2 FE 39 cp 39 ;\ ROM4:58F4 CA 5D 58 jp z,585D ;} If [noise channel sound effect timer] = 39h: go to noise channel polynomial counter = 47h ROM4:58F7 FE 36 cp 36 ;\ ROM4:58F9 CA 58 58 jp z,5858 ;} If [noise channel sound effect timer] = 36h: go to noise channel polynomial counter = 45h ROM4:58FC FE 33 cp 33 ;\ ROM4:58FE CA 53 58 jp z,5853 ;} If [noise channel sound effect timer] = 33h: go to noise channel polynomial counter = 37h ROM4:5901 FE 30 cp 30 ;\ ROM4:5903 28 01 jr z,5906 ;} If [noise channel sound effect timer] != 30h: ROM4:5905 C9 ret ; Return ROM4:5906 11 DB 5C ld de,5CDB ;\ ROM4:5909 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CDB } ;;; $590C: Noise sound effect initialisation - Fh: cleared save file ;;; { ROM4:590C 3E 70 ld a,70 ;\ ROM4:590E 11 DF 5C ld de,5CDF ;} Go to set noise sound effect request as playing with timer 70h and option set $5CDF ROM4:5911 C3 19 5A jp 5A19 ;/ } ;;; $5914: Noise sound effect playback - Fh: cleared save file ;;; { ROM4:5914 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:5917 FE 6D cp 6D ;\ ROM4:5919 CA 76 58 jp z,5876 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 67h ROM4:591C FE 6A cp 6A ;\ ROM4:591E CA 71 58 jp z,5871 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 66h ROM4:5921 FE 67 cp 67 ;\ ROM4:5923 CA 6C 58 jp z,586C ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 65h ROM4:5926 FE 64 cp 64 ;\ ROM4:5928 CA 67 58 jp z,5867 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 57h ROM4:592B FE 61 cp 61 ;\ ROM4:592D CA 62 58 jp z,5862 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 55h ROM4:5930 FE 5E cp 5E ;\ ROM4:5932 CA 5D 58 jp z,585D ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 47h ROM4:5935 FE 5B cp 5B ;\ ROM4:5937 CA 58 58 jp z,5858 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 45h ROM4:593A FE 59 cp 59 ;\ ROM4:593C CA 53 58 jp z,5853 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 37h ROM4:593F FE 56 cp 56 ;\ ROM4:5941 CA 4E 58 jp z,584E ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 35h ROM4:5944 FE 53 cp 53 ;\ ROM4:5946 CA 49 58 jp z,5849 ;} If [noise channel sound effect timer] = 4Dh: go to noise channel polynomial counter = 27h ROM4:5949 FE 50 cp 50 ;\ ROM4:594B 28 01 jr z,594E ;} If [noise channel sound effect timer] != 50h: ROM4:594D C9 ret ; Return ROM4:594E 11 E3 5C ld de,5CE3 ;\ ROM4:5951 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CE3 } ;;; $5954: Noise sound effect initialisation - 10h: footsteps ;;; { ROM4:5954 FA D6 CE ld a,(CED6) ;\ ROM4:5957 A7 and a ;} If [noise channel sound effect playing] != 0: go to handle noise channel sound effect playing ROM4:5958 C2 FD 44 jp nz,44FD ;/ ROM4:595B FA 07 CF ld a,(CF07) ;\ ROM4:595E A7 and a ;} If [song noise channel enable] != 0: go to handle noise channel sound effect playing ROM4:595F C2 FD 44 jp nz,44FD ;/ ROM4:5962 3E 02 ld a,02 ;\ ROM4:5964 11 E7 5C ld de,5CE7 ;} Go to set noise sound effect request as playing with timer 2 and option set $5CE7 ROM4:5967 C3 19 5A jp 5A19 ;/ } ;;; $596A: Noise sound effect playback - 10h: footsteps ;;; { ROM4:596A CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:596D FE 01 cp 01 ;\ ROM4:596F CA 73 59 jp z,5973 ;} If [noise channel sound effect timer] != 1: ROM4:5972 C9 ret ; Return ROM4:5973 11 EB 5C ld de,5CEB ;\ ROM4:5976 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CEB } ;;; $5979: Noise sound effect initialisation - 11h: ;;; { ROM4:5979 3E 10 ld a,10 ;\ ROM4:597B 11 EF 5C ld de,5CEF ;} Go to set noise sound effect request as playing with timer 10h and option set $5CEF ROM4:597E C3 19 5A jp 5A19 ;/ } ;;; $5981: Noise sound effect playback - 11h: / 12h: / 13h: unused ;;; { ROM4:5981 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:5984 FE 0C cp 0C ;\ ROM4:5986 28 01 jr z,5989 ;} If [noise channel sound effect timer] != Ch: ROM4:5988 C9 ret ; Return ROM4:5989 11 F3 5C ld de,5CF3 ;\ ROM4:598C C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CF3 } ;;; $598F: Noise sound effect initialisation - 12h: ;;; { ROM4:598F 3E 10 ld a,10 ;\ ROM4:5991 11 F7 5C ld de,5CF7 ;} Go to set noise sound effect request as playing with timer 10h and option set $5CF7 ROM4:5994 C3 19 5A jp 5A19 ;/ } ;;; $5997: Noise sound effect initialisation - 13h: unused ;;; { ROM4:5997 3E 10 ld a,10 ;\ ROM4:5999 11 FB 5C ld de,5CFB ;} Go to set noise sound effect request as playing with timer 10h and option set $5CFB ROM4:599C C3 19 5A jp 5A19 ;/ } ;;; $599F: Noise sound effect initialisation - 14h: ;;; { ROM4:599F 3E 18 ld a,18 ;\ ROM4:59A1 11 FF 5C ld de,5CFF ;} Go to set noise sound effect request as playing with timer 18h and option set $5CFF ROM4:59A4 C3 19 5A jp 5A19 ;/ } ;;; $59A7: Noise sound effect playback - 14h: ;;; { ROM4:59A7 CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:59AA FE 10 cp 10 ;\ ROM4:59AC 28 09 jr z,59B7 ;} If [noise channel sound effect timer] = 10h: go to BRANCH_0 ROM4:59AE FE 0C cp 0C ;\ ROM4:59B0 28 0B jr z,59BD ;} If [noise channel sound effect timer] = Ch: go to BRANCH_1 ROM4:59B2 FE 08 cp 08 ;\ ROM4:59B4 28 01 jr z,59B7 ;} If [noise channel sound effect timer] = 8: go to BRANCH_0 ROM4:59B6 C9 ret ; Return ; BRANCH_0 ROM4:59B7 11 03 5D ld de,5D03 ;\ ROM4:59BA C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5D03 ; BRANCH_1 ROM4:59BD 11 FF 5C ld de,5CFF ;\ ROM4:59C0 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5CFF } ;;; $59C3: Noise sound effect initialisation - 15h: ;;; { ROM4:59C3 3E 30 ld a,30 ;\ ROM4:59C5 11 07 5D ld de,5D07 ;} Go to set noise sound effect request as playing with timer 30h and option set $5D07 ROM4:59C8 C3 19 5A jp 5A19 ;/ } ;;; $59CB: Noise sound effect playback - 15h: ;;; { ROM4:59CB CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:59CE FE 20 cp 20 ;\ ROM4:59D0 28 01 jr z,59D3 ;} If [noise channel sound effect timer] != 20h: ROM4:59D2 C9 ret ; Return ROM4:59D3 11 0B 5D ld de,5D0B ;\ ROM4:59D6 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5D0B } ;;; $59D9: Noise sound effect initialisation - 16h: Baby Metroid hatched / clearing blocks ;;; { ROM4:59D9 3E 04 ld a,04 ;\ ROM4:59DB EA C7 CE ld (CEC7),a ;} Play Baby Metroid hatched / clearing blocks tone sound effect ROM4:59DE 3E 08 ld a,08 ;\ ROM4:59E0 11 0F 5D ld de,5D0F ;} Go to set noise sound effect request as playing with timer 8 and option set $5D0F ROM4:59E3 C3 19 5A jp 5A19 ;/ } ;;; $59E6: Noise sound effect initialisation - 17h: Baby Metroid cry ;;; { ROM4:59E6 3E 05 ld a,05 ;\ ROM4:59E8 EA C7 CE ld (CEC7),a ;} Play Baby Metroid cry tone sound effect ROM4:59EB 3E 40 ld a,40 ;\ ROM4:59ED 11 13 5D ld de,5D13 ;} Go to set noise sound effect request as playing with timer 40h and option set $5D13 ROM4:59F0 C3 19 5A jp 5A19 ;/ } ;;; $59F3: Noise sound effect initialisation - 18h: ;;; { ROM4:59F3 3E 0F ld a,0F ;\ ROM4:59F5 11 17 5D ld de,5D17 ;} Go to set noise sound effect request as playing with timer Fh and option set $5D17 ROM4:59F8 C3 19 5A jp 5A19 ;/ } ;;; $59FB: Noise sound effect playback - 18h: ;;; { ROM4:59FB CD 04 47 call 4704 ; Decrement noise channel sound effect timer or clear noise channel sound effect ROM4:59FE FE 0C cp 0C ;\ ROM4:5A00 28 01 jr z,5A03 ;} If [noise channel sound effect timer] != Ch: ROM4:5A02 C9 ret ; Return ROM4:5A03 11 1B 5D ld de,5D1B ;\ ROM4:5A06 C3 F1 47 jp 47F1 ;} Go to set noise channel option set $5D1B } ;;; $5A09: Noise sound effect initialisation - 19h: unused ;;; { ROM4:5A09 3E 10 ld a,10 ;\ ROM4:5A0B 11 1F 5D ld de,5D1F ;} Go to set noise sound effect request as playing with timer 10h and option set $5D1F ROM4:5A0E C3 19 5A jp 5A19 ;/ } ;;; $5A11: Noise sound effect initialisation - 1Ah: ;;; { ROM4:5A11 3E 10 ld a,10 ;\ ROM4:5A13 11 23 5D ld de,5D23 ;} Go to set noise sound effect request as playing with timer 10h and option set $5D23 ROM4:5A16 C3 19 5A jp 5A19 ;/ } ;;; $5A19: Set noise sound effect request as playing with timer [a] and option set [de] ;;; { ROM4:5A19 EA D8 CE ld (CED8),a ; Noise channel sound effect timer = [a] ROM4:5A1C FA D5 CE ld a,(CED5) ;\ ROM4:5A1F EA D6 CE ld (CED6),a ;} Noise channel sound effect playing = [noise channel sound effect request], set noise channel sound effect is playing flag ROM4:5A22 EA E7 CE ld (CEE7),a ;/ ROM4:5A25 C3 F1 47 jp 47F1 ; Go to set noise channel option set [de] } } ;;; $5A28: Tone/sweep channel option sets ;;; { ; ____________ Sweep ; | _________ Sound length / wave pattern duty ; | | ______ Envelope ; | | | ___ Frequency ; | | | | ROM4:5A28 dx 15,00,A7,8690 ; 1: jumping 0 ROM4:5A2D dx 26,80,83,85C0 ; 1: jumping 1 ROM4:5A32 dx 15,00,47,8690 ; 1: jumping 2 ROM4:5A37 dx 26,80,37,85C0 ; 1: jumping 3 ROM4:5A3C dx 15,00,27,8690 ; 1: jumping 4 ROM4:5A41 dx 26,80,27,85C0 ; 1: jumping 5 ROM4:5A46 dx 15,00,A7,8690 ; 2: hi-jumping 0 ROM4:5A4B dx 26,80,73,86C0 ; 2: hi-jumping 1 ROM4:5A50 dx 15,00,37,8690 ; 2: hi-jumping 2 ROM4:5A55 dx 26,80,37,86C0 ; 2: hi-jumping 3 ROM4:5A5A dx 15,00,27,8690 ; 2: hi-jumping 4 ROM4:5A5F dx 26,80,27,86C0 ; 2: hi-jumping 5 ROM4:5A64 dx 15,00,17,8690 ; 2: hi-jumping 6 ROM4:5A69 dx 26,80,17,86C0 ; 2: hi-jumping 7 ROM4:5A6E dx 15,00,77,8700 ; 3: screw attacking 0 ROM4:5A73 dx 15,00,B7,8560 ; 3: screw attacking 1 ROM4:5A78 dx 15,00,F7,85C0 ; 3: screw attacking 2 ROM4:5A7D dx 15,00,F7,8600 ; 3: screw attacking 3 ROM4:5A82 dx 15,40,F7,8640 ; 3: screw attacking 4 ROM4:5A87 dx 15,40,E7,8670 ; 3: screw attacking 5 ROM4:5A8C dx 15,80,D7,8690 ; 3: screw attacking 6 ROM4:5A91 dx 15,80,C7,86B0 ; 3: screw attacking 7 ROM4:5A96 dx 15,80,A7,86C0 ; 3: screw attacking 8 ROM4:5A9B dx 15,40,87,86C0 ; 3: screw attacking 9 ROM4:5AA0 dx 15,40,87,86D0 ; 3: screw attacking Ah ROM4:5AA5 dx 15,40,47,86E0 ; 3: screw attacking Bh ROM4:5AAA dx 15,40,57,86F0 ; 3: screw attacking Ch ROM4:5AAF dx 15,40,57,8700 ; 3: screw attacking Dh ROM4:5AB4 dx 14,B6,91,C4A0 ; 4: uncrouching / turning around / landing / hurt by spike 0 ROM4:5AB9 dx 14,B6,71,C4A0 ; 4: uncrouching / turning around / landing / hurt by spike 1 ROM4:5ABE dx 14,B6,51,C4A0 ; 4: uncrouching / turning around / landing / hurt by spike 2 ROM4:5AC3 dx 14,66,91,C4A0 ; 5: crouching / unmorphing 0 ROM4:5AC8 dx 14,66,61,C4A0 ; 5: crouching / unmorphing 1 ROM4:5ACD dx 14,66,41,C4A0 ; 5: crouching / unmorphing 2 ROM4:5AD2 dx 14,80,A7,8700 ; 6: morphing 0 ROM4:5AD7 dx 3D,80,C1,8750 ; 6: morphing 1 ROM4:5ADC dx 3D,80,61,8750 ; 6: morphing 2 ROM4:5AE1 dx 15,00,F7,86D0 ; 7: shooting beam 0 ROM4:5AE6 dx 15,80,95,8680 ; 7: shooting beam 1 ROM4:5AEB dx 15,80,95,86C0 ; 7: shooting beam 2 ROM4:5AF0 dx 15,80,85,8700 ; 7: shooting beam 3 ROM4:5AF5 dx 15,80,75,8780 ; 7: shooting beam 4 ROM4:5AFA dx 15,40,F7,8690 ; 8: shooting missile 0 ROM4:5AFF dx 15,00,F7,85A0 ; 8: shooting missile 1 ROM4:5B04 dx 1D,00,55,87A0 ; 8: shooting missile 2 ROM4:5B09 dx 15,00,67,8600 ; 8: shooting missile 3 ROM4:5B0E dx 15,00,A7,8620 ; 8: shooting missile 4 ROM4:5B13 dx 15,00,97,8640 ; 8: shooting missile 5 ROM4:5B18 dx 15,00,87,8660 ; 8: shooting missile 6 ROM4:5B1D dx 15,00,67,8680 ; 8: shooting missile 7 ROM4:5B22 dx 15,00,47,86A0 ; 8: shooting missile 8 ROM4:5B27 dx 15,00,37,86C0 ; 8: shooting missile 9 ROM4:5B2C dx 1F,80,77,87D0 ; 9: shooting ice beam (frequency low byte ignored) ROM4:5B31 dx 17,00,A7,8600 ; Ah: shooting plasma beam (frequency low byte ignored) ROM4:5B36 dx 1F,00,C7,87D0 ; Bh: shooting spazer beam (frequency low byte ignored) ROM4:5B3B dx 35,80,87,86A0 ; Ch: picking up missile drop 0 ROM4:5B40 dx 34,80,C7,8710 ; Ch: picking up missile drop 1 ROM4:5B45 dx 34,80,B7,8740 ; Ch: picking up missile drop 2 ROM4:5B4A dx 34,80,97,8760 ; Ch: picking up missile drop 3 ROM4:5B4F dx 34,80,67,8780 ; Ch: picking up missile drop 4 ROM4:5B54 dx 2A,00,F7,8600 ; Dh: spider ball 0 ROM4:5B59 dx 15,80,57,8600 ; Dh: spider ball 1 ROM4:5B5E dx 39,80,E7,8740 ; Eh: picked up energy drop 0 ROM4:5B63 dx 44,80,D7,86F0 ; Eh: picked up energy drop 1 ROM4:5B68 dx 44,80,97,86F0 ; Eh: picked up energy drop 2 ROM4:5B6D dx 44,80,37,86F0 ; Picked up drop end ROM4:5B72 dx 44,80,C1,8700 ; Fh: shot missile door with beam 0 ROM4:5B77 dx 00,80,41,87D0 ; Fh: shot missile door with beam 1 ROM4:5B7C dx 15,80,A7,85A0 ; 10h: unknown 0 ROM4:5B81 dx 15,80,A7,85C0 ; 10h: unknown 1 ROM4:5B86 dx 15,80,A7,85F0 ; 10h: unknown 2 ROM4:5B8B dx 15,80,A7,8610 ; 10h: unknown 3 ROM4:5B90 dx 15,80,A7,8640 ; 10h: unknown 4 ROM4:5B95 dx 15,80,A7,8670 ; 10h: unknown 5 ROM4:5B9A dx 15,80,A7,8690 ; 10h: unknown 6 ROM4:5B9F dx 15,80,A7,86A0 ; 10h: unknown 7 ROM4:5BA4 dx 15,80,A7,86C0 ; 10h: unknown 8 ROM4:5BA9 dx 15,80,A7,86E0 ; 10h: unknown 9 ROM4:5BAE dx 15,80,A7,8700 ; 10h: unknown Ah ROM4:5BB3 dx 00,00,08,8000 ; 12h: unused ROM4:5BB8 dx 1E,40,57,87C0 ; 13h: bomb laid ROM4:5BBD dx 15,00,C7,8400 ; 14h: unused 0 ROM4:5BC2 dx 1D,00,C7,87D0 ; 14h: unused 1 ROM4:5BC7 dx 14,00,C7,8700 ; 15h: option select / missile select 0 ROM4:5BCC dx 14,80,C7,8640 ; 15h: option select / missile select 1 ROM4:5BD1 dx 16,40,F7,86D0 ; 16h: shooting wave beam 0 ROM4:5BD6 dx 16,40,C7,8680 ; 16h: shooting wave beam 1 ROM4:5BDB dx 16,40,A7,86C0 ; 16h: shooting wave beam 2 ROM4:5BE0 dx 16,40,87,8700 ; 16h: shooting wave beam 3 ROM4:5BE5 dx 17,40,C7,87A0 ; 16h: shooting wave beam 4 ROM4:5BEA dx 39,80,F7,8740 ; 17h: picked up large energy drop 0 ROM4:5BEF dx 44,80,E7,8710 ; 17h: picked up large energy drop 1 ROM4:5BF4 dx 44,80,C7,8710 ; 17h: picked up large energy drop 2 ROM4:5BF9 dx 44,80,A7,8710 ; 17h: picked up large energy drop 3 ROM4:5BFE dx 44,80,37,8710 ; 17h: picked up large energy drop 4 ROM4:5C03 dx 16,BD,55,8750 ; 18h: Samus' health changed 0 ROM4:5C08 dx 00,BD,55,87A0 ; 18h: Samus' health changed 1 (never used due to bug, see $53F7) ROM4:5C0D dx 14,00,C7,86A0 ; 19h: no missile dud shot 0 ROM4:5C12 dx 15,00,C7,86A0 ; 19h: no missile dud shot 1 ROM4:5C17 dx 1D,00,F1,87C0 ; 1Ah: unknown 0 ROM4:5C1C dx 39,00,F1,87D0 ; 1Ah: unknown 1 ROM4:5C21 dx 1D,00,E1,87C4 ; 1Ah: unknown 2 ROM4:5C26 dx 1D,00,D1,87CC ; 1Ah: unknown 3 ROM4:5C2B dx 1D,00,E1,87D0 ; 1Ah: unknown 4 ROM4:5C30 dx 1D,00,D1,87D8 ; 1Ah: unknown 5 ROM4:5C35 dx 1D,38,E1,C7DC ; 1Ah: unknown 6 ROM4:5C3A dx 4F,00,F6,87F0 ; 1Bh: metroid cry (frequency low byte ignored) ROM4:5C3F dx 5C,80,C7,8780 ; 1Ch: saved 0 ROM4:5C44 dx 45,80,87,8782 ; 1Ch: saved 1 ROM4:5C49 dx 45,80,57,8782 ; 1Ch: saved 2 ROM4:5C4E dx 34,80,A5,8200 ; 1Dh: varia suit transformation ROM4:5C53 dx 43,80,F7,8700 ; 1Eh: unpaused 0 ROM4:5C58 dx 45,80,F7,87A2 ; 1Eh: unpaused 1 ROM4:5C5D dx 45,80,57,87A2 ; 1Eh: unpaused 2 ROM4:5C62 dx 77,80,F1,8600 ; Example A ROM4:5C67 dx 77,80,F1,86A0 ; Example B ROM4:5C6C dx 77,80,F1,8700 ; Example C ROM4:5C71 dx 77,80,F1,8740 ; Example D ROM4:5C76 dx 77,80,F1,8790 ; Example E } ;;; $5C7B: Noise channel option sets ;;; { ; Sound length ; 00tttttt ; Sound length = 0.25 * (1 - t/40h) seconds ; ; Envelope ; vvvvdttt ; Envelope step length = t/8 * 0.125 seconds ; d: Envelope direction. 0: Decrease, 1: Increase ; v: Initial volume ; ; Polynomial counter ; eeeewmmm ; If m = 0: ; Frequency = 80000h / 2^e hertz ; Else: ; Frequency = 40000h / (m * 2^e) hertz ; w: Counter width. 0: 15 bits, 1: 7 bits ; ; Counter control ; rs000000 ; r: Restart sound ; s: Stop output after sound has finished (according to sound length) ; __________ Sound length ; | _______ Envelope ; | | ____ Polynomial counter ; | | | _ Counter control ; | | | | ROM4:5C7B db 00,09,62,80 ; 1: enemy shot ROM4:5C7F db 00,19,33,80 ; 2: enemy killed 0 ROM4:5C83 db 00,F1,4E,80 ; 2: enemy killed 1 ROM4:5C87 db 00,F2,6C,80 ; 3: unknown ROM4:5C8B db 00,19,4D,80 ; 4: shot block destroyed ROM4:5C8F db 00,09,3D,80 ; 5: metroid hurt 0 ROM4:5C93 db 00,F4,45,80 ; 5: metroid hurt 1 ROM4:5C97 db 00,F7,4A,80 ; 6: Samus hurt 0 ROM4:5C9B db 00,45,4A,80 ; 6/7: Samus hurt 1 / acid damage 1 ROM4:5C9F db 00,F7,4A,80 ; 7: acid damage 0 ROM4:5CA3 db 00,F7,33,80 ; 8: shot missile door with missile 0 ROM4:5CA7 db 00,F1,5C,80 ; 8: shot missile door with missile 1 ROM4:5CAB db 00,E2,4E,80 ; 9: Metroid Queen cry 0 ROM4:5CAF db 00,C6,45,80 ; 9: Metroid Queen cry 1 ROM4:5CB3 db 00,F2,5A,80 ; Ah: Metroid Queen hurt cry 0 ROM4:5CB7 db 00,F4,44,80 ; Ah: Metroid Queen hurt cry 1 ROM4:5CBB db 00,0D,24,80 ; Bh: Samus killed 1 ROM4:5CBF db 00,F0,15,80 ; Bh: Samus killed 2 ROM4:5CC3 db 00,87,74,80 ; Bh: Samus killed 3 ROM4:5CC7 db 00,A7,43,80 ; Ch: bomb detonated 0 ROM4:5CCB db 00,F1,64,80 ; Ch: bomb detonated 1 ROM4:5CCF db 00,F7,64,80 ; Dh: metroid killed 0 ROM4:5CD3 db 00,A3,22,80 ; Dh: metroid killed 1 ROM4:5CD7 db 00,F7,22,80 ; Eh: unknown 0 ROM4:5CDB db 00,A5,33,80 ; Eh: unknown 1 ROM4:5CDF db 00,F0,43,80 ; Fh: cleared save file 0 ROM4:5CE3 db 00,F6,65,80 ; Fh: cleared save file 1 ROM4:5CE7 db 3D,37,2A,C0 ; 10h: footsteps 0 ROM4:5CEB db 3C,15,2A,C0 ; 10h: footsteps 1 ROM4:5CEF db 00,73,27,80 ; 11h: unknown 0 ROM4:5CF3 db 00,97,77,80 ; 11h/12h/13h: unknown 1 / unused 1 ROM4:5CF7 db 00,87,44,80 ; 12h: unknown 0 ROM4:5CFB db 00,87,33,80 ; 13h: unused 0 ROM4:5CFF db 00,91,3C,80 ; 14h: unknown 0 ROM4:5D03 db 00,91,4B,80 ; 14h: unknown 1 ROM4:5D07 db 00,A7,55,80 ; 15h: unknown 0 ROM4:5D0B db 00,C3,53,80 ; 15h: unknown 1 ROM4:5D0F db 00,1B,31,80 ; 16h: Baby Metroid hatched / clearing blocks ROM4:5D13 db 00,A7,7D,80 ; 17h: Baby Metroid cry ROM4:5D17 db 00,61,2F,80 ; 18h: unknown 0 ROM4:5D1B db 00,60,21,80 ; 18h: unknown 1 ROM4:5D1F db 00,C3,11,80 ; 19h: unused ROM4:5D23 db 00,44,4A,80 ; 1Ah: unknown ROM4:5D27 db 00,08,00,80 ; Bh: Samus killed 0 } ;;; $5D2B: Tone channel option sets ;;; { ; _________ Sound length / wave pattern duty ; | ______ Envelope ; | | ___ Frequency ; | | | ROM4:5D2B dx 00,F4,8700 ; 3: Metroid Queen cry ROM4:5D2F dx 00,97,8790 ; 4: Baby Metroid hatched / clearing blocks ROM4:5D33 dx 40,57,8700 ; 5: Baby Metroid cry ROM4:5D37 dx 40,F7,8700 ; 6: Metroid Queen hurt cry ROM4:5D3B dx 00,87,8200 ; 7: unknown } ;;; $5D3F..5F2F: Wave channel sound effects ;;; { ;;; $5D3F: Wave channel sound effect initialisation function pointers ;;; { ROM4:5D3F dw 5D53, ; 1: Samus' health < 10 5D53, ; 2: Samus' health < 20 5DBE, ; 3: Samus' health < 30 5E29, ; 4: Samus' health < 40 5E94 ; 5: Samus' health < 50 } ;;; $5D49: Wave channel sound effect playback function pointers ;;; { 5D69, ; 1: Samus' health < 10 5D69, ; 2: Samus' health < 20 5DD4, ; 3: Samus' health < 30 5E3F, ; 4: Samus' health < 40 5EAA ; 5: Samus' health < 50 } ;;; $5D53: Wave channel sound effect initialisation - 1/2: Samus' health < 20 ;;; { ROM4:5D53 AF xor a ;\ ROM4:5D54 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5D56 11 8B 41 ld de,418B ;\ ROM4:5D59 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5D5C 3E 0C ld a,0C ;\ ROM4:5D5E EA EE CF ld (CFEE),a ;} Loud low health beep timer = Ch ROM4:5D61 3E 0E ld a,0E ;\ ROM4:5D63 11 FF 5E ld de,5EFF ;} Set wave sound effect timer Eh and option set $5EFF ROM4:5D66 C3 27 5F jp 5F27 ;/ } ;;; $5D69: Wave channel sound effect playback - 1/2: Samus' health < 20 ;;; { ROM4:5D69 3E 01 ld a,01 ;\ ROM4:5D6B EA E6 CE ld (CEE6),a ;} Set wave channel sound effect is playing flag ROM4:5D6E FA E8 CF ld a,(CFE8) ;\ ROM4:5D71 3D dec a ;} Decrement wave channel sound effect timer ROM4:5D72 EA E8 CF ld (CFE8),a ;/ ROM4:5D75 FE 0A cp 0A ;\ ROM4:5D77 28 04 jr z,5D7D ;} If [wave channel sound effect timer] = Ah: go to BRANCH_1 ROM4:5D79 A7 and a ;\ ROM4:5D7A 28 22 jr z,5D9E ;} If [wave channel sound effect timer] = 0: go to BRANCH_0 ROM4:5D7C C9 ret ; Return ; BRANCH_1 ROM4:5D7D FA EE CF ld a,(CFEE) ;\ ROM4:5D80 A7 and a ;} If [loud low health beep timer] != 0: ROM4:5D81 28 0C jr z,5D8F ;/ ROM4:5D83 3D dec a ;\ ROM4:5D84 EA EE CF ld (CFEE),a ;} Decrement loud low health beep timer ROM4:5D87 11 8B 41 ld de,418B ;\ ROM4:5D8A CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5D8D 18 09 jr 5D98 ROM4:5D8F AF xor a ;\ Else ([loud low health beep timer] = 0): ROM4:5D90 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5D92 11 9B 41 ld de,419B ;\ ROM4:5D95 CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5D98 11 04 5F ld de,5F04 ;\ ROM4:5D9B C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F04 ; BRANCH_0 ROM4:5D9E FA EE CF ld a,(CFEE) ;\ ROM4:5DA1 A7 and a ;} If [loud low health beep timer] != 0: ROM4:5DA2 28 08 jr z,5DAC ;/ ROM4:5DA4 11 8B 41 ld de,418B ;\ ROM4:5DA7 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5DAA 18 06 jr 5DB2 ROM4:5DAC 11 9B 41 ld de,419B ;\ Else ([loud low health beep timer] = 0): ROM4:5DAF CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5DB2 FA E9 CF ld a,(CFE9) ;\ ROM4:5DB5 EA E8 CF ld (CFE8),a ;} Wave channel sound effect timer = [wave channel sound effect length] ROM4:5DB8 11 FF 5E ld de,5EFF ;\ ROM4:5DBB C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5EFF } ;;; $5DBE: Wave channel sound effect initialisation - 3: Samus' health < 30 ;;; { ROM4:5DBE AF xor a ;\ ROM4:5DBF E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5DC1 11 8B 41 ld de,418B ;\ ROM4:5DC4 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5DC7 3E 06 ld a,06 ;\ ROM4:5DC9 EA EE CF ld (CFEE),a ;} Loud low health beep timer = 6 ROM4:5DCC 3E 13 ld a,13 ;\ ROM4:5DCE 11 09 5F ld de,5F09 ;} Set wave sound effect timer 13h and option set $5F09 ROM4:5DD1 C3 27 5F jp 5F27 ;/ } ;;; $5DD4: Wave channel sound effect playback - 3: Samus' health < 30 ;;; { ROM4:5DD4 3E 02 ld a,02 ;\ ROM4:5DD6 EA E6 CE ld (CEE6),a ;} Set wave channel sound effect is playing flag ROM4:5DD9 FA E8 CF ld a,(CFE8) ;\ ROM4:5DDC 3D dec a ;} Decrement wave channel sound effect timer ROM4:5DDD EA E8 CF ld (CFE8),a ;/ ROM4:5DE0 FE 09 cp 09 ;\ ROM4:5DE2 28 04 jr z,5DE8 ;} If [wave channel sound effect timer] = 9: go to BRANCH_1 ROM4:5DE4 A7 and a ;\ ROM4:5DE5 28 22 jr z,5E09 ;} If [wave channel sound effect timer] = 0: go to BRANCH_0 ROM4:5DE7 C9 ret ; Return ; BRANCH_1 ROM4:5DE8 FA EE CF ld a,(CFEE) ;\ ROM4:5DEB A7 and a ;} If [loud low health beep timer] != 0: ROM4:5DEC 28 0C jr z,5DFA ;/ ROM4:5DEE 3D dec a ;\ ROM4:5DEF EA EE CF ld (CFEE),a ;} Decrement loud low health beep timer ROM4:5DF2 11 8B 41 ld de,418B ;\ ROM4:5DF5 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5DF8 18 09 jr 5E03 ROM4:5DFA AF xor a ;\ Else ([loud low health beep timer] = 0): ROM4:5DFB E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5DFD 11 9B 41 ld de,419B ;\ ROM4:5E00 CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5E03 11 0E 5F ld de,5F0E ;\ ROM4:5E06 C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F0E ; BRANCH_0 ROM4:5E09 FA EE CF ld a,(CFEE) ;\ ROM4:5E0C A7 and a ;} If [loud low health beep timer] != 0: ROM4:5E0D 28 08 jr z,5E17 ;/ ROM4:5E0F 11 8B 41 ld de,418B ;\ ROM4:5E12 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5E15 18 06 jr 5E1D ROM4:5E17 11 9B 41 ld de,419B ;\ ROM4:5E1A CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5E1D FA E9 CF ld a,(CFE9) ;\ ROM4:5E20 EA E8 CF ld (CFE8),a ;} Wave channel sound effect timer = [wave channel sound effect length] ROM4:5E23 11 09 5F ld de,5F09 ;\ ROM4:5E26 C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F09 } ;;; $5E29: Wave channel sound effect initialisation - 4: Samus' health < 40 ;;; { ROM4:5E29 AF xor a ;\ ROM4:5E2A E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5E2C 11 8B 41 ld de,418B ;\ ROM4:5E2F CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5E32 3E 06 ld a,06 ;\ ROM4:5E34 EA EE CF ld (CFEE),a ;} Loud low health beep timer = 6 ROM4:5E37 3E 16 ld a,16 ;\ ROM4:5E39 11 13 5F ld de,5F13 ;} Set wave sound effect timer 16h and option set $5F13 ROM4:5E3C C3 27 5F jp 5F27 ;/ } ;;; $5E3F: Wave channel sound effect playback - 4: Samus' health < 40 ;;; { ROM4:5E3F 3E 03 ld a,03 ;\ ROM4:5E41 EA E6 CE ld (CEE6),a ;} Set wave channel sound effect is playing flag ROM4:5E44 FA E8 CF ld a,(CFE8) ;\ ROM4:5E47 3D dec a ;} Decrement wave channel sound effect timer ROM4:5E48 EA E8 CF ld (CFE8),a ;/ ROM4:5E4B FE 09 cp 09 ;\ ROM4:5E4D 28 04 jr z,5E53 ;} If [wave channel sound effect timer] = 9: go to BRANCH_1 ROM4:5E4F A7 and a ;\ ROM4:5E50 28 22 jr z,5E74 ;} If [wave channel sound effect timer] = 0: go to BRANCH_0 ROM4:5E52 C9 ret ; Return ; BRANCH_1 ROM4:5E53 FA EE CF ld a,(CFEE) ;\ ROM4:5E56 A7 and a ;} If [loud low health beep timer] != 0: ROM4:5E57 28 0C jr z,5E65 ;/ ROM4:5E59 3D dec a ;\ ROM4:5E5A EA EE CF ld (CFEE),a ;} Decrement loud low health beep timer ROM4:5E5D 11 8B 41 ld de,418B ;\ ROM4:5E60 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5E63 18 09 jr 5E6E ROM4:5E65 AF xor a ;\ Else ([loud low health beep timer] = 0): ROM4:5E66 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5E68 11 9B 41 ld de,419B ;\ ROM4:5E6B CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5E6E 11 18 5F ld de,5F18 ;\ ROM4:5E71 C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F18 ; BRANCH_0 ROM4:5E74 FA EE CF ld a,(CFEE) ;\ ROM4:5E77 A7 and a ;} If [loud low health beep timer] != 0: ROM4:5E78 28 08 jr z,5E82 ;/ ROM4:5E7A 11 8B 41 ld de,418B ;\ ROM4:5E7D CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5E80 18 06 jr 5E88 ROM4:5E82 11 9B 41 ld de,419B ;\ ROM4:5E85 CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5E88 FA E9 CF ld a,(CFE9) ;\ ROM4:5E8B EA E8 CF ld (CFE8),a ;} Wave channel sound effect timer = [wave channel sound effect length] ROM4:5E8E 11 13 5F ld de,5F13 ;\ ROM4:5E91 C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F13 } ;;; $5E94: Wave channel sound effect initialisation - 5: Samus' health < 50 ;;; { ROM4:5E94 AF xor a ;\ ROM4:5E95 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5E97 11 8B 41 ld de,418B ;\ ROM4:5E9A CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5E9D 3E 06 ld a,06 ;\ ROM4:5E9F EA EE CF ld (CFEE),a ;} Loud low health beep timer = 6 ROM4:5EA2 3E 18 ld a,18 ;\ ROM4:5EA4 11 1D 5F ld de,5F1D ;} Set wave sound effect timer 18h and option set $5F1D ROM4:5EA7 C3 27 5F jp 5F27 ;/ } ;;; $5EAA: Wave channel sound effect playback - 5: Samus' health < 50 ;;; { ROM4:5EAA 3E 04 ld a,04 ;\ ROM4:5EAC EA E6 CE ld (CEE6),a ;} Set wave channel sound effect is playing flag ROM4:5EAF FA E8 CF ld a,(CFE8) ;\ ROM4:5EB2 3D dec a ;} Decrement wave channel sound effect timer ROM4:5EB3 EA E8 CF ld (CFE8),a ;/ ROM4:5EB6 FE 0B cp 0B ;\ ROM4:5EB8 28 04 jr z,5EBE ;} If [wave channel sound effect timer] = Bh: go to BRANCH_1 ROM4:5EBA A7 and a ;\ ROM4:5EBB 28 22 jr z,5EDF ;} If [wave channel sound effect timer] = 0: go to BRANCH_0 ROM4:5EBD C9 ret ; Return ; BRANCH_1 ROM4:5EBE FA EE CF ld a,(CFEE) ;\ ROM4:5EC1 A7 and a ;} If [loud low health beep timer] != 0: ROM4:5EC2 28 0C jr z,5ED0 ;/ ROM4:5EC4 3D dec a ;\ ROM4:5EC5 EA EE CF ld (CFEE),a ;} Decrement loud low health beep timer ROM4:5EC8 11 8B 41 ld de,418B ;\ ROM4:5ECB CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5ECE 18 09 jr 5ED9 ROM4:5ED0 AF xor a ;\ Else ([loud low health beep timer] = 0): ROM4:5ED1 E0 1A ld (FF00+1A),a ;} Disable wave channel ROM4:5ED3 11 9B 41 ld de,419B ;\ ROM4:5ED6 CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5ED9 11 22 5F ld de,5F22 ;\ ROM4:5EDC C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F22 ; BRANCH_0 ROM4:5EDF FA EE CF ld a,(CFEE) ;\ ROM4:5EE2 A7 and a ;} If [loud low health beep timer] != 0: ROM4:5EE3 28 08 jr z,5EED ;/ ROM4:5EE5 11 8B 41 ld de,418B ;\ ROM4:5EE8 CD C9 47 call 47C9 ;} Write [$418B..9A] to wave pattern RAM ROM4:5EEB 18 06 jr 5EF3 ROM4:5EED 11 9B 41 ld de,419B ;\ ROM4:5EF0 CD C9 47 call 47C9 ;} Write [$419B..AA] to wave pattern RAM ROM4:5EF3 FA E9 CF ld a,(CFE9) ;\ ROM4:5EF6 EA E8 CF ld (CFE8),a ;} Wave channel sound effect timer = [wave channel sound effect length] ROM4:5EF9 11 1D 5F ld de,5F1D ;\ ROM4:5EFC C3 E9 47 jp 47E9 ;} Go to set wave channel option set $5F1D } ;;; $5EFF: Wave channel option sets ;;; { ; ____________ Enable ; | _________ Sound length ; | | ______ Volume ; | | | ___ Frequency ; | | | | ROM4:5EFF dx 80,00,20,84F0 ; 1/2: Samus' health < 20 0 ROM4:5F04 dx 80,00,40,84D0 ; 1/2: Samus' health < 20 1 ROM4:5F09 dx 80,00,20,84C4 ; 3: Samus' health < 30 0 ROM4:5F0E dx 80,00,40,84C4 ; 3: Samus' health < 30 1 ROM4:5F13 dx 80,00,20,84B6 ; 4: Samus' health < 40 0 ROM4:5F18 dx 80,00,40,84B6 ; 4: Samus' health < 40 1 ROM4:5F1D dx 80,00,20,84A3 ; 5: Samus' health < 50 0 ROM4:5F22 dx 80,00,40,84A3 ; 5: Samus' health < 50 1 } ;;; $5F27: Set wave sound effect timer [a] and option set [de] ;;; { ROM4:5F27 EA E8 CF ld (CFE8),a ; Wave channel sound effect timer = [a] ROM4:5F2A EA E9 CF ld (CFE9),a ; Wave channel sound effect length = [a] ROM4:5F2D C3 E9 47 jp 47E9 ; Go to set wave channel option set [de] } } ;;; $5F30..7E2A: Song data ;;; { ;;; $5F30: Song data table ;;; { ROM4:5F30 dw 5F90, ; 1: Baby Metroid 608A, ; 2: Metroid Queen battle 61D4, ; 3: Chozo ruins 64ED, ; 4: Main caves 685F, ; 5: Sub caves 1 68EE, ; 6: Sub caves 2 6988, ; 7: Sub caves 3 6AE2, ; 8: Final caves 6BC3, ; 9: Metroid hive 6C8E, ; Ah: Item-get 6D51, ; Bh: Metroid Queen hallway 6D8B, ; Ch: Metroid battle 6ED5, ; Dh: Sub caves 4 6F50, ; Eh: Earthquake 6FA4, ; Fh: Killed Metroid 4769, ; 10h: Nothing 703C, ; 11h: Title 7427, ; 12h: Samus fanfare 748A, ; 13h: Reach the gunship 61D4, ; 14h: Chozo ruins, same as 3 7C3A, ; 15h: Main caves, no intro 7C45, ; 16h: Sub caves 1, no intro 7C50, ; 17h: Sub caves 2, no intro 7C5B, ; 18h: Sub caves 3, no intro 6AE2, ; 19h: Final caves, same as 8 6BC3, ; 1Ah: Metroid hive, same as 9 6C8E, ; 1Bh: Item-get, same as Ah 6D51, ; 1Ch: Metroid Queen hallway, same as Bh 6D8B, ; 1Dh: Metroid battle, same as Ch 7C66, ; 1Eh: Sub caves 4, no intro 7C71, ; 1Fh: Metroid hive with intro 7D09 ; 20h: Missile pickup } ;;; $5F70: Audio channel output stereo flags for song request ;;; { ROM4:5F70 db FF, ; 1: Baby Metroid FF, ; 2: Metroid Queen battle FF, ; 3: Chozo ruins FF, ; 4: Main caves FF, ; 5: Sub caves 1 FF, ; 6: Sub caves 2 FF, ; 7: Sub caves 3 FF, ; 8: Final caves FF, ; 9: Metroid hive DB, ; Ah: Item-get FF, ; Bh: Metroid Queen hallway FF, ; Ch: Metroid battle FF, ; Dh: Sub caves 4 DE, ; Eh: Earthquake DE, ; Fh: Killed Metroid FF, ; 10h: Nothing FF, ; 11h: Title DE, ; 12h: Samus fanfare FF, ; 13h: Reach the gunship FF, ; 14h: Chozo ruins, same as 3 FF, ; 15h: Main caves, no intro FF, ; 16h: Sub caves 1, no intro FF, ; 17h: Sub caves 2, no intro FF, ; 18h: Sub caves 3, no intro FF, ; 19h: Final caves, same as 8 FF, ; 1Ah: Metroid hive, same as 9 DB, ; 1Bh: Item-get, same as Ah FF, ; 1Ch: Metroid Queen hallway, same as Bh FF, ; 1Dh: Metroid battle, same as Ch FF, ; 1Eh: Sub caves 4, no intro FF, ; 1Fh: Metroid hive with intro DE ; 20h: Missile pickup } ;;; $5F90: Song data: 1 - Baby Metroid ;;; { ;;; $5F90: Song data header: 1 - Baby Metroid ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:5F90 dx 01,4106,5F9B,5FB3,5FCB,5FDB } ;;; $5F9B: Song data: 1 - Baby Metroid - tone/sweep channel - instruction pointer list ;;; { ROM4:5F9B dw 7E1A, 7E1A, 7E09, 7D42, 5FE7, 7D47, 5FF2, 7D4C, 6002, ROM4:5FAD dw 600A, 00F0,5FAD } ;;; $5FB3: Song data: 1 - Baby Metroid - tone channel - instruction pointer list ;;; { ROM4:5FB3 dw 7E1A, 7E1A, 7E09, 7D42, 6025, 7D47, 6030, 7D4C, 603E, ROM4:5FC5 dw 6046, 00F0,5FC5 } ;;; $5FCB: Song data: 1 - Baby Metroid - wave channel - instruction pointer list ;;; { ROM4:5FCB dw 7E21, 7E21, 7E10, 7D5B, 6060, ROM4:5FD5 dw 605C, 00F0,5FD5 } ;;; $5FDB: Song data: 1 - Baby Metroid - noise channel - instruction pointer list ;;; { ROM4:5FDB dw 7E28, 7E28, 7E17, 6084, 00F0,5FDB } ;;; $5FE7: Song data: 1 - Baby Metroid - tone/sweep channel - instructions ;;; { ROM4:5FE7 dx F4,02, A2, 32, 3C, 40, 46, A3, 38, F5, 00 } ;;; $5FF2: Song data: 1 - Baby Metroid - tone/sweep channel - instructions ;;; { ROM4:5FF2 dx F4,02, A2, 32, 3C, 40, 46, A3, 38, F5, A2, 32, 3C, 40, 46, 00 } ;;; $6002: Song data: 1 - Baby Metroid - tone/sweep channel - instructions ;;; { ROM4:6002 dx F4,03, 32, 3C, 40, 46, F5, 00 } ;;; $600A: Song data: 1 - Baby Metroid - tone/sweep channel - instructions ;;; { ROM4:600A dx F1,77,00,80, F4,04, A2, 32, 3C, 40, 46, A3, 38, F5, A2, 32, 3C, 40, 46, F4,03, 32, 3C, 40, 46, F5, 00 } ;;; $6025: Song data: 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:6025 dx F4,03, A6, 32, 3C, 40, 46, 38, 3C, F5, 00 } ;;; $6030: Song data: 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:6030 dx 32, 3C, 40, 46, 38, 3C, F4,02, 32, 3C, 40, 46, F5, 00 } ;;; $603E: Song data: 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:603E dx F4,02, 32, 3C, 40, 46, F5, 00 } ;;; $6046: Song data: 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:6046 dx F1,77,00,80, F4,04, A6, 32, 3C, 40, 46, 38, 3C, F5, F4,04, 32, 3C, 40, 46, F5, 00 } ;;; $605C: Song data: 1 - Baby Metroid - wave channel - instructions ;;; { ROM4:605C dx F1,4113,60, F4,04, A1, 4A, 03, 54, 03, 58, 03, 5E, 03, A2, 50, 03, F5, A1, 4A, 03, 54, 03, 58, 03, 5E, 03, F4,03, 4A, 03, 54, 03, 58, 03, 5E, 03, F5, 00 } ;;; $6060: Song data: 1 - Baby Metroid - wave channel - instructions ;;; { ROM4:6060 dx F4,04, A1, 4A, 03, 54, 03, 58, 03, 5E, 03, A2, 50, 03, F5, A1, 4A, 03, 54, 03, 58, 03, 5E, 03, F4,03, 4A, 03, 54, 03, 58, 03, 5E, 03, F5, 00 } ;;; $6084: Song data: 1 - Baby Metroid - noise channel - instructions ;;; { ROM4:6084 dx A3, 74, 78, A0, 01, 00 } } ;;; $608A: Song data: 2 - Metroid Queen battle ;;; { ;;; $608A: Song data header: 2 - Metroid Queen battle ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:608A dx 01,4106,6095,60E9,60F3,60FD } ;;; $6095: Song data: 2 - Metroid Queen battle - tone/sweep channel - instruction pointer list ;;; { ROM4:6095 dw 6107, 6112, 7D86, 6112, 7D82, 6112, 7D7E, 6112, 7D7A, 6112, 7D76, 7D91, 6112, 7D72, 7D94, 6112, 7D6E, 7D97, 6112, 7D6A, 7D9A, 6112, 7D6A, 7D9D, 6112, 7D6A, 7D9A, 610C, 7D6E, 7D97, 610C, 7D72, 7D94, 610C, 7D76, 7D91, 610C, 7D7E, 7D8E, ROM4:60E3 dw 6118, 00F0,60E3 } ;;; $60E9: Song data: 2 - Metroid Queen battle - tone channel - instruction pointer list ;;; { ROM4:60E9 dw 6122, 612F, ROM4:60ED dw 613C, 00F0,60ED } ;;; $60F3: Song data: 2 - Metroid Queen battle - wave channel - instruction pointer list ;;; { ROM4:60F3 dw 6146, 6153, ROM4:60F7 dw 6160, 00F0,60F7 } ;;; $60FD: Song data: 2 - Metroid Queen battle - noise channel - instruction pointer list ;;; { ROM4:60FD dw 61BA, 61C3, ROM4:6101 dw 61CC, 00F0,6101 } ;;; $6107: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:6107 dx F1,C7,00,00, 00 } ;;; $610C: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:610C dx A3, 22, 2E, 1A, 28, 00 } ;;; $6112: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:6112 dx A7, 22, 2E, 1A, 28, 00 } ;;; $6118: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:6118 dx F1,87,00,00, A4, 22, 2E, 1A, 28, 00 } ;;; $6122: Song data: 2 - Metroid Queen battle - tone channel - instructions ;;; { ROM4:6122 dx F1,C7,00,00, F4,0A, A7, 2C, 38, 24, 32, F5, 00 } ;;; $612F: Song data: 2 - Metroid Queen battle - tone channel - instructions ;;; { ROM4:612F dx F1,A7,00,00, F4,04, A3, 2C, 38, 24, 32, F5, 00 } ;;; $613C: Song data: 2 - Metroid Queen battle - tone channel - instructions ;;; { ROM4:613C dx F1,87,00,00, A4, 2C, 38, 24, 32, 00 } ;;; $6146: Song data: 2 - Metroid Queen battle - wave channel - instructions ;;; { ROM4:6146 dx F1,416B,40, F4,0A, A7, 14, 20, 0C, 1A, F5, 00 } ;;; $6153: Song data: 2 - Metroid Queen battle - wave channel - instructions ;;; { ROM4:6153 dx F1,416B,40, F4,04, A3, 2C, 38, 24, 32, F5, 00 } ;;; $6160: Song data: 2 - Metroid Queen battle - wave channel - instructions ;;; { ROM4:6160 dx A3, 4A, 03, 50, 03, 4A, 03, 48, 03, 3E, 03, 40, A1, 52, 03, 50, 03, 4C, 03, 4A, 03, 4C, 03, 50, 03, 52, 03, 50, 03, 4C, 03, 4A, 03, 4C, 03, 50, 03, A2, 52, 03, 42, 03, 4A, 03, A6, 48, 03, 3C, 03, A2, 3E, 03, 4A, 03, 48, 03, A7, 54, A3, 03, A0, 02, 04, 08, 0A, 10, 12, 16, 18, 1A, 1C, 20, 22, 28, 2A, 2E, 30, 30, 2E, 2A, 28, 22, 20, 1C, 1A, 10, 0A, 18, 16, 00 } ;;; $61BA: Song data: 2 - Metroid Queen battle - noise channel - instructions ;;; { ROM4:61BA dx F4,0A, A7, A0, 01, A4, 01, F5, 00 } ;;; $61C3: Song data: 2 - Metroid Queen battle - noise channel - instructions ;;; { ROM4:61C3 dx F4,04, A3, 24, 01, 34, 01, F5, 00 } ;;; $61CC: Song data: 2 - Metroid Queen battle - noise channel - instructions ;;; { ROM4:61CC dx A2, 1C, A4, A0, A6, 01, 68, 00 } } ;;; $61D4: Song data: 3 - Chozo ruins ;;; { ;;; $61D4: Song data header: 3 - Chozo ruins ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:61D4 dx 01,40DF,61DF,61F5,6207,0000 } ;;; $0: Song data: 3 - Chozo ruins - noise channel - instruction pointer list ;;; { } ;;; $61DF: Song data: 3 - Chozo ruins - tone/sweep channel - instruction pointer list ;;; { ROM4:61DF dw 6219, 624C, 6264, 6297, 6219, 629D, 624C, 6264, 62A3, 00F0,61DF } ;;; $61F5: Song data: 3 - Chozo ruins - tone channel - instruction pointer list ;;; { ROM4:61F5 dw 62F6, 6328, 6349, 62F6, 6328, 6349, 637A, 00F0,61F5 } ;;; $6207: Song data: 3 - Chozo ruins - wave channel - instruction pointer list ;;; { ROM4:6207 dw 63DF, 6412, 6435, 63DF, 6412, 6435, 6467, 00F0,6207 } ;;; $6219: Song data: 3 - Chozo ruins - tone/sweep channel - instructions ;;; { ROM4:6219 dx F1,50,00,80, A3, 01, A2, 32, 05, 30, 05, 2E, 05, A3, 26, 05, 28, 05, A2, 28, 05, 26, 05, 20, 05, A1, 30, 05, 32, 05, 48, 05, 4A, 05, 18, 05, 1A, 05, A3, 30, 05, A1, 32, 05, 38, 05, 3A, 05, 01, 01, 00 } ;;; $624C: Song data: 3 - Chozo ruins - tone/sweep channel - instructions ;;; { ROM4:624C dx A2, 20, 05, 26, 05, A7, 2C, 26, A3, 1A, A2, 1C, 01, F4,02, A1, 18, 1A, 18, 1A, F5, A4, 01, 00 } ;;; $6264: Song data: 3 - Chozo ruins - tone/sweep channel - instructions ;;; { ROM4:6264 dx A3, 3A, 03, A1, 32, 03, 34, 03, A2, 2C, 03, 3A, 03, A1, 32, 03, 48, 03, A2, 24, 03, 30, 03, A1, 28, 03, 2E, 03, 30, 03, 26, 03, A2, 24, 03, 2C, 03, 28, 03, A6, 26, 03, A3, 22, 03, A7, 1E, 05, A5, 01, 00 } ;;; $6297: Song data: 3 - Chozo ruins - tone/sweep channel - instructions ;;; { ROM4:6297 dx F3,FE, F2,40EC, 00 } ;;; $629D: Song data: 3 - Chozo ruins - tone/sweep channel - instructions ;;; { ROM4:629D dx F3,00, F2,40DF, 00 } ;;; $62A3: Song data: 3 - Chozo ruins - tone/sweep channel - instructions ;;; { ROM4:62A3 dx F1,62,00,40, F4,02, A1, 0C, 16, 0C, 16, 10, 18, 10, 18, 0C, 14, 0C, 14, 10, 08, 10, 08, 10, 08, 0C, 04, 0C, 04, 0C, 04, F5, F1,62,00,00, A1, 3C, 46, 3C, 46, 40, 48, 40, 48, 3C, 44, 3C, 44, 40, 38, 40, 38, 40, 38, 3C, 34, 3C, 34, 3C, 34, 3A, 2E, 36, 2A, 30, 24, 2C, 20, 1A, 18, 12, 02, F1,87,00,40, A5, 62, 01, A3, 01, 00 } ;;; $62F6: Song data: 3 - Chozo ruins - tone channel - instructions ;;; { ROM4:62F6 dx F1,50,00,80, A2, 30, 32, 40, 05, 38, 05, 3A, 05, A3, 30, 05, 32, 05, A2, 28, 05, 26, 05, 20, 05, A1, 30, 05, 32, 05, 48, 05, 4A, 05, 18, 05, 1A, 05, A3, 30, 05, A1, 32, 05, 38, 05, 3A, A6, 05, 00 } ;;; $6328: Song data: 3 - Chozo ruins - tone channel - instructions ;;; { ROM4:6328 dx A2, 32, 05, 36, 05, A1, 3C, 05, 3A, 05, 32, 05, A2, 36, 05, 01, 26, 05, 28, 05, 01, A1, 26, 05, 20, 05, 22, 03, A2, 1A, A7, 05, 00 } ;;; $6349: Song data: 3 - Chozo ruins - tone channel - instructions ;;; { ROM4:6349 dx A2, 40, A7, 05, A1, 38, 05, 3A, 05, A2, 32, 05, A2, 40, 05, A1, 38, 05, 3A, 05, A2, 32, 05, 28, 05, A2, 2E, 05, A4, 01, A2, 2C, 05, 28, 05, A2, 2E, A3, 05, A2, 2A, A7, 05, A7, 2C, 05, A5, 01, 00 } ;;; $637A: Song data: 3 - Chozo ruins - tone channel - instructions ;;; { ROM4:637A dx F1,62,00,80, A1, 0C, 16, 0C, 16, 10, 18, 10, 18, 0C, 14, 0C, 14, 10, 08, 10, 08, 10, 08, 0C, 04, 0C, 04, 0C, 04, A1, 2C, 32, 2C, 32, 30, 38, 30, 38, 2C, 34, 2C, 34, 30, 2C, 30, 2C, 1A, 3C, 40, 46, 4A, 4E, 54, 58, A1, 2C, 32, 2C, 32, 30, 38, 30, 38, 2C, 34, 2C, 34, 30, 2C, 30, 2C, 34, 32, 3C, 46, 40, 32, 2A, 1E, 1C, 1A, 18, 16, 14, 12, 10, 0E, 0C, 0A, 08, 0A, F1,87,00,40, A5, 62, 01, A3, 01, 00 } ;;; $63DF: Song data: 3 - Chozo ruins - wave channel - instructions ;;; { ROM4:63DF dx F1,417B,40, A3, 01, A2, 32, 03, 30, 03, 2E, 03, A3, 26, 03, 28, 03, A2, 28, 03, 26, 03, 20, 03, A1, 30, 03, 32, 03, 48, 03, 4A, 03, 18, 03, 1A, 03, A3, 30, 03, A1, 32, 03, 38, 03, 3A, 03, 01, 01, 00 } ;;; $6412: Song data: 3 - Chozo ruins - wave channel - instructions ;;; { ROM4:6412 dx A2, 32, 03, 36, 03, A1, 3C, 03, 3A, 03, 32, 03, A3, 36, A2, 03, 26, 03, A3, 28, A2, 03, A1, 26, 03, 20, 03, 22, 03, A2, 1A, 03, A3, 01, 00 } ;;; $6435: Song data: 3 - Chozo ruins - wave channel - instructions ;;; { ROM4:6435 dx A3, 40, A2, 03, 01, A1, 38, 03, 3A, 03, A2, 32, A1, 03, 01, A2, 40, 03, A1, 38, 03, 3A, 03, A2, 32, 03, 28, 03, A7, 2E, 03, A2, 2C, 03, 28, 03, A6, 2E, 03, A3, 2A, 03, A3, 2C, 03, A5, 01, A3, 01, 00 } ;;; $6467: Song data: 3 - Chozo ruins - wave channel - instructions ;;; { ROM4:6467 dx A8, 01, 01, A0, 2C, 03, 32, 03, 2C, 03, 32, 03, 30, 03, 38, 03, 30, 03, 38, 03, 2C, 03, 34, 03, 2C, 03, 34, 03, 30, 03, 2C, 03, 30, 03, 2C, 03, 1A, 03, 3C, 03, 40, 03, 46, 03, 4A, 03, 4E, 03, 54, 03, 58, 03, A0, 2C, 03, 32, 03, 2C, 03, 32, 03, 30, 03, 38, 03, 30, 03, 38, 03, 2C, 03, 34, 03, 2C, 03, 34, 03, 30, 03, 2C, 03, 30, 03, 2C, 03, 34, 03, 32, 03, 3C, 03, 46, 03, 40, 03, 32, 03, 2A, 03, 1E, 03, 1C, 03, 1A, 03, 18, 03, 16, 03, 14, 03, 12, 03, 10, 03, 0E, 03, 0C, 03, 0A, 03, 08, 03, 0A, 03, A6, 62, 03, A7, 01, A8, 01, 01, 00 } } ;;; $64ED: Song data: 4 - Main caves ;;; { ;;; $64ED: Song data header: 4 - Main caves ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:64ED dx 00,40C5,64F8,651C,6528,6534 } ;;; $64F8: Song data: 4 - Main caves - tone/sweep channel - instruction pointer list ;;; { ROM4:64F8 dw 6542, 6672, ROM4:64FC dw 659C, 659C, 65EB, 65EB, 65EB, 65EB, 6550, 659C, 659C, 6600, 6600, 6600, 6600, 6550, 00F0,64FC } ;;; $651C: Song data: 4 - Main caves - tone channel - instruction pointer list ;;; { ROM4:651C dw 6615, 6623, ROM4:6520 dw 6631, 6672, 00F0,6520 } ;;; $6528: Song data: 4 - Main caves - wave channel - instruction pointer list ;;; { ROM4:6528 dw 669E, ROM4:652A dw 66AC, 66DB, 676A, 00F0,652A } ;;; $6534: Song data: 4 - Main caves - noise channel - instruction pointer list ;;; { ROM4:6534 dw 67C3, ROM4:6536 dw 67C9, 67ED, 6803, 6828, 00F0,6536 } ;;; $6542: Song data: 4 - Main caves - tone/sweep channel - instructions ;;; { ROM4:6542 dx F1,55,00,40, A1, 1A, 24, 44, 46, 4A, 50, 6C, 74, 00 } ;;; $6550: Song data: 4 - Main caves - tone/sweep channel - instructions ;;; { ROM4:6550 dx F1,26,00,40, A2, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 54, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 4A, 46, 50, 46, 46, A3, 50, A2, 46, 50, 46, 50, 46, 46, A2, 50, 46, 50, 50, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 54, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 4A, 46, 50, 46, 46, A3, 46, 16, A2, 24, 2E, 32, 38, 24, 2E, 32, 38, 00 } ;;; $659C: Song data: 4 - Main caves - tone/sweep channel - instructions ;;; { ROM4:659C dx F1,71,00,40, F4,03, A2, 1A, 24, 1A, 1A, A3, 24, A2, 1A, 24, 1A, 24, 1A, 1A, A3, 24, A2, 1A, 1A, 16, 20, 16, 16, A3, 20, A2, 16, 20, 16, 20, 16, 16, 20, 16, 20, 20, F5, A2, 1A, 24, 1A, 1A, A3, 24, A2, 1A, 24, 1A, 24, 1A, 1A, A3, 24, A2, 24, 1A, 16, 20, 16, 16, A3, 16, 16, A2, 24, 2E, 32, 38, 24, 2E, 32, 38, 00 } ;;; $65EB: Song data: 4 - Main caves - tone/sweep channel - instructions ;;; { ROM4:65EB dx F1,63,00,40, F4,04, A2, 1A, 24, 2C, 2E, F5, F4,04, A2, 16, 20, 24, 2E, F5, 00 } ;;; $6600: Song data: 4 - Main caves - tone/sweep channel - instructions ;;; { ROM4:6600 dx F1,0A,00,00, F4,04, A2, 4A, 54, 5C, 5E, F5, F4,04, A2, 46, 50, 5C, 5E, F5, 00 } ;;; $6615: Song data: 4 - Main caves - tone channel - instructions ;;; { ROM4:6615 dx F1,75,00,40, A1, 1A, 24, 2C, 2E, 32, 38, 3C, 44, 00 } ;;; $6623: Song data: 4 - Main caves - tone channel - instructions ;;; { ROM4:6623 dx F1,0F,00,00, A5, 24, 03, 20, 03, 3C, 03, 38, 03, 00 } ;;; $6631: Song data: 4 - Main caves - tone channel - instructions ;;; { ROM4:6631 dx F1,73,00,40, F4,08, A3, 0C, 03, 0C, 03, 0C, 03, 0C, 03, 08, 03, 08, 03, 08, 03, 08, 03, F5, F1,22,6C,80, F4,08, A1, 62, 60, 4E, 58, 52, 5C, 60, 54, 5C, 5C, 60, 60, 4A, 4A, 5C, 5C, 52, 52, 5C, 5C, 54, 54, 5C, 5C, 52, 52, 4A, 4A, 5C, 5C, 52, 52, F5, 00 } ;;; $6672: Song data: 4 - Main caves - tone channel - instructions ;;; { ROM4:6672 dx F1,47,00,40, A4, 24, A7, 1A, 1A, A3, 1A, 24, 1A, A4, 20, A7, 16, 16, A3, 16, 20, 16, A4, 24, A7, 1A, 1A, A3, 1A, 24, 1A, A4, 20, A7, 16, A2, 16, 0C, 16, 1A, 20, A4, 0C, 00 } ;;; $669E: Song data: 4 - Main caves - wave channel - instructions ;;; { ROM4:669E dx F1,417B,40, A1, 02, 0C, 14, 16, 1A, 20, 24, 2C, 00 } ;;; $66AC: Song data: 4 - Main caves - wave channel - instructions ;;; { ROM4:66AC dx F1,417B,40, A3, 32, A2, 03, 32, A3, 03, A5, 01, A3, 01, 2E, A2, 03, 2E, A3, 03, A5, 01, A3, 01, 32, A2, 03, 32, A3, 03, A5, 01, A3, 01, 2E, A2, 03, 2E, A3, 03, A8, 01, A3, 1A, 03, 00 } ;;; $66DB: Song data: 4 - Main caves - wave channel - instructions ;;; { ROM4:66DB dx F1,417B,40, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 3C, 03, A3, 40, 03, 38, 03, 01, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 46, 03, A7, 4A, 03, A3, 40, 03, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 3C, 03, A3, 40, 03, 01, 01, 01, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 46, 03, A3, 4A, 03, 50, 03, A2, 4E, 03, F4,02, A6, 4A, 03, 46, 03, A3, 44, 03, A7, 3C, 03, A6, 38, 03, 40, 03, A7, 46, 03, A3, 44, 03, A6, 4A, 03, 46, 03, A3, 44, 03, 54, 03, A2, 50, 03, A6, 4E, 03, 46, 03, A7, 4A, 03, A4, 01, F5, 00 } ;;; $676A: Song data: 4 - Main caves - wave channel - instructions ;;; { ROM4:676A dx F1,417B,40, A7, 24, 03, 2E, 03, A3, 32, 03, A7, 38, 03, 36, 03, A3, 2E, 03, A7, 24, 03, 32, 03, A3, 36, 03, A7, 38, 03, 3C, 03, A3, 40, 03, A7, 24, 03, 2C, 03, A3, 2E, 03, A7, 32, 03, 36, 03, A3, 38, 03, 3C, 03, 44, 03, A2, 46, 03, A3, 4A, 03, 50, 03, A2, 54, 03, 5C, 03, 5E, 03, A1, 62, 03, 68, 03, 6C, 03, 76, 03, 62, 03, 68, 03, 6C, 03, 74, 03, 00 } ;;; $67C3: Song data: 4 - Main caves - noise channel - instructions ;;; { ROM4:67C3 dx F4,08, A1, 10, F5, 00 } ;;; $67C9: Song data: 4 - Main caves - noise channel - instructions ;;; { ROM4:67C9 dx F4,03, A2, 90, 0C, 04, 94, 04, 04, 0C, 04, 04, 04, 0C, 04, 90, 0C, 04, 0C, F5, A2, 90, 04, 0C, 90, 04, 04, 0C, 04, 14, 10, 14, 10, A4, 1C, 00 } ;;; $67ED: Song data: 4 - Main caves - noise channel - instructions ;;; { ROM4:67ED dx F4,0F, A2, 90, 04, 0C, 04, 90, 04, 0C, 04, F5, A2, 14, 10, 10, 10, 14, 10, 14, 10, 00 } ;;; $6803: Song data: 4 - Main caves - noise channel - instructions ;;; { ROM4:6803 dx F4,07, A2, 90, 0C, 04, 94, 14, 04, 0C, 04, 90, 0C, 04, 0C, 94, 0C, 04, 04, F5, 90, 0C, 08, 94, 90, 0C, 08, 04, 14, 10, 10, 10, 14, 10, 14, 10, 00 } ;;; $6828: Song data: 4 - Main caves - noise channel - instructions ;;; { ROM4:6828 dx F4,04, A2, 14, 0C, 14, 04, 08, 0C, 08, 04, 04, 0C, 08, 04, 08, A3, 68, A2, 0C, F5, F4,03, A2, 10, 10, 04, 10, 14, 0C, 08, 04, 90, 0C, 08, 04, 90, A3, 68, A2, 0C, F5, 90, 0C, 90, 04, 08, 0C, 08, 04, F4,08, 14, F5, 00 } } ;;; $685F: Song data: 5 - Sub caves 1 ;;; { ;;; $685F: Song data header: 5 - Sub caves 1 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:685F dx 00,40C5,686A,6874,6878,687C } ;;; $6550: Song data: 15h - Main caves, no intro - tone/sweep channel - instructions ;;; { ROM4:6550 dx F1,26,00,40, A2, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 54, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 4A, 46, 50, 46, 46, A3, 50, A2, 46, 50, 46, 50, 46, 46, A2, 50, 46, 50, 50, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 54, 4A, 54, 4A, 4A, A3, 54, A2, 4A, 4A, 46, 50, 46, 46, A3, 46, 16, A2, 24, 2E, 32, 38, 24, 2E, 32, 38, 00 } ;;; $659C: Song data: 15h - Main caves, no intro - tone/sweep channel - instructions ;;; { ROM4:659C dx F1,71,00,40, F4,03, A2, 1A, 24, 1A, 1A, A3, 24, A2, 1A, 24, 1A, 24, 1A, 1A, A3, 24, A2, 1A, 1A, 16, 20, 16, 16, A3, 20, A2, 16, 20, 16, 20, 16, 16, 20, 16, 20, 20, F5, A2, 1A, 24, 1A, 1A, A3, 24, A2, 1A, 24, 1A, 24, 1A, 1A, A3, 24, A2, 24, 1A, 16, 20, 16, 16, A3, 16, 16, A2, 24, 2E, 32, 38, 24, 2E, 32, 38, 00 } ;;; $65EB: Song data: 15h - Main caves, no intro - tone/sweep channel - instructions ;;; { ROM4:65EB dx F1,63,00,40, F4,04, A2, 1A, 24, 2C, 2E, F5, F4,04, A2, 16, 20, 24, 2E, F5, 00 } ;;; $6600: Song data: 15h - Main caves, no intro - tone/sweep channel - instructions ;;; { ROM4:6600 dx F1,0A,00,00, F4,04, A2, 4A, 54, 5C, 5E, F5, F4,04, A2, 46, 50, 5C, 5E, F5, 00 } ;;; $6623: Song data: 15h - Main caves, no intro - tone channel - instructions ;;; { ROM4:6623 dx F1,0F,00,00, A5, 24, 03, 20, 03, 3C, 03, 38, 03, 00 } ;;; $6631: Song data: 15h - Main caves, no intro - tone channel - instructions ;;; { ROM4:6631 dx F1,73,00,40, F4,08, A3, 0C, 03, 0C, 03, 0C, 03, 0C, 03, 08, 03, 08, 03, 08, 03, 08, 03, F5, F1,22,6C,80, F4,08, A1, 62, 60, 4E, 58, 52, 5C, 60, 54, 5C, 5C, 60, 60, 4A, 4A, 5C, 5C, 52, 52, 5C, 5C, 54, 54, 5C, 5C, 52, 52, 4A, 4A, 5C, 5C, 52, 52, F5, 00 } ;;; $6672: Song data: 15h - Main caves, no intro - tone/sweep channel, 15h - Main caves, no intro - tone channel - instructions ;;; { ROM4:6672 dx F1,47,00,40, A4, 24, A7, 1A, 1A, A3, 1A, 24, 1A, A4, 20, A7, 16, 16, A3, 16, 20, 16, A4, 24, A7, 1A, 1A, A3, 1A, 24, 1A, A4, 20, A7, 16, A2, 16, 0C, 16, 1A, 20, A4, 0C, 00 } ;;; $66AC: Song data: 15h - Main caves, no intro - wave channel - instructions ;;; { ROM4:66AC dx F1,417B,40, A3, 32, A2, 03, 32, A3, 03, A5, 01, A3, 01, 2E, A2, 03, 2E, A3, 03, A5, 01, A3, 01, 32, A2, 03, 32, A3, 03, A5, 01, A3, 01, 2E, A2, 03, 2E, A3, 03, A8, 01, A3, 1A, 03, 00 } ;;; $66DB: Song data: 15h - Main caves, no intro - wave channel - instructions ;;; { ROM4:66DB dx F1,417B,40, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 3C, 03, A3, 40, 03, 38, 03, 01, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 46, 03, A7, 4A, 03, A3, 40, 03, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 3C, 03, A3, 40, 03, 01, 01, 01, A6, 32, 03, 3C, 03, A3, 40, 03, 46, 03, 01, A6, 44, 03, 46, 03, A3, 4A, 03, 50, 03, A2, 4E, 03, F4,02, A6, 4A, 03, 46, 03, A3, 44, 03, A7, 3C, 03, A6, 38, 03, 40, 03, A7, 46, 03, A3, 44, 03, A6, 4A, 03, 46, 03, A3, 44, 03, 54, 03, A2, 50, 03, A6, 4E, 03, 46, 03, A7, 4A, 03, A4, 01, F5, 00 } ;;; $676A: Song data: 15h - Main caves, no intro - wave channel - instructions ;;; { ROM4:676A dx F1,417B,40, A7, 24, 03, 2E, 03, A3, 32, 03, A7, 38, 03, 36, 03, A3, 2E, 03, A7, 24, 03, 32, 03, A3, 36, 03, A7, 38, 03, 3C, 03, A3, 40, 03, A7, 24, 03, 2C, 03, A3, 2E, 03, A7, 32, 03, 36, 03, A3, 38, 03, 3C, 03, 44, 03, A2, 46, 03, A3, 4A, 03, 50, 03, A2, 54, 03, 5C, 03, 5E, 03, A1, 62, 03, 68, 03, 6C, 03, 76, 03, 62, 03, 68, 03, 6C, 03, 74, 03, 00 } ;;; $67C9: Song data: 15h - Main caves, no intro - noise channel - instructions ;;; { ROM4:67C9 dx F4,03, A2, 90, 0C, 04, 94, 04, 04, 0C, 04, 04, 04, 0C, 04, 90, 0C, 04, 0C, F5, A2, 90, 04, 0C, 90, 04, 04, 0C, 04, 14, 10, 14, 10, A4, 1C, 00 } ;;; $67ED: Song data: 15h - Main caves, no intro - noise channel - instructions ;;; { ROM4:67ED dx F4,0F, A2, 90, 04, 0C, 04, 90, 04, 0C, 04, F5, A2, 14, 10, 10, 10, 14, 10, 14, 10, 00 } ;;; $6803: Song data: 15h - Main caves, no intro - noise channel - instructions ;;; { ROM4:6803 dx F4,07, A2, 90, 0C, 04, 94, 14, 04, 0C, 04, 90, 0C, 04, 0C, 94, 0C, 04, 04, F5, 90, 0C, 08, 94, 90, 0C, 08, 04, 14, 10, 10, 10, 14, 10, 14, 10, 00 } ;;; $6828: Song data: 15h - Main caves, no intro - noise channel - instructions ;;; { ROM4:6828 dx F4,04, A2, 14, 0C, 14, 04, 08, 0C, 08, 04, 04, 0C, 08, 04, 08, A3, 68, A2, 0C, F5, F4,03, A2, 10, 10, 04, 10, 14, 0C, 08, 04, 90, 0C, 08, 04, 90, A3, 68, A2, 0C, F5, 90, 0C, 90, 04, 08, 0C, 08, 04, F4,08, 14, F5, 00 } ;;; $686A: Song data: 5 - Sub caves 1 - tone/sweep channel - instruction pointer list ;;; { ROM4:686A dw 7DA0, 7D86, ROM4:686E dw 6880, 00F0,686E } ;;; $6874: Song data: 5 - Sub caves 1 - tone channel - instruction pointer list ;;; { ROM4:6874 dw 7DCA, 0000 } ;;; $6878: Song data: 5 - Sub caves 1 - wave channel - instruction pointer list ;;; { ROM4:6878 dw 7DF4, 0000 } ;;; $687C: Song data: 5 - Sub caves 1 - noise channel - instruction pointer list ;;; { ROM4:687C dw 7E04, 0000 } ;;; $6880: Song data: 5 - Sub caves 1 - tone/sweep channel - instructions ;;; { ROM4:6880 dx F1,37,35,80, A1, 58, A1, 5A, 5C, 5E, 60, 62, 64, 66, 68, 6A, A9, 6C, 6E, 70, 72, 74, 76, 78, A5, 7A, A0, 58, 5A, 5C, 5E, 60, 62, 64, 66, 68, 6A, A1, 6C, 6E, 70, A4, 72, A4, 01, A0, 01, A0, 72, 74, 76, 78, 7A, 7C, A4, 7E, A9, 64, 6A, 6E, 74, A8, 62, A6, 01, A9, 7A, 7C, 7E, 80, 82, A5, 84, AA, 01, A1, 01, A0, 72, 74, 76, 78, 7A, 7C, A8, 7E, A6, 5A, 5C, A2, 5E, 60, 62, A1, 64, 66, A9, 68, 6A, 6C, 72, A1, 74, 76, 78, A5, 7A, AA, 01, 00 } } ;;; $68EE: Song data: 6 - Sub caves 2 ;;; { ;;; $68EE: Song data header: 6 - Sub caves 2 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:68EE dx 00,40C5,68F9,68FF,6909,690D } ;;; $6880: Song data: 16h - Sub caves 1, no intro - tone/sweep channel - instructions ;;; { ROM4:6880 dx F1,37,35,80, A1, 58, A1, 5A, 5C, 5E, 60, 62, 64, 66, 68, 6A, A9, 6C, 6E, 70, 72, 74, 76, 78, A5, 7A, A0, 58, 5A, 5C, 5E, 60, 62, 64, 66, 68, 6A, A1, 6C, 6E, 70, A4, 72, A4, 01, A0, 01, A0, 72, 74, 76, 78, 7A, 7C, A4, 7E, A9, 64, 6A, 6E, 74, A8, 62, A6, 01, A9, 7A, 7C, 7E, 80, 82, A5, 84, AA, 01, A1, 01, A0, 72, 74, 76, 78, 7A, 7C, A8, 7E, A6, 5A, 5C, A2, 5E, 60, 62, A1, 64, 66, A9, 68, 6A, 6C, 72, A1, 74, 76, 78, A5, 7A, AA, 01, 00 } ;;; $68F9: Song data: 6 - Sub caves 2 - tone/sweep channel - instruction pointer list ;;; { ROM4:68F9 dw 7DA0, 7D8A, 0000 } ;;; $68FF: Song data: 6 - Sub caves 2 - tone channel - instruction pointer list ;;; { ROM4:68FF dw 7DCA, ROM4:6901 dw 6911, 00F0,6901 } ;;; $6909: Song data: 6 - Sub caves 2 - wave channel - instruction pointer list ;;; { ROM4:6909 dw 7DF4, 0000 } ;;; $690D: Song data: 6 - Sub caves 2 - noise channel - instruction pointer list ;;; { ROM4:690D dw 7E04, 0000 } ;;; $6911: Song data: 6 - Sub caves 2 - tone channel - instructions ;;; { ROM4:6911 dx F1,47,00,07, A8, 01, 01, A0, 70, 6A, 74, 78, 6C, 6A, 74, 66, A1, 7A, 78, 74, 78, 6C, A5, 01, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, A5, 01, A8, 01, A0, 7A, 78, 66, 70, 6A, 74, 78, 6C, A5, 01, A7, 01, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, A5, 01, 01, A3, 01, A1, 78, 66, 7A, 01, 01, 78, 66, 70, 6A, 74, 70, A6, 01, A1, 6A, 6C, 6E, 70, 74, A3, 01, A1, 7A, 6A, 62, 58, 6C, A8, 01, 01, 01, 01, A1, 78, 66, 7A, 78, 66, 70, 6A, 74, 70, 6A, A8, 01, 01, A1, 62, 7A, 78, 66, A5, 01, 00 } } ;;; $6988: Song data: 7 - Sub caves 3 ;;; { ;;; $6988: Song data header: 7 - Sub caves 3 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6988 dx 00,40C5,6993,699D,69A5,69AD } ;;; $6911: Song data: 17h - Sub caves 2, no intro - tone channel - instructions ;;; { ROM4:6911 dx F1,47,00,07, A8, 01, 01, A0, 70, 6A, 74, 78, 6C, 6A, 74, 66, A1, 7A, 78, 74, 78, 6C, A5, 01, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, A5, 01, A8, 01, A0, 7A, 78, 66, 70, 6A, 74, 78, 6C, A5, 01, A7, 01, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, A5, 01, 01, A3, 01, A1, 78, 66, 7A, 01, 01, 78, 66, 70, 6A, 74, 70, A6, 01, A1, 6A, 6C, 6E, 70, 74, A3, 01, A1, 7A, 6A, 62, 58, 6C, A8, 01, 01, 01, 01, A1, 78, 66, 7A, 78, 66, 70, 6A, 74, 70, 6A, A8, 01, 01, A1, 62, 7A, 78, 66, A5, 01, 00 } ;;; $6993: Song data: 7 - Sub caves 3 - tone/sweep channel - instruction pointer list ;;; { ROM4:6993 dw 7DA0, 7D7E, ROM4:6997 dw 69B1, 00F0,6997 } ;;; $699D: Song data: 7 - Sub caves 3 - tone channel - instruction pointer list ;;; { ROM4:699D dw 7DCA, ROM4:699F dw 69E2, 00F0,699F } ;;; $69A5: Song data: 7 - Sub caves 3 - wave channel - instruction pointer list ;;; { ROM4:69A5 dw 7DF4, ROM4:69A7 dw 6A92, 00F0,69A7 } ;;; $69AD: Song data: 7 - Sub caves 3 - noise channel - instruction pointer list ;;; { ROM4:69AD dw 7E04, 0000 } ;;; $69B1: Song data: 7 - Sub caves 3 - tone/sweep channel - instructions ;;; { ROM4:69B1 dx F1,57,15,80, F4,0A, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, F5, A5, 01, 01, F4,02, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, F5, A5, 01, F4,16, A1, 7E, 78, 6C, 72, 6A, 76, 78, 62, F5, AC, 01, 01, 00 } ;;; $69E2: Song data: 7 - Sub caves 3 - tone channel - instructions ;;; { ROM4:69E2 dx F1,37,00,07, A5, 01, 01, A1, 04, 18, 1C, 30, 34, 48, 4C, 60, 64, 78, 7C, 90, F4,04, 62, 64, 62, 64, 62, 64, 62, 64, AC, 01, 01, A1, 04, 0C, 10, 18, 1C, 24, 28, 30, 34, 3C, 40, 48, 4C, 54, 58, 60, 64, 6C, 70, 78, 7C, 84, 88, 90, 7A, 7C, 62, 64, 4A, 4C, 32, 34, 1A, 1C, 02, 04, AC, 01, 01, 01, A1, 84, 84, 0C, 0E, 6C, 6E, 24, 26, 54, 56, 3C, 3E, 3C, 88, 90, 10, 18, 70, 78, 28, 30, 58, 60, 40, 48, 40, 48, 40, 7E, 7C, 06, 04, 66, 62, 1E, 1C, 4E, 4C, 36, 34, 36, 34, 34, 36, 34, 7A, 7C, 70, 62, 64, 58, 4A, 4C, 40, 32, 34, 28, 1A, 1C, 10, 02, 04, AC, 01, F1,47,00,82, A0, 88, 84, 7A, 78, 70, 6C, 62, 60, 58, 54, 4A, 48, 40, 3C, 32, 30, 28, 24, 1A, 18, 10, 0C, 02, A5, 78, 01, 01, 78, AC, 01, 01, 00 } ;;; $6A92: Song data: 7 - Sub caves 3 - wave channel - instructions ;;; { ROM4:6A92 dx F1,418B,63, A8, F4,06, 30, F5, F4,06, 32, F5, F4,06, 34, F5, F4,06, 36, F5, F4,06, 38, F5, F4,06, 3A, F5, F4,06, 3C, F5, F4,06, 3E, F5, F4,06, 40, F5, F4,06, 3E, F5, F4,06, 3C, F5, F4,06, 3A, F5, F4,06, 38, F5, F4,06, 36, F5, F4,06, 34, F5, F4,06, 32, F5, F4,06, 30, F5, F4,06, 2E, F5, A5, 01, 00 } } ;;; $6AE2: Song data: 8 - Final caves ;;; { ;;; $6AE2: Song data header: 8 - Final caves ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6AE2 dx 01,40B8,6AED,6AF3,6AF9,6AFF } ;;; $69B1: Song data: 18h - Sub caves 3, no intro - tone/sweep channel - instructions ;;; { ROM4:69B1 dx F1,57,15,80, F4,0A, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, F5, A5, 01, 01, F4,02, A1, 7A, 78, 66, 70, 6A, 74, 78, 6C, F5, A5, 01, F4,16, A1, 7E, 78, 6C, 72, 6A, 76, 78, 62, F5, AC, 01, 01, 00 } ;;; $69E2: Song data: 18h - Sub caves 3, no intro - tone channel - instructions ;;; { ROM4:69E2 dx F1,37,00,07, A5, 01, 01, A1, 04, 18, 1C, 30, 34, 48, 4C, 60, 64, 78, 7C, 90, F4,04, 62, 64, 62, 64, 62, 64, 62, 64, AC, 01, 01, A1, 04, 0C, 10, 18, 1C, 24, 28, 30, 34, 3C, 40, 48, 4C, 54, 58, 60, 64, 6C, 70, 78, 7C, 84, 88, 90, 7A, 7C, 62, 64, 4A, 4C, 32, 34, 1A, 1C, 02, 04, AC, 01, 01, 01, A1, 84, 84, 0C, 0E, 6C, 6E, 24, 26, 54, 56, 3C, 3E, 3C, 88, 90, 10, 18, 70, 78, 28, 30, 58, 60, 40, 48, 40, 48, 40, 7E, 7C, 06, 04, 66, 62, 1E, 1C, 4E, 4C, 36, 34, 36, 34, 34, 36, 34, 7A, 7C, 70, 62, 64, 58, 4A, 4C, 40, 32, 34, 28, 1A, 1C, 10, 02, 04, AC, 01, F1,47,00,82, A0, 88, 84, 7A, 78, 70, 6C, 62, 60, 58, 54, 4A, 48, 40, 3C, 32, 30, 28, 24, 1A, 18, 10, 0C, 02, A5, 78, 01, 01, 78, AC, 01, 01, 00 } ;;; $6A92: Song data: 18h - Sub caves 3, no intro - wave channel - instructions ;;; { ROM4:6A92 dx F1,418B,63, A8, F4,06, 30, F5, F4,06, 32, F5, F4,06, 34, F5, F4,06, 36, F5, F4,06, 38, F5, F4,06, 3A, F5, F4,06, 3C, F5, F4,06, 3E, F5, F4,06, 40, F5, F4,06, 3E, F5, F4,06, 3C, F5, F4,06, 3A, F5, F4,06, 38, F5, F4,06, 36, F5, F4,06, 34, F5, F4,06, 32, F5, F4,06, 30, F5, F4,06, 2E, F5, A5, 01, 00 } ;;; $6AED: Song data: 8 - Final caves - tone/sweep channel - instruction pointer list ;;; { ROM4:6AED dw 6B05, 00F0,6AED } ;;; $6AF3: Song data: 8 - Final caves - tone channel - instruction pointer list ;;; { ROM4:6AF3 dw 6B15, 00F0,6AF3 } ;;; $6AF9: Song data: 8 - Final caves - wave channel - instruction pointer list ;;; { ROM4:6AF9 dw 6B25, 00F0,6AF9 } ;;; $6AFF: Song data: 8 - Final caves - noise channel - instruction pointer list ;;; { ROM4:6AFF dw 6BBA, 00F0,6AFF } ;;; $6B05: Song data: 8 - Final caves - tone/sweep channel - instructions ;;; { ROM4:6B05 dx F1,C3,00,00, A3, 1A, 03, A7, 1A, 03, 03, AC, 05, 01, 01, 00 } ;;; $6B15: Song data: 8 - Final caves - tone channel - instructions ;;; { ROM4:6B15 dx F1,C4,00,0A, A3, 02, 03, A7, 02, 03, 03, AC, 05, 01, 01, 00 } ;;; $6B25: Song data: 8 - Final caves - wave channel - instructions ;;; { ROM4:6B25 dx F1,417B,44, F4,05, AC, 01, 01, A1, 01, A5, 01, A1, 22, 03, 24, 03, 30, 03, 2E, 03, A4, 2C, 03, 01, 40, A3, 03, 01, A1, 20, 03, 2C, 03, A4, 34, A3, 03, 01, A1, 32, 03, 30, 03, A5, 24, 03, 01, AC, 01, A1, 20, 03, 22, 03, 1A, 03, 2E, 03, 2C, 03, A4, 26, 03, 01, 01, A2, 1E, 03, 20, 03, 28, 03, A7, 18, 03, A1, 1C, 03, A8, 10, 03, 14, 03, 0C, 03, A1, 02, 03, 0E, 03, 18, 03, 1A, 03, 24, 03, A7, 30, 03, 2E, 03, A8, 32, 03, A7, 40, 03, 42, 03, 3A, 03, 3C, 03, 38, 03, 40, 03, 30, 03, A4, 28, 03, A8, 2A, 03, 01, A1, 28, 03, 26, 03, 1A, 03, 14, 03, 0E, 03, A4, 1A, 03, F5, F4,08, AC, 01, F5, 00 } ;;; $6BBA: Song data: 8 - Final caves - noise channel - instructions ;;; { ROM4:6BBA dx A4, 74, A2, 01, A7, 78, A2, 01, 00 } } ;;; $6BC3: Song data: 9 - Metroid hive ;;; { ;;; $6BC3: Song data header: 9 - Metroid hive ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6BC3 dx FE,40DF,0000,6BE0,6BF4,6BFA } ;;; $0: Song data: 9 - Metroid hive - tone/sweep channel - instruction pointer list ;;; { } ;;; $6BE0: Song data: 9 - Metroid hive - tone channel - instruction pointer list ;;; { ROM4:6BE0 dw 6C5A, 6C04, 6C04, 6C5F, 6C04, 6C5F, 6C5F, 6C04, 00F0,6BE0 } ;;; $6BF4: Song data: 9 - Metroid hive - wave channel - instruction pointer list ;;; { ROM4:6BF4 dw 6C65, 00F0,6BF4 } ;;; $6BFA: Song data: 9 - Metroid hive - noise channel - instruction pointer list ;;; { ROM4:6BFA dw 6C85, 00F0,6BFA } ;;; $6C04: Song data: 9 - Metroid hive - tone channel - instructions ;;; { ROM4:6C04 dx F4,02, A9, 78, 05, 03, 68, 05, 03, 6C, 05, 03, 64, 05, 03, 68, 05, 03, 70, 05, 03, F5, F4,02, 74, 05, 03, 68, 05, 03, 6C, 05, 03, 64, 05, 03, 68, 05, 03, 60, 05, 03, F5, F4,02, 70, 05, 03, 60, 05, 03, 64, 05, 03, 6C, 05, 03, 70, 05, 03, 78, 05, 03, F5, F4,02, 6C, 05, 03, 60, 05, 03, 64, 05, 03, 5C, 05, 03, 60, 05, 03, 68, 05, 03, F5, 00 } ;;; $6C5A: Song data: 9 - Metroid hive - tone channel - instructions ;;; { ROM4:6C5A dx F1,61,00,40, 00 } ;;; $6C5F: Song data: 9 - Metroid hive - tone channel - instructions ;;; { ROM4:6C5F dx F4,06, A5, 01, F5, 00 } ;;; $6C65: Song data: 9 - Metroid hive - wave channel - instructions ;;; { ROM4:6C65 dx F1,417B,40, F4,0A, A5, 18, A7, 24, A5, 20, 14, 0C, A7, 1C, A5, 14, 0C, 1A, F5, A8, 18, A5, 16, A4, 14, A5, 12, 24, 14, 00 } ;;; $6C85: Song data: 9 - Metroid hive - noise channel - instructions ;;; { ROM4:6C85 dx A6, 74, A0, 01, A6, 78, A1, 01, 00 } } ;;; $6C8E: Song data: Ah - Item-get ;;; { ;;; $6C8E: Song data header: Ah - Item-get ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6C8E dx 0B,40C5,6C99,6C9D,6CA1,6CA5 } ;;; $6C99: Song data: Ah - Item-get - tone/sweep channel - instruction pointer list ;;; { ROM4:6C99 dw 6CA9, 0000 } ;;; $6C9D: Song data: Ah - Item-get - tone channel - instruction pointer list ;;; { ROM4:6C9D dw 6CEE, 0000 } ;;; $6CA1: Song data: Ah - Item-get - wave channel - instruction pointer list ;;; { ROM4:6CA1 dw 6D1D, 0000 } ;;; $6CA5: Song data: Ah - Item-get - noise channel - instruction pointer list ;;; { ROM4:6CA5 dw 6D46, 0000 } ;;; $6CA9: Song data: Ah - Item-get - tone/sweep channel - instructions ;;; { ROM4:6CA9 dx F1,A1,00,00, A1, 74, 76, 74, 76, F1,80,00,80, A2, 32, A7, 03, A2, 2C, A7, 03, A2, 28, 03, 22, 03, 1A, 03, 22, 03, 36, 03, 2E, 03, 28, A6, 03, A6, 20, 03, F1,0D,00,80, A7, 22, A3, 03, F1,81,00,00, F4,04, A1, 7A, 82, F5, F1,41,00,00, F4,06, A1, 7A, 82, F5, 00 } ;;; $6CEE: Song data: Ah - Item-get - tone channel - instructions ;;; { ROM4:6CEE dx F1,F0,00,80, AB, 01, A3, 01, A2, 3C, 03, 46, 03, 4A, 03, 4E, 03, 52, 03, 4A, 03, 40, 03, 4A, 03, 54, 03, 4E, 03, 46, A6, 03, 40, 03, F1,0B,00,80, A7, 44, F1,B6,00,80, A5, 44, 00 } ;;; $6D1D: Song data: Ah - Item-get - wave channel - instructions ;;; { ROM4:6D1D dx F1,4123,20, A3, 01, A2, 54, 05, 5E, 05, 62, 05, 66, 05, 6A, 05, 62, 05, 58, 05, 62, 05, 6C, 05, 66, 05, 5E, A6, 05, A2, 58, A6, 05, 03, A4, 5C, A3, 05, 03, 00 } ;;; $6D46: Song data: Ah - Item-get - noise channel - instructions ;;; { ROM4:6D46 dx A7, 68, A5, 6C, 01, 01, A7, 68, AC, 6C, 00 } } ;;; $6D51: Song data: Bh - Metroid Queen hallway ;;; { ;;; $6D51: Song data header: Bh - Metroid Queen hallway ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6D51 dx 01,40D2,6D5C,6D5C,6D64,6D6A } ;;; $6D5C: Song data: Bh - Metroid Queen hallway - tone channel - instruction pointer list ;;; { ROM4:6D5C dw 6D70, ROM4:6D5E dw 6D7B, 00F0,6D5E } ;;; $6D64: Song data: Bh - Metroid Queen hallway - wave channel - instruction pointer list ;;; { ROM4:6D64 dw 6D77, 00F0,6D64 } ;;; $6D6A: Song data: Bh - Metroid Queen hallway - noise channel - instruction pointer list ;;; { ROM4:6D6A dw 6D82, 00F0,6D6A } ;;; $6D70: Song data: Bh - Metroid Queen hallway - tone channel - instructions ;;; { ROM4:6D70 dx F1,90,00,40, A0, 01, 00 } ;;; $6D77: Song data: Bh - Metroid Queen hallway - wave channel - instructions ;;; { ROM4:6D77 dx F1,416B,40, F4,03, A3, 14, 03, F5, 00 } ;;; $6D7B: Song data: Bh - Metroid Queen hallway - tone channel - instructions ;;; { ROM4:6D7B dx F4,03, A3, 14, 03, F5, 00 } ;;; $6D82: Song data: Bh - Metroid Queen hallway - noise channel - instructions ;;; { ROM4:6D82 dx A6, 74, A0, 01, A6, 78, A1, 01, 00 } } ;;; $6D8B: Song data: Ch - Metroid battle ;;; { ;;; $6D8B: Song data header: Ch - Metroid battle ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6D8B dx 00,40C5,6D96,6DA0,6DA8,6DB0 } ;;; $6D96: Song data: Ch - Metroid battle - tone/sweep channel - instruction pointer list ;;; { ROM4:6D96 dw 6DB8, 7D7E, ROM4:6D9A dw 6DC6, 00F0,6D9A } ;;; $6DA0: Song data: Ch - Metroid battle - tone channel - instruction pointer list ;;; { ROM4:6DA0 dw 6E0D, ROM4:6DA2 dw 6E29, 00F0,6DA2 } ;;; $6DA8: Song data: Ch - Metroid battle - wave channel - instruction pointer list ;;; { ROM4:6DA8 dw 6E68, ROM4:6DAA dw 6E77, 00F0,6DAA } ;;; $6DB0: Song data: Ch - Metroid battle - noise channel - instruction pointer list ;;; { ROM4:6DB0 dw 6EA3, ROM4:6DB2 dw 6EB2, 00F0,6DB2 } ;;; $6DB8: Song data: Ch - Metroid battle - tone/sweep channel - instructions ;;; { ROM4:6DB8 dx F1,A0,17,06, A5, 0E, A2, 34, 38, 42, 4A, 56, 5E, 00 } ;;; $6DC6: Song data: Ch - Metroid battle - tone/sweep channel - instructions ;;; { ROM4:6DC6 dx F1,87,7F,00, A2, 1A, 01, 1C, 01, 1E, 01, 20, 01, 22, 01, 24, F1,67,34,00, A1, 28, F4,03, A2, 32, 01, 36, 01, 30, 01, 2E, 01, F5, F1,83,00,00, A1, 4A, 60, 4A, 60, A3, 4A, A1, 4A, 60, 4A, F1,D1,00,08, A3, 58, A1, 01, F1,67,77,00, A2, 22, 01, 20, 01, 1E, 01, 1C, 01, 00 } ;;; $6E0D: Song data: Ch - Metroid battle - tone channel - instructions ;;; { ROM4:6E0D dx F1,A5,00,00, A1, 36, 1E, 42, 2A, A4, 4E, A1, 7E, 7C, 7E, 7C, F1,85,00,08, A2, 62, 60, 5E, 5C, 56, 4C, 00 } ;;; $6E29: Song data: Ch - Metroid battle - tone channel - instructions ;;; { ROM4:6E29 dx F1,83,00,00, A2, 30, 24, 2C, 24, 26, 24, 28, 24, 30, 24, 2C, A1, 26, F4,03, A2, 30, 24, 2C, 24, 26, 24, 28, 24, F5, A1, 5A, 56, 5A, 56, A3, 5A, A1, 5A, 56, 5A, F1,D1,00,08, A3, 5A, A1, 01, F1,A1,00,00, A2, 30, 24, 2C, 24, 26, 24, 28, 24, 00 } ;;; $6E68: Song data: Ch - Metroid battle - wave channel - instructions ;;; { ROM4:6E68 dx F1,416B,40, A1, 4E, 1E, 5A, 2A, A7, 66, 03, A8, 01, 00 } ;;; $6E77: Song data: Ch - Metroid battle - wave channel - instructions ;;; { ROM4:6E77 dx F1,418B,47, A3, 2C, 2C, 2C, 2C, 2A, A2, 28, A1, 01, F4,03, A3, 2E, 2C, 2E, 2C, F5, F1,417B,47, A1, 7C, 86, 8A, 8E, A3, 56, A1, 8A, 82, 7C, 82, A3, 4E, A4, 2A, 2A, 00 } ;;; $6EA3: Song data: Ch - Metroid battle - noise channel - instructions ;;; { ROM4:6EA3 dx A1, 1C, 18, 1C, 18, A8, 1C, A2, 10, 14, 18, 18, 1C, 1C, 00 } ;;; $6EB2: Song data: Ch - Metroid battle - noise channel - instructions ;;; { ROM4:6EB2 dx A3, 14, 14, 14, 14, 14, A2, 01, A1, 10, F4,06, A3, 14, 14, F5, A1, 14, 14, 14, 14, A3, 1C, A1, 14, A7, 48, A1, 14, A3, 14, 14, 14, 14, 00 } } ;;; $6ED5: Song data: Dh - Sub caves 4 ;;; { ;;; $6ED5: Song data header: Dh - Sub caves 4 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6ED5 dx 00,40C5,6EE0,6EE6,6EEE,6EF2 } ;;; $6EE0: Song data: Dh - Sub caves 4 - tone/sweep channel - instruction pointer list ;;; { ROM4:6EE0 dw 7DA0, 7D7E, 0000 } ;;; $6EE6: Song data: Dh - Sub caves 4 - tone channel - instruction pointer list ;;; { ROM4:6EE6 dw 7DCA, ROM4:6EE8 dw 6EF6, 00F0,6EE8 } ;;; $6EEE: Song data: Dh - Sub caves 4 - wave channel - instruction pointer list ;;; { ROM4:6EEE dw 7DF4, 0000 } ;;; $6EF2: Song data: Dh - Sub caves 4 - noise channel - instruction pointer list ;;; { ROM4:6EF2 dw 7E04, 0000 } ;;; $6EF6: Song data: Dh - Sub caves 4 - tone channel - instructions ;;; { ROM4:6EF6 dx F1,17,00,87, A1, 62, 52, 5C, 60, 60, 4E, 58, 54, A4, 01, A2, 62, 58, 52, 60, 4E, AC, 01, A1, 4E, 58, 52, A8, 01, 01, A1, 58, 52, 5C, 4E, 70, 52, A5, 01, A2, 58, 52, AC, 01, A1, 54, 60, 5C, 58, 52, 60, 62, A8, 52, 58, 4E, 01, 01, A1, 62, 60, 01, 56, 54, 58, 52, 01, 01, 58, 4E, 60, A7, 01, AC, 01, A6, 4E, 58, 52, AC, 01, A1, 5C, 60, 54, 56, 58, AC, 01, 00 } } ;;; $6F50: Song data: Eh - Earthquake ;;; { ;;; $6F50: Song data header: Eh - Earthquake ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6F50 dx 00,40DF,0000,0000,0000,6F5B } ;;; $0: Song data: Eh - Earthquake - wave channel - instruction pointer list ;;; { } ;;; $6EF6: Song data: 1Eh - Sub caves 4, no intro - tone channel - instructions ;;; { ROM4:6EF6 dx F1,17,00,87, A1, 62, 52, 5C, 60, 60, 4E, 58, 54, A4, 01, A2, 62, 58, 52, 60, 4E, AC, 01, A1, 4E, 58, 52, A8, 01, 01, A1, 58, 52, 5C, 4E, 70, 52, A5, 01, A2, 58, 52, AC, 01, A1, 54, 60, 5C, 58, 52, 60, 62, A8, 52, 58, 4E, 01, 01, A1, 62, 60, 01, 56, 54, 58, 52, 01, 01, 58, 4E, 60, A7, 01, AC, 01, A6, 4E, 58, 52, AC, 01, A1, 5C, 60, 54, 56, 58, AC, 01, 00 } ;;; $6F5B: Song data: Eh - Earthquake - noise channel - instruction pointer list ;;; { ROM4:6F5B dw 6F5F, 0000 } ;;; $6F5F: Song data: Eh - Earthquake - noise channel - instructions ;;; { ROM4:6F5F dx A3, 48, F4,03, A1, 2C, 2C, F5, F4,03, 2C, 28, F5, F4,02, 28, 24, F5, F4,03, 20, 24, F5, F4,02, 34, 38, F5, A1, 20, 34, 2C, 38, 20, 38, 2C, 34, 2C, 34, 28, 34, 20, 3C, 20, 2C, 20, 3C, 28, 34, 28, 30, 28, 2C, A1, 24, 5C, F4,03, 28, 60, F5, F4,5A, 28, 2C, F5, A5, 28, 00 } } ;;; $6FA4: Song data: Fh - Killed Metroid ;;; { ;;; $6FA4: Song data header: Fh - Killed Metroid ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6FA4 dx 0D,40F9,6FAF,6FAF,6FC1,0000 } ;;; $0: Song data: Fh - Killed Metroid - noise channel - instruction pointer list ;;; { } ;;; $6FAF: Song data: Fh - Killed Metroid - tone channel - instruction pointer list ;;; { ROM4:6FAF dw 6FC5, 7D7A, 6FD2, 6FF6, 0000 } ;;; $6FC1: Song data: Fh - Killed Metroid - wave channel - instruction pointer list ;;; { ROM4:6FC1 dw 7000, 0000 } } ;;; $703C: Song data: 11h - Title ;;; { ;;; $703C: Song data header: 11h - Title ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:703C dx 01,40D2,7047,7047,7061,7075 } ;;; $7047: Song data: 11h - Title - tone channel - instruction pointer list ;;; { ROM4:7047 dw 7E09, 708B, 708B, 708B, 708B, 708B, 7D7E, 7152, 7187, 71CC, 7D7A, 00F0,7047 } ;;; $7061: Song data: 11h - Title - wave channel - instruction pointer list ;;; { ROM4:7061 dw 7E10, 7095, 709F, 7112, 7095, 7211, 724E, 73B0, 00F0,7061 } ;;; $7075: Song data: 11h - Title - noise channel - instruction pointer list ;;; { ROM4:7075 dw 7E17, 713E, 713E, 7144, 7144, 713E, 73E9, 73EF, 740F, 00F0,7075 } ;;; $708B: Song data: 11h - Title - tone channel - instructions ;;; { ROM4:708B dx F1,D7,00,44, F4,04, AC, 76, F5, 00 } ;;; $7095: Song data: 11h - Title - wave channel - instructions ;;; { ROM4:7095 dx F1,4123,63, AC, 01, 01, 01, 01, 00 } ;;; $709F: Song data: 11h - Title - wave channel - instructions ;;; { ROM4:709F dx A8, 01, A2, 72, 5C, 62, 03, 72, 52, 01, 5C, 01, 62, A8, 01, A2, 01, 64, 72, 64, 74, 78, 60, 6E, 72, 01, A8, 01, A2, 72, 6A, 54, 66, 64, 4A, 78, 03, 5A, 68, A8, 01, A2, 6E, 01, 5A, 6A, 4C, 72, 78, 52, 76, 03, F1,4123,43, A4, 01, A2, 76, 03, 72, 03, 62, 7C, 72, 03, 72, 62, 76, 03, A8, 01, A2, 01, 64, 78, 66, 03, 64, 6A, 6C, 6E, 03, A4, 01, A2, 62, 6A, 72, 03, 6C, 66, 03, 62, 6A, 03, 74, 03, A4, 01, A2, 66, 03, 72, 03, 6A, 78, 74, 64, 03, 78, 76, 03, 00 } ;;; $7112: Song data: 11h - Title - wave channel - instructions ;;; { ROM4:7112 dx F1,4113,40, A3, 84, 03, 7A, 03, 82, 03, 76, 03, 7E, 03, 70, 03, 7C, 03, 74, 03, 78, 03, 7E, 03, A1, 01, A3, 7C, 03, A2, 01, A3, 74, 03, A6, 01, A8, 70, A2, 03, A8, 01, 00 } ;;; $713E: Song data: 11h - Title - noise channel - instructions ;;; { ROM4:713E dx AC, 01, 01, 01, 01, 00 } ;;; $7144: Song data: 11h - Title - noise channel - instructions ;;; { ROM4:7144 dx F4,02, A2, 14, A5, 20, A4, 01, A7, 01, AC, 30, F5, 00 } ;;; $7152: Song data: 11h - Title - tone channel - instructions ;;; { ROM4:7152 dx F1,0C,00,40, A7, 40, A4, 03, A2, 01, A7, 3C, A4, 03, A2, 01, A7, 3A, A4, 03, A2, 01, A7, 38, A4, 03, A2, 01, A7, 36, A4, 03, A2, 01, A7, 46, A4, 03, A2, 01, A7, 38, A4, 03, A2, 01, A7, 48, A4, 03, A2, 01, 00 } ;;; $7187: Song data: 11h - Title - tone channel - instructions ;;; { ROM4:7187 dx F1,0F,00,00, A8, 4A, A3, 03, A8, 48, A3, 03, A8, 46, A3, 03, A8, 44, A3, 03, A8, 42, A3, 03, A8, 40, A3, 03, A8, 3E, A3, 03, A8, 48, A3, 03, A8, 32, A3, 03, A8, 30, A3, 03, A8, 2E, A3, 03, A8, 2C, A3, 03, A8, 28, A3, 03, A8, 24, A3, 03, A8, 20, A3, 03, A8, 1A, A7, 03, 00 } ;;; $71CC: Song data: 11h - Title - tone channel - instructions ;;; { ROM4:71CC dx F1,F3,00,00, F4,02, A2, 62, 03, 76, 03, 74, 03, 6C, 03, A3, 70, 03, A8, 01, F5, F1,C3,00,00, A2, 62, 03, 76, 03, 74, 03, 6C, 03, A3, 70, 03, A8, 01, F1,84,00,00, A3, 62, 76, 74, 6C, 70, 01, A8, 01, F1,47,00,00, A3, 62, 76, 74, 6C, 70, 01, F4,0E, A5, 01, F5, 00 } ;;; $7211: Song data: 11h - Title - wave channel - instructions ;;; { ROM4:7211 dx F1,41AB,20, A1, 01, A3, 52, 03, 01, A2, 54, 03, A3, 58, 03, A6, 4A, A3, 03, A1, 01, A6, 5E, A6, 03, 01, 01, A1, 5C, 03, 54, 03, A6, 58, A1, 03, A3, 01, 01, 01, A5, 01, 01, A6, 5E, 03, A7, 01, A1, 5C, 03, 54, 03, A6, 58, A3, 03, 01, 01, 00 } ;;; $724E: Song data: 11h - Title - wave channel - instructions ;;; { ROM4:724E dx F1,418B,20, A2, 01, A6, 52, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A2, 54, A1, 01, 05, A2, 58, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 54, 03, 52, 03, A2, 54, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 52, 03, 4E, 03, A2, 4A, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 4A, 03, 4E, 03, A2, 4A, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A2, 4E, A1, 01, 05, A2, 4A, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A2, 4A, A1, 01, 05, A2, 4A, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 48, 03, 44, 03, A2, 48, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 4A, 03, 4E, F1,418B,20, A1, 03, A6, 52, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A2, 54, A1, 01, 05, A2, 58, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 54, 03, 52, 03, A2, 54, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 52, 03, 4E, 03, A2, 4A, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 48, 03, 44, 03, A2, 48, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A2, 44, A1, 01, 05, A2, 48, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A1, 46, 03, 44, 03, A2, 40, A1, 01, A2, 05, A1, 01, A2, 03, A1, 01, A2, 03, A1, 01, A2, 3C, A1, 01, 05, A2, 40, A1, 01, A0, 05, A2, 40, A1, 01, 40, 01, 40, 01, 42, A0, 01, 42, 01, 42, 01, 44, 01, 44, 01, 46, 01, 48, 01, 4A, 01, 00 } ;;; $73B0: Song data: 11h - Title - wave channel - instructions ;;; { ROM4:73B0 dx F1,416B,20, A1, 03, A2, 1A, 03, 1A, 03, F4,08, A2, 1A, 03, 1A, 03, 1A, 03, F5, F1,416B,40, F4,03, A2, 1A, 03, 1A, 03, 1A, 03, F5, F1,416B,60, F4,05, A2, 1A, 03, 1A, 03, 1A, 03, F5, F4,0B, A5, 01, F5, A8, 01, 00 } ;;; $73E9: Song data: 11h - Title - noise channel - instructions ;;; { ROM4:73E9 dx F4,08, A5, 01, F5, 00 } ;;; $73EF: Song data: 11h - Title - noise channel - instructions ;;; { ROM4:73EF dx F4,08, A5, 01, F5, A2, 01, A4, 01, A5, 20, 01, 01, 20, 01, 01, A7, 20, A1, 01, A2, 7C, 01, 80, 01, 84, 01, A6, 84, A2, 01, 00 } ;;; $740F: Song data: 11h - Title - noise channel - instructions ;;; { ROM4:740F dx F4,05, A8, 20, 30, 20, F5, 20, 30, 20, 30, 24, 24, 38, 28, 28, 3C, 3C, F4,05, A5, 01, F5, 00 } } ;;; $7427: Song data: 12h - Samus fanfare ;;; { ;;; $7427: Song data header: 12h - Samus fanfare ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7427 dx 01,40DF,7432,7432,7436,743A } ;;; $6FC5: Song data: Fh - Killed Metroid - tone/sweep channel, Fh - Killed Metroid - tone channel - instructions ;;; { ROM4:6FC5 dx F1,09,00,00, A7, 62, F1,F5,00,00, A8, 62, 00 } ;;; $6FD2: Song data: Fh - Killed Metroid - tone/sweep channel, Fh - Killed Metroid - tone channel - instructions ;;; { ROM4:6FD2 dx F1,A7,35,80, AB, 32, 40, 36, 44, 3A, 48, 3C, 4A, 40, 4E, 44, 52, 48, 54, 4A, 58, 4E, 5C, 52, 60, 54, 62, 58, 66, 5C, 6A, 60, 6C, 62, 70, 00 } ;;; $6FD6: Song data: 1Fh - Metroid hive with intro - tone/sweep channel, 1Fh - Metroid hive with intro - tone channel - instructions ;;; { ROM4:6FD6 dx AB, 32, 40, 36, 44, 3A, 48, 3C, 4A, 40, 4E, 44, 52, 48, 54, 4A, 58, 4E, 5C, 52, 60, 54, 62, 58, 66, 5C, 6A, 60, 6C, 62, 70, 00 } ;;; $6FF6: Song data: Fh - Killed Metroid - tone/sweep channel, Fh - Killed Metroid - tone channel - instructions ;;; { ROM4:6FF6 dx F1,C7,00,80, A0, 52, 01, A5, 54, 00 } ;;; $7000: Song data: Fh - Killed Metroid - wave channel - instructions ;;; { ROM4:7000 dx F1,416B,20, A3, 01, A1, 01, F4,04, A0, 02, 03, F5, A1, 01, A4, 01, F1,416B,60, AB, 32, 40, 36, 44, 3A, 48, 3C, 4A, 40, 4E, 44, 52, 48, 54, 4A, 58, 4E, 5C, 52, 60, 54, 62, 58, 66, 5C, 6A, 60, 6C, 62, 70, A0, 52, 03, A3, 54, 03, 00 } ;;; $7432: Song data: 12h - Samus fanfare - tone channel - instruction pointer list ;;; { ROM4:7432 dw 743E, 0000 } ;;; $7436: Song data: 12h - Samus fanfare - wave channel - instruction pointer list ;;; { ROM4:7436 dw 7462, 0000 } ;;; $743A: Song data: 12h - Samus fanfare - noise channel - instruction pointer list ;;; { ROM4:743A dw 747A, 0000 } ;;; $743E: Song data: 12h - Samus fanfare - tone channel - instructions ;;; { ROM4:743E dx F1,0B,00,40, A7, 10, 03, A1, 01, F1,09,00,40, A6, 28, A1, 03, A6, 40, A1, 03, A6, 3E, A1, 03, A0, 01, A6, 36, A2, 03, A4, 3A, A5, 03, 00 } ;;; $7462: Song data: 12h - Samus fanfare - wave channel - instructions ;;; { ROM4:7462 dx F1,417B,40, A8, 01, A2, 01, A7, 62, A2, 03, A7, 66, A2, 03, A1, 01, 01, A4, 5C, A2, 03, 00 } ;;; $747A: Song data: 12h - Samus fanfare - noise channel - instructions ;;; { ROM4:747A dx A7, 48, 74, 48, A6, 5C, 54, 4C, 50, A2, 58, A3, 68, AC, 6C, 00 } } ;;; $748A: Song data: 13h - Reach the gunship ;;; { ;;; $748A: Song data header: 13h - Reach the gunship ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:748A dx 00,40F9,7495,74B3,74C9,74DD } ;;; $7495: Song data: 13h - Reach the gunship - tone/sweep channel - instruction pointer list ;;; { ROM4:7495 dw 74F1, 79CB, 74F9, 76BA, 74FE, 7523, 758C, 75C5, 75C5, 75C5, 75C5, 75EA, 7613, 762C, 0000 } ;;; $74B3: Song data: 13h - Reach the gunship - tone channel - instruction pointer list ;;; { ROM4:74B3 dw 76AE, 79CB, 76B6, 7745, 7759, 77BE, 7819, 785B, 7891, 78E6, 0000 } ;;; $74C9: Song data: 13h - Reach the gunship - wave channel - instruction pointer list ;;; { ROM4:74C9 dw 79A3, 7A0D, 7A56, 7A6B, 7A81, 7A8C, 7A95, 7A9E, 7AAB, 0000 } ;;; $74DD: Song data: 13h - Reach the gunship - noise channel - instruction pointer list ;;; { ROM4:74DD dw 7B1E, 7B4B, 7B75, 7B8D, 7BAE, 7BC4, 7BDA, 7BEC, 7BFE, 0000 } } ;;; $61D4: Song data: 14h - Chozo ruins, same as 3 ;;; { ;;; $61D4: Song data header: 14h - Chozo ruins, same as 3 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:61D4 dx 01,40DF,61DF,61F5,6207,0000 } ;;; $0: Song data: 14h - Chozo ruins, same as 3 - noise channel - instruction pointer list ;;; { } ;;; $61DF: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instruction pointer list ;;; { ROM4:61DF dw 6219, 624C, 6264, 6297, 6219, 629D, 624C, 6264, 62A3, 00F0,61DF } ;;; $61F5: Song data: 14h - Chozo ruins, same as 3 - tone channel - instruction pointer list ;;; { ROM4:61F5 dw 62F6, 6328, 6349, 62F6, 6328, 6349, 637A, 00F0,61F5 } ;;; $6207: Song data: 14h - Chozo ruins, same as 3 - wave channel - instruction pointer list ;;; { ROM4:6207 dw 63DF, 6412, 6435, 63DF, 6412, 6435, 6467, 00F0,6207 } ;;; $6219: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instructions ;;; { ROM4:6219 dx F1,50,00,80, A3, 01, A2, 32, 05, 30, 05, 2E, 05, A3, 26, 05, 28, 05, A2, 28, 05, 26, 05, 20, 05, A1, 30, 05, 32, 05, 48, 05, 4A, 05, 18, 05, 1A, 05, A3, 30, 05, A1, 32, 05, 38, 05, 3A, 05, 01, 01, 00 } ;;; $624C: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instructions ;;; { ROM4:624C dx A2, 20, 05, 26, 05, A7, 2C, 26, A3, 1A, A2, 1C, 01, F4,02, A1, 18, 1A, 18, 1A, F5, A4, 01, 00 } ;;; $6264: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instructions ;;; { ROM4:6264 dx A3, 3A, 03, A1, 32, 03, 34, 03, A2, 2C, 03, 3A, 03, A1, 32, 03, 48, 03, A2, 24, 03, 30, 03, A1, 28, 03, 2E, 03, 30, 03, 26, 03, A2, 24, 03, 2C, 03, 28, 03, A6, 26, 03, A3, 22, 03, A7, 1E, 05, A5, 01, 00 } ;;; $6297: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instructions ;;; { ROM4:6297 dx F3,FE, F2,40EC, 00 } ;;; $629D: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instructions ;;; { ROM4:629D dx F3,00, F2,40DF, 00 } ;;; $62A3: Song data: 14h - Chozo ruins, same as 3 - tone/sweep channel - instructions ;;; { ROM4:62A3 dx F1,62,00,40, F4,02, A1, 0C, 16, 0C, 16, 10, 18, 10, 18, 0C, 14, 0C, 14, 10, 08, 10, 08, 10, 08, 0C, 04, 0C, 04, 0C, 04, F5, F1,62,00,00, A1, 3C, 46, 3C, 46, 40, 48, 40, 48, 3C, 44, 3C, 44, 40, 38, 40, 38, 40, 38, 3C, 34, 3C, 34, 3C, 34, 3A, 2E, 36, 2A, 30, 24, 2C, 20, 1A, 18, 12, 02, F1,87,00,40, A5, 62, 01, A3, 01, 00 } ;;; $62F6: Song data: 14h - Chozo ruins, same as 3 - tone channel - instructions ;;; { ROM4:62F6 dx F1,50,00,80, A2, 30, 32, 40, 05, 38, 05, 3A, 05, A3, 30, 05, 32, 05, A2, 28, 05, 26, 05, 20, 05, A1, 30, 05, 32, 05, 48, 05, 4A, 05, 18, 05, 1A, 05, A3, 30, 05, A1, 32, 05, 38, 05, 3A, A6, 05, 00 } ;;; $6328: Song data: 14h - Chozo ruins, same as 3 - tone channel - instructions ;;; { ROM4:6328 dx A2, 32, 05, 36, 05, A1, 3C, 05, 3A, 05, 32, 05, A2, 36, 05, 01, 26, 05, 28, 05, 01, A1, 26, 05, 20, 05, 22, 03, A2, 1A, A7, 05, 00 } ;;; $6349: Song data: 14h - Chozo ruins, same as 3 - tone channel - instructions ;;; { ROM4:6349 dx A2, 40, A7, 05, A1, 38, 05, 3A, 05, A2, 32, 05, A2, 40, 05, A1, 38, 05, 3A, 05, A2, 32, 05, 28, 05, A2, 2E, 05, A4, 01, A2, 2C, 05, 28, 05, A2, 2E, A3, 05, A2, 2A, A7, 05, A7, 2C, 05, A5, 01, 00 } ;;; $637A: Song data: 14h - Chozo ruins, same as 3 - tone channel - instructions ;;; { ROM4:637A dx F1,62,00,80, A1, 0C, 16, 0C, 16, 10, 18, 10, 18, 0C, 14, 0C, 14, 10, 08, 10, 08, 10, 08, 0C, 04, 0C, 04, 0C, 04, A1, 2C, 32, 2C, 32, 30, 38, 30, 38, 2C, 34, 2C, 34, 30, 2C, 30, 2C, 1A, 3C, 40, 46, 4A, 4E, 54, 58, A1, 2C, 32, 2C, 32, 30, 38, 30, 38, 2C, 34, 2C, 34, 30, 2C, 30, 2C, 34, 32, 3C, 46, 40, 32, 2A, 1E, 1C, 1A, 18, 16, 14, 12, 10, 0E, 0C, 0A, 08, 0A, F1,87,00,40, A5, 62, 01, A3, 01, 00 } ;;; $63DF: Song data: 14h - Chozo ruins, same as 3 - wave channel - instructions ;;; { ROM4:63DF dx F1,417B,40, A3, 01, A2, 32, 03, 30, 03, 2E, 03, A3, 26, 03, 28, 03, A2, 28, 03, 26, 03, 20, 03, A1, 30, 03, 32, 03, 48, 03, 4A, 03, 18, 03, 1A, 03, A3, 30, 03, A1, 32, 03, 38, 03, 3A, 03, 01, 01, 00 } ;;; $6412: Song data: 14h - Chozo ruins, same as 3 - wave channel - instructions ;;; { ROM4:6412 dx A2, 32, 03, 36, 03, A1, 3C, 03, 3A, 03, 32, 03, A3, 36, A2, 03, 26, 03, A3, 28, A2, 03, A1, 26, 03, 20, 03, 22, 03, A2, 1A, 03, A3, 01, 00 } ;;; $6435: Song data: 14h - Chozo ruins, same as 3 - wave channel - instructions ;;; { ROM4:6435 dx A3, 40, A2, 03, 01, A1, 38, 03, 3A, 03, A2, 32, A1, 03, 01, A2, 40, 03, A1, 38, 03, 3A, 03, A2, 32, 03, 28, 03, A7, 2E, 03, A2, 2C, 03, 28, 03, A6, 2E, 03, A3, 2A, 03, A3, 2C, 03, A5, 01, A3, 01, 00 } ;;; $6467: Song data: 14h - Chozo ruins, same as 3 - wave channel - instructions ;;; { ROM4:6467 dx A8, 01, 01, A0, 2C, 03, 32, 03, 2C, 03, 32, 03, 30, 03, 38, 03, 30, 03, 38, 03, 2C, 03, 34, 03, 2C, 03, 34, 03, 30, 03, 2C, 03, 30, 03, 2C, 03, 1A, 03, 3C, 03, 40, 03, 46, 03, 4A, 03, 4E, 03, 54, 03, 58, 03, A0, 2C, 03, 32, 03, 2C, 03, 32, 03, 30, 03, 38, 03, 30, 03, 38, 03, 2C, 03, 34, 03, 2C, 03, 34, 03, 30, 03, 2C, 03, 30, 03, 2C, 03, 34, 03, 32, 03, 3C, 03, 46, 03, 40, 03, 32, 03, 2A, 03, 1E, 03, 1C, 03, 1A, 03, 18, 03, 16, 03, 14, 03, 12, 03, 10, 03, 0E, 03, 0C, 03, 0A, 03, 08, 03, 0A, 03, A6, 62, 03, A7, 01, A8, 01, 01, 00 } } ;;; $7C3A: Song data: 15h - Main caves, no intro ;;; { ;;; $7C3A: Song data header: 15h - Main caves, no intro ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7C3A dx 00,40C5,64FA,651E,652A,6536 } ;;; $64FA: Song data: 15h - Main caves, no intro - tone/sweep channel - instruction pointer list ;;; { ROM4:64FA dw 6672, ROM4:64FC dw 659C, 659C, 65EB, 65EB, 65EB, 65EB, 6550, 659C, 659C, 6600, 6600, 6600, 6600, 6550, 00F0,64FC } ;;; $651E: Song data: 15h - Main caves, no intro - tone channel - instruction pointer list ;;; { ROM4:651E dw 6623, ROM4:6520 dw 6631, 6672, 00F0,6520 } ;;; $652A: Song data: 15h - Main caves, no intro - wave channel - instruction pointer list ;;; { ROM4:652A dw 66AC, 66DB, 676A, 00F0,652A } ;;; $6536: Song data: 15h - Main caves, no intro - noise channel - instruction pointer list ;;; { ROM4:6536 dw 67C9, 67ED, 6803, 6828, 00F0,6536 } ;;; $74F1: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:74F1 dx F1,60,00,09, A5, 01, 01, 00 } ;;; $74F9: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:74F9 dx F1,B0,00,49, 00 } ;;; $74FE: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:74FE dx F1,52,00,40, F4,02, A1, 4A, 54, 58, 62, F5, F4,02, A1, 3C, 4A, 4E, 54, F5, F4,02, A1, 4A, 54, 58, 62, F5, F4,02, A1, 3C, 4A, 4E, 54, F5, 00 } ;;; $7523: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:7523 dx F1,51,00,40, F4,02, A1, 4A, 54, 58, 62, F5, F4,02, A1, 3C, 4A, 4E, 54, F5, F4,02, A1, 4A, 52, 54, 62, F5, F4,02, A1, 4E, 52, 54, 66, F5, F4,02, A1, 4A, 54, 58, 62, F5, F4,02, A1, 3C, 4A, 4E, 54, F5, F4,02, A1, 40, 4A, 4E, 58, F5, F4,02, A1, 3C, 4A, 4E, 54, F5, F4,02, A1, 4A, 52, 54, 62, 4A, 52, 54, 62, 3C, 4A, 4E, 54, 3C, 4A, 4E, 54, 4A, 52, 54, 62, 4A, 52, 54, 62, 4E, 52, 54, 66, 4E, 52, 54, 66, F5, 00 } ;;; $758C: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:758C dx F1,81,00,00, F4,03, A1, 4A, 52, 54, 62, 4A, 52, 54, 62, 46, 52, 54, 5E, 46, 52, 54, 5E, F5, F4,02, A1, 3C, 4A, 4E, 54, F5, F4,02, A1, 46, 52, 54, 5E, F5, F4,02, A1, 44, 52, 54, 5C, F5, F4,02, A1, 40, 4A, 4E, 52, F5, 00 } ;;; $75C5: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:75C5 dx F1,61,00,40, F4,02, A1, 3C, 4A, 4E, 54, F5, F4,02, A1, 46, 52, 54, 5E, F5, F4,02, A1, 44, 52, 54, 5C, F5, F4,02, A1, 40, 4A, 4E, 52, F5, 00 } ;;; $75EA: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:75EA dx F1,43,00,80, F4,04, A1, 3C, 44, 4E, 54, 3C, 44, 4E, 54, 46, 52, 54, 5E, 46, 52, 54, 5E, 44, 52, 54, 5C, 44, 52, 54, 5C, 40, 4A, 4E, 52, 40, 4A, 4E, 52, F5, 00 } ;;; $7613: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:7613 dx F1,72,00,00, F4,04, A1, 4A, 52, 54, 62, 4A, 52, 54, 62, 46, 52, 54, 5E, 46, 52, 54, 5E, F5, 00 } ;;; $762C: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:762C dx F1,82,00,00, A1, 4A, 52, 54, 62, 4A, 52, 54, 62, 3C, 4A, 4E, 54, 3C, 4A, 4E, 54, 4A, 52, 54, 62, 4A, 52, 54, 62, 4E, 52, 54, 66, 4E, 52, 54, 66, F1,A2,00,00, F4,05, A1, 4A, 52, 54, 4A, 4A, 52, 54, 4A, 3C, 4A, 4E, 54, 3C, 4A, 4E, 54, F5, F1,C3,00,00, A1, 4A, 52, 54, 62, 4A, 52, 54, 62, 3C, 4A, 4E, 54, 3C, 4A, 4E, 54, F1,D4,00,00, A2, 4A, A1, 03, A2, 48, A1, 03, 4A, 03, F2,4106, A4, 54, F1,09,00,00, A2, 52, 03, F1,D5,00,40, A1, 4A, 03, A0, 4A, 03, 4A, 03, AB, 32, 40, F1,C7,00,00, A5, 62, 00 } ;;; $76AE: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:76AE dx F1,60,00,00, A5, 01, 01, 00 } ;;; $76B6: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:76B6 dx F1,B0,00,00, A3, 52, A2, 03, A0, 54, 03, 52, 03, A1, 4E, A2, 03, A1, 4A, A2, 03, A1, 46, 03, A2, 4A, 03, 3C, 03, A3, 54, A2, 03, A0, 52, 03, 4E, 03, A3, 52, A2, 03, A1, 4E, 03, A2, 4E, 03, 44, 03, A3, 4A, A2, 03, A0, 48, 03, 44, 03, A3, 48, 03, A3, 52, A2, 03, A0, 54, 03, 52, 03, A1, 4E, A2, 03, A1, 4A, A2, 03, A1, 46, 03, A3, 4A, A2, 03, A0, 4E, 03, 52, 03, A3, 54, A2, 03, A0, 58, 03, 54, 03, A3, 52, A2, 03, A1, 4E, 03, A2, 4E, 03, 44, 03, A3, 4A, A2, 03, A0, 48, 03, 4A, 03, A2, 4E, 03, 44, 03, A3, 4A, A2, 03, A0, 48, 03, 44, 03, A3, 48, A2, 03, A1, 58, 03, 00 } ;;; $76BA: Song data: 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:76BA dx A3, 52, A2, 03, A0, 54, 03, 52, 03, A1, 4E, A2, 03, A1, 4A, A2, 03, A1, 46, 03, A2, 4A, 03, 3C, 03, A3, 54, A2, 03, A0, 52, 03, 4E, 03, A3, 52, A2, 03, A1, 4E, 03, A2, 4E, 03, 44, 03, A3, 4A, A2, 03, A0, 48, 03, 44, 03, A3, 48, 03, A3, 52, A2, 03, A0, 54, 03, 52, 03, A1, 4E, A2, 03, A1, 4A, A2, 03, A1, 46, 03, A3, 4A, A2, 03, A0, 4E, 03, 52, 03, A3, 54, A2, 03, A0, 58, 03, 54, 03, A3, 52, A2, 03, A1, 4E, 03, A2, 4E, 03, 44, 03, A3, 4A, A2, 03, A0, 48, 03, 4A, 03, A2, 4E, 03, 44, 03, A3, 4A, A2, 03, A0, 48, 03, 44, 03, A3, 48, A2, 03, A1, 58, 03, 00 } ;;; $7745: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:7745 dx F1,A0,00,00, A7, 62, A4, 03, A1, 40, 03, A7, 62, 03, A1, 1A, 03, 01, 01, 00 } ;;; $7759: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:7759 dx F1,C0,00,40, A3, 4A, A2, 03, A1, 4A, 03, A2, 46, A1, 03, A2, 44, A1, 03, A0, 40, 03, 3C, 03, A3, 40, A8, 03, A3, 3A, A2, 03, A1, 40, 03, A2, 3C, A1, 03, A2, 3A, A1, 03, A0, 36, 03, 32, 03, A3, 36, A8, 03, A3, 40, A2, 03, A1, 4A, 03, A2, 46, A1, 03, A2, 44, A1, 03, A0, 40, 03, 3C, 03, A3, 40, A8, 03, A3, 40, A2, 03, A1, 4A, 03, A2, 3C, A1, 03, A2, 40, A1, 03, A0, 44, 03, 3C, 03, A3, 40, A8, 03, 00 } ;;; $77BE: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:77BE dx F1,B0,00,40, A3, 52, A2, 03, A0, 4E, 03, 52, 03, A3, 54, A2, 03, A0, 52, 03, 4E, 03, A3, 52, A2, 03, A0, 4E, 03, 52, 03, A3, 54, A2, 03, A0, 52, 03, 54, 03, A3, 58, A2, 03, A0, 54, 03, 52, 03, A3, 54, A2, 03, A0, 52, 03, 4E, 03, A6, 4A, 03, A0, 4E, 03, 52, 03, A6, 4E, 03, A0, 4A, 03, 46, 03, A6, 4A, 03, A0, 46, 03, 44, 03, A6, 46, 03, A0, 44, 03, 40, 03, 00 } ;;; $7819: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:7819 dx F1,D0,00,00, F4,02, A2, 4A, 03, 58, 03, A3, 54, A2, 03, A1, 4A, 03, A3, 4A, A2, 03, A0, 46, 03, 44, 03, A3, 46, A2, 03, A1, 4E, 03, A2, 4A, 03, 58, 03, A3, 54, A2, 03, A1, 4A, 03, A3, 4A, A2, 03, A0, 46, 03, 44, 03, A3, 46, A2, 03, A0, 44, 03, 40, 03, F5, 00 } ;;; $785B: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:785B dx F1,A0,00,80, F4,02, A3, 62, A4, 03, A2, 01, A1, 66, 03, A6, 62, 03, A0, 5E, 03, 5C, 03, A6, 5E, 03, A1, 5C, 03, A6, 5C, A4, 03, A6, 01, A1, 5E, 03, A2, 54, A3, 03, A1, 58, 03, A2, 5C, A3, 03, A1, 5E, 03, F5, 00 } ;;; $7891: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:7891 dx F1,D0,00,00, A3, 3A, A2, 03, A0, 3C, 03, 3A, 03, A2, 36, A1, 03, A2, 32, A1, 03, A1, 2E, 03, A3, 40, A2, 03, A0, 44, 03, 40, 03, A2, 3C, A1, 03, A2, 3A, A1, 03, A1, 36, 03, A3, 3A, A2, 03, A0, 3C, 03, 3A, 03, A2, 36, A1, 03, A2, 3A, A1, 03, A1, 3C, 03, A3, 40, A2, 03, A0, 44, 03, 40, 03, A2, 3C, A1, 03, A2, 40, A1, 03, A1, 44, 03, 00 } ;;; $78E6: Song data: 13h - Reach the gunship - tone channel - instructions ;;; { ROM4:78E6 dx F1,B0,00,40, A3, 40, A2, 03, A1, 4A, 03, A2, 44, A1, 03, A2, 40, A1, 03, A1, 3C, 03, A3, 40, A2, 03, A1, 4A, 03, A2, 44, A1, 03, A2, 4A, A1, 03, A1, 54, 03, A3, 40, A2, 03, A1, 4A, 03, A2, 44, A1, 03, A2, 40, A1, 03, A1, 3C, 03, A3, 40, A2, 03, A1, 4A, 03, A2, 44, A1, 03, A2, 4A, A1, 03, A1, 54, 03, A3, 52, A2, 03, A1, 58, 03, A2, 54, A1, 03, A2, 52, A1, 03, 4A, 03, A3, 52, A2, 03, A1, 58, 03, A2, 54, A1, 03, A2, 5C, A1, 03, 62, 03, A3, 52, A2, 03, A1, 58, 03, A2, 54, A1, 03, A2, 52, A1, 03, 4A, 03, F1,D0,00,00, A2, 3C, A1, 03, A2, 3A, A1, 03, 32, 03, A2, 54, A1, 03, A2, 52, A1, 03, 4A, 03, A1, 54, A2, 03, A1, 52, A2, 03, A1, 54, 03, F1,D0,00,00, A7, 32, A2, 03, A2, 32, 03, A1, 1A, 03, A0, 1A, 03, 1A, 03, AB, 02, 10, A2, 1A, A5, 05, 00 } ;;; $79A3: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:79A3 dx F1,416B,40, F4,02, A0, 1A, 03, 20, 03, 24, 03, 2E, 03, 1A, 03, 20, 03, 2C, 03, 20, 03, 1A, 03, 20, 03, 24, 03, 2E, 03, 1A, 03, 20, 03, 24, 03, 32, 03, F5, A0, 1A, 03, 20, 03, 24, 03, 2E, 03, 1A, 03, 20, 03, 24, 03, 32, 03, 1A, 03, 20, 03, 24, 03, 38, 03, 1A, 03, 20, 03, 24, 03, 2E, 03, 1A, 03, 20, 03, 24, 03, 28, 03, 1A, 03, 20, 03, 24, 03, 2C, 03, 1A, 03, 20, 03, 24, 03, 32, 03, 32, 03, 38, 03, 3C, 03, 58, 03, 00 } ;;; $79CB: Song data: 13h - Reach the gunship - tone channel, 13h - Reach the gunship - tone/sweep channel - instructions ;;; { ROM4:79CB dx A0, 1A, 03, 20, 03, 24, 03, 2E, 03, 1A, 03, 20, 03, 24, 03, 32, 03, 1A, 03, 20, 03, 24, 03, 38, 03, 1A, 03, 20, 03, 24, 03, 2E, 03, 1A, 03, 20, 03, 24, 03, 28, 03, 1A, 03, 20, 03, 24, 03, 2C, 03, 1A, 03, 20, 03, 24, 03, 32, 03, 32, 03, 38, 03, 3C, 03, 58, 03, 00 } ;;; $7A0D: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A0D dx F1,417B,40, A4, 62, A7, 5E, A2, 03, A7, 5C, A2, 03, A7, 5A, A2, 03, A7, 58, A2, 03, A7, 56, A2, 03, A7, 54, A2, 03, A7, 58, A2, 03, A7, 4A, A2, 03, A7, 46, A2, 03, A7, 44, A2, 03, A7, 42, A2, 03, A4, 40, A7, 3E, A2, 03, A7, 3C, A2, 03, A7, 3E, A2, 03, A7, 40, A2, 03, A7, 28, A2, 03, 00 } ;;; $7A56: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A56 dx F1,416B,40, F4,07, A1, 1A, 03, A0, 1A, 03, 1A, 03, F5, A1, 28, 03, 01, 01, 00 } ;;; $7A6B: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A6B dx F1,417B,40, A4, 32, 24, 22, 1E, 1A, 24, 28, 24, F4,02, A4, 1A, 24, 22, 1E, F5, 00 } ;;; $7A81: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A81 dx F4,03, A4, 32, 2E, F5, 24, 2E, 2C, 28, 00 } ;;; $7A8C: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A8C dx F4,04, A4, 24, 2E, 2C, 28, F5, 00 } ;;; $7A95: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A95 dx F4,04, A4, 24, 2E, 2C, 28, F5, 00 } ;;; $7A9E: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7A9E dx F4,02, A4, 32, 2E, F5, F4,02, A4, 1A, 16, F5, 00 } ;;; $7AAB: Song data: 13h - Reach the gunship - wave channel - instructions ;;; { ROM4:7AAB dx A4, 1A, 24, 22, 1E, 1A, 24, 32, 3C, F1,416B,40, F4,02, A2, 32, A1, 03, A2, 30, A1, 03, 28, 03, A2, 3C, A1, 03, A2, 3A, A1, 03, 32, 03, F5, A2, 4A, A1, 03, A2, 48, A1, 03, 40, 03, A2, 54, A1, 03, A2, 52, A1, 03, 4A, 03, A2, 4A, A1, 03, A2, 48, A1, 03, 40, 03, A2, 54, A1, 03, A2, 52, A1, 03, 4A, 03, A2, 62, A1, 03, A2, 60, A1, 03, 62, A0, 03, 01, A7, 58, A2, 03, A2, 40, 03, F1,416B,20, A1, 28, 03, A0, 28, 03, 28, 03, AB, 02, 10, A2, 28, A3, 03, 00 } ;;; $7B1E: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7B1E dx F4,02, A2, 10, 0C, 10, 0C, 10, 0C, 0C, A1, 1C, 14, F5, F4,03, A1, 10, 14, 0C, 04, F5, 14, 0C, 1C, 1C, F4,02, 10, 1C, 0C, 04, F5, 1C, 1C, 1C, 1C, A2, 68, A0, 1C, 1C, 1C, 1C, 00 } ;;; $7B4B: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7B4B dx A5, 6C, 01, 01, A8, 01, A3, 68, A3, 6C, 50, 54, 58, A3, 54, A4, 5C, A3, 64, 60, 58, A4, 54, A3, 50, 4C, 54, 50, F4,04, A1, 4C, 64, F5, A1, 14, 14, 14, 14, A3, 6C, 00 } ;;; $7B75: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7B75 dx F4,03, A1, 1C, 0C, 14, 14, F5, A2, 68, A1, 1C, 0C, F4,03, A1, 1C, 08, 14, 14, F5, A3, 6C, 00 } ;;; $7B8D: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7B8D dx F4,07, A1, 14, 0C, 10, 10, 14, 08, 10, 10, 14, 04, 10, 10, 14, 0C, 14, 04, F5, F4,03, A1, 14, 08, 10, 10, F5, 1C, 14, 1C, 14, 00 } ;;; $7BAE: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7BAE dx F4,11, A1, 1C, 0C, 08, 0C, F5, F4,02, A1, 1C, 0C, 1C, 0C, F5, A1, 1C, 14, 1C, 0C, 00 } ;;; $7BC4: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7BC4 dx F4,0F, A1, 1C, 10, 08, 10, 1C, 0C, 10, 08, F5, A1, 1C, 14, 08, 14, 1C, 14, 1C, 14, 00 } ;;; $7BDA: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7BDA dx F4,1E, A1, 14, 0C, 08, 0C, F5, A1, 1C, 14, 08, 14, 1C, 14, 1C, 14, 00 } ;;; $7BEC: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7BEC dx F4,0E, A1, 14, 10, 0C, 10, F5, A1, 1C, 14, 08, 14, 1C, 14, 1C, 14, 00 } ;;; $7BFE: Song data: 13h - Reach the gunship - noise channel - instructions ;;; { ROM4:7BFE dx F4,08, A1, 14, 10, 08, 10, F5, F4,04, A1, 14, 0C, 14, 10, F5, F4,08, A1, 14, 14, 08, 14, F5, F4,04, A1, 14, 14, 14, 14, F5, F4,08, A1, 1C, 1C, 1C, 1C, F5, A6, 1C, 1C, A2, 1C, A4, 1C, A3, 1C, A2, 1C, A1, 1C, 1C, AB, 1C, 1C, A5, 1C, 00 } } ;;; $7C45: Song data: 16h - Sub caves 1, no intro ;;; { ;;; $7C45: Song data header: 16h - Sub caves 1, no intro ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7C45 dx 00,40F9,686E,0000,0000,0000 } ;;; $0: Song data: 16h - Sub caves 1, no intro - noise channel - instruction pointer list ;;; { } ;;; $686E: Song data: 16h - Sub caves 1, no intro - tone/sweep channel - instruction pointer list ;;; { ROM4:686E dw 6880, 00F0,686E } } ;;; $7C50: Song data: 17h - Sub caves 2, no intro ;;; { ;;; $7C50: Song data header: 17h - Sub caves 2, no intro ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7C50 dx 00,40F9,0000,6901,0000,0000 } ;;; $0: Song data: 17h - Sub caves 2, no intro - noise channel - instruction pointer list ;;; { } ;;; $6901: Song data: 17h - Sub caves 2, no intro - tone channel - instruction pointer list ;;; { ROM4:6901 dw 6911, 00F0,6901 } } ;;; $7C5B: Song data: 18h - Sub caves 3, no intro ;;; { ;;; $7C5B: Song data header: 18h - Sub caves 3, no intro ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7C5B dx 00,40DF,6997,699F,69A7,0000 } ;;; $0: Song data: 18h - Sub caves 3, no intro - noise channel - instruction pointer list ;;; { } ;;; $6997: Song data: 18h - Sub caves 3, no intro - tone/sweep channel - instruction pointer list ;;; { ROM4:6997 dw 69B1, 00F0,6997 } ;;; $699F: Song data: 18h - Sub caves 3, no intro - tone channel - instruction pointer list ;;; { ROM4:699F dw 69E2, 00F0,699F } ;;; $69A7: Song data: 18h - Sub caves 3, no intro - wave channel - instruction pointer list ;;; { ROM4:69A7 dw 6A92, 00F0,69A7 } } ;;; $6AE2: Song data: 19h - Final caves, same as 8 ;;; { ;;; $6AE2: Song data header: 19h - Final caves, same as 8 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6AE2 dx 01,40B8,6AED,6AF3,6AF9,6AFF } ;;; $6AED: Song data: 19h - Final caves, same as 8 - tone/sweep channel - instruction pointer list ;;; { ROM4:6AED dw 6B05, 00F0,6AED } ;;; $6AF3: Song data: 19h - Final caves, same as 8 - tone channel - instruction pointer list ;;; { ROM4:6AF3 dw 6B15, 00F0,6AF3 } ;;; $6AF9: Song data: 19h - Final caves, same as 8 - wave channel - instruction pointer list ;;; { ROM4:6AF9 dw 6B25, 00F0,6AF9 } ;;; $6AFF: Song data: 19h - Final caves, same as 8 - noise channel - instruction pointer list ;;; { ROM4:6AFF dw 6BBA, 00F0,6AFF } ;;; $6B05: Song data: 19h - Final caves, same as 8 - tone/sweep channel - instructions ;;; { ROM4:6B05 dx F1,C3,00,00, A3, 1A, 03, A7, 1A, 03, 03, AC, 05, 01, 01, 00 } ;;; $6B15: Song data: 19h - Final caves, same as 8 - tone channel - instructions ;;; { ROM4:6B15 dx F1,C4,00,0A, A3, 02, 03, A7, 02, 03, 03, AC, 05, 01, 01, 00 } ;;; $6B25: Song data: 19h - Final caves, same as 8 - wave channel - instructions ;;; { ROM4:6B25 dx F1,417B,44, F4,05, AC, 01, 01, A1, 01, A5, 01, A1, 22, 03, 24, 03, 30, 03, 2E, 03, A4, 2C, 03, 01, 40, A3, 03, 01, A1, 20, 03, 2C, 03, A4, 34, A3, 03, 01, A1, 32, 03, 30, 03, A5, 24, 03, 01, AC, 01, A1, 20, 03, 22, 03, 1A, 03, 2E, 03, 2C, 03, A4, 26, 03, 01, 01, A2, 1E, 03, 20, 03, 28, 03, A7, 18, 03, A1, 1C, 03, A8, 10, 03, 14, 03, 0C, 03, A1, 02, 03, 0E, 03, 18, 03, 1A, 03, 24, 03, A7, 30, 03, 2E, 03, A8, 32, 03, A7, 40, 03, 42, 03, 3A, 03, 3C, 03, 38, 03, 40, 03, 30, 03, A4, 28, 03, A8, 2A, 03, 01, A1, 28, 03, 26, 03, 1A, 03, 14, 03, 0E, 03, A4, 1A, 03, F5, F4,08, AC, 01, F5, 00 } ;;; $6BBA: Song data: 19h - Final caves, same as 8 - noise channel - instructions ;;; { ROM4:6BBA dx A4, 74, A2, 01, A7, 78, A2, 01, 00 } } ;;; $6BC3: Song data: 1Ah - Metroid hive, same as 9 ;;; { ;;; $6BC3: Song data header: 1Ah - Metroid hive, same as 9 ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6BC3 dx FE,40DF,0000,6BE0,6BF4,6BFA } ;;; $0: Song data: 1Ah - Metroid hive, same as 9 - tone/sweep channel - instruction pointer list ;;; { } ;;; $6BE0: Song data: 1Ah - Metroid hive, same as 9 - tone channel - instruction pointer list ;;; { ROM4:6BE0 dw 6C5A, 6C04, 6C04, 6C5F, 6C04, 6C5F, 6C5F, 6C04, 00F0,6BE0 } ;;; $6BF4: Song data: 1Ah - Metroid hive, same as 9 - wave channel - instruction pointer list ;;; { ROM4:6BF4 dw 6C65, 00F0,6BF4 } ;;; $6BFA: Song data: 1Ah - Metroid hive, same as 9 - noise channel - instruction pointer list ;;; { ROM4:6BFA dw 6C85, 00F0,6BFA } ;;; $6C04: Song data: 1Ah - Metroid hive, same as 9 - tone channel - instructions ;;; { ROM4:6C04 dx F4,02, A9, 78, 05, 03, 68, 05, 03, 6C, 05, 03, 64, 05, 03, 68, 05, 03, 70, 05, 03, F5, F4,02, 74, 05, 03, 68, 05, 03, 6C, 05, 03, 64, 05, 03, 68, 05, 03, 60, 05, 03, F5, F4,02, 70, 05, 03, 60, 05, 03, 64, 05, 03, 6C, 05, 03, 70, 05, 03, 78, 05, 03, F5, F4,02, 6C, 05, 03, 60, 05, 03, 64, 05, 03, 5C, 05, 03, 60, 05, 03, 68, 05, 03, F5, 00 } ;;; $6C5A: Song data: 1Ah - Metroid hive, same as 9 - tone channel - instructions ;;; { ROM4:6C5A dx F1,61,00,40, 00 } ;;; $6C5F: Song data: 1Ah - Metroid hive, same as 9 - tone channel - instructions ;;; { ROM4:6C5F dx F4,06, A5, 01, F5, 00 } ;;; $6C65: Song data: 1Ah - Metroid hive, same as 9 - wave channel - instructions ;;; { ROM4:6C65 dx F1,417B,40, F4,0A, A5, 18, A7, 24, A5, 20, 14, 0C, A7, 1C, A5, 14, 0C, 1A, F5, A8, 18, A5, 16, A4, 14, A5, 12, 24, 14, 00 } ;;; $6C85: Song data: 1Ah - Metroid hive, same as 9 - noise channel - instructions ;;; { ROM4:6C85 dx A6, 74, A0, 01, A6, 78, A1, 01, 00 } } ;;; $6C8E: Song data: 1Bh - Item-get, same as Ah ;;; { ;;; $6C8E: Song data header: 1Bh - Item-get, same as Ah ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6C8E dx 0B,40C5,6C99,6C9D,6CA1,6CA5 } ;;; $6C99: Song data: 1Bh - Item-get, same as Ah - tone/sweep channel - instruction pointer list ;;; { ROM4:6C99 dw 6CA9, 0000 } ;;; $6C9D: Song data: 1Bh - Item-get, same as Ah - tone channel - instruction pointer list ;;; { ROM4:6C9D dw 6CEE, 0000 } ;;; $6CA1: Song data: 1Bh - Item-get, same as Ah - wave channel - instruction pointer list ;;; { ROM4:6CA1 dw 6D1D, 0000 } ;;; $6CA5: Song data: 1Bh - Item-get, same as Ah - noise channel - instruction pointer list ;;; { ROM4:6CA5 dw 6D46, 0000 } ;;; $6CA9: Song data: 1Bh - Item-get, same as Ah - tone/sweep channel - instructions ;;; { ROM4:6CA9 dx F1,A1,00,00, A1, 74, 76, 74, 76, F1,80,00,80, A2, 32, A7, 03, A2, 2C, A7, 03, A2, 28, 03, 22, 03, 1A, 03, 22, 03, 36, 03, 2E, 03, 28, A6, 03, A6, 20, 03, F1,0D,00,80, A7, 22, A3, 03, F1,81,00,00, F4,04, A1, 7A, 82, F5, F1,41,00,00, F4,06, A1, 7A, 82, F5, 00 } ;;; $6CEE: Song data: 1Bh - Item-get, same as Ah - tone channel - instructions ;;; { ROM4:6CEE dx F1,F0,00,80, AB, 01, A3, 01, A2, 3C, 03, 46, 03, 4A, 03, 4E, 03, 52, 03, 4A, 03, 40, 03, 4A, 03, 54, 03, 4E, 03, 46, A6, 03, 40, 03, F1,0B,00,80, A7, 44, F1,B6,00,80, A5, 44, 00 } ;;; $6D1D: Song data: 1Bh - Item-get, same as Ah - wave channel - instructions ;;; { ROM4:6D1D dx F1,4123,20, A3, 01, A2, 54, 05, 5E, 05, 62, 05, 66, 05, 6A, 05, 62, 05, 58, 05, 62, 05, 6C, 05, 66, 05, 5E, A6, 05, A2, 58, A6, 05, 03, A4, 5C, A3, 05, 03, 00 } ;;; $6D46: Song data: 1Bh - Item-get, same as Ah - noise channel - instructions ;;; { ROM4:6D46 dx A7, 68, A5, 6C, 01, 01, A7, 68, AC, 6C, 00 } } ;;; $6D51: Song data: 1Ch - Metroid Queen hallway, same as Bh ;;; { ;;; $6D51: Song data header: 1Ch - Metroid Queen hallway, same as Bh ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6D51 dx 01,40D2,6D5C,6D5C,6D64,6D6A } ;;; $6D5C: Song data: 1Ch - Metroid Queen hallway, same as Bh - tone channel - instruction pointer list ;;; { ROM4:6D5C dw 6D70, ROM4:6D5E dw 6D7B, 00F0,6D5E } ;;; $6D64: Song data: 1Ch - Metroid Queen hallway, same as Bh - wave channel - instruction pointer list ;;; { ROM4:6D64 dw 6D77, 00F0,6D64 } ;;; $6D6A: Song data: 1Ch - Metroid Queen hallway, same as Bh - noise channel - instruction pointer list ;;; { ROM4:6D6A dw 6D82, 00F0,6D6A } ;;; $6D70: Song data: 1Ch - Metroid Queen hallway, same as Bh - tone channel - instructions ;;; { ROM4:6D70 dx F1,90,00,40, A0, 01, 00 } ;;; $6D77: Song data: 1Ch - Metroid Queen hallway, same as Bh - wave channel - instructions ;;; { ROM4:6D77 dx F1,416B,40, F4,03, A3, 14, 03, F5, 00 } ;;; $6D7B: Song data: 1Ch - Metroid Queen hallway, same as Bh - tone channel - instructions ;;; { ROM4:6D7B dx F4,03, A3, 14, 03, F5, 00 } ;;; $6D82: Song data: 1Ch - Metroid Queen hallway, same as Bh - noise channel - instructions ;;; { ROM4:6D82 dx A6, 74, A0, 01, A6, 78, A1, 01, 00 } } ;;; $6D8B: Song data: 1Dh - Metroid battle, same as Ch ;;; { ;;; $6D8B: Song data header: 1Dh - Metroid battle, same as Ch ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:6D8B dx 00,40C5,6D96,6DA0,6DA8,6DB0 } ;;; $6D96: Song data: 1Dh - Metroid battle, same as Ch - tone/sweep channel - instruction pointer list ;;; { ROM4:6D96 dw 6DB8, 7D7E, ROM4:6D9A dw 6DC6, 00F0,6D9A } ;;; $6DA0: Song data: 1Dh - Metroid battle, same as Ch - tone channel - instruction pointer list ;;; { ROM4:6DA0 dw 6E0D, ROM4:6DA2 dw 6E29, 00F0,6DA2 } ;;; $6DA8: Song data: 1Dh - Metroid battle, same as Ch - wave channel - instruction pointer list ;;; { ROM4:6DA8 dw 6E68, ROM4:6DAA dw 6E77, 00F0,6DAA } ;;; $6DB0: Song data: 1Dh - Metroid battle, same as Ch - noise channel - instruction pointer list ;;; { ROM4:6DB0 dw 6EA3, ROM4:6DB2 dw 6EB2, 00F0,6DB2 } ;;; $6DB8: Song data: 1Dh - Metroid battle, same as Ch - tone/sweep channel - instructions ;;; { ROM4:6DB8 dx F1,A0,17,06, A5, 0E, A2, 34, 38, 42, 4A, 56, 5E, 00 } ;;; $6DC6: Song data: 1Dh - Metroid battle, same as Ch - tone/sweep channel - instructions ;;; { ROM4:6DC6 dx F1,87,7F,00, A2, 1A, 01, 1C, 01, 1E, 01, 20, 01, 22, 01, 24, F1,67,34,00, A1, 28, F4,03, A2, 32, 01, 36, 01, 30, 01, 2E, 01, F5, F1,83,00,00, A1, 4A, 60, 4A, 60, A3, 4A, A1, 4A, 60, 4A, F1,D1,00,08, A3, 58, A1, 01, F1,67,77,00, A2, 22, 01, 20, 01, 1E, 01, 1C, 01, 00 } ;;; $6E0D: Song data: 1Dh - Metroid battle, same as Ch - tone channel - instructions ;;; { ROM4:6E0D dx F1,A5,00,00, A1, 36, 1E, 42, 2A, A4, 4E, A1, 7E, 7C, 7E, 7C, F1,85,00,08, A2, 62, 60, 5E, 5C, 56, 4C, 00 } ;;; $6E29: Song data: 1Dh - Metroid battle, same as Ch - tone channel - instructions ;;; { ROM4:6E29 dx F1,83,00,00, A2, 30, 24, 2C, 24, 26, 24, 28, 24, 30, 24, 2C, A1, 26, F4,03, A2, 30, 24, 2C, 24, 26, 24, 28, 24, F5, A1, 5A, 56, 5A, 56, A3, 5A, A1, 5A, 56, 5A, F1,D1,00,08, A3, 5A, A1, 01, F1,A1,00,00, A2, 30, 24, 2C, 24, 26, 24, 28, 24, 00 } ;;; $6E68: Song data: 1Dh - Metroid battle, same as Ch - wave channel - instructions ;;; { ROM4:6E68 dx F1,416B,40, A1, 4E, 1E, 5A, 2A, A7, 66, 03, A8, 01, 00 } ;;; $6E77: Song data: 1Dh - Metroid battle, same as Ch - wave channel - instructions ;;; { ROM4:6E77 dx F1,418B,47, A3, 2C, 2C, 2C, 2C, 2A, A2, 28, A1, 01, F4,03, A3, 2E, 2C, 2E, 2C, F5, F1,417B,47, A1, 7C, 86, 8A, 8E, A3, 56, A1, 8A, 82, 7C, 82, A3, 4E, A4, 2A, 2A, 00 } ;;; $6EA3: Song data: 1Dh - Metroid battle, same as Ch - noise channel - instructions ;;; { ROM4:6EA3 dx A1, 1C, 18, 1C, 18, A8, 1C, A2, 10, 14, 18, 18, 1C, 1C, 00 } ;;; $6EB2: Song data: 1Dh - Metroid battle, same as Ch - noise channel - instructions ;;; { ROM4:6EB2 dx A3, 14, 14, 14, 14, 14, A2, 01, A1, 10, F4,06, A3, 14, 14, F5, A1, 14, 14, 14, 14, A3, 1C, A1, 14, A7, 48, A1, 14, A3, 14, 14, 14, 14, 00 } } ;;; $7C66: Song data: 1Eh - Sub caves 4, no intro ;;; { ;;; $7C66: Song data header: 1Eh - Sub caves 4, no intro ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7C66 dx 00,40C5,0000,6EE8,0000,0000 } ;;; $0: Song data: 1Eh - Sub caves 4, no intro - noise channel - instruction pointer list ;;; { } ;;; $6EE8: Song data: 1Eh - Sub caves 4, no intro - tone channel - instruction pointer list ;;; { ROM4:6EE8 dw 6EF6, 00F0,6EE8 } } ;;; $7C71: Song data: 1Fh - Metroid hive with intro ;;; { ;;; $7C71: Song data header: 1Fh - Metroid hive with intro ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7C71 dx 01,40B8,7C7C,7C8A,7C96,7C9E } ;;; $7C7C: Song data: 1Fh - Metroid hive with intro - tone/sweep channel - instruction pointer list ;;; { ROM4:7C7C dw 7CA6, 7D7E, 7CAD, 6FD6, 7CB8, 00F0,6BCE } ;;; $7C8A: Song data: 1Fh - Metroid hive with intro - tone channel - instruction pointer list ;;; { ROM4:7C8A dw 7CBF, 7CCB, 6FD6, 7CD6, 00F0,6BE0 } ;;; $7C96: Song data: 1Fh - Metroid hive with intro - wave channel - instruction pointer list ;;; { ROM4:7C96 dw 7CDD, 7CEB, 00F0,6BF4 } ;;; $7C9E: Song data: 1Fh - Metroid hive with intro - noise channel - instruction pointer list ;;; { ROM4:7C9E dw 7CF9, 7D01, 00F0,6BFA } ;;; $7CA6: Song data: 1Fh - Metroid hive with intro - tone/sweep channel - instructions ;;; { ROM4:7CA6 dx F1,87,17,06, A5, 0E, 00 } ;;; $7CAD: Song data: 1Fh - Metroid hive with intro - tone/sweep channel - instructions ;;; { ROM4:7CAD dx F1,0D,00,00, A5, 62, F1,C7,35,00, 00 } ;;; $7CB8: Song data: 1Fh - Metroid hive with intro - tone/sweep channel - instructions ;;; { ROM4:7CB8 dx F1,F5,00,40, A5, 6C, 00 } ;;; $7CBF: Song data: 1Fh - Metroid hive with intro - tone channel - instructions ;;; { ROM4:7CBF dx F1,87,00,00, A1, 36, 1E, 42, 2A, A8, 4E, 00 } ;;; $7CCB: Song data: 1Fh - Metroid hive with intro - tone channel - instructions ;;; { ROM4:7CCB dx F1,0D,00,00, A5, 60, F1,C7,00,08, 00 } ;;; $7CD6: Song data: 1Fh - Metroid hive with intro - tone channel - instructions ;;; { ROM4:7CD6 dx F1,F5,00,40, A5, 6A, 00 } ;;; $7CDD: Song data: 1Fh - Metroid hive with intro - wave channel - instructions ;;; { ROM4:7CDD dx F1,417B,40, A1, 4E, 1E, 5A, 2A, A3, 66, 03, 01, 00 } ;;; $7CEB: Song data: 1Fh - Metroid hive with intro - wave channel - instructions ;;; { ROM4:7CEB dx F1,416B,40, A1, 02, 03, F4,0A, A2, 02, 03, F5, 00 } ;;; $7CF9: Song data: 1Fh - Metroid hive with intro - noise channel - instructions ;;; { ROM4:7CF9 dx A1, 1C, 18, 1C, 18, A8, 1C, 00 } ;;; $7D01: Song data: 1Fh - Metroid hive with intro - noise channel - instructions ;;; { ROM4:7D01 dx A5, 01, 01, A4, 01, A2, 01, 00 } } ;;; $7D09: Song data: 20h - Missile pickup ;;; { ;;; $7D09: Song data header: 20h - Missile pickup ;;; { ; __________________________ Music note offset, tone channel frequency tweak ; | _______________________ $CF01 ; | | __________________ $CF38 - Song tone/sweep channel section pointer ; | | | _____________ $CF41 - Song tone channel section pointer ; | | | | ________ $CF4A - Song wave channel section pointer ; | | | | | ___ $CF53 - Song noise channel section pointer ; | | | | | | ROM4:7D09 dx 01,40DF,7D14,7D14,7D18,7D1C } ;;; $7D14: Song data: 20h - Missile pickup - tone channel - instruction pointer list ;;; { ROM4:7D14 dw 7D20, 0000 } ;;; $7D18: Song data: 20h - Missile pickup - wave channel - instruction pointer list ;;; { ROM4:7D18 dw 7D2F, 0000 } ;;; $7D1C: Song data: 20h - Missile pickup - noise channel - instruction pointer list ;;; { ROM4:7D1C dw 7D3C, 0000 } ;;; $7D20: Song data: 20h - Missile pickup - tone channel - instructions ;;; { ROM4:7D20 dx F1,F2,00,80, A1, 28, 2C, 2E, F1,F5,00,80, A8, 3C, 00 } ;;; $7D2F: Song data: 20h - Missile pickup - wave channel - instructions ;;; { ROM4:7D2F dx F1,417B,40, A1, 46, 03, 4A, A2, 32, 05, 03, 00 } ;;; $7D3C: Song data: 20h - Missile pickup - noise channel - instructions ;;; { ROM4:7D3C dx A1, 14, 14, 14, 1C, 00 } } ;;; $7D42..7E2A: Song data - instructions lists ;;; { ;;; $7D42: Song data: 1 - Baby Metroid - tone/sweep channel, 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:7D42 dx F1,15,00,40, 00 } ;;; $7D47: Song data: 1 - Baby Metroid - tone/sweep channel, 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:7D47 dx F1,35,00,40, 00 } ;;; $7D4C: Song data: 1 - Baby Metroid - tone/sweep channel, 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:7D4C dx F1,65,00,40, 00 } ;;; $7D5B: Song data: 1 - Baby Metroid - wave channel - instructions ;;; { ROM4:7D5B dx F1,417B,60, 00 } ;;; $7D6A: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D6A dx F2,409E, 00 } ;;; $7D6E: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D6E dx F2,40AB, 00 } ;;; $7D72: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D72 dx F2,40B8, 00 } ;;; $7D76: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D76 dx F2,40C5, 00 } ;;; $7D7A: Song data: 11h - Title - tone/sweep channel, Fh - Killed Metroid - tone channel, Fh - Killed Metroid - tone/sweep channel, 2 - Metroid Queen battle - tone/sweep channel, 11h - Title - tone channel - instructions ;;; { ROM4:7D7A dx F2,40D2, 00 } ;;; $7D7E: Song data: 11h - Title - tone/sweep channel, 1Fh - Metroid hive with intro - tone/sweep channel, Ch - Metroid battle - tone/sweep channel, 7 - Sub caves 3 - tone/sweep channel, Dh - Sub caves 4 - tone/sweep channel, 2 - Metroid Queen battle - tone/sweep channel, 11h - Title - tone channel, 1Dh - Metroid battle, same as Ch - tone/sweep channel - instructions ;;; { ROM4:7D7E dx F2,40DF, 00 } ;;; $7D82: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D82 dx F2,40EC, 00 } ;;; $7D86: Song data: 2 - Metroid Queen battle - tone/sweep channel, 5 - Sub caves 1 - tone/sweep channel - instructions ;;; { ROM4:7D86 dx F2,40F9, 00 } ;;; $7D8A: Song data: 6 - Sub caves 2 - tone/sweep channel - instructions ;;; { ROM4:7D8A dx F2,4106, 00 } ;;; $7D8E: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D8E dx F3,00, 00 } ;;; $7D91: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D91 dx F3,02, 00 } ;;; $7D94: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D94 dx F3,04, 00 } ;;; $7D97: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D97 dx F3,08, 00 } ;;; $7D9A: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D9A dx F3,0C, 00 } ;;; $7D9D: Song data: 2 - Metroid Queen battle - tone/sweep channel - instructions ;;; { ROM4:7D9D dx F3,10, 00 } ;;; $7DA0: Song data: 5 - Sub caves 1 - tone/sweep channel, Dh - Sub caves 4 - tone/sweep channel, 7 - Sub caves 3 - tone/sweep channel, 6 - Sub caves 2 - tone/sweep channel - instructions ;;; { ROM4:7DA0 dx F1,A4,00,40, A2, 32, 03, 32, 03, F1,84,00,40, A3, 32, F1,64,00,40, A3, 32, F1,44,00,40, A3, 32, F1,24,00,40, A3, 32, F1,14,00,40, A8, 32, A5, 01, 00 } ;;; $7DCA: Song data: 7 - Sub caves 3 - tone channel, Dh - Sub caves 4 - tone channel, 5 - Sub caves 1 - tone channel, 6 - Sub caves 2 - tone channel - instructions ;;; { ROM4:7DCA dx F1,B3,00,40, A2, 0C, 03, 0C, 03, F1,93,00,40, A3, 0C, F1,73,00,40, A3, 0C, F1,53,00,40, A3, 0C, F1,33,00,40, A3, 0C, F1,23,00,40, A8, 0C, A5, 01, 00 } ;;; $7DF4: Song data: 7 - Sub caves 3 - wave channel, 6 - Sub caves 2 - wave channel, 5 - Sub caves 1 - wave channel, Dh - Sub caves 4 - wave channel - instructions ;;; { ROM4:7DF4 dx F1,417B,40, F4,02, A2, 32, 03, F5, A8, 01, 01, A5, 01, 00 } ;;; $7E04: Song data: Dh - Sub caves 4 - noise channel, 5 - Sub caves 1 - noise channel, 6 - Sub caves 2 - noise channel, 7 - Sub caves 3 - noise channel - instructions ;;; { ROM4:7E04 dx A5, 01, 01, 01, 00 } ;;; $7E09: Song data: 1 - Baby Metroid - tone/sweep channel, 11h - Title - tone/sweep channel, 1 - Baby Metroid - tone channel, 11h - Title - tone channel - instructions ;;; { ROM4:7E09 dx F1,11,00,00, A4, 01, 00 } ;;; $7E10: Song data: 1 - Baby Metroid - wave channel, 11h - Title - wave channel - instructions ;;; { ROM4:7E10 dx F1,416B,60, A4, 01, 00 } ;;; $7E17: Song data: 11h - Title - noise channel, 1 - Baby Metroid - noise channel - instructions ;;; { ROM4:7E17 dx A4, 01, 00 } ;;; $7E1A: Song data: 1 - Baby Metroid - tone/sweep channel, 1 - Baby Metroid - tone channel - instructions ;;; { ROM4:7E1A dx F1,11,00,00, A5, 01, 00 } ;;; $7E21: Song data: 1 - Baby Metroid - wave channel - instructions ;;; { ROM4:7E21 dx F1,416B,60, A5, 01, 00 } ;;; $7E28: Song data: 1 - Baby Metroid - noise channel - instructions ;;; { ROM4:7E28 dx A5, 01, 00 } } } ;;; $7E2B: Free space ;;; { ROM4:7E2B fillto $5:4000, $00 }