Changeset 419 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device


Ignore:
Timestamp:
May 6, 2012, 2:34:35 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • IDE transfers now properly return number of sectors transferred when no errors.
  • Tweaked L-CHS parameters for LBA drives.
Location:
trunk/XTIDE_Universal_BIOS/Src/Device/IDE
Files:
2 edited

Legend:

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

    r417 r419  
    108108.ReadLastBlockFromDrive:
    109109    mov     cl, [bp+PIOVARS.bSectorsLeft]       ; CH is already zero
     110    push    cx
    110111    call    [bp+PIOVARS.fnXfer]                 ; Transfer possibly partial block
    111112
     
    115116    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_BSY)
    116117    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
     118    pop     cx  ; [bp+PIOVARS.bSectorsLeft]
     119    jc      SHORT ReturnWithTransferErrorInAH
     120
     121    ; All rectors succesfully transferred
     122    add     cx, [bp+PIOVARS.bSectorsDone]       ; Never sets CF
     123    ret
    117124
    118125    ; Return number of successfully read sectors
     
    175182.WriteLastBlockToDrive:
    176183    mov     cl, [bp+PIOVARS.bSectorsLeft]       ; CH is already zero
     184    push    cx
    177185%ifdef USE_186
    178186    push    CheckErrorsAfterTransferringLastBlock
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/JrIdeTransfer.asm

    r417 r419  
    110110.ReadLastBlockFromDrive:
    111111    mov     cl, [bp+MEMPIOVARS.bSectorsLeft]
     112    push    cx
    112113    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    113114
     
    117118    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_BSY)
    118119    call    IdeWait_PollStatusFlagInBLwithTimeoutInBH
     120    pop     cx  ; [bp+MEMPIOVARS.bSectorsLeft]
     121    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
     122
     123    ; All rectors succesfully transferred
     124    add     cx, [bp+PIOVARS.bSectorsDone]       ; Never sets CF
     125    ret
    119126
    120127    ; Return number of successfully transferred sectors
     
    175182.WriteLastBlockToDrive:
    176183    mov     cl, [bp+MEMPIOVARS.bSectorsLeft]
     184    push    cx
    177185    ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
    178186    ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
Note: See TracChangeset for help on using the changeset viewer.