Partial ProDOS answer.
Thanks to the information in the other answers which are more about Apple DOS, I was able to find (some of?) the information for ProDOS which differs.
ProDOS file header:
UPDATE: It turns out that this metadata is stored in the directory structure of the files, not as a header in the first bytes of the files' data: Apple II Binary File Format
+----------------------------+
1 byte | storage_type | name_length | $00
|----------------------------|
| | $01
/ /
15 bytes / file_name /
| | $0F
|----------------------------|
1 byte | file_type | $10
|----------------------------|
| | $11
2 bytes | key_pointer | $12
|----------------------------|
| | $13
2 bytes | blocks_used | $14
|----------------------------|
| | $15
3 bytes | EOF |
| | $17
|----------------------------|
| | $18
| creation |
4 bytes | date & time |
| | $1B
|----------------------------|
1 byte | version | $1C
|----------------------------|
1 byte | min_version | $1D
|----------------------------|
1 byte | access | $1E
|----------------------------|
| | $1F
2 bytes | aux_type | $20
|----------------------------|
| | $21
| |
4 bytes | last mod |
| | $24
|----------------------------|
| | $25
2 bytes | header_pointer | $26
+----------------------------+
At offset $1f
:
aux_type
(2 bytes): A general-purpose field in which a system
program can store additional information about the internal format of
a file. For example, the ProDOS BASIC system program uses this field
to record the load address of a BASIC program or binary file,
or the record length of a text file.
I'd assume a binary file that is machine code just works with BRUN
and BLOAD
by loading at this address and jumping to the same address to execute, and will probably crash for binary files which are not machine code.
There is also a longer list of file types than with Apple DOS. I removed the ones from the chart which only pertain to the Apple III.
File Type Preferred Use
$00 Typeless file
$01 Bad block file
$04 ASCII text file
$06 General binary file
$08 Graphics screen file
$0F Directory file
$19 AppleWorks Data Base file
$1A AppleWorks Word Processor file
$1B AppleWorks Spreadsheet file
$1C-$EE Reserved
$EF Pascal area
$F0 ProDOS CI added command file
$F1-$F8 ProDOS user defined files 1-8
$F9 ProDOS reserved
$FA Integer BASIC program file
$FB Integer BASIC variable file
$FC Applesoft program file
$FD Applesoft variables file
$FE Relocatable code file (EDASM)
$FF ProDOS system file
I'm not sure if this applies only/both to $06 General binary file
and $FC Applesoft program file
. The types are probably somewhat like a suggestion and might behave the same.
But then there's $FE Relocatable code file (EDASM)
, which will surely have a more complicated file format for the reloc info. They require the special tools RBOOT
and RLOAD
.