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


Ignore:
Timestamp:
Oct 10, 2012, 6:22:23 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Large changes to prepare full XT-CF support (DMA not yet implemented and memory mapped transfers are not working).
Location:
trunk/XTIDE_Universal_BIOS/Src/Initialization
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/Vision.asm

    r398 r473  
    179179    ; QD6500 has only one channel that can be Primary at 1F0h or Secondary at 170h.
    180180    ; QD6580 always has Primary channel at 1F0h. Secondary channel at 170h can be Enabled or Disabled.
    181     call    AccessDPT_GetIdeBasePortToBX
     181    mov     bx, [di+DPT.wBasePort]
    182182    cmp     bx, DEVICE_ATA_PRIMARY_PORT
    183183    je      SHORT .CalculateTimingTicksForQD6580    ; Primary Channel so no need to modify DX
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r441 r473  
    150150;       None
    151151;   Corrupts registers:
    152 ;       AX, BX, CX, DX, SI, DI
     152;       AX, BL, CX, DX, SI, DI
    153153;--------------------------------------------------------------------
    154154StartDetectionWithDriveSelectByteInBHandStringInCX:
     
    157157    call    HotkeyBar_UpdateDuringDriveDetection
    158158%endif
     159    ; Fall to .AutodetectXTCFport or .ReadAtaInfoFromHardDisk
     160
     161
     162%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
     177    call    DetectDrives_DoesIdevarsInCSBPbelongToXTCF
     178    jne     SHORT .SkipXTCFportDetection
     179
     180    ; XT-CF do not support slave drives so we can safely update port
     181    ; for next drive (another XT-CF card on same system)
     182.DetectNextPort:
     183    call    BootVars_GetNextXTCFportToDetectToDX
     184    cmp     dx, XTCF_BASE_PORT_4
     185    ja      SHORT DetectDrives_DriveNotFound    ; XT-CF not found from any port
     186
     187    call    AH1Eh_DetectXTCFwithBasePortInDX
     188    jc      SHORT .DetectNextPort               ; XT-CF not found from this port
     189.SkipXTCFportDetection:
    159190    ; Fall to .ReadAtaInfoFromHardDisk
     191%endif ; MODULE_8BIT_IDE
     192
    160193
    161194;--------------------------------------------------------------------
     
    163196;   Parameters:
    164197;       BH:     Drive Select byte for Drive and Head Register
     198;       DX:     Autodetected port (for devices that support autodetection)
    165199;       CS:BP:  Ptr to IDEVARS for the drive
    166200;       DS:     RAMVARS segment
     
    176210    push    es
    177211    push    si
     212    push    dx
    178213    push    bx
    179214    call    Device_IdentifyToBufferInESSIwithDriveSelectByteInBH
    180215    pop     bx
     216    pop     dx
    181217    pop     si
    182218    pop     es
     
    208244;   Parameters:
    209245;       BH:     Drive Select byte for Drive and Head Register
     246;       DX:     Autodetected port (for devices that support autodetection)
    210247;       CS:BP:  Ptr to IDEVARS for the drive
    211248;       ES:SI   Ptr to ATA information for the drive
     
    226263    call    DriveDetectInfo_CreateForHardDisk
    227264    jmp     SHORT DetectPrint_DriveNameFromDrvDetectInfoInESBX
     265
     266
     267%ifdef MODULE_8BIT_IDE
     268;--------------------------------------------------------------------
     269; DetectDrives_DoesIdevarsInCSBPbelongToXTCF
     270;   Parameters:
     271;       CS:BP:  Ptr to IDEVARS for the drive
     272;   Returns:
     273;       ZF:     Set if IDEVARS belongs to XT-CF device
     274;               Cleared if some other device
     275;   Corrupts registers:
     276;       AL
     277;--------------------------------------------------------------------
     278DetectDrives_DoesIdevarsInCSBPbelongToXTCF:
     279    mov     al, [cs:bp+IDEVARS.bDevice]
     280    cmp     al, DEVICE_8BIT_XTCF_PIO8
     281    je      SHORT .DeviceIsXTCF
     282    cmp     al, DEVICE_8BIT_XTCF_DMA
     283    je      SHORT .DeviceIsXTCF
     284    cmp     al, DEVICE_8BIT_XTCF_MEMMAP
     285.DeviceIsXTCF:
     286    ret
     287%endif ; MODULE_8BIT_IDE
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r400 r473  
    7979;       Nothing
    8080;   Corrupts registers:
    81 ;       AX, SI, DI, CX
     81;       AX, SI, DI, CX, DX
    8282;--------------------------------------------------------------------
    8383DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP:
    84     mov     ax, [cs:bp+IDEVARS.wPort]       ; for IDE: AX=port address, DH=.bDevice
     84    mov     ax, [cs:bp+IDEVARS.wBasePort]   ; for IDE: AX=port address, DH=.bDevice
    8585    mov     dx, [cs:bp+IDEVARS.bDevice-1]   ; for Serial: AL=port address>>2, AH=baud rate
    8686                                            ;             DL=COM number character, DH=.bDevice
    87 %ifdef MODULE_JRIDE
    88     cmp     dh, DEVICE_8BIT_JRIDE_ISA
    89     eCMOVE  ax, cs                          ; Use segment address for JR-IDE/ISA
    90 %endif
    9187
    9288    push    bp                              ; setup stack for call to
Note: See TracChangeset for help on using the changeset viewer.