Jump to content



1

1 sector: changing content?


6 replies to this topic

#1 Marius1976 OFFLINE  

Marius1976

    Stargunner

  • 1,701 posts
  • Location:Netherlands

Posted Fri Feb 3, 2012 9:38 AM

How is this possible:

I have a floppy disk here. It is a copy protected floppy.

It is medium density, and sector $03DE (990) is filled with #$FF. Well... that is the FIRST time you read that sector.

When you RE-READ the sector it reads all #$00!

When you RE-READ it one more time the sector reads sometimes #$FF and sometimes #$FF.

(I mean the sector is filled with 128x the same value; all are #$00 or all are #$FF)

My questions are:

1) Is it possible to reproduce this behavior on a .ATR image?

2) How in the world does this work? Is there something funny going on here?

3) How can I create such a disk myself?

Thanks
M.

#2 Rybags OFFLINE  

Rybags

    Quadrunner

  • 10,314 posts
  • Location:Australia

Posted Fri Feb 3, 2012 9:55 AM

The old "duplicate sector" trick.

Fairly simple - put 2 or more sectors with the same ID in the header, the drive will pick up one or the other depending on what sector was accessed previously.

Such schemes would need a Happy board or similar. ATR doesn't support it, I'd say the protected image formats might.

#3 Marius1976 OFFLINE  

Marius1976

    Stargunner

  • 1,701 posts
  • Location:Netherlands

Posted Fri Feb 3, 2012 10:08 AM

View PostRybags, on Fri Feb 3, 2012 9:55 AM, said:

The old "duplicate sector" trick.

Fairly simple - put 2 or more sectors with the same ID in the header, the drive will pick up one or the other depending on what sector was accessed previously.

Ehm... I don't understand completely yet. Where is this header and what is the ID of a sector? Isn't this simply hard-coded in the firmware of the drive?

When I want to access sector $03DE and I instruct my drive to read that sector, where does it get that "ID"?
And even when I give 5 times the SAME instruction:

read $03de
read $03de
read $03de
read $03de
read $03de

the results are not all the 5 times the same.

Thanks for your assistance!

#4 Marius1976 OFFLINE  

Marius1976

    Stargunner

  • 1,701 posts
  • Location:Netherlands

Posted Fri Feb 3, 2012 10:20 AM

ah... I found this:

http://www.scribd.co...tion-Techniques

That describes what you suggested. Hmmm. Interesting

#5 Rybags OFFLINE  

Rybags

    Quadrunner

  • 10,314 posts
  • Location:Australia

Posted Fri Feb 3, 2012 10:37 AM

ID as in part of the header data the disk controller needs to find sectors on a track.

Hardcoded ? Kind of. A factory drive will create a cookie-cutter type of layout where each track's layout of sectors is consistent and can't be altered by the user.

A modded drive can let you do fancy stuff like duplicate sector IDs, missing sectors, CRC errors etc etc.

I forget which book, might be one of Sam's computer facts, but the track layout is documented. For each 128 byte sector, there's actually a fair bit more data like sync marks, headers and the like. Datasheets for the popular disk controller chips usually have some description too.

#6 Mathy ONLINE  

Mathy

    Stargunner

  • 1,167 posts
  • Location:Heerlen, NL

Posted Fri Feb 3, 2012 4:20 PM

Hello Marius

You should also try to find "Advanced Atari Protection Techniques". It's the second book of the (two part?) series. (BTW I bought these books from Alpha Systems even before I had a disk drive. And NO that are NOT for sale.)

Your "changing sector" could also be a fuzzy sector. A duplicate sector is like two identical twins that take advantage of the fact that you don't know that they are not one but two individuals. But a fuzzy sector is a sector that's partly unformatted. But in such a way, that the drives thinks, it's a normal sector. (BTW I had to look this up, the info indeed is in AAPT (the second book) and not in ASPT (which is mentioned above).)

Mathy

#7 Stephen OFFLINE  

Stephen

    River Patroller

  • 3,250 posts
  • A8 Gear Head
  • Location:Akron, Ohio

Posted Fri Feb 3, 2012 5:45 PM

View PostMathy, on Fri Feb 3, 2012 4:20 PM, said:

Hello Marius

You should also try to find "Advanced Atari Protection Techniques". It's the second book of the (two part?) series. (BTW I bought these books from Alpha Systems even before I had a disk drive. And NO that are NOT for sale.)

Your "changing sector" could also be a fuzzy sector. A duplicate sector is like two identical twins that take advantage of the fact that you don't know that they are not one but two individuals. But a fuzzy sector is a sector that's partly unformatted. But in such a way, that the drives thinks, it's a normal sector. (BTW I had to look this up, the info indeed is in AAPT (the second book) and not in ASPT (which is mentioned above).)

Mathy
Those are great books. I met the author at a local computer show, and I had him sign both of mine. He was incredibly shocked to see them on display.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users