Return-Path: mkr@poboxes.com 
Delivery-Date: Mon, 19 Jan 98 19:27:54 -0800
Return-Path: mkr@poboxes.com
Received: by src-mail.pa.dec.com; id AA06122; Mon, 19 Jan 98 19:27:53 -0800
Received: from mail2.digital.com by pobox1.pa.dec.com (5.65v3.2/1.1.10.5/07Nov97-1157AM)
	id AA02558; Mon, 19 Jan 1998 19:27:52 -0800
Received: from pike.sover.net (pike.sover.net [204.71.16.17])
	by mail2.digital.com (8.8.8/8.8.8/WV1.0c) with ESMTP id TAA00896
	for <mann@pa.dec.com>; Mon, 19 Jan 1998 19:27:51 -0800 (PST)
Received: from poboxes.com (pm1a21.wrj.sover.net [206.25.69.151])
	by pike.sover.net (8.8.5/8.8.5) with ESMTP id WAA15308;
	Mon, 19 Jan 1998 22:27:36 -0500 (EST)
Message-Id: <34C41670.DA82FEA@poboxes.com>
Date: Mon, 19 Jan 1998 22:13:52 -0500
From: Matthew Reed <mkr@poboxes.com>
X-Mailer: Mozilla 4.04 [en] (Win95; I)
Mime-Version: 1.0
To: Pete Cervasio <cervasio@airmail.net>, Tim Mann <mann@pa.dec.com>
Subject: Re: Wanting to be compatible. (*.HDV)
References: <3.0.3.32.19980115010318.00705408@mail.airmail.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Pete,

I am including a description of my .HDV format at the end of this
message. I took this description right from the comments of my emulator
source code, so it should be accurate. As you can see, it is a very
straightforward format, but there is still plenty of room for expansion
if needed.

If you do decide to use this format, I would appreciate it if you would
credit me for creating it. Also, if you write a program to create .HDV
files, I would appreciate it if you would use a unique number for the
"Created by" field.

To verify that a file is in the .HDV format, my emulator compares the
identifier in bytes 1 and 2, makes sure bit 6 of byte 7 is set, and then
makes sure byte 6 is 0. If all that checks out, then it is assumed to be
a .HDV file.

To answer your question, the field that you noticed starting at byte 32
is not actually the filename but rather the disk volume label. This
field will change if you use the "/V" option of HDFORMAT to specify
another volume label.

I hope this information helps you. If you have any questions or
suggestions about this format, please e-mail me. Good luck with your
driver!

-- 
Matthew Reed
mkr@poboxes.com
http://www.arrowweb.com/mkr

-----
Hard disk header format version 1.0

0: Identifier #1: 56H
1: Identifier #2: CBH
2: Version of format: 10H = version 1.0
3: Simple checksum: 
    To calculate, add together bytes 0 to 31 of header
      (excepting byte 3), then XOR result with 4CH
4: Number of 256 byte blocks in header: should be 1
5: Not used, but HDFORMAT sets to 4
6: Media type: 0 for hard disk
7: Flags #1:
    bit 7: Write protected: 0 for no, 1 for yes
    bit 6: Must be 1
    bit 5 - 0: reserved
8: Flags #2: reserved
9: Flags #3: reserved
10: Created by: 14H = HDFORMAT
11: Disk format: 0 = LDOS/LS-DOS
12: Creation month: mm
13: Creation day: dd
14: Creation year: yy (offset from 1900)
15 - 26: reserved
27: Disk parameters:
     bit 7: Density: 0 = double, 1 = single
     bit 6: Sides: 0 = one side, 1 = 2 sides
     bit 5: First sector: 0 if sector 0, 1 if sector 1
     bit 4: DAM convention: 0 if normal (LDOS),
                            1 if reversed (TRSDOS 1.3)
     bit 3 - 0: reserved
28: Number of cylinders per disk
29: Number of sectors per track (one side only)
30: Number of granules per track (one side only)
31: Directory cylinder
32: Volume label: 31 bytes terminated by 0
64 - 255: reserved

