apple2 disk image manipulation commandline tool
Go to file
2021-07-10 21:09:57 -04:00
.vscode add a couple disks 2021-07-10 21:09:57 -04:00
basic add a couple disks 2021-07-10 21:09:57 -04:00
cmd add a couple disks 2021-07-10 21:09:57 -04:00
data add a couple disks 2021-07-10 21:09:57 -04:00
disk add a couple disks 2021-07-10 21:09:57 -04:00
dos3 add a couple disks 2021-07-10 21:09:57 -04:00
errors add a couple disks 2021-07-10 21:09:57 -04:00
helpers add a couple disks 2021-07-10 21:09:57 -04:00
img Add logo 2017-03-16 23:12:07 -04:00
prodos add a couple disks 2021-07-10 21:09:57 -04:00
supermon add a couple disks 2021-07-10 21:09:57 -04:00
types add a couple disks 2021-07-10 21:09:57 -04:00
woz add a couple disks 2021-07-10 21:09:57 -04:00
.gitignore
.travis.yml travis: use default go version 2017-01-26 21:55:58 -06:00
build add a couple disks 2021-07-10 21:09:57 -04:00
generate.go Add data/ directory and go-bindata generate cmds 2017-03-19 21:55:32 -04:00
go.mod add a couple disks 2021-07-10 21:09:57 -04:00
go.sum add a couple disks 2021-07-10 21:09:57 -04:00
LICENSE
main.go add a couple disks 2021-07-10 21:09:57 -04:00
make-data.sh working on disk formats 2018-06-06 22:27:35 -04:00
notes.org add a couple disks 2021-07-10 21:09:57 -04:00
README.md add a couple disks 2021-07-10 21:09:57 -04:00
writetest.asm add a couple disks 2021-07-10 21:09:57 -04:00
writetest.mon add a couple disks 2021-07-10 21:09:57 -04:00

diskii

Note: diskii is not stable yet! I don't expect to remove functionality, but I'm still experimenting with the command syntax and organization, so don't get too comfy with it.

Seagull Srs Micro Software

diskii-the-tool is a commandline tool for working with Apple II disk images. Given that AppleCommander already does everything, it's not terribly necessary. It is, however, mine. Minor benefits (right now) are binaries you can copy around (no Java needed), support for Super-Mon symbol tables on NakedOS disks, and creation of "Standard Delivery" disk images.

diskii-the-library is probably more useful: a library of disk-image-manipulation code that can be used by other Go programs.

diskii's major disadvantage is that it mostly doesn't exist yet.

Build Status Report Card GoDoc

It rhymes with “whiskey”.

Discussion/support is in #apple2 on the retrocomputing Slack (invites here).

Goals

Eventually, it aims to be a comprehensive disk image manipulation tool, but for now only some parts work.

The library code aims (a) to support the commandline tool operations, and (b) to replace the "read and write disk images" code of the goapple2 emulator.

Current disk operations supported:

Feature DOS 3.3 ProDOS NakedOS/Super-Mon
basic structures
ls
dump
put
dumptext
delete
rename
put
puttext
extract (all)
lock/unlock
init
defrag

Installing/updating

Assuming you have Go installed, run go get -u github.com/zellyn/diskii

You can also download automatically-built binaries from the latest release page. If you need binaries for a different architecture, please send a pull request or open an issue.

Short-term TODOs/roadmap/easy ways to contribute

My rough TODO list (apart from anything marked (✗) in the disk operations matrix is listed below. Anything that an actual user needs will be likely to get priority.

  • Build per-platform binaries for Linux, MacOS, Windows.
  • Implement GetFile for DOS 3.3
  • Add and implement the -l flag for ls
  • Add Delete to the disk.Operator interface
    • Implement it for Super-Mon
    • Implement it for DOS 3.3
  • Make 13-sector DOS disks work
  • Read/write nybble formats
  • Read/write gzipped files
  • Add basic ProDOS structures
  • Add ProDOS support

Related tools

Notes

Disk formats

  • .do
  • .po
  • .dsk - could be DO or PO.

DOS 3.2.1: the 13 sectors are physically skewed on disk.

DOS 3.3+: the 16 physical sectors are stored in ascending order on disk, not physically skewed at all. The

Logical Sector DOS 3.3 Physical Sector ProDOS Physical Sector
0 0 x
1 D x
2 B x
3 9 x
4 7 x
5 5 x
6 3 x
7 1 x
8 E x
9 C x
A A x
B 8 x
C 6 x
D 4 x
E 2 x
F F x

RWTS - DOS

Sector mapping: http://www.textfiles.com/apple/ANATOMY/rwts.s.txt and search for INTRLEAV

Mapping from specified sector to physical sector (the reverse of what the comment says):

00 0D 0B 09 07 05 03 01 0E 0C 0A 08 06 04 02 0F

So if you write to "T0S1" with DOS RWTS, it ends up in physical sector 0D.

Commandline examples for thinking about how it should work

diskii ls dos33.dsk diskii --order=do ls dos33.dsk diskii --order=do --system=nakedos ls nakedos.dsk