TWEAK.TXT ********* Last updated by Roedy Green on 96/11/01 Adjusts diskette drive parameters to speed up disk access. Copyright: (c) 1990-2017 Roedy Green, Canadian Mind Products Freeware that may be freely distributed for non-military use only. Abstract ******** Adjusts diskette drive parameters to speed up floppy disk access. Lets you adjust Motor on time, Head settle time, motor keep running time, and step rate. Includes 1602-byte COM file and documentation. Freeware registrants receive MASM/OptASM source. Usually takes no RAM, but sometimes must leave a 144-byte TSR. By Roedy Green of Canadian Mind Products. Copyrighted but may be copied freely for Non-military use only. Usage ***** Tweak.Com /M1000 /H25 /K2000 /R6 /Q /M1000 = 1000 ms = 1.0 seconds to wait for _M_otor to come up to speed (100 .. 1500 rounded to nearest 1/8 second) /H25 = 25 ms for _H_ead to settle after moving to a new track (1 .. 30 accurate to the millisecond) /K2000 = 2032 ms = 2.032 seconds to _K_eep the disk spinning (250 .. 5000 will be rounded to nearest tick (1/18.2 second)). /R6 = 6 ms step _R_ate (2 .. 8 will be rounded to nearest 2 ms.) /Q = _Q_uiet. Suppress all displays. Use this for your autoexec.bat file to avoid disturbing the earthlings. If you do not specify a parameter, that parameter will be left as is. Tweak will list the old, new and standard settings. Tweak without any parameters will list the current and standard settings of these parameters. Commonly asked Questions and Answers ************************************ Q. What should I set these parameters to? A. I do not know. The idea is you can experiment with different values to see what works best. The smaller you set /M /H and /R the faster the floppy disk will go. However if you set them too small the drive will be unreliable. /K works the opposite way. The larger you make it the faster your disk is. /K controls how long the motor stays on. If you leave it on longer, there is a better chance it will already be on when you go to use it again. The disadvantage of making it too long is disk wear. In theory the manufacturer of your floppy drive should be able to tell you the best settings. Please report back findings on what works best for given machines and brands of floppy drives. The /M parameter is probably the one that will make the most difference. Fiddle with it first. The /H parameter you should be wariest of. I would tend to leave it alone. It is included primarily so you could set it to the factory recommended value. There will be a /R magic number that makes your disk work swiftly and QUIETLY. Going still lower makes it run slower. Here are some hints from other Tweak users: Compaq defaults: /M250 /H15 /K2032 /R6 Compaq optimum: /M250 /H15 /K2032 /R4 IBM XT 360 KB defaults: /M500 /H25 /K2032 /R6 IBM XT 360 KB optimum: /M500 /H15 /K2032 /R4 IBM AT 1.2 MB defaults: /M1000 /H15 /K2032 /R6 IBM AT 1.2 MB optimum: /M500 /H15 /K2032 /R4 IBM AT 360 KB defaults: /M1000 /H20 /K2032 /R6 IBM AT 360 KB optimum: /M500 /H15 /K2032 /R4 --- Q. When I tell Tweak to set the motor on time to 50 ms it ignores me and sets it to 100. E.g. "Tweak /M50" doesn't work. What a ripoff! A. You are getting caught by Tweak's safety net. Tweak believes that it is safe to set the /M parameter only to values in the range 100 to 1500. You specified a value too low. Instead of giving you an error message, it simply corralled your requested value into the safety zone. The best it could do was 100. Similarly if you chose a value too high such as /M3000 Tweak will corral it back down to /M1500. If you want find out what Tweak's true safety limits are, try setting parameters to 0 or 9999. --- Q. I typed "Tweak /R 8" just like it showed in the documentation, but it didn't work. It didn't give me any more help than showing me the general command syntax. What a brain-damaged program! A. You should have typed "Tweak /R8" without a space between the R and the 8. You are right, Tweak is not very bright. --- Q. I typed your example EXACTLY as shown: Tweak.Com/M1000/H25/K2000/R6/Q and it said I had an error. If you can't even get that right, you have no business writing Freeware! A. Unfortunately Tweak insists there MUST be spaces separating the various parameters like this: Tweak.Com /M1000 /H25 /K2000 /R6 /Q To a computer, a space is just as much a letter of the alphabet as the letter "A" is. Tweak is very picky about spaces. Don't leave any out. Don't put any extra in. The one exception to this rule is, whereever you see a space, you can use more than one space. --- Q. I typed "Tweak /R7" and it changed into /R8! I asked for 7! Boy! there's a lot of bugs in this program. How come you put this out without testing? A. To make your life easy, Tweak consistently talks with you in terms of milliseconds (1/1000th of a second). Internally DOS keeps track of these parameters in all sorts of strange units. During the conversion Tweak has to round to the nearest internal unit. To warn you this has happened, it converts the rounded value back to milliseconds so you can see what DOS is actually using. Tweak is making DOS use the closest possible value to the one you requested. --- Q. My experiments were a total flop. Now my floppy won't work at all! I can't remember what the original settings were. Curse you Tweak! you have ruined by computer. What can I do now? A. Just reboot. You will be right back where you started. At the very worst you may have to reformat the floppy you were using for your experiments. "You were using your only copy of your great Canadian novel as your test disk." oh oh. --- Q. I got some floppy documentation -- the pure stuff with step rates and everything. It says my 1.2 MB drive should run at 6 ms and my 1.44 MB drive should run at 4 ms. I tried Tweak A: and Tweak B: to set them separately but it didn't work. What do I do? A. DOS maintains only ONE parameter table for both floppies. This oversight means Tweak has no easy way to let you set the two floppies separately. Someday in the distant future I might teach Tweak to rapidly keep swapping two different parameter tables under DOS's nose every time it switches from A: to B:. In the meantime, you must set the parameters for the less capable drive, in this case 6 ms. --- Q. I tried Tweak. No matter what I said, the floppies behaved just the same. What's the matter? A. Some BIOS's do not use the standard drive table pointed to by INT 41h. They use some secret table burned into ROM. There is nothing Tweak can do to change it. --- Q. I got everything working just great with Tweak. Then I came back the next day and my floppies were as slow as ever. Why did Tweak run out of steam? A. Each time you reboot or power off, DOS forgets Tweak's settings. If you want to make them permanent, put a Tweak command in your AutoExec.Bat file with the desired overrides. --- Q. I fiddled and fiddled. Everything works, but my benchmarks show that I'm only 1% faster than when I started. What a total waste of time! A. Tweak cannot repair your computer, because it wasn't broken. Your computer was already adjusted properly. Be happy the manufacturer did such a fine job, as he probably adjusted other stuff correctly too. Implementation ************** Tweak is sometimes a simple utility and sometimes a tiny TSR. In other words, sometimes Tweak uses no ram and sometimes it uses a little. It checks to see if the current disk drive parameters are in RAM or ROM. If they are in RAM, it simply modifies them. If they are in ROM, it makes a copy in RAM and modifies those and fools BIOS into using that copy. This way multiple uses of Tweak will not saturate your RAM with multiple copies of Tweak. To conserve ram, Tweak hides the new parameter block INSIDE an unused field of the useless PSP stub. After it sets new parameter block, it does a disk reset to make DOS start using the new parameters. You can find out which way it worked by using MAPMEM afterwards. Acknowledgements **************** The following people on BIX helped with testing: barryn, daiken, haynes, mike123, jsolman, j_vanderbilt, jdardold, mfg and proub. daiken, hfishman, sjgrant and others I've lost track of helped by providing technical information. GETTING THE LATEST VERSION ************************** Look for the latest version at my Web site: http://mindprod.com Tweak is free for non-military use only. -30-