lorom c2 = $a4 b1 = $a3 A1 = $a2 a1 = $a1 G1 = $a0 g1 = $9f F1 = $9e f1 = $9d e1 = $9c D1 = $9b d1 = $9a C1 = $99 c1 = $98 b0 = $97 A0 = $96 a0 = $95 G0 = $94 g0 = $93 F0 = $92 f0 = $91 e0 = $90 D0 = $8f d0 = $8e C0 = $8d c0 = $8c h = $C8 w = $C9 ; org $8FE82C !currenttrackindex = $0F org $8FE7E1+!currenttrackindex ; DL NONE ; DL TITLE_SCREEN ; DL EMPTY_CRATERIA ; DL SPACE_PIRATE ; DL SAMUS_THEME DL GREEN_BRINSTAR ; DL Music ;Adds new pointer to end of song data table, index is 4B, overwrites start of debug room header. org $8FE82C DL NewSongMusic ;Adds a new pointer to end of original song data pointer table org $838968 ;Custom code to run for Crateria Mainstreet to Energy Tank Slope door. ;You can use the last two bytes of any door definition in SMILE DW RoomTransitionCode ;Call the code to load new music org $8FE9A0 ;Free space for the custom room transition code RoomTransitionCode: LDA #$FF0F ;Load green brinstar instruments (which I replaced) JSL $808FC1 ; LDA #$FF4B ;Load 4B song data ; JSL $808FC1 LDA #$0005 ;Load song track 5 (First track from song data) JSL $808FC1 RTS org $D3933C ;instrument sample pointers (29933C) GREEN_BRINSTAR: DW $0040, $6D60 DW inststart,inst2start-153 ;18 DW inst2start,inst3start-153 ;19 DW inst3start,inst4start;-153 ;1A DW inst4start,inst5start-153 ;1B DW inst5start,inst6start-153 ;1C DW inst6start,inst7start-153 ;1D DW inst7start,inst8start-153 ;1E DW inst8start,inst9start ;1F DW inst9start,inst10start ;20 DW inst9start,inst10start ;21 DW inst10start,instend ;22 DW $FFFF, $FFFF DW $FFFF, $FFFF DW $FFFF, $FFFF DW $FFFF, $FFFF DW $FFFF, $FFFF print pc DW instend-inststart, $B516 ;brr encoded Sample data 299384 - 29DDED base $00B516 inststart: incbin 1_kick.bin ;18 inst2start: incbin 2_kick.bin ;19 inst3start: incbin 3_snare.bin ;1A inst4start: incbin 4_sweep.bin ;1B inst5start: incbin 5_XylophonesynthC.bin ;1C inst6start: incbin 6_Hat.bin ;1D inst7start: incbin 7_hat2.bin ;1E inst8start: incbin 8_snare2.bin ;1F inst9start: ;incbin 9_lowstring.bin ;20 incbin 11_voice.bin inst10start: incbin 10_noise.bin instend: ;brr_encoder.exe -rb1.5 input.wav output.bin ;6 byte ADSR settings ; D3DDEE (29DDEE): DW $0054, $6C90 ;instrument definitions, so I do not need anything else DB $18 : DB %10011111 : DB %00000000 : DB %10101010 : DB $05, $20 DB $19 : DB %10011111 : DB %00000000 : DB %10101010 : DB $05, $20 DB $1A : DB %10011111 : DB %00000000 : DB %10101010 : DB $0A, $40 DB $1B : DB %10001110 : DB %00000000 : DB %10101010 : DB $05, $20 DB $1C : DB %10001110 : DB %11101101 : DB %10101010 : DB $05, $20 ;DW $FF1B, $B8E0 DB $1D : DB %10001110 : DB %00000000 : DB %10101010 : DB $05, $20 DB $1E : DB %10001110 : DB %00000000 : DB %10101010 : DB $05, $20 DB $1F : DB %10101111 : DB %00000001 : DB %10101010 : DB $05, $20 DB $20 : DB %10001111 : DB %00000011 : DB %11111111 : DB $0A, $40 ; DW $8320, $B8F4 DB $21 : DB %10011111 : DB %00000001 : DB %11110010 : DB $0A, $40 ; DW $F321, $B8F2, $2005 ;20 DB $22 : DB %11011111 : DB %00000000 : DB %10101010 : DB $05, $20 DB $23 : DB %10001110 : DB %00000000 : DB %10101010 : DB $05, $20 DB $24 : DB %10001110 : DB %00000000 : DB %10101010 : DB $05, $20 DB $25 : DB %10001110 : DB %00000000 : DB %10101010 : DB $05, $20 ;Note Sound Length and volume percents ; DW $0018, $5800 ; DW $6532, $987F, $CBB2, $FCE5 ;sound length ; DW $3219, $654C, $7F72, $988C, $B2A5, $CBBF, $E5D8, $FCF2 ;volume percents ; DW $0000 ;end of music data, aka JUST CRASH EVERYTHING!! base off ;org $DED1C0 ;Free space at end of the rom, with the rest of music data. NewSongMusic: DW DataEnd-DataStart,$5828 ;Block transfer data. 5828 is the first track pointer used for ;music data (track 05), and the music data just follows it. base $005828 ;This is a useful xkas command so that all my pointers will be right ;when the music is moved from ROM into the SPC DataStart: DW chozo1 chozo1: DW chozo1pattern,$00FF,chozo1 chozo1pattern: DW KICK1 DW KICK2 DW SNARE1 DW MELODY1 ; DW $0000 ; DW $0000 ; DW $0000 ; DW $0000 ; DW $0000 DW MELODY2 DW NOISE DW $0000 DW $0000 !notelength = $7F0B KICK1: DB $E7,$2C ;Song speed: 20. Default DB $E5,$FF ;Song volume: FF ;DB $E4 ;DB $F5, %10111110, $D0, $D0 ;set echo on channels 3, 4 and 5 ;DB $F7, $AA, $4E, $FF DB $E0,$18 ;Instrument: kick DB $E1,$0A ;Panning: Somewhat right ; DB $ED,$A0 ;Slightly lower channel volume DW !notelength ;Note length 24, sound length 8/8, volume percent 8/8 DB $EF : DW C1C1Loop1 : DB $08 ;Play the first song loop twice DB $00 ;This section of the song is done. Tell the conductor to go on to the next. ;Of course, in this case, the conductor just tells everyone to loop to their ;starts. C1C1Loop1: DB $98,$C8,$C9,$98 : DB $C8,$C9,$C9,$C9 : DB $C9,$C9,$98,$C8 : DB $C9,$98,$C8,$C9 DB $98,$C8,$98,$C8 : DB $C9,$C9,$C9,$C9 : DB $C9,$C9,$98,$C8 : DB $C9,$98,$C8,$C9 DB $00 ;Loop / Return from loop KICK2: ; DB $E5,$FF ;Song volume: FF DB $E0,$19 ;Instrument: kick DB $E1,$0A ;Panning: Somewhat right DB $ED,$C0 ;Slightly lower channel volume DW !notelength ;Note length 24, sound length 8/8, volume percent 8/8 DB $EF : DW C1C2Loop1 : DB $10 ;Play the first song loop twice DB $00 ;This section of the song is done. Tell the conductor to go on to the next. ; Of course, in this case, the conductor just tells everyone to loop to their ; starts. C1C2Loop1: DB $98,$C9,$98,$C9 : DB $C9,$C9,$C9,$C9 : DB $C9,$C9,$98,$C9 : DB $C9,$C9,$C9,$C9 DB $00 ;Loop / Return from loop SNARE1: ; DB $F6 ;Disable echo. DB $E0,$1A ;Instrument: snare DW !notelength ;Note length 24, sound length 8/8, volume percent 8/8 DB $EF : DW C1C3Loop1 : DB $08 ;Play the first song loop twice DB $00 ;This section of the song is done. Tell the conductor to go on to the next. ; Of course, in this case, the conductor just tells everyone to loop to their ; starts. C1C3Loop1: DB $C9,$C9,$c9,$C9 DB $E0,$1A : DB $98,$C9 DB $E0,$1F : DB $98,$C8 DB $E0,$1E : DB $98,$C9,$C9,$C9 DB $E0,$1A : DB $98,$C8,$C8,$C9 DB $E0,$1E : DB $98,$C9,$C9,$C9 DB $E0,$1A : DB $98,$C8,$C8,$C9 DB $E0,$1E : DB $98,$C9,$C9,$C9 DB $E0,$1A : DB $98,$C8,$C8,$C9 DB $00 ;Loop / Return from loop MELODY1: DB $E0,$20 ;Instrument: string DB $F5, $FF, $FF, $FF ;set echo on channels 3, 4 and 5 DB $F7, $1A, $6E, $99 ; DB $EA,$12 DB $E1,$0A ;Panning: Somewhat right DB $ED,$A0 ;Slightly lower channel volume DW !notelength ;Note length 24, sound length 8/8, volume percent 8/8 DB $EF : DW C1C4Loop1 : DB $02 ;Play the first song loop twice DB $00 ;This section of the song is done. Tell the conductor to go on to the next. ;Of course, in this case, the conductor just tells everyone to loop to their ;starts. C1C4Loop1: DB g0, h, h, h : DB h, h, c1, h : DB h, h, h, h : DB g1, h, h, h DB f1, h, D1, h : DB d1, h, D1, h : DB h, h, d1, h : DB h, h, c1, h DB A0, h, h, h : DB h, h, c1, h : DB h, h, h, h : DB g0, h, h, h DB h, h, h, h : DB h, h, h, h : DB h, h, h, h : DB h, h, w, w DB g0, h, h, h : DB h, h, c1, h : DB h, h, h, h : DB g1, h, h, h DB f1, h, D1, h : DB d1, h, D1, h : DB h, h, d1, h : DB h, h, c1, h DB A0, h, h, h : DB h, h, d1, h : DB h, h, h, h : DB c1, h, h, h DB h, h, h, h : DB h, h, h, h : DB h, h, h, h : DB h, h, w, w DB $00 ;Loop / Return from loop MELODY2: DB $E0,$1C ;Instrument: Xylophone ; DB $E1,$0A ;Panning: Somewhat right ;DB $F0,$DA DB $ED,$90 ;Slightly lower channel volume DW !notelength ;Note length 24, sound length 8/8, volume percent 8/8 DB $EF : DW C1C5Loop1 : DB $10 ;Play the first song loop twice DB $00 ;This section of the song is done. Tell the conductor to go on to the next. ;Of course, in this case, the conductor just tells everyone to loop to their ;starts. C1C5Loop1: DB g0, a0, g0, w : DB d1, w, w, f1 : DB w, D1, h, d1 : DB D1, d1, D1, w DB $00 ;Loop / Return from loop NOISE: DB $E0,$22 ; DB $E1,$0A ;Panning: Somewhat right DB $F0,$DA DB $ED,$D0 ;Slightly lower channel volume DW !notelength ;Note length 24, sound length 8/8, volume percent 8/8 DB $EF : DW C1C6Loop1C : DB $04 ;Play the first song loop twice DB $00 ;This section of the song is done. Tell the conductor to go on to the next. ;Of course, in this case, the conductor just tells everyone to loop to their ;starts. C1C6Loop1C: DB c1, h, c1, h : DB c1, h, c1, h : DB c1, h, c1, h : DB c1, h, c1, h DB c1, h, c1, h : DB c1, h, c1, h : DB c1, h, c1, h : DB c1, h, c1, h DB C1, h, C1, h : DB C1, h, C1, h : DB C1, h, C1, h : DB C1, h, C1, h DB b0, h, b0, h : DB b0, h, b0, h : DB b0, h, b0, h : DB b0, h, b0, h DB $00 ;Loop / Return from loop DataEnd: DW $0000 ;No more data to transfer. Stick in a 0000 to signify that.