Changeset 267 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE


Ignore:
Timestamp:
Feb 24, 2012, 8:34:41 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • More JR-IDE/ISA fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/MemoryMappedIDE/MemIdeTransfer.asm

    r266 r267  
    7070;--------------------------------------------------------------------
    7171ReadFromSectorAccessWindow:
    72     pop     ds  ; CS -> DS
    73     mov     di, si
    74     mov     si, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET
    75 
    76     call    WaitUntilReadyToTransferNextBlock
    77     jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    78 
    79     mov     cx, [bp+PIOVARS.wWordsInBlock]
     72    pop     ds      ; CS -> DS
     73    mov     di, si  ; ES:DI = destination
     74    mov     si, JRIDE_SECTOR_ACCESS_WINDOW_OFFSET   ; DS:SI = source
     75
     76    call    WaitUntilReadyToTransferNextBlock
     77    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
     78
     79    mov     cx, [bp+MEMPIOVARS.wWordsInBlock]
    8080
    8181ALIGN JUMP_ALIGN
    8282.ReadNextBlockFromDrive:
    83     cmp     [bp+PIOVARS.wWordsLeft], cx
     83    cmp     [bp+MEMPIOVARS.wWordsLeft], cx
    8484    jbe     SHORT .ReadLastBlockFromDrive
    8585    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
     
    8888
    8989    ; Increment number of successfully read WORDs
    90     mov     cx, [bp+PIOVARS.wWordsInBlock]
    91     sub     [bp+PIOVARS.wWordsLeft], cx
    92     add     [bp+PIOVARS.wWordsDone], cx
     90    mov     cx, [bp+MEMPIOVARS.wWordsInBlock]
     91    sub     [bp+MEMPIOVARS.wWordsLeft], cx
     92    add     [bp+MEMPIOVARS.wWordsDone], cx
    9393    jmp     SHORT .ReadNextBlockFromDrive
    9494
    9595ALIGN JUMP_ALIGN
    9696.ReadLastBlockFromDrive:
    97     mov     ch, [bp+PIOVARS.wWordsLeft+1]       ; Sectors left
     97    mov     ch, [bp+MEMPIOVARS.wWordsLeft+1]    ; Sectors left
    9898    call    ReadSingleBlockFromSectorAccessWindowInDSSItoESDI
    9999
     
    107107ReturnWithMemoryIOtransferErrorInAH:
    108108    lds     di, [bp+MEMPIOVARS.fpDPT]           ; DPT now in DS:DI
    109     mov     cx, [bp+PIOVARS.wWordsDone]
     109    mov     cx, [bp+MEMPIOVARS.wWordsDone]
    110110    jc      SHORT .ConvertTransferredWordsInCXtoSectors
    111     add     cx, [bp+PIOVARS.wWordsLeft]         ; Never sets CF
     111    add     cx, [bp+MEMPIOVARS.wWordsLeft]      ; Never sets CF
    112112.ConvertTransferredWordsInCXtoSectors:
    113113    xchg    cl, ch
     
    141141    jc      SHORT ReturnWithMemoryIOtransferErrorInAH
    142142
    143     mov     cx, [bp+PIOVARS.wWordsInBlock]
     143    mov     cx, [bp+MEMPIOVARS.wWordsInBlock]
    144144
    145145ALIGN JUMP_ALIGN
    146146.WriteNextBlockToDrive:
    147     cmp     [bp+PIOVARS.wWordsLeft], cx
     147    cmp     [bp+MEMPIOVARS.wWordsLeft], cx
    148148    jbe     SHORT .WriteLastBlockToDrive
    149149    call    WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
     
    152152
    153153    ; Increment number of successfully written WORDs
    154     mov     cx, [bp+PIOVARS.wWordsInBlock]
    155     sub     [bp+PIOVARS.wWordsLeft], cx
    156     add     [bp+PIOVARS.wWordsDone], cx
     154    mov     cx, [bp+MEMPIOVARS.wWordsInBlock]
     155    sub     [bp+MEMPIOVARS.wWordsLeft], cx
     156    add     [bp+MEMPIOVARS.wWordsDone], cx
    157157    jmp     SHORT .WriteNextBlockToDrive
    158158
    159159ALIGN JUMP_ALIGN
    160160.WriteLastBlockToDrive:
    161     mov     ch, [bp+PIOVARS.wWordsLeft+1]       ; Sectors left
     161    mov     ch, [bp+MEMPIOVARS.wWordsLeft+1]        ; Sectors left
    162162    ePUSH_T bx, CheckErrorsAfterTransferringLastMemoryMappedBlock
    163163    ; Fall to WriteSingleBlockFromDSSIToSectorAccessWindowInESDI
Note: See TracChangeset for help on using the changeset viewer.