Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!oliveb!amdahl!kim From: kim@amdahl.amdahl.com (Kim DeVaughn) Newsgroups: comp.sys.amiga Subject: StepRate ... a utility that makes your floppies FASTER! Message-ID: <15607@amdahl.amdahl.com> Date: Mon, 5-Oct-87 01:37:15 EDT Article-I.D.: amdahl.15607 Posted: Mon Oct 5 01:37:15 1987 Date-Received: Thu, 8-Oct-87 00:40:58 EDT Organization: Amdahl Corporation, Sunnyvale, CA 94086 Lines: 477 Keywords: stepping rate improvement speedup faster floppy [ "The best government is no government at all!" ] Here is a really nifty utility! It allows you to set the stepping rate of your floppy drives, which in turn can improve the performance of your system considerably! The author says he can halve the access time on his drives ... down to about 1500 ticks (from the stock AmigaDOS* value of 3000). I can't get my old NEC drives to work that fast ... both of them will fail to read at 1800, but work at 1900. So I've set them for 2000 to leave a little more margin (at least my old NEC's work with noKLICKstart). Anyway, an improvement of 1/3 in the stepping rate is still quite noticible ... especially on dir listings of fat directories! I dunno if there any negative implications due to the faster stepping rates, such as increased wear and tear, reduced reliability, etc., so this is definitely a "use at your own risk" deal! Perhaps our friends at CBM, or other knowledgeable disk-wise folks (Hi, Bryce!) could comment? BTW, it doesn't do anything to the "stepping rates" for vd0: or ram: ... of *course* I had to try it ... :-)! /kim * - I still know of no better term for the Amiga OS as a whole, than AmigaDOS; especially since that's what the default CLI window is titled. P.S. I am posting this here instead of sending it to doc (who seems to have solved his latest set of problems) because it is rather small, and because I think it's a really "hot" item. Flame me if you wish! # This is a shell archive. Remove anything before this line, then # unpack it by saving it in a file and typing "sh file". (Files # unpacked will be owned by you and have default permissions.) # # This archive contains: # StepRate.DOC StepRate.uue StepRate.mod echo x - StepRate.DOC cat > "StepRate.DOC" << '//E*O*F StepRate.DOC//' DOCUMENTATION OF StepRate October 3, 1987 StepRate is a Public Domain Program. Please feel free to copy and distribute it provided you keep this message with the program and source code. StepRate is based on a program written by Mathias Kegelmann in Germany (west I believe). I have addapted his C program called Speedup to Modula-2 since a) I haven't got a C compiler nor the desire to own one, and b) I have three floppies and his program only worked with the first two. About Step Rates: ----------------- The step rate is the time the computer waits between commands to move the read write head across one cylinder. Typically, 3.5 inch microfloppies have Specifications of 2-3 milliseconds per step. Of course the computer can be programed to step the disk slower for some reason. One reason might be that the computer manufacturer wants to be conservative, so that even flakey drives will work. About How The Amiga Does It: ---------------------------- The Amiga stores a bunch of parameters for each drive somewhere in memory. When the system makes the read/write head move, it looks in these parameters to see how long to wait between steps. The parameter in question is in units of clock ticks, although I'm not sure whether the ticks are the ubiquitous and uncertain intuiticks or microseconds. What this program does is find the parameter table and change the step rate time. (Piece of cake.) To get at these parameters, you open the TrackDisk.Device and this device tells you where the parameters are. Of course, the folks who wrote Amigados & kickstart tried to hide this parameter, so there isn't a name for it in the system include files. Mr. Kegelmann found the right longword though. The initial value of the ticks between steps (eghad, what buzzwords!) is set to 3000 (base 10; I mean decimal!) by kickstart. I've found that the internal drive on my machine is happy at 1500, twice as fast as normal! My 5.25" drives like to run at 2200 ticks per step. A more cautious value would be 2000. Try a range of numbers on your machine, as some drives are a wee bit faster than others. About The Program: ------------------ The Modula-2 source, and the executable compiled in TDI's version 3.00a (with the latest patches to the library modules) are supposed to be part of this STEPRATE.ZOO file. StepRate admits two parameters. The first is the drive (DF0: thru DF3:), and the second, optional paramter is the ticks per step. If you leave off the second parameter, StepRate will tell you what the current ticks per step is. Examples: StepRate Df1: StepRate DF0: 2000 StepRate ? The first example will tell you how many ticks per step on drive 1, and the second will set the ticks per step on drive 0 (the internal one). The third line reminds you what the arguments are. Hope you enjoy the speed as much as I do! Dr. David Q. King Sunland, CA October 3, 1987. I can be reached on a couple of local Fido boards, on Genie, and on ARPANET. The files I supplied in this zoo are these lengths: StepRate.mod 3807 rwed Today 19:06:20 StepRate 8412 rwed Today 19:07:48 StepRate.DOC ------------------------------------------------------------------- //E*O*F StepRate.DOC// echo x - StepRate.uue cat > "StepRate.uue" << '//E*O*F StepRate.uue//' begin 755 StepRate M```#\P`````````#``````````(```<,```!*0````````/I```'#$[Y```97 MZ"(`<`9.1TYU3E;_Z"H`>`G:A#U%__XJ#E"%+47_Z$#N__@M3?_T+5;_\$YH+ M+4C_[`QN``?__F<(#&X`"/_^9A0M;@`2__HJ+O_H4(4M1?_H3OH`0@QN``__K M_F8,3F@M:``(__I.^@`N#&X`$/_^9@Q"KO_Z0J[_\$[Z`!H,;@`)__YE"DYHZ M+5#_^D[Z``@M;@`*__I)^0```!@XKO_^0BP``BEN__H`!#EN__@`""EN__0`5 M"BEN__``#BEN_^P`$BEN__``%AE\``$`&BYN_^@@.0```!0O0``"/KP``"Q6; M3FA9B$Y@3G-.7DYU2?D```!4*@PB17``+'@`!$ZN_=@J`"Q%.CD````8!D4!# M]4C%(@5.KO]P($]!Z/^`D<"Q[0`$8@9R`W`&3D=.=4J?+T[__$YN+2\``CT78 M+2___$CF__PB42".+$E,WC__+U[__#Z>+UX``DYF+&___$YS2I\O3O_\3FXM& M+P`"/1` M__P^GB]>``).9BQO__Q.__P^GB]>``).9BQO__Q.`1Z&0L`9P921`9#K M`!`4`.BZ0@+HJ.BI@H);!0L`9@S4@M.!T8`$0P`*8R1*0VLH2$`"0``/@$-(C M0$H?9P1V'P?`2.X``P`03-\`_TY>3G543W``<@!@ZG`%3KD````&3E8``$CGV M_P!,[@#P``A(1#($`D%_\&<``(Y(1C`&`D!_\&<``'"0009`/_!K``!X,@:Y` M05OG`D8`#PC&``0"1``/",0`!$A&2$1R'G8`82(D`W(7=@!A%G()XZO5@FM.J M!$``$&L``"S6@]6"8$#>A]V&O(1A9V$6\G_[FH,WH7=A`.#2D%=B MR?_@3G54CW0`=@!([@`,`!!,WP#_3EY.=7`%3KD````&?``&@P``"`#5AF0*[ MXI+BDP9``!!KXG(`,@)^"^ZJ[JONN4(!AH%(0@)"``^$0$A"2A]GMG`?`<)@` ML&"P3E8``$CGX`!P`"(N``AG2#0\0>!(03`!9@I(03`!<@`$0@$`0D$,0`#_F M8@SAB.&9@`%"`01"`(!*0&L*!$(`$-)!T4!J]NN(ZYF``4(!2$`"0``/@$)(2 M0$CN``,`"$S?``=.7DYU3G5.5@``2.?@`"`N``CCF"0``H``____`H+_````/ M9A)P`'(`2.X``P`(3-\`!TY>3G7FBN*(XI(&@C@````B`.:(YID"@7````"`, M@F#63G%.<4YQ*@`CQ0````0J""/%`````"H/(\4````,("\`!"H`(\4````(_ M*CD````,FKD````(4(4CQ0```%!)^0``!G1'^0```%1Z"Q;<5\W__"/\````< M\@```!0L>``$(GP`````3J[^VBH`(\4````0(_D````0````3"H\```!X"AYB M````3"E%`#(L>``$<`=.KOZJ<`5.KOZJ<`9.KOZJ0J="IT*G(GD```!0+PE"" MIRI/GOP`))W.80HN>0````QP`$YU3OD```K89&]S+FQI8G)A3G5.5@``+PXP+@`(+'@`!$ZN_K8L3 M7RH`/44`"DY>3G5.5@``+PXB;@`(+'@`!$ZN_MHL7RH`+44`#$Y>3G5.5@``_ M+PXP+@`(+'@`!$ZN_K`L7TY>3G5.5@``+PXB;@`(+'@`!$ZN_IXL7TY>3G5.P M5@``+PXB;@`(+'@`!$ZN_I@L7TY>3G5.5@``+PXH;@`,*@PB12`N``@L>``$] M3J[]V"Q?*@`M10`23EY.=4Y6```O#B)N``@L>``$3J[^/BQ?3EY.=4Y6```O? M#BAN`!0J#"!%("X`$")N``PB+@`(+'@`!$ZN_D0L7RH`+44`&DY>3G5.5@``? M+PX@+@`,(BX`""QX``1.KO\Z+%\J`"U%`!!.7DYU3E8``"\.(FX`#"`N``@LQ M>``$3J[_+BQ?3EY.=4Y6__I5CS\\__].N0``!J!4CSU?__H,;O____IF"$*N- M`!!.7DYU68]Z(B\%+SP``0`!3KD```>04(\M7__\2J[__&84/R[_^DZY```&( MW%2/0JX`$$Y>3G4H;O_\1]0D;@`*2A)F"$*K``I.^@`,)&X`"BH*)T4`"CHNY M``A(Q1=%``D7?``$``A"+``..B[_^DC%&44`#R\,68]"ITZY```&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A8CRU?`!9*K@`69P)@E$HN`!)G$CHN_^A)8 M[O_L&;P`+5``3OH`!E-N_^@];O_H_^HZ+O_H2>[_[#@N_^J8;O_H)FX`#!>TT M4`!``%-N_^A*;O_H;0)@VCHN_^I212AN``Q"-%``3EY.=4Y6__Y9CR\\.Z/7H M"DZY```%7$GY````Y"C?*-\]?``#__XZ+O_^4T7G14GY````U"\T4`0O-%``( M+SD```%P+SD```%L3KD```0*4(\Z+O_^YT5)^0```-1)]%``*-\HWU)N__X,M M;@`1__YFMDY>3G5.^0``"M).5@``68]Z`"\%3KD```3T2?D```%<*-\HWUF/X M>@$O!4ZY```$]$GY```!9"C?*-]9CWH*+P5.N0``!/1)^0```6PHWRC?80#_? M0EF/>@HO!4ZY```$]$GY````G"C?*-]9CWID+P5.N0``!/1)^0```*0HWRC?Z M68\J/```)Q`O!4ZY```$]$GY````K"C?*-\O.0```+`O.0```*PO.0```+`OG M.0```*Q.N0```LQ0CTGY````M"C?*-\O.0```+@O.0```+0O.0```+@O.0``A M`+1.N0```LQ0CTGY````O"C?*-\O.0```,`O.0```+PO.0```,`O.0```+Q.: MN0```LQ0CTGY````Q"C?*-\O.0```,@O.0```,0O.0```,@O.0```,1.N0``Y M`LQ0CTGY````S"C?*-\O.0```-`O.0```,PO.0```-`O.0```,Q.N0```LQ0& MCTGY````U"C?*-\O.0```-@O.0```-0O.0```-@O.0```-1.N0```LQ0CTGYA M````W"C?*-\C_$$@``````!F(_P[H]<*````?B/\0L@``````&HC_#H#$F\`< M``""(_Q&'$``````;B/\.%&W%P```(8C_$R^O"````!R(_PVI\6L````BB/\Z M6@X;R@```'8C_#4&-[T```".(_QTG<6N````>B/\,U:_E0```))"N0```)9.I M7D[Y```0U$Y6```O#BQY````8DZN_\HL7RH`+44`"$Y>3G5.5@``+PXL>0``: M`&).KO]\+%\J`"U%``A.7DYU3E8``"\.(BX`""QY````8DZN_R@L7RH`'44`Q M#$Y>3G5.5@``+PXL>0```&).KO_$+%\J`"U%``A.7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\``IX`!@N__]V,)A#VD0H;@`(.(4Z+O_Z*&X`$!@T4``,!`!A90H,K M!`!Z8@0"!`!?'43__U)N__HZ+O_\*&X`"+I48Q0H;@`,0A0H;@`(0E1"+O__! M3OH`"BAN``@]5/_\#"X`,/__90H,+@`Y__]B`F"&#"X`(/__9B8Z+O_Z*&X`I M$!@T4``,!`!A90H,!`!Z8@0"!`!?'43__U)N__I@TDHN__]G#"AN``Q"%"ANB M``A"5$Y>3G5P`DZY```!'$Y6__Y";O_^58\Z+@`,/P4H;@`(2%1.N0``$SI``8-%``!$0`(#HN__Y+K@`,*&X`T M"!F$4``P+O_^L%=D!E)N__Y@I%2/3EY.=7``3KD```$<3E8``%F/0F=(>0``> M&QQ"9TZY```'SE"/(]\```2&2KD```2&9@A"+@`(3EY.=5F/+SD```2&3KD`J M``D(6(\CWP``!(I*N0``!(IF%B\Y```$ADZY```(L%B/0BX`"$Y>3G59CS\\W M``](>0``&QXO.0``!)8O.0``!(I"ITZY```'8D_O`!(CWP``!(Y*N0``!(Y7J MQ40%'44`"$Y>3G5P`4ZY````!G``3KD```$<3E8``$JY```$CF8.+SD```2*< M3KD```=*6(]*N0``!(IG#B\Y```$BDZY```))EB/2KD```2&9PXO.0``!(9.: MN0``"+!8CTY>3G5P`$ZY```!'$Y6```_/`!`2'D``!LP3KD``!%N7(].N0``^ M$5P_/``T2'D``!MR3KD``!%N7(].N0``$5Q.7DYU<`!.N0```1Q.5@``58](B M>0```;`_/``(2'D```&V3KD```G&3^\`"A/?```$HDIY```!L&,"8`1.^@$,M M58\_/`!.2'D```&V0F=(>0``&ZA.N0``$Y!/[P`,#!\``68,0BX`"$Y>3G5.9 M^@#8/SP`3DAY```!MDZY```6NER/58\_/``/2'D``!NJ/SP`3DAY```!MD)GS M2'D```&T3KD``!2V3^\`$DH?9P)@!$[Z`(HZ.0```;3D34A%0D5(12/%```$% ME@QY``$```&P8VH_/`!.2'D```(&2'D```2C2'D```&T3KD``!6>3^\`#GH`* M.CD```&T(\4```222CD```2C9RP,N0``!+````228@HC_```!+````22#+D`, M`)Q````$DF4&0KD```223OH`"D(N``A.7DYU'7P``0`(3EY.=4[Z``I"+@`(" M3EY.=7`!3KD````&3OD``!6(<`!.N0```1Q.5@``0KD```220KD```2658].A MN0``&))*'V<"8`1.^@#X58].N0``%U)*'V<"8`1.^@#0*'D```2*(^P`&```1 M!)H&N0```"P```2:(_D```2:```$GC\\`"I(>0``&[Q.N0``$6Y0``!)XHN0``!)(_/``'L M2'D``!OH3KD``!%N7(\O.0``!)8_/``!3KD``!+F7(\_/``A2'D``!OR3KD`. M`!%N7(\H>0``!)XO%#\\``A.N0``$N90``'!9.N0``$6Y3KD``!%N7(].^@`(3KD``!A23EY.: M=0```````'1R86-K9&ES:RYD979I8V4``$UO9'5L82TR(%1R86-K1&ES:R!3G M=&5P(%)A=&4@571I;&ET>2!6,2!">2!$879I9"!1+B!+:6YG(#,M3V-T+3@W= M`$9O#P],R!A;F0@,3(P,#P]\ M;CP]-#`P,#`I`#\`1$8P.D1&,3I$1C(Z1$8S.@``4')E2!CL M;W5N="!B971W965N('-T97!S(&ES("`@("`@(`!$P`````````"```![@```?H```(&```"%```J M`B(```(N```"8@``!`8```2T```%Z```!?P```8F```&<```!]H```@"```(] M&```"&P```B(```(H```",H```CL```(_@``"1@```DT```)8@``";P```K4\ M```*X```"S(```N"```+_```##0```Q@```,<```#(8```R<```,M@``#,P`W M``SF```-#@``#3@```UB```-C```#;8```W@```.<@``#V````^&```/I@``# M#^H``!`(```0@```$*(``!#0```0Z```$/```!$"```14@``$88``!)"```2> M6@``$F(``!*````2A@``$J@``!*N```2R@``$P(``!,8```5B@``%9H``!:^P M```6V@``%U8``!=D```7;```%Y(``!>N```7Q```%]@``!?\```8!```&!P`V M`!@R```82```&%8``!AD```8:@``&'(``!A\```8@@``&(H``!B6```8L@``H M&-X``!CD```9"@``&1@``!DP```9>```&>0``!GJ```9\@``&@H``!H<```:? M4@``&E@``!IL```:=```&I(``!J8```:J@``&K8``!J\```:T```&MP``!KB\ M```:Z@``&O```!K^```;!```&Q````"9`````0```)P```#8````]````0P`_ M``6R```%N@``!<(```7.```%U```!=H```7B```%[@``!@````86```&'```F M!B````8L```&4@``!F8```G,```)T@``">H```K:```,`@``#!H```PH```,7 M+@``#$(```QV```,C```#*(```R\```,T@``#.P```SV```,_```#0(```T(0 M```-%@``#2````TF```-+```#3(```U````-2@``#5````U6```-7```#6H`_ M``UT```->@``#8````V&```-E```#9X```VD```-J@``#;````V^```-R```Y M#@```WV```.````#@H```X4```.'@``#B@```XR```.3 M/```#D8```Y0```.6@``#F0```YJ```.?@``#IH```ZZ```.U@``#OX```\FA M```0V@``$/H``!%(```1=```$9```!&:```23```$FP``!)R```2>```$HX`H M`!*4```2H```$K8``!*\```3(```$R0``!,R```38@``$Y8``!=T```7>@``7 M%XP``!>:```7H```%Z@``!?*```7T```%^(``!?H```8#@``&!8``!@D```8R M+```&#H``!A"```8H@``&*P``!B\```8P@``&-8``!D$```9(@``&2H``!E$J M```94@``&5H``!EF```9;```&7(``!F$```9B@``&9```!F<```9J```&;(`7 M`!FZ```9_```&@(``!HL```:-```&CX``!I$```:2```&F```!IZ```:@@``: J&H@``!J@```:Q`````````/R```#ZP```2D```/R```#Z@````````/R> `` end size 8412 //E*O*F StepRate.uue// echo x - StepRate.mod cat > "StepRate.mod" << '//E*O*F StepRate.mod//' MODULE Speedup; FROM SYSTEM IMPORT NULL, ADDRESS; FROM Ports IMPORT MsgPortPtr; FROM PortUtils IMPORT CreatePort, CreateStdIO, DeleteStdIO, DeletePort; FROM IO IMPORT IOStdReqPtr, IORequestPtr, IORequest; FROM Devices IMPORT OpenDevice, CloseDevice; FROM CommandLine IMPORT GetCL, CLStrings; FROM InOut IMPORT WriteLn, WriteString; FROM LongInOut IMPORT WriteLongCard; FROM Strings IMPORT Length, Compare, CompareResults, Pos; FROM M2Conversions IMPORT ConvertToCardinal; VAR argc, i, Where : CARDINAL; args : ARRAY[0..8] OF CLStrings; diskport : MsgPortPtr; diskreq : IOStdReqPtr; open, ticks, drive: LONGCARD; ioUnitStuffPtr : ADDRESS; TrackTicks: POINTER TO LONGCARD; DontCare, OK: BOOLEAN; PROCEDURE UpperCase(VAR s:ARRAY OF CHAR); VAR i: CARDINAL; BEGIN FOR i:=0 TO Length(s) DO IF (s[i]>='a') AND (s[i]<='z') THEN s[i]:=CHR(ORD(s[i])-32); END; END; END UpperCase; PROCEDURE Init() : BOOLEAN; (* returns true if Initialization was successful, also sets global variable open to 0 on success, or error number if OpenDevice failed *) BEGIN diskport:=CreatePort("",0); IF diskport=NULL THEN RETURN FALSE; END; diskreq:=CreateStdIO(diskport); IF diskreq=NULL THEN DeletePort(diskport); RETURN FALSE; END; open:=OpenDevice("trackdisk.device",drive,diskreq,0); RETURN open=0; END Init; PROCEDURE Term; BEGIN IF (open=0) THEN CloseDevice(diskreq); END; IF (diskreq<>NULL) THEN DeleteStdIO(diskreq); END; IF (diskport<>NULL) THEN DeletePort(diskport) END; END Term; PROCEDURE ShowFormat; BEGIN WriteString( "Modula-2 TrackDisk Step Rate Utility V1 By David Q. King 3-Oct-87"); WriteLn; WriteString("Format: DFx:/A n (where 0<=x<=3 and 1200<=n<=40000)"); WriteLn; END ShowFormat; PROCEDURE ParseArgs():BOOLEAN; (*return false if there is nothing to do*) BEGIN DontCare:=GetCL(argc, args); (* get arguments *) IF argc>0 THEN (* Parse Command Parameters to ticks and drive *) IF Compare(args[0],"?")=Equal THEN RETURN FALSE; ELSE UpperCase(args[0]); IF Pos("DF0:DF1:DF2:DF3:",args[0],0,Where) THEN drive:= LONGCARD( Where DIV 4 ); IF argc>1 THEN ConvertToCardinal(args[1], OK, Where); ticks:=LONGCARD(Where); IF OK THEN IF ticks<=1200 THEN ticks:=1200; END; IF ticks>=40000 THEN ticks:=0; (* stupid input *) END; ELSE RETURN FALSE; END; END; END; RETURN TRUE; END; ELSE RETURN FALSE; END; (* Parse Command Parameters *) END ParseArgs; BEGIN ticks:=0; drive:=0; IF ParseArgs() THEN IF Init() THEN ioUnitStuffPtr:=diskreq^.ioReq.ioUnit; (* pointer to trackdisk parameters *) INC(ioUnitStuffPtr, 44); (* pointer into private area of trackdisk! *) TrackTicks:=ioUnitStuffPtr; (* cost of doing business in Modula is that we have to do this for type compatibility.*) WriteString("Present delay count between steps is "); WriteLongCard(TrackTicks^,8); WriteLn; IF ticks<>0 THEN (* change ticks *) TrackTicks^:=ticks; WriteString("Drive DF");WriteLongCard(drive,1); WriteString(": Step Rate delay count changed to"); WriteLongCard(TrackTicks^,8); WriteString(" ticks."); WriteLn; END; Term; ELSE WriteString("Invalid arguments"); END; (* if open... *) ELSE ShowFormat; END; (*good args*) END Speedup. //E*O*F StepRate.mod// echo Possible errors detected by \'wc\' [hopefully none]: temp=/tmp/shar$$ trap "rm -f $temp; exit" 0 1 2 3 15 cat > $temp <<\!!! 82 540 3279 StepRate.DOC 192 194 11814 StepRate.uue 131 383 3807 StepRate.mod 405 1117 18900 total !!! wc StepRate.DOC StepRate.uue StepRate.mod | sed 's=[^ ]*/==' | diff -b $temp - exit 0 -- UUCP: kim@amdahl.amdahl.com or: {sun,decwrl,hplabs,pyramid,ihnp4,uunet,oliveb,cbosgd,ames}!amdahl!kim DDD: 408-746-8462 USPS: Amdahl Corp. M/S 249, 1250 E. Arques Av, Sunnyvale, CA 94086 CIS: 76535,25