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).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm

    r443 r473  
    2020; Section containing code
    2121SECTION .text
    22 
    23 %ifdef MODULE_ADVANCED_ATA
    24 ;--------------------------------------------------------------------
    25 ; AccessDPT_GetIdeBasePortToBX
    26 ;   Parameters:
    27 ;       DS:DI:  Ptr to Disk Parameter Table
    28 ;   Returns:
    29 ;       BX:     IDE Base Port Address
    30 ;   Corrupts registers:
    31 ;       Nothing
    32 ;--------------------------------------------------------------------
    33 ALIGN JUMP_ALIGN
    34 AccessDPT_GetIdeBasePortToBX:
    35     eMOVZX  bx, [di+DPT.bIdevarsOffset]         ; CS:BX points to IDEVARS
    36     mov     bx, [cs:bx+IDEVARS.wPort]
    37     ret
    38 %endif  ; MODULE_ADVANCED_ATA
    39 
    4022
    4123;--------------------------------------------------------------------
     
    11395
    11496
     97%ifdef MODULE_8BIT_IDE
     98;--------------------------------------------------------------------
     99; AccessDPT_IsThisDeviceXTCF
     100;   Parameters:
     101;       DS:DI:  Ptr to Disk Parameter Table
     102;   Returns:
     103;       AH:     Device Type
     104;       ZF:     Set if XTCF
     105;               Cleared if some other device
     106;   Corrupts registers:
     107;       Nothing
     108;--------------------------------------------------------------------
     109AccessDPT_IsThisDeviceXTCF:
     110    mov     ah, [di+DPT_ATA.bDevice]
     111    cmp     ah, DEVICE_8BIT_XTCF_PIO8
     112    je      SHORT .DeviceIsXTCF
     113    cmp     ah, DEVICE_8BIT_XTCF_DMA
     114    je      SHORT .DeviceIsXTCF
     115    cmp     ah, DEVICE_8BIT_XTCF_MEMMAP
     116.DeviceIsXTCF:
     117    ret
     118%endif ; MODULE_8BIT_IDE
     119
     120
    115121%ifdef MODULE_EBIOS
    116122;--------------------------------------------------------------------
     
    142148;       Nothing
    143149;--------------------------------------------------------------------
    144 ALIGN JUMP_ALIGN
    145150AccessDPT_GetPointerToDRVPARAMStoCSBX:
    146     eMOVZX  bx, BYTE [di+DPT.bIdevarsOffset]    ; CS:BX points to IDEVARS
     151    call    AccessDPT_GetIdevarsToCSBX
    147152    add     bx, BYTE IDEVARS.drvParamsMaster    ; CS:BX points to Master Drive DRVPARAMS
    148153    test    BYTE [di+DPT.bFlagsLow], FLGL_DPT_SLAVE
     
    150155    add     bx, BYTE DRVPARAMS_size             ; CS:BX points to Slave Drive DRVPARAMS
    151156.ReturnPointerToDRVPARAMS:
     157    ret
     158
     159
     160;--------------------------------------------------------------------
     161; Needed many times during initialization so it is better to
     162; make it as a function to save bytes.
     163;
     164; AccessDPT_GetIdevarsToCSBX
     165;   Parameters:
     166;       DS:DI:  Ptr to Disk Parameter Table
     167;   Returns:
     168;       CS:BX:  Ptr to IDEVARS for the drive
     169;   Corrupts registers:
     170;       Nothing
     171;--------------------------------------------------------------------
     172AccessDPT_GetIdevarsToCSBX:
     173    eMOVZX  bx, BYTE [di+DPT.bIdevarsOffset]
    152174    ret
    153175
Note: See TracChangeset for help on using the changeset viewer.