Ignore:
Timestamp:
Nov 21, 2021, 2:15:32 PM (6 months 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/Menupages/FlashMenu.asm

    r620 r621  
    205205    mov     si, g_MenupageForFlashMenu
    206206    ePUSH_T bx, Menupage_ChangeToNewMenupageInDSSI
    207     cmp     WORD [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
    208     jz      SHORT .DisableMenuitemsUnusedBySstFlash
    209     ; Fall to .EnableMenuitemsUnusedBySstFlash
    210 
    211 ;--------------------------------------------------------------------
    212 ; .EnableMenuitemsUnusedBySstFlash
    213 ;   Parameters:
     207    cmp     BYTE [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
     208    mov     ax, DisableMenuitemFromCSBX
     209    je      SHORT .EnableOrDisableMenuitemsUnusedBySstFlash
     210    mov     ax, EnableMenuitemFromCSBX
     211    ; Fall to .EnableOrDisableMenuitemsUnusedBySstFlash
     212
     213;--------------------------------------------------------------------
     214; .EnableOrDisableMenuitemsUnusedBySstFlash
     215;   Parameters:
     216;       AX:     Offset to EnableMenuitemFromCSBX / DisableMenuitemFromCSBX
    214217;       SS:BP:  Menu handle
    215218;   Returns:
    216219;       Nothing
    217220;   Corrupts registers:
    218 ;       AX, BX
    219 ;--------------------------------------------------------------------
    220 ALIGN JUMP_ALIGN
    221 .EnableMenuitemsUnusedBySstFlash:
     221;       BX
     222;--------------------------------------------------------------------
     223.EnableOrDisableMenuitemsUnusedBySstFlash:
    222224    mov     bx, g_MenuitemFlashSdpCommand
    223     call    EnableMenuitemFromCSBX
     225    call    ax
    224226    mov     bx, g_MenuitemFlashPageSize
    225     jmp     EnableMenuitemFromCSBX
    226 
    227 ;--------------------------------------------------------------------
    228 ; .DisableMenuitemsUnusedBySstFlash
    229 ;   Parameters:
    230 ;       SS:BP:  Menu handle
    231 ;   Returns:
    232 ;       Nothing
    233 ;   Corrupts registers:
    234 ;       AX, BX
    235 ;--------------------------------------------------------------------
    236 ALIGN JUMP_ALIGN
    237 .DisableMenuitemsUnusedBySstFlash:
    238     mov     bx, g_MenuitemFlashSdpCommand
    239     call    DisableMenuitemFromCSBX
    240     mov     bx, g_MenuitemFlashPageSize
    241     jmp     DisableMenuitemFromCSBX
     227    jmp     ax
    242228
    243229;--------------------------------------------------------------------
     
    254240    call    .MakeSureThatImageFitsInEeprom
    255241    jc      SHORT .InvalidFlashingParameters
    256     cmp     WORD [cs:g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
    257     jnz     SHORT .SkipAlignmentCheck
     242    cmp     BYTE [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
     243    jne     SHORT .SkipAlignmentCheck
    258244    call    .MakeSureAddress32KAligned
    259     jc      SHORT .InvalidFlashingParameters
     245    jnz     SHORT .InvalidFlashingParameters
    260246.SkipAlignmentCheck:
    261247    push    es
     
    267253    call    .InitializeFlashvarsFromDSSI
    268254    mov     bx, si                          ; DS:BX now points to FLASHVARS
    269     cmp     WORD [cs:g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
    270     jz      SHORT .FlashWithoutProgressBar
     255    cmp     BYTE [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
     256    je      SHORT .FlashWithoutProgressBar
    271257    add     si, BYTE FLASHVARS_size         ; DS:SI now points to PROGRESS_DIALOG_IO
    272258    call    Dialogs_DisplayProgressDialogForFlashingWithDialogIoInDSSIandFlashvarsInDSBX
     
    282268.FlashWithoutProgressBar:                   ; Worst case. SST devices will
    283269    call    FlashSst_WithFlashvarsInDSBX    ; either complete flashing
    284     jmp     SHORT .FlashComplete            ; or timeout within 2 seconds. 
     270    jmp     SHORT .FlashComplete            ; or timeout within 2 seconds.
    285271
    286272;--------------------------------------------------------------------
     
    296282.MakeSureThatImageFitsInEeprom:
    297283    call    Buffers_GetSelectedEepromSizeInWordsToAX
    298     cmp     ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
     284    cmp     ax, [g_cfgVars+CFGVARS.wImageSizeInWords]
    299285    jae     SHORT .ImageFitsInSelectedEeprom
    300286    mov     dx, g_szErrEepromTooSmall
     
    312298;       SS:BP:  Ptr to MENU
    313299;   Returns:
    314 ;       CF:     Set if EEPROM segment is not 32K aligned
    315 ;   Corrupts registers:
    316 ;       AX, BX, DX
     300;       ZF:     Cleared if EEPROM segment is not 32K aligned
     301;   Corrupts registers:
     302;       AX, DX
    317303;--------------------------------------------------------------------
    318304ALIGN JUMP_ALIGN
    319305.MakeSureAddress32KAligned:
    320     mov     ax, [cs:g_cfgVars+CFGVARS.wEepromSegment]
    321     and     ax, 007FFh
     306    test    WORD [g_cfgVars+CFGVARS.wEepromSegment], 07FFh
    322307    jz      SHORT .AlignmentIs32K
    323308    mov     dx, g_szErrAddrNot32KAligned
    324     call    Dialogs_DisplayErrorFromCSDX
    325     stc
    326     ret
     309    jmp     Dialogs_DisplayErrorFromCSDX
    327310
    328311;--------------------------------------------------------------------
     
    339322    call    EEPROM_LoadFromRomToRamComparisonBuffer
    340323    call    Buffers_AppendZeroesIfNeeded
    341     test    BYTE [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_CHECKSUM
     324    test    BYTE [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_CHECKSUM
    342325    jz      SHORT .DoNotGenerateChecksumByte
    343326    jmp     Buffers_GenerateChecksum
     
    363346    mov     [si+FLASHVARS.fpNextComparisonPage+2], es
    364347
    365     mov     ax, [cs:g_cfgVars+CFGVARS.wEepromSegment]
     348    mov     ax, [g_cfgVars+CFGVARS.wEepromSegment]
    366349    mov     WORD [si+FLASHVARS.fpNextDestinationPage], 0
    367350    mov     [si+FLASHVARS.fpNextDestinationPage+2], ax
    368351
    369     mov     al, [cs:g_cfgVars+CFGVARS.bEepromType]
     352    mov     al, [g_cfgVars+CFGVARS.bEepromType]
    370353    mov     [si+FLASHVARS.bEepromType], al
    371354
    372     mov     al, [cs:g_cfgVars+CFGVARS.bSdpCommand]
     355    mov     al, [g_cfgVars+CFGVARS.bSdpCommand]
    373356    mov     [si+FLASHVARS.bEepromSdpCommand], al
    374357
    375358    mov     ax, SST_PAGE_SIZE
    376     cmp     WORD [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
    377     jz      SHORT .UseSstPageSize
    378 
    379     eMOVZX  bx, [cs:g_cfgVars+CFGVARS.bEepromPage]
    380     mov     ax, [cs:bx+g_rgwEepromPageToSizeInBytes]
     359    cmp     BYTE [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF
     360    je      SHORT .UseSstPageSize
     361
     362    eMOVZX  bx, [g_cfgVars+CFGVARS.bEepromPage]
     363    mov     ax, [bx+g_rgwEepromPageToSizeInBytes]
    381364.UseSstPageSize:
    382365    mov     [si+FLASHVARS.wEepromPageSize], ax
Note: See TracChangeset for help on using the changeset viewer.