@@ 371,9 371,10 @@ scsireqsense(Target *t, char lun, void *data, int *nbytes, int quiet)
}
/*
- * Unit is becoming ready
+ * Unit is becoming ready, rather than not ready
*/
- if(sense[12] != 0x04 || sense[13] != 0x01)
+ if((sense[2] & 0x0F) != 0x02 &&
+ (sense[12] != 0x04 || sense[13] != 0x01))
break;
delay(5000);
@@ 389,16 390,17 @@ scsireqsense(Target *t, char lun, void *data, int *nbytes, int quiet)
}
int
-scsidiskinfo(Target *t, char lun, uchar *data)
+scsidiskinfo(Target *t, char lun, int track, uchar *data)
{
int s, nbytes;
uchar cmd[10], *d;
- nbytes = 4;
+ nbytes = 12;
memset(cmd, 0, sizeof(cmd));
cmd[0] = 0x43;
cmd[1] = lun<<5;
+ cmd[6] = track;
hnputs(cmd+7, nbytes);
d = scsialloc(nbytes);
@@ 407,7 409,7 @@ scsidiskinfo(Target *t, char lun, uchar *data)
memset(d, 0, nbytes);
s = scsiexec(t, SCSIread, cmd, sizeof(cmd), d, &nbytes);
- memmove(data, d, 4);
+ memmove(data, d, 12);
scsifree(d);
return s;
}
@@ 466,7 468,7 @@ scsibufsize(Target *t, char lun, int size)
}
int
-scsireadcdda(Target *t, char lun, int dir, void *b, long n, long bsize, long bno)
+scsireadcdda(Target *t, char lun, int, void *b, long n, long bsize, long bno)
{
uchar cmd[10];
int s, nbytes;
@@ 89,7 89,9 @@ load(Cursor *c)
}
memmove(&curcursor, c, sizeof(Cursor));
+#ifdef notdef
vgaxo(Seqx, 0x20, seq20 & ~0x08);
+#endif
/*
* Is linear addressing turned on? This will determine
* how we access the cursor storage.
@@ 120,8 122,8 @@ load(Cursor *c)
*p++ = c->set[2*y + x];
}
else {
- *p++ = 0xAA;
- *p++ = 0x55;
+ *p++ = 0x00;
+ *p++ = 0x00;
}
}
}
@@ 130,7 132,9 @@ load(Cursor *c)
* Set the cursor hotpoint and enable the cursor.
*/
hotpoint = c->offset;
+#ifdef notdef
vgaxo(Seqx, 0x20, seq20|0x08);
+#endif
unlock(&ark2000pvlock);
}
@@ 395,3 395,41 @@ matchtoken(char *p, char *token)
p++;
return p;
}
+
+void
+hnputl(void *p, ulong v)
+{
+ uchar *a;
+
+ a = p;
+ a[0] = v>>24;
+ a[1] = v>>16;
+ a[2] = v>>8;
+ a[3] = v;
+}
+
+void
+hnputs(void *p, ushort v)
+{
+ uchar *a;
+
+ a = p;
+ a[0] = v>>8;
+ a[1] = v;
+}
+
+ulong
+nhgetl(void *p)
+{
+ uchar *a;
+ a = p;
+ return (a[0]<<24)|(a[1]<<16)|(a[2]<<8)|(a[3]<<0);
+}
+
+ushort
+nhgets(void *p)
+{
+ uchar *a;
+ a = p;
+ return (a[0]<<8)|(a[1]<<0);
+}