[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can you boot something else than "PRODOS" in ProDOS?



 "Bill Garber" <willy46pa@comcast.net> wrote:
> "Bill Garber" <willy46pa@comcast.net> wrote in message
> Y4ednTsnnOnhwYHYnZ2dnUVZ_t6dnZ2d@comcast.com">news:Y4ednTsnnOnhwYHYnZ2dnUVZ_t6dnZ2d@comcast.com.
> ..
>> Just ahead of the filename is a Hex number, which in the case of 
>> PRODOS is $26, 2 means the file type and 6 being the length. So for 
>> INFODOS, simply change that number to $27, and you're good to go.
>>
>> Hope this helps.
> 
> Before I'm corrected, let me say that I'm not
> sure about that 2 being filetype, I'm trying
> to recall without books open and in front of
> me.  :o)  I am sure, however about that other
> part being the file name length.  :o)
> 
> Bill Garber

Correct on the length, but the upper nibble is a storage_type. The value 
$2 means the ProDOS image is expected to be a plain old sapling file. 
Yes, I had to look it up:-)

B.4.2.1 - The storage_type Attribute
The storage_type, the high-order four bits of the first byte of an entry,
defines the type of header (if the entry is a header) or the type of file
described by the entry.
$0 indicates an inactive file entry
$1 indicates a seedling file entry (EOF <= 256 bytes)
$2 indicates a sapling file entry (256 < EOF <= 128K bytes)
$3 indicates a tree file entry (128K < EOF < 16M bytes)
$4 indicates Pascal area
$D indicates a subdirectory file entry
$E indicates a subdirectory header
$F indicates a volume directory header

Interestingly, the boot1 loader will load _any_ reasonably sized file 
named PRODOS into memory at $2000 and jump to it's start.

-- 
John Matthews
jmatthews at wright dot edu
www dot wright dot edu/~john.matthews/