Need information on TRSDOS 1.3 internals

From: Tim Mann <tim_at_tim-mann.org>
Date: Thu Dec 5 02:38:09 2002

> Does anyone have any documentation on the data structures of
> TRSDOS 1.3? Specifically, I'd like to know the catalog structure,
> as well as the scheme for storing files across multiple sectors.

I used to have that in my head, but it's fuzzed a bit over the years.
When I was working for the LDOS folks in 1981, I wrote a program to read
TRSDOS 1.3 diskettes and copy the files to LDOS diskettes. I don't know
of a place where the TRSDOS 1.3 on-disk structures are written down,
though you could try Wade Fincher's manual scans at
http://www2.asub.arknet.edu/wade/operate.htm and David Keil's at
http://discover-net.net/~dmkeil/trspdf.htm.

The general idea is similar to other TRS-80 operating systems. The
other systems are well documented (especially LDOS; see my web site),
but Model III TRSDOS is different in several ways. Here's a summary of
what I remember.

Tracks are numbered from 0. The disks are single-sided. Sectors are
numbered from 1 to 18. There are 256 bytes/sector. Tracks are divided
into allocation units called granules; there are 3 sectors/granule (6
granules/track).

You should find the directory on track 17 (decimal). All sectors on
tracks *other* than 17 are written with a deleted data address mark
(this is opposite from other TRS-80 operating systems, by the way).

On track 17, sector 1 has a bitmap to show which granules are allocated.
There is one byte per track. There might be a second bitmap to show
which granules are locked out as defective. Towards the end of the
sector is the disk name and date and the AUTO command (executed if you
boot the disk).

Sector 2 has a hash table that was used to help search the directory
without reading all of it. You can ignore it if you're just reading the
disk.

The remaining sectors are full of 48-byte directory entries, with the
last 16 bytes of each sector unused. The fields are similar to what's
described in the LDOS documentation
(http://www.tim-mann.org/trs80/doc/prgguide.pdf), but there are some
differences in pesky details, like a possible off-by-1 error in the
count of the number of sectors in the file. The other main difference
is that the Model III TRSDOS directory entries are 16 bytes longer, so
that you can have more extent pointers in the entry.

Hope this helps.

-- 
Tim Mann  tim_at_tim-mann.org  http://www.tim-mann.org/
Received on Thu Dec 05 2002 - 02:38:09 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:34:39 BST