Changeset 267 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


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.
Location:
trunk/XTIDE_Universal_BIOS/Src/Device
Files:
4 edited

Legend:

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

    r266 r267  
    1919    call    AccessDPT_GetDeviceControlByteToAL
    2020    or      al, FLG_DEVCONTROL_SRST | FLG_DEVCONTROL_nIEN   ; Set Reset bit
    21     OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out
     21    OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER     DEVICE_CONTROL_REGISTER_out
    2222    mov     ax, HSR0_RESET_WAIT_US
    2323    call    Timer_DelayMicrosecondsFromAX
     
    2727    or      al, FLG_DEVCONTROL_nIEN
    2828    and     al, ~FLG_DEVCONTROL_SRST                        ; Clear reset bit
    29     OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out
     29    OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER     DEVICE_CONTROL_REGISTER_out
    3030    mov     ax, HSR1_RESET_WAIT_US
    3131    call    Timer_DelayMicrosecondsFromAX
     
    122122.DoNotSetInterruptInServiceFlag:
    123123%endif
    124     OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER DEVICE_CONTROL_REGISTER_out
     124    OUTPUT_AL_TO_IDE_CONTROL_BLOCK_REGISTER     DEVICE_CONTROL_REGISTER_out
    125125
    126126    ; Output Feature Number
    127127    mov     al, [bp+IDEPACK.bFeatures]
    128     OUTPUT_AL_TO_IDE_REGISTER FEATURES_REGISTER_out
     128    OUTPUT_AL_TO_IDE_REGISTER   FEATURES_REGISTER_out
    129129
    130130    ; Output Sector Address High (only used by LBA48)
     
    140140    ; Output command
    141141    mov     al, [bp+IDEPACK.bCommand]
    142     OUTPUT_AL_TO_IDE_REGISTER COMMAND_REGISTER_out
     142    OUTPUT_AL_TO_IDE_REGISTER   COMMAND_REGISTER_out
    143143
    144144    ; Wait until command completed
     
    182182    ; Select Master or Slave Drive
    183183    mov     al, [bp+IDEPACK.bDrvAndHead]
    184     OUTPUT_AL_TO_IDE_REGISTER DRIVE_AND_HEAD_SELECT_REGISTER
     184    OUTPUT_AL_TO_IDE_REGISTER   DRIVE_AND_HEAD_SELECT_REGISTER
    185185    mov     bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRDY, FLG_STATUS_DRDY)
    186186    cmp     BYTE [bp+IDEPACK.bCommand], COMMAND_IDENTIFY_DEVICE
     
    204204ALIGN JUMP_ALIGN
    205205IDEDEVICE%+OutputSectorCountAndAddress:
    206     OUTPUT_AL_TO_IDE_REGISTER SECTOR_COUNT_REGISTER
     206    OUTPUT_AL_TO_IDE_REGISTER   SECTOR_COUNT_REGISTER
    207207
    208208    mov     al, ah
    209     OUTPUT_AL_TO_IDE_REGISTER LBA_LOW_REGISTER
     209    OUTPUT_AL_TO_IDE_REGISTER   LBA_LOW_REGISTER
    210210
    211211    mov     al, cl
    212     OUTPUT_AL_TO_IDE_REGISTER LBA_MIDDLE_REGISTER
     212    OUTPUT_AL_TO_IDE_REGISTER   LBA_MIDDLE_REGISTER
    213213
    214214    mov     al, ch
    215     JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER LBA_HIGH_REGISTER
     215    JUMP_TO_OUTPUT_AL_TO_IDE_REGISTER   LBA_HIGH_REGISTER
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeError.asm

    r266 r267  
    2020IDEDEVICE%+Error_GetBiosErrorCodeToAHfromPolledStatusRegisterInAL:
    2121    mov     ah, al          ; IDE Status Register to AH
    22     INPUT_TO_AL_FROM_IDE_REGISTER ERROR_REGISTER_in
     22    INPUT_TO_AL_FROM_IDE_REGISTER   ERROR_REGISTER_in
     23
     24%ifndef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS    ; JR-IDE/ISA
     25    jmp     ContinueFromMemIdeError
     26%else
     27ContinueFromMemIdeError:
    2328    xchg    al, ah          ; Status Register now in AL, Error Register now in AH
    2429
     
    3035
    3136    ; Fall to GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX
    32 %ifndef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS    ; JR-IDE/ISA
    33     jmp     GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX
    34 %endif
     37
    3538
    3639;--------------------------------------------------------------------
     
    4649;       BX
    4750;--------------------------------------------------------------------
    48 %ifdef ASSEMBLE_SHARED_IDE_DEVICE_FUNCTIONS
    4951ALIGN JUMP_ALIGN
    5052GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX:
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeWait.asm

    r266 r267  
    99;   Parameters:
    1010;       DS:DI:  Ptr to DPT (in RAMVARS segment)
    11 ;       SS:BP:  Ptr to IDEPACK or PIOVARS
     11;       SS:BP:  Ptr to IDEPACK, PIOVARS or MEMPIOVARS
    1212;   Returns:
    1313;       AH:     INT 13h Error Code
  • 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.