> Laurens Holst wrote:
> > ...
> > How to access the DISKROM,
>
> use entry #4010 DISKIO to read/write LOGICAL sectors (=sectors in a
> partition) Info about parameters can be found on the net.
> Important: one of the error codes is 'medium changed' (24 I think), then
> you must retry reading the sector.
>
> Normally DISKIO only supports 16bit sectornumbers. MegaSCSI and new
> IDEbios (to be released soon) supports 23bit sector access. (more info:
> see IDEbios #2.0 docs)
At the same address? Well, I'll just review the docs.
Hmmm... they are not on www.msx.ch!!!
Could you release the docs???
(or send them to me, [EMAIL PROTECTED])
> You will also need some info on drivenumbers; if you type SCANDISK C:,
> then you will have to convert C: to the correct diskromslot and local
> drivenumber. (in DOS2 c: can even be redirected to another drive by
> ASSIGN!) See drivenum.txt for more info. (I believe long long time
> ago, I've sent it to this list)
The DPB (Disk Parameter Block) which can be retrieved through BDOS function
#31 has got a byte to indicate the Physical drive number.
> > and how to read absolute sectors
>
> no need for your program to read absolute sectors
I mean just reading sectors. The Dos manual calls the routines "read/write
absolute sector", so that's why I thought it was called that way.
> > from a drive (not from the entire harddisk please because then I also
will
> > have to process the partition table).
>
> not necessary; btw... you can't even know if the medium you are
> accessing has a partition table !
Cool.
> > - And to avoid problems with FAT16 etc. (Improve has to be rewritten for
> > that, by the way), how can I recognize the FAT system??? I bet I'll have
to
> > read the correct value from the Dos DPB (Disk Parameter Block)
function...
> > What value should I check for? I can guess it but I'd like to hear it
> > 'officially', then I'll be sure about it.
>
> To check for FAT12 or FAT16:
> read logical sector 0 with DISKIO (=bootsector)
> and check at offset #011/2 (number of dir.entries): If it is #0200, then
> it is FAT16. Other values are FAT12. This is the easy way Okei checks
> for FAT16.
Is it not only the easy way, but also the correct way???
> Then you must also know how many sectors there are for this partition.
> If FAT12, use the value at offset #013/4 (16bit)
> If FAT16, use the value at offset #020/1/2/3 (32bit)
Nah, I just wanna give a message "FAT16 not supported yet"...
By the way, is the Dos GetDPB function also patched????
> Now all you have to do, is to read/(write?) all sectors to see if they
> are ok.
>
> Also useful: read/write sectors preferably in page 2 or 3 (#8000-#FFFF).
> Reading/writing in page 0 or 1, can be really slow because of complex
> slotswitching done by diskroms in that case)
Get the point, thanks.
~Grauw
--
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
email me: [EMAIL PROTECTED] or ICQ: 10196372
visit my homepage at http://grauw.blehq.org/
>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<
****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED]
and put "unsubscribe msx [EMAIL PROTECTED]" (without the quotes) in
the body (not the subject) of the message.
Problems? contact [EMAIL PROTECTED]
More information on MSX can be found in the following places:
The MSX faq: http://www.faq.msxnet.org/
The MSX newsgroup: comp.sys.msx
The MSX IRC channel: #MSX on Undernet
****