Ignore:
Timestamp:
Jun 23, 2013, 3:52:31 PM (11 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • Building the BIOS Drive Information Tool now works again.
  • Moved all XT-CF related code to MODULE_8BIT_IDE_ADVANCED. I don't see how an XT-CF card could work without *_ADVANCED anyway but if I'm wrong, feel free to undo this. Note! The autodetection code in XTIDECFG has NOT been changed to reflect this (still relies on MODULE_8BIT_IDE).
  • Optimizations and fixes in general.
File:
1 edited

Legend:

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

    r545 r558  
    11; Project name  :   XTIDE Universal BIOS
    2 ; Description   :   IDE Read/Write functions for transferring
    3 ;                   block using PIO modes.
     2; Description   :   IDE Read/Write functions for transferring block using PIO modes.
    43;                   These functions should only be called from IdeTransfer.asm.
    54
     
    6564;
    6665;   Parameters:
    67 ;       CX: Block size in 512 byte sectors
    68 ;       DX: IDE Data port address
     66;       CX:     Block size in 512 byte sectors
     67;       DX:     IDE Data port address
    6968;       ES:DI:  Normalized ptr to buffer to receive data
    7069;   Returns:
     
    10099;
    101100;   Parameters:
    102 ;       CX: Block size in 512 byte sectors
    103 ;       DX: IDE Data port address
     101;       CX:     Block size in 512 byte sectors
     102;       DX:     IDE Data port address
    104103;       ES:DI:  Normalized ptr to buffer to receive data
    105104;   Returns:
     
    111110IdePioBlock_ReadFrom16bitDataPort:
    112111%ifdef USE_186
    113     xchg        cl, ch  ; Sectors to WORDs
     112    xchg    cl, ch  ; Sectors to WORDs
    114113    rep insw
    115114    ret
     
    120119.ReadNextOword:
    121120    %rep 8  ; WORDs
    122         in      ax, dx  ; Read BYTE
    123         stosw           ; Store BYTE to [ES:DI]
     121        in      ax, dx  ; Read WORD
     122        stosw           ; Store WORD to [ES:DI]
    124123    %endrep
    125124    loop    .ReadNextOword
     
    152151; IdePioBlock_WriteToXtideRev1
    153152;   Parameters:
    154 ;       CX: Block size in 512-byte sectors
    155 ;       DX: IDE Data port address
     153;       CX:     Block size in 512-byte sectors
     154;       DX:     IDE Data port address
    156155;       ES:SI:  Normalized ptr to buffer containing data
    157156;   Returns:
     
    180179; IdePioBlock_WriteToXtideRev2  or rev 1 with swapped A0 and A3 (chuck-mod)
    181180;   Parameters:
    182 ;       CX: Block size in 512-byte sectors
    183 ;       DX: IDE Data port address
     181;       CX:     Block size in 512-byte sectors
     182;       DX:     IDE Data port address
    184183;       ES:SI:  Normalized ptr to buffer containing data
    185184;   Returns:
     
    191190IdePioBlock_WriteToXtideRev2:
    192191    UNROLL_SECTORS_IN_CX_TO_QWORDS
    193     push        ds
    194     push        es      ; Copy ES...
    195     pop         ds      ; ...to DS
     192    push    ds
     193    push    es      ; Copy ES...
     194    pop     ds      ; ...to DS
    196195ALIGN JUMP_ALIGN
    197196.WriteNextQword:
     
    207206; IdePioBlock_WriteTo8bitDataPort
    208207;   Parameters:
    209 ;       CX: Block size in 512-byte sectors
    210 ;       DX: IDE Data port address
     208;       CX:     Block size in 512-byte sectors
     209;       DX:     IDE Data port address
    211210;       ES:SI:  Normalized ptr to buffer containing data
    212211;   Returns:
     
    225224%else ; If 8088/8086
    226225    UNROLL_SECTORS_IN_CX_TO_QWORDS
    227     push        ds
    228     ;mov        ax, es
    229     ;mov        ds, ax  ; move es to ds via ax (does this run faster on 8088?)
    230     push        es
    231     pop         ds
     226    push    ds
     227    ;mov    ax, es
     228    ;mov    ds, ax  ; move es to ds via ax (does this run faster on 8088?)
     229    push    es
     230    pop     ds
    232231ALIGN JUMP_ALIGN
    233232.WriteNextQword:
     
    248247; IdePioBlock_WriteTo32bitDataPort      VLB/PCI 32-bit IDE
    249248;   Parameters:
    250 ;       CX: Block size in 512-byte sectors
    251 ;       DX: IDE Data port address
     249;       CX:     Block size in 512-byte sectors
     250;       DX:     IDE Data port address
    252251;       ES:SI:  Normalized ptr to buffer containing data
    253252;   Returns:
     
    274273.WriteNextQword:
    275274    %rep 4  ; WORDs
    276         lodsw           ; Load BYTE from [DS:SI]
    277         out dx, ax      ; Write BYTE
     275        lodsw           ; Load WORD from [DS:SI]
     276        out dx, ax      ; Write WORD
    278277    %endrep
    279278    loop    .WriteNextQword
Note: See TracChangeset for help on using the changeset viewer.