|
cbmimage
|
BAM Selector . More...
#include <internal.h>

Public Attributes | |
| uint8_t * | buffer |
| pointer to the block data where this BAM entry is located | |
| uint8_t | starttrack |
| the number of the first track that is described in this BAM selector | |
| cbmimage_blockaddress | block |
| the block where this BAM entry is located | |
| uint8_t | startoffset |
| the offset inside of the block where this BAM entry is located | |
| uint8_t | multiplier |
| uint8_t | data_count |
| uint8_t | reverse_order |
| reverse the order of the bits of the BAM | |
BAM Selector .
This type describes where the BAM entries (that is, the bitmap part of the BAM) are located on disk. This way, the code that handles BAM entries is generic, and only the initialization of the BAM selector has to be image specific.
In case the BAM is stored in multiple blocks (or in the same block, but at different locations), an array of BAM selectors has to be used, with every selector describing one location of the BAM entries
| uint8_t cbmimage_i_bam_selector_s::data_count |
the number of byte that form one BAM entry. This is restricted to a maximum of BAM_MASK_COUNT. In case of a cbmimage_i_bam_counter_selector, this must be 0.
| uint8_t cbmimage_i_bam_selector_s::multiplier |
multiplier for the BAM entries; that is, how many byte are the different tracks aways from each other?
| uint8_t cbmimage_i_bam_selector_s::reverse_order |
reverse the order of the bits of the BAM
If this value is 0, the BAM uses the Commodore ordering. If this value is != 0, the BAM uses the CMD / DNP ordering.
For DNP, bit 0 corresponds to the (numerically) highest block, and bit 7 to the (numerically) lowest block. That is, the example 0xFE for the first block of the BAM of a track corresponds to block 1/7 being occupied in a DNP partition.