Path: news1.icaen!news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.erols.net!peerfeed.internetmci.com!news.uoregon.edu!cie-2.uoregon.edu!nparker
From: nparker@cie-2.uoregon.edu (Neil Parker)
Newsgroups: comp.sys.apple2.programmer
Subject: Re: ProDOS directory header format?
Date: 17 Nov 1996 08:11:29 GMT
Organization: University of Oregon Campus Information Exchange
Lines: 56
Message-ID: <56mhbh$ra8@pith.uoregon.edu>
References: <56lhu8$1stq@dakota.gate.net>
NNTP-Posting-Host: cie-2.uoregon.edu
NNTP-Posting-User: nparker

In article <56lhu8$1stq@dakota.gate.net> stever@gate.net (Steve Reeves) writes:
>I'm trying to fill in some gaps in my knowledge of the ProDOS file
>system structure and I have some questions about the formerly reserved
>bytes in the directory header ($14-$19).  (I know that GS/OS tech note
>#8 documents the use of bytes $1A-$1B to indicate the case of the
>directory name.)
>
>It looks as if the modification date and time of a volume are stored in
>the volume directory header at $16-$19.  Where is this documented and what
>version of ProDOS first started using it?  I can find no mention of this
>in ProDOS tech note #23 or in the release notes for System Disk versions
>4.0.1 or 4.0.2.

I'm unaware of any documentation anywhere that discusses this.   But on the
disks in my collection, it's quite consistant--any disk that GS/OS has ever
written on has the modification date stored in $16-$17, and the modification
time stored in $18-$19.

I'm actually a little suprised that they put the uppercase/lowercase bits
in $1A-$1B instead of the VERSION/MIN_VERSION fields like they did with
ordinary files.  But on all my disks, VERSION and MIN_VERSION in the volume
header are used (albeit somewhat inconsistantly) for their original
purpose.

>Byte $14 seems to be used for something in subdirectory headers.  Anyone
>know what this is?

The only book I've ever seen that mentions this is _Beneath_Apple_ProDOS_
by Don Worth and Pieter Lechner.  It's mentioned in two places--once on
page 4-28 (describing the subdirectory header structure), where it says,
"$14 must contain $75," and on page 6-60 (describing MLI error codes),
where it says, "$4A  ...This error can also occur if the final subdirectory
header has an improper format.  The byte at +$14 in the subdirectory key
block (reserved bytes) must contain 5 and only 5 one bits (it is usually
$75)."

I have no idea if the check for exactly 5 one bits is still done by ProDOS,
but all the disks in my collection seem to have $75 or $76 in this byte.
The modification date and uppercase/lowercase bits are *never* stored in
this position in the subdirectory header...only in the volume header.  (On
some of my older disks, bytes $15-$1B of the subdirectory headers contain
$48 $55 $53 $54 $4F $4E $21, which spells out "HUSTON!" in ASCII.  These
disks usually have $75 at +$14...disks with $76 at +$14 generally have
zeros in bytes $15-$1B.)


The VERSION and MIN_VERSION fields of subdirectory headers seem to be
somewhat schizophrenic...they're usually used as version numbers, but I
have a couple of disks on which they're used for uppercase/lowercase bits.

              - Neil Parker
-- 
Neil Parker, nparker@{cie-2,cie}.uoregon.edu, http://cie-2.uoregon.edu/~nparker

     "Evolution is vastly overrated."  -- Ambassador Delenn, _Babylon_5_

