You can access the 10th sector without directly accessing the controller.

The diskrom splits the logical sector number into three parts:
- side number
- track number
- sector number (normally 1 - 9)

This division routine (BC = BC/DE, remainder HL) calls a hook (F27F) at the
end
of its calculation. All that has to be done is set HL to the appropiate
value,
10 for example and this 10 will be used to address sector number 10 within a
certain track. But it could also be 240, it is just a value to identify the
sector number on the disk. Normally these sector numbers range from 1 - 9,
but
they can also be something like 101, 102, 103, 104, 105 - 109. The diskrom
normally only searches for 1 - 9, which is the remainder value + 1.

But by changing the value returned by this particular hook you can change
all that.

Rests only to be able to write a different track than the normal one.
I have seen this technique being used in several copy protection programs.

To test this on a MSX/MSX2, write the following two instructions at address
F27F:

        LD (9000H),HL
        RET

And view the value written at 9000h-9001h after reading a logical sector in
basic.

Have fun.

Frits

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Maarten
ter Huurne
Sent: Friday, April 16, 1999 4:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Speed difference between disk formatted on PC and MSX


Adriano Camargo Rodrigues da Cunha wrote:

>       But with a small gap do I gain more disk space, don't I?

In theory, yes. You can fit 10 sectors into a track if you make the gaps
small enough.
But unless you're doing direct disk I/O, you can't access the 10th sector
in a track. The diskROM always uses 9 sectors per track. Although a format
with 8 sector per track also exists, maybe some old MSX diskROMs also
support that.

Shevek wrote:

>I think it is the same reason as putting the boot sector on the outside of
>the disk (the widest circle). There is more magnetic space reserved for
>the sector, so it will be more secure.

That's not true. A bigger gap doesn't mean the bytes inside sector get more
space, it only means they are surrounded by more space.

Does anyone know what the function of the gaps is in the first place? Is it
only for giving the computer time to prepare for the next sector? Or does
it have an impact on data safety as well?

Bye,
                Maarten


****
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/)
****


****
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