Hard sector format

HxC Floppy emulator support for all others computers...
Post Reply
snhirsch
Posts: 170
Joined: Tue Dec 08, 2015 1:42 am

Re: Hard sector format

Post by snhirsch »

Hi, Jeff. I will dig up all the information and send it to you.

When you say "share some images" are you talking about raw data or Kryoflux?

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

Re: Hard sector format

Post by snhirsch »

I have the information on Northstar hard-sector diskettes and it looks complete. Unfortunately, the forum will not accept a PDF upload. Can you suggest any way for me to get this to you?

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

Re: Hard sector format

Post by snhirsch »

Jeff wrote:
Mon Oct 02, 2017 8:22 am
Btw i have checked the documentation you sent me, and the detailed track/sector format is missing (header details / crc/checksum encoding).
Do you know where i can found these informations ?
Now I'm even more confused. It appears I did send you the PDF on Northstar format and it has a complete description of the layout, including the CRC algorithm. What do you feel is missing? I'll try to clarify.

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

Re: Hard sector format

Post by Jeff »

snhirsch wrote:
Tue Oct 03, 2017 8:26 pm
Jeff wrote:
Mon Oct 02, 2017 8:22 am
Btw i have checked the documentation you sent me, and the detailed track/sector format is missing (header details / crc/checksum encoding).
Do you know where i can found these informations ?
Now I'm even more confused. It appears I did send you the PDF on Northstar format and it has a complete description of the layout, including the CRC algorithm. What do you feel is missing? I'll try to clarify.
This is the 2 pages pdf ? The Crc description is not complete : missing size, polynomial, start value...
the sector header description is not detailed enough... (mismatch between the text and the diagram)
a second information source may help me to understand it.

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

Re: Hard sector format

Post by snhirsch »

Jeff wrote:
Tue Oct 03, 2017 11:01 pm
This is the 2 pages pdf ? The Crc description is not complete : missing size, polynomial, start value...
the sector header description is not detailed enough... (mismatch between the text and the diagram)
a second information source may help me to understand it.
The CRC description looks complete to me. Here's how I interpret it:

Code: Select all

unsigned char data[512];
unsigned char crc = 0;
for (int i=0; i<512; i++) {
  crc = crc ^ data[i];
  crc << 1;
}
UPDATE: Almost right on the checksum. Here's some working code written for the DeviceSide reader:

Code: Select all

static unsigned char ns_csum(unsigned char *buf, int count) {
        unsigned char csum=0;

        while(count--) {
                csum^=*buf++;
                csum=(csum<<1)|(csum>>7);
        }
        return csum;
}
It's a shift with carry-out rolled back into bit 0.

The diagram is correct as I commented in my original post. There are 33 bytes of zero and 512 data bytes. The only missing item is the track/sector id and I will look for that information.

Does this help?
Last edited by snhirsch on Wed Oct 04, 2017 12:01 am, edited 1 time in total.

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

Re: Hard sector format

Post by Jeff »

snhirsch wrote:
Tue Oct 03, 2017 11:52 pm
Jeff wrote:
Tue Oct 03, 2017 11:01 pm
This is the 2 pages pdf ? The Crc description is not complete : missing size, polynomial, start value...
the sector header description is not detailed enough... (mismatch between the text and the diagram)
a second information source may help me to understand it.
The CRC description looks complete to me. Here's how I interpret it:

Code: Select all

unsigned char data[512];
unsigned char crc = 0;
for (int i=0; i<512; i++) {
  crc = crc ^ data[i];
  crc << 1;
}
not really a crc, that's why i am not sure at all ;)
snhirsch wrote:
Tue Oct 03, 2017 11:52 pm

The diagram is correct as I commented in my original post. There are 33 bytes of zero and 512 data bytes. The only missing item is the track/sector id and I will look for that information.

Does this help?
Yes track/sector is missing, and i suspect that some other things are missing.
Btw is this use FM encoding ?

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

Re: Hard sector format

Post by snhirsch »

I posted some known-working code above. The shift is actually a roll around, but it is simple-minded.

The encoding for 512 byte sectors is MFM.

I'll try to get David Schmidt involved in this discussion, since he wrote the decode routines for the DeviceSide reader. His code saves out only decoded sector data so it isn't directly useful for generating an image. However, I think he deciphered all the pertinent aspects of the disk layout.

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

Re: Hard sector format

Post by Jeff »

snhirsch wrote:
Wed Oct 04, 2017 12:04 am
I posted some known-working code above. The shift is actually a roll around, but it is simple-minded.

The encoding for 512 byte sectors is MFM.

I'll try to get David Schmidt involved in this discussion, since he wrote the decode routines for the DeviceSide reader. His code saves out only decoded sector data so it isn't directly useful for generating an image. However, I think he deciphered all the pertinent aspects of the disk layout.
Ok ! Please share some raw image (not kryoflux), i will start a loader skeleton.

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

Re: Hard sector format

Post by snhirsch »

I instrumented the DeviceSide client program to dump track/sector bytes from a single-sided diskette and came up with this:

Code: Select all

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
c0 c2 c4 c6 c8 c1 c3 c5 c7 c9

00 02 04 06 08 01 03 05 07 09
40 42 44 46 48 41 43 45 47 49
80 82 84 86 88 81 83 85 87 89
That's 35 tracks, 10 sectors per track. The upper four bits cycle 0, 4, 8, C, 0, etc, etc. so not really a track marker. I checked several disks to make sure - that's definitely what's there, as strange as it is. Lower four bits are sector number with +4 physical skew.

UPDATE: I was able to read a double-sided diskette. One the second side, the upper four bits cycle 1, 5, 9, D, 1, 5, ... So they use the low-bit on the upper nibble to mean "side 2". Otherwise exactly the same.

How can I get a sector image to you?

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

Re: Hard sector format

Post by snhirsch »

Hi, Jeff. Do you have everything you need regarding the Northstar format? I believe I've addressed all your questions.

Would still like to send you a sector data image, but need a valid e-mail address since the forum won't permit code uploads.

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

Re: Hard sector format

Post by Jeff »

snhirsch wrote:
Sun Oct 15, 2017 5:07 pm
Hi, Jeff. Do you have everything you need regarding the Northstar format? I believe I've addressed all your questions.

Would still like to send you a sector data image, but need a valid e-mail address since the forum won't permit code uploads.
Send me the images to hxc2001 at hxc2001.com

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

Re: Hard sector format

Post by snhirsch »

Hi, Jeff.

Just wanted to make sure you have the images and check whether you know have all the information needed to emulate the NorthStar diskettes?

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

Re: Hard sector format

Post by Jeff »

yes got them.
I really miss a kf still raw dump to be sure about the physical format...

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

Re: Hard sector format

Post by snhirsch »

I'm not a KF expert. If you can give me a starting point for the myriad of command line switches I'll be glad to give it a shot.

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

Re: Hard sector format

Post by snhirsch »

Jeff,

From what I've been able to determine the Kryflux cannot process hard sector diskettes. I really think this should be possible without it.

If Dave Schmidt has a Catweasel image, would that be something you can work with?

Post Reply