Path: utzoo!yunexus!stpl!yugas!julius From: julius@yugas.UUCP (Julius OKLAMCAK) Newsgroups: comp.sys.atari.st Subject: Drive B Step Rate Message-ID: <809@yugas.UUCP> Date: 4 Jan 89 03:13:56 GMT Article-I.D.: yugas.809 Reply-To: julius@yugas.UUCP () Organization: C.R.E.S.S., York University, North York, Ontario, Canada, M3J 1P3. Lines: 92 In article <8812271702.AA11024@ucbvax.Berkeley.EDU>, aking@BBN.COM (Allen King) writes: > Speaking of "legal official atari sanctioned" ways, how do you set the step >rate of one floppy (e.g. drive B) to 6ms. I know how to do it by modifying >an unpublished address, and there is a call to set the default step rate. But > [rest deleted] Awhile back I hacked together a step rate program that tested the TOS version number and then set drive B to a 6 ms step rate. Last week I found out that TOS 1.4 will have an official call to legally :-) set the step rate... Anyway, here follows the (educational use only :-) 68000 source to my step rate program: ************************************************************************* * * * Set Drive B Step Rate 08/03/88 * * * * J. Oklamcak @ Atari (Canada) Corp. * * * ************************************************************************* text pea.l SetRate ; Set drive B step rate move.w #38,-(sp) trap #14 addq.l #6,sp tst.b SetFlag ; Check rate set flag bne.s SetOk beq.s NotOk SetExit: clr.w -(sp) ; ...done... trap #1 SetOk: pea.l RateSet ; Step rate set move.w #9,-(sp) trap #1 addq.l #6,-(sp) bra.s SetExit NotOk: pea.l IsNotSet ; Step rate not set move.w #9,-(sp) trap #1 addq.l #6,-(sp) bra.s SetExit SetRate: move.l $04F2,a0 ; Base address of OS move.w 2(a0),d0 ; Get OS version number lea.l TOSVers,a0 ; TOS version numbers lea.l RateAddr,a1 ; Step rate addresses FindTOS: move.w (a0)+,d1 ; Get version number bne.s TestTOS ; Test version number sf.b SetFlag ; Step rate not set rts TestTOS: move.w (a1)+,a2 ; Get address of step rate cmp.w d0,d1 ; Test TOS version number bne.s FindTOS ; Next version number... move.b #0,(a2) ; Set the step rate st.b SetFlag ; Step rate is set rts data TOSVers: dc.w $0100 ; $0A0D dc.w $0102 ; $0A53 dc.w $0104 ; $0A53 dc.w 0 RateAddr: dc.w $0A0D ; 1.00 dc.w $0A53 ; 1.02 dc.w $0A53 ; 1.04 RateSet: dc.b $0D,$0A dc.b "Drive B step rate : 6 ms" dc.b $0D,$0A,0 IsNotSet: dc.b $0D,$0A dc.b "Drive B step rate not set : OS version unknown" dc.b $0D,$0A,0 bss SetFlag: ds.w 1 end