Exemple #1
0
void ide_controller_device::device_timer(emu_timer &timer, device_timer_id id, int param, void *ptr)
{
	switch(id)
	{
	case TID_DELAYED_INTERRUPT:
		status &= ~IDE_STATUS_BUSY;
		set_irq(ASSERT_LINE);
		break;

	case TID_DELAYED_INTERRUPT_BUFFER_READY:
		status &= ~IDE_STATUS_BUSY;
		status |= IDE_STATUS_BUFFER_READY;
		set_irq(ASSERT_LINE);
		break;

	case TID_RESET_CALLBACK:
		reset();
		break;

	case TID_SECURITY_ERROR_DONE:
		/* clear error state */
		status &= ~IDE_STATUS_ERROR;
		status |= IDE_STATUS_DRIVE_READY;
		break;

	case TID_READ_SECTOR_DONE_CALLBACK:
		read_sector_done();
		break;

	case TID_WRITE_SECTOR_DONE_CALLBACK:
		write_sector_done();
		break;
	}
}
Exemple #2
0
static void read_next_sector(struct ide_state *ide)
{
	/* mark ourselves busy */
	ide->status |= IDE_STATUS_BUSY;

	if (ide->command == IDE_COMMAND_READ_MULTIPLE_BLOCK)
	{
		if (ide->sectors_until_int != 1)
			/* make ready now */
			read_sector_done(ide - idestate);
		else
			/* just set a timer */
			timer_set(TIME_IN_USEC(1), ide - idestate, read_sector_done);
	}
	else
		/* just set a timer */
		timer_set(TIME_PER_SECTOR, ide - idestate, read_sector_done);
}
Exemple #3
0
void ide_controller_device::read_next_sector()
{
	/* mark ourselves busy */
	status |= IDE_STATUS_BUSY;

	if (command == IDE_COMMAND_READ_MULTIPLE_BLOCK)
	{
		if (sectors_until_int != 1)
			/* make ready now */
			read_sector_done();
		else
			/* just set a timer */
			timer_set(attotime::from_usec(1), TID_READ_SECTOR_DONE_CALLBACK);
	}
	else
		/* just set a timer */
		timer_set(TIME_PER_SECTOR, TID_READ_SECTOR_DONE_CALLBACK);
}