2024-02-21 16:13:55 +00:00
|
|
|
# dsk2po and po2dsk
|
|
|
|
Python scripts to convert Apple II/III .DSK (DO) images to ProDOS-ordered images
|
|
|
|
and vice versa.
|
2015-12-27 07:47:34 +00:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2020-10-11 22:03:50 +00:00
|
|
|
Usage is just (assuming you've done `chmod 755 dsk2po.py`, else precede with python command):
|
2015-12-27 07:47:34 +00:00
|
|
|
|
2020-10-11 22:03:50 +00:00
|
|
|
./dsk2po.py image.dsk
|
2015-12-27 07:47:34 +00:00
|
|
|
|
|
|
|
This will create image.dsk.po alongside it. Pretty much no checking is done.
|
2024-02-21 16:13:55 +00:00
|
|
|
It just goes through all the tracks and converts them, then ends.
|
|
|
|
|
|
|
|
Both scripts will handle an arbitrary number of tracks, but will print a
|
|
|
|
warning if the number of tracks is not 35.
|
2015-12-27 07:49:09 +00:00
|
|
|
|
|
|
|
This can be used as an action for find, like so:
|
|
|
|
|
2020-10-11 22:03:50 +00:00
|
|
|
find imagefolders/\*/\*.dsk -exec ./dsk2po.py {} \;
|
2015-12-27 07:49:09 +00:00
|
|
|
|
2020-10-11 22:03:50 +00:00
|
|
|
...which was mostly the point.
|
|
|
|
|
|
|
|
You can also go the opposite direction:
|
|
|
|
|
|
|
|
./po2dsk.py image.po
|