# =========== Header =========== # File: Newton Stores Collection Format # Project: ATA Support for Newton OS # Written by: Paul Guyot (pguyot@kallisys.net) # # Created on: 07/06/2000 # Internal version: 1 # # Copyright: © 2000-2003 by Paul Guyot. # All rights reserved worldwide. # =========== # =========== Change History =========== # 07/14/2003 v3 [PG] Update to version 3 # 09/27/2000 v2 [PG] Modification of the introduction # 07/06/2000 v1 [PG] Creation of the file # =========== Abstract ======== This document describes how to have several stores in a single segment of sectors. Introduction ============ The NewtonStore collection allows to define several stores within the same drive or the same volume. The interest is to use less sectors to declare those stores, and to put store flags in the collection. It is a good idea to partition a big drive with NewtonOS, so that a whole store could be deactivated/used as a backup space. Partition Map description ========================= Each store collection is made of a partition map (or stores map), which is one-several sectors, and stores. All the data is stuffed as big endian, i.e. without any conversion from the Newton (except the PCMCIA conversion, of course). ULong are 32 bits unsigned words UShort are 16 bits unsigned words UChar are 8 bits unsigned words Partition map description Each sector in the partition map has the same format: First 32 bytes: the header of each partition map sector: ULong signature should be 'Newt' (4E657774) ULong format version should be 00000003 ULong number of sectors of the partition map should be at least 00000001 ULong index of this sector should be at least 00000001 ULong total number of entries UShort number of entries in this sector UShort reserved ULong reserved ULong reserved The following 480 bytes are used as an array of 30 Newton Stores entries Only the first entries depending on the field "number of entries in this sector" should be used. [Note: I think I relaxed this constraint now, every entries are read, just do as I do: read all entries, but when you write the partition, avoid holes, write all entries at the beginning.] UShort type should be 0001. 0000 means no entry UShort flags Current Supported flags are: 0001: auto mount the store is mounted when the card is inserted 0002: read only the store is marked as read only ULong start sector LBA, relative to the first stores map sector (i.e. absolute if the stores collection starts at sector 0) ULong size size in sectors ULong reserved should be 00000000 [Note: I don't recall, but apparently, I didn't implement the addition to the start sector (I have to check anyway), but currently, all the Newton Stores Collection start at sector 0, i.e. I don't have hybrid cards with DOS partitions and Newton Stores] Implementation remarks ====================== We can imagine less than 30 stores described in a partition map sector with a following sector with less than 30 stores, too. There can be several NewtonStoreCollections within a single drive, one per partition with a foreign partition map format. ## ======================================================================= ## ## A programming language is low level when its programs require attention ## ## to the irrelevant. ## ## ======================================================================= ##