Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199610.adf » Regulars » StarInfo/Wood/FullFade/!FullFade+

StarInfo/Wood/FullFade/!FullFade+

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199610.adf » Regulars
Filename: StarInfo/Wood/FullFade/!FullFade+
Read OK:
File size: 1500 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >>> !ScreenFade - 256 colour screen fading routine
   20REM     by Keith T Wood
   30
   40MODE13+128
   50
   60ON ERROR: MODEMODE: REPORT: PRINT " at line "; ERL/10: END
   70
   80DIM code% 10000
   90
  100FOR pass%=0 TO 2 STEP 2
  110 P%=code%
  120 PROCmain_code
  130NEXT
  140
  150PROCcheck_mode
  160
  170REPEAT
  180 FOR !fade=0 TO 16
  190  CALL fullfade
  200  SWAP !shadow, !screen
  210  WAIT: SYS "OS_Byte", 113, b% TO , b%
  220 NEXT
  230 SWAP !image1, !image2
  240UNTIL FALSE
  250END
  260
  270DEFPROCcheck_mode
  280LOCAL J%, sw%, sh%, pw%, ph%, tw%, addr%
  290SYS "OS_ReadModeVariable", -1, 6 TO ,, sw%
  300SYS "OS_ReadModeVariable", -1, 4 TO ,, pw%
  310SYS "OS_ReadModeVariable", -1, 5 TO ,, ph%
  320SYS "OS_ReadModeVariable", -1, 1 TO ,, tw%
  330SYS "OS_ReadModeVariable", -1, 12 TO ,, sh%
  340sh%+=1
  350!count=(sh%*sw%)>>2
  360sprtsize%=(sw%*sh%+63)<<1
  370DIM sprt% sprtsize%
  380!sprt%=sprtsize%
  390sprt%!8=16
  400sprt%!16=0
  410SYS "OS_SpriteOp", 9+256, sprt%
  420SYS "OS_SpriteOp", 15+256, sprt%, "1", 0, sw%, sh%, MODE
  430SYS "OS_SpriteOp", 15+256, sprt%, "2", 0, sw%, sh%, MODE
  440SYS "OS_SpriteOp", 60+256, sprt%, "1", 0
  450FOR J%=0 TO 200
  460 GCOL RND(64)-1 TINT (RND(4)-1)<<6
  470 MOVE RND(sw%<<pw%)-1, RND(sh%<<ph%)-1
  480 PLOT 152+1, RND(40), RND(40)
  490NEXT
  500GCOL 63 TINT 3<<6
  510VDU5
  520PRINTTAB(((tw%)>>1)-4, 14)"ScreenFade"
  530SYS "OS_SpriteOp", 60+256, sprt%, "2", 0
  540FOR J%=0 TO 600
  550 GCOL RND(64)-1 TINT (RND(4)-1)<<6
  560 MOVE RND(sw%<<pw%)-1, RND(sh%<<ph%)-1
  570 PLOT 96+1, RND(40), RND(40)
  580NEXT
  590GCOL 63 TINT 3<<6
  600VDU5
  610PRINTTAB(((tw%)>>1), 15)"by" TAB(((tw%)>>1)-4, 16)"Keith Wood"
  620SYS "OS_SpriteOp", 60+256, sprt%, 0, 0: OFF
  630SYS "OS_ReadVduVariables", vdin, shadow
  640SYS "OS_Byte", 112, 1 TO ,b%
  650SYS "OS_ReadVduVariables", vdin, screen
  660SYS "OS_Byte", 112, b% TO ,b%
  670SYS "OS_SpriteOp", 24+256, sprt%, "1" TO ,, addr%
  680!image1=addr%!32+addr%
  690SYS "OS_SpriteOp", 24+256, sprt%, "2" TO ,, addr%
  700!image2=addr%!32+addr%
  710ENDPROC
  720
  730DEFPROCmain_code
  740
  750Px1=0
  760Px2=1:  Tmp=1
  770Scr=2
  780Im1=3:  Im2=4
  790Fade=5
  800Cnt=6
  810Msk1=7:  Msk2=8
  820Red1=9:  Gre1=10:  Blu1=11
  830Red2=12: Gre2=13:  Blu2=14
  840
  850[OPT     pass%
  860 
  870 .fullfade
  880 ADR     r0, stack
  890 STMIA   r0, {r13, r14}               ; save important regs
  900 ADR     r0, screen
  910 LDMIA   r0, {Scr-Msk2}               ; load routine info. efficiently
  920 
  930 .fadeloop
  940 LDR     Px1, [Im1], #4               ; get 4 pixels from 1st image
  950 FNdecode_macro( Px1, Red1, Gre1, Blu1, Px2 )
  960 LDR     Px2, [Im2], #4               ; get 4 pixels from 2nd image
  970 FNdecode_macro( Px2, Red2, Gre2, Blu2, Px1 )
  980 MOV     Tmp, Msk1, LSL #3            ; rounding value
  990 MLA     Red1, Fade, Red1, Msk1       ; calc. fade levels on R, G, B's
 1000 MLA     Gre1, Fade, Gre1, Msk1       ; of 1st image
 1010 MLA     Blu1, Fade, Blu1, Msk1
 1020 RSB     Tmp, Fade, #16               ; invert fade level, put in Tmp
 1030 MLA     Red1, Tmp, Red2, Red1        ; calc. fade levels on R, G, B's
 1040 MLA     Gre1, Tmp, Gre2, Gre1        ; of 2nd image
 1050 MLA     Blu1, Tmp, Blu2, Blu1        ; and accumulate total mixing
 1060                                      ; encoding the R, G, B results in Px1
 1070 AND     Px1, Blu1, Msk1, LSL #(4+3)  ; mask off blue bit 3 and store
 1080 AND     Tmp, Blu1, Msk1, LSL #(4+2)  ; mask off blue bit 2
 1090 ORR     Px1, Px1, Tmp, LSR #3        ; store blue bit 2
 1100 AND     Tmp, Red1, Msk1, LSL #(4+2)  ; mask off red bit 2
 1110 ORR     Px1, Px1, Tmp, LSR #4        ; store red bit 2
 1120 AND     Tmp, Red1, Msk1, LSL #(4+3)  ; mask off red bit 3
 1130 ORR     Px1, Px1, Tmp, LSR #3        ; store red bit 3
 1140 AND     Tmp, Gre1, Msk2, LSL #(4+2)  ; mask off green bits 2 & 3
 1150 ORR     Px1, Px1, Tmp, LSR #1        ; store green bits 2 & 3
 1160 AND     Red1, Msk2, Red1, LSR #4     ; mask off tints
 1170 AND     Gre1, Msk2, Gre1, LSR #4
 1180 AND     Blu1, Msk2, Blu1, LSR #4
 1190 ADD     Tmp, Red1, Blu1              ; begin mixing tints
 1200 ADD     Tmp, Tmp, Gre1, LSL #1       ; approx. weights by shifting (green x 2)
 1210 AND     Tmp, Msk2, Tmp, LSR #2       ; mask off appropriate part of result
 1220 ORR     Px1, Px1, Tmp                ; and thus R, G, B's are finally encoded
 1230 STR     Px1, [Scr], #4               ; store 4 faded pixels to screen
 1240 SUBS    Cnt, Cnt, #1                 ; decrement counter
 1250 BGT     fadeloop                     ; loop if counter > 0
 1260 ADR     r0, stack
 1270 LDMIA   r0, {r13, r14}               ; load important regs
 1280 MOV     PC, r14                      ; and exit safely
 1290 
 1300 .shadow    EQUD 0
 1310 .screen    EQUD 0
 1320 .image1    EQUD 0
 1330 .image2    EQUD 0
 1340 .fade      EQUD 0
 1350 .count     EQUD 0
 1360 .masks     EQUD &01010101:  EQUD &03030303
 1370 .stack     EQUD 0:          EQUD 0
 1380 .vdin      EQUD 148:        EQUD -1
 1390]
 1400ENDPROC
 1410
 1420DEFFNdecode_macro( Pix, Red, Gre, Blu, Temp )
 1430[OPT     pass%                        ; decoding P into R, G, B components
 1440 AND     Blu, Pix, Msk2               ; get tint bits in B
 1450 AND     Temp, Pix, Msk1, LSL #2      ; mask off red bit 2
 1460 ORR     Red, Blu, Temp               ; OR with tints from B
 1470 AND     Temp, Pix, Msk1, LSL #4      ; mask off red bit 3
 1480 ORR     Red, Red, Temp, LSR #1       ; red bits complete
 1490 AND     Temp, Pix, Msk2, LSL #5      ; mask off green bits 2 & 3
 1500 ORR     Gre, Blu, Temp, LSR #3       ; green bits complete
 1510 AND     Temp, Pix, Msk1, LSL #3      ; mask off blue bit 2
 1520 ORR     Blu, Blu, Temp, LSR #1       ; OR with tints
 1530 AND     Temp, Pix, Msk1, LSL #7      ; mask off blue bit 3
 1540 ORR     Blu, Blu, Temp, LSR #4       ; blue bits complete
 1550]
 1560=""

8� >>> !ScreenFade - 256 colour screen fading routine
�     by Keith T Wood

(�13+128
2
<&� �: ��: �: � " at line "; �/10: �
F
P� code% 10000
Z
d� pass%=0 � 2 � 2
n
 P%=code%
x �main_code
��
�
��check_mode
�
��
� � !fade=0 � 16
�  � fullfade
�  Ȕ !shadow, !screen
�&  Ȗ: ș "OS_Byte", 113, b% � , b%
� �
� Ȕ !image1, !image2
�� �
��

��check_mode
(� J%, sw%, sh%, pw%, ph%, tw%, addr%
",ș "OS_ReadModeVariable", -1, 6 � ,, sw%
,,ș "OS_ReadModeVariable", -1, 4 � ,, pw%
6,ș "OS_ReadModeVariable", -1, 5 � ,, ph%
@,ș "OS_ReadModeVariable", -1, 1 � ,, tw%
J-ș "OS_ReadModeVariable", -1, 12 � ,, sh%
T
sh%+=1
^!count=(sh%*sw%)>>2
hsprtsize%=(sw%*sh%+63)<<1
r� sprt% sprtsize%
|!sprt%=sprtsize%
�sprt%!8=16
�sprt%!16=0
�"ș "OS_SpriteOp", 9+256, sprt%
�8ș "OS_SpriteOp", 15+256, sprt%, "1", 0, sw%, sh%, �
�8ș "OS_SpriteOp", 15+256, sprt%, "2", 0, sw%, sh%, �
�+ș "OS_SpriteOp", 60+256, sprt%, "1", 0
�� J%=0 � 200
� � �(64)-1 Ȝ (�(4)-1)<<6
�# � �(sw%<<pw%)-1, �(sh%<<ph%)-1
� � 152+1, �(40), �(40)
��
�� 63 Ȝ 3<<6
��5
#�((tw%)>>1)-4, 14)"ScreenFade"
+ș "OS_SpriteOp", 60+256, sprt%, "2", 0
� J%=0 � 600
& � �(64)-1 Ȝ (�(4)-1)<<6
0# � �(sw%<<pw%)-1, �(sh%<<ph%)-1
: � 96+1, �(40), �(40)
D�
N� 63 Ȝ 3<<6
X�5
b8�((tw%)>>1), 15)"by" �((tw%)>>1)-4, 16)"Keith Wood"
l,ș "OS_SpriteOp", 60+256, sprt%, 0, 0: �
v*ș "OS_ReadVduVariables", vdin, shadow
�ș "OS_Byte", 112, 1 � ,b%
�*ș "OS_ReadVduVariables", vdin, screen
�ș "OS_Byte", 112, b% � ,b%
�3ș "OS_SpriteOp", 24+256, sprt%, "1" � ,, addr%
�!image1=addr%!32+addr%
�3ș "OS_SpriteOp", 24+256, sprt%, "2" � ,, addr%
�!image2=addr%!32+addr%
��
�
���main_code
�
�	Px1=0
�Px2=1:  Tmp=1
	Scr=2
Im1=3:  Im2=4

Fade=5
 	Cnt=6
*Msk1=7:  Msk2=8
4Red1=9:  Gre1=10:  Blu1=11
>Red2=12: Gre2=13:  Blu2=14
H
R[OPT     pass%
\ 
f .fullfade
p ADR     r0, stack
z? STMIA   r0, {r13, r14}               ; save important regs
� ADR     r0, screen
�J LDMIA   r0, {Scr-Msk2}               ; load routine info. efficiently
� 
� .fadeloop
�G LDR     Px1, [Im1], #4               ; get 4 pixels from 1st image
�0 �decode_macro( Px1, Red1, Gre1, Blu1, Px2 )
�G LDR     Px2, [Im2], #4               ; get 4 pixels from 2nd image
�0 �decode_macro( Px2, Red2, Gre2, Blu2, Px1 )
�: MOV     Tmp, Msk1, LSL #3            ; rounding value
�J MLA     Red1, Fade, Red1, Msk1       ; calc. fade levels on R, G, B's
�8 MLA     Gre1, Fade, Gre1, Msk1       ; of 1st image
�# MLA     Blu1, Fade, Blu1, Msk1
�I RSB     Tmp, Fade, #16               ; invert fade level, put in Tmp
J MLA     Red1, Tmp, Red2, Red1        ; calc. fade levels on R, G, B's
8 MLA     Gre1, Tmp, Gre2, Gre1        ; of 2nd image
G MLA     Blu1, Tmp, Blu2, Blu1        ; and accumulate total mixing
$O                                      ; encoding the R, G, B results in Px1
.G �     Px1, Blu1, Msk1, LSL #(4+3)  ; mask off blue bit 3 and store
8= �     Tmp, Blu1, Msk1, LSL #(4+2)  ; mask off blue bit 2
B; �R     Px1, Px1, Tmp, LSR #3        ; store blue bit 2
L< �     Tmp, Red1, Msk1, LSL #(4+2)  ; mask off red bit 2
V: �R     Px1, Px1, Tmp, LSR #4        ; store red bit 2
`< �     Tmp, Red1, Msk1, LSL #(4+3)  ; mask off red bit 3
j: �R     Px1, Px1, Tmp, LSR #3        ; store red bit 3
tC �     Tmp, Gre1, Msk2, LSL #(4+2)  ; mask off green bits 2 & 3
~A �R     Px1, Px1, Tmp, LSR #1        ; store green bits 2 & 3
�8 �     Red1, Msk2, Red1, LSR #4     ; mask off tints
�# �     Gre1, Msk2, Gre1, LSR #4
�# �     Blu1, Msk2, Blu1, LSR #4
�> ADD     Tmp, Red1, Blu1              ; begin mixing tints
�S ADD     Tmp, Tmp, Gre1, LSL #1       ; approx. weights by shifting (green x 2)
�M �     Tmp, Msk2, Tmp, LSR #2       ; mask off appropriate part of result
�Q �R     Px1, Px1, Tmp                ; and thus R, G, B's are finally encoded
�J STR     Px1, [Scr], #4               ; store 4 faded pixels to screen
�= SUBS    Cnt, Cnt, #1                 ; decrement counter
�? BGT     fadeloop                     ; loop if counter > 0
� ADR     r0, stack
�? LDMIA   r0, {r13, r14}               ; load important regs
; MOV     PC, r14                      ; and exit safely

 
 .shadow    EQUD 0
 .screen    EQUD 0
( .image1    EQUD 0
2 .image2    EQUD 0
< .fade      EQUD 0
F .count     EQUD 0
P/ .masks     EQUD &01010101:  EQUD &03030303
Z' .stack     EQUD 0:          EQUD 0
d( .vdin      EQUD 148:        EQUD -1
n]
x�
�
�.ݤdecode_macro( Pix, Red, Gre, Blu, Temp )
�N[OPT     pass%                        ; decoding P into R, G, B components
�< �     Blu, Pix, Msk2               ; get tint bits in B
�< �     Temp, Pix, Msk1, LSL #2      ; mask off red bit 2
�> �R     Red, Blu, Temp               ; � with tints from B
�< �     Temp, Pix, Msk1, LSL #4      ; mask off red bit 3
�< �R     Red, Red, Temp, LSR #1       ; red bits complete
�C �     Temp, Pix, Msk2, LSL #5      ; mask off green bits 2 & 3
�> �R     Gre, Blu, Temp, LSR #3       ; green bits complete
�= �     Temp, Pix, Msk1, LSL #3      ; mask off blue bit 2
�7 �R     Blu, Blu, Temp, LSR #1       ; � with tints
�= �     Temp, Pix, Msk1, LSL #7      ; mask off blue bit 3
= �R     Blu, Blu, Temp, LSR #4       ; blue bits complete
]
=""
�
00000000  0d 00 0a 38 f4 20 3e 3e  3e 20 21 53 63 72 65 65  |...8. >>> !Scree|
00000010  6e 46 61 64 65 20 2d 20  32 35 36 20 63 6f 6c 6f  |nFade - 256 colo|
00000020  75 72 20 73 63 72 65 65  6e 20 66 61 64 69 6e 67  |ur screen fading|
00000030  20 72 6f 75 74 69 6e 65  0d 00 14 19 f4 20 20 20  | routine.....   |
00000040  20 20 62 79 20 4b 65 69  74 68 20 54 20 57 6f 6f  |  by Keith T Woo|
00000050  64 0d 00 1e 04 0d 00 28  0b eb 31 33 2b 31 32 38  |d......(..13+128|
00000060  0d 00 32 04 0d 00 3c 26  ee 20 85 3a 20 eb eb 3a  |..2...<&. .: ..:|
00000070  20 f6 3a 20 f1 20 22 20  61 74 20 6c 69 6e 65 20  | .: . " at line |
00000080  22 3b 20 9e 2f 31 30 3a  20 e0 0d 00 46 04 0d 00  |"; ./10: ...F...|
00000090  50 11 de 20 63 6f 64 65  25 20 31 30 30 30 30 0d  |P.. code% 10000.|
000000a0  00 5a 04 0d 00 64 15 e3  20 70 61 73 73 25 3d 30  |.Z...d.. pass%=0|
000000b0  20 b8 20 32 20 88 20 32  0d 00 6e 0d 20 50 25 3d  | . 2 . 2..n. P%=|
000000c0  63 6f 64 65 25 0d 00 78  0f 20 f2 6d 61 69 6e 5f  |code%..x. .main_|
000000d0  63 6f 64 65 0d 00 82 05  ed 0d 00 8c 04 0d 00 96  |code............|
000000e0  0f f2 63 68 65 63 6b 5f  6d 6f 64 65 0d 00 a0 04  |..check_mode....|
000000f0  0d 00 aa 05 f5 0d 00 b4  13 20 e3 20 21 66 61 64  |......... . !fad|
00000100  65 3d 30 20 b8 20 31 36  0d 00 be 10 20 20 d6 20  |e=0 . 16....  . |
00000110  66 75 6c 6c 66 61 64 65  0d 00 c8 19 20 20 c8 94  |fullfade....  ..|
00000120  20 21 73 68 61 64 6f 77  2c 20 21 73 63 72 65 65  | !shadow, !scree|
00000130  6e 0d 00 d2 26 20 20 c8  96 3a 20 c8 99 20 22 4f  |n...&  ..: .. "O|
00000140  53 5f 42 79 74 65 22 2c  20 31 31 33 2c 20 62 25  |S_Byte", 113, b%|
00000150  20 b8 20 2c 20 62 25 0d  00 dc 06 20 ed 0d 00 e6  | . , b%.... ....|
00000160  18 20 c8 94 20 21 69 6d  61 67 65 31 2c 20 21 69  |. .. !image1, !i|
00000170  6d 61 67 65 32 0d 00 f0  07 fd 20 a3 0d 00 fa 05  |mage2..... .....|
00000180  e0 0d 01 04 04 0d 01 0e  10 dd f2 63 68 65 63 6b  |...........check|
00000190  5f 6d 6f 64 65 0d 01 18  28 ea 20 4a 25 2c 20 73  |_mode...(. J%, s|
000001a0  77 25 2c 20 73 68 25 2c  20 70 77 25 2c 20 70 68  |w%, sh%, pw%, ph|
000001b0  25 2c 20 74 77 25 2c 20  61 64 64 72 25 0d 01 22  |%, tw%, addr%.."|
000001c0  2c c8 99 20 22 4f 53 5f  52 65 61 64 4d 6f 64 65  |,.. "OS_ReadMode|
000001d0  56 61 72 69 61 62 6c 65  22 2c 20 2d 31 2c 20 36  |Variable", -1, 6|
000001e0  20 b8 20 2c 2c 20 73 77  25 0d 01 2c 2c c8 99 20  | . ,, sw%..,,.. |
000001f0  22 4f 53 5f 52 65 61 64  4d 6f 64 65 56 61 72 69  |"OS_ReadModeVari|
00000200  61 62 6c 65 22 2c 20 2d  31 2c 20 34 20 b8 20 2c  |able", -1, 4 . ,|
00000210  2c 20 70 77 25 0d 01 36  2c c8 99 20 22 4f 53 5f  |, pw%..6,.. "OS_|
00000220  52 65 61 64 4d 6f 64 65  56 61 72 69 61 62 6c 65  |ReadModeVariable|
00000230  22 2c 20 2d 31 2c 20 35  20 b8 20 2c 2c 20 70 68  |", -1, 5 . ,, ph|
00000240  25 0d 01 40 2c c8 99 20  22 4f 53 5f 52 65 61 64  |%..@,.. "OS_Read|
00000250  4d 6f 64 65 56 61 72 69  61 62 6c 65 22 2c 20 2d  |ModeVariable", -|
00000260  31 2c 20 31 20 b8 20 2c  2c 20 74 77 25 0d 01 4a  |1, 1 . ,, tw%..J|
00000270  2d c8 99 20 22 4f 53 5f  52 65 61 64 4d 6f 64 65  |-.. "OS_ReadMode|
00000280  56 61 72 69 61 62 6c 65  22 2c 20 2d 31 2c 20 31  |Variable", -1, 1|
00000290  32 20 b8 20 2c 2c 20 73  68 25 0d 01 54 0a 73 68  |2 . ,, sh%..T.sh|
000002a0  25 2b 3d 31 0d 01 5e 17  21 63 6f 75 6e 74 3d 28  |%+=1..^.!count=(|
000002b0  73 68 25 2a 73 77 25 29  3e 3e 32 0d 01 68 1d 73  |sh%*sw%)>>2..h.s|
000002c0  70 72 74 73 69 7a 65 25  3d 28 73 77 25 2a 73 68  |prtsize%=(sw%*sh|
000002d0  25 2b 36 33 29 3c 3c 31  0d 01 72 15 de 20 73 70  |%+63)<<1..r.. sp|
000002e0  72 74 25 20 73 70 72 74  73 69 7a 65 25 0d 01 7c  |rt% sprtsize%..||
000002f0  14 21 73 70 72 74 25 3d  73 70 72 74 73 69 7a 65  |.!sprt%=sprtsize|
00000300  25 0d 01 86 0e 73 70 72  74 25 21 38 3d 31 36 0d  |%....sprt%!8=16.|
00000310  01 90 0e 73 70 72 74 25  21 31 36 3d 30 0d 01 9a  |...sprt%!16=0...|
00000320  22 c8 99 20 22 4f 53 5f  53 70 72 69 74 65 4f 70  |".. "OS_SpriteOp|
00000330  22 2c 20 39 2b 32 35 36  2c 20 73 70 72 74 25 0d  |", 9+256, sprt%.|
00000340  01 a4 38 c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |..8.. "OS_Sprite|
00000350  4f 70 22 2c 20 31 35 2b  32 35 36 2c 20 73 70 72  |Op", 15+256, spr|
00000360  74 25 2c 20 22 31 22 2c  20 30 2c 20 73 77 25 2c  |t%, "1", 0, sw%,|
00000370  20 73 68 25 2c 20 eb 0d  01 ae 38 c8 99 20 22 4f  | sh%, ....8.. "O|
00000380  53 5f 53 70 72 69 74 65  4f 70 22 2c 20 31 35 2b  |S_SpriteOp", 15+|
00000390  32 35 36 2c 20 73 70 72  74 25 2c 20 22 32 22 2c  |256, sprt%, "2",|
000003a0  20 30 2c 20 73 77 25 2c  20 73 68 25 2c 20 eb 0d  | 0, sw%, sh%, ..|
000003b0  01 b8 2b c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |..+.. "OS_Sprite|
000003c0  4f 70 22 2c 20 36 30 2b  32 35 36 2c 20 73 70 72  |Op", 60+256, spr|
000003d0  74 25 2c 20 22 31 22 2c  20 30 0d 01 c2 10 e3 20  |t%, "1", 0..... |
000003e0  4a 25 3d 30 20 b8 20 32  30 30 0d 01 cc 1d 20 e6  |J%=0 . 200.... .|
000003f0  20 b3 28 36 34 29 2d 31  20 c8 9c 20 28 b3 28 34  | .(64)-1 .. (.(4|
00000400  29 2d 31 29 3c 3c 36 0d  01 d6 23 20 ec 20 b3 28  |)-1)<<6...# . .(|
00000410  73 77 25 3c 3c 70 77 25  29 2d 31 2c 20 b3 28 73  |sw%<<pw%)-1, .(s|
00000420  68 25 3c 3c 70 68 25 29  2d 31 0d 01 e0 1a 20 f0  |h%<<ph%)-1.... .|
00000430  20 31 35 32 2b 31 2c 20  b3 28 34 30 29 2c 20 b3  | 152+1, .(40), .|
00000440  28 34 30 29 0d 01 ea 05  ed 0d 01 f4 10 e6 20 36  |(40).......... 6|
00000450  33 20 c8 9c 20 33 3c 3c  36 0d 01 fe 06 ef 35 0d  |3 .. 3<<6.....5.|
00000460  02 08 23 f1 8a 28 28 74  77 25 29 3e 3e 31 29 2d  |..#..((tw%)>>1)-|
00000470  34 2c 20 31 34 29 22 53  63 72 65 65 6e 46 61 64  |4, 14)"ScreenFad|
00000480  65 22 0d 02 12 2b c8 99  20 22 4f 53 5f 53 70 72  |e"...+.. "OS_Spr|
00000490  69 74 65 4f 70 22 2c 20  36 30 2b 32 35 36 2c 20  |iteOp", 60+256, |
000004a0  73 70 72 74 25 2c 20 22  32 22 2c 20 30 0d 02 1c  |sprt%, "2", 0...|
000004b0  10 e3 20 4a 25 3d 30 20  b8 20 36 30 30 0d 02 26  |.. J%=0 . 600..&|
000004c0  1d 20 e6 20 b3 28 36 34  29 2d 31 20 c8 9c 20 28  |. . .(64)-1 .. (|
000004d0  b3 28 34 29 2d 31 29 3c  3c 36 0d 02 30 23 20 ec  |.(4)-1)<<6..0# .|
000004e0  20 b3 28 73 77 25 3c 3c  70 77 25 29 2d 31 2c 20  | .(sw%<<pw%)-1, |
000004f0  b3 28 73 68 25 3c 3c 70  68 25 29 2d 31 0d 02 3a  |.(sh%<<ph%)-1..:|
00000500  19 20 f0 20 39 36 2b 31  2c 20 b3 28 34 30 29 2c  |. . 96+1, .(40),|
00000510  20 b3 28 34 30 29 0d 02  44 05 ed 0d 02 4e 10 e6  | .(40)..D....N..|
00000520  20 36 33 20 c8 9c 20 33  3c 3c 36 0d 02 58 06 ef  | 63 .. 3<<6..X..|
00000530  35 0d 02 62 38 f1 8a 28  28 74 77 25 29 3e 3e 31  |5..b8..((tw%)>>1|
00000540  29 2c 20 31 35 29 22 62  79 22 20 8a 28 28 74 77  |), 15)"by" .((tw|
00000550  25 29 3e 3e 31 29 2d 34  2c 20 31 36 29 22 4b 65  |%)>>1)-4, 16)"Ke|
00000560  69 74 68 20 57 6f 6f 64  22 0d 02 6c 2c c8 99 20  |ith Wood"..l,.. |
00000570  22 4f 53 5f 53 70 72 69  74 65 4f 70 22 2c 20 36  |"OS_SpriteOp", 6|
00000580  30 2b 32 35 36 2c 20 73  70 72 74 25 2c 20 30 2c  |0+256, sprt%, 0,|
00000590  20 30 3a 20 87 0d 02 76  2a c8 99 20 22 4f 53 5f  | 0: ...v*.. "OS_|
000005a0  52 65 61 64 56 64 75 56  61 72 69 61 62 6c 65 73  |ReadVduVariables|
000005b0  22 2c 20 76 64 69 6e 2c  20 73 68 61 64 6f 77 0d  |", vdin, shadow.|
000005c0  02 80 1e c8 99 20 22 4f  53 5f 42 79 74 65 22 2c  |..... "OS_Byte",|
000005d0  20 31 31 32 2c 20 31 20  b8 20 2c 62 25 0d 02 8a  | 112, 1 . ,b%...|
000005e0  2a c8 99 20 22 4f 53 5f  52 65 61 64 56 64 75 56  |*.. "OS_ReadVduV|
000005f0  61 72 69 61 62 6c 65 73  22 2c 20 76 64 69 6e 2c  |ariables", vdin,|
00000600  20 73 63 72 65 65 6e 0d  02 94 1f c8 99 20 22 4f  | screen...... "O|
00000610  53 5f 42 79 74 65 22 2c  20 31 31 32 2c 20 62 25  |S_Byte", 112, b%|
00000620  20 b8 20 2c 62 25 0d 02  9e 33 c8 99 20 22 4f 53  | . ,b%...3.. "OS|
00000630  5f 53 70 72 69 74 65 4f  70 22 2c 20 32 34 2b 32  |_SpriteOp", 24+2|
00000640  35 36 2c 20 73 70 72 74  25 2c 20 22 31 22 20 b8  |56, sprt%, "1" .|
00000650  20 2c 2c 20 61 64 64 72  25 0d 02 a8 1a 21 69 6d  | ,, addr%....!im|
00000660  61 67 65 31 3d 61 64 64  72 25 21 33 32 2b 61 64  |age1=addr%!32+ad|
00000670  64 72 25 0d 02 b2 33 c8  99 20 22 4f 53 5f 53 70  |dr%...3.. "OS_Sp|
00000680  72 69 74 65 4f 70 22 2c  20 32 34 2b 32 35 36 2c  |riteOp", 24+256,|
00000690  20 73 70 72 74 25 2c 20  22 32 22 20 b8 20 2c 2c  | sprt%, "2" . ,,|
000006a0  20 61 64 64 72 25 0d 02  bc 1a 21 69 6d 61 67 65  | addr%....!image|
000006b0  32 3d 61 64 64 72 25 21  33 32 2b 61 64 64 72 25  |2=addr%!32+addr%|
000006c0  0d 02 c6 05 e1 0d 02 d0  04 0d 02 da 0f dd f2 6d  |...............m|
000006d0  61 69 6e 5f 63 6f 64 65  0d 02 e4 04 0d 02 ee 09  |ain_code........|
000006e0  50 78 31 3d 30 0d 02 f8  11 50 78 32 3d 31 3a 20  |Px1=0....Px2=1: |
000006f0  20 54 6d 70 3d 31 0d 03  02 09 53 63 72 3d 32 0d  | Tmp=1....Scr=2.|
00000700  03 0c 11 49 6d 31 3d 33  3a 20 20 49 6d 32 3d 34  |...Im1=3:  Im2=4|
00000710  0d 03 16 0a 46 61 64 65  3d 35 0d 03 20 09 43 6e  |....Fade=5.. .Cn|
00000720  74 3d 36 0d 03 2a 13 4d  73 6b 31 3d 37 3a 20 20  |t=6..*.Msk1=7:  |
00000730  4d 73 6b 32 3d 38 0d 03  34 1e 52 65 64 31 3d 39  |Msk2=8..4.Red1=9|
00000740  3a 20 20 47 72 65 31 3d  31 30 3a 20 20 42 6c 75  |:  Gre1=10:  Blu|
00000750  31 3d 31 31 0d 03 3e 1e  52 65 64 32 3d 31 32 3a  |1=11..>.Red2=12:|
00000760  20 47 72 65 32 3d 31 33  3a 20 20 42 6c 75 32 3d  | Gre2=13:  Blu2=|
00000770  31 34 0d 03 48 04 0d 03  52 12 5b 4f 50 54 20 20  |14..H...R.[OPT  |
00000780  20 20 20 70 61 73 73 25  0d 03 5c 05 20 0d 03 66  |   pass%..\. ..f|
00000790  0e 20 2e 66 75 6c 6c 66  61 64 65 0d 03 70 16 20  |. .fullfade..p. |
000007a0  41 44 52 20 20 20 20 20  72 30 2c 20 73 74 61 63  |ADR     r0, stac|
000007b0  6b 0d 03 7a 3f 20 53 54  4d 49 41 20 20 20 72 30  |k..z? STMIA   r0|
000007c0  2c 20 7b 72 31 33 2c 20  72 31 34 7d 20 20 20 20  |, {r13, r14}    |
000007d0  20 20 20 20 20 20 20 20  20 20 20 3b 20 73 61 76  |           ; sav|
000007e0  65 20 69 6d 70 6f 72 74  61 6e 74 20 72 65 67 73  |e important regs|
000007f0  0d 03 84 17 20 41 44 52  20 20 20 20 20 72 30 2c  |.... ADR     r0,|
00000800  20 73 63 72 65 65 6e 0d  03 8e 4a 20 4c 44 4d 49  | screen...J LDMI|
00000810  41 20 20 20 72 30 2c 20  7b 53 63 72 2d 4d 73 6b  |A   r0, {Scr-Msk|
00000820  32 7d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |2}              |
00000830  20 3b 20 6c 6f 61 64 20  72 6f 75 74 69 6e 65 20  | ; load routine |
00000840  69 6e 66 6f 2e 20 65 66  66 69 63 69 65 6e 74 6c  |info. efficientl|
00000850  79 0d 03 98 05 20 0d 03  a2 0e 20 2e 66 61 64 65  |y.... .... .fade|
00000860  6c 6f 6f 70 0d 03 ac 47  20 4c 44 52 20 20 20 20  |loop...G LDR    |
00000870  20 50 78 31 2c 20 5b 49  6d 31 5d 2c 20 23 34 20  | Px1, [Im1], #4 |
00000880  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00000890  67 65 74 20 34 20 70 69  78 65 6c 73 20 66 72 6f  |get 4 pixels fro|
000008a0  6d 20 31 73 74 20 69 6d  61 67 65 0d 03 b6 30 20  |m 1st image...0 |
000008b0  a4 64 65 63 6f 64 65 5f  6d 61 63 72 6f 28 20 50  |.decode_macro( P|
000008c0  78 31 2c 20 52 65 64 31  2c 20 47 72 65 31 2c 20  |x1, Red1, Gre1, |
000008d0  42 6c 75 31 2c 20 50 78  32 20 29 0d 03 c0 47 20  |Blu1, Px2 )...G |
000008e0  4c 44 52 20 20 20 20 20  50 78 32 2c 20 5b 49 6d  |LDR     Px2, [Im|
000008f0  32 5d 2c 20 23 34 20 20  20 20 20 20 20 20 20 20  |2], #4          |
00000900  20 20 20 20 20 3b 20 67  65 74 20 34 20 70 69 78  |     ; get 4 pix|
00000910  65 6c 73 20 66 72 6f 6d  20 32 6e 64 20 69 6d 61  |els from 2nd ima|
00000920  67 65 0d 03 ca 30 20 a4  64 65 63 6f 64 65 5f 6d  |ge...0 .decode_m|
00000930  61 63 72 6f 28 20 50 78  32 2c 20 52 65 64 32 2c  |acro( Px2, Red2,|
00000940  20 47 72 65 32 2c 20 42  6c 75 32 2c 20 50 78 31  | Gre2, Blu2, Px1|
00000950  20 29 0d 03 d4 3a 20 4d  4f 56 20 20 20 20 20 54  | )...: MOV     T|
00000960  6d 70 2c 20 4d 73 6b 31  2c 20 4c 53 4c 20 23 33  |mp, Msk1, LSL #3|
00000970  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 72 6f  |            ; ro|
00000980  75 6e 64 69 6e 67 20 76  61 6c 75 65 0d 03 de 4a  |unding value...J|
00000990  20 4d 4c 41 20 20 20 20  20 52 65 64 31 2c 20 46  | MLA     Red1, F|
000009a0  61 64 65 2c 20 52 65 64  31 2c 20 4d 73 6b 31 20  |ade, Red1, Msk1 |
000009b0  20 20 20 20 20 20 3b 20  63 61 6c 63 2e 20 66 61  |      ; calc. fa|
000009c0  64 65 20 6c 65 76 65 6c  73 20 6f 6e 20 52 2c 20  |de levels on R, |
000009d0  47 2c 20 42 27 73 0d 03  e8 38 20 4d 4c 41 20 20  |G, B's...8 MLA  |
000009e0  20 20 20 47 72 65 31 2c  20 46 61 64 65 2c 20 47  |   Gre1, Fade, G|
000009f0  72 65 31 2c 20 4d 73 6b  31 20 20 20 20 20 20 20  |re1, Msk1       |
00000a00  3b 20 6f 66 20 31 73 74  20 69 6d 61 67 65 0d 03  |; of 1st image..|
00000a10  f2 23 20 4d 4c 41 20 20  20 20 20 42 6c 75 31 2c  |.# MLA     Blu1,|
00000a20  20 46 61 64 65 2c 20 42  6c 75 31 2c 20 4d 73 6b  | Fade, Blu1, Msk|
00000a30  31 0d 03 fc 49 20 52 53  42 20 20 20 20 20 54 6d  |1...I RSB     Tm|
00000a40  70 2c 20 46 61 64 65 2c  20 23 31 36 20 20 20 20  |p, Fade, #16    |
00000a50  20 20 20 20 20 20 20 20  20 20 20 3b 20 69 6e 76  |           ; inv|
00000a60  65 72 74 20 66 61 64 65  20 6c 65 76 65 6c 2c 20  |ert fade level, |
00000a70  70 75 74 20 69 6e 20 54  6d 70 0d 04 06 4a 20 4d  |put in Tmp...J M|
00000a80  4c 41 20 20 20 20 20 52  65 64 31 2c 20 54 6d 70  |LA     Red1, Tmp|
00000a90  2c 20 52 65 64 32 2c 20  52 65 64 31 20 20 20 20  |, Red2, Red1    |
00000aa0  20 20 20 20 3b 20 63 61  6c 63 2e 20 66 61 64 65  |    ; calc. fade|
00000ab0  20 6c 65 76 65 6c 73 20  6f 6e 20 52 2c 20 47 2c  | levels on R, G,|
00000ac0  20 42 27 73 0d 04 10 38  20 4d 4c 41 20 20 20 20  | B's...8 MLA    |
00000ad0  20 47 72 65 31 2c 20 54  6d 70 2c 20 47 72 65 32  | Gre1, Tmp, Gre2|
00000ae0  2c 20 47 72 65 31 20 20  20 20 20 20 20 20 3b 20  |, Gre1        ; |
00000af0  6f 66 20 32 6e 64 20 69  6d 61 67 65 0d 04 1a 47  |of 2nd image...G|
00000b00  20 4d 4c 41 20 20 20 20  20 42 6c 75 31 2c 20 54  | MLA     Blu1, T|
00000b10  6d 70 2c 20 42 6c 75 32  2c 20 42 6c 75 31 20 20  |mp, Blu2, Blu1  |
00000b20  20 20 20 20 20 20 3b 20  61 6e 64 20 61 63 63 75  |      ; and accu|
00000b30  6d 75 6c 61 74 65 20 74  6f 74 61 6c 20 6d 69 78  |mulate total mix|
00000b40  69 6e 67 0d 04 24 4f 20  20 20 20 20 20 20 20 20  |ing..$O         |
00000b50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000b60  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 65  |             ; e|
00000b70  6e 63 6f 64 69 6e 67 20  74 68 65 20 52 2c 20 47  |ncoding the R, G|
00000b80  2c 20 42 20 72 65 73 75  6c 74 73 20 69 6e 20 50  |, B results in P|
00000b90  78 31 0d 04 2e 47 20 80  20 20 20 20 20 50 78 31  |x1...G .     Px1|
00000ba0  2c 20 42 6c 75 31 2c 20  4d 73 6b 31 2c 20 4c 53  |, Blu1, Msk1, LS|
00000bb0  4c 20 23 28 34 2b 33 29  20 20 3b 20 6d 61 73 6b  |L #(4+3)  ; mask|
00000bc0  20 6f 66 66 20 62 6c 75  65 20 62 69 74 20 33 20  | off blue bit 3 |
00000bd0  61 6e 64 20 73 74 6f 72  65 0d 04 38 3d 20 80 20  |and store..8= . |
00000be0  20 20 20 20 54 6d 70 2c  20 42 6c 75 31 2c 20 4d  |    Tmp, Blu1, M|
00000bf0  73 6b 31 2c 20 4c 53 4c  20 23 28 34 2b 32 29 20  |sk1, LSL #(4+2) |
00000c00  20 3b 20 6d 61 73 6b 20  6f 66 66 20 62 6c 75 65  | ; mask off blue|
00000c10  20 62 69 74 20 32 0d 04  42 3b 20 84 52 20 20 20  | bit 2..B; .R   |
00000c20  20 20 50 78 31 2c 20 50  78 31 2c 20 54 6d 70 2c  |  Px1, Px1, Tmp,|
00000c30  20 4c 53 52 20 23 33 20  20 20 20 20 20 20 20 3b  | LSR #3        ;|
00000c40  20 73 74 6f 72 65 20 62  6c 75 65 20 62 69 74 20  | store blue bit |
00000c50  32 0d 04 4c 3c 20 80 20  20 20 20 20 54 6d 70 2c  |2..L< .     Tmp,|
00000c60  20 52 65 64 31 2c 20 4d  73 6b 31 2c 20 4c 53 4c  | Red1, Msk1, LSL|
00000c70  20 23 28 34 2b 32 29 20  20 3b 20 6d 61 73 6b 20  | #(4+2)  ; mask |
00000c80  6f 66 66 20 72 65 64 20  62 69 74 20 32 0d 04 56  |off red bit 2..V|
00000c90  3a 20 84 52 20 20 20 20  20 50 78 31 2c 20 50 78  |: .R     Px1, Px|
00000ca0  31 2c 20 54 6d 70 2c 20  4c 53 52 20 23 34 20 20  |1, Tmp, LSR #4  |
00000cb0  20 20 20 20 20 20 3b 20  73 74 6f 72 65 20 72 65  |      ; store re|
00000cc0  64 20 62 69 74 20 32 0d  04 60 3c 20 80 20 20 20  |d bit 2..`< .   |
00000cd0  20 20 54 6d 70 2c 20 52  65 64 31 2c 20 4d 73 6b  |  Tmp, Red1, Msk|
00000ce0  31 2c 20 4c 53 4c 20 23  28 34 2b 33 29 20 20 3b  |1, LSL #(4+3)  ;|
00000cf0  20 6d 61 73 6b 20 6f 66  66 20 72 65 64 20 62 69  | mask off red bi|
00000d00  74 20 33 0d 04 6a 3a 20  84 52 20 20 20 20 20 50  |t 3..j: .R     P|
00000d10  78 31 2c 20 50 78 31 2c  20 54 6d 70 2c 20 4c 53  |x1, Px1, Tmp, LS|
00000d20  52 20 23 33 20 20 20 20  20 20 20 20 3b 20 73 74  |R #3        ; st|
00000d30  6f 72 65 20 72 65 64 20  62 69 74 20 33 0d 04 74  |ore red bit 3..t|
00000d40  43 20 80 20 20 20 20 20  54 6d 70 2c 20 47 72 65  |C .     Tmp, Gre|
00000d50  31 2c 20 4d 73 6b 32 2c  20 4c 53 4c 20 23 28 34  |1, Msk2, LSL #(4|
00000d60  2b 32 29 20 20 3b 20 6d  61 73 6b 20 6f 66 66 20  |+2)  ; mask off |
00000d70  67 72 65 65 6e 20 62 69  74 73 20 32 20 26 20 33  |green bits 2 & 3|
00000d80  0d 04 7e 41 20 84 52 20  20 20 20 20 50 78 31 2c  |..~A .R     Px1,|
00000d90  20 50 78 31 2c 20 54 6d  70 2c 20 4c 53 52 20 23  | Px1, Tmp, LSR #|
00000da0  31 20 20 20 20 20 20 20  20 3b 20 73 74 6f 72 65  |1        ; store|
00000db0  20 67 72 65 65 6e 20 62  69 74 73 20 32 20 26 20  | green bits 2 & |
00000dc0  33 0d 04 88 38 20 80 20  20 20 20 20 52 65 64 31  |3...8 .     Red1|
00000dd0  2c 20 4d 73 6b 32 2c 20  52 65 64 31 2c 20 4c 53  |, Msk2, Red1, LS|
00000de0  52 20 23 34 20 20 20 20  20 3b 20 6d 61 73 6b 20  |R #4     ; mask |
00000df0  6f 66 66 20 74 69 6e 74  73 0d 04 92 23 20 80 20  |off tints...# . |
00000e00  20 20 20 20 47 72 65 31  2c 20 4d 73 6b 32 2c 20  |    Gre1, Msk2, |
00000e10  47 72 65 31 2c 20 4c 53  52 20 23 34 0d 04 9c 23  |Gre1, LSR #4...#|
00000e20  20 80 20 20 20 20 20 42  6c 75 31 2c 20 4d 73 6b  | .     Blu1, Msk|
00000e30  32 2c 20 42 6c 75 31 2c  20 4c 53 52 20 23 34 0d  |2, Blu1, LSR #4.|
00000e40  04 a6 3e 20 41 44 44 20  20 20 20 20 54 6d 70 2c  |..> ADD     Tmp,|
00000e50  20 52 65 64 31 2c 20 42  6c 75 31 20 20 20 20 20  | Red1, Blu1     |
00000e60  20 20 20 20 20 20 20 20  20 3b 20 62 65 67 69 6e  |         ; begin|
00000e70  20 6d 69 78 69 6e 67 20  74 69 6e 74 73 0d 04 b0  | mixing tints...|
00000e80  53 20 41 44 44 20 20 20  20 20 54 6d 70 2c 20 54  |S ADD     Tmp, T|
00000e90  6d 70 2c 20 47 72 65 31  2c 20 4c 53 4c 20 23 31  |mp, Gre1, LSL #1|
00000ea0  20 20 20 20 20 20 20 3b  20 61 70 70 72 6f 78 2e  |       ; approx.|
00000eb0  20 77 65 69 67 68 74 73  20 62 79 20 73 68 69 66  | weights by shif|
00000ec0  74 69 6e 67 20 28 67 72  65 65 6e 20 78 20 32 29  |ting (green x 2)|
00000ed0  0d 04 ba 4d 20 80 20 20  20 20 20 54 6d 70 2c 20  |...M .     Tmp, |
00000ee0  4d 73 6b 32 2c 20 54 6d  70 2c 20 4c 53 52 20 23  |Msk2, Tmp, LSR #|
00000ef0  32 20 20 20 20 20 20 20  3b 20 6d 61 73 6b 20 6f  |2       ; mask o|
00000f00  66 66 20 61 70 70 72 6f  70 72 69 61 74 65 20 70  |ff appropriate p|
00000f10  61 72 74 20 6f 66 20 72  65 73 75 6c 74 0d 04 c4  |art of result...|
00000f20  51 20 84 52 20 20 20 20  20 50 78 31 2c 20 50 78  |Q .R     Px1, Px|
00000f30  31 2c 20 54 6d 70 20 20  20 20 20 20 20 20 20 20  |1, Tmp          |
00000f40  20 20 20 20 20 20 3b 20  61 6e 64 20 74 68 75 73  |      ; and thus|
00000f50  20 52 2c 20 47 2c 20 42  27 73 20 61 72 65 20 66  | R, G, B's are f|
00000f60  69 6e 61 6c 6c 79 20 65  6e 63 6f 64 65 64 0d 04  |inally encoded..|
00000f70  ce 4a 20 53 54 52 20 20  20 20 20 50 78 31 2c 20  |.J STR     Px1, |
00000f80  5b 53 63 72 5d 2c 20 23  34 20 20 20 20 20 20 20  |[Scr], #4       |
00000f90  20 20 20 20 20 20 20 20  3b 20 73 74 6f 72 65 20  |        ; store |
00000fa0  34 20 66 61 64 65 64 20  70 69 78 65 6c 73 20 74  |4 faded pixels t|
00000fb0  6f 20 73 63 72 65 65 6e  0d 04 d8 3d 20 53 55 42  |o screen...= SUB|
00000fc0  53 20 20 20 20 43 6e 74  2c 20 43 6e 74 2c 20 23  |S    Cnt, Cnt, #|
00000fd0  31 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1               |
00000fe0  20 20 3b 20 64 65 63 72  65 6d 65 6e 74 20 63 6f  |  ; decrement co|
00000ff0  75 6e 74 65 72 0d 04 e2  3f 20 42 47 54 20 20 20  |unter...? BGT   |
00001000  20 20 66 61 64 65 6c 6f  6f 70 20 20 20 20 20 20  |  fadeloop      |
00001010  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001020  20 6c 6f 6f 70 20 69 66  20 63 6f 75 6e 74 65 72  | loop if counter|
00001030  20 3e 20 30 0d 04 ec 16  20 41 44 52 20 20 20 20  | > 0.... ADR    |
00001040  20 72 30 2c 20 73 74 61  63 6b 0d 04 f6 3f 20 4c  | r0, stack...? L|
00001050  44 4d 49 41 20 20 20 72  30 2c 20 7b 72 31 33 2c  |DMIA   r0, {r13,|
00001060  20 72 31 34 7d 20 20 20  20 20 20 20 20 20 20 20  | r14}           |
00001070  20 20 20 20 3b 20 6c 6f  61 64 20 69 6d 70 6f 72  |    ; load impor|
00001080  74 61 6e 74 20 72 65 67  73 0d 05 00 3b 20 4d 4f  |tant regs...; MO|
00001090  56 20 20 20 20 20 50 43  2c 20 72 31 34 20 20 20  |V     PC, r14   |
000010a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010b0  20 20 20 3b 20 61 6e 64  20 65 78 69 74 20 73 61  |   ; and exit sa|
000010c0  66 65 6c 79 0d 05 0a 05  20 0d 05 14 16 20 2e 73  |fely.... .... .s|
000010d0  68 61 64 6f 77 20 20 20  20 45 51 55 44 20 30 0d  |hadow    EQUD 0.|
000010e0  05 1e 16 20 2e 73 63 72  65 65 6e 20 20 20 20 45  |... .screen    E|
000010f0  51 55 44 20 30 0d 05 28  16 20 2e 69 6d 61 67 65  |QUD 0..(. .image|
00001100  31 20 20 20 20 45 51 55  44 20 30 0d 05 32 16 20  |1    EQUD 0..2. |
00001110  2e 69 6d 61 67 65 32 20  20 20 20 45 51 55 44 20  |.image2    EQUD |
00001120  30 0d 05 3c 16 20 2e 66  61 64 65 20 20 20 20 20  |0..<. .fade     |
00001130  20 45 51 55 44 20 30 0d  05 46 16 20 2e 63 6f 75  | EQUD 0..F. .cou|
00001140  6e 74 20 20 20 20 20 45  51 55 44 20 30 0d 05 50  |nt     EQUD 0..P|
00001150  2f 20 2e 6d 61 73 6b 73  20 20 20 20 20 45 51 55  |/ .masks     EQU|
00001160  44 20 26 30 31 30 31 30  31 30 31 3a 20 20 45 51  |D &01010101:  EQ|
00001170  55 44 20 26 30 33 30 33  30 33 30 33 0d 05 5a 27  |UD &03030303..Z'|
00001180  20 2e 73 74 61 63 6b 20  20 20 20 20 45 51 55 44  | .stack     EQUD|
00001190  20 30 3a 20 20 20 20 20  20 20 20 20 20 45 51 55  | 0:          EQU|
000011a0  44 20 30 0d 05 64 28 20  2e 76 64 69 6e 20 20 20  |D 0..d( .vdin   |
000011b0  20 20 20 45 51 55 44 20  31 34 38 3a 20 20 20 20  |   EQUD 148:    |
000011c0  20 20 20 20 45 51 55 44  20 2d 31 0d 05 6e 05 5d  |    EQUD -1..n.]|
000011d0  0d 05 78 05 e1 0d 05 82  04 0d 05 8c 2e dd a4 64  |..x............d|
000011e0  65 63 6f 64 65 5f 6d 61  63 72 6f 28 20 50 69 78  |ecode_macro( Pix|
000011f0  2c 20 52 65 64 2c 20 47  72 65 2c 20 42 6c 75 2c  |, Red, Gre, Blu,|
00001200  20 54 65 6d 70 20 29 0d  05 96 4e 5b 4f 50 54 20  | Temp )...N[OPT |
00001210  20 20 20 20 70 61 73 73  25 20 20 20 20 20 20 20  |    pass%       |
00001220  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001230  20 3b 20 64 65 63 6f 64  69 6e 67 20 50 20 69 6e  | ; decoding P in|
00001240  74 6f 20 52 2c 20 47 2c  20 42 20 63 6f 6d 70 6f  |to R, G, B compo|
00001250  6e 65 6e 74 73 0d 05 a0  3c 20 80 20 20 20 20 20  |nents...< .     |
00001260  42 6c 75 2c 20 50 69 78  2c 20 4d 73 6b 32 20 20  |Blu, Pix, Msk2  |
00001270  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 67  |             ; g|
00001280  65 74 20 74 69 6e 74 20  62 69 74 73 20 69 6e 20  |et tint bits in |
00001290  42 0d 05 aa 3c 20 80 20  20 20 20 20 54 65 6d 70  |B...< .     Temp|
000012a0  2c 20 50 69 78 2c 20 4d  73 6b 31 2c 20 4c 53 4c  |, Pix, Msk1, LSL|
000012b0  20 23 32 20 20 20 20 20  20 3b 20 6d 61 73 6b 20  | #2      ; mask |
000012c0  6f 66 66 20 72 65 64 20  62 69 74 20 32 0d 05 b4  |off red bit 2...|
000012d0  3e 20 84 52 20 20 20 20  20 52 65 64 2c 20 42 6c  |> .R     Red, Bl|
000012e0  75 2c 20 54 65 6d 70 20  20 20 20 20 20 20 20 20  |u, Temp         |
000012f0  20 20 20 20 20 20 3b 20  84 20 77 69 74 68 20 74  |      ; . with t|
00001300  69 6e 74 73 20 66 72 6f  6d 20 42 0d 05 be 3c 20  |ints from B...< |
00001310  80 20 20 20 20 20 54 65  6d 70 2c 20 50 69 78 2c  |.     Temp, Pix,|
00001320  20 4d 73 6b 31 2c 20 4c  53 4c 20 23 34 20 20 20  | Msk1, LSL #4   |
00001330  20 20 20 3b 20 6d 61 73  6b 20 6f 66 66 20 72 65  |   ; mask off re|
00001340  64 20 62 69 74 20 33 0d  05 c8 3c 20 84 52 20 20  |d bit 3...< .R  |
00001350  20 20 20 52 65 64 2c 20  52 65 64 2c 20 54 65 6d  |   Red, Red, Tem|
00001360  70 2c 20 4c 53 52 20 23  31 20 20 20 20 20 20 20  |p, LSR #1       |
00001370  3b 20 72 65 64 20 62 69  74 73 20 63 6f 6d 70 6c  |; red bits compl|
00001380  65 74 65 0d 05 d2 43 20  80 20 20 20 20 20 54 65  |ete...C .     Te|
00001390  6d 70 2c 20 50 69 78 2c  20 4d 73 6b 32 2c 20 4c  |mp, Pix, Msk2, L|
000013a0  53 4c 20 23 35 20 20 20  20 20 20 3b 20 6d 61 73  |SL #5      ; mas|
000013b0  6b 20 6f 66 66 20 67 72  65 65 6e 20 62 69 74 73  |k off green bits|
000013c0  20 32 20 26 20 33 0d 05  dc 3e 20 84 52 20 20 20  | 2 & 3...> .R   |
000013d0  20 20 47 72 65 2c 20 42  6c 75 2c 20 54 65 6d 70  |  Gre, Blu, Temp|
000013e0  2c 20 4c 53 52 20 23 33  20 20 20 20 20 20 20 3b  |, LSR #3       ;|
000013f0  20 67 72 65 65 6e 20 62  69 74 73 20 63 6f 6d 70  | green bits comp|
00001400  6c 65 74 65 0d 05 e6 3d  20 80 20 20 20 20 20 54  |lete...= .     T|
00001410  65 6d 70 2c 20 50 69 78  2c 20 4d 73 6b 31 2c 20  |emp, Pix, Msk1, |
00001420  4c 53 4c 20 23 33 20 20  20 20 20 20 3b 20 6d 61  |LSL #3      ; ma|
00001430  73 6b 20 6f 66 66 20 62  6c 75 65 20 62 69 74 20  |sk off blue bit |
00001440  32 0d 05 f0 37 20 84 52  20 20 20 20 20 42 6c 75  |2...7 .R     Blu|
00001450  2c 20 42 6c 75 2c 20 54  65 6d 70 2c 20 4c 53 52  |, Blu, Temp, LSR|
00001460  20 23 31 20 20 20 20 20  20 20 3b 20 84 20 77 69  | #1       ; . wi|
00001470  74 68 20 74 69 6e 74 73  0d 05 fa 3d 20 80 20 20  |th tints...= .  |
00001480  20 20 20 54 65 6d 70 2c  20 50 69 78 2c 20 4d 73  |   Temp, Pix, Ms|
00001490  6b 31 2c 20 4c 53 4c 20  23 37 20 20 20 20 20 20  |k1, LSL #7      |
000014a0  3b 20 6d 61 73 6b 20 6f  66 66 20 62 6c 75 65 20  |; mask off blue |
000014b0  62 69 74 20 33 0d 06 04  3d 20 84 52 20 20 20 20  |bit 3...= .R    |
000014c0  20 42 6c 75 2c 20 42 6c  75 2c 20 54 65 6d 70 2c  | Blu, Blu, Temp,|
000014d0  20 4c 53 52 20 23 34 20  20 20 20 20 20 20 3b 20  | LSR #4       ; |
000014e0  62 6c 75 65 20 62 69 74  73 20 63 6f 6d 70 6c 65  |blue bits comple|
000014f0  74 65 0d 06 0e 05 5d 0d  06 18 07 3d 22 22 0d ff  |te....]....=""..|
00001500