]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Added dummy FORMAT TRACK and VERIFY TRACK commands.
authorToni Wilen <twilen@winuae.net>
Thu, 25 May 2017 14:22:36 +0000 (17:22 +0300)
committerToni Wilen <twilen@winuae.net>
Thu, 25 May 2017 14:22:36 +0000 (17:22 +0300)
hardfile.cpp
scsi.cpp

index 95f9f073ae0226f73016552fb93f69209239ff49..df659568efb2ddd11b328c1b371477463b1c5ed9 100644 (file)
@@ -1423,6 +1423,20 @@ int scsi_hd_emulate (struct hardfiledata *hfd, struct hd_hardfiledata *hdhfd, ua
                        goto readprot;
                scsi_len = 0;
                break;
+       case 0x05: /* VERIFY TRACK */
+               // do nothing
+               if (nodisk (hfd))
+                       goto nodisk;
+               scsi_len = 0;
+               break;
+       case 0x06: /* FORMAT TRACK */
+               // do nothing
+               if (nodisk (hfd))
+                       goto nodisk;
+               if (is_writeprotected(hfd))
+                       goto readprot;
+               scsi_len = 0;
+               break;
        case 0x09: /* READ VERIFY */
                if (nodisk(hfd))
                        goto nodisk;
index 40b5c97275c596c803915d004e73943fae837727..1fc01ec5968b977ca0678e7625ce464483180c09 100644 (file)
--- a/scsi.cpp
+++ b/scsi.cpp
@@ -67,7 +67,7 @@ extern int log_scsiemu;
 
 static const int outcmd[] = { 0x04, 0x0a, 0x0c, 0x2a, 0xaa, 0x15, 0x55, 0x0f, -1 };
 static const int incmd[] = { 0x01, 0x03, 0x08, 0x12, 0x1a, 0x5a, 0x25, 0x28, 0x34, 0x37, 0x42, 0x43, 0xa8, 0x51, 0x52, 0xb9, 0xbd, 0xbe, -1 };
-static const int nonecmd[] = { 0x00, 0x05, 0x09, 0x0b, 0x11, 0x16, 0x17, 0x19, 0x1b, 0x1d, 0x1e, 0x2b, 0x35, 0x45, 0x47, 0x48, 0x49, 0x4b, 0x4e, 0xa5, 0xa9, 0xba, 0xbc, 0xe0, 0xe3, 0xe4, -1 };
+static const int nonecmd[] = { 0x00, 0x05, 0x06, 0x09, 0x0b, 0x11, 0x16, 0x17, 0x19, 0x1b, 0x1d, 0x1e, 0x2b, 0x35, 0x45, 0x47, 0x48, 0x49, 0x4b, 0x4e, 0xa5, 0xa9, 0xba, 0xbc, 0xe0, 0xe3, 0xe4, -1 };
 static const int scsicmdsizes[] = { 6, 10, 10, 12, 16, 12, 10, 6 };
 
 static void scsi_illegal_command(struct scsi_data *sd)
@@ -146,6 +146,12 @@ bool scsi_emulate_analyze (struct scsi_data *sd)
                        return true;
                }
        break;
+       case 0x06: // FORMAT TRACK
+               if (sd->device_type == UAEDEV_CD)
+                       goto nocmd;
+               sd->direction = 0;
+               sd->data_len = 0;
+               return true;
        case 0x0c: // INITIALIZE DRIVE CHARACTERICS (SASI)
                if (sd->hfd && sd->hfd->ci.unit_feature_level < HD_LEVEL_SASI)
                        goto nocmd;