-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #368 from ZuluSCSI/feature/X68000-quirk
Add X68000 quirk for odd 0x00 CBD opcode
- Loading branch information
Showing
5 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Copyright (C) 2014 Michael McMaster <[email protected]> | ||
// Copyright (c) 2023 joshua stein <[email protected]> | ||
// Copyright (c) 2023 Andrea Ottaviani <[email protected]> | ||
// | ||
// This file is part of SCSI2SD. | ||
// | ||
|
@@ -71,7 +72,7 @@ void enter_BusFree() | |
|
||
// Wait for the initiator to cease driving signals | ||
// Bus settle delay + bus clear delay = 1200ns | ||
// Just waiting the clear delay is sufficient. | ||
// Just waiting the clear delay is sufficient. | ||
s2s_delay_ns(800); | ||
|
||
s2s_ledOff(); | ||
|
@@ -355,6 +356,23 @@ static void process_Command() | |
memset(scsiDev.cdb, 0xff, sizeof(scsiDev.cdb)); | ||
return; | ||
} | ||
// X68000 and strange "0x00 0xXX .. .. .. .." command | ||
else if ((command == 0x00) && likely(scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_X68000)) | ||
{ | ||
if (scsiDev.cdb[1] == 0x28) | ||
{ | ||
scsiDev.target->sense.code = NO_SENSE; | ||
scsiDev.target->sense.asc = NO_ADDITIONAL_SENSE_INFORMATION; | ||
enter_Status(CHECK_CONDITION); | ||
return; | ||
} else if (scsiDev.cdb[1] == 0x03) | ||
{ | ||
scsiDev.target->sense.code = NO_SENSE; | ||
scsiDev.target->sense.asc = NO_ADDITIONAL_SENSE_INFORMATION; | ||
enter_Status(GOOD); | ||
return; | ||
} | ||
} | ||
else if (parityError && | ||
(scsiDev.boardCfg.flags & S2S_CFG_ENABLE_PARITY)) | ||
{ | ||
|
@@ -444,18 +462,18 @@ static void process_Command() | |
{ | ||
// The response is completely non-standard. | ||
if (likely(allocLength > 12)) | ||
allocLength = 12; | ||
allocLength = 12; | ||
else if (unlikely(allocLength < 4)) | ||
allocLength = 4; | ||
if (cfg->deviceType != S2S_CFG_SEQUENTIAL) | ||
allocLength = 4; | ||
allocLength = 4; | ||
memset(scsiDev.data, 0, allocLength); | ||
if (scsiDev.target->sense.code == NO_SENSE) | ||
{ | ||
// Nothing to report. | ||
} | ||
else if (scsiDev.target->sense.code == UNIT_ATTENTION && | ||
cfg->deviceType == S2S_CFG_SEQUENTIAL) | ||
cfg->deviceType == S2S_CFG_SEQUENTIAL) | ||
{ | ||
scsiDev.data[0] = 0x10; // Tape exception | ||
} | ||
|
@@ -1389,4 +1407,3 @@ int scsiReconnect() | |
return reconnected; | ||
} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters