Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a workaround for Alcohol/DT virtual drive bug #16

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

NicknineTheEagle
Copy link

@NicknineTheEagle NicknineTheEagle commented Apr 30, 2024

This introduces a workaround for a bug in SPTD SATA controller used by Alcohol and DAEMON Tools where it doesn't return LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE error for out-of-range sector reads - this includes track 1 pregap which later versions of SafeDisc try to check. If the disc drive returns an error then SafeDisc gives up and doesn't bother checking pregap but SPTD returns success code despite not actually returning any sector data so SafeDisc keeps checking pregap and then fails the disc check since it did not receive valid data from the virtual drive.
This is only present on SPTD SATA controller which Alcohol (and presumably DT) uses on Windows 10. On Windows 7 and below, Alcohol emulates SCSI drive which doesn't have this bug.

The workaround checks if read command on negative LBA was attempted and success code was returned with empty output buffer. If yes, it manually writes LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE error.

@NicknineTheEagle NicknineTheEagle changed the title Added a workaround for Alcohol virtual drive bug Added a workaround for Alcohol/DT virtual drive bug Apr 30, 2024
@NicknineTheEagle NicknineTheEagle force-pushed the nn/lba-fix branch 2 times, most recently from b5003e8 to a782e85 Compare May 1, 2024 00:11
@NicknineTheEagle NicknineTheEagle force-pushed the nn/lba-fix branch 2 times, most recently from 48e6c89 to 02b9411 Compare May 1, 2024 14:46
@mirh
Copy link

mirh commented Aug 15, 2024

Maybe a nice addition could be to log the name of the disc drive too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants