Implement IDE Check Power Mode command. Fixes Windows NT4 with SP4 or later.
This commit is contained in:
parent
a16fdb195e
commit
13496ba7b9
1 changed files with 13 additions and 0 deletions
13
src/ide.c
13
src/ide.c
|
|
@ -62,6 +62,7 @@
|
||||||
#define WIN_READ_DMA 0xC8
|
#define WIN_READ_DMA 0xC8
|
||||||
#define WIN_WRITE_DMA 0xCA
|
#define WIN_WRITE_DMA 0xCA
|
||||||
#define WIN_SETIDLE1 0xE3
|
#define WIN_SETIDLE1 0xE3
|
||||||
|
#define WIN_CHECK_POWER_MODE 0xE5
|
||||||
#define WIN_IDENTIFY 0xEC /* Ask drive to identify itself */
|
#define WIN_IDENTIFY 0xEC /* Ask drive to identify itself */
|
||||||
|
|
||||||
/* ATAPI Commands */
|
/* ATAPI Commands */
|
||||||
|
|
@ -1058,6 +1059,7 @@ void writeide(int ide_board, uint16_t addr, uint8_t val)
|
||||||
case WIN_SET_MULTIPLE_MODE: /*Set Multiple Mode*/
|
case WIN_SET_MULTIPLE_MODE: /*Set Multiple Mode*/
|
||||||
// output=1;
|
// output=1;
|
||||||
case WIN_SETIDLE1: /* Idle */
|
case WIN_SETIDLE1: /* Idle */
|
||||||
|
case WIN_CHECK_POWER_MODE:
|
||||||
ide->atastat = BUSY_STAT;
|
ide->atastat = BUSY_STAT;
|
||||||
timer_process();
|
timer_process();
|
||||||
callbackide(ide_board);
|
callbackide(ide_board);
|
||||||
|
|
@ -1719,6 +1721,17 @@ void callbackide(int ide_board)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
|
case WIN_CHECK_POWER_MODE:
|
||||||
|
if (ide->type == IDE_NONE)
|
||||||
|
{
|
||||||
|
goto abort_cmd;
|
||||||
|
}
|
||||||
|
ide->secount = 0xff;
|
||||||
|
ide->atastat = READY_STAT | DSC_STAT;
|
||||||
|
ide_irq_raise(ide);
|
||||||
|
return;
|
||||||
|
|
||||||
case WIN_PACKETCMD: /* ATAPI Packet */
|
case WIN_PACKETCMD: /* ATAPI Packet */
|
||||||
if (!IDE_DRIVE_IS_CDROM(ide)) goto abort_cmd;
|
if (!IDE_DRIVE_IS_CDROM(ide)) goto abort_cmd;
|
||||||
// pclog("Packet callback! %i %08X\n",ide->packetstatus,ide);
|
// pclog("Packet callback! %i %08X\n",ide->packetstatus,ide);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue