Home » Archimedes archive » Micro User » MU 1991-03.adf » PD-Stuff » Music/!Player/PlayModA
Music/!Player/PlayModA
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Micro User » MU 1991-03.adf » PD-Stuff |
Filename: | Music/!Player/PlayModA |
Read OK: | ✔ |
File size: | 3DD4 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
� >PlayModA � K� .-------------------------------------------------------------------. (K� | | 2K� | System Interrupt SoundTrackermodule playroutine Version 2.03 | <K� | | FK� | (c)1989 Hugo Fiennes (0458) 43549 evenings 29-Jun-1989 | PK� | (0458) 47608 data (300-2400baud) | ZK� `-------------------------------------------------------------------' d� nJ� Snailmail: Hugo Fiennes, 12 Housman Road, Street, Somerset, BA16 OSD x� �J� Prestel : 045847608 Cix: jpaxton SID: 1012 (Commbase) �?� &1100 �G� This code is public domain and MAY NOT BE SOLD OR INCLUDED IN ANY �B� PRODUCT THAT WILL BE SOLD WITHOUT PRIOR PERMISSION FROM MOI! �� �G� You may copy and distribute this code as long as you don't modify �E� the copy you pass on: any improvements, etc should be sent back �,� to me so I can modify the master copy. �� �G� If you do write any demos, or other p.d. s/w that uses this code, �� please send me a copy! �� �G� This version will play almost any 'ripped' module or module saved !� MasterSoundTracker v1 - v2. � : ""� Reserve space for the module ,� code 500000 1 TL%=26 6 @*. J�'"ModuleName:"song$ O � �song$,1)="*" �cli:� �DJA T ^*� Total length for soundtracker module hA%=�song$:tlen%=�#A%:�#A% r |H� Number of us between samples. Program falls over at delays of less �!� then 10us (100kHz/channel). � us=34 � ��'"Assembling code..." ��C=0�2�2 �P%=code � [OPTC �M;------------------------------------------------------------------------ �K; Soundtracker playroutine v2.2 With portamento,speed change, �J; volume control,pattern break �M;------------------------------------------------------------------------ � � .Fill ADR R8,ourinf ADD R8,R8,R7,LSL#5 LDMIA R8,{R1-R6} & .FillLoop 0] :� sle%=1 � 10 D [OPT C N-LDRB R0,[R5,R1,LSR#16] ; Get sample byte X*SUBS R0,R0,R6 ; Scale volume bMOVMI R0,#0 l.STRB R0,[R12],R11 ; Put in in buffer v(ADD R1,R1,R2 ; Add offset �] �� � [OPT C �*CMP R4,R1,LSR#16 ; End of note? � BGT cbf �,MOVS R1,R3 ; Yes, loop back �5�Q R2,#0 ; If no looping, keep quiet! �.cbf �1CMP R12,R10 ; End of buffer fill? �2BLT FillLoop ; Nope, fill some more �-STMIA R8,{R1-R2} ; Save regs again � �*MOV R0,#%00001000 ; voice active 4LDMFD R13!,{PC} ; ..and return to Level1 .ourinf ;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0 *;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0 4;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0 >;EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0:EQUD 0 H R.channelnote \EQUD 0:EQUD 0:EQUD 0:EQUD 0 f p.effecttype zEQUD 0:EQUD 0:EQUD 0:EQUD 0 � � .info �#EQUD 0 ; Position �)EQUD 0 ; Pattern length �(EQUD 0 ; Sequence posn � �.seqbase �(EQUD &1D8 ; Sequence base � �.trkbase �/EQUD &258 ; Pattern base address � �.current .EQUD 0 ; Current instruments .counti $(EQUD 0 ; Vsync counter . 8 .speed B4EQUD 6 ; Speed counter (default=6) L V-.intr ; Called every VSYNC `STMFD R13!,{R0-R12,R14} j%LDR R1,counti ; Load count t)BL doeffect ; Do any effects ~,LDR R2,speed ; Current playspeed �*ADD R1,R1,#1 ; Increment count �)CMP R1,R2 ; Ready to play? ��Q R1,#0 ; Yes �(STR R1,counti ; Restore count �>BLEQ playnote ; If so, zero counter and play a note �LDMFD R13!,{R0-R12,PC} � � .playnote �STMFD R13!,{R14} �-ADR R0,info ; Load sequence info �LDMIA R0,{R7-R9} � .andagain STMFD R13!,{R9} BL trackadr LDR R0,seqbase 2ADD R11,R0,R10 ; R11=address of sequence (LDR R0,trkbase 2/ADD R12,R0,R10 ; R12=address of track < F/LDRB R6,[R11,R7] ; Get address of notes PADD R12,R12,R6,LSL#10 ZADD R12,R12,R9,LSL#4 dADR R9,current n x(MOV R5,#3 ; Do 4 channels �.dochannel �ADD R11,R12,R5,LSL#2 �0LDRB R6,[R11,#2] ; Get instrument number �"MOVS R6,R6,LSR#4 ; Shuffle �ISTRNEB R6,[R9,R5] ; If it's zero, load last instrument, else store �$LDREQB R6,[R9,R5] ; this one. �3CMP R6,#0 ; Any instrument selected? �*BEQ nextchannel ; Do next channel �<SUB R6,R6,#1 ; Correct R6 for calculations below �$MOV R0,R11 ; Get pitch �)BL gethilo ; (bloody 68000) �,MOVS R4,R0 ; R4=standard pitch �EBEQ nextchannel ; But is it zero? If so, don't play anything CADR R3,channelnote ; Save pitch for arpeggio, portamento, etc STR R4,[R3,R5,LSL#2] ;ADR R3,inversetable ; Scale pitch using inverse table "LDR R4,[R3,R4,LSL#2] ,ADR R2,ourinf 6<ADD R2,R2,R5,LSL#5 ; Get address of fill control block @CMOV R1,#0 ; Set fill to start filling at zero offset JSTR R1,[R2,#0] T$STR R4,[R2,#4] ; Set pitch ^9ADR R3,sampleloc ; Address of sample lookup table h4LDR R3,[R3,R6,LSL#2] ; R3=Actual sample offset r3ADD R3,R3,R10 ; R3=Actual sample address |1STR R3,[R2,#16] ; Set instrument address �?ADD R3,R10,#&14 ; Offset of sample play data from base �3MOV R1,#&1E ; (sample data multiplier) �7MLA R3,R6,R1,R3 ; R3=instrument play data base �,ADD R0,R3,#&1C ; Get repeat length �BL gethilo �&CMP R0,#1 ; No repeats? �1BEQ norep ; Branch to the next bit �/MOV R1,R0,LSL#1 ; x2 for repeat length �2ADD R0,R3,#&1A ; Get repeat start offset �BL gethilo �<ADD R0,R0,R1 ; Make new length by adding the two �%STR R0,[R2,#12] ; and set it �ADD R0,R3,#&1A 0BL gethilo ; Get start repeat posn (ADD R0,R0,#1 ; make non-zero #STR R0,[R2,#8] ; Store it &/B next ; branch over next bit 0 .norep :ADD R0,R3,#&16 D7BL gethilo ; Get the length of the sample N'MOV R0,R0,LSL#1 ; x2 of course X%STR R0,[R2,#12] ; and set it bADD R0,R3,#&1A l0BL gethilo ; Get start repeat posn v#STR R0,[R2,#8] ; Store it �6.next ; Before we go, do the volume �ADD R0,R3,#&18 �%BL gethilo ; Get volume � CMP R0,#64 ; Over? �"MOVGE R0,#63 ; Correct �'ADR R1,voltab ; Volume table �)LDRB R0,[R1,R0] ; Get new volume �#STR R0,[R2,#20] ; Store it �.nextchannel �5ADR R3,effecttype ; Cancel any current effects �MOV R4,#0 ; �STR R4,[R3,R5,LSL#2] ; �,BL effectcheck ; Check for effects 3SUBS R5,R5,#1 ; Decrement channel number 3BPL dochannel ; Nope, do another channel +LDMFD R13!,{R9} ; Get our R9 back! 0LDR R0,jumpflag ; Skip rest of pattern? *CMP R0,#0 ; 4MOVNE R9,#63 ; Yep >)MOVNE R0,#0 ; Reset the flag HSTRNE R0,jumpflag ; R4ADD R9,R9,#1 ; Increment sequence number \-CMP R9,#64 ; Finished sequence? fCBNE vend ; If not, don't go onto next pattern entry pMOV R9,#0 z1ADD R7,R7,#1 ; Increment pattern posn �'CMP R7,R8 ; End of song? �/MOVGT R7,#0 ; ...and again, folks! � .vend �ADR R0,info �+STMIA R0,{R7-R9} ; Store new values �%LDMFD R13!,{PC} ; And return � �1.gethilo ; Gets Hi-Lo stored info �-STMFD R13!,{R1} ; R0=address of info �(LDRB R1,[R0,#0] ; Get high byte �&LDRB R0,[R0,#1] ; Get lo byte �#�R R0,R0,R1,LSL#8 ; Mix the 2 �%LDMFD R13!,{R1} ; restore R1 !MOV PC,R14 ; return 0.effectcheck ; Check for any effects $#LDRB R6,[R11,#3] ; Get info .,LDRB R4,[R11,#2] ; Get effect nunber 8� R4,R4,#&F ; B)CMP R4,#&C ; Volume change? LBNE eff ; No V CMP R6,#64 ; Over? `"MOVGE R6,#63 ; Correct jADR R1,voltab ; t*LDRB R0,[R1,R6] ; Get right units ~-ADR R1,ourinf ; Find table address �ADD R1,R1,R5,LSL#5 ; �+STR R0,[R1,#20] ; Store new volume �MOV PC,R14 �.eff �)CMP R4,#&D ; Pattern break? �1STREQ R4,jumpflag ; Jump to end of pattern ��Q PC,R14 ; �(CMP R4,#&F ; Change speed? �BNE eff1 ; No �'� R6,R6,#&F ; Mask new speed �#STR R6,speed ; Store it �!MOV PC,R14 ; Return .eff1 )CMP R4,#1 ; Portamento up? BLT eff2 ; Nope #CMP R4,#2 ; Or down? (BGT eff2 ; Nope 2'�R R6,R6,R4,LSL#8 ; Make new word <"ADR R3,effecttype ; Save it FSTR R6,[R3,R5,LSL#2] ; P!MOV PC,R14 ; Return Z .eff2 d!MOV PC,R14 ; Return n xL.doeffect ; Do effect detailed in 'effecttype' (R1=subnote #) �%MOV R5,#3 ; 4 channels �%ADR R2,channelnote ; Amiga-note �.ADR R3,effecttype ; R3=effecttype table �9ADR R4,inversetable ; R4=inverse pitch lookup table �.doeff1 �GADR R8,ourinf ; Calculate address offset of voice-info table �ADD R8,R8,R5,LSL#5 ; �.LDR R0,[R3,R5,LSL#2] ; Any effect to do? �CMP R0,#0 ; �BEQ doeffnext ; Nope �'� R6,R0,#&F00 ; R6===ype �'� R0,R0,#&FF ; R0=effect data � )CMP R6,#&100 ; Portamento up? BNE doe1 ; No -LDR R6,[R2,R5,LSL#2] ; Get current tone "#SUB R0,R0,#1 ; Slide up ,SUB R6,R6,R0 6$STR R6,[R2,R5,LSL#2] ; Re-save @5LDR R6,[R4,R6,LSL#2] ; Get archimedes-frequency J1STR R6,[R8,#4] ; Put in parameter block TB doeffnext ^ h .doe1 r+CMP R6,#&200 ; Portamento down? |BNE doe2 ; No �-LDR R6,[R2,R5,LSL#2] ; Get current tone �%SUB R0,R0,#1 ; Slide down �ADD R6,R6,R0 �$STR R6,[R2,R5,LSL#2] ; Re-save �5LDR R6,[R4,R6,LSL#2] ; Get archimedes-frequency �1STR R6,[R8,#4] ; Put in parameter block �B doeffnext � .doe2 �.doeffnext �'SUBS R5,R5,#1 ; Next channel �BPL doeff1 ; �*MOV PC,R14 ; No more, return � .jumpflag =EQUD 0 ; <>0 if pattern is to be terminated &.oldvox 03EQUD 0 ; So we can kill the voice : D2.sampleloc ; Table of sample offsets NEQUD 0:EQUD 0:EQUD 0:EQUD 0 XEQUD 0:EQUD 0:EQUD 0:EQUD 0 bEQUD 0:EQUD 0:EQUD 0:EQUD 0 lEQUD 0:EQUD 0:EQUD 0:EQUD 0 v �/.voltab ; 64-byte volume table �]:P%+=64:[OPT C � �).installsound ; Install voices �STMFD R13!,{R0-R10,R14} �2ADR R0,VoiceBase ; Make TrackerVox a voice �MOV R1,#0 �SWI "Sound_InstallVoice" �,STR R1,oldvox ; So we can kill it �*MOV R10,#1 ; Mute voices 1-8 �.mutelp �MOV R0,R10 �MOV R1,#0 SWI "Sound_AttachVoice" ADD R10,R10,#1 CMP R10,#9 BNE mutelp *MOV R10,#1 4:.attlp ; Attach voices 1-4 to TrackerVox >MOV R0,R10 HADR R1,VoiceName R"SWI "Sound_AttachNamedVoice" \ADD R10,R10,#1 fCMP R10,#5 pBNE attlp z �:MOV R0,#1 ; Slight right bias for channel 1 �MOV R1,#16 �SWI "Sound_Stereo" �9MOV R0,#2 ; Slight left bias for channel 2 �MVN R1,#15 �SWI "Sound_Stereo" �>MOV R0,#3 ; and for channel 3 (Amiga goes RLLR) �MVN R1,#15 �SWI "Sound_Stereo" �8MOV R0,#4 ; And right cgain for channel 4 �MOV R1,#16 �SWI "Sound_Stereo" � (MOV R0,#4 ; Play 4 voices .MOV R1,#208 ; Buffer length = 200 5MOV R2,#us ; For this many microseconds $2MOV R3,#0 ; Leave these 2 unchanged .MOV R4,#0 8SWI "Sound_Configure" B LDMOV R0,#1 ; Sound all 4 voices, parameters are really V%MVN R1,#14 ; immaterial `MOV R2,#100 jMOV R3,#255 tSWI "Sound_Control" ~MOV R0,#2 �SWI "Sound_Control" �MOV R0,#3 �SWI "Sound_Control" �MOV R0,#4 �SWI "Sound_Control" �%LDMFD R13!,{R0-R10,PC} ; & Return � �0 ; Voice parameter block �|.VoiceBase B Fill:B Fill:B Fill:LDMFD R13!,{PC}:LDMFD R13!,{PC}:LDMFD R13!,{PC}:LDMFD R13!,{PC}:EQUD VoiceName-VoiceBase �,.VoiceName EQUS"TrackerVox":EQUB 0:ALIGN � �&.killsound ; Kill voices STMFD R13!,{R0-R10,R14} 0MOV R0,#0 ; De-install TrackerVox LDR R1,oldvox SWI "Sound_RemoveVoice" ( 2,MOV R10,#1 ; Kill the 4 voices <.ksl FMOV R0,R10 P MOV R1,#0 ZSWI "Sound_AttachVoice" dADD R10,R10,#1 nCMP R10,#5 xBNE ksl �#LDMFD R13!,{R0-R10,PC} ; Return � �.inversetable �';EQUD 1: ; Dummy value! �]:P%+=4096:[OPT C �4.trackadr ; Get address of track base �ADR R10,track �MOV PC,R14 �%.track ; Track base �(]:P%+=tlen%:[OPT C ; Is tlen% long � � ALIGN �.convert STMFD R13!,{R0-R4} ADR R2,ltable:MOV R3,#0 .loop "@LDRB R4,[R0,R3]:� R4,R4,#128:LDRB R4,[R2,R4]:STRB R4,[R0,R3] ,#ADD R3,R3,#1:CMP R3,R1:BLE loop 6LDMFD R13!,{R0-R4} @MOV PC,R14 J.ltable T0]:P%+=256:[OPT C ; 256 byte lookup table ^ h..endcode ; The endcode pointer r] |� � �*�"Building sample conversion table..." �#� Setup sample conversion table �� A%=0 � 255 �< B%=A%-128:B%=B%<<24:ș "Sound_SoundLog",B% � ltable?A% �� � ��"Building volume table..." �� Setup volume table �� A%=0 � 63 �! voltab?A%=255-((A%/3+42)*4) �� � �"Building pitch table..." � Setup inverse pitch table � A%=1 � 1023 &= a=3575872/A%:inversetable!(A%*4)=(a/(1000000/us))*60000 0� : D� N"�"Code length = ";endcode-code X b� Soundtracker datafile l�"Loading module...("; v �("LOAD "+song$+" "+�~track) �track$="":B%=0 �� �1 � (track?B%)<>0 � track$+=�(track?B%):B%+=1 ��(track?B%)=0 ��;track$;")" � �:� Find length of tune data by looking through patterns �high%=0 �� A%=0 � 127 �5 � track?(&1D8+A%)>high% � high%=track?(&1D8+A%) �� �high%+=1 � � Convert samples A%=track+&258+(high%*1024) B%=track+tlen%-A% &�"Converting ";~(A%-track);"+";~B% * � convert 4 >samplei=track+&14 Hspoint=A%:samples=track R \.�'"Nr Name Length Volume" f-�"-- -------------------- ------- ------" p� A%=0 � 14 z sampleo=samplei+(A%*&1E) � name$="":B%=0 � � �4 � (sampleo?B%)<>0 name$+=�(sampleo?B%):B%+=1 � �(sampleo?B%)=0 � B%=20 � � name$<>"" � �. len%=2*((sampleo?22)*256+(sampleo?23)) �* vol%=(sampleo?24)*256+(sampleo?25) �2 �0);~(A%+1);�3);name$;�24);len%;�32);vol% �' sampleloc!(A%*4)=spoint-samples � spoint+=len% � � �� �&�" -------" B�" ";(spoint-samples-&258-(high%*1024)) � Store length of tune $info!4=track?&1D6-1 . 8�"Tune length = ";info!4+1 B L� � �killsound:�:� V� Get things in motion! `� installsound j �"<Space> to reselect tune"' t?�0,TL%-2);"Position:00";info!8;�30,TL%-2);"Pattern:";!info ~� A%=0 � 3 �l �0,TL%+A%);"Voice:";A%;" Last instrument:";~current?A%;" Pitch:0000";~ourinf!(32*A%+4);" Effect:0" �� �� �+�"Voice:4,5,6,7 not available on Amiga" �� � Ȗ:� intr �3 �9,TL%-2);info!8;" ";�38,TL%-2);!info;" " � � A%=0 � 3 �l �25,TL%+A%);~current?A%;�34,TL%+A%);~ourinf!(32*A%+4);" ";�48,TL%+A%);(effecttype!(A%*4))>>8;" " � � ���(0)=32 �� �� killsound �� �� � ��cli �(song$) � �
00000000 0d 00 0a 0f f4 20 3e 50 6c 61 79 4d 6f 64 41 0d |..... >PlayModA.| 00000010 00 14 05 f4 0d 00 1e 4b f4 20 2e 2d 2d 2d 2d 2d |.......K. .-----| 00000020 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000050 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2e 0d |--------------..| 00000060 00 28 4b f4 20 7c 20 20 20 20 20 20 20 20 20 20 |.(K. | | 00000070 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000000a0 20 20 20 20 20 20 20 20 20 7c 0d 00 32 4b f4 20 | |..2K. | 000000b0 7c 20 53 79 73 74 65 6d 20 49 6e 74 65 72 72 75 || System Interru| 000000c0 70 74 20 53 6f 75 6e 64 54 72 61 63 6b 65 72 6d |pt SoundTrackerm| 000000d0 6f 64 75 6c 65 20 70 6c 61 79 72 6f 75 74 69 6e |odule playroutin| 000000e0 65 20 20 20 20 20 20 56 65 72 73 69 6f 6e 20 32 |e Version 2| 000000f0 2e 30 33 20 7c 0d 00 3c 4b f4 20 7c 20 20 20 20 |.03 |..<K. | | 00000100 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c | || 00000140 0d 00 46 4b f4 20 7c 20 28 63 29 31 39 38 39 20 |..FK. | (c)1989 | 00000150 48 75 67 6f 20 46 69 65 6e 6e 65 73 20 28 30 34 |Hugo Fiennes (04| 00000160 35 38 29 20 34 33 35 34 39 20 65 76 65 6e 69 6e |58) 43549 evenin| 00000170 67 73 20 20 20 20 20 20 20 20 20 20 20 20 32 39 |gs 29| 00000180 2d 4a 75 6e 2d 31 39 38 39 20 7c 0d 00 50 4b f4 |-Jun-1989 |..PK.| 00000190 20 7c 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | | 000001a0 20 20 20 20 20 20 20 20 28 30 34 35 38 29 20 34 | (0458) 4| 000001b0 37 36 30 38 20 64 61 74 61 20 28 33 30 30 2d 32 |7608 data (300-2| 000001c0 34 30 30 62 61 75 64 29 20 20 20 20 20 20 20 20 |400baud) | 000001d0 20 20 20 20 20 7c 0d 00 5a 4b f4 20 60 2d 2d 2d | |..ZK. `---| 000001e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000220 27 0d 00 64 05 f4 0d 00 6e 4a f4 20 53 6e 61 69 |'..d....nJ. Snai| 00000230 6c 6d 61 69 6c 3a 20 48 75 67 6f 20 46 69 65 6e |lmail: Hugo Fien| 00000240 6e 65 73 2c 20 31 32 20 48 6f 75 73 6d 61 6e 20 |nes, 12 Housman | 00000250 52 6f 61 64 2c 20 53 74 72 65 65 74 2c 20 53 6f |Road, Street, So| 00000260 6d 65 72 73 65 74 2c 20 42 41 31 36 20 4f 53 44 |merset, BA16 OSD| 00000270 0d 00 78 05 f4 0d 00 82 4a f4 20 50 72 65 73 74 |..x.....J. Prest| 00000280 65 6c 20 20 3a 20 30 34 35 38 34 37 36 30 38 20 |el : 045847608 | 00000290 20 20 20 20 20 20 43 69 78 3a 20 6a 70 61 78 74 | Cix: jpaxt| 000002a0 6f 6e 20 20 20 20 20 20 20 20 20 53 49 44 3a 20 |on SID: | 000002b0 31 30 31 32 20 28 43 6f 6d 6d 62 61 73 65 29 0d |1012 (Commbase).| 000002c0 00 8c 3f f4 20 20 20 20 20 20 20 20 20 20 20 20 |..?. | 000002d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 000002f0 20 20 20 20 20 20 20 20 20 26 31 31 30 30 0d 00 | &1100..| 00000300 96 47 f4 20 54 68 69 73 20 63 6f 64 65 20 69 73 |.G. This code is| 00000310 20 70 75 62 6c 69 63 20 64 6f 6d 61 69 6e 20 61 | public domain a| 00000320 6e 64 20 4d 41 59 20 4e 4f 54 20 42 45 20 53 4f |nd MAY NOT BE SO| 00000330 4c 44 20 4f 52 20 49 4e 43 4c 55 44 45 44 20 49 |LD OR INCLUDED I| 00000340 4e 20 41 4e 59 0d 00 a0 42 f4 20 50 52 4f 44 55 |N ANY...B. PRODU| 00000350 43 54 20 54 48 41 54 20 57 49 4c 4c 20 42 45 20 |CT THAT WILL BE | 00000360 53 4f 4c 44 20 57 49 54 48 4f 55 54 20 50 52 49 |SOLD WITHOUT PRI| 00000370 4f 52 20 50 45 52 4d 49 53 53 49 4f 4e 20 46 52 |OR PERMISSION FR| 00000380 4f 4d 20 4d 4f 49 21 0d 00 aa 05 f4 0d 00 b4 47 |OM MOI!........G| 00000390 f4 20 59 6f 75 20 6d 61 79 20 63 6f 70 79 20 61 |. You may copy a| 000003a0 6e 64 20 64 69 73 74 72 69 62 75 74 65 20 74 68 |nd distribute th| 000003b0 69 73 20 63 6f 64 65 20 61 73 20 6c 6f 6e 67 20 |is code as long | 000003c0 61 73 20 79 6f 75 20 64 6f 6e 27 74 20 6d 6f 64 |as you don't mod| 000003d0 69 66 79 0d 00 be 45 f4 20 74 68 65 20 63 6f 70 |ify...E. the cop| 000003e0 79 20 79 6f 75 20 70 61 73 73 20 6f 6e 3a 20 61 |y you pass on: a| 000003f0 6e 79 20 69 6d 70 72 6f 76 65 6d 65 6e 74 73 2c |ny improvements,| 00000400 20 65 74 63 20 73 68 6f 75 6c 64 20 62 65 20 73 | etc should be s| 00000410 65 6e 74 20 62 61 63 6b 0d 00 c8 2c f4 20 74 6f |ent back...,. to| 00000420 20 6d 65 20 73 6f 20 49 20 63 61 6e 20 6d 6f 64 | me so I can mod| 00000430 69 66 79 20 74 68 65 20 6d 61 73 74 65 72 20 63 |ify the master c| 00000440 6f 70 79 2e 0d 00 d2 05 f4 0d 00 dc 47 f4 20 49 |opy.........G. I| 00000450 66 20 79 6f 75 20 64 6f 20 77 72 69 74 65 20 61 |f you do write a| 00000460 6e 79 20 64 65 6d 6f 73 2c 20 6f 72 20 6f 74 68 |ny demos, or oth| 00000470 65 72 20 70 2e 64 2e 20 73 2f 77 20 74 68 61 74 |er p.d. s/w that| 00000480 20 75 73 65 73 20 74 68 69 73 20 63 6f 64 65 2c | uses this code,| 00000490 0d 00 e6 1c f4 20 70 6c 65 61 73 65 20 73 65 6e |..... please sen| 000004a0 64 20 6d 65 20 61 20 63 6f 70 79 21 0d 00 f0 05 |d me a copy!....| 000004b0 f4 0d 00 fa 47 f4 20 54 68 69 73 20 76 65 72 73 |....G. This vers| 000004c0 69 6f 6e 20 77 69 6c 6c 20 70 6c 61 79 20 61 6c |ion will play al| 000004d0 6d 6f 73 74 20 61 6e 79 20 27 72 69 70 70 65 64 |most any 'ripped| 000004e0 27 20 6d 6f 64 75 6c 65 20 6f 72 20 6d 6f 64 75 |' module or modu| 000004f0 6c 65 20 73 61 76 65 64 0d 01 04 21 f4 20 4d 61 |le saved...!. Ma| 00000500 73 74 65 72 53 6f 75 6e 64 54 72 61 63 6b 65 72 |sterSoundTracker| 00000510 20 76 31 20 2d 20 76 32 2e 0d 01 0e 05 f4 0d 01 | v1 - v2........| 00000520 18 05 3a 0d 01 22 22 f4 20 52 65 73 65 72 76 65 |..:.."". Reserve| 00000530 20 73 70 61 63 65 20 66 6f 72 20 74 68 65 20 6d | space for the m| 00000540 6f 64 75 6c 65 0d 01 2c 11 de 20 63 6f 64 65 20 |odule..,.. code | 00000550 35 30 30 30 30 30 0d 01 31 0a 54 4c 25 3d 32 36 |500000..1.TL%=26| 00000560 0d 01 36 04 0d 01 40 06 2a 2e 0d 01 4a 18 e8 27 |..6...@.*...J..'| 00000570 22 4d 6f 64 75 6c 65 4e 61 6d 65 3a 22 73 6f 6e |"ModuleName:"son| 00000580 67 24 0d 01 4f 20 20 e7 20 c0 73 6f 6e 67 24 2c |g$..O . .song$,| 00000590 31 29 3d 22 2a 22 20 f2 63 6c 69 3a e5 20 8d 44 |1)="*" .cli:. .D| 000005a0 4a 41 0d 01 54 04 0d 01 5e 2a f4 20 54 6f 74 61 |JA..T...^*. Tota| 000005b0 6c 20 6c 65 6e 67 74 68 20 66 6f 72 20 73 6f 75 |l length for sou| 000005c0 6e 64 74 72 61 63 6b 65 72 20 6d 6f 64 75 6c 65 |ndtracker module| 000005d0 0d 01 68 1d 41 25 3d 8e 73 6f 6e 67 24 3a 74 6c |..h.A%=.song$:tl| 000005e0 65 6e 25 3d a2 23 41 25 3a d9 23 41 25 0d 01 72 |en%=.#A%:.#A%..r| 000005f0 04 0d 01 7c 48 f4 20 4e 75 6d 62 65 72 20 6f 66 |...|H. Number of| 00000600 20 75 73 20 62 65 74 77 65 65 6e 20 73 61 6d 70 | us between samp| 00000610 6c 65 73 2e 20 50 72 6f 67 72 61 6d 20 66 61 6c |les. Program fal| 00000620 6c 73 20 6f 76 65 72 20 61 74 20 64 65 6c 61 79 |ls over at delay| 00000630 73 20 6f 66 20 6c 65 73 73 0d 01 86 21 f4 20 74 |s of less...!. t| 00000640 68 65 6e 20 31 30 75 73 20 28 31 30 30 6b 48 7a |hen 10us (100kHz| 00000650 2f 63 68 61 6e 6e 65 6c 29 2e 0d 01 90 09 75 73 |/channel).....us| 00000660 3d 33 34 0d 01 9a 04 0d 01 a4 1a f1 27 22 41 73 |=34.........'"As| 00000670 73 65 6d 62 6c 69 6e 67 20 63 6f 64 65 2e 2e 2e |sembling code...| 00000680 22 0d 01 ae 0c e3 43 3d 30 b8 32 88 32 0d 01 b8 |".....C=0.2.2...| 00000690 0b 50 25 3d 63 6f 64 65 0d 01 c2 09 5b 4f 50 54 |.P%=code....[OPT| 000006a0 43 0d 01 cc 4d 3b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |C...M;----------| 000006b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000006e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 01 |--------------..| 000006f0 d6 4b 3b 20 53 6f 75 6e 64 74 72 61 63 6b 65 72 |.K; Soundtracker| 00000700 20 70 6c 61 79 72 6f 75 74 69 6e 65 20 20 20 20 | playroutine | 00000710 20 20 20 20 20 20 20 76 32 2e 32 20 57 69 74 68 | v2.2 With| 00000720 20 70 6f 72 74 61 6d 65 6e 74 6f 2c 73 70 65 65 | portamento,spee| 00000730 64 20 63 68 61 6e 67 65 2c 0d 01 e0 4a 3b 20 20 |d change,...J; | 00000740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000760 20 20 20 20 20 20 20 76 6f 6c 75 6d 65 20 63 6f | volume co| 00000770 6e 74 72 6f 6c 2c 70 61 74 74 65 72 6e 20 62 72 |ntrol,pattern br| 00000780 65 61 6b 0d 01 ea 4d 3b 2d 2d 2d 2d 2d 2d 2d 2d |eak...M;--------| 00000790 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000007d0 0d 01 f4 04 0d 01 fe 09 2e 46 69 6c 6c 0d 02 08 |.........Fill...| 000007e0 13 41 44 52 20 20 20 52 38 2c 6f 75 72 69 6e 66 |.ADR R8,ourinf| 000007f0 0d 02 12 18 41 44 44 20 20 20 52 38 2c 52 38 2c |....ADD R8,R8,| 00000800 52 37 2c 4c 53 4c 23 35 0d 02 1c 14 4c 44 4d 49 |R7,LSL#5....LDMI| 00000810 41 20 52 38 2c 7b 52 31 2d 52 36 7d 0d 02 26 0d |A R8,{R1-R6}..&.| 00000820 2e 46 69 6c 6c 4c 6f 6f 70 0d 02 30 05 5d 0d 02 |.FillLoop..0.]..| 00000830 3a 11 e3 20 73 6c 65 25 3d 31 20 b8 20 31 30 0d |:.. sle%=1 . 10.| 00000840 02 44 0a 5b 4f 50 54 20 43 0d 02 4e 2d 4c 44 52 |.D.[OPT C..N-LDR| 00000850 42 20 20 52 30 2c 5b 52 35 2c 52 31 2c 4c 53 52 |B R0,[R5,R1,LSR| 00000860 23 31 36 5d 20 3b 20 47 65 74 20 73 61 6d 70 6c |#16] ; Get sampl| 00000870 65 20 62 79 74 65 0d 02 58 2a 53 55 42 53 20 20 |e byte..X*SUBS | 00000880 52 30 2c 52 30 2c 52 36 20 20 20 20 20 20 20 20 |R0,R0,R6 | 00000890 20 20 3b 20 53 63 61 6c 65 20 76 6f 6c 75 6d 65 | ; Scale volume| 000008a0 0d 02 62 0f 4d 4f 56 4d 49 20 52 30 2c 23 30 0d |..b.MOVMI R0,#0.| 000008b0 02 6c 2e 53 54 52 42 20 20 52 30 2c 5b 52 31 32 |.l.STRB R0,[R12| 000008c0 5d 2c 52 31 31 20 20 20 20 20 20 3b 20 50 75 74 |],R11 ; Put| 000008d0 20 69 6e 20 69 6e 20 62 75 66 66 65 72 0d 02 76 | in in buffer..v| 000008e0 28 41 44 44 20 20 20 52 31 2c 52 31 2c 52 32 20 |(ADD R1,R1,R2 | 000008f0 20 20 20 20 20 20 20 20 20 3b 20 41 64 64 20 6f | ; Add o| 00000900 66 66 73 65 74 0d 02 80 05 5d 0d 02 8a 05 ed 0d |ffset....]......| 00000910 02 94 0a 5b 4f 50 54 20 43 0d 02 9e 2a 43 4d 50 |...[OPT C...*CMP| 00000920 20 20 20 52 34 2c 52 31 2c 4c 53 52 23 31 36 20 | R4,R1,LSR#16 | 00000930 20 20 20 20 20 3b 20 45 6e 64 20 6f 66 20 6e 6f | ; End of no| 00000940 74 65 3f 0d 02 a8 0d 42 47 54 20 20 20 63 62 66 |te?....BGT cbf| 00000950 0d 02 b2 2c 4d 4f 56 53 20 20 52 31 2c 52 33 20 |...,MOVS R1,R3 | 00000960 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 59 65 | ; Ye| 00000970 73 2c 20 6c 6f 6f 70 20 62 61 63 6b 0d 02 bc 35 |s, loop back...5| 00000980 ec 51 20 52 32 2c 23 30 20 20 20 20 20 20 20 20 |.Q R2,#0 | 00000990 20 20 20 20 20 3b 20 49 66 20 6e 6f 20 6c 6f 6f | ; If no loo| 000009a0 70 69 6e 67 2c 20 6b 65 65 70 20 71 75 69 65 74 |ping, keep quiet| 000009b0 21 0d 02 c6 08 2e 63 62 66 0d 02 d0 31 43 4d 50 |!.....cbf...1CMP| 000009c0 20 20 20 52 31 32 2c 52 31 30 20 20 20 20 20 20 | R12,R10 | 000009d0 20 20 20 20 20 3b 20 45 6e 64 20 6f 66 20 62 75 | ; End of bu| 000009e0 66 66 65 72 20 66 69 6c 6c 3f 0d 02 da 32 42 4c |ffer fill?...2BL| 000009f0 54 20 20 20 46 69 6c 6c 4c 6f 6f 70 20 20 20 20 |T FillLoop | 00000a00 20 20 20 20 20 20 3b 20 4e 6f 70 65 2c 20 66 69 | ; Nope, fi| 00000a10 6c 6c 20 73 6f 6d 65 20 6d 6f 72 65 0d 02 e4 2d |ll some more...-| 00000a20 53 54 4d 49 41 20 52 38 2c 7b 52 31 2d 52 32 7d |STMIA R8,{R1-R2}| 00000a30 20 20 20 20 20 20 20 20 3b 20 53 61 76 65 20 72 | ; Save r| 00000a40 65 67 73 20 61 67 61 69 6e 0d 02 ee 04 0d 02 f8 |egs again.......| 00000a50 2a 4d 4f 56 20 20 20 52 30 2c 23 25 30 30 30 30 |*MOV R0,#%0000| 00000a60 31 30 30 30 20 20 20 20 20 3b 20 76 6f 69 63 65 |1000 ; voice| 00000a70 20 61 63 74 69 76 65 0d 03 02 34 4c 44 4d 46 44 | active...4LDMFD| 00000a80 20 52 31 33 21 2c 7b 50 43 7d 20 20 20 20 20 20 | R13!,{PC} | 00000a90 20 20 20 3b 20 2e 2e 61 6e 64 20 72 65 74 75 72 | ; ..and retur| 00000aa0 6e 20 74 6f 20 4c 65 76 65 6c 31 0d 03 0c 04 0d |n to Level1.....| 00000ab0 03 16 0b 2e 6f 75 72 69 6e 66 0d 03 20 3b 45 51 |....ourinf.. ;EQ| 00000ac0 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 |UD 0:EQUD 0:EQUD| 00000ad0 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 | 0:EQUD 0:EQUD 0| 00000ae0 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 3a 45 |:EQUD 0:EQUD 0:E| 00000af0 51 55 44 20 30 0d 03 2a 3b 45 51 55 44 20 30 3a |QUD 0..*;EQUD 0:| 00000b00 45 51 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 |EQUD 0:EQUD 0:EQ| 00000b10 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 |UD 0:EQUD 0:EQUD| 00000b20 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 | 0:EQUD 0:EQUD 0| 00000b30 0d 03 34 3b 45 51 55 44 20 30 3a 45 51 55 44 20 |..4;EQUD 0:EQUD | 00000b40 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 3a |0:EQUD 0:EQUD 0:| 00000b50 45 51 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 |EQUD 0:EQUD 0:EQ| 00000b60 55 44 20 30 3a 45 51 55 44 20 30 0d 03 3e 3b 45 |UD 0:EQUD 0..>;E| 00000b70 51 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 |QUD 0:EQUD 0:EQU| 00000b80 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 |D 0:EQUD 0:EQUD | 00000b90 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 3a |0:EQUD 0:EQUD 0:| 00000ba0 45 51 55 44 20 30 0d 03 48 04 0d 03 52 10 2e 63 |EQUD 0..H...R..c| 00000bb0 68 61 6e 6e 65 6c 6e 6f 74 65 0d 03 5c 1f 45 51 |hannelnote..\.EQ| 00000bc0 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 |UD 0:EQUD 0:EQUD| 00000bd0 20 30 3a 45 51 55 44 20 30 0d 03 66 04 0d 03 70 | 0:EQUD 0..f...p| 00000be0 0f 2e 65 66 66 65 63 74 74 79 70 65 0d 03 7a 1f |..effecttype..z.| 00000bf0 45 51 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 |EQUD 0:EQUD 0:EQ| 00000c00 55 44 20 30 3a 45 51 55 44 20 30 0d 03 84 04 0d |UD 0:EQUD 0.....| 00000c10 03 8e 09 2e 69 6e 66 6f 0d 03 98 23 45 51 55 44 |....info...#EQUD| 00000c20 20 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 | 0 | 00000c30 20 3b 20 50 6f 73 69 74 69 6f 6e 0d 03 a2 29 45 | ; Position...)E| 00000c40 51 55 44 20 20 30 20 20 20 20 20 20 20 20 20 20 |QUD 0 | 00000c50 20 20 20 20 3b 20 50 61 74 74 65 72 6e 20 6c 65 | ; Pattern le| 00000c60 6e 67 74 68 0d 03 ac 28 45 51 55 44 20 20 30 20 |ngth...(EQUD 0 | 00000c70 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 | ; S| 00000c80 65 71 75 65 6e 63 65 20 70 6f 73 6e 0d 03 b6 04 |equence posn....| 00000c90 0d 03 c0 0c 2e 73 65 71 62 61 73 65 0d 03 ca 28 |.....seqbase...(| 00000ca0 45 51 55 44 20 20 26 31 44 38 20 20 20 20 20 20 |EQUD &1D8 | 00000cb0 20 20 20 20 20 3b 20 53 65 71 75 65 6e 63 65 20 | ; Sequence | 00000cc0 62 61 73 65 0d 03 d4 04 0d 03 de 0c 2e 74 72 6b |base.........trk| 00000cd0 62 61 73 65 0d 03 e8 2f 45 51 55 44 20 20 26 32 |base.../EQUD &2| 00000ce0 35 38 20 20 20 20 20 20 20 20 20 20 20 3b 20 50 |58 ; P| 00000cf0 61 74 74 65 72 6e 20 62 61 73 65 20 61 64 64 72 |attern base addr| 00000d00 65 73 73 0d 03 f2 04 0d 03 fc 0c 2e 63 75 72 72 |ess.........curr| 00000d10 65 6e 74 0d 04 06 2e 45 51 55 44 20 30 20 20 20 |ent....EQUD 0 | 00000d20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 43 75 | ; Cu| 00000d30 72 72 65 6e 74 20 69 6e 73 74 72 75 6d 65 6e 74 |rrent instrument| 00000d40 73 0d 04 10 04 0d 04 1a 0b 2e 63 6f 75 6e 74 69 |s.........counti| 00000d50 0d 04 24 28 45 51 55 44 20 30 20 20 20 20 20 20 |..$(EQUD 0 | 00000d60 20 20 20 20 20 20 20 20 20 3b 20 56 73 79 6e 63 | ; Vsync| 00000d70 20 63 6f 75 6e 74 65 72 0d 04 2e 04 0d 04 38 0a | counter......8.| 00000d80 2e 73 70 65 65 64 0d 04 42 34 45 51 55 44 20 36 |.speed..B4EQUD 6| 00000d90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00000da0 20 53 70 65 65 64 20 63 6f 75 6e 74 65 72 20 28 | Speed counter (| 00000db0 64 65 66 61 75 6c 74 3d 36 29 0d 04 4c 04 0d 04 |default=6)..L...| 00000dc0 56 2d 2e 69 6e 74 72 20 20 20 20 20 20 20 20 20 |V-.intr | 00000dd0 20 20 20 20 20 20 20 3b 20 43 61 6c 6c 65 64 20 | ; Called | 00000de0 65 76 65 72 79 20 56 53 59 4e 43 0d 04 60 1b 53 |every VSYNC..`.S| 00000df0 54 4d 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 |TMFD R13!,{R0-R1| 00000e00 32 2c 52 31 34 7d 0d 04 6a 25 4c 44 52 20 20 20 |2,R14}..j%LDR | 00000e10 52 31 2c 63 6f 75 6e 74 69 20 20 20 20 20 20 3b |R1,counti ;| 00000e20 20 4c 6f 61 64 20 63 6f 75 6e 74 0d 04 74 29 42 | Load count..t)B| 00000e30 4c 20 20 20 20 64 6f 65 66 66 65 63 74 20 20 20 |L doeffect | 00000e40 20 20 20 20 3b 20 44 6f 20 61 6e 79 20 65 66 66 | ; Do any eff| 00000e50 65 63 74 73 0d 04 7e 2c 4c 44 52 20 20 20 52 32 |ects..~,LDR R2| 00000e60 2c 73 70 65 65 64 20 20 20 20 20 20 20 3b 20 43 |,speed ; C| 00000e70 75 72 72 65 6e 74 20 70 6c 61 79 73 70 65 65 64 |urrent playspeed| 00000e80 0d 04 88 2a 41 44 44 20 20 20 52 31 2c 52 31 2c |...*ADD R1,R1,| 00000e90 23 31 20 20 20 20 20 20 20 3b 20 49 6e 63 72 65 |#1 ; Incre| 00000ea0 6d 65 6e 74 20 63 6f 75 6e 74 0d 04 92 29 43 4d |ment count...)CM| 00000eb0 50 20 20 20 52 31 2c 52 32 20 20 20 20 20 20 20 |P R1,R2 | 00000ec0 20 20 20 3b 20 52 65 61 64 79 20 74 6f 20 70 6c | ; Ready to pl| 00000ed0 61 79 3f 0d 04 9c 1b ec 51 20 52 31 2c 23 30 20 |ay?.....Q R1,#0 | 00000ee0 20 20 20 20 20 20 20 20 20 3b 20 59 65 73 0d 04 | ; Yes..| 00000ef0 a6 28 53 54 52 20 20 20 52 31 2c 63 6f 75 6e 74 |.(STR R1,count| 00000f00 69 20 20 20 20 20 20 3b 20 52 65 73 74 6f 72 65 |i ; Restore| 00000f10 20 63 6f 75 6e 74 0d 04 b0 3e 42 4c 45 51 20 20 | count...>BLEQ | 00000f20 70 6c 61 79 6e 6f 74 65 20 20 20 20 20 20 20 3b |playnote ;| 00000f30 20 49 66 20 73 6f 2c 20 7a 65 72 6f 20 63 6f 75 | If so, zero cou| 00000f40 6e 74 65 72 20 61 6e 64 20 70 6c 61 79 20 61 20 |nter and play a | 00000f50 6e 6f 74 65 0d 04 ba 1a 4c 44 4d 46 44 20 52 31 |note....LDMFD R1| 00000f60 33 21 2c 7b 52 30 2d 52 31 32 2c 50 43 7d 0d 04 |3!,{R0-R12,PC}..| 00000f70 c4 04 0d 04 ce 0d 2e 70 6c 61 79 6e 6f 74 65 0d |.......playnote.| 00000f80 04 d8 14 53 54 4d 46 44 20 52 31 33 21 2c 7b 52 |...STMFD R13!,{R| 00000f90 31 34 7d 0d 04 e2 2d 41 44 52 20 20 20 52 30 2c |14}...-ADR R0,| 00000fa0 69 6e 66 6f 20 20 20 20 20 20 20 20 3b 20 4c 6f |info ; Lo| 00000fb0 61 64 20 73 65 71 75 65 6e 63 65 20 69 6e 66 6f |ad sequence info| 00000fc0 0d 04 ec 14 4c 44 4d 49 41 20 52 30 2c 7b 52 37 |....LDMIA R0,{R7| 00000fd0 2d 52 39 7d 0d 04 f6 0d 2e 61 6e 64 61 67 61 69 |-R9}.....andagai| 00000fe0 6e 0d 05 00 13 53 54 4d 46 44 20 52 31 33 21 2c |n....STMFD R13!,| 00000ff0 7b 52 39 7d 0d 05 0a 12 42 4c 20 20 20 20 74 72 |{R9}....BL tr| 00001000 61 63 6b 61 64 72 0d 05 14 14 4c 44 52 20 20 20 |ackadr....LDR | 00001010 52 30 2c 73 65 71 62 61 73 65 0d 05 1e 32 41 44 |R0,seqbase...2AD| 00001020 44 20 20 20 52 31 31 2c 52 30 2c 52 31 30 20 20 |D R11,R0,R10 | 00001030 20 20 20 3b 20 52 31 31 3d 61 64 64 72 65 73 73 | ; R11=address| 00001040 20 6f 66 20 73 65 71 75 65 6e 63 65 0d 05 28 14 | of sequence..(.| 00001050 4c 44 52 20 20 20 52 30 2c 74 72 6b 62 61 73 65 |LDR R0,trkbase| 00001060 0d 05 32 2f 41 44 44 20 20 20 52 31 32 2c 52 30 |..2/ADD R12,R0| 00001070 2c 52 31 30 20 20 20 20 20 3b 20 52 31 32 3d 61 |,R10 ; R12=a| 00001080 64 64 72 65 73 73 20 6f 66 20 74 72 61 63 6b 0d |ddress of track.| 00001090 05 3c 04 0d 05 46 2f 4c 44 52 42 20 20 52 36 2c |.<...F/LDRB R6,| 000010a0 5b 52 31 31 2c 52 37 5d 20 20 20 20 3b 20 47 65 |[R11,R7] ; Ge| 000010b0 74 20 61 64 64 72 65 73 73 20 6f 66 20 6e 6f 74 |t address of not| 000010c0 65 73 0d 05 50 1b 41 44 44 20 20 20 52 31 32 2c |es..P.ADD R12,| 000010d0 52 31 32 2c 52 36 2c 4c 53 4c 23 31 30 0d 05 5a |R12,R6,LSL#10..Z| 000010e0 1a 41 44 44 20 20 20 52 31 32 2c 52 31 32 2c 52 |.ADD R12,R12,R| 000010f0 39 2c 4c 53 4c 23 34 0d 05 64 14 41 44 52 20 20 |9,LSL#4..d.ADR | 00001100 20 52 39 2c 63 75 72 72 65 6e 74 0d 05 6e 04 0d | R9,current..n..| 00001110 05 78 28 4d 4f 56 20 20 20 52 35 2c 23 33 20 20 |.x(MOV R5,#3 | 00001120 20 20 20 20 20 20 20 20 3b 20 44 6f 20 34 20 63 | ; Do 4 c| 00001130 68 61 6e 6e 65 6c 73 0d 05 82 0e 2e 64 6f 63 68 |hannels.....doch| 00001140 61 6e 6e 65 6c 0d 05 8c 1a 41 44 44 20 20 20 52 |annel....ADD R| 00001150 31 31 2c 52 31 32 2c 52 35 2c 4c 53 4c 23 32 0d |11,R12,R5,LSL#2.| 00001160 05 96 30 4c 44 52 42 20 20 52 36 2c 5b 52 31 31 |..0LDRB R6,[R11| 00001170 2c 23 32 5d 20 20 20 20 3b 20 47 65 74 20 69 6e |,#2] ; Get in| 00001180 73 74 72 75 6d 65 6e 74 20 6e 75 6d 62 65 72 0d |strument number.| 00001190 05 a0 22 4d 4f 56 53 20 20 52 36 2c 52 36 2c 4c |.."MOVS R6,R6,L| 000011a0 53 52 23 34 20 20 20 20 3b 20 53 68 75 66 66 6c |SR#4 ; Shuffl| 000011b0 65 0d 05 aa 49 53 54 52 4e 45 42 20 52 36 2c 5b |e...ISTRNEB R6,[| 000011c0 52 39 2c 52 35 5d 20 20 20 20 3b 20 49 66 20 69 |R9,R5] ; If i| 000011d0 74 27 73 20 7a 65 72 6f 2c 20 6c 6f 61 64 20 6c |t's zero, load l| 000011e0 61 73 74 20 69 6e 73 74 72 75 6d 65 6e 74 2c 20 |ast instrument, | 000011f0 65 6c 73 65 20 73 74 6f 72 65 0d 05 b4 24 4c 44 |else store...$LD| 00001200 52 45 51 42 20 52 36 2c 5b 52 39 2c 52 35 5d 20 |REQB R6,[R9,R5] | 00001210 20 20 20 3b 20 74 68 69 73 20 6f 6e 65 2e 0d 05 | ; this one...| 00001220 be 33 43 4d 50 20 20 20 52 36 2c 23 30 20 20 20 |.3CMP R6,#0 | 00001230 20 20 20 20 20 20 20 3b 20 41 6e 79 20 69 6e 73 | ; Any ins| 00001240 74 72 75 6d 65 6e 74 20 73 65 6c 65 63 74 65 64 |trument selected| 00001250 3f 0d 05 c8 2a 42 45 51 20 20 20 6e 65 78 74 63 |?...*BEQ nextc| 00001260 68 61 6e 6e 65 6c 20 20 20 20 3b 20 44 6f 20 6e |hannel ; Do n| 00001270 65 78 74 20 63 68 61 6e 6e 65 6c 0d 05 d2 3c 53 |ext channel...<S| 00001280 55 42 20 20 20 52 36 2c 52 36 2c 23 31 20 20 20 |UB R6,R6,#1 | 00001290 20 20 20 20 3b 20 43 6f 72 72 65 63 74 20 52 36 | ; Correct R6| 000012a0 20 66 6f 72 20 63 61 6c 63 75 6c 61 74 69 6f 6e | for calculation| 000012b0 73 20 62 65 6c 6f 77 0d 05 dc 24 4d 4f 56 20 20 |s below...$MOV | 000012c0 20 52 30 2c 52 31 31 20 20 20 20 20 20 20 20 20 | R0,R11 | 000012d0 3b 20 47 65 74 20 70 69 74 63 68 0d 05 e6 29 42 |; Get pitch...)B| 000012e0 4c 20 20 20 20 67 65 74 68 69 6c 6f 20 20 20 20 |L gethilo | 000012f0 20 20 20 20 3b 20 28 62 6c 6f 6f 64 79 20 36 38 | ; (bloody 68| 00001300 30 30 30 29 0d 05 f0 2c 4d 4f 56 53 20 20 52 34 |000)...,MOVS R4| 00001310 2c 52 30 20 20 20 20 20 20 20 20 20 20 3b 20 52 |,R0 ; R| 00001320 34 3d 73 74 61 6e 64 61 72 64 20 70 69 74 63 68 |4=standard pitch| 00001330 0d 05 fa 45 42 45 51 20 20 20 6e 65 78 74 63 68 |...EBEQ nextch| 00001340 61 6e 6e 65 6c 20 20 20 20 3b 20 42 75 74 20 69 |annel ; But i| 00001350 73 20 69 74 20 7a 65 72 6f 3f 20 49 66 20 73 6f |s it zero? If so| 00001360 2c 20 64 6f 6e 27 74 20 70 6c 61 79 20 61 6e 79 |, don't play any| 00001370 74 68 69 6e 67 0d 06 04 43 41 44 52 20 20 20 52 |thing...CADR R| 00001380 33 2c 63 68 61 6e 6e 65 6c 6e 6f 74 65 20 3b 20 |3,channelnote ; | 00001390 53 61 76 65 20 70 69 74 63 68 20 66 6f 72 20 61 |Save pitch for a| 000013a0 72 70 65 67 67 69 6f 2c 20 70 6f 72 74 61 6d 65 |rpeggio, portame| 000013b0 6e 74 6f 2c 20 65 74 63 0d 06 0e 1a 53 54 52 20 |nto, etc....STR | 000013c0 20 20 52 34 2c 5b 52 33 2c 52 35 2c 4c 53 4c 23 | R4,[R3,R5,LSL#| 000013d0 32 5d 0d 06 18 3b 41 44 52 20 20 20 52 33 2c 69 |2]...;ADR R3,i| 000013e0 6e 76 65 72 73 65 74 61 62 6c 65 20 3b 20 53 63 |nversetable ; Sc| 000013f0 61 6c 65 20 70 69 74 63 68 20 75 73 69 6e 67 20 |ale pitch using | 00001400 69 6e 76 65 72 73 65 20 74 61 62 6c 65 0d 06 22 |inverse table.."| 00001410 1a 4c 44 52 20 20 20 52 34 2c 5b 52 33 2c 52 34 |.LDR R4,[R3,R4| 00001420 2c 4c 53 4c 23 32 5d 0d 06 2c 13 41 44 52 20 20 |,LSL#2]..,.ADR | 00001430 20 52 32 2c 6f 75 72 69 6e 66 0d 06 36 3c 41 44 | R2,ourinf..6<AD| 00001440 44 20 20 20 52 32 2c 52 32 2c 52 35 2c 4c 53 4c |D R2,R2,R5,LSL| 00001450 23 35 20 3b 20 47 65 74 20 61 64 64 72 65 73 73 |#5 ; Get address| 00001460 20 6f 66 20 66 69 6c 6c 20 63 6f 6e 74 72 6f 6c | of fill control| 00001470 20 62 6c 6f 63 6b 0d 06 40 43 4d 4f 56 20 20 20 | block..@CMOV | 00001480 52 31 2c 23 30 20 20 20 20 20 20 20 20 20 20 3b |R1,#0 ;| 00001490 20 53 65 74 20 66 69 6c 6c 20 74 6f 20 73 74 61 | Set fill to sta| 000014a0 72 74 20 66 69 6c 6c 69 6e 67 20 61 74 20 7a 65 |rt filling at ze| 000014b0 72 6f 20 6f 66 66 73 65 74 0d 06 4a 14 53 54 52 |ro offset..J.STR| 000014c0 20 20 20 52 31 2c 5b 52 32 2c 23 30 5d 0d 06 54 | R1,[R2,#0]..T| 000014d0 24 53 54 52 20 20 20 52 34 2c 5b 52 32 2c 23 34 |$STR R4,[R2,#4| 000014e0 5d 20 20 20 20 20 3b 20 53 65 74 20 70 69 74 63 |] ; Set pitc| 000014f0 68 0d 06 5e 39 41 44 52 20 20 20 52 33 2c 73 61 |h..^9ADR R3,sa| 00001500 6d 70 6c 65 6c 6f 63 20 20 20 3b 20 41 64 64 72 |mpleloc ; Addr| 00001510 65 73 73 20 6f 66 20 73 61 6d 70 6c 65 20 6c 6f |ess of sample lo| 00001520 6f 6b 75 70 20 74 61 62 6c 65 0d 06 68 34 4c 44 |okup table..h4LD| 00001530 52 20 20 20 52 33 2c 5b 52 33 2c 52 36 2c 4c 53 |R R3,[R3,R6,LS| 00001540 4c 23 32 5d 20 3b 20 52 33 3d 41 63 74 75 61 6c |L#2] ; R3=Actual| 00001550 20 73 61 6d 70 6c 65 20 6f 66 66 73 65 74 0d 06 | sample offset..| 00001560 72 33 41 44 44 20 20 20 52 33 2c 52 33 2c 52 31 |r3ADD R3,R3,R1| 00001570 30 20 20 20 20 20 20 3b 20 52 33 3d 41 63 74 75 |0 ; R3=Actu| 00001580 61 6c 20 73 61 6d 70 6c 65 20 61 64 64 72 65 73 |al sample addres| 00001590 73 0d 06 7c 31 53 54 52 20 20 20 52 33 2c 5b 52 |s..|1STR R3,[R| 000015a0 32 2c 23 31 36 5d 20 20 20 20 3b 20 53 65 74 20 |2,#16] ; Set | 000015b0 69 6e 73 74 72 75 6d 65 6e 74 20 61 64 64 72 65 |instrument addre| 000015c0 73 73 0d 06 86 3f 41 44 44 20 20 20 52 33 2c 52 |ss...?ADD R3,R| 000015d0 31 30 2c 23 26 31 34 20 20 20 20 3b 20 4f 66 66 |10,#&14 ; Off| 000015e0 73 65 74 20 6f 66 20 73 61 6d 70 6c 65 20 70 6c |set of sample pl| 000015f0 61 79 20 64 61 74 61 20 66 72 6f 6d 20 62 61 73 |ay data from bas| 00001600 65 0d 06 90 33 4d 4f 56 20 20 20 52 31 2c 23 26 |e...3MOV R1,#&| 00001610 31 45 20 20 20 20 20 20 20 20 3b 20 28 73 61 6d |1E ; (sam| 00001620 70 6c 65 20 64 61 74 61 20 6d 75 6c 74 69 70 6c |ple data multipl| 00001630 69 65 72 29 0d 06 9a 37 4d 4c 41 20 20 20 52 33 |ier)...7MLA R3| 00001640 2c 52 36 2c 52 31 2c 52 33 20 20 20 20 3b 20 52 |,R6,R1,R3 ; R| 00001650 33 3d 69 6e 73 74 72 75 6d 65 6e 74 20 70 6c 61 |3=instrument pla| 00001660 79 20 64 61 74 61 20 62 61 73 65 0d 06 a4 2c 41 |y data base...,A| 00001670 44 44 20 20 20 52 30 2c 52 33 2c 23 26 31 43 20 |DD R0,R3,#&1C | 00001680 20 20 20 20 3b 20 47 65 74 20 72 65 70 65 61 74 | ; Get repeat| 00001690 20 6c 65 6e 67 74 68 0d 06 ae 11 42 4c 20 20 20 | length....BL | 000016a0 20 67 65 74 68 69 6c 6f 0d 06 b8 26 43 4d 50 20 | gethilo...&CMP | 000016b0 20 20 52 30 2c 23 31 20 20 20 20 20 20 20 20 20 | R0,#1 | 000016c0 20 3b 20 4e 6f 20 72 65 70 65 61 74 73 3f 0d 06 | ; No repeats?..| 000016d0 c2 31 42 45 51 20 20 20 6e 6f 72 65 70 20 20 20 |.1BEQ norep | 000016e0 20 20 20 20 20 20 20 3b 20 42 72 61 6e 63 68 20 | ; Branch | 000016f0 74 6f 20 74 68 65 20 6e 65 78 74 20 62 69 74 0d |to the next bit.| 00001700 06 cc 2f 4d 4f 56 20 20 20 52 31 2c 52 30 2c 4c |../MOV R1,R0,L| 00001710 53 4c 23 31 20 20 20 20 3b 20 78 32 20 66 6f 72 |SL#1 ; x2 for| 00001720 20 72 65 70 65 61 74 20 6c 65 6e 67 74 68 0d 06 | repeat length..| 00001730 d6 32 41 44 44 20 20 20 52 30 2c 52 33 2c 23 26 |.2ADD R0,R3,#&| 00001740 31 41 20 20 20 20 20 3b 20 47 65 74 20 72 65 70 |1A ; Get rep| 00001750 65 61 74 20 73 74 61 72 74 20 6f 66 66 73 65 74 |eat start offset| 00001760 0d 06 e0 11 42 4c 20 20 20 20 67 65 74 68 69 6c |....BL gethil| 00001770 6f 0d 06 ea 3c 41 44 44 20 20 20 52 30 2c 52 30 |o...<ADD R0,R0| 00001780 2c 52 31 20 20 20 20 20 20 20 3b 20 4d 61 6b 65 |,R1 ; Make| 00001790 20 6e 65 77 20 6c 65 6e 67 74 68 20 62 79 20 61 | new length by a| 000017a0 64 64 69 6e 67 20 74 68 65 20 74 77 6f 0d 06 f4 |dding the two...| 000017b0 25 53 54 52 20 20 20 52 30 2c 5b 52 32 2c 23 31 |%STR R0,[R2,#1| 000017c0 32 5d 20 20 20 20 3b 20 61 6e 64 20 73 65 74 20 |2] ; and set | 000017d0 69 74 0d 06 fe 14 41 44 44 20 20 20 52 30 2c 52 |it....ADD R0,R| 000017e0 33 2c 23 26 31 41 0d 07 08 30 42 4c 20 20 20 20 |3,#&1A...0BL | 000017f0 67 65 74 68 69 6c 6f 20 20 20 20 20 20 20 20 3b |gethilo ;| 00001800 20 47 65 74 20 73 74 61 72 74 20 72 65 70 65 61 | Get start repea| 00001810 74 20 70 6f 73 6e 0d 07 12 28 41 44 44 20 20 20 |t posn...(ADD | 00001820 52 30 2c 52 30 2c 23 31 20 20 20 20 20 20 20 3b |R0,R0,#1 ;| 00001830 20 6d 61 6b 65 20 6e 6f 6e 2d 7a 65 72 6f 0d 07 | make non-zero..| 00001840 1c 23 53 54 52 20 20 20 52 30 2c 5b 52 32 2c 23 |.#STR R0,[R2,#| 00001850 38 5d 20 20 20 20 20 3b 20 53 74 6f 72 65 20 69 |8] ; Store i| 00001860 74 0d 07 26 2f 42 20 20 20 20 20 6e 65 78 74 20 |t..&/B next | 00001870 20 20 20 20 20 20 20 20 20 20 3b 20 62 72 61 6e | ; bran| 00001880 63 68 20 6f 76 65 72 20 6e 65 78 74 20 62 69 74 |ch over next bit| 00001890 0d 07 30 0a 2e 6e 6f 72 65 70 0d 07 3a 14 41 44 |..0..norep..:.AD| 000018a0 44 20 20 20 52 30 2c 52 33 2c 23 26 31 36 0d 07 |D R0,R3,#&16..| 000018b0 44 37 42 4c 20 20 20 20 67 65 74 68 69 6c 6f 20 |D7BL gethilo | 000018c0 20 20 20 20 20 20 20 3b 20 47 65 74 20 74 68 65 | ; Get the| 000018d0 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 73 | length of the s| 000018e0 61 6d 70 6c 65 0d 07 4e 27 4d 4f 56 20 20 20 52 |ample..N'MOV R| 000018f0 30 2c 52 30 2c 4c 53 4c 23 31 20 20 20 20 3b 20 |0,R0,LSL#1 ; | 00001900 78 32 20 6f 66 20 63 6f 75 72 73 65 0d 07 58 25 |x2 of course..X%| 00001910 53 54 52 20 20 20 52 30 2c 5b 52 32 2c 23 31 32 |STR R0,[R2,#12| 00001920 5d 20 20 20 20 3b 20 61 6e 64 20 73 65 74 20 69 |] ; and set i| 00001930 74 0d 07 62 14 41 44 44 20 20 20 52 30 2c 52 33 |t..b.ADD R0,R3| 00001940 2c 23 26 31 41 0d 07 6c 30 42 4c 20 20 20 20 67 |,#&1A..l0BL g| 00001950 65 74 68 69 6c 6f 20 20 20 20 20 20 20 20 3b 20 |ethilo ; | 00001960 47 65 74 20 73 74 61 72 74 20 72 65 70 65 61 74 |Get start repeat| 00001970 20 70 6f 73 6e 0d 07 76 23 53 54 52 20 20 20 52 | posn..v#STR R| 00001980 30 2c 5b 52 32 2c 23 38 5d 20 20 20 20 20 3b 20 |0,[R2,#8] ; | 00001990 53 74 6f 72 65 20 69 74 0d 07 80 36 2e 6e 65 78 |Store it...6.nex| 000019a0 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |t | 000019b0 20 3b 20 42 65 66 6f 72 65 20 77 65 20 67 6f 2c | ; Before we go,| 000019c0 20 64 6f 20 74 68 65 20 76 6f 6c 75 6d 65 0d 07 | do the volume..| 000019d0 8a 14 41 44 44 20 20 20 52 30 2c 52 33 2c 23 26 |..ADD R0,R3,#&| 000019e0 31 38 0d 07 94 25 42 4c 20 20 20 20 67 65 74 68 |18...%BL geth| 000019f0 69 6c 6f 20 20 20 20 20 20 20 20 3b 20 47 65 74 |ilo ; Get| 00001a00 20 76 6f 6c 75 6d 65 0d 07 9e 20 43 4d 50 20 20 | volume... CMP | 00001a10 20 52 30 2c 23 36 34 20 20 20 20 20 20 20 20 20 | R0,#64 | 00001a20 3b 20 4f 76 65 72 3f 0d 07 a8 22 4d 4f 56 47 45 |; Over?..."MOVGE| 00001a30 20 52 30 2c 23 36 33 20 20 20 20 20 20 20 20 20 | R0,#63 | 00001a40 3b 20 43 6f 72 72 65 63 74 0d 07 b2 27 41 44 52 |; Correct...'ADR| 00001a50 20 20 20 52 31 2c 76 6f 6c 74 61 62 20 20 20 20 | R1,voltab | 00001a60 20 20 3b 20 56 6f 6c 75 6d 65 20 74 61 62 6c 65 | ; Volume table| 00001a70 0d 07 bc 29 4c 44 52 42 20 20 52 30 2c 5b 52 31 |...)LDRB R0,[R1| 00001a80 2c 52 30 5d 20 20 20 20 20 3b 20 47 65 74 20 6e |,R0] ; Get n| 00001a90 65 77 20 76 6f 6c 75 6d 65 0d 07 c6 23 53 54 52 |ew volume...#STR| 00001aa0 20 20 20 52 30 2c 5b 52 32 2c 23 32 30 5d 20 20 | R0,[R2,#20] | 00001ab0 20 20 3b 20 53 74 6f 72 65 20 69 74 0d 07 d0 10 | ; Store it....| 00001ac0 2e 6e 65 78 74 63 68 61 6e 6e 65 6c 0d 07 da 35 |.nextchannel...5| 00001ad0 41 44 52 20 20 20 52 33 2c 65 66 66 65 63 74 74 |ADR R3,effectt| 00001ae0 79 70 65 20 20 3b 20 43 61 6e 63 65 6c 20 61 6e |ype ; Cancel an| 00001af0 79 20 63 75 72 72 65 6e 74 20 65 66 66 65 63 74 |y current effect| 00001b00 73 0d 07 e4 1a 4d 4f 56 20 20 20 52 34 2c 23 30 |s....MOV R4,#0| 00001b10 20 20 20 20 20 20 20 20 20 20 3b 0d 07 ee 1c 53 | ;....S| 00001b20 54 52 20 20 20 52 34 2c 5b 52 33 2c 52 35 2c 4c |TR R4,[R3,R5,L| 00001b30 53 4c 23 32 5d 20 3b 0d 07 f8 2c 42 4c 20 20 20 |SL#2] ;...,BL | 00001b40 20 65 66 66 65 63 74 63 68 65 63 6b 20 20 20 20 | effectcheck | 00001b50 3b 20 43 68 65 63 6b 20 66 6f 72 20 65 66 66 65 |; Check for effe| 00001b60 63 74 73 0d 08 02 33 53 55 42 53 20 20 52 35 2c |cts...3SUBS R5,| 00001b70 52 35 2c 23 31 20 20 20 20 20 20 20 3b 20 44 65 |R5,#1 ; De| 00001b80 63 72 65 6d 65 6e 74 20 63 68 61 6e 6e 65 6c 20 |crement channel | 00001b90 6e 75 6d 62 65 72 0d 08 0c 33 42 50 4c 20 20 20 |number...3BPL | 00001ba0 64 6f 63 68 61 6e 6e 65 6c 20 20 20 20 20 20 3b |dochannel ;| 00001bb0 20 4e 6f 70 65 2c 20 64 6f 20 61 6e 6f 74 68 65 | Nope, do anothe| 00001bc0 72 20 63 68 61 6e 6e 65 6c 0d 08 16 2b 4c 44 4d |r channel...+LDM| 00001bd0 46 44 20 52 31 33 21 2c 7b 52 39 7d 20 20 20 20 |FD R13!,{R9} | 00001be0 20 20 3b 20 47 65 74 20 6f 75 72 20 52 39 20 62 | ; Get our R9 b| 00001bf0 61 63 6b 21 0d 08 20 30 4c 44 52 20 20 20 52 30 |ack!.. 0LDR R0| 00001c00 2c 6a 75 6d 70 66 6c 61 67 20 20 20 20 3b 20 53 |,jumpflag ; S| 00001c10 6b 69 70 20 72 65 73 74 20 6f 66 20 70 61 74 74 |kip rest of patt| 00001c20 65 72 6e 3f 0d 08 2a 1a 43 4d 50 20 20 20 52 30 |ern?..*.CMP R0| 00001c30 2c 23 30 20 20 20 20 20 20 20 20 20 20 3b 0d 08 |,#0 ;..| 00001c40 34 1e 4d 4f 56 4e 45 20 52 39 2c 23 36 33 20 20 |4.MOVNE R9,#63 | 00001c50 20 20 20 20 20 20 20 3b 20 59 65 70 0d 08 3e 29 | ; Yep..>)| 00001c60 4d 4f 56 4e 45 20 52 30 2c 23 30 20 20 20 20 20 |MOVNE R0,#0 | 00001c70 20 20 20 20 20 3b 20 52 65 73 65 74 20 74 68 65 | ; Reset the| 00001c80 20 66 6c 61 67 0d 08 48 1a 53 54 52 4e 45 20 52 | flag..H.STRNE R| 00001c90 30 2c 6a 75 6d 70 66 6c 61 67 20 20 20 20 3b 0d |0,jumpflag ;.| 00001ca0 08 52 34 41 44 44 20 20 20 52 39 2c 52 39 2c 23 |.R4ADD R9,R9,#| 00001cb0 31 20 20 20 20 20 20 20 3b 20 49 6e 63 72 65 6d |1 ; Increm| 00001cc0 65 6e 74 20 73 65 71 75 65 6e 63 65 20 6e 75 6d |ent sequence num| 00001cd0 62 65 72 0d 08 5c 2d 43 4d 50 20 20 20 52 39 2c |ber..\-CMP R9,| 00001ce0 23 36 34 20 20 20 20 20 20 20 20 20 3b 20 46 69 |#64 ; Fi| 00001cf0 6e 69 73 68 65 64 20 73 65 71 75 65 6e 63 65 3f |nished sequence?| 00001d00 0d 08 66 43 42 4e 45 20 20 20 76 65 6e 64 20 20 |..fCBNE vend | 00001d10 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 6e 6f | ; If no| 00001d20 74 2c 20 64 6f 6e 27 74 20 67 6f 20 6f 6e 74 6f |t, don't go onto| 00001d30 20 6e 65 78 74 20 70 61 74 74 65 72 6e 20 65 6e | next pattern en| 00001d40 74 72 79 0d 08 70 0f 4d 4f 56 20 20 20 52 39 2c |try..p.MOV R9,| 00001d50 23 30 0d 08 7a 31 41 44 44 20 20 20 52 37 2c 52 |#0..z1ADD R7,R| 00001d60 37 2c 23 31 20 20 20 20 20 20 20 3b 20 49 6e 63 |7,#1 ; Inc| 00001d70 72 65 6d 65 6e 74 20 70 61 74 74 65 72 6e 20 70 |rement pattern p| 00001d80 6f 73 6e 0d 08 84 27 43 4d 50 20 20 20 52 37 2c |osn...'CMP R7,| 00001d90 52 38 20 20 20 20 20 20 20 20 20 20 3b 20 45 6e |R8 ; En| 00001da0 64 20 6f 66 20 73 6f 6e 67 3f 0d 08 8e 2f 4d 4f |d of song?.../MO| 00001db0 56 47 54 20 52 37 2c 23 30 20 20 20 20 20 20 20 |VGT R7,#0 | 00001dc0 20 20 20 3b 20 2e 2e 2e 61 6e 64 20 61 67 61 69 | ; ...and agai| 00001dd0 6e 2c 20 66 6f 6c 6b 73 21 0d 08 98 09 2e 76 65 |n, folks!.....ve| 00001de0 6e 64 0d 08 a2 11 41 44 52 20 20 20 52 30 2c 69 |nd....ADR R0,i| 00001df0 6e 66 6f 0d 08 ac 2b 53 54 4d 49 41 20 52 30 2c |nfo...+STMIA R0,| 00001e00 7b 52 37 2d 52 39 7d 20 20 20 20 20 3b 20 53 74 |{R7-R9} ; St| 00001e10 6f 72 65 20 6e 65 77 20 76 61 6c 75 65 73 0d 08 |ore new values..| 00001e20 b6 25 4c 44 4d 46 44 20 52 31 33 21 2c 7b 50 43 |.%LDMFD R13!,{PC| 00001e30 7d 20 20 20 20 20 20 3b 20 41 6e 64 20 72 65 74 |} ; And ret| 00001e40 75 72 6e 0d 08 c0 04 0d 08 ca 31 2e 67 65 74 68 |urn.......1.geth| 00001e50 69 6c 6f 20 20 20 20 20 20 20 20 20 20 20 20 20 |ilo | 00001e60 3b 20 47 65 74 73 20 48 69 2d 4c 6f 20 73 74 6f |; Gets Hi-Lo sto| 00001e70 72 65 64 20 69 6e 66 6f 0d 08 d4 2d 53 54 4d 46 |red info...-STMF| 00001e80 44 20 52 31 33 21 2c 7b 52 31 7d 20 20 20 20 20 |D R13!,{R1} | 00001e90 20 3b 20 52 30 3d 61 64 64 72 65 73 73 20 6f 66 | ; R0=address of| 00001ea0 20 69 6e 66 6f 0d 08 de 28 4c 44 52 42 20 20 52 | info...(LDRB R| 00001eb0 31 2c 5b 52 30 2c 23 30 5d 20 20 20 20 20 3b 20 |1,[R0,#0] ; | 00001ec0 47 65 74 20 68 69 67 68 20 62 79 74 65 0d 08 e8 |Get high byte...| 00001ed0 26 4c 44 52 42 20 20 52 30 2c 5b 52 30 2c 23 31 |&LDRB R0,[R0,#1| 00001ee0 5d 20 20 20 20 20 3b 20 47 65 74 20 6c 6f 20 62 |] ; Get lo b| 00001ef0 79 74 65 0d 08 f2 23 84 52 20 20 20 52 30 2c 52 |yte...#.R R0,R| 00001f00 30 2c 52 31 2c 4c 53 4c 23 38 20 3b 20 4d 69 78 |0,R1,LSL#8 ; Mix| 00001f10 20 74 68 65 20 32 0d 08 fc 25 4c 44 4d 46 44 20 | the 2...%LDMFD | 00001f20 52 31 33 21 2c 7b 52 31 7d 20 20 20 20 20 20 3b |R13!,{R1} ;| 00001f30 20 72 65 73 74 6f 72 65 20 52 31 0d 09 06 21 4d | restore R1...!M| 00001f40 4f 56 20 20 20 50 43 2c 52 31 34 20 20 20 20 20 |OV PC,R14 | 00001f50 20 20 20 20 3b 20 72 65 74 75 72 6e 0d 09 10 04 | ; return....| 00001f60 0d 09 1a 30 2e 65 66 66 65 63 74 63 68 65 63 6b |...0.effectcheck| 00001f70 20 20 20 20 20 20 20 20 20 3b 20 43 68 65 63 6b | ; Check| 00001f80 20 66 6f 72 20 61 6e 79 20 65 66 66 65 63 74 73 | for any effects| 00001f90 0d 09 24 23 4c 44 52 42 20 20 52 36 2c 5b 52 31 |..$#LDRB R6,[R1| 00001fa0 31 2c 23 33 5d 20 20 20 20 3b 20 47 65 74 20 69 |1,#3] ; Get i| 00001fb0 6e 66 6f 0d 09 2e 2c 4c 44 52 42 20 20 52 34 2c |nfo...,LDRB R4,| 00001fc0 5b 52 31 31 2c 23 32 5d 20 20 20 20 3b 20 47 65 |[R11,#2] ; Ge| 00001fd0 74 20 65 66 66 65 63 74 20 6e 75 6e 62 65 72 0d |t effect nunber.| 00001fe0 09 38 18 80 20 20 20 52 34 2c 52 34 2c 23 26 46 |.8.. R4,R4,#&F| 00001ff0 20 20 20 20 20 20 3b 0d 09 42 29 43 4d 50 20 20 | ;..B)CMP | 00002000 20 52 34 2c 23 26 43 20 20 20 20 20 20 20 20 20 | R4,#&C | 00002010 3b 20 56 6f 6c 75 6d 65 20 63 68 61 6e 67 65 3f |; Volume change?| 00002020 0d 09 4c 1d 42 4e 45 20 20 20 65 66 66 20 20 20 |..L.BNE eff | 00002030 20 20 20 20 20 20 20 20 20 3b 20 4e 6f 0d 09 56 | ; No..V| 00002040 20 43 4d 50 20 20 20 52 36 2c 23 36 34 20 20 20 | CMP R6,#64 | 00002050 20 20 20 20 20 20 3b 20 4f 76 65 72 3f 0d 09 60 | ; Over?..`| 00002060 22 4d 4f 56 47 45 20 52 36 2c 23 36 33 20 20 20 |"MOVGE R6,#63 | 00002070 20 20 20 20 20 20 3b 20 43 6f 72 72 65 63 74 0d | ; Correct.| 00002080 09 6a 1a 41 44 52 20 20 20 52 31 2c 76 6f 6c 74 |.j.ADR R1,volt| 00002090 61 62 20 20 20 20 20 20 3b 0d 09 74 2a 4c 44 52 |ab ;..t*LDR| 000020a0 42 20 20 52 30 2c 5b 52 31 2c 52 36 5d 20 20 20 |B R0,[R1,R6] | 000020b0 20 20 3b 20 47 65 74 20 72 69 67 68 74 20 75 6e | ; Get right un| 000020c0 69 74 73 0d 09 7e 2d 41 44 52 20 20 20 52 31 2c |its..~-ADR R1,| 000020d0 6f 75 72 69 6e 66 20 20 20 20 20 20 3b 20 46 69 |ourinf ; Fi| 000020e0 6e 64 20 74 61 62 6c 65 20 61 64 64 72 65 73 73 |nd table address| 000020f0 0d 09 88 1a 41 44 44 20 20 20 52 31 2c 52 31 2c |....ADD R1,R1,| 00002100 52 35 2c 4c 53 4c 23 35 20 3b 0d 09 92 2b 53 54 |R5,LSL#5 ;...+ST| 00002110 52 20 20 20 52 30 2c 5b 52 31 2c 23 32 30 5d 20 |R R0,[R1,#20] | 00002120 20 20 20 3b 20 53 74 6f 72 65 20 6e 65 77 20 76 | ; Store new v| 00002130 6f 6c 75 6d 65 0d 09 9c 10 4d 4f 56 20 20 20 50 |olume....MOV P| 00002140 43 2c 52 31 34 0d 09 a6 08 2e 65 66 66 0d 09 b0 |C,R14.....eff...| 00002150 29 43 4d 50 20 20 20 52 34 2c 23 26 44 20 20 20 |)CMP R4,#&D | 00002160 20 20 20 20 20 20 3b 20 50 61 74 74 65 72 6e 20 | ; Pattern | 00002170 62 72 65 61 6b 3f 0d 09 ba 31 53 54 52 45 51 20 |break?...1STREQ | 00002180 52 34 2c 6a 75 6d 70 66 6c 61 67 20 20 20 20 3b |R4,jumpflag ;| 00002190 20 4a 75 6d 70 20 74 6f 20 65 6e 64 20 6f 66 20 | Jump to end of | 000021a0 70 61 74 74 65 72 6e 0d 09 c4 17 ec 51 20 50 43 |pattern.....Q PC| 000021b0 2c 52 31 34 20 20 20 20 20 20 20 20 20 3b 0d 09 |,R14 ;..| 000021c0 ce 28 43 4d 50 20 20 20 52 34 2c 23 26 46 20 20 |.(CMP R4,#&F | 000021d0 20 20 20 20 20 20 20 3b 20 43 68 61 6e 67 65 20 | ; Change | 000021e0 73 70 65 65 64 3f 0d 09 d8 1d 42 4e 45 20 20 20 |speed?....BNE | 000021f0 65 66 66 31 20 20 20 20 20 20 20 20 20 20 20 3b |eff1 ;| 00002200 20 4e 6f 0d 09 e2 27 80 20 20 20 52 36 2c 52 36 | No...'. R6,R6| 00002210 2c 23 26 46 20 20 20 20 20 20 3b 20 4d 61 73 6b |,#&F ; Mask| 00002220 20 6e 65 77 20 73 70 65 65 64 0d 09 ec 23 53 54 | new speed...#ST| 00002230 52 20 20 20 52 36 2c 73 70 65 65 64 20 20 20 20 |R R6,speed | 00002240 20 20 20 3b 20 53 74 6f 72 65 20 69 74 0d 09 f6 | ; Store it...| 00002250 21 4d 4f 56 20 20 20 50 43 2c 52 31 34 20 20 20 |!MOV PC,R14 | 00002260 20 20 20 20 20 20 3b 20 52 65 74 75 72 6e 0d 0a | ; Return..| 00002270 00 09 2e 65 66 66 31 0d 0a 0a 29 43 4d 50 20 20 |...eff1...)CMP | 00002280 20 52 34 2c 23 31 20 20 20 20 20 20 20 20 20 20 | R4,#1 | 00002290 3b 20 50 6f 72 74 61 6d 65 6e 74 6f 20 75 70 3f |; Portamento up?| 000022a0 0d 0a 14 1f 42 4c 54 20 20 20 65 66 66 32 20 20 |....BLT eff2 | 000022b0 20 20 20 20 20 20 20 20 20 3b 20 4e 6f 70 65 0d | ; Nope.| 000022c0 0a 1e 23 43 4d 50 20 20 20 52 34 2c 23 32 20 20 |..#CMP R4,#2 | 000022d0 20 20 20 20 20 20 20 20 3b 20 4f 72 20 64 6f 77 | ; Or dow| 000022e0 6e 3f 0d 0a 28 1f 42 47 54 20 20 20 65 66 66 32 |n?..(.BGT eff2| 000022f0 20 20 20 20 20 20 20 20 20 20 20 3b 20 4e 6f 70 | ; Nop| 00002300 65 0d 0a 32 27 84 52 20 20 20 52 36 2c 52 36 2c |e..2'.R R6,R6,| 00002310 52 34 2c 4c 53 4c 23 38 20 3b 20 4d 61 6b 65 20 |R4,LSL#8 ; Make | 00002320 6e 65 77 20 77 6f 72 64 0d 0a 3c 22 41 44 52 20 |new word..<"ADR | 00002330 20 20 52 33 2c 65 66 66 65 63 74 74 79 70 65 20 | R3,effecttype | 00002340 20 3b 20 53 61 76 65 20 69 74 0d 0a 46 1c 53 54 | ; Save it..F.ST| 00002350 52 20 20 20 52 36 2c 5b 52 33 2c 52 35 2c 4c 53 |R R6,[R3,R5,LS| 00002360 4c 23 32 5d 20 3b 0d 0a 50 21 4d 4f 56 20 20 20 |L#2] ;..P!MOV | 00002370 50 43 2c 52 31 34 20 20 20 20 20 20 20 20 20 3b |PC,R14 ;| 00002380 20 52 65 74 75 72 6e 0d 0a 5a 09 2e 65 66 66 32 | Return..Z..eff2| 00002390 0d 0a 64 21 4d 4f 56 20 20 20 50 43 2c 52 31 34 |..d!MOV PC,R14| 000023a0 20 20 20 20 20 20 20 20 20 3b 20 52 65 74 75 72 | ; Retur| 000023b0 6e 0d 0a 6e 04 0d 0a 78 4c 2e 64 6f 65 66 66 65 |n..n...xL.doeffe| 000023c0 63 74 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 |ct ; | 000023d0 44 6f 20 65 66 66 65 63 74 20 64 65 74 61 69 6c |Do effect detail| 000023e0 65 64 20 69 6e 20 27 65 66 66 65 63 74 74 79 70 |ed in 'effecttyp| 000023f0 65 27 20 28 52 31 3d 73 75 62 6e 6f 74 65 20 23 |e' (R1=subnote #| 00002400 29 0d 0a 82 25 4d 4f 56 20 20 20 52 35 2c 23 33 |)...%MOV R5,#3| 00002410 20 20 20 20 20 20 20 20 20 20 3b 20 34 20 63 68 | ; 4 ch| 00002420 61 6e 6e 65 6c 73 0d 0a 8c 25 41 44 52 20 20 20 |annels...%ADR | 00002430 52 32 2c 63 68 61 6e 6e 65 6c 6e 6f 74 65 20 3b |R2,channelnote ;| 00002440 20 41 6d 69 67 61 2d 6e 6f 74 65 0d 0a 96 2e 41 | Amiga-note....A| 00002450 44 52 20 20 20 52 33 2c 65 66 66 65 63 74 74 79 |DR R3,effectty| 00002460 70 65 20 20 3b 20 52 33 3d 65 66 66 65 63 74 74 |pe ; R3=effectt| 00002470 79 70 65 20 74 61 62 6c 65 0d 0a a0 39 41 44 52 |ype table...9ADR| 00002480 20 20 20 52 34 2c 69 6e 76 65 72 73 65 74 61 62 | R4,inversetab| 00002490 6c 65 20 3b 20 52 34 3d 69 6e 76 65 72 73 65 20 |le ; R4=inverse | 000024a0 70 69 74 63 68 20 6c 6f 6f 6b 75 70 20 74 61 62 |pitch lookup tab| 000024b0 6c 65 0d 0a aa 0b 2e 64 6f 65 66 66 31 0d 0a b4 |le.....doeff1...| 000024c0 47 41 44 52 20 20 20 52 38 2c 6f 75 72 69 6e 66 |GADR R8,ourinf| 000024d0 20 20 20 20 20 20 3b 20 43 61 6c 63 75 6c 61 74 | ; Calculat| 000024e0 65 20 61 64 64 72 65 73 73 20 6f 66 66 73 65 74 |e address offset| 000024f0 20 6f 66 20 76 6f 69 63 65 2d 69 6e 66 6f 20 74 | of voice-info t| 00002500 61 62 6c 65 0d 0a be 1a 41 44 44 20 20 20 52 38 |able....ADD R8| 00002510 2c 52 38 2c 52 35 2c 4c 53 4c 23 35 20 3b 0d 0a |,R8,R5,LSL#5 ;..| 00002520 c8 2e 4c 44 52 20 20 20 52 30 2c 5b 52 33 2c 52 |..LDR R0,[R3,R| 00002530 35 2c 4c 53 4c 23 32 5d 20 3b 20 41 6e 79 20 65 |5,LSL#2] ; Any e| 00002540 66 66 65 63 74 20 74 6f 20 64 6f 3f 0d 0a d2 1a |ffect to do?....| 00002550 43 4d 50 20 20 20 52 30 2c 23 30 20 20 20 20 20 |CMP R0,#0 | 00002560 20 20 20 20 20 3b 0d 0a dc 1f 42 45 51 20 20 20 | ;....BEQ | 00002570 64 6f 65 66 66 6e 65 78 74 20 20 20 20 20 20 3b |doeffnext ;| 00002580 20 4e 6f 70 65 0d 0a e6 27 80 20 20 20 52 36 2c | Nope...'. R6,| 00002590 52 30 2c 23 26 46 30 30 20 20 20 20 3b 20 52 36 |R0,#&F00 ; R6| 000025a0 3d 3d 3d 79 70 65 0d 0a f0 27 80 20 20 20 52 30 |===ype...'. R0| 000025b0 2c 52 30 2c 23 26 46 46 20 20 20 20 20 3b 20 52 |,R0,#&FF ; R| 000025c0 30 3d 65 66 66 65 63 74 20 64 61 74 61 0d 0a fa |0=effect data...| 000025d0 04 0d 0b 04 29 43 4d 50 20 20 20 52 36 2c 23 26 |....)CMP R6,#&| 000025e0 31 30 30 20 20 20 20 20 20 20 3b 20 50 6f 72 74 |100 ; Port| 000025f0 61 6d 65 6e 74 6f 20 75 70 3f 0d 0b 0e 1d 42 4e |amento up?....BN| 00002600 45 20 20 20 64 6f 65 31 20 20 20 20 20 20 20 20 |E doe1 | 00002610 20 20 20 3b 20 4e 6f 0d 0b 18 2d 4c 44 52 20 20 | ; No...-LDR | 00002620 20 52 36 2c 5b 52 32 2c 52 35 2c 4c 53 4c 23 32 | R6,[R2,R5,LSL#2| 00002630 5d 20 3b 20 47 65 74 20 63 75 72 72 65 6e 74 20 |] ; Get current | 00002640 74 6f 6e 65 0d 0b 22 23 53 55 42 20 20 20 52 30 |tone.."#SUB R0| 00002650 2c 52 30 2c 23 31 20 20 20 20 20 20 20 3b 20 53 |,R0,#1 ; S| 00002660 6c 69 64 65 20 75 70 0d 0b 2c 12 53 55 42 20 20 |lide up..,.SUB | 00002670 20 52 36 2c 52 36 2c 52 30 0d 0b 36 24 53 54 52 | R6,R6,R0..6$STR| 00002680 20 20 20 52 36 2c 5b 52 32 2c 52 35 2c 4c 53 4c | R6,[R2,R5,LSL| 00002690 23 32 5d 20 3b 20 52 65 2d 73 61 76 65 0d 0b 40 |#2] ; Re-save..@| 000026a0 35 4c 44 52 20 20 20 52 36 2c 5b 52 34 2c 52 36 |5LDR R6,[R4,R6| 000026b0 2c 4c 53 4c 23 32 5d 20 3b 20 47 65 74 20 61 72 |,LSL#2] ; Get ar| 000026c0 63 68 69 6d 65 64 65 73 2d 66 72 65 71 75 65 6e |chimedes-frequen| 000026d0 63 79 0d 0b 4a 31 53 54 52 20 20 20 52 36 2c 5b |cy..J1STR R6,[| 000026e0 52 38 2c 23 34 5d 20 20 20 20 20 3b 20 50 75 74 |R8,#4] ; Put| 000026f0 20 69 6e 20 70 61 72 61 6d 65 74 65 72 20 62 6c | in parameter bl| 00002700 6f 63 6b 0d 0b 54 13 42 20 20 20 20 20 64 6f 65 |ock..T.B doe| 00002710 66 66 6e 65 78 74 0d 0b 5e 04 0d 0b 68 09 2e 64 |ffnext..^...h..d| 00002720 6f 65 31 0d 0b 72 2b 43 4d 50 20 20 20 52 36 2c |oe1..r+CMP R6,| 00002730 23 26 32 30 30 20 20 20 20 20 20 20 3b 20 50 6f |#&200 ; Po| 00002740 72 74 61 6d 65 6e 74 6f 20 64 6f 77 6e 3f 0d 0b |rtamento down?..| 00002750 7c 1d 42 4e 45 20 20 20 64 6f 65 32 20 20 20 20 ||.BNE doe2 | 00002760 20 20 20 20 20 20 20 3b 20 4e 6f 0d 0b 86 2d 4c | ; No...-L| 00002770 44 52 20 20 20 52 36 2c 5b 52 32 2c 52 35 2c 4c |DR R6,[R2,R5,L| 00002780 53 4c 23 32 5d 20 3b 20 47 65 74 20 63 75 72 72 |SL#2] ; Get curr| 00002790 65 6e 74 20 74 6f 6e 65 0d 0b 90 25 53 55 42 20 |ent tone...%SUB | 000027a0 20 20 52 30 2c 52 30 2c 23 31 20 20 20 20 20 20 | R0,R0,#1 | 000027b0 20 3b 20 53 6c 69 64 65 20 64 6f 77 6e 0d 0b 9a | ; Slide down...| 000027c0 12 41 44 44 20 20 20 52 36 2c 52 36 2c 52 30 0d |.ADD R6,R6,R0.| 000027d0 0b a4 24 53 54 52 20 20 20 52 36 2c 5b 52 32 2c |..$STR R6,[R2,| 000027e0 52 35 2c 4c 53 4c 23 32 5d 20 3b 20 52 65 2d 73 |R5,LSL#2] ; Re-s| 000027f0 61 76 65 0d 0b ae 35 4c 44 52 20 20 20 52 36 2c |ave...5LDR R6,| 00002800 5b 52 34 2c 52 36 2c 4c 53 4c 23 32 5d 20 3b 20 |[R4,R6,LSL#2] ; | 00002810 47 65 74 20 61 72 63 68 69 6d 65 64 65 73 2d 66 |Get archimedes-f| 00002820 72 65 71 75 65 6e 63 79 0d 0b b8 31 53 54 52 20 |requency...1STR | 00002830 20 20 52 36 2c 5b 52 38 2c 23 34 5d 20 20 20 20 | R6,[R8,#4] | 00002840 20 3b 20 50 75 74 20 69 6e 20 70 61 72 61 6d 65 | ; Put in parame| 00002850 74 65 72 20 62 6c 6f 63 6b 0d 0b c2 13 42 20 20 |ter block....B | 00002860 20 20 20 64 6f 65 66 66 6e 65 78 74 0d 0b cc 09 | doeffnext....| 00002870 2e 64 6f 65 32 0d 0b d6 0e 2e 64 6f 65 66 66 6e |.doe2.....doeffn| 00002880 65 78 74 0d 0b e0 27 53 55 42 53 20 20 52 35 2c |ext...'SUBS R5,| 00002890 52 35 2c 23 31 20 20 20 20 20 20 20 3b 20 4e 65 |R5,#1 ; Ne| 000028a0 78 74 20 63 68 61 6e 6e 65 6c 0d 0b ea 1a 42 50 |xt channel....BP| 000028b0 4c 20 20 20 64 6f 65 66 66 31 20 20 20 20 20 20 |L doeff1 | 000028c0 20 20 20 3b 0d 0b f4 2a 4d 4f 56 20 20 20 50 43 | ;...*MOV PC| 000028d0 2c 52 31 34 20 20 20 20 20 20 20 20 20 3b 20 4e |,R14 ; N| 000028e0 6f 20 6d 6f 72 65 2c 20 72 65 74 75 72 6e 0d 0b |o more, return..| 000028f0 fe 04 0d 0c 08 0d 2e 6a 75 6d 70 66 6c 61 67 0d |.......jumpflag.| 00002900 0c 12 3d 45 51 55 44 20 30 20 20 20 20 20 20 20 |..=EQUD 0 | 00002910 20 20 20 20 20 20 20 20 3b 20 3c 3e 30 20 69 66 | ; <>0 if| 00002920 20 70 61 74 74 65 72 6e 20 69 73 20 74 6f 20 62 | pattern is to b| 00002930 65 20 74 65 72 6d 69 6e 61 74 65 64 0d 0c 1c 04 |e terminated....| 00002940 0d 0c 26 0b 2e 6f 6c 64 76 6f 78 0d 0c 30 33 45 |..&..oldvox..03E| 00002950 51 55 44 20 30 20 20 20 20 20 20 20 20 20 20 20 |QUD 0 | 00002960 20 20 20 20 3b 20 53 6f 20 77 65 20 63 61 6e 20 | ; So we can | 00002970 6b 69 6c 6c 20 74 68 65 20 76 6f 69 63 65 0d 0c |kill the voice..| 00002980 3a 04 0d 0c 44 32 2e 73 61 6d 70 6c 65 6c 6f 63 |:...D2.sampleloc| 00002990 20 20 20 20 20 20 20 20 20 20 20 3b 20 54 61 62 | ; Tab| 000029a0 6c 65 20 6f 66 20 73 61 6d 70 6c 65 20 6f 66 66 |le of sample off| 000029b0 73 65 74 73 0d 0c 4e 1f 45 51 55 44 20 30 3a 45 |sets..N.EQUD 0:E| 000029c0 51 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 |QUD 0:EQUD 0:EQU| 000029d0 44 20 30 0d 0c 58 1f 45 51 55 44 20 30 3a 45 51 |D 0..X.EQUD 0:EQ| 000029e0 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 |UD 0:EQUD 0:EQUD| 000029f0 20 30 0d 0c 62 1f 45 51 55 44 20 30 3a 45 51 55 | 0..b.EQUD 0:EQU| 00002a00 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 |D 0:EQUD 0:EQUD | 00002a10 30 0d 0c 6c 1f 45 51 55 44 20 30 3a 45 51 55 44 |0..l.EQUD 0:EQUD| 00002a20 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 20 30 | 0:EQUD 0:EQUD 0| 00002a30 0d 0c 76 04 0d 0c 80 2f 2e 76 6f 6c 74 61 62 20 |..v..../.voltab | 00002a40 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 36 | ; 6| 00002a50 34 2d 62 79 74 65 20 76 6f 6c 75 6d 65 20 74 61 |4-byte volume ta| 00002a60 62 6c 65 0d 0c 8a 13 5d 3a 50 25 2b 3d 36 34 3a |ble....]:P%+=64:| 00002a70 5b 4f 50 54 20 43 0d 0c 94 04 0d 0c 9e 29 2e 69 |[OPT C.......).i| 00002a80 6e 73 74 61 6c 6c 73 6f 75 6e 64 20 20 20 20 20 |nstallsound | 00002a90 20 20 20 3b 20 49 6e 73 74 61 6c 6c 20 76 6f 69 | ; Install voi| 00002aa0 63 65 73 0d 0c a8 1b 53 54 4d 46 44 20 52 31 33 |ces....STMFD R13| 00002ab0 21 2c 7b 52 30 2d 52 31 30 2c 52 31 34 7d 0d 0c |!,{R0-R10,R14}..| 00002ac0 b2 32 41 44 52 20 20 20 52 30 2c 56 6f 69 63 65 |.2ADR R0,Voice| 00002ad0 42 61 73 65 20 20 20 3b 20 4d 61 6b 65 20 54 72 |Base ; Make Tr| 00002ae0 61 63 6b 65 72 56 6f 78 20 61 20 76 6f 69 63 65 |ackerVox a voice| 00002af0 0d 0c bc 0f 4d 4f 56 20 20 20 52 31 2c 23 30 0d |....MOV R1,#0.| 00002b00 0c c6 1e 53 57 49 20 20 20 22 53 6f 75 6e 64 5f |...SWI "Sound_| 00002b10 49 6e 73 74 61 6c 6c 56 6f 69 63 65 22 0d 0c d0 |InstallVoice"...| 00002b20 2c 53 54 52 20 20 20 52 31 2c 6f 6c 64 76 6f 78 |,STR R1,oldvox| 00002b30 20 20 20 20 20 20 3b 20 53 6f 20 77 65 20 63 61 | ; So we ca| 00002b40 6e 20 6b 69 6c 6c 20 69 74 0d 0c da 2a 4d 4f 56 |n kill it...*MOV| 00002b50 20 20 20 52 31 30 2c 23 31 20 20 20 20 20 20 20 | R10,#1 | 00002b60 20 20 3b 20 4d 75 74 65 20 76 6f 69 63 65 73 20 | ; Mute voices | 00002b70 31 2d 38 0d 0c e4 0b 2e 6d 75 74 65 6c 70 0d 0c |1-8.....mutelp..| 00002b80 ee 10 4d 4f 56 20 20 20 52 30 2c 52 31 30 0d 0c |..MOV R0,R10..| 00002b90 f8 0f 4d 4f 56 20 20 20 52 31 2c 23 30 0d 0d 02 |..MOV R1,#0...| 00002ba0 1d 53 57 49 20 20 20 22 53 6f 75 6e 64 5f 41 74 |.SWI "Sound_At| 00002bb0 74 61 63 68 56 6f 69 63 65 22 0d 0d 0c 14 41 44 |tachVoice"....AD| 00002bc0 44 20 20 20 52 31 30 2c 52 31 30 2c 23 31 0d 0d |D R10,R10,#1..| 00002bd0 16 10 43 4d 50 20 20 20 52 31 30 2c 23 39 0d 0d |..CMP R10,#9..| 00002be0 20 10 42 4e 45 20 20 20 6d 75 74 65 6c 70 0d 0d | .BNE mutelp..| 00002bf0 2a 10 4d 4f 56 20 20 20 52 31 30 2c 23 31 0d 0d |*.MOV R10,#1..| 00002c00 34 3a 2e 61 74 74 6c 70 20 20 20 20 20 20 20 20 |4:.attlp | 00002c10 20 20 20 20 20 20 20 3b 20 41 74 74 61 63 68 20 | ; Attach | 00002c20 76 6f 69 63 65 73 20 31 2d 34 20 74 6f 20 54 72 |voices 1-4 to Tr| 00002c30 61 63 6b 65 72 56 6f 78 0d 0d 3e 10 4d 4f 56 20 |ackerVox..>.MOV | 00002c40 20 20 52 30 2c 52 31 30 0d 0d 48 16 41 44 52 20 | R0,R10..H.ADR | 00002c50 20 20 52 31 2c 56 6f 69 63 65 4e 61 6d 65 0d 0d | R1,VoiceName..| 00002c60 52 22 53 57 49 20 20 20 22 53 6f 75 6e 64 5f 41 |R"SWI "Sound_A| 00002c70 74 74 61 63 68 4e 61 6d 65 64 56 6f 69 63 65 22 |ttachNamedVoice"| 00002c80 0d 0d 5c 14 41 44 44 20 20 20 52 31 30 2c 52 31 |..\.ADD R10,R1| 00002c90 30 2c 23 31 0d 0d 66 10 43 4d 50 20 20 20 52 31 |0,#1..f.CMP R1| 00002ca0 30 2c 23 35 0d 0d 70 0f 42 4e 45 20 20 20 61 74 |0,#5..p.BNE at| 00002cb0 74 6c 70 0d 0d 7a 04 0d 0d 84 3a 4d 4f 56 20 20 |tlp..z....:MOV | 00002cc0 20 52 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 | R0,#1 | 00002cd0 3b 20 53 6c 69 67 68 74 20 72 69 67 68 74 20 62 |; Slight right b| 00002ce0 69 61 73 20 66 6f 72 20 63 68 61 6e 6e 65 6c 20 |ias for channel | 00002cf0 31 0d 0d 8e 10 4d 4f 56 20 20 20 52 31 2c 23 31 |1....MOV R1,#1| 00002d00 36 0d 0d 98 18 53 57 49 20 20 20 22 53 6f 75 6e |6....SWI "Soun| 00002d10 64 5f 53 74 65 72 65 6f 22 0d 0d a2 39 4d 4f 56 |d_Stereo"...9MOV| 00002d20 20 20 20 52 30 2c 23 32 20 20 20 20 20 20 20 20 | R0,#2 | 00002d30 20 20 3b 20 53 6c 69 67 68 74 20 6c 65 66 74 20 | ; Slight left | 00002d40 62 69 61 73 20 66 6f 72 20 63 68 61 6e 6e 65 6c |bias for channel| 00002d50 20 32 0d 0d ac 10 4d 56 4e 20 20 20 52 31 2c 23 | 2....MVN R1,#| 00002d60 31 35 0d 0d b6 18 53 57 49 20 20 20 22 53 6f 75 |15....SWI "Sou| 00002d70 6e 64 5f 53 74 65 72 65 6f 22 0d 0d c0 3e 4d 4f |nd_Stereo"...>MO| 00002d80 56 20 20 20 52 30 2c 23 33 20 20 20 20 20 20 20 |V R0,#3 | 00002d90 20 20 20 3b 20 61 6e 64 20 66 6f 72 20 63 68 61 | ; and for cha| 00002da0 6e 6e 65 6c 20 33 20 28 41 6d 69 67 61 20 67 6f |nnel 3 (Amiga go| 00002db0 65 73 20 52 4c 4c 52 29 0d 0d ca 10 4d 56 4e 20 |es RLLR)....MVN | 00002dc0 20 20 52 31 2c 23 31 35 0d 0d d4 18 53 57 49 20 | R1,#15....SWI | 00002dd0 20 20 22 53 6f 75 6e 64 5f 53 74 65 72 65 6f 22 | "Sound_Stereo"| 00002de0 0d 0d de 38 4d 4f 56 20 20 20 52 30 2c 23 34 20 |...8MOV R0,#4 | 00002df0 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 72 | ; And r| 00002e00 69 67 68 74 20 63 67 61 69 6e 20 66 6f 72 20 63 |ight cgain for c| 00002e10 68 61 6e 6e 65 6c 20 34 0d 0d e8 10 4d 4f 56 20 |hannel 4....MOV | 00002e20 20 20 52 31 2c 23 31 36 0d 0d f2 18 53 57 49 20 | R1,#16....SWI | 00002e30 20 20 22 53 6f 75 6e 64 5f 53 74 65 72 65 6f 22 | "Sound_Stereo"| 00002e40 0d 0d fc 04 0d 0e 06 28 4d 4f 56 20 20 20 52 30 |.......(MOV R0| 00002e50 2c 23 34 20 20 20 20 20 20 20 20 20 20 3b 20 50 |,#4 ; P| 00002e60 6c 61 79 20 34 20 76 6f 69 63 65 73 0d 0e 10 2e |lay 4 voices....| 00002e70 4d 4f 56 20 20 20 52 31 2c 23 32 30 38 20 20 20 |MOV R1,#208 | 00002e80 20 20 20 20 20 3b 20 42 75 66 66 65 72 20 6c 65 | ; Buffer le| 00002e90 6e 67 74 68 20 3d 20 32 30 30 0d 0e 1a 35 4d 4f |ngth = 200...5MO| 00002ea0 56 20 20 20 52 32 2c 23 75 73 20 20 20 20 20 20 |V R2,#us | 00002eb0 20 20 20 3b 20 46 6f 72 20 74 68 69 73 20 6d 61 | ; For this ma| 00002ec0 6e 79 20 6d 69 63 72 6f 73 65 63 6f 6e 64 73 0d |ny microseconds.| 00002ed0 0e 24 32 4d 4f 56 20 20 20 52 33 2c 23 30 20 20 |.$2MOV R3,#0 | 00002ee0 20 20 20 20 20 20 20 20 3b 20 4c 65 61 76 65 20 | ; Leave | 00002ef0 74 68 65 73 65 20 32 20 75 6e 63 68 61 6e 67 65 |these 2 unchange| 00002f00 64 0d 0e 2e 0f 4d 4f 56 20 20 20 52 34 2c 23 30 |d....MOV R4,#0| 00002f10 0d 0e 38 1b 53 57 49 20 20 20 22 53 6f 75 6e 64 |..8.SWI "Sound| 00002f20 5f 43 6f 6e 66 69 67 75 72 65 22 0d 0e 42 04 0d |_Configure"..B..| 00002f30 0e 4c 44 4d 4f 56 20 20 20 52 30 2c 23 31 20 20 |.LDMOV R0,#1 | 00002f40 20 20 20 20 20 20 20 20 3b 20 53 6f 75 6e 64 20 | ; Sound | 00002f50 61 6c 6c 20 34 20 76 6f 69 63 65 73 2c 20 70 61 |all 4 voices, pa| 00002f60 72 61 6d 65 74 65 72 73 20 61 72 65 20 72 65 61 |rameters are rea| 00002f70 6c 6c 79 0d 0e 56 25 4d 56 4e 20 20 20 52 31 2c |lly..V%MVN R1,| 00002f80 23 31 34 20 20 20 20 20 20 20 20 20 3b 20 69 6d |#14 ; im| 00002f90 6d 61 74 65 72 69 61 6c 0d 0e 60 11 4d 4f 56 20 |material..`.MOV | 00002fa0 20 20 52 32 2c 23 31 30 30 0d 0e 6a 11 4d 4f 56 | R2,#100..j.MOV| 00002fb0 20 20 20 52 33 2c 23 32 35 35 0d 0e 74 19 53 57 | R3,#255..t.SW| 00002fc0 49 20 20 20 22 53 6f 75 6e 64 5f 43 6f 6e 74 72 |I "Sound_Contr| 00002fd0 6f 6c 22 0d 0e 7e 0f 4d 4f 56 20 20 20 52 30 2c |ol"..~.MOV R0,| 00002fe0 23 32 0d 0e 88 19 53 57 49 20 20 20 22 53 6f 75 |#2....SWI "Sou| 00002ff0 6e 64 5f 43 6f 6e 74 72 6f 6c 22 0d 0e 92 0f 4d |nd_Control"....M| 00003000 4f 56 20 20 20 52 30 2c 23 33 0d 0e 9c 19 53 57 |OV R0,#3....SW| 00003010 49 20 20 20 22 53 6f 75 6e 64 5f 43 6f 6e 74 72 |I "Sound_Contr| 00003020 6f 6c 22 0d 0e a6 0f 4d 4f 56 20 20 20 52 30 2c |ol"....MOV R0,| 00003030 23 34 0d 0e b0 19 53 57 49 20 20 20 22 53 6f 75 |#4....SWI "Sou| 00003040 6e 64 5f 43 6f 6e 74 72 6f 6c 22 0d 0e ba 25 4c |nd_Control"...%L| 00003050 44 4d 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 |DMFD R13!,{R0-R1| 00003060 30 2c 50 43 7d 20 3b 20 26 20 52 65 74 75 72 6e |0,PC} ; & Return| 00003070 0d 0e c4 04 0d 0e ce 30 20 20 20 20 20 20 20 20 |.......0 | 00003080 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 56 | ; V| 00003090 6f 69 63 65 20 70 61 72 61 6d 65 74 65 72 20 62 |oice parameter b| 000030a0 6c 6f 63 6b 0d 0e d8 7c 2e 56 6f 69 63 65 42 61 |lock...|.VoiceBa| 000030b0 73 65 20 42 20 46 69 6c 6c 3a 42 20 46 69 6c 6c |se B Fill:B Fill| 000030c0 3a 42 20 46 69 6c 6c 3a 4c 44 4d 46 44 20 52 31 |:B Fill:LDMFD R1| 000030d0 33 21 2c 7b 50 43 7d 3a 4c 44 4d 46 44 20 52 31 |3!,{PC}:LDMFD R1| * 00003100 33 21 2c 7b 50 43 7d 3a 45 51 55 44 20 56 6f 69 |3!,{PC}:EQUD Voi| 00003110 63 65 4e 61 6d 65 2d 56 6f 69 63 65 42 61 73 65 |ceName-VoiceBase| 00003120 0d 0e e2 2c 2e 56 6f 69 63 65 4e 61 6d 65 20 45 |...,.VoiceName E| 00003130 51 55 53 22 54 72 61 63 6b 65 72 56 6f 78 22 3a |QUS"TrackerVox":| 00003140 45 51 55 42 20 30 3a 41 4c 49 47 4e 0d 0e ec 04 |EQUB 0:ALIGN....| 00003150 0d 0e f6 26 2e 6b 69 6c 6c 73 6f 75 6e 64 20 20 |...&.killsound | 00003160 20 20 20 20 20 20 20 20 20 3b 20 4b 69 6c 6c 20 | ; Kill | 00003170 76 6f 69 63 65 73 0d 0f 00 1b 53 54 4d 46 44 20 |voices....STMFD | 00003180 52 31 33 21 2c 7b 52 30 2d 52 31 30 2c 52 31 34 |R13!,{R0-R10,R14| 00003190 7d 0d 0f 0a 30 4d 4f 56 20 52 30 2c 23 30 20 20 |}...0MOV R0,#0 | 000031a0 20 20 20 20 20 20 20 20 20 20 3b 20 44 65 2d 69 | ; De-i| 000031b0 6e 73 74 61 6c 6c 20 54 72 61 63 6b 65 72 56 6f |nstall TrackerVo| 000031c0 78 0d 0f 14 11 4c 44 52 20 52 31 2c 6f 6c 64 76 |x....LDR R1,oldv| 000031d0 6f 78 0d 0f 1e 1b 53 57 49 20 22 53 6f 75 6e 64 |ox....SWI "Sound| 000031e0 5f 52 65 6d 6f 76 65 56 6f 69 63 65 22 0d 0f 28 |_RemoveVoice"..(| 000031f0 04 0d 0f 32 2c 4d 4f 56 20 52 31 30 2c 23 31 20 |...2,MOV R10,#1 | 00003200 20 20 20 20 20 20 20 20 20 20 3b 20 4b 69 6c 6c | ; Kill| 00003210 20 74 68 65 20 34 20 76 6f 69 63 65 73 0d 0f 3c | the 4 voices..<| 00003220 08 2e 6b 73 6c 0d 0f 46 0e 4d 4f 56 20 52 30 2c |..ksl..F.MOV R0,| 00003230 52 31 30 0d 0f 50 0d 4d 4f 56 20 52 31 2c 23 30 |R10..P.MOV R1,#0| 00003240 0d 0f 5a 1b 53 57 49 20 22 53 6f 75 6e 64 5f 41 |..Z.SWI "Sound_A| 00003250 74 74 61 63 68 56 6f 69 63 65 22 0d 0f 64 12 41 |ttachVoice"..d.A| 00003260 44 44 20 52 31 30 2c 52 31 30 2c 23 31 0d 0f 6e |DD R10,R10,#1..n| 00003270 0e 43 4d 50 20 52 31 30 2c 23 35 0d 0f 78 0b 42 |.CMP R10,#5..x.B| 00003280 4e 45 20 6b 73 6c 0d 0f 82 23 4c 44 4d 46 44 20 |NE ksl...#LDMFD | 00003290 52 31 33 21 2c 7b 52 30 2d 52 31 30 2c 50 43 7d |R13!,{R0-R10,PC}| 000032a0 20 3b 20 52 65 74 75 72 6e 0d 0f 8c 04 0d 0f 96 | ; Return.......| 000032b0 11 2e 69 6e 76 65 72 73 65 74 61 62 6c 65 0d 0f |..inversetable..| 000032c0 a0 27 3b 45 51 55 44 20 31 3a 20 20 20 20 20 20 |.';EQUD 1: | 000032d0 20 20 20 20 20 20 20 3b 20 44 75 6d 6d 79 20 76 | ; Dummy v| 000032e0 61 6c 75 65 21 0d 0f aa 15 5d 3a 50 25 2b 3d 34 |alue!....]:P%+=4| 000032f0 30 39 36 3a 5b 4f 50 54 20 43 0d 0f b4 34 2e 74 |096:[OPT C...4.t| 00003300 72 61 63 6b 61 64 72 20 20 20 20 20 20 20 20 20 |rackadr | 00003310 20 20 20 3b 20 47 65 74 20 61 64 64 72 65 73 73 | ; Get address| 00003320 20 6f 66 20 74 72 61 63 6b 20 62 61 73 65 0d 0f | of track base..| 00003330 be 11 41 44 52 20 52 31 30 2c 74 72 61 63 6b 0d |..ADR R10,track.| 00003340 0f c8 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 0f d2 |...MOV PC,R14...| 00003350 25 2e 74 72 61 63 6b 20 20 20 20 20 20 20 20 20 |%.track | 00003360 20 20 20 20 20 20 3b 20 54 72 61 63 6b 20 62 61 | ; Track ba| 00003370 73 65 0d 0f dc 28 5d 3a 50 25 2b 3d 74 6c 65 6e |se...(]:P%+=tlen| 00003380 25 3a 5b 4f 50 54 20 43 20 20 20 3b 20 49 73 20 |%:[OPT C ; Is | 00003390 74 6c 65 6e 25 20 6c 6f 6e 67 0d 0f e6 04 0d 0f |tlen% long......| 000033a0 f0 09 41 4c 49 47 4e 0d 0f fa 0c 2e 63 6f 6e 76 |..ALIGN.....conv| 000033b0 65 72 74 0d 10 04 16 53 54 4d 46 44 20 52 31 33 |ert....STMFD R13| 000033c0 21 2c 7b 52 30 2d 52 34 7d 0d 10 0e 1b 41 44 52 |!,{R0-R4}....ADR| 000033d0 20 52 32 2c 6c 74 61 62 6c 65 3a 4d 4f 56 20 52 | R2,ltable:MOV R| 000033e0 33 2c 23 30 0d 10 18 09 2e 6c 6f 6f 70 0d 10 22 |3,#0.....loop.."| 000033f0 40 4c 44 52 42 20 52 34 2c 5b 52 30 2c 52 33 5d |@LDRB R4,[R0,R3]| 00003400 3a 82 20 52 34 2c 52 34 2c 23 31 32 38 3a 4c 44 |:. R4,R4,#128:LD| 00003410 52 42 20 52 34 2c 5b 52 32 2c 52 34 5d 3a 53 54 |RB R4,[R2,R4]:ST| 00003420 52 42 20 52 34 2c 5b 52 30 2c 52 33 5d 0d 10 2c |RB R4,[R0,R3]..,| 00003430 23 41 44 44 20 52 33 2c 52 33 2c 23 31 3a 43 4d |#ADD R3,R3,#1:CM| 00003440 50 20 52 33 2c 52 31 3a 42 4c 45 20 6c 6f 6f 70 |P R3,R1:BLE loop| 00003450 0d 10 36 16 4c 44 4d 46 44 20 52 31 33 21 2c 7b |..6.LDMFD R13!,{| 00003460 52 30 2d 52 34 7d 0d 10 40 0e 4d 4f 56 20 50 43 |R0-R4}..@.MOV PC| 00003470 2c 52 31 34 0d 10 4a 0b 2e 6c 74 61 62 6c 65 0d |,R14..J..ltable.| 00003480 10 54 30 5d 3a 50 25 2b 3d 32 35 36 3a 5b 4f 50 |.T0]:P%+=256:[OP| 00003490 54 20 43 20 20 20 20 20 3b 20 32 35 36 20 62 79 |T C ; 256 by| 000034a0 74 65 20 6c 6f 6f 6b 75 70 20 74 61 62 6c 65 0d |te lookup table.| 000034b0 10 5e 04 0d 10 68 2e 2e 65 6e 64 63 6f 64 65 20 |.^...h..endcode | 000034c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 54 68 | ; Th| 000034d0 65 20 65 6e 64 63 6f 64 65 20 70 6f 69 6e 74 65 |e endcode pointe| 000034e0 72 0d 10 72 05 5d 0d 10 7c 05 ed 0d 10 86 04 0d |r..r.]..|.......| 000034f0 10 90 2a f1 22 42 75 69 6c 64 69 6e 67 20 73 61 |..*."Building sa| 00003500 6d 70 6c 65 20 63 6f 6e 76 65 72 73 69 6f 6e 20 |mple conversion | 00003510 74 61 62 6c 65 2e 2e 2e 22 0d 10 9a 23 f4 20 53 |table..."...#. S| 00003520 65 74 75 70 20 73 61 6d 70 6c 65 20 63 6f 6e 76 |etup sample conv| 00003530 65 72 73 69 6f 6e 20 74 61 62 6c 65 0d 10 a4 10 |ersion table....| 00003540 e3 20 41 25 3d 30 20 b8 20 32 35 35 0d 10 ae 3c |. A%=0 . 255...<| 00003550 20 20 42 25 3d 41 25 2d 31 32 38 3a 42 25 3d 42 | B%=A%-128:B%=B| 00003560 25 3c 3c 32 34 3a c8 99 20 22 53 6f 75 6e 64 5f |%<<24:.. "Sound_| 00003570 53 6f 75 6e 64 4c 6f 67 22 2c 42 25 20 b8 20 6c |SoundLog",B% . l| 00003580 74 61 62 6c 65 3f 41 25 0d 10 b8 05 ed 0d 10 c2 |table?A%........| 00003590 04 0d 10 cc 1f f1 22 42 75 69 6c 64 69 6e 67 20 |......"Building | 000035a0 76 6f 6c 75 6d 65 20 74 61 62 6c 65 2e 2e 2e 22 |volume table..."| 000035b0 0d 10 d6 18 f4 20 53 65 74 75 70 20 76 6f 6c 75 |..... Setup volu| 000035c0 6d 65 20 74 61 62 6c 65 0d 10 e0 0f e3 20 41 25 |me table..... A%| 000035d0 3d 30 20 b8 20 36 33 0d 10 ea 21 20 20 76 6f 6c |=0 . 63...! vol| 000035e0 74 61 62 3f 41 25 3d 32 35 35 2d 28 28 41 25 2f |tab?A%=255-((A%/| 000035f0 33 2b 34 32 29 2a 34 29 0d 10 f4 05 ed 0d 10 fe |3+42)*4)........| 00003600 04 0d 11 08 1e f1 22 42 75 69 6c 64 69 6e 67 20 |......"Building | 00003610 70 69 74 63 68 20 74 61 62 6c 65 2e 2e 2e 22 0d |pitch table...".| 00003620 11 12 1f f4 20 53 65 74 75 70 20 69 6e 76 65 72 |.... Setup inver| 00003630 73 65 20 70 69 74 63 68 20 74 61 62 6c 65 0d 11 |se pitch table..| 00003640 1c 11 e3 20 41 25 3d 31 20 b8 20 31 30 32 33 0d |... A%=1 . 1023.| 00003650 11 26 3d 20 20 61 3d 33 35 37 35 38 37 32 2f 41 |.&= a=3575872/A| 00003660 25 3a 69 6e 76 65 72 73 65 74 61 62 6c 65 21 28 |%:inversetable!(| 00003670 41 25 2a 34 29 3d 28 61 2f 28 31 30 30 30 30 30 |A%*4)=(a/(100000| 00003680 30 2f 75 73 29 29 2a 36 30 30 30 30 0d 11 30 05 |0/us))*60000..0.| 00003690 ed 0d 11 3a 04 0d 11 44 05 db 0d 11 4e 22 f1 22 |...:...D....N"."| 000036a0 43 6f 64 65 20 6c 65 6e 67 74 68 20 3d 20 22 3b |Code length = ";| 000036b0 65 6e 64 63 6f 64 65 2d 63 6f 64 65 0d 11 58 04 |endcode-code..X.| 000036c0 0d 11 62 1b f4 20 53 6f 75 6e 64 74 72 61 63 6b |..b.. Soundtrack| 000036d0 65 72 20 64 61 74 61 66 69 6c 65 0d 11 6c 1a f1 |er datafile..l..| 000036e0 22 4c 6f 61 64 69 6e 67 20 6d 6f 64 75 6c 65 2e |"Loading module.| 000036f0 2e 2e 28 22 3b 0d 11 76 20 ff 28 22 4c 4f 41 44 |..(";..v .("LOAD| 00003700 20 22 2b 73 6f 6e 67 24 2b 22 20 22 2b c3 7e 74 | "+song$+" "+.~t| 00003710 72 61 63 6b 29 0d 11 80 12 74 72 61 63 6b 24 3d |rack)....track$=| 00003720 22 22 3a 42 25 3d 30 0d 11 8a 05 f5 0d 11 94 31 |"":B%=0........1| 00003730 20 20 e7 20 28 74 72 61 63 6b 3f 42 25 29 3c 3e | . (track?B%)<>| 00003740 30 20 8c 20 74 72 61 63 6b 24 2b 3d bd 28 74 72 |0 . track$+=.(tr| 00003750 61 63 6b 3f 42 25 29 3a 42 25 2b 3d 31 0d 11 9e |ack?B%):B%+=1...| 00003760 11 fd 28 74 72 61 63 6b 3f 42 25 29 3d 30 0d 11 |..(track?B%)=0..| 00003770 a8 10 f1 3b 74 72 61 63 6b 24 3b 22 29 22 0d 11 |...;track$;")"..| 00003780 b2 04 0d 11 bc 3a f4 20 46 69 6e 64 20 6c 65 6e |.....:. Find len| 00003790 67 74 68 20 6f 66 20 74 75 6e 65 20 64 61 74 61 |gth of tune data| 000037a0 20 62 79 20 6c 6f 6f 6b 69 6e 67 20 74 68 72 6f | by looking thro| 000037b0 75 67 68 20 70 61 74 74 65 72 6e 73 0d 11 c6 0b |ugh patterns....| 000037c0 68 69 67 68 25 3d 30 0d 11 d0 10 e3 20 41 25 3d |high%=0..... A%=| 000037d0 30 20 b8 20 31 32 37 0d 11 da 35 20 20 e7 20 74 |0 . 127...5 . t| 000037e0 72 61 63 6b 3f 28 26 31 44 38 2b 41 25 29 3e 68 |rack?(&1D8+A%)>h| 000037f0 69 67 68 25 20 8c 20 68 69 67 68 25 3d 74 72 61 |igh% . high%=tra| 00003800 63 6b 3f 28 26 31 44 38 2b 41 25 29 0d 11 e4 05 |ck?(&1D8+A%)....| 00003810 ed 0d 11 ee 0c 68 69 67 68 25 2b 3d 31 0d 11 f8 |.....high%+=1...| 00003820 04 0d 12 02 15 f4 20 43 6f 6e 76 65 72 74 20 73 |...... Convert s| 00003830 61 6d 70 6c 65 73 0d 12 0c 1e 41 25 3d 74 72 61 |amples....A%=tra| 00003840 63 6b 2b 26 32 35 38 2b 28 68 69 67 68 25 2a 31 |ck+&258+(high%*1| 00003850 30 32 34 29 0d 12 16 15 42 25 3d 74 72 61 63 6b |024)....B%=track| 00003860 2b 74 6c 65 6e 25 2d 41 25 0d 12 20 26 f1 22 43 |+tlen%-A%.. &."C| 00003870 6f 6e 76 65 72 74 69 6e 67 20 22 3b 7e 28 41 25 |onverting ";~(A%| 00003880 2d 74 72 61 63 6b 29 3b 22 2b 22 3b 7e 42 25 0d |-track);"+";~B%.| 00003890 12 2a 0d d6 20 63 6f 6e 76 65 72 74 0d 12 34 04 |.*.. convert..4.| 000038a0 0d 12 3e 15 73 61 6d 70 6c 65 69 3d 74 72 61 63 |..>.samplei=trac| 000038b0 6b 2b 26 31 34 0d 12 48 1b 73 70 6f 69 6e 74 3d |k+&14..H.spoint=| 000038c0 41 25 3a 73 61 6d 70 6c 65 73 3d 74 72 61 63 6b |A%:samples=track| 000038d0 0d 12 52 04 0d 12 5c 2e f1 27 22 4e 72 20 4e 61 |..R...\..'"Nr Na| 000038e0 6d 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |me | 000038f0 20 20 20 4c 65 6e 67 74 68 20 20 56 6f 6c 75 6d | Length Volum| 00003900 65 22 0d 12 66 2d f1 22 2d 2d 20 2d 2d 2d 2d 2d |e"..f-."-- -----| 00003910 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 20 |--------------- | 00003920 2d 2d 2d 2d 2d 2d 2d 20 2d 2d 2d 2d 2d 2d 22 0d |------- ------".| 00003930 12 70 0f e3 20 41 25 3d 30 20 b8 20 31 34 0d 12 |.p.. A%=0 . 14..| 00003940 7a 1e 20 20 73 61 6d 70 6c 65 6f 3d 73 61 6d 70 |z. sampleo=samp| 00003950 6c 65 69 2b 28 41 25 2a 26 31 45 29 0d 12 84 13 |lei+(A%*&1E)....| 00003960 20 20 6e 61 6d 65 24 3d 22 22 3a 42 25 3d 30 0d | name$="":B%=0.| 00003970 12 8e 07 20 20 f5 0d 12 98 34 20 20 20 20 e7 20 |... ....4 . | 00003980 28 73 61 6d 70 6c 65 6f 3f 42 25 29 3c 3e 30 20 |(sampleo?B%)<>0 | 00003990 6e 61 6d 65 24 2b 3d bd 28 73 61 6d 70 6c 65 6f |name$+=.(sampleo| 000039a0 3f 42 25 29 3a 42 25 2b 3d 31 0d 12 a2 1d 20 20 |?B%):B%+=1.... | 000039b0 fd 28 73 61 6d 70 6c 65 6f 3f 42 25 29 3d 30 20 |.(sampleo?B%)=0 | 000039c0 84 20 42 25 3d 32 30 0d 12 ac 13 20 20 e7 20 6e |. B%=20.... . n| 000039d0 61 6d 65 24 3c 3e 22 22 20 8c 0d 12 b6 2e 20 20 |ame$<>"" ..... | 000039e0 20 20 6c 65 6e 25 3d 32 2a 28 28 73 61 6d 70 6c | len%=2*((sampl| 000039f0 65 6f 3f 32 32 29 2a 32 35 36 2b 28 73 61 6d 70 |eo?22)*256+(samp| 00003a00 6c 65 6f 3f 32 33 29 29 0d 12 c0 2a 20 20 20 20 |leo?23))...* | 00003a10 76 6f 6c 25 3d 28 73 61 6d 70 6c 65 6f 3f 32 34 |vol%=(sampleo?24| 00003a20 29 2a 32 35 36 2b 28 73 61 6d 70 6c 65 6f 3f 32 |)*256+(sampleo?2| 00003a30 35 29 0d 12 ca 32 20 20 20 20 f1 8a 30 29 3b 7e |5)...2 ..0);~| 00003a40 28 41 25 2b 31 29 3b 8a 33 29 3b 6e 61 6d 65 24 |(A%+1);.3);name$| 00003a50 3b 8a 32 34 29 3b 6c 65 6e 25 3b 8a 33 32 29 3b |;.24);len%;.32);| 00003a60 76 6f 6c 25 0d 12 d4 27 20 20 20 20 73 61 6d 70 |vol%...' samp| 00003a70 6c 65 6c 6f 63 21 28 41 25 2a 34 29 3d 73 70 6f |leloc!(A%*4)=spo| 00003a80 69 6e 74 2d 73 61 6d 70 6c 65 73 0d 12 de 14 20 |int-samples.... | 00003a90 20 20 20 73 70 6f 69 6e 74 2b 3d 6c 65 6e 25 0d | spoint+=len%.| 00003aa0 12 e8 07 20 20 cd 0d 12 f2 05 ed 0d 12 fc 26 f1 |... .........&.| 00003ab0 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |" | 00003ac0 20 20 20 20 20 20 20 20 20 2d 2d 2d 2d 2d 2d 2d | -------| 00003ad0 22 0d 13 06 42 f1 22 20 20 20 20 20 20 20 20 20 |"...B." | 00003ae0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 | "| 00003af0 3b 28 73 70 6f 69 6e 74 2d 73 61 6d 70 6c 65 73 |;(spoint-samples| 00003b00 2d 26 32 35 38 2d 28 68 69 67 68 25 2a 31 30 32 |-&258-(high%*102| 00003b10 34 29 29 0d 13 10 04 0d 13 1a 1a f4 20 53 74 6f |4))......... Sto| 00003b20 72 65 20 6c 65 6e 67 74 68 20 6f 66 20 74 75 6e |re length of tun| 00003b30 65 0d 13 24 17 69 6e 66 6f 21 34 3d 74 72 61 63 |e..$.info!4=trac| 00003b40 6b 3f 26 31 44 36 2d 31 0d 13 2e 04 0d 13 38 1e |k?&1D6-1......8.| 00003b50 f1 22 54 75 6e 65 20 6c 65 6e 67 74 68 20 3d 20 |."Tune length = | 00003b60 22 3b 69 6e 66 6f 21 34 2b 31 0d 13 42 04 0d 13 |";info!4+1..B...| 00003b70 4c 16 ee 20 85 20 d6 6b 69 6c 6c 73 6f 75 6e 64 |L.. . .killsound| 00003b80 3a f6 3a e0 0d 13 56 1b f4 20 47 65 74 20 74 68 |:.:...V.. Get th| 00003b90 69 6e 67 73 20 69 6e 20 6d 6f 74 69 6f 6e 21 0d |ings in motion!.| 00003ba0 13 60 12 d6 20 69 6e 73 74 61 6c 6c 73 6f 75 6e |.`.. installsoun| 00003bb0 64 0d 13 6a 20 f1 22 3c 53 70 61 63 65 3e 20 74 |d..j ."<Space> t| 00003bc0 6f 20 72 65 73 65 6c 65 63 74 20 74 75 6e 65 22 |o reselect tune"| 00003bd0 27 0d 13 74 3f f1 8a 30 2c 54 4c 25 2d 32 29 3b |'..t?..0,TL%-2);| 00003be0 22 50 6f 73 69 74 69 6f 6e 3a 30 30 22 3b 69 6e |"Position:00";in| 00003bf0 66 6f 21 38 3b 8a 33 30 2c 54 4c 25 2d 32 29 3b |fo!8;.30,TL%-2);| 00003c00 22 50 61 74 74 65 72 6e 3a 22 3b 21 69 6e 66 6f |"Pattern:";!info| 00003c10 0d 13 7e 0e e3 20 41 25 3d 30 20 b8 20 33 0d 13 |..~.. A%=0 . 3..| 00003c20 88 6c 20 20 f1 8a 30 2c 54 4c 25 2b 41 25 29 3b |.l ..0,TL%+A%);| 00003c30 22 56 6f 69 63 65 3a 22 3b 41 25 3b 22 20 20 4c |"Voice:";A%;" L| 00003c40 61 73 74 20 69 6e 73 74 72 75 6d 65 6e 74 3a 22 |ast instrument:"| 00003c50 3b 7e 63 75 72 72 65 6e 74 3f 41 25 3b 22 20 20 |;~current?A%;" | 00003c60 50 69 74 63 68 3a 30 30 30 30 22 3b 7e 6f 75 72 |Pitch:0000";~our| 00003c70 69 6e 66 21 28 33 32 2a 41 25 2b 34 29 3b 22 20 |inf!(32*A%+4);" | 00003c80 20 45 66 66 65 63 74 3a 30 22 0d 13 92 05 ed 0d | Effect:0"......| 00003c90 13 93 05 87 0d 13 95 2b f1 22 56 6f 69 63 65 3a |.......+."Voice:| 00003ca0 34 2c 35 2c 36 2c 37 20 6e 6f 74 20 61 76 61 69 |4,5,6,7 not avai| 00003cb0 6c 61 62 6c 65 20 6f 6e 20 41 6d 69 67 61 22 0d |lable on Amiga".| 00003cc0 13 9c 05 f5 0d 13 a6 0f 20 20 c8 96 3a d6 20 69 |........ ..:. i| 00003cd0 6e 74 72 0d 13 b0 33 20 20 f1 8a 39 2c 54 4c 25 |ntr...3 ..9,TL%| 00003ce0 2d 32 29 3b 69 6e 66 6f 21 38 3b 22 20 20 20 22 |-2);info!8;" "| 00003cf0 3b 8a 33 38 2c 54 4c 25 2d 32 29 3b 21 69 6e 66 |;.38,TL%-2);!inf| 00003d00 6f 3b 22 20 20 22 0d 13 ba 10 20 20 e3 20 41 25 |o;" ".... . A%| 00003d10 3d 30 20 b8 20 33 0d 13 c4 6c 20 20 20 20 f1 8a |=0 . 3...l ..| 00003d20 32 35 2c 54 4c 25 2b 41 25 29 3b 7e 63 75 72 72 |25,TL%+A%);~curr| 00003d30 65 6e 74 3f 41 25 3b 8a 33 34 2c 54 4c 25 2b 41 |ent?A%;.34,TL%+A| 00003d40 25 29 3b 7e 6f 75 72 69 6e 66 21 28 33 32 2a 41 |%);~ourinf!(32*A| 00003d50 25 2b 34 29 3b 22 20 20 20 22 3b 8a 34 38 2c 54 |%+4);" ";.48,T| 00003d60 4c 25 2b 41 25 29 3b 28 65 66 66 65 63 74 74 79 |L%+A%);(effectty| 00003d70 70 65 21 28 41 25 2a 34 29 29 3e 3e 38 3b 22 20 |pe!(A%*4))>>8;" | 00003d80 20 22 0d 13 ce 07 20 20 ed 0d 13 d8 0c fd a6 28 | ".... .......(| 00003d90 30 29 3d 33 32 0d 13 d9 05 ee 0d 13 e2 0f d6 20 |0)=32.......... | 00003da0 6b 69 6c 6c 73 6f 75 6e 64 0d 13 ec 05 f1 0d 13 |killsound.......| 00003db0 f6 05 f9 0d 14 00 05 e0 0d 14 0a 09 dd f2 63 6c |..............cl| 00003dc0 69 0d 14 14 0c ff 28 73 6f 6e 67 24 29 0d 14 1e |i.....(song$)...| 00003dd0 05 e1 0d ff |....| 00003dd4