Browse Source

Don't fail on atapi command 0xBE

Fabian 3 years ago
parent
commit
84714d17a4
2 changed files with 9 additions and 1 deletions
  1. 8 0
      src/ide.js
  2. 1 1
      tests/nasm/run.js

+ 8 - 0
src/ide.js

@@ -1107,6 +1107,14 @@ IDEInterface.prototype.atapi_handle = function()
             dbg_log("Unimplemented ATAPI command: " + h(this.data[0]), LOG_DISK);
             break;
 
+        case 0xBE:
+            // Hiren's boot CD
+            dbg_log("Unimplemented ATAPI command: " + h(this.data[0]), LOG_DISK);
+            this.data_allocate(0);
+            this.data_end = this.data_length;
+            this.status = 0x50;
+            break;
+
         default:
             this.status = 0x51;
             this.data_length = 0;

+ 1 - 1
tests/nasm/run.js

@@ -340,7 +340,7 @@ else {
         }
 
         const eip = emulator.v86.cpu.instruction_pointer[0];
-        emulator.v86.cpu.write32(cpu.translate_address_system_read(eip), 0xF4F4F4F4); // hlt
+        emulator.v86.cpu.write32(emulator.v86.cpu.translate_address_system_read(eip), 0xF4F4F4F4); // hlt
 
         // XXX: On gdb execution is stopped at this point. On v86 we
         // currently don't have this ability, so we record the exception