Hi everybody, Roberto wrote: > > Dr dos undelete don't work (no memory massage and hangup!) > > I suppose the best solution is the upgrade of freedos undelete > > with fat32 support. Someone want to try?
Fabien wrote: > Do you think updating fatio.c is the main update to do or is > it more complex ? I would be happy to HELP whoever wants to add FAT32 to freedos undelete - I just do not want to WRITE everything myself... Here is some short and possibly incomplete overview of what you would have to change to add FAT32 support: - make all cluster variables 32bit Dword instead of 16bit Word: This affects at least: clustertosector nextcluster ...dirents dirfind... writefat readfat main advancedmain and Follow. Note that struct dirent stores 32bit cluster numbers as 16+16 bits. - advancedmain "syssave root" either has to refuse to work on fat32 or it has to turn itself into "dirsave for the root dir" if fat32, as "syssave root" saves a part before the data area. I guess "turn itself into dirsave..." would be better. - advancedmain "dirsave" has to use the fat32 root dir cluster instead of "0" if fat32. Alternatively, you could modify the dirfind1 function to turn 0 into the fat32 root dir cluster if the drive is fat32. - dirfind has to pass the fat32 root dir cluster to dirfind1 if the drive is fat32 (instead of the fat12/fat16 special "0"). Alternatively, dirfind1 could turn the 0 into the root dir cluster itself if the drive is fat32, see above. - it would be more elegant if showdriveinfo / getdrive / the dpb struct would use official fat32 format for fat32 drives, but I recommend to delay that update until the rest works... - obviously, fatio "readfat" and "writefat" have to be extended to use 32bit values if the drive is fat32. Note that they must only use the lower 28 bits: When reading, use & ... to ignore the upper 4 bits. When writing, either set the upper 4 bits to 0 or preserve their previous value from the FAT on disk... - the diskio "readsector" and "writesector" access is okay as it is for Linux / diskimages / freedos, but officially, you have to use some int 21 fat32 interface instead of absread/abswrite. For inspiration, you can read the source code of FORMAT ;-) I hope this helps you to get started :-) As said, the changes are not overly complicated. Just add 32bit FAT read/write and support for the FAT32 root directory cluster number and use 32bit values for cluster variables. Then you should already be able to play with UNDELETE on fat32 formatted diskimages. Next step would be proper fat32 sector read/write, official fat32 dpb data structure use, and mixed small stuff... :-). Thanks for working on UNDELETE :-) Eric ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Freedos-user mailing list Freedos-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-user