Home » Archimedes archive » Archimedes World » AW-1991-08.adf » August91 » !AWAug91/Goodies/Eureka/Modul_Fix
!AWAug91/Goodies/Eureka/Modul_Fix
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 » Archimedes World » AW-1991-08.adf » August91 |
Filename: | !AWAug91/Goodies/Eureka/Modul_Fix |
Read OK: | ✔ |
File size: | 5B9E bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >Tools.Modul 15ON ERROR PROCerror:END 20DIM code 256000,L%-1 30mess$=STRING$(15,CHR$31)+CHR$9+"1.20 ("+MID$(TIME$,5,11)+")" 40FOR p=%1000 TO %1010 STEP 2 50P%=code 60PROC_Music 70NEXT p 80end%=Track+pointer 90PRINT''"Start at : &";~code,"End at : &";~end% 100PRINT "Total len: ";end%-code,"Song len: ";pointer 110INPUT'"Save song module as: "a$ 120OSCLI "Save "+a$+" "+STR$~code+" "+STR$~end% 130OSCLI "Settype "+a$+" Module" 140END 150------------------------------------------------------------------------- 160DEF PROC_Music 170IF p=%1000 THEN 180 *RMEnsure Packit 1.50 RMLoad !Coconizer.Packit 190 maxinst=32 200 DIM nam$(2002),byt%(2002),loc$(2002),sort%(maxinst),sort$(maxinst) 210 sort$(2)="�" 220 top%=0 230 f%=OPENIN "location" 240 IF f%=0 THEN PRINT'"PLEASE INSERT A SONG DISC":a$=GET$:GOTO 230 250 WHILE NOT EOF#f% 260 top%+=1:nam$(top%)=GET$#f%:INPUT#f%,byt%(top%):loc$(top%)=GET$#f% 270 ENDWHILE 280 CLOSE#f% 290 INPUT'"Please enter song path [SONGS]: "path$:IF path$="" path$="songs" 300 OSCLI "Cat "+path$ 310 INPUT'"Coconizer songfile? "a$ 320 a$=path$+"."+a$ 330 f%=OPENIN a$ 340 b1=BGET#f%:b2=BGET#f%:b3=BGET#f%:b4=BGET#f%:b5=BGET#f%:b6=BGET#f% 350 CLOSE#f% 360 IF b4=0 AND b5>0 THEN Vocs=b6 ELSE Vocs=b1 :REM packed...? 370 PROC_MusicASM 380 A%=code:B%=Track-1:CALL Track :REM Initstore 390 A%=ufin:B%=L%-1 :CALL Track :REM really ALL 400 ENDPROC 410ELSE 420 PROC_MusicASM 430ENDIF 440REM *** LOAD INSTRUMENTS *** 450PRINT"Channels: ";Vocs 460IF b4=0 AND b5>0 THEN 470 OSCLI "PackLoad "+a$+" "+STR$~Track 480ELSE 490 OSCLI "Load "+a$+" "+STR$~Track 500ENDIF 510FOR i%=0 TO 9*12-1 :REM From internat. Octave -3 to Octave 5 520n%=i% +4*12 :REM Correct it, as 'Steinway' +0 = Middle C 530f%=440*(2^((n%-46)/12)) :REM Frequency formula 540Ftable!(i%*4)=(f%/(1000000/us))*65536 550NEXT i% 560a$=LEFT$($(Track+1),15) 570PRINT'"NAME: ";a$; 580WHILE RIGHT$(a$,1)=" ":a$=LEFT$(a$,LENa$-1):ENDWHILE 590$helps=a$:helps?(LENa$)=31 600PRINT TAB(46);"Sequencies: ";Track?22;" Patterns: ";Track?23' 610pointer=Track!32 :REM +Track :REM SampleData Offset 620FOR i%=1 TO Track?21 630 Track!(i%*32+ 0)=pointer 640 len=Track!(i%*32+ 4) 650 vol=Track!(i%*32+ 8) 660 rat=Track!(i%*32+12) 670 ren=Track!(i%*32+16) 680 na$=$(Track+i%*32+20) 690 PRINT CHR$(96+i%);" : ";na$;TAB(18);vol,rat,ren,len; 700 FOR j%=1 TO top%:IF na$<>nam$(j%) THEN NEXT:INPUT'" -> "na$:$(Track+i%*32+20)=na$:PRINT STRING$(30,CHR$8);:GOTO 700 710 PRINT " (";byt%(j%);")"; 720 IF len>byt%(j%) THEN len=byt%(j%):Track!(i%*32+4)=len:PRINT "*"; 730 PRINT ,(ASCloc$(j%)-65) DIV 2 +1 740 sort$(i%)=loc$(j%):sort%(i%)=i% 750 pointer+=len+gap 760NEXT i% 770PRINT 780REPEAT 790 flag%=0 800 FOR i%=1 TO Track?21-1 810 IF sort$(i%)>sort$(i%+1) THEN SWAP sort$(i%),sort$(i%+1):SWAP sort%(i%),sort%(i%+1):flag%=1 820 NEXT i% 830UNTIL flag%=0 840FOR i%=1 TO Track?21 850 s=sort%(i%) 860 na$=$(Track+s*32+20):adr=Track+Track!(s*32):len=Track!(s*32+4) 870 fu$="Inst"+sort$(i%)+"."+na$ 880 f=OPENIN fu$ 890 IF f THEN 900 PRINT na$;", "; 910 $(adr+len)=STRING$(gap-1,CHR$0) 920 SYS "OS_GBPB",4,f,adr,len:CLOSE#f 930 ELSE 940 disc=(ASCsort$(i%)-65) DIV 2 +1 950 PRINT'CHR$7;"PLEASE INSERT SAMPLE DISC ";disc:a$=GET$ 960 GOTO 880 970 ENDIF 980NEXT i% 990ENDPROC 1000DEF PROC_MusicASM 1010gap=16 1020us =48 1030[OPT p 1040;--------------------------- 1050; COCONIZER MODULE PLAYER 1060;--------------------------- 1070 dcd 0 ;Start code 1080 dcd init-code ;Initialisation code 1090 dcd fini-code ;Finalisation code 1100 dcd 0 ;Service Call Handler 1110 dcd title-code ;Title String 1120 dcd helps-code ;Help String 1130 dcd 0 ;Help and Command keyword table 1140.title dcb "CoconizerSong"+CHR$0:align 1150.helps dcb mess$+CHR$0:align 1160.init 1170 stmfd r13!,{r7-r11,r14} ;We are called in SVC_mode! 1180 bl v_on 1190 ldmfd r13!,{r7-r11,pc}^ 1200.fini 1210 stmfd r13!,{r7-r11,r14} 1220 bl v_off 1230 bl vrelativ ;And back to origin relative state 1240 ldmfd r13!,{r7-r11,pc}^ 1250;----------------------------------- 1260; 1270; THE COCONIZER PLAYER ROUTINE v1.2 1280; 1290; Needs 20% of the ARM-II speed 1300; 1310; (c) Mai 1990 by 1320; Eduard Pfarr & Thomas Alber 1330; of Playfield 1340; 1350; Latest revision - 10 Feb 1991 1360; 1370;----------------------------------- 1380.v_on 1390 stmfd r13!,{r14} 1400 mov r0,#2 ;VOICES 2 1410 mov r1,#208 ;BufferLen of ONE channel, total *Vocs 1420 mov r2,#us ;Sample Period 1430 mov r3,#0 ;Default ChannelHandler 1440 mov r4,#0 ;Default Sheduler 1450 swi "Sound_Configure" 1460 mov r0,#Vocs ;VOICES 8 with params doesn't work directly! 1470 mov r1,#0 ;Because then sample rate is set false... 1480 mov r2,#0 1490 mov r3,#0 1500 mov r4,#0 1510 swi "Sound_Configure" 1520 adr r0,VoiceBase 1530 mov r1,#0 ;Install our Voice into next free Slot 1540 swi "Sound_InstallVoice" 1550 str r1,Vslot ;store used slot 1560 adr r2,Vstereos-4*4*(Vocs=8) 1570 mov r0,#1 1580.vimage 1590 ldr r1,[r2],#4 1600 swi "Sound_Stereo" ;*STEREO r0 r1 1610 add r0,r0,#1 1620 cmp r0,#Vocs 1630 bLs vimage 1640 mov r0,#Vocs 1650.vset 1660 adr r1,Vname 1670 swi "Sound_AttachNamedVoice" ;*CHANNELVOICE r0 "r1" 1680 mov r1,#&170 1690 mov r2,#50 ;Activate all channels once 1700 mov r3,#255 1710 swi "Sound_Control" ;*SOUND r0 r1 r2 r3 1720 subS r0,r0,#1 1730 bNe vset 1740 bl vabsolut 1750 bl v_reset 1760 mov r0,#16 ;Claim EVENT Vector (Nr. 16) 1770 FNadr (1,vinter) 1780 adr r2,Head ;Entry WorkspacePointer r12 1790 swi "OS_Claim" 1800 mov r0,#14 ;Enable Event Nr. r1 1810 mov r1,#4 ;(4 = VSync Event) 1820 swi "OS_Byte" 1830 mov r0,#Vocs ;And once more... 1840 mov r1,#0 1850 mov r2,#0 1860 mov r3,#0 1870 mov r4,#0 1880 swi "Sound_Configure" ;Grrrh! 1890 mov r0,#0 ;Read current Volume 1900 swi "Sound_Volume" 1910 mov r0,r0,lsl#1 ;*2 1920 rsb r0,r0,#254 1930 str r0,Volume ;and use it as overall Volume 1940 mov r11,#3 ;Test max 3 times ! 1950.vtest 1960 mov r1,#0 1970 strB r1,IntSync 1980 mov r3,#26 1990 bl vwait 2000 ldrB r1,IntSync ;Is there a Loser-Channel ? 2010 cmp r1,#0 2020 ldmEqFd r13!,{pc} 2030 mov r0,#1 ;Off 2040 swi "Sound_Enable" 2050 mov r3,#101 2060 bl vwait 2070 mov r0,#2 ;On 2080 swi "Sound_Enable" 2090 subS r11,r11,#1 2100 bNe vtest 2110 ldmfd r13!,{pc} ;Well, bad luck! 2120.vwait 2130 mov r12,r14 2140 mov r0,#19 ;Wait for some frameflies 2150 swi "OS_Byte" 2160 subS r3,r3,#1 2170 bNe vwait+8 2180 mov pc,r12 ;svc_r14... 2190;*** ABSOLUTE CODE 2200.vabsolut 2210 FNadr (10,Track) 2220 ldr r1,[r10,#24] ;Sequence Offset 2230 add r1,r10,r1 2240 str r1,[r10,#24] 2250 ldr r2,[r10,#28] ;Pattern Offset 2260 add r2,r10,r2 2270 str r2,[r10,#28] 2280 ldrB r1,[r10,#21] ;Number of Insts 2290.vall 2300 ldr r2,[r10,r1,lsl#5] ;Inst Addr Offset 2310 add r2,r10,r2 2320 str r2,[r10,r1,lsl#5] ;+i*32 2330 subS r1,r1,#1 2340 bNe vall 2350 mov pc,r14 2360;*** RELATIVE CODE 2370.vrelativ 2380 FNadr (10,Track) 2390 ldr r1,[r10,#24] 2400 sub r1,r1,r10 2410 str r1,[r10,#24] 2420 ldr r2,[r10,#28] 2430 sub r2,r2,r10 2440 str r2,[r10,#28] 2450 ldrB r1,[r10,#21] 2460.vall 2470 ldr r2,[r10,r1,lsl#5] 2480 sub r2,r2,r10 2490 str r2,[r10,r1,lsl#5] 2500 subS r1,r1,#1 2510 bNe vall 2520 mov pc,r14 2530;*** RESTART TUNE 2540.v_reset 2550 FNadr (10,Track) 2560 mov r1,#64 2570 str r1,Registers+0 ;Patt Count 2580 ldr r2,[r10,#24] 2590 str r2,Registers+8 ;Current Sequence Pointer 2600 ldrB r2,[r2] 2610 ldr r3,[r10,#28] 2620 add r3,r3,r2,lsl#10-(Vocs=8) 2630 str r3,Registers+4 ;Current Pattern Pointer 2640 adr r11,Head 2650 mov r1,#0:mov r2,#0:mov r3,#0:mov r4,#0 2660 mov r5,#0:mov r6,#0:mov r7,#0:mov r8,#0 2670 mov r0,#Vocs 2680.vall 2690 stmia r11!,{r1-r8} ;Clear all channel heads... 2700 subS r0,r0,#1 2710 bNe vall 2720 mov pc,r14 2730;*** TURN OFF PLAYER AND COCO-VOICE 2740.v_off 2750 stmfd r13!,{r14} 2760 mov r0,#13 ;Disable Event Nr. r1 2770 mov r1,#4 ;(4 = VSync Event) 2780 swi "OS_Byte" 2790 mov r0,#16 ;Free EVENT Vector (Nr. 16) 2800 adr r1,vinter 2810 adr r2,Head 2820 swi "OS_Release" 2830 ldr r1,Vslot 2840 swi "Sound_RemoveVoice" ;Last but not least... Free VoiceSlot 2850 mov r0,#1 2860 mov r1,#1 2870 swi "Sound_AttachVoice" ;Reinit Bell 2880 ldmfd r13!,{pc} 2890.Vstereos 2900 dcd -50 ;Stereo Positions for 4 channels 2910 dcd -20 2920 dcd 20 2930 dcd 50 2940 dcd-126 ;Stereo Positions for 8 channels 2950 dcd -90 2960 dcd -54 2970 dcd -18 2980 dcd 18 2990 dcd 54 3000 dcd 90 3010 dcd 126 3020.Vslot dcd 0 3030;==== SYSTEM SOUND v2.1 ================================================= 3040; r6 Neg. if new Handler r10 Pointer to end of DMA buffer 3050; r7 Channel number r11 Increment (interleaf) to use when writing 3060; r8 Sample period in us r12 Pointer to (start of DMA + interleaf Ofs) 3070; r9 Pointer to SCCB Filler is entered in IRQ mode & Ints enabled! 3080.VoiceBase 3090 b vfill ;Fill for smooth adjust 3100 b vfill ;Update for tone continue 3110 b vfill ;GateOn for new tone 3120 ldmfd r13!,{pc} ;GateOff for tone flushing 3130 ldmfd r13!,{pc} ;Instantiate, Attach VoiceGenerator 3140 ldmfd r13!,{pc} ;DeInstantiate, Detach to/from a channel 3150 ldmfd r13!,{pc} ;Hello Arthur! 3160 dcd Vname-VoiceBase ;Offset from VoiceBase to Name 3170.Vname dcb "Cocoplex"+CHR$0 3180 align 3190.vfill 3200 adr r8,Head ;We use an own Controll_Block 3210 add r8,r8,r7,lsl#5 ;point to Head+r7*32 3220 ldmIa r8,{r1-r6} ;Load 6 working Registers 3230 ldr r0,Volume 3240 add r5,r5,r0 ;Add Overall_Volume to Channel_Volume 3250 mov r0,#0 3260 strB r0,IntFlag ;Clear Interrupted_Flag 3270.vfilloop 3280]:FOR n=1 TO gap:[OPT p ;Fill one byte 16 times, for 208 -> 13 runs 3290 ldrB r0,[r3,r1,lsr#16] ;Load sample byte (HighWord of Pos) 3300 subS r0,r0,r5 ;Minus Volume (where 0=loud & 255=quiet) 3310 movMi r0,#0 3320 strB r0,[r12],r11 ;And put it into VIDC-buffer 3330 add r1,r1,r2 ;Add Pitch (fix point) 3340]:NEXT:[OPT p 3350 cmp r4,r1,lsr#16 ;Length exceeded? (Len < fixpointed Pos) 3360 movLs r1,r6 ;Yes, so RepAt is new Pos, 3370 cmp r1,#0 ; but is it zero? 3380 movEq r2,#0 ; yes -> Mute Channel (ie Set Pitch to 0) 3390 cmp r12,r10 ;VIDC-Buffer filled already? 3400 bLo vfilloop ;Nooo... 3410 stmIa r8,{r1-r2} ;Save the two (probably) modified regs 3420 ldrB r0,IntFlag ;Have we been interrupted by our Play-Event? 3430 cmp r0,#1 3440 strEqB 0,IntSync ;Ah, fucky YES! (Oops) 3450 mov r0,#%00001000 ;And return with Voice-Active-Flag 3460 ldmfd r13!,{pc} 3470.Head 3480 dcd 0 ;r1 Pos in the sample (Offset in fix point) 3490 dcd 0 ;r2 Increment/Pitch (LowWord for fixpoint) 3500 dcd 0 ;r3 Sample Adress 3510 dcd 0 ;r4 Length 3520 dcd 0 ;r5 Volume (0=Loud ... 255=Quiet) 3530 dcd 0 ;r6 RepAt (New fixpoint Pos), or 0 for NO REP 3540 dcd 0 ;Byte +24 Value for Auto Volume up 3550 ; 25 " " " Volume down 3560 ; 26 " " " Pitch up 3570 ; 27 " " " Pitch down 3580 dcd 0 ;Byte +28 Actual Info Byte 3590 ; 29 Actual Comm Byte 3600 ; 30 (Sound FX Flag) 3610 ; 31 Last legal tone/note 3620 dcb STRING$(3*32-4*32*(Vocs=8),CHR$0) ;Add 3 or 7 Heads 3630.Volume dcd 0 ;Overall_Sound_Volume 3640.IntFlag dcb 0 ;Set = Have been interrupted 3650.IntSync dcb 0 ;Set = Loser needs new sync 3660 align 3670;==== PLAY EVENT v1.2 =================================================== 3680 3690;*** DO EVERY VSYNC EFFECTS (#r0=Timer ... $r0=preserved) 3700.veffects 3710 ldr r4,[r12,#4] ;Load current Pitch 3720 cmp r4,#0 ;No active tone -> sorry, effect disabled! 3730 movEq pc,r14 3740 ldr r3,[r12,#24] ;Load Auto-Effects 3750 mov r10,r14 ;Push r14 3760 andS r2,r3,#&ff ;Is there Auto Volume up? 3770 blNe v_volup 3780 andS r2,r3,#&ff <<8 ;Is there Auto Volume down? 3790 movNe r2,r2,lsr#8 3800 blNe v_voldown 3810 andS r2,r3,#&ff <<16 ;Is there Auto Pitch up? 3820 movNe r2,r2,lsr#16 3830 blNe v_arcup 3840 andS r2,r3,#&ff <<24 ;Is there Auto Pitch down? 3850 movNe r2,r2,lsr#24 3860 blNe v_arcdown 3870 mov r14,r10 ;Pop r14 3880 ldr r1,[r12,#28] ;Effect LWord & Last Tone are in the Header 3890 andS r2,r1,#&ff ;Isolate InfoByte 3900 movEq pc,r14 ;if 0, then there's no effect at all! 3910 and r3,r1,#&ff00 ;Isolate Effect number 3920 ldr r3,[pc,r3,lsr#6] ;lsr#8 for effect into lowbyte & lsl#2 for *4 3930 add pc,pc,r3 3940 dcd v_arpeggio-vof1 ; 0 = Arpeggio 3950.vof1 3960 dcd v_slideup-vof1 ; 1 = Slide Pitch up (till Amis Max) 3970 dcd v_slidedown-vof1 ; 2 = Slide Pitch down (till Amis Min) 3980 dcd v_volup-vof1 ; 3 = Volume up 3990 dcd v_voldown-vof1 ; 4 = Volume down 4000 dcd v_arcup-vof1 ; 5 = Slide Arc Pitch up 4010 dcd v_arcdown-vof1 ; 6 = Slide Arc Pitch down 4020.v_arpeggio 4030 mov r1,r1,lsr#24 ;Get last stored Tone into lowbyte 4040 cmp r0,#1 ;Time=1 or 4050 cmpNe r0,#4 ;Time=4 4060 addEq r1,r1,r2,lsr#4 ; ...then add left InfoNibble to Note 4070 cmp r0,#2 ;Time=2 or 4080 cmpNe r0,#5 ;Time=5 4090 andEq r2,r2,#&0f ; ...then add right InfoNibble to Note 4100 addEq r1,r1,r2 4110 ldr r1,[r11,r1,lsl#2] ;Get equivalent Frequency from r11=fTable 4120 str r1,[r12,#4] ;Enter Pitch 4130 mov pc,r14 4140.v_slideup 4150 add r1,r4,r2,lsl#6 ; Freq+InfoByte*64 4160 cmp r1,#&18800 ;Min Per = &071, ie OutPutF < &184DA 4170 strLt r1,[r12,#4] 4180 mov pc,r14 4190.v_slidedown 4200 sub r1,r4,r2,lsl#6 ; Freq-InfoByte*64 4210 cmp r1,#&3340 ;Max Per = &358, ie OutPutF > & 3355 4220 strGt r1,[r12,#4] 4230 mov pc,r14 4240.v_volup 4250 cmp r0,#1 ;Only each first v_interrupt for slow down 4260 movNe pc,r14 4270 ldr r1,[r12,#16] ;There is current Volume 4280 subS r1,r1,r2 4290 strPl r1,[r12,#16] ;If not > 0 (Max Vol), then write it back 4300 mov pc,r14 4310.v_voldown 4320 cmp r0,#1 4330 movNe pc,r14 4340 ldr r1,[r12,#16] 4350 add r1,r1,r2 4360 cmp r1,#255 4370 strLs r1,[r12,#16] ;If not <255 (Min Vol), then write it back 4380 mov pc,r14 4390.v_arcup 4400 addS r1,r4,r2,lsl#4 ;Pitch+InfoByte*16 (for slow sliding) 4410 strPl r1,[r12,#4] 4420 mov pc,r14 4430.v_arcdown 4440 subS r1,r4,r2,lsl#4 ;Pitch-InfoByte*16 (for slow sliding) 4450 strPl r1,[r12,#4] 4460 mov pc,r14 4470;*** ENTRY POINTS FOR GAME SOUND FX 4480.fx1 4490 adr r12,Head+0*32 4500 b fx4+4 4510.fx2 4520 adr r12,Head+1*32 4530 b fx4+4 4540.fx3 4550 adr r12,Head+2*32 4560 b fx4+4 4570.fx4 4580 adr r12,Head+3*32 4590 mov r0,#1 4600 strB r0,[r12,#30] ;Set SoundFX flag 4610 adr r10,Track 4620 adr r11,Ftable 4630 b vrule 4640;*** INTERRUPT ENTRY POINT (#r0=Event No, r12=Workspace [here HeadAdr]) 4650.vinter 4660 CMP r0,#4 ;check if vsync event 4670 MOVNES pc,r14 4680 stmfd r13!,{r1-r11} ;For not intercepting vector -> push r14 too 4690 adr r11,Ftable ;r11 & r12 pointers are needed in both cases 4700 ldmDb r11,{r0,r1} ;Load Counter & Speed 4710 add r0,r0,#1 ;Counter+ 4720 cmp r0,r1 ;If >= Speed, then... 4730 movHs r0,#0 ; reset Counter | HS, cause Set_Speed 4740 str r0,[r11,#-8] ; | could set 4750 bHs vplay ; & Play one row! | Speed < Counter... 4760 bl veffects ;Well, else support the effects 4770 add r12,r12,#32 4780 bl veffects ;2. 4790 add r12,r12,#32 4800 bl veffects ;3. 4810 add r12,r12,#32 4820 bl veffects ;4. 4830] 4840IF Vocs=8 THEN 4850[OPT p 4860 add r12,r12,#32 4870 bl veffects ;5. 4880 add r12,r12,#32 4890 bl veffects ;6. 4900 add r12,r12,#32 4910 bl veffects ;7. 4920 add r12,r12,#32 4930 bl veffects ;8. 4940] 4950ENDIF 4960[OPT p 4970 ldmfd r13!,{r1-r11,pc} ;Return 4980 4990;*** PLAY ONE PATTERN-POSITION (ALL 4/8 CHANNELS) 5000.vplay 5010 mov r0,#1 5020 strB r0,IntFlag ;Set Filler-Interupted-Flag! 5030 adr r6,Registers 5040 ldmIa r6,{r7-r9} ;Load 3 working registers 5050 adr r10,Track 5060 bl vchannel ;1. 5070 add r12,r12,#32 5080 bl vchannel ;2. 5090 add r12,r12,#32 5100 bl vchannel ;3. 5110 add r12,r12,#32 5120 bl vchannel ;4. 5130] 5140IF Vocs=8 THEN 5150[OPT p 5160 add r12,r12,#32 5170 bl vchannel ;5. 5180 add r12,r12,#32 5190 bl vchannel ;6. 5200 add r12,r12,#32 5210 bl vchannel ;7. 5220 add r12,r12,#32 5230 bl vchannel ;8. 5240] 5250ENDIF 5260[OPT p 5270 subS r7,r7,#1 ;Pattern_Counter - 1, is it zero? 5280 stmNeIa r6,{r7-r8} ;Not zero yet, so 5290 ldmNeFd r13!,{r1-r11,pc} ; don't play new Pattern, Return instead 5300 mov r7,#64 ;Well, new Pattern begins, with Count=64 5310 ldrB r0,[r9,#1]! ;And get next Pattern Nr. 5320 cmp r0,#&ff ;End of Sequence? 5330 ldrEq r9,[r10,#24] ; Yeah -> Reset Sequence Pointer, 5340 ldrEqB 0,[r9] ; that means restart Song! 5350 ldr r8,[r10,#28] ;Address Patternstart 5360 add r8,r8,r0,lsl#10-(Vocs=8) ;+ Nr*1024 (or Nr*2048) 5370 stmIa r6,{r7-r9} 5380 ldmfd r13!,{r1-r11,pc} ;Return 5390;*** SUPPLY ONE CHANNEL WITH LVAR INFORMATIONS 5400.vchannel 5410 ldr r1,[r8],#4 ;Pattern LWord of current Patt_Pos & INC 5420 ldrB r2,[r12,#30] ;Is SoundFX on? 5430 cmp r2,#0 5440 bEq vrule ;No... 5450 ldr r2,[r12,#4] 5460 cmp r2,#0 ;Yes, but is sample still active? 5470 strEqB 2,[r12,#30] ;No, so cancel FX 5480 mov pc,r14 5490.vrule 5500 movS r0,r1,lsr#24 ;Isolate Tone & Is it zero? 5510 bEq vcomms ;No Tone -> Perhaps still a Command... 5520 strB r0,[r12,#31] ;Store legal Tone for poss. Arpeggio effect 5530 ldr r0,[r11,r0,lsl#2] ;Get equivalent Frequency from r11=fTable 5540 str r0,[r12,#4] ;Enter Pitch 5550 andS r0,r1,#&ff <<16 ;Isolate Instrument-Byte, zero? 5560 ldrEq r0,[r12,#20] ; Y -> Get old RepAt (perhaps a RepTone!) 5570 strEq r0,[r12,#00] ; & Set as new Pos (same Inst once again) 5580 bEq vcomms 5590 ;Else point to InstPool = Track+Inst*32 5600 add r2,r10,r0,lsr#11 ;lsr#16 for lowbyte & lsl#5 for *32 => lsr#11 5610 ldmIa r2,{r0,r2-r5} ;Read all 5 InstPool Words at once 5620 str r0,[r12,# 8] ;Enter Sample Address 5630 str r3,[r12,#16] ;Enter Volume 5640 movS r0,r4,lsl#16 ;Pos=RepAt (in 16-fixpoint), but is it zero? 5650 addNe r2,r4,r5 ; No -> Len (absolute from 0) = RepAt+RepLen 5660 movNe r4,r0 ; -> Head Offset RepAt = fixpoint RepAt 5670 str r0,[r12,# 0] ;Enter Pos 5680 str r2,[r12,#12] ;Enter Length 5690 str r4,[r12,#20] ;Enter RepAt 5700.vcomms 5710 and r0,r1,#&0f <<8 ;Isolate Command-Nibble from DataLW 5720 and r2,r1,#&ff ;Isolate InfoByte 5730 ldr r3,[pc,r0,lsr#6] ;lsr#8 for Nibble into lowbyte & lsl#2 for *4 5740 add pc,pc,r3 5750 dcd vef-vof2 ;Effects 0.. 5760.vof2 5770 dcd vef-vof2 ;1 5780 dcd vef-vof2 ;2 5790 dcd vef-vof2 ;3 5800 dcd vef-vof2 ;4 5810 dcd vef-vof2 ;5 5820 dcd vef-vof2 ;6 5830 dcd vstereopos-vof2 ; 7 = Set Stereo Pos 5840 dcd vautovolup-vof2 ; 8 = Auto Volume up 5850 dcd vautovoldown-vof2 ; 9 = Auto Volume down 5860 dcd vautoarcup-vof2 ; A = Auto Pitch up 5870 dcd vautoarcdown-vof2 ; B = Auto Pitch down 5880 dcd vsetvol-vof2 ; C = Set Volume 5890 dcd vpattbreak-vof2 ; D = Pattern Break 5900 dcd vnop-vof2 ; E = (Not used yet) 5910 dcd vsetspeed-vof2 ; F = Set Speed 5920.vef ;Effects, needn't to be done here, but later! 5930 strB r2,[r12,#28] ;Store InfoByte, for Effects 5940 mov r0,r0,lsr#8 5950 strB r0,[r12,#29] ;Store CommByte, for Effects 5960.vnop 5970 mov pc,r14 ;and return 5980.vstereopos 5990 adr r0,Head ;Get current channel number (little Overhead) 6000 sub r0,r12,r0 6010 mov r0,r0,lsr#3 ;DIV 8; => 0,4,8,12,... 6020 cmp r0,#7*4 6030 movEq r1, #&60 ;Stereo Image Register 7 = Adr &60 6040 addNe r1,r0,#&64 ;Stereo Image Registers 0-6 = Adr &64 upwards 6050 mov r1,r1,lsl#24 6060 orr r1,r1,r2 6070 mov r2,#&3400000 6080 str r1,[r2] 6090] 6100IF Vocs=4 THEN 6110[OPT p 6120 cmp r0,#3*4 ;Extra Adr of Image Reg 7 6130 subEq r1,r1,#&10<<24 6140 addNe r1,r1,#&10<<24 ;Well, set up twin Image Reg too! 6150 str r1,[r2] 6160] 6170ENDIF 6180[OPT p 6190 mov pc,r14 6200.vautovolup 6210 strB r2,[r12,#24] 6220 mov pc,r14 6230.vautovoldown 6240 strB r2,[r12,#25] 6250 mov pc,r14 6260.vautoarcup 6270 strB r2,[r12,#26] 6280 mov pc,r14 6290.vautoarcdown 6300 strB r2,[r12,#27] 6310 mov pc,r14 6320.vsetvol 6330 str r2,[r12,#16] ;Enter new Volume into Header 6340 mov pc,r14 6350.vpattbreak 6360 mov r7,#1 ;Jump to end of Patt, ie Patt_Count=1 6370 mov pc,r14 6380.vsetspeed 6390 str r2,Vspeed ;Set new (overall-) Speed 6400 mov pc,r14 6410;==== DATABAY ==== 6420.Registers dcd 64 ; r7 Pattern_Counter (64 -> 1) 6430 dcd 00 ; r8 Current Pointer in the Pattern 6440 dcd 00 ; r9 Current Pointer in the Sequence 6450 6460.Vcount dcd 0 ;VSync Counter |Keep these two 6470.Vspeed dcd 6 ;Speed Counter (default=6) | < .Ftable 6480.Ftable ]:P%+=9*12*4:[OPT p 6490.Track 6500;Sample Head (at Inst*32) #00 Absolute Sample Address 6510 ; #04 Length 6520 ; #08 Volume 0-&ff 6530 ; #12 RepeatAt as ByteOffset 6540 ; #16 RepLen 6550 ; #20 Instrument Name 6560;====INITSTORE ==== 6570 mov r2,#0 6580.uall 6590 str r2,[r0],#4 6600 cmp r0,r1 6610 bLo uall 6620 mov pc,r14 6630.ufin 6640]:ENDPROC 6650----------------------- 6660 76102er ADR (only forwards) 6670----------------------- 6680DEF FNadr(r%,dest%) 6690dis%=dest%-P%-8 6700IF p=%1000 THEN 6710 d0%=0 :d1%=0 6720ELSE 6730 IF dis% AND &f THEN 6740 d0%=dis% AND &000FF 6750 d1%=dis% AND &FFF00 6760 ELSE 6770 d0%=dis% AND &00FFF 6780 d1%=dis% AND &FF000 6790 ENDIF 6800 IF d0%+d1%<>dis% THEN PRINT CHR$7;"FNadr doesn't suffice!":END 6810 IF d0%=0 OR d1%=0 THEN PRINT "FNadr : ADR would do. ";~dis% 6820ENDIF 6830[OPT p 6840 add r%,pc,#d1% 6850 add r%,r%,#d0% 6860]="" 6870DEFPROCerror:MODE12:REPORT:PRINT" at line ";ERL:ENDPROC
� >Tools.Modul � � �error:� � code 256000,L%-1 ,mess$=�15,�31)+�9+"1.20 ("+��$,5,11)+")" (� p=%1000 � %1010 � 2 2P%=code <�_Music F� p Pend%=Track+pointer Z/�''"Start at : &";~code,"End at : &";~end% d3� "Total len: ";end%-code,"Song len: ";pointer n�'"Save song module as: "a$ x&� "Save "+a$+" "+�~code+" "+�~end% �� "Settype "+a$+" Module" �� �M------------------------------------------------------------------------- � � �_Music �� p=%1000 � �4 *RMEnsure Packit 1.50 RMLoad !Coconizer.Packit � maxinst=32 �F � nam$(2002),byt%(2002),loc$(2002),sort%(maxinst),sort$(maxinst) � sort$(2)="�" � top%=0 � f%=� "location" �8 � f%=0 � �'"PLEASE INSERT A SONG DISC":a$=�:� �df@ � ȕ � �#f% ? top%+=1:nam$(top%)=�#f%:�#f%,byt%(top%):loc$(top%)=�#f% � �#f% "H �'"Please enter song path [SONGS]: "path$:� path$="" path$="songs" , � "Cat "+path$ 6 �'"Coconizer songfile? "a$ @ a$=path$+"."+a$ J f%=� a$ T5 b1=�#f%:b2=�#f%:b3=�#f%:b4=�#f%:b5=�#f%:b6=�#f% ^ �#f% h9 � b4=0 � b5>0 � Vocs=b6 � Vocs=b1 :� packed...? r �_MusicASM |> A%=code:B%=Track-1:� Track :� Initstore �? A%=ufin:B%=L%-1 :� Track :� really ALL � � �� � �_MusicASM �� �� *** LOAD INSTRUMENTS *** ��"Channels: ";Vocs �� b4=0 � b5>0 � �" � "PackLoad "+a$+" "+�~Track �� � � "Load "+a$+" "+�~Track �� �D� i%=0 � 9*12-1 :� From internat. Octave -3 to Octave 5 Jn%=i% +4*12 :� Correct it, as 'Steinway' +0 = Middle C 4f%=440*(2^((n%-46)/12)) :� Frequency formula )Ftable!(i%*4)=(f%/(1000000/us))*65536 &� i% 0a$=�$(Track+1),15) :�'"NAME: ";a$; D!ȕ �a$,1)=" ":a$=�a$,�a$-1):� N$helps=a$:helps?(�a$)=31 X;� �46);"Sequencies: ";Track?22;" Patterns: ";Track?23' bIpointer=Track!32 :� +Track :REM SampleData Offset l� i%=1 � Track?21 v Track!(i%*32+ 0)=pointer � len=Track!(i%*32+ 4) � vol=Track!(i%*32+ 8) � rat=Track!(i%*32+12) � ren=Track!(i%*32+16) � na$=$(Track+i%*32+20) �0 � �(96+i%);" : ";na$;�18);vol,rat,ren,len; �[ � j%=1 � top%:� na$<>nam$(j%) � �:�'" -> "na$:$(Track+i%*32+20)=na$:� �30,�8);:� �t|B � � " (";byt%(j%);")"; �> � len>byt%(j%) � len=byt%(j%):Track!(i%*32+4)=len:� "*"; � � ,(�loc$(j%)-65) � 2 +1 �% sort$(i%)=loc$(j%):sort%(i%)=i% � pointer+=len+gap �� i% � � flag%=0 � i%=1 � Track?21-1 *[ � sort$(i%)>sort$(i%+1) � Ȕ sort$(i%),sort$(i%+1):Ȕ sort%(i%),sort%(i%+1):flag%=1 4 � i% > � flag%=0 H� i%=1 � Track?21 R s=sort%(i%) \D na$=$(Track+s*32+20):adr=Track+Track!(s*32):len=Track!(s*32+4) f" fu$="Inst"+sort$(i%)+"."+na$ p f=� fu$ z � f � � � na$;", "; � $(adr+len)=�gap-1,�0) �$ ș "OS_GBPB",4,f,adr,len:�#f � � �# disc=(�sort$(i%)-65) � 2 +1 �3 �'�7;"PLEASE INSERT SAMPLE DISC ";disc:a$=� � � �DpC � � �� i% �� �� �_MusicASM � gap=16 � us =48 [OPT p ;--------------------------- ; COCONIZER �ULE PLAYER $ ;--------------------------- .$ dcd 0 ;Start code 8- dcd init-code ;Initialisation code B+ dcd fini-code ;Finalisation code L. dcd 0 ;Service Call Handler V& dcd title-code ;Title String `% dcd helps-code ;Help String j8 dcd 0 ;Help and Command keyword table t'.title dcb "CoconizerSong"+�0:align ~.helps dcb mess$+�0:align � .init �; stmfd r13!,{r7-r11,r14} ;We are called in SVC_mode! � bl v_on � ldmfd r13!,{r7-r11,pc}^ � .fini � stmfd r13!,{r7-r11,r14} � bl v_off �B bl vrelativ ;And back to origin relative state � ldmfd r13!,{r7-r11,pc}^ �(;----------------------------------- �; �'; THE COCONIZER PLAYER ROUTINE v1.2 ; %; Needs 20% of the ARM-II speed ; ; (c) Mai 1990 by ($; Eduard Pfarr & Thomas Alber 2; of Playfield <; F%; Latest revision - 10 Feb 1991 P; Z(;----------------------------------- d .v_on n stmfd r13!,{r14} x% mov r0,#2 ;Ƞ 2 �E mov r1,#208 ;BufferLen of �E channel, total *Vocs �. mov r2,#us ;Sample Period �7 mov r3,#0 ;Default ChannelHandler �1 mov r4,#0 ;Default Sheduler � swi "Sound_Configure" �H mov r0,#Vocs ;Ƞ 8 with params doesn't work directly! �I mov r1,#0 ;Because then sample rate is set false... � mov r2,#0 � mov r3,#0 � mov r4,#0 � swi "Sound_Configure" � adr r0,VoiceBase �K mov r1,#0 ;Install our Voice into next free Slot swi "Sound_InstallVoice" 5 str r1,Vslot ;store used slot # adr r2,Vstereos-4*4*(Vocs=8) " mov r0,#1 ,.vimage 6 ldr r1,[r2],#4 @/ swi "Sound_Stereo" ;*Ȣ r0 r1 J add r0,r0,#1 T cmp r0,#Vocs ^ bLs vimage h mov r0,#Vocs r .vset | adr r1,Vname �; swi "Sound_AttachNamedVoice" ;*CHANNELVOICE r0 "r1" � mov r1,#&170 �; mov r2,#50 ;Activate all channels once � mov r3,#255 �/ swi "Sound_Control" ;*� r0 r1 r2 r3 � subS r0,r0,#1 � bNe vset � bl vabsolut � bl v_reset �< mov r0,#16 ;Claim EVENT Vector (Nr. 16) � �adr (1,vinter) �; adr r2,Head ;Entry WorkspacePointer r12 � swi "OS_Claim" 4 mov r0,#14 ;Enable Event Nr. r1 2 mov r1,#4 ;(4 = VSync Event) swi "OS_Byte" &1 mov r0,#Vocs ;And once more... 0 mov r1,#0 : mov r2,#0 D mov r3,#0 N mov r4,#0 X' swi "Sound_Configure" ;Grrrh! b4 mov r0,#0 ;Read current Volume l swi "Sound_Volume" v# mov r0,r0,lsl#1 ;*2 � rsb r0,r0,#254 �= str r0,Volume ;and use it as overall Volume �3 mov r11,#3 ;Test max 3 times ! � .vtest � mov r1,#0 � strB r1,IntSync � mov r3,#26 � bl vwait �; ldrB r1,IntSync ;Is there a Loser-Channel ? � cmp r1,#0 � ldmEqFd r13!,{pc} �$ mov r0,#1 ;Off � swi "Sound_Enable" mov r3,#101 bl vwait # mov r0,#2 ;On swi "Sound_Enable" * subS r11,r11,#1 4 bNe vtest >0 ldmfd r13!,{pc} ;Well, bad luck! H .vwait R mov r12,r14 \9 mov r0,#19 ;Wait for some frameflies f swi "OS_Byte" p subS r3,r3,#1 z bNe vwait+8 �+ mov pc,r12 ;svc_r14... �;*** �OLUTE CODE � .vabsolut � �adr (10,Track) �0 ldr r1,[r10,#24] ;Sequence Offset � add r1,r10,r1 � str r1,[r10,#24] �/ ldr r2,[r10,#28] ;Pattern Offset � add r2,r10,r2 � str r2,[r10,#28] �0 ldrB r1,[r10,#21] ;Number of Insts � .vall �1 ldr r2,[r10,r1,lsl#5] ;Inst Addr Offset add r2,r10,r2 & str r2,[r10,r1,lsl#5] ;+i*32 subS r1,r1,#1 $ bNe vall . mov pc,r14 8;*** RELATIVE CODE B .vrelativ L �adr (10,Track) V ldr r1,[r10,#24] ` sub r1,r1,r10 j str r1,[r10,#24] t ldr r2,[r10,#28] ~ sub r2,r2,r10 � str r2,[r10,#28] � ldrB r1,[r10,#21] � .vall � ldr r2,[r10,r1,lsl#5] � sub r2,r2,r10 � str r2,[r10,r1,lsl#5] � subS r1,r1,#1 � bNe vall � mov pc,r14 �;*** RESTART TUNE �.v_reset � �adr (10,Track) mov r1,#64 + str r1,Registers+0 ;Patt Count ldr r2,[r10,#24] 9 str r2,Registers+8 ;Current Sequence Pointer ( ldrB r2,[r2] 2 ldr r3,[r10,#28] <# add r3,r3,r2,lsl#10-(Vocs=8) F8 str r3,Registers+4 ;Current Pattern Pointer P adr r11,Head Z. mov r1,#0:mov r2,#0:mov r3,#0:mov r4,#0 d. mov r5,#0:mov r6,#0:mov r7,#0:mov r8,#0 n mov r0,#Vocs x .vall �; stmia r11!,{r1-r8} ;Clear all channel heads... � subS r0,r0,#1 � bNe vall � mov pc,r14 � ;*** TURN � PLAYER � COCO-ȡ � .v_off � stmfd r13!,{r14} �5 mov r0,#13 ;Disable Event Nr. r1 �2 mov r1,#4 ;(4 = VSync Event) � swi "OS_Byte" �; mov r0,#16 ;Free EVENT Vector (Nr. 16) � adr r1,vinter � adr r2,Head swi "OS_Release" ldr r1,Vslot E swi "Sound_RemoveVoice" ;Last but not least... Free VoiceSlot " mov r0,#1 , mov r1,#1 6, swi "Sound_AttachVoice" ;Reinit Bell @ ldmfd r13!,{pc} J .Vstereos T2 dcd -50 ;Stereo Positions for 4 channels ^ dcd -20 h dcd 20 r dcd 50 |2 dcd-126 ;Stereo Positions for 8 channels � dcd -90 � dcd -54 � dcd -18 � dcd 18 � dcd 54 � dcd 90 � dcd 126 �.Vslot dcd 0 �H;==== șTEM � v2.1 ================================================= �@; r6 Neg. if new Handler r10 Pointer to end of DMA buffer �M; r7 Channel number r11 Increment (interleaf) to use when writing �M; r8 Sample period in us r12 Pointer to (start of DMA + interleaf Ofs) �M; r9 Pointer to SCCB Filler is entered in IRQ mode & Ints enabled! .VoiceBase ? b vfill ;Fill for smooth adjust ? b vfill ;Update for tone continue &: b vfill ;GateOn for new tone 0? ldmfd r13!,{pc} ;GateOff for tone flushing :H ldmfd r13!,{pc} ;Instantiate, Attach VoiceGenerator DJ ldmfd r13!,{pc} ;DeInstantiate, Detach to/from a channel N. ldmfd r13!,{pc} ;Hello Arthur! X> dcd Vname-VoiceBase ;Offset from VoiceBase to Name b.Vname dcb "Cocoplex"+�0 l align v .vfill �= adr r8,Head ;We use an own Controll_Block �4 add r8,r8,r7,lsl#5 ;point to Head+r7*32 �9 ldmIa r8,{r1-r6} ;Load 6 working Registers � ldr r0,Volume �E add r5,r5,r0 ;Add Overall_Volume to Channel_Volume � mov r0,#0 �7 strB r0,IntFlag ;Clear Interrupted_Flag � .vfilloop �H]:� n=1 � gap:[OPT p ;Fill one byte 16 times, for 208 -> 13 runs �C ldrB r0,[r3,r1,lsr#16] ;Load sample byte (HighWord of Pos) �H subS r0,r0,r5 ;Minus Volume (where 0=loud & 255=quiet) � movMi r0,#0 �< strB r0,[r12],r11 ;And put it into VIDC-buffer 6 add r1,r1,r2 ;Add Pitch (fix point) ]:�:[OPT p H cmp r4,r1,lsr#16 ;Length exceeded? (Len < fixpointed Pos) : movLs r1,r6 ;Yes, so RepAt is new Pos, *4 cmp r1,#0 ; but is it zero? 4L movEq r2,#0 ; yes -> Mute Channel (ie Set Pitch to 0) >< cmp r12,r10 ;VIDC-Buffer filled already? H( bLo vfilloop ;Nooo... RF stmIa r8,{r1-r2} ;Save the two (probably) modified regs \L ldrB r0,IntFlag ;Have we been interrupted by our Play-Event? f cmp r0,#1 p6 strEqB 0,IntSync ;Ah, fucky YES! (Oops) zB mov r0,#%00001000 ;And return with Voice-Active-Flag � ldmfd r13!,{pc} � .Head �K dcd 0 ;r1 Pos in the sample (Offset in fix point) �J dcd 0 ;r2 Increment/Pitch (LowWord for fixpoint) �1 dcd 0 ;r3 Sample Adress �* dcd 0 ;r4 Length �A dcd 0 ;r5 Volume (0=Loud ... 255=Quiet) �M dcd 0 ;r6 RepAt (New fixpoint Pos), or 0 for NO REP �B dcd 0 ;Byte +24 Value for Auto Volume up �D ; 25 " " " Volume down �A ; 26 " " " Pitch up �C ; 27 " " " Pitch down �: dcd 0 ;Byte +28 Actual Info Byte : ; 29 Actual Comm Byte 9 ; 30 (Sound FX Flag) > ; 31 Last legal tone/note $5 dcb �3*32-4*32*(Vocs=8),�0) ;Add 3 or 7 Heads .5.Volume dcd 0 ;Overall_Sound_Volume 8<.IntFlag dcb 0 ;Set = Have been interrupted B;.IntSync dcb 0 ;Set = Loser needs new sync L align VM;==== PLAY EVENT v1.2 =================================================== ` j=;*** DO EVERY VSYNC EFFECTS (#r0=Timer ... $r0=preserved) t .veffects ~3 ldr r4,[r12,#4] ;Load current Pitch �J cmp r4,#0 ;No active tone -> sorry, effect disabled! � movEq pc,r14 �2 ldr r3,[r12,#24] ;Load Auto-Effects �) mov r10,r14 ;Push r14 �9 andS r2,r3,#&ff ;Is there Auto Volume up? � blNe v_volup �; andS r2,r3,#&ff <<8 ;Is there Auto Volume down? � movNe r2,r2,lsr#8 � blNe v_voldown �8 andS r2,r3,#&ff <<16 ;Is there Auto Pitch up? � movNe r2,r2,lsr#16 � blNe v_arcup : andS r2,r3,#&ff <<24 ;Is there Auto Pitch down? movNe r2,r2,lsr#24 blNe v_arcdown ) mov r14,r10 ;Pop r14 (K ldr r1,[r12,#28] ;Effect LWord & Last Tone are in the Header 21 andS r2,r1,#&ff ;Isolate InfoByte <E movEq pc,r14 ;if 0, then there's no effect at all! F6 and r3,r1,#&ff00 ;Isolate Effect number PM ldr r3,[pc,r3,lsr#6] ;lsr#8 for effect into lowbyte & lsl#2 for *4 Z add pc,pc,r3 d. dcd v_arpeggio-vof1 ; 0 = Arpeggio n .vof1 xF dcd v_slideup-vof1 ; 1 = Slide Pitch up (till Amis Max) �F dcd v_slidedown-vof1 ; 2 = Slide Pitch down (till Amis Min) �/ dcd v_volup-vof1 ; 3 = Volume up �1 dcd v_voldown-vof1 ; 4 = Volume down �8 dcd v_arcup-vof1 ; 5 = Slide Arc Pitch up �: dcd v_arcdown-vof1 ; 6 = Slide Arc Pitch down �.v_arpeggio �B mov r1,r1,lsr#24 ;Get last stored Tone into lowbyte �* cmp r0,#1 ;Time=1 or �' cmpNe r0,#4 ;Time=4 �F addEq r1,r1,r2,lsr#4 ; ...then add left InfoNibble to Note �* cmp r0,#2 ;Time=2 or �' cmpNe r0,#5 ;Time=5 �F andEq r2,r2,#&0f ; ...then add right InfoNibble to Note addEq r1,r1,r2 I ldr r1,[r11,r1,lsl#2] ;Get equivalent Frequency from r11=fTable , str r1,[r12,#4] ;Enter Pitch " mov pc,r14 ,.v_slideup 62 add r1,r4,r2,lsl#6 ; Freq+InfoByte*64 @D cmp r1,#&18800 ;Min Per = &071, ie OutPutF < &184DA J strLt r1,[r12,#4] T mov pc,r14 ^.v_slidedown h2 sub r1,r4,r2,lsl#6 ; Freq-InfoByte*64 rD cmp r1,#&3340 ;Max Per = &358, ie OutPutF > & 3355 | strGt r1,[r12,#4] � mov pc,r14 �.v_volup �J cmp r0,#1 ;Only each first v_interrupt for slow down � movNe pc,r14 �8 ldr r1,[r12,#16] ;There is current Volume � subS r1,r1,r2 �J strPl r1,[r12,#16] ;If not > 0 (Max Vol), then write it back � mov pc,r14 �.v_voldown � cmp r0,#1 � movNe pc,r14 � ldr r1,[r12,#16] � add r1,r1,r2 cmp r1,#255 J strLs r1,[r12,#16] ;If not <255 (Min Vol), then write it back mov pc,r14 &.v_arcup 0E addS r1,r4,r2,lsl#4 ;Pitch+InfoByte*16 (for slow sliding) : strPl r1,[r12,#4] D mov pc,r14 N.v_arcdown XE subS r1,r4,r2,lsl#4 ;Pitch-InfoByte*16 (for slow sliding) b strPl r1,[r12,#4] l mov pc,r14 v;*** ENTRY ȒS � GAME � FX �.fx1 � adr r12,Head+0*32 � b fx4+4 �.fx2 � adr r12,Head+1*32 � b fx4+4 �.fx3 � adr r12,Head+2*32 � b fx4+4 �.fx4 � adr r12,Head+3*32 � mov r0,#1 �1 strB r0,[r12,#30] ;Set SoundFX flag adr r10,Track adr r11,Ftable b vrule F;*** �ERRUPT ENTRY Ȓ (#r0=Event No, r12=Workspace [here HeadAdr]) *.vinter 45 CMP r0,#4 ;check if vsync event > MOVNES pc,r14 HL stmfd r13!,{r1-r11} ;For not intercepting vector -> push r14 too RL adr r11,Ftable ;r11 & r12 pointers are needed in both cases \5 ldmDb r11,{r0,r1} ;Load Counter & Speed f) add r0,r0,#1 ;Counter+ p5 cmp r0,r1 ;If >= Speed, then... zM movHs r0,#0 ; reset Counter | HS, cause Set_Speed �C str r0,[r11,#-8] ; | could set �L bHs vplay ; & Play one row! | Speed < Counter... �? bl veffects ;Well, else support the effects � add r12,r12,#32 �# bl veffects ;2. � add r12,r12,#32 �# bl veffects ;3. � add r12,r12,#32 �# bl veffects ;4. �] �� Vocs=8 � � [OPT p � add r12,r12,#32 # bl veffects ;5. add r12,r12,#32 # bl veffects ;6. $ add r12,r12,#32 .# bl veffects ;7. 8 add r12,r12,#32 B# bl veffects ;8. L] V� ` [OPT p j' ldmfd r13!,{r1-r11,pc} ;Return t ~4;*** PLAY �E PATTERN-POSITION (ALL 4/8 CHANNELS) � .vplay � mov r0,#1 �< strB r0,IntFlag ;Set Filler-Interupted-Flag! � adr r6,Registers �9 ldmIa r6,{r7-r9} ;Load 3 working registers � adr r10,Track �# bl vchannel ;1. � add r12,r12,#32 �# bl vchannel ;2. � add r12,r12,#32 �# bl vchannel ;3. � add r12,r12,#32 # bl vchannel ;4. ] � Vocs=8 � [OPT p ( add r12,r12,#32 2# bl vchannel ;5. < add r12,r12,#32 F# bl vchannel ;6. P add r12,r12,#32 Z# bl vchannel ;7. d add r12,r12,#32 n# bl vchannel ;8. x] �� � [OPT p �A subS r7,r7,#1 ;Pattern_Counter - 1, is it zero? �1 stmNeIa r6,{r7-r8} ;Not zero yet, so �H ldmNeFd r13!,{r1-r11,pc} ; don't play new Pattern, Return instead �H mov r7,#64 ;Well, new Pattern begins, with Count=64 �9 ldrB r0,[r9,#1]! ;And get next Pattern Nr. �1 cmp r0,#&ff ;End of Sequence? �A ldrEq r9,[r10,#24] ; Yeah -> Reset Sequence Pointer, �B ldrEqB 0,[r9] ; that means restart Song! �5 ldr r8,[r10,#28] ;Address Patternstart �> add r8,r8,r0,lsl#10-(Vocs=8) ;+ Nr*1024 (or Nr*2048) � stmIa r6,{r7-r9} ' ldmfd r13!,{r1-r11,pc} ;Return /;*** SUPPLY �E CHANNEL WITH ǖ INFORMATIONS .vchannel "H ldr r1,[r8],#4 ;Pattern LWord of current Patt_Pos & INC ,/ ldrB r2,[r12,#30] ;Is SoundFX on? 6 cmp r2,#0 @& bEq vrule ;No... J ldr r2,[r12,#4] TA cmp r2,#0 ;Yes, but is sample still active? ^1 strEqB 2,[r12,#30] ;No, so cancel FX h mov pc,r14 r .vrule |; movS r0,r1,lsr#24 ;Isolate Tone & Is it zero? �F bEq vcomms ;No Tone -> Perhaps still a Command... �K strB r0,[r12,#31] ;Store legal Tone for poss. Arpeggio effect �I ldr r0,[r11,r0,lsl#2] ;Get equivalent Frequency from r11=fTable �, str r0,[r12,#4] ;Enter Pitch �? andS r0,r1,#&ff <<16 ;Isolate Instrument-Byte, zero? �I ldrEq r0,[r12,#20] ; Y -> Get old RepAt (perhaps a RepTone!) �L strEq r0,[r12,#00] ; & Set as new Pos (same Inst once again) � bEq vcomms �G ;Else point to InstPool = Track+Inst*32 �M add r2,r10,r0,lsr#11 ;lsr#16 for lowbyte & lsl#5 for *32 => lsr#11 �B ldmIa r2,{r0,r2-r5} ;Read all 5 InstPool Words at once �5 str r0,[r12,# 8] ;Enter Sample Address �- str r3,[r12,#16] ;Enter Volume L movS r0,r4,lsl#16 ;Pos=RepAt (in 16-fixpoint), but is it zero? L addNe r2,r4,r5 ; No -> Len (absolute from 0) = RepAt+RepLen J movNe r4,r0 ; -> Head Offset RepAt = fixpoint RepAt &* str r0,[r12,# 0] ;Enter Pos 0- str r2,[r12,#12] ;Enter Length :, str r4,[r12,#20] ;Enter RepAt D.vcomms NC and r0,r1,#&0f <<8 ;Isolate Command-Nibble from DataLW X1 and r2,r1,#&ff ;Isolate InfoByte bM ldr r3,[pc,r0,lsr#6] ;lsr#8 for Nibble into lowbyte & lsl#2 for *4 l add pc,pc,r3 v, dcd vef-vof2 ;Effects 0.. � .vof2 �" dcd vef-vof2 ;1 �" dcd vef-vof2 ;2 �" dcd vef-vof2 ;3 �" dcd vef-vof2 ;4 �" dcd vef-vof2 ;5 �" dcd vef-vof2 ;6 �4 dcd vstereopos-vof2 ; 7 = Set Stereo Pos �4 dcd vautovolup-vof2 ; 8 = Auto Volume up �6 dcd vautovoldown-vof2 ; 9 = Auto Volume down �3 dcd vautoarcup-vof2 ; A = Auto Pitch up �5 dcd vautoarcdown-vof2 ; B = Auto Pitch down �0 dcd vsetvol-vof2 ; C = Set Volume 3 dcd vpattbreak-vof2 ; D = Pattern Break 4 dcd vnop-vof2 ; E = (Not used yet) / dcd vsetspeed-vof2 ; F = Set Speed M.vef ;Effects, needn't to be done here, but later! *< strB r2,[r12,#28] ;Store InfoByte, for Effects 4 mov r0,r0,lsr#8 >< strB r0,[r12,#29] ;Store CommByte, for Effects H .vnop R+ mov pc,r14 ;and return \.vstereopos fM adr r0,Head ;Get current channel number (little Overhead) p sub r0,r12,r0 z5 mov r0,r0,lsr#3 ;� 8; => 0,4,8,12,... � cmp r0,#7*4 �E movEq r1, #&60 ;Stereo Image Register 7 = Adr &60 �M addNe r1,r0,#&64 ;Stereo Image Registers 0-6 = Adr &64 upwards � mov r1,r1,lsl#24 � orr r1,r1,r2 � mov r2,#&3400000 � str r1,[r2] �] �� Vocs=4 � � [OPT p �9 cmp r0,#3*4 ;Extra Adr of Image Reg 7 � subEq r1,r1,#&10<<24 �A addNe r1,r1,#&10<<24 ;Well, set up twin Image Reg too! str r1,[r2] ] � $ [OPT p . mov pc,r14 8.vautovolup B strB r2,[r12,#24] L mov pc,r14 V.vautovoldown ` strB r2,[r12,#25] j mov pc,r14 t.vautoarcup ~ strB r2,[r12,#26] � mov pc,r14 �.vautoarcdown � strB r2,[r12,#27] � mov pc,r14 �.vsetvol �= str r2,[r12,#16] ;Enter new Volume into Header � mov pc,r14 �.vpattbreak �E mov r7,#1 ;Jump to end of Patt, ie Patt_Count=1 � mov pc,r14 �.vsetspeed �9 str r2,Vspeed ;Set new (overall-) Speed mov pc,r14 ;==== �BAY ==== >.Registers dcd 64 ; r7 Pattern_Counter (64 -> 1) C dcd 00 ; r8 Current Pointer in the Pattern (D dcd 00 ; r9 Current Pointer in the Sequence 2 <M.Vcount dcd 0 ;VSync Counter |Keep these two FJ.Vspeed dcd 6 ;Speed Counter (default=6) | < .Ftable P%.Ftable ]:P%+=9*12*4:[OPT p Z .Track d;;Sample Head (at Inst*32) #00 Absolute Sample Address n* ; #04 Length x0 ; #08 Volume 0-&ff �: ; #12 RepeatAt as ByteOffset �* ; #16 RepLen �3 ; #20 Instrument Name �;====INITSTORE ==== � mov r2,#0 � .uall � str r2,[r0],#4 � cmp r0,r1 � bLo uall � mov pc,r14 � .ufin �]:� �----------------------- 76102er ADR (only forwards) ----------------------- � �adr(r%,dest%) "dis%=dest%-P%-8 ,� p=%1000 � 6 d0%=0 :d1%=0 @� J � dis% � &f � T d0%=dis% � &000FF ^ d1%=dis% � &FFF00 h � r d0%=dis% � &00FFF | d1%=dis% � &FF000 � � �7 � d0%+d1%<>dis% � � �7;"FNadr doesn't suffice!":� �8 � d0%=0 � d1%=0 � � "FNadr : ADR would do. ";~dis% �� � [OPT p � add r%,pc,#d1% � add r%,r%,#d0% �]="" �"��error:�12:�:�" at line ";�:� �
00000000 0d 00 0a 12 f4 20 3e 54 6f 6f 6c 73 2e 4d 6f 64 |..... >Tools.Mod| 00000010 75 6c 0d 00 0f 10 ee 20 85 20 f2 65 72 72 6f 72 |ul..... . .error| 00000020 3a e0 0d 00 14 16 de 20 63 6f 64 65 20 32 35 36 |:...... code 256| 00000030 30 30 30 2c 4c 25 2d 31 0d 00 1e 2c 6d 65 73 73 |000,L%-1...,mess| 00000040 24 3d c4 31 35 2c bd 33 31 29 2b bd 39 2b 22 31 |$=.15,.31)+.9+"1| 00000050 2e 32 30 20 28 22 2b c1 91 24 2c 35 2c 31 31 29 |.20 ("+..$,5,11)| 00000060 2b 22 29 22 0d 00 28 19 e3 20 70 3d 25 31 30 30 |+")"..(.. p=%100| 00000070 30 20 b8 20 25 31 30 31 30 20 88 20 32 0d 00 32 |0 . %1010 . 2..2| 00000080 0b 50 25 3d 63 6f 64 65 0d 00 3c 0b f2 5f 4d 75 |.P%=code..<.._Mu| 00000090 73 69 63 0d 00 46 07 ed 20 70 0d 00 50 16 65 6e |sic..F.. p..P.en| 000000a0 64 25 3d 54 72 61 63 6b 2b 70 6f 69 6e 74 65 72 |d%=Track+pointer| 000000b0 0d 00 5a 2f f1 27 27 22 53 74 61 72 74 20 61 74 |..Z/.''"Start at| 000000c0 20 3a 20 26 22 3b 7e 63 6f 64 65 2c 22 45 6e 64 | : &";~code,"End| 000000d0 20 61 74 20 20 3a 20 26 22 3b 7e 65 6e 64 25 0d | at : &";~end%.| 000000e0 00 64 33 f1 20 20 22 54 6f 74 61 6c 20 6c 65 6e |.d3. "Total len| 000000f0 3a 20 22 3b 65 6e 64 25 2d 63 6f 64 65 2c 22 53 |: ";end%-code,"S| 00000100 6f 6e 67 20 6c 65 6e 3a 20 22 3b 70 6f 69 6e 74 |ong len: ";point| 00000110 65 72 0d 00 6e 1f e8 27 22 53 61 76 65 20 73 6f |er..n..'"Save so| 00000120 6e 67 20 6d 6f 64 75 6c 65 20 61 73 3a 20 22 61 |ng module as: "a| 00000130 24 0d 00 78 26 ff 20 22 53 61 76 65 20 22 2b 61 |$..x&. "Save "+a| 00000140 24 2b 22 20 22 2b c3 7e 63 6f 64 65 2b 22 20 22 |$+" "+.~code+" "| 00000150 2b c3 7e 65 6e 64 25 0d 00 82 1d ff 20 22 53 65 |+.~end%..... "Se| 00000160 74 74 79 70 65 20 22 2b 61 24 2b 22 20 4d 6f 64 |ttype "+a$+" Mod| 00000170 75 6c 65 22 0d 00 8c 05 e0 0d 00 96 4d 2d 2d 2d |ule"........M---| 00000180 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000001c0 2d 2d 2d 2d 2d 2d 0d 00 a0 0d dd 20 f2 5f 4d 75 |------..... ._Mu| 000001d0 73 69 63 0d 00 aa 0f e7 20 70 3d 25 31 30 30 30 |sic..... p=%1000| 000001e0 20 8c 0d 00 b4 34 20 20 2a 52 4d 45 6e 73 75 72 | ....4 *RMEnsur| 000001f0 65 20 50 61 63 6b 69 74 20 31 2e 35 30 20 52 4d |e Packit 1.50 RM| 00000200 4c 6f 61 64 20 21 43 6f 63 6f 6e 69 7a 65 72 2e |Load !Coconizer.| 00000210 50 61 63 6b 69 74 0d 00 be 10 20 20 6d 61 78 69 |Packit.... maxi| 00000220 6e 73 74 3d 33 32 0d 00 c8 46 20 20 de 20 6e 61 |nst=32...F . na| 00000230 6d 24 28 32 30 30 32 29 2c 62 79 74 25 28 32 30 |m$(2002),byt%(20| 00000240 30 32 29 2c 6c 6f 63 24 28 32 30 30 32 29 2c 73 |02),loc$(2002),s| 00000250 6f 72 74 25 28 6d 61 78 69 6e 73 74 29 2c 73 6f |ort%(maxinst),so| 00000260 72 74 24 28 6d 61 78 69 6e 73 74 29 0d 00 d2 12 |rt$(maxinst)....| 00000270 20 20 73 6f 72 74 24 28 32 29 3d 22 b1 22 0d 00 | sort$(2)="."..| 00000280 dc 0c 20 20 74 6f 70 25 3d 30 0d 00 e6 15 20 20 |.. top%=0.... | 00000290 66 25 3d 8e 20 22 6c 6f 63 61 74 69 6f 6e 22 0d |f%=. "location".| 000002a0 00 f0 38 20 20 e7 20 66 25 3d 30 20 8c 20 f1 27 |..8 . f%=0 . .'| 000002b0 22 50 4c 45 41 53 45 20 49 4e 53 45 52 54 20 41 |"PLEASE INSERT A| 000002c0 20 53 4f 4e 47 20 44 49 53 43 22 3a 61 24 3d be | SONG DISC":a$=.| 000002d0 3a e5 20 8d 64 66 40 0d 00 fa 0f 20 20 c8 95 20 |:. .df@.... .. | 000002e0 ac 20 c5 23 66 25 0d 01 04 3f 20 20 20 20 74 6f |. .#f%...? to| 000002f0 70 25 2b 3d 31 3a 6e 61 6d 24 28 74 6f 70 25 29 |p%+=1:nam$(top%)| 00000300 3d be 23 66 25 3a e8 23 66 25 2c 62 79 74 25 28 |=.#f%:.#f%,byt%(| 00000310 74 6f 70 25 29 3a 6c 6f 63 24 28 74 6f 70 25 29 |top%):loc$(top%)| 00000320 3d be 23 66 25 0d 01 0e 07 20 20 ce 0d 01 18 0a |=.#f%.... .....| 00000330 20 20 d9 23 66 25 0d 01 22 48 20 20 e8 27 22 50 | .#f%.."H .'"P| 00000340 6c 65 61 73 65 20 65 6e 74 65 72 20 73 6f 6e 67 |lease enter song| 00000350 20 70 61 74 68 20 5b 53 4f 4e 47 53 5d 3a 20 22 | path [SONGS]: "| 00000360 70 61 74 68 24 3a e7 20 70 61 74 68 24 3d 22 22 |path$:. path$=""| 00000370 20 70 61 74 68 24 3d 22 73 6f 6e 67 73 22 0d 01 | path$="songs"..| 00000380 2c 14 20 20 ff 20 22 43 61 74 20 22 2b 70 61 74 |,. . "Cat "+pat| 00000390 68 24 0d 01 36 20 20 20 e8 27 22 43 6f 63 6f 6e |h$..6 .'"Cocon| 000003a0 69 7a 65 72 20 73 6f 6e 67 66 69 6c 65 3f 20 22 |izer songfile? "| 000003b0 61 24 0d 01 40 15 20 20 61 24 3d 70 61 74 68 24 |a$..@. a$=path$| 000003c0 2b 22 2e 22 2b 61 24 0d 01 4a 0d 20 20 66 25 3d |+"."+a$..J. f%=| 000003d0 8e 20 61 24 0d 01 54 35 20 20 62 31 3d 9a 23 66 |. a$..T5 b1=.#f| 000003e0 25 3a 62 32 3d 9a 23 66 25 3a 62 33 3d 9a 23 66 |%:b2=.#f%:b3=.#f| 000003f0 25 3a 62 34 3d 9a 23 66 25 3a 62 35 3d 9a 23 66 |%:b4=.#f%:b5=.#f| 00000400 25 3a 62 36 3d 9a 23 66 25 0d 01 5e 0a 20 20 d9 |%:b6=.#f%..^. .| 00000410 23 66 25 0d 01 68 39 20 20 e7 20 62 34 3d 30 20 |#f%..h9 . b4=0 | 00000420 80 20 62 35 3e 30 20 8c 20 56 6f 63 73 3d 62 36 |. b5>0 . Vocs=b6| 00000430 20 8b 20 56 6f 63 73 3d 62 31 20 20 20 20 20 3a | . Vocs=b1 :| 00000440 f4 20 70 61 63 6b 65 64 2e 2e 2e 3f 0d 01 72 10 |. packed...?..r.| 00000450 20 20 f2 5f 4d 75 73 69 63 41 53 4d 0d 01 7c 3e | ._MusicASM..|>| 00000460 20 20 41 25 3d 63 6f 64 65 3a 42 25 3d 54 72 61 | A%=code:B%=Tra| 00000470 63 6b 2d 31 3a d6 20 54 72 61 63 6b 20 20 20 20 |ck-1:. Track | 00000480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 | :.| 00000490 20 49 6e 69 74 73 74 6f 72 65 0d 01 86 3f 20 20 | Initstore...? | 000004a0 41 25 3d 75 66 69 6e 3a 42 25 3d 4c 25 2d 31 20 |A%=ufin:B%=L%-1 | 000004b0 20 20 3a d6 20 54 72 61 63 6b 20 20 20 20 20 20 | :. Track | 000004c0 20 20 20 20 20 20 20 20 20 20 20 20 3a f4 20 72 | :. r| 000004d0 65 61 6c 6c 79 20 41 4c 4c 0d 01 90 07 20 20 e1 |eally ALL.... .| 000004e0 0d 01 9a 05 cc 0d 01 a4 10 20 20 f2 5f 4d 75 73 |......... ._Mus| 000004f0 69 63 41 53 4d 0d 01 ae 05 cd 0d 01 b8 1e f4 20 |icASM.......... | 00000500 2a 2a 2a 20 4c 4f 41 44 20 49 4e 53 54 52 55 4d |*** LOAD INSTRUM| 00000510 45 4e 54 53 20 2a 2a 2a 0d 01 c2 16 f1 22 43 68 |ENTS ***....."Ch| 00000520 61 6e 6e 65 6c 73 3a 20 22 3b 56 6f 63 73 0d 01 |annels: ";Vocs..| 00000530 cc 13 e7 20 62 34 3d 30 20 80 20 62 35 3e 30 20 |... b4=0 . b5>0 | 00000540 8c 0d 01 d6 22 20 20 ff 20 22 50 61 63 6b 4c 6f |...." . "PackLo| 00000550 61 64 20 22 2b 61 24 2b 22 20 22 2b c3 7e 54 72 |ad "+a$+" "+.~Tr| 00000560 61 63 6b 0d 01 e0 05 cc 0d 01 ea 1e 20 20 ff 20 |ack......... . | 00000570 22 4c 6f 61 64 20 22 2b 61 24 2b 22 20 22 2b c3 |"Load "+a$+" "+.| 00000580 7e 54 72 61 63 6b 0d 01 f4 05 cd 0d 01 fe 44 e3 |~Track........D.| 00000590 20 69 25 3d 30 20 b8 20 39 2a 31 32 2d 31 20 20 | i%=0 . 9*12-1 | 000005a0 20 20 20 20 20 20 20 20 3a f4 20 46 72 6f 6d 20 | :. From | 000005b0 69 6e 74 65 72 6e 61 74 2e 20 4f 63 74 61 76 65 |internat. Octave| 000005c0 20 2d 33 20 74 6f 20 4f 63 74 61 76 65 20 35 0d | -3 to Octave 5.| 000005d0 02 08 4a 6e 25 3d 69 25 20 2b 34 2a 31 32 20 20 |..Jn%=i% +4*12 | 000005e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3a | :| 000005f0 f4 20 43 6f 72 72 65 63 74 20 69 74 2c 20 61 73 |. Correct it, as| 00000600 20 27 53 74 65 69 6e 77 61 79 27 20 2b 30 20 3d | 'Steinway' +0 =| 00000610 20 4d 69 64 64 6c 65 20 43 0d 02 12 34 66 25 3d | Middle C...4f%=| 00000620 34 34 30 2a 28 32 5e 28 28 6e 25 2d 34 36 29 2f |440*(2^((n%-46)/| 00000630 31 32 29 29 20 20 20 20 20 3a f4 20 46 72 65 71 |12)) :. Freq| 00000640 75 65 6e 63 79 20 66 6f 72 6d 75 6c 61 0d 02 1c |uency formula...| 00000650 29 46 74 61 62 6c 65 21 28 69 25 2a 34 29 3d 28 |)Ftable!(i%*4)=(| 00000660 66 25 2f 28 31 30 30 30 30 30 30 2f 75 73 29 29 |f%/(1000000/us))| 00000670 2a 36 35 35 33 36 0d 02 26 08 ed 20 69 25 0d 02 |*65536..&.. i%..| 00000680 30 16 61 24 3d c0 24 28 54 72 61 63 6b 2b 31 29 |0.a$=.$(Track+1)| 00000690 2c 31 35 29 0d 02 3a 12 f1 27 22 4e 41 4d 45 3a |,15)..:..'"NAME:| 000006a0 20 22 3b 61 24 3b 0d 02 44 21 c8 95 20 c2 61 24 | ";a$;..D!.. .a$| 000006b0 2c 31 29 3d 22 20 22 3a 61 24 3d c0 61 24 2c a9 |,1)=" ":a$=.a$,.| 000006c0 61 24 2d 31 29 3a ce 0d 02 4e 1c 24 68 65 6c 70 |a$-1):...N.$help| 000006d0 73 3d 61 24 3a 68 65 6c 70 73 3f 28 a9 61 24 29 |s=a$:helps?(.a$)| 000006e0 3d 33 31 0d 02 58 3b f1 20 8a 34 36 29 3b 22 53 |=31..X;. .46);"S| 000006f0 65 71 75 65 6e 63 69 65 73 3a 20 22 3b 54 72 61 |equencies: ";Tra| 00000700 63 6b 3f 32 32 3b 22 20 20 50 61 74 74 65 72 6e |ck?22;" Pattern| 00000710 73 3a 20 22 3b 54 72 61 63 6b 3f 32 33 27 0d 02 |s: ";Track?23'..| 00000720 62 49 70 6f 69 6e 74 65 72 3d 54 72 61 63 6b 21 |bIpointer=Track!| 00000730 33 32 20 20 3a f4 20 2b 54 72 61 63 6b 20 20 20 |32 :. +Track | 00000740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000750 20 3a 52 45 4d 20 53 61 6d 70 6c 65 44 61 74 61 | :REM SampleData| 00000760 20 4f 66 66 73 65 74 0d 02 6c 15 e3 20 69 25 3d | Offset..l.. i%=| 00000770 31 20 b8 20 54 72 61 63 6b 3f 32 31 0d 02 76 1e |1 . Track?21..v.| 00000780 20 20 54 72 61 63 6b 21 28 69 25 2a 33 32 2b 20 | Track!(i%*32+ | 00000790 30 29 3d 70 6f 69 6e 74 65 72 0d 02 80 1a 20 20 |0)=pointer.... | 000007a0 6c 65 6e 3d 54 72 61 63 6b 21 28 69 25 2a 33 32 |len=Track!(i%*32| 000007b0 2b 20 34 29 0d 02 8a 1a 20 20 76 6f 6c 3d 54 72 |+ 4).... vol=Tr| 000007c0 61 63 6b 21 28 69 25 2a 33 32 2b 20 38 29 0d 02 |ack!(i%*32+ 8)..| 000007d0 94 1a 20 20 72 61 74 3d 54 72 61 63 6b 21 28 69 |.. rat=Track!(i| 000007e0 25 2a 33 32 2b 31 32 29 0d 02 9e 1a 20 20 72 65 |%*32+12).... re| 000007f0 6e 3d 54 72 61 63 6b 21 28 69 25 2a 33 32 2b 31 |n=Track!(i%*32+1| 00000800 36 29 0d 02 a8 1b 20 20 6e 61 24 3d 24 28 54 72 |6).... na$=$(Tr| 00000810 61 63 6b 2b 69 25 2a 33 32 2b 32 30 29 0d 02 b2 |ack+i%*32+20)...| 00000820 30 20 20 f1 20 bd 28 39 36 2b 69 25 29 3b 22 20 |0 . .(96+i%);" | 00000830 3a 20 22 3b 6e 61 24 3b 8a 31 38 29 3b 76 6f 6c |: ";na$;.18);vol| 00000840 2c 72 61 74 2c 72 65 6e 2c 6c 65 6e 3b 0d 02 bc |,rat,ren,len;...| 00000850 5b 20 20 e3 20 6a 25 3d 31 20 b8 20 74 6f 70 25 |[ . j%=1 . top%| 00000860 3a e7 20 6e 61 24 3c 3e 6e 61 6d 24 28 6a 25 29 |:. na$<>nam$(j%)| 00000870 20 8c 20 ed 3a e8 27 22 20 2d 3e 20 22 6e 61 24 | . .:.'" -> "na$| 00000880 3a 24 28 54 72 61 63 6b 2b 69 25 2a 33 32 2b 32 |:$(Track+i%*32+2| 00000890 30 29 3d 6e 61 24 3a f1 20 c4 33 30 2c bd 38 29 |0)=na$:. .30,.8)| 000008a0 3b 3a e5 20 8d 74 7c 42 0d 02 c6 1a 20 20 f1 20 |;:. .t|B.... . | 000008b0 22 20 28 22 3b 62 79 74 25 28 6a 25 29 3b 22 29 |" (";byt%(j%);")| 000008c0 22 3b 0d 02 d0 3e 20 20 e7 20 6c 65 6e 3e 62 79 |";...> . len>by| 000008d0 74 25 28 6a 25 29 20 8c 20 6c 65 6e 3d 62 79 74 |t%(j%) . len=byt| 000008e0 25 28 6a 25 29 3a 54 72 61 63 6b 21 28 69 25 2a |%(j%):Track!(i%*| 000008f0 33 32 2b 34 29 3d 6c 65 6e 3a f1 20 22 2a 22 3b |32+4)=len:. "*";| 00000900 0d 02 da 1e 20 20 f1 20 2c 28 97 6c 6f 63 24 28 |.... . ,(.loc$(| 00000910 6a 25 29 2d 36 35 29 20 81 20 32 20 2b 31 0d 02 |j%)-65) . 2 +1..| 00000920 e4 25 20 20 73 6f 72 74 24 28 69 25 29 3d 6c 6f |.% sort$(i%)=lo| 00000930 63 24 28 6a 25 29 3a 73 6f 72 74 25 28 69 25 29 |c$(j%):sort%(i%)| 00000940 3d 69 25 0d 02 ee 16 20 20 70 6f 69 6e 74 65 72 |=i%.... pointer| 00000950 2b 3d 6c 65 6e 2b 67 61 70 0d 02 f8 08 ed 20 69 |+=len+gap..... i| 00000960 25 0d 03 02 05 f1 0d 03 0c 05 f5 0d 03 16 0d 20 |%.............. | 00000970 20 66 6c 61 67 25 3d 30 0d 03 20 19 20 20 e3 20 | flag%=0.. . . | 00000980 69 25 3d 31 20 b8 20 54 72 61 63 6b 3f 32 31 2d |i%=1 . Track?21-| 00000990 31 0d 03 2a 5b 20 20 20 20 e7 20 73 6f 72 74 24 |1..*[ . sort$| 000009a0 28 69 25 29 3e 73 6f 72 74 24 28 69 25 2b 31 29 |(i%)>sort$(i%+1)| 000009b0 20 8c 20 c8 94 20 73 6f 72 74 24 28 69 25 29 2c | . .. sort$(i%),| 000009c0 73 6f 72 74 24 28 69 25 2b 31 29 3a c8 94 20 73 |sort$(i%+1):.. s| 000009d0 6f 72 74 25 28 69 25 29 2c 73 6f 72 74 25 28 69 |ort%(i%),sort%(i| 000009e0 25 2b 31 29 3a 66 6c 61 67 25 3d 31 0d 03 34 0a |%+1):flag%=1..4.| 000009f0 20 20 ed 20 69 25 0d 03 3e 0d fd 20 66 6c 61 67 | . i%..>.. flag| 00000a00 25 3d 30 0d 03 48 15 e3 20 69 25 3d 31 20 b8 20 |%=0..H.. i%=1 . | 00000a10 54 72 61 63 6b 3f 32 31 0d 03 52 11 20 20 73 3d |Track?21..R. s=| 00000a20 73 6f 72 74 25 28 69 25 29 0d 03 5c 44 20 20 6e |sort%(i%)..\D n| 00000a30 61 24 3d 24 28 54 72 61 63 6b 2b 73 2a 33 32 2b |a$=$(Track+s*32+| 00000a40 32 30 29 3a 61 64 72 3d 54 72 61 63 6b 2b 54 72 |20):adr=Track+Tr| 00000a50 61 63 6b 21 28 73 2a 33 32 29 3a 6c 65 6e 3d 54 |ack!(s*32):len=T| 00000a60 72 61 63 6b 21 28 73 2a 33 32 2b 34 29 0d 03 66 |rack!(s*32+4)..f| 00000a70 22 20 20 66 75 24 3d 22 49 6e 73 74 22 2b 73 6f |" fu$="Inst"+so| 00000a80 72 74 24 28 69 25 29 2b 22 2e 22 2b 6e 61 24 0d |rt$(i%)+"."+na$.| 00000a90 03 70 0d 20 20 66 3d 8e 20 66 75 24 0d 03 7a 0b |.p. f=. fu$..z.| 00000aa0 20 20 e7 20 66 20 8c 0d 03 84 13 20 20 20 20 f1 | . f ..... .| 00000ab0 20 6e 61 24 3b 22 2c 20 22 3b 0d 03 8e 1d 20 20 | na$;", ";.... | 00000ac0 20 20 24 28 61 64 72 2b 6c 65 6e 29 3d c4 67 61 | $(adr+len)=.ga| 00000ad0 70 2d 31 2c bd 30 29 0d 03 98 24 20 20 20 20 c8 |p-1,.0)...$ .| 00000ae0 99 20 22 4f 53 5f 47 42 50 42 22 2c 34 2c 66 2c |. "OS_GBPB",4,f,| 00000af0 61 64 72 2c 6c 65 6e 3a d9 23 66 0d 03 a2 07 20 |adr,len:.#f.... | 00000b00 20 cc 0d 03 ac 23 20 20 20 20 64 69 73 63 3d 28 | ....# disc=(| 00000b10 97 73 6f 72 74 24 28 69 25 29 2d 36 35 29 20 81 |.sort$(i%)-65) .| 00000b20 20 32 20 2b 31 0d 03 b6 33 20 20 20 20 f1 27 bd | 2 +1...3 .'.| 00000b30 37 3b 22 50 4c 45 41 53 45 20 49 4e 53 45 52 54 |7;"PLEASE INSERT| 00000b40 20 53 41 4d 50 4c 45 20 44 49 53 43 20 22 3b 64 | SAMPLE DISC ";d| 00000b50 69 73 63 3a 61 24 3d be 0d 03 c0 0e 20 20 20 20 |isc:a$=..... | 00000b60 e5 20 8d 44 70 43 0d 03 ca 07 20 20 cd 0d 03 d4 |. .DpC.... ....| 00000b70 08 ed 20 69 25 0d 03 de 05 e1 0d 03 e8 10 dd 20 |.. i%.......... | 00000b80 f2 5f 4d 75 73 69 63 41 53 4d 0d 03 f2 0a 67 61 |._MusicASM....ga| 00000b90 70 3d 31 36 0d 03 fc 0a 75 73 20 3d 34 38 0d 04 |p=16....us =48..| 00000ba0 06 0a 5b 4f 50 54 20 70 0d 04 10 20 3b 2d 2d 2d |..[OPT p... ;---| 00000bb0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000bc0 2d 2d 2d 2d 2d 2d 2d 2d 0d 04 1a 1c 3b 20 20 43 |--------....; C| 00000bd0 4f 43 4f 4e 49 5a 45 52 20 83 55 4c 45 20 50 4c |OCONIZER .ULE PL| 00000be0 41 59 45 52 0d 04 24 20 3b 2d 2d 2d 2d 2d 2d 2d |AYER..$ ;-------| 00000bf0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000c00 2d 2d 2d 2d 0d 04 2e 24 20 64 63 64 20 30 20 20 |----...$ dcd 0 | 00000c10 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 53 74 | ;St| 00000c20 61 72 74 20 63 6f 64 65 0d 04 38 2d 20 64 63 64 |art code..8- dcd| 00000c30 20 69 6e 69 74 2d 63 6f 64 65 20 20 20 20 20 20 | init-code | 00000c40 20 3b 49 6e 69 74 69 61 6c 69 73 61 74 69 6f 6e | ;Initialisation| 00000c50 20 63 6f 64 65 0d 04 42 2b 20 64 63 64 20 66 69 | code..B+ dcd fi| 00000c60 6e 69 2d 63 6f 64 65 20 20 20 20 20 20 20 3b 46 |ni-code ;F| 00000c70 69 6e 61 6c 69 73 61 74 69 6f 6e 20 63 6f 64 65 |inalisation code| 00000c80 0d 04 4c 2e 20 64 63 64 20 30 20 20 20 20 20 20 |..L. dcd 0 | 00000c90 20 20 20 20 20 20 20 20 20 3b 53 65 72 76 69 63 | ;Servic| 00000ca0 65 20 43 61 6c 6c 20 48 61 6e 64 6c 65 72 0d 04 |e Call Handler..| 00000cb0 56 26 20 64 63 64 20 74 69 74 6c 65 2d 63 6f 64 |V& dcd title-cod| 00000cc0 65 20 20 20 20 20 20 3b 54 69 74 6c 65 20 53 74 |e ;Title St| 00000cd0 72 69 6e 67 0d 04 60 25 20 64 63 64 20 68 65 6c |ring..`% dcd hel| 00000ce0 70 73 2d 63 6f 64 65 20 20 20 20 20 20 3b 48 65 |ps-code ;He| 00000cf0 6c 70 20 53 74 72 69 6e 67 0d 04 6a 38 20 64 63 |lp String..j8 dc| 00000d00 64 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 |d 0 | 00000d10 20 20 3b 48 65 6c 70 20 61 6e 64 20 43 6f 6d 6d | ;Help and Comm| 00000d20 61 6e 64 20 6b 65 79 77 6f 72 64 20 74 61 62 6c |and keyword tabl| 00000d30 65 0d 04 74 27 2e 74 69 74 6c 65 20 64 63 62 20 |e..t'.title dcb | 00000d40 22 43 6f 63 6f 6e 69 7a 65 72 53 6f 6e 67 22 2b |"CoconizerSong"+| 00000d50 bd 30 3a 61 6c 69 67 6e 0d 04 7e 1d 2e 68 65 6c |.0:align..~..hel| 00000d60 70 73 20 64 63 62 20 6d 65 73 73 24 2b bd 30 3a |ps dcb mess$+.0:| 00000d70 61 6c 69 67 6e 0d 04 88 09 2e 69 6e 69 74 0d 04 |align.....init..| 00000d80 92 3b 20 73 74 6d 66 64 20 72 31 33 21 2c 7b 72 |.; stmfd r13!,{r| 00000d90 37 2d 72 31 31 2c 72 31 34 7d 20 20 20 20 3b 57 |7-r11,r14} ;W| 00000da0 65 20 61 72 65 20 63 61 6c 6c 65 64 20 69 6e 20 |e are called in | 00000db0 53 56 43 5f 6d 6f 64 65 21 0d 04 9c 0f 20 62 6c |SVC_mode!.... bl| 00000dc0 20 20 20 20 76 5f 6f 6e 0d 04 a6 1c 20 6c 64 6d | v_on.... ldm| 00000dd0 66 64 20 72 31 33 21 2c 7b 72 37 2d 72 31 31 2c |fd r13!,{r7-r11,| 00000de0 70 63 7d 5e 0d 04 b0 09 2e 66 69 6e 69 0d 04 ba |pc}^.....fini...| 00000df0 1c 20 73 74 6d 66 64 20 72 31 33 21 2c 7b 72 37 |. stmfd r13!,{r7| 00000e00 2d 72 31 31 2c 72 31 34 7d 0d 04 c4 10 20 62 6c |-r11,r14}.... bl| 00000e10 20 20 20 20 76 5f 6f 66 66 0d 04 ce 42 20 62 6c | v_off...B bl| 00000e20 20 20 20 20 76 72 65 6c 61 74 69 76 20 20 20 20 | vrelativ | 00000e30 20 20 20 20 20 20 20 20 20 3b 41 6e 64 20 62 61 | ;And ba| 00000e40 63 6b 20 74 6f 20 6f 72 69 67 69 6e 20 72 65 6c |ck to origin rel| 00000e50 61 74 69 76 65 20 73 74 61 74 65 0d 04 d8 1c 20 |ative state.... | 00000e60 6c 64 6d 66 64 20 72 31 33 21 2c 7b 72 37 2d 72 |ldmfd r13!,{r7-r| 00000e70 31 31 2c 70 63 7d 5e 0d 04 e2 28 3b 2d 2d 2d 2d |11,pc}^...(;----| 00000e80 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000e90 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d |---------------.| 00000ea0 04 ec 05 3b 0d 04 f6 27 3b 20 54 48 45 20 43 4f |...;...'; THE CO| 00000eb0 43 4f 4e 49 5a 45 52 20 50 4c 41 59 45 52 20 52 |CONIZER PLAYER R| 00000ec0 4f 55 54 49 4e 45 20 76 31 2e 32 0d 05 00 05 3b |OUTINE v1.2....;| 00000ed0 0d 05 0a 25 3b 20 20 20 4e 65 65 64 73 20 32 30 |...%; Needs 20| 00000ee0 25 20 6f 66 20 74 68 65 20 41 52 4d 2d 49 49 20 |% of the ARM-II | 00000ef0 73 70 65 65 64 0d 05 14 05 3b 0d 05 1e 1d 3b 20 |speed....;....; | 00000f00 20 20 20 20 20 20 20 20 28 63 29 20 4d 61 69 20 | (c) Mai | 00000f10 31 39 39 30 20 62 79 0d 05 28 24 3b 20 20 20 20 |1990 by..($; | 00000f20 45 64 75 61 72 64 20 50 66 61 72 72 20 26 20 54 |Eduard Pfarr & T| 00000f30 68 6f 6d 61 73 20 41 6c 62 65 72 0d 05 32 1c 3b |homas Alber..2.;| 00000f40 20 20 20 20 20 20 20 20 20 20 20 6f 66 20 50 6c | of Pl| 00000f50 61 79 66 69 65 6c 64 0d 05 3c 05 3b 0d 05 46 25 |ayfield..<.;..F%| 00000f60 3b 20 20 20 4c 61 74 65 73 74 20 72 65 76 69 73 |; Latest revis| 00000f70 69 6f 6e 20 2d 20 31 30 20 46 65 62 20 31 39 39 |ion - 10 Feb 199| 00000f80 31 0d 05 50 05 3b 0d 05 5a 28 3b 2d 2d 2d 2d 2d |1..P.;..Z(;-----| 00000f90 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000fa0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 05 |--------------..| 00000fb0 64 09 2e 76 5f 6f 6e 0d 05 6e 15 20 73 74 6d 66 |d..v_on..n. stmf| 00000fc0 64 20 72 31 33 21 2c 7b 72 31 34 7d 0d 05 78 25 |d r13!,{r14}..x%| 00000fd0 20 6d 6f 76 20 20 20 72 30 2c 23 32 20 20 20 20 | mov r0,#2 | 00000fe0 20 20 20 20 20 20 20 20 20 20 20 20 3b c8 a0 20 | ;.. | 00000ff0 32 0d 05 82 45 20 6d 6f 76 20 20 20 72 31 2c 23 |2...E mov r1,#| 00001000 32 30 38 20 20 20 20 20 20 20 20 20 20 20 20 20 |208 | 00001010 20 3b 42 75 66 66 65 72 4c 65 6e 20 6f 66 20 ee | ;BufferLen of .| 00001020 45 20 63 68 61 6e 6e 65 6c 2c 20 74 6f 74 61 6c |E channel, total| 00001030 20 2a 56 6f 63 73 0d 05 8c 2e 20 6d 6f 76 20 20 | *Vocs.... mov | 00001040 20 72 32 2c 23 75 73 20 20 20 20 20 20 20 20 20 | r2,#us | 00001050 20 20 20 20 20 20 3b 53 61 6d 70 6c 65 20 50 65 | ;Sample Pe| 00001060 72 69 6f 64 0d 05 96 37 20 6d 6f 76 20 20 20 72 |riod...7 mov r| 00001070 33 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 20 |3,#0 | 00001080 20 20 20 20 3b 44 65 66 61 75 6c 74 20 43 68 61 | ;Default Cha| 00001090 6e 6e 65 6c 48 61 6e 64 6c 65 72 0d 05 a0 31 20 |nnelHandler...1 | 000010a0 6d 6f 76 20 20 20 72 34 2c 23 30 20 20 20 20 20 |mov r4,#0 | 000010b0 20 20 20 20 20 20 20 20 20 20 20 3b 44 65 66 61 | ;Defa| 000010c0 75 6c 74 20 53 68 65 64 75 6c 65 72 0d 05 aa 1c |ult Sheduler....| 000010d0 20 73 77 69 20 20 20 22 53 6f 75 6e 64 5f 43 6f | swi "Sound_Co| 000010e0 6e 66 69 67 75 72 65 22 0d 05 b4 48 20 6d 6f 76 |nfigure"...H mov| 000010f0 20 20 20 72 30 2c 23 56 6f 63 73 20 20 20 20 20 | r0,#Vocs | 00001100 20 20 20 20 20 20 20 20 3b c8 a0 20 38 20 77 69 | ;.. 8 wi| 00001110 74 68 20 70 61 72 61 6d 73 20 64 6f 65 73 6e 27 |th params doesn'| 00001120 74 20 77 6f 72 6b 20 64 69 72 65 63 74 6c 79 21 |t work directly!| 00001130 0d 05 be 49 20 6d 6f 76 20 20 20 72 31 2c 23 30 |...I mov r1,#0| 00001140 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001150 3b 42 65 63 61 75 73 65 20 74 68 65 6e 20 73 61 |;Because then sa| 00001160 6d 70 6c 65 20 72 61 74 65 20 69 73 20 73 65 74 |mple rate is set| 00001170 20 66 61 6c 73 65 2e 2e 2e 0d 05 c8 10 20 6d 6f | false....... mo| 00001180 76 20 20 20 72 32 2c 23 30 0d 05 d2 10 20 6d 6f |v r2,#0.... mo| 00001190 76 20 20 20 72 33 2c 23 30 0d 05 dc 10 20 6d 6f |v r3,#0.... mo| 000011a0 76 20 20 20 72 34 2c 23 30 0d 05 e6 1c 20 73 77 |v r4,#0.... sw| 000011b0 69 20 20 20 22 53 6f 75 6e 64 5f 43 6f 6e 66 69 |i "Sound_Confi| 000011c0 67 75 72 65 22 0d 05 f0 17 20 61 64 72 20 20 20 |gure".... adr | 000011d0 72 30 2c 56 6f 69 63 65 42 61 73 65 0d 05 fa 4b |r0,VoiceBase...K| 000011e0 20 6d 6f 76 20 20 20 72 31 2c 23 30 20 20 20 20 | mov r1,#0 | 000011f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001200 20 3b 49 6e 73 74 61 6c 6c 20 6f 75 72 20 56 6f | ;Install our Vo| 00001210 69 63 65 20 69 6e 74 6f 20 6e 65 78 74 20 66 72 |ice into next fr| 00001220 65 65 20 53 6c 6f 74 0d 06 04 1f 20 73 77 69 20 |ee Slot.... swi | 00001230 20 20 22 53 6f 75 6e 64 5f 49 6e 73 74 61 6c 6c | "Sound_Install| 00001240 56 6f 69 63 65 22 0d 06 0e 35 20 73 74 72 20 20 |Voice"...5 str | 00001250 20 72 31 2c 56 73 6c 6f 74 20 20 20 20 20 20 20 | r1,Vslot | 00001260 20 20 20 20 20 20 20 20 20 20 20 3b 73 74 6f 72 | ;stor| 00001270 65 20 75 73 65 64 20 73 6c 6f 74 0d 06 18 23 20 |e used slot...# | 00001280 61 64 72 20 20 20 72 32 2c 56 73 74 65 72 65 6f |adr r2,Vstereo| 00001290 73 2d 34 2a 34 2a 28 56 6f 63 73 3d 38 29 0d 06 |s-4*4*(Vocs=8)..| 000012a0 22 10 20 6d 6f 76 20 20 20 72 30 2c 23 31 0d 06 |". mov r0,#1..| 000012b0 2c 0b 2e 76 69 6d 61 67 65 0d 06 36 15 20 6c 64 |,..vimage..6. ld| 000012c0 72 20 20 20 72 31 2c 5b 72 32 5d 2c 23 34 0d 06 |r r1,[r2],#4..| 000012d0 40 2f 20 73 77 69 20 20 20 22 53 6f 75 6e 64 5f |@/ swi "Sound_| 000012e0 53 74 65 72 65 6f 22 20 20 20 20 20 20 20 20 20 |Stereo" | 000012f0 20 20 20 3b 2a c8 a2 20 72 30 20 72 31 0d 06 4a | ;*.. r0 r1..J| 00001300 13 20 61 64 64 20 20 20 72 30 2c 72 30 2c 23 31 |. add r0,r0,#1| 00001310 0d 06 54 13 20 63 6d 70 20 20 20 72 30 2c 23 56 |..T. cmp r0,#V| 00001320 6f 63 73 0d 06 5e 11 20 62 4c 73 20 20 20 76 69 |ocs..^. bLs vi| 00001330 6d 61 67 65 0d 06 68 13 20 6d 6f 76 20 20 20 72 |mage..h. mov r| 00001340 30 2c 23 56 6f 63 73 0d 06 72 09 2e 76 73 65 74 |0,#Vocs..r..vset| 00001350 0d 06 7c 13 20 61 64 72 20 20 20 72 31 2c 56 6e |..|. adr r1,Vn| 00001360 61 6d 65 0d 06 86 3b 20 73 77 69 20 20 20 22 53 |ame...; swi "S| 00001370 6f 75 6e 64 5f 41 74 74 61 63 68 4e 61 6d 65 64 |ound_AttachNamed| 00001380 56 6f 69 63 65 22 20 20 3b 2a 43 48 41 4e 4e 45 |Voice" ;*CHANNE| 00001390 4c 56 4f 49 43 45 20 72 30 20 22 72 31 22 0d 06 |LVOICE r0 "r1"..| 000013a0 90 13 20 6d 6f 76 20 20 20 72 31 2c 23 26 31 37 |.. mov r1,#&17| 000013b0 30 0d 06 9a 3b 20 6d 6f 76 20 20 20 72 32 2c 23 |0...; mov r2,#| 000013c0 35 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |50 | 000013d0 20 3b 41 63 74 69 76 61 74 65 20 61 6c 6c 20 63 | ;Activate all c| 000013e0 68 61 6e 6e 65 6c 73 20 6f 6e 63 65 0d 06 a4 12 |hannels once....| 000013f0 20 6d 6f 76 20 20 20 72 33 2c 23 32 35 35 0d 06 | mov r3,#255..| 00001400 ae 2f 20 73 77 69 20 20 20 22 53 6f 75 6e 64 5f |./ swi "Sound_| 00001410 43 6f 6e 74 72 6f 6c 22 20 20 20 20 20 20 3b 2a |Control" ;*| 00001420 d4 20 72 30 20 72 31 20 72 32 20 72 33 0d 06 b8 |. r0 r1 r2 r3...| 00001430 13 20 73 75 62 53 20 20 72 30 2c 72 30 2c 23 31 |. subS r0,r0,#1| 00001440 0d 06 c2 0f 20 62 4e 65 20 20 20 76 73 65 74 0d |.... bNe vset.| 00001450 06 cc 13 20 62 6c 20 20 20 20 76 61 62 73 6f 6c |... bl vabsol| 00001460 75 74 0d 06 d6 12 20 62 6c 20 20 20 20 76 5f 72 |ut.... bl v_r| 00001470 65 73 65 74 0d 06 e0 3c 20 6d 6f 76 20 20 20 72 |eset...< mov r| 00001480 30 2c 23 31 36 20 20 20 20 20 20 20 20 20 20 20 |0,#16 | 00001490 20 20 20 20 3b 43 6c 61 69 6d 20 45 56 45 4e 54 | ;Claim EVENT| 000014a0 20 56 65 63 74 6f 72 20 28 4e 72 2e 20 31 36 29 | Vector (Nr. 16)| 000014b0 0d 06 ea 14 20 a4 61 64 72 20 28 31 2c 76 69 6e |.... .adr (1,vin| 000014c0 74 65 72 29 0d 06 f4 3b 20 61 64 72 20 20 20 72 |ter)...; adr r| 000014d0 32 2c 48 65 61 64 20 20 20 20 20 20 20 20 20 20 |2,Head | 000014e0 20 20 20 20 3b 45 6e 74 72 79 20 57 6f 72 6b 73 | ;Entry Works| 000014f0 70 61 63 65 50 6f 69 6e 74 65 72 20 72 31 32 0d |pacePointer r12.| 00001500 06 fe 15 20 73 77 69 20 20 20 22 4f 53 5f 43 6c |... swi "OS_Cl| 00001510 61 69 6d 22 0d 07 08 34 20 6d 6f 76 20 20 20 72 |aim"...4 mov r| 00001520 30 2c 23 31 34 20 20 20 20 20 20 20 20 20 20 20 |0,#14 | 00001530 20 20 20 20 3b 45 6e 61 62 6c 65 20 45 76 65 6e | ;Enable Even| 00001540 74 20 4e 72 2e 20 72 31 0d 07 12 32 20 6d 6f 76 |t Nr. r1...2 mov| 00001550 20 20 20 72 31 2c 23 34 20 20 20 20 20 20 20 20 | r1,#4 | 00001560 20 20 20 20 20 20 20 20 3b 28 34 20 3d 20 56 53 | ;(4 = VS| 00001570 79 6e 63 20 45 76 65 6e 74 29 0d 07 1c 14 20 73 |ync Event).... s| 00001580 77 69 20 20 20 22 4f 53 5f 42 79 74 65 22 0d 07 |wi "OS_Byte"..| 00001590 26 31 20 6d 6f 76 20 20 20 72 30 2c 23 56 6f 63 |&1 mov r0,#Voc| 000015a0 73 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 41 |s ;A| 000015b0 6e 64 20 6f 6e 63 65 20 6d 6f 72 65 2e 2e 2e 0d |nd once more....| 000015c0 07 30 10 20 6d 6f 76 20 20 20 72 31 2c 23 30 0d |.0. mov r1,#0.| 000015d0 07 3a 10 20 6d 6f 76 20 20 20 72 32 2c 23 30 0d |.:. mov r2,#0.| 000015e0 07 44 10 20 6d 6f 76 20 20 20 72 33 2c 23 30 0d |.D. mov r3,#0.| 000015f0 07 4e 10 20 6d 6f 76 20 20 20 72 34 2c 23 30 0d |.N. mov r4,#0.| 00001600 07 58 27 20 73 77 69 20 20 20 22 53 6f 75 6e 64 |.X' swi "Sound| 00001610 5f 43 6f 6e 66 69 67 75 72 65 22 20 20 20 20 3b |_Configure" ;| 00001620 47 72 72 72 68 21 0d 07 62 34 20 6d 6f 76 20 20 |Grrrh!..b4 mov | 00001630 20 72 30 2c 23 30 20 20 20 20 20 20 20 20 20 20 | r0,#0 | 00001640 20 20 20 20 20 20 3b 52 65 61 64 20 63 75 72 72 | ;Read curr| 00001650 65 6e 74 20 56 6f 6c 75 6d 65 0d 07 6c 19 20 73 |ent Volume..l. s| 00001660 77 69 20 20 20 22 53 6f 75 6e 64 5f 56 6f 6c 75 |wi "Sound_Volu| 00001670 6d 65 22 0d 07 76 23 20 6d 6f 76 20 20 20 72 30 |me"..v# mov r0| 00001680 2c 72 30 2c 6c 73 6c 23 31 20 20 20 20 20 20 20 |,r0,lsl#1 | 00001690 20 20 20 3b 2a 32 0d 07 80 15 20 72 73 62 20 20 | ;*2.... rsb | 000016a0 20 72 30 2c 72 30 2c 23 32 35 34 0d 07 8a 3d 20 | r0,r0,#254...= | 000016b0 73 74 72 20 20 20 72 30 2c 56 6f 6c 75 6d 65 20 |str r0,Volume | 000016c0 20 20 20 20 20 20 20 20 20 20 20 3b 61 6e 64 20 | ;and | 000016d0 75 73 65 20 69 74 20 61 73 20 6f 76 65 72 61 6c |use it as overal| 000016e0 6c 20 56 6f 6c 75 6d 65 0d 07 94 33 20 6d 6f 76 |l Volume...3 mov| 000016f0 20 20 20 72 31 31 2c 23 33 20 20 20 20 20 20 20 | r11,#3 | 00001700 20 20 20 20 20 20 20 20 3b 54 65 73 74 20 6d 61 | ;Test ma| 00001710 78 20 33 20 74 69 6d 65 73 20 21 0d 07 9e 0a 2e |x 3 times !.....| 00001720 76 74 65 73 74 0d 07 a8 10 20 6d 6f 76 20 20 20 |vtest.... mov | 00001730 72 31 2c 23 30 0d 07 b2 15 20 73 74 72 42 20 20 |r1,#0.... strB | 00001740 72 31 2c 49 6e 74 53 79 6e 63 0d 07 bc 11 20 6d |r1,IntSync.... m| 00001750 6f 76 20 20 20 72 33 2c 23 32 36 0d 07 c6 10 20 |ov r3,#26.... | 00001760 62 6c 20 20 20 20 76 77 61 69 74 0d 07 d0 3b 20 |bl vwait...; | 00001770 6c 64 72 42 20 20 72 31 2c 49 6e 74 53 79 6e 63 |ldrB r1,IntSync| 00001780 20 20 20 20 20 20 20 20 20 20 20 3b 49 73 20 74 | ;Is t| 00001790 68 65 72 65 20 61 20 4c 6f 73 65 72 2d 43 68 61 |here a Loser-Cha| 000017a0 6e 6e 65 6c 20 3f 0d 07 da 10 20 63 6d 70 20 20 |nnel ?.... cmp | 000017b0 20 72 31 2c 23 30 0d 07 e4 16 20 6c 64 6d 45 71 | r1,#0.... ldmEq| 000017c0 46 64 20 72 31 33 21 2c 7b 70 63 7d 0d 07 ee 24 |Fd r13!,{pc}...$| 000017d0 20 6d 6f 76 20 20 20 72 30 2c 23 31 20 20 20 20 | mov r0,#1 | 000017e0 20 20 20 20 20 20 20 20 20 20 20 20 3b 4f 66 66 | ;Off| 000017f0 0d 07 f8 19 20 73 77 69 20 20 20 22 53 6f 75 6e |.... swi "Soun| 00001800 64 5f 45 6e 61 62 6c 65 22 0d 08 02 12 20 6d 6f |d_Enable".... mo| 00001810 76 20 20 20 72 33 2c 23 31 30 31 0d 08 0c 10 20 |v r3,#101.... | 00001820 62 6c 20 20 20 20 76 77 61 69 74 0d 08 16 23 20 |bl vwait...# | 00001830 6d 6f 76 20 20 20 72 30 2c 23 32 20 20 20 20 20 |mov r0,#2 | 00001840 20 20 20 20 20 20 20 20 20 20 20 3b 4f 6e 0d 08 | ;On..| 00001850 20 19 20 73 77 69 20 20 20 22 53 6f 75 6e 64 5f | . swi "Sound_| 00001860 45 6e 61 62 6c 65 22 0d 08 2a 15 20 73 75 62 53 |Enable"..*. subS| 00001870 20 20 72 31 31 2c 72 31 31 2c 23 31 0d 08 34 10 | r11,r11,#1..4.| 00001880 20 62 4e 65 20 20 20 76 74 65 73 74 0d 08 3e 30 | bNe vtest..>0| 00001890 20 6c 64 6d 66 64 20 72 31 33 21 2c 7b 70 63 7d | ldmfd r13!,{pc}| 000018a0 20 20 20 20 20 20 20 20 20 20 20 20 3b 57 65 6c | ;Wel| 000018b0 6c 2c 20 62 61 64 20 6c 75 63 6b 21 0d 08 48 0a |l, bad luck!..H.| 000018c0 2e 76 77 61 69 74 0d 08 52 12 20 6d 6f 76 20 20 |.vwait..R. mov | 000018d0 20 72 31 32 2c 72 31 34 0d 08 5c 39 20 6d 6f 76 | r12,r14..\9 mov| 000018e0 20 20 20 72 30 2c 23 31 39 20 20 20 20 20 20 20 | r0,#19 | 000018f0 20 20 20 20 20 20 20 20 3b 57 61 69 74 20 66 6f | ;Wait fo| 00001900 72 20 73 6f 6d 65 20 66 72 61 6d 65 66 6c 69 65 |r some frameflie| 00001910 73 0d 08 66 14 20 73 77 69 20 20 20 22 4f 53 5f |s..f. swi "OS_| 00001920 42 79 74 65 22 0d 08 70 13 20 73 75 62 53 20 20 |Byte"..p. subS | 00001930 72 33 2c 72 33 2c 23 31 0d 08 7a 12 20 62 4e 65 |r3,r3,#1..z. bNe| 00001940 20 20 20 76 77 61 69 74 2b 38 0d 08 84 2b 20 6d | vwait+8...+ m| 00001950 6f 76 20 20 20 70 63 2c 72 31 32 20 20 20 20 20 |ov pc,r12 | 00001960 20 20 20 20 20 20 20 20 20 20 3b 73 76 63 5f 72 | ;svc_r| 00001970 31 34 2e 2e 2e 0d 08 8e 14 3b 2a 2a 2a 20 94 4f |14.......;*** .O| 00001980 4c 55 54 45 20 43 4f 44 45 0d 08 98 0d 2e 76 61 |LUTE CODE.....va| 00001990 62 73 6f 6c 75 74 0d 08 a2 14 20 a4 61 64 72 20 |bsolut.... .adr | 000019a0 28 31 30 2c 54 72 61 63 6b 29 0d 08 ac 30 20 6c |(10,Track)...0 l| 000019b0 64 72 20 20 20 72 31 2c 5b 72 31 30 2c 23 32 34 |dr r1,[r10,#24| 000019c0 5d 20 20 20 20 20 20 20 20 20 3b 53 65 71 75 65 |] ;Seque| 000019d0 6e 63 65 20 4f 66 66 73 65 74 0d 08 b6 14 20 61 |nce Offset.... a| 000019e0 64 64 20 20 20 72 31 2c 72 31 30 2c 72 31 0d 08 |dd r1,r10,r1..| 000019f0 c0 17 20 73 74 72 20 20 20 72 31 2c 5b 72 31 30 |.. str r1,[r10| 00001a00 2c 23 32 34 5d 0d 08 ca 2f 20 6c 64 72 20 20 20 |,#24].../ ldr | 00001a10 72 32 2c 5b 72 31 30 2c 23 32 38 5d 20 20 20 20 |r2,[r10,#28] | 00001a20 20 20 20 20 20 3b 50 61 74 74 65 72 6e 20 4f 66 | ;Pattern Of| 00001a30 66 73 65 74 0d 08 d4 14 20 61 64 64 20 20 20 72 |fset.... add r| 00001a40 32 2c 72 31 30 2c 72 32 0d 08 de 17 20 73 74 72 |2,r10,r2.... str| 00001a50 20 20 20 72 32 2c 5b 72 31 30 2c 23 32 38 5d 0d | r2,[r10,#28].| 00001a60 08 e8 30 20 6c 64 72 42 20 20 72 31 2c 5b 72 31 |..0 ldrB r1,[r1| 00001a70 30 2c 23 32 31 5d 20 20 20 20 20 20 20 20 20 3b |0,#21] ;| 00001a80 4e 75 6d 62 65 72 20 6f 66 20 49 6e 73 74 73 0d |Number of Insts.| 00001a90 08 f2 09 2e 76 61 6c 6c 0d 08 fc 31 20 6c 64 72 |....vall...1 ldr| 00001aa0 20 20 20 72 32 2c 5b 72 31 30 2c 72 31 2c 6c 73 | r2,[r10,r1,ls| 00001ab0 6c 23 35 5d 20 20 20 20 3b 49 6e 73 74 20 41 64 |l#5] ;Inst Ad| 00001ac0 64 72 20 4f 66 66 73 65 74 0d 09 06 14 20 61 64 |dr Offset.... ad| 00001ad0 64 20 20 20 72 32 2c 72 31 30 2c 72 32 0d 09 10 |d r2,r10,r2...| 00001ae0 26 20 73 74 72 20 20 20 72 32 2c 5b 72 31 30 2c |& str r2,[r10,| 00001af0 72 31 2c 6c 73 6c 23 35 5d 20 20 20 20 3b 2b 69 |r1,lsl#5] ;+i| 00001b00 2a 33 32 0d 09 1a 13 20 73 75 62 53 20 20 72 31 |*32.... subS r1| 00001b10 2c 72 31 2c 23 31 0d 09 24 0f 20 62 4e 65 20 20 |,r1,#1..$. bNe | 00001b20 20 76 61 6c 6c 0d 09 2e 11 20 6d 6f 76 20 20 20 | vall.... mov | 00001b30 70 63 2c 72 31 34 0d 09 38 16 3b 2a 2a 2a 20 52 |pc,r14..8.;*** R| 00001b40 45 4c 41 54 49 56 45 20 43 4f 44 45 0d 09 42 0d |ELATIVE CODE..B.| 00001b50 2e 76 72 65 6c 61 74 69 76 0d 09 4c 14 20 a4 61 |.vrelativ..L. .a| 00001b60 64 72 20 28 31 30 2c 54 72 61 63 6b 29 0d 09 56 |dr (10,Track)..V| 00001b70 17 20 6c 64 72 20 20 20 72 31 2c 5b 72 31 30 2c |. ldr r1,[r10,| 00001b80 23 32 34 5d 0d 09 60 14 20 73 75 62 20 20 20 72 |#24]..`. sub r| 00001b90 31 2c 72 31 2c 72 31 30 0d 09 6a 17 20 73 74 72 |1,r1,r10..j. str| 00001ba0 20 20 20 72 31 2c 5b 72 31 30 2c 23 32 34 5d 0d | r1,[r10,#24].| 00001bb0 09 74 17 20 6c 64 72 20 20 20 72 32 2c 5b 72 31 |.t. ldr r2,[r1| 00001bc0 30 2c 23 32 38 5d 0d 09 7e 14 20 73 75 62 20 20 |0,#28]..~. sub | 00001bd0 20 72 32 2c 72 32 2c 72 31 30 0d 09 88 17 20 73 | r2,r2,r10.... s| 00001be0 74 72 20 20 20 72 32 2c 5b 72 31 30 2c 23 32 38 |tr r2,[r10,#28| 00001bf0 5d 0d 09 92 17 20 6c 64 72 42 20 20 72 31 2c 5b |].... ldrB r1,[| 00001c00 72 31 30 2c 23 32 31 5d 0d 09 9c 09 2e 76 61 6c |r10,#21].....val| 00001c10 6c 0d 09 a6 1c 20 6c 64 72 20 20 20 72 32 2c 5b |l.... ldr r2,[| 00001c20 72 31 30 2c 72 31 2c 6c 73 6c 23 35 5d 0d 09 b0 |r10,r1,lsl#5]...| 00001c30 14 20 73 75 62 20 20 20 72 32 2c 72 32 2c 72 31 |. sub r2,r2,r1| 00001c40 30 0d 09 ba 1c 20 73 74 72 20 20 20 72 32 2c 5b |0.... str r2,[| 00001c50 72 31 30 2c 72 31 2c 6c 73 6c 23 35 5d 0d 09 c4 |r10,r1,lsl#5]...| 00001c60 13 20 73 75 62 53 20 20 72 31 2c 72 31 2c 23 31 |. subS r1,r1,#1| 00001c70 0d 09 ce 0f 20 62 4e 65 20 20 20 76 61 6c 6c 0d |.... bNe vall.| 00001c80 09 d8 11 20 6d 6f 76 20 20 20 70 63 2c 72 31 34 |... mov pc,r14| 00001c90 0d 09 e2 15 3b 2a 2a 2a 20 52 45 53 54 41 52 54 |....;*** RESTART| 00001ca0 20 54 55 4e 45 0d 09 ec 0c 2e 76 5f 72 65 73 65 | TUNE.....v_rese| 00001cb0 74 0d 09 f6 14 20 a4 61 64 72 20 28 31 30 2c 54 |t.... .adr (10,T| 00001cc0 72 61 63 6b 29 0d 0a 00 11 20 6d 6f 76 20 20 20 |rack).... mov | 00001cd0 72 31 2c 23 36 34 0d 0a 0a 2b 20 73 74 72 20 20 |r1,#64...+ str | 00001ce0 20 72 31 2c 52 65 67 69 73 74 65 72 73 2b 30 20 | r1,Registers+0 | 00001cf0 20 20 20 20 20 20 3b 50 61 74 74 20 43 6f 75 6e | ;Patt Coun| 00001d00 74 0d 0a 14 17 20 6c 64 72 20 20 20 72 32 2c 5b |t.... ldr r2,[| 00001d10 72 31 30 2c 23 32 34 5d 0d 0a 1e 39 20 73 74 72 |r10,#24]...9 str| 00001d20 20 20 20 72 32 2c 52 65 67 69 73 74 65 72 73 2b | r2,Registers+| 00001d30 38 20 20 20 20 20 20 20 3b 43 75 72 72 65 6e 74 |8 ;Current| 00001d40 20 53 65 71 75 65 6e 63 65 20 50 6f 69 6e 74 65 | Sequence Pointe| 00001d50 72 0d 0a 28 12 20 6c 64 72 42 20 20 72 32 2c 5b |r..(. ldrB r2,[| 00001d60 72 32 5d 0d 0a 32 17 20 6c 64 72 20 20 20 72 33 |r2]..2. ldr r3| 00001d70 2c 5b 72 31 30 2c 23 32 38 5d 0d 0a 3c 23 20 61 |,[r10,#28]..<# a| 00001d80 64 64 20 20 20 72 33 2c 72 33 2c 72 32 2c 6c 73 |dd r3,r3,r2,ls| 00001d90 6c 23 31 30 2d 28 56 6f 63 73 3d 38 29 0d 0a 46 |l#10-(Vocs=8)..F| 00001da0 38 20 73 74 72 20 20 20 72 33 2c 52 65 67 69 73 |8 str r3,Regis| 00001db0 74 65 72 73 2b 34 20 20 20 20 20 20 20 3b 43 75 |ters+4 ;Cu| 00001dc0 72 72 65 6e 74 20 50 61 74 74 65 72 6e 20 50 6f |rrent Pattern Po| 00001dd0 69 6e 74 65 72 0d 0a 50 13 20 61 64 72 20 20 20 |inter..P. adr | 00001de0 72 31 31 2c 48 65 61 64 0d 0a 5a 2e 20 6d 6f 76 |r11,Head..Z. mov| 00001df0 20 20 20 72 31 2c 23 30 3a 6d 6f 76 20 72 32 2c | r1,#0:mov r2,| 00001e00 23 30 3a 6d 6f 76 20 72 33 2c 23 30 3a 6d 6f 76 |#0:mov r3,#0:mov| 00001e10 20 72 34 2c 23 30 0d 0a 64 2e 20 6d 6f 76 20 20 | r4,#0..d. mov | 00001e20 20 72 35 2c 23 30 3a 6d 6f 76 20 72 36 2c 23 30 | r5,#0:mov r6,#0| 00001e30 3a 6d 6f 76 20 72 37 2c 23 30 3a 6d 6f 76 20 72 |:mov r7,#0:mov r| 00001e40 38 2c 23 30 0d 0a 6e 13 20 6d 6f 76 20 20 20 72 |8,#0..n. mov r| 00001e50 30 2c 23 56 6f 63 73 0d 0a 78 09 2e 76 61 6c 6c |0,#Vocs..x..vall| 00001e60 0d 0a 82 3b 20 73 74 6d 69 61 20 72 31 31 21 2c |...; stmia r11!,| 00001e70 7b 72 31 2d 72 38 7d 20 20 20 20 20 20 20 20 20 |{r1-r8} | 00001e80 3b 43 6c 65 61 72 20 61 6c 6c 20 63 68 61 6e 6e |;Clear all chann| 00001e90 65 6c 20 68 65 61 64 73 2e 2e 2e 0d 0a 8c 13 20 |el heads....... | 00001ea0 73 75 62 53 20 20 72 30 2c 72 30 2c 23 31 0d 0a |subS r0,r0,#1..| 00001eb0 96 0f 20 62 4e 65 20 20 20 76 61 6c 6c 0d 0a a0 |.. bNe vall...| 00001ec0 11 20 6d 6f 76 20 20 20 70 63 2c 72 31 34 0d 0a |. mov pc,r14..| 00001ed0 aa 20 3b 2a 2a 2a 20 54 55 52 4e 20 87 20 50 4c |. ;*** TURN . PL| 00001ee0 41 59 45 52 20 80 20 43 4f 43 4f 2d c8 a1 0d 0a |AYER . COCO-....| 00001ef0 b4 0a 2e 76 5f 6f 66 66 0d 0a be 15 20 73 74 6d |...v_off.... stm| 00001f00 66 64 20 72 31 33 21 2c 7b 72 31 34 7d 0d 0a c8 |fd r13!,{r14}...| 00001f10 35 20 6d 6f 76 20 20 20 72 30 2c 23 31 33 20 20 |5 mov r0,#13 | 00001f20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 44 69 | ;Di| 00001f30 73 61 62 6c 65 20 45 76 65 6e 74 20 4e 72 2e 20 |sable Event Nr. | 00001f40 72 31 0d 0a d2 32 20 6d 6f 76 20 20 20 72 31 2c |r1...2 mov r1,| 00001f50 23 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#4 | 00001f60 20 20 3b 28 34 20 3d 20 56 53 79 6e 63 20 45 76 | ;(4 = VSync Ev| 00001f70 65 6e 74 29 0d 0a dc 14 20 73 77 69 20 20 20 22 |ent).... swi "| 00001f80 4f 53 5f 42 79 74 65 22 0d 0a e6 3b 20 6d 6f 76 |OS_Byte"...; mov| 00001f90 20 20 20 72 30 2c 23 31 36 20 20 20 20 20 20 20 | r0,#16 | 00001fa0 20 20 20 20 20 20 20 20 3b 46 72 65 65 20 45 56 | ;Free EV| 00001fb0 45 4e 54 20 56 65 63 74 6f 72 20 28 4e 72 2e 20 |ENT Vector (Nr. | 00001fc0 31 36 29 0d 0a f0 14 20 61 64 72 20 20 20 72 31 |16).... adr r1| 00001fd0 2c 76 69 6e 74 65 72 0d 0a fa 12 20 61 64 72 20 |,vinter.... adr | 00001fe0 20 20 72 32 2c 48 65 61 64 0d 0b 04 17 20 73 77 | r2,Head.... sw| 00001ff0 69 20 20 20 22 4f 53 5f 52 65 6c 65 61 73 65 22 |i "OS_Release"| 00002000 0d 0b 0e 13 20 6c 64 72 20 20 20 72 31 2c 56 73 |.... ldr r1,Vs| 00002010 6c 6f 74 0d 0b 18 45 20 73 77 69 20 20 20 22 53 |lot...E swi "S| 00002020 6f 75 6e 64 5f 52 65 6d 6f 76 65 56 6f 69 63 65 |ound_RemoveVoice| 00002030 22 20 20 3b 4c 61 73 74 20 62 75 74 20 6e 6f 74 |" ;Last but not| 00002040 20 6c 65 61 73 74 2e 2e 2e 20 46 72 65 65 20 56 | least... Free V| 00002050 6f 69 63 65 53 6c 6f 74 0d 0b 22 10 20 6d 6f 76 |oiceSlot..". mov| 00002060 20 20 20 72 30 2c 23 31 0d 0b 2c 10 20 6d 6f 76 | r0,#1..,. mov| 00002070 20 20 20 72 31 2c 23 31 0d 0b 36 2c 20 73 77 69 | r1,#1..6, swi| 00002080 20 20 20 22 53 6f 75 6e 64 5f 41 74 74 61 63 68 | "Sound_Attach| 00002090 56 6f 69 63 65 22 20 20 3b 52 65 69 6e 69 74 20 |Voice" ;Reinit | 000020a0 42 65 6c 6c 0d 0b 40 14 20 6c 64 6d 66 64 20 72 |Bell..@. ldmfd r| 000020b0 31 33 21 2c 7b 70 63 7d 0d 0b 4a 0d 2e 56 73 74 |13!,{pc}..J..Vst| 000020c0 65 72 65 6f 73 0d 0b 54 32 20 64 63 64 20 2d 35 |ereos..T2 dcd -5| 000020d0 30 20 20 20 20 20 20 3b 53 74 65 72 65 6f 20 50 |0 ;Stereo P| 000020e0 6f 73 69 74 69 6f 6e 73 20 66 6f 72 20 34 20 63 |ositions for 4 c| 000020f0 68 61 6e 6e 65 6c 73 0d 0b 5e 0c 20 64 63 64 20 |hannels..^. dcd | 00002100 2d 32 30 0d 0b 68 0c 20 64 63 64 20 20 32 30 0d |-20..h. dcd 20.| 00002110 0b 72 0c 20 64 63 64 20 20 35 30 0d 0b 7c 32 20 |.r. dcd 50..|2 | 00002120 64 63 64 2d 31 32 36 20 20 20 20 20 20 3b 53 74 |dcd-126 ;St| 00002130 65 72 65 6f 20 50 6f 73 69 74 69 6f 6e 73 20 66 |ereo Positions f| 00002140 6f 72 20 38 20 63 68 61 6e 6e 65 6c 73 0d 0b 86 |or 8 channels...| 00002150 0c 20 64 63 64 20 2d 39 30 0d 0b 90 0c 20 64 63 |. dcd -90.... dc| 00002160 64 20 2d 35 34 0d 0b 9a 0c 20 64 63 64 20 2d 31 |d -54.... dcd -1| 00002170 38 0d 0b a4 0c 20 64 63 64 20 20 31 38 0d 0b ae |8.... dcd 18...| 00002180 0c 20 64 63 64 20 20 35 34 0d 0b b8 0c 20 64 63 |. dcd 54.... dc| 00002190 64 20 20 39 30 0d 0b c2 0c 20 64 63 64 20 31 32 |d 90.... dcd 12| 000021a0 36 0d 0b cc 10 2e 56 73 6c 6f 74 20 64 63 64 20 |6.....Vslot dcd | 000021b0 30 0d 0b d6 48 3b 3d 3d 3d 3d 20 c8 99 54 45 4d |0...H;==== ..TEM| 000021c0 20 d4 20 76 32 2e 31 20 3d 3d 3d 3d 3d 3d 3d 3d | . v2.1 ========| 000021d0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| * 000021f0 3d 3d 3d 3d 3d 3d 3d 3d 3d 0d 0b e0 40 3b 20 72 |=========...@; r| 00002200 36 20 4e 65 67 2e 20 69 66 20 6e 65 77 20 48 61 |6 Neg. if new Ha| 00002210 6e 64 6c 65 72 20 20 20 20 72 31 30 20 50 6f 69 |ndler r10 Poi| 00002220 6e 74 65 72 20 74 6f 20 65 6e 64 20 6f 66 20 44 |nter to end of D| 00002230 4d 41 20 62 75 66 66 65 72 0d 0b ea 4d 3b 20 72 |MA buffer...M; r| 00002240 37 20 43 68 61 6e 6e 65 6c 20 6e 75 6d 62 65 72 |7 Channel number| 00002250 20 20 20 20 20 20 20 20 20 72 31 31 20 49 6e 63 | r11 Inc| 00002260 72 65 6d 65 6e 74 20 28 69 6e 74 65 72 6c 65 61 |rement (interlea| 00002270 66 29 20 74 6f 20 75 73 65 20 77 68 65 6e 20 77 |f) to use when w| 00002280 72 69 74 69 6e 67 0d 0b f4 4d 3b 20 72 38 20 53 |riting...M; r8 S| 00002290 61 6d 70 6c 65 20 70 65 72 69 6f 64 20 69 6e 20 |ample period in | 000022a0 75 73 20 20 20 20 72 31 32 20 50 6f 69 6e 74 65 |us r12 Pointe| 000022b0 72 20 74 6f 20 28 73 74 61 72 74 20 6f 66 20 44 |r to (start of D| 000022c0 4d 41 20 2b 20 69 6e 74 65 72 6c 65 61 66 20 4f |MA + interleaf O| 000022d0 66 73 29 0d 0b fe 4d 3b 20 72 39 20 50 6f 69 6e |fs)...M; r9 Poin| 000022e0 74 65 72 20 74 6f 20 53 43 43 42 20 20 20 20 20 |ter to SCCB | 000022f0 20 20 20 46 69 6c 6c 65 72 20 69 73 20 65 6e 74 | Filler is ent| 00002300 65 72 65 64 20 69 6e 20 49 52 51 20 6d 6f 64 65 |ered in IRQ mode| 00002310 20 26 20 49 6e 74 73 20 65 6e 61 62 6c 65 64 21 | & Ints enabled!| 00002320 0d 0c 08 0e 2e 56 6f 69 63 65 42 61 73 65 0d 0c |.....VoiceBase..| 00002330 12 3f 20 62 20 20 20 20 20 76 66 69 6c 6c 20 20 |.? b vfill | 00002340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 46 | ;F| 00002350 69 6c 6c 20 20 20 20 20 20 20 20 20 66 6f 72 20 |ill for | 00002360 73 6d 6f 6f 74 68 20 61 64 6a 75 73 74 0d 0c 1c |smooth adjust...| 00002370 3f 20 62 20 20 20 20 20 76 66 69 6c 6c 20 20 20 |? b vfill | 00002380 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 55 70 | ;Up| 00002390 64 61 74 65 20 20 20 20 20 20 20 66 6f 72 20 74 |date for t| 000023a0 6f 6e 65 20 63 6f 6e 74 69 6e 75 65 0d 0c 26 3a |one continue..&:| 000023b0 20 62 20 20 20 20 20 76 66 69 6c 6c 20 20 20 20 | b vfill | 000023c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 47 61 74 | ;Gat| 000023d0 65 4f 6e 20 20 20 20 20 20 20 66 6f 72 20 6e 65 |eOn for ne| 000023e0 77 20 74 6f 6e 65 0d 0c 30 3f 20 6c 64 6d 66 64 |w tone..0? ldmfd| 000023f0 20 72 31 33 21 2c 7b 70 63 7d 20 20 20 20 20 20 | r13!,{pc} | 00002400 20 20 20 20 20 20 3b 47 61 74 65 4f 66 66 20 20 | ;GateOff | 00002410 20 20 20 20 66 6f 72 20 74 6f 6e 65 20 66 6c 75 | for tone flu| 00002420 73 68 69 6e 67 0d 0c 3a 48 20 6c 64 6d 66 64 20 |shing..:H ldmfd | 00002430 72 31 33 21 2c 7b 70 63 7d 20 20 20 20 20 20 20 |r13!,{pc} | 00002440 20 20 20 20 20 3b 49 6e 73 74 61 6e 74 69 61 74 | ;Instantiat| 00002450 65 2c 20 20 20 41 74 74 61 63 68 20 20 20 20 56 |e, Attach V| 00002460 6f 69 63 65 47 65 6e 65 72 61 74 6f 72 0d 0c 44 |oiceGenerator..D| 00002470 4a 20 6c 64 6d 66 64 20 72 31 33 21 2c 7b 70 63 |J ldmfd r13!,{pc| 00002480 7d 20 20 20 20 20 20 20 20 20 20 20 20 3b 44 65 |} ;De| 00002490 49 6e 73 74 61 6e 74 69 61 74 65 2c 20 44 65 74 |Instantiate, Det| 000024a0 61 63 68 20 20 20 74 6f 2f 66 72 6f 6d 20 61 20 |ach to/from a | 000024b0 63 68 61 6e 6e 65 6c 0d 0c 4e 2e 20 6c 64 6d 66 |channel..N. ldmf| 000024c0 64 20 72 31 33 21 2c 7b 70 63 7d 20 20 20 20 20 |d r13!,{pc} | 000024d0 20 20 20 20 20 20 20 3b 48 65 6c 6c 6f 20 41 72 | ;Hello Ar| 000024e0 74 68 75 72 21 0d 0c 58 3e 20 64 63 64 20 20 20 |thur!..X> dcd | 000024f0 56 6e 61 6d 65 2d 56 6f 69 63 65 42 61 73 65 20 |Vname-VoiceBase | 00002500 20 20 20 20 20 3b 4f 66 66 73 65 74 20 66 72 6f | ;Offset fro| 00002510 6d 20 56 6f 69 63 65 42 61 73 65 20 74 6f 20 4e |m VoiceBase to N| 00002520 61 6d 65 0d 0c 62 1c 2e 56 6e 61 6d 65 20 64 63 |ame..b..Vname dc| 00002530 62 20 22 43 6f 63 6f 70 6c 65 78 22 2b bd 30 0d |b "Cocoplex"+.0.| 00002540 0c 6c 0a 20 61 6c 69 67 6e 0d 0c 76 0a 2e 76 66 |.l. align..v..vf| 00002550 69 6c 6c 0d 0c 80 3d 20 61 64 72 20 20 20 72 38 |ill...= adr r8| 00002560 2c 48 65 61 64 20 20 20 20 20 20 20 20 20 20 20 |,Head | 00002570 20 20 20 3b 57 65 20 75 73 65 20 61 6e 20 6f 77 | ;We use an ow| 00002580 6e 20 43 6f 6e 74 72 6f 6c 6c 5f 42 6c 6f 63 6b |n Controll_Block| 00002590 0d 0c 8a 34 20 61 64 64 20 20 20 72 38 2c 72 38 |...4 add r8,r8| 000025a0 2c 72 37 2c 6c 73 6c 23 35 20 20 20 20 20 20 20 |,r7,lsl#5 | 000025b0 3b 70 6f 69 6e 74 20 74 6f 20 48 65 61 64 2b 72 |;point to Head+r| 000025c0 37 2a 33 32 0d 0c 94 39 20 6c 64 6d 49 61 20 72 |7*32...9 ldmIa r| 000025d0 38 2c 7b 72 31 2d 72 36 7d 20 20 20 20 20 20 20 |8,{r1-r6} | 000025e0 20 20 20 20 3b 4c 6f 61 64 20 36 20 77 6f 72 6b | ;Load 6 work| 000025f0 69 6e 67 20 52 65 67 69 73 74 65 72 73 0d 0c 9e |ing Registers...| 00002600 14 20 6c 64 72 20 20 20 72 30 2c 56 6f 6c 75 6d |. ldr r0,Volum| 00002610 65 0d 0c a8 45 20 61 64 64 20 20 20 72 35 2c 72 |e...E add r5,r| 00002620 35 2c 72 30 20 20 20 20 20 20 20 20 20 20 20 20 |5,r0 | 00002630 20 3b 41 64 64 20 4f 76 65 72 61 6c 6c 5f 56 6f | ;Add Overall_Vo| 00002640 6c 75 6d 65 20 74 6f 20 43 68 61 6e 6e 65 6c 5f |lume to Channel_| 00002650 56 6f 6c 75 6d 65 0d 0c b2 10 20 6d 6f 76 20 20 |Volume.... mov | 00002660 20 72 30 2c 23 30 0d 0c bc 37 20 73 74 72 42 20 | r0,#0...7 strB | 00002670 20 72 30 2c 49 6e 74 46 6c 61 67 20 20 20 20 20 | r0,IntFlag | 00002680 20 20 20 20 20 20 3b 43 6c 65 61 72 20 49 6e 74 | ;Clear Int| 00002690 65 72 72 75 70 74 65 64 5f 46 6c 61 67 0d 0c c6 |errupted_Flag...| 000026a0 0d 2e 76 66 69 6c 6c 6f 6f 70 0d 0c d0 48 5d 3a |..vfilloop...H]:| 000026b0 e3 20 6e 3d 31 20 b8 20 67 61 70 3a 5b 4f 50 54 |. n=1 . gap:[OPT| 000026c0 20 70 20 20 20 20 20 3b 46 69 6c 6c 20 6f 6e 65 | p ;Fill one| 000026d0 20 62 79 74 65 20 31 36 20 74 69 6d 65 73 2c 20 | byte 16 times, | 000026e0 66 6f 72 20 32 30 38 20 2d 3e 20 31 33 20 72 75 |for 208 -> 13 ru| 000026f0 6e 73 0d 0c da 43 20 6c 64 72 42 20 20 72 30 2c |ns...C ldrB r0,| 00002700 5b 72 33 2c 72 31 2c 6c 73 72 23 31 36 5d 20 20 |[r3,r1,lsr#16] | 00002710 20 20 3b 4c 6f 61 64 20 73 61 6d 70 6c 65 20 62 | ;Load sample b| 00002720 79 74 65 20 28 48 69 67 68 57 6f 72 64 20 6f 66 |yte (HighWord of| 00002730 20 50 6f 73 29 0d 0c e4 48 20 73 75 62 53 20 20 | Pos)...H subS | 00002740 72 30 2c 72 30 2c 72 35 20 20 20 20 20 20 20 20 |r0,r0,r5 | 00002750 20 20 20 20 20 3b 4d 69 6e 75 73 20 56 6f 6c 75 | ;Minus Volu| 00002760 6d 65 20 28 77 68 65 72 65 20 30 3d 6c 6f 75 64 |me (where 0=loud| 00002770 20 26 20 32 35 35 3d 71 75 69 65 74 29 0d 0c ee | & 255=quiet)...| 00002780 10 20 6d 6f 76 4d 69 20 72 30 2c 23 30 0d 0c f8 |. movMi r0,#0...| 00002790 3c 20 73 74 72 42 20 20 72 30 2c 5b 72 31 32 5d |< strB r0,[r12]| 000027a0 2c 72 31 31 20 20 20 20 20 20 20 20 20 3b 41 6e |,r11 ;An| 000027b0 64 20 70 75 74 20 69 74 20 69 6e 74 6f 20 56 49 |d put it into VI| 000027c0 44 43 2d 62 75 66 66 65 72 0d 0d 02 36 20 61 64 |DC-buffer...6 ad| 000027d0 64 20 20 20 72 31 2c 72 31 2c 72 32 20 20 20 20 |d r1,r1,r2 | 000027e0 20 20 20 20 20 20 20 20 20 3b 41 64 64 20 50 69 | ;Add Pi| 000027f0 74 63 68 20 28 66 69 78 20 70 6f 69 6e 74 29 0d |tch (fix point).| 00002800 0d 0c 0e 5d 3a ed 3a 5b 4f 50 54 20 70 0d 0d 16 |...]:.:[OPT p...| 00002810 48 20 63 6d 70 20 20 20 72 34 2c 72 31 2c 6c 73 |H cmp r4,r1,ls| 00002820 72 23 31 36 20 20 20 20 20 20 20 20 20 3b 4c 65 |r#16 ;Le| 00002830 6e 67 74 68 20 65 78 63 65 65 64 65 64 3f 20 28 |ngth exceeded? (| 00002840 4c 65 6e 20 3c 20 66 69 78 70 6f 69 6e 74 65 64 |Len < fixpointed| 00002850 20 50 6f 73 29 0d 0d 20 3a 20 6d 6f 76 4c 73 20 | Pos).. : movLs | 00002860 72 31 2c 72 36 20 20 20 20 20 20 20 20 20 20 20 |r1,r6 | 00002870 20 20 20 20 20 3b 59 65 73 2c 20 73 6f 20 52 65 | ;Yes, so Re| 00002880 70 41 74 20 69 73 20 6e 65 77 20 50 6f 73 2c 0d |pAt is new Pos,.| 00002890 0d 2a 34 20 63 6d 70 20 20 20 72 31 2c 23 30 20 |.*4 cmp r1,#0 | 000028a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000028b0 20 20 20 20 62 75 74 20 69 73 20 69 74 20 7a 65 | but is it ze| 000028c0 72 6f 3f 0d 0d 34 4c 20 6d 6f 76 45 71 20 72 32 |ro?..4L movEq r2| 000028d0 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#0 | 000028e0 20 20 20 3b 20 20 20 20 79 65 73 20 2d 3e 20 4d | ; yes -> M| 000028f0 75 74 65 20 43 68 61 6e 6e 65 6c 20 28 69 65 20 |ute Channel (ie | 00002900 53 65 74 20 50 69 74 63 68 20 74 6f 20 30 29 0d |Set Pitch to 0).| 00002910 0d 3e 3c 20 63 6d 70 20 20 20 72 31 32 2c 72 31 |.>< cmp r12,r1| 00002920 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b |0 ;| 00002930 56 49 44 43 2d 42 75 66 66 65 72 20 66 69 6c 6c |VIDC-Buffer fill| 00002940 65 64 20 61 6c 72 65 61 64 79 3f 0d 0d 48 28 20 |ed already?..H( | 00002950 62 4c 6f 20 20 20 76 66 69 6c 6c 6f 6f 70 20 20 |bLo vfilloop | 00002960 20 20 20 20 20 20 20 20 20 20 20 3b 4e 6f 6f 6f | ;Nooo| 00002970 2e 2e 2e 0d 0d 52 46 20 73 74 6d 49 61 20 72 38 |.....RF stmIa r8| 00002980 2c 7b 72 31 2d 72 32 7d 20 20 20 20 20 20 20 20 |,{r1-r2} | 00002990 20 20 20 3b 53 61 76 65 20 74 68 65 20 74 77 6f | ;Save the two| 000029a0 20 28 70 72 6f 62 61 62 6c 79 29 20 6d 6f 64 69 | (probably) modi| 000029b0 66 69 65 64 20 72 65 67 73 0d 0d 5c 4c 20 6c 64 |fied regs..\L ld| 000029c0 72 42 20 20 72 30 2c 49 6e 74 46 6c 61 67 20 20 |rB r0,IntFlag | 000029d0 20 20 20 20 20 20 20 20 20 3b 48 61 76 65 20 77 | ;Have w| 000029e0 65 20 62 65 65 6e 20 69 6e 74 65 72 72 75 70 74 |e been interrupt| 000029f0 65 64 20 62 79 20 6f 75 72 20 50 6c 61 79 2d 45 |ed by our Play-E| 00002a00 76 65 6e 74 3f 0d 0d 66 10 20 63 6d 70 20 20 20 |vent?..f. cmp | 00002a10 72 30 2c 23 31 0d 0d 70 36 20 73 74 72 45 71 42 |r0,#1..p6 strEqB| 00002a20 20 30 2c 49 6e 74 53 79 6e 63 20 20 20 20 20 20 | 0,IntSync | 00002a30 20 20 20 20 20 3b 41 68 2c 20 66 75 63 6b 79 20 | ;Ah, fucky | 00002a40 59 45 53 21 20 28 4f 6f 70 73 29 0d 0d 7a 42 20 |YES! (Oops)..zB | 00002a50 6d 6f 76 20 20 20 72 30 2c 23 25 30 30 30 30 31 |mov r0,#%00001| 00002a60 30 30 30 20 20 20 20 20 20 20 20 3b 41 6e 64 20 |000 ;And | 00002a70 72 65 74 75 72 6e 20 77 69 74 68 20 56 6f 69 63 |return with Voic| 00002a80 65 2d 41 63 74 69 76 65 2d 46 6c 61 67 0d 0d 84 |e-Active-Flag...| 00002a90 14 20 6c 64 6d 66 64 20 72 31 33 21 2c 7b 70 63 |. ldmfd r13!,{pc| 00002aa0 7d 0d 0d 8e 09 2e 48 65 61 64 0d 0d 98 4b 20 64 |}.....Head...K d| 00002ab0 63 64 20 30 20 20 20 20 20 20 20 20 20 20 20 20 |cd 0 | 00002ac0 20 20 20 20 20 20 20 20 20 20 3b 72 31 20 50 6f | ;r1 Po| 00002ad0 73 20 69 6e 20 74 68 65 20 73 61 6d 70 6c 65 20 |s in the sample | 00002ae0 28 4f 66 66 73 65 74 20 69 6e 20 66 69 78 20 70 |(Offset in fix p| 00002af0 6f 69 6e 74 29 0d 0d a2 4a 20 64 63 64 20 30 20 |oint)...J dcd 0 | 00002b00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002b10 20 20 20 20 20 3b 72 32 20 49 6e 63 72 65 6d 65 | ;r2 Increme| 00002b20 6e 74 2f 50 69 74 63 68 20 28 4c 6f 77 57 6f 72 |nt/Pitch (LowWor| 00002b30 64 20 66 6f 72 20 66 69 78 70 6f 69 6e 74 29 0d |d for fixpoint).| 00002b40 0d ac 31 20 64 63 64 20 30 20 20 20 20 20 20 20 |..1 dcd 0 | 00002b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002b60 72 33 20 53 61 6d 70 6c 65 20 41 64 72 65 73 73 |r3 Sample Adress| 00002b70 0d 0d b6 2a 20 64 63 64 20 30 20 20 20 20 20 20 |...* dcd 0 | 00002b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002b90 3b 72 34 20 4c 65 6e 67 74 68 0d 0d c0 41 20 64 |;r4 Length...A d| 00002ba0 63 64 20 30 20 20 20 20 20 20 20 20 20 20 20 20 |cd 0 | 00002bb0 20 20 20 20 20 20 20 20 20 20 3b 72 35 20 56 6f | ;r5 Vo| 00002bc0 6c 75 6d 65 20 28 30 3d 4c 6f 75 64 20 2e 2e 2e |lume (0=Loud ...| 00002bd0 20 32 35 35 3d 51 75 69 65 74 29 0d 0d ca 4d 20 | 255=Quiet)...M | 00002be0 64 63 64 20 30 20 20 20 20 20 20 20 20 20 20 20 |dcd 0 | 00002bf0 20 20 20 20 20 20 20 20 20 20 20 3b 72 36 20 52 | ;r6 R| 00002c00 65 70 41 74 20 28 4e 65 77 20 66 69 78 70 6f 69 |epAt (New fixpoi| 00002c10 6e 74 20 50 6f 73 29 2c 20 6f 72 20 30 20 66 6f |nt Pos), or 0 fo| 00002c20 72 20 4e 4f 20 52 45 50 0d 0d d4 42 20 64 63 64 |r NO REP...B dcd| 00002c30 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | 0 | 00002c40 20 20 20 20 20 20 20 20 3b 42 79 74 65 20 2b 32 | ;Byte +2| 00002c50 34 20 56 61 6c 75 65 20 66 6f 72 20 41 75 74 6f |4 Value for Auto| 00002c60 20 56 6f 6c 75 6d 65 20 75 70 0d 0d de 44 20 20 | Volume up...D | 00002c70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002c80 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 20 | ; | 00002c90 20 32 35 20 20 20 22 20 20 20 20 22 20 20 20 22 | 25 " " "| 00002ca0 20 20 20 56 6f 6c 75 6d 65 20 64 6f 77 6e 0d 0d | Volume down..| 00002cb0 e8 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.A | 00002cc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002cd0 20 20 20 20 20 32 36 20 20 20 22 20 20 20 20 22 | 26 " "| 00002ce0 20 20 20 22 20 20 20 50 69 74 63 68 20 75 70 0d | " Pitch up.| 00002cf0 0d f2 43 20 20 20 20 20 20 20 20 20 20 20 20 20 |..C | 00002d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002d10 20 20 20 20 20 20 32 37 20 20 20 22 20 20 20 20 | 27 " | 00002d20 22 20 20 20 22 20 20 20 50 69 74 63 68 20 64 6f |" " Pitch do| 00002d30 77 6e 0d 0d fc 3a 20 64 63 64 20 30 20 20 20 20 |wn...: dcd 0 | 00002d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002d50 20 20 3b 42 79 74 65 20 2b 32 38 20 41 63 74 75 | ;Byte +28 Actu| 00002d60 61 6c 20 49 6e 66 6f 20 42 79 74 65 0d 0e 06 3a |al Info Byte...:| 00002d70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002d80 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 20 | ; | 00002d90 20 20 20 32 39 20 41 63 74 75 61 6c 20 43 6f 6d | 29 Actual Com| 00002da0 6d 20 42 79 74 65 0d 0e 10 39 20 20 20 20 20 20 |m Byte...9 | 00002db0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002dc0 20 20 20 20 20 20 3b 20 20 20 20 20 20 33 30 20 | ; 30 | 00002dd0 28 53 6f 75 6e 64 20 46 58 20 46 6c 61 67 29 0d |(Sound FX Flag).| 00002de0 0e 1a 3e 20 20 20 20 20 20 20 20 20 20 20 20 20 |..> | 00002df0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002e00 20 20 20 20 20 20 33 31 20 4c 61 73 74 20 6c 65 | 31 Last le| 00002e10 67 61 6c 20 74 6f 6e 65 2f 6e 6f 74 65 0d 0e 24 |gal tone/note..$| 00002e20 35 20 64 63 62 20 c4 33 2a 33 32 2d 34 2a 33 32 |5 dcb .3*32-4*32| 00002e30 2a 28 56 6f 63 73 3d 38 29 2c bd 30 29 20 20 20 |*(Vocs=8),.0) | 00002e40 20 3b 41 64 64 20 33 20 6f 72 20 37 20 48 65 61 | ;Add 3 or 7 Hea| 00002e50 64 73 0d 0e 2e 35 2e 56 6f 6c 75 6d 65 20 20 20 |ds...5.Volume | 00002e60 20 20 20 20 64 63 64 20 30 20 20 20 20 20 20 20 | dcd 0 | 00002e70 20 20 3b 4f 76 65 72 61 6c 6c 5f 53 6f 75 6e 64 | ;Overall_Sound| 00002e80 5f 56 6f 6c 75 6d 65 0d 0e 38 3c 2e 49 6e 74 46 |_Volume..8<.IntF| 00002e90 6c 61 67 20 20 20 20 20 20 64 63 62 20 30 20 20 |lag dcb 0 | 00002ea0 20 20 20 20 20 20 20 3b 53 65 74 20 3d 20 48 61 | ;Set = Ha| 00002eb0 76 65 20 62 65 65 6e 20 69 6e 74 65 72 72 75 70 |ve been interrup| 00002ec0 74 65 64 0d 0e 42 3b 2e 49 6e 74 53 79 6e 63 20 |ted..B;.IntSync | 00002ed0 20 20 20 20 20 64 63 62 20 30 20 20 20 20 20 20 | dcb 0 | 00002ee0 20 20 20 3b 53 65 74 20 3d 20 4c 6f 73 65 72 20 | ;Set = Loser | 00002ef0 6e 65 65 64 73 20 6e 65 77 20 73 79 6e 63 0d 0e |needs new sync..| 00002f00 4c 0a 20 61 6c 69 67 6e 0d 0e 56 4d 3b 3d 3d 3d |L. align..VM;===| 00002f10 3d 20 50 4c 41 59 20 45 56 45 4e 54 20 76 31 2e |= PLAY EVENT v1.| 00002f20 32 20 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |2 ==============| 00002f30 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| * 00002f50 3d 3d 3d 3d 3d 0d 0e 60 05 20 0d 0e 6a 3d 3b 2a |=====..`. ..j=;*| 00002f60 2a 2a 20 44 4f 20 45 56 45 52 59 20 56 53 59 4e |** DO EVERY VSYN| 00002f70 43 20 45 46 46 45 43 54 53 20 28 23 72 30 3d 54 |C EFFECTS (#r0=T| 00002f80 69 6d 65 72 20 2e 2e 2e 20 24 72 30 3d 70 72 65 |imer ... $r0=pre| 00002f90 73 65 72 76 65 64 29 0d 0e 74 0d 2e 76 65 66 66 |served)..t..veff| 00002fa0 65 63 74 73 0d 0e 7e 33 20 6c 64 72 20 20 20 72 |ects..~3 ldr r| 00002fb0 34 2c 5b 72 31 32 2c 23 34 5d 20 20 20 20 20 20 |4,[r12,#4] | 00002fc0 20 20 20 20 3b 4c 6f 61 64 20 63 75 72 72 65 6e | ;Load curren| 00002fd0 74 20 50 69 74 63 68 0d 0e 88 4a 20 63 6d 70 20 |t Pitch...J cmp | 00002fe0 20 20 72 34 2c 23 30 20 20 20 20 20 20 20 20 20 | r4,#0 | 00002ff0 20 20 20 20 20 20 20 3b 4e 6f 20 61 63 74 69 76 | ;No activ| 00003000 65 20 74 6f 6e 65 20 2d 3e 20 73 6f 72 72 79 2c |e tone -> sorry,| 00003010 20 65 66 66 65 63 74 20 64 69 73 61 62 6c 65 64 | effect disabled| 00003020 21 0d 0e 92 11 20 6d 6f 76 45 71 20 70 63 2c 72 |!.... movEq pc,r| 00003030 31 34 0d 0e 9c 32 20 6c 64 72 20 20 20 72 33 2c |14...2 ldr r3,| 00003040 5b 72 31 32 2c 23 32 34 5d 20 20 20 20 20 20 20 |[r12,#24] | 00003050 20 20 3b 4c 6f 61 64 20 41 75 74 6f 2d 45 66 66 | ;Load Auto-Eff| 00003060 65 63 74 73 0d 0e a6 29 20 6d 6f 76 20 20 20 72 |ects...) mov r| 00003070 31 30 2c 72 31 34 20 20 20 20 20 20 20 20 20 20 |10,r14 | 00003080 20 20 20 20 3b 50 75 73 68 20 72 31 34 0d 0e b0 | ;Push r14...| 00003090 39 20 61 6e 64 53 20 20 72 32 2c 72 33 2c 23 26 |9 andS r2,r3,#&| 000030a0 66 66 20 20 20 20 20 20 20 20 20 20 20 3b 49 73 |ff ;Is| 000030b0 20 74 68 65 72 65 20 41 75 74 6f 20 56 6f 6c 75 | there Auto Volu| 000030c0 6d 65 20 75 70 3f 0d 0e ba 12 20 62 6c 4e 65 20 |me up?.... blNe | 000030d0 20 76 5f 76 6f 6c 75 70 0d 0e c4 3b 20 61 6e 64 | v_volup...; and| 000030e0 53 20 20 72 32 2c 72 33 2c 23 26 66 66 20 3c 3c |S r2,r3,#&ff <<| 000030f0 38 20 20 20 20 20 20 20 3b 49 73 20 74 68 65 72 |8 ;Is ther| 00003100 65 20 41 75 74 6f 20 56 6f 6c 75 6d 65 20 64 6f |e Auto Volume do| 00003110 77 6e 3f 0d 0e ce 16 20 6d 6f 76 4e 65 20 72 32 |wn?.... movNe r2| 00003120 2c 72 32 2c 6c 73 72 23 38 0d 0e d8 14 20 62 6c |,r2,lsr#8.... bl| 00003130 4e 65 20 20 76 5f 76 6f 6c 64 6f 77 6e 0d 0e e2 |Ne v_voldown...| 00003140 38 20 61 6e 64 53 20 20 72 32 2c 72 33 2c 23 26 |8 andS r2,r3,#&| 00003150 66 66 20 3c 3c 31 36 20 20 20 20 20 20 3b 49 73 |ff <<16 ;Is| 00003160 20 74 68 65 72 65 20 41 75 74 6f 20 50 69 74 63 | there Auto Pitc| 00003170 68 20 75 70 3f 0d 0e ec 17 20 6d 6f 76 4e 65 20 |h up?.... movNe | 00003180 72 32 2c 72 32 2c 6c 73 72 23 31 36 0d 0e f6 12 |r2,r2,lsr#16....| 00003190 20 62 6c 4e 65 20 20 76 5f 61 72 63 75 70 0d 0f | blNe v_arcup..| 000031a0 00 3a 20 61 6e 64 53 20 20 72 32 2c 72 33 2c 23 |.: andS r2,r3,#| 000031b0 26 66 66 20 3c 3c 32 34 20 20 20 20 20 20 3b 49 |&ff <<24 ;I| 000031c0 73 20 74 68 65 72 65 20 41 75 74 6f 20 50 69 74 |s there Auto Pit| 000031d0 63 68 20 64 6f 77 6e 3f 0d 0f 0a 17 20 6d 6f 76 |ch down?.... mov| 000031e0 4e 65 20 72 32 2c 72 32 2c 6c 73 72 23 32 34 0d |Ne r2,r2,lsr#24.| 000031f0 0f 14 14 20 62 6c 4e 65 20 20 76 5f 61 72 63 64 |... blNe v_arcd| 00003200 6f 77 6e 0d 0f 1e 29 20 6d 6f 76 20 20 20 72 31 |own...) mov r1| 00003210 34 2c 72 31 30 20 20 20 20 20 20 20 20 20 20 20 |4,r10 | 00003220 20 20 20 3b 50 6f 70 20 20 72 31 34 0d 0f 28 4b | ;Pop r14..(K| 00003230 20 6c 64 72 20 20 20 72 31 2c 5b 72 31 32 2c 23 | ldr r1,[r12,#| 00003240 32 38 5d 20 20 20 20 20 20 20 20 20 3b 45 66 66 |28] ;Eff| 00003250 65 63 74 20 4c 57 6f 72 64 20 26 20 4c 61 73 74 |ect LWord & Last| 00003260 20 54 6f 6e 65 20 61 72 65 20 69 6e 20 74 68 65 | Tone are in the| 00003270 20 48 65 61 64 65 72 0d 0f 32 31 20 61 6e 64 53 | Header..21 andS| 00003280 20 20 72 32 2c 72 31 2c 23 26 66 66 20 20 20 20 | r2,r1,#&ff | 00003290 20 20 20 20 20 20 20 3b 49 73 6f 6c 61 74 65 20 | ;Isolate | 000032a0 49 6e 66 6f 42 79 74 65 0d 0f 3c 45 20 6d 6f 76 |InfoByte..<E mov| 000032b0 45 71 20 70 63 2c 72 31 34 20 20 20 20 20 20 20 |Eq pc,r14 | 000032c0 20 20 20 20 20 20 20 20 3b 69 66 20 30 2c 20 74 | ;if 0, t| 000032d0 68 65 6e 20 74 68 65 72 65 27 73 20 6e 6f 20 65 |hen there's no e| 000032e0 66 66 65 63 74 20 61 74 20 61 6c 6c 21 0d 0f 46 |ffect at all!..F| 000032f0 36 20 61 6e 64 20 20 20 72 33 2c 72 31 2c 23 26 |6 and r3,r1,#&| 00003300 66 66 30 30 20 20 20 20 20 20 20 20 20 3b 49 73 |ff00 ;Is| 00003310 6f 6c 61 74 65 20 45 66 66 65 63 74 20 6e 75 6d |olate Effect num| 00003320 62 65 72 0d 0f 50 4d 20 6c 64 72 20 20 20 72 33 |ber..PM ldr r3| 00003330 2c 5b 70 63 2c 72 33 2c 6c 73 72 23 36 5d 20 20 |,[pc,r3,lsr#6] | 00003340 20 20 20 3b 6c 73 72 23 38 20 66 6f 72 20 65 66 | ;lsr#8 for ef| 00003350 66 65 63 74 20 69 6e 74 6f 20 6c 6f 77 62 79 74 |fect into lowbyt| 00003360 65 20 26 20 6c 73 6c 23 32 20 66 6f 72 20 2a 34 |e & lsl#2 for *4| 00003370 0d 0f 5a 13 20 61 64 64 20 20 20 70 63 2c 70 63 |..Z. add pc,pc| 00003380 2c 72 33 0d 0f 64 2e 20 64 63 64 20 20 20 76 5f |,r3..d. dcd v_| 00003390 61 72 70 65 67 67 69 6f 2d 76 6f 66 31 20 20 20 |arpeggio-vof1 | 000033a0 20 20 20 3b 20 30 20 3d 20 41 72 70 65 67 67 69 | ; 0 = Arpeggi| 000033b0 6f 0d 0f 6e 09 2e 76 6f 66 31 0d 0f 78 46 20 64 |o..n..vof1..xF d| 000033c0 63 64 20 20 20 76 5f 73 6c 69 64 65 75 70 2d 76 |cd v_slideup-v| 000033d0 6f 66 31 20 20 20 20 20 20 20 3b 20 31 20 3d 20 |of1 ; 1 = | 000033e0 53 6c 69 64 65 20 50 69 74 63 68 20 75 70 20 20 |Slide Pitch up | 000033f0 20 28 74 69 6c 6c 20 41 6d 69 73 20 4d 61 78 29 | (till Amis Max)| 00003400 0d 0f 82 46 20 64 63 64 20 20 20 76 5f 73 6c 69 |...F dcd v_sli| 00003410 64 65 64 6f 77 6e 2d 76 6f 66 31 20 20 20 20 20 |dedown-vof1 | 00003420 3b 20 32 20 3d 20 53 6c 69 64 65 20 50 69 74 63 |; 2 = Slide Pitc| 00003430 68 20 64 6f 77 6e 20 28 74 69 6c 6c 20 41 6d 69 |h down (till Ami| 00003440 73 20 4d 69 6e 29 0d 0f 8c 2f 20 64 63 64 20 20 |s Min).../ dcd | 00003450 20 76 5f 76 6f 6c 75 70 2d 76 6f 66 31 20 20 20 | v_volup-vof1 | 00003460 20 20 20 20 20 20 3b 20 33 20 3d 20 56 6f 6c 75 | ; 3 = Volu| 00003470 6d 65 20 75 70 0d 0f 96 31 20 64 63 64 20 20 20 |me up...1 dcd | 00003480 76 5f 76 6f 6c 64 6f 77 6e 2d 76 6f 66 31 20 20 |v_voldown-vof1 | 00003490 20 20 20 20 20 3b 20 34 20 3d 20 56 6f 6c 75 6d | ; 4 = Volum| 000034a0 65 20 64 6f 77 6e 0d 0f a0 38 20 64 63 64 20 20 |e down...8 dcd | 000034b0 20 76 5f 61 72 63 75 70 2d 76 6f 66 31 20 20 20 | v_arcup-vof1 | 000034c0 20 20 20 20 20 20 3b 20 35 20 3d 20 53 6c 69 64 | ; 5 = Slid| 000034d0 65 20 41 72 63 20 50 69 74 63 68 20 75 70 0d 0f |e Arc Pitch up..| 000034e0 aa 3a 20 64 63 64 20 20 20 76 5f 61 72 63 64 6f |.: dcd v_arcdo| 000034f0 77 6e 2d 76 6f 66 31 20 20 20 20 20 20 20 3b 20 |wn-vof1 ; | 00003500 36 20 3d 20 53 6c 69 64 65 20 41 72 63 20 50 69 |6 = Slide Arc Pi| 00003510 74 63 68 20 64 6f 77 6e 0d 0f b4 0f 2e 76 5f 61 |tch down.....v_a| 00003520 72 70 65 67 67 69 6f 0d 0f be 42 20 6d 6f 76 20 |rpeggio...B mov | 00003530 20 20 72 31 2c 72 31 2c 6c 73 72 23 32 34 20 20 | r1,r1,lsr#24 | 00003540 20 20 20 20 20 20 20 3b 47 65 74 20 6c 61 73 74 | ;Get last| 00003550 20 73 74 6f 72 65 64 20 54 6f 6e 65 20 69 6e 74 | stored Tone int| 00003560 6f 20 6c 6f 77 62 79 74 65 0d 0f c8 2a 20 63 6d |o lowbyte...* cm| 00003570 70 20 20 20 72 30 2c 23 31 20 20 20 20 20 20 20 |p r0,#1 | 00003580 20 20 20 20 20 20 20 20 20 3b 54 69 6d 65 3d 31 | ;Time=1| 00003590 20 6f 72 0d 0f d2 27 20 63 6d 70 4e 65 20 72 30 | or...' cmpNe r0| 000035a0 2c 23 34 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#4 | 000035b0 20 20 20 3b 54 69 6d 65 3d 34 0d 0f dc 46 20 61 | ;Time=4...F a| 000035c0 64 64 45 71 20 72 31 2c 72 31 2c 72 32 2c 6c 73 |ddEq r1,r1,r2,ls| 000035d0 72 23 34 20 20 20 20 20 20 20 3b 20 2e 2e 2e 74 |r#4 ; ...t| 000035e0 68 65 6e 20 61 64 64 20 20 6c 65 66 74 20 49 6e |hen add left In| 000035f0 66 6f 4e 69 62 62 6c 65 20 74 6f 20 4e 6f 74 65 |foNibble to Note| 00003600 0d 0f e6 2a 20 63 6d 70 20 20 20 72 30 2c 23 32 |...* cmp r0,#2| 00003610 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003620 3b 54 69 6d 65 3d 32 20 6f 72 0d 0f f0 27 20 63 |;Time=2 or...' c| 00003630 6d 70 4e 65 20 72 30 2c 23 35 20 20 20 20 20 20 |mpNe r0,#5 | 00003640 20 20 20 20 20 20 20 20 20 20 3b 54 69 6d 65 3d | ;Time=| 00003650 35 0d 0f fa 46 20 61 6e 64 45 71 20 72 32 2c 72 |5...F andEq r2,r| 00003660 32 2c 23 26 30 66 20 20 20 20 20 20 20 20 20 20 |2,#&0f | 00003670 20 3b 20 2e 2e 2e 74 68 65 6e 20 61 64 64 20 72 | ; ...then add r| 00003680 69 67 68 74 20 49 6e 66 6f 4e 69 62 62 6c 65 20 |ight InfoNibble | 00003690 74 6f 20 4e 6f 74 65 0d 10 04 13 20 61 64 64 45 |to Note.... addE| 000036a0 71 20 72 31 2c 72 31 2c 72 32 0d 10 0e 49 20 6c |q r1,r1,r2...I l| 000036b0 64 72 20 20 20 72 31 2c 5b 72 31 31 2c 72 31 2c |dr r1,[r11,r1,| 000036c0 6c 73 6c 23 32 5d 20 20 20 20 3b 47 65 74 20 65 |lsl#2] ;Get e| 000036d0 71 75 69 76 61 6c 65 6e 74 20 46 72 65 71 75 65 |quivalent Freque| 000036e0 6e 63 79 20 66 72 6f 6d 20 72 31 31 3d 66 54 61 |ncy from r11=fTa| 000036f0 62 6c 65 0d 10 18 2c 20 73 74 72 20 20 20 72 31 |ble..., str r1| 00003700 2c 5b 72 31 32 2c 23 34 5d 20 20 20 20 20 20 20 |,[r12,#4] | 00003710 20 20 20 3b 45 6e 74 65 72 20 50 69 74 63 68 0d | ;Enter Pitch.| 00003720 10 22 11 20 6d 6f 76 20 20 20 70 63 2c 72 31 34 |.". mov pc,r14| 00003730 0d 10 2c 0e 2e 76 5f 73 6c 69 64 65 75 70 0d 10 |..,..v_slideup..| 00003740 36 32 20 61 64 64 20 20 20 72 31 2c 72 34 2c 72 |62 add r1,r4,r| 00003750 32 2c 6c 73 6c 23 36 20 20 20 20 20 20 20 3b 20 |2,lsl#6 ; | 00003760 46 72 65 71 2b 49 6e 66 6f 42 79 74 65 2a 36 34 |Freq+InfoByte*64| 00003770 0d 10 40 44 20 63 6d 70 20 20 20 72 31 2c 23 26 |..@D cmp r1,#&| 00003780 31 38 38 30 30 20 20 20 20 20 20 20 20 20 20 20 |18800 | 00003790 3b 4d 69 6e 20 50 65 72 20 3d 20 26 30 37 31 2c |;Min Per = &071,| 000037a0 20 69 65 20 4f 75 74 50 75 74 46 20 3c 20 26 31 | ie OutPutF < &1| 000037b0 38 34 44 41 0d 10 4a 16 20 73 74 72 4c 74 20 72 |84DA..J. strLt r| 000037c0 31 2c 5b 72 31 32 2c 23 34 5d 0d 10 54 11 20 6d |1,[r12,#4]..T. m| 000037d0 6f 76 20 20 20 70 63 2c 72 31 34 0d 10 5e 10 2e |ov pc,r14..^..| 000037e0 76 5f 73 6c 69 64 65 64 6f 77 6e 0d 10 68 32 20 |v_slidedown..h2 | 000037f0 73 75 62 20 20 20 72 31 2c 72 34 2c 72 32 2c 6c |sub r1,r4,r2,l| 00003800 73 6c 23 36 20 20 20 20 20 20 20 3b 20 46 72 65 |sl#6 ; Fre| 00003810 71 2d 49 6e 66 6f 42 79 74 65 2a 36 34 0d 10 72 |q-InfoByte*64..r| 00003820 44 20 63 6d 70 20 20 20 72 31 2c 23 26 33 33 34 |D cmp r1,#&334| 00003830 30 20 20 20 20 20 20 20 20 20 20 20 20 3b 4d 61 |0 ;Ma| 00003840 78 20 50 65 72 20 3d 20 26 33 35 38 2c 20 69 65 |x Per = &358, ie| 00003850 20 4f 75 74 50 75 74 46 20 3e 20 26 20 33 33 35 | OutPutF > & 335| 00003860 35 0d 10 7c 16 20 73 74 72 47 74 20 72 31 2c 5b |5..|. strGt r1,[| 00003870 72 31 32 2c 23 34 5d 0d 10 86 11 20 6d 6f 76 20 |r12,#4].... mov | 00003880 20 20 70 63 2c 72 31 34 0d 10 90 0c 2e 76 5f 76 | pc,r14.....v_v| 00003890 6f 6c 75 70 0d 10 9a 4a 20 63 6d 70 20 20 20 72 |olup...J cmp r| 000038a0 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |0,#1 | 000038b0 20 20 20 20 3b 4f 6e 6c 79 20 65 61 63 68 20 66 | ;Only each f| 000038c0 69 72 73 74 20 76 5f 69 6e 74 65 72 72 75 70 74 |irst v_interrupt| 000038d0 20 66 6f 72 20 73 6c 6f 77 20 64 6f 77 6e 0d 10 | for slow down..| 000038e0 a4 11 20 6d 6f 76 4e 65 20 70 63 2c 72 31 34 0d |.. movNe pc,r14.| 000038f0 10 ae 38 20 6c 64 72 20 20 20 72 31 2c 5b 72 31 |..8 ldr r1,[r1| 00003900 32 2c 23 31 36 5d 20 20 20 20 20 20 20 20 20 3b |2,#16] ;| 00003910 54 68 65 72 65 20 69 73 20 63 75 72 72 65 6e 74 |There is current| 00003920 20 56 6f 6c 75 6d 65 0d 10 b8 13 20 73 75 62 53 | Volume.... subS| 00003930 20 20 72 31 2c 72 31 2c 72 32 0d 10 c2 4a 20 73 | r1,r1,r2...J s| 00003940 74 72 50 6c 20 72 31 2c 5b 72 31 32 2c 23 31 36 |trPl r1,[r12,#16| 00003950 5d 20 20 20 20 20 20 20 20 20 3b 49 66 20 6e 6f |] ;If no| 00003960 74 20 3e 20 30 20 20 28 4d 61 78 20 56 6f 6c 29 |t > 0 (Max Vol)| 00003970 2c 20 74 68 65 6e 20 77 72 69 74 65 20 69 74 20 |, then write it | 00003980 62 61 63 6b 0d 10 cc 11 20 6d 6f 76 20 20 20 70 |back.... mov p| 00003990 63 2c 72 31 34 0d 10 d6 0e 2e 76 5f 76 6f 6c 64 |c,r14.....v_vold| 000039a0 6f 77 6e 0d 10 e0 10 20 63 6d 70 20 20 20 72 30 |own.... cmp r0| 000039b0 2c 23 31 0d 10 ea 11 20 6d 6f 76 4e 65 20 70 63 |,#1.... movNe pc| 000039c0 2c 72 31 34 0d 10 f4 17 20 6c 64 72 20 20 20 72 |,r14.... ldr r| 000039d0 31 2c 5b 72 31 32 2c 23 31 36 5d 0d 10 fe 13 20 |1,[r12,#16].... | 000039e0 61 64 64 20 20 20 72 31 2c 72 31 2c 72 32 0d 11 |add r1,r1,r2..| 000039f0 08 12 20 63 6d 70 20 20 20 72 31 2c 23 32 35 35 |.. cmp r1,#255| 00003a00 0d 11 12 4a 20 73 74 72 4c 73 20 72 31 2c 5b 72 |...J strLs r1,[r| 00003a10 31 32 2c 23 31 36 5d 20 20 20 20 20 20 20 20 20 |12,#16] | 00003a20 3b 49 66 20 6e 6f 74 20 3c 32 35 35 20 28 4d 69 |;If not <255 (Mi| 00003a30 6e 20 56 6f 6c 29 2c 20 74 68 65 6e 20 77 72 69 |n Vol), then wri| 00003a40 74 65 20 69 74 20 62 61 63 6b 0d 11 1c 11 20 6d |te it back.... m| 00003a50 6f 76 20 20 20 70 63 2c 72 31 34 0d 11 26 0c 2e |ov pc,r14..&..| 00003a60 76 5f 61 72 63 75 70 0d 11 30 45 20 61 64 64 53 |v_arcup..0E addS| 00003a70 20 20 72 31 2c 72 34 2c 72 32 2c 6c 73 6c 23 34 | r1,r4,r2,lsl#4| 00003a80 20 20 20 20 20 20 20 3b 50 69 74 63 68 2b 49 6e | ;Pitch+In| 00003a90 66 6f 42 79 74 65 2a 31 36 20 28 66 6f 72 20 73 |foByte*16 (for s| 00003aa0 6c 6f 77 20 73 6c 69 64 69 6e 67 29 0d 11 3a 16 |low sliding)..:.| 00003ab0 20 73 74 72 50 6c 20 72 31 2c 5b 72 31 32 2c 23 | strPl r1,[r12,#| 00003ac0 34 5d 0d 11 44 11 20 6d 6f 76 20 20 20 70 63 2c |4]..D. mov pc,| 00003ad0 72 31 34 0d 11 4e 0e 2e 76 5f 61 72 63 64 6f 77 |r14..N..v_arcdow| 00003ae0 6e 0d 11 58 45 20 73 75 62 53 20 20 72 31 2c 72 |n..XE subS r1,r| 00003af0 34 2c 72 32 2c 6c 73 6c 23 34 20 20 20 20 20 20 |4,r2,lsl#4 | 00003b00 20 3b 50 69 74 63 68 2d 49 6e 66 6f 42 79 74 65 | ;Pitch-InfoByte| 00003b10 2a 31 36 20 28 66 6f 72 20 73 6c 6f 77 20 73 6c |*16 (for slow sl| 00003b20 69 64 69 6e 67 29 0d 11 62 16 20 73 74 72 50 6c |iding)..b. strPl| 00003b30 20 72 31 2c 5b 72 31 32 2c 23 34 5d 0d 11 6c 11 | r1,[r12,#4]..l.| 00003b40 20 6d 6f 76 20 20 20 70 63 2c 72 31 34 0d 11 76 | mov pc,r14..v| 00003b50 1e 3b 2a 2a 2a 20 45 4e 54 52 59 20 c8 92 53 20 |.;*** ENTRY ..S | 00003b60 e3 20 47 41 4d 45 20 d4 20 46 58 0d 11 80 08 2e |. GAME . FX.....| 00003b70 66 78 31 0d 11 8a 18 20 61 64 72 20 20 20 72 31 |fx1.... adr r1| 00003b80 32 2c 48 65 61 64 2b 30 2a 33 32 0d 11 94 10 20 |2,Head+0*32.... | 00003b90 62 20 20 20 20 20 66 78 34 2b 34 0d 11 9e 08 2e |b fx4+4.....| 00003ba0 66 78 32 0d 11 a8 18 20 61 64 72 20 20 20 72 31 |fx2.... adr r1| 00003bb0 32 2c 48 65 61 64 2b 31 2a 33 32 0d 11 b2 10 20 |2,Head+1*32.... | 00003bc0 62 20 20 20 20 20 66 78 34 2b 34 0d 11 bc 08 2e |b fx4+4.....| 00003bd0 66 78 33 0d 11 c6 18 20 61 64 72 20 20 20 72 31 |fx3.... adr r1| 00003be0 32 2c 48 65 61 64 2b 32 2a 33 32 0d 11 d0 10 20 |2,Head+2*32.... | 00003bf0 62 20 20 20 20 20 66 78 34 2b 34 0d 11 da 08 2e |b fx4+4.....| 00003c00 66 78 34 0d 11 e4 18 20 61 64 72 20 20 20 72 31 |fx4.... adr r1| 00003c10 32 2c 48 65 61 64 2b 33 2a 33 32 0d 11 ee 10 20 |2,Head+3*32.... | 00003c20 6d 6f 76 20 20 20 72 30 2c 23 31 0d 11 f8 31 20 |mov r0,#1...1 | 00003c30 73 74 72 42 20 20 72 30 2c 5b 72 31 32 2c 23 33 |strB r0,[r12,#3| 00003c40 30 5d 20 20 20 20 20 20 20 20 20 3b 53 65 74 20 |0] ;Set | 00003c50 53 6f 75 6e 64 46 58 20 66 6c 61 67 0d 12 02 14 |SoundFX flag....| 00003c60 20 61 64 72 20 20 20 72 31 30 2c 54 72 61 63 6b | adr r10,Track| 00003c70 0d 12 0c 15 20 61 64 72 20 20 20 72 31 31 2c 46 |.... adr r11,F| 00003c80 74 61 62 6c 65 0d 12 16 10 20 62 20 20 20 20 20 |table.... b | 00003c90 76 72 75 6c 65 0d 12 20 46 3b 2a 2a 2a 20 a8 45 |vrule.. F;*** .E| 00003ca0 52 52 55 50 54 20 45 4e 54 52 59 20 c8 92 20 28 |RRUPT ENTRY .. (| 00003cb0 23 72 30 3d 45 76 65 6e 74 20 4e 6f 2c 20 72 31 |#r0=Event No, r1| 00003cc0 32 3d 57 6f 72 6b 73 70 61 63 65 20 5b 68 65 72 |2=Workspace [her| 00003cd0 65 20 48 65 61 64 41 64 72 5d 29 0d 12 2a 0b 2e |e HeadAdr])..*..| 00003ce0 76 69 6e 74 65 72 0d 12 34 35 20 43 4d 50 20 72 |vinter..45 CMP r| 00003cf0 30 2c 23 34 20 20 20 20 20 20 20 20 20 20 20 20 |0,#4 | 00003d00 20 20 20 20 20 20 3b 63 68 65 63 6b 20 69 66 20 | ;check if | 00003d10 76 73 79 6e 63 20 65 76 65 6e 74 0d 12 3e 12 20 |vsync event..>. | 00003d20 4d 4f 56 4e 45 53 20 70 63 2c 72 31 34 0d 12 48 |MOVNES pc,r14..H| 00003d30 4c 20 73 74 6d 66 64 20 72 31 33 21 2c 7b 72 31 |L stmfd r13!,{r1| 00003d40 2d 72 31 31 7d 20 20 20 20 20 20 20 20 3b 46 6f |-r11} ;Fo| 00003d50 72 20 6e 6f 74 20 69 6e 74 65 72 63 65 70 74 69 |r not intercepti| 00003d60 6e 67 20 76 65 63 74 6f 72 20 2d 3e 20 70 75 73 |ng vector -> pus| 00003d70 68 20 72 31 34 20 74 6f 6f 0d 12 52 4c 20 61 64 |h r14 too..RL ad| 00003d80 72 20 20 20 72 31 31 2c 46 74 61 62 6c 65 20 20 |r r11,Ftable | 00003d90 20 20 20 20 20 20 20 20 20 3b 72 31 31 20 26 20 | ;r11 & | 00003da0 72 31 32 20 70 6f 69 6e 74 65 72 73 20 61 72 65 |r12 pointers are| 00003db0 20 6e 65 65 64 65 64 20 69 6e 20 62 6f 74 68 20 | needed in both | 00003dc0 63 61 73 65 73 0d 12 5c 35 20 6c 64 6d 44 62 20 |cases..\5 ldmDb | 00003dd0 72 31 31 2c 7b 72 30 2c 72 31 7d 20 20 20 20 20 |r11,{r0,r1} | 00003de0 20 20 20 20 20 3b 4c 6f 61 64 20 43 6f 75 6e 74 | ;Load Count| 00003df0 65 72 20 26 20 53 70 65 65 64 0d 12 66 29 20 61 |er & Speed..f) a| 00003e00 64 64 20 20 20 72 30 2c 72 30 2c 23 31 20 20 20 |dd r0,r0,#1 | 00003e10 20 20 20 20 20 20 20 20 20 20 3b 43 6f 75 6e 74 | ;Count| 00003e20 65 72 2b 0d 12 70 35 20 63 6d 70 20 20 20 72 30 |er+..p5 cmp r0| 00003e30 2c 72 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |,r1 | 00003e40 20 20 20 3b 49 66 20 3e 3d 20 53 70 65 65 64 2c | ;If >= Speed,| 00003e50 20 74 68 65 6e 2e 2e 2e 0d 12 7a 4d 20 6d 6f 76 | then.....zM mov| 00003e60 48 73 20 72 30 2c 23 30 20 20 20 20 20 20 20 20 |Hs r0,#0 | 00003e70 20 20 20 20 20 20 20 20 3b 20 20 20 20 20 20 72 | ; r| 00003e80 65 73 65 74 20 43 6f 75 6e 74 65 72 20 20 20 20 |eset Counter | 00003e90 7c 20 48 53 2c 20 63 61 75 73 65 20 53 65 74 5f || HS, cause Set_| 00003ea0 53 70 65 65 64 0d 12 84 43 20 73 74 72 20 20 20 |Speed...C str | 00003eb0 72 30 2c 5b 72 31 31 2c 23 2d 38 5d 20 20 20 20 |r0,[r11,#-8] | 00003ec0 20 20 20 20 20 3b 20 20 20 20 20 20 20 20 20 20 | ; | 00003ed0 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 63 | | c| 00003ee0 6f 75 6c 64 20 73 65 74 0d 12 8e 4c 20 62 48 73 |ould set...L bHs| 00003ef0 20 20 20 76 70 6c 61 79 20 20 20 20 20 20 20 20 | vplay | 00003f00 20 20 20 20 20 20 20 20 3b 20 20 20 20 26 20 50 | ; & P| 00003f10 6c 61 79 20 6f 6e 65 20 72 6f 77 21 20 20 20 20 |lay one row! | 00003f20 7c 20 53 70 65 65 64 20 3c 20 43 6f 75 6e 74 65 || Speed < Counte| 00003f30 72 2e 2e 2e 0d 12 98 3f 20 62 6c 20 20 20 20 76 |r......? bl v| 00003f40 65 66 66 65 63 74 73 20 20 20 20 20 20 20 20 20 |effects | 00003f50 20 20 20 20 3b 57 65 6c 6c 2c 20 65 6c 73 65 20 | ;Well, else | 00003f60 73 75 70 70 6f 72 74 20 74 68 65 20 65 66 66 65 |support the effe| 00003f70 63 74 73 0d 12 a2 16 20 61 64 64 20 20 20 72 31 |cts.... add r1| 00003f80 32 2c 72 31 32 2c 23 33 32 0d 12 ac 23 20 62 6c |2,r12,#32...# bl| 00003f90 20 20 20 20 76 65 66 66 65 63 74 73 20 20 20 20 | veffects | 00003fa0 20 20 20 20 20 20 20 20 20 3b 32 2e 0d 12 b6 16 | ;2.....| 00003fb0 20 61 64 64 20 20 20 72 31 32 2c 72 31 32 2c 23 | add r12,r12,#| 00003fc0 33 32 0d 12 c0 23 20 62 6c 20 20 20 20 76 65 66 |32...# bl vef| 00003fd0 66 65 63 74 73 20 20 20 20 20 20 20 20 20 20 20 |fects | 00003fe0 20 20 3b 33 2e 0d 12 ca 16 20 61 64 64 20 20 20 | ;3..... add | 00003ff0 72 31 32 2c 72 31 32 2c 23 33 32 0d 12 d4 23 20 |r12,r12,#32...# | 00004000 62 6c 20 20 20 20 76 65 66 66 65 63 74 73 20 20 |bl veffects | 00004010 20 20 20 20 20 20 20 20 20 20 20 3b 34 2e 0d 12 | ;4...| 00004020 de 05 5d 0d 12 e8 0e e7 20 56 6f 63 73 3d 38 20 |..]..... Vocs=8 | 00004030 8c 0d 12 f2 0a 5b 4f 50 54 20 70 0d 12 fc 16 20 |.....[OPT p.... | 00004040 61 64 64 20 20 20 72 31 32 2c 72 31 32 2c 23 33 |add r12,r12,#3| 00004050 32 0d 13 06 23 20 62 6c 20 20 20 20 76 65 66 66 |2...# bl veff| 00004060 65 63 74 73 20 20 20 20 20 20 20 20 20 20 20 20 |ects | 00004070 20 3b 35 2e 0d 13 10 16 20 61 64 64 20 20 20 72 | ;5..... add r| 00004080 31 32 2c 72 31 32 2c 23 33 32 0d 13 1a 23 20 62 |12,r12,#32...# b| 00004090 6c 20 20 20 20 76 65 66 66 65 63 74 73 20 20 20 |l veffects | 000040a0 20 20 20 20 20 20 20 20 20 20 3b 36 2e 0d 13 24 | ;6...$| 000040b0 16 20 61 64 64 20 20 20 72 31 32 2c 72 31 32 2c |. add r12,r12,| 000040c0 23 33 32 0d 13 2e 23 20 62 6c 20 20 20 20 76 65 |#32...# bl ve| 000040d0 66 66 65 63 74 73 20 20 20 20 20 20 20 20 20 20 |ffects | 000040e0 20 20 20 3b 37 2e 0d 13 38 16 20 61 64 64 20 20 | ;7...8. add | 000040f0 20 72 31 32 2c 72 31 32 2c 23 33 32 0d 13 42 23 | r12,r12,#32..B#| 00004100 20 62 6c 20 20 20 20 76 65 66 66 65 63 74 73 20 | bl veffects | 00004110 20 20 20 20 20 20 20 20 20 20 20 20 3b 38 2e 0d | ;8..| 00004120 13 4c 05 5d 0d 13 56 05 cd 0d 13 60 0a 5b 4f 50 |.L.]..V....`.[OP| 00004130 54 20 70 0d 13 6a 27 20 6c 64 6d 66 64 20 72 31 |T p..j' ldmfd r1| 00004140 33 21 2c 7b 72 31 2d 72 31 31 2c 70 63 7d 20 20 |3!,{r1-r11,pc} | 00004150 20 20 20 3b 52 65 74 75 72 6e 0d 13 74 05 20 0d | ;Return..t. .| 00004160 13 7e 34 3b 2a 2a 2a 20 50 4c 41 59 20 ee 45 20 |.~4;*** PLAY .E | 00004170 50 41 54 54 45 52 4e 2d 50 4f 53 49 54 49 4f 4e |PATTERN-POSITION| 00004180 20 28 41 4c 4c 20 34 2f 38 20 43 48 41 4e 4e 45 | (ALL 4/8 CHANNE| 00004190 4c 53 29 0d 13 88 0a 2e 76 70 6c 61 79 0d 13 92 |LS).....vplay...| 000041a0 10 20 6d 6f 76 20 20 20 72 30 2c 23 31 0d 13 9c |. mov r0,#1...| 000041b0 3c 20 73 74 72 42 20 20 72 30 2c 49 6e 74 46 6c |< strB r0,IntFl| 000041c0 61 67 20 20 20 20 20 20 20 20 20 20 20 3b 53 65 |ag ;Se| 000041d0 74 20 46 69 6c 6c 65 72 2d 49 6e 74 65 72 75 70 |t Filler-Interup| 000041e0 74 65 64 2d 46 6c 61 67 21 0d 13 a6 17 20 61 64 |ted-Flag!.... ad| 000041f0 72 20 20 20 72 36 2c 52 65 67 69 73 74 65 72 73 |r r6,Registers| 00004200 0d 13 b0 39 20 6c 64 6d 49 61 20 72 36 2c 7b 72 |...9 ldmIa r6,{r| 00004210 37 2d 72 39 7d 20 20 20 20 20 20 20 20 20 20 20 |7-r9} | 00004220 3b 4c 6f 61 64 20 33 20 77 6f 72 6b 69 6e 67 20 |;Load 3 working | 00004230 72 65 67 69 73 74 65 72 73 0d 13 ba 14 20 61 64 |registers.... ad| 00004240 72 20 20 20 72 31 30 2c 54 72 61 63 6b 0d 13 c4 |r r10,Track...| 00004250 23 20 62 6c 20 20 20 20 76 63 68 61 6e 6e 65 6c |# bl vchannel| 00004260 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 31 2e | ;1.| 00004270 0d 13 ce 16 20 61 64 64 20 20 20 72 31 32 2c 72 |.... add r12,r| 00004280 31 32 2c 23 33 32 0d 13 d8 23 20 62 6c 20 20 20 |12,#32...# bl | 00004290 20 76 63 68 61 6e 6e 65 6c 20 20 20 20 20 20 20 | vchannel | 000042a0 20 20 20 20 20 20 3b 32 2e 0d 13 e2 16 20 61 64 | ;2..... ad| 000042b0 64 20 20 20 72 31 32 2c 72 31 32 2c 23 33 32 0d |d r12,r12,#32.| 000042c0 13 ec 23 20 62 6c 20 20 20 20 76 63 68 61 6e 6e |..# bl vchann| 000042d0 65 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 3b |el ;| 000042e0 33 2e 0d 13 f6 16 20 61 64 64 20 20 20 72 31 32 |3..... add r12| 000042f0 2c 72 31 32 2c 23 33 32 0d 14 00 23 20 62 6c 20 |,r12,#32...# bl | 00004300 20 20 20 76 63 68 61 6e 6e 65 6c 20 20 20 20 20 | vchannel | 00004310 20 20 20 20 20 20 20 20 3b 34 2e 0d 14 0a 05 5d | ;4.....]| 00004320 0d 14 14 0e e7 20 56 6f 63 73 3d 38 20 8c 0d 14 |..... Vocs=8 ...| 00004330 1e 0a 5b 4f 50 54 20 70 0d 14 28 16 20 61 64 64 |..[OPT p..(. add| 00004340 20 20 20 72 31 32 2c 72 31 32 2c 23 33 32 0d 14 | r12,r12,#32..| 00004350 32 23 20 62 6c 20 20 20 20 76 63 68 61 6e 6e 65 |2# bl vchanne| 00004360 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 35 |l ;5| 00004370 2e 0d 14 3c 16 20 61 64 64 20 20 20 72 31 32 2c |...<. add r12,| 00004380 72 31 32 2c 23 33 32 0d 14 46 23 20 62 6c 20 20 |r12,#32..F# bl | 00004390 20 20 76 63 68 61 6e 6e 65 6c 20 20 20 20 20 20 | vchannel | 000043a0 20 20 20 20 20 20 20 3b 36 2e 0d 14 50 16 20 61 | ;6...P. a| 000043b0 64 64 20 20 20 72 31 32 2c 72 31 32 2c 23 33 32 |dd r12,r12,#32| 000043c0 0d 14 5a 23 20 62 6c 20 20 20 20 76 63 68 61 6e |..Z# bl vchan| 000043d0 6e 65 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 |nel | 000043e0 3b 37 2e 0d 14 64 16 20 61 64 64 20 20 20 72 31 |;7...d. add r1| 000043f0 32 2c 72 31 32 2c 23 33 32 0d 14 6e 23 20 62 6c |2,r12,#32..n# bl| 00004400 20 20 20 20 76 63 68 61 6e 6e 65 6c 20 20 20 20 | vchannel | 00004410 20 20 20 20 20 20 20 20 20 3b 38 2e 0d 14 78 05 | ;8...x.| 00004420 5d 0d 14 82 05 cd 0d 14 8c 0a 5b 4f 50 54 20 70 |].........[OPT p| 00004430 0d 14 96 41 20 73 75 62 53 20 20 72 37 2c 72 37 |...A subS r7,r7| 00004440 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#1 | 00004450 3b 50 61 74 74 65 72 6e 5f 43 6f 75 6e 74 65 72 |;Pattern_Counter| 00004460 20 2d 20 31 2c 20 69 73 20 69 74 20 7a 65 72 6f | - 1, is it zero| 00004470 3f 0d 14 a0 31 20 73 74 6d 4e 65 49 61 20 72 36 |?...1 stmNeIa r6| 00004480 2c 7b 72 37 2d 72 38 7d 20 20 20 20 20 20 20 20 |,{r7-r8} | 00004490 20 3b 4e 6f 74 20 7a 65 72 6f 20 79 65 74 2c 20 | ;Not zero yet, | 000044a0 73 6f 0d 14 aa 48 20 6c 64 6d 4e 65 46 64 20 72 |so...H ldmNeFd r| 000044b0 31 33 21 2c 7b 72 31 2d 72 31 31 2c 70 63 7d 20 |13!,{r1-r11,pc} | 000044c0 20 20 3b 20 64 6f 6e 27 74 20 70 6c 61 79 20 6e | ; don't play n| 000044d0 65 77 20 50 61 74 74 65 72 6e 2c 20 52 65 74 75 |ew Pattern, Retu| 000044e0 72 6e 20 69 6e 73 74 65 61 64 0d 14 b4 48 20 6d |rn instead...H m| 000044f0 6f 76 20 20 20 72 37 2c 23 36 34 20 20 20 20 20 |ov r7,#64 | 00004500 20 20 20 20 20 20 20 20 20 20 3b 57 65 6c 6c 2c | ;Well,| 00004510 20 6e 65 77 20 50 61 74 74 65 72 6e 20 62 65 67 | new Pattern beg| 00004520 69 6e 73 2c 20 77 69 74 68 20 43 6f 75 6e 74 3d |ins, with Count=| 00004530 36 34 0d 14 be 39 20 6c 64 72 42 20 20 72 30 2c |64...9 ldrB r0,| 00004540 5b 72 39 2c 23 31 5d 21 20 20 20 20 20 20 20 20 |[r9,#1]! | 00004550 20 20 3b 41 6e 64 20 67 65 74 20 6e 65 78 74 20 | ;And get next | 00004560 50 61 74 74 65 72 6e 20 4e 72 2e 0d 14 c8 31 20 |Pattern Nr....1 | 00004570 63 6d 70 20 20 20 72 30 2c 23 26 66 66 20 20 20 |cmp r0,#&ff | 00004580 20 20 20 20 20 20 20 20 20 20 20 3b 45 6e 64 20 | ;End | 00004590 6f 66 20 53 65 71 75 65 6e 63 65 3f 0d 14 d2 41 |of Sequence?...A| 000045a0 20 6c 64 72 45 71 20 72 39 2c 5b 72 31 30 2c 23 | ldrEq r9,[r10,#| 000045b0 32 34 5d 20 20 20 20 20 20 20 20 20 3b 20 59 65 |24] ; Ye| 000045c0 61 68 20 2d 3e 20 52 65 73 65 74 20 53 65 71 75 |ah -> Reset Sequ| 000045d0 65 6e 63 65 20 50 6f 69 6e 74 65 72 2c 0d 14 dc |ence Pointer,...| 000045e0 42 20 6c 64 72 45 71 42 20 30 2c 5b 72 39 5d 20 |B ldrEqB 0,[r9] | 000045f0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 | ; | 00004600 20 20 20 20 20 20 20 74 68 61 74 20 6d 65 61 6e | that mean| 00004610 73 20 72 65 73 74 61 72 74 20 53 6f 6e 67 21 0d |s restart Song!.| 00004620 14 e6 35 20 6c 64 72 20 20 20 72 38 2c 5b 72 31 |..5 ldr r8,[r1| 00004630 30 2c 23 32 38 5d 20 20 20 20 20 20 20 20 20 3b |0,#28] ;| 00004640 41 64 64 72 65 73 73 20 50 61 74 74 65 72 6e 73 |Address Patterns| 00004650 74 61 72 74 0d 14 f0 3e 20 61 64 64 20 20 20 72 |tart...> add r| 00004660 38 2c 72 38 2c 72 30 2c 6c 73 6c 23 31 30 2d 28 |8,r8,r0,lsl#10-(| 00004670 56 6f 63 73 3d 38 29 20 20 20 20 3b 2b 20 4e 72 |Vocs=8) ;+ Nr| 00004680 2a 31 30 32 34 20 28 6f 72 20 4e 72 2a 32 30 34 |*1024 (or Nr*204| 00004690 38 29 0d 14 fa 15 20 73 74 6d 49 61 20 72 36 2c |8).... stmIa r6,| 000046a0 7b 72 37 2d 72 39 7d 0d 15 04 27 20 6c 64 6d 66 |{r7-r9}...' ldmf| 000046b0 64 20 72 31 33 21 2c 7b 72 31 2d 72 31 31 2c 70 |d r13!,{r1-r11,p| 000046c0 63 7d 20 20 20 20 20 3b 52 65 74 75 72 6e 0d 15 |c} ;Return..| 000046d0 0e 2f 3b 2a 2a 2a 20 53 55 50 50 4c 59 20 ee 45 |./;*** SUPPLY .E| 000046e0 20 43 48 41 4e 4e 45 4c 20 57 49 54 48 20 c7 96 | CHANNEL WITH ..| 000046f0 20 49 4e 46 4f 52 4d 41 54 49 4f 4e 53 0d 15 18 | INFORMATIONS...| 00004700 0d 2e 76 63 68 61 6e 6e 65 6c 0d 15 22 48 20 6c |..vchannel.."H l| 00004710 64 72 20 20 20 72 31 2c 5b 72 38 5d 2c 23 34 20 |dr r1,[r8],#4 | 00004720 20 20 20 20 20 20 20 20 20 20 3b 50 61 74 74 65 | ;Patte| 00004730 72 6e 20 4c 57 6f 72 64 20 6f 66 20 63 75 72 72 |rn LWord of curr| 00004740 65 6e 74 20 50 61 74 74 5f 50 6f 73 20 26 20 49 |ent Patt_Pos & I| 00004750 4e 43 0d 15 2c 2f 20 6c 64 72 42 20 20 72 32 2c |NC..,/ ldrB r2,| 00004760 5b 72 31 32 2c 23 33 30 5d 20 20 20 20 20 20 20 |[r12,#30] | 00004770 20 20 3b 49 73 20 53 6f 75 6e 64 46 58 20 6f 6e | ;Is SoundFX on| 00004780 3f 0d 15 36 10 20 63 6d 70 20 20 20 72 32 2c 23 |?..6. cmp r2,#| 00004790 30 0d 15 40 26 20 62 45 71 20 20 20 76 72 75 6c |0..@& bEq vrul| 000047a0 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 000047b0 20 3b 4e 6f 2e 2e 2e 0d 15 4a 16 20 6c 64 72 20 | ;No.....J. ldr | 000047c0 20 20 72 32 2c 5b 72 31 32 2c 23 34 5d 0d 15 54 | r2,[r12,#4]..T| 000047d0 41 20 63 6d 70 20 20 20 72 32 2c 23 30 20 20 20 |A cmp r2,#0 | 000047e0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 59 65 | ;Ye| 000047f0 73 2c 20 62 75 74 20 69 73 20 73 61 6d 70 6c 65 |s, but is sample| 00004800 20 73 74 69 6c 6c 20 61 63 74 69 76 65 3f 0d 15 | still active?..| 00004810 5e 31 20 73 74 72 45 71 42 20 32 2c 5b 72 31 32 |^1 strEqB 2,[r12| 00004820 2c 23 33 30 5d 20 20 20 20 20 20 20 20 20 3b 4e |,#30] ;N| 00004830 6f 2c 20 73 6f 20 63 61 6e 63 65 6c 20 46 58 0d |o, so cancel FX.| 00004840 15 68 11 20 6d 6f 76 20 20 20 70 63 2c 72 31 34 |.h. mov pc,r14| 00004850 0d 15 72 0a 2e 76 72 75 6c 65 0d 15 7c 3b 20 6d |..r..vrule..|; m| 00004860 6f 76 53 20 20 72 30 2c 72 31 2c 6c 73 72 23 32 |ovS r0,r1,lsr#2| 00004870 34 20 20 20 20 20 20 20 20 20 3b 49 73 6f 6c 61 |4 ;Isola| 00004880 74 65 20 54 6f 6e 65 20 26 20 49 73 20 69 74 20 |te Tone & Is it | 00004890 7a 65 72 6f 3f 0d 15 86 46 20 62 45 71 20 20 20 |zero?...F bEq | 000048a0 76 63 6f 6d 6d 73 20 20 20 20 20 20 20 20 20 20 |vcomms | 000048b0 20 20 20 20 20 3b 4e 6f 20 54 6f 6e 65 20 2d 3e | ;No Tone ->| 000048c0 20 50 65 72 68 61 70 73 20 73 74 69 6c 6c 20 61 | Perhaps still a| 000048d0 20 43 6f 6d 6d 61 6e 64 2e 2e 2e 0d 15 90 4b 20 | Command......K | 000048e0 73 74 72 42 20 20 72 30 2c 5b 72 31 32 2c 23 33 |strB r0,[r12,#3| 000048f0 31 5d 20 20 20 20 20 20 20 20 20 3b 53 74 6f 72 |1] ;Stor| 00004900 65 20 6c 65 67 61 6c 20 54 6f 6e 65 20 66 6f 72 |e legal Tone for| 00004910 20 70 6f 73 73 2e 20 41 72 70 65 67 67 69 6f 20 | poss. Arpeggio | 00004920 65 66 66 65 63 74 0d 15 9a 49 20 6c 64 72 20 20 |effect...I ldr | 00004930 20 72 30 2c 5b 72 31 31 2c 72 30 2c 6c 73 6c 23 | r0,[r11,r0,lsl#| 00004940 32 5d 20 20 20 20 3b 47 65 74 20 65 71 75 69 76 |2] ;Get equiv| 00004950 61 6c 65 6e 74 20 46 72 65 71 75 65 6e 63 79 20 |alent Frequency | 00004960 66 72 6f 6d 20 72 31 31 3d 66 54 61 62 6c 65 0d |from r11=fTable.| 00004970 15 a4 2c 20 73 74 72 20 20 20 72 30 2c 5b 72 31 |.., str r0,[r1| 00004980 32 2c 23 34 5d 20 20 20 20 20 20 20 20 20 20 3b |2,#4] ;| 00004990 45 6e 74 65 72 20 50 69 74 63 68 0d 15 ae 3f 20 |Enter Pitch...? | 000049a0 61 6e 64 53 20 20 72 30 2c 72 31 2c 23 26 66 66 |andS r0,r1,#&ff| 000049b0 20 3c 3c 31 36 20 20 20 20 20 20 3b 49 73 6f 6c | <<16 ;Isol| 000049c0 61 74 65 20 49 6e 73 74 72 75 6d 65 6e 74 2d 42 |ate Instrument-B| 000049d0 79 74 65 2c 20 7a 65 72 6f 3f 0d 15 b8 49 20 6c |yte, zero?...I l| 000049e0 64 72 45 71 20 72 30 2c 5b 72 31 32 2c 23 32 30 |drEq r0,[r12,#20| 000049f0 5d 20 20 20 20 20 20 20 20 20 3b 20 59 20 2d 3e |] ; Y ->| 00004a00 20 47 65 74 20 6f 6c 64 20 52 65 70 41 74 20 28 | Get old RepAt (| 00004a10 70 65 72 68 61 70 73 20 61 20 52 65 70 54 6f 6e |perhaps a RepTon| 00004a20 65 21 29 0d 15 c2 4c 20 73 74 72 45 71 20 72 30 |e!)...L strEq r0| 00004a30 2c 5b 72 31 32 2c 23 30 30 5d 20 20 20 20 20 20 |,[r12,#00] | 00004a40 20 20 20 3b 20 20 20 20 26 20 53 65 74 20 61 73 | ; & Set as| 00004a50 20 6e 65 77 20 50 6f 73 20 28 73 61 6d 65 20 49 | new Pos (same I| 00004a60 6e 73 74 20 6f 6e 63 65 20 61 67 61 69 6e 29 0d |nst once again).| 00004a70 15 cc 11 20 62 45 71 20 20 20 76 63 6f 6d 6d 73 |... bEq vcomms| 00004a80 0d 15 d6 47 20 20 20 20 20 20 20 20 20 20 20 20 |...G | 00004a90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004aa0 3b 45 6c 73 65 20 70 6f 69 6e 74 20 74 6f 20 49 |;Else point to I| 00004ab0 6e 73 74 50 6f 6f 6c 20 3d 20 54 72 61 63 6b 2b |nstPool = Track+| 00004ac0 49 6e 73 74 2a 33 32 0d 15 e0 4d 20 61 64 64 20 |Inst*32...M add | 00004ad0 20 20 72 32 2c 72 31 30 2c 72 30 2c 6c 73 72 23 | r2,r10,r0,lsr#| 00004ae0 31 31 20 20 20 20 20 3b 6c 73 72 23 31 36 20 66 |11 ;lsr#16 f| 00004af0 6f 72 20 6c 6f 77 62 79 74 65 20 26 20 6c 73 6c |or lowbyte & lsl| 00004b00 23 35 20 66 6f 72 20 2a 33 32 20 3d 3e 20 6c 73 |#5 for *32 => ls| 00004b10 72 23 31 31 0d 15 ea 42 20 6c 64 6d 49 61 20 72 |r#11...B ldmIa r| 00004b20 32 2c 7b 72 30 2c 72 32 2d 72 35 7d 20 20 20 20 |2,{r0,r2-r5} | 00004b30 20 20 20 20 3b 52 65 61 64 20 61 6c 6c 20 35 20 | ;Read all 5 | 00004b40 49 6e 73 74 50 6f 6f 6c 20 57 6f 72 64 73 20 61 |InstPool Words a| 00004b50 74 20 6f 6e 63 65 0d 15 f4 35 20 73 74 72 20 20 |t once...5 str | 00004b60 20 72 30 2c 5b 72 31 32 2c 23 20 38 5d 20 20 20 | r0,[r12,# 8] | 00004b70 20 20 20 20 20 20 3b 45 6e 74 65 72 20 53 61 6d | ;Enter Sam| 00004b80 70 6c 65 20 41 64 64 72 65 73 73 0d 15 fe 2d 20 |ple Address...- | 00004b90 73 74 72 20 20 20 72 33 2c 5b 72 31 32 2c 23 31 |str r3,[r12,#1| 00004ba0 36 5d 20 20 20 20 20 20 20 20 20 3b 45 6e 74 65 |6] ;Ente| 00004bb0 72 20 56 6f 6c 75 6d 65 0d 16 08 4c 20 6d 6f 76 |r Volume...L mov| 00004bc0 53 20 20 72 30 2c 72 34 2c 6c 73 6c 23 31 36 20 |S r0,r4,lsl#16 | 00004bd0 20 20 20 20 20 20 20 20 3b 50 6f 73 3d 52 65 70 | ;Pos=Rep| 00004be0 41 74 20 28 69 6e 20 31 36 2d 66 69 78 70 6f 69 |At (in 16-fixpoi| 00004bf0 6e 74 29 2c 20 62 75 74 20 69 73 20 69 74 20 7a |nt), but is it z| 00004c00 65 72 6f 3f 0d 16 12 4c 20 61 64 64 4e 65 20 72 |ero?...L addNe r| 00004c10 32 2c 72 34 2c 72 35 20 20 20 20 20 20 20 20 20 |2,r4,r5 | 00004c20 20 20 20 20 3b 20 4e 6f 20 2d 3e 20 4c 65 6e 20 | ; No -> Len | 00004c30 28 61 62 73 6f 6c 75 74 65 20 66 72 6f 6d 20 30 |(absolute from 0| 00004c40 29 20 3d 20 52 65 70 41 74 2b 52 65 70 4c 65 6e |) = RepAt+RepLen| 00004c50 0d 16 1c 4a 20 6d 6f 76 4e 65 20 72 34 2c 72 30 |...J movNe r4,r0| 00004c60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004c70 3b 20 20 20 20 2d 3e 20 48 65 61 64 20 4f 66 66 |; -> Head Off| 00004c80 73 65 74 20 52 65 70 41 74 20 3d 20 66 69 78 70 |set RepAt = fixp| 00004c90 6f 69 6e 74 20 52 65 70 41 74 0d 16 26 2a 20 73 |oint RepAt..&* s| 00004ca0 74 72 20 20 20 72 30 2c 5b 72 31 32 2c 23 20 30 |tr r0,[r12,# 0| 00004cb0 5d 20 20 20 20 20 20 20 20 20 3b 45 6e 74 65 72 |] ;Enter| 00004cc0 20 50 6f 73 0d 16 30 2d 20 73 74 72 20 20 20 72 | Pos..0- str r| 00004cd0 32 2c 5b 72 31 32 2c 23 31 32 5d 20 20 20 20 20 |2,[r12,#12] | 00004ce0 20 20 20 20 3b 45 6e 74 65 72 20 4c 65 6e 67 74 | ;Enter Lengt| 00004cf0 68 0d 16 3a 2c 20 73 74 72 20 20 20 72 34 2c 5b |h..:, str r4,[| 00004d00 72 31 32 2c 23 32 30 5d 20 20 20 20 20 20 20 20 |r12,#20] | 00004d10 20 3b 45 6e 74 65 72 20 52 65 70 41 74 0d 16 44 | ;Enter RepAt..D| 00004d20 0b 2e 76 63 6f 6d 6d 73 0d 16 4e 43 20 61 6e 64 |..vcomms..NC and| 00004d30 20 20 20 72 30 2c 72 31 2c 23 26 30 66 20 3c 3c | r0,r1,#&0f <<| 00004d40 38 20 20 20 20 20 20 20 3b 49 73 6f 6c 61 74 65 |8 ;Isolate| 00004d50 20 43 6f 6d 6d 61 6e 64 2d 4e 69 62 62 6c 65 20 | Command-Nibble | 00004d60 66 72 6f 6d 20 44 61 74 61 4c 57 0d 16 58 31 20 |from DataLW..X1 | 00004d70 61 6e 64 20 20 20 72 32 2c 72 31 2c 23 26 66 66 |and r2,r1,#&ff| 00004d80 20 20 20 20 20 20 20 20 20 20 20 3b 49 73 6f 6c | ;Isol| 00004d90 61 74 65 20 49 6e 66 6f 42 79 74 65 0d 16 62 4d |ate InfoByte..bM| 00004da0 20 6c 64 72 20 20 20 72 33 2c 5b 70 63 2c 72 30 | ldr r3,[pc,r0| 00004db0 2c 6c 73 72 23 36 5d 20 20 20 20 20 3b 6c 73 72 |,lsr#6] ;lsr| 00004dc0 23 38 20 66 6f 72 20 4e 69 62 62 6c 65 20 69 6e |#8 for Nibble in| 00004dd0 74 6f 20 6c 6f 77 62 79 74 65 20 26 20 6c 73 6c |to lowbyte & lsl| 00004de0 23 32 20 66 6f 72 20 2a 34 0d 16 6c 13 20 61 64 |#2 for *4..l. ad| 00004df0 64 20 20 20 70 63 2c 70 63 2c 72 33 0d 16 76 2c |d pc,pc,r3..v,| 00004e00 20 64 63 64 20 20 20 76 65 66 2d 76 6f 66 32 20 | dcd vef-vof2 | 00004e10 20 20 20 20 20 20 20 20 20 20 20 20 3b 45 66 66 | ;Eff| 00004e20 65 63 74 73 20 30 2e 2e 0d 16 80 09 2e 76 6f 66 |ects 0.......vof| 00004e30 32 0d 16 8a 22 20 64 63 64 20 20 20 76 65 66 2d |2..." dcd vef-| 00004e40 76 6f 66 32 20 20 20 20 20 20 20 20 20 20 20 20 |vof2 | 00004e50 20 3b 31 0d 16 94 22 20 64 63 64 20 20 20 76 65 | ;1..." dcd ve| 00004e60 66 2d 76 6f 66 32 20 20 20 20 20 20 20 20 20 20 |f-vof2 | 00004e70 20 20 20 3b 32 0d 16 9e 22 20 64 63 64 20 20 20 | ;2..." dcd | 00004e80 76 65 66 2d 76 6f 66 32 20 20 20 20 20 20 20 20 |vef-vof2 | 00004e90 20 20 20 20 20 3b 33 0d 16 a8 22 20 64 63 64 20 | ;3..." dcd | 00004ea0 20 20 76 65 66 2d 76 6f 66 32 20 20 20 20 20 20 | vef-vof2 | 00004eb0 20 20 20 20 20 20 20 3b 34 0d 16 b2 22 20 64 63 | ;4..." dc| 00004ec0 64 20 20 20 76 65 66 2d 76 6f 66 32 20 20 20 20 |d vef-vof2 | 00004ed0 20 20 20 20 20 20 20 20 20 3b 35 0d 16 bc 22 20 | ;5..." | 00004ee0 64 63 64 20 20 20 76 65 66 2d 76 6f 66 32 20 20 |dcd vef-vof2 | 00004ef0 20 20 20 20 20 20 20 20 20 20 20 3b 36 0d 16 c6 | ;6...| 00004f00 34 20 64 63 64 20 20 20 76 73 74 65 72 65 6f 70 |4 dcd vstereop| 00004f10 6f 73 2d 76 6f 66 32 20 20 20 20 20 20 3b 20 37 |os-vof2 ; 7| 00004f20 20 3d 20 53 65 74 20 53 74 65 72 65 6f 20 50 6f | = Set Stereo Po| 00004f30 73 0d 16 d0 34 20 64 63 64 20 20 20 76 61 75 74 |s...4 dcd vaut| 00004f40 6f 76 6f 6c 75 70 2d 76 6f 66 32 20 20 20 20 20 |ovolup-vof2 | 00004f50 20 3b 20 38 20 3d 20 41 75 74 6f 20 56 6f 6c 75 | ; 8 = Auto Volu| 00004f60 6d 65 20 75 70 0d 16 da 36 20 64 63 64 20 20 20 |me up...6 dcd | 00004f70 76 61 75 74 6f 76 6f 6c 64 6f 77 6e 2d 76 6f 66 |vautovoldown-vof| 00004f80 32 20 20 20 20 3b 20 39 20 3d 20 41 75 74 6f 20 |2 ; 9 = Auto | 00004f90 56 6f 6c 75 6d 65 20 64 6f 77 6e 0d 16 e4 33 20 |Volume down...3 | 00004fa0 64 63 64 20 20 20 76 61 75 74 6f 61 72 63 75 70 |dcd vautoarcup| 00004fb0 2d 76 6f 66 32 20 20 20 20 20 20 3b 20 41 20 3d |-vof2 ; A =| 00004fc0 20 41 75 74 6f 20 50 69 74 63 68 20 75 70 0d 16 | Auto Pitch up..| 00004fd0 ee 35 20 64 63 64 20 20 20 76 61 75 74 6f 61 72 |.5 dcd vautoar| 00004fe0 63 64 6f 77 6e 2d 76 6f 66 32 20 20 20 20 3b 20 |cdown-vof2 ; | 00004ff0 42 20 3d 20 41 75 74 6f 20 50 69 74 63 68 20 64 |B = Auto Pitch d| 00005000 6f 77 6e 0d 16 f8 30 20 64 63 64 20 20 20 76 73 |own...0 dcd vs| 00005010 65 74 76 6f 6c 2d 76 6f 66 32 20 20 20 20 20 20 |etvol-vof2 | 00005020 20 20 20 3b 20 43 20 3d 20 53 65 74 20 56 6f 6c | ; C = Set Vol| 00005030 75 6d 65 0d 17 02 33 20 64 63 64 20 20 20 76 70 |ume...3 dcd vp| 00005040 61 74 74 62 72 65 61 6b 2d 76 6f 66 32 20 20 20 |attbreak-vof2 | 00005050 20 20 20 3b 20 44 20 3d 20 50 61 74 74 65 72 6e | ; D = Pattern| 00005060 20 42 72 65 61 6b 0d 17 0c 34 20 64 63 64 20 20 | Break...4 dcd | 00005070 20 76 6e 6f 70 2d 76 6f 66 32 20 20 20 20 20 20 | vnop-vof2 | 00005080 20 20 20 20 20 20 3b 20 45 20 3d 20 28 4e 6f 74 | ; E = (Not| 00005090 20 75 73 65 64 20 79 65 74 29 0d 17 16 2f 20 64 | used yet).../ d| 000050a0 63 64 20 20 20 76 73 65 74 73 70 65 65 64 2d 76 |cd vsetspeed-v| 000050b0 6f 66 32 20 20 20 20 20 20 20 3b 20 46 20 3d 20 |of2 ; F = | 000050c0 53 65 74 20 53 70 65 65 64 0d 17 20 4d 2e 76 65 |Set Speed.. M.ve| 000050d0 66 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |f | 000050e0 20 20 20 20 20 20 20 20 20 3b 45 66 66 65 63 74 | ;Effect| 000050f0 73 2c 20 6e 65 65 64 6e 27 74 20 74 6f 20 62 65 |s, needn't to be| 00005100 20 64 6f 6e 65 20 68 65 72 65 2c 20 62 75 74 20 | done here, but | 00005110 6c 61 74 65 72 21 0d 17 2a 3c 20 73 74 72 42 20 |later!..*< strB | 00005120 20 72 32 2c 5b 72 31 32 2c 23 32 38 5d 20 20 20 | r2,[r12,#28] | 00005130 20 20 20 20 20 20 3b 53 74 6f 72 65 20 49 6e 66 | ;Store Inf| 00005140 6f 42 79 74 65 2c 20 66 6f 72 20 45 66 66 65 63 |oByte, for Effec| 00005150 74 73 0d 17 34 16 20 6d 6f 76 20 20 20 72 30 2c |ts..4. mov r0,| 00005160 72 30 2c 6c 73 72 23 38 0d 17 3e 3c 20 73 74 72 |r0,lsr#8..>< str| 00005170 42 20 20 72 30 2c 5b 72 31 32 2c 23 32 39 5d 20 |B r0,[r12,#29] | 00005180 20 20 20 20 20 20 20 20 3b 53 74 6f 72 65 20 43 | ;Store C| 00005190 6f 6d 6d 42 79 74 65 2c 20 66 6f 72 20 45 66 66 |ommByte, for Eff| 000051a0 65 63 74 73 0d 17 48 09 2e 76 6e 6f 70 0d 17 52 |ects..H..vnop..R| 000051b0 2b 20 6d 6f 76 20 20 20 70 63 2c 72 31 34 20 20 |+ mov pc,r14 | 000051c0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 61 6e | ;an| 000051d0 64 20 72 65 74 75 72 6e 0d 17 5c 0f 2e 76 73 74 |d return..\..vst| 000051e0 65 72 65 6f 70 6f 73 0d 17 66 4d 20 61 64 72 20 |ereopos..fM adr | 000051f0 20 20 72 30 2c 48 65 61 64 20 20 20 20 20 20 20 | r0,Head | 00005200 20 20 20 20 20 20 20 3b 47 65 74 20 63 75 72 72 | ;Get curr| 00005210 65 6e 74 20 63 68 61 6e 6e 65 6c 20 6e 75 6d 62 |ent channel numb| 00005220 65 72 20 28 6c 69 74 74 6c 65 20 4f 76 65 72 68 |er (little Overh| 00005230 65 61 64 29 0d 17 70 14 20 73 75 62 20 20 20 72 |ead)..p. sub r| 00005240 30 2c 72 31 32 2c 72 30 0d 17 7a 35 20 6d 6f 76 |0,r12,r0..z5 mov| 00005250 20 20 20 72 30 2c 72 30 2c 6c 73 72 23 33 20 20 | r0,r0,lsr#3 | 00005260 20 20 20 20 20 20 20 20 3b 81 20 38 3b 20 3d 3e | ;. 8; =>| 00005270 20 30 2c 34 2c 38 2c 31 32 2c 2e 2e 2e 0d 17 84 | 0,4,8,12,......| 00005280 12 20 63 6d 70 20 20 20 72 30 2c 23 37 2a 34 0d |. cmp r0,#7*4.| 00005290 17 8e 45 20 6d 6f 76 45 71 20 72 31 2c 20 20 20 |..E movEq r1, | 000052a0 23 26 36 30 20 20 20 20 20 20 20 20 20 20 20 3b |#&60 ;| 000052b0 53 74 65 72 65 6f 20 49 6d 61 67 65 20 52 65 67 |Stereo Image Reg| 000052c0 69 73 74 65 72 20 20 20 37 20 20 3d 20 41 64 72 |ister 7 = Adr| 000052d0 20 26 36 30 0d 17 98 4d 20 61 64 64 4e 65 20 72 | &60...M addNe r| 000052e0 31 2c 72 30 2c 23 26 36 34 20 20 20 20 20 20 20 |1,r0,#&64 | 000052f0 20 20 20 20 3b 53 74 65 72 65 6f 20 49 6d 61 67 | ;Stereo Imag| 00005300 65 20 52 65 67 69 73 74 65 72 73 20 30 2d 36 20 |e Registers 0-6 | 00005310 3d 20 41 64 72 20 26 36 34 20 75 70 77 61 72 64 |= Adr &64 upward| 00005320 73 0d 17 a2 17 20 6d 6f 76 20 20 20 72 31 2c 72 |s.... mov r1,r| 00005330 31 2c 6c 73 6c 23 32 34 0d 17 ac 13 20 6f 72 72 |1,lsl#24.... orr| 00005340 20 20 20 72 31 2c 72 31 2c 72 32 0d 17 b6 17 20 | r1,r1,r2.... | 00005350 6d 6f 76 20 20 20 72 32 2c 23 26 33 34 30 30 30 |mov r2,#&34000| 00005360 30 30 0d 17 c0 12 20 73 74 72 20 20 20 72 31 2c |00.... str r1,| 00005370 5b 72 32 5d 0d 17 ca 05 5d 0d 17 d4 0e e7 20 56 |[r2]....]..... V| 00005380 6f 63 73 3d 34 20 8c 0d 17 de 0a 5b 4f 50 54 20 |ocs=4 .....[OPT | 00005390 70 0d 17 e8 39 20 63 6d 70 20 20 20 72 30 2c 23 |p...9 cmp r0,#| 000053a0 33 2a 34 20 20 20 20 20 20 20 20 20 20 20 20 20 |3*4 | 000053b0 20 3b 45 78 74 72 61 20 41 64 72 20 6f 66 20 49 | ;Extra Adr of I| 000053c0 6d 61 67 65 20 52 65 67 20 37 0d 17 f2 19 20 73 |mage Reg 7.... s| 000053d0 75 62 45 71 20 72 31 2c 72 31 2c 23 26 31 30 3c |ubEq r1,r1,#&10<| 000053e0 3c 32 34 0d 17 fc 41 20 61 64 64 4e 65 20 72 31 |<24...A addNe r1| 000053f0 2c 72 31 2c 23 26 31 30 3c 3c 32 34 20 20 20 20 |,r1,#&10<<24 | 00005400 20 20 20 3b 57 65 6c 6c 2c 20 73 65 74 20 75 70 | ;Well, set up| 00005410 20 74 77 69 6e 20 49 6d 61 67 65 20 52 65 67 20 | twin Image Reg | 00005420 74 6f 6f 21 0d 18 06 12 20 73 74 72 20 20 20 72 |too!.... str r| 00005430 31 2c 5b 72 32 5d 0d 18 10 05 5d 0d 18 1a 05 cd |1,[r2]....].....| 00005440 0d 18 24 0a 5b 4f 50 54 20 70 0d 18 2e 11 20 6d |..$.[OPT p.... m| 00005450 6f 76 20 20 20 70 63 2c 72 31 34 0d 18 38 0f 2e |ov pc,r14..8..| 00005460 76 61 75 74 6f 76 6f 6c 75 70 0d 18 42 17 20 73 |vautovolup..B. s| 00005470 74 72 42 20 20 72 32 2c 5b 72 31 32 2c 23 32 34 |trB r2,[r12,#24| 00005480 5d 0d 18 4c 11 20 6d 6f 76 20 20 20 70 63 2c 72 |]..L. mov pc,r| 00005490 31 34 0d 18 56 11 2e 76 61 75 74 6f 76 6f 6c 64 |14..V..vautovold| 000054a0 6f 77 6e 0d 18 60 17 20 73 74 72 42 20 20 72 32 |own..`. strB r2| 000054b0 2c 5b 72 31 32 2c 23 32 35 5d 0d 18 6a 11 20 6d |,[r12,#25]..j. m| 000054c0 6f 76 20 20 20 70 63 2c 72 31 34 0d 18 74 0f 2e |ov pc,r14..t..| 000054d0 76 61 75 74 6f 61 72 63 75 70 0d 18 7e 17 20 73 |vautoarcup..~. s| 000054e0 74 72 42 20 20 72 32 2c 5b 72 31 32 2c 23 32 36 |trB r2,[r12,#26| 000054f0 5d 0d 18 88 11 20 6d 6f 76 20 20 20 70 63 2c 72 |].... mov pc,r| 00005500 31 34 0d 18 92 11 2e 76 61 75 74 6f 61 72 63 64 |14.....vautoarcd| 00005510 6f 77 6e 0d 18 9c 17 20 73 74 72 42 20 20 72 32 |own.... strB r2| 00005520 2c 5b 72 31 32 2c 23 32 37 5d 0d 18 a6 11 20 6d |,[r12,#27].... m| 00005530 6f 76 20 20 20 70 63 2c 72 31 34 0d 18 b0 0c 2e |ov pc,r14.....| 00005540 76 73 65 74 76 6f 6c 0d 18 ba 3d 20 73 74 72 20 |vsetvol...= str | 00005550 20 20 72 32 2c 5b 72 31 32 2c 23 31 36 5d 20 20 | r2,[r12,#16] | 00005560 20 20 20 20 20 20 20 3b 45 6e 74 65 72 20 6e 65 | ;Enter ne| 00005570 77 20 56 6f 6c 75 6d 65 20 69 6e 74 6f 20 48 65 |w Volume into He| 00005580 61 64 65 72 0d 18 c4 11 20 6d 6f 76 20 20 20 70 |ader.... mov p| 00005590 63 2c 72 31 34 0d 18 ce 0f 2e 76 70 61 74 74 62 |c,r14.....vpattb| 000055a0 72 65 61 6b 0d 18 d8 45 20 6d 6f 76 20 20 20 72 |reak...E mov r| 000055b0 37 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |7,#1 | 000055c0 20 20 20 20 3b 4a 75 6d 70 20 74 6f 20 65 6e 64 | ;Jump to end| 000055d0 20 6f 66 20 50 61 74 74 2c 20 69 65 20 50 61 74 | of Patt, ie Pat| 000055e0 74 5f 43 6f 75 6e 74 3d 31 0d 18 e2 11 20 6d 6f |t_Count=1.... mo| 000055f0 76 20 20 20 70 63 2c 72 31 34 0d 18 ec 0e 2e 76 |v pc,r14.....v| 00005600 73 65 74 73 70 65 65 64 0d 18 f6 39 20 73 74 72 |setspeed...9 str| 00005610 20 20 20 72 32 2c 56 73 70 65 65 64 20 20 20 20 | r2,Vspeed | 00005620 20 20 20 20 20 20 20 20 3b 53 65 74 20 6e 65 77 | ;Set new| 00005630 20 28 6f 76 65 72 61 6c 6c 2d 29 20 53 70 65 65 | (overall-) Spee| 00005640 64 0d 19 00 11 20 6d 6f 76 20 20 20 70 63 2c 72 |d.... mov pc,r| 00005650 31 34 0d 19 0a 13 3b 3d 3d 3d 3d 20 dc 42 41 59 |14....;==== .BAY| 00005660 20 3d 3d 3d 3d 0d 19 14 3e 2e 52 65 67 69 73 74 | ====...>.Regist| 00005670 65 72 73 20 20 20 20 64 63 64 20 36 34 20 20 20 |ers dcd 64 | 00005680 20 20 20 20 20 3b 20 72 37 20 50 61 74 74 65 72 | ; r7 Patter| 00005690 6e 5f 43 6f 75 6e 74 65 72 20 28 36 34 20 2d 3e |n_Counter (64 ->| 000056a0 20 31 29 0d 19 1e 43 20 20 20 20 20 20 20 20 20 | 1)...C | 000056b0 20 20 20 20 20 64 63 64 20 30 30 20 20 20 20 20 | dcd 00 | 000056c0 20 20 20 3b 20 72 38 20 43 75 72 72 65 6e 74 20 | ; r8 Current | 000056d0 50 6f 69 6e 74 65 72 20 69 6e 20 74 68 65 20 50 |Pointer in the P| 000056e0 61 74 74 65 72 6e 0d 19 28 44 20 20 20 20 20 20 |attern..(D | 000056f0 20 20 20 20 20 20 20 20 64 63 64 20 30 30 20 20 | dcd 00 | 00005700 20 20 20 20 20 20 3b 20 72 39 20 43 75 72 72 65 | ; r9 Curre| 00005710 6e 74 20 50 6f 69 6e 74 65 72 20 69 6e 20 74 68 |nt Pointer in th| 00005720 65 20 53 65 71 75 65 6e 63 65 0d 19 32 05 20 0d |e Sequence..2. .| 00005730 19 3c 4d 2e 56 63 6f 75 6e 74 20 20 20 20 20 20 |.<M.Vcount | 00005740 20 64 63 64 20 30 20 20 20 20 20 20 20 20 20 3b | dcd 0 ;| 00005750 56 53 79 6e 63 20 43 6f 75 6e 74 65 72 20 20 20 |VSync Counter | 00005760 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 4b 65 | |Ke| 00005770 65 70 20 74 68 65 73 65 20 74 77 6f 0d 19 46 4a |ep these two..FJ| 00005780 2e 56 73 70 65 65 64 20 20 20 20 20 20 20 64 63 |.Vspeed dc| 00005790 64 20 36 20 20 20 20 20 20 20 20 20 3b 53 70 65 |d 6 ;Spe| 000057a0 65 64 20 43 6f 75 6e 74 65 72 20 28 64 65 66 61 |ed Counter (defa| 000057b0 75 6c 74 3d 36 29 20 20 20 20 7c 20 20 3c 20 2e |ult=6) | < .| 000057c0 46 74 61 62 6c 65 0d 19 50 25 2e 46 74 61 62 6c |Ftable..P%.Ftabl| 000057d0 65 20 20 20 20 20 20 20 5d 3a 50 25 2b 3d 39 2a |e ]:P%+=9*| 000057e0 31 32 2a 34 3a 5b 4f 50 54 20 70 0d 19 5a 0a 2e |12*4:[OPT p..Z..| 000057f0 54 72 61 63 6b 0d 19 64 3b 3b 53 61 6d 70 6c 65 |Track..d;;Sample| 00005800 20 48 65 61 64 20 28 61 74 20 49 6e 73 74 2a 33 | Head (at Inst*3| 00005810 32 29 20 20 20 23 30 30 20 41 62 73 6f 6c 75 74 |2) #00 Absolut| 00005820 65 20 53 61 6d 70 6c 65 20 41 64 64 72 65 73 73 |e Sample Address| 00005830 0d 19 6e 2a 20 20 20 20 20 20 20 20 20 20 20 20 |..n* | 00005840 20 20 20 20 20 20 20 20 20 3b 20 20 20 20 20 20 | ; | 00005850 23 30 34 20 4c 65 6e 67 74 68 0d 19 78 30 20 20 |#04 Length..x0 | 00005860 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005870 20 20 20 3b 20 20 20 20 20 20 23 30 38 20 56 6f | ; #08 Vo| 00005880 6c 75 6d 65 20 30 2d 26 66 66 0d 19 82 3a 20 20 |lume 0-&ff...: | 00005890 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000058a0 20 20 20 3b 20 20 20 20 20 20 23 31 32 20 52 65 | ; #12 Re| 000058b0 70 65 61 74 41 74 20 61 73 20 42 79 74 65 4f 66 |peatAt as ByteOf| 000058c0 66 73 65 74 0d 19 8c 2a 20 20 20 20 20 20 20 20 |fset...* | 000058d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 20 | ; | 000058e0 20 20 20 20 23 31 36 20 52 65 70 4c 65 6e 0d 19 | #16 RepLen..| 000058f0 96 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |.3 | 00005900 20 20 20 20 20 20 20 3b 20 20 20 20 20 20 23 32 | ; #2| 00005910 30 20 49 6e 73 74 72 75 6d 65 6e 74 20 4e 61 6d |0 Instrument Nam| 00005920 65 0d 19 a0 17 3b 3d 3d 3d 3d 49 4e 49 54 53 54 |e....;====INITST| 00005930 4f 52 45 20 3d 3d 3d 3d 0d 19 aa 10 20 6d 6f 76 |ORE ====.... mov| 00005940 20 20 20 72 32 2c 23 30 0d 19 b4 09 2e 75 61 6c | r2,#0.....ual| 00005950 6c 0d 19 be 15 20 73 74 72 20 20 20 72 32 2c 5b |l.... str r2,[| 00005960 72 30 5d 2c 23 34 0d 19 c8 10 20 63 6d 70 20 20 |r0],#4.... cmp | 00005970 20 72 30 2c 72 31 0d 19 d2 0f 20 62 4c 6f 20 20 | r0,r1.... bLo | 00005980 20 75 61 6c 6c 0d 19 dc 11 20 6d 6f 76 20 20 20 | uall.... mov | 00005990 70 63 2c 72 31 34 0d 19 e6 09 2e 75 66 69 6e 0d |pc,r14.....ufin.| 000059a0 19 f0 07 5d 3a e1 0d 19 fa 1b 2d 2d 2d 2d 2d 2d |...]:.....------| 000059b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000059c0 2d 0d 1a 04 20 20 37 36 31 30 32 65 72 20 41 44 |-... 76102er AD| 000059d0 52 20 28 6f 6e 6c 79 20 66 6f 72 77 61 72 64 73 |R (only forwards| 000059e0 29 0d 1a 0e 1b 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |)....-----------| 000059f0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0d 1a 18 14 |------------....| 00005a00 dd 20 a4 61 64 72 28 72 25 2c 64 65 73 74 25 29 |. .adr(r%,dest%)| 00005a10 0d 1a 22 13 64 69 73 25 3d 64 65 73 74 25 2d 50 |..".dis%=dest%-P| 00005a20 25 2d 38 0d 1a 2c 0f e7 20 70 3d 25 31 30 30 30 |%-8..,.. p=%1000| 00005a30 20 8c 0d 1a 36 12 20 20 64 30 25 3d 30 20 3a 64 | ...6. d0%=0 :d| 00005a40 31 25 3d 30 0d 1a 40 05 cc 0d 1a 4a 13 20 20 e7 |1%=0..@....J. .| 00005a50 20 64 69 73 25 20 80 20 26 66 20 8c 0d 1a 54 19 | dis% . &f ...T.| 00005a60 20 20 20 20 64 30 25 3d 64 69 73 25 20 80 20 26 | d0%=dis% . &| 00005a70 30 30 30 46 46 0d 1a 5e 19 20 20 20 20 64 31 25 |000FF..^. d1%| 00005a80 3d 64 69 73 25 20 80 20 26 46 46 46 30 30 0d 1a |=dis% . &FFF00..| 00005a90 68 07 20 20 cc 0d 1a 72 19 20 20 20 20 64 30 25 |h. ...r. d0%| 00005aa0 3d 64 69 73 25 20 80 20 26 30 30 46 46 46 0d 1a |=dis% . &00FFF..| 00005ab0 7c 19 20 20 20 20 64 31 25 3d 64 69 73 25 20 80 ||. d1%=dis% .| 00005ac0 20 26 46 46 30 30 30 0d 1a 86 07 20 20 cd 0d 1a | &FF000.... ...| 00005ad0 90 37 20 20 e7 20 64 30 25 2b 64 31 25 3c 3e 64 |.7 . d0%+d1%<>d| 00005ae0 69 73 25 20 8c 20 f1 20 bd 37 3b 22 46 4e 61 64 |is% . . .7;"FNad| 00005af0 72 20 64 6f 65 73 6e 27 74 20 73 75 66 66 69 63 |r doesn't suffic| 00005b00 65 21 22 3a e0 0d 1a 9a 38 20 20 e7 20 64 30 25 |e!":....8 . d0%| 00005b10 3d 30 20 84 20 64 31 25 3d 30 20 8c 20 f1 20 22 |=0 . d1%=0 . . "| 00005b20 46 4e 61 64 72 20 3a 20 41 44 52 20 77 6f 75 6c |FNadr : ADR woul| 00005b30 64 20 64 6f 2e 20 22 3b 7e 64 69 73 25 0d 1a a4 |d do. ";~dis%...| 00005b40 05 cd 0d 1a ae 0a 5b 4f 50 54 20 70 0d 1a b8 13 |......[OPT p....| 00005b50 20 61 64 64 20 72 25 2c 70 63 2c 23 64 31 25 0d | add r%,pc,#d1%.| 00005b60 1a c2 13 20 61 64 64 20 72 25 2c 72 25 2c 23 64 |... add r%,r%,#d| 00005b70 30 25 0d 1a cc 08 5d 3d 22 22 0d 1a d6 22 dd f2 |0%....]=""..."..| 00005b80 65 72 72 6f 72 3a eb 31 32 3a f6 3a f1 22 20 61 |error:.12:.:." a| 00005b90 74 20 6c 69 6e 65 20 22 3b 9e 3a e1 0d ff |t line ";.:...| 00005b9e