Changeset 610 in xtideuniversalbios for trunk


Ignore:
Timestamp:
May 22, 2021, 7:32:31 AM (4 years ago)
Author:
Tomi Tilli
Message:

Attempt to fix issues on some (low power?) drives with data corruption starting at 8 GB. I think the top LBA / head bits might get lost if the drive is busy (perhaps power saving feature) when we first output drive select.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm

    r596 r610  
    240240    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
    241241
     242    ; Output again to make sure head bits are set. They were lost if the device
     243    ; was busy when we first output drive select (although it shouldn't be busy
     244    ; since we have waited error result after previous command). Some low power
     245    ; drives (CF cards, 1.8" HDDs etc) have some internal sleep modes that
     246    ; might cause trouble? Normal HDDs seem to work fine.
     247    mov     al, [bp+IDEPACK.bDrvAndHead]
     248    OUTPUT_AL_TO_IDE_REGISTER   DRIVE_AND_HEAD_SELECT_REGISTER
     249
    242250    ; Ignore errors from IDE Error Register (set by previous command)
    243251    cmp     ah, RET_HD_TIMEOUT
Note: See TracChangeset for help on using the changeset viewer.