Changeset 605 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2


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.
Location:
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
Files:
3 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
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/BootMenuSettingsMenu.asm

    r597 r605  
    142142    at  MENUITEM.szQuickInfo,       dw  g_szNfoClearBdaDriveCount
    143143    at  MENUITEM.szHelp,            dw  g_szHelpClearBdaDriveCount
    144     at  MENUITEM.bFlags,            db  FLG_MENUITEM_FLAGVALUE
     144    at  MENUITEM.bFlags,            db  FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
    145145    at  MENUITEM.bType,             db  TYPE_MENUITEM_MULTICHOICE
    146146    at  MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,        dw  ROMVARS.wFlags
     
    148148    at  MENUITEM.itemValue + ITEM_VALUE.szMultichoice,              dw  g_szMultichoiceBooleanFlag
    149149    at  MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,    dw  g_rgszValueToStringLookupForFlagBooleans
    150     at  MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,              dw  FLG_ROMVARS_IGNORE_MOTHERBOARD_DRIVES
     150    at  MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,              dw  FLG_ROMVARS_CLEAR_BDA_HD_COUNT
    151151iend
    152152
     
    258258    call    .EnableOrDisableColorThemeSelection
    259259    call    .EnableOrDisableBootMenuSelectionTimeout
    260     call    .EnableOrDisableClearBdaDriveCount
    261260    mov     si, g_MenupageForBootMenuSettingsMenu
    262261    jmp     Menupage_ChangeToNewMenupageInDSSI
     
    328327    mov     bx, g_MenuitemBootMnuStngsSelectionTimeout
    329328    test    ax, FLG_ROMVARS_MODULE_BOOT_MENU
    330     jmp     SHORT .DisableMenuitemFromCSBXifZFset
    331 
    332 
    333 ;--------------------------------------------------------------------
    334 ; .EnableOrDisableClearBdaDriveCount
    335 ;   Parameters:
    336 ;       AX:     ROMVARS.wFlags
    337 ;       SS:BP:  Menu handle
    338 ;   Returns:
    339 ;       Nothing
    340 ;   Corrupts registers:
    341 ;       BX
    342 ;--------------------------------------------------------------------
    343 ALIGN JUMP_ALIGN
    344 .EnableOrDisableClearBdaDriveCount:
    345     mov     bx, g_MenuitemBootMnuStngsClearBdaDriveCount
    346     call    Buffers_IsXTbuildLoaded
    347329.DisableMenuitemFromCSBXifZFset:
    348330    jz      SHORT .DisableMenuitemFromCSBX
     
    448430    mov     cx, ATTRIBUTE_CHARS_size
    449431    mul     cl                          ; Multiply with the menu choice index
    450     mov     si, ColorThemeTable
    451     add     si, ax
    452     mov     ax, [es:di]                 ; Fetch the ptr to ColorTheme
     432    mov     si, [es:di]                 ; Fetch the ptr to ColorTheme
     433    add     ax, ColorThemeTable
     434    xchg    si, ax
    453435    mov     di, ax
    454436
  • trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm

    r602 r605  
    118118g_bControllersDetected: db  'x'             ; Value stored directly here
    119119                        db  " controllers.",NULL
     120g_szDlgBadBiosFound:    db  "This computer has been identified as being one of the following models:",LF,LF
     121                        db  "Zenith Z-171",LF
     122                        db  "Zenith Z-161",LF,LF
     123                        db  "The Boot settings menu option 'Remove other hard drives' has been set to YES for this reason.",NULL
    120124g_szDlgCfgFullMode:     db  "Enable full operating mode?",NULL
    121125g_szDlgCfgStealSize:    db  "How many kiB of base memory to steal for XTIDE Universal BIOS variables (1...255)?",NULL
     
    465469                            db  " of normal drive detection. Note that if any serial drives are detected during the normal drive detection,"
    466470                            db  " no scan will take place (to avoid finding the same drive twice).",NULL
    467 g_szHelpClearBdaDriveCount: db  "Set to NO for normal operation. Set to YES to get Windows 95 drivers to work when"
    468                             db  " MODULE_WIN95_CMOS_HACK is not included (dummy drive needs to be defined in system BIOS setup).",NULL
     471g_szHelpClearBdaDriveCount: db  "Set to NO for normal operation. Set to YES to get Windows 9x protected mode drivers to work when"
     472                            db  " MODULE_WIN9X_CMOS_HACK is not included (dummy drive needs to be defined in system BIOS setup). This option must"
     473                            db  " also be set to YES on computers where the system BIOS does not initialize RAM properly. Zenith models Z-171 and"
     474                            db  " Z-161 are known examples of such machines.",NULL
    469475
    470476g_szMultichoiceBootDispMode:    db  "Default",LF
Note: See TracChangeset for help on using the changeset viewer.