--- nono/vm/scsi.h 2026/04/29 17:04:59 1.1.1.7 +++ nono/vm/scsi.h 2026/04/29 17:05:41 1.1.1.10 @@ -4,6 +4,10 @@ // Licensed under nono-license.txt // +// +// SCSI (定数等) +// + #pragma once #include "device.h" @@ -12,11 +16,13 @@ class SCSI { public: - static const uint IO = 0x01; - static const uint CD = 0x02; - static const uint MSG = 0x04; - static const uint BSY = 0x08; - static const uint SEL = 0x10; + enum { + IO = 0x01, + CD = 0x02, + MSG = 0x04, + BSY = 0x08, + SEL = 0x10, + }; // SCSI のフェーズを表す。 // フェーズは概ね BSY と SEL の状態遷移によって決まる。 @@ -124,6 +130,9 @@ class SCSI static const uint ReadDiscInformation = 0x51; // ? static const uint ModeSelect10 = 0x55; // 共通 static const uint ModeSense10 = 0x5a; // 共通 + + // SCSI-3(?) + static const uint ReportLUNs = 0xa0; }; // SCSI コマンド名を返す static const char *GetCommandName(uint8 cmd);