Ignore:
Timestamp:
Nov 21, 2021, 2:15:32 PM (2 years ago)
Author:
krille_n_
Message:

Changes:

  • Fixed three different bugs all causing the boot menu to show drives using IRQs even though the BIOS had been built without MODULE_IRQ.
  • Fixed two bugs in XTIDECFG where loading a BIOS from file and then loading the old settings from EEPROM would
    • overwrite ROMVARS.wFlags in the loaded BIOS file (in RAM). The possibly resulting mismatch of module flags could make it impossible to change settings for modules included in the BIOS or allow changing settings for modules not included in the BIOS.
    • not copy the color theme over to the loaded BIOS.
  • Also fixed two very minor bugs in XTIDECFG in BiosFile_LoadFileFromDSSItoRamBuffer and BiosFile_SaveRamBufferToFileInDSSI where the error handling in these routines would close whatever file handle that happened to match the error code returned by DOS in AX.
  • Made significant changes to the new flash ROM programming routines to reduce the size. Also fixed a minor bug that would cause the second verification to be skipped and return success when programming a 64 KB block of data.
  • Changed the custom BIOS build file names to the 8.3 format.
  • Changed some help strings in XTIDECFG to clarify things.
  • Other minor optimizations and fixes.
File:
1 edited

Legend:

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

    r620 r621  
    4949ALIGN JUMP_ALIGN
    5050Buffers_IsXtideUniversalBiosLoaded:
    51     test    BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
     51    test    BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
    5252    jnz     SHORT .FileOrBiosLoaded
    5353    test    sp, sp      ; Clear ZF
     
    120120ALIGN JUMP_ALIGN
    121121Buffers_NewBiosWithSizeInDXCXandSourceInALhasBeenLoadedForConfiguration:
    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
     122    and     BYTE [g_cfgVars+CFGVARS.wFlags], ~(FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED | FLG_CFGVARS_UNSAVED)
     123    or      [g_cfgVars+CFGVARS.wFlags], al
    124124    shr     dx, 1
    125125    rcr     cx, 1
    126126    adc     cx, BYTE 0      ; Round up to next WORD
    127     mov     [cs:g_cfgVars+CFGVARS.wImageSizeInWords], cx
     127    mov     [g_cfgVars+CFGVARS.wImageSizeInWords], cx
    128128    ret
    129129
     
    141141ALIGN JUMP_ALIGN
    142142Buffers_SetUnsavedChanges:
    143     or      BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
     143    or      BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
    144144    ret
    145145
    146146ALIGN JUMP_ALIGN
    147147Buffers_ClearUnsavedChanges:
    148     and     BYTE [cs:g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
     148    and     BYTE [g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
    149149    ret
    150150
     
    161161ALIGN JUMP_ALIGN
    162162Buffers_SaveChangesIfFileLoaded:
    163     mov     al, [cs:g_cfgVars+CFGVARS.wFlags]
    164     and     al, FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED
     163    test    BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED
    165164    jz      SHORT .NothingToSave
    166165    jpo     SHORT .NothingToSave
     
    184183ALIGN JUMP_ALIGN
    185184Buffers_GetSelectedEepromSizeInWordsToAX:
    186     eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromType]
    187     mov     ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
     185    eMOVZX  bx, [g_cfgVars+CFGVARS.bEepromType]
     186    mov     ax, [bx+g_rgwEepromTypeToSizeInWords]
    188187
    189188    cmp     bl, EEPROM_TYPE.SST_39SF
    190     jnz     SHORT .HaveEepromSize
    191     cmp     ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
    192     jae     SHORT .HaveEepromSize       
    193     shl     ax, 1   ; Auto-double SST size when too small.
     189    jne     SHORT .HaveEepromSize
     190    cmp     ax, [g_cfgVars+CFGVARS.wImageSizeInWords]
     191    jae     SHORT .HaveEepromSize
     192    eSHL_IM ax, 1           ; Auto-double SST size when too small.
    194193.HaveEepromSize:
    195194    ret
     
    206205ALIGN JUMP_ALIGN
    207206Buffers_AppendZeroesIfNeeded:
     207    call    Buffers_GetSelectedEepromSizeInWordsToAX
     208    mov     cx, [g_cfgVars+CFGVARS.wImageSizeInWords]
     209    sub     ax, cx          ; AX = WORDs to append
     210    jbe     SHORT .NoNeedToAppendZeroes
     211
     212    eSHL_IM cx, 1
    208213    push    es
    209 
    210     call    Buffers_GetSelectedEepromSizeInWordsToAX
    211     mov     cx, ax
    212     sub     cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]    ; CX = WORDs to append
    213     jbe     SHORT .NoNeedToAppendZeroes
    214 
    215     call    Buffers_GetFileBufferToESDI
    216     mov     ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
    217     eSHL_IM ax, 1
    218     add     di, ax          ; ES:DI now point first unused image byte
    219     xor     ax, ax
     214    call    Buffers_GetFileBufferToESDI
     215    add     di, cx          ; ES:DI now point first unused image byte
     216    xor     cx, cx
     217    xchg    cx, ax
    220218%ifdef CLD_NEEDED
    221219    cld
    222220%endif
    223221    rep stosw
    224 ALIGN JUMP_ALIGN
     222    pop     es
    225223.NoNeedToAppendZeroes:
    226     pop     es
    227224    ret
    228225
Note: See TracChangeset for help on using the changeset viewer.