Hi! 19-Июл-2004 01:23 [EMAIL PROTECTED] (Eric Auer) wrote to [EMAIL PROTECTED]:
[...] EA> The DosGetFree function (remember my bug report...) calls EA> flush_buffers if called from FatGetDrvData (int 21.1c?), maybe this is EA> where it crashed? Otherwise it also is int 21.36 ... EA> Plus, how do we know that this does not get a NULL pointer? --> EA> if (*nc != 0xffff) EA> *navc = (COUNT) dos_free(dpbp); In theory, *nc will never 0xffff (because it points to DX, and DL on input is a drive number). Thus, you right, there is bug (which garbages value of INT0 vector). EA> That fake for 64k cluster size looks evil, too. EA> while (ntotal > FAT_MAGIC16 && cluster_size < 0x8000) EA> { SHL cluster size and spc, SHR ntotal and nfree } EA> ... seems to be a cluster size determination loop which should probably No. As I understand, this loop is used to imitate FAT1x over FAT32. For example - _known_ size of cluster is increased up to 32k to decrease ntotal ("total clusters on drive"). Example: we have cluster 4k and total clusters 0x10000 (long value). After increasing cluster size to 32k we get (16-bit!) value 0x2000 for "total clusters" (and return 0x2000 instead 0xffff). [...] EA> BOOL dos_setfsize(COUNT fd, LONG size) EA> should be ULONG, as it already is for dos_getfsize! [...] I wrote all these small fixes in my todos. When I will change these files, I will fix also this. EA> void far *DynAlloc(char *what, unsigned num, unsigned size) EA> ... EA> if ((ULONG) total + Dynp->Allocated > 0xffff) EA> ... should be possible to do that without having to use ULONG. :) Yes. "if (total > ~Dynp->allocated)". EA> STATIC int LBA_Get_Drive_Parameters(int drive, struct DriveParamS EA> *driveParam) -->> bug: EA> if (lba_bios_parameters.heads > 0xffff || EA> lba_bios_parameters.sectors > 0xffff || EA> lba_bios_parameters.totalSectHigh != 0) EA> { EA> printf("Drive is too large to handle, using only 1st 8 GB\n" EA> ... EA> Explanation: totalSectHigh nonzero means either buggy BIOS (happens!) or EA> disk size above 2 TeraBytes! This does definitely NOT mean that you should: EA> ... EA> goto StandardBios; This is not bug, this is, probably, misfeature. EA> ... not at all! Just use LBA and clip the useable disk size to 0xFFFFFFFFUL EA> sectors. Nice idea, but Bart and Brian also should give their opinion. EA> Can somebody explain - in rwblock - what this does and why it uses UCOUNT?: EA> UCOUNT sectors_to_xfer, sectors_wanted; What wonder you? EA> sectors_wanted /= secsize; EA> ... can this be optimized to use a shift instead? 16bit>>value -> 16bit. DPB doesn't contains value "bits per sector_size value" (similar to dpb_shftcnt). EA> I saw the compile time option WRITEZEROS, could that be extended to EA> be supported by shrink_file (or maybe in rwblock itself?) ...? ? EA> Reading LBA_Transfer now, very interesting... play_dj (TODO: should call EA> the int 2f interface which allows to suppress the message!!), ? EA> int 1e stuff EA> and disk reset, track wrap avoidance for CHS, DMA wrap avoidance --> EA> ** You should be allowed to disable DMA_max_transfer check for non-floppy!? Why? DMA aligned access is useful in any case. EA> ** You should be allowed to disable track wrap protection for non-floppy!? ? EA> Wow. That was huge. Yes, this letter _very_ huge. In future, please, split such long things over more letters. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_idG21&alloc_id040&op=click _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel