Added 0xE3 command to idectrl, ATAPI identify should not work for hard disk, so updated unknown commands always to return IDE_ERROR_UNKNOWN_COMMAND, this way at586 driver boots (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2011-05-05 19:15:32 +00:00
parent 4a296fc359
commit 96c25f2e57

View File

@ -82,6 +82,7 @@
#define IDE_COMMAND_ATAPI_IDENTIFY 0xa1
#define IDE_COMMAND_RECALIBRATE 0x10
#define IDE_COMMAND_IDLE_IMMEDIATE 0xe1
#define IDE_COMMAND_IDLE 0xe3
#define IDE_COMMAND_TAITO_GNET_UNLOCK_1 0xfe
#define IDE_COMMAND_TAITO_GNET_UNLOCK_2 0xfc
#define IDE_COMMAND_TAITO_GNET_UNLOCK_3 0x0f
@ -1124,7 +1125,6 @@ static void handle_command(ide_state *ide, UINT8 command)
break;
case IDE_COMMAND_GET_INFO:
case IDE_COMMAND_ATAPI_IDENTIFY:
LOGPRINT(("IDE Read features\n"));
/* reset the buffer */
@ -1165,6 +1165,16 @@ static void handle_command(ide_state *ide, UINT8 command)
signal_interrupt(ide);
break;
case IDE_COMMAND_IDLE:
/* clear the error too */
ide->error = IDE_ERROR_NONE;
/* for timeout disabled value is 0 */
ide->sector_count = 0;
/* signal an interrupt */
signal_interrupt(ide);
break;
case IDE_COMMAND_SET_CONFIG:
LOGPRINT(("IDE Set configuration (%d heads, %d sectors)\n", ide->cur_head + 1, ide->sector_count));
@ -1241,7 +1251,10 @@ static void handle_command(ide_state *ide, UINT8 command)
default:
LOGPRINT(("IDE unknown command (%02X)\n", command));
debugger_break(ide->device->machine());
ide->status |= IDE_STATUS_ERROR;
ide->error = IDE_ERROR_UNKNOWN_COMMAND;
signal_interrupt(ide);
//debugger_break(ide->device->machine());
break;
}
}