Changeset 545 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Initialization


Ignore:
Timestamp:
Apr 19, 2013, 11:44:35 AM (11 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Integrated XT-CFv3 support by James Pearce.
  • XT-CFv2 memory mapped I/O and DMA modes are no longer supported (but PIO mode is).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r528 r545  
    158158;--------------------------------------------------------------------
    159159StartDetectionWithDriveSelectByteInBHandStringInCX:
    160 %ifdef MODULE_8BIT_IDE_ADVANCED
    161     ; Autodetect port for XT-CF
     160%ifdef MODULE_8BIT_IDE
    162161    call    DetectDrives_DoesIdevarsInCSBPbelongToXTCF
    163     jne     SHORT .SkipXTCFportDetection
     162    jne     SHORT .ShouldNotSkipSlaveDriveDetection
    164163
    165164    ; XT-CF do not support slave drives so skip detection
    166165    test    bh, FLG_DRVNHEAD_DRV
    167166    jnz     SHORT NoSlaveDriveAvailable
    168 
    169     ; XT-CF do not support slave drives so we can safely update port
    170     ; for next drive (another XT-CF card on same system)
    171 .DetectNextPort:
    172     mov     dx, [es:BOOTVARS.wNextXTCFportToScan]
    173     xor     dl, 40h
    174     jnz     SHORT .StoreNextXTCFportToScan
    175     inc     dh
    176     cmp     dh, XTCF_BASE_PORT_4 >> 8
    177     ja      SHORT .SkipXTCFportDetection        ; XT-CF not found from any port
    178 .StoreNextXTCFportToScan:
    179     mov     [es:BOOTVARS.wNextXTCFportToScan], dx
    180 
    181     call    AH1Eh_DetectXTCFwithBasePortInDX
    182     jc      SHORT .DetectNextPort               ; XT-CF not found from this port
    183 
    184     ; We now have autodetected port in DX
    185     push    dx
    186     xchg    ax, dx                              ; Port to print in AX
    187     call    DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP
    188     jmp     SHORT .DriveDetectionStringPrintedOnScreen
    189 
    190     ; Print detect string for devices that do not support autodetection
    191 .SkipXTCFportDetection:
    192     push    dx
    193 %endif ; MODULE_8BIT_IDE_ADVANCED
     167.ShouldNotSkipSlaveDriveDetection:
     168%endif ; MODULE_8BIT_IDE
    194169
    195170    call    DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
     
    197172%ifdef MODULE_HOTKEYS
    198173    call    HotkeyBar_UpdateDuringDriveDetection
    199 %endif
    200 
    201 %ifdef MODULE_8BIT_IDE_ADVANCED
    202     pop     dx
    203174%endif
    204175    ; Fall to .ReadAtaInfoFromHardDisk
     
    278249
    279250
    280 %ifdef MODULE_8BIT_IDE_ADVANCED
     251%ifdef MODULE_8BIT_IDE
    281252;--------------------------------------------------------------------
    282253; DetectDrives_DoesIdevarsInCSBPbelongToXTCF
     
    292263    mov     al, [cs:bp+IDEVARS.bDevice]
    293264    cmp     al, DEVICE_8BIT_XTCF_PIO8
    294     je      SHORT .DeviceIsXTCF
     265    je      SHORT .Done
     266    cmp     al, DEVICE_8BIT_XTCF_PIO8_WITH_BIU_OFFLOAD
     267
     268%ifdef MODULE_8BIT_IDE_ADVANCED
     269    je      SHORT .Done
    295270    cmp     al, DEVICE_8BIT_XTCF_DMA
    296     je      SHORT .DeviceIsXTCF
    297     cmp     al, DEVICE_8BIT_XTCF_MEMMAP
    298 .DeviceIsXTCF:
     271%endif ; MODULE_8BIT_IDE_ADVANCED
     272
     273.Done:      ; return state via ZF, set from the cmp instructions
    299274NoSlaveDriveAvailable:
    300275    ret
    301 %endif ; MODULE_8BIT_IDE_ADVANCED
     276%endif ; MODULE_8BIT_IDE
Note: See TracChangeset for help on using the changeset viewer.