Ignore:
Timestamp:
Dec 15, 2012, 2:46:29 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Added a new define (USE_UNDOC_INTEL) that enables optimizations possible by using undocumented instructions available on all Intel processors and truly compatible clones. AFAIK the only exceptions are the NEC V-series and the Sony CXQ70108 processors so this option should be safe for use on the AT builds.
  • Building BIOSDRVS or the BIOS without MODULE_STRINGS_COMPRESSED would fail due to the recent code exclusions so I changed them a bit. Also fixed the mistaken change to Main.asm
  • Changed the Tandy specific info in Configuration_FullMode.txt so it matches the info in the Wiki.
  • Optimizations and fixes in general.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm

    r480 r491  
    231231
    232232    ; Convert ES:SI to physical address
    233     xor     dx, dx
    234     mov     ax, es
     233%ifdef USE_186          ; Bytes EU Cycles(286)
     234    mov     ax, es      ; 2     2
     235    rol     ax, 4       ; 3     9
     236    mov     dx, ax      ; 2     2
     237    and     ax, BYTE 0Fh; 3     3
     238    xor     dx, ax      ; 2     2
     239    add     si, dx      ; 2     2
     240    adc     al, ah      ; 2     2
     241    mov     es, ax      ; 2     2
     242    ;------------------------------------
     243                        ; 18    24
     244%else ; 808x
     245
     246%if 0
     247                        ; Bytes EU Cycles(808x)
     248    mov     al, 4       ; 2     4
     249    mov     dx, es      ; 2     2
     250    xchg    cx, ax      ; 1     3
     251    rol     dx, cl      ; 2     24
     252    mov     cx, dx      ; 2     2
     253    xchg    cx, ax      ; 1     3
     254    and     ax, BYTE 0Fh; 3     4
     255    xor     dx, ax      ; 2     3
     256    add     si, dx      ; 2     3
     257    adc     al, ah      ; 2     3
     258    mov     es, ax      ; 2     2
     259    ;------------------------------------
     260                        ; 21    53
     261;
     262; Judging by the Execution Unit cycle count the above block of code is
     263; apparently slower. However, the shifts and rotates in the block below
     264; execute faster than the Bus Interface Unit on an 8088 can fetch them,
     265; thus causing the EU to starve. The difference in true execution speed
     266; (if any) might not be worth the extra 5 bytes.
     267; In other words, we could use a real world test here.
     268;
     269%endif ; 0
     270                        ; Bytes EU Cycles(808x/286)
     271    xor     dx, dx      ; 2     3/2
     272    mov     ax, es      ; 2     2/2
    235273%rep 4
    236     shl     ax, 1
    237     rcl     dx, 1
     274    shl     ax, 1       ; 8     8/8
     275    rcl     dx, 1       ; 8     8/8
    238276%endrep
    239     add     si, ax
    240     adc     dl, dh
    241     mov     es, dx
     277    add     si, ax      ; 2     3/2
     278    adc     dl, dh      ; 2     3/2
     279    mov     es, dx      ; 2     2/2
     280    ;------------------------------------
     281%endif                  ; 26    29/26
    242282    ret
    243283%endif ; MODULE_8BIT_IDE
     
    266306%ifdef MODULE_8BIT_IDE
    267307        dw      IdePioBlock_ReadFrom8bitDataPort    ; 2, DEVICE_8BIT_ATA
    268         dw      IdePioBlock_ReadFromXtideRev1       ; 3, DEVICE_8BIT_XTIDE_REV1     
     308        dw      IdePioBlock_ReadFromXtideRev1       ; 3, DEVICE_8BIT_XTIDE_REV1
    269309        dw      IdePioBlock_ReadFromXtideRev2       ; 4, DEVICE_8BIT_XTIDE_REV2
    270310        dw      IdePioBlock_ReadFrom8bitDataPort    ; 5, DEVICE_8BIT_XTCF_PIO8
Note: See TracChangeset for help on using the changeset viewer.