home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 March
/
Ahoy_Magazine_87-03_1987_Double_L.d64
/
Picmasher
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
3KB
|
70 lines
0 rem *********************************
1 rem ***** picmasher *****
2 rem ***** by scott miller petty *****
3 rem ***** 407 b. smith avenue *****
4 rem ***** chapel hill, n.c. *****
5 rem ***** 27514 *****
6 rem ***** (919)-967-8522 *****
7 rem *********************************
10 ifz<>0then175
15 ifa=0thena=1:load"compressor.o",8,1
20 ifa=1thena=2:poke56,19:poke55,135:clr:a=2:dimf$(3)
25 poke53281,15:poke53280,12:poke646,6
30 s$="[151] picmasher [146]":pa=30960
35 ko$=""+chr$(193)+"[146]pic ":mi$="pic."
40 print"[147]"s$""tab(12)"k[146]oala":printtab(12)"m[146]icroillustrator"
45 printtab(12)"o[146]ther"
50 wait198,15:gett$:bg=0:bo=0
55 ift$="k"thenp$=ko$:p=1:l1=32576:l2=33576:l3=24576:bg=34576:bo=0
60 ift$="m"thenp$=mi$:p=1:l1=6384:l2=7384:l3=8384:bg=6364:bo=6365
65 ift$<>"o"andt$<>"m"andt$<>"k"then50
70 ift$="o"thenprint"[147]"s$:goto95
75 print"[147]"s$:input"filename of picture ";f$:p$=p$+f$
80 print"[145]"tab(23)""p$"[146]":ifleft$(p$,1)<>chr$(18)then95
85 l=len(p$):ifl<17thenp$=p$+chr$(32):goto85
90 p$=right$(p$,14):p$=chr$(129)+p$
95 input"new load address of pic ";f:n$=right$(str$(f),len(str$(f))-1)
100 print"[145]"tab(27)""n$"[157][146]":f1=int(f/256):f2=f-256*f1
105 ifpthen165
110 print"file loads in [156]1[146] 2[146] 3[146] parts ?":wait198,15:gett$:d=val(t$)
115 print"[145]"tab(15)" "t$" [146]"
120 fori=1tod:print"filename of part"i:input"[145]";f$(i)
125 print"[145]"tab(22)f$(i)"[146]":next:p$=f$(1):f$=p$
130 input"address of video matrix is ";l1
135 l1$=right$(str$(l1),len(str$(l1))-1):print"[145]"tab(30)""l1$"[157][146]"
140 input"address of color memory is ";l2
145 l2$=right$(str$(l2),len(str$(l2))-1):print"[145]"tab(30)""l2$"[157][146]"
150 input"address of your bit map is ";l3
155 l3$=right$(str$(l3),len(str$(l3))-1):print"[145]"tab(30)""l3$"[157][146]"
160 fori=1264to1743:pokei,32:next:print""
165 k$="[151] [146]":print""k$""k$
170 print"[145][145][145] insert picture disk and hit return [146]":wait198,15:gett$
175 ifpthen195
180 ifz=0thenz=1:loadf$(1),8,1
185 ifd>1thenifz=1thenz=2:loadf$(2),8,1
190 ifd>2thenifz=2thenz=3:loadf$(3),8,1
195 ifz=0thenz=1:loadp$,8,1
200 ifl3=24576thenp$=right$(p$,14):p$="[193][146]"+p$
205 print""p$" is now loaded"
210 print""k$""k$:bg=peek(bg):bo=peek(bo)
215 print"[145][145][145]insert destination disk and hit return [146]":wait198,15:gett$
220 cp=49152:sv=cp+324
225 ifl1>29960andl1<40960thenpa=5000
230 ifl2>29960andl2<40960thenpa=5000
235 ifl3>29960andl3<40960thenpa=5000
240 syscp,l1,pa,1000
245 ra=peek(253)+256*peek(254)
250 syscp,l2,ra,1000
255 ra=peek(253)+256*peek(254)
260 syscp,l3,ra,8000
265 ra=peek(253)+256*peek(254)
270 ifl3=24576thenf$=right$(f$,len(f$)-2)
275 open2,8,2,f$+chr$(160)+n$+",p,w":syssv,pa,ra,f:print#2,chr$(bg)chr$(bo)
280 close2:sys65484:printtab(6)"old file length = 10000 bytes"
285 printtab(6)"new file length =";:ra=ra-pa:printra"bytes":sa=10000-ra
290 printtab(6)"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
295 printtab(6)"memory saved ="sa"bytes":printtab(13)" hit any key [145][146]"
300 wait198,15:gett$
305 print"[147]"s$" another file (y/n)":wait198,15:gett$
310 ift$="y"thenz=0:open15,8,15:print#15,"i0:":close15:goto25