Apple DOS 3.3+ sector image - Sectors out of order on DSK image

All questions about how to use KryoFlux go here.
Post Reply
blkrckz28
Posts: 3
Joined: Mon Mar 01, 2021 3:01 pm

Apple DOS 3.3+ sector image - Sectors out of order on DSK image

Post by blkrckz28 »

I have been wrestling with this for about a week now, and have had to break out a HEX file editor to determine the following, which I will get into once I describe my test setup:

1) I have a known good working DOS3.3 boot DSK image (I call MASTER.DSK)
2) This image will boot on a floppyEMU and within the AppleWin emulator
3) I created a bootable floppy from the MASTER.DSK image by using Copy II Plus, and copying the MASTER.DSK image track by track from my FloppyEMU disk to a Floppy disk.
- Floppy disk boots just fine on an Apple2
4) Created a KryoFlux Stream file from this bootable floppy
5) Used DTC.exe to create an image from the stream called KRYOFLUX.DSK
- Used the -i8 command line switch to select the Apple DOS 3.3+ sector image
- This image (KRYOFLUX.DSK) will not run in AppleWin emulator or FloppyEMU
- Here is the abbreviated dsk command like used:
dtc -m1 -f"<path>\<directory>\*" -i0 -f"<path>\<filename>.dsk" -g0 -i8 -l8 -dd1

Now what I found comparing the two files in Neo HEX Editor, sector-by-sector on Tracks 0,1,2
---------------------------------------------------------------------------------------------------------------------
1) All of the data (each 256 byte sector) is accounted for on each track, just out of order
2) Sector 0, on ALL tracks matches between the two image files (examined 4 tracks in total)
3) However, the other sectors within any track are in a messed up order as shown in the attached image.
- Image shows MASTER.DSK sectors for track-0, and KYROFLUX.DSK sectors
4) As you can see, the sectors are out of order, which explains why the disk won't boot.
5) The sectors on the re-mastered KRYOFLUX.DSK image are consistent on the 4 tracks that I examined.

Any Ideas?
I simply followed the instructions and examples in the kryoFlux_Manual.pdf

Essentially:
+---------------+------------------+
|MASTER.DSK|KRYOFLUX.DSK|
+---------------+------------------+
SECTOR -------> SECTOR
0 --------------> 0
1 --------------> 13
2 --------------> 11
3 --------------> 9
4 --------------> 7
5 --------------> 5
6 --------------> 3
7 --------------> 1
8 --------------> 14
9 --------------> 12
10 --------------> 10
11 --------------> 8
12 --------------> 6
13 --------------> 4
14 --------------> 2
15 --------------> 15


Thanks in advance,
Andy
Attachments
MASTER.DSK vs KRYOFLUX.DSK Sector MisMatch.jpg
brightcaster
Posts: 379
Joined: Fri Nov 08, 2013 10:48 pm

Re: Apple DOS 3.3+ sector image - Sectors out of order on DSK image

Post by brightcaster »

Have you tried "i8a" (which is the DOS3.3 interleave profile)?

David
blkrckz28
Posts: 3
Joined: Mon Mar 01, 2021 3:01 pm

Re: Apple DOS 3.3+ sector image - Sectors out of order on DSK image

Post by blkrckz28 »

Hmmmm. -8a, The (anti-interleave) profile ;) . That did it!! Thanks.

Never would have guessed, based on all the examples in the documentation and on the site, that the you have to do an interleave to un-interleave (double negative). :-) I guess the example documentation needs updated to reflect this. Maybe there was a firmware update or DTC update that took the raw streams and created the DSK file in 'exactly' how the data is on the DOS3.3+ disks (i.e. interleave) ? Just speculating. I have some pretty old stuff from the Apple 2 disks (circa 1979), and those are requiring the -8a command switch as well....

Again, Thanks for you suggestion and help.
Andy
brightcaster
Posts: 379
Joined: Fri Nov 08, 2013 10:48 pm

Re: Apple DOS 3.3+ sector image - Sectors out of order on DSK image

Post by brightcaster »

AppleDOS did write the floppy in an interleaved order. Therefore you have to use i8a (interleave format) to interleave the sectors again to the original order. Hence no update needed for documentation so far...

David
Last edited by brightcaster on Tue Mar 16, 2021 8:30 pm, edited 1 time in total.
brightcaster
Posts: 379
Joined: Fri Nov 08, 2013 10:48 pm

Re: Apple DOS 3.3+ sector image - Sectors out of order on DSK image

Post by brightcaster »

IFW wrote: Sun Jul 19, 2015 9:46 am -i8a enforces 16 sectors and re-orders the sectors to be interleaved.
The interleaving method is fixed by the OS, thus having strictly 16 sectors for sector interleaving/re-ordering is mandatory.
With -i8 you can define any parameter you like, including different number of sectors, but OS interleaving is not allowed for the above reason.
David
blkrckz28
Posts: 3
Joined: Mon Mar 01, 2021 3:01 pm

Re: Apple DOS 3.3+ sector image - Sectors out of order on DSK image

Post by blkrckz28 »

Thanks Again David!
This is where a 'casual' user wouldn't know these details about how Woz implemented the sector interleave, but it makes perfect sense once you know it.

Hoping this thread will help others who may run into the same issue and can quickly do a search and resolve it....

Andy
Post Reply