Changeset 558 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs


Ignore:
Timestamp:
Jun 23, 2013, 3:52:31 PM (12 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.
Location:
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
Files:
2 edited

Legend:

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

    r550 r558  
    139139
    140140    mov     al, [si+DPT.bLchsSectorsPerTrack]
    141 %ifdef USE_186
     141%ifndef USE_186
     142    call    StoswALandChecksumFromDL    ; Bytes 14 (Logical sectors per track) and 15 (Checksum)
     143    jmp     SHORT FillStandardDPTtoESDIfromDPTinDSSI.RestoreOffsetsAndReturn
     144%else
    142145    push    FillStandardDPTtoESDIfromDPTinDSSI.RestoreOffsetsAndReturn
    143     jmp     StoswALandChecksumFromDL    ; Bytes 14 (Logical sectors per track) and 15 (Checksum)
    144 %else
    145     call    StoswALandChecksumFromDL
    146     jmp     SHORT FillStandardDPTtoESDIfromDPTinDSSI.RestoreOffsetsAndReturn
    147 %endif
     146    ; Fall to StoswALandChecksumFromDL
     147%endif
     148
     149
     150;--------------------------------------------------------------------
     151; StoswALandChecksumFromDL
     152;   Parameters:
     153;       AL:     Last byte to store before checksum byte
     154;       DL:     Sum of bytes so far
     155;       ES:DI:  Ptr to where to store AL and Checksum byte
     156;   Returns:
     157;       DL:     Sum of bytes so far
     158;       DI:     Incremented by 2
     159;   Corrupts registers:
     160;       Nothing
     161;--------------------------------------------------------------------
     162StoswALandChecksumFromDL:
     163    mov     ah, al
     164    add     ah, dl
     165    neg     ah
     166    stosw
     167    ret
    148168
    149169
     
    226246%ifdef MODULE_ADVANCED_ATA
    227247    or      ah, [si+DPT_ADVANCED_ATA.bPioMode]
    228     jz      SHORT .NoDotSetFastPioFlag
     248    jz      SHORT .DoNotSetFastPioFlag
    229249    cmp     WORD [si+DPT_ADVANCED_ATA.wControllerID], BYTE 0
    230     je      SHORT .NoDotSetFastPioFlag
     250    je      SHORT .DoNotSetFastPioFlag
    231251    inc     cx      ; FLG_FAST_PIO_ENABLED
    232 .NoDotSetFastPioFlag:
     252.DoNotSetFastPioFlag:
    233253%endif
    234254    call    StoswThenAddALandAHtoDL         ; Bytes 8 and 9
     
    276296    ret
    277297
    278 
    279 ;--------------------------------------------------------------------
    280 ; StoswALandChecksumFromDL
    281 ;   Parameters:
    282 ;       AL:     Last byte to store before checksum byte
    283 ;       DL:     Sum of bytes so far
    284 ;       ES:DI:  Ptr to where to store AL and Checksum byte
    285 ;   Returns:
    286 ;       DL:     Sum of bytes so far
    287 ;       DI:     Incremented by 2
    288 ;   Corrupts registers:
    289 ;       Nothing
    290 ;--------------------------------------------------------------------
    291 StoswALandChecksumFromDL:
    292     mov     ah, al
    293     add     ah, dl
    294     neg     ah
    295     stosw
    296     ret
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm

    r550 r558  
    3434;       ES:     BDA Segment
    3535;   Returns:
    36 ;       DS:DI:  Ptr to Disk Parameter Table (if successful)
    37 ;       CF:     Cleared if DPT created successfully
    38 ;               Set if any error
     36;       DS:DI:  Ptr to Disk Parameter Table
     37;       CF:     Cleared
    3938;   Corrupts registers:
    4039;       AX, BX, CX, DX
     
    167166    xor     bx, bx
    168167    jmp     SHORT .StoreTotalSectorsFromBXDXAX
    169     ; Fall to .StoreNumberOfLbaSectors
     168
    170169
    171170;--------------------------------------------------------------------
     
    209208; Update drive counts (hard and floppy)
    210209;----------------------------------------------------------------------
    211 
     210%ifdef MODULE_SERIAL
     211; Device_FinalizeDPT returns with CF set only when a floppy was found which can't happen without MODULE_SERIAL
    212212%ifdef MODULE_SERIAL_FLOPPY
    213213;
     
    224224    adc     byte [RAMVARS.xlateVars+XLATEVARS.bFlopCreateCnt], 0
    225225    jnz     .AllDone
    226 %else
     226%else ; ~MODULE_SERIAL_FLOPPY
    227227;
    228228; Even without floppy support enabled, we shouldn't try to mount a floppy image as a hard disk, which
     
    231231;
    232232    jc      .AllDone
    233 %endif
     233%endif ; MODULE_SERIAL_FLOPPY
     234%endif ; MODULE_SERIAL
    234235
    235236    inc     BYTE [RAMVARS.bDrvCnt]      ; Increment drive count to RAMVARS
    236237
     238%ifdef MODULE_SERIAL
    237239.AllDone:
    238240    clc
     241%endif
     242
    239243    ret
    240244
Note: See TracChangeset for help on using the changeset viewer.