Hard sector format

HxC Floppy emulator support for all others computers...
Jeff
Site Admin
Posts: 4914
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Hard sector format

Post by Jeff » Mon Oct 30, 2017 11:39 pm

Can we put here the exact supposed layout/format ?
I mean something like this (for example):

[Preamble Byte 0x00 * 12][ID Mark 0xAA * 2] [Track Number][Side Number][Data Sector (256][CRC Low][CRC High][GAP 0xFF * 16]

snhirsch
Posts: 56
Joined: Tue Dec 08, 2015 1:42 am

Re: Hard sector format

Post by snhirsch » Tue Oct 31, 2017 3:44 pm

That's a good idea. I'll work it up and try to post this evening. Re: Trailing gap. I do not believe this concept is relevant for hard-sector formats since the controller is expected to re-sync after each index pulse.

snhirsch
Posts: 56
Joined: Tue Dec 08, 2015 1:42 am

Re: Hard sector format

Post by snhirsch » Sat Nov 04, 2017 3:43 pm

Here is a compilation of everything known about the Northstar DD format:

Code: Select all

Northstar DD floppy format

10-sectors per track x 35 tracks per side
MFM encoding

Single and double-sided formats are supported

---

Data Layout

[Sector index (rising edge)]
[96 us delay]
[Preamble = 33 Bytes of 0]
[Sync 0xFB 1-byte]
[Track-Sector 1-byte (see below)]
[Data 512-bytes]
[Checksum 1-byte (see below)]

There is no formal padding at the end of the sector. In a hard-sector
format the diskette controller is expected to re-sync on the next
index hole.

---

Track-Sector Byte Detail

  Bits 0-3 = Sector (0..9)

  Physical Order from rotational index: 0 2 4 6 8 1 3 5 7 9

  Bits 4-7 are related to the track.

On side 0 of a diskette, the value in bits 4-7 cycles through the
sequence: 0x0 0x4 0x8 0xC as track advances. In other words,
tracks 0, 4, 8, 12, 16, 20, 24, 28, 32 have a value of '0x0' in the
upper four bits.  Tracks 1, 5, 9, 13, 17, 21, 25, 29, 33 have a value
of 0x4 in the upper bits, etc.

On side 1 of a double-sided diskette, the value in bits 4-7 cycles
through the sequence: 0x1, 0x5, 0x9, 0xD as we advance inward from the
outermost track. This amounts to the same pattern shown above, but
with bit 4 set to denote the second side of the diskette.

---

Checksum Byte Detail

The checksum algorithm works as follows:

// Sector data
unsigned char data[512];

unsigned char csum = 0;
for (int i=0; i<512; i++) {
  csum = csum ^ data[i];
  csum = (csum << 1)|(csum >> 7);
}

// Resulting value is written to diskette as the checksum byte.

---

Logical data organization on double-sided diskette

Data is written in a serpentine order:

Side 0:  Track 0..34
Side 1:  Track 34..0

---

NOTE:

The Northstar technical documentation has a discrepancy between
figures and text.  Figures 3-4 and 3-5 show the layout for DD MFM
diskettes with 512-byte sectors.  The text references an older SD FM
format with 256-byte sectors.

The document you are reading now is intended to cover the DD MFM
512-byte format.

snhirsch
Posts: 56
Joined: Tue Dec 08, 2015 1:42 am

Re: Hard sector format

Post by snhirsch » Mon Nov 06, 2017 6:51 pm

Hi, Jeff. You should have what you need now (see previous message).

Jeff
Site Admin
Posts: 4914
Joined: Fri Oct 20, 2006 12:12 am
Location: Paris
Contact:

Re: Hard sector format

Post by Jeff » Mon Nov 06, 2017 10:06 pm

snhirsch wrote:
Mon Nov 06, 2017 6:51 pm
Hi, Jeff. You should have what you need now (see previous message).
This seems perfect.
I presume that the sync word have no missing clock ?

snhirsch
Posts: 56
Joined: Tue Dec 08, 2015 1:42 am

Re: Hard sector format

Post by snhirsch » Mon Nov 06, 2017 10:24 pm

Good question about the missing clock. I think we may have to settle that by experimentation. Neither the FC-5025 nor Catweasel code cared about this, since they were simply counting bit cells. Let's assume it's not missing for the first try.

This would be simpler if the Kryoflux people were willing to support hard-sector formats. They seem convinced that a special drive mechanism is required, but that's simply not correct. There were some older 8" drives with on-board data separators for hard sector formats, but that capability is not required to read flux transitions.

Post Reply