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

!AWMay91/Goodies/Coconizer/Tools/Play

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/Play
Read OK:
File size: 54B2 bytes
Load address: 0000
Exec address: 0000
File contents

� >Tools.Play

� 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:V%=Volume
��
�
�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=16
j
us =48
t
[OPT p
~
�(;-----------------------------------
�;
�'; THE COCONIZER PLAYER ROUTINE v1.3
�;
�%;   Needs 20% of the ARM-II speed
�;
�;         (c) Mai 1990 by
�$;    Eduard Pfarr & Thomas Alber
�;           of Playfield
�;
�%;   Latest revision - 20 Feb 1991
�;
(;-----------------------------------


	.v_on
 mov   r12,r14
(% mov   r0,#2                ;Ƞ 2
2E mov   r1,#208              ;BufferLen of �E channel, total *Vocs
<. mov   r2,#us               ;Sample Period
F7 mov   r3,#0                ;Default ChannelHandler
P1 mov   r4,#0                ;Default Sheduler
Z swi   "Sound_Configure"
dH mov   r0,#Vocs             ;Ƞ 8 with params doesn't work directly!
nI mov   r1,#0                ;Because then sample rate is set false...
x mov   r2,#0
� mov   r3,#0
� mov   r4,#0
� swi   "Sound_Configure"
�
� adr   r0,VoiceBase
�K mov   r1,#0                     ;Install our Voice into next free Slot
� swi   "Sound_InstallVoice"
�5 str   r1,Vslot                  ;store used slot
�# adr   r2,Vstereos-4*4*(Vocs=8)
�
� mov   r0,#1
�.vimage
� ldr   r1,[r2],#4
/ swi   "Sound_Stereo"            ;*Ȣ r0 r1
 add   r0,r0,#1
 cmp   r0,#Vocs
" bLs   vimage
,
6 mov   r0,#Vocs
@	.vset
J adr   r1,Vname
T; swi   "Sound_AttachNamedVoice"  ;*CHANNELVOICE r0 "r1"
^ mov   r1,#&170
h; mov   r2,#50               ;Activate all channels once
r mov   r3,#255
|/ swi   "Sound_Control"      ;*� r0 r1 r2 r3
� subS  r0,r0,#1
� bNe   vset
�
� bl    vabsolut
� bl    v_reset
�< mov   r0,#16               ;Claim EVENT Vector (Nr. 16)
� �adr (1,vinter)
�; adr   r2,Head              ;Entry WorkspacePointer r12
� swi   "OS_Claim"
�4 mov   r0,#14               ;Enable Event Nr. r1
�2 mov   r1,#4                ;(4 = VSync Event)
� swi   "OS_Byte"
�
1 mov   r0,#Vocs             ;And once more...
 mov   r1,#0
 mov   r2,#0
& mov   r3,#0
0 mov   r4,#0
:' swi   "Sound_Configure"    ;Grrrh!
D
N4 mov   r0,#0                ;Read current Volume
X swi   "Sound_Volume"
b# mov   r0,r0,lsl#1          ;*2
l rsb   r0,r0,#254
v= str   r0,Volume            ;and use it as overall Volume
� mov   pc,r12
�
�;*** �OLUTE CODE
�
�
.vabsolut
� �adr (10,Track)
�
�0 ldr   r1,[r10,#24]         ;Sequence Offset
� add   r1,r10,r1
� str   r1,[r10,#24]
�/ ldr   r2,[r10,#28]         ;Pattern Offset
� add   r2,r10,r2
� str   r2,[r10,#28]

0 ldrB  r1,[r10,#21]         ;Number of Insts
	.vall
 1 ldr   r2,[r10,r1,lsl#5]    ;Inst Addr Offset
* add   r2,r10,r2
4& str   r2,[r10,r1,lsl#5]    ;+i*32
> subS  r1,r1,#1
H bNe   vall
R
\6 ldr   r0,[pc]              ;Do not call relocater
f- str   r0,vabsolut          ;two times...
p mov   pc,r14
z
�;*** RESTART TUNE
�
�.v_reset
� �adr (10,Track)
� mov   r1,#64
�+ str   r1,Registers+0       ;Patt Count
� ldr   r2,[r10,#24]
�9 str   r2,Registers+8       ;Current Sequence Pointer
� ldrB  r2,[r2]
� ldr   r3,[r10,#28]
�# add   r3,r3,r2,lsl#10-(Vocs=8)
�8 str   r3,Registers+4       ;Current Pattern Pointer
�
	 adr   r11,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,#Vocs
	.	.vall
	8; stmia r11!,{r1-r8}         ;Clear all channel heads...
	B subS  r0,r0,#1
	L bNe   vall
	V mov   pc,r14
	`
	j ;*** TURN � PLAYER � COCO-ȡ
	t
	~
.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   r1,vinter
	� adr   r2,Head
	� swi   "OS_Release"
	�
	� ldr   r1,Vslot
	�E swi   "Sound_RemoveVoice"  ;Last but not least... Free VoiceSlot
	� mov   r0,#1
	� mov   r1,#1
, swi   "Sound_AttachVoice"  ;Reinit Bell

 mov   pc,r14


.Vstereos
(2 dcd -50      ;Stereo Positions for 4 channels
2 dcd -20
< dcd  20
F dcd  50
P
Z2 dcd-126      ;Stereo Positions for 8 channels
d dcd -90
n dcd -54
x dcd -18
� dcd  18
� dcd  54
� dcd  90
� dcd 126
�
�.Vslot dcd 0
�
�H;==== șTEM � ======================================================
�
�@; r6 Neg. if new Handler    r10 Pointer to end of DMA buffer
�M; r7 Channel number         r11 Increment (interleaf) to use when writing
�M; r8 Sample period in us    r12 Pointer to (start of DMA + interleaf Ofs)
�M; r9 Pointer to SCCB        Filler is entered in IRQ mode & Ints enabled!

.VoiceBase
? b     vfill                ;Fill         for smooth adjust
"? b     vfill                ;Update       for tone continue
,: b     vfill                ;GateOn       for new tone
6? ldmfd r13!,{pc}            ;GateOff      for tone flushing
@H ldmfd r13!,{pc}            ;Instantiate,   Attach    VoiceGenerator
JJ ldmfd r13!,{pc}            ;DeInstantiate, Detach   to/from a channel
T. ldmfd r13!,{pc}            ;Hello Arthur!
^> dcd   Vname-VoiceBase      ;Offset from VoiceBase to Name
h.Vname dcb "Cocoplex"+�0
r
 align
|
�
.vfill
�C teqP  pc,#(1<<27) � %10   ;Disable IRQ, no more Loser filling!
�= adr   r8,Head              ;We use an own Controll_Block
�4 add   r8,r8,r7,lsl#5       ;point to Head+r7*32
�9 ldmIa r8,{r1-r6}           ;Load 6 working Registers
� ldr   r0,Volume
�E add   r5,r5,r0             ;Add Overall_Volume to Channel_Volume
�
�
.vfilloop
�H]:� n=1 � gap:[OPT p     ;Fill one byte 16 times, for 208 -> 13 runs
�C ldrB  r0,[r3,r1,lsr#16]    ;Load sample byte (HighWord of Pos)
�H subS  r0,r0,r5             ;Minus Volume (where 0=loud & 255=quiet)
� movMi r0,#0
< strB  r0,[r12],r11         ;And put it into VIDC-buffer
6 add   r1,r1,r2             ;Add Pitch (fix point)
]:�:[OPT p
&
0H cmp   r4,r1,lsr#16         ;Length exceeded? (Len < fixpointed Pos)
:: movLs r1,r6                ;Yes, so RepAt is new Pos,
D4 cmp   r1,#0                ;    but is it zero?
NL movEq r2,#0                ;    yes -> Mute Channel (ie Set Pitch to 0)
X< cmp   r12,r10              ;VIDC-Buffer filled already?
b( bLo   vfilloop             ;Nooo...
lF stmIa r8,{r1-r2}           ;Save the two (probably) modified regs
v
�B mov   r0,#%00001000        ;And return with Voice_Active_Flag
�1 teqP  pc,#(0<<27) � %10   ;Enable IRQ again!
� ldmfd r13!,{pc}
�
�	.Head
�K dcd 0                      ;r1 Pos in the sample (Offset in fix point)
�J dcd 0                      ;r2 Increment/Pitch (LowWord for fixpoint)
�1 dcd 0                      ;r3 Sample Adress
�* dcd 0                      ;r4 Length
�A dcd 0                      ;r5 Volume (0=Loud ... 255=Quiet)
�M dcd 0                      ;r6 RepAt (New fixpoint Pos), or 0 for NO REP
�B dcd 0                      ;Byte +24 Value for Auto Volume up
�D                            ;      25   "    "   "   Volume down

A                            ;      26   "    "   "   Pitch up

C                            ;      27   "    "   "   Pitch down

: dcd 0                      ;Byte +28 Actual Info Byte

 :                            ;      29 Actual Comm Byte

*9                            ;      30 (Sound FX Flag)

4>                            ;      31 Last legal tone/note

>

H5 dcb �3*32-4*32*(Vocs=8),�0)    ;Add 3 or 7 Heads

R

\5.V.V.e       dcd 0         ;Overall_Sound_Volume

f

pM;==== PLAY EVENT ========================================================

z 

�=;*** DO EVERY VSYNC EFFECTS (#r0=Timer ... $r0=preserved)

�

�
.veffects

�3 ldr   r4,[r12,#4]          ;Load current Pitch

�J cmp   r4,#0                ;No active tone -> sorry, effect disabled!

� movEq pc,r14

�2 ldr   r3,[r12,#24]         ;Load Auto-Effects

�) mov   r10,r14              ;Push r14

�9 andS  r2,r3,#&ff           ;Is there Auto Volume up?

� blNe  v_volup

�; andS  r2,r3,#&ff <<8       ;Is there Auto Volume down?

� movNe r2,r2,lsr#8

� blNe  v_voldown
8 andS  r2,r3,#&ff <<16      ;Is there Auto Pitch up?
 movNe r2,r2,lsr#16
 blNe  v_arcup
$: andS  r2,r3,#&ff <<24      ;Is there Auto Pitch down?
. movNe r2,r2,lsr#24
8 blNe  v_arcdown
B) mov   r14,r10              ;Pop  r14
L
VK ldr   r1,[r12,#28]         ;Effect LWord & Last Tone are in the Header
`1 andS  r2,r1,#&ff           ;Isolate InfoByte
jE movEq pc,r14               ;if 0, then there's no effect at all!
t6 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
�	.vof1
�F dcd   v_slideup-vof1       ; 1 = Slide Pitch up   (till Amis Max)
�F dcd   v_slidedown-vof1     ; 2 = Slide Pitch down (till Amis Min)
�/ dcd   v_volup-vof1         ; 3 = V= V=e up
�1 dcd   v_voldown-vof1       ; 4 = Volume down
�8 dcd   v_arcup-vof1         ; 5 = Slide Arc Pitch up
�: dcd   v_arcdown-vof1       ; 6 = Slide Arc Pitch down
�
�.v_arpeggio
B mov   r1,r1,lsr#24         ;Get last stored Tone into lowbyte

* cmp   r0,#1                ;Time=1 or
' cmpNe r0,#4                ;Time=4
F addEq r1,r1,r2,lsr#4       ; ...then add  left InfoNibble to Note
(* cmp   r0,#2                ;Time=2 or
2' cmpNe r0,#5                ;Time=5
<F andEq r2,r2,#&0f           ; ...then add right InfoNibble to Note
F addEq r1,r1,r2
PI ldr   r1,[r11,r1,lsl#2]    ;Get equivalent Frequency from r11=fTable
Z, str   r1,[r12,#4]          ;Enter Pitch
d mov   pc,r14
n
x.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
�.v_slidedown
�2 sub   r1,r4,r2,lsl#6       ; Freq-InfoByte*64
�D cmp   r1,#&3340            ;Max Per = &358, ie OutPutF > & 3355
� strGt r1,[r12,#4]
� mov   pc,r14
�
�.v_volup
�J cmp   r0,#1                ;Only each first v_interrupt for slow down
� movNe pc,r14
8 ldr   r1,[r12,#16]         ;There is current Volume
 subS  r1,r1,r2
J strPl r1,[r12,#16]         ;If not > 0  (Max Vol), then write it back
" mov   pc,r14
,.v_voldown
6 cmp   r0,#1
@ movNe pc,r14
J ldr   r1,[r12,#16]
T add   r1,r1,r2
^ cmp   r1,#255
hJ strLs r1,[r12,#16]         ;If not <255 (Min Vol), then write it back
r 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
�.v_arcdown
�E subS  r1,r4,r2,lsl#4       ;Pitch-InfoByte*16 (for slow sliding)
� strPl r1,[r12,#4]
� mov   pc,r14
�
�;*** ENTRY ȒS � GAME � FX
�
�.fx1
� adr   r12,Head+0*32
 b     fx4+4
.fx2
 adr   r12,Head+1*32
& b     fx4+4
0.fx3
: adr   r12,Head+2*32
D b     fx4+4
N.fx4
X adr   r12,Head+3*32
b mov   r0,#1
l1 strB  r0,[r12,#30]         ;Set SoundFX flag
v adr   r10,Track
� adr   r11,Ftable
� b     vrule
�
�F;*** �ERRUPT ENTRY Ȓ (#r0=Event No, r12=Workspace [here HeadAdr])
�
�.vinter
�L stmfd r13!,{r1-r11}        ;For not intercepting vector -> push r14 too
�
�L adr   r11,Ftable           ;r11 & r12 pointers are needed in both cases
�
�5 ldmDb r11,{r0,r1}          ;Load Counter & Speed
�) 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
4 add   r12,r12,#32
># bl    veffects             ;2.
H add   r12,r12,#32
R# bl    veffects             ;3.
\ add   r12,r12,#32
f# bl    veffects             ;4.
p]
z� Vocs=8 �
�
[OPT p
� add   r12,r12,#32
�# bl    veffects             ;5.
� add   r12,r12,#32
�# bl    veffects             ;6.
� add   r12,r12,#32
�# bl    veffects             ;7.
� add   r12,r12,#32
�# bl    veffects             ;8.
�]
��
�
[OPT p
�' ldmfd r13!,{r1-r11,pc}     ;Return
 
4;*** PLAY �E PATTERN-POSITION (ALL 4/8 CHANNELS)

$
.vplay
. adr   r6,Registers
89 ldmIa r6,{r7-r9}           ;Load 3 working registers
B adr   r10,Track
L
V# bl    vchannel             ;1.
` add   r12,r12,#32
j# bl    vchannel             ;2.
t add   r12,r12,#32
~# bl    vchannel             ;3.
� add   r12,r12,#32
�# bl    vchannel             ;4.
�]
�� Vocs=8 �
�
[OPT p
� add   r12,r12,#32
�# bl    vchannel             ;5.
� add   r12,r12,#32
�# bl    vchannel             ;6.
� add   r12,r12,#32
�# bl    vchannel             ;7.
� add   r12,r12,#32
# bl    vchannel             ;8.

]
�

[OPT p
(
2A subS  r7,r7,#1             ;Pattern_Counter - 1, is it zero?
<1 stmNeIa r6,{r7-r8}         ;Not zero yet, so
FH ldmNeFd r13!,{r1-r11,pc}   ; don't play new Pattern, Return instead
P
ZH mov   r7,#64               ;Well, new Pattern begins, with Count=64
d9 ldrB  r0,[r9,#1]!          ;And get next Pattern Nr.
n1 cmp   r0,#&ff              ;End of Sequence?
xA ldrEq r9,[r10,#24]         ; Yeah -> Reset Sequence Pointer,
�B ldrEqB 0,[r9]              ;         that means restart Song!
�5 ldr   r8,[r10,#28]         ;Address Patternstart
�> add   r8,r8,r0,lsl#10-(Vocs=8)    ;+ Nr*1024 (or Nr*2048)
� stmIa r6,{r7-r9}
�' ldmfd r13!,{r1-r11,pc}     ;Return
�
�/;*** SUPPLY �E CHANNEL WITH ǖ INFORMATIONS
�
�
.vchannel
�H ldr   r1,[r8],#4           ;Pattern LWord of current Patt_Pos & INC
�
�/ ldrB  r2,[r12,#30]         ;Is SoundFX on?
� 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
6
@
.vrule
J; movS  r0,r1,lsr#24         ;Isolate Tone & Is it zero?
TF bEq   vcomms               ;No Tone -> Perhaps still a Command...
^
hK strB  r0,[r12,#31]         ;Store legal Tone for poss. Arpeggio effect
rI ldr   r0,[r11,r0,lsl#2]    ;Get equivalent Frequency from r11=fTable
|, str   r0,[r12,#4]          ;Enter Pitch
�? andS  r0,r1,#&ff <<16      ;Isolate Instrument-Byte, zero?
�I ldrEq r0,[r12,#20]         ; Y -> Get old RepAt (perhaps a RepTone!)
�L strEq r0,[r12,#00]         ;    & Set as new Pos (same Inst once again)
� bEq   vcomms
�G                            ;Else point to InstPool = Track+Inst*32
�M add   r2,r10,r0,lsr#11     ;lsr#16 for lowbyte & lsl#5 for *32 => lsr#11
�B ldmIa r2,{r0,r2-r5}        ;Read all 5 InstPool Words at once
�5 str   r0,[r12,# 8]         ;Enter Sample Address
�- str   r3,[r12,#16]         ;Enter Volume
�L movS  r0,r4,lsl#16         ;Pos=RepAt (in 16-fixpoint), but is it zero?
�L addNe r2,r4,r5             ; No -> Len (absolute from 0) = RepAt+RepLen
�J movNe r4,r0                ;    -> Head Offset RepAt = fixpoint RepAt
�* str   r0,[r12,# 0]         ;Enter Pos
- str   r2,[r12,#12]         ;Enter Length
, str   r4,[r12,#20]         ;Enter RepAt

&.vcomms
0C and   r0,r1,#&0f <<8       ;Isolate Command-Nibble from DataLW
:1 and   r2,r1,#&ff           ;Isolate InfoByte
DM ldr   r3,[pc,r0,lsr#6]     ;lsr#8 for Nibble into lowbyte & lsl#2 for *4
N add   pc,pc,r3
X
b, dcd   vef-vof2             ;Effects 0..
l	.vof2
v" dcd   vef-vof2             ;1
�" dcd   vef-vof2             ;2
�" dcd   vef-vof2             ;3
�" dcd   vef-vof2             ;4
�" dcd   vef-vof2             ;5
�" dcd   vef-vof2             ;6
�4 dcd   vstereopos-vof2      ; 7 = Set Stereo Pos
�4 dcd   vautovolup-vof2      ; 8 = Auto Volume up
�6 dcd   vautovoldown-vof2    ; 9 = Auto Volume down
�3 dcd   vautoarcup-vof2      ; A = Auto Pitch up
�5 dcd   vautoarcdown-vof2    ; B = Auto Pitch down
�0 dcd   vsetvol-vof2         ; C = Set Volume
�3 dcd   vpattbreak-vof2      ; D = Pattern Break
�4 dcd   vnop-vof2            ; E = (Not used yet)
/ dcd   vsetspeed-vof2       ; F = Set Speed

M.vef                        ;Effects, needn't to be done here, but later!
 < strB  r2,[r12,#28]         ;Store InfoByte, for Effects
* mov   r0,r0,lsr#8
4< strB  r0,[r12,#29]         ;Store CommByte, for Effects
>	.vnop
H+ mov   pc,r14               ;and return
R
\.vstereopos
fM adr   r0,Head              ;Get current channel number (little Overhead)
p sub   r0,r12,r0
z5 mov   r0,r0,lsr#3          ;� 8; => 0,4,8,12,...
� cmp   r0,#7*4
�E movEq r1,   #&60           ;Stereo Image Register   7  = Adr &60
�M addNe r1,r0,#&64           ;Stereo Image Registers 0-6 = Adr &64 upwards
� mov   r1,r1,lsl#24
� orr   r1,r1,r2
� mov   r2,#&3400000
� str   r1,[r2]
�]
�� Vocs=4 �
�
[OPT p
�9 cmp   r0,#3*4              ;Extra Adr of Image Reg 7
� subEq r1,r1,#&10<<24
�A addNe r1,r1,#&10<<24       ;Well, set up twin Image Reg too!
 str   r1,[r2]
]
�
$
[OPT p
. mov   pc,r14
8
B.vautovolup
L strB  r2,[r12,#24]
V mov   pc,r14
`.vautovoldown
j strB  r2,[r12,#25]
t 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
�
�.vpattbreak
�H mov   r7,#1                ;Jump to end of Pattern, ie Patt_Count=1
 mov   pc,r14


.vsetspeed
. str   r2,Vspeed            ;Set new Speed
( mov   pc,r14
2
<;==== �BAY ====
F
P>.Registers    dcd 64        ; r7 Pattern_Counter (64 -> 1)
ZC              dcd 00        ; r8 Current Pointer in the Pattern
dD              dcd 00        ; r9 Current Pointer in the Sequence
n 
xM.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
�*                     ;      #16 RepLen
�3                     ;      #20 Instrument Name
�
�;====INITSTORE ====

 mov   r2,#0
	.uall
" str   r2,[r0],#4
, cmp   r0,r1
6 bLo   uall
@ mov   pc,r14
J	.ufin
T
^]:�
h
r-----------------------
|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
�  �
�    d0%=dis% � &00FFF
�    d1%=dis% � &FF000
�  �
7  � d0%+d1%<>dis% � � �7;"FNadr doesn't suffice!":�
8  � d0%=0 � d1%=0 � � "FNadr : ADR would do. ";~dis%
�
&
[OPT p
0 add r%,pc,#d1%
: add r%,r%,#d0%
D]=""
�
00000000  0d 00 0a 11 f4 20 3e 54  6f 6f 6c 73 2e 50 6c 61  |..... >Tools.Pla|
00000010  79 0d 00 14 04 0d 00 1e  16 de 20 63 6f 64 65 20  |y......... code |
00000020  32 35 36 30 30 30 2c 4c  25 2d 31 0d 00 28 04 0d  |256000,L%-1..(..|
00000030  00 32 19 e3 20 70 3d 25  31 30 30 30 20 b8 20 25  |.2.. p=%1000 . %|
00000040  31 30 31 30 20 88 20 32  0d 00 3c 0b 50 25 3d 63  |1010 . 2..<.P%=c|
00000050  6f 64 65 0d 00 46 0b f2  5f 4d 75 73 69 63 0d 00  |ode..F.._Music..|
00000060  50 07 ed 20 70 0d 00 5a  04 0d 00 64 16 65 6e 64  |P.. p..Z...d.end|
00000070  25 3d 54 72 61 63 6b 2b  70 6f 69 6e 74 65 72 0d  |%=Track+pointer.|
00000080  00 6e 2f f1 27 27 22 53  74 61 72 74 20 61 74 20  |.n/.''"Start at |
00000090  3a 20 26 22 3b 7e 63 6f  64 65 2c 22 45 6e 64 20  |: &";~code,"End |
000000a0  61 74 20 20 3a 20 26 22  3b 7e 65 6e 64 25 0d 00  |at  : &";~end%..|
000000b0  78 34 f1 20 20 22 54 6f  74 61 6c 20 6c 65 6e 3a  |x4.  "Total len:|
000000c0  20 22 3b 65 6e 64 25 2d  63 6f 64 65 2c 22 53 6f  | ";end%-code,"So|
000000d0  6e 67 20 6c 65 6e 3a 20  22 3b 70 6f 69 6e 74 65  |ng len: ";pointe|
000000e0  72 27 0d 00 82 04 0d 00  8c 0a d6 20 76 5f 6f 6e  |r'......... v_on|
000000f0  0d 00 96 1e 41 25 3d 76  5f 6f 66 66 3a 42 25 3d  |....A%=v_off:B%=|
00000100  76 5f 6f 6e 3a 56 25 3d  56 6f 6c 75 6d 65 0d 00  |v_on:V%=Volume..|
00000110  a0 05 e0 0d 00 aa 04 0d  00 b4 4d 2d 2d 2d 2d 2d  |..........M-----|
00000120  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000160  2d 2d 2d 2d 0d 00 be 0d  dd 20 f2 5f 4d 75 73 69  |----..... ._Musi|
00000170  63 0d 00 c8 0f e7 20 70  3d 25 31 30 30 30 20 8c  |c..... p=%1000 .|
00000180  0d 00 d2 34 20 20 2a 52  4d 45 6e 73 75 72 65 20  |...4  *RMEnsure |
00000190  50 61 63 6b 69 74 20 31  2e 35 30 20 52 4d 4c 6f  |Packit 1.50 RMLo|
000001a0  61 64 20 21 43 6f 63 6f  6e 69 7a 65 72 2e 50 61  |ad !Coconizer.Pa|
000001b0  63 6b 69 74 0d 00 dc 10  20 20 6d 61 78 69 6e 73  |ckit....  maxins|
000001c0  74 3d 33 32 0d 00 e6 46  20 20 de 20 6e 61 6d 24  |t=32...F  . nam$|
000001d0  28 32 30 30 32 29 2c 62  79 74 25 28 32 30 30 32  |(2002),byt%(2002|
000001e0  29 2c 6c 6f 63 24 28 32  30 30 32 29 2c 73 6f 72  |),loc$(2002),sor|
000001f0  74 25 28 6d 61 78 69 6e  73 74 29 2c 73 6f 72 74  |t%(maxinst),sort|
00000200  24 28 6d 61 78 69 6e 73  74 29 0d 00 f0 12 20 20  |$(maxinst)....  |
00000210  73 6f 72 74 24 28 32 29  3d 22 b1 22 0d 00 fa 0c  |sort$(2)="."....|
00000220  20 20 74 6f 70 25 3d 30  0d 01 04 15 20 20 66 25  |  top%=0....  f%|
00000230  3d 8e 20 22 6c 6f 63 61  74 69 6f 6e 22 0d 01 0e  |=. "location"...|
00000240  38 20 20 e7 20 66 25 3d  30 20 8c 20 f1 27 22 50  |8  . f%=0 . .'"P|
00000250  4c 45 41 53 45 20 49 4e  53 45 52 54 20 41 20 53  |LEASE INSERT A S|
00000260  4f 4e 47 20 44 49 53 43  22 3a 61 24 3d be 3a e5  |ONG DISC":a$=.:.|
00000270  20 8d 54 44 41 0d 01 18  0f 20 20 c8 95 20 ac 20  | .TDA....  .. . |
00000280  c5 23 66 25 0d 01 22 3f  20 20 20 20 74 6f 70 25  |.#f%.."?    top%|
00000290  2b 3d 31 3a 6e 61 6d 24  28 74 6f 70 25 29 3d be  |+=1:nam$(top%)=.|
000002a0  23 66 25 3a e8 23 66 25  2c 62 79 74 25 28 74 6f  |#f%:.#f%,byt%(to|
000002b0  70 25 29 3a 6c 6f 63 24  28 74 6f 70 25 29 3d be  |p%):loc$(top%)=.|
000002c0  23 66 25 0d 01 2c 07 20  20 ce 0d 01 36 0a 20 20  |#f%..,.  ...6.  |
000002d0  d9 23 66 25 0d 01 40 04  0d 01 4a 48 20 20 e8 27  |.#f%..@...JH  .'|
000002e0  22 50 6c 65 61 73 65 20  65 6e 74 65 72 20 73 6f  |"Please enter so|
000002f0  6e 67 20 70 61 74 68 20  5b 53 4f 4e 47 53 5d 3a  |ng path [SONGS]:|
00000300  20 22 70 61 74 68 24 3a  e7 20 70 61 74 68 24 3d  | "path$:. path$=|
00000310  22 22 20 70 61 74 68 24  3d 22 73 6f 6e 67 73 22  |"" path$="songs"|
00000320  0d 01 54 14 20 20 ff 20  22 43 61 74 20 22 2b 70  |..T.  . "Cat "+p|
00000330  61 74 68 24 0d 01 5e 20  20 20 e8 27 22 43 6f 63  |ath$..^   .'"Coc|
00000340  6f 6e 69 7a 65 72 20 73  6f 6e 67 66 69 6c 65 3f  |onizer songfile?|
00000350  20 22 61 24 0d 01 68 15  20 20 61 24 3d 70 61 74  | "a$..h.  a$=pat|
00000360  68 24 2b 22 2e 22 2b 61  24 0d 01 72 0d 20 20 66  |h$+"."+a$..r.  f|
00000370  25 3d 8e 20 61 24 0d 01  7c 35 20 20 62 31 3d 9a  |%=. a$..|5  b1=.|
00000380  23 66 25 3a 62 32 3d 9a  23 66 25 3a 62 33 3d 9a  |#f%:b2=.#f%:b3=.|
00000390  23 66 25 3a 62 34 3d 9a  23 66 25 3a 62 35 3d 9a  |#f%:b4=.#f%:b5=.|
000003a0  23 66 25 3a 62 36 3d 9a  23 66 25 0d 01 86 0a 20  |#f%:b6=.#f%.... |
000003b0  20 d9 23 66 25 0d 01 90  39 20 20 e7 20 62 34 3d  | .#f%...9  . b4=|
000003c0  30 20 80 20 62 35 3e 30  20 8c 20 56 6f 63 73 3d  |0 . b5>0 . Vocs=|
000003d0  62 36 20 8b 20 56 6f 63  73 3d 62 31 20 20 20 20  |b6 . Vocs=b1    |
000003e0  20 3a f4 20 70 61 63 6b  65 64 2e 2e 2e 3f 0d 01  | :. packed...?..|
000003f0  9a 04 0d 01 a4 10 20 20  f2 5f 4d 75 73 69 63 41  |......  ._MusicA|
00000400  53 4d 0d 01 ae 3e 20 20  41 25 3d 63 6f 64 65 3a  |SM...>  A%=code:|
00000410  42 25 3d 54 72 61 63 6b  2d 31 3a d6 20 54 72 61  |B%=Track-1:. Tra|
00000420  63 6b 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |ck              |
00000430  20 20 20 20 3a f4 20 49  6e 69 74 73 74 6f 72 65  |    :. Initstore|
00000440  0d 01 b8 3f 20 20 41 25  3d 75 66 69 6e 3a 42 25  |...?  A%=ufin:B%|
00000450  3d 4c 25 2d 31 20 20 20  3a d6 20 54 72 61 63 6b  |=L%-1   :. Track|
00000460  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000470  20 20 3a f4 20 72 65 61  6c 6c 79 20 41 4c 4c 0d  |  :. really ALL.|
00000480  01 c2 07 20 20 e1 0d 01  cc 05 cc 0d 01 d6 10 20  |...  .......... |
00000490  20 f2 5f 4d 75 73 69 63  41 53 4d 0d 01 e0 05 cd  | ._MusicASM.....|
000004a0  0d 01 ea 04 0d 01 f4 1e  f4 20 2a 2a 2a 20 4c 4f  |......... *** LO|
000004b0  41 44 20 49 4e 53 54 52  55 4d 45 4e 54 53 20 2a  |AD INSTRUMENTS *|
000004c0  2a 2a 0d 01 fe 04 0d 02  08 16 f1 22 43 68 61 6e  |**........."Chan|
000004d0  6e 65 6c 73 3a 20 22 3b  56 6f 63 73 0d 02 12 13  |nels: ";Vocs....|
000004e0  e7 20 62 34 3d 30 20 80  20 62 35 3e 30 20 8c 0d  |. b4=0 . b5>0 ..|
000004f0  02 1c 22 20 20 ff 20 22  50 61 63 6b 4c 6f 61 64  |.."  . "PackLoad|
00000500  20 22 2b 61 24 2b 22 20  22 2b c3 7e 54 72 61 63  | "+a$+" "+.~Trac|
00000510  6b 0d 02 26 05 cc 0d 02  30 1e 20 20 ff 20 22 4c  |k..&....0.  . "L|
00000520  6f 61 64 20 22 2b 61 24  2b 22 20 22 2b c3 7e 54  |oad "+a$+" "+.~T|
00000530  72 61 63 6b 0d 02 3a 05  cd 0d 02 44 04 0d 02 4e  |rack..:....D...N|
00000540  44 e3 20 69 25 3d 30 20  b8 20 39 2a 31 32 2d 31  |D. i%=0 . 9*12-1|
00000550  20 20 20 20 20 20 20 20  20 20 3a f4 20 46 72 6f  |          :. Fro|
00000560  6d 20 69 6e 74 65 72 6e  61 74 2e 20 4f 63 74 61  |m internat. Octa|
00000570  76 65 20 2d 33 20 74 6f  20 4f 63 74 61 76 65 20  |ve -3 to Octave |
00000580  35 0d 02 58 4a 6e 25 3d  69 25 20 2b 34 2a 31 32  |5..XJn%=i% +4*12|
00000590  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000005a0  20 3a f4 20 43 6f 72 72  65 63 74 20 69 74 2c 20  | :. Correct it, |
000005b0  61 73 20 27 53 74 65 69  6e 77 61 79 27 20 2b 30  |as 'Steinway' +0|
000005c0  20 3d 20 4d 69 64 64 6c  65 20 43 0d 02 62 34 66  | = Middle C..b4f|
000005d0  25 3d 34 34 30 2a 28 32  5e 28 28 6e 25 2d 34 36  |%=440*(2^((n%-46|
000005e0  29 2f 31 32 29 29 20 20  20 20 20 3a f4 20 46 72  |)/12))     :. Fr|
000005f0  65 71 75 65 6e 63 79 20  66 6f 72 6d 75 6c 61 0d  |equency formula.|
00000600  02 6c 47 46 74 61 62 6c  65 21 28 69 25 2a 34 29  |.lGFtable!(i%*4)|
00000610  3d 28 66 25 2f 28 31 30  30 30 30 30 30 2f 75 73  |=(f%/(1000000/us|
00000620  29 29 2a 36 35 35 33 36  20 3a f4 20 31 36 62 69  |))*65536 :. 16bi|
00000630  74 20 66 69 78 70 6f 69  6e 74 65 64 20 69 6e 63  |t fixpointed inc|
00000640  72 65 6d 65 6e 74 0d 02  76 08 ed 20 69 25 0d 02  |rement..v.. i%..|
00000650  80 04 0d 02 8a 1a f1 27  22 4e 41 4d 45 3a 20 22  |.......'"NAME: "|
00000660  3b 24 28 54 72 61 63 6b  2b 31 29 3b 0d 02 94 3b  |;$(Track+1);...;|
00000670  f1 20 8a 34 36 29 3b 22  53 65 71 75 65 6e 63 69  |. .46);"Sequenci|
00000680  65 73 3a 20 22 3b 54 72  61 63 6b 3f 32 32 3b 22  |es: ";Track?22;"|
00000690  20 20 50 61 74 74 65 72  6e 73 3a 20 22 3b 54 72  |  Patterns: ";Tr|
000006a0  61 63 6b 3f 32 33 27 0d  02 9e 04 0d 02 a8 49 70  |ack?23'.......Ip|
000006b0  6f 69 6e 74 65 72 3d 54  72 61 63 6b 21 33 32 20  |ointer=Track!32 |
000006c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000006e0  3a f4 20 53 61 6d 70 6c  65 44 61 74 61 20 4f 66  |:. SampleData Of|
000006f0  66 73 65 74 0d 02 b2 15  e3 20 69 25 3d 31 20 b8  |fset..... i%=1 .|
00000700  20 54 72 61 63 6b 3f 32  31 0d 02 bc 1e 20 20 54  | Track?21....  T|
00000710  72 61 63 6b 21 28 69 25  2a 33 32 2b 20 30 29 3d  |rack!(i%*32+ 0)=|
00000720  70 6f 69 6e 74 65 72 0d  02 c6 1a 20 20 6c 65 6e  |pointer....  len|
00000730  3d 54 72 61 63 6b 21 28  69 25 2a 33 32 2b 20 34  |=Track!(i%*32+ 4|
00000740  29 0d 02 d0 1a 20 20 76  6f 6c 3d 54 72 61 63 6b  |)....  vol=Track|
00000750  21 28 69 25 2a 33 32 2b  20 38 29 0d 02 da 1a 20  |!(i%*32+ 8).... |
00000760  20 72 61 74 3d 54 72 61  63 6b 21 28 69 25 2a 33  | rat=Track!(i%*3|
00000770  32 2b 31 32 29 0d 02 e4  1a 20 20 72 65 6e 3d 54  |2+12)....  ren=T|
00000780  72 61 63 6b 21 28 69 25  2a 33 32 2b 31 36 29 0d  |rack!(i%*32+16).|
00000790  02 ee 1b 20 20 6e 61 24  3d 24 28 54 72 61 63 6b  |...  na$=$(Track|
000007a0  2b 69 25 2a 33 32 2b 32  30 29 0d 02 f8 30 20 20  |+i%*32+20)...0  |
000007b0  f1 20 bd 28 39 36 2b 69  25 29 3b 22 20 3a 20 22  |. .(96+i%);" : "|
000007c0  3b 6e 61 24 3b 8a 31 38  29 3b 76 6f 6c 2c 72 61  |;na$;.18);vol,ra|
000007d0  74 2c 72 65 6e 2c 6c 65  6e 3b 0d 03 02 5b 20 20  |t,ren,len;...[  |
000007e0  e3 20 6a 25 3d 31 20 b8  20 74 6f 70 25 3a e7 20  |. j%=1 . top%:. |
000007f0  6e 61 24 3c 3e 6e 61 6d  24 28 6a 25 29 20 8c 20  |na$<>nam$(j%) . |
00000800  ed 3a e8 27 22 20 2d 3e  20 22 6e 61 24 3a 24 28  |.:.'" -> "na$:$(|
00000810  54 72 61 63 6b 2b 69 25  2a 33 32 2b 32 30 29 3d  |Track+i%*32+20)=|
00000820  6e 61 24 3a f1 20 c4 33  30 2c bd 38 29 3b 3a e5  |na$:. .30,.8);:.|
00000830  20 8d 54 42 43 0d 03 0c  1a 20 20 f1 20 22 20 28  | .TBC....  . " (|
00000840  22 3b 62 79 74 25 28 6a  25 29 3b 22 29 22 3b 0d  |";byt%(j%);")";.|
00000850  03 16 3e 20 20 e7 20 6c  65 6e 3e 62 79 74 25 28  |..>  . len>byt%(|
00000860  6a 25 29 20 8c 20 6c 65  6e 3d 62 79 74 25 28 6a  |j%) . len=byt%(j|
00000870  25 29 3a 54 72 61 63 6b  21 28 69 25 2a 33 32 2b  |%):Track!(i%*32+|
00000880  34 29 3d 6c 65 6e 3a f1  20 22 2a 22 3b 0d 03 20  |4)=len:. "*";.. |
00000890  1e 20 20 f1 20 2c 28 97  6c 6f 63 24 28 6a 25 29  |.  . ,(.loc$(j%)|
000008a0  2d 36 35 29 20 81 20 32  20 2b 31 0d 03 2a 25 20  |-65) . 2 +1..*% |
000008b0  20 73 6f 72 74 24 28 69  25 29 3d 6c 6f 63 24 28  | sort$(i%)=loc$(|
000008c0  6a 25 29 3a 73 6f 72 74  25 28 69 25 29 3d 69 25  |j%):sort%(i%)=i%|
000008d0  0d 03 34 16 20 20 70 6f  69 6e 74 65 72 2b 3d 6c  |..4.  pointer+=l|
000008e0  65 6e 2b 67 61 70 0d 03  3e 61 20 20 e7 20 54 72  |en+gap..>a  . Tr|
000008f0  61 63 6b 2b 70 6f 69 6e  74 65 72 3e 3d 4c 25 20  |ack+pointer>=L% |
00000900  85 20 9e 2c 22 4d 6f 72  65 20 74 68 61 6e 20 22  |. .,"More than "|
00000910  2b c3 70 6f 69 6e 74 65  72 2b 22 20 62 79 74 65  |+.pointer+" byte|
00000920  73 20 73 61 6d 70 6c 65  20 64 61 74 61 3a 20 41  |s sample data: A|
00000930  73 73 65 6d 62 6c 65 72  20 6c 69 6d 69 74 20 72  |ssembler limit r|
00000940  65 61 63 68 65 64 22 0d  03 48 08 ed 20 69 25 0d  |eached"..H.. i%.|
00000950  03 52 05 f1 0d 03 5c 04  0d 03 66 05 f5 0d 03 70  |.R....\...f....p|
00000960  0d 20 20 66 6c 61 67 25  3d 30 0d 03 7a 19 20 20  |.  flag%=0..z.  |
00000970  e3 20 69 25 3d 31 20 b8  20 54 72 61 63 6b 3f 32  |. i%=1 . Track?2|
00000980  31 2d 31 0d 03 84 5b 20  20 20 20 e7 20 73 6f 72  |1-1...[    . sor|
00000990  74 24 28 69 25 29 3e 73  6f 72 74 24 28 69 25 2b  |t$(i%)>sort$(i%+|
000009a0  31 29 20 8c 20 c8 94 20  73 6f 72 74 24 28 69 25  |1) . .. sort$(i%|
000009b0  29 2c 73 6f 72 74 24 28  69 25 2b 31 29 3a c8 94  |),sort$(i%+1):..|
000009c0  20 73 6f 72 74 25 28 69  25 29 2c 73 6f 72 74 25  | sort%(i%),sort%|
000009d0  28 69 25 2b 31 29 3a 66  6c 61 67 25 3d 31 0d 03  |(i%+1):flag%=1..|
000009e0  8e 0a 20 20 ed 20 69 25  0d 03 98 0d fd 20 66 6c  |..  . i%..... fl|
000009f0  61 67 25 3d 30 0d 03 a2  04 0d 03 ac 15 e3 20 69  |ag%=0......... i|
00000a00  25 3d 31 20 b8 20 54 72  61 63 6b 3f 32 31 0d 03  |%=1 . Track?21..|
00000a10  b6 11 20 20 73 3d 73 6f  72 74 25 28 69 25 29 0d  |..  s=sort%(i%).|
00000a20  03 c0 44 20 20 6e 61 24  3d 24 28 54 72 61 63 6b  |..D  na$=$(Track|
00000a30  2b 73 2a 33 32 2b 32 30  29 3a 61 64 72 3d 54 72  |+s*32+20):adr=Tr|
00000a40  61 63 6b 2b 54 72 61 63  6b 21 28 73 2a 33 32 29  |ack+Track!(s*32)|
00000a50  3a 6c 65 6e 3d 54 72 61  63 6b 21 28 73 2a 33 32  |:len=Track!(s*32|
00000a60  2b 34 29 0d 03 ca 22 20  20 66 75 24 3d 22 49 6e  |+4)..."  fu$="In|
00000a70  73 74 22 2b 73 6f 72 74  24 28 69 25 29 2b 22 2e  |st"+sort$(i%)+".|
00000a80  22 2b 6e 61 24 0d 03 d4  0d 20 20 66 3d 8e 20 66  |"+na$....  f=. f|
00000a90  75 24 0d 03 de 0b 20 20  e7 20 66 20 8c 0d 03 e8  |u$....  . f ....|
00000aa0  13 20 20 20 20 f1 20 6e  61 24 3b 22 2c 20 22 3b  |.    . na$;", ";|
00000ab0  0d 03 f2 1d 20 20 20 20  24 28 61 64 72 2b 6c 65  |....    $(adr+le|
00000ac0  6e 29 3d c4 67 61 70 2d  31 2c bd 30 29 0d 03 fc  |n)=.gap-1,.0)...|
00000ad0  24 20 20 20 20 c8 99 20  22 4f 53 5f 47 42 50 42  |$    .. "OS_GBPB|
00000ae0  22 2c 34 2c 66 2c 61 64  72 2c 6c 65 6e 3a d9 23  |",4,f,adr,len:.#|
00000af0  66 0d 04 06 07 20 20 cc  0d 04 10 23 20 20 20 20  |f....  ....#    |
00000b00  64 69 73 63 3d 28 97 73  6f 72 74 24 28 69 25 29  |disc=(.sort$(i%)|
00000b10  2d 36 35 29 20 81 20 32  20 2b 31 0d 04 1a 33 20  |-65) . 2 +1...3 |
00000b20  20 20 20 f1 27 bd 37 3b  22 50 4c 45 41 53 45 20  |   .'.7;"PLEASE |
00000b30  49 4e 53 45 52 54 20 53  41 4d 50 4c 45 20 44 49  |INSERT SAMPLE DI|
00000b40  53 43 20 22 3b 64 69 73  63 3a 61 24 3d be 0d 04  |SC ";disc:a$=...|
00000b50  24 0e 20 20 20 20 e5 20  8d 64 54 43 0d 04 2e 07  |$.    . .dTC....|
00000b60  20 20 cd 0d 04 38 08 ed  20 69 25 0d 04 42 05 e1  |  ...8.. i%..B..|
00000b70  0d 04 4c 04 0d 04 56 10  dd 20 f2 5f 4d 75 73 69  |..L...V.. ._Musi|
00000b80  63 41 53 4d 0d 04 60 0a  67 61 70 3d 31 36 0d 04  |cASM..`.gap=16..|
00000b90  6a 0a 75 73 20 3d 34 38  0d 04 74 0a 5b 4f 50 54  |j.us =48..t.[OPT|
00000ba0  20 70 0d 04 7e 04 0d 04  88 28 3b 2d 2d 2d 2d 2d  | p..~....(;-----|
00000bb0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000bc0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 04  |--------------..|
00000bd0  92 05 3b 0d 04 9c 27 3b  20 54 48 45 20 43 4f 43  |..;...'; THE COC|
00000be0  4f 4e 49 5a 45 52 20 50  4c 41 59 45 52 20 52 4f  |ONIZER PLAYER RO|
00000bf0  55 54 49 4e 45 20 76 31  2e 33 0d 04 a6 05 3b 0d  |UTINE v1.3....;.|
00000c00  04 b0 25 3b 20 20 20 4e  65 65 64 73 20 32 30 25  |..%;   Needs 20%|
00000c10  20 6f 66 20 74 68 65 20  41 52 4d 2d 49 49 20 73  | of the ARM-II s|
00000c20  70 65 65 64 0d 04 ba 05  3b 0d 04 c4 1d 3b 20 20  |peed....;....;  |
00000c30  20 20 20 20 20 20 20 28  63 29 20 4d 61 69 20 31  |       (c) Mai 1|
00000c40  39 39 30 20 62 79 0d 04  ce 24 3b 20 20 20 20 45  |990 by...$;    E|
00000c50  64 75 61 72 64 20 50 66  61 72 72 20 26 20 54 68  |duard Pfarr & Th|
00000c60  6f 6d 61 73 20 41 6c 62  65 72 0d 04 d8 1c 3b 20  |omas Alber....; |
00000c70  20 20 20 20 20 20 20 20  20 20 6f 66 20 50 6c 61  |          of Pla|
00000c80  79 66 69 65 6c 64 0d 04  e2 05 3b 0d 04 ec 25 3b  |yfield....;...%;|
00000c90  20 20 20 4c 61 74 65 73  74 20 72 65 76 69 73 69  |   Latest revisi|
00000ca0  6f 6e 20 2d 20 32 30 20  46 65 62 20 31 39 39 31  |on - 20 Feb 1991|
00000cb0  0d 04 f6 05 3b 0d 05 00  28 3b 2d 2d 2d 2d 2d 2d  |....;...(;------|
00000cc0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000cd0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 05 0a  |-------------...|
00000ce0  04 0d 05 14 09 2e 76 5f  6f 6e 0d 05 1e 12 20 6d  |......v_on.... m|
00000cf0  6f 76 20 20 20 72 31 32  2c 72 31 34 0d 05 28 25  |ov   r12,r14..(%|
00000d00  20 6d 6f 76 20 20 20 72  30 2c 23 32 20 20 20 20  | mov   r0,#2    |
00000d10  20 20 20 20 20 20 20 20  20 20 20 20 3b c8 a0 20  |            ;.. |
00000d20  32 0d 05 32 45 20 6d 6f  76 20 20 20 72 31 2c 23  |2..2E mov   r1,#|
00000d30  32 30 38 20 20 20 20 20  20 20 20 20 20 20 20 20  |208             |
00000d40  20 3b 42 75 66 66 65 72  4c 65 6e 20 6f 66 20 ee  | ;BufferLen of .|
00000d50  45 20 63 68 61 6e 6e 65  6c 2c 20 74 6f 74 61 6c  |E channel, total|
00000d60  20 2a 56 6f 63 73 0d 05  3c 2e 20 6d 6f 76 20 20  | *Vocs..<. mov  |
00000d70  20 72 32 2c 23 75 73 20  20 20 20 20 20 20 20 20  | r2,#us         |
00000d80  20 20 20 20 20 20 3b 53  61 6d 70 6c 65 20 50 65  |      ;Sample Pe|
00000d90  72 69 6f 64 0d 05 46 37  20 6d 6f 76 20 20 20 72  |riod..F7 mov   r|
00000da0  33 2c 23 30 20 20 20 20  20 20 20 20 20 20 20 20  |3,#0            |
00000db0  20 20 20 20 3b 44 65 66  61 75 6c 74 20 43 68 61  |    ;Default Cha|
00000dc0  6e 6e 65 6c 48 61 6e 64  6c 65 72 0d 05 50 31 20  |nnelHandler..P1 |
00000dd0  6d 6f 76 20 20 20 72 34  2c 23 30 20 20 20 20 20  |mov   r4,#0     |
00000de0  20 20 20 20 20 20 20 20  20 20 20 3b 44 65 66 61  |           ;Defa|
00000df0  75 6c 74 20 53 68 65 64  75 6c 65 72 0d 05 5a 1c  |ult Sheduler..Z.|
00000e00  20 73 77 69 20 20 20 22  53 6f 75 6e 64 5f 43 6f  | swi   "Sound_Co|
00000e10  6e 66 69 67 75 72 65 22  0d 05 64 48 20 6d 6f 76  |nfigure"..dH mov|
00000e20  20 20 20 72 30 2c 23 56  6f 63 73 20 20 20 20 20  |   r0,#Vocs     |
00000e30  20 20 20 20 20 20 20 20  3b c8 a0 20 38 20 77 69  |        ;.. 8 wi|
00000e40  74 68 20 70 61 72 61 6d  73 20 64 6f 65 73 6e 27  |th params doesn'|
00000e50  74 20 77 6f 72 6b 20 64  69 72 65 63 74 6c 79 21  |t work directly!|
00000e60  0d 05 6e 49 20 6d 6f 76  20 20 20 72 31 2c 23 30  |..nI mov   r1,#0|
00000e70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e80  3b 42 65 63 61 75 73 65  20 74 68 65 6e 20 73 61  |;Because then sa|
00000e90  6d 70 6c 65 20 72 61 74  65 20 69 73 20 73 65 74  |mple rate is set|
00000ea0  20 66 61 6c 73 65 2e 2e  2e 0d 05 78 10 20 6d 6f  | false.....x. mo|
00000eb0  76 20 20 20 72 32 2c 23  30 0d 05 82 10 20 6d 6f  |v   r2,#0.... mo|
00000ec0  76 20 20 20 72 33 2c 23  30 0d 05 8c 10 20 6d 6f  |v   r3,#0.... mo|
00000ed0  76 20 20 20 72 34 2c 23  30 0d 05 96 1c 20 73 77  |v   r4,#0.... sw|
00000ee0  69 20 20 20 22 53 6f 75  6e 64 5f 43 6f 6e 66 69  |i   "Sound_Confi|
00000ef0  67 75 72 65 22 0d 05 a0  04 0d 05 aa 17 20 61 64  |gure"........ ad|
00000f00  72 20 20 20 72 30 2c 56  6f 69 63 65 42 61 73 65  |r   r0,VoiceBase|
00000f10  0d 05 b4 4b 20 6d 6f 76  20 20 20 72 31 2c 23 30  |...K mov   r1,#0|
00000f20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f30  20 20 20 20 20 3b 49 6e  73 74 61 6c 6c 20 6f 75  |     ;Install ou|
00000f40  72 20 56 6f 69 63 65 20  69 6e 74 6f 20 6e 65 78  |r Voice into nex|
00000f50  74 20 66 72 65 65 20 53  6c 6f 74 0d 05 be 1f 20  |t free Slot.... |
00000f60  73 77 69 20 20 20 22 53  6f 75 6e 64 5f 49 6e 73  |swi   "Sound_Ins|
00000f70  74 61 6c 6c 56 6f 69 63  65 22 0d 05 c8 35 20 73  |tallVoice"...5 s|
00000f80  74 72 20 20 20 72 31 2c  56 73 6c 6f 74 20 20 20  |tr   r1,Vslot   |
00000f90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00000fa0  73 74 6f 72 65 20 75 73  65 64 20 73 6c 6f 74 0d  |store used slot.|
00000fb0  05 d2 23 20 61 64 72 20  20 20 72 32 2c 56 73 74  |..# adr   r2,Vst|
00000fc0  65 72 65 6f 73 2d 34 2a  34 2a 28 56 6f 63 73 3d  |ereos-4*4*(Vocs=|
00000fd0  38 29 0d 05 dc 04 0d 05  e6 10 20 6d 6f 76 20 20  |8)........ mov  |
00000fe0  20 72 30 2c 23 31 0d 05  f0 0b 2e 76 69 6d 61 67  | r0,#1.....vimag|
00000ff0  65 0d 05 fa 15 20 6c 64  72 20 20 20 72 31 2c 5b  |e.... ldr   r1,[|
00001000  72 32 5d 2c 23 34 0d 06  04 2f 20 73 77 69 20 20  |r2],#4.../ swi  |
00001010  20 22 53 6f 75 6e 64 5f  53 74 65 72 65 6f 22 20  | "Sound_Stereo" |
00001020  20 20 20 20 20 20 20 20  20 20 20 3b 2a c8 a2 20  |           ;*.. |
00001030  72 30 20 72 31 0d 06 0e  13 20 61 64 64 20 20 20  |r0 r1.... add   |
00001040  72 30 2c 72 30 2c 23 31  0d 06 18 13 20 63 6d 70  |r0,r0,#1.... cmp|
00001050  20 20 20 72 30 2c 23 56  6f 63 73 0d 06 22 11 20  |   r0,#Vocs..". |
00001060  62 4c 73 20 20 20 76 69  6d 61 67 65 0d 06 2c 04  |bLs   vimage..,.|
00001070  0d 06 36 13 20 6d 6f 76  20 20 20 72 30 2c 23 56  |..6. mov   r0,#V|
00001080  6f 63 73 0d 06 40 09 2e  76 73 65 74 0d 06 4a 13  |ocs..@..vset..J.|
00001090  20 61 64 72 20 20 20 72  31 2c 56 6e 61 6d 65 0d  | adr   r1,Vname.|
000010a0  06 54 3b 20 73 77 69 20  20 20 22 53 6f 75 6e 64  |.T; swi   "Sound|
000010b0  5f 41 74 74 61 63 68 4e  61 6d 65 64 56 6f 69 63  |_AttachNamedVoic|
000010c0  65 22 20 20 3b 2a 43 48  41 4e 4e 45 4c 56 4f 49  |e"  ;*CHANNELVOI|
000010d0  43 45 20 72 30 20 22 72  31 22 0d 06 5e 13 20 6d  |CE r0 "r1"..^. m|
000010e0  6f 76 20 20 20 72 31 2c  23 26 31 37 30 0d 06 68  |ov   r1,#&170..h|
000010f0  3b 20 6d 6f 76 20 20 20  72 32 2c 23 35 30 20 20  |; mov   r2,#50  |
00001100  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 41 63  |             ;Ac|
00001110  74 69 76 61 74 65 20 61  6c 6c 20 63 68 61 6e 6e  |tivate all chann|
00001120  65 6c 73 20 6f 6e 63 65  0d 06 72 12 20 6d 6f 76  |els once..r. mov|
00001130  20 20 20 72 33 2c 23 32  35 35 0d 06 7c 2f 20 73  |   r3,#255..|/ s|
00001140  77 69 20 20 20 22 53 6f  75 6e 64 5f 43 6f 6e 74  |wi   "Sound_Cont|
00001150  72 6f 6c 22 20 20 20 20  20 20 3b 2a d4 20 72 30  |rol"      ;*. r0|
00001160  20 72 31 20 72 32 20 72  33 0d 06 86 13 20 73 75  | r1 r2 r3.... su|
00001170  62 53 20 20 72 30 2c 72  30 2c 23 31 0d 06 90 0f  |bS  r0,r0,#1....|
00001180  20 62 4e 65 20 20 20 76  73 65 74 0d 06 9a 04 0d  | bNe   vset.....|
00001190  06 a4 13 20 62 6c 20 20  20 20 76 61 62 73 6f 6c  |... bl    vabsol|
000011a0  75 74 0d 06 ae 12 20 62  6c 20 20 20 20 76 5f 72  |ut.... bl    v_r|
000011b0  65 73 65 74 0d 06 b8 3c  20 6d 6f 76 20 20 20 72  |eset...< mov   r|
000011c0  30 2c 23 31 36 20 20 20  20 20 20 20 20 20 20 20  |0,#16           |
000011d0  20 20 20 20 3b 43 6c 61  69 6d 20 45 56 45 4e 54  |    ;Claim EVENT|
000011e0  20 56 65 63 74 6f 72 20  28 4e 72 2e 20 31 36 29  | Vector (Nr. 16)|
000011f0  0d 06 c2 14 20 a4 61 64  72 20 28 31 2c 76 69 6e  |.... .adr (1,vin|
00001200  74 65 72 29 0d 06 cc 3b  20 61 64 72 20 20 20 72  |ter)...; adr   r|
00001210  32 2c 48 65 61 64 20 20  20 20 20 20 20 20 20 20  |2,Head          |
00001220  20 20 20 20 3b 45 6e 74  72 79 20 57 6f 72 6b 73  |    ;Entry Works|
00001230  70 61 63 65 50 6f 69 6e  74 65 72 20 72 31 32 0d  |pacePointer r12.|
00001240  06 d6 15 20 73 77 69 20  20 20 22 4f 53 5f 43 6c  |... swi   "OS_Cl|
00001250  61 69 6d 22 0d 06 e0 34  20 6d 6f 76 20 20 20 72  |aim"...4 mov   r|
00001260  30 2c 23 31 34 20 20 20  20 20 20 20 20 20 20 20  |0,#14           |
00001270  20 20 20 20 3b 45 6e 61  62 6c 65 20 45 76 65 6e  |    ;Enable Even|
00001280  74 20 4e 72 2e 20 72 31  0d 06 ea 32 20 6d 6f 76  |t Nr. r1...2 mov|
00001290  20 20 20 72 31 2c 23 34  20 20 20 20 20 20 20 20  |   r1,#4        |
000012a0  20 20 20 20 20 20 20 20  3b 28 34 20 3d 20 56 53  |        ;(4 = VS|
000012b0  79 6e 63 20 45 76 65 6e  74 29 0d 06 f4 14 20 73  |ync Event).... s|
000012c0  77 69 20 20 20 22 4f 53  5f 42 79 74 65 22 0d 06  |wi   "OS_Byte"..|
000012d0  fe 04 0d 07 08 31 20 6d  6f 76 20 20 20 72 30 2c  |.....1 mov   r0,|
000012e0  23 56 6f 63 73 20 20 20  20 20 20 20 20 20 20 20  |#Vocs           |
000012f0  20 20 3b 41 6e 64 20 6f  6e 63 65 20 6d 6f 72 65  |  ;And once more|
00001300  2e 2e 2e 0d 07 12 10 20  6d 6f 76 20 20 20 72 31  |....... mov   r1|
00001310  2c 23 30 0d 07 1c 10 20  6d 6f 76 20 20 20 72 32  |,#0.... mov   r2|
00001320  2c 23 30 0d 07 26 10 20  6d 6f 76 20 20 20 72 33  |,#0..&. mov   r3|
00001330  2c 23 30 0d 07 30 10 20  6d 6f 76 20 20 20 72 34  |,#0..0. mov   r4|
00001340  2c 23 30 0d 07 3a 27 20  73 77 69 20 20 20 22 53  |,#0..:' swi   "S|
00001350  6f 75 6e 64 5f 43 6f 6e  66 69 67 75 72 65 22 20  |ound_Configure" |
00001360  20 20 20 3b 47 72 72 72  68 21 0d 07 44 04 0d 07  |   ;Grrrh!..D...|
00001370  4e 34 20 6d 6f 76 20 20  20 72 30 2c 23 30 20 20  |N4 mov   r0,#0  |
00001380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 52  |              ;R|
00001390  65 61 64 20 63 75 72 72  65 6e 74 20 56 6f 6c 75  |ead current Volu|
000013a0  6d 65 0d 07 58 19 20 73  77 69 20 20 20 22 53 6f  |me..X. swi   "So|
000013b0  75 6e 64 5f 56 6f 6c 75  6d 65 22 0d 07 62 23 20  |und_Volume"..b# |
000013c0  6d 6f 76 20 20 20 72 30  2c 72 30 2c 6c 73 6c 23  |mov   r0,r0,lsl#|
000013d0  31 20 20 20 20 20 20 20  20 20 20 3b 2a 32 0d 07  |1          ;*2..|
000013e0  6c 15 20 72 73 62 20 20  20 72 30 2c 72 30 2c 23  |l. rsb   r0,r0,#|
000013f0  32 35 34 0d 07 76 3d 20  73 74 72 20 20 20 72 30  |254..v= str   r0|
00001400  2c 56 6f 6c 75 6d 65 20  20 20 20 20 20 20 20 20  |,Volume         |
00001410  20 20 20 3b 61 6e 64 20  75 73 65 20 69 74 20 61  |   ;and use it a|
00001420  73 20 6f 76 65 72 61 6c  6c 20 56 6f 6c 75 6d 65  |s overall Volume|
00001430  0d 07 80 11 20 6d 6f 76  20 20 20 70 63 2c 72 31  |.... mov   pc,r1|
00001440  32 0d 07 8a 04 0d 07 94  14 3b 2a 2a 2a 20 94 4f  |2........;*** .O|
00001450  4c 55 54 45 20 43 4f 44  45 0d 07 9e 04 0d 07 a8  |LUTE CODE.......|
00001460  0d 2e 76 61 62 73 6f 6c  75 74 0d 07 b2 14 20 a4  |..vabsolut.... .|
00001470  61 64 72 20 28 31 30 2c  54 72 61 63 6b 29 0d 07  |adr (10,Track)..|
00001480  bc 04 0d 07 c6 30 20 6c  64 72 20 20 20 72 31 2c  |.....0 ldr   r1,|
00001490  5b 72 31 30 2c 23 32 34  5d 20 20 20 20 20 20 20  |[r10,#24]       |
000014a0  20 20 3b 53 65 71 75 65  6e 63 65 20 4f 66 66 73  |  ;Sequence Offs|
000014b0  65 74 0d 07 d0 14 20 61  64 64 20 20 20 72 31 2c  |et.... add   r1,|
000014c0  72 31 30 2c 72 31 0d 07  da 17 20 73 74 72 20 20  |r10,r1.... str  |
000014d0  20 72 31 2c 5b 72 31 30  2c 23 32 34 5d 0d 07 e4  | r1,[r10,#24]...|
000014e0  2f 20 6c 64 72 20 20 20  72 32 2c 5b 72 31 30 2c  |/ ldr   r2,[r10,|
000014f0  23 32 38 5d 20 20 20 20  20 20 20 20 20 3b 50 61  |#28]         ;Pa|
00001500  74 74 65 72 6e 20 4f 66  66 73 65 74 0d 07 ee 14  |ttern Offset....|
00001510  20 61 64 64 20 20 20 72  32 2c 72 31 30 2c 72 32  | add   r2,r10,r2|
00001520  0d 07 f8 17 20 73 74 72  20 20 20 72 32 2c 5b 72  |.... str   r2,[r|
00001530  31 30 2c 23 32 38 5d 0d  08 02 04 0d 08 0c 30 20  |10,#28].......0 |
00001540  6c 64 72 42 20 20 72 31  2c 5b 72 31 30 2c 23 32  |ldrB  r1,[r10,#2|
00001550  31 5d 20 20 20 20 20 20  20 20 20 3b 4e 75 6d 62  |1]         ;Numb|
00001560  65 72 20 6f 66 20 49 6e  73 74 73 0d 08 16 09 2e  |er of Insts.....|
00001570  76 61 6c 6c 0d 08 20 31  20 6c 64 72 20 20 20 72  |vall.. 1 ldr   r|
00001580  32 2c 5b 72 31 30 2c 72  31 2c 6c 73 6c 23 35 5d  |2,[r10,r1,lsl#5]|
00001590  20 20 20 20 3b 49 6e 73  74 20 41 64 64 72 20 4f  |    ;Inst Addr O|
000015a0  66 66 73 65 74 0d 08 2a  14 20 61 64 64 20 20 20  |ffset..*. add   |
000015b0  72 32 2c 72 31 30 2c 72  32 0d 08 34 26 20 73 74  |r2,r10,r2..4& st|
000015c0  72 20 20 20 72 32 2c 5b  72 31 30 2c 72 31 2c 6c  |r   r2,[r10,r1,l|
000015d0  73 6c 23 35 5d 20 20 20  20 3b 2b 69 2a 33 32 0d  |sl#5]    ;+i*32.|
000015e0  08 3e 13 20 73 75 62 53  20 20 72 31 2c 72 31 2c  |.>. subS  r1,r1,|
000015f0  23 31 0d 08 48 0f 20 62  4e 65 20 20 20 76 61 6c  |#1..H. bNe   val|
00001600  6c 0d 08 52 04 0d 08 5c  36 20 6c 64 72 20 20 20  |l..R...\6 ldr   |
00001610  72 30 2c 5b 70 63 5d 20  20 20 20 20 20 20 20 20  |r0,[pc]         |
00001620  20 20 20 20 20 3b 44 6f  20 6e 6f 74 20 63 61 6c  |     ;Do not cal|
00001630  6c 20 72 65 6c 6f 63 61  74 65 72 0d 08 66 2d 20  |l relocater..f- |
00001640  73 74 72 20 20 20 72 30  2c 76 61 62 73 6f 6c 75  |str   r0,vabsolu|
00001650  74 20 20 20 20 20 20 20  20 20 20 3b 74 77 6f 20  |t          ;two |
00001660  74 69 6d 65 73 2e 2e 2e  0d 08 70 11 20 6d 6f 76  |times.....p. mov|
00001670  20 20 20 70 63 2c 72 31  34 0d 08 7a 04 0d 08 84  |   pc,r14..z....|
00001680  15 3b 2a 2a 2a 20 52 45  53 54 41 52 54 20 54 55  |.;*** RESTART TU|
00001690  4e 45 0d 08 8e 04 0d 08  98 0c 2e 76 5f 72 65 73  |NE.........v_res|
000016a0  65 74 0d 08 a2 14 20 a4  61 64 72 20 28 31 30 2c  |et.... .adr (10,|
000016b0  54 72 61 63 6b 29 0d 08  ac 11 20 6d 6f 76 20 20  |Track).... mov  |
000016c0  20 72 31 2c 23 36 34 0d  08 b6 2b 20 73 74 72 20  | r1,#64...+ str |
000016d0  20 20 72 31 2c 52 65 67  69 73 74 65 72 73 2b 30  |  r1,Registers+0|
000016e0  20 20 20 20 20 20 20 3b  50 61 74 74 20 43 6f 75  |       ;Patt Cou|
000016f0  6e 74 0d 08 c0 17 20 6c  64 72 20 20 20 72 32 2c  |nt.... ldr   r2,|
00001700  5b 72 31 30 2c 23 32 34  5d 0d 08 ca 39 20 73 74  |[r10,#24]...9 st|
00001710  72 20 20 20 72 32 2c 52  65 67 69 73 74 65 72 73  |r   r2,Registers|
00001720  2b 38 20 20 20 20 20 20  20 3b 43 75 72 72 65 6e  |+8       ;Curren|
00001730  74 20 53 65 71 75 65 6e  63 65 20 50 6f 69 6e 74  |t Sequence Point|
00001740  65 72 0d 08 d4 12 20 6c  64 72 42 20 20 72 32 2c  |er.... ldrB  r2,|
00001750  5b 72 32 5d 0d 08 de 17  20 6c 64 72 20 20 20 72  |[r2].... ldr   r|
00001760  33 2c 5b 72 31 30 2c 23  32 38 5d 0d 08 e8 23 20  |3,[r10,#28]...# |
00001770  61 64 64 20 20 20 72 33  2c 72 33 2c 72 32 2c 6c  |add   r3,r3,r2,l|
00001780  73 6c 23 31 30 2d 28 56  6f 63 73 3d 38 29 0d 08  |sl#10-(Vocs=8)..|
00001790  f2 38 20 73 74 72 20 20  20 72 33 2c 52 65 67 69  |.8 str   r3,Regi|
000017a0  73 74 65 72 73 2b 34 20  20 20 20 20 20 20 3b 43  |sters+4       ;C|
000017b0  75 72 72 65 6e 74 20 50  61 74 74 65 72 6e 20 50  |urrent Pattern P|
000017c0  6f 69 6e 74 65 72 0d 08  fc 04 0d 09 06 13 20 61  |ointer........ a|
000017d0  64 72 20 20 20 72 31 31  2c 48 65 61 64 0d 09 10  |dr   r11,Head...|
000017e0  2e 20 6d 6f 76 20 20 20  72 31 2c 23 30 3a 6d 6f  |. mov   r1,#0:mo|
000017f0  76 20 72 32 2c 23 30 3a  6d 6f 76 20 72 33 2c 23  |v r2,#0:mov r3,#|
00001800  30 3a 6d 6f 76 20 72 34  2c 23 30 0d 09 1a 2e 20  |0:mov r4,#0.... |
00001810  6d 6f 76 20 20 20 72 35  2c 23 30 3a 6d 6f 76 20  |mov   r5,#0:mov |
00001820  72 36 2c 23 30 3a 6d 6f  76 20 72 37 2c 23 30 3a  |r6,#0:mov r7,#0:|
00001830  6d 6f 76 20 72 38 2c 23  30 0d 09 24 13 20 6d 6f  |mov r8,#0..$. mo|
00001840  76 20 20 20 72 30 2c 23  56 6f 63 73 0d 09 2e 09  |v   r0,#Vocs....|
00001850  2e 76 61 6c 6c 0d 09 38  3b 20 73 74 6d 69 61 20  |.vall..8; stmia |
00001860  72 31 31 21 2c 7b 72 31  2d 72 38 7d 20 20 20 20  |r11!,{r1-r8}    |
00001870  20 20 20 20 20 3b 43 6c  65 61 72 20 61 6c 6c 20  |     ;Clear all |
00001880  63 68 61 6e 6e 65 6c 20  68 65 61 64 73 2e 2e 2e  |channel heads...|
00001890  0d 09 42 13 20 73 75 62  53 20 20 72 30 2c 72 30  |..B. subS  r0,r0|
000018a0  2c 23 31 0d 09 4c 0f 20  62 4e 65 20 20 20 76 61  |,#1..L. bNe   va|
000018b0  6c 6c 0d 09 56 11 20 6d  6f 76 20 20 20 70 63 2c  |ll..V. mov   pc,|
000018c0  72 31 34 0d 09 60 04 0d  09 6a 20 3b 2a 2a 2a 20  |r14..`...j ;*** |
000018d0  54 55 52 4e 20 87 20 50  4c 41 59 45 52 20 80 20  |TURN . PLAYER . |
000018e0  43 4f 43 4f 2d c8 a1 0d  09 74 04 0d 09 7e 0a 2e  |COCO-....t...~..|
000018f0  76 5f 6f 66 66 0d 09 88  35 20 6d 6f 76 20 20 20  |v_off...5 mov   |
00001900  72 30 2c 23 31 33 20 20  20 20 20 20 20 20 20 20  |r0,#13          |
00001910  20 20 20 20 20 3b 44 69  73 61 62 6c 65 20 45 76  |     ;Disable Ev|
00001920  65 6e 74 20 4e 72 2e 20  72 31 0d 09 92 32 20 6d  |ent Nr. r1...2 m|
00001930  6f 76 20 20 20 72 31 2c  23 34 20 20 20 20 20 20  |ov   r1,#4      |
00001940  20 20 20 20 20 20 20 20  20 20 3b 28 34 20 3d 20  |          ;(4 = |
00001950  56 53 79 6e 63 20 45 76  65 6e 74 29 0d 09 9c 14  |VSync Event)....|
00001960  20 73 77 69 20 20 20 22  4f 53 5f 42 79 74 65 22  | swi   "OS_Byte"|
00001970  0d 09 a6 3b 20 6d 6f 76  20 20 20 72 30 2c 23 31  |...; mov   r0,#1|
00001980  36 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |6               |
00001990  3b 46 72 65 65 20 45 56  45 4e 54 20 56 65 63 74  |;Free EVENT Vect|
000019a0  6f 72 20 28 4e 72 2e 20  31 36 29 0d 09 b0 14 20  |or (Nr. 16).... |
000019b0  61 64 72 20 20 20 72 31  2c 76 69 6e 74 65 72 0d  |adr   r1,vinter.|
000019c0  09 ba 12 20 61 64 72 20  20 20 72 32 2c 48 65 61  |... adr   r2,Hea|
000019d0  64 0d 09 c4 17 20 73 77  69 20 20 20 22 4f 53 5f  |d.... swi   "OS_|
000019e0  52 65 6c 65 61 73 65 22  0d 09 ce 04 0d 09 d8 13  |Release"........|
000019f0  20 6c 64 72 20 20 20 72  31 2c 56 73 6c 6f 74 0d  | ldr   r1,Vslot.|
00001a00  09 e2 45 20 73 77 69 20  20 20 22 53 6f 75 6e 64  |..E swi   "Sound|
00001a10  5f 52 65 6d 6f 76 65 56  6f 69 63 65 22 20 20 3b  |_RemoveVoice"  ;|
00001a20  4c 61 73 74 20 62 75 74  20 6e 6f 74 20 6c 65 61  |Last but not lea|
00001a30  73 74 2e 2e 2e 20 46 72  65 65 20 56 6f 69 63 65  |st... Free Voice|
00001a40  53 6c 6f 74 0d 09 ec 10  20 6d 6f 76 20 20 20 72  |Slot.... mov   r|
00001a50  30 2c 23 31 0d 09 f6 10  20 6d 6f 76 20 20 20 72  |0,#1.... mov   r|
00001a60  31 2c 23 31 0d 0a 00 2c  20 73 77 69 20 20 20 22  |1,#1..., swi   "|
00001a70  53 6f 75 6e 64 5f 41 74  74 61 63 68 56 6f 69 63  |Sound_AttachVoic|
00001a80  65 22 20 20 3b 52 65 69  6e 69 74 20 42 65 6c 6c  |e"  ;Reinit Bell|
00001a90  0d 0a 0a 11 20 6d 6f 76  20 20 20 70 63 2c 72 31  |.... mov   pc,r1|
00001aa0  34 0d 0a 14 04 0d 0a 1e  0d 2e 56 73 74 65 72 65  |4.........Vstere|
00001ab0  6f 73 0d 0a 28 32 20 64  63 64 20 2d 35 30 20 20  |os..(2 dcd -50  |
00001ac0  20 20 20 20 3b 53 74 65  72 65 6f 20 50 6f 73 69  |    ;Stereo Posi|
00001ad0  74 69 6f 6e 73 20 66 6f  72 20 34 20 63 68 61 6e  |tions for 4 chan|
00001ae0  6e 65 6c 73 0d 0a 32 0c  20 64 63 64 20 2d 32 30  |nels..2. dcd -20|
00001af0  0d 0a 3c 0c 20 64 63 64  20 20 32 30 0d 0a 46 0c  |..<. dcd  20..F.|
00001b00  20 64 63 64 20 20 35 30  0d 0a 50 04 0d 0a 5a 32  | dcd  50..P...Z2|
00001b10  20 64 63 64 2d 31 32 36  20 20 20 20 20 20 3b 53  | dcd-126      ;S|
00001b20  74 65 72 65 6f 20 50 6f  73 69 74 69 6f 6e 73 20  |tereo Positions |
00001b30  66 6f 72 20 38 20 63 68  61 6e 6e 65 6c 73 0d 0a  |for 8 channels..|
00001b40  64 0c 20 64 63 64 20 2d  39 30 0d 0a 6e 0c 20 64  |d. dcd -90..n. d|
00001b50  63 64 20 2d 35 34 0d 0a  78 0c 20 64 63 64 20 2d  |cd -54..x. dcd -|
00001b60  31 38 0d 0a 82 0c 20 64  63 64 20 20 31 38 0d 0a  |18.... dcd  18..|
00001b70  8c 0c 20 64 63 64 20 20  35 34 0d 0a 96 0c 20 64  |.. dcd  54.... d|
00001b80  63 64 20 20 39 30 0d 0a  a0 0c 20 64 63 64 20 31  |cd  90.... dcd 1|
00001b90  32 36 0d 0a aa 04 0d 0a  b4 10 2e 56 73 6c 6f 74  |26.........Vslot|
00001ba0  20 64 63 64 20 30 0d 0a  be 04 0d 0a c8 48 3b 3d  | dcd 0.......H;=|
00001bb0  3d 3d 3d 20 c8 99 54 45  4d 20 d4 20 3d 3d 3d 3d  |=== ..TEM . ====|
00001bc0  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00001bf0  3d 3d 0d 0a d2 04 0d 0a  dc 40 3b 20 72 36 20 4e  |==.......@; r6 N|
00001c00  65 67 2e 20 69 66 20 6e  65 77 20 48 61 6e 64 6c  |eg. if new Handl|
00001c10  65 72 20 20 20 20 72 31  30 20 50 6f 69 6e 74 65  |er    r10 Pointe|
00001c20  72 20 74 6f 20 65 6e 64  20 6f 66 20 44 4d 41 20  |r to end of DMA |
00001c30  62 75 66 66 65 72 0d 0a  e6 4d 3b 20 72 37 20 43  |buffer...M; r7 C|
00001c40  68 61 6e 6e 65 6c 20 6e  75 6d 62 65 72 20 20 20  |hannel number   |
00001c50  20 20 20 20 20 20 72 31  31 20 49 6e 63 72 65 6d  |      r11 Increm|
00001c60  65 6e 74 20 28 69 6e 74  65 72 6c 65 61 66 29 20  |ent (interleaf) |
00001c70  74 6f 20 75 73 65 20 77  68 65 6e 20 77 72 69 74  |to use when writ|
00001c80  69 6e 67 0d 0a f0 4d 3b  20 72 38 20 53 61 6d 70  |ing...M; r8 Samp|
00001c90  6c 65 20 70 65 72 69 6f  64 20 69 6e 20 75 73 20  |le period in us |
00001ca0  20 20 20 72 31 32 20 50  6f 69 6e 74 65 72 20 74  |   r12 Pointer t|
00001cb0  6f 20 28 73 74 61 72 74  20 6f 66 20 44 4d 41 20  |o (start of DMA |
00001cc0  2b 20 69 6e 74 65 72 6c  65 61 66 20 4f 66 73 29  |+ interleaf Ofs)|
00001cd0  0d 0a fa 4d 3b 20 72 39  20 50 6f 69 6e 74 65 72  |...M; r9 Pointer|
00001ce0  20 74 6f 20 53 43 43 42  20 20 20 20 20 20 20 20  | to SCCB        |
00001cf0  46 69 6c 6c 65 72 20 69  73 20 65 6e 74 65 72 65  |Filler is entere|
00001d00  64 20 69 6e 20 49 52 51  20 6d 6f 64 65 20 26 20  |d in IRQ mode & |
00001d10  49 6e 74 73 20 65 6e 61  62 6c 65 64 21 0d 0b 04  |Ints enabled!...|
00001d20  04 0d 0b 0e 0e 2e 56 6f  69 63 65 42 61 73 65 0d  |......VoiceBase.|
00001d30  0b 18 3f 20 62 20 20 20  20 20 76 66 69 6c 6c 20  |..? b     vfill |
00001d40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001d50  46 69 6c 6c 20 20 20 20  20 20 20 20 20 66 6f 72  |Fill         for|
00001d60  20 73 6d 6f 6f 74 68 20  61 64 6a 75 73 74 0d 0b  | smooth adjust..|
00001d70  22 3f 20 62 20 20 20 20  20 76 66 69 6c 6c 20 20  |"? b     vfill  |
00001d80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 55  |              ;U|
00001d90  70 64 61 74 65 20 20 20  20 20 20 20 66 6f 72 20  |pdate       for |
00001da0  74 6f 6e 65 20 63 6f 6e  74 69 6e 75 65 0d 0b 2c  |tone continue..,|
00001db0  3a 20 62 20 20 20 20 20  76 66 69 6c 6c 20 20 20  |: b     vfill   |
00001dc0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 47 61  |             ;Ga|
00001dd0  74 65 4f 6e 20 20 20 20  20 20 20 66 6f 72 20 6e  |teOn       for n|
00001de0  65 77 20 74 6f 6e 65 0d  0b 36 3f 20 6c 64 6d 66  |ew tone..6? ldmf|
00001df0  64 20 72 31 33 21 2c 7b  70 63 7d 20 20 20 20 20  |d r13!,{pc}     |
00001e00  20 20 20 20 20 20 20 3b  47 61 74 65 4f 66 66 20  |       ;GateOff |
00001e10  20 20 20 20 20 66 6f 72  20 74 6f 6e 65 20 66 6c  |     for tone fl|
00001e20  75 73 68 69 6e 67 0d 0b  40 48 20 6c 64 6d 66 64  |ushing..@H ldmfd|
00001e30  20 72 31 33 21 2c 7b 70  63 7d 20 20 20 20 20 20  | r13!,{pc}      |
00001e40  20 20 20 20 20 20 3b 49  6e 73 74 61 6e 74 69 61  |      ;Instantia|
00001e50  74 65 2c 20 20 20 41 74  74 61 63 68 20 20 20 20  |te,   Attach    |
00001e60  56 6f 69 63 65 47 65 6e  65 72 61 74 6f 72 0d 0b  |VoiceGenerator..|
00001e70  4a 4a 20 6c 64 6d 66 64  20 72 31 33 21 2c 7b 70  |JJ ldmfd r13!,{p|
00001e80  63 7d 20 20 20 20 20 20  20 20 20 20 20 20 3b 44  |c}            ;D|
00001e90  65 49 6e 73 74 61 6e 74  69 61 74 65 2c 20 44 65  |eInstantiate, De|
00001ea0  74 61 63 68 20 20 20 74  6f 2f 66 72 6f 6d 20 61  |tach   to/from a|
00001eb0  20 63 68 61 6e 6e 65 6c  0d 0b 54 2e 20 6c 64 6d  | channel..T. ldm|
00001ec0  66 64 20 72 31 33 21 2c  7b 70 63 7d 20 20 20 20  |fd r13!,{pc}    |
00001ed0  20 20 20 20 20 20 20 20  3b 48 65 6c 6c 6f 20 41  |        ;Hello A|
00001ee0  72 74 68 75 72 21 0d 0b  5e 3e 20 64 63 64 20 20  |rthur!..^> dcd  |
00001ef0  20 56 6e 61 6d 65 2d 56  6f 69 63 65 42 61 73 65  | Vname-VoiceBase|
00001f00  20 20 20 20 20 20 3b 4f  66 66 73 65 74 20 66 72  |      ;Offset fr|
00001f10  6f 6d 20 56 6f 69 63 65  42 61 73 65 20 74 6f 20  |om VoiceBase to |
00001f20  4e 61 6d 65 0d 0b 68 1c  2e 56 6e 61 6d 65 20 64  |Name..h..Vname d|
00001f30  63 62 20 22 43 6f 63 6f  70 6c 65 78 22 2b bd 30  |cb "Cocoplex"+.0|
00001f40  0d 0b 72 0a 20 61 6c 69  67 6e 0d 0b 7c 04 0d 0b  |..r. align..|...|
00001f50  86 0a 2e 76 66 69 6c 6c  0d 0b 90 43 20 74 65 71  |...vfill...C teq|
00001f60  50 20 20 70 63 2c 23 28  31 3c 3c 32 37 29 20 84  |P  pc,#(1<<27) .|
00001f70  20 25 31 30 20 20 20 3b  44 69 73 61 62 6c 65 20  | %10   ;Disable |
00001f80  49 52 51 2c 20 6e 6f 20  6d 6f 72 65 20 4c 6f 73  |IRQ, no more Los|
00001f90  65 72 20 66 69 6c 6c 69  6e 67 21 0d 0b 9a 3d 20  |er filling!...= |
00001fa0  61 64 72 20 20 20 72 38  2c 48 65 61 64 20 20 20  |adr   r8,Head   |
00001fb0  20 20 20 20 20 20 20 20  20 20 20 3b 57 65 20 75  |           ;We u|
00001fc0  73 65 20 61 6e 20 6f 77  6e 20 43 6f 6e 74 72 6f  |se an own Contro|
00001fd0  6c 6c 5f 42 6c 6f 63 6b  0d 0b a4 34 20 61 64 64  |ll_Block...4 add|
00001fe0  20 20 20 72 38 2c 72 38  2c 72 37 2c 6c 73 6c 23  |   r8,r8,r7,lsl#|
00001ff0  35 20 20 20 20 20 20 20  3b 70 6f 69 6e 74 20 74  |5       ;point t|
00002000  6f 20 48 65 61 64 2b 72  37 2a 33 32 0d 0b ae 39  |o Head+r7*32...9|
00002010  20 6c 64 6d 49 61 20 72  38 2c 7b 72 31 2d 72 36  | ldmIa r8,{r1-r6|
00002020  7d 20 20 20 20 20 20 20  20 20 20 20 3b 4c 6f 61  |}           ;Loa|
00002030  64 20 36 20 77 6f 72 6b  69 6e 67 20 52 65 67 69  |d 6 working Regi|
00002040  73 74 65 72 73 0d 0b b8  14 20 6c 64 72 20 20 20  |sters.... ldr   |
00002050  72 30 2c 56 6f 6c 75 6d  65 0d 0b c2 45 20 61 64  |r0,Volume...E ad|
00002060  64 20 20 20 72 35 2c 72  35 2c 72 30 20 20 20 20  |d   r5,r5,r0    |
00002070  20 20 20 20 20 20 20 20  20 3b 41 64 64 20 4f 76  |         ;Add Ov|
00002080  65 72 61 6c 6c 5f 56 6f  6c 75 6d 65 20 74 6f 20  |erall_Volume to |
00002090  43 68 61 6e 6e 65 6c 5f  56 6f 6c 75 6d 65 0d 0b  |Channel_Volume..|
000020a0  cc 04 0d 0b d6 0d 2e 76  66 69 6c 6c 6f 6f 70 0d  |.......vfilloop.|
000020b0  0b e0 48 5d 3a e3 20 6e  3d 31 20 b8 20 67 61 70  |..H]:. n=1 . gap|
000020c0  3a 5b 4f 50 54 20 70 20  20 20 20 20 3b 46 69 6c  |:[OPT p     ;Fil|
000020d0  6c 20 6f 6e 65 20 62 79  74 65 20 31 36 20 74 69  |l one byte 16 ti|
000020e0  6d 65 73 2c 20 66 6f 72  20 32 30 38 20 2d 3e 20  |mes, for 208 -> |
000020f0  31 33 20 72 75 6e 73 0d  0b ea 43 20 6c 64 72 42  |13 runs...C ldrB|
00002100  20 20 72 30 2c 5b 72 33  2c 72 31 2c 6c 73 72 23  |  r0,[r3,r1,lsr#|
00002110  31 36 5d 20 20 20 20 3b  4c 6f 61 64 20 73 61 6d  |16]    ;Load sam|
00002120  70 6c 65 20 62 79 74 65  20 28 48 69 67 68 57 6f  |ple byte (HighWo|
00002130  72 64 20 6f 66 20 50 6f  73 29 0d 0b f4 48 20 73  |rd of Pos)...H s|
00002140  75 62 53 20 20 72 30 2c  72 30 2c 72 35 20 20 20  |ubS  r0,r0,r5   |
00002150  20 20 20 20 20 20 20 20  20 20 3b 4d 69 6e 75 73  |          ;Minus|
00002160  20 56 6f 6c 75 6d 65 20  28 77 68 65 72 65 20 30  | Volume (where 0|
00002170  3d 6c 6f 75 64 20 26 20  32 35 35 3d 71 75 69 65  |=loud & 255=quie|
00002180  74 29 0d 0b fe 10 20 6d  6f 76 4d 69 20 72 30 2c  |t).... movMi r0,|
00002190  23 30 0d 0c 08 3c 20 73  74 72 42 20 20 72 30 2c  |#0...< strB  r0,|
000021a0  5b 72 31 32 5d 2c 72 31  31 20 20 20 20 20 20 20  |[r12],r11       |
000021b0  20 20 3b 41 6e 64 20 70  75 74 20 69 74 20 69 6e  |  ;And put it in|
000021c0  74 6f 20 56 49 44 43 2d  62 75 66 66 65 72 0d 0c  |to VIDC-buffer..|
000021d0  12 36 20 61 64 64 20 20  20 72 31 2c 72 31 2c 72  |.6 add   r1,r1,r|
000021e0  32 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 41  |2             ;A|
000021f0  64 64 20 50 69 74 63 68  20 28 66 69 78 20 70 6f  |dd Pitch (fix po|
00002200  69 6e 74 29 0d 0c 1c 0e  5d 3a ed 3a 5b 4f 50 54  |int)....]:.:[OPT|
00002210  20 70 0d 0c 26 04 0d 0c  30 48 20 63 6d 70 20 20  | p..&...0H cmp  |
00002220  20 72 34 2c 72 31 2c 6c  73 72 23 31 36 20 20 20  | r4,r1,lsr#16   |
00002230  20 20 20 20 20 20 3b 4c  65 6e 67 74 68 20 65 78  |      ;Length ex|
00002240  63 65 65 64 65 64 3f 20  28 4c 65 6e 20 3c 20 66  |ceeded? (Len < f|
00002250  69 78 70 6f 69 6e 74 65  64 20 50 6f 73 29 0d 0c  |ixpointed Pos)..|
00002260  3a 3a 20 6d 6f 76 4c 73  20 72 31 2c 72 36 20 20  |:: movLs r1,r6  |
00002270  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 59  |              ;Y|
00002280  65 73 2c 20 73 6f 20 52  65 70 41 74 20 69 73 20  |es, so RepAt is |
00002290  6e 65 77 20 50 6f 73 2c  0d 0c 44 34 20 63 6d 70  |new Pos,..D4 cmp|
000022a0  20 20 20 72 31 2c 23 30  20 20 20 20 20 20 20 20  |   r1,#0        |
000022b0  20 20 20 20 20 20 20 20  3b 20 20 20 20 62 75 74  |        ;    but|
000022c0  20 69 73 20 69 74 20 7a  65 72 6f 3f 0d 0c 4e 4c  | is it zero?..NL|
000022d0  20 6d 6f 76 45 71 20 72  32 2c 23 30 20 20 20 20  | movEq r2,#0    |
000022e0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 20 20  |            ;   |
000022f0  20 79 65 73 20 2d 3e 20  4d 75 74 65 20 43 68 61  | yes -> Mute Cha|
00002300  6e 6e 65 6c 20 28 69 65  20 53 65 74 20 50 69 74  |nnel (ie Set Pit|
00002310  63 68 20 74 6f 20 30 29  0d 0c 58 3c 20 63 6d 70  |ch to 0)..X< cmp|
00002320  20 20 20 72 31 32 2c 72  31 30 20 20 20 20 20 20  |   r12,r10      |
00002330  20 20 20 20 20 20 20 20  3b 56 49 44 43 2d 42 75  |        ;VIDC-Bu|
00002340  66 66 65 72 20 66 69 6c  6c 65 64 20 61 6c 72 65  |ffer filled alre|
00002350  61 64 79 3f 0d 0c 62 28  20 62 4c 6f 20 20 20 76  |ady?..b( bLo   v|
00002360  66 69 6c 6c 6f 6f 70 20  20 20 20 20 20 20 20 20  |filloop         |
00002370  20 20 20 20 3b 4e 6f 6f  6f 2e 2e 2e 0d 0c 6c 46  |    ;Nooo.....lF|
00002380  20 73 74 6d 49 61 20 72  38 2c 7b 72 31 2d 72 32  | stmIa r8,{r1-r2|
00002390  7d 20 20 20 20 20 20 20  20 20 20 20 3b 53 61 76  |}           ;Sav|
000023a0  65 20 74 68 65 20 74 77  6f 20 28 70 72 6f 62 61  |e the two (proba|
000023b0  62 6c 79 29 20 6d 6f 64  69 66 69 65 64 20 72 65  |bly) modified re|
000023c0  67 73 0d 0c 76 04 0d 0c  80 42 20 6d 6f 76 20 20  |gs..v....B mov  |
000023d0  20 72 30 2c 23 25 30 30  30 30 31 30 30 30 20 20  | r0,#%00001000  |
000023e0  20 20 20 20 20 20 3b 41  6e 64 20 72 65 74 75 72  |      ;And retur|
000023f0  6e 20 77 69 74 68 20 56  6f 69 63 65 5f 41 63 74  |n with Voice_Act|
00002400  69 76 65 5f 46 6c 61 67  0d 0c 8a 31 20 74 65 71  |ive_Flag...1 teq|
00002410  50 20 20 70 63 2c 23 28  30 3c 3c 32 37 29 20 84  |P  pc,#(0<<27) .|
00002420  20 25 31 30 20 20 20 3b  45 6e 61 62 6c 65 20 49  | %10   ;Enable I|
00002430  52 51 20 61 67 61 69 6e  21 0d 0c 94 14 20 6c 64  |RQ again!.... ld|
00002440  6d 66 64 20 72 31 33 21  2c 7b 70 63 7d 0d 0c 9e  |mfd r13!,{pc}...|
00002450  04 0d 0c a8 09 2e 48 65  61 64 0d 0c b2 4b 20 64  |......Head...K d|
00002460  63 64 20 30 20 20 20 20  20 20 20 20 20 20 20 20  |cd 0            |
00002470  20 20 20 20 20 20 20 20  20 20 3b 72 31 20 50 6f  |          ;r1 Po|
00002480  73 20 69 6e 20 74 68 65  20 73 61 6d 70 6c 65 20  |s in the sample |
00002490  28 4f 66 66 73 65 74 20  69 6e 20 66 69 78 20 70  |(Offset in fix p|
000024a0  6f 69 6e 74 29 0d 0c bc  4a 20 64 63 64 20 30 20  |oint)...J dcd 0 |
000024b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000024c0  20 20 20 20 20 3b 72 32  20 49 6e 63 72 65 6d 65  |     ;r2 Increme|
000024d0  6e 74 2f 50 69 74 63 68  20 28 4c 6f 77 57 6f 72  |nt/Pitch (LowWor|
000024e0  64 20 66 6f 72 20 66 69  78 70 6f 69 6e 74 29 0d  |d for fixpoint).|
000024f0  0c c6 31 20 64 63 64 20  30 20 20 20 20 20 20 20  |..1 dcd 0       |
00002500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00002510  72 33 20 53 61 6d 70 6c  65 20 41 64 72 65 73 73  |r3 Sample Adress|
00002520  0d 0c d0 2a 20 64 63 64  20 30 20 20 20 20 20 20  |...* dcd 0      |
00002530  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002540  3b 72 34 20 4c 65 6e 67  74 68 0d 0c da 41 20 64  |;r4 Length...A d|
00002550  63 64 20 30 20 20 20 20  20 20 20 20 20 20 20 20  |cd 0            |
00002560  20 20 20 20 20 20 20 20  20 20 3b 72 35 20 56 6f  |          ;r5 Vo|
00002570  6c 75 6d 65 20 28 30 3d  4c 6f 75 64 20 2e 2e 2e  |lume (0=Loud ...|
00002580  20 32 35 35 3d 51 75 69  65 74 29 0d 0c e4 4d 20  | 255=Quiet)...M |
00002590  64 63 64 20 30 20 20 20  20 20 20 20 20 20 20 20  |dcd 0           |
000025a0  20 20 20 20 20 20 20 20  20 20 20 3b 72 36 20 52  |           ;r6 R|
000025b0  65 70 41 74 20 28 4e 65  77 20 66 69 78 70 6f 69  |epAt (New fixpoi|
000025c0  6e 74 20 50 6f 73 29 2c  20 6f 72 20 30 20 66 6f  |nt Pos), or 0 fo|
000025d0  72 20 4e 4f 20 52 45 50  0d 0c ee 42 20 64 63 64  |r NO REP...B dcd|
000025e0  20 30 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | 0              |
000025f0  20 20 20 20 20 20 20 20  3b 42 79 74 65 20 2b 32  |        ;Byte +2|
00002600  34 20 56 61 6c 75 65 20  66 6f 72 20 41 75 74 6f  |4 Value for Auto|
00002610  20 56 6f 6c 75 6d 65 20  75 70 0d 0c f8 44 20 20  | Volume up...D  |
00002620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002630  20 20 20 20 20 20 20 20  20 20 3b 20 20 20 20 20  |          ;     |
00002640  20 32 35 20 20 20 22 20  20 20 20 22 20 20 20 22  | 25   "    "   "|
00002650  20 20 20 56 6f 6c 75 6d  65 20 64 6f 77 6e 0d 0d  |   Volume down..|
00002660  02 41 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.A              |
00002670  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00002680  20 20 20 20 20 32 36 20  20 20 22 20 20 20 20 22  |     26   "    "|
00002690  20 20 20 22 20 20 20 50  69 74 63 68 20 75 70 0d  |   "   Pitch up.|
000026a0  0d 0c 43 20 20 20 20 20  20 20 20 20 20 20 20 20  |..C             |
000026b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
000026c0  20 20 20 20 20 20 32 37  20 20 20 22 20 20 20 20  |      27   "    |
000026d0  22 20 20 20 22 20 20 20  50 69 74 63 68 20 64 6f  |"   "   Pitch do|
000026e0  77 6e 0d 0d 16 3a 20 64  63 64 20 30 20 20 20 20  |wn...: dcd 0    |
000026f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002700  20 20 3b 42 79 74 65 20  2b 32 38 20 41 63 74 75  |  ;Byte +28 Actu|
00002710  61 6c 20 49 6e 66 6f 20  42 79 74 65 0d 0d 20 3a  |al Info Byte.. :|
00002720  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002730  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 20 20  |            ;   |
00002740  20 20 20 32 39 20 41 63  74 75 61 6c 20 43 6f 6d  |   29 Actual Com|
00002750  6d 20 42 79 74 65 0d 0d  2a 39 20 20 20 20 20 20  |m Byte..*9      |
00002760  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002770  20 20 20 20 20 20 3b 20  20 20 20 20 20 33 30 20  |      ;      30 |
00002780  28 53 6f 75 6e 64 20 46  58 20 46 6c 61 67 29 0d  |(Sound FX Flag).|
00002790  0d 34 3e 20 20 20 20 20  20 20 20 20 20 20 20 20  |.4>             |
000027a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
000027b0  20 20 20 20 20 20 33 31  20 4c 61 73 74 20 6c 65  |      31 Last le|
000027c0  67 61 6c 20 74 6f 6e 65  2f 6e 6f 74 65 0d 0d 3e  |gal tone/note..>|
000027d0  04 0d 0d 48 35 20 64 63  62 20 c4 33 2a 33 32 2d  |...H5 dcb .3*32-|
000027e0  34 2a 33 32 2a 28 56 6f  63 73 3d 38 29 2c bd 30  |4*32*(Vocs=8),.0|
000027f0  29 20 20 20 20 3b 41 64  64 20 33 20 6f 72 20 37  |)    ;Add 3 or 7|
00002800  20 48 65 61 64 73 0d 0d  52 04 0d 0d 5c 35 2e 56  | Heads..R...\5.V|
00002810  2e 56 2e 65 20 20 20 20  20 20 20 64 63 64 20 30  |.V.e       dcd 0|
00002820  20 20 20 20 20 20 20 20  20 3b 4f 76 65 72 61 6c  |         ;Overal|
00002830  6c 5f 53 6f 75 6e 64 5f  56 6f 6c 75 6d 65 0d 0d  |l_Sound_Volume..|
00002840  66 04 0d 0d 70 4d 3b 3d  3d 3d 3d 20 50 4c 41 59  |f...pM;==== PLAY|
00002850  20 45 56 45 4e 54 20 3d  3d 3d 3d 3d 3d 3d 3d 3d  | EVENT =========|
00002860  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |================|
*
00002880  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 3d 3d 3d 3d 0d  |===============.|
00002890  0d 7a 05 20 0d 0d 84 3d  3b 2a 2a 2a 20 44 4f 20  |.z. ...=;*** DO |
000028a0  45 56 45 52 59 20 56 53  59 4e 43 20 45 46 46 45  |EVERY VSYNC EFFE|
000028b0  43 54 53 20 28 23 72 30  3d 54 69 6d 65 72 20 2e  |CTS (#r0=Timer .|
000028c0  2e 2e 20 24 72 30 3d 70  72 65 73 65 72 76 65 64  |.. $r0=preserved|
000028d0  29 0d 0d 8e 04 0d 0d 98  0d 2e 76 65 66 66 65 63  |).........veffec|
000028e0  74 73 0d 0d a2 33 20 6c  64 72 20 20 20 72 34 2c  |ts...3 ldr   r4,|
000028f0  5b 72 31 32 2c 23 34 5d  20 20 20 20 20 20 20 20  |[r12,#4]        |
00002900  20 20 3b 4c 6f 61 64 20  63 75 72 72 65 6e 74 20  |  ;Load current |
00002910  50 69 74 63 68 0d 0d ac  4a 20 63 6d 70 20 20 20  |Pitch...J cmp   |
00002920  72 34 2c 23 30 20 20 20  20 20 20 20 20 20 20 20  |r4,#0           |
00002930  20 20 20 20 20 3b 4e 6f  20 61 63 74 69 76 65 20  |     ;No active |
00002940  74 6f 6e 65 20 2d 3e 20  73 6f 72 72 79 2c 20 65  |tone -> sorry, e|
00002950  66 66 65 63 74 20 64 69  73 61 62 6c 65 64 21 0d  |ffect disabled!.|
00002960  0d b6 11 20 6d 6f 76 45  71 20 70 63 2c 72 31 34  |... movEq pc,r14|
00002970  0d 0d c0 32 20 6c 64 72  20 20 20 72 33 2c 5b 72  |...2 ldr   r3,[r|
00002980  31 32 2c 23 32 34 5d 20  20 20 20 20 20 20 20 20  |12,#24]         |
00002990  3b 4c 6f 61 64 20 41 75  74 6f 2d 45 66 66 65 63  |;Load Auto-Effec|
000029a0  74 73 0d 0d ca 29 20 6d  6f 76 20 20 20 72 31 30  |ts...) mov   r10|
000029b0  2c 72 31 34 20 20 20 20  20 20 20 20 20 20 20 20  |,r14            |
000029c0  20 20 3b 50 75 73 68 20  72 31 34 0d 0d d4 39 20  |  ;Push r14...9 |
000029d0  61 6e 64 53 20 20 72 32  2c 72 33 2c 23 26 66 66  |andS  r2,r3,#&ff|
000029e0  20 20 20 20 20 20 20 20  20 20 20 3b 49 73 20 74  |           ;Is t|
000029f0  68 65 72 65 20 41 75 74  6f 20 56 6f 6c 75 6d 65  |here Auto Volume|
00002a00  20 75 70 3f 0d 0d de 12  20 62 6c 4e 65 20 20 76  | up?.... blNe  v|
00002a10  5f 76 6f 6c 75 70 0d 0d  e8 3b 20 61 6e 64 53 20  |_volup...; andS |
00002a20  20 72 32 2c 72 33 2c 23  26 66 66 20 3c 3c 38 20  | r2,r3,#&ff <<8 |
00002a30  20 20 20 20 20 20 3b 49  73 20 74 68 65 72 65 20  |      ;Is there |
00002a40  41 75 74 6f 20 56 6f 6c  75 6d 65 20 64 6f 77 6e  |Auto Volume down|
00002a50  3f 0d 0d f2 16 20 6d 6f  76 4e 65 20 72 32 2c 72  |?.... movNe r2,r|
00002a60  32 2c 6c 73 72 23 38 0d  0d fc 14 20 62 6c 4e 65  |2,lsr#8.... blNe|
00002a70  20 20 76 5f 76 6f 6c 64  6f 77 6e 0d 0e 06 38 20  |  v_voldown...8 |
00002a80  61 6e 64 53 20 20 72 32  2c 72 33 2c 23 26 66 66  |andS  r2,r3,#&ff|
00002a90  20 3c 3c 31 36 20 20 20  20 20 20 3b 49 73 20 74  | <<16      ;Is t|
00002aa0  68 65 72 65 20 41 75 74  6f 20 50 69 74 63 68 20  |here Auto Pitch |
00002ab0  75 70 3f 0d 0e 10 17 20  6d 6f 76 4e 65 20 72 32  |up?.... movNe r2|
00002ac0  2c 72 32 2c 6c 73 72 23  31 36 0d 0e 1a 12 20 62  |,r2,lsr#16.... b|
00002ad0  6c 4e 65 20 20 76 5f 61  72 63 75 70 0d 0e 24 3a  |lNe  v_arcup..$:|
00002ae0  20 61 6e 64 53 20 20 72  32 2c 72 33 2c 23 26 66  | andS  r2,r3,#&f|
00002af0  66 20 3c 3c 32 34 20 20  20 20 20 20 3b 49 73 20  |f <<24      ;Is |
00002b00  74 68 65 72 65 20 41 75  74 6f 20 50 69 74 63 68  |there Auto Pitch|
00002b10  20 64 6f 77 6e 3f 0d 0e  2e 17 20 6d 6f 76 4e 65  | down?.... movNe|
00002b20  20 72 32 2c 72 32 2c 6c  73 72 23 32 34 0d 0e 38  | r2,r2,lsr#24..8|
00002b30  14 20 62 6c 4e 65 20 20  76 5f 61 72 63 64 6f 77  |. blNe  v_arcdow|
00002b40  6e 0d 0e 42 29 20 6d 6f  76 20 20 20 72 31 34 2c  |n..B) mov   r14,|
00002b50  72 31 30 20 20 20 20 20  20 20 20 20 20 20 20 20  |r10             |
00002b60  20 3b 50 6f 70 20 20 72  31 34 0d 0e 4c 04 0d 0e  | ;Pop  r14..L...|
00002b70  56 4b 20 6c 64 72 20 20  20 72 31 2c 5b 72 31 32  |VK ldr   r1,[r12|
00002b80  2c 23 32 38 5d 20 20 20  20 20 20 20 20 20 3b 45  |,#28]         ;E|
00002b90  66 66 65 63 74 20 4c 57  6f 72 64 20 26 20 4c 61  |ffect LWord & La|
00002ba0  73 74 20 54 6f 6e 65 20  61 72 65 20 69 6e 20 74  |st Tone are in t|
00002bb0  68 65 20 48 65 61 64 65  72 0d 0e 60 31 20 61 6e  |he Header..`1 an|
00002bc0  64 53 20 20 72 32 2c 72  31 2c 23 26 66 66 20 20  |dS  r2,r1,#&ff  |
00002bd0  20 20 20 20 20 20 20 20  20 3b 49 73 6f 6c 61 74  |         ;Isolat|
00002be0  65 20 49 6e 66 6f 42 79  74 65 0d 0e 6a 45 20 6d  |e InfoByte..jE m|
00002bf0  6f 76 45 71 20 70 63 2c  72 31 34 20 20 20 20 20  |ovEq pc,r14     |
00002c00  20 20 20 20 20 20 20 20  20 20 3b 69 66 20 30 2c  |          ;if 0,|
00002c10  20 74 68 65 6e 20 74 68  65 72 65 27 73 20 6e 6f  | then there's no|
00002c20  20 65 66 66 65 63 74 20  61 74 20 61 6c 6c 21 0d  | effect at all!.|
00002c30  0e 74 36 20 61 6e 64 20  20 20 72 33 2c 72 31 2c  |.t6 and   r3,r1,|
00002c40  23 26 66 66 30 30 20 20  20 20 20 20 20 20 20 3b  |#&ff00         ;|
00002c50  49 73 6f 6c 61 74 65 20  45 66 66 65 63 74 20 6e  |Isolate Effect n|
00002c60  75 6d 62 65 72 0d 0e 7e  4d 20 6c 64 72 20 20 20  |umber..~M ldr   |
00002c70  72 33 2c 5b 70 63 2c 72  33 2c 6c 73 72 23 36 5d  |r3,[pc,r3,lsr#6]|
00002c80  20 20 20 20 20 3b 6c 73  72 23 38 20 66 6f 72 20  |     ;lsr#8 for |
00002c90  65 66 66 65 63 74 20 69  6e 74 6f 20 6c 6f 77 62  |effect into lowb|
00002ca0  79 74 65 20 26 20 6c 73  6c 23 32 20 66 6f 72 20  |yte & lsl#2 for |
00002cb0  2a 34 0d 0e 88 13 20 61  64 64 20 20 20 70 63 2c  |*4.... add   pc,|
00002cc0  70 63 2c 72 33 0d 0e 92  04 0d 0e 9c 2e 20 64 63  |pc,r3........ dc|
00002cd0  64 20 20 20 76 5f 61 72  70 65 67 67 69 6f 2d 76  |d   v_arpeggio-v|
00002ce0  6f 66 31 20 20 20 20 20  20 3b 20 30 20 3d 20 41  |of1      ; 0 = A|
00002cf0  72 70 65 67 67 69 6f 0d  0e a6 09 2e 76 6f 66 31  |rpeggio.....vof1|
00002d00  0d 0e b0 46 20 64 63 64  20 20 20 76 5f 73 6c 69  |...F dcd   v_sli|
00002d10  64 65 75 70 2d 76 6f 66  31 20 20 20 20 20 20 20  |deup-vof1       |
00002d20  3b 20 31 20 3d 20 53 6c  69 64 65 20 50 69 74 63  |; 1 = Slide Pitc|
00002d30  68 20 75 70 20 20 20 28  74 69 6c 6c 20 41 6d 69  |h up   (till Ami|
00002d40  73 20 4d 61 78 29 0d 0e  ba 46 20 64 63 64 20 20  |s Max)...F dcd  |
00002d50  20 76 5f 73 6c 69 64 65  64 6f 77 6e 2d 76 6f 66  | v_slidedown-vof|
00002d60  31 20 20 20 20 20 3b 20  32 20 3d 20 53 6c 69 64  |1     ; 2 = Slid|
00002d70  65 20 50 69 74 63 68 20  64 6f 77 6e 20 28 74 69  |e Pitch down (ti|
00002d80  6c 6c 20 41 6d 69 73 20  4d 69 6e 29 0d 0e c4 2f  |ll Amis Min).../|
00002d90  20 64 63 64 20 20 20 76  5f 76 6f 6c 75 70 2d 76  | dcd   v_volup-v|
00002da0  6f 66 31 20 20 20 20 20  20 20 20 20 3b 20 33 20  |of1         ; 3 |
00002db0  3d 20 56 3d 20 56 3d 65  20 75 70 0d 0e ce 31 20  |= V= V=e up...1 |
00002dc0  64 63 64 20 20 20 76 5f  76 6f 6c 64 6f 77 6e 2d  |dcd   v_voldown-|
00002dd0  76 6f 66 31 20 20 20 20  20 20 20 3b 20 34 20 3d  |vof1       ; 4 =|
00002de0  20 56 6f 6c 75 6d 65 20  64 6f 77 6e 0d 0e d8 38  | Volume down...8|
00002df0  20 64 63 64 20 20 20 76  5f 61 72 63 75 70 2d 76  | dcd   v_arcup-v|
00002e00  6f 66 31 20 20 20 20 20  20 20 20 20 3b 20 35 20  |of1         ; 5 |
00002e10  3d 20 53 6c 69 64 65 20  41 72 63 20 50 69 74 63  |= Slide Arc Pitc|
00002e20  68 20 75 70 0d 0e e2 3a  20 64 63 64 20 20 20 76  |h up...: dcd   v|
00002e30  5f 61 72 63 64 6f 77 6e  2d 76 6f 66 31 20 20 20  |_arcdown-vof1   |
00002e40  20 20 20 20 3b 20 36 20  3d 20 53 6c 69 64 65 20  |    ; 6 = Slide |
00002e50  41 72 63 20 50 69 74 63  68 20 64 6f 77 6e 0d 0e  |Arc Pitch down..|
00002e60  ec 04 0d 0e f6 0f 2e 76  5f 61 72 70 65 67 67 69  |.......v_arpeggi|
00002e70  6f 0d 0f 00 42 20 6d 6f  76 20 20 20 72 31 2c 72  |o...B mov   r1,r|
00002e80  31 2c 6c 73 72 23 32 34  20 20 20 20 20 20 20 20  |1,lsr#24        |
00002e90  20 3b 47 65 74 20 6c 61  73 74 20 73 74 6f 72 65  | ;Get last store|
00002ea0  64 20 54 6f 6e 65 20 69  6e 74 6f 20 6c 6f 77 62  |d Tone into lowb|
00002eb0  79 74 65 0d 0f 0a 2a 20  63 6d 70 20 20 20 72 30  |yte...* cmp   r0|
00002ec0  2c 23 31 20 20 20 20 20  20 20 20 20 20 20 20 20  |,#1             |
00002ed0  20 20 20 3b 54 69 6d 65  3d 31 20 6f 72 0d 0f 14  |   ;Time=1 or...|
00002ee0  27 20 63 6d 70 4e 65 20  72 30 2c 23 34 20 20 20  |' cmpNe r0,#4   |
00002ef0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 54 69  |             ;Ti|
00002f00  6d 65 3d 34 0d 0f 1e 46  20 61 64 64 45 71 20 72  |me=4...F addEq r|
00002f10  31 2c 72 31 2c 72 32 2c  6c 73 72 23 34 20 20 20  |1,r1,r2,lsr#4   |
00002f20  20 20 20 20 3b 20 2e 2e  2e 74 68 65 6e 20 61 64  |    ; ...then ad|
00002f30  64 20 20 6c 65 66 74 20  49 6e 66 6f 4e 69 62 62  |d  left InfoNibb|
00002f40  6c 65 20 74 6f 20 4e 6f  74 65 0d 0f 28 2a 20 63  |le to Note..(* c|
00002f50  6d 70 20 20 20 72 30 2c  23 32 20 20 20 20 20 20  |mp   r0,#2      |
00002f60  20 20 20 20 20 20 20 20  20 20 3b 54 69 6d 65 3d  |          ;Time=|
00002f70  32 20 6f 72 0d 0f 32 27  20 63 6d 70 4e 65 20 72  |2 or..2' cmpNe r|
00002f80  30 2c 23 35 20 20 20 20  20 20 20 20 20 20 20 20  |0,#5            |
00002f90  20 20 20 20 3b 54 69 6d  65 3d 35 0d 0f 3c 46 20  |    ;Time=5..<F |
00002fa0  61 6e 64 45 71 20 72 32  2c 72 32 2c 23 26 30 66  |andEq r2,r2,#&0f|
00002fb0  20 20 20 20 20 20 20 20  20 20 20 3b 20 2e 2e 2e  |           ; ...|
00002fc0  74 68 65 6e 20 61 64 64  20 72 69 67 68 74 20 49  |then add right I|
00002fd0  6e 66 6f 4e 69 62 62 6c  65 20 74 6f 20 4e 6f 74  |nfoNibble to Not|
00002fe0  65 0d 0f 46 13 20 61 64  64 45 71 20 72 31 2c 72  |e..F. addEq r1,r|
00002ff0  31 2c 72 32 0d 0f 50 49  20 6c 64 72 20 20 20 72  |1,r2..PI ldr   r|
00003000  31 2c 5b 72 31 31 2c 72  31 2c 6c 73 6c 23 32 5d  |1,[r11,r1,lsl#2]|
00003010  20 20 20 20 3b 47 65 74  20 65 71 75 69 76 61 6c  |    ;Get equival|
00003020  65 6e 74 20 46 72 65 71  75 65 6e 63 79 20 66 72  |ent Frequency fr|
00003030  6f 6d 20 72 31 31 3d 66  54 61 62 6c 65 0d 0f 5a  |om r11=fTable..Z|
00003040  2c 20 73 74 72 20 20 20  72 31 2c 5b 72 31 32 2c  |, str   r1,[r12,|
00003050  23 34 5d 20 20 20 20 20  20 20 20 20 20 3b 45 6e  |#4]          ;En|
00003060  74 65 72 20 50 69 74 63  68 0d 0f 64 11 20 6d 6f  |ter Pitch..d. mo|
00003070  76 20 20 20 70 63 2c 72  31 34 0d 0f 6e 04 0d 0f  |v   pc,r14..n...|
00003080  78 0e 2e 76 5f 73 6c 69  64 65 75 70 0d 0f 82 32  |x..v_slideup...2|
00003090  20 61 64 64 20 20 20 72  31 2c 72 34 2c 72 32 2c  | add   r1,r4,r2,|
000030a0  6c 73 6c 23 36 20 20 20  20 20 20 20 3b 20 46 72  |lsl#6       ; Fr|
000030b0  65 71 2b 49 6e 66 6f 42  79 74 65 2a 36 34 0d 0f  |eq+InfoByte*64..|
000030c0  8c 44 20 63 6d 70 20 20  20 72 31 2c 23 26 31 38  |.D cmp   r1,#&18|
000030d0  38 30 30 20 20 20 20 20  20 20 20 20 20 20 3b 4d  |800           ;M|
000030e0  69 6e 20 50 65 72 20 3d  20 26 30 37 31 2c 20 69  |in Per = &071, i|
000030f0  65 20 4f 75 74 50 75 74  46 20 3c 20 26 31 38 34  |e OutPutF < &184|
00003100  44 41 0d 0f 96 16 20 73  74 72 4c 74 20 72 31 2c  |DA.... strLt r1,|
00003110  5b 72 31 32 2c 23 34 5d  0d 0f a0 11 20 6d 6f 76  |[r12,#4].... mov|
00003120  20 20 20 70 63 2c 72 31  34 0d 0f aa 10 2e 76 5f  |   pc,r14.....v_|
00003130  73 6c 69 64 65 64 6f 77  6e 0d 0f b4 32 20 73 75  |slidedown...2 su|
00003140  62 20 20 20 72 31 2c 72  34 2c 72 32 2c 6c 73 6c  |b   r1,r4,r2,lsl|
00003150  23 36 20 20 20 20 20 20  20 3b 20 46 72 65 71 2d  |#6       ; Freq-|
00003160  49 6e 66 6f 42 79 74 65  2a 36 34 0d 0f be 44 20  |InfoByte*64...D |
00003170  63 6d 70 20 20 20 72 31  2c 23 26 33 33 34 30 20  |cmp   r1,#&3340 |
00003180  20 20 20 20 20 20 20 20  20 20 20 3b 4d 61 78 20  |           ;Max |
00003190  50 65 72 20 3d 20 26 33  35 38 2c 20 69 65 20 4f  |Per = &358, ie O|
000031a0  75 74 50 75 74 46 20 3e  20 26 20 33 33 35 35 0d  |utPutF > & 3355.|
000031b0  0f c8 16 20 73 74 72 47  74 20 72 31 2c 5b 72 31  |... strGt r1,[r1|
000031c0  32 2c 23 34 5d 0d 0f d2  11 20 6d 6f 76 20 20 20  |2,#4].... mov   |
000031d0  70 63 2c 72 31 34 0d 0f  dc 04 0d 0f e6 0c 2e 76  |pc,r14.........v|
000031e0  5f 76 6f 6c 75 70 0d 0f  f0 4a 20 63 6d 70 20 20  |_volup...J cmp  |
000031f0  20 72 30 2c 23 31 20 20  20 20 20 20 20 20 20 20  | r0,#1          |
00003200  20 20 20 20 20 20 3b 4f  6e 6c 79 20 65 61 63 68  |      ;Only each|
00003210  20 66 69 72 73 74 20 76  5f 69 6e 74 65 72 72 75  | first v_interru|
00003220  70 74 20 66 6f 72 20 73  6c 6f 77 20 64 6f 77 6e  |pt for slow down|
00003230  0d 0f fa 11 20 6d 6f 76  4e 65 20 70 63 2c 72 31  |.... movNe pc,r1|
00003240  34 0d 10 04 38 20 6c 64  72 20 20 20 72 31 2c 5b  |4...8 ldr   r1,[|
00003250  72 31 32 2c 23 31 36 5d  20 20 20 20 20 20 20 20  |r12,#16]        |
00003260  20 3b 54 68 65 72 65 20  69 73 20 63 75 72 72 65  | ;There is curre|
00003270  6e 74 20 56 6f 6c 75 6d  65 0d 10 0e 13 20 73 75  |nt Volume.... su|
00003280  62 53 20 20 72 31 2c 72  31 2c 72 32 0d 10 18 4a  |bS  r1,r1,r2...J|
00003290  20 73 74 72 50 6c 20 72  31 2c 5b 72 31 32 2c 23  | strPl r1,[r12,#|
000032a0  31 36 5d 20 20 20 20 20  20 20 20 20 3b 49 66 20  |16]         ;If |
000032b0  6e 6f 74 20 3e 20 30 20  20 28 4d 61 78 20 56 6f  |not > 0  (Max Vo|
000032c0  6c 29 2c 20 74 68 65 6e  20 77 72 69 74 65 20 69  |l), then write i|
000032d0  74 20 62 61 63 6b 0d 10  22 11 20 6d 6f 76 20 20  |t back..". mov  |
000032e0  20 70 63 2c 72 31 34 0d  10 2c 0e 2e 76 5f 76 6f  | pc,r14..,..v_vo|
000032f0  6c 64 6f 77 6e 0d 10 36  10 20 63 6d 70 20 20 20  |ldown..6. cmp   |
00003300  72 30 2c 23 31 0d 10 40  11 20 6d 6f 76 4e 65 20  |r0,#1..@. movNe |
00003310  70 63 2c 72 31 34 0d 10  4a 17 20 6c 64 72 20 20  |pc,r14..J. ldr  |
00003320  20 72 31 2c 5b 72 31 32  2c 23 31 36 5d 0d 10 54  | r1,[r12,#16]..T|
00003330  13 20 61 64 64 20 20 20  72 31 2c 72 31 2c 72 32  |. add   r1,r1,r2|
00003340  0d 10 5e 12 20 63 6d 70  20 20 20 72 31 2c 23 32  |..^. cmp   r1,#2|
00003350  35 35 0d 10 68 4a 20 73  74 72 4c 73 20 72 31 2c  |55..hJ strLs r1,|
00003360  5b 72 31 32 2c 23 31 36  5d 20 20 20 20 20 20 20  |[r12,#16]       |
00003370  20 20 3b 49 66 20 6e 6f  74 20 3c 32 35 35 20 28  |  ;If not <255 (|
00003380  4d 69 6e 20 56 6f 6c 29  2c 20 74 68 65 6e 20 77  |Min Vol), then w|
00003390  72 69 74 65 20 69 74 20  62 61 63 6b 0d 10 72 11  |rite it back..r.|
000033a0  20 6d 6f 76 20 20 20 70  63 2c 72 31 34 0d 10 7c  | mov   pc,r14..||
000033b0  04 0d 10 86 0c 2e 76 5f  61 72 63 75 70 0d 10 90  |......v_arcup...|
000033c0  45 20 61 64 64 53 20 20  72 31 2c 72 34 2c 72 32  |E addS  r1,r4,r2|
000033d0  2c 6c 73 6c 23 34 20 20  20 20 20 20 20 3b 50 69  |,lsl#4       ;Pi|
000033e0  74 63 68 2b 49 6e 66 6f  42 79 74 65 2a 31 36 20  |tch+InfoByte*16 |
000033f0  28 66 6f 72 20 73 6c 6f  77 20 73 6c 69 64 69 6e  |(for slow slidin|
00003400  67 29 0d 10 9a 16 20 73  74 72 50 6c 20 72 31 2c  |g).... strPl r1,|
00003410  5b 72 31 32 2c 23 34 5d  0d 10 a4 11 20 6d 6f 76  |[r12,#4].... mov|
00003420  20 20 20 70 63 2c 72 31  34 0d 10 ae 0e 2e 76 5f  |   pc,r14.....v_|
00003430  61 72 63 64 6f 77 6e 0d  10 b8 45 20 73 75 62 53  |arcdown...E subS|
00003440  20 20 72 31 2c 72 34 2c  72 32 2c 6c 73 6c 23 34  |  r1,r4,r2,lsl#4|
00003450  20 20 20 20 20 20 20 3b  50 69 74 63 68 2d 49 6e  |       ;Pitch-In|
00003460  66 6f 42 79 74 65 2a 31  36 20 28 66 6f 72 20 73  |foByte*16 (for s|
00003470  6c 6f 77 20 73 6c 69 64  69 6e 67 29 0d 10 c2 16  |low sliding)....|
00003480  20 73 74 72 50 6c 20 72  31 2c 5b 72 31 32 2c 23  | strPl r1,[r12,#|
00003490  34 5d 0d 10 cc 11 20 6d  6f 76 20 20 20 70 63 2c  |4].... mov   pc,|
000034a0  72 31 34 0d 10 d6 04 0d  10 e0 1e 3b 2a 2a 2a 20  |r14........;*** |
000034b0  45 4e 54 52 59 20 c8 92  53 20 e3 20 47 41 4d 45  |ENTRY ..S . GAME|
000034c0  20 d4 20 46 58 0d 10 ea  04 0d 10 f4 08 2e 66 78  | . FX.........fx|
000034d0  31 0d 10 fe 18 20 61 64  72 20 20 20 72 31 32 2c  |1.... adr   r12,|
000034e0  48 65 61 64 2b 30 2a 33  32 0d 11 08 10 20 62 20  |Head+0*32.... b |
000034f0  20 20 20 20 66 78 34 2b  34 0d 11 12 08 2e 66 78  |    fx4+4.....fx|
00003500  32 0d 11 1c 18 20 61 64  72 20 20 20 72 31 32 2c  |2.... adr   r12,|
00003510  48 65 61 64 2b 31 2a 33  32 0d 11 26 10 20 62 20  |Head+1*32..&. b |
00003520  20 20 20 20 66 78 34 2b  34 0d 11 30 08 2e 66 78  |    fx4+4..0..fx|
00003530  33 0d 11 3a 18 20 61 64  72 20 20 20 72 31 32 2c  |3..:. adr   r12,|
00003540  48 65 61 64 2b 32 2a 33  32 0d 11 44 10 20 62 20  |Head+2*32..D. b |
00003550  20 20 20 20 66 78 34 2b  34 0d 11 4e 08 2e 66 78  |    fx4+4..N..fx|
00003560  34 0d 11 58 18 20 61 64  72 20 20 20 72 31 32 2c  |4..X. adr   r12,|
00003570  48 65 61 64 2b 33 2a 33  32 0d 11 62 10 20 6d 6f  |Head+3*32..b. mo|
00003580  76 20 20 20 72 30 2c 23  31 0d 11 6c 31 20 73 74  |v   r0,#1..l1 st|
00003590  72 42 20 20 72 30 2c 5b  72 31 32 2c 23 33 30 5d  |rB  r0,[r12,#30]|
000035a0  20 20 20 20 20 20 20 20  20 3b 53 65 74 20 53 6f  |         ;Set So|
000035b0  75 6e 64 46 58 20 66 6c  61 67 0d 11 76 14 20 61  |undFX flag..v. a|
000035c0  64 72 20 20 20 72 31 30  2c 54 72 61 63 6b 0d 11  |dr   r10,Track..|
000035d0  80 15 20 61 64 72 20 20  20 72 31 31 2c 46 74 61  |.. adr   r11,Fta|
000035e0  62 6c 65 0d 11 8a 10 20  62 20 20 20 20 20 76 72  |ble.... b     vr|
000035f0  75 6c 65 0d 11 94 04 0d  11 9e 46 3b 2a 2a 2a 20  |ule.......F;*** |
00003600  a8 45 52 52 55 50 54 20  45 4e 54 52 59 20 c8 92  |.ERRUPT ENTRY ..|
00003610  20 28 23 72 30 3d 45 76  65 6e 74 20 4e 6f 2c 20  | (#r0=Event No, |
00003620  72 31 32 3d 57 6f 72 6b  73 70 61 63 65 20 5b 68  |r12=Workspace [h|
00003630  65 72 65 20 48 65 61 64  41 64 72 5d 29 0d 11 a8  |ere HeadAdr])...|
00003640  04 0d 11 b2 0b 2e 76 69  6e 74 65 72 0d 11 bc 4c  |......vinter...L|
00003650  20 73 74 6d 66 64 20 72  31 33 21 2c 7b 72 31 2d  | stmfd r13!,{r1-|
00003660  72 31 31 7d 20 20 20 20  20 20 20 20 3b 46 6f 72  |r11}        ;For|
00003670  20 6e 6f 74 20 69 6e 74  65 72 63 65 70 74 69 6e  | not interceptin|
00003680  67 20 76 65 63 74 6f 72  20 2d 3e 20 70 75 73 68  |g vector -> push|
00003690  20 72 31 34 20 74 6f 6f  0d 11 c6 04 0d 11 d0 4c  | r14 too.......L|
000036a0  20 61 64 72 20 20 20 72  31 31 2c 46 74 61 62 6c  | adr   r11,Ftabl|
000036b0  65 20 20 20 20 20 20 20  20 20 20 20 3b 72 31 31  |e           ;r11|
000036c0  20 26 20 72 31 32 20 70  6f 69 6e 74 65 72 73 20  | & r12 pointers |
000036d0  61 72 65 20 6e 65 65 64  65 64 20 69 6e 20 62 6f  |are needed in bo|
000036e0  74 68 20 63 61 73 65 73  0d 11 da 04 0d 11 e4 35  |th cases.......5|
000036f0  20 6c 64 6d 44 62 20 72  31 31 2c 7b 72 30 2c 72  | ldmDb r11,{r0,r|
00003700  31 7d 20 20 20 20 20 20  20 20 20 20 3b 4c 6f 61  |1}          ;Loa|
00003710  64 20 43 6f 75 6e 74 65  72 20 26 20 53 70 65 65  |d Counter & Spee|
00003720  64 0d 11 ee 29 20 61 64  64 20 20 20 72 30 2c 72  |d...) add   r0,r|
00003730  30 2c 23 31 20 20 20 20  20 20 20 20 20 20 20 20  |0,#1            |
00003740  20 3b 43 6f 75 6e 74 65  72 2b 0d 11 f8 35 20 63  | ;Counter+...5 c|
00003750  6d 70 20 20 20 72 30 2c  72 31 20 20 20 20 20 20  |mp   r0,r1      |
00003760  20 20 20 20 20 20 20 20  20 20 3b 49 66 20 3e 3d  |          ;If >=|
00003770  20 53 70 65 65 64 2c 20  74 68 65 6e 2e 2e 2e 0d  | Speed, then....|
00003780  12 02 4d 20 6d 6f 76 48  73 20 72 30 2c 23 30 20  |..M movHs r0,#0 |
00003790  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
000037a0  20 20 20 20 20 20 72 65  73 65 74 20 43 6f 75 6e  |      reset Coun|
000037b0  74 65 72 20 20 20 20 7c  20 48 53 2c 20 63 61 75  |ter    | HS, cau|
000037c0  73 65 20 53 65 74 5f 53  70 65 65 64 0d 12 0c 43  |se Set_Speed...C|
000037d0  20 73 74 72 20 20 20 72  30 2c 5b 72 31 31 2c 23  | str   r0,[r11,#|
000037e0  2d 38 5d 20 20 20 20 20  20 20 20 20 3b 20 20 20  |-8]         ;   |
000037f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003800  20 20 20 20 7c 20 63 6f  75 6c 64 20 73 65 74 0d  |    | could set.|
00003810  12 16 4c 20 62 48 73 20  20 20 76 70 6c 61 79 20  |..L bHs   vplay |
00003820  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00003830  20 20 20 20 26 20 50 6c  61 79 20 6f 6e 65 20 72  |    & Play one r|
00003840  6f 77 21 20 20 20 20 7c  20 53 70 65 65 64 20 3c  |ow!    | Speed <|
00003850  20 43 6f 75 6e 74 65 72  2e 2e 2e 0d 12 20 04 0d  | Counter..... ..|
00003860  12 2a 3f 20 62 6c 20 20  20 20 76 65 66 66 65 63  |.*? bl    veffec|
00003870  74 73 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |ts             ;|
00003880  57 65 6c 6c 2c 20 65 6c  73 65 20 73 75 70 70 6f  |Well, else suppo|
00003890  72 74 20 74 68 65 20 65  66 66 65 63 74 73 0d 12  |rt the effects..|
000038a0  34 16 20 61 64 64 20 20  20 72 31 32 2c 72 31 32  |4. add   r12,r12|
000038b0  2c 23 33 32 0d 12 3e 23  20 62 6c 20 20 20 20 76  |,#32..># bl    v|
000038c0  65 66 66 65 63 74 73 20  20 20 20 20 20 20 20 20  |effects         |
000038d0  20 20 20 20 3b 32 2e 0d  12 48 16 20 61 64 64 20  |    ;2...H. add |
000038e0  20 20 72 31 32 2c 72 31  32 2c 23 33 32 0d 12 52  |  r12,r12,#32..R|
000038f0  23 20 62 6c 20 20 20 20  76 65 66 66 65 63 74 73  |# bl    veffects|
00003900  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 33 2e  |             ;3.|
00003910  0d 12 5c 16 20 61 64 64  20 20 20 72 31 32 2c 72  |..\. add   r12,r|
00003920  31 32 2c 23 33 32 0d 12  66 23 20 62 6c 20 20 20  |12,#32..f# bl   |
00003930  20 76 65 66 66 65 63 74  73 20 20 20 20 20 20 20  | veffects       |
00003940  20 20 20 20 20 20 3b 34  2e 0d 12 70 05 5d 0d 12  |      ;4...p.]..|
00003950  7a 0e e7 20 56 6f 63 73  3d 38 20 8c 0d 12 84 0a  |z.. Vocs=8 .....|
00003960  5b 4f 50 54 20 70 0d 12  8e 16 20 61 64 64 20 20  |[OPT p.... add  |
00003970  20 72 31 32 2c 72 31 32  2c 23 33 32 0d 12 98 23  | r12,r12,#32...#|
00003980  20 62 6c 20 20 20 20 76  65 66 66 65 63 74 73 20  | bl    veffects |
00003990  20 20 20 20 20 20 20 20  20 20 20 20 3b 35 2e 0d  |            ;5..|
000039a0  12 a2 16 20 61 64 64 20  20 20 72 31 32 2c 72 31  |... add   r12,r1|
000039b0  32 2c 23 33 32 0d 12 ac  23 20 62 6c 20 20 20 20  |2,#32...# bl    |
000039c0  76 65 66 66 65 63 74 73  20 20 20 20 20 20 20 20  |veffects        |
000039d0  20 20 20 20 20 3b 36 2e  0d 12 b6 16 20 61 64 64  |     ;6..... add|
000039e0  20 20 20 72 31 32 2c 72  31 32 2c 23 33 32 0d 12  |   r12,r12,#32..|
000039f0  c0 23 20 62 6c 20 20 20  20 76 65 66 66 65 63 74  |.# bl    veffect|
00003a00  73 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 37  |s             ;7|
00003a10  2e 0d 12 ca 16 20 61 64  64 20 20 20 72 31 32 2c  |..... add   r12,|
00003a20  72 31 32 2c 23 33 32 0d  12 d4 23 20 62 6c 20 20  |r12,#32...# bl  |
00003a30  20 20 76 65 66 66 65 63  74 73 20 20 20 20 20 20  |  veffects      |
00003a40  20 20 20 20 20 20 20 3b  38 2e 0d 12 de 05 5d 0d  |       ;8.....].|
00003a50  12 e8 05 cd 0d 12 f2 0a  5b 4f 50 54 20 70 0d 12  |........[OPT p..|
00003a60  fc 27 20 6c 64 6d 66 64  20 72 31 33 21 2c 7b 72  |.' ldmfd r13!,{r|
00003a70  31 2d 72 31 31 2c 70 63  7d 20 20 20 20 20 3b 52  |1-r11,pc}     ;R|
00003a80  65 74 75 72 6e 0d 13 06  05 20 0d 13 10 34 3b 2a  |eturn.... ...4;*|
00003a90  2a 2a 20 50 4c 41 59 20  ee 45 20 50 41 54 54 45  |** PLAY .E PATTE|
00003aa0  52 4e 2d 50 4f 53 49 54  49 4f 4e 20 28 41 4c 4c  |RN-POSITION (ALL|
00003ab0  20 34 2f 38 20 43 48 41  4e 4e 45 4c 53 29 0d 13  | 4/8 CHANNELS)..|
00003ac0  1a 04 0d 13 24 0a 2e 76  70 6c 61 79 0d 13 2e 17  |....$..vplay....|
00003ad0  20 61 64 72 20 20 20 72  36 2c 52 65 67 69 73 74  | adr   r6,Regist|
00003ae0  65 72 73 0d 13 38 39 20  6c 64 6d 49 61 20 72 36  |ers..89 ldmIa r6|
00003af0  2c 7b 72 37 2d 72 39 7d  20 20 20 20 20 20 20 20  |,{r7-r9}        |
00003b00  20 20 20 3b 4c 6f 61 64  20 33 20 77 6f 72 6b 69  |   ;Load 3 worki|
00003b10  6e 67 20 72 65 67 69 73  74 65 72 73 0d 13 42 14  |ng registers..B.|
00003b20  20 61 64 72 20 20 20 72  31 30 2c 54 72 61 63 6b  | adr   r10,Track|
00003b30  0d 13 4c 04 0d 13 56 23  20 62 6c 20 20 20 20 76  |..L...V# bl    v|
00003b40  63 68 61 6e 6e 65 6c 20  20 20 20 20 20 20 20 20  |channel         |
00003b50  20 20 20 20 3b 31 2e 0d  13 60 16 20 61 64 64 20  |    ;1...`. add |
00003b60  20 20 72 31 32 2c 72 31  32 2c 23 33 32 0d 13 6a  |  r12,r12,#32..j|
00003b70  23 20 62 6c 20 20 20 20  76 63 68 61 6e 6e 65 6c  |# bl    vchannel|
00003b80  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 32 2e  |             ;2.|
00003b90  0d 13 74 16 20 61 64 64  20 20 20 72 31 32 2c 72  |..t. add   r12,r|
00003ba0  31 32 2c 23 33 32 0d 13  7e 23 20 62 6c 20 20 20  |12,#32..~# bl   |
00003bb0  20 76 63 68 61 6e 6e 65  6c 20 20 20 20 20 20 20  | vchannel       |
00003bc0  20 20 20 20 20 20 3b 33  2e 0d 13 88 16 20 61 64  |      ;3..... ad|
00003bd0  64 20 20 20 72 31 32 2c  72 31 32 2c 23 33 32 0d  |d   r12,r12,#32.|
00003be0  13 92 23 20 62 6c 20 20  20 20 76 63 68 61 6e 6e  |..# bl    vchann|
00003bf0  65 6c 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |el             ;|
00003c00  34 2e 0d 13 9c 05 5d 0d  13 a6 0e e7 20 56 6f 63  |4.....]..... Voc|
00003c10  73 3d 38 20 8c 0d 13 b0  0a 5b 4f 50 54 20 70 0d  |s=8 .....[OPT p.|
00003c20  13 ba 16 20 61 64 64 20  20 20 72 31 32 2c 72 31  |... add   r12,r1|
00003c30  32 2c 23 33 32 0d 13 c4  23 20 62 6c 20 20 20 20  |2,#32...# bl    |
00003c40  76 63 68 61 6e 6e 65 6c  20 20 20 20 20 20 20 20  |vchannel        |
00003c50  20 20 20 20 20 3b 35 2e  0d 13 ce 16 20 61 64 64  |     ;5..... add|
00003c60  20 20 20 72 31 32 2c 72  31 32 2c 23 33 32 0d 13  |   r12,r12,#32..|
00003c70  d8 23 20 62 6c 20 20 20  20 76 63 68 61 6e 6e 65  |.# bl    vchanne|
00003c80  6c 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 36  |l             ;6|
00003c90  2e 0d 13 e2 16 20 61 64  64 20 20 20 72 31 32 2c  |..... add   r12,|
00003ca0  72 31 32 2c 23 33 32 0d  13 ec 23 20 62 6c 20 20  |r12,#32...# bl  |
00003cb0  20 20 76 63 68 61 6e 6e  65 6c 20 20 20 20 20 20  |  vchannel      |
00003cc0  20 20 20 20 20 20 20 3b  37 2e 0d 13 f6 16 20 61  |       ;7..... a|
00003cd0  64 64 20 20 20 72 31 32  2c 72 31 32 2c 23 33 32  |dd   r12,r12,#32|
00003ce0  0d 14 00 23 20 62 6c 20  20 20 20 76 63 68 61 6e  |...# bl    vchan|
00003cf0  6e 65 6c 20 20 20 20 20  20 20 20 20 20 20 20 20  |nel             |
00003d00  3b 38 2e 0d 14 0a 05 5d  0d 14 14 05 cd 0d 14 1e  |;8.....]........|
00003d10  0a 5b 4f 50 54 20 70 0d  14 28 04 0d 14 32 41 20  |.[OPT p..(...2A |
00003d20  73 75 62 53 20 20 72 37  2c 72 37 2c 23 31 20 20  |subS  r7,r7,#1  |
00003d30  20 20 20 20 20 20 20 20  20 20 20 3b 50 61 74 74  |           ;Patt|
00003d40  65 72 6e 5f 43 6f 75 6e  74 65 72 20 2d 20 31 2c  |ern_Counter - 1,|
00003d50  20 69 73 20 69 74 20 7a  65 72 6f 3f 0d 14 3c 31  | is it zero?..<1|
00003d60  20 73 74 6d 4e 65 49 61  20 72 36 2c 7b 72 37 2d  | stmNeIa r6,{r7-|
00003d70  72 38 7d 20 20 20 20 20  20 20 20 20 3b 4e 6f 74  |r8}         ;Not|
00003d80  20 7a 65 72 6f 20 79 65  74 2c 20 73 6f 0d 14 46  | zero yet, so..F|
00003d90  48 20 6c 64 6d 4e 65 46  64 20 72 31 33 21 2c 7b  |H ldmNeFd r13!,{|
00003da0  72 31 2d 72 31 31 2c 70  63 7d 20 20 20 3b 20 64  |r1-r11,pc}   ; d|
00003db0  6f 6e 27 74 20 70 6c 61  79 20 6e 65 77 20 50 61  |on't play new Pa|
00003dc0  74 74 65 72 6e 2c 20 52  65 74 75 72 6e 20 69 6e  |ttern, Return in|
00003dd0  73 74 65 61 64 0d 14 50  04 0d 14 5a 48 20 6d 6f  |stead..P...ZH mo|
00003de0  76 20 20 20 72 37 2c 23  36 34 20 20 20 20 20 20  |v   r7,#64      |
00003df0  20 20 20 20 20 20 20 20  20 3b 57 65 6c 6c 2c 20  |         ;Well, |
00003e00  6e 65 77 20 50 61 74 74  65 72 6e 20 62 65 67 69  |new Pattern begi|
00003e10  6e 73 2c 20 77 69 74 68  20 43 6f 75 6e 74 3d 36  |ns, with Count=6|
00003e20  34 0d 14 64 39 20 6c 64  72 42 20 20 72 30 2c 5b  |4..d9 ldrB  r0,[|
00003e30  72 39 2c 23 31 5d 21 20  20 20 20 20 20 20 20 20  |r9,#1]!         |
00003e40  20 3b 41 6e 64 20 67 65  74 20 6e 65 78 74 20 50  | ;And get next P|
00003e50  61 74 74 65 72 6e 20 4e  72 2e 0d 14 6e 31 20 63  |attern Nr...n1 c|
00003e60  6d 70 20 20 20 72 30 2c  23 26 66 66 20 20 20 20  |mp   r0,#&ff    |
00003e70  20 20 20 20 20 20 20 20  20 20 3b 45 6e 64 20 6f  |          ;End o|
00003e80  66 20 53 65 71 75 65 6e  63 65 3f 0d 14 78 41 20  |f Sequence?..xA |
00003e90  6c 64 72 45 71 20 72 39  2c 5b 72 31 30 2c 23 32  |ldrEq r9,[r10,#2|
00003ea0  34 5d 20 20 20 20 20 20  20 20 20 3b 20 59 65 61  |4]         ; Yea|
00003eb0  68 20 2d 3e 20 52 65 73  65 74 20 53 65 71 75 65  |h -> Reset Seque|
00003ec0  6e 63 65 20 50 6f 69 6e  74 65 72 2c 0d 14 82 42  |nce Pointer,...B|
00003ed0  20 6c 64 72 45 71 42 20  30 2c 5b 72 39 5d 20 20  | ldrEqB 0,[r9]  |
00003ee0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 20 20  |            ;   |
00003ef0  20 20 20 20 20 20 74 68  61 74 20 6d 65 61 6e 73  |      that means|
00003f00  20 72 65 73 74 61 72 74  20 53 6f 6e 67 21 0d 14  | restart Song!..|
00003f10  8c 35 20 6c 64 72 20 20  20 72 38 2c 5b 72 31 30  |.5 ldr   r8,[r10|
00003f20  2c 23 32 38 5d 20 20 20  20 20 20 20 20 20 3b 41  |,#28]         ;A|
00003f30  64 64 72 65 73 73 20 50  61 74 74 65 72 6e 73 74  |ddress Patternst|
00003f40  61 72 74 0d 14 96 3e 20  61 64 64 20 20 20 72 38  |art...> add   r8|
00003f50  2c 72 38 2c 72 30 2c 6c  73 6c 23 31 30 2d 28 56  |,r8,r0,lsl#10-(V|
00003f60  6f 63 73 3d 38 29 20 20  20 20 3b 2b 20 4e 72 2a  |ocs=8)    ;+ Nr*|
00003f70  31 30 32 34 20 28 6f 72  20 4e 72 2a 32 30 34 38  |1024 (or Nr*2048|
00003f80  29 0d 14 a0 15 20 73 74  6d 49 61 20 72 36 2c 7b  |).... stmIa r6,{|
00003f90  72 37 2d 72 39 7d 0d 14  aa 27 20 6c 64 6d 66 64  |r7-r9}...' ldmfd|
00003fa0  20 72 31 33 21 2c 7b 72  31 2d 72 31 31 2c 70 63  | r13!,{r1-r11,pc|
00003fb0  7d 20 20 20 20 20 3b 52  65 74 75 72 6e 0d 14 b4  |}     ;Return...|
00003fc0  04 0d 14 be 2f 3b 2a 2a  2a 20 53 55 50 50 4c 59  |..../;*** SUPPLY|
00003fd0  20 ee 45 20 43 48 41 4e  4e 45 4c 20 57 49 54 48  | .E CHANNEL WITH|
00003fe0  20 c7 96 20 49 4e 46 4f  52 4d 41 54 49 4f 4e 53  | .. INFORMATIONS|
00003ff0  0d 14 c8 04 0d 14 d2 0d  2e 76 63 68 61 6e 6e 65  |.........vchanne|
00004000  6c 0d 14 dc 48 20 6c 64  72 20 20 20 72 31 2c 5b  |l...H ldr   r1,[|
00004010  72 38 5d 2c 23 34 20 20  20 20 20 20 20 20 20 20  |r8],#4          |
00004020  20 3b 50 61 74 74 65 72  6e 20 4c 57 6f 72 64 20  | ;Pattern LWord |
00004030  6f 66 20 63 75 72 72 65  6e 74 20 50 61 74 74 5f  |of current Patt_|
00004040  50 6f 73 20 26 20 49 4e  43 0d 14 e6 04 0d 14 f0  |Pos & INC.......|
00004050  2f 20 6c 64 72 42 20 20  72 32 2c 5b 72 31 32 2c  |/ ldrB  r2,[r12,|
00004060  23 33 30 5d 20 20 20 20  20 20 20 20 20 3b 49 73  |#30]         ;Is|
00004070  20 53 6f 75 6e 64 46 58  20 6f 6e 3f 0d 14 fa 10  | SoundFX on?....|
00004080  20 63 6d 70 20 20 20 72  32 2c 23 30 0d 15 04 26  | cmp   r2,#0...&|
00004090  20 62 45 71 20 20 20 76  72 75 6c 65 20 20 20 20  | bEq   vrule    |
000040a0  20 20 20 20 20 20 20 20  20 20 20 20 3b 4e 6f 2e  |            ;No.|
000040b0  2e 2e 0d 15 0e 16 20 6c  64 72 20 20 20 72 32 2c  |...... ldr   r2,|
000040c0  5b 72 31 32 2c 23 34 5d  0d 15 18 41 20 63 6d 70  |[r12,#4]...A cmp|
000040d0  20 20 20 72 32 2c 23 30  20 20 20 20 20 20 20 20  |   r2,#0        |
000040e0  20 20 20 20 20 20 20 20  3b 59 65 73 2c 20 62 75  |        ;Yes, bu|
000040f0  74 20 69 73 20 73 61 6d  70 6c 65 20 73 74 69 6c  |t is sample stil|
00004100  6c 20 61 63 74 69 76 65  3f 0d 15 22 31 20 73 74  |l active?.."1 st|
00004110  72 45 71 42 20 32 2c 5b  72 31 32 2c 23 33 30 5d  |rEqB 2,[r12,#30]|
00004120  20 20 20 20 20 20 20 20  20 3b 4e 6f 2c 20 73 6f  |         ;No, so|
00004130  20 63 61 6e 63 65 6c 20  46 58 0d 15 2c 11 20 6d  | cancel FX..,. m|
00004140  6f 76 20 20 20 70 63 2c  72 31 34 0d 15 36 04 0d  |ov   pc,r14..6..|
00004150  15 40 0a 2e 76 72 75 6c  65 0d 15 4a 3b 20 6d 6f  |.@..vrule..J; mo|
00004160  76 53 20 20 72 30 2c 72  31 2c 6c 73 72 23 32 34  |vS  r0,r1,lsr#24|
00004170  20 20 20 20 20 20 20 20  20 3b 49 73 6f 6c 61 74  |         ;Isolat|
00004180  65 20 54 6f 6e 65 20 26  20 49 73 20 69 74 20 7a  |e Tone & Is it z|
00004190  65 72 6f 3f 0d 15 54 46  20 62 45 71 20 20 20 76  |ero?..TF bEq   v|
000041a0  63 6f 6d 6d 73 20 20 20  20 20 20 20 20 20 20 20  |comms           |
000041b0  20 20 20 20 3b 4e 6f 20  54 6f 6e 65 20 2d 3e 20  |    ;No Tone -> |
000041c0  50 65 72 68 61 70 73 20  73 74 69 6c 6c 20 61 20  |Perhaps still a |
000041d0  43 6f 6d 6d 61 6e 64 2e  2e 2e 0d 15 5e 04 0d 15  |Command.....^...|
000041e0  68 4b 20 73 74 72 42 20  20 72 30 2c 5b 72 31 32  |hK strB  r0,[r12|
000041f0  2c 23 33 31 5d 20 20 20  20 20 20 20 20 20 3b 53  |,#31]         ;S|
00004200  74 6f 72 65 20 6c 65 67  61 6c 20 54 6f 6e 65 20  |tore legal Tone |
00004210  66 6f 72 20 70 6f 73 73  2e 20 41 72 70 65 67 67  |for poss. Arpegg|
00004220  69 6f 20 65 66 66 65 63  74 0d 15 72 49 20 6c 64  |io effect..rI ld|
00004230  72 20 20 20 72 30 2c 5b  72 31 31 2c 72 30 2c 6c  |r   r0,[r11,r0,l|
00004240  73 6c 23 32 5d 20 20 20  20 3b 47 65 74 20 65 71  |sl#2]    ;Get eq|
00004250  75 69 76 61 6c 65 6e 74  20 46 72 65 71 75 65 6e  |uivalent Frequen|
00004260  63 79 20 66 72 6f 6d 20  72 31 31 3d 66 54 61 62  |cy from r11=fTab|
00004270  6c 65 0d 15 7c 2c 20 73  74 72 20 20 20 72 30 2c  |le..|, str   r0,|
00004280  5b 72 31 32 2c 23 34 5d  20 20 20 20 20 20 20 20  |[r12,#4]        |
00004290  20 20 3b 45 6e 74 65 72  20 50 69 74 63 68 0d 15  |  ;Enter Pitch..|
000042a0  86 3f 20 61 6e 64 53 20  20 72 30 2c 72 31 2c 23  |.? andS  r0,r1,#|
000042b0  26 66 66 20 3c 3c 31 36  20 20 20 20 20 20 3b 49  |&ff <<16      ;I|
000042c0  73 6f 6c 61 74 65 20 49  6e 73 74 72 75 6d 65 6e  |solate Instrumen|
000042d0  74 2d 42 79 74 65 2c 20  7a 65 72 6f 3f 0d 15 90  |t-Byte, zero?...|
000042e0  49 20 6c 64 72 45 71 20  72 30 2c 5b 72 31 32 2c  |I ldrEq r0,[r12,|
000042f0  23 32 30 5d 20 20 20 20  20 20 20 20 20 3b 20 59  |#20]         ; Y|
00004300  20 2d 3e 20 47 65 74 20  6f 6c 64 20 52 65 70 41  | -> Get old RepA|
00004310  74 20 28 70 65 72 68 61  70 73 20 61 20 52 65 70  |t (perhaps a Rep|
00004320  54 6f 6e 65 21 29 0d 15  9a 4c 20 73 74 72 45 71  |Tone!)...L strEq|
00004330  20 72 30 2c 5b 72 31 32  2c 23 30 30 5d 20 20 20  | r0,[r12,#00]   |
00004340  20 20 20 20 20 20 3b 20  20 20 20 26 20 53 65 74  |      ;    & Set|
00004350  20 61 73 20 6e 65 77 20  50 6f 73 20 28 73 61 6d  | as new Pos (sam|
00004360  65 20 49 6e 73 74 20 6f  6e 63 65 20 61 67 61 69  |e Inst once agai|
00004370  6e 29 0d 15 a4 11 20 62  45 71 20 20 20 76 63 6f  |n).... bEq   vco|
00004380  6d 6d 73 0d 15 ae 47 20  20 20 20 20 20 20 20 20  |mms...G         |
00004390  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000043a0  20 20 20 3b 45 6c 73 65  20 70 6f 69 6e 74 20 74  |   ;Else point t|
000043b0  6f 20 49 6e 73 74 50 6f  6f 6c 20 3d 20 54 72 61  |o InstPool = Tra|
000043c0  63 6b 2b 49 6e 73 74 2a  33 32 0d 15 b8 4d 20 61  |ck+Inst*32...M a|
000043d0  64 64 20 20 20 72 32 2c  72 31 30 2c 72 30 2c 6c  |dd   r2,r10,r0,l|
000043e0  73 72 23 31 31 20 20 20  20 20 3b 6c 73 72 23 31  |sr#11     ;lsr#1|
000043f0  36 20 66 6f 72 20 6c 6f  77 62 79 74 65 20 26 20  |6 for lowbyte & |
00004400  6c 73 6c 23 35 20 66 6f  72 20 2a 33 32 20 3d 3e  |lsl#5 for *32 =>|
00004410  20 6c 73 72 23 31 31 0d  15 c2 42 20 6c 64 6d 49  | lsr#11...B ldmI|
00004420  61 20 72 32 2c 7b 72 30  2c 72 32 2d 72 35 7d 20  |a r2,{r0,r2-r5} |
00004430  20 20 20 20 20 20 20 3b  52 65 61 64 20 61 6c 6c  |       ;Read all|
00004440  20 35 20 49 6e 73 74 50  6f 6f 6c 20 57 6f 72 64  | 5 InstPool Word|
00004450  73 20 61 74 20 6f 6e 63  65 0d 15 cc 35 20 73 74  |s at once...5 st|
00004460  72 20 20 20 72 30 2c 5b  72 31 32 2c 23 20 38 5d  |r   r0,[r12,# 8]|
00004470  20 20 20 20 20 20 20 20  20 3b 45 6e 74 65 72 20  |         ;Enter |
00004480  53 61 6d 70 6c 65 20 41  64 64 72 65 73 73 0d 15  |Sample Address..|
00004490  d6 2d 20 73 74 72 20 20  20 72 33 2c 5b 72 31 32  |.- str   r3,[r12|
000044a0  2c 23 31 36 5d 20 20 20  20 20 20 20 20 20 3b 45  |,#16]         ;E|
000044b0  6e 74 65 72 20 56 6f 6c  75 6d 65 0d 15 e0 4c 20  |nter Volume...L |
000044c0  6d 6f 76 53 20 20 72 30  2c 72 34 2c 6c 73 6c 23  |movS  r0,r4,lsl#|
000044d0  31 36 20 20 20 20 20 20  20 20 20 3b 50 6f 73 3d  |16         ;Pos=|
000044e0  52 65 70 41 74 20 28 69  6e 20 31 36 2d 66 69 78  |RepAt (in 16-fix|
000044f0  70 6f 69 6e 74 29 2c 20  62 75 74 20 69 73 20 69  |point), but is i|
00004500  74 20 7a 65 72 6f 3f 0d  15 ea 4c 20 61 64 64 4e  |t zero?...L addN|
00004510  65 20 72 32 2c 72 34 2c  72 35 20 20 20 20 20 20  |e r2,r4,r5      |
00004520  20 20 20 20 20 20 20 3b  20 4e 6f 20 2d 3e 20 4c  |       ; No -> L|
00004530  65 6e 20 28 61 62 73 6f  6c 75 74 65 20 66 72 6f  |en (absolute fro|
00004540  6d 20 30 29 20 3d 20 52  65 70 41 74 2b 52 65 70  |m 0) = RepAt+Rep|
00004550  4c 65 6e 0d 15 f4 4a 20  6d 6f 76 4e 65 20 72 34  |Len...J movNe r4|
00004560  2c 72 30 20 20 20 20 20  20 20 20 20 20 20 20 20  |,r0             |
00004570  20 20 20 3b 20 20 20 20  2d 3e 20 48 65 61 64 20  |   ;    -> Head |
00004580  4f 66 66 73 65 74 20 52  65 70 41 74 20 3d 20 66  |Offset RepAt = f|
00004590  69 78 70 6f 69 6e 74 20  52 65 70 41 74 0d 15 fe  |ixpoint RepAt...|
000045a0  2a 20 73 74 72 20 20 20  72 30 2c 5b 72 31 32 2c  |* str   r0,[r12,|
000045b0  23 20 30 5d 20 20 20 20  20 20 20 20 20 3b 45 6e  |# 0]         ;En|
000045c0  74 65 72 20 50 6f 73 0d  16 08 2d 20 73 74 72 20  |ter Pos...- str |
000045d0  20 20 72 32 2c 5b 72 31  32 2c 23 31 32 5d 20 20  |  r2,[r12,#12]  |
000045e0  20 20 20 20 20 20 20 3b  45 6e 74 65 72 20 4c 65  |       ;Enter Le|
000045f0  6e 67 74 68 0d 16 12 2c  20 73 74 72 20 20 20 72  |ngth..., str   r|
00004600  34 2c 5b 72 31 32 2c 23  32 30 5d 20 20 20 20 20  |4,[r12,#20]     |
00004610  20 20 20 20 3b 45 6e 74  65 72 20 52 65 70 41 74  |    ;Enter RepAt|
00004620  0d 16 1c 04 0d 16 26 0b  2e 76 63 6f 6d 6d 73 0d  |......&..vcomms.|
00004630  16 30 43 20 61 6e 64 20  20 20 72 30 2c 72 31 2c  |.0C and   r0,r1,|
00004640  23 26 30 66 20 3c 3c 38  20 20 20 20 20 20 20 3b  |#&0f <<8       ;|
00004650  49 73 6f 6c 61 74 65 20  43 6f 6d 6d 61 6e 64 2d  |Isolate Command-|
00004660  4e 69 62 62 6c 65 20 66  72 6f 6d 20 44 61 74 61  |Nibble from Data|
00004670  4c 57 0d 16 3a 31 20 61  6e 64 20 20 20 72 32 2c  |LW..:1 and   r2,|
00004680  72 31 2c 23 26 66 66 20  20 20 20 20 20 20 20 20  |r1,#&ff         |
00004690  20 20 3b 49 73 6f 6c 61  74 65 20 49 6e 66 6f 42  |  ;Isolate InfoB|
000046a0  79 74 65 0d 16 44 4d 20  6c 64 72 20 20 20 72 33  |yte..DM ldr   r3|
000046b0  2c 5b 70 63 2c 72 30 2c  6c 73 72 23 36 5d 20 20  |,[pc,r0,lsr#6]  |
000046c0  20 20 20 3b 6c 73 72 23  38 20 66 6f 72 20 4e 69  |   ;lsr#8 for Ni|
000046d0  62 62 6c 65 20 69 6e 74  6f 20 6c 6f 77 62 79 74  |bble into lowbyt|
000046e0  65 20 26 20 6c 73 6c 23  32 20 66 6f 72 20 2a 34  |e & lsl#2 for *4|
000046f0  0d 16 4e 13 20 61 64 64  20 20 20 70 63 2c 70 63  |..N. add   pc,pc|
00004700  2c 72 33 0d 16 58 04 0d  16 62 2c 20 64 63 64 20  |,r3..X...b, dcd |
00004710  20 20 76 65 66 2d 76 6f  66 32 20 20 20 20 20 20  |  vef-vof2      |
00004720  20 20 20 20 20 20 20 3b  45 66 66 65 63 74 73 20  |       ;Effects |
00004730  30 2e 2e 0d 16 6c 09 2e  76 6f 66 32 0d 16 76 22  |0....l..vof2..v"|
00004740  20 64 63 64 20 20 20 76  65 66 2d 76 6f 66 32 20  | dcd   vef-vof2 |
00004750  20 20 20 20 20 20 20 20  20 20 20 20 3b 31 0d 16  |            ;1..|
00004760  80 22 20 64 63 64 20 20  20 76 65 66 2d 76 6f 66  |." dcd   vef-vof|
00004770  32 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 32  |2             ;2|
00004780  0d 16 8a 22 20 64 63 64  20 20 20 76 65 66 2d 76  |..." dcd   vef-v|
00004790  6f 66 32 20 20 20 20 20  20 20 20 20 20 20 20 20  |of2             |
000047a0  3b 33 0d 16 94 22 20 64  63 64 20 20 20 76 65 66  |;3..." dcd   vef|
000047b0  2d 76 6f 66 32 20 20 20  20 20 20 20 20 20 20 20  |-vof2           |
000047c0  20 20 3b 34 0d 16 9e 22  20 64 63 64 20 20 20 76  |  ;4..." dcd   v|
000047d0  65 66 2d 76 6f 66 32 20  20 20 20 20 20 20 20 20  |ef-vof2         |
000047e0  20 20 20 20 3b 35 0d 16  a8 22 20 64 63 64 20 20  |    ;5..." dcd  |
000047f0  20 76 65 66 2d 76 6f 66  32 20 20 20 20 20 20 20  | vef-vof2       |
00004800  20 20 20 20 20 20 3b 36  0d 16 b2 34 20 64 63 64  |      ;6...4 dcd|
00004810  20 20 20 76 73 74 65 72  65 6f 70 6f 73 2d 76 6f  |   vstereopos-vo|
00004820  66 32 20 20 20 20 20 20  3b 20 37 20 3d 20 53 65  |f2      ; 7 = Se|
00004830  74 20 53 74 65 72 65 6f  20 50 6f 73 0d 16 bc 34  |t Stereo Pos...4|
00004840  20 64 63 64 20 20 20 76  61 75 74 6f 76 6f 6c 75  | dcd   vautovolu|
00004850  70 2d 76 6f 66 32 20 20  20 20 20 20 3b 20 38 20  |p-vof2      ; 8 |
00004860  3d 20 41 75 74 6f 20 56  6f 6c 75 6d 65 20 75 70  |= Auto Volume up|
00004870  0d 16 c6 36 20 64 63 64  20 20 20 76 61 75 74 6f  |...6 dcd   vauto|
00004880  76 6f 6c 64 6f 77 6e 2d  76 6f 66 32 20 20 20 20  |voldown-vof2    |
00004890  3b 20 39 20 3d 20 41 75  74 6f 20 56 6f 6c 75 6d  |; 9 = Auto Volum|
000048a0  65 20 64 6f 77 6e 0d 16  d0 33 20 64 63 64 20 20  |e down...3 dcd  |
000048b0  20 76 61 75 74 6f 61 72  63 75 70 2d 76 6f 66 32  | vautoarcup-vof2|
000048c0  20 20 20 20 20 20 3b 20  41 20 3d 20 41 75 74 6f  |      ; A = Auto|
000048d0  20 50 69 74 63 68 20 75  70 0d 16 da 35 20 64 63  | Pitch up...5 dc|
000048e0  64 20 20 20 76 61 75 74  6f 61 72 63 64 6f 77 6e  |d   vautoarcdown|
000048f0  2d 76 6f 66 32 20 20 20  20 3b 20 42 20 3d 20 41  |-vof2    ; B = A|
00004900  75 74 6f 20 50 69 74 63  68 20 64 6f 77 6e 0d 16  |uto Pitch down..|
00004910  e4 30 20 64 63 64 20 20  20 76 73 65 74 76 6f 6c  |.0 dcd   vsetvol|
00004920  2d 76 6f 66 32 20 20 20  20 20 20 20 20 20 3b 20  |-vof2         ; |
00004930  43 20 3d 20 53 65 74 20  56 6f 6c 75 6d 65 0d 16  |C = Set Volume..|
00004940  ee 33 20 64 63 64 20 20  20 76 70 61 74 74 62 72  |.3 dcd   vpattbr|
00004950  65 61 6b 2d 76 6f 66 32  20 20 20 20 20 20 3b 20  |eak-vof2      ; |
00004960  44 20 3d 20 50 61 74 74  65 72 6e 20 42 72 65 61  |D = Pattern Brea|
00004970  6b 0d 16 f8 34 20 64 63  64 20 20 20 76 6e 6f 70  |k...4 dcd   vnop|
00004980  2d 76 6f 66 32 20 20 20  20 20 20 20 20 20 20 20  |-vof2           |
00004990  20 3b 20 45 20 3d 20 28  4e 6f 74 20 75 73 65 64  | ; E = (Not used|
000049a0  20 79 65 74 29 0d 17 02  2f 20 64 63 64 20 20 20  | yet).../ dcd   |
000049b0  76 73 65 74 73 70 65 65  64 2d 76 6f 66 32 20 20  |vsetspeed-vof2  |
000049c0  20 20 20 20 20 3b 20 46  20 3d 20 53 65 74 20 53  |     ; F = Set S|
000049d0  70 65 65 64 0d 17 0c 04  0d 17 16 4d 2e 76 65 66  |peed.......M.vef|
000049e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000049f0  20 20 20 20 20 20 20 20  3b 45 66 66 65 63 74 73  |        ;Effects|
00004a00  2c 20 6e 65 65 64 6e 27  74 20 74 6f 20 62 65 20  |, needn't to be |
00004a10  64 6f 6e 65 20 68 65 72  65 2c 20 62 75 74 20 6c  |done here, but l|
00004a20  61 74 65 72 21 0d 17 20  3c 20 73 74 72 42 20 20  |ater!.. < strB  |
00004a30  72 32 2c 5b 72 31 32 2c  23 32 38 5d 20 20 20 20  |r2,[r12,#28]    |
00004a40  20 20 20 20 20 3b 53 74  6f 72 65 20 49 6e 66 6f  |     ;Store Info|
00004a50  42 79 74 65 2c 20 66 6f  72 20 45 66 66 65 63 74  |Byte, for Effect|
00004a60  73 0d 17 2a 16 20 6d 6f  76 20 20 20 72 30 2c 72  |s..*. mov   r0,r|
00004a70  30 2c 6c 73 72 23 38 0d  17 34 3c 20 73 74 72 42  |0,lsr#8..4< strB|
00004a80  20 20 72 30 2c 5b 72 31  32 2c 23 32 39 5d 20 20  |  r0,[r12,#29]  |
00004a90  20 20 20 20 20 20 20 3b  53 74 6f 72 65 20 43 6f  |       ;Store Co|
00004aa0  6d 6d 42 79 74 65 2c 20  66 6f 72 20 45 66 66 65  |mmByte, for Effe|
00004ab0  63 74 73 0d 17 3e 09 2e  76 6e 6f 70 0d 17 48 2b  |cts..>..vnop..H+|
00004ac0  20 6d 6f 76 20 20 20 70  63 2c 72 31 34 20 20 20  | mov   pc,r14   |
00004ad0  20 20 20 20 20 20 20 20  20 20 20 20 3b 61 6e 64  |            ;and|
00004ae0  20 72 65 74 75 72 6e 0d  17 52 04 0d 17 5c 0f 2e  | return..R...\..|
00004af0  76 73 74 65 72 65 6f 70  6f 73 0d 17 66 4d 20 61  |vstereopos..fM a|
00004b00  64 72 20 20 20 72 30 2c  48 65 61 64 20 20 20 20  |dr   r0,Head    |
00004b10  20 20 20 20 20 20 20 20  20 20 3b 47 65 74 20 63  |          ;Get c|
00004b20  75 72 72 65 6e 74 20 63  68 61 6e 6e 65 6c 20 6e  |urrent channel n|
00004b30  75 6d 62 65 72 20 28 6c  69 74 74 6c 65 20 4f 76  |umber (little Ov|
00004b40  65 72 68 65 61 64 29 0d  17 70 14 20 73 75 62 20  |erhead)..p. sub |
00004b50  20 20 72 30 2c 72 31 32  2c 72 30 0d 17 7a 35 20  |  r0,r12,r0..z5 |
00004b60  6d 6f 76 20 20 20 72 30  2c 72 30 2c 6c 73 72 23  |mov   r0,r0,lsr#|
00004b70  33 20 20 20 20 20 20 20  20 20 20 3b 81 20 38 3b  |3          ;. 8;|
00004b80  20 3d 3e 20 30 2c 34 2c  38 2c 31 32 2c 2e 2e 2e  | => 0,4,8,12,...|
00004b90  0d 17 84 12 20 63 6d 70  20 20 20 72 30 2c 23 37  |.... cmp   r0,#7|
00004ba0  2a 34 0d 17 8e 45 20 6d  6f 76 45 71 20 72 31 2c  |*4...E movEq r1,|
00004bb0  20 20 20 23 26 36 30 20  20 20 20 20 20 20 20 20  |   #&60         |
00004bc0  20 20 3b 53 74 65 72 65  6f 20 49 6d 61 67 65 20  |  ;Stereo Image |
00004bd0  52 65 67 69 73 74 65 72  20 20 20 37 20 20 3d 20  |Register   7  = |
00004be0  41 64 72 20 26 36 30 0d  17 98 4d 20 61 64 64 4e  |Adr &60...M addN|
00004bf0  65 20 72 31 2c 72 30 2c  23 26 36 34 20 20 20 20  |e r1,r0,#&64    |
00004c00  20 20 20 20 20 20 20 3b  53 74 65 72 65 6f 20 49  |       ;Stereo I|
00004c10  6d 61 67 65 20 52 65 67  69 73 74 65 72 73 20 30  |mage Registers 0|
00004c20  2d 36 20 3d 20 41 64 72  20 26 36 34 20 75 70 77  |-6 = Adr &64 upw|
00004c30  61 72 64 73 0d 17 a2 17  20 6d 6f 76 20 20 20 72  |ards.... mov   r|
00004c40  31 2c 72 31 2c 6c 73 6c  23 32 34 0d 17 ac 13 20  |1,r1,lsl#24.... |
00004c50  6f 72 72 20 20 20 72 31  2c 72 31 2c 72 32 0d 17  |orr   r1,r1,r2..|
00004c60  b6 17 20 6d 6f 76 20 20  20 72 32 2c 23 26 33 34  |.. mov   r2,#&34|
00004c70  30 30 30 30 30 0d 17 c0  12 20 73 74 72 20 20 20  |00000.... str   |
00004c80  72 31 2c 5b 72 32 5d 0d  17 ca 05 5d 0d 17 d4 0e  |r1,[r2]....]....|
00004c90  e7 20 56 6f 63 73 3d 34  20 8c 0d 17 de 0a 5b 4f  |. Vocs=4 .....[O|
00004ca0  50 54 20 70 0d 17 e8 39  20 63 6d 70 20 20 20 72  |PT p...9 cmp   r|
00004cb0  30 2c 23 33 2a 34 20 20  20 20 20 20 20 20 20 20  |0,#3*4          |
00004cc0  20 20 20 20 3b 45 78 74  72 61 20 41 64 72 20 6f  |    ;Extra Adr o|
00004cd0  66 20 49 6d 61 67 65 20  52 65 67 20 37 0d 17 f2  |f Image Reg 7...|
00004ce0  19 20 73 75 62 45 71 20  72 31 2c 72 31 2c 23 26  |. subEq r1,r1,#&|
00004cf0  31 30 3c 3c 32 34 0d 17  fc 41 20 61 64 64 4e 65  |10<<24...A addNe|
00004d00  20 72 31 2c 72 31 2c 23  26 31 30 3c 3c 32 34 20  | r1,r1,#&10<<24 |
00004d10  20 20 20 20 20 20 3b 57  65 6c 6c 2c 20 73 65 74  |      ;Well, set|
00004d20  20 75 70 20 74 77 69 6e  20 49 6d 61 67 65 20 52  | up twin Image R|
00004d30  65 67 20 74 6f 6f 21 0d  18 06 12 20 73 74 72 20  |eg too!.... str |
00004d40  20 20 72 31 2c 5b 72 32  5d 0d 18 10 05 5d 0d 18  |  r1,[r2]....]..|
00004d50  1a 05 cd 0d 18 24 0a 5b  4f 50 54 20 70 0d 18 2e  |.....$.[OPT p...|
00004d60  11 20 6d 6f 76 20 20 20  70 63 2c 72 31 34 0d 18  |. mov   pc,r14..|
00004d70  38 04 0d 18 42 0f 2e 76  61 75 74 6f 76 6f 6c 75  |8...B..vautovolu|
00004d80  70 0d 18 4c 17 20 73 74  72 42 20 20 72 32 2c 5b  |p..L. strB  r2,[|
00004d90  72 31 32 2c 23 32 34 5d  0d 18 56 11 20 6d 6f 76  |r12,#24]..V. mov|
00004da0  20 20 20 70 63 2c 72 31  34 0d 18 60 11 2e 76 61  |   pc,r14..`..va|
00004db0  75 74 6f 76 6f 6c 64 6f  77 6e 0d 18 6a 17 20 73  |utovoldown..j. s|
00004dc0  74 72 42 20 20 72 32 2c  5b 72 31 32 2c 23 32 35  |trB  r2,[r12,#25|
00004dd0  5d 0d 18 74 11 20 6d 6f  76 20 20 20 70 63 2c 72  |]..t. mov   pc,r|
00004de0  31 34 0d 18 7e 0f 2e 76  61 75 74 6f 61 72 63 75  |14..~..vautoarcu|
00004df0  70 0d 18 88 17 20 73 74  72 42 20 20 72 32 2c 5b  |p.... strB  r2,[|
00004e00  72 31 32 2c 23 32 36 5d  0d 18 92 11 20 6d 6f 76  |r12,#26].... mov|
00004e10  20 20 20 70 63 2c 72 31  34 0d 18 9c 11 2e 76 61  |   pc,r14.....va|
00004e20  75 74 6f 61 72 63 64 6f  77 6e 0d 18 a6 17 20 73  |utoarcdown.... s|
00004e30  74 72 42 20 20 72 32 2c  5b 72 31 32 2c 23 32 37  |trB  r2,[r12,#27|
00004e40  5d 0d 18 b0 11 20 6d 6f  76 20 20 20 70 63 2c 72  |].... mov   pc,r|
00004e50  31 34 0d 18 ba 04 0d 18  c4 0c 2e 76 73 65 74 76  |14.........vsetv|
00004e60  6f 6c 0d 18 ce 3d 20 73  74 72 20 20 20 72 32 2c  |ol...= str   r2,|
00004e70  5b 72 31 32 2c 23 31 36  5d 20 20 20 20 20 20 20  |[r12,#16]       |
00004e80  20 20 3b 45 6e 74 65 72  20 6e 65 77 20 56 6f 6c  |  ;Enter new Vol|
00004e90  75 6d 65 20 69 6e 74 6f  20 48 65 61 64 65 72 0d  |ume into Header.|
00004ea0  18 d8 11 20 6d 6f 76 20  20 20 70 63 2c 72 31 34  |... mov   pc,r14|
00004eb0  0d 18 e2 04 0d 18 ec 0f  2e 76 70 61 74 74 62 72  |.........vpattbr|
00004ec0  65 61 6b 0d 18 f6 48 20  6d 6f 76 20 20 20 72 37  |eak...H mov   r7|
00004ed0  2c 23 31 20 20 20 20 20  20 20 20 20 20 20 20 20  |,#1             |
00004ee0  20 20 20 3b 4a 75 6d 70  20 74 6f 20 65 6e 64 20  |   ;Jump to end |
00004ef0  6f 66 20 50 61 74 74 65  72 6e 2c 20 69 65 20 50  |of Pattern, ie P|
00004f00  61 74 74 5f 43 6f 75 6e  74 3d 31 0d 19 00 11 20  |att_Count=1.... |
00004f10  6d 6f 76 20 20 20 70 63  2c 72 31 34 0d 19 0a 04  |mov   pc,r14....|
00004f20  0d 19 14 0e 2e 76 73 65  74 73 70 65 65 64 0d 19  |.....vsetspeed..|
00004f30  1e 2e 20 73 74 72 20 20  20 72 32 2c 56 73 70 65  |.. str   r2,Vspe|
00004f40  65 64 20 20 20 20 20 20  20 20 20 20 20 20 3b 53  |ed            ;S|
00004f50  65 74 20 6e 65 77 20 53  70 65 65 64 0d 19 28 11  |et new Speed..(.|
00004f60  20 6d 6f 76 20 20 20 70  63 2c 72 31 34 0d 19 32  | mov   pc,r14..2|
00004f70  04 0d 19 3c 13 3b 3d 3d  3d 3d 20 dc 42 41 59 20  |...<.;==== .BAY |
00004f80  3d 3d 3d 3d 0d 19 46 04  0d 19 50 3e 2e 52 65 67  |====..F...P>.Reg|
00004f90  69 73 74 65 72 73 20 20  20 20 64 63 64 20 36 34  |isters    dcd 64|
00004fa0  20 20 20 20 20 20 20 20  3b 20 72 37 20 50 61 74  |        ; r7 Pat|
00004fb0  74 65 72 6e 5f 43 6f 75  6e 74 65 72 20 28 36 34  |tern_Counter (64|
00004fc0  20 2d 3e 20 31 29 0d 19  5a 43 20 20 20 20 20 20  | -> 1)..ZC      |
00004fd0  20 20 20 20 20 20 20 20  64 63 64 20 30 30 20 20  |        dcd 00  |
00004fe0  20 20 20 20 20 20 3b 20  72 38 20 43 75 72 72 65  |      ; r8 Curre|
00004ff0  6e 74 20 50 6f 69 6e 74  65 72 20 69 6e 20 74 68  |nt Pointer in th|
00005000  65 20 50 61 74 74 65 72  6e 0d 19 64 44 20 20 20  |e Pattern..dD   |
00005010  20 20 20 20 20 20 20 20  20 20 20 64 63 64 20 30  |           dcd 0|
00005020  30 20 20 20 20 20 20 20  20 3b 20 72 39 20 43 75  |0        ; r9 Cu|
00005030  72 72 65 6e 74 20 50 6f  69 6e 74 65 72 20 69 6e  |rrent Pointer in|
00005040  20 74 68 65 20 53 65 71  75 65 6e 63 65 0d 19 6e  | the Sequence..n|
00005050  05 20 0d 19 78 4d 2e 56  63 6f 75 6e 74 20 20 20  |. ..xM.Vcount   |
00005060  20 20 20 20 64 63 64 20  30 20 20 20 20 20 20 20  |    dcd 0       |
00005070  20 20 3b 56 53 79 6e 63  20 43 6f 75 6e 74 65 72  |  ;VSync Counter|
00005080  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005090  7c 4b 65 65 70 20 74 68  65 73 65 20 74 77 6f 0d  ||Keep these two.|
000050a0  19 82 4a 2e 56 73 70 65  65 64 20 20 20 20 20 20  |..J.Vspeed      |
000050b0  20 64 63 64 20 36 20 20  20 20 20 20 20 20 20 3b  | dcd 6         ;|
000050c0  53 70 65 65 64 20 43 6f  75 6e 74 65 72 20 28 64  |Speed Counter (d|
000050d0  65 66 61 75 6c 74 3d 36  29 20 20 20 20 7c 20 20  |efault=6)    |  |
000050e0  3c 20 2e 46 74 61 62 6c  65 0d 19 8c 04 0d 19 96  |< .Ftable.......|
000050f0  25 2e 46 74 61 62 6c 65  20 20 20 20 20 20 20 5d  |%.Ftable       ]|
00005100  3a 50 25 2b 3d 39 2a 31  32 2a 34 3a 5b 4f 50 54  |:P%+=9*12*4:[OPT|
00005110  20 70 0d 19 a0 0a 2e 54  72 61 63 6b 0d 19 aa 04  | p.....Track....|
00005120  0d 19 b4 3b 3b 53 61 6d  70 6c 65 20 48 65 61 64  |...;;Sample Head|
00005130  20 28 61 74 20 49 6e 73  74 2a 33 32 29 20 20 20  | (at Inst*32)   |
00005140  23 30 30 20 41 62 73 6f  6c 75 74 65 20 53 61 6d  |#00 Absolute Sam|
00005150  70 6c 65 20 41 64 64 72  65 73 73 0d 19 be 2a 20  |ple Address...* |
00005160  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005170  20 20 20 20 3b 20 20 20  20 20 20 23 30 34 20 4c  |    ;      #04 L|
00005180  65 6e 67 74 68 0d 19 c8  30 20 20 20 20 20 20 20  |ength...0       |
00005190  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
000051a0  20 20 20 20 20 23 30 38  20 56 6f 6c 75 6d 65 20  |     #08 Volume |
000051b0  30 2d 26 66 66 0d 19 d2  3a 20 20 20 20 20 20 20  |0-&ff...:       |
000051c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
000051d0  20 20 20 20 20 23 31 32  20 52 65 70 65 61 74 41  |     #12 RepeatA|
000051e0  74 20 61 73 20 42 79 74  65 4f 66 66 73 65 74 0d  |t as ByteOffset.|
000051f0  19 dc 2a 20 20 20 20 20  20 20 20 20 20 20 20 20  |..*             |
00005200  20 20 20 20 20 20 20 20  3b 20 20 20 20 20 20 23  |        ;      #|
00005210  31 36 20 52 65 70 4c 65  6e 0d 19 e6 33 20 20 20  |16 RepLen...3   |
00005220  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005230  20 20 3b 20 20 20 20 20  20 23 32 30 20 49 6e 73  |  ;      #20 Ins|
00005240  74 72 75 6d 65 6e 74 20  4e 61 6d 65 0d 19 f0 04  |trument Name....|
00005250  0d 19 fa 17 3b 3d 3d 3d  3d 49 4e 49 54 53 54 4f  |....;====INITSTO|
00005260  52 45 20 3d 3d 3d 3d 0d  1a 04 04 0d 1a 0e 10 20  |RE ====........ |
00005270  6d 6f 76 20 20 20 72 32  2c 23 30 0d 1a 18 09 2e  |mov   r2,#0.....|
00005280  75 61 6c 6c 0d 1a 22 15  20 73 74 72 20 20 20 72  |uall..". str   r|
00005290  32 2c 5b 72 30 5d 2c 23  34 0d 1a 2c 10 20 63 6d  |2,[r0],#4..,. cm|
000052a0  70 20 20 20 72 30 2c 72  31 0d 1a 36 0f 20 62 4c  |p   r0,r1..6. bL|
000052b0  6f 20 20 20 75 61 6c 6c  0d 1a 40 11 20 6d 6f 76  |o   uall..@. mov|
000052c0  20 20 20 70 63 2c 72 31  34 0d 1a 4a 09 2e 75 66  |   pc,r14..J..uf|
000052d0  69 6e 0d 1a 54 04 0d 1a  5e 07 5d 3a e1 0d 1a 68  |in..T...^.]:...h|
000052e0  04 0d 1a 72 1b 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |...r.-----------|
000052f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0d 1a 7c 1b  |------------..|.|
00005300  32 65 72 20 41 44 52 20  28 6f 6e 6c 79 20 66 6f  |2er ADR (only fo|
00005310  72 77 61 72 64 73 29 0d  1a 86 1b 2d 2d 2d 2d 2d  |rwards)....-----|
00005320  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00005330  2d 2d 0d 1a 90 14 dd 20  a4 61 64 72 28 72 25 2c  |--..... .adr(r%,|
00005340  64 65 73 74 25 29 0d 1a  9a 13 64 69 73 25 3d 64  |dest%)....dis%=d|
00005350  65 73 74 25 2d 50 25 2d  38 0d 1a a4 0f e7 20 70  |est%-P%-8..... p|
00005360  3d 25 31 30 30 30 20 8c  0d 1a ae 12 20 20 64 30  |=%1000 .....  d0|
00005370  25 3d 30 20 3a 64 31 25  3d 30 0d 1a b8 05 cc 0d  |%=0 :d1%=0......|
00005380  1a c2 13 20 20 e7 20 64  69 73 25 20 80 20 26 66  |...  . dis% . &f|
00005390  20 8c 0d 1a cc 19 20 20  20 20 64 30 25 3d 64 69  | .....    d0%=di|
000053a0  73 25 20 80 20 26 30 30  30 46 46 0d 1a d6 19 20  |s% . &000FF.... |
000053b0  20 20 20 64 31 25 3d 64  69 73 25 20 80 20 26 46  |   d1%=dis% . &F|
000053c0  46 46 30 30 0d 1a e0 07  20 20 cc 0d 1a ea 19 20  |FF00....  ..... |
000053d0  20 20 20 64 30 25 3d 64  69 73 25 20 80 20 26 30  |   d0%=dis% . &0|
000053e0  30 46 46 46 0d 1a f4 19  20 20 20 20 64 31 25 3d  |0FFF....    d1%=|
000053f0  64 69 73 25 20 80 20 26  46 46 30 30 30 0d 1a fe  |dis% . &FF000...|
00005400  07 20 20 cd 0d 1b 08 37  20 20 e7 20 64 30 25 2b  |.  ....7  . d0%+|
00005410  64 31 25 3c 3e 64 69 73  25 20 8c 20 f1 20 bd 37  |d1%<>dis% . . .7|
00005420  3b 22 46 4e 61 64 72 20  64 6f 65 73 6e 27 74 20  |;"FNadr doesn't |
00005430  73 75 66 66 69 63 65 21  22 3a e0 0d 1b 12 38 20  |suffice!":....8 |
00005440  20 e7 20 64 30 25 3d 30  20 84 20 64 31 25 3d 30  | . d0%=0 . d1%=0|
00005450  20 8c 20 f1 20 22 46 4e  61 64 72 20 3a 20 41 44  | . . "FNadr : AD|
00005460  52 20 77 6f 75 6c 64 20  64 6f 2e 20 22 3b 7e 64  |R would do. ";~d|
00005470  69 73 25 0d 1b 1c 05 cd  0d 1b 26 0a 5b 4f 50 54  |is%.......&.[OPT|
00005480  20 70 0d 1b 30 13 20 61  64 64 20 72 25 2c 70 63  | p..0. add r%,pc|
00005490  2c 23 64 31 25 0d 1b 3a  13 20 61 64 64 20 72 25  |,#d1%..:. add r%|
000054a0  2c 72 25 2c 23 64 30 25  0d 1b 44 08 5d 3d 22 22  |,r%,#d0%..D.]=""|
000054b0  0d ff                                             |..|
000054b2