Changeset 476 in xtideuniversalbios


Ignore:
Timestamp:
Oct 13, 2012, 4:14:58 PM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Memory Mapped Transfers now work again.
File:
1 edited

Legend:

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

    r475 r476  
    117117    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    118118
    119     ; Increment number of successfully read sectors
     119    ; Update number of successfully read sectors and sectors left to transfer.
     120    ; We cannot use SUB instruction as a comparison since it will not
     121    ; work in this situation:
     122    ; Before SUB we have 2 full blocks left to transfer. SUB command
     123    ; then compares 2 full blocks against one full block and updates
     124    ; sectors left to one full block and jumps to .ReadNextBlockFromDrive,
     125    ; since we have one full block left to transfer. After it has been
     126    ; transferred, there will be a wait for next block but DRQ is never
     127    ; set since all is transferred! Then we get timeout error.
    120128    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
     129    sub     [bp+MEMPIOVARS.bSectorsLeft], cl
    121130    add     [bp+MEMPIOVARS.bSectorsDone], cl
    122     sub     [bp+MEMPIOVARS.bSectorsLeft], cl
     131    cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
    123132    ja      SHORT .ReadNextBlockFromDrive
    124133
     
    191200    ; Increment number of successfully written WORDs
    192201    mov     cx, [bp+MEMPIOVARS.wSectorsInBlock]
     202    sub     [bp+MEMPIOVARS.bSectorsLeft], cl
    193203    add     [bp+MEMPIOVARS.bSectorsDone], cl
    194     sub     [bp+MEMPIOVARS.bSectorsLeft], cl
     204    cmp     [bp+MEMPIOVARS.bSectorsLeft], cl
    195205    ja      SHORT .WriteNextBlockToDrive
    196206
Note: See TracChangeset for help on using the changeset viewer.