On Friday, March 25, 2016 at 11:11:12 AM UTC-7, Mark Lemmert wrote:
> Michael,
>
> Thanks for your reply. The utility you described sounds like it may be very useful in my project. I look forward to seeing it!
Hey Mark, glad to know that this actually might end up being useful for others.
> If you need any help testing just let me know! (the timing is actually perfect, my post was an attempt to plan ahead, I won't need to tackle this challenge for another month or so)
Don't worry -- I'll throw it up on GitHub and make an annoucement. :-)
> I follow you in general on the difference between the physical sector and the DOS3.3 sector. Is this information needed to use your utility or information on what it's doing under the hood?
I'll probably add a command line so you have *complete* control over the sector interleaving.
i.e. This is what I'm tentatively thinking:
-do Dos 3.3 Sector Order
-po ProDOS Sector Order
-skew Use custom interleaving
e.g.
bin2dsk foo.bin -t0 -s0 -skew "0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F" -o foo.dsk
I took a look at how AppleWin handles the sector skew. There are 3 arrays @ Line 62
https://github.com/AppleWin/AppleWin/blob/master/source/DiskImageHelper.cpp
// File: DiskImageHelper
/* DO logical order 0 1 2 3 4 5 6 7 8 9 A B C D E F */
/* physical order 0 D B 9 7 5 3 1 E C A 8 6 4 2 F */
/* PO logical order 0 E D C B A 9 8 7 6 5 4 3 2 1 F */
/* physical order 0 2 4 6 8 A C E 1 3 5 7 9 B D F */
BYTE CImageBase::ms_SectorNumber[NUM_SECTOR_ORDERS][0x10] =
{
{0x00,0x08,0x01,0x09,0x02,0x0A,0x03,0x0B, 0x04,0x0C,0x05,0x0D,0x06,0x0E,0x07,0x0F},
{0x00,0x07,0x0E,0x06,0x0D,0x05,0x0C,0x04, 0x0B,0x03,0x0A,0x02,0x09,0x01,0x08,0x0F},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
};
This mapping doesn't look too difficult. Just need to use the "inverse" for writing.
I still need to code up my own RWTS (or leech DOS3.3's, or Beautiful Boot's R(W)TS one) but after thinking about this ... this might happen sooner then later. :-)
> Thanks again.
Thank me once I got it written :-)