mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
some more commands
This commit is contained in:
parent
7cb213f0ee
commit
f3df87fbbc
1 changed files with 30 additions and 0 deletions
30
src/ide.js
30
src/ide.js
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue