Exemple #1
0
uint16_t fdi_side_flags(int drive)
{
	uint16_t temp_side_flags = 0;
	switch (fdi2raw_get_bit_rate(fdi[drive].h))
	{
		case 500:
			temp_side_flags = 0;
			break;
		case 300:
			temp_side_flags = 1;
			break;
		case 250:
			temp_side_flags = 2;
			break;
		case 1000:
			temp_side_flags = 3;
			break;
		default:
			temp_side_flags = 2;
	}
	if (fdi2raw_get_rotation(fdi[drive].h) == 360)
	{
		temp_side_flags |= 0x20;
	}

	/* Set the encoding value to match that provided by the FDC. Then if it's wrong, it will sector not found anyway. */
	temp_side_flags |= 0x08;

	return temp_side_flags;
}
Exemple #2
0
uint16_t fdi_disk_flags(int drive)
{
	uint16_t temp_disk_flags = 0x80;	/* We ALWAYS claim to have extra bit cells, even if the actual amount is 0. */

	switch (fdi2raw_get_bit_rate(fdi[drive].h))
	{
		case 500:
			temp_disk_flags |= 2;
			break;
		case 300:
		case 250:
			temp_disk_flags |= 0;
			break;
		case 1000:
			temp_disk_flags |= 4;
			break;
		default:
			temp_disk_flags |= 0;
	}

	if (fdi[drive].sides == 2)
	{
		temp_disk_flags |= 8;
	}

	/* Tell the 86F handler that will handle our data to handle it in reverse byte endianness. */
	temp_disk_flags |= 0x800;

	return temp_disk_flags;
}
Exemple #3
0
int fdi_hole(int drive)
{
	switch (fdi2raw_get_bit_rate(fdi[drive].h))
	{
		case 1000:
			return 2;
		case 500:
			return 1;
		default:
			return 0;
	}
}