home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 159
/
159.d81
/
hams.packer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
71 lines
10 poke56,144:clr:dv=peek(2039):dimf$(254),f(255):poke53281,15:poke53280,15
15 print"[147]"
20 sys57812"menubox c000",dv,0:poke780,0:poke781,0:poke782,192:sys65493
30 sys57812"rle 9000",dv,0:poke780,0:poke781,0:poke782,144:sys65493
35 hx$="0123456789abcdef":ad=4864
37 restore:fori=1to8:readt:sys49152+3,0,39,0,24,t,0:forz=1to10:next:next
38 data 100,111,121,98,248,247,227,160
39 poke53281,0:print"[147]"
40 print"[147][158][200][193][205][211] [208]acker [205]odule":sys49152+63,0:sys49152+39,53248
41 print:print" [211]ource drive:"
42 fori=8to29:a$=str$(i):sys49152+42,a$,i-8,0:next
43 sys49152+57,15,20,2,10,0,3,1,7,0,21,0:sd=f%+8
60 open2,sd,2:close2:ifstthen40
61 sys49152+3,15,20,2,10,32,0
62 print"[158]"sd
80 print" [196]estination [196]rive:";:a$=str$(sd):sys49152+42,a$,sd-8,1
83 sys49152+57,20,25,4,12,0,3,1,7,0,21,0:dd=f%+8
100 open2,dd,2:close2:ifstthenprint"[145][145]":goto83
105 sys49152+3,20,25,4,12,32,0
110 print"[158]"dd
112 print" [205]ovie name: ";:sys49152+66,7,3,8,"":mv$=w$:ifmv$=""then250
115 mp$=mv$+left$(" ",8-len(mv$))
120 print"":sys49158,2,36,8,21,7:rem frame for file requestor
125 print" [195][210][211][210]/[210][197][212][213][210][206] select - [211][208][193][195][197] exit"
130 open1,sd,15,"i0":close1:rem don't remove
140 sys49206,"$*",sd,53248:nf=f%:sys49212,3,9,20,1,3,1,7,1
145 fori=0tonf:sys49197,i:a=a+f%:next:ifa<>0then147
146 print"[147][206]o [198]iles [211]elected":print:goto250
147 print"[147][208]acking [198]rames"
150 fori=0tonf:sys49197,i
160 iff%<>0thenf=f+1:goto180
170 next:goto200
180 iff>255theni=nf:goto170
190 f$(f-1)=w$:hf=f-1:goto170
200 fori=0tohf:hf$=mid$(hx$,int(((i+1)/16)+1),1)+mid$(hx$,((i+1)and15)+1,1)
205 print""hf$" "f$(i)ad"to";:
207 f(i)=ad
210 sys36867,f$(i),sd,40960,mp$+hf$,dd,8192
211 ad=ad+(peek(253)+peek(254)*256)-53247:printad-1
215 ifad>53247thenprint"out of memory : stopped at frame"i+1:hf=i
220 open15,dd,15:input#15,a,b$,c,d
230 if a=0thenclose15:next:f(i)=ad:goto20000
240 print"[196]isk [197]rror:":print"[158]"a","b$","c","d:close15:end
250 print:print"[158][208]lease insert system disk in drive"dv:poke186,dv
252 print"[159]-[208]ress any key to continue-":poke198,0
254 geta$:ifa$=""then254
260 print"[147]";:poke56,160:clr:d=peek(186):load"b.hams menu",d:end
9999 stop
10000 d=peek(186):open1,d,15,"s:hams.packer":close1:save"hams.packer",d:end
20000 rem get usr.ani.data
20010 print"[147][198]rame [208]acking [195]ompleted[146]"
20015 print"[197]nter the animation background ";
20020 sys49152+66,7,3,2,"0":bgnd=val(w$)
20025 print"[197]nter the animation foreground ";
20030 sys49152+66,7,3,2,"1":fgnd=val(w$)
20035 print"[197]nter the delay (jiffies) ";
20040 sys49152+66,7,3,3,"16":d=val(w$):ifd>255thend=255
20045 cmask=bgnd+fgnd*16:cm$=chr$(cmask):nf$=chr$(hf+1):d$=chr$(d)
20050 rem wrt.data.tbl
20053 print"[147][215]riting data file[146]":print
20055 tbladr=4349:rem $10fd
20057 hb=int(tbladr/256):lb=tbladr-hb*256:hb$=chr$(hb):lb$=chr$(lb)
20058 open 2,dd,2,"hdat."+mv$+",p,w":print#2,lb$hb$nf$cm$d$;
20060 fori=0tohf+1:print"[193]dding frame "i+1
20070 hb=int(f(i)/256):lb=f(i)-hb*256:hb$=chr$(hb):lb$=chr$(lb)
20075 print#2,lb$hb$;:next:print#2,chr$(0):close2
20080 open15,dd,15:input#15,a,b$,c,d
20082 if a=0thenclose15:goto20100
20083 print:goto240
20100 close2:print"[198]inished!":print:goto250