> UnImg/s v1.12  v1.12: % -i forces creation of INF file ( -X long INF file 2- -s extract DFS files to subdirectories <+ -e extract DFS files with extensions F To do: P1 Option to select drive(s) within dfs image Z$ Second catalog of DFS62 disks d: n@ctrl%127,name%79,zp%9:A$=OS_GetEnv+" ":os%=32:Win_TextIO x17):Close_All:exit() :X%=ctrl%:Y%=X%256:fln%=11:fmx%=-1:(os%-24):fln%=256 ?A%-1:max%=-A%-2048+4096*(>&FFFF): mem% max%:wr%=2:rd%=4 cin$="":"File to extract from: "in$:"Image type:"11type$:dst$="":"Destination path:"5dst$ Bin%=f_openin(in$):in%=0:"File '"in$"' not found":exit(214) =type$="":fstype%=chkdisk fstype%="HADFS",uc(type$)) @fstype%=0:#in%:in%=0:"Unrecognised disk image":exit(225) 2fstype%<2:tsz%=10:dsz%=&300:root%=&47: HADFS 1fstype%=2:tsz%=16:dsz%=&500:root%=&02: ADFS "0fstype%>2:tsz%=10:dsz%=&200:root%=&00: DFS , dir% dsz%-1 6: @adebug%:" run$='"run$"'"'"quit$='"quit$"'"'" in$='"in$"'"'" dst$='"dst$"'"'" drv$='"drv$"'" JGdebug%:" dsd=";dsd%;" verbose=";vb%;" inf%=";inf%;" full%=";full% T debug%:" fstype%=";fstype% ^7debug%:" tsz=";tsz%;" dsz=";dsz%;" root=&";~root% h: r/savedir(root%,dst$):#in%:in%=0:exit(0): |:  ݤchkdisk =f_gbpb(rd%-1,in%,mem%,4,&201):!mem%=&6F677548:=2: ADFS ?f_gbpb(rd%-1,in%,mem%,8,&4610):!mem%=&29432800:=1: HADFS  =3: DFS : 0mkdir:dst$<>"":f_cdir(dst$):dst$=dst$+d$  : savedir(csd%,dst$) ' num%,r0%,f%:mkdir::RdDir(csd%) Anum%:f%=fn0%::num%=num%-saveobject(f%):f%=f%+fsz%: num%<1 Pcsd%=0:fstype%<2:csd%=dir%!14 &FFFF:(dir%?12)>127:csd%=dir%!23 &FFFFFF  csd%=0: : ݤsaveobject(fptr%)  fn$,lf$,ld%,ex%,nm% &4N%=0::A%=dir%?(fptr%+N%)127:A%>32:lf$=lf$+A% 0N%=N%+1: N%=10 A%<33 :lf$="":fstype%<2:=0 Dlf$="":=num% NNfstype%>2:lf$=(dir%?(fptr%+7)127)+"/"+lf$,7):(lf$-5)=32:lf$=lf$,3) X"A%=(fstype%>2)(lf$,2,1)="/") b%A%:sub%:lf$=lf$,1)+"."+lf$,3) l%A%:ext%:lf$=lf$,3)+"/"+lf$,1) v)getattrs:fn$=f_name(fn_unbbc(lf$)) ]vb%:lf$(11-lf$)h0(ld%,8)" "h0(ex%,8)" "h0(nm%,6): " "FNh0(attr%,3)" "FNh0(sec%,6) ?attr%256:savedir(sec%,dst$+fn$):RdDir(csd%) savefile setattrs:=1 : savefile ,A%=fn$,d$):A%:f_cdir(dst$+fn$,A%-1)) EX%!2=ld%:X%!6=ex%:X%!10=0:X%!14=nm%:A%=file(dst$+fn$,7):len%=nm% :out%=(dst$+fn$)::cnt%=len%:len%>max%:cnt%=max%-256 CRdData(mem%,sec%,(cnt%+255)256):f_gbpb(wr%,out%,mem%,cnt%,0) Bsec%=sec%+(cnt%+255)256:len%=len%-cnt%: len%<1:#out%:out%=0  : getattrs 2:dfsattrs:  ?ld%=dir%!(fptr%+10):ex%=dir%!(fptr%+14):nm%=dir%!(fptr%+18) 3sec%=dir%!(fptr%+22)&FFFFFF:attr%=attr(fptr%)  Hfstype%=2:attr%=(attr%3)+(attr%4)*2+(attr%8)*32+(attr%&1E0)2: *Gattr%=attr%&33:usr%=dir%?19 (dir%?1816) (dir%!20 &FFFF0000) 4Hmdate%=dir%!(fptr%+26):mtime%=dir%!(fptr%+28):cdate%=dir%!(fptr%+30) >$dir%?12>127:: Large directory H=nm%=nm%&7FFFF : Small directory, 19-bit file length R?sec%=sec%&FFFF : Small directory, 16-bit sector number \ mdate%=dir%!(fptr%+20)&FFF8 f,mdate%=mdate%((dir%?(fptr%+9)&80)128) p,mdate%=mdate%((dir%?(fptr%+13)&C0)32) zHcdate%=mdate%:ld%=(ld%&3FFFFFFF):(ld%&20000000):ld%=ld%&C0000000  : dfsattrs 9ld%=dir%!(fptr%+256)&FFFF:ex%=dir%!(fptr%+258)&FFFF 4nm%=dir%!(fptr%+260)&FFFF:sec%=dir%?(fptr%+263) A%=dir%!(fptr%+261)&FF00 9ld%=ld%((A%&0C00)*64):ld%>&2FFFF:ld%=ld%&FFFF0000 8ex%=ex%((A%&C000)*4):ex%>&2FFFF:ex%=ex%&FFFF0000 0nm%=nm%((A%&3000)*16):sec%=sec%(A%&0300) +attr%=&33:dir%?(fptr%+7)>127:attr%=&19  : setattrs GX%!2=ld%:X%!6=ex%:X%!14=attr%&7F:X%!15=mdate%:A%=file(dst$+fn$,1) inf%=0:(os%-24)=0: Hinf$=fn_unbbc(lf$)+s$+"inf":(os%-24)=0:inf$=lf$,8)+s$+"inf",10) $8inf$=dst$+inf$:(os%-24)=0:inf$=45:inf$="@."+inf$ .5fstype%>2:lf$,2,1)=47:lf$=lf$,1)+"."+lf$,3) 8*A$=lf$+" ":A$<11:A$=A$+10-lf$," ") BCA$=A$+h0(ld%,8)+" "+h0(ex%,8)+" "+h0(nm%,6)+" "+h0(attr%,2) L full%: fstype%<2:A$=A$+" "+h0(mdate%,4): dir%?12>127:A$=A$+" "+h0(mtime%,6)+" "+h0(cdate%,4)+" "+h0(cdate%,6)+" "+h0(acc%,4)+" "+h0(aux%,4) VWA$=A$+13+10:out%=f_openout(inf$): A%=1 A$:#out%,A$,A%,1)::#out%:out%=0 `9A%=file(inf$,5):X%!3=X%!3 &FFFFFF:A%=file(inf$,2) j t: ~Yݤattr(f%): a%,n%: n%=0 7:a%=a%2+(dir%?(f%+n%)&80)::=a%((dir%?(f%+8)*2)&100) : RdDir(sect%)  RdData(dir%,sect%,dsz%256) 1fstype%>2:fn0%=8:fsz%=8:num%=(dir%?&105)8: 'fstype%=2:fn0%=5:fsz%=26:num%=47: Mfstype%<2:fn0%=24:fsz%=24:num%=(dir%?12)31:dir%?12>127:fn0%=32:fsz%=32  : RdData(ad%,sc%,nm%): n% - n%=0 nm%-1:rd(ad%+256*n%,sc%+n%):: : rd(ad%,sc%): t%,s%,h% Ldsd%:t%=sc%tsz%:s%=sc%tsz%:h%=t%80:t%=t%80:sc%=s%+h%*tsz%+t%*tsz%*2  &f_gbpb(rd%-1,in%,ad%,256,sc%*256)  :