' The Amazing Cracking Conspiracy™ Proudly Presents: ' Low to High Converter v2.2, released on Sunday, August 17th, 1986 ' ' Rewritten for ST NEWS Volume 1, Issue 4 ' ' Original Concept by Sven Krüppel, ©1986 by Level 16 ' GfA Basic version ©1986 by The Amazing Cracking Conspiracy™ ' ' Main program ' Begin: Gosub Screen If B=2 Then Goto Mouson Endif Dim W(80) Alert 3,"Please insert|Source Disk|and select|Picture",1,"OK",B Fileselect "\*.*","",L$ If L$="" Then Goto Mouson Endif Alert 3,"Please enter|Target name",1,"OK",B Fileselect "\*.PI3","",S$ Gosub Laad Gosub Convert Gosub Weg Out 2,7 A=Inp(2) If Inp(2)=255 Then Goto Mouson Endif Goto Begin ' ' End of Main program ' ' Loading the picture ' Procedure Laad Sm=491520 Bload L$,Sm+32 For I=Sm To Sm+158 Poke I,0 Next I Return ' ' Saving the picture ' Procedure Weg Restore For Q=0 To 33 Read Z Poke (Sm-34)+Q,Z Next Q Bsave S$,Sm-34,32034 Return ' ' The actual Conversion routine ' Procedure Convert For Y=Sm+160 To Sm+31840 Step 160 For X=0 To 79 W(X)=Dpeek(Y+X*2) If Sgn(W(X))=-1 Then W(X)=65536+W(X) Endif Next X X1=0 For X=0 To 76 Step 4 K=32768 J=1 Label1: H1=32768 H2=H1 P1=0 P2=0 Label2: If W(X)>=K Then P1=P1+H1 W(X)=W(X)-K Endif H1=H1/2 If W(X+1)>=K Then P1=P1+H1 W(X+1)=W(X+1)-K Endif H1=H1/2 If W(X+2)>=K Then P2=P2+H2 W(X+2)=W(X+2)-K Endif H2=H2/2 If W(X+3)>=K Then P2=P2+H2 W(X+3)=W(X+3)-K Endif H2=H2/2 K=K/2 If J=8 Then Dpoke Y+X1*2,P1 Dpoke Y+X1*2+80,P2 J=1 X1=X1+1 Goto Label1 Endif J=J+1 If K>=1 Then Goto Label2 Endif Next X Next Y Return ' ' End routine ' Mouson: Cls Spoke 16745024,-1 End ' ' Data for first 34 bytes of monochrome inverted DEGAS picture ' Data 0,2,0,0,7,&h77,0,&h70,0,0,7,&h77 Data 7,0,0,&h70,7,&h70,0,7,7,7,0,&h77,5,&h55 Data 0,&h33,7,&h33,3,&h73,7,&h73 ' ' Screen initialization & Text printing ' Procedure Screen Cls Spoke 16745024,0 Deftext ,16,500,6 Text 10,398,"THE AMAZING CRACKING CONSPIRACY PRESENTS" Deftext ,1,0,26 Text 50,26,"LOW-HIGH CONVERTER VERSION 2.2" Deftext ,0,0,6 Text 50,389,"This program converts a neo-format picture to High Res Degas format" Return