Пример #1
0
/* granule_map must be an array of MAX_GRANULEMAP_SIZE bytes */
static floperr_t get_granule_map(imgtool_image *img, UINT8 *granule_map, UINT8 *granule_count)
{
    UINT8 count;

    count = get_granule_count(img);
    if (granule_count)
        *granule_count = count;

    return floppy_read_sector(imgtool_floppy(img), 0, 17, 2, 0, granule_map, count);
}
Пример #2
0
static floperr_t get_granule_map(imgtool::image &img, uint8_t *granule_map, uint8_t granule_count[MAX_GRANULEMAP_SIZE])
{
	uint8_t count;

	count = get_granule_count(img);
	if (granule_count)
		*granule_count = count;

	return floppy_read_sector(imgtool_floppy(img), 0, 17, 2, 0, granule_map, count);
}
Пример #3
0
/* granule_map must be an array of MAX_GRANULEMAP_SIZE bytes */
static floperr_t get_granule_map(imgtool_image *img, UINT8 *granule_map, UINT8 *granule_count)
{
	bml3_diskinfo *info = bml3_get_diskinfo(img);
	UINT8 count;

	count = get_granule_count(img);
	if (granule_count)
		*granule_count = count;

	// The first byte of the granule map sector is ignored (and expected to be 0)
	return floppy_read_sector(imgtool_floppy(img), 0, 20, info->fat_start_sector, info->fat_start_offset, granule_map, count);
}