Changeset 518 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src


Ignore:
Timestamp:
Mar 4, 2013, 5:11:47 PM (12 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to Configurator v2:

  • CF is now always cleared when XTIDE rev 1 is detected.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/IdeAutodetect.asm

    r505 r518  
    2121SECTION .text
    2222
     23IDE_PORT_TO_START_DETECTION         EQU 00h     ; Must be zero (not actual port)
     24FIRST_MEMORY_SEGMENT_ADDRESS        EQU 0C000h
     25
    2326;--------------------------------------------------------------------
    2427; IdeAutodetect_DetectIdeDeviceFromPortDXAndReturnControlBlockInSI
     
    6568    call    CompareIdeStatusRegistersFromALandAH
    6669    mov     al, DEVICE_8BIT_JRIDE_ISA   ; Assume CF was cleared
     70    mov     si, dx                      ; For IDEDTCT.COM
    6771    ret                                 ; No need to return Control Block Port
    6872
     
    143147    mov     al, DEVICE_8BIT_XTIDE_REV1  ; We must have rev 1
    144148.IdeDeviceFound:
     149    clc
    145150    ret
    146151
     
    191196    ; They must be the same if base port was in use by IDE device.
    192197    cmp     al, ah
    193     jne     SHORT .InvalidStatusRegister
     198    jne     SHORT NoIdeDeviceFound
    194199
    195200    ; Bytes were the same but it is possible they were both FFh, for
    196201    ; example. We must make sure bits are what is expected from valid
    197202    ; IDE Status Register. So far all drives I've tested return 50h
    198     ; (FLG_STATUS_DRDY and FLG_STATUS_DSC set) unless there is only
    199     ; one drive present but wrong drive is selected. For example if Master
     203    ; (FLG_STATUS_DRDY and FLG_STATUS_DSC set) or 00h.
     204    ; I suspect that the zero might mean non available drive is selected. For example if Master
    200205    ; drive is present but Slave is selected from IDE Drive and Head Select Register,
    201     ; then the Status Register can be 00h.
     206    ; then the Status Register can be 00h. We cannot accept 00h as valid byte
     207    ; since that can easily cause invalid JR-IDE/ISA detections.
    202208    test    al, FLG_STATUS_BSY | FLG_STATUS_DF | FLG_STATUS_DRQ | FLG_STATUS_ERR
    203209    jnz     SHORT .InvalidStatusRegister    ; Busy or Errors cannot be set
     
    206212    ret                                     ; Return with CF cleared
    207213
    208 .InvalidStatusRegister:
    209214NoIdeDeviceFound:
    210215    stc
     
    247252; IdeAutodetect_IncrementDXtoNextIdeBasePort
    248253;   Parameters:
    249 ;       DX:     Previous IDE Base Port
     254;       DX:     Previous IDE Base Port or IDE_PORT_TO_START_DETECTION
    250255;   Returns:
    251256;       DX:     Next IDE Base Port
Note: See TracChangeset for help on using the changeset viewer.