Ignore:
Timestamp:
May 8, 2021, 6:55:56 PM (3 years ago)
Author:
krille_n_
Message:

Changes:

  • The "Remove other hard drives" option in the Boot settings menu in XTIDECFG is now exposed in all BIOS builds. This is needed because the system BIOS in at least two Zenith computer models (Z-161 and Z-171) does not clear the BDA HD count which causes it to increment on warm boot. Running "Auto Configure" in XTIDECFG now also tries to identify these machines by doing a CRC check on the system BIOS and sets the option to YES if a match is found.
  • WORD_ALIGN is now 2 for XT builds. This should benefit XT class machines with 8086 and NEC V30 CPU:s and the cost is negligible (1 byte for the XT BIOS builds and 12 bytes for XTIDECFG.COM).
  • Other minor optimizations.
File:
1 edited

Legend:

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

    r592 r605  
    4141    push    es
    4242    pop     ds                              ; ROMVARS now in DS:DI
     43    call    ChecksumSystemBios
    4344    call    ResetIdevarsToDefaultValues
    4445    call    DetectIdePortsAndDevices
     
    4849    pop     ds
    4950    pop     es
     51.Return:
     52    ret
     53
     54
     55;--------------------------------------------------------------------
     56; ChecksumSystemBios
     57;   Parameters:
     58;       DS:DI:  Ptr to ROMVARS
     59;   Returns:
     60;       Nothing
     61;   Corrupts registers:
     62;       AX, BX, CX, DX, SI
     63;--------------------------------------------------------------------
     64ALIGN JUMP_ALIGN
     65ChecksumSystemBios:
     66    push    ds
     67    mov     si, 0F000h
     68    mov     ds, si
     69    mov     si, 0FFFFh
     70    ; DS:SI now points to the end of the System BIOS.
     71    std
     72    mov     cx, 32768   ; The smallest known problematic BIOS so far.
     73    mov     dx, si      ; Initialize the checksum
     74    call    CalculateCRC_CCITTfromDSSIwithSizeInCX
     75    pop     ds
     76    mov     bx, .Checksums
     77    cld
     78.NextChecksum:
     79    mov     ax, [cs:bx]
     80    test    ax, ax
     81    jz      SHORT AutoConfigure_ForThisSystem.Return
     82    inc     bx
     83    inc     bx
     84    cmp     ax, dx
     85    jne     SHORT .NextChecksum
     86    or      BYTE [di+ROMVARS.wFlags], FLG_ROMVARS_CLEAR_BDA_HD_COUNT
     87    mov     dx, g_szDlgBadBiosFound
     88    jmp     Dialogs_DisplayNotificationFromCSDX
     89
     90ALIGN WORD_ALIGN
     91.Checksums:
     92    dw      0D192h                      ; 32 KB Zenith Z-161 (071784)
     93    dw      02F69h                      ; 32 KB Zenith Z-171 (031485)
     94    dw      0
     95
     96
     97;--------------------------------------------------------------------
     98; CalculateCRC_CCITTfromDSSIwithSizeInCX
     99;   Parameters:
     100;       DS:SI:  Pointer to string to checksum
     101;       CX:     Length of string to checksum
     102;       DX:     Checksum (initially 0FFFFh)
     103;       DF:     Set/Clear depending on direction wanted
     104;   Returns:
     105;       DX:     Checksum
     106;       DS:SI:  Pointer to byte after the end of checksummed string
     107;   Corrupts registers:
     108;       AX, BX, CX
     109;--------------------------------------------------------------------
     110ALIGN JUMP_ALIGN
     111CalculateCRC_CCITTfromDSSIwithSizeInCX:
     112;   jcxz    .Return
     113    xor     bh, bh
     114    mov     ah, 0E0h
     115.NextByte:
     116    lodsb
     117    xor     dh, al
     118    mov     bl, dh
     119    rol     bx, 1
     120    rol     bx, 1
     121    rol     bx, 1
     122    rol     bx, 1
     123    xor     dx, bx
     124    rol     bx, 1
     125    xchg    dh, dl
     126    xor     dx, bx
     127    ror     bx, 1
     128    ror     bx, 1
     129    ror     bx, 1
     130    ror     bx, 1
     131    and     bl, ah
     132    xor     dx, bx
     133    ror     bx, 1
     134    xor     dh, bl
     135    loop    .NextByte
     136;.Return:
    50137    ret
    51138
Note: See TracChangeset for help on using the changeset viewer.