Merge pull request #140 from mynameistroy/troy/icd

Support for Atari ST ICD commands
This commit is contained in:
Eric Helgeson 2022-07-16 15:01:42 -05:00 committed by GitHub
commit 2bd79bb487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -1589,8 +1589,16 @@ void loop()
// Bus settle delay 400ns. The following code was measured at 20ns before REQ asserted. Added another 380ns. STM32F103.
asm("nop;nop;nop;nop;nop;nop;nop;nop");// This asm causes some code reodering, which adds 270ns, plus 8 nop cycles for an additional 110ns. STM32F103
int len;
byte cmd[12];
byte cmd[20];
cmd[0] = readHandshake();
// Atari ST ICD extension support
// It sends a 0x1F as a indicator there is a
// proper full size SCSI command byte to follow
// so just read it and re-read it again to get the
// real command byte
if(cmd[0] == SCSI_ICD_EXTENDED_CMD) { cmd[0] = readHandshake(); }
LOGHEX(cmd[0]);
// Command length selection, reception
static const int cmd_class_len[8]={6,10,10,6,6,12,6,6};

View File

@ -21,6 +21,7 @@
#define SCSI_RECV_DIAG_RESULTS 0x1C
#define SCSI_SEND_DIAG 0x1D
#define SCSI_PREVENT_ALLOW_REMOVAL 0x1E
#define SCSI_ICD_EXTENDED_CMD 0x1F
#define SCSI_READ_CAPACITY 0x25
#define SCSI_READ10 0x28
#define SCSI_WRITE10 0x2A