Ignore:
Timestamp:
May 26, 2014, 1:25:15 PM (10 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Renamed MODULE_FEATURE_SETS to MODULE_POWER_MANAGEMENT.
  • Renamed MODULE_VERY_LATE_INITIALIZATION to MODULE_VERY_LATE_INIT and removed it from the official builds.
  • Removed the code that skips detection of slave drives on XT-CF controllers since slave drives can be used with Lo-tech ISA CompactFlash boards.
  • Added autodetection of the SVC ADP50L controller to XTIDECFG.
  • The autodetection of XT-CF controllers now requires MODULE_8BIT_IDE_ADVANCED in the loaded BIOS.
  • Fixed a bug in XTIDECFG from r502 where the "Base (cmd block) address" menu option would be displayed when a serial device was selected as the IDE controller.
  • XTIDECFG would display the "Enable interrupt" menu option for the XTIDE r1 but not for the XTIDE r2. It's now displayed for both controller types.
  • Disabled the "Internal Write Cache" menu option in the Master/Slave Drive menus for serial device type drives.
  • Optimizations and other fixes.
File:
1 edited

Legend:

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

    r526 r567  
    3838;--------------------------------------------------------------------
    3939IdeAutodetect_DetectIdeDeviceFromPortDXAndReturnControlBlockInSI:
    40     cmp     dx, FIRST_MEMORY_SEGMENT_ADDRESS
     40    cmp     dh, FIRST_MEMORY_SEGMENT_ADDRESS >> 8
    4141    jb      SHORT DetectPortMappedDeviceFromPortDX
    4242    ; Fall to DetectMemoryMappedDeviceFromSegmentDX
     
    5555;--------------------------------------------------------------------
    5656DetectMemoryMappedDeviceFromSegmentDX:
    57     ; *** Try to detect JR-IDE/ISA (only if MODULE_8BIT_IDE_ADVANCED is present) ***
     57    ; *** Try to detect JR-IDE/ISA and ADP50L (only if MODULE_8BIT_IDE_ADVANCED is present) ***
    5858    test    WORD [di+ROMVARS.wFlags], FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED
    59     jz      SHORT NoIdeDeviceFound
     59    stc
     60    jz      SHORT .NoIdeDeviceFound
    6061
    6162    push    ds
    6263    mov     ds, dx
    63     cli                                 ; Disable Interrupts
     64
     65    cli
    6466    mov     ah, [JRIDE_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET + STATUS_REGISTER_in]
    6567    mov     al, [JRIDE_CONTROL_BLOCK_REGISTER_WINDOW_OFFSET + ALTERNATE_STATUS_REGISTER_in]
    66     sti                                 ; Enable Interrupts
     68    sti
     69    call    CompareIdeStatusRegistersFromALandAH
     70    mov     al, DEVICE_8BIT_JRIDE_ISA
     71    jnc     .IdeDeviceFound
     72
     73    cli
     74    mov     ah, [ADP50L_COMMAND_BLOCK_REGISTER_WINDOW_OFFSET + (STATUS_REGISTER_in << 1)]
     75    mov     al, [ADP50L_CONTROL_BLOCK_REGISTER_WINDOW_OFFSET + (ALTERNATE_STATUS_REGISTER_in << 1)]
     76    sti
     77    call    CompareIdeStatusRegistersFromALandAH
     78    mov     al, DEVICE_8BIT_ADP50L
     79
     80.IdeDeviceFound:
     81    mov     si, dx                      ; For IDEDTCT.COM
    6782    pop     ds
    68     call    CompareIdeStatusRegistersFromALandAH
    69     mov     al, DEVICE_8BIT_JRIDE_ISA   ; Assume CF was cleared
    70     mov     si, dx                      ; For IDEDTCT.COM
    71     ret                                 ; No need to return Control Block Port
     83.NoIdeDeviceFound:
     84    ret
    7285
    7386
     
    110123
    111124    ; Detect 8-bit devices only if MODULE_8BIT_IDE is available
    112     test    BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_MODULE_8BIT_IDE
     125    test    BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_MODULE_8BIT_IDE | FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED
    113126    jz      SHORT NoIdeDeviceFound
     127    jpo     SHORT .SkipXTCF             ; Only 1 bit set means no MODULE_8BIT_IDE_ADVANCED
    114128
    115129    ; *** Try to detect XT-CF ***
     
    120134    mov     al, DEVICE_8BIT_XTCF_PIO8
    121135    jnc     SHORT .IdeDeviceFound
    122 
     136    shr     bx, 1
     137.SkipXTCF:
    123138
    124139    ; *** Try to detect 8-bit XT-IDE rev 1 or rev 2 ***
     
    126141    ; Status Register addresses. That is why we need another step
    127142    ; to check is this XT-IDE rev 1 or rev 2.
    128     sub     si, BYTE XTCF_CONTROL_BLOCK_OFFSET >> 1
    129     shr     bx, 1
     143    mov     si, dx
     144    add     si, BYTE XTIDE_CONTROL_BLOCK_OFFSET
    130145    call    DetectIdeDeviceFromPortsDXandSIwithOffsetsInBLandBH
    131146    jc      SHORT NoIdeDeviceFound      ; No XT-IDE rev 1 or rev 2 found
     
    210225    test    al, FLG_STATUS_DRDY
    211226    jz      SHORT NoIdeDeviceFound  ; Device needs to be ready
    212     ret                                     ; Return with CF cleared
     227    ret                             ; Return with CF cleared
    213228
    214229NoIdeDeviceFound:
     
    305320    dw      3C0h
    306321    dw      3E0h
    307     ; JR-IDE/ISA (Memory Segment Addresses)
    308     dw      0C000h
    309     dw      0C400h
    310     dw      0C800h
    311     dw      0CC00h
    312     dw      0D000h
    313     dw      0D400h
    314     dw      0D800h
     322    ; Memory Segment Addresses
     323    dw      0C000h  ; JR-IDE/ISA
     324    dw      0C400h  ; JR-IDE/ISA
     325    dw      0C800h  ; JR-IDE/ISA and ADP50L
     326    dw      0CA00h  ; ADP50L
     327    dw      0CC00h  ; JR-IDE/ISA and ADP50L
     328    dw      0CE00h  ; ADP50L
     329    dw      0D000h  ; JR-IDE/ISA
     330    dw      0D400h  ; JR-IDE/ISA
     331    dw      0D800h  ; JR-IDE/ISA
    315332.wLastIdePort:
    316     dw      0DC00h
     333    dw      0DC00h  ; JR-IDE/ISA
Note: See TracChangeset for help on using the changeset viewer.