Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GS/OS resource fork support #2

Open
retrocomputist opened this issue Jul 30, 2017 · 0 comments
Open

Add GS/OS resource fork support #2

retrocomputist opened this issue Jul 30, 2017 · 0 comments

Comments

@retrocomputist
Copy link
Contributor

retrocomputist commented Jul 30, 2017

Storage Type $5

Storage type $5 is used by the ProDOS FST in GS/OS to store extended files. The key block of the file points to an extended key block entry. The extended key block entry contains mini-directory entries for both the data fork and resource fork of the file. The mini-entry for the data fork is at offset +000 of the extended key block, and the mini-entry for the resource fork is at offset +$100 (+256 decimal).

The format for mini-entries is as follows:

storage_type    (+000)    Byte    The standard ProDOS storage 
                                  type for this fork of the file.  
                                  Note that for regular directory 
                                  entries, the storage type is the 
                                  high nibble of a byte that contains 
                                  the length of the filename as the 
                                  low nibble.  In mini-entries, the 
                                  high nibble is reserved and must be 
                                  zero, and the storage type is 
                                  contained in the low nibble.
key_block       (+001)    Word    The block number of the key 
                                  block of this fork.  This value and 
                                  the value of storage_type combine to 
                                  determine how to find the data in 
                                  the file, as documented in the 
                                  ProDOS 8 Technical Reference Manual.
blocks_used     (+003)    Word    The number of blocks used by 
                                  this fork of the file.
EOF             (+005)    3 Bytes Three-byte value (least 
                                  significant byte stored first) 
                                  representing the end-of-file value 
                                  for this fork of the file.

Immediately following the mini-entry for the data fork may be up to two eighteen-byte entries, each with part of the HFS Finder information for this file. The first entry stores the first 16 bytes of the Finder information, and the second entry stores the second 16 bytes. The format is as follows:

entry_size (+008) Byte Size of this entry; must be 18 ($12).

entry_type    (+009)    Byte    Type of this entry--1 for FInfo (first 16
                                bytes of Finder information), 2 for 
                                xFInfo (second 16 bytes).
FInfo         (+010)  16 Bytes  First sixteen bytes of Finder Info.
entry_size    (+026)    Byte    Size of this entry; must be 18 ($12).
entry_type    (+027)    Byte    Type of this entry--1 for FInfo (first 16
                                bytes of Finder information), 2 for 
                                xFInfo (second 16 bytes).
xFInfo        (+028)  16 Bytes  Second sixteen bytes of Finder Info.

Note: Although the ProDOS FST under GS/OS will only create both of the mini-entries, as described above, the ProDOS File System Manager (ProDOS FSM) for the Macintosh, which is part of the Apple IIe Card v2.0 software, may create only one of the entries, so you may find an entry_type of 2 at offset +009 in the block. If one of the entries is missing, it should be considered to be all zeroes.

All remaining bytes in the extended key block are reserved and must be zero.

Further Reference

Apple II Pascal ProFile Manager Manual
GS/OS Reference
ProDOS 8 Technical Reference Manual

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant