A couple of questions;)
ZXNet echo conference «real.speccy»
From Fyodor Odegov → To All 21 August 2001
I am interested in the following questions about programming disk drives:)
1) How to determine whether a physical disk is inserted into the drive?
2) How to determine whether a disk is formatted for TR-DOS or not? Here I am interested
in relation to both floppy disks and images on the screw :)
3) How to determine (programmatically;)) whether write protection is installed on a floppy disk?
Examples of procedures on these topics are very welcome...
I wish you good luck!
Sincerely, Fyodor Odegov aka FION.
From Aleksandr Majorov → To All 22 August 2001
21 Aug 01 21:33, Fyodor Odegov -> All:
FO> I am interested in the following questions about programming disk
FO> drives:)
FO> 1) How to determine whether a physical disk is inserted into the drive?
Try to access the disk ;)
FO> 2) How to determine whether a disk is formatted for TR-DOS or not? Here
FO> we are interested in both information in relation to floppy disks and images
FO> on the screw :)
We read the 8th sector of the 0th track and analyze:
sector length = 256 bytes, at offset #E7 there should
be code #10 - identifier the disk belongs to TR-DOS
Hy and under load we check the bytes #E1 - #FC for content.
FO> 3) How to determine (programmatically;)) whether write protection is installed on the floppy disk
FO>?
We turn to the disk, and then read contents of the VG status register
FO> Examples of procedures on these topics are very welcome...
Right now I’m unlikely to find raw materials...
Later, somehow...
Aleksandr
From Dmitriy Nesmachny → To All 23 August 2001
Tuesday 21 Aug 2001 21:33:19, Fyodor Odegov -> All:
FO> Interested in the following questions about programming disk
FO> drives:)
FO> 1) How to determine whether a physical disk is inserted into a
FO> drive?
Try to read something...
FO> 2) How to determine Is the disk formatted for TR-DOS or
FO> not? Here we are interested
FO> both in relation to floppy disks and to images
FO> on a screw :)
The byte in the 9th sector of the 0th road at offset #E7 is equal to #10 - that means TRDOS.
FO> 3) How to determine (programmatically;)) whether write protection is installed on the floppy disk
FO>?
Well... Read bit 6 of the status register after execution
positioning/recording commands.
FO> Examples of procedures on these topics are very welcome...
Well, I definitely won’t bother looking for them today, remind me in soap - I’ll look in my
sources...
P.S. find a reference book on TRDOS by Larchenko and Rodionov: almost everything is there...
With respect, Dmitriy.
From Kirill Frolov → To All 24 August 2001
21 Aug 01 21:33, Fyodor Odegov wrote to All:
KF> 0) How to determine if there is a disk drive?
Issue a RESET command to the controller. If the TRK0 signal is absent -
there is no disk drive or it is faulty.
Then give the STEP FORWARD command, if TRK0 is present - there is no disk drive or
it is faulty, otherwise
it is. Then you can do this for all 4 drives and check
the position of the head in
each after manipulating any other. This way you can find out how many
disk drives are in the system
(0..4), and how many are supported by the controller (1/2/4).
FO> 1) How to determine whether a physical disk is inserted into the drive?
if (no index) - inserted;
elseif (protection available) - inserted; // may not
work for 3.5 inches.
elseif (unwind and index changes) -- inserted; // works always
and everywhere
else not inserted;
FO> 2) How to determine whether a disk is formatted for TR-DOS or not?
On each track there are sectors with numbers 1..0x10 and a length of 256 bytes.
FO> Here you are interested in both information in relation to floppy disks and
FO> images on the screw :) 3) How to determine (programmatically;)) is write protection installed on
FO> floppy disk?
If for those emulated via 3d13, just try to write.
I just don’t know how to distinguish 3.5 and 5.25floppy drives :-(
From Ilya Vinogradov → To All 25 August 2001
Here Kirill Frolov writes to Fyodor Odegov and I wouldn’t mind intervening:
KF> I just don’t know how to distinguish between 3.5 and 5.25 drives :-(
By engine acceleration speed. That is, you need to do what you said:
KF> elseif (unscrew and the index changes) - inserted; //
KF> works always and everywhere
But at the same time, measure the time for promotion.
Kirill, don’t be bored SiRiL/4D.