Home » Archimedes archive » Archimedes World » AW-1991-05.adf » May91 » !AWMay91/Goodies/Coconizer/Tools/Turbo

!AWMay91/Goodies/Coconizer/Tools/Turbo

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-05.adf » May91
Filename: !AWMay91/Goodies/Coconizer/Tools/Turbo
Read OK:
File size: 56CA bytes
Load address: 0000
Exec address: 0000
File contents

� >Tools.Turbo

� code 256000,L%-1
(
2� p=%1000 � %1010 � 2
<P%=code
F�_Music
P� p
Z
dend%=Track+pointer
n/�''"Start at : &";~code,"End at  : &";~end%
x4�  "Total len: ";end%-code,"Song len: ";pointer'
�
�� v_on :A%=v_off :B%=v_on
�)�"CHAN.2 0" :�"CHAN.3 0" :�"CHAN.4 0"
��
�
�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$=�:� �TDA
  ȕ � �#f%
"?    top%+=1:nam$(top%)=�#f%:�#f%,byt%(top%):loc$(top%)=�#f%
,  �
6
  �#f%
@
JH  �'"Please enter song path [SONGS]: "path$:� path$="" path$="songs"
T  � "Cat "+path$
^   �'"Coconizer songfile? "a$
h  a$=path$+"."+a$
r
  f%=� a$
|5  b1=�#f%:b2=�#f%:b3=�#f%:b4=�#f%:b5=�#f%:b6=�#f%
�
  �#f%
�9  � b4=0 � b5>0 � Vocs=b6 � Vocs=b1     :� packed...?
�
�  �_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
&�
0  � "Load "+a$+" "+�~Track
:�
D
ND� i%=0 � 9*12-1          :� From internat. Octave -3 to Octave 5
XJn%=i% +4*12                 :� Correct it, as 'Steinway' +0 = Middle C
b4f%=440*(2^((n%-46)/12))     :� Frequency formula
lGFtable!(i%*4)=(f%/(1000000/us))*65536 :� 16bit fixpointed increment
v� i%
�
��'"NAME: ";$(Track+1);
�;� �46);"Sequencies: ";Track?22;"  Patterns: ";Track?23'
�
�Ipointer=Track!32                                 :� SampleData Offset
�� i%=1 � Track?21
�  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);:� �TBC
  � " (";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%
4  pointer+=len+gap
>a  � Track+pointer>=L% � �,"More than "+�pointer+" bytes sample data: Assembler limit reached"
H� i%
R�
\
f�
p
  flag%=0
z  � i%=1 � Track?21-1
�[    � sort$(i%)>sort$(i%+1) � Ȕ sort$(i%),sort$(i%+1):Ȕ sort%(i%),sort%(i%+1):flag%=1
�
  � i%
�
� flag%=0
�
�� i%=1 � Track?21
�  s=sort%(i%)
�D  na$=$(Track+s*32+20):adr=Track+Track!(s*32):len=Track!(s*32+4)
�"  fu$="Inst"+sort$(i%)+"."+na$
�
  f=� fu$
�  � 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$=�
$    � �dTC
.  �
8� i%
B�
L
V� �_MusicASM
`
gap=64
j
us =48
t
[OPT p
~
�(;-----------------------------------
�;
�%;    COCONIZER TURBO PLAYER v1.21
�;
�%;   Needs 15% of the ARM-II speed
�'; No overall volume, 4 channs only!
�;
�;         (c) Feb 1991 by
�$;    Eduard Pfarr & Thomas Alber
�;           of Playfield
�;
�%;   Latest revision - 10 Feb 1991
;

(;-----------------------------------
 
	.v_on
( mov   r12,r14
2+ mov   r0,#4                ;Ƞ 4 only!
<B mov   r1,#256              ;BufferLen of �E channel, total *4
F. mov   r2,#us               ;Sample Period
P7 mov   r3,#0                ;Default ChannelHandler
Z1 mov   r4,#0                ;Default Sheduler
d swi   "Sound_Configure"
n
x 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
�
� mov   r0,#1
�.vimage
� ldr   r1,[r2],#4
�/ swi   "Sound_Stereo"            ;*Ȣ r0 r1
� add   r0,r0,#1
� cmp   r0,#4
� bLs   vimage
�
 mov   r0,#1
 adr   r1,Vname
; swi   "Sound_AttachNamedVoice"  ;*CHANNELVOICE r0 "r1"
" mov   r1,#&170
,6 mov   r2,#50               ;Activate channel once
6 mov   r3,#255
@/ swi   "Sound_Control"      ;*� r0 r1 r2 r3
J
T bl    vabsolut
^ bl    v_reset
h< mov   r0,#16               ;Claim EVENT Vector (Nr. 16)
r �adr( 1,vinter)
|: �adr( 2,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,#4                ;And once more...
� mov   r1,#0
� mov   r2,#0
� mov   r3,#0
� mov   r4,#0
�' swi   "Sound_Configure"    ;Grrrh!
� mov   pc,r12
�
;*** �OLUTE CODE


.vabsolut
& �adr( 10,Track)
0
:0 ldr   r1,[r10,#24]         ;Sequence Offset
D add   r1,r10,r1
N str   r1,[r10,#24]
X/ ldr   r2,[r10,#28]         ;Pattern Offset
b add   r2,r10,r2
l str   r2,[r10,#28]
v
�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
�
�6 ldr   r0,[pc]              ;Do not call relocater
�- str   r0,vabsolut          ;two times...
� mov   pc,r14
�
�;*** RESTART TUNE

.v_reset
 �adr( 10,Track)
  �adr( 11,Registers)
* mov   r1,#64
4+ str   r1,[r11,#0]          ;Patt Count
> ldr   r2,[r10,#24]
H9 str   r2,[r11,#8]          ;Current Sequence Pointer
R ldrB  r2,[r2]
\ ldr   r3,[r10,#28]
f add   r3,r3,r2,lsl#10
p8 str   r3,[r11,#4]          ;Current Pattern Pointer
z
� �adr( 11,Head)
�, mov r1,#0:mov r2,#0:mov r3,#0:mov r4,#0
�, mov r5,#0:mov r6,#0:mov r7,#0:mov r8,#0
� mov   r0,#4
�	.vall
�; stmia r11!,{r1-r8}         ;Clear all channel heads...
� subS  r0,r0,#1
� bNe   vall
� mov   pc,r14
�
� ;*** TURN � PLAYER � COCO-ȡ
�
�
.v_off
	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( 1,vinter)
	8 �adr( 2,Head)
	B swi   "OS_Release"
	L
	V ldr   r1,Vslot
	`E swi   "Sound_RemoveVoice"  ;Last but not least... Free VoiceSlot
	j mov   r0,#1
	t mov   r1,#1
	~, swi   "Sound_AttachVoice"  ;Reinit Bell
	� mov   r0,#1
	� mov   r1,#0
	� mov   r2,#0
	� mov   r3,#0
	� mov   r4,#0
	� swi   "Sound_Configure"
	� mov   pc,r14
	�
	�
.Vstereos
	�2 dcd -50      ;Stereo Positions for 4 channels
	� dcd -20
	� dcd  20
 dcd  50


.Vslot dcd 0

(H;==== șTEM � ======================================================
2
<@; r6 Neg. if new Handler    r10 Pointer to end of DMA buffer
FM; r7 Channel number         r11 Increment (interleaf) to use when writing
PM; r8 Sample period in us    r12 Pointer to (start of DMA + interleaf Ofs)
ZM; r9 Pointer to SCCB        Filler is entered in IRQ mode & Ints enabled!
d
n.VoiceBase
x? b     vfill                ;Fill         for smooth adjust
�? b     vfill                ;Update       for tone continue
�: b     vfill                ;GateOn       for new tone
�? ldmfd r13!,{pc}            ;GateOff      for tone flushing
�H ldmfd r13!,{pc}            ;Instantiate,   Attach    VoiceGenerator
�J ldmfd r13!,{pc}            ;DeInstantiate, Detach   to/from a channel
�. ldmfd r13!,{pc}            ;Hello Arthur!
�> dcd   Vname-VoiceBase      ;Offset from VoiceBase to Name
�.Vname dcb "Cocoplex"+�0
�
 align
�
�
.vfill
�F teqP  pc,#(1<<27) � %10   ;Disable IRQ, because I use r13 & r14 !
� �adr( 1,Vstack)
 str   r13,[r1]

< �adr( 13,Head)            ;We have an own Control_Block
" ldmIa r13,{r1-r5}
,( mov   r0,r3                ;Sample0
6H orr   r2,r5,r2,lsl#8       ;3 upper bytes = Pitch, lowbyte = Volume
@
J add   r13,r13,#32
T ldmIa r13,{r4-r8}
^( mov   r3,r6                ;Sample1
h orr   r5,r8,r5,lsl#8
r
| add   r13,r13,#32
� ldmIa r13,{r7-r11}
�( mov   r6,r9                ;Sample2
� orr   r8,r11,r8,lsl#8
�
� add   r13,r13,#32
� ldmIa r13,{r9-r11}
� ldr   r14,[r13,#16]
� orr   r11,r14,r10,lsl#8
� mov   r10,r9
�( ldr   r9,[r13,#8]          ;Sample3
�
�E]:� r%=1 � 256/gap:[OPT p   ;256 bytes for one, *4 for all channs
�
E]:� l%=1 � gap:[OPT p    ;Fill <gap> words without range checking

C ldrB  r14,[r0,r1,lsr#16]   ;Load sample byte (HighWord of Pos)
&- mov   r14,r14,lsl#24       ;Ins Top byte
0> subS  r14,r14,r2,lsl#24    ;Wegen Volume (war im Lowbyte)
: movCC r13,#0
D movCS r13,r14,lsr#24
N add   r1,r1,r2,lsr#8
X
b" ldrB  r14,[r3,r4,lsr#16]   ;1
l mov   r14,r14,lsl#24
v subS  r14,r14,r5,lsl#24
� orrCS r13,r13,r14,lsr#16
� add   r4,r4,r5,lsr#8
�
�" ldrB  r14,[r6,r7,lsr#16]   ;2
� mov   r14,r14,lsl#24
� subS  r14,r14,r8,lsl#24
� orrCS r13,r13,r14,lsr#8
� add   r7,r7,r8,lsr#8
�
�" ldrB  r14,[r9,r10,lsr#16]  ;3
� mov   r14,r14,lsl#24
� subS  r14,r14,r11,lsl#24
� orrCS r13,r13,r14

 add   r10,r10,r11,lsr#8



L str   r13,[r12],#4         ; E I N E  Position aller 4 Kanaele gefuellt

 ]:� l%:[OPT p

*

4 �adr (13,Head)

>, ldr   r14,[r13,#0*32+12]   ;Len Sample0

HL cmp   r14,r1,lsr#16        ;Etwa kleiner wie aktuelle (fixp) Position ?

R. ldrLo r14,[r13,#0*32+20]   ;RepAt Kanal 1

\$ movLoS S S14               ;=0?

fA cmp   r1,#0                ;Sorry, must work if Not LO, too!

p, movEq r2,#0                ;Ja -> Still

z

�" ldr   r14,[r13,#1*32+12]   ;1

� cmp   r14,r4,lsr#16

� ldrLo r14,[r13,#1*32+20]

� movLoS 4,r14

� cmp   r4,#0

� movEq r5,#0

�

�" ldr   r14,[r13,#2*32+12]   ;2

� cmp   r14,r7,lsr#16

� ldrLo r14,[r13,#2*32+20]

� movLoS 7,r14

� cmp   r7,#0

� movEq r8,#0

" ldr   r14,[r13,#3*32+12]   ;3
 cmp   r14,r10,lsr#16
$ ldrLo r14,[r13,#3*32+20]
. movLoS 10,r14
8 cmp   r10,#0
B movEq r11,#0
L
V]:� r%:[OPT p
`
j adr   r13,Head
t mov   r2,r2,lsr#8
~F stmIa r13,{r1-r2}          ;Save the two (probably) modified regs
�
� add   r13,r13,#32
� mov   r5,r5,lsr#8
�" stmIa r13,{r4-r5}          ;1
�
� add   r13,r13,#32
� mov   r8,r8,lsr#8
�" stmIa r13,{r7-r8}          ;2
�
� add   r13,r13,#32
� mov   r1mov   r1m11,lsr#8
�" stmIa r13,{r10-r11}        ;3


B mov   r0,#%00001000        ;And return with Voice-Active-Flag
 ldr   r13,Vstack
 teqP  pc,#(0<<27) � %10
( ldmfd r13!,{pc}
2
<.Vstack       dcd 00
F	.Head
PJ dcd 0                      ;r1 Pos in sample (16bit fix point Offset)
ZH dcd 0                      ;r2 Pitch (fixpoint, uses lower 3 bytes)
d1 dcd 0                      ;r3 Sample Adress
n* dcd 0                      ;r4 Length
xA 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
�
�( dcb �3*32,�0)    ; Add 3 or 7 Heads
�
�M;==== PLAY EVENT ========================================================
 
=;*** DO EVERY VSYNC EFFECTS (#r0=Timer ... $r0=preserved)

"
.veffects
,3 ldr   r4,[r12,#4]          ;Load current Pitch
6J cmp   r4,#0                ;No active tone -> sorry, effect disabled!
@ movEq pc,r14
J2 ldr   r3,[r12,#24]         ;Load Auto-Effects
T) mov   r10,r14              ;Push r14
^9 andS  r2,r3,#&ff           ;Is there Auto Volume up?
h blNe  v_volup
r; 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
�1 andS  r2,r1,#&ff           ;Isolate InfoByte
�E movEq pc,r14               ;if 0, then there's no effect at all!
�6 and   r3,r1,#&ff00         ;Isolate Effect number
M ldr   r3,[pc,r3,lsr#6]     ;lsr#8 for effect into lowbyte & lsl#2 for *4
 add   pc,pc,r3

&. dcd   v_arpeggio-vof1      ; 0 = Arpeggio
0	.vof1
:F dcd   v_slideup-vof1       ; 1 = Slide Pitch up   (till Amis Max)
DF dcd   v_slidedown-vof1     ; 2 = Slide Pitch down (till Amis Min)
N/ dcd   v_volup-vof1         ; 3 = Volume up
X1 dcd   v_voldown-vof1       ; 4 = Volume down
b8 dcd   v_arcup-vof1         ; 5 = Slide Arc Pitch up
l: dcd   v_arcdown-vof1       ; 6 = Slide Arc Pitch down
v
�.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,r r1,r 2,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,r r1,r 2
�I ldr   r1,[r1,[r1,1,lsl#2]    ;Get equivalent Frequency from r11=fTable
�, str   r1,[r12,#4]          ;Enter Pitch
� mov   pc,r14
�
.v_slideup
2 add   r1,r4,r2,lsl#6       ; Freq+InfoByte*64
D cmp   r1,#&18800           ;Min Per = &071, ie OutPutF < &184DA
  strLt r1,[r12,#4]
* mov   pc,r14
4.v_slidedown
>2 sub   r1,r4,r2,lsl#6       ; Freq-InfoByte*64
HD cmp   r1,#&3340            ;Max Per = &358, ie OutPutF > & 3355
R strGt r1,[r12,#4]
\ mov   pc,r14
f
p.v_volup
zJ 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,r r1,r 2
�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   rd   rdd2
� cmp   r1,#255
�J strLs r1,[r12,#16]         ;If not <255 (Min Vol), then write it back
� mov   pc,r14

.v_arcup
E addS  r1,r4,r2,lsl#4       ;Pitch+InfoByte*16 (for slow sliding)
$ strPl r1,[r12,#4]
. mov   pc,r14
8.v_arcdown
BE subS  r1,r4,r2,lsl#4       ;Pitch-InfoByte*16 (for slow sliding)
L strPl r1,[r12,#4]
V mov   pc,r14
`
j;*** ENTRY ȒS � GAME � FX
t
~.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])
2
<.vinter
FL stmfd r13!,{r1-r11}        ;For not intercepting vector -> push r14 too
P
ZL adr   r11,Ftable           ;r11 & r12 pointers are needed in both cases
d
n5 ldmDb r11,{r0,r1}          ;Load Counter & Speed
x) add   r0,r0,#1             ;Counter+
�5 cmp   r0,r1                ;If >= Speed, then...
�M 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.
�
' ldmfd r13!,{r1-r11,pc}     ;Return
 
4;*** PLAY �E PATTERN-POSITION (ALL 4/8 CHANNELS)
"
,
.vplay
6 adr   r6,Registers
@9 ldmIa r6,{r7-r9}           ;Load 3 working registers
J adr   r10,Track
T
^# bl    vchannel             ;1.
h add   r12,r12,#32
r# bl    vchannel             ;2.
| add   r12,r12,#32
�# bl    vchannel             ;3.
� add   r12,r12,#32
�# bl    vchannel             ;4.
�
�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      ;+ Nr*1024
 stmIa r6,{r7-r9}
&' ldmfd r13!,{r1-r11,pc}     ;Return
0
:/;*** SUPPLY �E CHANNEL WITH ǖ INFORMATIONS
D
N
.vchannel
XH ldr   r1,[r8],#4           ;Pattern LWord of current Patt_Pos & INC
b
l/ ldrB  r2,[r12,#30]         ;Is SoundFX on?
v cmp   r2,#0
�& bEq   vrule                ;No...
� ldr   r2,[r12,#4]
�A cmp   r2,#0                ;Yes, but is sample still active?
�1 strEqB 2,[r12,#30]         ;No, so cancel FX
� mov   pc,r14
�
�
.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
4M 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
H5 str   r0,[r12,# 8]         ;Enter Sample Address
R- str   r3,[r12,#16]         ;Enter Volume
\L movS  r0,r4,lsl#16         ;Pos=RepAt (in 16-fixpoint), but is it zero?
fL addNe r2,r4,r5             ; No -> Len (absolute from 0) = RepAt+RepLen
pJ movNe r4,r0                ;    -> Head Offset RepAt = fixpoint RepAt
z* str   r0,[r12,# 0]         ;Enter Pos
�- str   r2,[r12,#12]         ;Enter Length
�, str   r4,[r12,#20]         ;Enter RepAt
�
�.vcomms
�C and   r0,r1,#&0f <<8       ;Isolate Command-Nibble from DataLW
�1 and   r2,r1,#&ff           ;Isolate InfoByte
�M ldr   r3,[pc,r0,lsr#6]     ;lsr#8 for Nibble into lowbyte & lsl#2 for *4
� add   pc,pc,r3
�
�, 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
84 dcd   vautovolup-vof2      ; 8 = Auto Volume up
B6 dcd   vautovoldown-vof2    ; 9 = Auto Volume down
L3 dcd   vautoarcup-vof2      ; A = Auto Pitch up
V5 dcd   vautoarcdown-vof2    ; B = Auto Pitch down
`0 dcd   vsetvol-vof2         ; C = Set Volume
j3 dcd   vpattbreak-vof2      ; D = Pattern Break
t4 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
� mov   r0,r0,lsr#8
�< strB  r0,[r12,#29]         ;Store CommByte, for Effects
�	.vnop
�+ mov   pc,r14               ;and return
�
�.vstereopos
�M adr   r0,Head              ;Get current channel number (little Overhead)
� sub   r0,r12,r0
�5 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
2 mov   r2,#&3400000
< str   r1,[r2]
F
P9 cmp   r0,#3*4              ;Extra Adr of Image Reg 7
Z subEq r1,r1,#&10<<24
dA addNe r1,r1,#&10<<24       ;Well, set up twin Image Reg too!
n str   r1,[r2]
x
� mov   pc,r14
�
�.vautovolup
� strB  r2,[r12,#24]
� mov   pc,r14
�.vautovoldown
� strB  r2,[r12,#25]
� mov   pc,r14
�.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
6
@.vpattbreak
JE mov   r7,#1                ;Jump to end of Patt, ie Patt_Count=1
T mov   pc,r14
^
h.vsetspeed
r9 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
� 
�M.Vcount       dcd 0         ;VSync Counter                |Keep these two
�J.Vspeed       dcd 6         ;Speed Counter (default=6)    |  < .Ftable
�
�%.Ftable       ]:P%+=9*12*4:[OPT p
�
.Track
�
;;Sample Head (at Inst*32)   #00 Absolute Sample Address
*                     ;      #04 Length
0                     ;      #08 Volume 0-&ff
&:                     ;      #12 RepeatAt as ByteOffset
0*                     ;      #16 RepLen
:3                     ;      #20 Instrument Name
D
N;====INITSTORE ====
X
b mov   r2,#0
l	.uall
v str   r2,[r0],#4
� cmp   r0,r1
� bLo   uall
� mov   pc,r14
�	.ufin
�
�]:�
�
�-----------------------
�2er ADR (only forwards)
�-----------------------
�� �adr(r%,dest%)
�dis%=dest%-P%-8
�� p=%1000 �
  d0%=0 :d1%=0
�
  � dis% � &f �
     d0%=dis% � &000FF
*    d1%=dis% � &FFF00
4  �
>    d0%=dis% � &00FFF
H    d1%=dis% � &FF000
R  �
\7  � d0%+d1%<>dis% � � �7;"FNadr doesn't suffice!":�
f8  � d0%=0 � d1%=0 � � "FNadr : ADR would do. ";~dis%
p�
z
[OPT p
� add r%,pc,#d1%
� add 
00000000  0d 00 0a 12 f4 20 3e 54  6f 6f 6c 73 2e 54 75 72  |..... >Tools.Tur|
00000010  62 6f 0d 00 14 04 0d 00  1e 16 de 20 63 6f 64 65  |bo......... code|
00000020  20 32 35 36 30 30 30 2c  4c 25 2d 31 0d 00 28 04  | 256000,L%-1..(.|
00000030  0d 00 32 19 e3 20 70 3d  25 31 30 30 30 20 b8 20  |..2.. p=%1000 . |
00000040  25 31 30 31 30 20 88 20  32 0d 00 3c 0b 50 25 3d  |%1010 . 2..<.P%=|
00000050  63 6f 64 65 0d 00 46 0b  f2 5f 4d 75 73 69 63 0d  |code..F.._Music.|
00000060  00 50 07 ed 20 70 0d 00  5a 04 0d 00 64 16 65 6e  |.P.. p..Z...d.en|
00000070  64 25 3d 54 72 61 63 6b  2b 70 6f 69 6e 74 65 72  |d%=Track+pointer|
00000080  0d 00 6e 2f f1 27 27 22  53 74 61 72 74 20 61 74  |..n/.''"Start at|
00000090  20 3a 20 26 22 3b 7e 63  6f 64 65 2c 22 45 6e 64  | : &";~code,"End|
000000a0  20 61 74 20 20 3a 20 26  22 3b 7e 65 6e 64 25 0d  | at  : &";~end%.|
000000b0  00 78 34 f1 20 20 22 54  6f 74 61 6c 20 6c 65 6e  |.x4.  "Total len|
000000c0  3a 20 22 3b 65 6e 64 25  2d 63 6f 64 65 2c 22 53  |: ";end%-code,"S|
000000d0  6f 6e 67 20 6c 65 6e 3a  20 22 3b 70 6f 69 6e 74  |ong len: ";point|
000000e0  65 72 27 0d 00 82 04 0d  00 8c 1d d6 20 76 5f 6f  |er'......... v_o|
000000f0  6e 20 3a 41 25 3d 76 5f  6f 66 66 20 3a 42 25 3d  |n :A%=v_off :B%=|
00000100  76 5f 6f 6e 0d 00 96 29  ff 22 43 48 41 4e 2e 32  |v_on...)."CHAN.2|
00000110  20 30 22 20 3a ff 22 43  48 41 4e 2e 33 20 30 22  | 0" :."CHAN.3 0"|
00000120  20 3a ff 22 43 48 41 4e  2e 34 20 30 22 0d 00 a0  | :."CHAN.4 0"...|
00000130  05 e0 0d 00 aa 04 0d 00  b4 4d 2d 2d 2d 2d 2d 2d  |.........M------|
00000140  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000180  2d 2d 2d 0d 00 be 0d dd  20 f2 5f 4d 75 73 69 63  |---..... ._Music|
00000190  0d 00 c8 0f e7 20 70 3d  25 31 30 30 30 20 8c 0d  |..... p=%1000 ..|
000001a0  00 d2 34 20 20 2a 52 4d  45 6e 73 75 72 65 20 50  |..4  *RMEnsure P|
000001b0  61 63 6b 69 74 20 31 2e  35 30 20 52 4d 4c 6f 61  |ackit 1.50 RMLoa|
000001c0  64 20 21 43 6f 63 6f 6e  69 7a 65 72 2e 50 61 63  |d !Coconizer.Pac|
000001d0  6b 69 74 0d 00 dc 10 20  20 6d 61 78 69 6e 73 74  |kit....  maxinst|
000001e0  3d 33 32 0d 00 e6 46 20  20 de 20 6e 61 6d 24 28  |=32...F  . nam$(|
000001f0  32 30 30 32 29 2c 62 79  74 25 28 32 30 30 32 29  |2002),byt%(2002)|
00000200  2c 6c 6f 63 24 28 32 30  30 32 29 2c 73 6f 72 74  |,loc$(2002),sort|
00000210  25 28 6d 61 78 69 6e 73  74 29 2c 73 6f 72 74 24  |%(maxinst),sort$|
00000220  28 6d 61 78 69 6e 73 74  29 0d 00 f0 12 20 20 73  |(maxinst)....  s|
00000230  6f 72 74 24 28 32 29 3d  22 b1 22 0d 00 fa 0c 20  |ort$(2)=".".... |
00000240  20 74 6f 70 25 3d 30 0d  01 04 15 20 20 66 25 3d  | top%=0....  f%=|
00000250  8e 20 22 6c 6f 63 61 74  69 6f 6e 22 0d 01 0e 38  |. "location"...8|
00000260  20 20 e7 20 66 25 3d 30  20 8c 20 f1 27 22 50 4c  |  . f%=0 . .'"PL|
00000270  45 41 53 45 20 49 4e 53  45 52 54 20 41 20 53 4f  |EASE INSERT A SO|
00000280  4e 47 20 44 49 53 43 22  3a 61 24 3d be 3a e5 20  |NG DISC":a$=.:. |
00000290  8d 54 44 41 0d 01 18 0f  20 20 c8 95 20 ac 20 c5  |.TDA....  .. . .|
000002a0  23 66 25 0d 01 22 3f 20  20 20 20 74 6f 70 25 2b  |#f%.."?    top%+|
000002b0  3d 31 3a 6e 61 6d 24 28  74 6f 70 25 29 3d be 23  |=1:nam$(top%)=.#|
000002c0  66 25 3a e8 23 66 25 2c  62 79 74 25 28 74 6f 70  |f%:.#f%,byt%(top|
000002d0  25 29 3a 6c 6f 63 24 28  74 6f 70 25 29 3d be 23  |%):loc$(top%)=.#|
000002e0  66 25 0d 01 2c 07 20 20  ce 0d 01 36 0a 20 20 d9  |f%..,.  ...6.  .|
000002f0  23 66 25 0d 01 40 04 0d  01 4a 48 20 20 e8 27 22  |#f%..@...JH  .'"|
00000300  50 6c 65 61 73 65 20 65  6e 74 65 72 20 73 6f 6e  |Please enter son|
00000310  67 20 70 61 74 68 20 5b  53 4f 4e 47 53 5d 3a 20  |g path [SONGS]: |
00000320  22 70 61 74 68 24 3a e7  20 70 61 74 68 24 3d 22  |"path$:. path$="|
00000330  22 20 70 61 74 68 24 3d  22 73 6f 6e 67 73 22 0d  |" path$="songs".|
00000340  01 54 14 20 20 ff 20 22  43 61 74 20 22 2b 70 61  |.T.  . "Cat "+pa|
00000350  74 68 24 0d 01 5e 20 20  20 e8 27 22 43 6f 63 6f  |th$..^   .'"Coco|
00000360  6e 69 7a 65 72 20 73 6f  6e 67 66 69 6c 65 3f 20  |nizer songfile? |
00000370  22 61 24 0d 01 68 15 20  20 61 24 3d 70 61 74 68  |"a$..h.  a$=path|
00000380  24 2b 22 2e 22 2b 61 24  0d 01 72 0d 20 20 66 25  |$+"."+a$..r.  f%|
00000390  3d 8e 20 61 24 0d 01 7c  35 20 20 62 31 3d 9a 23  |=. a$..|5  b1=.#|
000003a0  66 25 3a 62 32 3d 9a 23  66 25 3a 62 33 3d 9a 23  |f%:b2=.#f%:b3=.#|
000003b0  66 25 3a 62 34 3d 9a 23  66 25 3a 62 35 3d 9a 23  |f%:b4=.#f%:b5=.#|
000003c0  66 25 3a 62 36 3d 9a 23  66 25 0d 01 86 0a 20 20  |f%:b6=.#f%....  |
000003d0  d9 23 66 25 0d 01 90 39  20 20 e7 20 62 34 3d 30  |.#f%...9  . b4=0|
000003e0  20 80 20 62 35 3e 30 20  8c 20 56 6f 63 73 3d 62  | . b5>0 . Vocs=b|
000003f0  36 20 8b 20 56 6f 63 73  3d 62 31 20 20 20 20 20  |6 . Vocs=b1     |
00000400  3a f4 20 70 61 63 6b 65  64 2e 2e 2e 3f 0d 01 9a  |:. packed...?...|
00000410  04 0d 01 a4 10 20 20 f2  5f 4d 75 73 69 63 41 53  |.....  ._MusicAS|
00000420  4d 0d 01 ae 3e 20 20 41  25 3d 63 6f 64 65 3a 42  |M...>  A%=code:B|
00000430  25 3d 54 72 61 63 6b 2d  31 3a d6 20 54 72 61 63  |%=Track-1:. Trac|
00000440  6b 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |k               |
00000450  20 20 20 3a f4 20 49 6e  69 74 73 74 6f 72 65 0d  |   :. Initstore.|
00000460  01 b8 3f 20 20 41 25 3d  75 66 69 6e 3a 42 25 3d  |..?  A%=ufin:B%=|
00000470  4c 25 2d 31 20 20 20 3a  d6 20 54 72 61 63 6b 20  |L%-1   :. Track |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000490  20 3a f4 20 72 65 61 6c  6c 79 20 41 4c 4c 0d 01  | :. really ALL..|
000004a0  c2 07 20 20 e1 0d 01 cc  05 cc 0d 01 d6 10 20 20  |..  ..........  |
000004b0  f2 5f 4d 75 73 69 63 41  53 4d 0d 01 e0 05 cd 0d  |._MusicASM......|
000004c0  01 ea 04 0d 01 f4 1e f4  20 2a 2a 2a 20 4c 4f 41  |........ *** LOA|
000004d0  44 20 49 4e 53 54 52 55  4d 45 4e 54 53 20 2a 2a  |D INSTRUMENTS **|
000004e0  2a 0d 01 fe 04 0d 02 08  16 f1 22 43 68 61 6e 6e  |*........."Chann|
000004f0  65 6c 73 3a 20 22 3b 56  6f 63 73 0d 02 12 13 e7  |els: ";Vocs.....|
00000500  20 62 34 3d 30 20 80 20  62 35 3e 30 20 8c 0d 02  | b4=0 . b5>0 ...|
00000510  1c 22 20 20 ff 20 22 50  61 63 6b 4c 6f 61 64 20  |."  . "PackLoad |
00000520  22 2b 61 24 2b 22 20 22  2b c3 7e 54 72 61 63 6b  |"+a$+" "+.~Track|
00000530  0d 02 26 05 cc 0d 02 30  1e 20 20 ff 20 22 4c 6f  |..&....0.  . "Lo|
00000540  61 64 20 22 2b 61 24 2b  22 20 22 2b c3 7e 54 72  |ad "+a$+" "+.~Tr|
00000550  61 63 6b 0d 02 3a 05 cd  0d 02 44 04 0d 02 4e 44  |ack..:....D...ND|
00000560  e3 20 69 25 3d 30 20 b8  20 39 2a 31 32 2d 31 20  |. i%=0 . 9*12-1 |
00000570  20 20 20 20 20 20 20 20  20 3a f4 20 46 72 6f 6d  |         :. From|
00000580  20 69 6e 74 65 72 6e 61  74 2e 20 4f 63 74 61 76  | internat. Octav|
00000590  65 20 2d 33 20 74 6f 20  4f 63 74 61 76 65 20 35  |e -3 to Octave 5|
000005a0  0d 02 58 4a 6e 25 3d 69  25 20 2b 34 2a 31 32 20  |..XJn%=i% +4*12 |
000005b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000005c0  3a f4 20 43 6f 72 72 65  63 74 20 69 74 2c 20 61  |:. Correct it, a|
000005d0  73 20 27 53 74 65 69 6e  77 61 79 27 20 2b 30 20  |s 'Steinway' +0 |
000005e0  3d 20 4d 69 64 64 6c 65  20 43 0d 02 62 34 66 25  |= Middle C..b4f%|
000005f0  3d 34 34 30 2a 28 32 5e  28 28 6e 25 2d 34 36 29  |=440*(2^((n%-46)|
00000600  2f 31 32 29 29 20 20 20  20 20 3a f4 20 46 72 65  |/12))     :. Fre|
00000610  71 75 65 6e 63 79 20 66  6f 72 6d 75 6c 61 0d 02  |quency formula..|
00000620  6c 47 46 74 61 62 6c 65  21 28 69 25 2a 34 29 3d  |lGFtable!(i%*4)=|
00000630  28 66 25 2f 28 31 30 30  30 30 30 30 2f 75 73 29  |(f%/(1000000/us)|
00000640  29 2a 36 35 35 33 36 20  3a f4 20 31 36 62 69 74  |)*65536 :. 16bit|
00000650  20 66 69 78 70 6f 69 6e  74 65 64 20 69 6e 63 72  | fixpointed incr|
00000660  65 6d 65 6e 74 0d 02 76  08 ed 20 69 25 0d 02 80  |ement..v.. i%...|
00000670  04 0d 02 8a 1a f1 27 22  4e 41 4d 45 3a 20 22 3b  |......'"NAME: ";|
00000680  24 28 54 72 61 63 6b 2b  31 29 3b 0d 02 94 3b f1  |$(Track+1);...;.|
00000690  20 8a 34 36 29 3b 22 53  65 71 75 65 6e 63 69 65  | .46);"Sequencie|
000006a0  73 3a 20 22 3b 54 72 61  63 6b 3f 32 32 3b 22 20  |s: ";Track?22;" |
000006b0  20 50 61 74 74 65 72 6e  73 3a 20 22 3b 54 72 61  | Patterns: ";Tra|
000006c0  63 6b 3f 32 33 27 0d 02  9e 04 0d 02 a8 49 70 6f  |ck?23'.......Ipo|
000006d0  69 6e 74 65 72 3d 54 72  61 63 6b 21 33 32 20 20  |inter=Track!32  |
000006e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3a  |               :|
00000700  f4 20 53 61 6d 70 6c 65  44 61 74 61 20 4f 66 66  |. SampleData Off|
00000710  73 65 74 0d 02 b2 15 e3  20 69 25 3d 31 20 b8 20  |set..... i%=1 . |
00000720  54 72 61 63 6b 3f 32 31  0d 02 bc 1e 20 20 54 72  |Track?21....  Tr|
00000730  61 63 6b 21 28 69 25 2a  33 32 2b 20 30 29 3d 70  |ack!(i%*32+ 0)=p|
00000740  6f 69 6e 74 65 72 0d 02  c6 1a 20 20 6c 65 6e 3d  |ointer....  len=|
00000750  54 72 61 63 6b 21 28 69  25 2a 33 32 2b 20 34 29  |Track!(i%*32+ 4)|
00000760  0d 02 d0 1a 20 20 76 6f  6c 3d 54 72 61 63 6b 21  |....  vol=Track!|
00000770  28 69 25 2a 33 32 2b 20  38 29 0d 02 da 1a 20 20  |(i%*32+ 8)....  |
00000780  72 61 74 3d 54 72 61 63  6b 21 28 69 25 2a 33 32  |rat=Track!(i%*32|
00000790  2b 31 32 29 0d 02 e4 1a  20 20 72 65 6e 3d 54 72  |+12)....  ren=Tr|
000007a0  61 63 6b 21 28 69 25 2a  33 32 2b 31 36 29 0d 02  |ack!(i%*32+16)..|
000007b0  ee 1b 20 20 6e 61 24 3d  24 28 54 72 61 63 6b 2b  |..  na$=$(Track+|
000007c0  69 25 2a 33 32 2b 32 30  29 0d 02 f8 30 20 20 f1  |i%*32+20)...0  .|
000007d0  20 bd 28 39 36 2b 69 25  29 3b 22 20 3a 20 22 3b  | .(96+i%);" : ";|
000007e0  6e 61 24 3b 8a 31 38 29  3b 76 6f 6c 2c 72 61 74  |na$;.18);vol,rat|
000007f0  2c 72 65 6e 2c 6c 65 6e  3b 0d 03 02 5b 20 20 e3  |,ren,len;...[  .|
00000800  20 6a 25 3d 31 20 b8 20  74 6f 70 25 3a e7 20 6e  | j%=1 . top%:. n|
00000810  61 24 3c 3e 6e 61 6d 24  28 6a 25 29 20 8c 20 ed  |a$<>nam$(j%) . .|
00000820  3a e8 27 22 20 2d 3e 20  22 6e 61 24 3a 24 28 54  |:.'" -> "na$:$(T|
00000830  72 61 63 6b 2b 69 25 2a  33 32 2b 32 30 29 3d 6e  |rack+i%*32+20)=n|
00000840  61 24 3a f1 20 c4 33 30  2c bd 38 29 3b 3a e5 20  |a$:. .30,.8);:. |
00000850  8d 54 42 43 0d 03 0c 1a  20 20 f1 20 22 20 28 22  |.TBC....  . " ("|
00000860  3b 62 79 74 25 28 6a 25  29 3b 22 29 22 3b 0d 03  |;byt%(j%);")";..|
00000870  16 3e 20 20 e7 20 6c 65  6e 3e 62 79 74 25 28 6a  |.>  . len>byt%(j|
00000880  25 29 20 8c 20 6c 65 6e  3d 62 79 74 25 28 6a 25  |%) . len=byt%(j%|
00000890  29 3a 54 72 61 63 6b 21  28 69 25 2a 33 32 2b 34  |):Track!(i%*32+4|
000008a0  29 3d 6c 65 6e 3a f1 20  22 2a 22 3b 0d 03 20 1e  |)=len:. "*";.. .|
000008b0  20 20 f1 20 2c 28 97 6c  6f 63 24 28 6a 25 29 2d  |  . ,(.loc$(j%)-|
000008c0  36 35 29 20 81 20 32 20  2b 31 0d 03 2a 25 20 20  |65) . 2 +1..*%  |
000008d0  73 6f 72 74 24 28 69 25  29 3d 6c 6f 63 24 28 6a  |sort$(i%)=loc$(j|
000008e0  25 29 3a 73 6f 72 74 25  28 69 25 29 3d 69 25 0d  |%):sort%(i%)=i%.|
000008f0  03 34 16 20 20 70 6f 69  6e 74 65 72 2b 3d 6c 65  |.4.  pointer+=le|
00000900  6e 2b 67 61 70 0d 03 3e  61 20 20 e7 20 54 72 61  |n+gap..>a  . Tra|
00000910  63 6b 2b 70 6f 69 6e 74  65 72 3e 3d 4c 25 20 85  |ck+pointer>=L% .|
00000920  20 9e 2c 22 4d 6f 72 65  20 74 68 61 6e 20 22 2b  | .,"More than "+|
00000930  c3 70 6f 69 6e 74 65 72  2b 22 20 62 79 74 65 73  |.pointer+" bytes|
00000940  20 73 61 6d 70 6c 65 20  64 61 74 61 3a 20 41 73  | sample data: As|
00000950  73 65 6d 62 6c 65 72 20  6c 69 6d 69 74 20 72 65  |sembler limit re|
00000960  61 63 68 65 64 22 0d 03  48 08 ed 20 69 25 0d 03  |ached"..H.. i%..|
00000970  52 05 f1 0d 03 5c 04 0d  03 66 05 f5 0d 03 70 0d  |R....\...f....p.|
00000980  20 20 66 6c 61 67 25 3d  30 0d 03 7a 19 20 20 e3  |  flag%=0..z.  .|
00000990  20 69 25 3d 31 20 b8 20  54 72 61 63 6b 3f 32 31  | i%=1 . Track?21|
000009a0  2d 31 0d 03 84 5b 20 20  20 20 e7 20 73 6f 72 74  |-1...[    . sort|
000009b0  24 28 69 25 29 3e 73 6f  72 74 24 28 69 25 2b 31  |$(i%)>sort$(i%+1|
000009c0  29 20 8c 20 c8 94 20 73  6f 72 74 24 28 69 25 29  |) . .. sort$(i%)|
000009d0  2c 73 6f 72 74 24 28 69  25 2b 31 29 3a c8 94 20  |,sort$(i%+1):.. |
000009e0  73 6f 72 74 25 28 69 25  29 2c 73 6f 72 74 25 28  |sort%(i%),sort%(|
000009f0  69 25 2b 31 29 3a 66 6c  61 67 25 3d 31 0d 03 8e  |i%+1):flag%=1...|
00000a00  0a 20 20 ed 20 69 25 0d  03 98 0d fd 20 66 6c 61  |.  . i%..... fla|
00000a10  67 25 3d 30 0d 03 a2 04  0d 03 ac 15 e3 20 69 25  |g%=0......... i%|
00000a20  3d 31 20 b8 20 54 72 61  63 6b 3f 32 31 0d 03 b6  |=1 . Track?21...|
00000a30  11 20 20 73 3d 73 6f 72  74 25 28 69 25 29 0d 03  |.  s=sort%(i%)..|
00000a40  c0 44 20 20 6e 61 24 3d  24 28 54 72 61 63 6b 2b  |.D  na$=$(Track+|
00000a50  73 2a 33 32 2b 32 30 29  3a 61 64 72 3d 54 72 61  |s*32+20):adr=Tra|
00000a60  63 6b 2b 54 72 61 63 6b  21 28 73 2a 33 32 29 3a  |ck+Track!(s*32):|
00000a70  6c 65 6e 3d 54 72 61 63  6b 21 28 73 2a 33 32 2b  |len=Track!(s*32+|
00000a80  34 29 0d 03 ca 22 20 20  66 75 24 3d 22 49 6e 73  |4)..."  fu$="Ins|
00000a90  74 22 2b 73 6f 72 74 24  28 69 25 29 2b 22 2e 22  |t"+sort$(i%)+"."|
00000aa0  2b 6e 61 24 0d 03 d4 0d  20 20 66 3d 8e 20 66 75  |+na$....  f=. fu|
00000ab0  24 0d 03 de 0b 20 20 e7  20 66 20 8c 0d 03 e8 13  |$....  . f .....|
00000ac0  20 20 20 20 f1 20 6e 61  24 3b 22 2c 20 22 3b 0d  |    . na$;", ";.|
00000ad0  03 f2 1d 20 20 20 20 24  28 61 64 72 2b 6c 65 6e  |...    $(adr+len|
00000ae0  29 3d c4 67 61 70 2d 31  2c bd 30 29 0d 03 fc 24  |)=.gap-1,.0)...$|
00000af0  20 20 20 20 c8 99 20 22  4f 53 5f 47 42 50 42 22  |    .. "OS_GBPB"|
00000b00  2c 34 2c 66 2c 61 64 72  2c 6c 65 6e 3a d9 23 66  |,4,f,adr,len:.#f|
00000b10  0d 04 06 07 20 20 cc 0d  04 10 23 20 20 20 20 64  |....  ....#    d|
00000b20  69 73 63 3d 28 97 73 6f  72 74 24 28 69 25 29 2d  |isc=(.sort$(i%)-|
00000b30  36 35 29 20 81 20 32 20  2b 31 0d 04 1a 33 20 20  |65) . 2 +1...3  |
00000b40  20 20 f1 27 bd 37 3b 22  50 4c 45 41 53 45 20 49  |  .'.7;"PLEASE I|
00000b50  4e 53 45 52 54 20 53 41  4d 50 4c 45 20 44 49 53  |NSERT SAMPLE DIS|
00000b60  43 20 22 3b 64 69 73 63  3a 61 24 3d be 0d 04 24  |C ";disc:a$=...$|
00000b70  0e 20 20 20 20 e5 20 8d  64 54 43 0d 04 2e 07 20  |.    . .dTC.... |
00000b80  20 cd 0d 04 38 08 ed 20  69 25 0d 04 42 05 e1 0d  | ...8.. i%..B...|
00000b90  04 4c 04 0d 04 56 10 dd  20 f2 5f 4d 75 73 69 63  |.L...V.. ._Music|
00000ba0  41 53 4d 0d 04 60 0a 67  61 70 3d 36 34 0d 04 6a  |ASM..`.gap=64..j|
00000bb0  0a 75 73 20 3d 34 38 0d  04 74 0a 5b 4f 50 54 20  |.us =48..t.[OPT |
00000bc0  70 0d 04 7e 04 0d 04 88  28 3b 2d 2d 2d 2d 2d 2d  |p..~....(;------|
00000bd0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000be0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 04 92  |-------------...|
00000bf0  05 3b 0d 04 9c 25 3b 20  20 20 20 43 4f 43 4f 4e  |.;...%;    COCON|
00000c00  49 5a 45 52 20 54 55 52  42 4f 20 50 4c 41 59 45  |IZER TURBO PLAYE|
00000c10  52 20 76 31 2e 32 31 0d  04 a6 05 3b 0d 04 b0 25  |R v1.21....;...%|
00000c20  3b 20 20 20 4e 65 65 64  73 20 31 35 25 20 6f 66  |;   Needs 15% of|
00000c30  20 74 68 65 20 41 52 4d  2d 49 49 20 73 70 65 65  | the ARM-II spee|
00000c40  64 0d 04 ba 27 3b 20 4e  6f 20 6f 76 65 72 61 6c  |d...'; No overal|
00000c50  6c 20 76 6f 6c 75 6d 65  2c 20 34 20 63 68 61 6e  |l volume, 4 chan|
00000c60  6e 73 20 6f 6e 6c 79 21  0d 04 c4 05 3b 0d 04 ce  |ns only!....;...|
00000c70  1d 3b 20 20 20 20 20 20  20 20 20 28 63 29 20 46  |.;         (c) F|
00000c80  65 62 20 31 39 39 31 20  62 79 0d 04 d8 24 3b 20  |eb 1991 by...$; |
00000c90  20 20 20 45 64 75 61 72  64 20 50 66 61 72 72 20  |   Eduard Pfarr |
00000ca0  26 20 54 68 6f 6d 61 73  20 41 6c 62 65 72 0d 04  |& Thomas Alber..|
00000cb0  e2 1c 3b 20 20 20 20 20  20 20 20 20 20 20 6f 66  |..;           of|
00000cc0  20 50 6c 61 79 66 69 65  6c 64 0d 04 ec 05 3b 0d  | Playfield....;.|
00000cd0  04 f6 25 3b 20 20 20 4c  61 74 65 73 74 20 72 65  |..%;   Latest re|
00000ce0  76 69 73 69 6f 6e 20 2d  20 31 30 20 46 65 62 20  |vision - 10 Feb |
00000cf0  31 39 39 31 0d 05 00 05  3b 0d 05 0a 28 3b 2d 2d  |1991....;...(;--|
00000d00  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000d20  2d 0d 05 14 05 20 0d 05  1e 09 2e 76 5f 6f 6e 0d  |-.... .....v_on.|
00000d30  05 28 12 20 6d 6f 76 20  20 20 72 31 32 2c 72 31  |.(. mov   r12,r1|
00000d40  34 0d 05 32 2b 20 6d 6f  76 20 20 20 72 30 2c 23  |4..2+ mov   r0,#|
00000d50  34 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |4               |
00000d60  20 3b c8 a0 20 34 20 6f  6e 6c 79 21 0d 05 3c 42  | ;.. 4 only!..<B|
00000d70  20 6d 6f 76 20 20 20 72  31 2c 23 32 35 36 20 20  | mov   r1,#256  |
00000d80  20 20 20 20 20 20 20 20  20 20 20 20 3b 42 75 66  |            ;Buf|
00000d90  66 65 72 4c 65 6e 20 6f  66 20 ee 45 20 63 68 61  |ferLen of .E cha|
00000da0  6e 6e 65 6c 2c 20 74 6f  74 61 6c 20 2a 34 0d 05  |nnel, total *4..|
00000db0  46 2e 20 6d 6f 76 20 20  20 72 32 2c 23 75 73 20  |F. mov   r2,#us |
00000dc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 53  |              ;S|
00000dd0  61 6d 70 6c 65 20 50 65  72 69 6f 64 0d 05 50 37  |ample Period..P7|
00000de0  20 6d 6f 76 20 20 20 72  33 2c 23 30 20 20 20 20  | mov   r3,#0    |
00000df0  20 20 20 20 20 20 20 20  20 20 20 20 3b 44 65 66  |            ;Def|
00000e00  61 75 6c 74 20 43 68 61  6e 6e 65 6c 48 61 6e 64  |ault ChannelHand|
00000e10  6c 65 72 0d 05 5a 31 20  6d 6f 76 20 20 20 72 34  |ler..Z1 mov   r4|
00000e20  2c 23 30 20 20 20 20 20  20 20 20 20 20 20 20 20  |,#0             |
00000e30  20 20 20 3b 44 65 66 61  75 6c 74 20 53 68 65 64  |   ;Default Shed|
00000e40  75 6c 65 72 0d 05 64 1c  20 73 77 69 20 20 20 22  |uler..d. swi   "|
00000e50  53 6f 75 6e 64 5f 43 6f  6e 66 69 67 75 72 65 22  |Sound_Configure"|
00000e60  0d 05 6e 04 0d 05 78 17  20 61 64 72 20 20 20 72  |..n...x. adr   r|
00000e70  30 2c 56 6f 69 63 65 42  61 73 65 0d 05 82 4b 20  |0,VoiceBase...K |
00000e80  6d 6f 76 20 20 20 72 31  2c 23 30 20 20 20 20 20  |mov   r1,#0     |
00000e90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ea0  3b 49 6e 73 74 61 6c 6c  20 6f 75 72 20 56 6f 69  |;Install our Voi|
00000eb0  63 65 20 69 6e 74 6f 20  6e 65 78 74 20 66 72 65  |ce into next fre|
00000ec0  65 20 53 6c 6f 74 0d 05  8c 1f 20 73 77 69 20 20  |e Slot.... swi  |
00000ed0  20 22 53 6f 75 6e 64 5f  49 6e 73 74 61 6c 6c 56  | "Sound_InstallV|
00000ee0  6f 69 63 65 22 0d 05 96  35 20 73 74 72 20 20 20  |oice"...5 str   |
00000ef0  72 31 2c 56 73 6c 6f 74  20 20 20 20 20 20 20 20  |r1,Vslot        |
00000f00  20 20 20 20 20 20 20 20  20 20 3b 73 74 6f 72 65  |          ;store|
00000f10  20 75 73 65 64 20 73 6c  6f 74 0d 05 a0 16 20 61  | used slot.... a|
00000f20  64 72 20 20 20 72 32 2c  56 73 74 65 72 65 6f 73  |dr   r2,Vstereos|
00000f30  0d 05 aa 04 0d 05 b4 10  20 6d 6f 76 20 20 20 72  |........ mov   r|
00000f40  30 2c 23 31 0d 05 be 0b  2e 76 69 6d 61 67 65 0d  |0,#1.....vimage.|
00000f50  05 c8 15 20 6c 64 72 20  20 20 72 31 2c 5b 72 32  |... ldr   r1,[r2|
00000f60  5d 2c 23 34 0d 05 d2 2f  20 73 77 69 20 20 20 22  |],#4.../ swi   "|
00000f70  53 6f 75 6e 64 5f 53 74  65 72 65 6f 22 20 20 20  |Sound_Stereo"   |
00000f80  20 20 20 20 20 20 20 20  20 3b 2a c8 a2 20 72 30  |         ;*.. r0|
00000f90  20 72 31 0d 05 dc 13 20  61 64 64 20 20 20 72 30  | r1.... add   r0|
00000fa0  2c 72 30 2c 23 31 0d 05  e6 10 20 63 6d 70 20 20  |,r0,#1.... cmp  |
00000fb0  20 72 30 2c 23 34 0d 05  f0 11 20 62 4c 73 20 20  | r0,#4.... bLs  |
00000fc0  20 76 69 6d 61 67 65 0d  05 fa 04 0d 06 04 10 20  | vimage........ |
00000fd0  6d 6f 76 20 20 20 72 30  2c 23 31 0d 06 0e 13 20  |mov   r0,#1.... |
00000fe0  61 64 72 20 20 20 72 31  2c 56 6e 61 6d 65 0d 06  |adr   r1,Vname..|
00000ff0  18 3b 20 73 77 69 20 20  20 22 53 6f 75 6e 64 5f  |.; swi   "Sound_|
00001000  41 74 74 61 63 68 4e 61  6d 65 64 56 6f 69 63 65  |AttachNamedVoice|
00001010  22 20 20 3b 2a 43 48 41  4e 4e 45 4c 56 4f 49 43  |"  ;*CHANNELVOIC|
00001020  45 20 72 30 20 22 72 31  22 0d 06 22 13 20 6d 6f  |E r0 "r1"..". mo|
00001030  76 20 20 20 72 31 2c 23  26 31 37 30 0d 06 2c 36  |v   r1,#&170..,6|
00001040  20 6d 6f 76 20 20 20 72  32 2c 23 35 30 20 20 20  | mov   r2,#50   |
00001050  20 20 20 20 20 20 20 20  20 20 20 20 3b 41 63 74  |            ;Act|
00001060  69 76 61 74 65 20 63 68  61 6e 6e 65 6c 20 6f 6e  |ivate channel on|
00001070  63 65 0d 06 36 12 20 6d  6f 76 20 20 20 72 33 2c  |ce..6. mov   r3,|
00001080  23 32 35 35 0d 06 40 2f  20 73 77 69 20 20 20 22  |#255..@/ swi   "|
00001090  53 6f 75 6e 64 5f 43 6f  6e 74 72 6f 6c 22 20 20  |Sound_Control"  |
000010a0  20 20 20 20 3b 2a d4 20  72 30 20 72 31 20 72 32  |    ;*. r0 r1 r2|
000010b0  20 72 33 0d 06 4a 04 0d  06 54 13 20 62 6c 20 20  | r3..J...T. bl  |
000010c0  20 20 76 61 62 73 6f 6c  75 74 0d 06 5e 12 20 62  |  vabsolut..^. b|
000010d0  6c 20 20 20 20 76 5f 72  65 73 65 74 0d 06 68 3c  |l    v_reset..h<|
000010e0  20 6d 6f 76 20 20 20 72  30 2c 23 31 36 20 20 20  | mov   r0,#16   |
000010f0  20 20 20 20 20 20 20 20  20 20 20 20 3b 43 6c 61  |            ;Cla|
00001100  69 6d 20 45 56 45 4e 54  20 56 65 63 74 6f 72 20  |im EVENT Vector |
00001110  28 4e 72 2e 20 31 36 29  0d 06 72 14 20 a4 61 64  |(Nr. 16)..r. .ad|
00001120  72 28 20 31 2c 76 69 6e  74 65 72 29 0d 06 7c 3a  |r( 1,vinter)..|:|
00001130  20 a4 61 64 72 28 20 32  2c 48 65 61 64 29 20 20  | .adr( 2,Head)  |
00001140  20 20 20 20 20 20 20 20  20 20 20 3b 45 6e 74 72  |           ;Entr|
00001150  79 20 57 6f 72 6b 73 70  61 63 65 50 6f 69 6e 74  |y WorkspacePoint|
00001160  65 72 20 72 31 32 0d 06  86 15 20 73 77 69 20 20  |er r12.... swi  |
00001170  20 22 4f 53 5f 43 6c 61  69 6d 22 0d 06 90 34 20  | "OS_Claim"...4 |
00001180  6d 6f 76 20 20 20 72 30  2c 23 31 34 20 20 20 20  |mov   r0,#14    |
00001190  20 20 20 20 20 20 20 20  20 20 20 3b 45 6e 61 62  |           ;Enab|
000011a0  6c 65 20 45 76 65 6e 74  20 4e 72 2e 20 72 31 0d  |le Event Nr. r1.|
000011b0  06 9a 32 20 6d 6f 76 20  20 20 72 31 2c 23 34 20  |..2 mov   r1,#4 |
000011c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
000011d0  28 34 20 3d 20 56 53 79  6e 63 20 45 76 65 6e 74  |(4 = VSync Event|
000011e0  29 0d 06 a4 14 20 73 77  69 20 20 20 22 4f 53 5f  |).... swi   "OS_|
000011f0  42 79 74 65 22 0d 06 ae  04 0d 06 b8 31 20 6d 6f  |Byte".......1 mo|
00001200  76 20 20 20 72 30 2c 23  34 20 20 20 20 20 20 20  |v   r0,#4       |
00001210  20 20 20 20 20 20 20 20  20 3b 41 6e 64 20 6f 6e  |         ;And on|
00001220  63 65 20 6d 6f 72 65 2e  2e 2e 0d 06 c2 10 20 6d  |ce more....... m|
00001230  6f 76 20 20 20 72 31 2c  23 30 0d 06 cc 10 20 6d  |ov   r1,#0.... m|
00001240  6f 76 20 20 20 72 32 2c  23 30 0d 06 d6 10 20 6d  |ov   r2,#0.... m|
00001250  6f 76 20 20 20 72 33 2c  23 30 0d 06 e0 10 20 6d  |ov   r3,#0.... m|
00001260  6f 76 20 20 20 72 34 2c  23 30 0d 06 ea 27 20 73  |ov   r4,#0...' s|
00001270  77 69 20 20 20 22 53 6f  75 6e 64 5f 43 6f 6e 66  |wi   "Sound_Conf|
00001280  69 67 75 72 65 22 20 20  20 20 3b 47 72 72 72 68  |igure"    ;Grrrh|
00001290  21 0d 06 f4 11 20 6d 6f  76 20 20 20 70 63 2c 72  |!.... mov   pc,r|
000012a0  31 32 0d 06 fe 04 0d 07  08 14 3b 2a 2a 2a 20 94  |12........;*** .|
000012b0  4f 4c 55 54 45 20 43 4f  44 45 0d 07 12 04 0d 07  |OLUTE CODE......|
000012c0  1c 0d 2e 76 61 62 73 6f  6c 75 74 0d 07 26 14 20  |...vabsolut..&. |
000012d0  a4 61 64 72 28 20 31 30  2c 54 72 61 63 6b 29 0d  |.adr( 10,Track).|
000012e0  07 30 04 0d 07 3a 30 20  6c 64 72 20 20 20 72 31  |.0...:0 ldr   r1|
000012f0  2c 5b 72 31 30 2c 23 32  34 5d 20 20 20 20 20 20  |,[r10,#24]      |
00001300  20 20 20 3b 53 65 71 75  65 6e 63 65 20 4f 66 66  |   ;Sequence Off|
00001310  73 65 74 0d 07 44 14 20  61 64 64 20 20 20 72 31  |set..D. add   r1|
00001320  2c 72 31 30 2c 72 31 0d  07 4e 17 20 73 74 72 20  |,r10,r1..N. str |
00001330  20 20 72 31 2c 5b 72 31  30 2c 23 32 34 5d 0d 07  |  r1,[r10,#24]..|
00001340  58 2f 20 6c 64 72 20 20  20 72 32 2c 5b 72 31 30  |X/ ldr   r2,[r10|
00001350  2c 23 32 38 5d 20 20 20  20 20 20 20 20 20 3b 50  |,#28]         ;P|
00001360  61 74 74 65 72 6e 20 4f  66 66 73 65 74 0d 07 62  |attern Offset..b|
00001370  14 20 61 64 64 20 20 20  72 32 2c 72 31 30 2c 72  |. add   r2,r10,r|
00001380  32 0d 07 6c 17 20 73 74  72 20 20 20 72 32 2c 5b  |2..l. str   r2,[|
00001390  72 31 30 2c 23 32 38 5d  0d 07 76 04 0d 07 80 30  |r10,#28]..v....0|
000013a0  20 6c 64 72 42 20 20 72  31 2c 5b 72 31 30 2c 23  | ldrB  r1,[r10,#|
000013b0  32 31 5d 20 20 20 20 20  20 20 20 20 3b 4e 75 6d  |21]         ;Num|
000013c0  62 65 72 20 6f 66 20 49  6e 73 74 73 0d 07 8a 09  |ber of Insts....|
000013d0  2e 76 61 6c 6c 0d 07 94  31 20 6c 64 72 20 20 20  |.vall...1 ldr   |
000013e0  72 32 2c 5b 72 31 30 2c  72 31 2c 6c 73 6c 23 35  |r2,[r10,r1,lsl#5|
000013f0  5d 20 20 20 20 3b 49 6e  73 74 20 41 64 64 72 20  |]    ;Inst Addr |
00001400  4f 66 66 73 65 74 0d 07  9e 14 20 61 64 64 20 20  |Offset.... add  |
00001410  20 72 32 2c 72 31 30 2c  72 32 0d 07 a8 26 20 73  | r2,r10,r2...& s|
00001420  74 72 20 20 20 72 32 2c  5b 72 31 30 2c 72 31 2c  |tr   r2,[r10,r1,|
00001430  6c 73 6c 23 35 5d 20 20  20 20 3b 2b 69 2a 33 32  |lsl#5]    ;+i*32|
00001440  0d 07 b2 13 20 73 75 62  53 20 20 72 31 2c 72 31  |.... subS  r1,r1|
00001450  2c 23 31 0d 07 bc 0f 20  62 4e 65 20 20 20 76 61  |,#1.... bNe   va|
00001460  6c 6c 0d 07 c6 04 0d 07  d0 36 20 6c 64 72 20 20  |ll.......6 ldr  |
00001470  20 72 30 2c 5b 70 63 5d  20 20 20 20 20 20 20 20  | r0,[pc]        |
00001480  20 20 20 20 20 20 3b 44  6f 20 6e 6f 74 20 63 61  |      ;Do not ca|
00001490  6c 6c 20 72 65 6c 6f 63  61 74 65 72 0d 07 da 2d  |ll relocater...-|
000014a0  20 73 74 72 20 20 20 72  30 2c 76 61 62 73 6f 6c  | str   r0,vabsol|
000014b0  75 74 20 20 20 20 20 20  20 20 20 20 3b 74 77 6f  |ut          ;two|
000014c0  20 74 69 6d 65 73 2e 2e  2e 0d 07 e4 11 20 6d 6f  | times....... mo|
000014d0  76 20 20 20 70 63 2c 72  31 34 0d 07 ee 04 0d 07  |v   pc,r14......|
000014e0  f8 15 3b 2a 2a 2a 20 52  45 53 54 41 52 54 20 54  |..;*** RESTART T|
000014f0  55 4e 45 0d 08 02 04 0d  08 0c 0c 2e 76 5f 72 65  |UNE.........v_re|
00001500  73 65 74 0d 08 16 14 20  a4 61 64 72 28 20 31 30  |set.... .adr( 10|
00001510  2c 54 72 61 63 6b 29 0d  08 20 18 20 a4 61 64 72  |,Track).. . .adr|
00001520  28 20 31 31 2c 52 65 67  69 73 74 65 72 73 29 0d  |( 11,Registers).|
00001530  08 2a 11 20 6d 6f 76 20  20 20 72 31 2c 23 36 34  |.*. mov   r1,#64|
00001540  0d 08 34 2b 20 73 74 72  20 20 20 72 31 2c 5b 72  |..4+ str   r1,[r|
00001550  31 31 2c 23 30 5d 20 20  20 20 20 20 20 20 20 20  |11,#0]          |
00001560  3b 50 61 74 74 20 43 6f  75 6e 74 0d 08 3e 17 20  |;Patt Count..>. |
00001570  6c 64 72 20 20 20 72 32  2c 5b 72 31 30 2c 23 32  |ldr   r2,[r10,#2|
00001580  34 5d 0d 08 48 39 20 73  74 72 20 20 20 72 32 2c  |4]..H9 str   r2,|
00001590  5b 72 31 31 2c 23 38 5d  20 20 20 20 20 20 20 20  |[r11,#8]        |
000015a0  20 20 3b 43 75 72 72 65  6e 74 20 53 65 71 75 65  |  ;Current Seque|
000015b0  6e 63 65 20 50 6f 69 6e  74 65 72 0d 08 52 12 20  |nce Pointer..R. |
000015c0  6c 64 72 42 20 20 72 32  2c 5b 72 32 5d 0d 08 5c  |ldrB  r2,[r2]..\|
000015d0  17 20 6c 64 72 20 20 20  72 33 2c 5b 72 31 30 2c  |. ldr   r3,[r10,|
000015e0  23 32 38 5d 0d 08 66 1a  20 61 64 64 20 20 20 72  |#28]..f. add   r|
000015f0  33 2c 72 33 2c 72 32 2c  6c 73 6c 23 31 30 0d 08  |3,r3,r2,lsl#10..|
00001600  70 38 20 73 74 72 20 20  20 72 33 2c 5b 72 31 31  |p8 str   r3,[r11|
00001610  2c 23 34 5d 20 20 20 20  20 20 20 20 20 20 3b 43  |,#4]          ;C|
00001620  75 72 72 65 6e 74 20 50  61 74 74 65 72 6e 20 50  |urrent Pattern P|
00001630  6f 69 6e 74 65 72 0d 08  7a 04 0d 08 84 13 20 a4  |ointer..z..... .|
00001640  61 64 72 28 20 31 31 2c  48 65 61 64 29 0d 08 8e  |adr( 11,Head)...|
00001650  2c 20 6d 6f 76 20 72 31  2c 23 30 3a 6d 6f 76 20  |, mov r1,#0:mov |
00001660  72 32 2c 23 30 3a 6d 6f  76 20 72 33 2c 23 30 3a  |r2,#0:mov r3,#0:|
00001670  6d 6f 76 20 72 34 2c 23  30 0d 08 98 2c 20 6d 6f  |mov r4,#0..., mo|
00001680  76 20 72 35 2c 23 30 3a  6d 6f 76 20 72 36 2c 23  |v r5,#0:mov r6,#|
00001690  30 3a 6d 6f 76 20 72 37  2c 23 30 3a 6d 6f 76 20  |0:mov r7,#0:mov |
000016a0  72 38 2c 23 30 0d 08 a2  10 20 6d 6f 76 20 20 20  |r8,#0.... mov   |
000016b0  72 30 2c 23 34 0d 08 ac  09 2e 76 61 6c 6c 0d 08  |r0,#4.....vall..|
000016c0  b6 3b 20 73 74 6d 69 61  20 72 31 31 21 2c 7b 72  |.; stmia r11!,{r|
000016d0  31 2d 72 38 7d 20 20 20  20 20 20 20 20 20 3b 43  |1-r8}         ;C|
000016e0  6c 65 61 72 20 61 6c 6c  20 63 68 61 6e 6e 65 6c  |lear all channel|
000016f0  20 68 65 61 64 73 2e 2e  2e 0d 08 c0 13 20 73 75  | heads....... su|
00001700  62 53 20 20 72 30 2c 72  30 2c 23 31 0d 08 ca 0f  |bS  r0,r0,#1....|
00001710  20 62 4e 65 20 20 20 76  61 6c 6c 0d 08 d4 11 20  | bNe   vall.... |
00001720  6d 6f 76 20 20 20 70 63  2c 72 31 34 0d 08 de 04  |mov   pc,r14....|
00001730  0d 08 e8 20 3b 2a 2a 2a  20 54 55 52 4e 20 87 20  |... ;*** TURN . |
00001740  50 4c 41 59 45 52 20 80  20 43 4f 43 4f 2d c8 a1  |PLAYER . COCO-..|
00001750  0d 08 f2 04 0d 08 fc 0a  2e 76 5f 6f 66 66 0d 09  |.........v_off..|
00001760  06 35 20 6d 6f 76 20 20  20 72 30 2c 23 31 33 20  |.5 mov   r0,#13 |
00001770  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 44  |              ;D|
00001780  69 73 61 62 6c 65 20 45  76 65 6e 74 20 4e 72 2e  |isable Event Nr.|
00001790  20 72 31 0d 09 10 32 20  6d 6f 76 20 20 20 72 31  | r1...2 mov   r1|
000017a0  2c 23 34 20 20 20 20 20  20 20 20 20 20 20 20 20  |,#4             |
000017b0  20 20 20 3b 28 34 20 3d  20 56 53 79 6e 63 20 45  |   ;(4 = VSync E|
000017c0  76 65 6e 74 29 0d 09 1a  14 20 73 77 69 20 20 20  |vent).... swi   |
000017d0  22 4f 53 5f 42 79 74 65  22 0d 09 24 3b 20 6d 6f  |"OS_Byte"..$; mo|
000017e0  76 20 20 20 72 30 2c 23  31 36 20 20 20 20 20 20  |v   r0,#16      |
000017f0  20 20 20 20 20 20 20 20  20 3b 46 72 65 65 20 45  |         ;Free E|
00001800  56 45 4e 54 20 56 65 63  74 6f 72 20 28 4e 72 2e  |VENT Vector (Nr.|
00001810  20 31 36 29 0d 09 2e 14  20 a4 61 64 72 28 20 31  | 16).... .adr( 1|
00001820  2c 76 69 6e 74 65 72 29  0d 09 38 12 20 a4 61 64  |,vinter)..8. .ad|
00001830  72 28 20 32 2c 48 65 61  64 29 0d 09 42 17 20 73  |r( 2,Head)..B. s|
00001840  77 69 20 20 20 22 4f 53  5f 52 65 6c 65 61 73 65  |wi   "OS_Release|
00001850  22 0d 09 4c 04 0d 09 56  13 20 6c 64 72 20 20 20  |"..L...V. ldr   |
00001860  72 31 2c 56 73 6c 6f 74  0d 09 60 45 20 73 77 69  |r1,Vslot..`E swi|
00001870  20 20 20 22 53 6f 75 6e  64 5f 52 65 6d 6f 76 65  |   "Sound_Remove|
00001880  56 6f 69 63 65 22 20 20  3b 4c 61 73 74 20 62 75  |Voice"  ;Last bu|
00001890  74 20 6e 6f 74 20 6c 65  61 73 74 2e 2e 2e 20 46  |t not least... F|
000018a0  72 65 65 20 56 6f 69 63  65 53 6c 6f 74 0d 09 6a  |ree VoiceSlot..j|
000018b0  10 20 6d 6f 76 20 20 20  72 30 2c 23 31 0d 09 74  |. mov   r0,#1..t|
000018c0  10 20 6d 6f 76 20 20 20  72 31 2c 23 31 0d 09 7e  |. mov   r1,#1..~|
000018d0  2c 20 73 77 69 20 20 20  22 53 6f 75 6e 64 5f 41  |, swi   "Sound_A|
000018e0  74 74 61 63 68 56 6f 69  63 65 22 20 20 3b 52 65  |ttachVoice"  ;Re|
000018f0  69 6e 69 74 20 42 65 6c  6c 0d 09 88 10 20 6d 6f  |init Bell.... mo|
00001900  76 20 20 20 72 30 2c 23  31 0d 09 92 10 20 6d 6f  |v   r0,#1.... mo|
00001910  76 20 20 20 72 31 2c 23  30 0d 09 9c 10 20 6d 6f  |v   r1,#0.... mo|
00001920  76 20 20 20 72 32 2c 23  30 0d 09 a6 10 20 6d 6f  |v   r2,#0.... mo|
00001930  76 20 20 20 72 33 2c 23  30 0d 09 b0 10 20 6d 6f  |v   r3,#0.... mo|
00001940  76 20 20 20 72 34 2c 23  30 0d 09 ba 1c 20 73 77  |v   r4,#0.... sw|
00001950  69 20 20 20 22 53 6f 75  6e 64 5f 43 6f 6e 66 69  |i   "Sound_Confi|
00001960  67 75 72 65 22 0d 09 c4  11 20 6d 6f 76 20 20 20  |gure".... mov   |
00001970  70 63 2c 72 31 34 0d 09  ce 04 0d 09 d8 0d 2e 56  |pc,r14.........V|
00001980  73 74 65 72 65 6f 73 0d  09 e2 32 20 64 63 64 20  |stereos...2 dcd |
00001990  2d 35 30 20 20 20 20 20  20 3b 53 74 65 72 65 6f  |-50      ;Stereo|
000019a0  20 50 6f 73 69 74 69 6f  6e 73 20 66 6f 72 20 34  | Positions for 4|
000019b0  20 63 68 61 6e 6e 65 6c  73 0d 09 ec 0c 20 64 63  | channels.... dc|
000019c0  64 20 2d 32 30 0d 09 f6  0c 20 64 63 64 20 20 32  |d -20.... dcd  2|
000019d0  30 0d 0a 00 0c 20 64 63  64 20 20 35 30 0d 0a 0a  |0.... dcd  50...|
000019e0  04 0d 0a 14 10 2e 56 73  6c 6f 74 20 64 63 64 20  |......Vslot dcd |
000019f0  30 0d 0a 1e 04 0d 0a 28  48 3b 3d 3d 3d 3d 20 c8  |0......(H;==== .|
00001a00  99 54 45 4d 20 d4 20 3d  3d 3d 3d 3d 3d 3d 3d 3d  |.TEM . =========|
00001a10  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00001a30  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 0d 0a 32  |=============..2|
00001a40  04 0d 0a 3c 40 3b 20 72  36 20 4e 65 67 2e 20 69  |...<@; r6 Neg. i|
00001a50  66 20 6e 65 77 20 48 61  6e 64 6c 65 72 20 20 20  |f new Handler   |
00001a60  20 72 31 30 20 50 6f 69  6e 74 65 72 20 74 6f 20  | r10 Pointer to |
00001a70  65 6e 64 20 6f 66 20 44  4d 41 20 62 75 66 66 65  |end of DMA buffe|
00001a80  72 0d 0a 46 4d 3b 20 72  37 20 43 68 61 6e 6e 65  |r..FM; r7 Channe|
00001a90  6c 20 6e 75 6d 62 65 72  20 20 20 20 20 20 20 20  |l number        |
00001aa0  20 72 31 31 20 49 6e 63  72 65 6d 65 6e 74 20 28  | r11 Increment (|
00001ab0  69 6e 74 65 72 6c 65 61  66 29 20 74 6f 20 75 73  |interleaf) to us|
00001ac0  65 20 77 68 65 6e 20 77  72 69 74 69 6e 67 0d 0a  |e when writing..|
00001ad0  50 4d 3b 20 72 38 20 53  61 6d 70 6c 65 20 70 65  |PM; r8 Sample pe|
00001ae0  72 69 6f 64 20 69 6e 20  75 73 20 20 20 20 72 31  |riod in us    r1|
00001af0  32 20 50 6f 69 6e 74 65  72 20 74 6f 20 28 73 74  |2 Pointer to (st|
00001b00  61 72 74 20 6f 66 20 44  4d 41 20 2b 20 69 6e 74  |art of DMA + int|
00001b10  65 72 6c 65 61 66 20 4f  66 73 29 0d 0a 5a 4d 3b  |erleaf Ofs)..ZM;|
00001b20  20 72 39 20 50 6f 69 6e  74 65 72 20 74 6f 20 53  | r9 Pointer to S|
00001b30  43 43 42 20 20 20 20 20  20 20 20 46 69 6c 6c 65  |CCB        Fille|
00001b40  72 20 69 73 20 65 6e 74  65 72 65 64 20 69 6e 20  |r is entered in |
00001b50  49 52 51 20 6d 6f 64 65  20 26 20 49 6e 74 73 20  |IRQ mode & Ints |
00001b60  65 6e 61 62 6c 65 64 21  0d 0a 64 04 0d 0a 6e 0e  |enabled!..d...n.|
00001b70  2e 56 6f 69 63 65 42 61  73 65 0d 0a 78 3f 20 62  |.VoiceBase..x? b|
00001b80  20 20 20 20 20 76 66 69  6c 6c 20 20 20 20 20 20  |     vfill      |
00001b90  20 20 20 20 20 20 20 20  20 20 3b 46 69 6c 6c 20  |          ;Fill |
00001ba0  20 20 20 20 20 20 20 20  66 6f 72 20 73 6d 6f 6f  |        for smoo|
00001bb0  74 68 20 61 64 6a 75 73  74 0d 0a 82 3f 20 62 20  |th adjust...? b |
00001bc0  20 20 20 20 76 66 69 6c  6c 20 20 20 20 20 20 20  |    vfill       |
00001bd0  20 20 20 20 20 20 20 20  20 3b 55 70 64 61 74 65  |         ;Update|
00001be0  20 20 20 20 20 20 20 66  6f 72 20 74 6f 6e 65 20  |       for tone |
00001bf0  63 6f 6e 74 69 6e 75 65  0d 0a 8c 3a 20 62 20 20  |continue...: b  |
00001c00  20 20 20 76 66 69 6c 6c  20 20 20 20 20 20 20 20  |   vfill        |
00001c10  20 20 20 20 20 20 20 20  3b 47 61 74 65 4f 6e 20  |        ;GateOn |
00001c20  20 20 20 20 20 20 66 6f  72 20 6e 65 77 20 74 6f  |      for new to|
00001c30  6e 65 0d 0a 96 3f 20 6c  64 6d 66 64 20 72 31 33  |ne...? ldmfd r13|
00001c40  21 2c 7b 70 63 7d 20 20  20 20 20 20 20 20 20 20  |!,{pc}          |
00001c50  20 20 3b 47 61 74 65 4f  66 66 20 20 20 20 20 20  |  ;GateOff      |
00001c60  66 6f 72 20 74 6f 6e 65  20 66 6c 75 73 68 69 6e  |for tone flushin|
00001c70  67 0d 0a a0 48 20 6c 64  6d 66 64 20 72 31 33 21  |g...H ldmfd r13!|
00001c80  2c 7b 70 63 7d 20 20 20  20 20 20 20 20 20 20 20  |,{pc}           |
00001c90  20 3b 49 6e 73 74 61 6e  74 69 61 74 65 2c 20 20  | ;Instantiate,  |
00001ca0  20 41 74 74 61 63 68 20  20 20 20 56 6f 69 63 65  | Attach    Voice|
00001cb0  47 65 6e 65 72 61 74 6f  72 0d 0a aa 4a 20 6c 64  |Generator...J ld|
00001cc0  6d 66 64 20 72 31 33 21  2c 7b 70 63 7d 20 20 20  |mfd r13!,{pc}   |
00001cd0  20 20 20 20 20 20 20 20  20 3b 44 65 49 6e 73 74  |         ;DeInst|
00001ce0  61 6e 74 69 61 74 65 2c  20 44 65 74 61 63 68 20  |antiate, Detach |
00001cf0  20 20 74 6f 2f 66 72 6f  6d 20 61 20 63 68 61 6e  |  to/from a chan|
00001d00  6e 65 6c 0d 0a b4 2e 20  6c 64 6d 66 64 20 72 31  |nel.... ldmfd r1|
00001d10  33 21 2c 7b 70 63 7d 20  20 20 20 20 20 20 20 20  |3!,{pc}         |
00001d20  20 20 20 3b 48 65 6c 6c  6f 20 41 72 74 68 75 72  |   ;Hello Arthur|
00001d30  21 0d 0a be 3e 20 64 63  64 20 20 20 56 6e 61 6d  |!...> dcd   Vnam|
00001d40  65 2d 56 6f 69 63 65 42  61 73 65 20 20 20 20 20  |e-VoiceBase     |
00001d50  20 3b 4f 66 66 73 65 74  20 66 72 6f 6d 20 56 6f  | ;Offset from Vo|
00001d60  69 63 65 42 61 73 65 20  74 6f 20 4e 61 6d 65 0d  |iceBase to Name.|
00001d70  0a c8 1c 2e 56 6e 61 6d  65 20 64 63 62 20 22 43  |....Vname dcb "C|
00001d80  6f 63 6f 70 6c 65 78 22  2b bd 30 0d 0a d2 0a 20  |ocoplex"+.0.... |
00001d90  61 6c 69 67 6e 0d 0a dc  04 0d 0a e6 0a 2e 76 66  |align.........vf|
00001da0  69 6c 6c 0d 0a f0 46 20  74 65 71 50 20 20 70 63  |ill...F teqP  pc|
00001db0  2c 23 28 31 3c 3c 32 37  29 20 84 20 25 31 30 20  |,#(1<<27) . %10 |
00001dc0  20 20 3b 44 69 73 61 62  6c 65 20 49 52 51 2c 20  |  ;Disable IRQ, |
00001dd0  62 65 63 61 75 73 65 20  49 20 75 73 65 20 72 31  |because I use r1|
00001de0  33 20 26 20 72 31 34 20  21 0d 0a fa 14 20 a4 61  |3 & r14 !.... .a|
00001df0  64 72 28 20 31 2c 56 73  74 61 63 6b 29 0d 0b 04  |dr( 1,Vstack)...|
00001e00  13 20 73 74 72 20 20 20  72 31 33 2c 5b 72 31 5d  |. str   r13,[r1]|
00001e10  0d 0b 0e 04 0d 0b 18 3c  20 a4 61 64 72 28 20 31  |.......< .adr( 1|
00001e20  33 2c 48 65 61 64 29 20  20 20 20 20 20 20 20 20  |3,Head)         |
00001e30  20 20 20 3b 57 65 20 68  61 76 65 20 61 6e 20 6f  |   ;We have an o|
00001e40  77 6e 20 43 6f 6e 74 72  6f 6c 5f 42 6c 6f 63 6b  |wn Control_Block|
00001e50  0d 0b 22 16 20 6c 64 6d  49 61 20 72 31 33 2c 7b  |..". ldmIa r13,{|
00001e60  72 31 2d 72 35 7d 0d 0b  2c 28 20 6d 6f 76 20 20  |r1-r5}..,( mov  |
00001e70  20 72 30 2c 72 33 20 20  20 20 20 20 20 20 20 20  | r0,r3          |
00001e80  20 20 20 20 20 20 3b 53  61 6d 70 6c 65 30 0d 0b  |      ;Sample0..|
00001e90  36 48 20 6f 72 72 20 20  20 72 32 2c 72 35 2c 72  |6H orr   r2,r5,r|
00001ea0  32 2c 6c 73 6c 23 38 20  20 20 20 20 20 20 3b 33  |2,lsl#8       ;3|
00001eb0  20 75 70 70 65 72 20 62  79 74 65 73 20 3d 20 50  | upper bytes = P|
00001ec0  69 74 63 68 2c 20 6c 6f  77 62 79 74 65 20 3d 20  |itch, lowbyte = |
00001ed0  56 6f 6c 75 6d 65 0d 0b  40 04 0d 0b 4a 16 20 61  |Volume..@...J. a|
00001ee0  64 64 20 20 20 72 31 33  2c 72 31 33 2c 23 33 32  |dd   r13,r13,#32|
00001ef0  0d 0b 54 16 20 6c 64 6d  49 61 20 72 31 33 2c 7b  |..T. ldmIa r13,{|
00001f00  72 34 2d 72 38 7d 0d 0b  5e 28 20 6d 6f 76 20 20  |r4-r8}..^( mov  |
00001f10  20 72 33 2c 72 36 20 20  20 20 20 20 20 20 20 20  | r3,r6          |
00001f20  20 20 20 20 20 20 3b 53  61 6d 70 6c 65 31 0d 0b  |      ;Sample1..|
00001f30  68 19 20 6f 72 72 20 20  20 72 35 2c 72 38 2c 72  |h. orr   r5,r8,r|
00001f40  35 2c 6c 73 6c 23 38 0d  0b 72 04 0d 0b 7c 16 20  |5,lsl#8..r...|. |
00001f50  61 64 64 20 20 20 72 31  33 2c 72 31 33 2c 23 33  |add   r13,r13,#3|
00001f60  32 0d 0b 86 17 20 6c 64  6d 49 61 20 72 31 33 2c  |2.... ldmIa r13,|
00001f70  7b 72 37 2d 72 31 31 7d  0d 0b 90 28 20 6d 6f 76  |{r7-r11}...( mov|
00001f80  20 20 20 72 36 2c 72 39  20 20 20 20 20 20 20 20  |   r6,r9        |
00001f90  20 20 20 20 20 20 20 20  3b 53 61 6d 70 6c 65 32  |        ;Sample2|
00001fa0  0d 0b 9a 1a 20 6f 72 72  20 20 20 72 38 2c 72 31  |.... orr   r8,r1|
00001fb0  31 2c 72 38 2c 6c 73 6c  23 38 0d 0b a4 04 0d 0b  |1,r8,lsl#8......|
00001fc0  ae 16 20 61 64 64 20 20  20 72 31 33 2c 72 31 33  |.. add   r13,r13|
00001fd0  2c 23 33 32 0d 0b b8 17  20 6c 64 6d 49 61 20 72  |,#32.... ldmIa r|
00001fe0  31 33 2c 7b 72 39 2d 72  31 31 7d 0d 0b c2 18 20  |13,{r9-r11}.... |
00001ff0  6c 64 72 20 20 20 72 31  34 2c 5b 72 31 33 2c 23  |ldr   r14,[r13,#|
00002000  31 36 5d 0d 0b cc 1c 20  6f 72 72 20 20 20 72 31  |16].... orr   r1|
00002010  31 2c 72 31 34 2c 72 31  30 2c 6c 73 6c 23 38 0d  |1,r14,r10,lsl#8.|
00002020  0b d6 11 20 6d 6f 76 20  20 20 72 31 30 2c 72 39  |... mov   r10,r9|
00002030  0d 0b e0 28 20 6c 64 72  20 20 20 72 39 2c 5b 72  |...( ldr   r9,[r|
00002040  31 33 2c 23 38 5d 20 20  20 20 20 20 20 20 20 20  |13,#8]          |
00002050  3b 53 61 6d 70 6c 65 33  0d 0b ea 04 0d 0b f4 45  |;Sample3.......E|
00002060  5d 3a e3 20 72 25 3d 31  20 b8 20 32 35 36 2f 67  |]:. r%=1 . 256/g|
00002070  61 70 3a 5b 4f 50 54 20  70 20 20 20 3b 32 35 36  |ap:[OPT p   ;256|
00002080  20 62 79 74 65 73 20 66  6f 72 20 6f 6e 65 2c 20  | bytes for one, |
00002090  2a 34 20 66 6f 72 20 61  6c 6c 20 63 68 61 6e 6e  |*4 for all chann|
000020a0  73 0d 0b fe 04 0d 0c 08  45 5d 3a e3 20 6c 25 3d  |s.......E]:. l%=|
000020b0  31 20 b8 20 67 61 70 3a  5b 4f 50 54 20 70 20 20  |1 . gap:[OPT p  |
000020c0  20 20 3b 46 69 6c 6c 20  3c 67 61 70 3e 20 77 6f  |  ;Fill <gap> wo|
000020d0  72 64 73 20 77 69 74 68  6f 75 74 20 72 61 6e 67  |rds without rang|
000020e0  65 20 63 68 65 63 6b 69  6e 67 0d 0c 12 04 0d 0c  |e checking......|
000020f0  1c 43 20 6c 64 72 42 20  20 72 31 34 2c 5b 72 30  |.C ldrB  r14,[r0|
00002100  2c 72 31 2c 6c 73 72 23  31 36 5d 20 20 20 3b 4c  |,r1,lsr#16]   ;L|
00002110  6f 61 64 20 73 61 6d 70  6c 65 20 62 79 74 65 20  |oad sample byte |
00002120  28 48 69 67 68 57 6f 72  64 20 6f 66 20 50 6f 73  |(HighWord of Pos|
00002130  29 0d 0c 26 2d 20 6d 6f  76 20 20 20 72 31 34 2c  |)..&- mov   r14,|
00002140  72 31 34 2c 6c 73 6c 23  32 34 20 20 20 20 20 20  |r14,lsl#24      |
00002150  20 3b 49 6e 73 20 54 6f  70 20 62 79 74 65 0d 0c  | ;Ins Top byte..|
00002160  30 3e 20 73 75 62 53 20  20 72 31 34 2c 72 31 34  |0> subS  r14,r14|
00002170  2c 72 32 2c 6c 73 6c 23  32 34 20 20 20 20 3b 57  |,r2,lsl#24    ;W|
00002180  65 67 65 6e 20 56 6f 6c  75 6d 65 20 28 77 61 72  |egen Volume (war|
00002190  20 69 6d 20 4c 6f 77 62  79 74 65 29 0d 0c 3a 11  | im Lowbyte)..:.|
000021a0  20 6d 6f 76 43 43 20 72  31 33 2c 23 30 0d 0c 44  | movCC r13,#0..D|
000021b0  19 20 6d 6f 76 43 53 20  72 31 33 2c 72 31 34 2c  |. movCS r13,r14,|
000021c0  6c 73 72 23 32 34 0d 0c  4e 19 20 61 64 64 20 20  |lsr#24..N. add  |
000021d0  20 72 31 2c 72 31 2c 72  32 2c 6c 73 72 23 38 0d  | r1,r1,r2,lsr#8.|
000021e0  0c 58 04 0d 0c 62 22 20  6c 64 72 42 20 20 72 31  |.X...b" ldrB  r1|
000021f0  34 2c 5b 72 33 2c 72 34  2c 6c 73 72 23 31 36 5d  |4,[r3,r4,lsr#16]|
00002200  20 20 20 3b 31 0d 0c 6c  19 20 6d 6f 76 20 20 20  |   ;1..l. mov   |
00002210  72 31 34 2c 72 31 34 2c  6c 73 6c 23 32 34 0d 0c  |r14,r14,lsl#24..|
00002220  76 1c 20 73 75 62 53 20  20 72 31 34 2c 72 31 34  |v. subS  r14,r14|
00002230  2c 72 35 2c 6c 73 6c 23  32 34 0d 0c 80 1d 20 6f  |,r5,lsl#24.... o|
00002240  72 72 43 53 20 72 31 33  2c 72 31 33 2c 72 31 34  |rrCS r13,r13,r14|
00002250  2c 6c 73 72 23 31 36 0d  0c 8a 19 20 61 64 64 20  |,lsr#16.... add |
00002260  20 20 72 34 2c 72 34 2c  72 35 2c 6c 73 72 23 38  |  r4,r4,r5,lsr#8|
00002270  0d 0c 94 04 0d 0c 9e 22  20 6c 64 72 42 20 20 72  |......." ldrB  r|
00002280  31 34 2c 5b 72 36 2c 72  37 2c 6c 73 72 23 31 36  |14,[r6,r7,lsr#16|
00002290  5d 20 20 20 3b 32 0d 0c  a8 19 20 6d 6f 76 20 20  |]   ;2.... mov  |
000022a0  20 72 31 34 2c 72 31 34  2c 6c 73 6c 23 32 34 0d  | r14,r14,lsl#24.|
000022b0  0c b2 1c 20 73 75 62 53  20 20 72 31 34 2c 72 31  |... subS  r14,r1|
000022c0  34 2c 72 38 2c 6c 73 6c  23 32 34 0d 0c bc 1c 20  |4,r8,lsl#24.... |
000022d0  6f 72 72 43 53 20 72 31  33 2c 72 31 33 2c 72 31  |orrCS r13,r13,r1|
000022e0  34 2c 6c 73 72 23 38 0d  0c c6 19 20 61 64 64 20  |4,lsr#8.... add |
000022f0  20 20 72 37 2c 72 37 2c  72 38 2c 6c 73 72 23 38  |  r7,r7,r8,lsr#8|
00002300  0d 0c d0 04 0d 0c da 22  20 6c 64 72 42 20 20 72  |......." ldrB  r|
00002310  31 34 2c 5b 72 39 2c 72  31 30 2c 6c 73 72 23 31  |14,[r9,r10,lsr#1|
00002320  36 5d 20 20 3b 33 0d 0c  e4 19 20 6d 6f 76 20 20  |6]  ;3.... mov  |
00002330  20 72 31 34 2c 72 31 34  2c 6c 73 6c 23 32 34 0d  | r14,r14,lsl#24.|
00002340  0c ee 1d 20 73 75 62 53  20 20 72 31 34 2c 72 31  |... subS  r14,r1|
00002350  34 2c 72 31 31 2c 6c 73  6c 23 32 34 0d 0c f8 16  |4,r11,lsl#24....|
00002360  20 6f 72 72 43 53 20 72  31 33 2c 72 31 33 2c 72  | orrCS r13,r13,r|
00002370  31 34 0d 0d 02 1c 20 61  64 64 20 20 20 72 31 30  |14.... add   r10|
00002380  2c 72 31 30 2c 72 31 31  2c 6c 73 72 23 38 0d 0d  |,r10,r11,lsr#8..|
00002390  0c 04 0d 0d 16 4c 20 73  74 72 20 20 20 72 31 33  |.....L str   r13|
000023a0  2c 5b 72 31 32 5d 2c 23  34 20 20 20 20 20 20 20  |,[r12],#4       |
000023b0  20 20 3b 20 45 20 49 20  4e 20 45 20 20 50 6f 73  |  ; E I N E  Pos|
000023c0  69 74 69 6f 6e 20 61 6c  6c 65 72 20 34 20 4b 61  |ition aller 4 Ka|
000023d0  6e 61 65 6c 65 20 67 65  66 75 65 6c 6c 74 0d 0d  |naele gefuellt..|
000023e0  20 11 5d 3a ed 20 6c 25  3a 5b 4f 50 54 20 70 0d  | .]:. l%:[OPT p.|
000023f0  0d 2a 04 0d 0d 34 13 20  a4 61 64 72 20 28 31 33  |.*...4. .adr (13|
00002400  2c 48 65 61 64 29 0d 0d  3e 2c 20 6c 64 72 20 20  |,Head)..>, ldr  |
00002410  20 72 31 34 2c 5b 72 31  33 2c 23 30 2a 33 32 2b  | r14,[r13,#0*32+|
00002420  31 32 5d 20 20 20 3b 4c  65 6e 20 53 61 6d 70 6c  |12]   ;Len Sampl|
00002430  65 30 0d 0d 48 4c 20 63  6d 70 20 20 20 72 31 34  |e0..HL cmp   r14|
00002440  2c 72 31 2c 6c 73 72 23  31 36 20 20 20 20 20 20  |,r1,lsr#16      |
00002450  20 20 3b 45 74 77 61 20  6b 6c 65 69 6e 65 72 20  |  ;Etwa kleiner |
00002460  77 69 65 20 61 6b 74 75  65 6c 6c 65 20 28 66 69  |wie aktuelle (fi|
00002470  78 70 29 20 50 6f 73 69  74 69 6f 6e 20 3f 0d 0d  |xp) Position ?..|
00002480  52 2e 20 6c 64 72 4c 6f  20 72 31 34 2c 5b 72 31  |R. ldrLo r14,[r1|
00002490  33 2c 23 30 2a 33 32 2b  32 30 5d 20 20 20 3b 52  |3,#0*32+20]   ;R|
000024a0  65 70 41 74 20 4b 61 6e  61 6c 20 31 0d 0d 5c 24  |epAt Kanal 1..\$|
000024b0  20 6d 6f 76 4c 6f 53 20  53 20 53 31 34 20 20 20  | movLoS S S14   |
000024c0  20 20 20 20 20 20 20 20  20 20 20 20 3b 3d 30 3f  |            ;=0?|
000024d0  0d 0d 66 41 20 63 6d 70  20 20 20 72 31 2c 23 30  |..fA cmp   r1,#0|
000024e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000024f0  3b 53 6f 72 72 79 2c 20  6d 75 73 74 20 77 6f 72  |;Sorry, must wor|
00002500  6b 20 69 66 20 4e 6f 74  20 4c 4f 2c 20 74 6f 6f  |k if Not LO, too|
00002510  21 0d 0d 70 2c 20 6d 6f  76 45 71 20 72 32 2c 23  |!..p, movEq r2,#|
00002520  30 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0               |
00002530  20 3b 4a 61 20 2d 3e 20  53 74 69 6c 6c 0d 0d 7a  | ;Ja -> Still..z|
00002540  04 0d 0d 84 22 20 6c 64  72 20 20 20 72 31 34 2c  |...." ldr   r14,|
00002550  5b 72 31 33 2c 23 31 2a  33 32 2b 31 32 5d 20 20  |[r13,#1*32+12]  |
00002560  20 3b 31 0d 0d 8e 18 20  63 6d 70 20 20 20 72 31  | ;1.... cmp   r1|
00002570  34 2c 72 34 2c 6c 73 72  23 31 36 0d 0d 98 1d 20  |4,r4,lsr#16.... |
00002580  6c 64 72 4c 6f 20 72 31  34 2c 5b 72 31 33 2c 23  |ldrLo r14,[r13,#|
00002590  31 2a 33 32 2b 32 30 5d  0d 0d a2 11 20 6d 6f 76  |1*32+20].... mov|
000025a0  4c 6f 53 20 34 2c 72 31  34 0d 0d ac 10 20 63 6d  |LoS 4,r14.... cm|
000025b0  70 20 20 20 72 34 2c 23  30 0d 0d b6 10 20 6d 6f  |p   r4,#0.... mo|
000025c0  76 45 71 20 72 35 2c 23  30 0d 0d c0 04 0d 0d ca  |vEq r5,#0.......|
000025d0  22 20 6c 64 72 20 20 20  72 31 34 2c 5b 72 31 33  |" ldr   r14,[r13|
000025e0  2c 23 32 2a 33 32 2b 31  32 5d 20 20 20 3b 32 0d  |,#2*32+12]   ;2.|
000025f0  0d d4 18 20 63 6d 70 20  20 20 72 31 34 2c 72 37  |... cmp   r14,r7|
00002600  2c 6c 73 72 23 31 36 0d  0d de 1d 20 6c 64 72 4c  |,lsr#16.... ldrL|
00002610  6f 20 72 31 34 2c 5b 72  31 33 2c 23 32 2a 33 32  |o r14,[r13,#2*32|
00002620  2b 32 30 5d 0d 0d e8 11  20 6d 6f 76 4c 6f 53 20  |+20].... movLoS |
00002630  37 2c 72 31 34 0d 0d f2  10 20 63 6d 70 20 20 20  |7,r14.... cmp   |
00002640  72 37 2c 23 30 0d 0d fc  10 20 6d 6f 76 45 71 20  |r7,#0.... movEq |
00002650  72 38 2c 23 30 0d 0e 06  04 0d 0e 10 22 20 6c 64  |r8,#0......." ld|
00002660  72 20 20 20 72 31 34 2c  5b 72 31 33 2c 23 33 2a  |r   r14,[r13,#3*|
00002670  33 32 2b 31 32 5d 20 20  20 3b 33 0d 0e 1a 19 20  |32+12]   ;3.... |
00002680  63 6d 70 20 20 20 72 31  34 2c 72 31 30 2c 6c 73  |cmp   r14,r10,ls|
00002690  72 23 31 36 0d 0e 24 1d  20 6c 64 72 4c 6f 20 72  |r#16..$. ldrLo r|
000026a0  31 34 2c 5b 72 31 33 2c  23 33 2a 33 32 2b 32 30  |14,[r13,#3*32+20|
000026b0  5d 0d 0e 2e 12 20 6d 6f  76 4c 6f 53 20 31 30 2c  |].... movLoS 10,|
000026c0  72 31 34 0d 0e 38 11 20  63 6d 70 20 20 20 72 31  |r14..8. cmp   r1|
000026d0  30 2c 23 30 0d 0e 42 11  20 6d 6f 76 45 71 20 72  |0,#0..B. movEq r|
000026e0  31 31 2c 23 30 0d 0e 4c  04 0d 0e 56 11 5d 3a ed  |11,#0..L...V.]:.|
000026f0  20 72 25 3a 5b 4f 50 54  20 70 0d 0e 60 04 0d 0e  | r%:[OPT p..`...|
00002700  6a 13 20 61 64 72 20 20  20 72 31 33 2c 48 65 61  |j. adr   r13,Hea|
00002710  64 0d 0e 74 16 20 6d 6f  76 20 20 20 72 32 2c 72  |d..t. mov   r2,r|
00002720  32 2c 6c 73 72 23 38 0d  0e 7e 46 20 73 74 6d 49  |2,lsr#8..~F stmI|
00002730  61 20 72 31 33 2c 7b 72  31 2d 72 32 7d 20 20 20  |a r13,{r1-r2}   |
00002740  20 20 20 20 20 20 20 3b  53 61 76 65 20 74 68 65  |       ;Save the|
00002750  20 74 77 6f 20 28 70 72  6f 62 61 62 6c 79 29 20  | two (probably) |
00002760  6d 6f 64 69 66 69 65 64  20 72 65 67 73 0d 0e 88  |modified regs...|
00002770  04 0d 0e 92 16 20 61 64  64 20 20 20 72 31 33 2c  |..... add   r13,|
00002780  72 31 33 2c 23 33 32 0d  0e 9c 16 20 6d 6f 76 20  |r13,#32.... mov |
00002790  20 20 72 35 2c 72 35 2c  6c 73 72 23 38 0d 0e a6  |  r5,r5,lsr#8...|
000027a0  22 20 73 74 6d 49 61 20  72 31 33 2c 7b 72 34 2d  |" stmIa r13,{r4-|
000027b0  72 35 7d 20 20 20 20 20  20 20 20 20 20 3b 31 0d  |r5}          ;1.|
000027c0  0e b0 04 0d 0e ba 16 20  61 64 64 20 20 20 72 31  |....... add   r1|
000027d0  33 2c 72 31 33 2c 23 33  32 0d 0e c4 16 20 6d 6f  |3,r13,#32.... mo|
000027e0  76 20 20 20 72 38 2c 72  38 2c 6c 73 72 23 38 0d  |v   r8,r8,lsr#8.|
000027f0  0e ce 22 20 73 74 6d 49  61 20 72 31 33 2c 7b 72  |.." stmIa r13,{r|
00002800  37 2d 72 38 7d 20 20 20  20 20 20 20 20 20 20 3b  |7-r8}          ;|
00002810  32 0d 0e d8 04 0d 0e e2  16 20 61 64 64 20 20 20  |2........ add   |
00002820  72 31 33 2c 72 31 33 2c  23 33 32 0d 0e ec 18 20  |r13,r13,#32.... |
00002830  6d 6f 76 20 20 20 72 31  6d 6f 76 20 20 20 72 31  |mov   r1mov   r1|
00002840  6d 31 31 2c 6c 73 72 23  38 0d 0e f6 22 20 73 74  |m11,lsr#8..." st|
00002850  6d 49 61 20 72 31 33 2c  7b 72 31 30 2d 72 31 31  |mIa r13,{r10-r11|
00002860  7d 20 20 20 20 20 20 20  20 3b 33 0d 0f 00 04 0d  |}        ;3.....|
00002870  0f 0a 42 20 6d 6f 76 20  20 20 72 30 2c 23 25 30  |..B mov   r0,#%0|
00002880  30 30 30 31 30 30 30 20  20 20 20 20 20 20 20 3b  |0001000        ;|
00002890  41 6e 64 20 72 65 74 75  72 6e 20 77 69 74 68 20  |And return with |
000028a0  56 6f 69 63 65 2d 41 63  74 69 76 65 2d 46 6c 61  |Voice-Active-Fla|
000028b0  67 0d 0f 14 15 20 6c 64  72 20 20 20 72 31 33 2c  |g.... ldr   r13,|
000028c0  56 73 74 61 63 6b 0d 0f  1e 1c 20 74 65 71 50 20  |Vstack.... teqP |
000028d0  20 70 63 2c 23 28 30 3c  3c 32 37 29 20 84 20 25  | pc,#(0<<27) . %|
000028e0  31 30 0d 0f 28 14 20 6c  64 6d 66 64 20 72 31 33  |10..(. ldmfd r13|
000028f0  21 2c 7b 70 63 7d 0d 0f  32 04 0d 0f 3c 18 2e 56  |!,{pc}..2...<..V|
00002900  73 74 61 63 6b 20 20 20  20 20 20 20 64 63 64 20  |stack       dcd |
00002910  30 30 0d 0f 46 09 2e 48  65 61 64 0d 0f 50 4a 20  |00..F..Head..PJ |
00002920  64 63 64 20 30 20 20 20  20 20 20 20 20 20 20 20  |dcd 0           |
00002930  20 20 20 20 20 20 20 20  20 20 20 3b 72 31 20 50  |           ;r1 P|
00002940  6f 73 20 69 6e 20 73 61  6d 70 6c 65 20 28 31 36  |os in sample (16|
00002950  62 69 74 20 66 69 78 20  70 6f 69 6e 74 20 4f 66  |bit fix point Of|
00002960  66 73 65 74 29 0d 0f 5a  48 20 64 63 64 20 30 20  |fset)..ZH dcd 0 |
00002970  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002980  20 20 20 20 20 3b 72 32  20 50 69 74 63 68 20 28  |     ;r2 Pitch (|
00002990  66 69 78 70 6f 69 6e 74  2c 20 75 73 65 73 20 6c  |fixpoint, uses l|
000029a0  6f 77 65 72 20 33 20 62  79 74 65 73 29 0d 0f 64  |ower 3 bytes)..d|
000029b0  31 20 64 63 64 20 30 20  20 20 20 20 20 20 20 20  |1 dcd 0         |
000029c0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 72 33  |             ;r3|
000029d0  20 53 61 6d 70 6c 65 20  41 64 72 65 73 73 0d 0f  | Sample Adress..|
000029e0  6e 2a 20 64 63 64 20 30  20 20 20 20 20 20 20 20  |n* dcd 0        |
000029f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 72  |              ;r|
00002a00  34 20 4c 65 6e 67 74 68  0d 0f 78 41 20 64 63 64  |4 Length..xA dcd|
00002a10  20 30 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | 0              |
00002a20  20 20 20 20 20 20 20 20  3b 72 35 20 56 6f 6c 75  |        ;r5 Volu|
00002a30  6d 65 20 28 30 3d 4c 6f  75 64 20 2e 2e 2e 20 32  |me (0=Loud ... 2|
00002a40  35 35 3d 51 75 69 65 74  29 0d 0f 82 4d 20 64 63  |55=Quiet)...M dc|
00002a50  64 20 30 20 20 20 20 20  20 20 20 20 20 20 20 20  |d 0             |
00002a60  20 20 20 20 20 20 20 20  20 3b 72 36 20 52 65 70  |         ;r6 Rep|
00002a70  41 74 20 28 4e 65 77 20  66 69 78 70 6f 69 6e 74  |At (New fixpoint|
00002a80  20 50 6f 73 29 2c 20 6f  72 20 30 20 66 6f 72 20  | Pos), or 0 for |
00002a90  4e 4f 20 52 45 50 0d 0f  8c 42 20 64 63 64 20 30  |NO REP...B dcd 0|
00002aa0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002ab0  20 20 20 20 20 20 3b 42  79 74 65 20 2b 32 34 20  |      ;Byte +24 |
00002ac0  56 61 6c 75 65 20 66 6f  72 20 41 75 74 6f 20 56  |Value for Auto V|
00002ad0  6f 6c 75 6d 65 20 75 70  0d 0f 96 44 20 20 20 20  |olume up...D    |
00002ae0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002af0  20 20 20 20 20 20 20 20  3b 20 20 20 20 20 20 32  |        ;      2|
00002b00  35 20 20 20 22 20 20 20  20 22 20 20 20 22 20 20  |5   "    "   "  |
00002b10  20 56 6f 6c 75 6d 65 20  64 6f 77 6e 0d 0f a0 41  | Volume down...A|
00002b20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002b30  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 20 20  |            ;   |
00002b40  20 20 20 32 36 20 20 20  22 20 20 20 20 22 20 20  |   26   "    "  |
00002b50  20 22 20 20 20 50 69 74  63 68 20 75 70 0d 0f aa  | "   Pitch up...|
00002b60  43 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |C               |
00002b70  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 20  |             ;  |
00002b80  20 20 20 20 32 37 20 20  20 22 20 20 20 20 22 20  |    27   "    " |
00002b90  20 20 22 20 20 20 50 69  74 63 68 20 64 6f 77 6e  |  "   Pitch down|
00002ba0  0d 0f b4 3a 20 64 63 64  20 30 20 20 20 20 20 20  |...: dcd 0      |
00002bb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002bc0  3b 42 79 74 65 20 2b 32  38 20 41 63 74 75 61 6c  |;Byte +28 Actual|
00002bd0  20 49 6e 66 6f 20 42 79  74 65 0d 0f be 3a 20 20  | Info Byte...:  |
00002be0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002bf0  20 20 20 20 20 20 20 20  20 20 3b 20 20 20 20 20  |          ;     |
00002c00  20 32 39 20 41 63 74 75  61 6c 20 43 6f 6d 6d 20  | 29 Actual Comm |
00002c10  42 79 74 65 0d 0f c8 39  20 20 20 20 20 20 20 20  |Byte...9        |
00002c20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002c30  20 20 20 20 3b 20 20 20  20 20 20 33 30 20 28 53  |    ;      30 (S|
00002c40  6f 75 6e 64 20 46 58 20  46 6c 61 67 29 0d 0f d2  |ound FX Flag)...|
00002c50  3e 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |>               |
00002c60  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 20  |             ;  |
00002c70  20 20 20 20 33 31 20 4c  61 73 74 20 6c 65 67 61  |    31 Last lega|
00002c80  6c 20 74 6f 6e 65 2f 6e  6f 74 65 0d 0f dc 04 0d  |l tone/note.....|
00002c90  0f e6 28 20 64 63 62 20  c4 33 2a 33 32 2c bd 30  |..( dcb .3*32,.0|
00002ca0  29 20 20 20 20 3b 20 41  64 64 20 33 20 6f 72 20  |)    ; Add 3 or |
00002cb0  37 20 48 65 61 64 73 0d  0f f0 04 0d 0f fa 4d 3b  |7 Heads.......M;|
00002cc0  3d 3d 3d 3d 20 50 4c 41  59 20 45 56 45 4e 54 20  |==== PLAY EVENT |
00002cd0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00002d00  3d 3d 3d 3d 3d 3d 3d 3d  0d 10 04 05 20 0d 10 0e  |========.... ...|
00002d10  3d 3b 2a 2a 2a 20 44 4f  20 45 56 45 52 59 20 56  |=;*** DO EVERY V|
00002d20  53 59 4e 43 20 45 46 46  45 43 54 53 20 28 23 72  |SYNC EFFECTS (#r|
00002d30  30 3d 54 69 6d 65 72 20  2e 2e 2e 20 24 72 30 3d  |0=Timer ... $r0=|
00002d40  70 72 65 73 65 72 76 65  64 29 0d 10 18 04 0d 10  |preserved)......|
00002d50  22 0d 2e 76 65 66 66 65  63 74 73 0d 10 2c 33 20  |"..veffects..,3 |
00002d60  6c 64 72 20 20 20 72 34  2c 5b 72 31 32 2c 23 34  |ldr   r4,[r12,#4|
00002d70  5d 20 20 20 20 20 20 20  20 20 20 3b 4c 6f 61 64  |]          ;Load|
00002d80  20 63 75 72 72 65 6e 74  20 50 69 74 63 68 0d 10  | current Pitch..|
00002d90  36 4a 20 63 6d 70 20 20  20 72 34 2c 23 30 20 20  |6J cmp   r4,#0  |
00002da0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 4e  |              ;N|
00002db0  6f 20 61 63 74 69 76 65  20 74 6f 6e 65 20 2d 3e  |o active tone ->|
00002dc0  20 73 6f 72 72 79 2c 20  65 66 66 65 63 74 20 64  | sorry, effect d|
00002dd0  69 73 61 62 6c 65 64 21  0d 10 40 11 20 6d 6f 76  |isabled!..@. mov|
00002de0  45 71 20 70 63 2c 72 31  34 0d 10 4a 32 20 6c 64  |Eq pc,r14..J2 ld|
00002df0  72 20 20 20 72 33 2c 5b  72 31 32 2c 23 32 34 5d  |r   r3,[r12,#24]|
00002e00  20 20 20 20 20 20 20 20  20 3b 4c 6f 61 64 20 41  |         ;Load A|
00002e10  75 74 6f 2d 45 66 66 65  63 74 73 0d 10 54 29 20  |uto-Effects..T) |
00002e20  6d 6f 76 20 20 20 72 31  30 2c 72 31 34 20 20 20  |mov   r10,r14   |
00002e30  20 20 20 20 20 20 20 20  20 20 20 3b 50 75 73 68  |           ;Push|
00002e40  20 72 31 34 0d 10 5e 39  20 61 6e 64 53 20 20 72  | r14..^9 andS  r|
00002e50  32 2c 72 33 2c 23 26 66  66 20 20 20 20 20 20 20  |2,r3,#&ff       |
00002e60  20 20 20 20 3b 49 73 20  74 68 65 72 65 20 41 75  |    ;Is there Au|
00002e70  74 6f 20 56 6f 6c 75 6d  65 20 75 70 3f 0d 10 68  |to Volume up?..h|
00002e80  12 20 62 6c 4e 65 20 20  76 5f 76 6f 6c 75 70 0d  |. blNe  v_volup.|
00002e90  10 72 3b 20 61 6e 64 53  20 20 72 32 2c 72 33 2c  |.r; andS  r2,r3,|
00002ea0  23 26 66 66 20 3c 3c 38  20 20 20 20 20 20 20 3b  |#&ff <<8       ;|
00002eb0  49 73 20 74 68 65 72 65  20 41 75 74 6f 20 56 6f  |Is there Auto Vo|
00002ec0  6c 75 6d 65 20 64 6f 77  6e 3f 0d 10 7c 16 20 6d  |lume down?..|. m|
00002ed0  6f 76 4e 65 20 72 32 2c  72 32 2c 6c 73 72 23 38  |ovNe r2,r2,lsr#8|
00002ee0  0d 10 86 14 20 62 6c 4e  65 20 20 76 5f 76 6f 6c  |.... blNe  v_vol|
00002ef0  64 6f 77 6e 0d 10 90 38  20 61 6e 64 53 20 20 72  |down...8 andS  r|
00002f00  32 2c 72 33 2c 23 26 66  66 20 3c 3c 31 36 20 20  |2,r3,#&ff <<16  |
00002f10  20 20 20 20 3b 49 73 20  74 68 65 72 65 20 41 75  |    ;Is there Au|
00002f20  74 6f 20 50 69 74 63 68  20 75 70 3f 0d 10 9a 17  |to Pitch up?....|
00002f30  20 6d 6f 76 4e 65 20 72  32 2c 72 32 2c 6c 73 72  | movNe r2,r2,lsr|
00002f40  23 31 36 0d 10 a4 12 20  62 6c 4e 65 20 20 76 5f  |#16.... blNe  v_|
00002f50  61 72 63 75 70 0d 10 ae  3a 20 61 6e 64 53 20 20  |arcup...: andS  |
00002f60  72 32 2c 72 33 2c 23 26  66 66 20 3c 3c 32 34 20  |r2,r3,#&ff <<24 |
00002f70  20 20 20 20 20 3b 49 73  20 74 68 65 72 65 20 41  |     ;Is there A|
00002f80  75 74 6f 20 50 69 74 63  68 20 64 6f 77 6e 3f 0d  |uto Pitch down?.|
00002f90  10 b8 17 20 6d 6f 76 4e  65 20 72 32 2c 72 32 2c  |... movNe r2,r2,|
00002fa0  6c 73 72 23 32 34 0d 10  c2 14 20 62 6c 4e 65 20  |lsr#24.... blNe |
00002fb0  20 76 5f 61 72 63 64 6f  77 6e 0d 10 cc 29 20 6d  | v_arcdown...) m|
00002fc0  6f 76 20 20 20 72 31 34  2c 72 31 30 20 20 20 20  |ov   r14,r10    |
00002fd0  20 20 20 20 20 20 20 20  20 20 3b 50 6f 70 20 20  |          ;Pop  |
00002fe0  72 31 34 0d 10 d6 04 0d  10 e0 4b 20 6c 64 72 20  |r14.......K ldr |
00002ff0  20 20 72 31 2c 5b 72 31  32 2c 23 32 38 5d 20 20  |  r1,[r12,#28]  |
00003000  20 20 20 20 20 20 20 3b  45 66 66 65 63 74 20 4c  |       ;Effect L|
00003010  57 6f 72 64 20 26 20 4c  61 73 74 20 54 6f 6e 65  |Word & Last Tone|
00003020  20 61 72 65 20 69 6e 20  74 68 65 20 48 65 61 64  | are in the Head|
00003030  65 72 0d 10 ea 31 20 61  6e 64 53 20 20 72 32 2c  |er...1 andS  r2,|
00003040  72 31 2c 23 26 66 66 20  20 20 20 20 20 20 20 20  |r1,#&ff         |
00003050  20 20 3b 49 73 6f 6c 61  74 65 20 49 6e 66 6f 42  |  ;Isolate InfoB|
00003060  79 74 65 0d 10 f4 45 20  6d 6f 76 45 71 20 70 63  |yte...E movEq pc|
00003070  2c 72 31 34 20 20 20 20  20 20 20 20 20 20 20 20  |,r14            |
00003080  20 20 20 3b 69 66 20 30  2c 20 74 68 65 6e 20 74  |   ;if 0, then t|
00003090  68 65 72 65 27 73 20 6e  6f 20 65 66 66 65 63 74  |here's no effect|
000030a0  20 61 74 20 61 6c 6c 21  0d 10 fe 36 20 61 6e 64  | at all!...6 and|
000030b0  20 20 20 72 33 2c 72 31  2c 23 26 66 66 30 30 20  |   r3,r1,#&ff00 |
000030c0  20 20 20 20 20 20 20 20  3b 49 73 6f 6c 61 74 65  |        ;Isolate|
000030d0  20 45 66 66 65 63 74 20  6e 75 6d 62 65 72 0d 11  | Effect number..|
000030e0  08 4d 20 6c 64 72 20 20  20 72 33 2c 5b 70 63 2c  |.M ldr   r3,[pc,|
000030f0  72 33 2c 6c 73 72 23 36  5d 20 20 20 20 20 3b 6c  |r3,lsr#6]     ;l|
00003100  73 72 23 38 20 66 6f 72  20 65 66 66 65 63 74 20  |sr#8 for effect |
00003110  69 6e 74 6f 20 6c 6f 77  62 79 74 65 20 26 20 6c  |into lowbyte & l|
00003120  73 6c 23 32 20 66 6f 72  20 2a 34 0d 11 12 13 20  |sl#2 for *4.... |
00003130  61 64 64 20 20 20 70 63  2c 70 63 2c 72 33 0d 11  |add   pc,pc,r3..|
00003140  1c 04 0d 11 26 2e 20 64  63 64 20 20 20 76 5f 61  |....&. dcd   v_a|
00003150  72 70 65 67 67 69 6f 2d  76 6f 66 31 20 20 20 20  |rpeggio-vof1    |
00003160  20 20 3b 20 30 20 3d 20  41 72 70 65 67 67 69 6f  |  ; 0 = Arpeggio|
00003170  0d 11 30 09 2e 76 6f 66  31 0d 11 3a 46 20 64 63  |..0..vof1..:F dc|
00003180  64 20 20 20 76 5f 73 6c  69 64 65 75 70 2d 76 6f  |d   v_slideup-vo|
00003190  66 31 20 20 20 20 20 20  20 3b 20 31 20 3d 20 53  |f1       ; 1 = S|
000031a0  6c 69 64 65 20 50 69 74  63 68 20 75 70 20 20 20  |lide Pitch up   |
000031b0  28 74 69 6c 6c 20 41 6d  69 73 20 4d 61 78 29 0d  |(till Amis Max).|
000031c0  11 44 46 20 64 63 64 20  20 20 76 5f 73 6c 69 64  |.DF dcd   v_slid|
000031d0  65 64 6f 77 6e 2d 76 6f  66 31 20 20 20 20 20 3b  |edown-vof1     ;|
000031e0  20 32 20 3d 20 53 6c 69  64 65 20 50 69 74 63 68  | 2 = Slide Pitch|
000031f0  20 64 6f 77 6e 20 28 74  69 6c 6c 20 41 6d 69 73  | down (till Amis|
00003200  20 4d 69 6e 29 0d 11 4e  2f 20 64 63 64 20 20 20  | Min)..N/ dcd   |
00003210  76 5f 76 6f 6c 75 70 2d  76 6f 66 31 20 20 20 20  |v_volup-vof1    |
00003220  20 20 20 20 20 3b 20 33  20 3d 20 56 6f 6c 75 6d  |     ; 3 = Volum|
00003230  65 20 75 70 0d 11 58 31  20 64 63 64 20 20 20 76  |e up..X1 dcd   v|
00003240  5f 76 6f 6c 64 6f 77 6e  2d 76 6f 66 31 20 20 20  |_voldown-vof1   |
00003250  20 20 20 20 3b 20 34 20  3d 20 56 6f 6c 75 6d 65  |    ; 4 = Volume|
00003260  20 64 6f 77 6e 0d 11 62  38 20 64 63 64 20 20 20  | down..b8 dcd   |
00003270  76 5f 61 72 63 75 70 2d  76 6f 66 31 20 20 20 20  |v_arcup-vof1    |
00003280  20 20 20 20 20 3b 20 35  20 3d 20 53 6c 69 64 65  |     ; 5 = Slide|
00003290  20 41 72 63 20 50 69 74  63 68 20 75 70 0d 11 6c  | Arc Pitch up..l|
000032a0  3a 20 64 63 64 20 20 20  76 5f 61 72 63 64 6f 77  |: dcd   v_arcdow|
000032b0  6e 2d 76 6f 66 31 20 20  20 20 20 20 20 3b 20 36  |n-vof1       ; 6|
000032c0  20 3d 20 53 6c 69 64 65  20 41 72 63 20 50 69 74  | = Slide Arc Pit|
000032d0  63 68 20 64 6f 77 6e 0d  11 76 04 0d 11 80 0f 2e  |ch down..v......|
000032e0  76 5f 61 72 70 65 67 67  69 6f 0d 11 8a 42 20 6d  |v_arpeggio...B m|
000032f0  6f 76 20 20 20 72 31 2c  72 31 2c 6c 73 72 23 32  |ov   r1,r1,lsr#2|
00003300  34 20 20 20 20 20 20 20  20 20 3b 47 65 74 20 6c  |4         ;Get l|
00003310  61 73 74 20 73 74 6f 72  65 64 20 54 6f 6e 65 20  |ast stored Tone |
00003320  69 6e 74 6f 20 6c 6f 77  62 79 74 65 0d 11 94 2a  |into lowbyte...*|
00003330  20 63 6d 70 20 20 20 72  30 2c 23 31 20 20 20 20  | cmp   r0,#1    |
00003340  20 20 20 20 20 20 20 20  20 20 20 20 3b 54 69 6d  |            ;Tim|
00003350  65 3d 31 20 6f 72 0d 11  9e 27 20 63 6d 70 4e 65  |e=1 or...' cmpNe|
00003360  20 72 30 2c 23 34 20 20  20 20 20 20 20 20 20 20  | r0,#4          |
00003370  20 20 20 20 20 20 3b 54  69 6d 65 3d 34 0d 11 a8  |      ;Time=4...|
00003380  46 20 61 64 64 45 71 20  72 31 2c 72 20 72 31 2c  |F addEq r1,r r1,|
00003390  72 20 32 2c 6c 73 72 23  34 20 20 20 20 20 20 20  |r 2,lsr#4       |
000033a0  3b 20 2e 2e 2e 74 68 65  6e 20 61 64 64 20 20 6c  |; ...then add  l|
000033b0  65 66 74 20 49 6e 66 6f  4e 69 62 62 6c 65 20 74  |eft InfoNibble t|
000033c0  6f 20 4e 6f 74 65 0d 11  b2 2a 20 63 6d 70 20 20  |o Note...* cmp  |
000033d0  20 72 30 2c 23 32 20 20  20 20 20 20 20 20 20 20  | r0,#2          |
000033e0  20 20 20 20 20 20 3b 54  69 6d 65 3d 32 20 6f 72  |      ;Time=2 or|
000033f0  0d 11 bc 27 20 63 6d 70  4e 65 20 72 30 2c 23 35  |...' cmpNe r0,#5|
00003400  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003410  3b 54 69 6d 65 3d 35 0d  11 c6 46 20 61 6e 64 45  |;Time=5...F andE|
00003420  71 20 72 32 2c 72 32 2c  23 26 30 66 20 20 20 20  |q r2,r2,#&0f    |
00003430  20 20 20 20 20 20 20 3b  20 2e 2e 2e 74 68 65 6e  |       ; ...then|
00003440  20 61 64 64 20 72 69 67  68 74 20 49 6e 66 6f 4e  | add right InfoN|
00003450  69 62 62 6c 65 20 74 6f  20 4e 6f 74 65 0d 11 d0  |ibble to Note...|
00003460  13 20 61 64 64 45 71 20  72 31 2c 72 20 72 31 2c  |. addEq r1,r r1,|
00003470  72 20 32 0d 11 da 49 20  6c 64 72 20 20 20 72 31  |r 2...I ldr   r1|
00003480  2c 5b 72 31 2c 5b 72 31  2c 31 2c 6c 73 6c 23 32  |,[r1,[r1,1,lsl#2|
00003490  5d 20 20 20 20 3b 47 65  74 20 65 71 75 69 76 61  |]    ;Get equiva|
000034a0  6c 65 6e 74 20 46 72 65  71 75 65 6e 63 79 20 66  |lent Frequency f|
000034b0  72 6f 6d 20 72 31 31 3d  66 54 61 62 6c 65 0d 11  |rom r11=fTable..|
000034c0  e4 2c 20 73 74 72 20 20  20 72 31 2c 5b 72 31 32  |., str   r1,[r12|
000034d0  2c 23 34 5d 20 20 20 20  20 20 20 20 20 20 3b 45  |,#4]          ;E|
000034e0  6e 74 65 72 20 50 69 74  63 68 0d 11 ee 11 20 6d  |nter Pitch.... m|
000034f0  6f 76 20 20 20 70 63 2c  72 31 34 0d 11 f8 04 0d  |ov   pc,r14.....|
00003500  12 02 0e 2e 76 5f 73 6c  69 64 65 75 70 0d 12 0c  |....v_slideup...|
00003510  32 20 61 64 64 20 20 20  72 31 2c 72 34 2c 72 32  |2 add   r1,r4,r2|
00003520  2c 6c 73 6c 23 36 20 20  20 20 20 20 20 3b 20 46  |,lsl#6       ; F|
00003530  72 65 71 2b 49 6e 66 6f  42 79 74 65 2a 36 34 0d  |req+InfoByte*64.|
00003540  12 16 44 20 63 6d 70 20  20 20 72 31 2c 23 26 31  |..D cmp   r1,#&1|
00003550  38 38 30 30 20 20 20 20  20 20 20 20 20 20 20 3b  |8800           ;|
00003560  4d 69 6e 20 50 65 72 20  3d 20 26 30 37 31 2c 20  |Min Per = &071, |
00003570  69 65 20 4f 75 74 50 75  74 46 20 3c 20 26 31 38  |ie OutPutF < &18|
00003580  34 44 41 0d 12 20 16 20  73 74 72 4c 74 20 72 31  |4DA.. . strLt r1|
00003590  2c 5b 72 31 32 2c 23 34  5d 0d 12 2a 11 20 6d 6f  |,[r12,#4]..*. mo|
000035a0  76 20 20 20 70 63 2c 72  31 34 0d 12 34 10 2e 76  |v   pc,r14..4..v|
000035b0  5f 73 6c 69 64 65 64 6f  77 6e 0d 12 3e 32 20 73  |_slidedown..>2 s|
000035c0  75 62 20 20 20 72 31 2c  72 34 2c 72 32 2c 6c 73  |ub   r1,r4,r2,ls|
000035d0  6c 23 36 20 20 20 20 20  20 20 3b 20 46 72 65 71  |l#6       ; Freq|
000035e0  2d 49 6e 66 6f 42 79 74  65 2a 36 34 0d 12 48 44  |-InfoByte*64..HD|
000035f0  20 63 6d 70 20 20 20 72  31 2c 23 26 33 33 34 30  | cmp   r1,#&3340|
00003600  20 20 20 20 20 20 20 20  20 20 20 20 3b 4d 61 78  |            ;Max|
00003610  20 50 65 72 20 3d 20 26  33 35 38 2c 20 69 65 20  | Per = &358, ie |
00003620  4f 75 74 50 75 74 46 20  3e 20 26 20 33 33 35 35  |OutPutF > & 3355|
00003630  0d 12 52 16 20 73 74 72  47 74 20 72 31 2c 5b 72  |..R. strGt r1,[r|
00003640  31 32 2c 23 34 5d 0d 12  5c 11 20 6d 6f 76 20 20  |12,#4]..\. mov  |
00003650  20 70 63 2c 72 31 34 0d  12 66 04 0d 12 70 0c 2e  | pc,r14..f...p..|
00003660  76 5f 76 6f 6c 75 70 0d  12 7a 4a 20 63 6d 70 20  |v_volup..zJ cmp |
00003670  20 20 72 30 2c 23 31 20  20 20 20 20 20 20 20 20  |  r0,#1         |
00003680  20 20 20 20 20 20 20 3b  4f 6e 6c 79 20 65 61 63  |       ;Only eac|
00003690  68 20 66 69 72 73 74 20  76 5f 69 6e 74 65 72 72  |h first v_interr|
000036a0  75 70 74 20 66 6f 72 20  73 6c 6f 77 20 64 6f 77  |upt for slow dow|
000036b0  6e 0d 12 84 11 20 6d 6f  76 4e 65 20 70 63 2c 72  |n.... movNe pc,r|
000036c0  31 34 0d 12 8e 38 20 6c  64 72 20 20 20 72 31 2c  |14...8 ldr   r1,|
000036d0  5b 72 31 32 2c 23 31 36  5d 20 20 20 20 20 20 20  |[r12,#16]       |
000036e0  20 20 3b 54 68 65 72 65  20 69 73 20 63 75 72 72  |  ;There is curr|
000036f0  65 6e 74 20 56 6f 6c 75  6d 65 0d 12 98 13 20 73  |ent Volume.... s|
00003700  75 62 53 20 20 72 31 2c  72 20 72 31 2c 72 20 32  |ubS  r1,r r1,r 2|
00003710  0d 12 a2 4a 20 73 74 72  50 6c 20 72 31 2c 5b 72  |...J strPl r1,[r|
00003720  31 32 2c 23 31 36 5d 20  20 20 20 20 20 20 20 20  |12,#16]         |
00003730  3b 49 66 20 6e 6f 74 20  3e 20 30 20 20 28 4d 61  |;If not > 0  (Ma|
00003740  78 20 56 6f 6c 29 2c 20  74 68 65 6e 20 77 72 69  |x Vol), then wri|
00003750  74 65 20 69 74 20 62 61  63 6b 0d 12 ac 11 20 6d  |te it back.... m|
00003760  6f 76 20 20 20 70 63 2c  72 31 34 0d 12 b6 0e 2e  |ov   pc,r14.....|
00003770  76 5f 76 6f 6c 64 6f 77  6e 0d 12 c0 10 20 63 6d  |v_voldown.... cm|
00003780  70 20 20 20 72 30 2c 23  31 0d 12 ca 11 20 6d 6f  |p   r0,#1.... mo|
00003790  76 4e 65 20 70 63 2c 72  31 34 0d 12 d4 17 20 6c  |vNe pc,r14.... l|
000037a0  64 72 20 20 20 72 31 2c  5b 72 31 32 2c 23 31 36  |dr   r1,[r12,#16|
000037b0  5d 0d 12 de 13 20 61 64  64 20 20 20 72 64 20 20  |].... add   rd  |
000037c0  20 72 64 00 00 64 32 0d  12 e8 12 20 63 6d 70 20  | rd..d2.... cmp |
000037d0  20 20 72 31 2c 23 32 35  35 0d 12 f2 4a 20 73 74  |  r1,#255...J st|
000037e0  72 4c 73 20 72 31 2c 5b  72 31 32 2c 23 31 36 5d  |rLs r1,[r12,#16]|
000037f0  20 20 20 20 20 20 20 20  20 3b 49 66 20 6e 6f 74  |         ;If not|
00003800  20 3c 32 35 35 20 28 4d  69 6e 20 56 6f 6c 29 2c  | <255 (Min Vol),|
00003810  20 74 68 65 6e 20 77 72  69 74 65 20 69 74 20 62  | then write it b|
00003820  61 63 6b 0d 12 fc 11 20  6d 6f 76 20 20 20 70 63  |ack.... mov   pc|
00003830  2c 72 31 34 0d 13 06 04  0d 13 10 0c 2e 76 5f 61  |,r14.........v_a|
00003840  72 63 75 70 0d 13 1a 45  20 61 64 64 53 20 20 72  |rcup...E addS  r|
00003850  31 2c 72 34 2c 72 32 2c  6c 73 6c 23 34 20 20 20  |1,r4,r2,lsl#4   |
00003860  20 20 20 20 3b 50 69 74  63 68 2b 49 6e 66 6f 42  |    ;Pitch+InfoB|
00003870  79 74 65 2a 31 36 20 28  66 6f 72 20 73 6c 6f 77  |yte*16 (for slow|
00003880  20 73 6c 69 64 69 6e 67  29 0d 13 24 16 20 73 74  | sliding)..$. st|
00003890  72 50 6c 20 72 31 2c 5b  72 31 32 2c 23 34 5d 0d  |rPl r1,[r12,#4].|
000038a0  13 2e 11 20 6d 6f 76 20  20 20 70 63 2c 72 31 34  |... mov   pc,r14|
000038b0  0d 13 38 0e 2e 76 5f 61  72 63 64 6f 77 6e 0d 13  |..8..v_arcdown..|
000038c0  42 45 20 73 75 62 53 20  20 72 31 2c 72 34 2c 72  |BE subS  r1,r4,r|
000038d0  32 2c 6c 73 6c 23 34 20  20 20 20 20 20 20 3b 50  |2,lsl#4       ;P|
000038e0  69 74 63 68 2d 49 6e 66  6f 42 79 74 65 2a 31 36  |itch-InfoByte*16|
000038f0  20 28 66 6f 72 20 73 6c  6f 77 20 73 6c 69 64 69  | (for slow slidi|
00003900  6e 67 29 0d 13 4c 16 20  73 74 72 50 6c 20 72 31  |ng)..L. strPl r1|
00003910  2c 5b 72 31 32 2c 23 34  5d 0d 13 56 11 20 6d 6f  |,[r12,#4]..V. mo|
00003920  76 20 20 20 70 63 2c 72  31 34 0d 13 60 04 0d 13  |v   pc,r14..`...|
00003930  6a 1e 3b 2a 2a 2a 20 45  4e 54 52 59 20 c8 92 53  |j.;*** ENTRY ..S|
00003940  20 e3 20 47 41 4d 45 20  d4 20 46 58 0d 13 74 04  | . GAME . FX..t.|
00003950  0d 13 7e 08 2e 66 78 31  0d 13 88 18 20 61 64 72  |..~..fx1.... adr|
00003960  20 20 20 72 31 32 2c 48  65 61 64 2b 30 2a 33 32  |   r12,Head+0*32|
00003970  0d 13 92 10 20 62 20 20  20 20 20 66 78 34 2b 34  |.... b     fx4+4|
00003980  0d 13 9c 08 2e 66 78 32  0d 13 a6 18 20 61 64 72  |.....fx2.... adr|
00003990  20 20 20 72 31 32 2c 48  65 61 64 2b 31 2a 33 32  |   r12,Head+1*32|
000039a0  0d 13 b0 10 20 62 20 20  20 20 20 66 78 34 2b 34  |.... b     fx4+4|
000039b0  0d 13 ba 08 2e 66 78 33  0d 13 c4 18 20 61 64 72  |.....fx3.... adr|
000039c0  20 20 20 72 31 32 2c 48  65 61 64 2b 32 2a 33 32  |   r12,Head+2*32|
000039d0  0d 13 ce 10 20 62 20 20  20 20 20 66 78 34 2b 34  |.... b     fx4+4|
000039e0  0d 13 d8 08 2e 66 78 34  0d 13 e2 18 20 61 64 72  |.....fx4.... adr|
000039f0  20 20 20 72 31 32 2c 48  65 61 64 2b 33 2a 33 32  |   r12,Head+3*32|
00003a00  0d 13 ec 10 20 6d 6f 76  20 20 20 72 30 2c 23 31  |.... mov   r0,#1|
00003a10  0d 13 f6 31 20 73 74 72  42 20 20 72 30 2c 5b 72  |...1 strB  r0,[r|
00003a20  31 32 2c 23 33 30 5d 20  20 20 20 20 20 20 20 20  |12,#30]         |
00003a30  3b 53 65 74 20 53 6f 75  6e 64 46 58 20 66 6c 61  |;Set SoundFX fla|
00003a40  67 0d 14 00 14 20 61 64  72 20 20 20 72 31 30 2c  |g.... adr   r10,|
00003a50  54 72 61 63 6b 0d 14 0a  15 20 61 64 72 20 20 20  |Track.... adr   |
00003a60  72 31 31 2c 46 74 61 62  6c 65 0d 14 14 10 20 62  |r11,Ftable.... b|
00003a70  20 20 20 20 20 76 72 75  6c 65 0d 14 1e 04 0d 14  |     vrule......|
00003a80  28 46 3b 2a 2a 2a 20 a8  45 52 52 55 50 54 20 45  |(F;*** .ERRUPT E|
00003a90  4e 54 52 59 20 c8 92 20  28 23 72 30 3d 45 76 65  |NTRY .. (#r0=Eve|
00003aa0  6e 74 20 4e 6f 2c 20 72  31 32 3d 57 6f 72 6b 73  |nt No, r12=Works|
00003ab0  70 61 63 65 20 5b 68 65  72 65 20 48 65 61 64 41  |pace [here HeadA|
00003ac0  64 72 5d 29 0d 14 32 04  0d 14 3c 0b 2e 76 69 6e  |dr])..2...<..vin|
00003ad0  74 65 72 0d 14 46 4c 20  73 74 6d 66 64 20 72 31  |ter..FL stmfd r1|
00003ae0  33 21 2c 7b 72 31 2d 72  31 31 7d 20 20 20 20 20  |3!,{r1-r11}     |
00003af0  20 20 20 3b 46 6f 72 20  6e 6f 74 20 69 6e 74 65  |   ;For not inte|
00003b00  72 63 65 70 74 69 6e 67  20 76 65 63 74 6f 72 20  |rcepting vector |
00003b10  2d 3e 20 70 75 73 68 20  72 31 34 20 74 6f 6f 0d  |-> push r14 too.|
00003b20  14 50 04 0d 14 5a 4c 20  61 64 72 20 20 20 72 31  |.P...ZL adr   r1|
00003b30  31 2c 46 74 61 62 6c 65  20 20 20 20 20 20 20 20  |1,Ftable        |
00003b40  20 20 20 3b 72 31 31 20  26 20 72 31 32 20 70 6f  |   ;r11 & r12 po|
00003b50  69 6e 74 65 72 73 20 61  72 65 20 6e 65 65 64 65  |inters are neede|
00003b60  64 20 69 6e 20 62 6f 74  68 20 63 61 73 65 73 0d  |d in both cases.|
00003b70  14 64 04 0d 14 6e 35 20  6c 64 6d 44 62 20 72 31  |.d...n5 ldmDb r1|
00003b80  31 2c 7b 72 30 2c 72 31  7d 20 20 20 20 20 20 20  |1,{r0,r1}       |
00003b90  20 20 20 3b 4c 6f 61 64  20 43 6f 75 6e 74 65 72  |   ;Load Counter|
00003ba0  20 26 20 53 70 65 65 64  0d 14 78 29 20 61 64 64  | & Speed..x) add|
00003bb0  20 20 20 72 30 2c 72 30  2c 23 31 20 20 20 20 20  |   r0,r0,#1     |
00003bc0  20 20 20 20 20 20 20 20  3b 43 6f 75 6e 74 65 72  |        ;Counter|
00003bd0  2b 0d 14 82 35 20 63 6d  70 20 20 20 72 30 2c 72  |+...5 cmp   r0,r|
00003be0  31 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1               |
00003bf0  20 3b 49 66 20 3e 3d 20  53 70 65 65 64 2c 20 74  | ;If >= Speed, t|
00003c00  68 65 6e 2e 2e 2e 0d 14  8c 4d 20 6d 6f 76 48 73  |hen......M movHs|
00003c10  20 72 30 2c 23 30 20 20  20 20 20 20 20 20 20 20  | r0,#0          |
00003c20  20 20 20 20 20 20 3b 20  20 20 20 20 20 72 65 73  |      ;      res|
00003c30  65 74 20 43 6f 75 6e 74  65 72 20 20 20 20 7c 20  |et Counter    | |
00003c40  48 53 2c 20 63 61 75 73  65 20 53 65 74 5f 53 70  |HS, cause Set_Sp|
00003c50  65 65 64 0d 14 96 43 20  73 74 72 20 20 20 72 30  |eed...C str   r0|
00003c60  2c 5b 72 31 31 2c 23 2d  38 5d 20 20 20 20 20 20  |,[r11,#-8]      |
00003c70  20 20 20 3b 20 20 20 20  20 20 20 20 20 20 20 20  |   ;            |
00003c80  20 20 20 20 20 20 20 20  20 20 20 7c 20 63 6f 75  |           | cou|
00003c90  6c 64 20 73 65 74 0d 14  a0 4c 20 62 48 73 20 20  |ld set...L bHs  |
00003ca0  20 76 70 6c 61 79 20 20  20 20 20 20 20 20 20 20  | vplay          |
00003cb0  20 20 20 20 20 20 3b 20  20 20 20 26 20 50 6c 61  |      ;    & Pla|
00003cc0  79 20 6f 6e 65 20 72 6f  77 21 20 20 20 20 7c 20  |y one row!    | |
00003cd0  53 70 65 65 64 20 3c 20  43 6f 75 6e 74 65 72 2e  |Speed < Counter.|
00003ce0  2e 2e 0d 14 aa 04 0d 14  b4 3f 20 62 6c 20 20 20  |.........? bl   |
00003cf0  20 76 65 66 66 65 63 74  73 20 20 20 20 20 20 20  | veffects       |
00003d00  20 20 20 20 20 20 3b 57  65 6c 6c 2c 20 65 6c 73  |      ;Well, els|
00003d10  65 20 73 75 70 70 6f 72  74 20 74 68 65 20 65 66  |e support the ef|
00003d20  66 65 63 74 73 0d 14 be  16 20 61 64 64 20 20 20  |fects.... add   |
00003d30  72 31 32 2c 72 31 32 2c  23 33 32 0d 14 c8 23 20  |r12,r12,#32...# |
00003d40  62 6c 20 20 20 20 76 65  66 66 65 63 74 73 20 20  |bl    veffects  |
00003d50  20 20 20 20 20 20 20 20  20 20 20 3b 32 2e 0d 14  |           ;2...|
00003d60  d2 16 20 61 64 64 20 20  20 72 31 32 2c 72 31 32  |.. add   r12,r12|
00003d70  2c 23 33 32 0d 14 dc 23  20 62 6c 20 20 20 20 76  |,#32...# bl    v|
00003d80  65 66 66 65 63 74 73 20  20 20 20 20 20 20 20 20  |effects         |
00003d90  20 20 20 20 3b 33 2e 0d  14 e6 16 20 61 64 64 20  |    ;3..... add |
00003da0  20 20 72 31 32 2c 72 31  32 2c 23 33 32 0d 14 f0  |  r12,r12,#32...|
00003db0  23 20 62 6c 20 20 20 20  76 65 66 66 65 63 74 73  |# bl    veffects|
00003dc0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 34 2e  |             ;4.|
00003dd0  0d 14 fa 04 0d 15 04 27  20 6c 64 6d 66 64 20 72  |.......' ldmfd r|
00003de0  31 33 21 2c 7b 72 31 2d  72 31 31 2c 70 63 7d 20  |13!,{r1-r11,pc} |
00003df0  20 20 20 20 3b 52 65 74  75 72 6e 0d 15 0e 05 20  |    ;Return.... |
00003e00  0d 15 18 34 3b 2a 2a 2a  20 50 4c 41 59 20 ee 45  |...4;*** PLAY .E|
00003e10  20 50 41 54 54 45 52 4e  2d 50 4f 53 49 54 49 4f  | PATTERN-POSITIO|
00003e20  4e 20 28 41 4c 4c 20 34  2f 38 20 43 48 41 4e 4e  |N (ALL 4/8 CHANN|
00003e30  45 4c 53 29 0d 15 22 04  0d 15 2c 0a 2e 76 70 6c  |ELS).."...,..vpl|
00003e40  61 79 0d 15 36 17 20 61  64 72 20 20 20 72 36 2c  |ay..6. adr   r6,|
00003e50  52 65 67 69 73 74 65 72  73 0d 15 40 39 20 6c 64  |Registers..@9 ld|
00003e60  6d 49 61 20 72 36 2c 7b  72 37 2d 72 39 7d 20 20  |mIa r6,{r7-r9}  |
00003e70  20 20 20 20 20 20 20 20  20 3b 4c 6f 61 64 20 33  |         ;Load 3|
00003e80  20 77 6f 72 6b 69 6e 67  20 72 65 67 69 73 74 65  | working registe|
00003e90  72 73 0d 15 4a 14 20 61  64 72 20 20 20 72 31 30  |rs..J. adr   r10|
00003ea0  2c 54 72 61 63 6b 0d 15  54 04 0d 15 5e 23 20 62  |,Track..T...^# b|
00003eb0  6c 20 20 20 20 76 63 68  61 6e 6e 65 6c 20 20 20  |l    vchannel   |
00003ec0  20 20 20 20 20 20 20 20  20 20 3b 31 2e 0d 15 68  |          ;1...h|
00003ed0  16 20 61 64 64 20 20 20  72 31 32 2c 72 31 32 2c  |. add   r12,r12,|
00003ee0  23 33 32 0d 15 72 23 20  62 6c 20 20 20 20 76 63  |#32..r# bl    vc|
00003ef0  68 61 6e 6e 65 6c 20 20  20 20 20 20 20 20 20 20  |hannel          |
00003f00  20 20 20 3b 32 2e 0d 15  7c 16 20 61 64 64 20 20  |   ;2...|. add  |
00003f10  20 72 31 32 2c 72 31 32  2c 23 33 32 0d 15 86 23  | r12,r12,#32...#|
00003f20  20 62 6c 20 20 20 20 76  63 68 61 6e 6e 65 6c 20  | bl    vchannel |
00003f30  20 20 20 20 20 20 20 20  20 20 20 20 3b 33 2e 0d  |            ;3..|
00003f40  15 90 16 20 61 64 64 20  20 20 72 31 32 2c 72 31  |... add   r12,r1|
00003f50  32 2c 23 33 32 0d 15 9a  23 20 62 6c 20 20 20 20  |2,#32...# bl    |
00003f60  76 63 68 61 6e 6e 65 6c  20 20 20 20 20 20 20 20  |vchannel        |
00003f70  20 20 20 20 20 3b 34 2e  0d 15 a4 04 0d 15 ae 41  |     ;4........A|
00003f80  20 73 75 62 53 20 20 72  37 2c 72 37 2c 23 31 20  | subS  r7,r7,#1 |
00003f90  20 20 20 20 20 20 20 20  20 20 20 20 3b 50 61 74  |            ;Pat|
00003fa0  74 65 72 6e 5f 43 6f 75  6e 74 65 72 20 2d 20 31  |tern_Counter - 1|
00003fb0  2c 20 69 73 20 69 74 20  7a 65 72 6f 3f 0d 15 b8  |, is it zero?...|
00003fc0  31 20 73 74 6d 4e 65 49  61 20 72 36 2c 7b 72 37  |1 stmNeIa r6,{r7|
00003fd0  2d 72 38 7d 20 20 20 20  20 20 20 20 20 3b 4e 6f  |-r8}         ;No|
00003fe0  74 20 7a 65 72 6f 20 79  65 74 2c 20 73 6f 0d 15  |t zero yet, so..|
00003ff0  c2 48 20 6c 64 6d 4e 65  46 64 20 72 31 33 21 2c  |.H ldmNeFd r13!,|
00004000  7b 72 31 2d 72 31 31 2c  70 63 7d 20 20 20 3b 20  |{r1-r11,pc}   ; |
00004010  64 6f 6e 27 74 20 70 6c  61 79 20 6e 65 77 20 50  |don't play new P|
00004020  61 74 74 65 72 6e 2c 20  52 65 74 75 72 6e 20 69  |attern, Return i|
00004030  6e 73 74 65 61 64 0d 15  cc 04 0d 15 d6 48 20 6d  |nstead.......H m|
00004040  6f 76 20 20 20 72 37 2c  23 36 34 20 20 20 20 20  |ov   r7,#64     |
00004050  20 20 20 20 20 20 20 20  20 20 3b 57 65 6c 6c 2c  |          ;Well,|
00004060  20 6e 65 77 20 50 61 74  74 65 72 6e 20 62 65 67  | new Pattern beg|
00004070  69 6e 73 2c 20 77 69 74  68 20 43 6f 75 6e 74 3d  |ins, with Count=|
00004080  36 34 0d 15 e0 39 20 6c  64 72 42 20 20 72 30 2c  |64...9 ldrB  r0,|
00004090  5b 72 39 2c 23 31 5d 21  20 20 20 20 20 20 20 20  |[r9,#1]!        |
000040a0  20 20 3b 41 6e 64 20 67  65 74 20 6e 65 78 74 20  |  ;And get next |
000040b0  50 61 74 74 65 72 6e 20  4e 72 2e 0d 15 ea 31 20  |Pattern Nr....1 |
000040c0  63 6d 70 20 20 20 72 30  2c 23 26 66 66 20 20 20  |cmp   r0,#&ff   |
000040d0  20 20 20 20 20 20 20 20  20 20 20 3b 45 6e 64 20  |           ;End |
000040e0  6f 66 20 53 65 71 75 65  6e 63 65 3f 0d 15 f4 41  |of Sequence?...A|
000040f0  20 6c 64 72 45 71 20 72  39 2c 5b 72 31 30 2c 23  | ldrEq r9,[r10,#|
00004100  32 34 5d 20 20 20 20 20  20 20 20 20 3b 20 59 65  |24]         ; Ye|
00004110  61 68 20 2d 3e 20 52 65  73 65 74 20 53 65 71 75  |ah -> Reset Sequ|
00004120  65 6e 63 65 20 50 6f 69  6e 74 65 72 2c 0d 15 fe  |ence Pointer,...|
00004130  42 20 6c 64 72 45 71 42  20 30 2c 5b 72 39 5d 20  |B ldrEqB 0,[r9] |
00004140  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 20  |             ;  |
00004150  20 20 20 20 20 20 20 74  68 61 74 20 6d 65 61 6e  |       that mean|
00004160  73 20 72 65 73 74 61 72  74 20 53 6f 6e 67 21 0d  |s restart Song!.|
00004170  16 08 35 20 6c 64 72 20  20 20 72 38 2c 5b 72 31  |..5 ldr   r8,[r1|
00004180  30 2c 23 32 38 5d 20 20  20 20 20 20 20 20 20 3b  |0,#28]         ;|
00004190  41 64 64 72 65 73 73 20  50 61 74 74 65 72 6e 73  |Address Patterns|
000041a0  74 61 72 74 0d 16 12 2a  20 61 64 64 20 20 20 72  |tart...* add   r|
000041b0  38 2c 72 38 2c 72 30 2c  6c 73 6c 23 31 30 20 20  |8,r8,r0,lsl#10  |
000041c0  20 20 20 20 3b 2b 20 4e  72 2a 31 30 32 34 0d 16  |    ;+ Nr*1024..|
000041d0  1c 15 20 73 74 6d 49 61  20 72 36 2c 7b 72 37 2d  |.. stmIa r6,{r7-|
000041e0  72 39 7d 0d 16 26 27 20  6c 64 6d 66 64 20 72 31  |r9}..&' ldmfd r1|
000041f0  33 21 2c 7b 72 31 2d 72  31 31 2c 70 63 7d 20 20  |3!,{r1-r11,pc}  |
00004200  20 20 20 3b 52 65 74 75  72 6e 0d 16 30 04 0d 16  |   ;Return..0...|
00004210  3a 2f 3b 2a 2a 2a 20 53  55 50 50 4c 59 20 ee 45  |:/;*** SUPPLY .E|
00004220  20 43 48 41 4e 4e 45 4c  20 57 49 54 48 20 c7 96  | CHANNEL WITH ..|
00004230  20 49 4e 46 4f 52 4d 41  54 49 4f 4e 53 0d 16 44  | INFORMATIONS..D|
00004240  04 0d 16 4e 0d 2e 76 63  68 61 6e 6e 65 6c 0d 16  |...N..vchannel..|
00004250  58 48 20 6c 64 72 20 20  20 72 31 2c 5b 72 38 5d  |XH ldr   r1,[r8]|
00004260  2c 23 34 20 20 20 20 20  20 20 20 20 20 20 3b 50  |,#4           ;P|
00004270  61 74 74 65 72 6e 20 4c  57 6f 72 64 20 6f 66 20  |attern LWord of |
00004280  63 75 72 72 65 6e 74 20  50 61 74 74 5f 50 6f 73  |current Patt_Pos|
00004290  20 26 20 49 4e 43 0d 16  62 04 0d 16 6c 2f 20 6c  | & INC..b...l/ l|
000042a0  64 72 42 20 20 72 32 2c  5b 72 31 32 2c 23 33 30  |drB  r2,[r12,#30|
000042b0  5d 20 20 20 20 20 20 20  20 20 3b 49 73 20 53 6f  |]         ;Is So|
000042c0  75 6e 64 46 58 20 6f 6e  3f 0d 16 76 10 20 63 6d  |undFX on?..v. cm|
000042d0  70 20 20 20 72 32 2c 23  30 0d 16 80 26 20 62 45  |p   r2,#0...& bE|
000042e0  71 20 20 20 76 72 75 6c  65 20 20 20 20 20 20 20  |q   vrule       |
000042f0  20 20 20 20 20 20 20 20  20 3b 4e 6f 2e 2e 2e 0d  |         ;No....|
00004300  16 8a 16 20 6c 64 72 20  20 20 72 32 2c 5b 72 31  |... ldr   r2,[r1|
00004310  32 2c 23 34 5d 0d 16 94  41 20 63 6d 70 20 20 20  |2,#4]...A cmp   |
00004320  72 32 2c 23 30 20 20 20  20 20 20 20 20 20 20 20  |r2,#0           |
00004330  20 20 20 20 20 3b 59 65  73 2c 20 62 75 74 20 69  |     ;Yes, but i|
00004340  73 20 73 61 6d 70 6c 65  20 73 74 69 6c 6c 20 61  |s sample still a|
00004350  63 74 69 76 65 3f 0d 16  9e 31 20 73 74 72 45 71  |ctive?...1 strEq|
00004360  42 20 32 2c 5b 72 31 32  2c 23 33 30 5d 20 20 20  |B 2,[r12,#30]   |
00004370  20 20 20 20 20 20 3b 4e  6f 2c 20 73 6f 20 63 61  |      ;No, so ca|
00004380  6e 63 65 6c 20 46 58 0d  16 a8 11 20 6d 6f 76 20  |ncel FX.... mov |
00004390  20 20 70 63 2c 72 31 34  0d 16 b2 04 0d 16 bc 0a  |  pc,r14........|
000043a0  2e 76 72 75 6c 65 0d 16  c6 3b 20 6d 6f 76 53 20  |.vrule...; movS |
000043b0  20 72 30 2c 72 31 2c 6c  73 72 23 32 34 20 20 20  | r0,r1,lsr#24   |
000043c0  20 20 20 20 20 20 3b 49  73 6f 6c 61 74 65 20 54  |      ;Isolate T|
000043d0  6f 6e 65 20 26 20 49 73  20 69 74 20 7a 65 72 6f  |one & Is it zero|
000043e0  3f 0d 16 d0 46 20 62 45  71 20 20 20 76 63 6f 6d  |?...F bEq   vcom|
000043f0  6d 73 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |ms              |
00004400  20 3b 4e 6f 20 54 6f 6e  65 20 2d 3e 20 50 65 72  | ;No Tone -> Per|
00004410  68 61 70 73 20 73 74 69  6c 6c 20 61 20 43 6f 6d  |haps still a Com|
00004420  6d 61 6e 64 2e 2e 2e 0d  16 da 04 0d 16 e4 4b 20  |mand..........K |
00004430  73 74 72 42 20 20 72 30  2c 5b 72 31 32 2c 23 33  |strB  r0,[r12,#3|
00004440  31 5d 20 20 20 20 20 20  20 20 20 3b 53 74 6f 72  |1]         ;Stor|
00004450  65 20 6c 65 67 61 6c 20  54 6f 6e 65 20 66 6f 72  |e legal Tone for|
00004460  20 70 6f 73 73 2e 20 41  72 70 65 67 67 69 6f 20  | poss. Arpeggio |
00004470  65 66 66 65 63 74 0d 16  ee 49 20 6c 64 72 20 20  |effect...I ldr  |
00004480  20 72 30 2c 5b 72 31 31  2c 72 30 2c 6c 73 6c 23  | r0,[r11,r0,lsl#|
00004490  32 5d 20 20 20 20 3b 47  65 74 20 65 71 75 69 76  |2]    ;Get equiv|
000044a0  61 6c 65 6e 74 20 46 72  65 71 75 65 6e 63 79 20  |alent Frequency |
000044b0  66 72 6f 6d 20 72 31 31  3d 66 54 61 62 6c 65 0d  |from r11=fTable.|
000044c0  16 f8 2c 20 73 74 72 20  20 20 72 30 2c 5b 72 31  |.., str   r0,[r1|
000044d0  32 2c 23 34 5d 20 20 20  20 20 20 20 20 20 20 3b  |2,#4]          ;|
000044e0  45 6e 74 65 72 20 50 69  74 63 68 0d 17 02 3f 20  |Enter Pitch...? |
000044f0  61 6e 64 53 20 20 72 30  2c 72 31 2c 23 26 66 66  |andS  r0,r1,#&ff|
00004500  20 3c 3c 31 36 20 20 20  20 20 20 3b 49 73 6f 6c  | <<16      ;Isol|
00004510  61 74 65 20 49 6e 73 74  72 75 6d 65 6e 74 2d 42  |ate Instrument-B|
00004520  79 74 65 2c 20 7a 65 72  6f 3f 0d 17 0c 49 20 6c  |yte, zero?...I l|
00004530  64 72 45 71 20 72 30 2c  5b 72 31 32 2c 23 32 30  |drEq r0,[r12,#20|
00004540  5d 20 20 20 20 20 20 20  20 20 3b 20 59 20 2d 3e  |]         ; Y ->|
00004550  20 47 65 74 20 6f 6c 64  20 52 65 70 41 74 20 28  | Get old RepAt (|
00004560  70 65 72 68 61 70 73 20  61 20 52 65 70 54 6f 6e  |perhaps a RepTon|
00004570  65 21 29 0d 17 16 4c 20  73 74 72 45 71 20 72 30  |e!)...L strEq r0|
00004580  2c 5b 72 31 32 2c 23 30  30 5d 20 20 20 20 20 20  |,[r12,#00]      |
00004590  20 20 20 3b 20 20 20 20  26 20 53 65 74 20 61 73  |   ;    & Set as|
000045a0  20 6e 65 77 20 50 6f 73  20 28 73 61 6d 65 20 49  | new Pos (same I|
000045b0  6e 73 74 20 6f 6e 63 65  20 61 67 61 69 6e 29 0d  |nst once again).|
000045c0  17 20 11 20 62 45 71 20  20 20 76 63 6f 6d 6d 73  |. . bEq   vcomms|
000045d0  0d 17 2a 47 20 20 20 20  20 20 20 20 20 20 20 20  |..*G            |
000045e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000045f0  3b 45 6c 73 65 20 70 6f  69 6e 74 20 74 6f 20 49  |;Else point to I|
00004600  6e 73 74 50 6f 6f 6c 20  3d 20 54 72 61 63 6b 2b  |nstPool = Track+|
00004610  49 6e 73 74 2a 33 32 0d  17 34 4d 20 61 64 64 20  |Inst*32..4M add |
00004620  20 20 72 32 2c 72 31 30  2c 72 30 2c 6c 73 72 23  |  r2,r10,r0,lsr#|
00004630  31 31 20 20 20 20 20 3b  6c 73 72 23 31 36 20 66  |11     ;lsr#16 f|
00004640  6f 72 20 6c 6f 77 62 79  74 65 20 26 20 6c 73 6c  |or lowbyte & lsl|
00004650  23 35 20 66 6f 72 20 2a  33 32 20 3d 3e 20 6c 73  |#5 for *32 => ls|
00004660  72 23 31 31 0d 17 3e 42  20 6c 64 6d 49 61 20 72  |r#11..>B ldmIa r|
00004670  32 2c 7b 72 30 2c 72 32  2d 72 35 7d 20 20 20 20  |2,{r0,r2-r5}    |
00004680  20 20 20 20 3b 52 65 61  64 20 61 6c 6c 20 35 20  |    ;Read all 5 |
00004690  49 6e 73 74 50 6f 6f 6c  20 57 6f 72 64 73 20 61  |InstPool Words a|
000046a0  74 20 6f 6e 63 65 0d 17  48 35 20 73 74 72 20 20  |t once..H5 str  |
000046b0  20 72 30 2c 5b 72 31 32  2c 23 20 38 5d 20 20 20  | r0,[r12,# 8]   |
000046c0  20 20 20 20 20 20 3b 45  6e 74 65 72 20 53 61 6d  |      ;Enter Sam|
000046d0  70 6c 65 20 41 64 64 72  65 73 73 0d 17 52 2d 20  |ple Address..R- |
000046e0  73 74 72 20 20 20 72 33  2c 5b 72 31 32 2c 23 31  |str   r3,[r12,#1|
000046f0  36 5d 20 20 20 20 20 20  20 20 20 3b 45 6e 74 65  |6]         ;Ente|
00004700  72 20 56 6f 6c 75 6d 65  0d 17 5c 4c 20 6d 6f 76  |r Volume..\L mov|
00004710  53 20 20 72 30 2c 72 34  2c 6c 73 6c 23 31 36 20  |S  r0,r4,lsl#16 |
00004720  20 20 20 20 20 20 20 20  3b 50 6f 73 3d 52 65 70  |        ;Pos=Rep|
00004730  41 74 20 28 69 6e 20 31  36 2d 66 69 78 70 6f 69  |At (in 16-fixpoi|
00004740  6e 74 29 2c 20 62 75 74  20 69 73 20 69 74 20 7a  |nt), but is it z|
00004750  65 72 6f 3f 0d 17 66 4c  20 61 64 64 4e 65 20 72  |ero?..fL addNe r|
00004760  32 2c 72 34 2c 72 35 20  20 20 20 20 20 20 20 20  |2,r4,r5         |
00004770  20 20 20 20 3b 20 4e 6f  20 2d 3e 20 4c 65 6e 20  |    ; No -> Len |
00004780  28 61 62 73 6f 6c 75 74  65 20 66 72 6f 6d 20 30  |(absolute from 0|
00004790  29 20 3d 20 52 65 70 41  74 2b 52 65 70 4c 65 6e  |) = RepAt+RepLen|
000047a0  0d 17 70 4a 20 6d 6f 76  4e 65 20 72 34 2c 72 30  |..pJ movNe r4,r0|
000047b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000047c0  3b 20 20 20 20 2d 3e 20  48 65 61 64 20 4f 66 66  |;    -> Head Off|
000047d0  73 65 74 20 52 65 70 41  74 20 3d 20 66 69 78 70  |set RepAt = fixp|
000047e0  6f 69 6e 74 20 52 65 70  41 74 0d 17 7a 2a 20 73  |oint RepAt..z* s|
000047f0  74 72 20 20 20 72 30 2c  5b 72 31 32 2c 23 20 30  |tr   r0,[r12,# 0|
00004800  5d 20 20 20 20 20 20 20  20 20 3b 45 6e 74 65 72  |]         ;Enter|
00004810  20 50 6f 73 0d 17 84 2d  20 73 74 72 20 20 20 72  | Pos...- str   r|
00004820  32 2c 5b 72 31 32 2c 23  31 32 5d 20 20 20 20 20  |2,[r12,#12]     |
00004830  20 20 20 20 3b 45 6e 74  65 72 20 4c 65 6e 67 74  |    ;Enter Lengt|
00004840  68 0d 17 8e 2c 20 73 74  72 20 20 20 72 34 2c 5b  |h..., str   r4,[|
00004850  72 31 32 2c 23 32 30 5d  20 20 20 20 20 20 20 20  |r12,#20]        |
00004860  20 3b 45 6e 74 65 72 20  52 65 70 41 74 0d 17 98  | ;Enter RepAt...|
00004870  04 0d 17 a2 0b 2e 76 63  6f 6d 6d 73 0d 17 ac 43  |......vcomms...C|
00004880  20 61 6e 64 20 20 20 72  30 2c 72 31 2c 23 26 30  | and   r0,r1,#&0|
00004890  66 20 3c 3c 38 20 20 20  20 20 20 20 3b 49 73 6f  |f <<8       ;Iso|
000048a0  6c 61 74 65 20 43 6f 6d  6d 61 6e 64 2d 4e 69 62  |late Command-Nib|
000048b0  62 6c 65 20 66 72 6f 6d  20 44 61 74 61 4c 57 0d  |ble from DataLW.|
000048c0  17 b6 31 20 61 6e 64 20  20 20 72 32 2c 72 31 2c  |..1 and   r2,r1,|
000048d0  23 26 66 66 20 20 20 20  20 20 20 20 20 20 20 3b  |#&ff           ;|
000048e0  49 73 6f 6c 61 74 65 20  49 6e 66 6f 42 79 74 65  |Isolate InfoByte|
000048f0  0d 17 c0 4d 20 6c 64 72  20 20 20 72 33 2c 5b 70  |...M ldr   r3,[p|
00004900  63 2c 72 30 2c 6c 73 72  23 36 5d 20 20 20 20 20  |c,r0,lsr#6]     |
00004910  3b 6c 73 72 23 38 20 66  6f 72 20 4e 69 62 62 6c  |;lsr#8 for Nibbl|
00004920  65 20 69 6e 74 6f 20 6c  6f 77 62 79 74 65 20 26  |e into lowbyte &|
00004930  20 6c 73 6c 23 32 20 66  6f 72 20 2a 34 0d 17 ca  | lsl#2 for *4...|
00004940  13 20 61 64 64 20 20 20  70 63 2c 70 63 2c 72 33  |. add   pc,pc,r3|
00004950  0d 17 d4 04 0d 17 de 2c  20 64 63 64 20 20 20 76  |......., dcd   v|
00004960  65 66 2d 76 6f 66 32 20  20 20 20 20 20 20 20 20  |ef-vof2         |
00004970  20 20 20 20 3b 45 66 66  65 63 74 73 20 30 2e 2e  |    ;Effects 0..|
00004980  0d 17 e8 09 2e 76 6f 66  32 0d 17 f2 22 20 64 63  |.....vof2..." dc|
00004990  64 20 20 20 76 65 66 2d  76 6f 66 32 20 20 20 20  |d   vef-vof2    |
000049a0  20 20 20 20 20 20 20 20  20 3b 31 0d 17 fc 22 20  |         ;1..." |
000049b0  64 63 64 20 20 20 76 65  66 2d 76 6f 66 32 20 20  |dcd   vef-vof2  |
000049c0  20 20 20 20 20 20 20 20  20 20 20 3b 32 0d 18 06  |           ;2...|
000049d0  22 20 64 63 64 20 20 20  76 65 66 2d 76 6f 66 32  |" dcd   vef-vof2|
000049e0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 33 0d  |             ;3.|
000049f0  18 10 22 20 64 63 64 20  20 20 76 65 66 2d 76 6f  |.." dcd   vef-vo|
00004a00  66 32 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |f2             ;|
00004a10  34 0d 18 1a 22 20 64 63  64 20 20 20 76 65 66 2d  |4..." dcd   vef-|
00004a20  76 6f 66 32 20 20 20 20  20 20 20 20 20 20 20 20  |vof2            |
00004a30  20 3b 35 0d 18 24 22 20  64 63 64 20 20 20 76 65  | ;5..$" dcd   ve|
00004a40  66 2d 76 6f 66 32 20 20  20 20 20 20 20 20 20 20  |f-vof2          |
00004a50  20 20 20 3b 36 0d 18 2e  34 20 64 63 64 20 20 20  |   ;6...4 dcd   |
00004a60  76 73 74 65 72 65 6f 70  6f 73 2d 76 6f 66 32 20  |vstereopos-vof2 |
00004a70  20 20 20 20 20 3b 20 37  20 3d 20 53 65 74 20 53  |     ; 7 = Set S|
00004a80  74 65 72 65 6f 20 50 6f  73 0d 18 38 34 20 64 63  |tereo Pos..84 dc|
00004a90  64 20 20 20 76 61 75 74  6f 76 6f 6c 75 70 2d 76  |d   vautovolup-v|
00004aa0  6f 66 32 20 20 20 20 20  20 3b 20 38 20 3d 20 41  |of2      ; 8 = A|
00004ab0  75 74 6f 20 56 6f 6c 75  6d 65 20 75 70 0d 18 42  |uto Volume up..B|
00004ac0  36 20 64 63 64 20 20 20  76 61 75 74 6f 76 6f 6c  |6 dcd   vautovol|
00004ad0  64 6f 77 6e 2d 76 6f 66  32 20 20 20 20 3b 20 39  |down-vof2    ; 9|
00004ae0  20 3d 20 41 75 74 6f 20  56 6f 6c 75 6d 65 20 64  | = Auto Volume d|
00004af0  6f 77 6e 0d 18 4c 33 20  64 63 64 20 20 20 76 61  |own..L3 dcd   va|
00004b00  75 74 6f 61 72 63 75 70  2d 76 6f 66 32 20 20 20  |utoarcup-vof2   |
00004b10  20 20 20 3b 20 41 20 3d  20 41 75 74 6f 20 50 69  |   ; A = Auto Pi|
00004b20  74 63 68 20 75 70 0d 18  56 35 20 64 63 64 20 20  |tch up..V5 dcd  |
00004b30  20 76 61 75 74 6f 61 72  63 64 6f 77 6e 2d 76 6f  | vautoarcdown-vo|
00004b40  66 32 20 20 20 20 3b 20  42 20 3d 20 41 75 74 6f  |f2    ; B = Auto|
00004b50  20 50 69 74 63 68 20 64  6f 77 6e 0d 18 60 30 20  | Pitch down..`0 |
00004b60  64 63 64 20 20 20 76 73  65 74 76 6f 6c 2d 76 6f  |dcd   vsetvol-vo|
00004b70  66 32 20 20 20 20 20 20  20 20 20 3b 20 43 20 3d  |f2         ; C =|
00004b80  20 53 65 74 20 56 6f 6c  75 6d 65 0d 18 6a 33 20  | Set Volume..j3 |
00004b90  64 63 64 20 20 20 76 70  61 74 74 62 72 65 61 6b  |dcd   vpattbreak|
00004ba0  2d 76 6f 66 32 20 20 20  20 20 20 3b 20 44 20 3d  |-vof2      ; D =|
00004bb0  20 50 61 74 74 65 72 6e  20 42 72 65 61 6b 0d 18  | Pattern Break..|
00004bc0  74 34 20 64 63 64 20 20  20 76 6e 6f 70 2d 76 6f  |t4 dcd   vnop-vo|
00004bd0  66 32 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |f2            ; |
00004be0  45 20 3d 20 28 4e 6f 74  20 75 73 65 64 20 79 65  |E = (Not used ye|
00004bf0  74 29 0d 18 7e 2f 20 64  63 64 20 20 20 76 73 65  |t)..~/ dcd   vse|
00004c00  74 73 70 65 65 64 2d 76  6f 66 32 20 20 20 20 20  |tspeed-vof2     |
00004c10  20 20 3b 20 46 20 3d 20  53 65 74 20 53 70 65 65  |  ; F = Set Spee|
00004c20  64 0d 18 88 04 0d 18 92  4d 2e 76 65 66 20 20 20  |d.......M.vef   |
00004c30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004c40  20 20 20 20 20 3b 45 66  66 65 63 74 73 2c 20 6e  |     ;Effects, n|
00004c50  65 65 64 6e 27 74 20 74  6f 20 62 65 20 64 6f 6e  |eedn't to be don|
00004c60  65 20 68 65 72 65 2c 20  62 75 74 20 6c 61 74 65  |e here, but late|
00004c70  72 21 0d 18 9c 3c 20 73  74 72 42 20 20 72 32 2c  |r!...< strB  r2,|
00004c80  5b 72 31 32 2c 23 32 38  5d 20 20 20 20 20 20 20  |[r12,#28]       |
00004c90  20 20 3b 53 74 6f 72 65  20 49 6e 66 6f 42 79 74  |  ;Store InfoByt|
00004ca0  65 2c 20 66 6f 72 20 45  66 66 65 63 74 73 0d 18  |e, for Effects..|
00004cb0  a6 16 20 6d 6f 76 20 20  20 72 30 2c 72 30 2c 6c  |.. mov   r0,r0,l|
00004cc0  73 72 23 38 0d 18 b0 3c  20 73 74 72 42 20 20 72  |sr#8...< strB  r|
00004cd0  30 2c 5b 72 31 32 2c 23  32 39 5d 20 20 20 20 20  |0,[r12,#29]     |
00004ce0  20 20 20 20 3b 53 74 6f  72 65 20 43 6f 6d 6d 42  |    ;Store CommB|
00004cf0  79 74 65 2c 20 66 6f 72  20 45 66 66 65 63 74 73  |yte, for Effects|
00004d00  0d 18 ba 09 2e 76 6e 6f  70 0d 18 c4 2b 20 6d 6f  |.....vnop...+ mo|
00004d10  76 20 20 20 70 63 2c 72  31 34 20 20 20 20 20 20  |v   pc,r14      |
00004d20  20 20 20 20 20 20 20 20  20 3b 61 6e 64 20 72 65  |         ;and re|
00004d30  74 75 72 6e 0d 18 ce 04  0d 18 d8 0f 2e 76 73 74  |turn.........vst|
00004d40  65 72 65 6f 70 6f 73 0d  18 e2 4d 20 61 64 72 20  |ereopos...M adr |
00004d50  20 20 72 30 2c 48 65 61  64 20 20 20 20 20 20 20  |  r0,Head       |
00004d60  20 20 20 20 20 20 20 3b  47 65 74 20 63 75 72 72  |       ;Get curr|
00004d70  65 6e 74 20 63 68 61 6e  6e 65 6c 20 6e 75 6d 62  |ent channel numb|
00004d80  65 72 20 28 6c 69 74 74  6c 65 20 4f 76 65 72 68  |er (little Overh|
00004d90  65 61 64 29 0d 18 ec 14  20 73 75 62 20 20 20 72  |ead).... sub   r|
00004da0  30 2c 72 31 32 2c 72 30  0d 18 f6 35 20 6d 6f 76  |0,r12,r0...5 mov|
00004db0  20 20 20 72 30 2c 72 30  2c 6c 73 72 23 33 20 20  |   r0,r0,lsr#3  |
00004dc0  20 20 20 20 20 20 20 20  3b 81 20 38 3b 20 3d 3e  |        ;. 8; =>|
00004dd0  20 30 2c 34 2c 38 2c 31  32 2c 2e 2e 2e 0d 19 00  | 0,4,8,12,......|
00004de0  12 20 63 6d 70 20 20 20  72 30 2c 23 37 2a 34 0d  |. cmp   r0,#7*4.|
00004df0  19 0a 45 20 6d 6f 76 45  71 20 72 31 2c 20 20 20  |..E movEq r1,   |
00004e00  23 26 36 30 20 20 20 20  20 20 20 20 20 20 20 3b  |#&60           ;|
00004e10  53 74 65 72 65 6f 20 49  6d 61 67 65 20 52 65 67  |Stereo Image Reg|
00004e20  69 73 74 65 72 20 20 20  37 20 20 3d 20 41 64 72  |ister   7  = Adr|
00004e30  20 26 36 30 0d 19 14 4d  20 61 64 64 4e 65 20 72  | &60...M addNe r|
00004e40  31 2c 72 30 2c 23 26 36  34 20 20 20 20 20 20 20  |1,r0,#&64       |
00004e50  20 20 20 20 3b 53 74 65  72 65 6f 20 49 6d 61 67  |    ;Stereo Imag|
00004e60  65 20 52 65 67 69 73 74  65 72 73 20 30 2d 36 20  |e Registers 0-6 |
00004e70  3d 20 41 64 72 20 26 36  34 20 75 70 77 61 72 64  |= Adr &64 upward|
00004e80  73 0d 19 1e 17 20 6d 6f  76 20 20 20 72 31 2c 72  |s.... mov   r1,r|
00004e90  31 2c 6c 73 6c 23 32 34  0d 19 28 13 20 6f 72 72  |1,lsl#24..(. orr|
00004ea0  20 20 20 72 31 2c 72 31  2c 72 32 0d 19 32 17 20  |   r1,r1,r2..2. |
00004eb0  6d 6f 76 20 20 20 72 32  2c 23 26 33 34 30 30 30  |mov   r2,#&34000|
00004ec0  30 30 0d 19 3c 12 20 73  74 72 20 20 20 72 31 2c  |00..<. str   r1,|
00004ed0  5b 72 32 5d 0d 19 46 04  0d 19 50 39 20 63 6d 70  |[r2]..F...P9 cmp|
00004ee0  20 20 20 72 30 2c 23 33  2a 34 20 20 20 20 20 20  |   r0,#3*4      |
00004ef0  20 20 20 20 20 20 20 20  3b 45 78 74 72 61 20 41  |        ;Extra A|
00004f00  64 72 20 6f 66 20 49 6d  61 67 65 20 52 65 67 20  |dr of Image Reg |
00004f10  37 0d 19 5a 19 20 73 75  62 45 71 20 72 31 2c 72  |7..Z. subEq r1,r|
00004f20  31 2c 23 26 31 30 3c 3c  32 34 0d 19 64 41 20 61  |1,#&10<<24..dA a|
00004f30  64 64 4e 65 20 72 31 2c  72 31 2c 23 26 31 30 3c  |ddNe r1,r1,#&10<|
00004f40  3c 32 34 20 20 20 20 20  20 20 3b 57 65 6c 6c 2c  |<24       ;Well,|
00004f50  20 73 65 74 20 75 70 20  74 77 69 6e 20 49 6d 61  | set up twin Ima|
00004f60  67 65 20 52 65 67 20 74  6f 6f 21 0d 19 6e 12 20  |ge Reg too!..n. |
00004f70  73 74 72 20 20 20 72 31  2c 5b 72 32 5d 0d 19 78  |str   r1,[r2]..x|
00004f80  04 0d 19 82 11 20 6d 6f  76 20 20 20 70 63 2c 72  |..... mov   pc,r|
00004f90  31 34 0d 19 8c 04 0d 19  96 0f 2e 76 61 75 74 6f  |14.........vauto|
00004fa0  76 6f 6c 75 70 0d 19 a0  17 20 73 74 72 42 20 20  |volup.... strB  |
00004fb0  72 32 2c 5b 72 31 32 2c  23 32 34 5d 0d 19 aa 11  |r2,[r12,#24]....|
00004fc0  20 6d 6f 76 20 20 20 70  63 2c 72 31 34 0d 19 b4  | mov   pc,r14...|
00004fd0  11 2e 76 61 75 74 6f 76  6f 6c 64 6f 77 6e 0d 19  |..vautovoldown..|
00004fe0  be 17 20 73 74 72 42 20  20 72 32 2c 5b 72 31 32  |.. strB  r2,[r12|
00004ff0  2c 23 32 35 5d 0d 19 c8  11 20 6d 6f 76 20 20 20  |,#25].... mov   |
00005000  70 63 2c 72 31 34 0d 19  d2 0f 2e 76 61 75 74 6f  |pc,r14.....vauto|
00005010  61 72 63 75 70 0d 19 dc  17 20 73 74 72 42 20 20  |arcup.... strB  |
00005020  72 32 2c 5b 72 31 32 2c  23 32 36 5d 0d 19 e6 11  |r2,[r12,#26]....|
00005030  20 6d 6f 76 20 20 20 70  63 2c 72 31 34 0d 19 f0  | mov   pc,r14...|
00005040  11 2e 76 61 75 74 6f 61  72 63 64 6f 77 6e 0d 19  |..vautoarcdown..|
00005050  fa 17 20 73 74 72 42 20  20 72 32 2c 5b 72 31 32  |.. strB  r2,[r12|
00005060  2c 23 32 37 5d 0d 1a 04  11 20 6d 6f 76 20 20 20  |,#27].... mov   |
00005070  70 63 2c 72 31 34 0d 1a  0e 04 0d 1a 18 0c 2e 76  |pc,r14.........v|
00005080  73 65 74 76 6f 6c 0d 1a  22 3d 20 73 74 72 20 20  |setvol.."= str  |
00005090  20 72 32 2c 5b 72 31 32  2c 23 31 36 5d 20 20 20  | r2,[r12,#16]   |
000050a0  20 20 20 20 20 20 3b 45  6e 74 65 72 20 6e 65 77  |      ;Enter new|
000050b0  20 56 6f 6c 75 6d 65 20  69 6e 74 6f 20 48 65 61  | Volume into Hea|
000050c0  64 65 72 0d 1a 2c 11 20  6d 6f 76 20 20 20 70 63  |der..,. mov   pc|
000050d0  2c 72 31 34 0d 1a 36 04  0d 1a 40 0f 2e 76 70 61  |,r14..6...@..vpa|
000050e0  74 74 62 72 65 61 6b 0d  1a 4a 45 20 6d 6f 76 20  |ttbreak..JE mov |
000050f0  20 20 72 37 2c 23 31 20  20 20 20 20 20 20 20 20  |  r7,#1         |
00005100  20 20 20 20 20 20 20 3b  4a 75 6d 70 20 74 6f 20  |       ;Jump to |
00005110  65 6e 64 20 6f 66 20 50  61 74 74 2c 20 69 65 20  |end of Patt, ie |
00005120  50 61 74 74 5f 43 6f 75  6e 74 3d 31 0d 1a 54 11  |Patt_Count=1..T.|
00005130  20 6d 6f 76 20 20 20 70  63 2c 72 31 34 0d 1a 5e  | mov   pc,r14..^|
00005140  04 0d 1a 68 0e 2e 76 73  65 74 73 70 65 65 64 0d  |...h..vsetspeed.|
00005150  1a 72 39 20 73 74 72 20  20 20 72 32 2c 56 73 70  |.r9 str   r2,Vsp|
00005160  65 65 64 20 20 20 20 20  20 20 20 20 20 20 20 3b  |eed            ;|
00005170  53 65 74 20 6e 65 77 20  28 6f 76 65 72 61 6c 6c  |Set new (overall|
00005180  2d 29 20 53 70 65 65 64  0d 1a 7c 11 20 6d 6f 76  |-) Speed..|. mov|
00005190  20 20 20 70 63 2c 72 31  34 0d 1a 86 04 0d 1a 90  |   pc,r14.......|
000051a0  13 3b 3d 3d 3d 3d 20 dc  42 41 59 20 3d 3d 3d 3d  |.;==== .BAY ====|
000051b0  0d 1a 9a 04 0d 1a a4 3e  2e 52 65 67 69 73 74 65  |.......>.Registe|
000051c0  72 73 20 20 20 20 64 63  64 20 36 34 20 20 20 20  |rs    dcd 64    |
000051d0  20 20 20 20 3b 20 72 37  20 50 61 74 74 65 72 6e  |    ; r7 Pattern|
000051e0  5f 43 6f 75 6e 74 65 72  20 28 36 34 20 2d 3e 20  |_Counter (64 -> |
000051f0  31 29 0d 1a ae 43 20 20  20 20 20 20 20 20 20 20  |1)...C          |
00005200  20 20 20 20 64 63 64 20  30 30 20 20 20 20 20 20  |    dcd 00      |
00005210  20 20 3b 20 72 38 20 43  75 72 72 65 6e 74 20 50  |  ; r8 Current P|
00005220  6f 69 6e 74 65 72 20 69  6e 20 74 68 65 20 50 61  |ointer in the Pa|
00005230  74 74 65 72 6e 0d 1a b8  44 20 20 20 20 20 20 20  |ttern...D       |
00005240  20 20 20 20 20 20 20 64  63 64 20 30 30 20 20 20  |       dcd 00   |
00005250  20 20 20 20 20 3b 20 72  39 20 43 75 72 72 65 6e  |     ; r9 Curren|
00005260  74 20 50 6f 69 6e 74 65  72 20 69 6e 20 74 68 65  |t Pointer in the|
00005270  20 53 65 71 75 65 6e 63  65 0d 1a c2 05 20 0d 1a  | Sequence.... ..|
00005280  cc 4d 2e 56 63 6f 75 6e  74 20 20 20 20 20 20 20  |.M.Vcount       |
00005290  64 63 64 20 30 20 20 20  20 20 20 20 20 20 3b 56  |dcd 0         ;V|
000052a0  53 79 6e 63 20 43 6f 75  6e 74 65 72 20 20 20 20  |Sync Counter    |
000052b0  20 20 20 20 20 20 20 20  20 20 20 20 7c 4b 65 65  |            |Kee|
000052c0  70 20 74 68 65 73 65 20  74 77 6f 0d 1a d6 4a 2e  |p these two...J.|
000052d0  56 73 70 65 65 64 20 20  20 20 20 20 20 64 63 64  |Vspeed       dcd|
000052e0  20 36 20 20 20 20 20 20  20 20 20 3b 53 70 65 65  | 6         ;Spee|
000052f0  64 20 43 6f 75 6e 74 65  72 20 28 64 65 66 61 75  |d Counter (defau|
00005300  6c 74 3d 36 29 20 20 20  20 7c 20 20 3c 20 2e 46  |lt=6)    |  < .F|
00005310  74 61 62 6c 65 0d 1a e0  04 0d 1a ea 25 2e 46 74  |table.......%.Ft|
00005320  61 62 6c 65 20 20 20 20  20 20 20 5d 3a 50 25 2b  |able       ]:P%+|
00005330  3d 39 2a 31 32 2a 34 3a  5b 4f 50 54 20 70 0d 1a  |=9*12*4:[OPT p..|
00005340  f4 0a 2e 54 72 61 63 6b  0d 1a fe 04 0d 1b 08 3b  |...Track.......;|
00005350  3b 53 61 6d 70 6c 65 20  48 65 61 64 20 28 61 74  |;Sample Head (at|
00005360  20 49 6e 73 74 2a 33 32  29 20 20 20 23 30 30 20  | Inst*32)   #00 |
00005370  41 62 73 6f 6c 75 74 65  20 53 61 6d 70 6c 65 20  |Absolute Sample |
00005380  41 64 64 72 65 73 73 0d  1b 12 2a 20 20 20 20 20  |Address...*     |
00005390  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000053a0  3b 20 20 20 20 20 20 23  30 34 20 4c 65 6e 67 74  |;      #04 Lengt|
000053b0  68 0d 1b 1c 30 20 20 20  20 20 20 20 20 20 20 20  |h...0           |
000053c0  20 20 20 20 20 20 20 20  20 20 3b 20 20 20 20 20  |          ;     |
000053d0  20 23 30 38 20 56 6f 6c  75 6d 65 20 30 2d 26 66  | #08 Volume 0-&f|
000053e0  66 0d 1b 26 3a 20 20 20  20 20 20 20 20 20 20 20  |f..&:           |
000053f0  20 20 20 20 20 20 20 20  20 20 3b 20 20 20 20 20  |          ;     |
00005400  20 23 31 32 20 52 65 70  65 61 74 41 74 20 61 73  | #12 RepeatAt as|
00005410  20 42 79 74 65 4f 66 66  73 65 74 0d 1b 30 2a 20  | ByteOffset..0* |
00005420  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005430  20 20 20 20 3b 20 20 20  20 20 20 23 31 36 20 52  |    ;      #16 R|
00005440  65 70 4c 65 6e 0d 1b 3a  33 20 20 20 20 20 20 20  |epLen..:3       |
00005450  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00005460  20 20 20 20 20 23 32 30  20 49 6e 73 74 72 75 6d  |     #20 Instrum|
00005470  65 6e 74 20 4e 61 6d 65  0d 1b 44 04 0d 1b 4e 17  |ent Name..D...N.|
00005480  3b 3d 3d 3d 3d 49 4e 49  54 53 54 4f 52 45 20 3d  |;====INITSTORE =|
00005490  3d 3d 3d 0d 1b 58 04 0d  1b 62 10 20 6d 6f 76 20  |===..X...b. mov |
000054a0  20 20 72 32 2c 23 30 0d  1b 6c 09 2e 75 61 6c 6c  |  r2,#0..l..uall|
000054b0  0d 1b 76 15 20 73 74 72  20 20 20 72 32 2c 5b 72  |..v. str   r2,[r|
000054c0  30 5d 2c 23 34 0d 1b 80  10 20 63 6d 70 20 20 20  |0],#4.... cmp   |
000054d0  72 30 2c 72 31 0d 1b 8a  0f 20 62 4c 6f 20 20 20  |r0,r1.... bLo   |
000054e0  75 61 6c 6c 0d 1b 94 11  20 6d 6f 76 20 20 20 70  |uall.... mov   p|
000054f0  63 2c 72 31 34 0d 1b 9e  09 2e 75 66 69 6e 0d 1b  |c,r14.....ufin..|
00005500  a8 04 0d 1b b2 07 5d 3a  e1 0d 1b bc 04 0d 1b c6  |......]:........|
00005510  1b 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00005520  2d 2d 2d 2d 2d 2d 2d 2d  0d 1b d0 1b 32 65 72 20  |--------....2er |
00005530  41 44 52 20 28 6f 6e 6c  79 20 66 6f 72 77 61 72  |ADR (only forwar|
00005540  64 73 29 0d 1b da 1b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ds)....---------|
00005550  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 1b  |--------------..|
00005560  e4 14 dd 20 a4 61 64 72  28 72 25 2c 64 65 73 74  |... .adr(r%,dest|
00005570  25 29 0d 1b ee 13 64 69  73 25 3d 64 65 73 74 25  |%)....dis%=dest%|
00005580  2d 50 25 2d 38 0d 1b f8  0f e7 20 70 3d 25 31 30  |-P%-8..... p=%10|
00005590  30 30 20 8c 0d 1c 02 12  20 20 64 30 25 3d 30 20  |00 .....  d0%=0 |
000055a0  3a 64 31 25 3d 30 0d 1c  0c 05 cc 0d 1c 16 13 20  |:d1%=0......... |
000055b0  20 e7 20 64 69 73 25 20  80 20 26 66 20 8c 0d 1c  | . dis% . &f ...|
000055c0  20 19 20 20 20 20 64 30  25 3d 64 69 73 25 20 80  | .    d0%=dis% .|
000055d0  20 26 30 30 30 46 46 0d  1c 2a 19 20 20 20 20 64  | &000FF..*.    d|
000055e0  31 25 3d 64 69 73 25 20  80 20 26 46 46 46 30 30  |1%=dis% . &FFF00|
000055f0  0d 1c 34 07 20 20 cc 0d  1c 3e 19 20 20 20 20 64  |..4.  ...>.    d|
00005600  30 25 3d 64 69 73 25 20  80 20 26 30 30 46 46 46  |0%=dis% . &00FFF|
00005610  0d 1c 48 19 20 20 20 20  64 31 25 3d 64 69 73 25  |..H.    d1%=dis%|
00005620  20 80 20 26 46 46 30 30  30 0d 1c 52 07 20 20 cd  | . &FF000..R.  .|
00005630  0d 1c 5c 37 20 20 e7 20  64 30 25 2b 64 31 25 3c  |..\7  . d0%+d1%<|
00005640  3e 64 69 73 25 20 8c 20  f1 20 bd 37 3b 22 46 4e  |>dis% . . .7;"FN|
00005650  61 64 72 20 64 6f 65 73  6e 27 74 20 73 75 66 66  |adr doesn't suff|
00005660  69 63 65 21 22 3a e0 0d  1c 66 38 20 20 e7 20 64  |ice!":...f8  . d|
00005670  30 25 3d 30 20 84 20 64  31 25 3d 30 20 8c 20 f1  |0%=0 . d1%=0 . .|
00005680  20 22 46 4e 61 64 72 20  3a 20 41 44 52 20 77 6f  | "FNadr : ADR wo|
00005690  75 6c 64 20 64 6f 2e 20  22 3b 7e 64 69 73 25 0d  |uld do. ";~dis%.|
000056a0  1c 70 05 cd 0d 1c 7a 0a  5b 4f 50 54 20 70 0d 1c  |.p....z.[OPT p..|
000056b0  84 13 20 61 64 64 20 72  25 2c 70 63 2c 23 64 31  |.. add r%,pc,#d1|
000056c0  25 0d 1c 8e 13 20 61 64  64 20                    |%.... add |
000056ca