Previously on scuzzblog: Amiga - Writing your own BOOTBLOCK.
ScuzzBlog: Diaries January 2025
Entry 3rd January 2025: Post 1: Amiga Bootblock.
Amiga Bootblock.
My blog in 2020 regarding the Amiga bootblock is somewhat deficient
as one of the primary links describing the notion is now dead. I
will check again to see if it comes back online. In the meantime
I have snaffled a few lines of text that I had loitering in the
repository, so maybe for now they will do. Be aware that these are
not my words. If the owner wishes them removed then please advise.
Obviously I cannot validate their accuracy. Specially that bit about
the Fig Newton. Yummy in hot tea.
NOT MY WORDS [Please advise if you wish me to remove this text.]
The bootblock
The bootblock are actually the first two blocks on an Amiga disk:
amigaBlock(adf.example, 0) and amigaBlock(adf.example, 1). When
the Commodore Amiga system boots, it will first load these blocks
in memory and uses this to check what type of disk it is. Any
executable code on this block will be run when the bootblock checksum
is valid. When the system is already booted when the disk is insert,
the bootblock will just be used to determine what type of disk it
represents. The root block
The root block holds information on the files and directories in
the root of the disk. It also holds information on the disk name,
creation and modification date. It is usually situated at the
centre of the blocks, at block 880 for DD disks.
amigaBlock(adf.example, 880)
The bitmap block
The bitmap block, contains information on which blocks on the disk
are in use and which are free. The first for bytes in this block
form a checksum, the following 220 bytes (for a DD disk, twice as
many for a HD disk). Each byte is composed of 8 bits. When a bit
is set, it represents a used block, when it is not set, it reflects
a free block. The bitmap block is usually situate next to the root
block, at block 881 on a DD disk.
amigaBlock(adf.example, 881)
The bitmap is thus used to allocate free blocks on the disk to put
new files. When files are removed (and blocks) are thus freed, this
will also be marked in the bitmap. The bitmap is also used to
calculate the free space on a disk.
Header blocks
As indicated before, files are stored as 512 blocks. But not only
the file data is written to the disk. Information about the file
(i.e., the file name, it’s size, where to find the data on the disk
etc.) also needs to be stored. This block, containing information
on the file (or directory) is called a header block. Each file,
directory or link on the disk starts with a header block. The root
block is a special case of a header block; it marks the root directory.
Header blocks of directories contain pointers to the files (and
directories) in that directory. Header blocks of files contain
pointers to data blocks, containing the data of the file.
Data blocks
In the Fast File System, the data blocks are only composed of file
data; nothing else. The location of the data blocks are provided
in the file’s header. In the Old File System, each data block
contains additional information, most importantly: a pointer to
the next data block and a checksum.
The directory cache block
The directory cache block is a block listing the most important
information of files and directories within a specific directory.
This block type was introduced with the direct cache mode in Amiga
OS 3.0. It basically stores a summary of header block information
of all files in a specific directory at a central place, making
directory listing faster.
There is no backward compatibility for the directory cache mode,
meaning that OS versions <3.0 are not able to read disks that are
formatted in this mode. The directory cache mode is always used
in combination with the ‘international mode’.
Fig Newton
.. is named after the Boston suburb of Newton, Massachusetts
and not after the famous scientist [ Big Bang Theory ]
On a serious note I believe the author is pepijn-devries and my
research found one of his links [Pepijn Devries LINK]. I only
have a meta ref in a document and the link site is dead.
So hope I haven't crossed any lines there.
I also failed to give a link of that Fred Fish disk Fred Fish Disk 0919.
Amiga Bootblock.
~ Previously on scuzzblog ~
If you can only see this CONTENT window
then click the image above for the full site
Last updated 3rd January 2025
Chandraise Kingdom
Keep the Faith
scuzzscink 2025