some more commands

This commit is contained in:
copy 2014-06-02 23:07:11 +02:00
parent 7cb213f0ee
commit f3df87fbbc

View file

@ -181,6 +181,22 @@ function IDEDevice(dev, buffer, is_cd, nr)
push_irq();
break;
case 0x03:
// request sense
pio_data = new Uint8Array(Math.min(data_port_buffer[4], 15));
status = 0x58;
pio_data[0] = 0x80 | 0x70;
pio_data[7] = 8;
data_pointer = 0;
bytecount = 2;
cylinder_low = 8;
cylinder_high = 0;
push_irq();
break;
case 0x12:
// inquiry
pio_data = new Uint8Array(Math.min(data_port_buffer[4], 35));
@ -672,6 +688,12 @@ function IDEDevice(dev, buffer, is_cd, nr)
switch(cmd)
{
case 0x00:
// NOP
push_irq();
status = 0x50;
break;
case 0x08:
dbg_log("ATA device reset", LOG_DISK);
data_pointer = 0;
@ -726,6 +748,14 @@ function IDEDevice(dev, buffer, is_cd, nr)
ata_write(cmd);
break;
case 0x90:
// EXECUTE DEVICE DIAGNOSTIC
dbg_log("ATA cmd 90", LOG_DISK);
push_irq();
lba_count = 0x101;
status = 0x50;
break;
case 0x91:
// INITIALIZE DEVICE PARAMETERS
dbg_log("ATA cmd 91", LOG_DISK);