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) 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) > and how to read absolute sectors no need for your program to read absolute sectors > 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 ! > - 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. 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) 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) Hope this helps, Jon **** 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 ****