Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TRSDOS 1.3 Directory Entries

16 views
Skip to first unread message

Grinder

unread,
Jun 16, 2009, 5:02:31 PM6/16/09
to
Ok, I've done a little reverse engineering, with the benefit of David
Keil's Model III emulator.

I started with a TRSDOS 1.3 disk image, which I formatted from TRSDOS
1.3. It has 40 tracks of 18 sectors. Sectors are numbered from 1-18;
and tracks, 0-39. Track 17 is the directory track. This is apparently
a SSDD disk.

The first sector of the directory track probably contains a GAT, but I
haven't picked it entirely apart. I can see that the disk name and
creation date is in there, and probably a password hash or two. The
second sector of the directory is probably a HIT, but I've only glanced
at it.

The directory entries follow. They are 48 bytes in length and arrayed
as this stuct shows:

TTrs80_TRSDOS13_DirectoryEntry = packed record
Modified : array[0..2] of Byte; // DMY
EOF : Byte;
LRL : Byte;
FileName : array[0..7] of Char;
FileExt : array[0..2] of Char;
Password1 : Word;
Password2 : Word;
ERN : Word;
Extent : array[0..12] of Word;
end;

There apparently is no primary and extended directory entry scheme.
This means you file size is limited by the number of extents, and of
course, ultimately a file size.

A contiguous file on this disk could take up to 403 granules (13 x 31),
which at 3 sectors per granule (6 gpt) works out to about 302K. It
would probably be less than that because of boundary conditions around
the directory track, but still obviously exceed the capacity of a 180K
SSDD disk.

Or, if you have a horribly fragmented file, you may only be able to get
39 granules, or about 29K. I was able to do this by formatting the
disk, then generating a bunch of 256 byte files, which would each take a
granule on the disk. I deleted every other file, then started cranking
bytes into a large file.

I may have broken something, though, as when I now try to delete the
rest of those small files, I sometimes get an Error 24 - File Not Found,
after it has killed it. Weird.

Next up, TRSDOS 2.3.

Tom Lake

unread,
Jun 17, 2009, 11:05:10 AM6/17/09
to
> Next up, TRSDOS 2.3.

Save yourself a lot of time and pick up a copy of
TRS-80 Disk and Other Mysteries which is usually
available on eBay relatively cheap (if your time has
any value)

Tom Lake

Grinder

unread,
Jun 17, 2009, 12:33:14 PM6/17/09
to

You sir, underestimate how stingy I am. Your advice is good, of course,
but I'll confess that this is a sort of mania that may pass before my
purchase could be delivered.

I see there is a copy from an Amazon associate seller for about $25.
That definitely beats eBay, which has one item for $140. It's
unfortunate that our copyright laws keep that stuff out of the public
domain so long after their marketable.

George Phillips

unread,
Jun 17, 2009, 1:03:26 PM6/17/09
to
On Jun 17, 9:33 am, Grinder <grin...@no.spam.maam.com> wrote:
> You sir, underestimate how stingy I am.  Your advice is good, of course,
> but I'll confess that this is a sort of mania that may pass before my
> purchase could be delivered.

Try here: http://www.tim-mann.org/misosys.html

The "The Programmer's Guide to LDOS/TRSDOS Version 6" appears to have
the necessary disk layout information.

Knut

unread,
Jun 17, 2009, 3:52:47 PM6/17/09
to

There is a 41MB pdf that used to be available. I have put it temporarily on my site at
http://home.online.no/~kr-lund/TDOM.zip
the zip is almost as large (and actually violates the max 3MB limit my isp has for file sizes (I
think) so I hope they don't delete the file - it is there now and it has worked before...)

Model III Disk System Manual.pdf at 12MB might also say something useful. Also Machine Language Disk
IO & Other Mysteries.pdf at 16MB might be useful (has some chapters on III). There isn't room for
those until I delete TDOM.zip

Email me when you have got it (or post here). Just remember to edit the return address removing
'nogarbage.' for emailing.

Knut

Grinder

unread,
Jun 17, 2009, 7:55:08 PM6/17/09
to

Got it. Thanks--definitely interested in the "Mysteries" series.

Tom Lake

unread,
Jun 18, 2009, 2:26:07 PM6/18/09
to
> You sir, underestimate how stingy I am. Your advice is good, of course,
> but I'll confess that this is a sort of mania that may pass before my
> purchase could be delivered.

Stingy is such a harsh word to describe a good person! 8^) Shall we say
frugal? How about niggardly (which, despite the unfortunate similarity to
a vulgar word, has always meant extremely stingy and has NO
racial connotation whatsoever - ya could look it up!)

Tom Lake


N Morrison

unread,
Jun 18, 2009, 2:29:45 PM6/18/09
to
On Jun 17, 12:52 pm, Knut <kr-l...@nogarbage.online.no> wrote:
> Grinder wrote:
> > Tom Lake wrote:
> >>> Next up, TRSDOS 2.3.
>
> >> Save yourself a lot of time and pick up a copy of TRS-80 Disk and
> >> Other Mysteries which is usually
> >> available on eBay relatively cheap (if your time has any value)
>
> >> Tom Lake
>
> > You sir, underestimate how stingy I am.  Your advice is good, of course,
> > but I'll confess that this is a sort of mania that may pass before my
> > purchase could be delivered.
>
> > I see there is a copy from an Amazon associate seller for about $25.
> > That definitely beats eBay, which has one item for $140.  It's
> > unfortunate that our copyright laws keep that stuff out of the public
> > domain so long after their marketable.
>
> There is a 41MB pdf that used to be available. I have put it temporarily on my site athttp://home.online.no/~kr-lund/TDOM.zip

> the zip is almost as large (and actually violates the max 3MB limit my isp has for file sizes (I
> think) so I hope they don't delete the file - it is there now and it has worked before...)
>
> Model III Disk System Manual.pdf at 12MB might also say something useful. Also Machine Language Disk
> IO & Other Mysteries.pdf at 16MB might be useful (has some chapters on III). There isn't room for
> those until I delete TDOM.zip
>
> Email me when you have got it (or post here). Just remember to edit the return address removing
> 'nogarbage.' for emailing.
>
> Knut

Post them on Rapidshare.com and post the links here or on the TRS-80
Yahoo group.

Be sure to get an account on Rapidshare when offered after the first
post - it's free and lets you control the files you post.

Knut

unread,
Jun 18, 2009, 7:32:29 PM6/18/09
to

Ok, I'll look into that. I first thought that I didn't have room for that file but I checked and it
did fit. It depends on how many regatta photos there are at the moment.

Knut

Grinder

unread,
Jun 19, 2009, 8:42:15 PM6/19/09
to

I would hate to have to resign from my position because of a
misapprehension of that n word.

http://www.washingtonpost.com/wp-srv/local/longterm/williams/williams020499.htm

I am self-employed, and I have reason to fear my boss would be less
reasonable than Mayor Williams.

tur...@gmail.com

unread,
Jun 20, 2009, 2:35:45 PM6/20/09
to

Sorry -- thought I posted this link earlier... a great reading
overview of generic directory info...

Start at the end of page 2 or the beginning of page 3

http://www.tim-mann.org/trs80/doc/sutech.txt

excerpt:
"PHYSICAL STORAGE INFORMATION:

THE DIRECTORY: Location - Trk 17 (11H)

Sector 0 - Granule Allocation Table - GAT

The first sector contains the Granule Allocation Table (GAT)
information.
This tells the operating system which granules are allocated to
files or
locked out and which ones are free to use. (One GRANULE = 5
sectors. 2
granules = 1 track). This sector also contains the disk master
password, disk
name, date and the AUTO command. The first 35 bytes contain
information for
each of the 35 tracks. In each of these 35 bytes is a HEX number
representing
allocation info about that track.

Their meaning follows:

FC = track empty
FF = track full.
FE = first 5 sectors available
FD = last 5 sectors available

The track lockout bytes start at byte 60H. If a track is locked out
for some
reason (unformatable), lets say track 8, then byte 68H will contain
an FFH.
If the track is available for system use it will contain an FCH.
Depending on
which DOS and TRS-80 Model you have, you could notice that its GAT
uses a set
of different HEX bytes than the ones mentioned above, but the idea
will still
carry through.

Sector 1 - Hash Index Table - HIT

The Hash Index Table contains a one byte code (hash code) for
each file
stored in the directory. The location of the hash code points to
where a file
is located in the directory sectors. They are grouped into eight
sections,
one for every file storage sector in the directory. Since the
first two
sectors of the directory contain the GAT and HIT tables, that
leaves only
eight sectors left (single density) for the actual file information.

Sectors 2 to 9 - File Primary Directory Entries - FPDE
File Extension Directory Entries - FXDE

These sectors contain the actual directory information concerning
the file
names, attributes, passwords, size, end of file, etc. Each file
(FPDE) is
allowed 32 bytes for this information unless it needs more room
for an

Knut

unread,
Jun 21, 2009, 10:07:55 AM6/21/09
to

Ok

Here are the rest of the documents I suggested. If I understand it correctly there might be a limit
on how many that can download it so... to the collectors among us these are the same files that have
been available through Ira so if you have them from before you don't need these. They are all pdfs.

~15MB http://rapidshare.com/files/246994575/MachineLanguageDiskIOandOtherMysteries.zip
~12MB http://rapidshare.com/files/246998417/ModelIIIDiskSystemManual.zip
~7MB http://rapidshare.com/files/247000316/TRSDOS2.0andDisk_Basicv1.1Manual.zip
~15MB http://rapidshare.com/files/247002142/TRSDOS23DecodedandOtherMysteries.zip

I hope there is some help in these. I love the book Machine Language Disk I/O (almost as much as
Microsoft Basic Decoded)... :-)

Knut

Grinder

unread,
Jun 21, 2009, 12:22:23 PM6/21/09
to
> Here are the rest of the documents I suggested. If I understand it
> correctly there might be a limit on how many that can download it so...
> to the collectors among us these are the same files that have been
> available through Ira so if you have them from before you don't need
> these. They are all pdfs.
>
> ~15MB
> http://rapidshare.com/files/246994575/MachineLanguageDiskIOandOtherMysteries.zip
>
> ~12MB http://rapidshare.com/files/246998417/ModelIIIDiskSystemManual.zip
> ~7MB
> http://rapidshare.com/files/247000316/TRSDOS2.0andDisk_Basicv1.1Manual.zip
> ~15MB
> http://rapidshare.com/files/247002142/TRSDOS23DecodedandOtherMysteries.zip
>
> I hope there is some help in these. I love the book Machine Language
> Disk I/O (almost as much as Microsoft Basic Decoded)... :-)

Thank you -- that's some good stuff.

Grinder

unread,
Jun 21, 2009, 1:15:38 PM6/21/09
to
> Here are the rest of the documents I suggested. If I understand it
> correctly there might be a limit on how many that can download it so...
> to the collectors among us these are the same files that have been
> available through Ira so if you have them from before you don't need
> these. They are all pdfs.
>
> ~15MB
> http://rapidshare.com/files/246994575/MachineLanguageDiskIOandOtherMysteries.zip
>
> ~12MB http://rapidshare.com/files/246998417/ModelIIIDiskSystemManual.zip
> ~7MB
> http://rapidshare.com/files/247000316/TRSDOS2.0andDisk_Basicv1.1Manual.zip
> ~15MB
> http://rapidshare.com/files/247002142/TRSDOS23DecodedandOtherMysteries.zip

I made the mistake of trying to save the link target, so I really only
got an HTML file. Retrenching, I was able to get the first item, but
have now exceeded my download limit. Hopefully that's just a daily
limit and these files will be up for a few days.

Knut

unread,
Jun 21, 2009, 7:41:20 PM6/21/09
to

I just checked (as that server is new to me) and they reported 3, 3, 2 and 3 downloads for them...

BTW I threw in the trsdos manual too although I think there isn't that much technical info there.

Knut

Grinder

unread,
Jun 21, 2009, 10:17:48 PM6/21/09
to

Thanks, it looks like I'll get them. At this point I have 3 of 4 -- the
download limit is apparently just over a short period.

0 new messages