dsk format documentation

5 posts / 0 new
Last post
Offline
Last seen: 11 years 1 month ago
Joined: Oct 19 2013 - 20:15
Posts: 1
dsk format documentation

I've put together a python 65c02 assembler to program my apple 2e.
I'd like to be able to have it directly output the runable binary into a bootable .dsk format so people can easily get their programs running on an apple 2.

Does anyone have pointers to any documentation describing the dsk format? I've looked around and failed to find any.

As to why write yet another assembler? The reason is that it has a python programmatic interface, so it doesn't need a macro language. You can use python to directly generate code and feed it into the assembler line by line. So python can act as a super powerful macro language.

Thanks,
David

speedyG's picture
Offline
Last seen: 5 years 6 months ago
Joined: Nov 16 2011 - 07:45
Posts: 2493
Re: dsk format documentation

Hello David Johnston,

i guess there a 2 books downloadable from asimov, that will get you ahaead, both from Don Worth and Pieter Lechner:
Beneath Dos and
Beneath ProDOS:
ftp://ftp.apple.asimov.net/pub/apple_II/documentation/os/dos/Beneath%20Apple%20DOS_alt.pdf
and:
ftp://ftp.apple.asimov.net/pub/apple_II/documentation/os/prodos/Beneath%20Apple%20ProDOS_Alt.pdf

Both books contain insight structures of DOS and Prodos on disk and also description od VTOC and Filehandling and filestructures on disk.

and if you are hunting for the starting point of searching for the .DSK format you might start here at the ciderpress project:
http://ciderpress.sourceforge.net/features.htm#disks
and here:
http://en.wikipedia.org/wiki/Disk_Copy
or here:
http://support.apple.com/kb/DL1262

and here is source code for DSKtool, a utility to handle DSK format by ectraction or compacting to image:
https://github.com/ricbit/Oldies/blob/master/1998-04-dsktool/dsktool.c

sincerely speedyG

Dog Cow's picture
Offline
Last seen: 5 years 6 months ago
Joined: Dec 11 2008 - 16:26
Posts: 554
Re: dsk format documentation

.dsk is just about the simplest format there is: all 35 tracks of a 16 sector disk, with the sectors in order 0-15.

Every .dsk file is 143,360 bytes long because it's 256 * 16 * 35 bytes.

Offline
Last seen: 9 years 3 weeks ago
Joined: Apr 10 2006 - 20:01
Posts: 1013
Re: dsk format documentation

Assuming you don't want to write (yet) another disk image manipulation program, AppleCommander has a command-line mode that will take files and transplant them onto disk images for you. It has a native 'ant' interface too, so if you happen to be part of that environment, it's a seamless call to do the deed. Otherwise... you're reading Beyond *DOS books to understand the Apple floppy filesystem data structures, and writing a program to manipulate same. The final result of which is that simple 143,3600 byte file.

mmphosis's picture
Offline
Last seen: 4 days 20 hours ago
Joined: Aug 18 2005 - 16:26
Posts: 442
Re: dsk format documentation

Here's (yet) another utility called c2d because with Perl There's more than one way to do it

Code to Disk Tool for the Apple II

http://asciiexpress.net/files/c2d-0.1.zip

Log in or register to post comments