Driver for FDD
ZXNet echo conference «real.speccy»
From Sergey Selev → To All 25 March 2001
Is it possible to use this subroutine for positioning?
I wonder if the sector will be damaged during recording.
B=track number 0..x
FDDPOS IN (#F8)
LD A,B
LD (FDDTS+1),A ; track number
SRL B
LD C,#3C
JR NC,FDDPOS1
LD C,#2C
FDDPOS1 LD A,(FDDN) ; drive number
OR C
OUT (#FF)
LD A,B
OUT (#7F)
IN (#3F)
CP B
PUSH AF
LD A,#18
OUT (#1F)
FDDPOS2 IN (#FF)
RLA
JR NC,FDDPOS2
POP AF
CALL NZ,FDDPOS3
IN (#FA)
RET
FDDPOS3 LD A,#10
FDDPAU LD C,0
FDDPAU1 DEC C
JR NZ,FDDPAU1
DEC A
JR NZ,FDDPAU
RET
Why is this routine buggy when interrupts are enabled ?
FDDRD IN (#F8)
PUSH DE
LD BC,#037F
FDDRD1 IN (#FF)
AND #C0
JR NZ,FDDRD2
INC DE
LD A,D
OR E
JR NZ,FDDRD1
DJNZ FDDRD1
JR FDDRD4
FDDRD2 INI
FDDRD3 IN (#FF)
AND #C0
JR Z,FDDRD3
JP P,FDRD2
FDDRD4 POP DE
IN (#FA)
RET
Well, till next time...
██▓▓▓▒▒▒░░░ ╔══ Sergey aka Cyber from Cobra Software ══╗
█▓▓▓▒▒▒░░░ ╚══════ 500:322/62════ 2:462/167.62 ══════ў
... [I ZX] [Beer] [Storm] [No RAR allowed] [ZXNet] [FidoNet] [Offspring]
From Kirill Frolov → To All 26 March 2001
25 Mar 01 07:37, Sergey Selev wrote to All:
SS> IN (#3F)
SS> CP B
SS> PUSH AF
SS> LD A,#18
SS> OUT (#1F)
SS> FDDPOS2 IN (#FF)
SS> RLA
SS> JR NC,FDDPOS2
SS> POP AF
ld a, 4 ; bit E for read/write commands gives a HARDWARE
delay of 15ms
jr nz, $+3
xor a
ld (writedelaymask), a
SS> IN (#FA)
SS> RET
when writing:
ld a, writecommand
...
ld hl, writedelaymask
or (hl)
ld (hl), 0
...
when reading, in case of a crc error, at least one repetition is desirable without
moving the head
Performing recording without a delay on brake drives leads to a crc error
in the sector.
Performing a write when the disk is not overclocked can lead to the fact that
the sector being written
will overlap the next sector written after it (especially when short length
intersector
gaps). For controllers with PLL (Kai, Scorpio) this is probably relevant -
they are able
to normally read the sector header in case of wild deviations of the disk rotation speed from
the nominal one.
For disk drives like 5311, it takes time to calm downheads after
positioning 18ms, time to spin up the disk 800ms. Whether the disk has already been spun up or
requires spin-up can be determined as follows:
in a, (0x1f) ; status register
and 0x80 ; A<>0 if the HLD/M signal on the drive interface
is active
; if inactive, then a delay is required for
promotion,
; if it’s active, it’s not a fact that it’s activated...
SS> Why is this subroutine buggy when interrupts are enabled?
If you don’t have it, then the INT signal for the processor can be active up to 70
cycles.
The conclusions are obvious...
From Sergey Selev → To All 27 March 2001
March 26, 2001 Kirill Frolov and Sergey Selev talked about Driver for FDD
KF> Performing recording without delay on brake drives
KF> leads to a crc error in the sector.
Already saw what it is.
KF> it is normal to read the sector header with wild deviations
KF> of the disk rotation speed from
KF> nominal.
I have 5313 - 288 rpm, and all the others are about 300.
There is no PLL.
From Kirill Frolov → To All 30 March 2001
KF>> disk rotation speed from the nominal.
SS> I have 5313 - 288 rpm, and all the others are about 300. There is no PLL.
288 rpm. this is already too big a deviation.
SS> My int is 23 or 24 bars, I don’t remember. Test 4.30 outputs "Too short".
Don't trust it. Check with the Kovalevsky test.
From Sergey Selev → To All 31 March 2001
Well, till next time...
██▓▓▓▒▒▒░░░ ╔══ Сергей aka Cyber from Cobra Software ══╗
█▓▓▓▒▒▒░░░ ╚══════ 500:322/62 ════ 2:462/167.62 ══════╝
... [I ZX] [Beer] [Storm] [No RAR allowed] [ZXNet] [FidoNet] [Offspring]
From Kirill Frolov → To All 1 April 2001
SS> Soap. Yuyuchi from Larka, and not some kind of shit, so that later I don’t
^^^^^^^^^^^^^^^
SS> tormented.
Are you kidding me? Although... I have an idea. Today I will make from this g...
larka 5.0+
From Kirill Frolov → To All 1 April 2001
KF>> Don't trust him. Check with the Kovalevsky test.
SS> Soap. Yuyuchi from Larka, and not some kind of shit, so that I don’t suffer
SS> later.
I patched up the encoder a little. For some reason it seems to me that you will
suffer.
In general, you shouldn’t, but you never know... It’s just that for some reason my output files are always 2
characters
longer than Lara’s. :-/
From Sergey Selev → To All 2 April 2001
KF> IMHO 5311 and 5313 rulez foreva. They can be configured.
A friend will configure it. And he will give me his Teac.
KF> Are you kidding me? Although... I have an idea. Shall I make
2 sections? It won't take more than 10 seconds.
KF> today from this g... larku 5.0+
It's a pity that my joke in zx.talking didn't work out. :(
From Alexander Groholsky → To All 3 April 2001
KF> I patched the encoder a little. For some reason it seems to me that you will
KF> suffer.
No one suffered. Lara digested everything. Why did you think that you would have to
suffer?
KF> Actually, you shouldn’t, but you never know... It’s just that for some reason my output files are
KF> 2
KF> symbols
KF> always longer than Lara’s. :-/
So what.
Well, that’s all, Kirill, for now.
Alexander Grokholsky was with you April 3, 2001
[I ZX] Spawn/Last Masters Group/X-Project Association 05:25:47
... E-Mail: spaw...@mail.ru - FidoNet: 2:461/16.23 - ZXNet: 500:572/16.23
From Kirill Frolov → To All 3 April 2001
SS> 2 sections? It won't take more than 10 seconds.
Well, yes. Only the disassembled Spectrum is lying around and there is no customized copy of Lara either.