|
cbmimage
|
cbmimage: specificy "addresses" into images More...

Variables | |
| const cbmimage_blockaddress | cbmimage_block_unused = CBMIMAGE_BLOCK_INIT(0, 0, 0) |
| Definition of an empty cbmimage_blockaddress. | |
cbmimage: specificy "addresses" into images
For CBM disks, the addresses are given by track and sector specifications. On the other side, a so-called LBA (logical block address) is much easier to handle.
These functions specify how on address type is converted into the other
| int cbmimage_blockaddress_lba_exists | ( | cbmimage_fileimage * | image, |
| uint16_t | lba ) |
check if LBA is valid
| [in] | image | pointer to the image data |
| [in] | lba | the LBA of the block to be tested for existance |
| int cbmimage_blockaddress_ts_exists | ( | cbmimage_fileimage * | image, |
| uint8_t | track, | ||
| uint8_t | sector ) |
check if T/S is valid
| [in] | image | pointer to the image data |
| [in] | track | the track of the block to be tested for existance |
| [in] | sector | the sector of the block to be tested for existance |
| const cbmimage_blockaddress cbmimage_block_unused = CBMIMAGE_BLOCK_INIT(0, 0, 0) |
Definition of an empty cbmimage_blockaddress.
Whenever you need to use an empty or unused block address, you can use this one instead of defining it on your own.