>>Your method is good, but I propose an alternative one: if bit 7=1, DE-HL
>>contains sector number, and data is transferred to DTA area;
>I'm not sure this is such a good idea: DTA is only used by DOS, not by the
>diskROM. If you start using the DTA for the diskROM, you will mix up two
>systems that were seperated until now.

You are right. I confused #4010 ROM call with #2F and #30 DOS calls. Sorry!

>>>So, I propose to extend DOS function calls 
>>>2Fh & 30h (absolute disk read/write) as follows:
>>>
>>>If bit 7 of drive number (in L register) = 0: all parameters as usual
>>>If bit 7 of drive number = 1:
>>>
>>>       DE = low 16 bit of sector number  (was: sector number)
>>>       IX = high 16 bit of sector number  (was: unused)
>>
>>This is the best solution I think.
>
>Please, no!
>To read/write sectors using 32-bit sector numbers, use new function numbers.
>Reason: old programs, used to <=32MB partitions, should not be allowed to
>read sectors on partitions >32MB, because they can only mess things up.

But you can't create a new function call by patching #F252 hook. MSX-DOS
checks for a existing funtion call number in C before calling this hook...

Then I propose a solution: let's use the method I described, but let's add
a new environment item, for example SECTOR_ACCESS or so. When it is OFF or
don't exists, programs trying to access sectors on FAT16 drives using the
old method (bit 7 of drive number=0) will just get a "disk offline" or
other error. So you can choose if you want to protect your sytem against
old programs.

>Imagine the damage IMPROVE.COM could do on a FAT16 drive!

What a nightmare! Actually IMPROVE damages FAT12 disks sometimes...

>More useful would be a call that tells you which filesystem is used on a
>particular drive.

Boot sector has information enough for determine if FAT12 or FAT16 is being
used on a disk:

- On disks formatted with MS-DOS 4 or newer, you can find string FAT12 or
FAT16 in position #36.
- If this fails, check the number of clusters. 4085 or fewer means FAT12 in
use. 4086 or more means FAT16 in use.

So no new call is needed, I think.

By the way, what method should be used for determine if a disk is actually
formatted with MS(X)-DOS? MSX-DOS checks some parameters in boot sector and
the first bytes of FAT but I don't know exactly in which way.

I propose to check the following conditions on boot and first FAT sector,
if any of these fails then we can say that it is not a DOS disk:

- Sector size is #200.
- Cluster size is a power of 2.
- Number of FATs is at least 1.
- Dummy FAT entries for clusters 0 and 1 are filled with #FFFF.

Any other can be added but I think it is not necessary.


-----------------------------------------------------------------------------
        Konami Man - AKA Nestor Soriano (^ ^)v - Itsumo MSX user

        http://www.geocities.com/SiliconValley/Bay/9797/msx.htm
            [EMAIL PROTECTED]        ICQ#: 18281450

    "In Windows 98, 3.000 found failures of W95 have been corrected..."
Translation: 3.000.000 not found failures continue without being corrected...
----------------------------------------------------------------------------
-

****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****

Reply via email to