| |
tlr
Registered: Sep 2003 Posts: 1790 |
Drive coding: safe maximum time between $1c01 reads?
There was some discussion here previously: Job codes'n buffers
Graham mentions that the rotational speed of an 1571 is often >320 rpm.
I've heard of ~280 rpm on some drives.
So what is the safe distance?
Is the following partial decode safe? (assuming no page crossings) ldy #<n>
lp:
bvc .
clv
ldx $1c01
lda tab,x
sta buf,y
dey
bpl lp I'm thinking it is. A lap would be 22 cycles (=2+2+4+4+5+2+3).
Assuming min/max 280/330 rpm and a minimum write distance of 26 cycles gives a practical min distance of 26*(280/330)=22.06 cycles.
Maybe I'm missing something in addition... jitter perhaps?
Is 280/330 rpm a too narrow assumption?
EDIT: calculated this on 28 cycles by mistake, corrected it to 26 cycles. |
|
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
Thinking about a d64 compatible 4-8 GCR scheme? |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
No, normal GCR. |
| |
MagerValp
Registered: Dec 2001 Posts: 1078 |
Interesting, what would tab do?
I did a partial decode while reading, but mainly shifting to line up the nybbles better.
|
| |
tlr
Registered: Sep 2003 Posts: 1790 |
tab is a "sparse" table remapping bits to arrive in linear order at the c64 end. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
I have since reduced the distance to 20 cycles, so it should be safe enough.
I have some other questions though:
1. What is the safe spin-up time across drives?
The 1541 ROM seems to use 1 second for this, but that feels like a bit overkill.
2. What can be considered safe stepping/settling times?
The 1541 ROM has slow stepping, and uses acceleration to get higher speed during long movements.
|
| |
raven Account closed
Registered: Jan 2002 Posts: 137 |
Not counting the clv & $1c01 read, i've gone as high
as 18/19 cycles between reads.
That DID backfire on some drives (X2001 1541 drive *caugh*)
17 seems to work fine though, but you can also do
some dirty tricks, like use 19 cycles after one $1c01 read,
then use 15 after the next one, so it averages out.. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: Not counting the clv & $1c01 read, i've gone as high
as 18/19 cycles between reads.
That DID backfire on some drives (X2001 1541 drive *caugh*)
17 seems to work fine though, but you can also do
some dirty tricks, like use 19 cycles after one $1c01 read,
then use 15 after the next one, so it averages out..
17 cycles + bvc + clv would be 21 in total then. One below my calculated worst case.
In my routine 20 cycles (total) is the maximum delay, then 16, 17, 17 and 19.
Seems safe then! :)
The 1541 rom seems to use 19 cycles max:
.8:f4d4 50 FE BVC $F4D4
.8:f4d6 B8 CLV
.8:f4d7 AD 01 1C LDA $1C01
.8:f4da 91 30 STA ($30),Y
.8:f4dc C8 INY
.8:f4dd D0 F5 BNE $F4D4
.8:f4df A0 BA LDY #$BA
.8:f4e1 50 FE BVC $F4E1
.8:f4e3 B8 CLV
.8:f4e4 AD 01 1C LDA $1C01
.8:f4e7 99 00 01 STA $0100,Y
.8:f4ea C8 INY
.8:f4eb D0 F4 BNE $F4E1
How about step delays? |