From 96c25f2e57f86697206b437f9396a062a22bb708 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 5 May 2011 19:15:32 +0000 Subject: [PATCH] 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) --- src/emu/machine/idectrl.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/emu/machine/idectrl.c b/src/emu/machine/idectrl.c index 04cf99d58ca..501b4ee7761 100644 --- a/src/emu/machine/idectrl.c +++ b/src/emu/machine/idectrl.c @@ -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; } }