Ignore:
Timestamp:
Jun 25, 2018, 10:29:27 PM (6 years ago)
Author:
krille_n_
Message:

Changes:

  • The problem with NASM in the previous revision (r591) has been fixed.
  • The colors used by the boot menu and hotkey bar can now be customized by selecting one of a number of pre-defined color themes. Suggestions for additional themes are more than welcome!
  • Large builds are now 10 KB. Small builds are still 8 KB with the exception of the Tiny build which is now 4 KB. In other words, builds are now as small as possible to make it easier to combine them with other BIOSes.
  • Added code to the library to improve drive error handling. XTIDECFG can now handle "Drive Not Ready" errors.
  • Fixed a couple of potential bugs in AtaID.asm (AtaID_GetMaxPioModeToAXandMinCycleTimeToCX); 1) ATA1.bPioMode was treated as a WORD variable. 2) ATA2.bPIOSupp was assumed to be non-zero which would result in PIO mode 3 being returned if the assumption was wrong.
  • Made the same changes in the equivalent function used by BIOSDRVS (DisplayPioModeInformationUsingAtaInfoFromDSBX in AtaInfo.asm).
  • Fixed a bug from r587 in PDC20x30.asm in PDC20x30_GetMaxPioModeToALandMinPioCycleTimeToBX.
  • Fixed a bug from r523 in XTIDECFG where Auto Configure would only set the IRQ on one IDE interface on AT-builds.
  • XTIDECFG will now restore the default settings for the "Serial port virtual device" when reselecting it in the list of device types. This makes it behave consistently for all device types.
  • The eAAM macro is now used regardless if USE_UNDOC_INTEL is defined or not because it is apparently supported on all processors including the NEC V20/V30 CPUs.
  • Renamed the EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS define to EXCLUDE_FROM_XUB.
  • Added a define to exclude unused library code from BIOSDRVS (EXCLUDE_FROM_BIOSDRVS). This makes it a lot smaller than in previous revisions.
  • All unnecessary CLD-instructions are now under a new define 'CLD_NEEDED' which is only enabled for the BIOS. It is disabled for XTIDECFG and BIOSDRVS but can be enabled if needed by adding this define to the respective makefile. This change was made because these unnecessary instructions are wasteful and should never be needed. In fact, they only serve to hide bugs (in other peoples code) which I strongly believe should be avoided. I recommend people making their own BIOSes from source to not use this define as it's extremely unlikely to be needed.
  • Updated the copyright info in SerDrive and changed an URL to point to the new site.
  • Updated the copyright info and version number in BIOSDRVS.
  • Updated the copyright info in XTIDECFG.
  • Optimizations in general.
File:
1 edited

Legend:

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

    r589 r592  
    4949ALIGN JUMP_ALIGN
    5050Buffers_IsXtideUniversalBiosLoaded:
    51     test    WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
     51    test    BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
    5252    jnz     SHORT .FileOrBiosLoaded
    53     or      cl, 1       ; Clear ZF
     53    test    sp, sp      ; Clear ZF
    5454    ret
    5555
     
    7676    add     di, BYTE ROMVARS.rgbSign
    7777    mov     cx, XTIDE_SIGNATURE_LENGTH / 2
     78%ifdef CLD_NEEDED
    7879    cld
     80%endif
    7981    eSEG_STR repe, cs, cmpsw
    8082
     
    9193;               Cleared if some other (AT, 386) build is loaded
    9294;   Corrupts registers:
    93 ;       DI, ES
     95;       Nothing
    9496;--------------------------------------------------------------------
    9597ALIGN JUMP_ALIGN
    9698Buffers_IsXTbuildLoaded:
    9799%strlen BUILD_TYPE_OFFSET   TITLE_STRING_START
     100    push    es
     101    push    di
    98102    call    Buffers_GetFileBufferToESDI
    99103    cmp     WORD [es:di+ROMVARS.szTitle+BUILD_TYPE_OFFSET+1], 'XT'  ; +1 is for '('
     104    pop     di
     105    pop     es
    100106    ret
    101107%undef BUILD_TYPE_OFFSET
     
    105111; Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
    106112;   Parameters:
    107 ;       AX:     EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
     113;       AL:     EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
    108114;       DX:CX:  EEPROM size in bytes
    109115;   Returns:
    110116;       Nothing
    111117;   Corrupts registers:
    112 ;       AX, CX, DX
     118;       CX, DX
    113119;--------------------------------------------------------------------
    114120ALIGN JUMP_ALIGN
    115121Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration:
    116     and     WORD [cs:g_cfgVars+CFGVARS.wFlags], ~(FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED | FLG_CFGVARS_UNSAVED)
    117     or      WORD [cs:g_cfgVars+CFGVARS.wFlags], ax
     122    and     BYTE [cs:g_cfgVars+CFGVARS.wFlags], ~(FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED | FLG_CFGVARS_UNSAVED)
     123    or      [cs:g_cfgVars+CFGVARS.wFlags], al
    118124    shr     dx, 1
    119125    rcr     cx, 1
     
    135141ALIGN JUMP_ALIGN
    136142Buffers_SetUnsavedChanges:
    137     or      WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
     143    or      BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
    138144    ret
    139145
    140146ALIGN JUMP_ALIGN
    141147Buffers_ClearUnsavedChanges:
    142     and     WORD [cs:g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
     148    and     BYTE [cs:g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
    143149    ret
    144150
     
    155161ALIGN JUMP_ALIGN
    156162Buffers_SaveChangesIfFileLoaded:
    157     mov     ax, [cs:g_cfgVars+CFGVARS.wFlags]
    158     and     ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED)
    159     cmp     ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED)
    160     jne     SHORT .NothingToSave
    161     call    Dialogs_DisplaySaveChangesDialog
     163    mov     al, [cs:g_cfgVars+CFGVARS.wFlags]
     164    and     al, FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED
     165    jz      SHORT .NothingToSave
     166    jpo     SHORT .NothingToSave
     167    mov     bx, g_szDlgSaveChanges
     168    call    Dialogs_DisplayYesNoResponseDialogWithTitleStringInBX
    162169    jnz     SHORT .NothingToSave
    163170    jmp     BiosFile_SaveUnsavedChanges
     
    181188
    182189    eMOVZX  di, [cs:g_cfgVars+CFGVARS.bEepromType]
    183     mov     cx, [cs:di+g_rgwEepromTypeToSizeInWords]
     190;%if g_rgwEepromTypeToSizeInWords = 0   ; *FIXME* It really is but NASM won't accept this.
     191    mov     cx, [cs:di]
     192;%else
     193;   mov     cx, [cs:di+g_rgwEepromTypeToSizeInWords]
     194;%endif
    184195    sub     cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]    ; CX = WORDs to append
    185196    jbe     SHORT .NoNeedToAppendZeroes
     
    187198    call    Buffers_GetFileBufferToESDI
    188199    mov     ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
    189     shl     ax, 1
     200    eSHL_IM ax, 1
    190201    add     di, ax          ; ES:DI now point first unused image byte
    191202    xor     ax, ax
     203%ifdef CLD_NEEDED
    192204    cld
     205%endif
    193206    rep stosw
    194207ALIGN JUMP_ALIGN
     
    214227    call    Buffers_GetFileBufferToESDI
    215228    call    EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX
     229%ifdef CLD_NEEDED
     230    cld
     231%endif
    216232
    217233; Compatibility fix for 3Com 3C503 cards where the ASIC returns 8080h as the last two bytes of the ROM.
     
    223239    jne     SHORT .BiosSizeIsNot8K
    224240    ; The BIOS size is 8K and therefore a potential candidate for a 3Com 3C503 card.
    225     dec     cx
    226     dec     cx
     241    mov     cl, (8192 - 3) & 0FFh
    227242    mov     ah, 3
    228243ALIGN JUMP_ALIGN
     
    230245.SumNextByte:
    231246    add     al, [es:di]
    232 .NextChecksumByte:
    233247    inc     di
    234248    loop    .SumNextByte
     249.NextChecksumByte:
    235250    neg     al
    236     mov     [es:di], al
    237     inc     cx
     251    stosb
    238252    dec     ah
    239253    jnz     SHORT .NextChecksumByte
     
    306320
    307321;--------------------------------------------------------------------
    308 ; Buffers_GetFileBufferToESDI
    309322; Buffers_GetFlashComparisonBufferToESDI
    310323; Buffers_GetFileDialogItemBufferToESDI
     324; Buffers_GetFileBufferToESDI
    311325;   Parameters:
    312326;       Nothing
     
    320334Buffers_GetFileDialogItemBufferToESDI:
    321335    call    Buffers_GetFileBufferToESDI
    322     push    di
    323336    mov     di, es
    324     add     di, 1000h       ; Third 64k page
    325     mov     es, di
    326     pop     di
    327     ret
    328 ALIGN JUMP_ALIGN
     337    SKIP2B  f
    329338Buffers_GetFileBufferToESDI:
    330339    mov     di, cs
Note: See TracChangeset for help on using the changeset viewer.