Ignore:
Timestamp:
Oct 11, 2012, 5:30:15 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Drive detection now displays autodetected XT-CF port and skips slave drives for XT-CF.
  • AH=1Eh no longer tries to disable 8-bit mode for memory mapped and DMA transfer modes.
  • Preparations to implement DMA.
File:
1 edited

Legend:

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

    r473 r474  
    153153;--------------------------------------------------------------------
    154154StartDetectionWithDriveSelectByteInBHandStringInCX:
    155     call    DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
    156 %ifdef MODULE_HOTKEYS
    157     call    HotkeyBar_UpdateDuringDriveDetection
    158 %endif
    159     ; Fall to .AutodetectXTCFport or .ReadAtaInfoFromHardDisk
    160 
    161 
     155    ; Autodetect port for XT-CF
    162156%ifdef MODULE_8BIT_IDE
    163 ;--------------------------------------------------------------------
    164 ; .AutodetectXTCFport
    165 ;   Parameters:
    166 ;       BH:     Drive Select byte for Drive and Head Register
    167 ;       CS:BP:  Ptr to IDEVARS for the drive
    168 ;       DS:     RAMVARS segment
    169 ;       ES:     Zero (BDA segment)
    170 ;   Returns:
    171 ;       DX:     Autodetected port (for devices that support autodetection)
    172 ;   Corrupts registers:
    173 ;       AX
    174 ;--------------------------------------------------------------------
    175 .AutodetectXTCFport:
    176     ; Detect port for XTCF
    177157    call    DetectDrives_DoesIdevarsInCSBPbelongToXTCF
    178158    jne     SHORT .SkipXTCFportDetection
     159
     160    ; XT-CF do not support slave drives so skip detection
     161    test    bh, FLG_DRVNHEAD_DRV
     162    jnz     SHORT NoSlaveDriveAvailable
    179163
    180164    ; XT-CF do not support slave drives so we can safely update port
     
    183167    call    BootVars_GetNextXTCFportToDetectToDX
    184168    cmp     dx, XTCF_BASE_PORT_4
    185     ja      SHORT DetectDrives_DriveNotFound    ; XT-CF not found from any port
     169    ja      SHORT .SkipXTCFportDetection        ; XT-CF not found from any port
    186170
    187171    call    AH1Eh_DetectXTCFwithBasePortInDX
    188172    jc      SHORT .DetectNextPort               ; XT-CF not found from this port
     173
     174    ; We now have autodetected port in DX
     175    push    dx
     176    xchg    ax, dx                              ; Port to print in AX
     177    call    DetectPrint_StartDetectWithAutodetectedBasePortInAXandIdeVarsInCSBP
     178    jmp     SHORT .DriveDetectionStringPrintedOnScreen
     179
     180    ; Print detect string for devices that do not support autodetection     
    189181.SkipXTCFportDetection:
     182    push    dx
     183%endif ; MODULE_8BIT_IDE
     184
     185    call    DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
     186.DriveDetectionStringPrintedOnScreen:
     187%ifdef MODULE_HOTKEYS
     188    call    HotkeyBar_UpdateDuringDriveDetection
     189%endif
     190%ifdef MODULE_8BIT_IDE
     191    pop     dx
     192%endif
    190193    ; Fall to .ReadAtaInfoFromHardDisk
    191 %endif ; MODULE_8BIT_IDE
    192194
    193195
     
    284286    cmp     al, DEVICE_8BIT_XTCF_MEMMAP
    285287.DeviceIsXTCF:
     288NoSlaveDriveAvailable:
    286289    ret
    287290%endif ; MODULE_8BIT_IDE
Note: See TracChangeset for help on using the changeset viewer.