Image Map Image Map
Page 1 of 5 12345 LastLast
Results 1 to 10 of 48

Thread: Patch program for DIR free space calculation

  1. #1
    Join Date
    Aug 2013
    Location
    Ravenna (Italy)
    Posts
    120

    Thumbs up Patch program for DIR free space calculation

    Hi to all

    I noticed this problem with slow XT/AT Clone with huge (for the time) hard disk in FAT16. The first DIR and similar operation involved DOS int 21h/36h for calculating free clusters... this takes AGES on this type of machine... but

    I've found a solution to this SLOWness!

    I've made an application to overcome this DIR wait (because NO solution is available also today)
    the concept is to "fool" dos saving the "free space" / realoading it at startup (maybe with AUTOEXEC.BAT).

    So DIR command take Always the same time like from the 2nd DIR onward (also 1st) and it SAVE me most of the wait! It's not a TSR so no memory waste!

    DOS 3.2+ required

    I've published my app (FIXDTP.EXE) on my Facebook page. If you want join: https://www.facebook.com/OlivettiProdestPC1

    If you are interested PM to me.

    Hope this will help!

  2. #2
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,481
    Blog Entries
    20

    Default

    Do you have a similar solution for FAT32 volumes in DOS? The FAT16 delay never really bothered me, but a 20GB partition in DOS 7 can really take some time.

  3. #3
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    5,856
    Blog Entries
    1

    Default

    Quote Originally Posted by Simone2013 View Post
    the concept is to "fool" dos saving the "free space" / realoading it at startup (maybe with AUTOEXEC.BAT).

    So DIR command take Always the same time like from the 2nd DIR onward (also 1st) and it SAVE me most of the wait! It's not a TSR so no memory waste!
    My problem with this is that, if you don't save the drive table before shutting down, it is incorrect when you reload it.

    Because the DIR only takes a long time the first iteration, and is fast every other time, what's wrong with just putting DIR C: in your autoexec.bat?

    (Aside: It looks like you used a C printf function inside your Pascal program; do you have a link to the source of that routine?)
    Offering a bounty for:
    - The software "Overhead Express" (doesn't have to be original, can be a copy)
    - A working Sanyo MBC-775, Olivetti M24, or Logabax 1600
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)

  4. #4
    Join Date
    Aug 2013
    Location
    Ravenna (Italy)
    Posts
    120

    Default

    Quote Originally Posted by Trixter View Post
    My problem with this is that, if you don't save the drive table before shutting down, it is incorrect when you reload it.
    Yes you are right, but it involves only free clusters... I.E. Large partition with Compactflash has plenty of free space and don't change too much. Instead i must do multiple reset to test many configuration in my 8086, and every time I must wait >1 minute and when you have 3/4 partition it can be boring (also with DIR C! The free space can be also forced to update with /R option.

    Quote Originally Posted by Trixter View Post
    (Aside: It looks like you used a C printf function inside your Pascal program; do you have a link to the source of that routine?)
    Strange, I used the standard writeln procedure... Formatting is done by subfunction. It's a standard Turbo Pascal 7 compiled with 8086 instruction set... Maybe constant are null terminated string?

  5. #5
    Join Date
    Aug 2013
    Location
    Ravenna (Italy)
    Posts
    120

    Default

    Quote Originally Posted by Chuck(G) View Post
    Do you have a similar solution for FAT32 volumes in DOS? The FAT16 delay never really bothered me, but a 20GB partition in DOS 7 can really take some time.
    Chanches are that it can work also with DOS7 & fat32 because I used some "undocumented" int21 DOS function that should work in any version >3.2 - DOS7 and FAT32 should have a more efficient algorithm to calcolate free space also...

    I know that don't work in DOSBOX for sure, but feel free to try and report here to me.

  6. #6
    Join Date
    Aug 2006
    Location
    Chicagoland, Illinois, USA
    Posts
    5,856
    Blog Entries
    1

    Default

    Quote Originally Posted by Simone2013 View Post
    Strange, I used the standard writeln procedure... Formatting is done by subfunction. It's a standard Turbo Pascal 7 compiled with 8086 instruction set... Maybe constant are null terminated string?
    No, you have some sort of extended error handling routine in there. Strings like "Critical disk error on drive %C" and "~Enter~ Retry ~Esc~ Cancel". Curious what that is.
    Offering a bounty for:
    - The software "Overhead Express" (doesn't have to be original, can be a copy)
    - A working Sanyo MBC-775, Olivetti M24, or Logabax 1600
    - Music Construction Set, IBM Music Feature edition (has red sticker on front stating IBM Music Feature)

  7. #7
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    31,481
    Blog Entries
    20

    Default

    I wonder if this will even work well with FAT32 real-mode operation. My experience is that DOS is even slow to pick up on FAT32 file creation. That is, a program creates a file and writes to it; do a DIR and the file's not there. Do a control-C reset and it suddenly appears with the next DIR. I can't help but see that this will aggravate the problem.

  8. #8
    Join Date
    Aug 2013
    Location
    Ravenna (Italy)
    Posts
    120

    Default

    Quote Originally Posted by Trixter View Post
    No, you have some sort of extended error handling routine in there. Strings like "Critical disk error on drive %C" and "~Enter~ Retry ~Esc~ Cancel". Curious what that is.
    Probably is DOS unit (TPU) that I included for disk Handling, so the program is linked also with error-Handling written in... C!

  9. #9
    Join Date
    Aug 2013
    Location
    Ravenna (Italy)
    Posts
    120

    Default

    Quote Originally Posted by Chuck(G) View Post
    I wonder if this will even work well with FAT32 real-mode operation. My experience is that DOS is even slow to pick up on FAT32 file creation. That is, a program creates a file and writes to it; do a DIR and the file's not there. Do a control-C reset and it suddenly appears with the next DIR. I can't help but see that this will aggravate the problem.
    I didn't notice that quirk in dos FAT32... Something similar I noticed with network drive in Windows. I don't think that the program can aggravate the problem (if even work) because it involve only free space calculation. The file creation slowness can be a "forced free cluster" calculation (I noticed also in FAT16 -without my program-). So should be ininfluent, apart from incorrect free space display on DIR (i have plenty of free space in 2Gb SD card so this is not a problem!)

  10. #10

    Default

    Quote Originally Posted by Chuck(G) View Post
    I wonder if this will even work well with FAT32 real-mode operation. My experience is that DOS is even slow to pick up on FAT32 file creation. That is, a program creates a file and writes to it; do a DIR and the file's not there. Do a control-C reset and it suddenly appears with the next DIR. I can't help but see that this will aggravate the problem.
    I only ever had that problem with the old DOS interrupts for disk reading. If you have a proper LFN support in the OS (like under win95's dos7-ish) you should try using int21/AH=71h calls as it doesn't have those problems in my experience.

    You do int 21h, AH=71h and AL 4Eh and 4Fh it's not a problem. Of course, if you're on a fat32 system that lacks the support for those calls, you're pretty well shtupped as yeah, the classic int21h AH=4Eh and 4Fh it seems to miss file creation.

    Though I thought if you skipped having a filesystem cache (like smartdrv) that problem went away, though it's been ages since I've dealt with that.
    From time to time the accessibility of a website must be refreshed with the blood of owners and designers. It is its natural manure.
    CUTCODEDOWN.COM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •