home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RISC DISC 1
/
RISC_DISC_1.iso
/
_armovie
/
player
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1994-07-25
|
75KB
|
3,693 lines
> Player
/*set ARMovie$Version 0.34 (28th April 1994)
" (";
;")":
Moving Lines Video Replay application
Copyright 1992 Acorn Computers Ltd
P+65535
<65535
code% 65535-
-codesize%=3000:Mex%=0:
code% codesize%-1
"OS_GetEnv"
6I%=code%+512:
?L%>31:?I%=?L%:I%+=1:L%+=1:
:?I%=13
arg%=code%+512
skiptospace:
skipspace
Head(5))="-QUIT"
#arg%+=6:
skiptospace:
skipspace
$arg%="video.film93 -big"
*L%=arg%:
skiptospace:Z%=?arg%:?arg%=13
fil$=$L%:?arg%=Z%:
skipspace
"XOS_ReadVarVal","ARMovie$Suffix",code%,255
code%?I%=13:sf$=$code%
3file%=
(fil$+sf$):
file% fil$+=sf$
file%=
file%=0
lookup1("E00",fil$)
#file%<>"ARMovie"
#file%:
lookup1("E01",fil$)
#file%
#file%
#file%
video=
#file%
video>1
-decomp$="<ARMovie$Dir>.Decomp"+
video+"."
(decomp$+"!RunImage"):
#file%:
"Run "+decomp$+"!RunImage "+fil$+" "+$arg%:
cant(
lookup("R00"))
(decomp$+"Decompress")
A%=0
#file%:
lookup1("E02",
video)
$'decomp$="<ARMovie$Dir>.MovingLine."
&,sector=1023:
fil$,4)="CDFS" sector=2047
access=0
"<ARMovie$Dir>.Access"
*>a$=
#A%:I%=
a$," "):
a$,I%-1)=
fil$,I%-1) access=
a$,I%)
#file%
#file%
#file%:inputbpp=
inputbpp<>16
inputbpp<>8
cant(
lookup("R01"))
uc(f$),"YUV")
f$="yuv"
f$="rgb"
atx%=-1:aty%=-1
"XOS_ReadVarVal","ARMovie$Place",code%,255
8ccode%?I%=13:ip$=$code%:trajec%=
:trajshapes%=0:slow%=
:forcemode%=-42:paintuser%=
:mouseuser%=
ip$<>"" atx%=
ip$:aty%=
ip$," ")+1)
:Tbig%=
:small%=
:loop%=
:clear%=
:quiet%=
:noerror%=
:explode%=
:hour%=
:paused=
;dplayfor%=-1:startat%=0:muted%=
:butmenu%=
:butadj%=
:speed=1:track%=1:shape%=0:shap%=0:interp%=
px=0:py=0:pw=32767:ph=32767
ex=0:ey=0:ew=0:eh=0
cx=0:cy=0:cw=0:ch=0
sx=0:sy=0:sw=0:sh=0
fx=0:fy=0:fw=0:fh=0
hx=0:hy=0:hw=0:hh=0
qx=0:qy=0:qw=0:qh=0
lx=0:ly=0:lw=0:lh=0
mx=0:my=0:mw=0:mh=0
B%=code%+256
scanargs
GRarg%=code%+512:
"XOS_ReadVarVal","ARMovie$ExtraArgs",arg%,codesize%-512
H:arg%?I%=13:
scanargs:
"Set ARMovie$ExtraArgs """""
hour%
"Hourglass_On"
playfor%>0
playfor%+=startat%
playfor%=0 quiet%=
noerror%
"Hourglass_Smash":
#file%:
"Set ARMovie$ReturnCode "+
"Hourglass_Smash":
#file%:
$ " (";
;")":
shape% shapex%=shapex%>>2:shapey%=shapey%>>2:testy%=shapey%
shapex%=sx%:shapey%=sy%:testy%=shapey%*.8
"XOS_ReadVarVal","ARMovie$ColourMethod",code%,255
S9code%?I%=13:
$code%>0 colcheck%=
$code%
colcheck%=9
big%
"XOS_ReadVarVal","ARMovie$PrefBigMode",code%,255
,,I%:code%?I%=13:$code%=
uc($code%)
$code%=0 $code%="13;49;28"
"XOS_ReadVarVal","ARMovie$PrefMode",code%,255
YHcode%?I%=13:$code%=
uc($code%):
$code%>0 forcemode%=
modeblk(code%)
video
\*defeatscrnblank%=
&63100,4
,A%;I%
1)=0
A%<>0 defeatscrnblank%=
explode% big%=
big%
I%=code%
seppos%=0
d0seppos%=
$I%,";"):
seppos% I%?(seppos%-1)=13
$I%>0 forcemode%=
modeblk(I%):I%+=seppos%
&20035,forcemode%,4
,,nx:
&20035,forcemode%,5
,,ny:
&20035,forcemode%,3
,,ncol
&20035,forcemode%,11
,,x%:x%+=1:
&20035,forcemode%,12
,,y%:y%+=1:okbig%=
ncol<256
&20035,forcemode%,colcheck%
,,A%:
A%>3 ncol=(1<<(1<<A%))-1
iKmagx%=2:magy%=2:
nx=ny
ncol>=63
ncol=-1 okbig%=
nx=0 magx%=1:magy%=1
nx=2
ny=1
ncol>=63
ncol=-1 okbig%=
:magx%=2:magy%=4
nx=1
ny=0
ncol>=63
ncol=-1 okbig%=
:magx%=1:magy%=2
okbig%
shapex%*magx%<=x%
testy%*magy%<y%
seppos%=0
butmenu%=
forcemode%:
explode%=
forcemode%<>-42
<>forcemode%
forcemode%:
:butmenu%=
=&1000000
-32768
w<origfps=
#file%:fps=origfps*speed:pixpersec=fps*sx%*sy%
x&snd$=
#file%,track%):snd%=
quiet% snd%=
sndrep=
#file%,track%)
lin$=
#file%,track%)
|0reversed%=
uc(lin$),"REVER") reversed%=
channels%=
lin$=
#file%,track%)
sndbits%=
snd%=1
snd%=2
sndmul%=8
snd%=1
sndbits%=16
uc(lin$),"LIN")
uc(lin$),"UNSIGN") lin$="U"
lin$="S"
sndbits%=16 sndmul%=16
sndbits%=4
uc(lin$),"ADPCM")
lin$="A":sndmul%=16
lin$="E"
lin$+=
sndbits%
lin$="Sound"+lin$
lin$=
snd$,3)
lin$=
lin$,
lin$," ")-1)
<f2info%=
("<ARMovie$SoundDir>."+lin$+".Info"):
f2info%
snd$=
#f2info%
snd$=
#f2info%
snd$=
#f2info%
sndmul%=
#f2info%
#f2info%
lin$+=".Play"
channels%>1 lin$+="x"+
channels%
explode%
"OS_File",17,"<ARMovie$SoundDir>."+lin$
r0%,,,,r4%
r0%<>1
"Hourglass_Smash":
lookup1("E03",lin$)
sndcode% r4%-1,mute% 63
"OS_File",16,"<ARMovie$SoundDir>."+lin$,sndcode%
,!mute%=0:sfr=sndrep:
sfr<256 sfr=1E6/sfr
sfr=sfr*speed
mute%!8=
"mute%!12=(1<<24)*(sfr-mute%!8)
mute%?16=0
mute%?17=reversed%
I%=18
63:mute%?I%=0:
=sndplay%=sndcode%:sndstop%=sndplay%+4:snddata%=sndstop%+4
3sndcounter%=snddata%+4:sndbuffer%=sndcounter%+4
1A%=1:B%=mute%:sndtime%=
sndplay%:sndtime%=
noerror%
"Hourglass_Smash":
#file%:
sndstop%:
"Set ARMovie$ReturnCode "+
"Hourglass_Smash":
#file%:
sndstop%:
" (";
;")":
video
playfor%<>0
10000:
T%>25 slow%=
&35,-1,4
,,nx:
&35,-1,5
,,ny:
&35,-1,3
,,ncol
ncol<256
&35,-1,colcheck%
,,A%:
A%>3 ncol=(1<<(1<<A%))-1
szmul%=2:pixshift=2
big%
magx%=2:
nx=2 magx%=1
magy%=2:
ny=0 magy%=4
ny=2 magy%=1
small%
magx%=2
magy%=2 magx%=1:magy%=1
magx%=2
magy%=4 magx%=1:magy%=2
explode%
shift=-1:p%=-1:bpp%=1:ncol=1
video>0
"XOS_ReadVarVal","ARMovie$Interpolate",code%,255
,,I%:code%?I%=13
$code%=1 $code%="1024000,2048000":
ncol=63
ncol=255 $code%="256000,512000"
$code%=0 $code%="128000,512000"
$code%>=pixpersec
interp%=2
$code%,","):
$(code%+I%)>=pixpersec interp%=1
)tblsize=32768:
inputbpp=8 tblsize=256
shape% interp%=
ncol
magx%=2
shift=0:
p% tblsize-1
a%(5),r%(31)
"ColourTrans_ReturnGCOL",&FFFFFF00
w:b=w
magx%<>magy%
dither2(0,b,w,1)
a%(2)=w
w<<1
a%(3)=a%(2):num%=3
dither4(0,b,w,1)
a%(4)=w
w<<1
w<<2
w<<3
a%(5)=a%(4):num%=5
maketable(1)
!bpp%=magx%:pixshift=5:round=8
/shift=0:
p% tblsize-1,a%(13),r%(31):num%=0
"ColourTrans_ReturnGCOL",&FFFFFF00
"ColourTrans_ReturnGCOL",&aaaaaa00
"ColourTrans_ReturnGCOL",&55555500
"ColourTrans_ReturnGCOL",&00000000
magx%=magy%
magx%=1
8a%(0)=b:a%(1)=dg:a%(2)=lg:a%(3)=w:a%(4)=a%(3):num%=4
dither4(0,b,dg,2)
dither4(4,dg,lg,2)
dither4(8,lg,w,2)
!a%(12)=w
w<<2
w<<4
w<<6
a%(13)=a%(12):num%=13
dither2(0,b,dg,2)
dither2(2,dg,lg,2)
dither2(4,lg,w,2)
a%(6)=w
w<<2
a%(7)=a%(6):num%=7:magx%=2
maketable(1)
$pixshift=4:round=16:bpp%=2*magx%
gs%(15):numgs%=0
15:R%=Z%*17:
"ColourTrans_ReturnGCOL",R%<<24
R%<<16
R%<<8
"OS_ReadPalette",R%,16
,,G%
(G%>>>28)=((G%>>20)
(G%>>>28)=((G%>>12)
numgs%>0
R%<>gs%(numgs%-1) gs%(numgs%)=R%:numgs%+=1
gs%(0)=R%:numgs%+=1
numgs%<2
"ColourTrans_ReturnGCOL"
gs%(0)
"ColourTrans_ReturnGCOL",&FFFFFF00
gs%(1)
numgs%=2
magx%=magy%
p% tblsize*2-1:
"XOS_ReadVarVal","ARMovie$4Colour",0,-1
inputbpp=16
"OS_ReadPalette",R%,16
,,G%:p%!(R%*3)=G%>>>8:
"<ARMovie$Dir>.MovingLine.4ColPal"
"Load <ARMovie$Dir>.MovingLine.4ColPal "+
~(p%+256)
#I%:I%=J%
Z%=p%+256:Y%=0
Y%+=1:F%=
p%!J%<>Z%!J% F%=
"Load <ARMovie$Dir>.MovingLine.4"+f$+"11c"+
Y%,2)+" "+
Z%+=48
Y%*48=I%
F% I%=0
I%=0
a%(61),r%(31)
numgs%-2
dither4(Z%*4,gs%(Z%),gs%(Z%+1),4)
)'num%=(numgs%-1)*4+1:w=gs%(numgs%-1)
*Ha%(num%-1)=w
w<<4
w<<8
w<<12:a%(num%)=a%(num%-1):
maketable(2)
shift=1
shift=0:
p% tblsize-1
a%(31),r%(31)
numgs%-2
dither2(Z%*2,gs%(Z%),gs%(Z%+1),4)
3'num%=(numgs%-1)*2+1:w=gs%(numgs%-1)
4Aa%(num%-1)=w
w<<4:a%(num%)=a%(num%-1):
maketable(1):magx%=2
6#bpp%=4*magx%:pixshift=3:round=8
magx%=magy%
magx%=2
magy%=4
magx%=2
shift=2:
p% tblsize*4-1
inputbpp=16
"Load <ARMovie$Dir>.MovingLine.8"+f$+"11 "+
gs%(15):numgs%=16
15:R%=Z%*17:
"ColourTrans_ReturnColourNumber",R%<<24
R%<<16
R%<<8
gs%(Z%):
a%(61)
numgs%-2
dither4(Z%*4,gs%(Z%),gs%(Z%+1),8)
D'num%=(numgs%-1)*4+1:w=gs%(numgs%-1)
EIa%(num%-1)=w
w<<8
w<<16
w<<24:a%(num%)=a%(num%-1):
maketable(4)
G+bpp%=16:
interp%<>2
f$<>"yuv" interp%=
magy%=4 interp%=
J$shift=0:interp%=0:
p% tblsize-1
inputbpp=16
"Load <ARMovie$Dir>.MovingLine.8"+f$+"22 "+
a%(15):num%=15
15:R%=Z%*17:
"ColourTrans_ReturnColourNumber",R%<<24
R%<<16
R%<<8
a%(Z%):
maketable(1)
T&shift=2:interp%=0:
p% tblsize*4-1
inputbpp=16
"Load <ARMovie$Dir>.MovingLine.8"+f$+"11 "+
magx%=1
magx%=2
magy%=1
zerohalftable:szmul%=1
gs%(15):numgs%=16
15:R%=Z%*17:
"ColourTrans_ReturnColourNumber",R%<<24
R%<<16
R%<<8
gs%(Z%):
a%(31)
numgs%-2
dither2(Z%*2,gs%(Z%),gs%(Z%+1),8)
_'num%=(numgs%-1)*2+1:w=gs%(numgs%-1)
`9a%(num%-1)=w
w<<8:a%(num%)=a%(num%-1):
maketable(4)
:bpp%=8*magx%:round=4
d/doneload%=
magx%=magy%
magx%=2
magy%=4
magx%=2
shift=2:
p% tblsize*4-1
inputbpp=16
checkandload
inputbpp=8
doneload%=
gs%(15):numgs%=16
15:R%=Z%*17:
"ColourTrans_ReturnColourNumber",R%<<24
R%<<16
R%<<8
gs%(Z%):
a%(61),r%(31)
numgs%-2
dither4(Z%*4,gs%(Z%),gs%(Z%+1),8)
o'num%=(numgs%-1)*4+1:w=gs%(numgs%-1)
pIa%(num%-1)=w
w<<8
w<<16
w<<24:a%(num%)=a%(num%-1):
maketable(4)
interp%=2
f$="yuv"
interp%=
magy%=4 interp%=
u$shift=0:interp%=0:
p% tblsize-1
inputbpp=16
"Load <ARMovie$Dir>.MovingLine.8"+f$+"22 "+
a%(15),r%(31):num%=15
15:R%=Z%*17:
"ColourTrans_ReturnColourNumber",R%<<24
R%<<16
R%<<8
a%(Z%):
maketable(1)
&shift=2:interp%=0:
p% tblsize*4-1
inputbpp=16
checkandload
doneload%
magx%=1
zerohalftable:szmul%=1
inputbpp=8
doneload%=
gs%(15):numgs%=16
15:R%=Z%*17:
"ColourTrans_ReturnColourNumber",R%<<24
R%<<16
R%<<8
gs%(Z%):
a%(31),r%(31)
numgs%-2
dither2(Z%*2,gs%(Z%),gs%(Z%+1),8)
'num%=(numgs%-1)*2+1:w=gs%(numgs%-1)
9a%(num%-1)=w
w<<8:a%(num%)=a%(num%-1):
maketable(4)
:ncol=63:bpp%=8*magx%:round=4
65535
1round=2:bpp%=16*magx%:shift=-2:
magx%=magy%
magx%=1 shift=-1:szmul%=1:interp%=0
magx%=1 interp%=0
magy%=1
interp%=2 interp%=1
pixshift=1
inputbpp=16
p%=-1:
f$="yuv"
p% tblsize*4-1:
"Load <ARMovie$Dir>.MovingLine.16yuv "+
shift=-1
zerohalftable
shift=2
interp%
p% tblsize*4-1
NP%=code%:[OPT0:STR r1,[r0,r1,LSL #2]:SUBS r1,r1,#1:BPL code%:MOVS pc,r14:]
A%=p%:B%=32767:
code%
shift=2
gs%(31):
31:gs%(I%)=I%
I%<<5
I%<<10:
p% tblsize*4-1:
shift=-1
255:p%!(Y%<<2)=gs%(Y%/255*31+.5):
a%(63):numgs%=32
numgs%-2
dither2(Z%*2,gs%(Z%),gs%(Z%+1),16)
'num%=(numgs%-1)*2+1:w=gs%(numgs%-1)
:a%(num%-1)=w
w<<16:a%(num%)=a%(num%-1):
maketable(4)
shift=2
interp%
PP%=code%:[OPT0:LDR r2,[r0,r1,LSL #2]:BIC r2,r2,#&ff0000:BIC r2,r2,#&ff000000
r3,r2,#31<<5:BIC r2,r2,#31<<5:
R r2,r2,r3,LSL #16
?STR r2,[r0,r1,LSL #2]:SUBS r1,r1,#1:BPL code%:MOVS pc,r14:]
A%=p%:B%=tblsize-1:
code%
0round=0:bpp%=32*magx%:shift=2:
magx%=magy%
magx%=1 interp%=0
magx%=1 interp%=0
magy%=1
interp%=2 interp%=1
pixshift=0
inputbpp=16
p% tblsize*4-1:
f$="yuv"
"Load <ARMovie$Dir>.MovingLine.32yuv "+
BP%=code%:[OPT0:
r2,r1,#31:MOV r2,r2,LSL #3:
R r2,r2,r2,LSR #5
r3,r1,#31<<5:MOV r3,r3,LSR #2:
R r3,r3,r3,LSR #5:
R r2,r2,r3,LSL #8
r3,r1,#31<<10:MOV r3,r3,LSR #7:
R r3,r3,r3,LSR #5:
R r2,r2,r3,LSL #16
?STR r2,[r0,r1,LSL #2]:SUBS r1,r1,#1:BPL code%:MOVS pc,r14:]
A%=p%:B%=32767:
code%
p% tblsize*4-1
255:p%!(Y%<<2)=Y%
Y%<<8
Y%<<16:
interp%
HP%=code%:[OPT0:LDR r2,[r0,r1,LSL #2]:BIC r2,r2,#256:BIC r2,r2,#65536
?STR r2,[r0,r1,LSL #2]:SUBS r1,r1,#1:BPL code%:MOVS pc,r14:]
A%=p%:B%=32767:
code%
ncol,magx%,magy%
bpp%=1:shift=1:p%=-1
shape% szmul%=2
%decompr$="Decompress":
szmul%=1
(decomp$+"DecompresH"):
A%=0 szmul%=2
#A%:decompr$="DecompresH"
video
atx%<>-1 atx%+=round
#file%
maxfile=
#file%
evenmax=
#file%
oddmax=
#file%
#file%
#file%
#file%
#file%
#file%=CC
cat% (maxfile+2)*12
Z%=cat%
cat%+maxfile*12
#file%
!Z%!4=
a$:!Z%=
a$,",")+1)
Z%!8=
a$,";")+1)
track%>1
track%
track%>I%-1 !Z%+=Z%!8:Z%!8=
a$,"|"+
I%)+1+
(!Z%=0:Z%!4=Z%!-8+Z%!-12+Z%!-4:Z%!8=0
&sz%=sx%*sy%*szmul%:ipsz%=sx%*sy%*2
video
interp%=2 sz%+=sx%*szmul%
Gfchunk%=startat%
(fpf/origfps*100):
fchunk%>maxfile fchunk%=maxfile
C%=fchunk%:
loop% C%=0
bigevenmax=0:bigoddmax=0
Z%=cat%+C%*12
cat%+maxfile*12
:Q%=Z%!16-Z%!4+Z%!20+Z%!12:
Q%>bigevenmax bigevenmax=Q%
C%+2<=maxfile
Z%=cat%+C%*12+24
cat%+maxfile*12
8Q%=Z%!16-Z%!4+Z%!20+Z%!12:
Q%>bigoddmax bigoddmax=Q%
)bigevenmax=bigevenmax+sector
sector
'bigoddmax=bigoddmax+sector
sector
!oddmax=oddmax+sector
sector
#evenmax=evenmax+sector
sector
evenmax,oddmax
bigevenmax<evenmax bigevenmax=evenmax
bigoddmax<oddmax bigoddmax=oddmax
loop%<>0
maxfile>0
oddmax<evenmax oddmax=evenmax
evenmax=oddmax
loop%<>0
maxfile>1
bigoddmax<bigevenmax bigoddmax=bigevenmax
bigevenmax=bigoddmax
snd%=1
snd%=2
explode%
sndbuffer% -1,snddata% -1
sndrep<256
FZ%=(fpf/origfps*(1E6/sndrep)*channels%*1.01*sndmul%+7)
8+12+4+3
@Z%=(fpf/origfps*sndrep*channels%*1.01*sndmul%+7)
8+12+4+3
A% Z%-1,B% Z%-1
A%!4=1:B%!4=1
"!sndbuffer%=A%:sndbuffer%!4=B%
(decomp$+decompr$):
A%=0
lookup("E04")
decompblk
#A%+15
decompblk=decompblk+15
12,3,A%,decompblk,
!-twobuf%=
+bigoddmax+bigevenmax+16384
-B%)/(sz%*2+16)
C%<4
explode%
evenmax+oddmax>2000000
playfor%=0
access>0
explode%
oddmax>evenmax evenmax=oddmax
oddmax=0
('twobuf%=
+oddmax+evenmax+16384
-B%)/(sz%*2+16)
video
C%<3
lookup("E05")
+'bigevenmax=evenmax:bigoddmax=oddmax
C%>=fpf C%=fpf-1
bf=C%:
video=0 sz%=0:bf=0
"Set ARMovie$Buffs "+
twobuf%+" "+
bf+" "+
(bigevenmax+bigoddmax)+" "+
access+" "+
interp%
bb% sz%*bf*2+bf*16+15
bigoddmax
op0% bigevenmax+15,op1% bigoddmax+15
op0% bigevenmax+15:op1%=op0%
2%op0%=op0%+15
15:op1%=op1%+15
3'!bb%=148:bb%!4=6:bb%!8=12:bb%!12=-1
"OS_ReadVduVariables",bb%,op0%
5'screenstart%=!op0%:rowbytes%=op0%!4
screenrows=op0%!8+1
7*plx%=(rowbytes%-shapex%*bpp%/8)
8%ply%=(screenrows-shapey%*magy%)
big%=-1
big%=-2 atx%=-1:aty%=-1
atx%<>-1
aty%<>-1
;-plx%=(atx%>>nx)*4>>pixshift:ply%=aty%>>ny
plx%+shapex%*bpp%/8>rowbytes% plx%=rowbytes%-shapex%*bpp%/8
ply%+shapey%*magy%>screenrows ply%=screenrows-shapey%*magy%
atx%=(plx%<<nx+pixshift)
aty%=ply%<<ny
ply%<0 ply%=0
plx%<0 plx%=0
D;C%=(screenrows-ply%-shapey%*magy%)*rowbytes%:
C%<0 C%=0
dd%=screenstart%+plx%+C%
trajec%
I%=traj%
traj%+8*trajsteps%-1
HGplx%=(((!I%<<16)>>16)+atx%>>nx)*4>>pixshift:ply%=(!I%>>16)+aty%>>ny
plx%+shapex%*bpp%/8>rowbytes% plx%=rowbytes%-shapex%*bpp%/8
ply%+shapey%*magy%>screenrows ply%=screenrows-shapey%*magy%
ply%<0 ply%=0
plx%<0 plx%=0
MC!I%=screenstart%+plx%+(screenrows-ply%-shapey%*magy%)*rowbytes%
dd%=!traj%
shape%
J%=1:
magx%=1 J%=2
K%=1:
magy%=1 K%=2
magy%=4 K%=0
2:P%=code%
[OPTZ%
.flatten LDR r0,[r9]
LDR r0,[r0]
LDR r1,[r0,#8]
MOV r1,r1,LSR #2
SUB r1,r1,#1
magy%
[OPT Z%
MOV r1,r1,LSL #1
[OPT Z%
MOV r1,r1,LSL #2
[OPT Z%
ADD r0,r0,#12
MOV r2,#&ff
R r2,r2,#&ff00
MOV r3,r0
MOV r12,#0
addmacro(12,12,rowbytes%)
MOV r11,#sx%
LDMIA r0!,{r4}
.flatouter
MOV r5,r4,LSR #24
SUB r5,r5,#1
BIC r4,r4,#&ff000000
r6,r4,r2,LSR #4
MOV r6,r6,LSR #J%
MOV r6,r6,LSL #2
pixshift
[OPT Z%
MOV r6,r6,LSR #pixshift
[OPT Z%
SUB r7,r1,r4,LSR #K%+12
MLA r4,r7,r12,r6
R r4,r4,r5,LSL #24
STMIA r3!,{r4}
.flatinner
LDMIA r0!,{r4}
r7,r4,r2
CMP r7,#sx%
MOV r8,r4,LSR #16
CMPCC r8,#sy%
MLA r7,r8,r11,r7
MVNCS r7,#0
CMN r4,#2
MVNEQ r7,#1
MOV r7,r7,LSL #2
STMIA r3!,{r7}
SUBS r5,r5,#1
BPL flatinner
LDMIA r0!,{r4}
CMN r4,#1
BNE flatouter
STMIA r3!,{r4}
MOVS pc,r14
trajshapes%
4*trajshapes%-1
4:J%=trajshap%!I%:
flatten,J%:
shap%=!trajshap%
flatten,shap%
maxfile=0 op1%=op0%
bb%=bb%+15
incore%=
loop%
maxfile=0 incore%=
maxfile=1
twobuf% incore%=
(decomp$+"Info")
#sourceisquick%=
:fsz%=sx%*sy%*2
A$ fsz%=sx%*sy%*
uc(A$),"TEMP")=0 sourceisquick%=
interp%<>0
ncol=63
&patchtab=decompblk+!decompblk:Z%=0
!patchtab<>-1
#P%=decompblk+(!patchtab
&FFFF)
plook(!patchtab>>24
15,!patchtab>>20
15,!patchtab>>16
patchtab+=4
A%=sx%:B%=sy%:
decompblk+4
decl=decompblk+8
ass:osf%=8
+40960
video A%=bb%:B%=bb%+bf*sz%*2+bf*16:
fchunk%<>0
video<>0
KF+(fchunk%-1)*ipsz%<
#file%
12,3,file%,op0%,ipsz%,KF+(fchunk%-1)*ipsz%:Z%=0
[OPT0
.keyer
LDR r0,decfrom:ADD r0,r0,#16
LDR r1,adb1
LDR r5,adrp
LDR r4,adnumpix
MOV r6,#&ff
R r6,r6,#&ff00
.keyerlp
LDR r3,[r1],#4
r2,r3,r6
MOV r3,r3,LSR #16
interp%<>0
ncol=63
[OPT0
plook(2,2,5)
plook(3,3,5)
szmul%=1
[OPT 0
R r2,r2,r3,LSL #16
STR r2,[r0],#4
[OPT 0
STMIA r0!,{r2,r3}
[OPT 0
SUBS r4,r4,#4
BNE keyerlp
MOVS pc,r14
keyer
startat%<>0
video
>!inviscount=(startat%-fchunk%*100*fpf/origfps)*origfps/100
playfor%<>0 !mute=32+2
muted%=
catstart%=fchunk%*12+cat%
twobuf%
fchunk%<>maxfile
12,3,file%,op0%,catstart%!12+catstart%!20+(catstart%!16-catstart%!4),catstart%!4
(adb1!4=catstart%!16-catstart%!4+op0%
12,3,file%,op0%,!catstart%+catstart%!8,catstart%!4
12,3,file%,op0%,!catstart%+catstart%!8,catstart%!4
Nef%=(maxfile+1)*fpf:
sourceisquick% ef%=maxfile*fpf+cat%!(maxfile*12)
playfor%>0 ef%=playfor%*origfps
playfor%=0 ef%=startat%*origfps
100+1
explode%
ZNUM(A)=
(A),2)
[opt 0
.compress
LDR r0,decfrom
MOV r1,#0
STR r1,[r0],#16
LDR r1,[r9]
LDR r1,[r1]
LDR r4,adnumpix
.complp
LDMIA r0!,{r2,r3}
R r2,r2,r3,LSL #16
STR r2,[r1],#4
SUBS r4,r4,#4
BNE complp
MOVS pc,r14
expdir$<>""
expdir$,1)<>"." expdir$+="."
#file%=0:S%=
(expdir$+"1Header")
#file%:
!inviscount>0
!inviscount:
dec%:
:ef%-=!inviscount
snd%
sndbits%=8
(expdir$+"Sound"):
sndrep<256
#S%,sndrep
#S%,1E6/sndrep
(expdir$+"Samples")
12,2,S%,op0%+!catstart%,catstart%!8
"Hourglass_Smash":
#file%:
frame%=0
ef%-1
hour%
"Hourglass_Percentage",frame%*100/ef%
adb1!8
Fcatstart%+=12:
12,3,file%,op0%,!catstart%+catstart%!8,catstart%!4
snd%
12,2,S%,op0%+!catstart%,catstart%!8
adb1!8=0:adb2!8=1:!adbu=adb1
frame%
75=0
"Cdir "+expdir$+
ZNUM(frame%
"Cdir "+expdir$+
ZNUM(frame%
77)+"."+
ZNUM(frame%
X%=!decto+16:
f$="yuv"
&*a$="P13 5 Y 5 U 5 V"+
sx%+" "+
3)," ")
a$+=" "+
a$="P15"+
sx%+" "+
3)," ")
10+"31"+
$X%=a$:X%+=
compress,X%
8,10,expdir$+
ZNUM(frame%
77)+"."+
ZNUM(frame%
77)+"."+
ZNUM(frame%
75),&FFD,,!decto+16,X%+ipsz%
snd%
sndbits%=8
"Settype "+expdir$+"Sound D3C"
hour%
"Hourglass_Off"
#file%
video
playfor%=0
!inviscount:
dec%:
!dbu=!decfrom
!tobuf=adb2
C%=bf:
C%>fpf C%=fpf
C%>fps C%=fps
?!T%=
dec%:
T%/100<C%/fps !skiploc=-1:skiploc!4=-1:skiploc!8=-1
CB!fpstime=100000/fps:
trajec% !trajtime=100000/(trajrate*speed)
!timetodisp=!fpstime
E%!ef=ef%:!entend=cat%+maxfile*12+1
snd%=1
snd%=2
-sndtime%>99
sndstop%:
4:mute!I%=mute%!I%:
:!sndpause=
mute?16=4:
slow% mute?16=2
J/A%=op0%+!catstart%:B%=catstart%!8:
snddata%
twobuf% A%=adb1!4+catstart%!12:B%=catstart%!20:
snddata%
hour%
"Hourglass_Off"
"OS_Claim",16,play,scs
*fx 14,2
*fx 14,4
*fx 14,10
Stop(
" (";
;")":
!rn%=fchunk%*fpf
paused !mute=!mute
muted% !mute=!mute
startat%
video
playfor% !mute=!mute
32+2
tickinit
snd%=1
snd%=2
A%=2:B%=mute:
sndplay%
maxfile>fchunk%+
twobuf% !ent=catstart%+12+12*
twobuf%:
readf%
loop%
loop%-=1
loop%
loop%-=1
!ent=cat%:
readf%
?mute=?mute
?mute
?mute
Stop("")
Stop(a$)
*fx 13,2
*fx 13,4
*fx 13,10
*fx 21
*fx 21,9
"OS_Release",16,play,scs
"OS_ReleaseDeviceVector",6,tick,100
#file%
snd%=1
snd%=2
t$!sndcopy=0:sndcopy!8=0:
sndstop%
"Set ARMovie$Sound "+
(((!mute
2)>>1)
video
x7x1%=(((plx%
mask%)<<pixshift)
4)<<nx:y1%=ply%<<ny
y;x2%=x1%+(shapex%*magx%<<nx):y2%=y1%+(shapey%*magy%<<ny)
"Set ARMovie$Return "+
x1%+" "+
y1%+" "+
x2%+" "+
Capture
"Unset ARMovie$Return"
!mute
16 clear%=0
clear%
video>0
"XWimp_Initialise",200,&4b534154,"Tidying..."
"XWimp_ForceRedraw",-1,x1%,y1%,x2%,y2%
"XWimp_CloseDown",r0,!bb%
"Set ARMovie$Time "+
(!rn%/origfps*100)
"Set ARMovie$Pause "+
(!mute
a$<>""
"Set ARMovie$ReturnCode "+a$
"Unset ARMovie$ReturnCode"
checkandload
"ColourTrans_ReadPalette",-1,-1,p%,256*4
255*4
4:p%!I%=(p%!I%>>>8)
&F8F8F8:
"Load <ARMovie$Dir>.MovingLine.8DefCol "+
~(p%+&400)
4J%=p%+&400:F%=
255*4
p%!I%<>J%!I% F%=
"Load <ARMovie$Dir>.MovingLine.8"+f$+"11 "+
~p%:doneload%=
"<ARMovie$Dir>.MovingLine.8ColPal"
"Load <ARMovie$Dir>.MovingLine.8ColPal "+
~(p%+&400)
J%=p%+&400
p%+&400+R%-1
255*4
p%!I%<>J%!I% F%=
"Load <ARMovie$Dir>.MovingLine.8"+f$+"11c"+
((J%-p%)
&400),2)+" "+
~p%:doneload%=
zerohalftable
UP%=code%:[OPT0:LDR R2,[R0]:BIC r2,r2,#&ff0000:BIC r2,r2,#&ff000000:STR r2,[r0],#4
)SUBS r1,r1,#1:BNE code%:MOVS pc,r14:]
A%=p%:B%=32768:
code%
modeblk(S%)
$S%,"X")
!B%=1:B%!4=
$(S%+
$S%,"X"))
B%!8=
$(S%+
$S%,"Y"))
B%!12=4:
$S%,"C2") B%!12=0
$S%,"C4") B%!12=1
$S%,"C16") B%!12=2
$S%,"C256") B%!12=3
$S%,"C32T")
$S%,"C32K") B%!12=4
$S%,"C16M") B%!12=5
.B%!16=-1:
$S%,"F") B%!16=
$(S%+
$S%,"F"))
=I%=20:
$S%,"EX") B%!20=4:B%!24=
$(S%+
$S%,"EX")+1):I%=28
$S%,"EY") B%!I%=5:B%!(I%+4)=
$(S%+
$S%,"EY")+1):I%+=8
B%!I%=-1
loadshape(A$,
shap%)
shape%=
shape%=0
A$,1)="""" shape%=
("""<ARMovie$Dir>.Shapes."+
A$,2))
shape%=
("<ARMovie$Dir>.Shapes."+A$)
shape%
#shape%)="ARMOVIE SHAPE 1"
#shape%
:lin$=
#shape%:shapex%=
lin$:shapey%=
lin$,
lin$," "))
Eshapeno%=
#shape%-
#shape%:
+shapeno%+16384>
+shapeno%+16384
shap% shapeno%+3+3*4
12,4,shape%,shap%+12,shapeno%
#shape%
shap%!(shapeno%+12)=-1
3!shap%=shapeno%:shap%!4=shapex%:shap%!8=shapey%
#shape%:shape%=0
scanargs
?arg%<>13
?arg%=
?arg%=
readbutton(px,py,pw,ph)
?arg%=
?arg%=
readbutton(ex,ey,ew,eh)
?arg%=
?arg%=
readbutton(cx,cy,cw,ch)
?arg%=
?arg%=
readbutton(sx,sy,sw,sh)
?arg%=
?arg%=
readbutton(fx,fy,fw,fh)
?arg%=
?arg%=
readbutton(hx,hy,hw,hh)
?arg%=
?arg%=
readbutton(qx,qy,qw,qh)
?arg%=
?arg%=
readbutton(lx,ly,lw,lh)
?arg%=
?arg%=
readbutton(mx,my,mw,mh)
Head(9))="-NOADJUST":butadj%=
:arg%+=9:
skipspace
Head(8))="-EXPLODE":explode%=
:arg%+=8:
skipspace:L%=arg%:
skiptospace
5Z%=?arg%:?arg%=13:expdir$=$L%:?arg%=Z%:
skipspace
Head(8))="-NOERROR":noerror%=
:arg%+=8:
skipspace
Head(8))="-PLAYFOR":arg%+=8:
skipspace:playfor%=
Head(20):
skippast
Head(8))="-STARTAT":arg%+=8:
skipspace:startat%=
Head(20):
skippast
Head(7))="-FOLLOW":arg%+=7:
skipspace:L%=arg%:
skiptospace
IZ%=?arg%:?arg%=13:A$=$L%:?arg%=Z%:
skipspace:trajec%=
trajec%=0
A$,1)="""" trajec%=
("""<ARMovie$Dir>.Trajectory."+
A$,2))
trajec%=
("<ARMovie$Dir>.Trajectory."+A$)
trajec%
#trajec%)="ARMOVIE TRAJECTORY 1"
#trajec%
@trajrate=
#trajec%:
A$,""",")
trajrate=
A$,""",")+2)
trajshapes%=
#trajec%
trajshapes%
trajshap% 4*trajshapes%-1
4*trajshapes%-1
loadshape(
#trajec%,trajshap%!I%):
shape%=0 trajshapes%=0
trajshapes%=0 shape%=0
trajsteps%=
#trajec%
+trajsteps%*8+16384>
+trajsteps%*8+16384
traj% trajsteps%*8-1
I%=traj%
traj%+8*trajsteps%-1
6lin$=
#trajec%:!I%=
lin$:I%!2=
lin$,
lin$,",")+1)
lin$,":"):
C% C%=
lin$,C%+1)
lin$,";"):
D% D%=
lin$,D%+1)
I%!4=C%
D%<<8
#trajec%
#trajec%:trajec%=0
Head(7))="-NOHOUR":hour%=
:arg%+=7:
skipspace
Head(7))="-NOMENU":butmenu%=
:arg%+=7:
skipspace
Head(7))="-PAUSED":paused=
:arg%+=7:
skipspace
Head(6))="-LEAVE":clear%=
:arg%+=6:
skipspace
Head(6))="-MOUSE":arg%+=6:
skipspace:L%=arg%:
skiptospace
5Z%=?arg%:?arg%=13:mouseuser%=
mouseuser%=0
#I%+16384>
#I%+16384
mouseuser%
#I%+15:mouseuser%=mouseuser%+15
12,4,I%,mouseuser%,
?arg%=Z%:
skipspace
Head(6))="-QUIET":quiet%=
:arg%+=6:
skipspace
Head(6))="-PAINT":arg%+=6:
skipspace:L%=arg%:
skiptospace
5Z%=?arg%:?arg%=13:paintuser%=
paintuser%=0
#I%+16384>
#I%+16384
paintuser%
#I%+15:paintuser%=paintuser%+15
12,4,I%,paintuser%,
?arg%=Z%:
skipspace
Head(6))="-SMALL":small%=
:arg%+=6:
skipspace
Head(6))="-SPEED":arg%+=6:
skipspace:speed=
Head(20):
skippast
Head(6))="-SHAPE":arg%+=6:
skipspace:L%=arg%:
skiptospace
EZ%=?arg%:?arg%=13:A$=$L%:?arg%=Z%:
skipspace:
loadshape(A$,shap%)
Head(6))="-TRACK":arg%+=6:
skipspace:track%=
Head(20):
skippast
Head(5))="-LOOP":loop%=
:arg%+=5:
skipspace:
Head(20) loop%=
Head(20):
skippast
Head(5))="-MODE":arg%+=5:
skipspace:L%=arg%:
skiptospace
TZ%=?arg%:?arg%=13:$code%=
uc($L%):?arg%=Z%:
skipspace:forcemode%=
modeblk(code%)
Head(5))="-MUTE":muted%=
:arg%+=5:
skipspace
Head(4))="-BIG":big%=
:arg%+=4:
skipspace
Head(3))="-AT":arg%+=3:
skipspace:atx%=
Head(20):
skiptocomma:aty%=
Head(20):
skippast
skippast
skiptospace
?arg%<>32
?arg%<>13:arg%+=1:
skipspace
?arg%=32 arg%+=1:
skippast
skiptospace:
skipspace:
skiptocomma
?arg%<>
?arg%<>13:arg%+=1:
?arg%=
"," arg%+=1
Head(N%)
a$,Z%
#-Z%=arg%?N%:arg%?N%=13:a$=$arg%:arg%?N%=Z%
Capture
!mute
=" C"
readbutton(
'=arg%+=1:
skipspace:x=
Head(20):
skiptocomma:y=
Head(20)
(Bw=32:h=32:Z%=
Head(20),","):
Z%<>0
Head(40)+" "," ")
arg%+=Z%:w=
Head(20):h=w
*CZ%=
Head(20),","):
Z%<>0
Head(40)+" "," ") h=
Head(20)
skiptospace:
skipspace
px=0
py=0
pw=32767
ph=32767 pw=0:ph=0
a(j$,I%)
I%>1 j$=
j$,"|"+
I%+2)
j$,"|") j$=
j$,"|")-1)
maketable(size%)
P%=code%:F=1<<16
[OPT 0
.inner
ldr r0,[r9]
ldr r0,[r0] ;z%
ldr r1,[r9,#8] ;r%()
ldr r2,[r9,#16] ;a%()
ldr r3,[r9,#24]
ldr r3,[r3] ;Z%
mov r4,#0
> .loop
ldr r5,[r1,r4,lsl #2]
add r5,r5,r0
mov r5,r5,lsr #16
ldr r5,[r2,r5,lsl #2]
size%
1:[OPT 0
strb r5,[r3],#1
2:[OPT 0
strb r5,[r3],#1
mov r5,r5,lsr #8
strb r5,[r3],#1
4:[OPT 0
str r5,[r3],#4
[OPT 0
add r4,r4,#1
cmp r4,#32
bcc loop
movs pc,r14
inputbpp
f$="yuv"
31:r%(Y%)=Y%/31*num%*F:
:z%=0
31:u%=p%+(V%<<10)*size%:
31:Z%=u%+(U%<<5)*size%
inner,Z%,a%(0),r%(0),z%
_0rwt%=.299/31*F:gwt%=.587/31*F:bwt%=.114/31*F
31:r%(R%)=R%*num%*rwt%:
31:u%=p%+(B%<<10)*size%:y%=B%*num%*bwt%:
31:Z%=u%+(G%<<5)*size%:z%=y%+G%*gwt%*num%
inner,Z%,a%(0),r%(0),z%
size%
255:p%?Y%=a%(Y%/255*num%+.5):
255:V%=a%(Y%/255*num%+.5):p%?(Y%<<1)=V%:p%?(Y%*2+1)=V%>>8:
255:p%!(Y%<<2)=a%(Y%/255*num%+.5):
dither2(n%,a,b,sh)
a%(n%)=a
a<<sh
a%(n%+1)=a
b<<sh
dither4(n%,a,b,sh)
u,a%(n%)=a
a<<sh
a<<(sh*2)
a<<(sh*3)
v.a%(n%+1)=b
a<<sh
a<<(sh*2)
a<<(sh*3)
w.a%(n%+2)=b
a<<sh
a<<(sh*2)
b<<(sh*3)
x.a%(n%+3)=b
b<<sh
b<<(sh*2)
a<<(sh*3)
uc(a$)
Z%,z$,b$
a$,Z%,1)
z$>="a"
z$<="z" z$=
z$-32)
b$+=z$:
[OPTZ%
MOV R0,R0
plook(rdest,rsource,rbase)
shift=-1
[OPT Z%
MOV rdest,rsource
shift=-2
[OPT Z%
R rdest,rsource,rsource,LSL #16
shift
[OPTZ%
(LDR rdest,[rbase,rsource,LSL #shift]
[OPTZ%
LDRB rdest,[rbase,rsource]
addmacro(dest%,src%,value%)
count%,val1%
immediate(value%)
[OPTZ%
ADD dest%,src%,#value%
count%=0
((value%>>>count%)
3)=0
count%+=2
val1%=value%
(&FF<<count%)
[OPTZ%
ADD dest%,src%,#val1%
2value%=
addmacro(dest%,dest%,value%
val1%)
immediate(A%)
count%
count%=0
count%<=30
(((A%<<count%)+(A%>>>(32-count%)))
&FF)=0
count%+=2
cant(r$)
lookup2("E06",A$,r$)
d12x2y
[OPTZ%
LDMIA r0 !,{r7,r8,r9,r10}
r1,r7,#3:
r4,r7,#&c:MOV r4,r4,LSR #2
r7,r8,#3:
R r1,r1,r7,LSL #2:
r7,r8,#&c:
R r4,r4,r7
r7,r9,#3:
R r1,r1,r7,LSL #4:
r7,r9,#&c:
R r4,r4,r7,LSL #2
r7,r10,#3:
R r1,r1,r7,LSL #6:
r7,r10,#&c:
R r4,r4,r7,LSL #4
STRB r1,[r2],#1
STRB r4,[r11],#1
LDMIA r0 !,{r7,r8,r9,r10}
r1,r7,#3:
r4,r7,#&c:MOV r4,r4,LSR #2
r7,r8,#3:
R r1,r1,r7,LSL #2:
r7,r8,#&c:
R r4,r4,r7
r7,r9,#3:
R r1,r1,r7,LSL #4:
r7,r9,#&c:
R r4,r4,r7,LSL #2
r7,r10,#3:
R r1,r1,r7,LSL #6:
r7,r10,#&c:
R r4,r4,r7,LSL #4
STRB r1,[r2],#1
STRB r4,[r11],#1
d12x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #2:
R r1,r1,r5,LSL #4:
R r1,r1,r6,LSL #6
STRB r1,[r11],#1
R r7,r7,r8,LSL #2:
R r7,r7,r9,LSL #4:
R r7,r7,r10,LSL #6
STRB r7,[r11],#1
d22x2y
[OPTZ%
LDMIA r0 !,{r7,r8,r9,r10}
r1,r7,#15:
r4,r7,#&f0:MOV r4,r4,LSR #4
r7,r8,#15:
R r1,r1,r7,LSL #4:
r7,r8,#&f0:
R r4,r4,r7
r7,r9,#15:
R r1,r1,r7,LSL #8:
r7,r9,#&f0:
R r4,r4,r7,LSL #4
r7,r10,#15:
R r1,r1,r7,LSL #12:
r7,r10,#&f0:
R r4,r4,r7,LSL #8
LDMIA r0 !,{r7,r8,r9,r10}
r5,r7,#15:
R r1,r1,r5,LSL #16:
r5,r7,#&f0:
R r4,r4,r5,LSL #12
r7,r8,#15:
R r1,r1,r7,LSL #20:
r7,r8,#&f0:
R r4,r4,r7,LSL #16
r7,r9,#15:
R r1,r1,r7,LSL #24:
r7,r9,#&f0:
R r4,r4,r7,LSL #20
r7,r10,#15:
R r1,r1,r7,LSL #28:
r7,r10,#&f0:
R r4,r4,r7,LSL #24
STMIA r2 !,{r1}
STMIA r11 !,{r4}
d22x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #4
R r1,r1,r5,LSL #8
R r1,r1,r6,LSL #12
R r1,r1,r7,LSL #16
R r1,r1,r8,LSL #20
R r1,r1,r9,LSL #24
R r1,r1,r10,LSL #28
STMIA r11 !,{r1}
d21x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #2:
R r1,r1,r5,LSL #4:
R r1,r1,r6,LSL #6
STRB r1,[r11],#1
R r7,r7,r8,LSL #2:
R r7,r7,r9,LSL #4:
R r7,r7,r10,LSL #6
STRB r7,[r11],#1
d42x2y
[OPTZ%
LDMIA r0 !,{r7,r8,r9,r10}
r1,r7,#255:
r4,r7,#&ff00:MOV r4,r4,LSR #8
r7,r8,#255:
R r1,r1,r7,LSL #8:
r7,r8,#&ff00:
R r4,r4,r7
r7,r9,#255:
R r1,r1,r7,LSL #16:
r7,r9,#&ff00:
R r4,r4,r7,LSL #8
r7,r10,#255:
R r1,r1,r7,LSL #24:
r7,r10,#&ff00:
R r4,r4,r7,LSL #16
LDMIA r0 !,{r7,r8,r9,r10}
r5,r7,#255:
r6,r7,#&ff00:MOV r6,r6,LSR #8
r7,r8,#255:
R r5,r5,r7,LSL #8:
r7,r8,#&ff00:
R r6,r6,r7
r7,r9,#255:
R r5,r5,r7,LSL #16:
r7,r9,#&ff00:
R r6,r6,r7,LSL #8
r7,r10,#255:
R r5,r5,r7,LSL #24:
r7,r10,#&ff00:
R r6,r6,r7,LSL #16
STMIA r2 !,{r1,r5}
STMIA r11 !,{r4,r6}
d42x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #8:
R r1,r1,r5,LSL #16:
R r1,r1,r6,LSL #24
R r7,r7,r8,LSL #8:
R r7,r7,r9,LSL #16:
R r7,r7,r10,LSL #24
STMIA r11 !,{r1,r7}
d82x2yintxinty
[OPTZ%
ADD r1,r0,#sx%*4
LDMIA r0 !,{r8,r9,r10}
LDMIA r1,{r5,r6,r7}
r5,r5,#31
r6,r6,#31
r2,r8,#31
ADD r5,r5,r2
LDRB r1,[r12,r8,LSL #2]
BIC r8,r8,#31
r4,r9,#31
ADD r2,r2,r4
R r2,r8,r2,LSR #1
LDR r2,[r12,r2,LSL #2]
r2,r2,#&ff00
R r1,r1,r2
ADD r6,r6,r4
ADD r2,r6,r5
R r5,r8,r5,LSR #1
R r2,r8,r2,LSR #2
LDR r5,[r12,r5,LSL #2]
LDR r2,[r12,r2,LSL #2]
MOV r5,r5,LSR #24
r2,r2,#&ff0000
R r5,r5,r2,LSR #8
r2,r10,#31
ADD r4,r4,r2
LDRB r8,[r12,r9,LSL #2]
R r1,r1,r8,LSL #16
BIC r9,r9,#31
R r4,r9,r4,LSR #1
LDR r4,[r12,r4,LSL #2]
r4,r4,#&ff00
R r1,r1,r4,LSL #16
r7,r7,#31
ADD r8,r7,r2
ADD r8,r8,r6
R r6,r9,r6,LSR #1
R r8,r9,r8,LSR #2
LDR r6,[r12,r6,LSL #2]
LDR r8,[r12,r8,LSL #2]
MOV r6,r6,LSR #24
r8,r8,#&ff0000
R r5,r5,r6,LSL #16
R r5,r5,r8,LSL #8
addmacro(8,11,rowbytes%)
STMIA r11 !,{r1}
STMIA r8 !,{r5}
BIC r8,r10,#31
LDRB r1,[r12,r10,LSL #2]
ADD r5,r2,r7
ADD r6,r0,#sx%*4
LDMIA r0,{r9,r10}
LDMIA r6,{r6,r7}
ADD r0,r0,#4
r6,r6,#31
r4,r9,#31
ADD r2,r2,r4
R r2,r8,r2,LSR #1
LDR r2,[r12,r2,LSL #2]
r2,r2,#&ff00
R r1,r1,r2
ADD r6,r6,r4
ADD r2,r6,r5
R r5,r8,r5,LSR #1
R r2,r8,r2,LSR #2
LDR r5,[r12,r5,LSL #2]
LDR r2,[r12,r2,LSL #2]
MOV r5,r5,LSR #24
r2,r2,#&ff0000
R r5,r5,r2,LSR #8
r2,r10,#31
ADD r4,r4,r2
LDRB r8,[r12,r9,LSL #2]
R r1,r1,r8,LSL #16
BIC r9,r9,#31
R r4,r9,r4,LSR #1
LDR r4,[r12,r4,LSL #2]
r4,r4,#&ff00
R r1,r1,r4,LSL #16
r7,r7,#31
ADD r2,r7,r2
ADD r2,r2,r6
R r6,r9,r6,LSR #1
R r2,r9,r2,LSR #2
LDR r6,[r12,r6,LSL #2]
LDR r2,[r12,r2,LSL #2]
MOV r6,r6,LSR #24
r2,r2,#&ff0000
R r5,r5,r6,LSL #16
R r5,r5,r2,LSL #8
addmacro(2,11,rowbytes%)
STMIA r11 !,{r1}
STMIA r2 !,{r5}
incno%=4
d82x2y
[OPTZ%
y)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
r1,r1,r4,LSL #16:
r4,r4,r1,LSR #16:
r1,r1,r4,LSL #16
r5,r5,r6,LSL #16:
r6,r6,r5,LSR #16:
r5,r5,r6,LSL #16
r7,r7,r8,LSL #16:
r8,r8,r7,LSR #16:
r7,r7,r8,LSL #16
r9,r9,r10,LSL #16:
r10,r10,r9,LSR #16:
r9,r9,r10,LSL #16
STMIA r2 !,{r1,r5,r7,r9}
STMIA r11 !,{r4,r6,r8,r10}
d82x4y
[OPT Z%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
r1,r1,r4,LSL #16:
r4,r4,r1,LSR #16:
r1,r1,r4,LSL #16
r5,r5,r6,LSL #16:
r6,r6,r5,LSR #16:
r5,r5,r6,LSL #16
r7,r7,r8,LSL #16:
r8,r8,r7,LSR #16:
r7,r7,r8,LSL #16
r9,r9,r10,LSL #16:
r10,r10,r9,LSR #16:
r9,r9,r10,LSL #16
slow%
[OPTZ%
addmacro(2,11,rowbytes%*2)
STMIA r2,{r4,r6,r8,r10}
STMIA r11 !,{r1,r5,r7,r9}
[OPTZ%
addmacro(2,11,rowbytes%*2)
STMIA r2,{r4,r6,r8,r10}
addmacro(2,2,rowbytes%)
STMIA r2,{r4,r6,r8,r10}
addmacro(2,11,rowbytes%)
STMIA r2,{r1,r5,r7,r9}
STMIA r11 !,{r1,r5,r7,r9}
d81x2y
szmul%=1
[OPT Z%
LDMIA r0 !,{r1,r4,r5,r6}
r7,r1,r4,LSL #16:
r8,r4,r7,LSR #16:
r7,r7,r8,LSL #16
$MOV r10,#&ff:
R r10,r10,#&ff0000
r1,r7,r10:
r4,r8,r10:
R r1,r1,r4,LSL #8
r4,r7,r10,LSL #8:
r8,r8,r10,LSL #8:
R r4,r8,r4,LSR #8
r7,r5,r6,LSL #16:
r8,r6,r7,LSR #16:
r7,r7,r8,LSL #16
r5,r7,r10:
r6,r8,r10:
R r5,r5,r6,LSL #8
r6,r7,r10,LSL #8:
r8,r8,r10,LSL #8:
R r6,r8,r6,LSR #8
STMIA r2 !,{r4,r6}
STMIA r11 !,{r1,r5}
[OPT Z%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r5,LSL #16:
R r4,r4,r6,LSL #16
r5,r4,r1,LSR #8:BIC r5,r5,#&ff00:
r1,r1,r5,LSL #8:BIC r5,r5,#&ff000000:
r4,r4,r5
R r7,r7,r9,LSL #16:
R r8,r8,r10,LSL #16
r5,r8,r7,LSR #8:BIC r5,r5,#&ff00:
r7,r7,r5,LSL #8:BIC r5,r5,#&ff000000:
r8,r8,r5
STMIA r2 !,{r4,r8}
STMIA r11 !,{r1,r7}
d82x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #16
R r5,r5,r6,LSL #16
R r7,r7,r8,LSL #16
R r9,r9,r10,LSL #16
STMIA r11 !,{r1,r5,r7,r9}
d81x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #8:
R r1,r1,r5,LSL #16:
R r1,r1,r6,LSL #24
R r7,r7,r8,LSL #8:
R r7,r7,r9,LSL #16:
R r7,r7,r10,LSL #24
STMIA r11 !,{r1,r7}
d162x2yintxinty
[OPTZ%
LDMIA r0,{r1,r4,r5,r9,r12}
ADD r6,r1,r4
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r7,r1,r1,LSL #16
R r7,r6,r7,LSR #16
ADD r6,r4,r5
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r8,r4,r4,LSL #16
R r8,r6,r8,LSR #16
STMIA r11!,{r7,r8}
ADD r6,r5,r9
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r7,r5,r5,LSL #16
R r7,r6,r7,LSR #16
ADD r6,r9,r12
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r8,r9,r9,LSL #16
R r8,r6,r8,LSR #16
STMIA r11!,{r7,r8}
ADD r6,r0,#sx%*4
LDMIA r6!,{r7,r8}
ADD r1,r1,r7
ADD r4,r4,r8
LDMIA r6,{r6,r7,r8}
ADD r5,r5,r6
ADD r9,r9,r7
ADD r12,r12,r8
ADD r6,r1,r4
R r1,r10,r1,LSR #1
R r6,r10,r6,LSR #2
r1,r1,r1,LSL #16
r6,r6,r6,LSL #16
R r1,r6,r1,LSR #16
ADD r6,r4,r5
R r4,r10,r4,LSR #1
R r6,r10,r6,LSR #2
r4,r4,r4,LSL #16
r6,r6,r6,LSL #16
R r4,r6,r4,LSR #16
ADD r6,r5,r9
R r5,r10,r5,LSR #1
R r6,r10,r6,LSR #2
r5,r5,r5,LSL #16
r6,r6,r6,LSL #16
R r5,r6,r5,LSR #16
ADD r6,r9,r12
R r9,r10,r9,LSR #1
R r6,r10,r6,LSR #2
r9,r9,r9,LSL #16
r6,r6,r6,LSL #16
R r9,r6,r9,LSR #16
STMIA r2!,{r1,r4,r5,r9}
ADD r0,r0,#4*4
incno%=4
d162x2yintx
[OPTZ%
!LDMIA r0!,{r1,r4,r5,r6,r7,r8}
ADD r9,r1,r4
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r1,r1,r1,LSL #16
R r1,r9,r1,LSR #16
ADD r9,r4,r5
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r4,r4,r4,LSL #16
R r4,r9,r4,LSR #16
ADD r9,r5,r6
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r5,r5,r5,LSL #16
R r5,r9,r5,LSR #16
ADD r9,r6,r7
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r6,r6,r6,LSL #16
R r6,r9,r6,LSR #16
STMIA r11 !,{r1,r4,r5,r6}
STMIA r2 !,{r1,r4,r5,r6}
ADD r9,r7,r8
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r7,r7,r7,LSL #16
R r1,r9,r7,LSR #16
LDMIA r0,{r5,r6,r7}
ADD r9,r8,r5
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r8,r8,r8,LSL #16
R r4,r9,r8,LSR #16
ADD r9,r5,r6
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r5,r5,r5,LSL #16
R r5,r9,r5,LSR #16
ADD r9,r6,r7
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r6,r6,r6,LSL #16
R r6,r9,r6,LSR #16
STMIA r11 !,{r1,r4,r5,r6}
STMIA r2 !,{r1,r4,r5,r6}
ADD r0,r0,#2*4
d162x2y
[OPTZ%
;)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
<)STMIA r2 !,{r1,r4,r5,r6,r7,r8,r9,r10}
MOV r1,r1,ROR #16
MOV r4,r4,ROR #16
MOV r5,r5,ROR #16
MOV r6,r6,ROR #16
MOV r7,r7,ROR #16
MOV r8,r8,ROR #16
MOV r9,r9,ROR #16
MOV r10,r10,ROR #16
E*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d162x4yintxinty
[OPTZ%
LDMIA r0,{r1,r4,r5,r9,r12}
ADD r6,r1,r4
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r7,r1,r1,LSL #16
R r7,r6,r7,LSR #16
ADD r6,r4,r5
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r8,r4,r4,LSL #16
R r8,r6,r8,LSR #16
addmacro(2,11,rowbytes%)
STMIA r11!,{r7,r8}
STMIA r2!,{r7,r8}
ADD r6,r5,r9
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r7,r5,r5,LSL #16
R r7,r6,r7,LSR #16
ADD r6,r9,r12
R r6,r10,r6,LSR #1
r6,r6,r6,LSL #16
R r8,r9,r9,LSL #16
R r8,r6,r8,LSR #16
STMIA r11!,{r7,r8}
STMIA r2!,{r7,r8}
SUB r2,r11,#4*4
ADD r6,r0,#sx%*4
LDMIA r6!,{r7,r8}
ADD r1,r1,r7
ADD r4,r4,r8
LDMIA r6,{r6,r7,r8}
ADD r5,r5,r6
ADD r9,r9,r7
ADD r12,r12,r8
ADD r6,r1,r4
R r1,r10,r1,LSR #1
R r6,r10,r6,LSR #2
r1,r1,r1,LSL #16
r6,r6,r6,LSL #16
R r1,r6,r1,LSR #16
ADD r6,r4,r5
R r4,r10,r4,LSR #1
R r6,r10,r6,LSR #2
r4,r4,r4,LSL #16
r6,r6,r6,LSL #16
R r4,r6,r4,LSR #16
ADD r6,r5,r9
R r5,r10,r5,LSR #1
R r6,r10,r6,LSR #2
r5,r5,r5,LSL #16
r6,r6,r6,LSL #16
R r5,r6,r5,LSR #16
ADD r6,r9,r12
R r9,r10,r9,LSR #1
R r6,r10,r6,LSR #2
r9,r9,r9,LSL #16
r6,r6,r6,LSL #16
R r9,r6,r9,LSR #16
addmacro(2,2,rowbytes%*2)
STMIA r2,{r1,r4,r5,r9}
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r9}
ADD r0,r0,#4*4
incno%=4
d162x4yintx
[OPTZ%
!LDMIA r0!,{r1,r4,r5,r6,r7,r8}
ADD r9,r1,r4
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r1,r1,r1,LSL #16
R r1,r9,r1,LSR #16
ADD r9,r4,r5
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r4,r4,r4,LSL #16
R r4,r9,r4,LSR #16
ADD r9,r5,r6
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r5,r5,r5,LSL #16
R r5,r9,r5,LSR #16
ADD r9,r6,r7
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r6,r6,r6,LSL #16
R r6,r9,r6,LSR #16
addmacro(2,11,rowbytes%)
STMIA r2,{r1,r4,r5,r6}
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r6}
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r6}
STMIA r11 !,{r1,r4,r5,r6}
ADD r9,r7,r8
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r7,r7,r7,LSL #16
R r1,r9,r7,LSR #16
LDMIA r0,{r5,r6,r7}
ADD r9,r8,r5
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r8,r8,r8,LSL #16
R r4,r9,r8,LSR #16
ADD r9,r5,r6
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r5,r5,r5,LSL #16
R r5,r9,r5,LSR #16
ADD r9,r6,r7
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r6,r6,r6,LSL #16
R r6,r9,r6,LSR #16
addmacro(2,11,rowbytes%)
STMIA r2,{r1,r4,r5,r6}
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r6}
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r6}
STMIA r11 !,{r1,r4,r5,r6}
ADD r0,r0,#2*4
d162x4y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,11,rowbytes%*2)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
MOV r1,r1,ROR #16
MOV r4,r4,ROR #16
MOV r5,r5,ROR #16
MOV r6,r6,ROR #16
MOV r7,r7,ROR #16
MOV r8,r8,ROR #16
MOV r9,r9,ROR #16
MOV r10,r10,ROR #16
addmacro(2,11,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d161x2y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
r1,r1,r4,LSL #16:
r4,r4,r1,LSR #16:
r1,r1,r4,LSL #16
r5,r5,r6,LSL #16:
r6,r6,r5,LSR #16:
r5,r5,r6,LSL #16
r7,r7,r8,LSL #16:
r8,r8,r7,LSR #16:
r7,r7,r8,LSL #16
r9,r9,r10,LSL #16:
r10,r10,r9,LSR #16:
r9,r9,r10,LSL #16
STMIA r2 !,{r1,r5,r7,r9}
STMIA r11 !,{r4,r6,r8,r10}
d162x1yintx
[OPTZ%
!LDMIA r0!,{r1,r4,r5,r6,r7,r8}
ADD r9,r1,r4
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r1,r1,r1,LSL #16
R r1,r9,r1,LSR #16
ADD r9,r4,r5
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r4,r4,r4,LSL #16
R r4,r9,r4,LSR #16
ADD r9,r5,r6
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r5,r5,r5,LSL #16
R r5,r9,r5,LSR #16
ADD r9,r6,r7
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r6,r6,r6,LSL #16
R r6,r9,r6,LSR #16
STMIA r11 !,{r1,r4,r5,r6}
ADD r9,r7,r8
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r7,r7,r7,LSL #16
R r1,r9,r7,LSR #16
LDMIA r0,{r5,r6,r7}
ADD r9,r8,r5
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r8,r8,r8,LSL #16
R r4,r9,r8,LSR #16
ADD r9,r5,r6
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r5,r5,r5,LSL #16
R r5,r9,r5,LSR #16
ADD r9,r6,r7
R r9,r10,r9,LSR #1
r9,r9,r9,LSL #16
R r6,r6,r6,LSL #16
R r6,r9,r6,LSR #16
STMIA r11 !,{r1,r4,r5,r6}
ADD r0,r0,#2*4
d162x1y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d161x1y
szmul%=1
[OPTZ%
LDMIA r0 !,{r1,r5,r7,r9}
STMIA r11 !,{r1,r5,r7,r9}
[OPTZ%
()LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
R r1,r1,r4,LSL #16
R r5,r5,r6,LSL #16
R r7,r7,r8,LSL #16
R r9,r9,r10,LSL #16
STMIA r11 !,{r1,r5,r7,r9}
d322x2yintxinty
[OPT Z%
ADD r9,r0,#sx%*4
LDMIA r0!,{r1,r5,r7}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
9!STMIA r11 !,{r1,r4,r5,r6,r7}
LDMIA r9,{r4,r6,r8}
ADD r8,r8,r7
MOV r8,r8,LSR #1
ADD r1,r1,r4
MOV r1,r1,LSR #1
ADD r5,r5,r6
MOV r5,r5,LSR #1
BIC r4,r1,r10
BIC r6,r5,r10
ADD r4,r4,r6
MOV r4,r4,LSR #1
BIC r9,r8,r10
ADD r6,r6,r9
MOV r6,r6,LSR #1
STMIA r2 !,{r1,r4,r5,r6,r8}
BIC r4,r8,r10
ADD r8,r0,#sx%*4
LDMIA r0,{r5,r9}
ADD r1,r7,r5
MOV r1,r1,LSR #1
ADD r6,r5,r9
MOV r6,r6,LSR #1
STMIA r11 !,{r1,r5,r6}
ADD r0,r0,#4
LDMIA r8,{r6,r8}
ADD r9,r8,r9
MOV r9,r9,LSR #1
ADD r5,r5,r6
MOV r5,r5,LSR #1
BIC r6,r5,r10
ADD r4,r4,r6
MOV r4,r4,LSR #1
BIC r9,r9,r10
ADD r6,r6,r9
MOV r6,r6,LSR #1
STMIA r2 !,{r4,r5,r6}
incno%=4
d322x2yintx
[OPT Z%
LDMIA r0,{r1,r5,r7,r9,r10}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
ADD r8,r7,r9
MOV r8,r8,LSR #1
ADD r10,r10,r9
MOV r10,r10,LSR #1
l)STMIA r2 !,{r1,r4,r5,r6,r7,r8,r9,r10}
m*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
ADD r0,r0,#4*4
LDMIA r0,{r1,r5,r7,r9,r10}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
ADD r8,r7,r9
MOV r8,r8,LSR #1
ADD r10,r10,r9
MOV r10,r10,LSR #1
x)STMIA r2 !,{r1,r4,r5,r6,r7,r8,r9,r10}
y*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
ADD r0,r0,#4*4
d322x2y
[OPT Z%
LDMIA r0 !,{r1,r5,r7,r9}
MOV r4,r1
MOV r6,r5
MOV r8,r7
MOV r10,r9
)STMIA r2 !,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
LDMIA r0 !,{r1,r5,r7,r9}
MOV r4,r1
MOV r6,r5
MOV r8,r7
MOV r10,r9
)STMIA r2 !,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d322x4yintxinty
[OPT Z%
ADD r9,r0,#sx%*4
LDMIA r0!,{r1,r5,r7}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
addmacro(2,11,rowbytes%)
STMIA r2,{r1,r4,r5,r6,r7}
!STMIA r11 !,{r1,r4,r5,r6,r7}
LDMIA r9,{r4,r6,r8}
ADD r8,r8,r7
MOV r8,r8,LSR #1
ADD r1,r1,r4
MOV r1,r1,LSR #1
ADD r5,r5,r6
MOV r5,r5,LSR #1
BIC r4,r1,r10
BIC r6,r5,r10
ADD r4,r4,r6
MOV r4,r4,LSR #1
BIC r9,r8,r10
ADD r6,r6,r9
MOV r6,r6,LSR #1
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r6,r8}
addmacro(2,2,rowbytes%)
STMIA r2,{r1,r4,r5,r6,r8}
BIC r4,r8,r10
ADD r8,r0,#sx%*4
LDMIA r0,{r5,r9}
ADD r1,r7,r5
MOV r1,r1,LSR #1
ADD r6,r5,r9
MOV r6,r6,LSR #1
addmacro(2,11,rowbytes%)
STMIA r2,{r1,r5,r6}
STMIA r11 !,{r1,r5,r6}
ADD r0,r0,#4
LDMIA r8,{r6,r8}
ADD r9,r8,r9
MOV r9,r9,LSR #1
ADD r5,r5,r6
MOV r5,r5,LSR #1
BIC r6,r5,r10
ADD r4,r4,r6
MOV r4,r4,LSR #1
BIC r9,r9,r10
ADD r6,r6,r9
MOV r6,r6,LSR #1
addmacro(2,2,rowbytes%)
STMIA r2,{r4,r5,r6}
addmacro(2,2,rowbytes%)
STMIA r2,{r4,r5,r6}
incno%=4
d322x4yintx
[OPTZ%
LDMIA r0,{r1,r5,r7,r9,r10}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
ADD r8,r7,r9
MOV r8,r8,LSR #1
ADD r10,r10,r9
MOV r10,r10,LSR #1
addmacro(2,11,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
ADD r0,r0,#4*4
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
LDMIA r0,{r1,r5,r7,r9,r10}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
ADD r8,r7,r9
MOV r8,r8,LSR #1
ADD r10,r10,r9
MOV r10,r10,LSR #1
addmacro(2,11,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
ADD r0,r0,#4*4
d322x4y
[OPTZ%
LDMIA r0 !,{r1,r5,r7,r9}
MOV r4,r1
MOV r6,r5
MOV r8,r7
MOV r10,r9
addmacro(2,11,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
LDMIA r0 !,{r1,r5,r7,r9}
MOV r4,r1
MOV r6,r5
MOV r8,r7
MOV r10,r9
addmacro(2,11,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
addmacro(2,2,rowbytes%)
'STMIA r2,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d321x2y
[OPTZ%
)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
)STMIA r2 !,{r1,r4,r5,r6,r7,r8,r9,r10}
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d322x1yintx
[OPTZ%
LDMIA r0,{r1,r5,r7,r9,r10}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
ADD r8,r7,r9
MOV r8,r8,LSR #1
ADD r10,r10,r9
MOV r10,r10,LSR #1
*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
ADD r0,r0,#4*4
LDMIA r0,{r1,r5,r7,r9,r10}
ADD r4,r1,r5
MOV r4,r4,LSR #1
ADD r6,r5,r7
MOV r6,r6,LSR #1
ADD r8,r7,r9
MOV r8,r8,LSR #1
ADD r10,r10,r9
MOV r10,r10,LSR #1
(*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
ADD r0,r0,#4*4
d322x1y
[OPTZ%
LDMIA r0 !,{r1,r5,r7,r9}
MOV r4,r1
MOV r6,r5
MOV r8,r7
MOV r10,r9
3*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
LDMIA r0 !,{r1,r5,r7,r9}
MOV r4,r1
MOV r6,r5
MOV r8,r7
MOV r10,r9
9*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
d321x1y
[OPTZ%
>)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
?*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
D!tick1%=500:
slow% tick1%=1000
P%=code%
[OPTZ%
.tickinit MOV r0,#6
ADR r1,tick
MOV r2,#100
SWI "OS_ClaimDeviceVector"
SWI "OS_EnterOS"
MOV r0,#&3200000
MOV r1,#tick1%*20
STRB r1,[r0,#&50]
MOV r1,#tick1%*20
STRB r1,[r0,#&54]
LDRB r1,[r0,#&18]
R r1,r1,#&40
STRB r1,[r0,#&18]
STRB r1,[r0,#&58]
TEQP pc,#0
MOV r0,r0
MOVS pc,r14
P%=P%+15
[OPT Z%
.tick LDR r0,mute
TST r0,#1
LDR r0,timenow
ADD r0,r0,#tick1%
STREQ r0,timenow
MOV r0,#&40
STRB r0,[r3,#&14]
MOV pc,r14
.zero MOV r2,#0
MOV r3,#0
MOV r4,#0
MOV r5,#0
g#.zerolp STMIA r0!,{r2,r3,r4,r5}
CMP r0,r1
BCC zerolp
MOVS pc,r14
.readf%
ldr r6,tobuf
ldr r10,[r14,#&28]
.readfwt
ldr r0,[r8,r10]
cmp r0,#0
movnes pc,r14
ldr r0,mute
tst r0,#4
movne r0,#&80
strneb r0,[r8,r10]
movnes pc,r14
playfor%=0
[OPT Z%
B readfwt
video
[OPTZ%
ldr r5,[r6,#8]
cmp r5,#1
bne readfwt
twobuf%
[OPTZ%
ldr r3,ent
"ldmia r3,{r3,r4,r5,r7,r9,r11}
sub r5,r9,r4
adds r7,r7,r11
add r3,r5,r7
mov r2,#sector+1
sub r2,r2,#1
add r3,r3,r2
bic r3,r3,r2
ldr r2,[r6]
addne r5,r5,r2
moveq r5,#0
str r5,[r6,#4]
STMFD r13!,{r2,r5}
mov r1,#file%
mov r0,#3
incore%
[OPT Z%
SWI "OS_GBPB"
[OPTZ%
mov r3,#0
str r3,[r6,#8]
eor r6,r6,#16
str r6,tobuf
LDMFD r13!,{r2,r7}
snd%=1
snd%=2
video
[OPTZ%
ldr r3,ent
ldmia r3,{r3,r4,r5}
ADD r0,r2,r3
.sndwait ldr r1,[r8,r10]
cmp r1,#0
movnes pc,r14
ldr r1,mute
tst r1,#4
movne r1,#&80
strneb r1,[r8,r10]
movnes pc,r14
LDR r1,sndcopy+8
LDR r2,sndcopy
R r1,r1,r2
CMP r1,#0
BNE sndwait
STR r0,sndcopy
STR r5,sndcopy+4
ldr r3,ent
add r3,r3,#12
ldmia r3,{r3,r4,r5}
add r0,r7,r3
STR r0,sndcopy+8
STR r5,sndcopy+12
[OPTZ%
STMFD r13!,{r14}
ldr r3,ent
ldmia r3,{r3,r4,r5}
ADD r0,r2,r3
MOV r1,r5
BL snddata%
ldr r3,ent
add r3,r3,#12
ldmia r3,{r3,r4,r5}
add r0,r7,r3
MOV r1,r5
BL snddata%
LDMFD r13!,{r14}
[OPTZ%
ldr r3,ent
ldmia r3,{r3,r4,r5}
add r3,r3,r5
mov r2,#sector+1
sub r2,r2,#1
add r3,r3,r2
bic r3,r3,r2
ldr r2,[r6]
STMFD r13!,{r2}
mov r1,#file%
mov r0,#3
incore%
access<2
[OPT Z%
SWI "OS_GBPB"
access>256 access=access+1
access>512 access=access+3
access>1024 access=access+7
[OPT Z%
.blockaccessloop
stmfd r13!,{r3}
cmp r3,#access*1024
movcs r3,#access*1024
SWI "OS_GBPB"
ldmfd r13!,{r3}
subs r3,r3,#access*1024
bgt blockaccessloop
[OPTZ%
mov r3,#0
str r3,[r6,#8]
eor r6,r6,#16
str r6,tobuf
LDMFD r13!,{r2}
snd%=1
snd%=2
video
[OPTZ%
ldr r3,ent
ldmia r3,{r3,r4,r5}
ADD r0,r2,r3
.sndwait
ldr r1,[r8,r10]
cmp r1,#0
movnes pc,r14
ldr r1,mute
tst r1,#4
movne r1,#&80
strneb r1,[r8,r10]
movnes pc,r14
LDR r1,sndcopy
CMP r1,#0
BNE sndwait
STR r0,sndcopy
STR r5,sndcopy+4
[OPTZ%
STMFD r13!,{r14}
ldr r3,ent
ldmia r3,{r3,r4,r5}
ADD r0,r2,r3
MOV r1,r5
BL snddata%
LDMFD r13!,{r14}
video
defeatscrnblank%
[OPT Z%
MOV r0,#1
SWI "ScreenBlanker_Control"
[OPTZ%
LDR r3,ent
ADD r3,r3,#12+12*
twobuf%
STR r3,ent
LDR r4,entend
CMP r3,r4
BCC readf%
MOVS pc,r14
-%.sndcopy DCD 0:DCD 0:DCD 0:DCD 0
.ent DCD 0
.entend DCD 0
.tobuf DCD adb2
1/.butpause DCD px:DCD py:DCD px+pw:DCD py+ph
2..butexit DCD ex:DCD ey:DCD ex+ew:DCD ey+eh
31.butcapture DCD cx:DCD cy:DCD cx+cw:DCD cy+ch
4/.butsfadv DCD sx:DCD sy:DCD sx+sw:DCD sy+sh
5..butffwd DCD fx:DCD fy:DCD fx+fw:DCD fy+fh
60.buthspeed DCD hx:DCD hy:DCD hx+hw:DCD hy+hh
7/.butquiet DCD qx:DCD qy:DCD qx+qw:DCD qy+qh
8..butloud DCD lx:DCD ly:DCD lx+lw:DCD ly+lh
9..butmute DCD mx:DCD my:DCD mx+mw:DCD my+mh
.notvsyncevent
CMP r0,#10
MOVNES pc,r14
LDR r0,mousestate
r4,r0,r3
STR r3,mousestate
LDR r0,mute
butadj%
[OPTZ%
TST r4,#1
BEQ noadjust
TST r3,#1
BICEQ r0,r0,#1
RNE r0,r0,#1
B changedmute
.noadjust
[OPTZ%
TST r4,#2
BEQ doselect
butmenu%
[OPTZ%
TST r3,#2
RNE r0,r0,#4
[OPTZ%
B changedmute
.doselect
TST r3,#4
BEQ donemouse
STMFD r13!,{r5,r6,r14}
ADR r6,butpause
BL checkbut
GE r0,r0,#1
BGE popandchangedmute
ADR r6,butsfadv
BL checkbut
RGE r0,r0,#8
BICGE r0,r0,#1
BGE popandchangedmute
ADR r6,butmute
BL checkbut
GE r0,r0,#2
BGE popandchangedmute
ADR r6,butloud
BL checkbut
BICGE r0,r0,#2
BGE popandchangedmute
ADR r6,butquiet
BL checkbut
RGE r0,r0,#2
BGE popandchangedmute
ADR r6,butexit
BL checkbut
RGE r0,r0,#4
BGE popandchangedmute
ADR r6,butcapture
BL checkbut
RGE r0,r0,#4+16
BGE popandchangedmute
LDMFD r13!,{r5,r6,r14}
B donemouse
|$.checkbut LDMIA r6,{r3,r4,r5,r6}
CMP r1,r3
CMPGE r5,r1
CMPGE r2,r4
CMPGE r6,r2
MOV pc,r14
.popandchangedmute
LDMFD r13!,{r5,r6,r14}
.changedmute
STR r0,mute
mouseuser%
[OPT Z%
STMFD r13!,{r0-r12,r14}
ADR r0,mute
LDR r5,mousepaintuser
ADR r6,butpause
BL mouseuser%
LDMFD r13!,{r0-r12,r14}
[OPTZ%
.donemouse
MOV r0,#0
MOVS pc,r14
.donesingleframe LDR r0,mute
BIC r0,r0,#8
R r0,r0,#1
B changedmute
.invisible LDR r2,inviscount
CMP r2,#0
BICMI r1,r1,#32+3
RMI r1,r1,#muted%
paused
STRMI r1,mute
BMI dopaint2
SUBS r2,r2,#1
STR r2,inviscount
BGE skippaint
BIC r1,r1,#32+3
R r1,r1,#muted%
paused
STR r1,mute
B dopaint2
.mousestate DCD 0
.mute DCD 0
.sndpause DCD
P%=mute+64
[OPTZ%
.timenow DCD 0
.timetodisp DCD 0
.timetotraj DCD 0
.trajtime DCD 0
.scs DCD dd%
.rn% DCD -1
.ef DCD 0
.dbu DCD bb%
.paint DCD 0
.displayframe DCD 0
.fpstime DCD 0
.inviscount DCD -1
mouseuser%
[OPTZ%
%.mousepaintuser DCD paintuserdata
trajec%
trajsteps%
[OPTZ%
.trajrpt DCD 1
.trajnow DCD traj%
.trajstart DCD traj%
#.trajend DCD traj%+trajsteps%*8
trajshapes%
[OPT Z%
.trajshap DCD trajshap%-4
loop%
[OPTZ%
.finishedit
MOV r1,#0
STR r1,rn%
LDR r1,mute
R r1,r1,#64
[OPT Z%
.finishedit
LDR r1,mute
R r1,r1,#4
[OPT Z%
STR r1,mute
MOVS pc,r14
P%=P%+15
[OPTZ%
.play
CMP r0,#4
BNE notvsyncevent
.recycleplay
ADR r1,timenow
LDMIA r1,{r1,r2,r3}
trajec%
trajsteps%
[OPTZ%
CMP r3,r1
BCS checkframetime
LDR r2,trajnow
.multinctraj
LDR r0,trajtime
ADD r3,r3,r0
LDR r0,trajrpt
SUBS r0,r0,#1
STR r0,trajrpt
BNE multinctraj2
ADD r2,r2,#8
LDR r0,trajend
CMP r2,r0
LDRCS r2,trajstart
.multinctraj2
CMP r3,r1
BCC multinctraj
STR r3,timetotraj
LDR r0,trajnow
CMP r0,r2
BEQ leavetrajalone
LDR r3,mute
TST r3,#32
STREQ r2,trajnow
LDR r3,[r2]
STR r3,scs
LDR r3,[r2,#4]
MOV r0,r3,LSR #8
STR r0,trajrpt
trajshapes%
[OPTZ%
S r3,r3,#255
LDRNE r2,trajshap
LDRNE r3,[r2,r3,LSL #2]
ADDNE r3,r3,#12
STR r3,shap
[OPTZ%
.leavetrajalone
MOV r0,#4
LDR r2,timetodisp
playfor%=0
[OPT Z%
.checkframetime
LDR r1,rn%
CMN r1,#1
QS pc,r14
LDR r2,ef
CMP r1,r2
BCS finishedit
STR r2,rn%
LDR r0,dbu
LDR r1,[r0]
SUB r3,r1,#1
STR r3,[r0],#16
LDR r3,adsz
ADD r2,r0,r3,LSL #1
LDR r3,ippe
CMP r2,r3
LDRCS r2,ipp
STR r2,dbu
.0STMFD r13 !,{r4,r5,r6,r7,r8,r9,r10,r11,r14}
[OPT Z%
.checkframetime
CMP r2,r1
MOVCSS pc,r14
LDR r1,fpstime
ADD r2,r1,r2
STR r2,timetodisp
LDR r1,mute
TST r1,#4
MOVNES pc,r14
TST r1,#1
<2STMNEFD r13 !,{r4,r5,r6,r7,r8,r9,r10,r11,r14}
BNE gofordecomp
LDR r1,rn%
CMN r1,#1
QS pc,r14
LDR r2,ef
CMP r1,r2
BCS finishedit
ADD r1,r1,#1
STR r1,rn%
LDR r2,rund
SUB r2,r2,#1
STR r2,rund
LDR r0,dbu
LDR r1,[r0]
SUB r3,r1,#1
STR r3,[r0],#16
LDR r3,adsz
ADD r2,r0,r3,LSL #1
LDR r3,ippe
CMP r2,r3
LDRCS r2,ipp
STR r2,dbu
LDR r2,paint
CMP r2,#0
BNE rapidexit
.skiploc
LDR r2,rn%
TST r2,#1
BNE rapidexit
Z0STMFD r13 !,{r4,r5,r6,r7,r8,r9,r10,r11,r14}
CMP r1,#1
BEQ dopaint
LDR r4,displayframe
LDR r5,[r0,#-12]
CMP r4,r5
BCS skippaint
LDR r6,rn%
RSB r4,r1,#1
CMP r4,#5
MOVCS r4,#5
MOV r7,#1
MOV r7,r7,LSL r4
SUB r7,r7,#1
TST r6,r7
BNE skippaint
[OPT Z%
.dopaint
LDR r1,mute
TST r1,#32
BNE invisible
.dopaint2
MOV r1,#1
STR r1,paint
LDR r1,[r0,#-12]
STR r1,displayframe
MOV r4,PC
BIC r4,r4,#1<<27
TEQP r4,#0
LDR r11,scs
BIC r11,r11,#3
video
mask%=3
shape%
[OPT Z%
LDR r12,shap
trajshapes%
[OPT Z%
CMP r12,#0
BEQ defaultrect
[OPT Z%
LDMIA r12!,{r1}
MOV r8,#&ff
R r8,r8,#&ff00
.shapdisl
MOVS r3,r1,LSR #24
BIC r1,r1,#&ff000000
ADD r1,r1,r11
magy%>1
[OPTZ%
addmacro(4,1,rowbytes%*magy%
[OPTZ%
BEQ shaponeonly
TST r1,#3
BNE shapdispnotword
.shapdisp
LDMIA r12!,{r5,r6}
LDR r5,[r0,r5]
LDR r6,[r0,r6]
ncol
[OPT Z%
r7,r5,#15
R r7,r7,r6,LSL #4
STRB r7,[r1],#1
magy%>1
[OPT Z%
BIC r7,r6,#15
R r7,r7,r5,LSR #4
STRB r7,[r4],#1
[OPT Z%
STRB r5,[r1],#1
STRB r6,[r1],#1
magy%>1
[OPTZ%
MOV r5,r5,LSR #8
STRB r5,[r4],#1
MOV r6,r6,LSR #8
STRB r6,[r4],#1
magx%=2
magy%>1
[OPT Z%
r5,r5,r6,LSL #16:
r6,r6,r5,LSR #16:
r5,r5,r6,LSL #16
STMIA r1!,{r5}
STMIA r4!,{r6}
magx%=1
magy%>1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
STRB r6,[r1],#1
MOV r6,r6,LSR #8
STRB r6,[r4],#1
magx%=2
magy%=1
[OPT Z%
R r7,r5,r6,LSL #16
STR r7,[r1],#4
magx%=1
magy%=1
[OPT Z%
STRB r5,[r1],#1
STRB r6,[r1],#1
65535
magx%=2
[OPT Z%
STMIA r1!,{r5,r6}
magy%>1
[OPT Z%
STMIA r4!,{r5,r6}
magy%=1
[OPT Z%
R r5,r5,r6,LSL #16
STMIA r1!,{r5}
[OPT Z%
r5,r5,r6,LSL #16:
r6,r6,r5,LSR #16:
r5,r5,r6,LSL #16
STMIA r1!,{r5}
STMIA r4!,{r6}
magx%=2
[OPT Z%
MOV r8,r6
MOV r7,r6
MOV r6,r5
STMIA r1!,{r5,r6,r7,r8}
magy%>1
[OPT Z%
STMIA r4!,{r5,r6,r7,r8}
[OPT Z%
STMIA r1!,{r5,r6}
magy%>1
[OPT Z%
STMIA r4!,{r5,r6}
[OPT Z%
SUBS r3,r3,#2
BGT shapdisp
BMI shapevenshape
B shaponeonly
.shapdispnotword
LDMIA r12!,{r5,r6}
LDR r5,[r0,r5]
LDR r6,[r0,r6]
ncol
[OPT Z%
r7,r5,#15
R r7,r7,r6,LSL #4
STRB r7,[r1],#1
magy%>1
[OPT Z%
BIC r7,r6,#15
R r7,r7,r5,LSR #4
STRB r7,[r4],#1
[OPT Z%
STRB r5,[r1],#1
STRB r6,[r1],#1
magy%>1
[OPTZ%
MOV r5,r5,LSR #8
STRB r5,[r4],#1
MOV r6,r6,LSR #8
STRB r6,[r4],#1
magx%=2
magy%>1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r1],#1
STRB r6,[r1],#1
MOV r6,r6,LSR #8
STRB r6,[r1],#1
MOV r5,r5,LSR #8
MOV r6,r6,LSR #8
STRB r5,[r4],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
STRB r6,[r4],#1
MOV r6,r6,LSR #8
STRB r6,[r4],#1
magx%=1
magy%>1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
STRB r6,[r1],#1
MOV r6,r6,LSR #8
STRB r6,[r4],#1
magx%=2
magy%=1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r1],#1
STRB r6,[r1],#1
MOV r6,r6,LSR #8
STRB r6,[r1],#1
magx%=1
magy%=1
[OPT Z%
STRB r5,[r1],#1
STRB r6,[r1],#1
65535
magx%=2
[OPT Z%
LDMIA r1,{r7,r9,r10}
BIC r7,r7,r8,LSL #16
R r7,r7,r5,LSL #16
MOV r9,r5,LSR #16
R r9,r9,r6,LSL #16
BIC r10,r10,r8
R r10,r10,r6,LSR #16
STMIA r1,{r7,r9,r10}
ADD r1,r1,#8
magy%>1
[OPT Z%
LDMIA r4,{r7,r9,r10}
BIC r7,r7,r8,LSL #16
R r7,r7,r5,LSL #16
MOV r9,r5,LSR #16
R r9,r9,r6,LSL #16
BIC r10,r10,r8
R r10,r10,r6,LSR #16
STMIA r4,{r7,r9,r10}
ADD r4,r4,#8
magy%=1
[OPT Z%
R r7,r5,r6,LSL #16
LDMIA r1,{r7,r9}
BIC r7,r7,r8,LSL #16
R r7,r7,r5,LSL #16
BIC r9,r9,r8
R r9,r9,r6
STMIA r1,{r7,r9}
ADD r1,r1,#4
[OPT Z%
r5,r5,r6,LSL #16:
r6,r6,r5,LSR #16:
r5,r5,r6,LSL #16
LDMIA r1,{r7,r9}
BIC r7,r7,r8,LSL #16
R r7,r7,r5,LSL #16
BIC r9,r9,r8
R r9,r9,r5,LSR #16
STMIA r1,{r7,r9}
LDMIA r4,{r7,r9}
BIC r7,r7,r8,LSL #16
R r7,r7,r6,LSL #16
BIC r9,r9,r8
R r9,r9,r6,LSR #16
STMIA r4,{r7,r9}
ADD r1,r1,#4
ADD r4,r4,#4
[OPT Z%
SUBS r3,r3,#2
BGT shapdispnotword
BMI shapevenshape
[OPTZ%
.shaponeonly
LDMIA r12!,{r5}
LDR r5,[r0,r5]
ncol
[OPT Z%
STRB r5,[r1],#1
magy%>1
[OPTZ%
MOV r5,r5,LSR #8
STRB r5,[r4],#1
magx%=2
magy%>1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
magx%=1
magy%>1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
magx%=2
magy%=1
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r1],#1
magx%=1
magy%=1
[OPT Z%
STRB r5,[r1],#1
65535
magx%=2
[OPT Z%
TST r1,#3
STREQ r5,[r1]
LDMNEIA r1,{r6,r7}
BIC r6,r6,r8,LSL #16
R r6,r6,r5,LSL #16
BIC r7,r7,r8
R r7,r7,r5,LSR #16
STMNEIA r1,{r6,r7}
ADD r1,r1,#4
magy%>1
[OPT Z%
STREQ r5,[r4]
LDMNEIA r4,{r6,r7}
BIC r6,r6,r8,LSL #16
R r6,r6,r5,LSL #16
BIC r7,r7,r8
R r7,r7,r5,LSR #16
STMNEIA r4,{r6,r7}
ADD r4,r4,#4
[OPT Z%
STRB r5,[r1],#1
MOV r5,r5,LSR #8
STRB r5,[r1],#1
magy%>1
[OPT Z%
MOV r5,r5,LSR #8
STRB r5,[r4],#1
MOV r5,r5,LSR #8
STRB r5,[r4],#1
magx%=2
[OPT Z%
MOV r6,r5
STMIA r1!,{r5,r6}
magy%>1
[OPT Z%
STMIA r4!,{r5,r6}
[OPT Z%
STMIA r1!,{r5}
magy%>1
[OPT Z%
STMIA r4!,{r5}
[OPT Z%
.shapevenshape
LDMIA r12!,{r1}
CMN r1,#1
BNE shapdisl
trajshapes%
[OPT Z%
B shapepainted
5C%=sy%:
sy%*magy%>screenrows C%=screenrows
magy%
7D%=sx%:
sx%*bpp%/8>rowbytes% D%=rowbytes%
(bpp%/8)
shape%=
trajshapes%<>
defaultrect=P%
interp%<>0
ncol=63
[OPT Z%
LDR r2,adrr
MOV r1,#C%
LDR r12,adrp
.disl MOV r3,#D%
STR r1,interpcount
[OPT Z%
LDR r2,adrr
MOV r12,#C%
.disl MOV r3,#D%
magy%>1
[OPTZ%
addmacro(2,11,rowbytes%*magy%
interp%=2
ncol=-1
[OPT Z%
MOV r10,#256
R r10,r10,#65536
ncol=65535
interp%=1
[OPT Z%
MOV r10,#31<<5
R r10,r10,#63<<15
R r10,r10,#31<<10+16
ncol=65535
interp%=2
[OPT Z%
STR r12,interpcount
MOV r10,#31<<5
R r10,r10,#63<<15
R r10,r10,#31<<10+16
pad:incno%=8:[OPT Z%:.disp:]
ncol
G%mask%=0:
magy%>1
d12x2y
d12x1y
magy%>1
d22x2y
magx%=1
d21x1y
d22x1y
magy%>1
d42x2y
d42x1y
magx%=2
magy%=2
interp%
d82x2yintxinty
d82x2y:
15)=0 incno%=16:
d82x2y
magy%=4
d82x4y
szmul%=1
15)=0
incno%=16
[OPT Z%
`)LDMIA r0 !,{r1,r4,r5,r6,r7,r8,r9,r10}
a*STMIA r11 !,{r1,r4,r5,r6,r7,r8,r9,r10}
[OPT Z%
LDMIA r0 !,{r1,r4,r5,r6}
STMIA r11 !,{r1,r4,r5,r6}
d82x1y:
15)=0 incno%=16:
d82x1y
magy%=1
d81x1y
d81x2y
65535
magx%=2
magy%=2
interp%
d162x2yintxinty
d162x2yintx
d162x2y
magy%=4
interp%
d162x4yintxinty
d162x4yintx
d162x4y
interp%
d162x1yintx
d162x1y:
15)=0 incno%=16:
d162x1y
magy%=1
d161x1y
d161x2y
magx%=2
magy%=2
interp%
d322x2yintxinty
d322x2yintx
d322x2y
magy%=4
interp%
d322x4yintxinty
d322x4yintx
d322x4y
interp%
d322x1yintx
d322x1y
magy%=1
d321x1y
d321x2y
[OPTZ%
SUBS r3,r3,#incno%
BNE disp
D%<>sx%
[OPTZ%
ADD r0,r0,#4*(sx%-D%)
magy%>1
[OPTZ%
LDR r2,adrr
interp%<>0
ncol=63
[OPTZ%
ADD r11,r11,r2
LDR r1,interpcount
SUBS r1,r1,#1
BNE disl
ncol=65535
interp%=2
[OPTZ%
ADD r11,r11,r2
LDR r12,interpcount
SUBS r12,r12,#1
BNE disl
[OPTZ%
ADD r11,r11,r2
SUBS r12,r12,#1
BNE disl
[OPT Z%
.shapepainted
MOV r4,PC
R r4,r4,#1<<27
TEQP r4,#0
paintuser%
[OPT Z%
ADR r0,paintuserdata
LDR r1,scs
BIC r1,r1,#3
LDR r2,rn%
BL paintuser%
[OPT Z%
MOV r3,#0
STR r3,paint
.skippaint
LDR r1,mute
TST r1,#8
BLNE donesingleframe
LDR r3,rund
CMP r3,#bf
BGE nodecompress
.gofordecomp
video
[OPTZ%
LDR r2,inde
CMP r2,#0
BNE nodecompress
MOV r3,#1
STR r3,inde
C%=bf
C%>6 C%=6
[OPTZ%
BL dec%
[OPTZ%
/LDMFD r13 !,{r4,r5,r6,r7,r8,r9,r10,r11,r14}
MOV r3,#0
STR r3,inde
.rapidexit
MOV r0,#4
B recycleplay
.nodecompress
snd%
[OPTZ%
LDR r0,sndcopy
LDR r1,sndcopy+8
R r1,r0,r1
CMP r1,#0
BEQ nodecomp2
LDR r1,sndba
LDR r2,[r1,#4]
LDR r1,sndbb
LDR r1,[r1,#4]
RS r1,r1,r2
BEQ nodecomp2
LDR r1,mute
TST r1,#4
BNE nodecomp2
LDR r4,ugly
CMP r4,#0
BNE nodecomp2
MOV r4,#99
STR r4,ugly
MOV r4,pc
R r4,r4,#3
TEQP r4,#0
MOV r0,r0
STR r14,uglylink
BIC r4,r4,#1<<27
TEQP r4,#0
CMP r0,#0
BEQ mustbe2
LDR r1,sndcopy+4
BL snddata%
MOV r0,#0
STR r0,sndcopy
B nodecomp3
.mustbe2 LDR r0,sndcopy+8
LDR r1,sndcopy+12
BL snddata%
MOV r0,#0
STR r0,sndcopy+8
.nodecomp3
MOV r4,pc
R r4,r4,#1<<27
TEQP r4,#0
LDR r14,uglylink
BIC r4,r4,#3
R r4,r4,#2
TEQP r4,#0
MOV r4,#0
STR r4,ugly
B nodecomp2
.sndba DCD !sndbuffer%
.sndbb DCD sndbuffer%!4
.ugly DCD 0
.uglylink DCD 0
[OPTZ%
R:.nodecomp2 LDMFD r13 !,{r4,r5,r6,r7,r8,r9,r10,r11,r14}
MOV r0,#4
B recycleplay
.ipp DCD bb%
V!.ippe DCD bb%+bf*sz%*2+bf*16
.inde DCD 0
.rund DCD 0
.dec%
STMFD r13 !,{r14}
LDR r1,decto
LDR r2,[r1],#16
CMP r2,#1
playfor%<>0
[OPT Z%
CMP r2,#1
LDMEQFD r13!,{pc}^
[OPT Z%
LDR r2,decfrom
ADD r2,r2,#16
LDR r5,adbu
LDR r4,[r5,#8]
CMP r4,#0
LDMNEFD r13!,{PC}^
LDR r0,addb
LDR r3,adrp
MOV r4,#0
plook(4,4,3)
STR r4,[r1,#-4]
MOV r4,#&ff
R r4,r4,#&7f00
plook(4,4,3)
STR r4,[r1,#-8]
MOV r4,PC
BIC r4,r4,#1<<27
TEQP r4,#0
ADR r4,decx
B decl
z+.decfrom DCD bb%+(bf-1)*sz%*2+(bf-1)*16
.decto DCD bb%
.decframe DCD 0
.adbu DCD adb1
.adsz DCD sz%
.adnumpix DCD ipsz%
.adrp DCD p%
'.adrr DCD rowbytes%*magy%-D%*bpp%/8
.addb DCD op0%
.run DCD fpf
.shap DCD shap%+12
.interpcount DCD 0
paintuser%
mouseuser%
[OPT Z%
.paintuserdata
DCD nx
DCD ny
DCD ncol
DCD screenstart%
DCD rowbytes%
DCD screenrows
DCD magy%
DCD sx%
DCD sy%
DCD fps*100
P%=P%+31
[OPTZ%
.adb1 DCD op0%
DCD 0
DCD 0
DCD 0
.adb2 DCD op1%
DCD 0
DCD 1
DCD 0
.decx
MOV r4,PC
R r4,r4,#1<<27
TEQP r4,#0
STR r0,addb
LDR r0,run
SUBS r0,r0,#1
BNE notbend
LDR r1,adbu
twobuf%
[OPTZ%
LDR r2,[r1,#4]
TEQ r2,#0
MOVNE r0,#0
STRNE r0,[r1,#4]
BNE halfbend
[OPTZ%
MOV r0,#1
STR r0,[r1,#8]
r1,r1,#16
STR r1,adbu
LDR r2,[r1]
.halfbend
STR r2,addb
MOV r0,#fpf
.notbend
STR r0,run
LDR r0,decto
STR r0,decfrom
LDR r1,decframe
ADD r1,r1,#1
STR r1,decframe
STR r1,[r0,#4]
LDR r1,[r0]
ADD r1,r1,#1
STR r1,[r0],#16
LDR r6,adsz
ADD r6,r0,r6,LSL #1
LDR r4,ippe
CMP r6,r4
LDRCS r6,ipp
STR r6,decto
LDR r1,rund
ADD r1,r1,#1
STR r1,rund
LDMFD r13 !,{r14}
MOVS PC,R14
P%-code%>codesize% Panic
string(a%)
%a$="":
?a%>=32:a$+=
?a%:a%+=1:
lookup2(t$,p1$,p2$)
s%,f%,b%
"MessageTrans_FileInfo",,"<ArMovie$Dir>.Messages"
,,s%
f% s%,b% 256
"MessageTrans_OpenFile",b%,"<ARMovie$Dir>.Messages",f%
"MessageTrans_Lookup",b%,t$,b%+16,240,p1$,p2$
,,s%
"MessageTrans_CloseFile",b%
string(s%)
lookup1(t$,p1$)=
lookup2(t$,p1$,"")
lookup(t$)=
lookup2(t$,"","")