Subject: Re: Converting .po to .dsk under UNIX
From: [email-masked] (Matthew T. Russotto)
Date: 4 Dec 1997 23:18:57 -0500
Newsgroups: comp.emulators.apple2

In article <Pine.GSO.3.95.iB1.0.971204014430.2857D-100000@vtn1>,
William A. Barath <[email-masked]> wrote:
}On 4 Dec 1997, Simon Hall wrote:
}
}|Any-one have a way to convert .po file to .dsk images that will run
}|under UNIX.
}|I have a few file's I would like to convert .
}
}The emulator you're using should have an interleave setting for .do (dos
}order) and .po (prodos order) diskimages.  If not, you can make a script
}that uses dd to split up the file into tracks, then sectors, and
}reorder them quite easily.  If you are using UNIX, that should be child's
}play for you.
}
}The interleave values are:
}physical:
}0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf
}Dos 3.3:
}0x0 0x7 0xe 0x6 0xd 0x5 0xc 0x4 0xb 0x3 0xa 0x2 0x9 0x1 0x8 0xf
}
}I believe the .po (prodos) order is physical.

Physical:
0123456789ABCDEF
DOS 3.3 logical: (-2)
0DB97531ECA8642F
Prodos logical: (+2) 
02468ACE13579BDF

So converting from DO to PO is just a matter of reversing the middle
14 sectors in the track.

The interleave you gave is the same as the DOS 3.3 interleave, only
looked at from the other way around.
-- 
Matthew T. Russotto                                [email-masked]
"Extremism in defense of liberty is no vice, and moderation in pursuit
of justice is no virtue." 
Path: news1.icaen!news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!jussieu.fr!newsfeed.eerie.fr!news.maxwell.syr.edu!news-peer.sprintlink.net!news-pull.sprintlink.net!news-in-east.sprintlink.net!news.sprintlink.net!Sprint!198.69.82.4!news.pond.com!wanda.vf.pond.com!not-for-mail
From: [email-masked] (Matthew T. Russotto)
Newsgroups: comp.emulators.apple2
Subject: Re: Converting .po to .dsk under UNIX
Date: 4 Dec 1997 23:35:58 -0500
Organization: Ghotinet
Lines: 38
Distribution: inet
Message-ID: <[email-masked]>
References: <[email-masked]> <Pine.GSO.3.95.iB1.0.971204014430.2857D-100000@vtn1> <[email-masked]>
NNTP-Posting-Host: 198.69.82.2

In article <[email-masked]>,
Adrian Whichello <[email-masked]> wrote:
}
}No, it's not, according to an article I'm using from Call-A.P.P.L.E, Feruary
}1985, "Road Maps to Apple ][ Disks: DOS 3.3, CP/M, Pascal and ProDOS". (I'm
}actually trying to read Apple CP/M disk images - has anybody written such a
}routine?).

How did you make the image?  If you made it in CP/M, the way you read
it will be different than if you made it in DOS, because the
interleave is logical rather than physical.

}Anyway, the "sector translation order" from this article is:
}
}physical:
}0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8 0x9 0xa 0xb 0xc 0xd 0xe 0xf
}
}Dos 3.3:
}0x0 0x7 0xe 0x6 0xd 0x5 0xc 0x4 0xb 0x3 0xa 0x2 0x9 0x1 0x8 0xf
}
}ProDOS and Pascal:
}0x0 0x8 0x1 0x9 0x2 0xa 0x3 0xb 0x4 0xc 0x5 0xd 0x6 0xe 0x7 0xf
}
}Apple CP/M:
}0x0 0xb 0x6 0x1 0xc 0x7 0x2 0xd 0x8 0x3 0xe 0x9 0x4 0xf 0xa 0x5

Since those charts are "backwards" (they map other system to physical
rather than vice versa), they don't help much in this case.

Given that you have a CP/M disk in DOS 3.3 order, the way to translate
to proper CP/M order is
05A27F4C19E6B38D

That is, the last sector in your image corresponds to CP/M sector D.
-- 
Matthew T. Russotto                                [email-masked]
"Extremism in defense of liberty is no vice, and moderation in pursuit
of justice is no virtue."