/[projet1]/public/oric/games/Space 1999/Sources/game source/sound.s
Defence Force logotype

Contents of /public/oric/games/Space 1999/Sources/game source/sound.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 76 - (show annotations)
Tue May 26 07:45:25 2009 UTC (10 years, 6 months ago) by Chema
File size: 38679 byte(s)


1
2 ; Space1999 Music & SFX (All Code and Data)
3
4 ; Sound routines & data come after the game frame (frame.s), as specified in
5 ; osdk_config.bat. It is automatically added to the .bss section in the correct
6 ; addresses.
7 ; This file is also #included when compiling overlay data and generating the
8 ; game disk.
9
10 ;System Defines
11 #define sys_IRQJump $0244
12 #define sys_IRQVectorLo $0245
13 #define sys_IRQVectorHi $0246
14 ;Music Defines
15 #define pcr_Disabled $DD
16 #define pcr_Register $FF
17 #define pcr_Value $FD
18
19 #define via_portb $0300
20 #define via_t1cl $0304
21 #define via_pcr $030C
22 #define via_porta $030F
23 ;Effect Defines
24 #define NoteC 0
25 #define NoteD 2
26 #define NoteE 4
27 #define NoteF 5
28 #define NoteG 7
29 #define NoteA 9
30 #define NoteB 11
31
32 #define hEffectD 0
33 #define hEffectE 4
34 #define hEffectF 8
35 #define hEffectG 12
36 #define hEffectH 16
37 #define hEffectI 20
38 #define hEffectJ 24
39 #define hEffectK 28
40 #define hEffectL 32
41 #define hEffectM 36
42 #define hEffectN 40
43 #define hEffectO 44
44 #define hEffectP 48
45 #define hEffectQ 52
46 #define hEffectR 56
47 #define hEffectS 60
48 #define hEffectT 64
49 #define hEffectU 68
50 #define hEffectV 72
51
52 #define EG20 1
53 #define EG09 2
54 #define EG02 3
55 ;Missing DEC/INC Period and Noise
56 #define efx_End 0
57 #define efx_ToneOn 1
58 #define efx_ToneOff 2
59 #define efx_NoiseOn 3
60 #define efx_NoiseOff 4
61 #define efx_EnvelopeOn 5
62 #define efx_EnvelopeOff 6
63 #define efx_SetAbsoluteMode 7
64 #define efx_IncPitch 8
65 #define efx_DecPitch 40
66 #define efx_IncNote 72
67 #define efx_DecNote 104
68 #define efx_SetNoiseRandom 136
69 #define efx_IncVolume 137
70 #define efx_DecVolume 138
71 #define efx_SkipZeroVolume 139
72 #define efx_SkipZeroCount 140
73 #define efx_Volume 141
74 #define efx_SetEnvTriangle 157
75 #define efx_SetEnvSawtooth 158
76 #define efx_FilterFrequency 159
77 #define efx_LoopRow 163
78 #define efx_SetCounter 185
79 #define efx_Pause 205
80 #define efx_SkipZeroPitch 255
81
82
83 ;; OK Can't use automatic allocation, because this will be
84 ;; compiled outside the main project.
85 ;; We have to assign this by hand...
86
87 ; .zero
88 ;*=$00
89 ;;Music ZP Starts here..
90 ;irq_source .dsb 2
91 ;MusicTempoCount .dsb 1 ;Effect Tempo fixed at 100hz
92 ;PatternNotePeriod .dsb 3
93 ;irqTemp02 .dsb 1
94 ;irqTemp03 .dsb 1
95 ;irqTemp04 .dsb 1
96 ;;Effect ZP starts here..
97 ;EffectSource .dsb 2
98 ;EffectTemp01 .dsb 1
99 ;EffectTemp02 .dsb 1
100
101 ;Music ZP Starts here..
102 #define irq_source $f3
103 #define MusicTempoCount $f5 ;Effect Tempo fixed at 100hz
104 #define PatternNotePeriod $f6
105 #define irqTemp02 $f9
106 #define irqTemp03 $fa
107 #define irqTemp04 $fb
108 ;Effect ZP starts here..
109 #define EffectSource $fc
110 #define EffectTemp01 $fe
111 #define EffectTemp02 $ff
112
113
114 _Music_data_start
115 ;>>>> Call here
116 ;Load Accumulator with the following Bits before calling PlayAudio
117 ;Bit 0-1 Forms value 0-3
118 ; 0 Assign Music to Track specified in Data
119 ; 1 Assign Effect specified in Data to Channel A
120 ; 2 Assign Effect specified in Data to Channel B
121 ; 3 Assign Effect specified in Data to Channel C
122 ;Bit 2-6 Forms value 0-31
123 ; 0-31 Data
124 ;Bit 7-7 Forms value 0-1
125 ; 0 Stop Effect on specified Channel or Track
126 ; 1 Start Effect on specified Channel or Track
127 PlayAudio
128 sta paTemp01
129 and #03
130 beq ControlMusic
131 tax
132 lda paTemp01
133 lsr
134 lsr
135 cmp #32
136 and #31
137 bcc StopEffect
138 StartEffect
139 ;
140 tay
141 lda Channel_SFX_NoteHeaders,y
142 dex
143 sta EffectNote,x
144 sty EffectTemp02
145 jsr CalcAndStorePitch
146 ldy EffectTemp02
147 lda Channel_SFX_EffectAndEGHeaders,y ;0-1 EG / 2-6 Effect
148 lsr
149 lsr
150 sta EffectNumber,x
151 lda #00
152 sta EffectIndex,x
153 sta FilterIndex,x
154 ;Disable Sample and Ornaments on this channel
155 lda #128
156 sta SampleProperty,x
157 sta OrnamentProperty,x
158
159 lda Channel_SFX_EffectAndEGHeaders,y
160 and #03
161 .(
162 beq skip1 ;No EG Setting
163 tay
164 lda EGValue-1,y
165 sta AY_EGPeriodLo
166 skip1 rts
167 .)
168 StopEffect
169 lda #128
170 sta EffectNumber-1,x
171 lda #00
172 sta AY_Volume-1,x
173 rts
174
175 ControlMusic
176 ;Data holds index
177 lda paTemp01
178 lsr
179 lsr
180 and #31
181 tax
182 lda paTemp01
183 .(
184 bpl StopMusic
185 sei
186 sta TrackLoop ;Default Loop Off
187 ldy EventStart,x
188 sty EventIndex
189 lda TrackProperty,x ;B7==Loop B0-4==Music Tempo
190 bpl skip1
191 sty TrackLoop
192 skip1 and #63
193 STA MusicTempoCount
194 sta MusicTempoReference
195 lda EventEnd,x
196 sta EndEvent
197 lda TrackChannels,x
198 sta TracksChannelsUsed
199
200 ;Enable all channels
201 lda #%01111000
202 sta AY_Status
203
204 ;And start music
205 lda #00
206 sta MusicStatus
207 jsr ProcEvents
208 ldx #2
209 loop1 jsr ProcPattern
210 dex
211 bpl loop1
212 cli
213 rts
214 StopMusic
215 .)
216 lda #128
217 sta MusicStatus
218 ;Silence channels that the music used
219 ldx #02
220 .(
221 loop1 lda #128
222 sta SampleProperty,X
223 sta OrnamentProperty,X
224 lsr TracksChannelsUsed
225 bcc skip1
226 lda #00
227 sta AY_Volume,x
228 skip1 dex
229 bpl loop1
230 .)
231 rts
232
233 ;*********** Music Routines start here ******************
234
235 MaximumVolume
236 .byt 0 ;0(Loud)-15(Mute)
237
238 ProcMusic
239 dec MusicTempoCount
240 .(
241 bne skip4 ;28DA
242 lda MusicTempoReference
243 sta MusicTempoCount
244 lda MusicStatus
245 bmi SendAY ;28F7
246 skip1 ldx #2 ;Process Delays
247 loop2 ;Add Pattern Rest Check
248 lda PatternRest,x
249 bmi skip2
250 dec PatternNotePeriod,x
251 bne skip2 ;28C7
252 jsr ProcPattern
253 lda MusicStatus
254 bne skip3 ;28CA
255 skip2 dex
256 bpl loop2 ;28BB
257
258 skip3 lda MusicStatus
259 lsr
260 bcc skip4 ;28DA
261 asl
262 sta MusicStatus
263 jsr ProcEvents ;ProcEvents
264 jmp skip1
265 skip4 ldx #$02
266 loop3 lda SampleProperty,X
267 bmi skip5 ;28EC
268 jsr ProcSample ;ProcSample
269 skip5 lda OrnamentProperty,X
270 bmi skip6 ;28F4
271 jsr ProcOrnament ;Process Ornaments
272 skip6 dex
273 bpl loop3 ;28E4
274 .)
275
276
277 ControlMaximumVolume
278 ldx #02
279 .(
280 loop1 lda ReferenceBank+8,x
281 cmp RegisterBank+8,x
282 beq skip2
283 lda AY_Volume,x
284 sec
285 sbc MaximumVolume
286 bcs skip1
287 lda #00
288 skip1 sta AY_Volume,x
289 skip2 dex
290 bpl loop1
291 .)
292
293 ;Expand SendAY
294 ; 1)include EG
295 ; 2)Pitch Registers are indexed
296 ; 3)Reference Bank avoids sending same value twice
297 SendAY ldy #$0D
298 .(
299 loop1 ldx RegisterPointer,y
300 lda RegisterBank,x
301 cmp ReferenceBank,x
302 beq skip1
303 sta ReferenceBank,x
304 sty via_porta
305 ldx #pcr_Register
306 stx via_pcr
307 ldx #pcr_Disabled
308 stx via_pcr
309 sta via_porta
310 lda #pcr_Value
311 sta via_pcr
312 stx via_pcr
313 skip1 dey
314 bpl loop1
315 .)
316
317 rts
318
319 ProcPattern
320 LDA RuntimePatternBaseLo,X
321 STA irq_source
322 LDA RuntimePatternBaseHi,X
323 STA irq_source+1
324 LDY RuntimePatternIndex,X
325 LDA (irq_source),Y
326 PHP
327 AND #127
328 CMP #126
329
330 BCS mskip1 ; 2968
331 ADC RuntimePatternNoteOffset,X ;Note Offset
332 STA RuntimeNote,X
333 LDA #0
334 STA SampleIndex,x
335 STA OrnamentIndex,x
336 INY
337 LDA (irq_source),Y
338 LSR
339 LSR
340 LSR
341 LSR
342 STA OrnamentProperty,X ;Ornament Number
343 LDA (irq_source),Y
344 AND #$0F
345 PLP
346 BPL mskip2 ;295B
347 STA AY_Volume,X
348 LDA #$80
349 mskip2 STA SampleProperty,X
350 LDA #$01
351 Routine2960
352 STA PatternNotePeriod,X
353 INY
354 Routine2963
355 TYA
356 STA RuntimePatternIndex,X
357 RTS
358 mskip1
359 BNE mskip3 ; 2971
360 PLP
361 INY
362 LDA (irq_source),Y
363 JMP Routine2960
364 mskip3
365
366 PLP
367 LDA #$01
368 STA PatternNotePeriod,X
369 LDA MusicStatus
370 ORA #$01
371 STA MusicStatus
372 JMP Routine2963
373
374 ProcOrnament ;Ornament
375 ;A is Ornament Number
376 tay
377 lda OrnamentAddressTableLo,y
378 sta irq_source
379 lda OrnamentAddressTableHi,y
380 sta irq_source+1
381 mloop10 LDY OrnamentIndex,x
382 LDA (irq_source),Y
383 BEQ Routine29C7
384 cmp #03 ;$03 is flag to loop to start
385 bne mskip10
386 lda #00
387 sta OrnamentIndex,X
388 jmp mloop10
389 mskip10 LSR
390 BCS Routine29D7
391 LSR
392 BCS Routine29AA
393 ;Note?
394 ADC RuntimeNote,X
395 JMP Routine29B1
396 Routine29AA
397 STA irqTemp02
398 LDA RuntimeNote,X
399 SBC irqTemp02
400 Routine29B1
401 JSR Routine2AE2
402 ;Resultant pitch in A(Lo) and irq_source(Hi)
403 sta AY_PitchLo,x
404 lda irq_source
405 sta AY_PitchHi,x
406 Routine29B9
407 INY
408 TYA
409 STA OrnamentIndex,X
410 RTS
411 Routine29C7
412 CPY #$00
413 BNE Routine29D1
414 LDA RuntimeNote,X
415 JSR Routine29B1
416 Routine29D1
417 LDA #$80
418 STA OrnamentProperty,X
419 RTS
420 Routine29D7 ;Pitch
421 LSR
422 PHP
423 STA irqTemp04
424 LDA RuntimeNote,X
425 JSR Routine2AE2
426 PLP
427 BCS Routine29F0
428 ADC irqTemp04
429 sta AY_PitchLo,x
430 LDA irq_source
431 ADC #$00
432 sta AY_PitchHi,x
433 JMP Routine29B9
434 Routine29F0
435 SBC irqTemp04
436 sta AY_PitchLo,x
437 LDA irq_source
438 SBC #$00
439 sta AY_PitchHi,x
440 JMP Routine29B9
441
442 ProcSample ;Sample (A==SampleNum?)
443 tay
444 lda SampleAddressTableLo,y
445 sta irq_source
446 lda SampleAddressTableHi,y
447 sta irq_source+1
448 LDY SampleIndex,X
449 LDA (irq_source),Y
450 BEQ Routine2A55
451 PHA
452 AND #$0F
453 STA AY_Volume,X
454 PLA
455 LSR
456 LSR
457 LSR
458 AND #$1E
459 STA AY_Noise
460 BEQ Routine2A46
461 JSR Routine2A5B
462 EOR #$FF
463 AND AY_Status
464 JMP Routine2A4C
465 Routine2A46
466 JSR Routine2A5B
467 ORA AY_Status
468 Routine2A4C
469 STA AY_Status
470 INY
471 TYA
472 STA SampleIndex,X
473 RTS
474 Routine2A55
475 LDA #$80
476 STA SampleProperty,X
477 RTS
478 Routine2A5B
479 LDA #$04
480 STX irqTemp02
481 Routine2A5F
482 ASL
483 DEX
484 BPL Routine2A5F
485 LDX irqTemp02
486 RTS
487
488 ProcEvents
489 LDX #$02
490 LDA #$00
491 Routine2A6A
492 STA RuntimePatternIndex,X
493 DEX
494 BPL Routine2A6A
495 ; DEC EventRowRepeats
496 ; BMI Routine2A76
497 ; RTS
498 Routine2A76
499 LDX EventIndex
500 LDA Event_A_Pats,X
501 sta PatternRest
502 AND #$1F
503 TAY
504 LDA Table33A4,Y
505 STA RuntimePatternBaseLo
506 LDA Table33AC,Y
507 STA RuntimePatternBaseHi
508 LDA Event_A_NOFS,X
509 AND #$7F
510 STA RuntimePatternNoteOffset
511
512 LDA Event_B_Pats,X
513 sta PatternRest+1
514 AND #$1F
515 TAY
516 LDA Table33B4,Y
517 STA RuntimePatternBaseLo+1
518 LDA Table33BC,Y
519 STA RuntimePatternBaseHi+1
520 LDA Event_B_NOFS,X
521 AND #$7F
522 STA RuntimePatternNoteOffset+1
523
524 LDA Event_C_Pats,X
525 sta PatternRest+2
526 AND #$1F
527 TAY
528 LDA Table33C4,Y
529 STA RuntimePatternBaseLo+2
530 LDA Table33CC,Y
531 STA RuntimePatternBaseHi+2
532 LDA Event_C_NOFS,X
533 AND #$7F
534 STA RuntimePatternNoteOffset+2
535 INX
536 CPX EndEvent ;#$0B
537 BCC Routine2ADE
538 ;Handle Looping
539 lda TrackLoop
540 bmi mskip99
541 sta EventIndex
542 rts
543
544 mskip99 LDA MusicStatus
545 ORA #$80
546 STA MusicStatus
547 Routine2ADE
548 STX EventIndex
549 RTS
550 Routine2AE2
551 STX irqTemp02
552 LDX #$FF
553 SEC
554 SBC #$40
555 BCC Routine2B0B
556 Routine2AEB
557 INX
558 SBC #$0C
559 BCS Routine2AEB
560 STX irqTemp03
561 ADC #$0C
562 TAX
563 LDA BasePitchHi,X
564 STA irq_source
565 LDA BasePitchLo,X
566 LDX irqTemp03
567 BEQ Routine2B07
568 Routine2B01
569 LSR irq_source
570 ROR
571 DEX
572 BNE Routine2B01
573 Routine2B07
574 LDX irqTemp02
575 CLC
576 RTS
577 Routine2B0B
578 LDA #$00
579 STA irq_source
580 LDX irqTemp02
581 RTS
582
583 ;******************* Effect Code Starts here ************************
584
585 ProcEffect
586 ldx #02
587 .(
588 loop3 ldy EffectNumber,x
589 bmi skip2
590 lda PauseDelay,x
591 beq skip3
592 dec PauseDelay,x
593 jmp skip2
594
595 skip3 lda EffectBaseAddressLo,y
596 sta EffectSource
597 lda EffectBaseAddressHi,y
598 sta EffectSource+1
599 loop2 ldy EffectIndex,x
600 lda (EffectSource),y
601 ldy #24
602 loop1 cmp EffectCodeThreshhold,y
603 bcs skip1
604 dey
605 bpl loop1
606 skip1 sbc EffectCodeThreshhold,y
607 pha
608 lda EffectCodeVectorLo,y
609 sta vector1+1
610 lda EffectCodeVectorHi,y
611 sta vector1+2
612 pla
613 clc
614 vector1 jsr $dead
615 inc EffectIndex,x
616 bcs skip2
617 jmp loop2
618 skip2 dex
619 bpl loop3
620 .)
621 ;Now Process Effect Pitch
622 ldx #02
623 .(
624 loop1 ldy FilterIndex,x
625 beq skip3
626 lda EffectPitchLo,x
627 and FilterMask-1,y
628 sta AY_PitchLo,x
629 lda #00
630 sta AY_PitchHi,x
631 jmp skip1
632 ;Store Pitch
633 skip3 lda EffectPitchLo,x
634 sta AY_PitchLo,x
635 lda EffectPitchHi,x
636 sta AY_PitchHi,x
637 skip1 dex
638 bpl loop1
639 .)
640 rts
641
642 efxc_End ;00 000(1)
643 lda #128
644 sta EffectNumber,x
645 sec ;Wait indefinately
646 rts
647 efxc_ToneOn ;01 001(1)
648 lda AY_Status
649 and ToneMask,x
650 sta AY_Status
651 rts
652 efxc_ToneOff ;02 002(1)
653 lda AY_Status
654 ora ToneBit,x
655 sta AY_Status
656 rts
657 efxc_NoiseOn ;03 003(1)
658 lda AY_Status
659 and NoiseMask,x
660 sta AY_Status
661 rts
662 efxc_NoiseOff ;04 004(1)
663 lda AY_Status
664 ora NoiseBit,x
665 sta AY_Status
666 rts
667 efxc_EnvelopeOn ;05 005(1)
668 lda AY_Volume,x
669 ora #16
670 sta AY_Volume,x
671 rts
672 efxc_EnvelopeOff ;06 006(1)
673 lda AY_Volume,x
674 and #15
675 sta AY_Volume,x
676 rts
677 efxc_SetAbsoluteMode ;07 007(1)
678 lda #01
679 sta AbsoluteMode,x
680 rts
681 efxc_SetNoiseRandom
682 jsr getrand2
683 and #31
684 sta AY_Noise
685 rts
686 efxc_IncVolume ;13 137(1)
687 inc AY_Volume,x
688 rts
689 efxc_DecVolume ;14 138(1)
690 dec AY_Volume,x
691 rts
692 efxc_Volume ;17 141(16)
693 sta AY_Volume,x
694 rts
695 efxc_SetEnvTriangle ;18 157(1)
696 lda #10
697 sta AY_EGCycle
698 rts
699 efxc_SetEnvSawtooth ;19 158(1)
700 lda #12
701 sta AY_EGCycle
702 rts
703 efxc_SetCounter ;22 185(20)
704 sta EffectCounter,x
705 rts
706 efxc_Pause ;23 205(50)
707 sta PauseDelay,x
708 sec ;Wait on Pause
709 rts
710 efxc_IncPitch ;08 008(32)
711 sta PitchOffset
712 ;Inc Pitch Relative
713 lda EffectPitchLo,x
714 clc
715 adc PitchOffset
716 sta TempPitchLo
717 lda EffectPitchHi,x
718 adc #00
719 and #15
720 sta TempPitchHi
721 jmp efxc_PitchSort
722
723
724 efxc_DecPitch ;09 040(32)
725 sta PitchOffset
726 ;Inc Pitch Relative
727 lda EffectPitchLo,x
728 sec
729 sbc PitchOffset
730 sta TempPitchLo
731 lda EffectPitchHi,x
732 sbc #00
733 and #15
734 sta TempPitchHi
735 efxc_PitchSort
736 ;Support Relative & Absolute Modes
737 ldy AbsoluteMode,x
738 .(
739 beq skip1
740 lda TempPitchLo
741 sta EffectPitchLo,x
742 lda TempPitchHi
743 sta EffectPitchHi,x
744
745 skip1
746 .)
747 clc
748 rts
749
750
751 efxc_IncNote ;10 072(32)
752 sta NoteOffset
753 ;Inc Note Relative
754 lda EffectNote,x
755 clc
756 adc NoteOffset
757 ;Support Relative & Absolute Modes
758 ldy AbsoluteMode,x
759 .(
760 beq skip1
761 sta EffectNote,x
762 skip1 jmp CalcAndStorePitch ;Store also to EffectPitchLo and Hi
763 .)
764
765 efxc_DecNote ;11 104(32)
766 sta NoteOffset
767 ;Dec Note Relative
768 lda EffectNote,x
769 sec
770 sbc NoteOffset
771 ;Support Relative & Absolute Modes
772 ldy AbsoluteMode,x
773 .(
774 beq skip1
775 sta EffectNote,x
776 skip1 jmp CalcAndStorePitch
777 .)
778
779 efxc_SkipZeroPitch
780 ldy #00
781 lda AY_PitchLo,x
782 jmp SkipZeroCountRent
783 efxc_SkipZeroVolume ;15 139(1)
784 lda AY_Volume,x
785 ldy #00
786 and #15
787 jmp SkipZeroCountRent
788 efxc_SkipZeroCount ;16 140(1)
789 ldy #00
790 lda EffectCounter,x
791 SkipZeroCountRent
792 .(
793 bne skip1
794 ldy #01
795 skip1 tya
796 .)
797 sta SkipLoopFlag,x
798 rts
799 efxc_LoopRow ;21 163(22)
800 sta EffectTemp01
801 ;Count counter
802 lda EffectCounter,x
803 .(
804 beq skip2
805 dec EffectCounter,x
806 skip2 lda SkipLoopFlag,x
807 bne skip1
808 lda EffectIndex,x
809 sec
810 sbc EffectTemp01
811 sta EffectIndex,x
812 dec EffectIndex,x
813 ;On a loop, disable any transient sample/ornament flags
814 lda #128
815 sta SampleProperty,x
816 sta OrnamentProperty,x
817 clc
818 skip1 lda #00
819 sta SkipLoopFlag,x
820 rts
821 .)
822
823 efxc_FilterFrequency ;20 159(4)
824 ;Need to check original code (possibly latest)
825 sta FilterIndex,x
826 rts
827
828 random2
829 .word $3611
830 temprand
831 .byt $00
832 getrand2
833 lda random2+1
834 sta temprand
835 lda random2
836 asl
837 rol temprand
838 asl
839 rol temprand
840
841 clc
842 adc random2
843 pha
844 lda temprand
845 adc random2+1
846 sta random2+1
847 pla
848 adc #$11
849 sta random2
850 lda random2+1
851 adc #$36
852 sta random2+1
853 rts
854
855 CalcAndStorePitch ;Store also to EffectPitchLo and Hi
856 ;Note in "A" - Use Routine2AEB (Sonix routine)
857 ldy #255
858 .(
859 loop1 iny
860 sbc #$0C
861 bcs loop1
862 sty irqTemp03
863 adc #$0C
864 tay
865 lda BasePitchHi,y
866 sta irq_source
867 lda BasePitchLo,y
868 ldy irqTemp03
869 beq skip1
870 loop2 lsr irq_source
871 ror
872 dey
873 bne loop2
874 skip1 ;A==Low irq_source==High
875 .)
876 sta EffectPitchLo,x
877 lda irq_source
878 sta EffectPitchHi,x
879 rts
880
881
882 ;**** Generic Routine Tables and Variables go here *****
883 paTemp01 .byt 0
884 EventStart
885 .byt 0 ;Title Tune (Start Event 0) (ABC)
886 .byt 10 ;Reggae Track (AB)
887 .byt 11 ;Repeating Drum Pattern (A)
888 .byt 12 ;Pool Music (AB)
889 .byt 13 ;Hifi Music (AB)
890 EventEnd
891 .byt 10 ;Title Tune (End on Event 10)
892 .byt 11
893 .byt 12
894 .byt 13
895 .byt 14
896 TrackProperty
897 .byt 128+13 ;Title Tune (Loop and tempo 13)
898 .byt 128+16
899 .byt 128+14
900 .byt 128+30
901 .byt 128+12
902 TrackChannels
903 .byt 1+2+4
904 .byt 2+4
905 .byt 4
906 .byt 2+4
907 .byt 2+4
908 TracksChannelsUsed
909 .byt 0
910
911 ;************** Music Data Starts Here *****************
912
913 PatternRest
914 .byt 0,0,0
915 Event_A_Pats ;Event A Patterns
916 ; 00 01 02 03 04 05 06 07 08 09 10 11 12 13
917 .byt $00,$01,$02,$03,$04,$05,$06,$03,$04,$07,$04,$04,$06,$03
918 Event_A_NOFS ;Event A Note Offsets
919 .byt $40,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34
920 Event_B_Pats ;Event B Patterns
921 .byt $00,$01,$02,$03,$04,$05,$06,$03,$04,$07,$03,$80,$04,$04 ;$80 is pattern rest
922 Event_B_NOFS ;Event B Note Offsets
923 .byt $40,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34
924 Event_C_Pats ;Event C Patterns
925 .byt $00,$01,$02,$03,$04,$05,$06,$03,$04,$07,$80,$80,$80,$80
926 Event_C_NOFS ;Event C Note Offsets
927 .byt $40,$40,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34,$34
928
929 ;Pattern Memory
930 Pattern2B60
931 .byt $39,$0,$FE,$3,$3F,$0,$FE,$3,$3E,$0,$FE,$7,$BE,$0,$FE,$3,$38,$0
932 .byt $FE,$1,$3A,$0,$BA,$0,$3C,$0,$FE,$9,$BC,$0,$FE,$1,$37,$0,$FE,$B
933 .byt $3C,$0,$FE,$2,$BC,$0,$3C,$0,$FE,$1,$BC,$0,$FE,$4,$F8,$0,$FE,$4,$FF
934 Pattern2B97
935 .byt $30,$0,$FE,$1,$B0,$0,$FE,$1,$30,$0,$FE,$1,$B0,$0,$FE,$1,$2E,$0
936 .byt $FE,$1,$AE,$0,$FE,$1,$2E,$0,$FE,$1,$AE,$0,$FE,$1,$2D,$0,$FE,$1
937 .byt $AD,$0,$FE,$1,$2D,$0,$FE,$1,$AD,$0,$FE,$1,$2C,$0,$FE,$1,$AC,$0
938 .byt $FE,$1,$2C,$0,$FE,$1,$AC,$0,$FE,$1,$2B,$0,$FE,$C,$AB,$0,$FE,$5
939 .byt $37,$0,$43,$0,$37,$0,$43,$0,$37,$0,$43,$0,$37,$0,$43,$0,$37,$0
940 .byt $43,$0,$37,$0,$43,$0,$37,$0,$FF
941 Pattern2BFA
942 .byt $FE,$3,$29,$11,$29,$11,$A9,$0,$29,$11,$FE,$1,$29,$11,$A9,$0,$FE,$9
943 .byt $29,$11,$29,$11,$A9,$0,$29,$11,$FE,$1,$29,$11,$FE,$1,$A9,$0,$FE,$9
944 .byt $29,$11,$A9,$0,$FE,$2,$29,$11,$A9,$0,$FE,$16,$FF
945 Pattern2C2B
946 .byt $41,$22,$C1,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30
947 .byt $14,$B0,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14
948 .byt $B0,$0,$79,$3,$30,$14,$3C,$14,$BC,$0,$30,$14,$B0,$0,$30,$14,$B0
949 .byt $0,$30,$14,$B0,$0,$41,$22,$C1,$0,$30,$14,$30,$14,$41,$22,$C1,$0
950 .byt $79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79
951 .byt $3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$41,$22,$C1,$0,$78,$3
952 .byt $F8,$0,$78,$2,$F8,$0,$78,$3,$30,$14,$78,$2,$F8,$0,$FE,$2,$48,$0
953 .byt $4B,$0,$4F,$0,$C3,$0,$FF
954 Pattern2CAA
955 .byt $41,$22,$C1,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30
956 .byt $14,$B0,$0,$79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14
957 .byt $B0,$0,$79,$3,$30,$14,$3C,$14,$BC,$0,$30,$14,$B0,$0,$30,$14,$B0
958 .byt $0,$30,$14,$B0,$0,$41,$22,$C1,$0,$30,$14,$30,$14,$41,$22,$C1,$0
959 .byt $79,$3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79
960 .byt $3,$30,$14,$3C,$14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79,$3
961 .byt $30,$14,$3C,$14,$BC,$0,$30,$14,$B0,$0,$30,$14,$B0,$0,$30,$14,$B0
962 .byt $0,$41,$22,$C1,$0,$30,$14,$B0,$0,$FF
963 Pattern2D2B
964 .byt $2B,$11,$FE,$F,$2B,$11,$FE,$F,$41,$22,$C1,$0,$79,$3,$30,$14,$3C
965 .byt $14,$FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79,$3,$30,$14,$3C,$14
966 .byt $FE,$1,$30,$14,$B0,$0,$30,$14,$B0,$0,$79,$3,$30,$14,$3C,$14,$BC
967 .byt $0,$30,$14,$B0,$0,$30,$14,$B0,$0,$30,$14,$B0,$0,$41,$22,$C1,$0
968 .byt $30,$14,$B0,$0,$FF
969 Pattern2D74
970 .byt $2E,$11,$FE,$17,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B
971 .byt $11,$FE,$1,$2B,$11,$FE,$3,$BA,$A,$FE,$2,$BA,$0,$BE,$A,$FE,$1,$2B
972 .byt $11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$3,$BC,$A,$FE
973 .byt $2,$C0,$0,$C0,$A,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE
974 .byt $1,$FF
975 Pattern2DBD
976 .byt $F8,$0,$FE,$23,$2B,$11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$B,$2B
977 .byt $11,$FE,$1,$2B,$11,$FE,$1,$2B,$11,$FE,$3,$2B,$11,$35,$0,$39,$0
978 .byt $3C,$0,$FF
979 Pattern8A
980 Pattern8B
981 Pattern8C
982 .byt $F8,$0,$FE,63
983 .byt $FF
984
985 Pattern2DE2
986 .byt $23,$0,$FE,$1,$A3,$0,$FE,$1,$23,$0,$FE,$1,$A3,$0,$FE,$1,$22,$0
987 .byt $FE,$1,$A2,$0,$FE,$1,$22,$0,$FE,$1,$A2,$0,$FE,$1,$27,$0,$FE,$1
988 .byt $A7,$0,$FE,$1,$27,$0,$FE,$1,$A7,$0,$FE,$1,$25,$0,$FE,$1,$A5,$0
989 .byt $FE,$1,$25,$0,$FE,$1,$A5,$0,$24,$0,$FE,$2,$A4,$0,$FE,$1,$24,$0
990 .byt $A4,$0,$FE,$1,$24,$0,$27,$0,$FE,$1,$A7,$0,$FE,$1,$25,$0,$FE,$1
991 .byt $A5,$0,$FE,$1,$24,$0,$FE,$1,$A4,$0,$FE,$1,$24,$0,$FE,$1,$A4,$0
992 .byt $FE,$4,$F8,$0,$FE,$4,$FF
993 Pattern2E55
994 .byt $3F,$0,$FE,$A,$3E,$0,$FE,$3,$41,$0,$41,$0,$FE,$9,$C1,$0,$3F,$0
995 .byt $3E,$0,$FE,$1,$3C,$0,$FE,$1,$3E,$0,$FE,$F,$BE,$0,$FE,$2,$43,$0
996 .byt $FE,$9,$C3,$0,$FE,$2,$FF
997 Pattern2E80
998 .byt $FE,$3,$41,$0,$41,$0,$43,$0,$FE,$1,$40,$0,$FE,$8,$C0,$0,$FE,$2
999 .byt $40,$0,$3F,$0,$BF,$0,$3E,$0,$BE,$0,$3D,$0,$FE,$7,$BD,$0,$FE,$2
1000 .byt $3D,$0,$3C,$0,$FE,$1,$3B,$0,$FE,$1,$3C,$0,$FE,$8,$BC,$0,$FE,$2
1001 .byt $3B,$0,$FE,$3,$3C,$0,$BC,$0,$FE,$1,$48,$0,$3C,$0,$FE,$1,$3E,$0
1002 .byt $FE,$1,$FF
1003 Pattern2ECB
1004 .byt $24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1,$22,$0,$A2,$0,$24,$0
1005 .byt $A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0,$A2,$0,$20,$0,$FE,$1
1006 .byt $A0,$0,$FE,$1,$27,$0,$A7,$0,$FE,$1,$2C,$0,$AC,$0,$2C,$0,$AC,$0
1007 .byt $2C,$0,$27,$0,$A7,$0,$FE,$2,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0
1008 .byt $FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1
1009 .byt $22,$0,$A2,$0,$20,$0,$FE,$1,$A0,$0,$FE,$1,$1F,$0,$FE,$1,$9F,$0
1010 .byt $FE,$1,$24,$0,$FE,$1,$A4,$0,$FE,$1,$3C,$35,$FE,$3,$FF
1011 Pattern2F46
1012 .byt $24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1,$22,$0,$A2,$0,$24,$0
1013 .byt $A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0,$A2,$0,$20,$0,$FE,$1
1014 .byt $A0,$0,$FE,$1,$27,$0,$A7,$0,$FE,$1,$2C,$0,$AC,$0,$2C,$0,$AC,$0
1015 .byt $2C,$0,$27,$0,$A7,$0,$FE,$2,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0
1016 .byt $FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1
1017 .byt $22,$0,$A2,$0,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1,$22,$0
1018 .byt $A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0,$A2,$0,$FF
1019 Pattern2FC5
1020 .byt $4A,$0,$FE,$3,$4F,$0,$FE,$9,$CF,$0,$FE,$9,$56,$0,$51,$0,$4D,$0
1021 .byt $4A,$0,$47,$0,$43,$0,$3B,$0,$35,$0,$24,$0,$A4,$0,$FE,$1,$22,$0
1022 .byt $1F,$0,$FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0
1023 .byt $FE,$1,$22,$0,$A2,$0,$24,$0,$A4,$0,$FE,$1,$22,$0,$1F,$0,$FE,$1
1024 .byt $22,$0,$A2,$0,$24,$0,$A4,$0,$22,$0,$FE,$1,$1F,$0,$FE,$1,$22,$0
1025 .byt $A2,$0,$FF
1026 Pattern3022
1027 .byt $4B,$0,$FE,$1B,$4A,$0,$FE,$3,$4F,$0,$FE,$F,$4C,$0,$FE,$F,$FF
1028 Pattern3033
1029 .byt $A9,$11,$FE,$1,$A9,$12,$FE,$1,$A9,$13,$FE,$1,$A9,$14,$FE,$1
1030 .byt $A9,$15,$FE,$1,$A9,$16,$FE,$1,$A9,$17,$FE,$1,$A9,$18,$FE,$1
1031 .byt $A9,$19,$FE,$1,$A9,$1A,$FE,$1,$A9,$1B,$FE,$1,$A9,$1C,$FE,$1
1032 .byt $A9,$1D,$FE,$1,$29,$11,$FE,$1,$29,$11,$29,$11,$29,$11,$29,$11
1033 .byt $3E,$0,$FE,$1B,$33,$0,$34,$0,$3B,$0,$3E,$0,$FF
1034
1035 Pattern3080
1036 .byt $39,$0,$FE,$9,$38,$0,$FE,$1,$37,$0,$B7,$0,$35,$0,$FE,$1,$37,$0
1037 .byt $FE,$8,$B7,$0,$FE,$1,$37,$0,$35,$0,$FE,$1,$33,$0,$FE,$1,$30,$0
1038 .byt $FE,$5,$B0,$0,$FE,$5,$37,$0,$FE,$3,$3C,$0,$FE,$2,$BC,$0,$3C,$0
1039 .byt $FE,$6,$F8,$0,$FE,$4,$FF
1040 Pattern30BD
1041 .byt $4B,$0,$FE,$2,$46,$0,$4A,$0,$4B,$0,$4D,$0,$CD,$0,$4F,$0,$FE,$5
1042 .byt $CF,$0,$FE,$2,$43,$0,$FE,$1,$45,$0,$FE,$1,$46,$0,$FE,$1,$48,$0
1043 .byt $FE,$6,$C8,$0,$FE,$4,$3B,$0,$BB,$0,$3B,$0,$BB,$0,$3C,$0,$BC,$0
1044 .byt $3C,$0,$FE,$1,$BC,$0,$FE,$1,$3C,$0,$3C,$0,$3C,$0,$3B,$0,$BB,$0
1045 .byt $FE,$5,$37,$0,$3A,$0,$3B,$0,$3C,$0,$3E,$0,$40,$0,$41,$0,$44,$0
1046 .byt $50,$0,$FF
1047 Pattern311A
1048 .byt $55,$0,$FE,$B,$54,$0,$FE,$3,$4E,$0,$FE,$B,$4F,$0,$FE,$3,$52,$0
1049 .byt $FE,$3,$2E,$0,$FE,$1,$AE,$0,$FE,$1,$2C,$0,$FE,$1,$AC,$0,$FE,$1
1050 .byt $50,$0,$FE,$3,$47,$0,$FE,$2,$2F,$0,$2F,$0,$FE,$2,$48,$0,$30,$0
1051 .byt $FE,$1,$B0,$0,$FE,$1,$48,$0,$C8,$0,$4A,$0,$FE,$1,$FF
1052 Pattern315F
1053 .byt $39,$0,$FE,$A,$38,$0,$37,$0,$FE,$1,$35,$0,$FE,$1,$37,$0,$FE,$8
1054 .byt $B7,$0,$FE,$1,$37,$0,$35,$0,$FE,$1,$33,$0,$FE,$1,$3C,$0,$FE,$F
1055 .byt $BC,$0,$FE,$F,$FF
1056 Pattern3188
1057 .byt $37,$0,$FE,$F,$38,$0,$FE,$B,$37,$0,$FE,$3,$3C,$0,$FE,$D,$BC,$0
1058 .byt $FE,$1,$3A,$0,$FE,$F,$FF
1059 Pattern31A1
1060 .byt $46,$0,$FE,$F,$50,$0,$4D,$0,$4A,$0,$47,$0,$4D,$0,$4A,$0,$47,$0
1061 .byt $44,$0,$4A,$0,$47,$0,$44,$0,$41,$0,$47,$0,$44,$0,$41,$0,$3E,$0
1062 .byt $48,$4,$FE,$1,$3C,$4,$BC,$0,$48,$4,$C8,$0,$FE,$2,$48,$4,$C8,$0
1063 .byt $3C,$4,$BC,$0,$48,$4,$C8,$0,$FE,$2,$48,$4,$C8,$0,$3C,$4,$BC,$0
1064 .byt $48,$4,$C8,$0,$FE,$2,$48,$4,$FE,$1,$3C,$4,$BC,$0,$48,$4,$C8,$0
1065 .byt $FE,$2,$FF
1066 Pattern31FE
1067 .byt $2F,$0,$FE,$7,$2E,$0,$FE,$7,$2D,$0,$FE,$7,$2C,$0,$FE,$7,$2B,$0
1068 .byt $FE,$F,$30,$0,$FE,$F,$FF
1069 Pattern3217
1070 .byt $F8,$0,$A9,$11,$FE,$1,$A9,$12,$FE,$1,$A9,$13,$FE,$1,$A9,$14,$FE
1071 .byt $1,$A9,$15,$FE,$1,$A9,$16,$FE,$1,$A9,$17,$FE,$1,$A9,$18,$FE,$1
1072 .byt $A9,$19,$FE,$1,$A9,$1A,$FE,$1,$A9,$1B,$FE,$1,$A9,$1C,$FE,$1,$A9
1073 .byt $1D,$FE,$1,$29,$11,$FE,$1,$29,$11,$29,$11,$29,$11,$32,$0,$FE,$F
1074 .byt $31,$0,$FE,$7,$30,$0,$FE,$7,$FF
1075
1076 OrnamentAddressTableLo
1077 .byt <Ornament0
1078 .byt <Ornament1
1079 .byt <Ornament2
1080 .byt <Ornament3
1081 OrnamentAddressTableHi
1082 .byt >Ornament0
1083 .byt >Ornament1
1084 .byt >Ornament2
1085 .byt >Ornament3
1086
1087 OrnamentData
1088 Ornament0 ;Repeat
1089 .byt $01,$05,$01,$07,$03 ;$03 is flag to loop to start
1090 Ornament1
1091 .byt $01,$0E,$16,$22,$32,$3E,$4A,$62,$6E,$76,$82,$8E,$00
1092 Ornament2
1093 .byt $01,$0E,$16,$22,$32,$3E,$4A,$62,$6E,$76,$82,$8E,$FE,$00
1094 Ornament3
1095 .byt $01,$01,$04,$04,$0C,$0C,$14,$14,$20,$20,$30,$30,$30,$3C,$3C,$3C ;3
1096 .byt $44,$44,$44,$50,$50,$50,$60,$60,$60,$6C,$6C,$6C,$74,$74,$74,$00
1097
1098 SampleAddressTableLo
1099 .byt <Sample0
1100 .byt <Sample1
1101 .byt <Sample2
1102 .byt <Sample3
1103 .byt <Sample4
1104 .byt <Sample5
1105 SampleAddressTableHi
1106 .byt >Sample0
1107 .byt >Sample1
1108 .byt >Sample2
1109 .byt >Sample3
1110 .byt >Sample4
1111 .byt >Sample5
1112
1113 SampleData
1114 Sample0
1115 .byt $1E,$0D,$00
1116 Sample1
1117 .byt $0B,$0C,$0B,$0A,$0A,$09,$09,$08,$08,$07,$07,$06,$06,$05,$05,$04 ;1
1118 .byt $04,$04,$00
1119 Sample2
1120 .byt $1F,$2E,$1E,$2D,$1D,$2C,$1C,$2B,$1B,$2A,$1A,$29,$19,$28,$18,$27 ;2
1121 .byt $17,$26,$16,$25,$15,$24,$14,$23,$13,$22,$12,$21,$11,$10,$00
1122 Sample3
1123 .byt $0F,$17,$14,$01,$10,$00
1124 Sample4
1125 .byt $0F,$0E,$0D,$0C,$0B,$09,$07,$05,$03,$01,$10,$00
1126 Sample5
1127 .byt $0F,$0F,$0E,$0E,$0D,$0D,$0C,$0C,$0B,$0B,$0A,$0A,$09,$09,$08,$08 ;5
1128 .byt $07,$07,$06,$06,$05,$05,$04,$04,$03,$03,$02,$02,$01,$01,$10,$00
1129
1130 Table33A4 ;Pattern Address Table A Lo
1131 .byt <Pattern2DBD
1132 .byt <Pattern2D74
1133 .byt <Pattern2D2B
1134 .byt <Pattern2CAA
1135 .byt <Pattern2C2B
1136 .byt <Pattern2BFA
1137 .byt <Pattern2B97
1138 .byt <Pattern2B60
1139 Table33AC ;Pattern Address Table A Hi
1140 .byt >Pattern2DBD
1141 .byt >Pattern2D74
1142 .byt >Pattern2D2B
1143 .byt >Pattern2CAA
1144 .byt >Pattern2C2B
1145 .byt >Pattern2BFA
1146 .byt >Pattern2B97
1147 .byt >Pattern2B60
1148 Table33B4 ;Pattern Address Table B Lo
1149 .byt <Pattern3033
1150 .byt <Pattern3022
1151 .byt <Pattern2FC5
1152 .byt <Pattern2F46
1153 .byt <Pattern2ECB
1154 .byt <Pattern2E80
1155 .byt <Pattern2E55
1156 .byt <Pattern2DE2
1157 Table33BC ;Pattern Address Table B Hi
1158 .byt >Pattern3033
1159 .byt >Pattern3022
1160 .byt >Pattern2FC5
1161 .byt >Pattern2F46
1162 .byt >Pattern2ECB
1163 .byt >Pattern2E80
1164 .byt >Pattern2E55
1165 .byt >Pattern2DE2
1166 Table33C4 ;Pattern Address Table C Lo
1167 .byt <Pattern3217
1168 .byt <Pattern31FE
1169 .byt <Pattern31A1
1170 .byt <Pattern3188
1171 .byt <Pattern315F
1172 .byt <Pattern311A
1173 .byt <Pattern30BD
1174 .byt <Pattern3080
1175 Table33CC ;Pattern Address Table C Hi
1176 .byt >Pattern3217
1177 .byt >Pattern31FE
1178 .byt >Pattern31A1
1179 .byt >Pattern3188
1180 .byt >Pattern315F
1181 .byt >Pattern311A
1182 .byt >Pattern30BD
1183 .byt >Pattern3080
1184
1185 RegisterBank
1186 AY_PitchLo
1187 .byt 0
1188 .byt 0
1189 .byt 0
1190 AY_PitchHi
1191 .byt 0
1192 .byt 0
1193 .byt 0
1194 AY_Noise
1195 .byt 0
1196 AY_Status
1197 .byt $78
1198 AY_Volume
1199 .byt 0
1200 .byt 0
1201 .byt 0
1202 AY_EGPeriodLo .byt 0
1203 AY_EGPeriodHi .byt 0
1204 AY_EGCycle .byt 0
1205 RegisterPointer
1206 .byt 0,3
1207 .byt 1,4
1208 .byt 2,5
1209 .byt 6
1210 .byt 7
1211 .byt 8,9,10
1212 .byt 11,12
1213 .byt 13
1214 ReferenceBank
1215 .byt 0,0,0,0,0,0
1216 .byt 0,0
1217 .byt 0,0,0
1218 .byt 0,0,0
1219
1220 BasePitchLo ;Base Note Pitches Lo
1221 .byt $EE,$16,$4C
1222 .byt $8E,$D8,$2E
1223 .byt $8E,$F6,$66
1224 .byt $E0,$60,$E8
1225 BasePitchHi ;Base Note Pitches Hi
1226 .byt $0E,$0E,$0D
1227 .byt $0C,$0B,$0B
1228 .byt $0A,$09,$09
1229 .byt $08,$08,$07
1230 EventIndex .byt 0
1231 EndEvent .byt 0
1232 TrackLoop .byt 0
1233 MusicTempoReference .byt 0
1234 MusicStatus .byt 0
1235
1236 SampleProperty
1237 .byt 128,128,128
1238 SampleIndex
1239 .byt 0,0,0
1240 OrnamentProperty
1241 .byt 128,128,128
1242 OrnamentIndex
1243 .byt 0,0,0
1244 RuntimePatternBaseLo
1245 .byt 0,0,0
1246 RuntimePatternBaseHi
1247 .byt 0,0,0
1248 RuntimePatternIndex
1249 .byt 0,0,0
1250 RuntimePatternNoteOffset
1251 .byt 0,0,0
1252 RuntimeNote
1253 .byt 0,0,0
1254 EndOfMusic
1255
1256 ;************************ Effect Data starts here **********************
1257
1258
1259 Channel_SFX_NoteHeaders
1260 .byt NoteG+12*7 ;A 00
1261 .byt NoteC+12*1 ; 01
1262 .byt NoteC+12*2 ; 02
1263 .byt NoteC+12*6 ; 03
1264 .byt NoteC+12*3 ; 04
1265 .byt NoteF+12*9 ; 05
1266 .byt NoteC+12*1 ; 06
1267 .byt NoteD+12*2 ; 07
1268 .byt NoteG+12*3 ; 08
1269
1270 .byt NoteC+12*6 ;B 09
1271 .byt NoteF+12*6 ; 10
1272 .byt NoteC+12*3 ; 11
1273 .byt NoteC+12*4 ; 12
1274 .byt NoteC+12*4 ; 13
1275 .byt NoteF+12*7 ; 14
1276 .byt NoteG+12*3 ; 15
1277 .byt NoteG+12*7 ; 16
1278
1279 .byt NoteC+12*5 ;C 17
1280 .byt NoteC+12*0 ; 18
1281 .byt NoteC+12*5 ; 19
1282 .byt NoteG+12*7 ; 20
1283 .byt NoteG+12*7 ; 21
1284 .byt NoteG+12*3 ; 22
1285
1286 Channel_SFX_EffectAndEGHeaders
1287 .byt hEffectV ;A 00 Switch
1288 .byt hEffectU ; 01 Door Opening/Closing
1289 .byt hEffectT ; 02 Pick up
1290 .byt hEffectS ; 03 Drop
1291 .byt hEffectR ; 04 Step #1 (Keonig)
1292 .byt hEffectR ; 05 Step #2 (Carter)
1293 .byt hEffectH+EG20 ; 06 Lift Start
1294 .byt hEffectG+EG20 ; 07 Lift End
1295 .byt hEffectE+EG09 ; 08 Alarm #1 (Power Down)
1296
1297 .byt hEffectQ ;B 09 Effect #1 (InfoPost)
1298 .byt hEffectP ; 10 New Msg through Commlink
1299 .byt hEffectO ; 11 Effect #2 (InfoPost)
1300 .byt hEffectN ; 12 Computer Room #1
1301 .byt hEffectM ; 13 Computer Room #2
1302 .byt hEffectP ; 14 Beep for Info Messages in Text Area
1303 .byt hEffectF ; 15 Robot Shuffle
1304 .byt hEffectD+EG20 ; 16 Alarm #2
1305
1306 .byt hEffectL ;C 17 Dying
1307 .byt hEffectK+EG20 ; 18 Contact with Enemy #2
1308 .byt hEffectK+EG02 ; 19 Contact with Enemy #1(Primary)
1309 .byt hEffectJ ; 20 Alarm #3 (Life Support Circuit Open)
1310 .byt hEffectI ; 21 Alarm #3 End
1311
1312 ;Nice effect of mixing Effect 0F on A whilst playing Track 02 on A
1313 ;Effects(19)
1314
1315 EffectBaseAddressLo
1316 .byt <EffectD
1317 .byt <EffectE
1318 .byt <EffectF
1319 .byt <EffectG
1320 .byt <EffectH
1321 .byt <EffectI
1322 .byt <EffectJ
1323 .byt <EffectK
1324 .byt <EffectL
1325 .byt <EffectM
1326 .byt <EffectN
1327 .byt <EffectO
1328 .byt <EffectP
1329 .byt <EffectQ
1330 .byt <EffectR
1331 .byt <EffectS
1332 .byt <EffectT
1333 .byt <EffectU
1334 .byt <EffectV
1335 EffectBaseAddressHi
1336 .byt >EffectD
1337 .byt >EffectE
1338 .byt >EffectF
1339 .byt >EffectG
1340 .byt >EffectH
1341 .byt >EffectI
1342 .byt >EffectJ
1343 .byt >EffectK
1344 .byt >EffectL
1345 .byt >EffectM
1346 .byt >EffectN
1347 .byt >EffectO
1348 .byt >EffectP
1349 .byt >EffectQ
1350 .byt >EffectR
1351 .byt >EffectS
1352 .byt >EffectT
1353 .byt >EffectU
1354 .byt >EffectV
1355
1356 EffectD ;16
1357 .byt efx_ToneOn
1358 .byt efx_NoiseOff
1359 .byt efx_EnvelopeOff
1360 .byt efx_Volume+6
1361 .byt efx_Pause+27
1362 .byt efx_EnvelopeOn
1363 .byt efx_Pause+18
1364 .byt efx_EnvelopeOff
1365 .byt efx_Pause+7
1366 .byt efx_EnvelopeOn
1367 .byt efx_Pause+9
1368 .byt efx_EnvelopeOff
1369 .byt efx_Pause+36
1370 .byt efx_EnvelopeOn
1371 .byt efx_Pause+18
1372 .byt efx_LoopRow+13 ;Row 2
1373 EffectE ;16
1374 .byt efx_ToneOn
1375 .byt efx_EnvelopeOn
1376 .byt efx_NoiseOff
1377 .byt efx_SetAbsoluteMode
1378 .byt efx_IncPitch+1
1379 .byt efx_Volume+0
1380 .byt efx_Pause+3
1381 .byt efx_DecPitch+2
1382 .byt efx_IncVolume
1383 .byt efx_SkipZeroVolume
1384 .byt efx_LoopRow+4 ;To row 6
1385 .byt efx_Volume+12
1386 .byt efx_Pause+9
1387 .byt efx_IncPitch+31
1388 .byt efx_Pause+18
1389 .byt efx_LoopRow+11 ;To row 4
1390 EffectF ;16
1391 .byt efx_ToneOff
1392 .byt efx_EnvelopeOff
1393 .byt efx_NoiseOn
1394 .byt efx_SetCounter+6
1395 .byt efx_Volume+0
1396 .byt efx_IncVolume
1397 .byt efx_Pause+1
1398 .byt efx_SkipZeroCount
1399 .byt efx_LoopRow+3
1400 .byt efx_DecVolume
1401 .byt efx_Pause+1
1402 .byt efx_SkipZeroVolume
1403 .byt efx_LoopRow+3
1404 .byt efx_End
1405 EffectG ;19
1406 .byt efx_ToneOn
1407 .byt efx_NoiseOff
1408 .byt efx_EnvelopeOn
1409 .byt efx_SetEnvTriangle
1410 .byt efx_SetAbsoluteMode
1411 .byt efx_SetCounter+8
1412 .byt efx_Pause+9
1413 .byt efx_DecNote+2
1414 .byt efx_SkipZeroCount
1415 .byt efx_LoopRow+3 ;6
1416 .byt efx_EnvelopeOff
1417 .byt efx_Pause+18
1418 .byt efx_Volume+13
1419 .byt efx_IncNote+31
1420 .byt efx_IncNote+24
1421 .byt efx_Pause+4
1422 .byt efx_DecVolume
1423 .byt efx_SkipZeroVolume
1424 .byt efx_LoopRow+3 ;?16
1425 .byt efx_End
1426 EffectH ;10
1427 .byt efx_ToneOn
1428 .byt efx_NoiseOff
1429 .byt efx_EnvelopeOn
1430 .byt efx_SetEnvTriangle
1431 .byt efx_SetAbsoluteMode
1432 .byt efx_SetCounter+8
1433 .byt efx_Pause+4
1434 .byt efx_IncNote+2
1435 .byt efx_SkipZeroCount
1436 .byt efx_LoopRow+3 ;6
1437 .byt efx_End
1438 EffectI ;11
1439 .byt efx_ToneOn
1440 .byt efx_NoiseOff
1441 .byt efx_EnvelopeOff
1442 .byt efx_Volume+15
1443 .byt efx_Pause+4
1444 .byt efx_Volume+0
1445 .byt efx_Pause+7
1446 .byt efx_Volume+9
1447 .byt efx_Pause+5
1448 .byt efx_Volume+0
1449 .byt efx_End
1450 EffectJ ;8
1451 .byt efx_ToneOn
1452 .byt efx_NoiseOff
1453 .byt efx_EnvelopeOff
1454 .byt efx_Volume+15
1455 .byt efx_Pause+4
1456 .byt efx_Volume+0
1457 .byt efx_Pause+7
1458 .byt efx_LoopRow+4 ;3
1459 EffectK ;19
1460 .byt efx_ToneOn
1461 .byt efx_NoiseOff
1462 .byt efx_EnvelopeOn
1463 .byt efx_SetAbsoluteMode
1464 .byt efx_SetCounter+8
1465 .byt efx_SetEnvTriangle
1466 .byt efx_IncNote+5
1467 .byt efx_Pause+1
1468 .byt efx_SetEnvSawtooth
1469 .byt efx_IncNote+9
1470 .byt efx_Pause+1
1471 .byt efx_SkipZeroCount
1472 .byt efx_LoopRow+7
1473 .byt efx_EnvelopeOff
1474 .byt efx_End
1475 EffectL ;16 Decreasing pitch and volume
1476 .byt efx_ToneOn
1477 .byt efx_NoiseOff
1478 .byt efx_EnvelopeOff
1479 .byt efx_Volume+15
1480 .byt efx_SetAbsoluteMode
1481 .byt efx_SetCounter+15
1482 .byt efx_Pause+2
1483 .byt efx_IncPitch+1
1484 .byt efx_SkipZeroCount
1485 .byt efx_LoopRow+3 ;6
1486 .byt efx_DecPitch+7
1487 .byt efx_DecVolume
1488 .byt efx_SkipZeroVolume
1489 .byt efx_LoopRow+8
1490 .byt efx_End
1491 EffectM ;9
1492 .byt efx_ToneOn
1493 .byt efx_NoiseOff
1494 .byt efx_EnvelopeOff
1495 .byt efx_Volume+7
1496 .byt efx_SetAbsoluteMode
1497 .byt efx_FilterFrequency+2
1498 .byt efx_Pause+3
1499 .byt efx_DecNote+26
1500 .byt efx_LoopRow+2 ;6
1501 EffectN ;9
1502 .byt efx_ToneOn
1503 .byt efx_NoiseOff
1504 .byt efx_EnvelopeOff
1505 .byt efx_Volume+7
1506 .byt efx_SetAbsoluteMode
1507 .byt efx_FilterFrequency+2
1508 .byt efx_Pause+1
1509 .byt efx_DecNote+27
1510 .byt efx_LoopRow+2 ;+6
1511 EffectO ;11
1512 .byt efx_ToneOn
1513 .byt efx_NoiseOn
1514 .byt efx_EnvelopeOff
1515 .byt efx_Volume+15
1516 .byt efx_Pause+1
1517 .byt efx_NoiseOff
1518 .byt efx_DecVolume
1519 .byt efx_Pause+3
1520 .byt efx_SkipZeroVolume
1521 .byt efx_LoopRow+3 ;6
1522 .byt efx_End
1523 EffectP ;11
1524 .byt efx_ToneOn
1525 .byt efx_NoiseOff
1526 .byt efx_EnvelopeOff
1527 .byt efx_SetCounter+3
1528 .byt efx_Volume+15
1529 .byt efx_Pause+9
1530 .byt efx_Volume+0
1531 .byt efx_Pause+9
1532 .byt efx_SkipZeroCount
1533 .byt efx_LoopRow+5 ;4
1534 .byt efx_End
1535 EffectQ ;9
1536 .byt efx_ToneOn
1537 .byt efx_NoiseOff
1538 .byt efx_EnvelopeOff
1539 .byt efx_Volume+15
1540 .byt efx_Pause+6
1541 .byt efx_DecNote+9
1542 .byt efx_Pause+9
1543 .byt efx_Volume+0
1544 .byt efx_End
1545 EffectR ;8
1546 .byt efx_NoiseOn
1547 .byt efx_ToneOn
1548 .byt efx_EnvelopeOff
1549 .byt efx_Volume+12
1550 .byt efx_SetNoiseRandom
1551 .byt efx_Pause+0
1552 .byt efx_Volume+0
1553 .byt efx_End
1554 EffectS ;13
1555 .byt efx_NoiseOff
1556 .byt efx_ToneOn
1557 .byt efx_EnvelopeOff
1558 .byt efx_Volume+10
1559 .byt efx_SetCounter+4
1560 .byt efx_SetAbsoluteMode
1561 .byt efx_DecNote+10
1562 .byt efx_Pause+3
1563 .byt efx_SkipZeroCount
1564 .byt efx_LoopRow+3 ;6
1565 .byt efx_Pause+1
1566 .byt efx_Volume+0
1567 .byt efx_End
1568 EffectT ;13
1569 .byt efx_NoiseOff
1570 .byt efx_ToneOn
1571 .byt efx_EnvelopeOff
1572 .byt efx_Volume+10
1573 .byt efx_SetCounter+4
1574 .byt efx_SetAbsoluteMode
1575 .byt efx_IncNote+10
1576 .byt efx_Pause+3
1577 .byt efx_SkipZeroCount
1578 .byt efx_LoopRow+3 ;6
1579 .byt efx_Pause+1
1580 .byt efx_Volume+0
1581 .byt efx_End
1582 EffectU ;14
1583 .byt efx_NoiseOn
1584 .byt efx_ToneOff
1585 .byt efx_EnvelopeOff
1586 .byt efx_Volume+0
1587 .byt efx_SetCounter+8
1588 .byt efx_Pause+2
1589 .byt efx_IncVolume
1590 .byt efx_SkipZeroCount
1591 .byt efx_LoopRow+3 ;5
1592 .byt efx_Volume+0
1593 .byt efx_End
1594 EffectV ;15
1595 .byt efx_NoiseOff
1596 .byt efx_EnvelopeOff
1597 .byt efx_ToneOn
1598 .byt efx_Volume+15
1599 .byt efx_Pause+1
1600 .byt efx_Volume+12
1601 .byt efx_Pause+1
1602 .byt efx_Volume+9
1603 .byt efx_Pause+1
1604 .byt efx_Volume+6
1605 .byt efx_Pause+1
1606 .byt efx_Volume+3
1607 .byt efx_Pause+1
1608 .byt efx_Volume+0
1609 .byt efx_End
1610 ;All Effects == 243 Bytes
1611
1612 ToneMask
1613 .byt %11111110,%11111101,%11111011
1614 ToneBit
1615 .byt %00000001,%00000010,%00000100
1616 NoiseMask
1617 .byt %11110111,%11101111,%11011111
1618 NoiseBit
1619 .byt %00001000,%00010000,%00100000
1620 AbsoluteMode
1621 .byt 0,0,0
1622 EffectCounter
1623 .byt 0,0,0
1624 PauseDelay
1625 .byt 0,0,0
1626 EffectPitchLo
1627 .byt 0,0,0
1628 EffectPitchHi
1629 .byt 0,0,0
1630 EffectNote
1631 .byt 0,0,0
1632 EffectIndex
1633 .byt 0,0,0
1634 EffectNumber
1635 .byt 128,128,128
1636 SkipLoopFlag
1637 .byt 0,0,0
1638 PitchOffset
1639 NoteOffset .byt 0
1640 TempPitchLo .byt 0
1641 TempPitchHi .byt 0
1642 EGValue
1643 .byt 20,9,2
1644 EffectCodeThreshhold
1645 .byt 000 ;00
1646 .byt 001 ;01
1647 .byt 002 ;02
1648 .byt 003 ;03
1649 .byt 004 ;04
1650 .byt 005 ;05
1651 .byt 006 ;06
1652 .byt 007 ;07
1653 .byt 008 ;08
1654 .byt 040 ;09
1655 .byt 072 ;10
1656 .byt 104 ;11
1657 .byt 136 ;12
1658 .byt 137 ;13
1659 .byt 138 ;14
1660 .byt 139 ;15
1661 .byt 140 ;16
1662 .byt 141 ;17
1663 .byt 157 ;18
1664 .byt 158 ;19
1665 .byt 159 ;20
1666 .byt 163 ;21
1667 .byt 185 ;22
1668 .byt 205 ;23
1669 .byt 255 ;24
1670 EffectCodeVectorLo
1671 .byt <efxc_End
1672 .byt <efxc_ToneOn
1673 .byt <efxc_ToneOff
1674 .byt <efxc_NoiseOn
1675 .byt <efxc_NoiseOff
1676 .byt <efxc_EnvelopeOn
1677 .byt <efxc_EnvelopeOff
1678 .byt <efxc_SetAbsoluteMode
1679 .byt <efxc_IncPitch
1680 .byt <efxc_DecPitch
1681 .byt <efxc_IncNote
1682 .byt <efxc_DecNote
1683 .byt <efxc_SetNoiseRandom
1684 .byt <efxc_IncVolume
1685 .byt <efxc_DecVolume
1686 .byt <efxc_SkipZeroVolume
1687 .byt <efxc_SkipZeroCount
1688 .byt <efxc_Volume
1689 .byt <efxc_SetEnvTriangle
1690 .byt <efxc_SetEnvSawtooth
1691 .byt <efxc_FilterFrequency
1692 .byt <efxc_LoopRow
1693 .byt <efxc_SetCounter
1694 .byt <efxc_Pause
1695 .byt <efxc_SkipZeroPitch
1696 EffectCodeVectorHi
1697 .byt >efxc_End
1698 .byt >efxc_ToneOn
1699 .byt >efxc_ToneOff
1700 .byt >efxc_NoiseOn
1701 .byt >efxc_NoiseOff
1702 .byt >efxc_EnvelopeOn
1703 .byt >efxc_EnvelopeOff
1704 .byt >efxc_SetAbsoluteMode
1705 .byt >efxc_IncPitch
1706 .byt >efxc_DecPitch
1707 .byt >efxc_IncNote
1708 .byt >efxc_DecNote
1709 .byt >efxc_SetNoiseRandom
1710 .byt >efxc_IncVolume
1711 .byt >efxc_DecVolume
1712 .byt >efxc_SkipZeroVolume
1713 .byt >efxc_SkipZeroCount
1714 .byt >efxc_Volume
1715 .byt >efxc_SetEnvTriangle
1716 .byt >efxc_SetEnvSawtooth
1717 .byt >efxc_FilterFrequency
1718 .byt >efxc_LoopRow
1719 .byt >efxc_SetCounter
1720 .byt >efxc_Pause
1721 .byt >efxc_SkipZeroPitch
1722 FilterIndex
1723 .byt 0,0,0
1724 FilterMask
1725 .byt 7 ;1
1726 .byt 15 ;2
1727 .byt 31 ;3
1728 .byt 127 ;4
1729 EndOfAll
1730
1731
1732 _Music_data_end
1733
1734
1735
1736 #echo Music & sfx size :
1737 #print (_Music_data_end - _Music_data_start)
1738 #echo
1739

  ViewVC Help
Powered by ViewVC 1.1.26