AmigaDOS & Disks
11 messages in this thread
I've been looking for details on how AmigaDOS formats a disk and is able to
tell two disks with the same volume label apart. MSDOS gives each disk a
unique serial number – does AmigaDOS do the same? If not, what's the best
way to do this? I've looked in all the new RKMs that are out and I can't
find anything (if anyone says the answer's in the Libraries book that isn't
out yet, I'll scream …). Any suggestions on where to find out about this
would be greatly appreciated.
Harry
Going from memory here, but there's a "disk creation date" field in the
Root Block that _should_ be different for two different disks, even if they
have the same logical Volume name. This way, DOS can tell them apart. If
you have access to the old Transactor for the Amiga issues, I wrote a disk
copy program that appeared in one of them that did the "change the
datestamp" after copying the track containing the root block. If you need
more details, I'll have to do some serious digging here to find it.
Thanks. I _did_ come across something on my third or so 8^) trip through
the available books about the date stamp, but I couldn't find any header
files or structures that showed how to access it. Next time through I'll
key on "Root Block" and see if that gets me anywhere. Thanks again
Actually, the answer is in the Bantam book AmigaDos Technical Reference
Manual. The ROOT block holds the unique date for each disk. You will
definitely need this book if you are doing what I think you might be doing.
Lessee, I have the two Sybex books and the published new RKMs, and the
Bantam AmigaDOS manual, "Amiga C for Advanced Programmers", etc. You mean
there's another one? 8^) Oh, well, looks like I have to make a trip to the
bookstore. Thanks for the info!
Harry,
Nope…you just need the Bantam AmigaDOS manual. In particular,
the 2.04 version has better explanations and some example C source code in
it to point you in the right direction on how to read and interepret the
data.
Don
Don –
Thanks for responding. After I did my messaging last night I flipped
through it and found the Tech Ref section and example code. Now I don't
have to wonder what I'll be doing the next few nights 8^).
Harry
John –
One thing I just thought of – Will that book still be valid for 2.04
and/or is it being updated? I'd hate to buy an existing version and next
month the new one comes out. Books are harder to upgrade than software 8^).
I see by another answer that it apparently has been updated already. There
are a few changes in the directory structures under 2.04, primarily in the
area of hard links, but there may be a few other things. I know the
organization of the files as they are saved has changed (which of course
does not alter the contents of the headers, but may require attention if
doing things at a low level).
-larry
It's been quite a while since I studied the disk format, but as best I can
recall, the Amiga tells them apart by the date and time which are stored in
the root block. I forget the exact bytes of that block that hold the date
and time, but it is down somewhere around 108-110, I think. The date and
time are a little strange, too. They give the number of days since Nov. 1,
1980 (I think that was the date), the number of hours since midnight of the
current date, and then the number of ticks since the last hour, if my
memory serves correctly.
Thanks for the reply – now I have a little more info on where to look,
and yet another book to get 8^). Thanks for the info!