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
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
.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.
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.
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