Changeset 620 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages
- Timestamp:
- Oct 5, 2021, 1:01:04 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm
r602 r620 56 56 at MENUITEM.szQuickInfo, dw g_szNfoFlashEepromType 57 57 at MENUITEM.szHelp, dw g_szNfoFlashEepromType 58 at MENUITEM.bFlags, db FLG_MENUITEM_ PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE58 at MENUITEM.bFlags, db FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE 59 59 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE 60 60 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw CFGVARS.bEepromType … … 72 72 at MENUITEM.szQuickInfo, dw g_szNfoFlashSDP 73 73 at MENUITEM.szHelp, dw g_szHelpFlashSDP 74 at MENUITEM.bFlags, db FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE74 at MENUITEM.bFlags, db FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE 75 75 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE 76 76 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw CFGVARS.bSdpCommand … … 88 88 at MENUITEM.szQuickInfo, dw g_szNfoFlashPageSize 89 89 at MENUITEM.szHelp, dw g_szHelpFlashPageSize 90 at MENUITEM.bFlags, db FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE90 at MENUITEM.bFlags, db FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE 91 91 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE 92 92 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw CFGVARS.bEepromPage … … 134 134 dw EEPROM_TYPE.28256_32kiB 135 135 dw EEPROM_TYPE.28512_64kiB 136 dw EEPROM_TYPE.SST_39SF 137 136 138 g_rgszValueToStringLookupForEepromType: 137 139 dw g_szValueFlash2816 … … 140 142 dw g_szValueFlash28256 141 143 dw g_szValueFlash28512 144 dw g_szValueFlashSST39SF 142 145 143 146 g_rgwChoiceToValueLookupForSdpCommand: … … 201 204 .AlreadySet: 202 205 mov si, g_MenupageForFlashMenu 203 jmp Menupage_ChangeToNewMenupageInDSSI 204 206 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: 214 ; SS:BP: Menu handle 215 ; Returns: 216 ; Nothing 217 ; Corrupts registers: 218 ; AX, BX 219 ;-------------------------------------------------------------------- 220 ALIGN JUMP_ALIGN 221 .EnableMenuitemsUnusedBySstFlash: 222 mov bx, g_MenuitemFlashSdpCommand 223 call EnableMenuitemFromCSBX 224 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 205 242 206 243 ;-------------------------------------------------------------------- … … 217 254 call .MakeSureThatImageFitsInEeprom 218 255 jc SHORT .InvalidFlashingParameters 256 cmp WORD [cs:g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF 257 jnz SHORT .SkipAlignmentCheck 258 call .MakeSureAddress32KAligned 259 jc SHORT .InvalidFlashingParameters 260 .SkipAlignmentCheck: 219 261 push es 220 262 push ds … … 225 267 call .InitializeFlashvarsFromDSSI 226 268 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 227 271 add si, BYTE FLASHVARS_size ; DS:SI now points to PROGRESS_DIALOG_IO 228 272 call Dialogs_DisplayProgressDialogForFlashingWithDialogIoInDSSIandFlashvarsInDSBX 273 .FlashComplete: 229 274 call .DisplayFlashingResultsFromFlashvarsInDSBX 230 275 … … 235 280 ret 236 281 282 .FlashWithoutProgressBar: ; Worst case. SST devices will 283 call FlashSst_WithFlashvarsInDSBX ; either complete flashing 284 jmp SHORT .FlashComplete ; or timeout within 2 seconds. 285 237 286 ;-------------------------------------------------------------------- 238 287 ; .MakeSureThatImageFitsInEeprom … … 246 295 ALIGN JUMP_ALIGN 247 296 .MakeSureThatImageFitsInEeprom: 248 call .GetSelectedEepromSizeInWordsToAX297 call Buffers_GetSelectedEepromSizeInWordsToAX 249 298 cmp ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords] 250 299 jae SHORT .ImageFitsInSelectedEeprom … … 254 303 ALIGN JUMP_ALIGN, ret 255 304 .ImageFitsInSelectedEeprom: 305 .AlignmentIs32K: 256 306 .DoNotGenerateChecksumByte: 307 ret 308 309 ;-------------------------------------------------------------------- 310 ; .MakeSureAddress32KAligned 311 ; Parameters: 312 ; SS:BP: Ptr to MENU 313 ; Returns: 314 ; CF: Set if EEPROM segment is not 32K aligned 315 ; Corrupts registers: 316 ; AX, BX, DX 317 ;-------------------------------------------------------------------- 318 ALIGN JUMP_ALIGN 319 .MakeSureAddress32KAligned: 320 mov ax, [cs:g_cfgVars+CFGVARS.wEepromSegment] 321 and ax, 007FFh 322 jz SHORT .AlignmentIs32K 323 mov dx, g_szErrAddrNot32KAligned 324 call Dialogs_DisplayErrorFromCSDX 325 stc 257 326 ret 258 327 … … 304 373 mov [si+FLASHVARS.bEepromSdpCommand], al 305 374 375 mov ax, SST_PAGE_SIZE 376 cmp WORD [g_cfgVars+CFGVARS.bEepromType], EEPROM_TYPE.SST_39SF 377 jz SHORT .UseSstPageSize 378 306 379 eMOVZX bx, [cs:g_cfgVars+CFGVARS.bEepromPage] 307 380 mov ax, [cs:bx+g_rgwEepromPageToSizeInBytes] 381 .UseSstPageSize: 308 382 mov [si+FLASHVARS.wEepromPageSize], ax 309 383 … … 323 397 ALIGN JUMP_ALIGN 324 398 .GetNumberOfPagesToFlashToAX: 325 call .GetSelectedEepromSizeInWordsToAX399 call Buffers_GetSelectedEepromSizeInWordsToAX 326 400 xor dx, dx 327 401 eSHL_IM ax, 1 ; Size in bytes to... … … 335 409 336 410 ;-------------------------------------------------------------------- 337 ; .GetSelectedEepromSizeInWordsToAX338 ; Parameters:339 ; Nothing340 ; Returns:341 ; AX: Selected EEPROM size in WORDs342 ; Corrupts registers:343 ; BX344 ;--------------------------------------------------------------------345 ALIGN JUMP_ALIGN346 .GetSelectedEepromSizeInWordsToAX:347 eMOVZX bx, [cs:g_cfgVars+CFGVARS.bEepromType]348 mov ax, [cs:bx+g_rgwEepromTypeToSizeInWords]349 ret350 351 352 ;--------------------------------------------------------------------353 411 ; .DisplayFlashingResultsFromFlashvarsInDSBX 354 412 ; Parameters: … … 368 426 .rgfnFlashResultMessage: 369 427 dw .DisplayFlashSuccessful 428 dw .DisplayDeviceDetectionError 370 429 dw .DisplayPollingError 371 430 dw .DisplayDataVerifyError … … 373 432 374 433 ;-------------------------------------------------------------------- 434 ; .DisplayDeviceDetectionError 375 435 ; .DisplayPollingError 376 436 ; .DisplayDataVerifyError … … 383 443 ; AX, DX, DI, ES 384 444 ;-------------------------------------------------------------------- 445 ALIGN JUMP_ALIGN 446 .DisplayDeviceDetectionError: 447 mov dx, g_szErrEepromDetection 448 jmp Dialogs_DisplayErrorFromCSDX 449 385 450 ALIGN JUMP_ALIGN 386 451 .DisplayPollingError:
Note:
See TracChangeset
for help on using the changeset viewer.