DC4_folder [5.22]/code your files [4.22] /super mario [8.21]
Jan 22, 2020 21:29:04 GMT -5
matthew likes this
Post by hedgehog7777 on Jan 22, 2020 21:29:04 GMT -5
last edit:may 2022:find dc4_folder
'
Code and decode all your files with a key-file 7:26 PM 1/22/2020
'
a small game (coded) is hidden into the zip-folder.
decode the game with :binaer_31.small_code.03.gb
'
it takes about 2 min to decode the game: Winmine__XP.exe
Hedgehog_PCN
'
![]()



![]()
'--------------------------------------------------------------------------------------------------------------------------------
' june 2021
and here a small super mario picture
i'd like to introduce game-emulator and games.
'
keys:JL,IK to move the center (press ctrl once for 10*faster). arrow up+down to fly forward or backward
arrow left and right to circle around a center adjust flying-speed with F1
'
(extract , mix 'pengo.00.00.b8.zip' and 'copy into textures.zip' with COPY)
'
feel FREE to write me E-mail:chuck.summer@mail.com
'--------------------------------------------------------------------------------------------------------------------------------
dim a1,b,c,key:declare sub code(c1,key)
'
resizetext (80,30)
code(234,210)
code(a1,210)
printr "-------------------------------------------------"
printr:
printr " 234 = 11101010"
printr "xor 210 = 11010010 = coding"
printr " = 56 = 00111000"
printr:printr "the bits from 234 stay in result 56 the same : the bit in 210 is 0:"
printr "1 xor 0 = 1 0 xor 0 = 0"
printr:printr "the bits from 234 turn when the bit from 210 is 1:"
printr "1 xor 1 = 0 0 xor 1 = 1"
printr
printr "234....coding(xor 210)......56(234_coded)"
printr
printr "decoder:"
printr "56.....decoder(xor 210)......234(56 is decoded)"
printr
printr "#210........is a decimal_value (not a register)"
printr "#$d2........is a hexadecimal_value (=210 decimal)"
printr
printr "code on byte (0-255__$0-$ff__%00000000-%11111111)"
printr "in every computer_register can we store:1 byte (that is 8 Bits)"
printr
printr "this is beginner's assembler knowledge from the commodore_64 computer"
printr "this was a computer in the 1980's with 64Kb memory and a 6502_processor"
'
end
'
sub code(c1,key):
print "c1=";c1:
print " key:";key
a1=c1 xor key:printr " code:";a1:
end sub
'*******************************************************************************************************************************
'5.22
'build a dc4 folder with :.write_new_folder.0030.fin.gb
'decompress folder with:.read_new_folder_and_decompress_0006.gb
'
'(the programms are slow and should be written in assembler-code)
'feel free to send me programm_improvements: chuck.summer@mail.com
'*******************************************************************************************************************************
'.write_new_folder.0030.fin:
'
declare sub read_file(a) :declare sub c(i) :declare sub write_file(a$,l) :declare sub file_error()
declare function mb(a) :declare sub wait(i2) :declare sub fill_e0_with_b(wf,hmb):declare function mi$(i0)
declare function sa$(i#) :declare sub window(x,y):declare sub find_all_files(g$):declare sub write_foldercontent(a$)
'source --------------------------------------------------------------------------------------------------------------------------
dim a,hmf,i,fn$ 'fn$="Winmine"
const mle=5000000 'max.lenght (byte)
dim a$,a1$
dim b1,b3,b4(mle) as integer
dim b$(9),b1$,b0$,b2$
dim c$(99)'write_file
dim d0 as integer
dim e(20000000) as integer
dim file,file2,file3 as integer
'
find_all_files("files/"):for i=1 to hmf:a$=left$(c$(i),14):if a$=".for compress_" then fn$=right$(c$(i),len(c$(i))-14):endif:next
'
dim i0,i1,i2,i3,ia,ib,i7,i7b,i9,i9b as integer
dim l(99),l1,l2,l3,l4,l5 as integer
dim wf as integer
'-------------------------------------------------------------------
dim i4,cr(10),c4(999,2)'1000 colors
for a=0 to 9:cr(a)=a*28:next'1000 text_colors
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next'1000 text_colors
sub c(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'source --------------------------------------------------------------------------------------------------------------------------
window(1900,600):resizetext(90,40)
c(090):printr "build a dc4_folder":c(999)
printr "1) open folders (where to find 2 prg's):"
printr " .write_new_folder.0030.fin.gb"
printr " .read_new_folder_and_decompress_0006.gb"
printr " files/"
printr " files/.for compress_myname/" 'New Folder
printr " files/New Folder/"
printr " files/New Folder/decompressed/"
printr
c(777)
printr "2) copy all files to combine into: files/.for compress_myname/"
print "3) change this folder_name:'.for compress_":c(990):printr "my new name'"
c(990):
print " .for compress_":c(888):printr " must stay part of new folder_name."
'
c(900):printr:printr"press enter"
input a$:cls
'
find_all_files("files/.for compress"+"_"+fn$+"/") 'c$(0)(1 to hmf(0))
dim b(hmf)(mle)
'
locate 0,0:print "read_file (1000 bytes) found in:":c(090):printr ".for compress_";fn$;"/":c(777)
for i0=1 to hmf:locate 0,4+i0:printr " ";c$(i0):read_file(i0):next
clearregion(0,0,60,1)
'----------------------------------------------------------------------------------------------------------------------------------------
a1$=mi$(30):l1=0
locate 6,4:printr "combine files to dc4_folder"
for ia=1 to hmf:ib=ia-1 :'printr a1$ :c(900):printr c$(ib):c(888):
l1=l1+l(ib):fill_e0_with_b(ia,l1):next
'----------------------------------------------------------------------------------------------------------------------------------------
l1=l1+l(hmf)'all_size=l1+last size
'
c(900) :locate 0,0:printr l1
'
b0$="New Folder/"
b1$=fn$+".dc4":'write b(0)(1-l1)
b2$=fn$+".txt"
'
locate 10,1:printr"write :files\New Folder\";fn$;".dc4"
c(090):locate 10,0 :printr "find:files\New Folder\.content_";fn$;".txt (dc4_folder_content)":c(777)
write_foldercontent(".content_"+b2$)'what filnames and file_sizes are in folder
write_file(b0$+b1$,l1)
'
c(090):printr:printr "end"
end
'**********************************************************************************************************************************************
sub fill_e0_with_b(wf,hmb) :dim a$,d
for i=1 to l(wf)
a$=""
i1=hmb+i
e(i1)=b(wf)(i) :
i7=i7+1:if i7=1000 then i7=0:i7b=i7b+1:locate 0,4:printr i7b:endif
next
end sub
'------------------------------------------------------------------------------------------------------------------------
sub read_file(a)
file = openfileread("files/.for compress"+"_"+fn$+"/"+c$(a)):file_error()
i=1:i9=0:i9b=0
do:b1=endoffile(file):
if not(b1) then:
e(i)=Readbyte(file):i=i+1:i9=i9+1:if i9=1000 then i9=0:i9b=i9b+1:locate 0,4+a:print i9b:endif
endif:
loop until b1:l(a)=i-2:l1=l(a)
CloseFile (file)
end sub
'------------------------------------------------------------------------------------------------------------------------
sub write_file(a$,l):l2=0 'write b(0)
file3 = OpenFileWrite ("files/"+a$):file_error()
for i0=1 to l:writebyte(file3,e(i0)):l2=l2+1:if l2=1000 then l3=l3+1:l2=0:endif
locate 0,1:print l3;"000":next
CloseFile (file3)
end sub
'
sub write_foldercontent(a$)
file3 = OpenFileWrite ("files/New Folder/"+a$):file_error()
WriteLine ( file3, "what files to find in dc4_folder:" )
WriteLine ( file3, b1$ )
WriteLine ( file3, sa$(hmf)+" files:"+sa$(l1)+" Bytes." )
for i=1 to hmf
WriteLine ( file3, "------------------------" )
WriteLine ( file3, sa$(i) )
WriteLine ( file3, c$(i) )
WriteLine ( file3, sa$(l(i)) )
next
WriteLine ( file3, "------------------------" )
CloseFile (file3)
end sub
'------------------------------------------------------------------------------------------------------------------------
sub wait(i2):dim i1: :do:i1=mb(i2):loop until i1:end sub
function mb(a):dim m::m=mouse_button(a):return m:end function
function mi$(i0):dim a$:a$="":for i=0 to i0:a$=a$+"+":next:return a$:end function
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
'------------------------------------------------------------------------------------------------------------------------
function sa$(i#):dim an$,aa,de$,ac$:an$=str$(i#):aa=len(an$):de$=right$(an$,1)
if de$ = "." then ac$=left$(an$,aa-1) else ac$=an$:endif: :return ac$:
end function
'
sub window(x,y) :wf=WindowFullscreen():SetWindowWidth(x):SetWindowHeight(y):SetWindowBorder(true)
:SetWindowTitle(".write_new_folder.0029/5.2022.PCN"):SetWindowResizable(true):UpdateWindow()
end sub
'
sub find_all_files(g$): dim d,a$:a$=findfirstfile(g$+"*.*"):a=0:do:a=a+1:d=a+(a>0):c$(d)=findnextfile():loop until c$(d)="": hmf=a-2:end sub

'*******************************************************************************************************************************
'
'.read_new_folder_and_decompress_0006:
'
const hmf2=2 'how many files to compact
const mle=5000000 'max.lenght (byte)
'
dim a,a1,a2,a3,a4 as integer
dim a$,a1$
'
dim b3 as integer
dim b$,b1$
dim c$(5,999),hmf(999),l(999)
dim d as integer
'
dim e(20000000) as integer
'
dim f01,file as integer
dim folder$
'
dim i,i1,i2,i3,i6 as integer
dim l2,l3 as integer
'
dim so$(999),fn$(999)
'---------------------------------------------------------------------------------------------------------------------------------------
declare sub find_all_files(g$,i00)
declare sub readfile(i$) :declare sub wait(i2) :declare function mb(a) :declare function mi$(i0):declare sub c(i)
declare sub write_file(a$,l):declare sub read_file(a$,y) :declare sub file_error() :declare sub eof():declare sub window(x,y)
'---------------------------------------------------------------------------------------------------------------------------------------
dim i4,cr(10),c4(999,2),co(9,2)'1000 colors
for a=0 to 9:cr(a)=a*28:next'1000 text_colors
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next'1000 text_colors
sub c(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'---------------------------------------------------------------------------------------------------------------------------------------
start: resizetext(80,40)
find_all_files("files/New Folder/",0)'---->c$(0)(d)
'
do:cls
printr "choose which content for decomress.Type in y (yes) or n (no), press enter.":printr
for i=1 to hmf(0):
a$=left$(c$(0,i),8)
if a$=".content" then
printr c$(0,i);" (Y/N)":input a1$
i1=i:
if a1$="y" then i=hmf(0):endif
endif:
next :
loop until a1$="y"
'
a$=c$(0,i1)
window(800,900)
resizetext(60,40)
c(888)
'
readfile("files/New Folder/"+a$)'------->so$(a)
'
folder$=so$(2)
hmf(1) = val(left$(so$(3),4) ) :dim b(hmf(1))(mle)
'
c(900):printr mi$(30):printr a1
'
c(990):locate 0,18:printr "readfile:";folder$
read_file(folder$,0) ',0 locate y
'
i1=1 :for i=6 to a1 step 4 :fn$(i1)=so$(i):l(i1)=val( left$(so$(i+1),10) )::i1=i1+1 :next
'
c(090):locate 0,25:print "press left.mouse_button":wait(0):clearregion(0,25,60,25)
c(099):locate 0,27:printr "find files:files\New Folder\decompressed\"
'
i6=1
for i1=1 to hmf(1):
locate 0,25:print "write files:";i1;"/";hmf(1);" "
file = OpenFileWrite ("files/New Folder/decompressed/"+fn$(i1)):file_error()
for i2=1 to l(i1) :writebyte(file,e(i6)) :i6=i6+1:next
CloseFile (file):
next
'
c(493):printr:printr"End"
'
end
'-------------------------------------------------------------------------------------------------------------------------------------------------------------
sub find_all_files(g$,i00): dim d:a$=findfirstfile(g$+"*.*"):a=0:do:a=a+1:d=a+(a>0):c$(i00)(d)=findnextfile():loop until c$(i00)(d)="":hmf(i00)=a-2:end sub
'
sub readfile(i$):dim file,b:file = openfileread(i$):a=1: a2=1:a4=0:a3=0
do :b3=endoffile(file):
if not b3 then :so$(a)= ReadLine(file):printr a;":";so$(a): :endif:a=a+1:'wait(0)
loop until b3:a1=a
CloseFile (file)
end sub
'
sub wait(i2):dim i1: :do:i1=mb(i2):loop until i1:end sub
function mb(a):dim m::m=mouse_button(a):return m:end function
function mi$(i0):dim a$:a$="":for i=0 to i0:a$=a$+"+":next:return a$:end function
'
sub write_file(a$,l):dim file3,i0 'write b(0) 'l4=0:l5=0
file3 = OpenFileWrite ("files/New Folder/"+a$):file_error()
for i0=1 to l:writebyte(file3,e(i0)):next
CloseFile (file3)
end sub
'
sub read_file(a$,y) :dim file,b1'............................
a4=0:a3=0
file = openfileread("files/New Folder/"+a$):file_error()
i=1:
do:b3=endoffile(file):
if not(b3) then:e(i)=Readbyte(file):i=i+1:
a4=a4+1:if a4=1000 then a3=a3+1:a4=0:locate 0,20+y:printr a3;"000":endif
endif:
loop until b3:l(a)=i-2:l2=l(a)
CloseFile (file)
end sub
'
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
sub eof():b3=endoffile(file)::end sub
'******************************************************************************************************************************************************************
sub window(x,y) :dim wf:wf=WindowFullscreen():SetWindowWidth(x):SetWindowHeight(y):SetWindowBorder(true)
:SetWindowTitle(".read_new_folder_and_decompress_0006b.PROBOARDS/5.2022.PCN_Hedgehog"):SetWindowResizable(true):UpdateWindow()
end sub
'******************************************************************************************************************************************************************
'
'
Code and decode all your files with a key-file 7:26 PM 1/22/2020
'
a small game (coded) is hidden into the zip-folder.
decode the game with :binaer_31.small_code.03.gb
'
it takes about 2 min to decode the game: Winmine__XP.exe
Hedgehog_PCN
'
'--------------------------------------------------------------------------------------------------------------------------------
' june 2021
and here a small super mario picture
i'd like to introduce game-emulator and games.
'
keys:JL,IK to move the center (press ctrl once for 10*faster). arrow up+down to fly forward or backward
arrow left and right to circle around a center adjust flying-speed with F1
'
(extract , mix 'pengo.00.00.b8.zip' and 'copy into textures.zip' with COPY)
'
feel FREE to write me E-mail:chuck.summer@mail.com
'--------------------------------------------------------------------------------------------------------------------------------
dim a1,b,c,key:declare sub code(c1,key)
'
resizetext (80,30)
code(234,210)
code(a1,210)
printr "-------------------------------------------------"
printr:
printr " 234 = 11101010"
printr "xor 210 = 11010010 = coding"
printr " = 56 = 00111000"
printr:printr "the bits from 234 stay in result 56 the same : the bit in 210 is 0:"
printr "1 xor 0 = 1 0 xor 0 = 0"
printr:printr "the bits from 234 turn when the bit from 210 is 1:"
printr "1 xor 1 = 0 0 xor 1 = 1"
printr
printr "234....coding(xor 210)......56(234_coded)"
printr
printr "decoder:"
printr "56.....decoder(xor 210)......234(56 is decoded)"
printr
printr "#210........is a decimal_value (not a register)"
printr "#$d2........is a hexadecimal_value (=210 decimal)"
printr
printr "code on byte (0-255__$0-$ff__%00000000-%11111111)"
printr "in every computer_register can we store:1 byte (that is 8 Bits)"
printr
printr "this is beginner's assembler knowledge from the commodore_64 computer"
printr "this was a computer in the 1980's with 64Kb memory and a 6502_processor"
'
end
'
sub code(c1,key):
print "c1=";c1:
print " key:";key
a1=c1 xor key:printr " code:";a1:
end sub
'*******************************************************************************************************************************


'5.22
'build a dc4 folder with :.write_new_folder.0030.fin.gb
'decompress folder with:.read_new_folder_and_decompress_0006.gb
'
'(the programms are slow and should be written in assembler-code)
'feel free to send me programm_improvements: chuck.summer@mail.com
'*******************************************************************************************************************************
'.write_new_folder.0030.fin:
'
declare sub read_file(a) :declare sub c(i) :declare sub write_file(a$,l) :declare sub file_error()
declare function mb(a) :declare sub wait(i2) :declare sub fill_e0_with_b(wf,hmb):declare function mi$(i0)
declare function sa$(i#) :declare sub window(x,y):declare sub find_all_files(g$):declare sub write_foldercontent(a$)
'source --------------------------------------------------------------------------------------------------------------------------
dim a,hmf,i,fn$ 'fn$="Winmine"
const mle=5000000 'max.lenght (byte)
dim a$,a1$
dim b1,b3,b4(mle) as integer
dim b$(9),b1$,b0$,b2$
dim c$(99)'write_file
dim d0 as integer
dim e(20000000) as integer
dim file,file2,file3 as integer
'
find_all_files("files/"):for i=1 to hmf:a$=left$(c$(i),14):if a$=".for compress_" then fn$=right$(c$(i),len(c$(i))-14):endif:next
'
dim i0,i1,i2,i3,ia,ib,i7,i7b,i9,i9b as integer
dim l(99),l1,l2,l3,l4,l5 as integer
dim wf as integer
'-------------------------------------------------------------------
dim i4,cr(10),c4(999,2)'1000 colors
for a=0 to 9:cr(a)=a*28:next'1000 text_colors
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next'1000 text_colors
sub c(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'source --------------------------------------------------------------------------------------------------------------------------
window(1900,600):resizetext(90,40)
c(090):printr "build a dc4_folder":c(999)
printr "1) open folders (where to find 2 prg's):"
printr " .write_new_folder.0030.fin.gb"
printr " .read_new_folder_and_decompress_0006.gb"
printr " files/"
printr " files/.for compress_myname/" 'New Folder
printr " files/New Folder/"
printr " files/New Folder/decompressed/"
printr
c(777)
printr "2) copy all files to combine into: files/.for compress_myname/"
print "3) change this folder_name:'.for compress_":c(990):printr "my new name'"
c(990):
print " .for compress_":c(888):printr " must stay part of new folder_name."
'
c(900):printr:printr"press enter"
input a$:cls
'
find_all_files("files/.for compress"+"_"+fn$+"/") 'c$(0)(1 to hmf(0))
dim b(hmf)(mle)
'
locate 0,0:print "read_file (1000 bytes) found in:":c(090):printr ".for compress_";fn$;"/":c(777)
for i0=1 to hmf:locate 0,4+i0:printr " ";c$(i0):read_file(i0):next
clearregion(0,0,60,1)
'----------------------------------------------------------------------------------------------------------------------------------------
a1$=mi$(30):l1=0
locate 6,4:printr "combine files to dc4_folder"
for ia=1 to hmf:ib=ia-1 :'printr a1$ :c(900):printr c$(ib):c(888):
l1=l1+l(ib):fill_e0_with_b(ia,l1):next
'----------------------------------------------------------------------------------------------------------------------------------------
l1=l1+l(hmf)'all_size=l1+last size
'
c(900) :locate 0,0:printr l1
'
b0$="New Folder/"
b1$=fn$+".dc4":'write b(0)(1-l1)
b2$=fn$+".txt"
'
locate 10,1:printr"write :files\New Folder\";fn$;".dc4"
c(090):locate 10,0 :printr "find:files\New Folder\.content_";fn$;".txt (dc4_folder_content)":c(777)
write_foldercontent(".content_"+b2$)'what filnames and file_sizes are in folder
write_file(b0$+b1$,l1)
'
c(090):printr:printr "end"
end
'**********************************************************************************************************************************************
sub fill_e0_with_b(wf,hmb) :dim a$,d
for i=1 to l(wf)
a$=""
i1=hmb+i
e(i1)=b(wf)(i) :
i7=i7+1:if i7=1000 then i7=0:i7b=i7b+1:locate 0,4:printr i7b:endif
next
end sub
'------------------------------------------------------------------------------------------------------------------------
sub read_file(a)
file = openfileread("files/.for compress"+"_"+fn$+"/"+c$(a)):file_error()
i=1:i9=0:i9b=0
do:b1=endoffile(file):
if not(b1) then:
e(i)=Readbyte(file):i=i+1:i9=i9+1:if i9=1000 then i9=0:i9b=i9b+1:locate 0,4+a:print i9b:endif
endif:
loop until b1:l(a)=i-2:l1=l(a)
CloseFile (file)
end sub
'------------------------------------------------------------------------------------------------------------------------
sub write_file(a$,l):l2=0 'write b(0)
file3 = OpenFileWrite ("files/"+a$):file_error()
for i0=1 to l:writebyte(file3,e(i0)):l2=l2+1:if l2=1000 then l3=l3+1:l2=0:endif
locate 0,1:print l3;"000":next
CloseFile (file3)
end sub
'
sub write_foldercontent(a$)
file3 = OpenFileWrite ("files/New Folder/"+a$):file_error()
WriteLine ( file3, "what files to find in dc4_folder:" )
WriteLine ( file3, b1$ )
WriteLine ( file3, sa$(hmf)+" files:"+sa$(l1)+" Bytes." )
for i=1 to hmf
WriteLine ( file3, "------------------------" )
WriteLine ( file3, sa$(i) )
WriteLine ( file3, c$(i) )
WriteLine ( file3, sa$(l(i)) )
next
WriteLine ( file3, "------------------------" )
CloseFile (file3)
end sub
'------------------------------------------------------------------------------------------------------------------------
sub wait(i2):dim i1: :do:i1=mb(i2):loop until i1:end sub
function mb(a):dim m::m=mouse_button(a):return m:end function
function mi$(i0):dim a$:a$="":for i=0 to i0:a$=a$+"+":next:return a$:end function
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
'------------------------------------------------------------------------------------------------------------------------
function sa$(i#):dim an$,aa,de$,ac$:an$=str$(i#):aa=len(an$):de$=right$(an$,1)
if de$ = "." then ac$=left$(an$,aa-1) else ac$=an$:endif: :return ac$:
end function
'
sub window(x,y) :wf=WindowFullscreen():SetWindowWidth(x):SetWindowHeight(y):SetWindowBorder(true)
:SetWindowTitle(".write_new_folder.0029/5.2022.PCN"):SetWindowResizable(true):UpdateWindow()
end sub
'
sub find_all_files(g$): dim d,a$:a$=findfirstfile(g$+"*.*"):a=0:do:a=a+1:d=a+(a>0):c$(d)=findnextfile():loop until c$(d)="": hmf=a-2:end sub

'*******************************************************************************************************************************
'

'.read_new_folder_and_decompress_0006:
'
const hmf2=2 'how many files to compact
const mle=5000000 'max.lenght (byte)
'
dim a,a1,a2,a3,a4 as integer
dim a$,a1$
'
dim b3 as integer
dim b$,b1$
dim c$(5,999),hmf(999),l(999)
dim d as integer
'
dim e(20000000) as integer
'
dim f01,file as integer
dim folder$
'
dim i,i1,i2,i3,i6 as integer
dim l2,l3 as integer
'
dim so$(999),fn$(999)
'---------------------------------------------------------------------------------------------------------------------------------------
declare sub find_all_files(g$,i00)
declare sub readfile(i$) :declare sub wait(i2) :declare function mb(a) :declare function mi$(i0):declare sub c(i)
declare sub write_file(a$,l):declare sub read_file(a$,y) :declare sub file_error() :declare sub eof():declare sub window(x,y)
'---------------------------------------------------------------------------------------------------------------------------------------
dim i4,cr(10),c4(999,2),co(9,2)'1000 colors
for a=0 to 9:cr(a)=a*28:next'1000 text_colors
for i=0 to 999:i1=i/100:i2=i1*100:i3=(i-i2)/10:i4=i-i2-i3*10:c4(i,0)=cr(i1):c4(i,1)=cr(i3):c4(i,2)=cr(i4):next'1000 text_colors
sub c(i):color(c4(i,0),c4(i,1),c4(i,2)):end sub'1000 colors wo comma
'---------------------------------------------------------------------------------------------------------------------------------------
start: resizetext(80,40)
find_all_files("files/New Folder/",0)'---->c$(0)(d)
'
do:cls
printr "choose which content for decomress.Type in y (yes) or n (no), press enter.":printr
for i=1 to hmf(0):
a$=left$(c$(0,i),8)
if a$=".content" then
printr c$(0,i);" (Y/N)":input a1$
i1=i:
if a1$="y" then i=hmf(0):endif
endif:
next :
loop until a1$="y"
'
a$=c$(0,i1)
window(800,900)
resizetext(60,40)
c(888)
'
readfile("files/New Folder/"+a$)'------->so$(a)
'
folder$=so$(2)
hmf(1) = val(left$(so$(3),4) ) :dim b(hmf(1))(mle)
'
c(900):printr mi$(30):printr a1
'
c(990):locate 0,18:printr "readfile:";folder$
read_file(folder$,0) ',0 locate y
'
i1=1 :for i=6 to a1 step 4 :fn$(i1)=so$(i):l(i1)=val( left$(so$(i+1),10) )::i1=i1+1 :next
'
c(090):locate 0,25:print "press left.mouse_button":wait(0):clearregion(0,25,60,25)
c(099):locate 0,27:printr "find files:files\New Folder\decompressed\"
'
i6=1
for i1=1 to hmf(1):
locate 0,25:print "write files:";i1;"/";hmf(1);" "
file = OpenFileWrite ("files/New Folder/decompressed/"+fn$(i1)):file_error()
for i2=1 to l(i1) :writebyte(file,e(i6)) :i6=i6+1:next
CloseFile (file):
next
'
c(493):printr:printr"End"
'
end
'-------------------------------------------------------------------------------------------------------------------------------------------------------------
sub find_all_files(g$,i00): dim d:a$=findfirstfile(g$+"*.*"):a=0:do:a=a+1:d=a+(a>0):c$(i00)(d)=findnextfile():loop until c$(i00)(d)="":hmf(i00)=a-2:end sub
'
sub readfile(i$):dim file,b:file = openfileread(i$):a=1: a2=1:a4=0:a3=0
do :b3=endoffile(file):
if not b3 then :so$(a)= ReadLine(file):printr a;":";so$(a): :endif:a=a+1:'wait(0)
loop until b3:a1=a
CloseFile (file)
end sub
'
sub wait(i2):dim i1: :do:i1=mb(i2):loop until i1:end sub
function mb(a):dim m::m=mouse_button(a):return m:end function
function mi$(i0):dim a$:a$="":for i=0 to i0:a$=a$+"+":next:return a$:end function
'
sub write_file(a$,l):dim file3,i0 'write b(0) 'l4=0:l5=0
file3 = OpenFileWrite ("files/New Folder/"+a$):file_error()
for i0=1 to l:writebyte(file3,e(i0)):next
CloseFile (file3)
end sub
'
sub read_file(a$,y) :dim file,b1'............................
a4=0:a3=0
file = openfileread("files/New Folder/"+a$):file_error()
i=1:
do:b3=endoffile(file):
if not(b3) then:e(i)=Readbyte(file):i=i+1:
a4=a4+1:if a4=1000 then a3=a3+1:a4=0:locate 0,20+y:printr a3;"000":endif
endif:
loop until b3:l(a)=i-2:l2=l(a)
CloseFile (file)
end sub
'
sub file_error():if FileError () <> "" then :Locate 1,23:print FileError ():endif:end sub
sub eof():b3=endoffile(file)::end sub
'******************************************************************************************************************************************************************
sub window(x,y) :dim wf:wf=WindowFullscreen():SetWindowWidth(x):SetWindowHeight(y):SetWindowBorder(true)
:SetWindowTitle(".read_new_folder_and_decompress_0006b.PROBOARDS/5.2022.PCN_Hedgehog"):SetWindowResizable(true):UpdateWindow()
end sub
'******************************************************************************************************************************************************************
'