[sebhc] H8 Emulator update

Eric J. Rothfus eric at rothfus.com
Mon May 31 23:27:42 CDT 2004


> I need to understand how HDOS knows what size the drive is.
> If you could give me bootable images for 40-track DS, 80-Track SS
> and 80-track DS, what would help a lot.

I have the source going up tomorrow for the "fstool" program
which includes support for the HDOS file system.  You can get
a good idea of how HDOS does things from it, or feel free to
use what you like.

For example, the "label" structure looks like this.  Note,
however, that this structure does NOT indicate the number
of bytes in each field value, or the endian-ness of multi-byte
values.  That is in the marshaling code that fstool uses to
load or store this structure to the label sector of the HDOS
image.

------------------------------------------------------------
#define LABELSIZE	60
#define LABELTRACK	0
#define LABELSECTOR	9

struct hdos_label {
    int			serial;		/* disk serial number		*/
    struct hdos_date	initdate;	/* date disk initialized	*/
    int			dirsec;		/* logical sec where dir starts	*/
    int			grtsec;		/* logical sec where GRT starts	*/
    int			grpsize;	/* group size (2,4, or 8 secs)	*/
    int			voltype;	/* type of vol (0 = data,
					                1 = bootable,
							2 = no dir)	*/
    int			version;	/* version of init.abs for init	*/
    int			rgtsec;		/* logical sec where RGT starts	*/
    int			size;		/* number of sectors on disk	*/
    int			physize;	/* phys sector size (fixed 256)	*/
    int			flags;		/* volume flags 00 = 40 tk 1 sd
					                01 = 40 tk 2 sd
							10 = 80 tk 1 sd
							11 = 80 tk 2 sd	*/
    int			sides;		/* number of sides = 1 or 2	*/
    int			tracks;		/* number of tracks = 40 or 80	*/
    char		label[LABELSIZE];/* textual disk label		*/
    int			res;		/* reserved			*/
    int			secs;		/* sectors per track (fixed 10)	*/
};
------------------------------------------------------------

The HDOS code is written as a library and should be quite portable
to any OS/model.

BTW, I told Steven that I'd put it up as a tar-ball for Linux-types.
Do I need to do a ZIP also?

In the mean-time, check out:
http://home.comcast.net/~davidwallace2000/h8/project8080_archive/design_h17.html

This is where I found everything I needed for HDOS...thanks Dave Shaw (and
Dave Wallace for archiving it).

Eric

--
Delivered by the SEBHC Mailing List



More information about the Sebhc mailing list