Python script to convert Apple II/III .DSK (DO) images to ProDOS-ordered images
Go to file
Paul Hagstrom 2f199f601c
Merge pull request #3 from chris-torrence/master
Add po2dsk.py to go other direction
2021-05-02 18:27:07 -04:00
dsk2po.py Set the exit code to 0 if conversion is successful 2020-05-28 16:22:04 -07:00
po2dsk.py Add code to do other direction (same algorithm) 2020-10-11 16:00:29 -06:00
README.md Add po2dsk 2020-10-11 16:03:50 -06:00

dsk2po

Python script to convert Apple II/III .DSK (DO) images to ProDOS-ordered images

This is nothing very exciting, it just maps sectors in .dsk (DOS-order, .do) files into those of a .po (ProDOS-order) file. Most Apple II emulators can handle both, but certain utilities (with which I wanted to use existing .dsk images) assume ProDOS-ordered files.

Usage is just (assuming you've done chmod 755 dsk2po.py, else precede with python command):

./dsk2po.py image.dsk

This will create image.dsk.po alongside it. Pretty much no checking is done. It just goes through 35 tracks and converts them, then ends.

This can be used as an action for find, like so:

find imagefolders/\*/\*.dsk -exec ./dsk2po.py {} \;

...which was mostly the point.

You can also go the opposite direction:

./po2dsk.py image.po