	if (data && (data -= ticks) <= 0 && data_read)
	{
		// Actually do it??
		dprintf ("Data ready %d %d\n", bytes, buf[bytes]);
		if (data_read == 1)
			r_data = buf[bytes];
		if (bytes == 0 && r_sector == nsectors)
		{
			printf ("bytes = 0 r_sector = nsec\n");
			data = 0;
			data_repeats = 0;
			busy = 0;
			data_ready = 0;
			nf_err = 1;
			MAKESTATUS;
			SignalInt ();
			return;
		}
		
		// Data bytes becoming available
		data_ready = 1;
		MAKESTATUS;
		SignalInt ();
		if (data_read != 2 && bytes++ == SECTOR_SIZE)
		{
			dprintf ("End of sector, %d\n", data_repeats);
			if (data_repeats && --data_repeats > 0)
				data = DATA_CYCLES;
			else
				data = 0;
			r_sector++;
			if (r_sector == nsectors)
			{
				r_track++; cur_track++;
				r_sector = 0;
			}
			bytes = 0;
			
			// Read/Write next sector
			if (data_read == 0)
			{
				fwrite (buf, SECTOR_SIZE, 1, dfile);
				fflush (dfile);
				dprintf ("// Writing sector %d/%d/%d...\n",
					cur_track, cur_side, r_sector);
			}
			else if (data_repeats)
			{
				dprintf ("\n//Reading sector %d/%d/%d...%d\n", cur_side, cur_track,
					r_sector, data_repeats);
				nf_err = 0;
				fread (buf, SECTOR_SIZE, 1, dfile);
			}
		}
		else if (data_read != 2)
			data = DATA_CYCLES;
		else if (data_read == 2)
		{
			dprintf ("Formatting track...\n");
			if (--data_repeats > 0)
				data = DATA_CYCLES;
			else
				data = 0;
			data_ready = 1;
			MAKESTATUS;
		}
		if (data == 0 && data_repeats == 0)
		{
			busy = 0;
			data_ready = 0;
			MAKESTATUS;
			SignalInt ();
		}
		return;
	}
