summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/nscsi_hd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/nscsi_hd.cpp')
-rw-r--r--src/devices/machine/nscsi_hd.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/devices/machine/nscsi_hd.cpp b/src/devices/machine/nscsi_hd.cpp
index 7f480169715..da417cae25e 100644
--- a/src/devices/machine/nscsi_hd.cpp
+++ b/src/devices/machine/nscsi_hd.cpp
@@ -136,7 +136,11 @@ void nscsi_harddisk_device::scsi_command()
int size = scsi_cmdbuf[4];
switch(page) {
case 0:
- memset(scsi_cmdbuf, 0, 148);
+ std::fill_n(scsi_cmdbuf, 148, 0);
+
+ // vendor and product information must be padded with spaces
+ std::fill_n(&scsi_cmdbuf[8], 28, 0x20);
+
// From Seagate SCSI Commands Reference Manual (http://www.seagate.com/staticfiles/support/disc/manuals/scsi/100293068a.pdf), page 73:
// If the SCSI target device is not capable of supporting a peripheral device connected to this logical unit, the
// device server shall set these fields to 7Fh (i.e., PERIPHERAL QUALIFIER field set to 011b and PERIPHERAL DEVICE
@@ -148,6 +152,7 @@ void nscsi_harddisk_device::scsi_command()
scsi_cmdbuf[1] = 0x00; // media is not removable
scsi_cmdbuf[2] = 0x05; // device complies with SPC-3 standard
scsi_cmdbuf[3] = 0x01; // response data format = CCS
+ scsi_cmdbuf[4] = 52; // additional length
if(m_inquiry_data.empty()) {
LOG("IDNT tag not found in chd metadata, using default inquiry data\n");