- Timestamp:
- Jul 14, 2018, 1:21:16 PM (6 years ago)
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
r596 r599 40 40 41 41 struc HOTKEYVARS 42 .fpPrevTimerHandler resb 4 ; Previous 1Ch timer hander 42 43 .wTimeWhenDisplayed resb 2 ; System time (ticks) when Hotkey bar was first displayed 43 44 .wFddAndHddLetters: … … 57 58 ; Bit defines for HOTKEYVARS.bFlags 58 59 FLG_HOTKEY_HD_FIRST EQU (1<<0) ; First try to boot from HDD, then FDD 60 FLG_HOTKEY_UPDATING EQU (1<<1) ; Hotkeybar update in progress 59 61 60 62 %endif ; MODULE_HOTKEYS -
trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc
r593 r599 23 23 MIN_TIME_TO_DISPLAY_HOTKEY_BAR EQU (4000/55) ; 4000 ms 24 24 25 ESC_SCANCODE EQU 1 ; ESC key 25 26 FIRST_FUNCTION_KEY_SCANCODE EQU 3Bh ; F1 key 26 27 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r597 r599 95 95 ; Last hard drive might have scrolled Hotkey Bar out of screen. 96 96 ; We want to display it during wait. 97 call HotkeyBar_UpdateDuringDriveDetection97 ;call HotkeyBar_UpdateDuringDriveDetection 98 98 99 99 .WaitUntilTimeToCloseHotkeyBar: … … 102 102 cmp ax, MIN_TIME_TO_DISPLAY_HOTKEY_BAR 103 103 jb SHORT .WaitUntilTimeToCloseHotkeyBar 104 105 ; Restore system timer tick handler since hotkeys are no longer needed 106 cli 107 mov ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler] 108 mov [es:SYSTEM_TIMER_TICK*4], ax 109 mov ax, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2] 110 mov [es:SYSTEM_TIMER_TICK*4+2], ax 111 sti 104 112 %endif 105 113 ; Fall to .ResetAllDrives … … 146 154 SelectDriveToBootFrom: ; Function starts here 147 155 %ifdef MODULE_HOTKEYS 148 call HotkeyBar_UpdateDuringDriveDetection149 156 mov al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode] 150 157 cmp al, ROM_BOOT_HOTKEY_SCANCODE -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r598 r599 224 224 StartDetectionWithDriveSelectByteInBHandStringInCX: 225 225 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP 226 227 %ifdef MODULE_HOTKEYS228 call HotkeyBar_UpdateDuringDriveDetection229 %endif230 226 ; Fall to .ReadAtaInfoFromHardDisk 231 227 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
r596 r599 184 184 mul bl 185 185 xchg ax, bx 186 cli 186 187 mov [es:bx], si ; Store offset 187 188 mov [es:bx+2], cs ; Store segment 189 sti 188 190 .Interrupts_Return: 189 191 ret -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
r592 r599 169 169 ; selections are correctly displayed on Hotkey Bar and on Boot Menu 170 170 %ifdef MODULE_HOTKEYS 171 call BootVars_StoreDefaultDriveLettersToHotkeyVars171 call HotkeyBar_StoreDefaultDriveLettersToHotkeyVars 172 172 %endif 173 173 call DriveXlate_Reset -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r596 r599 21 21 SECTION .text 22 22 23 24 ;-------------------------------------------------------------------- 25 ; Handler for INT 1Ch System Timer Tick. 26 ; Reads key presses and draws hotkey bar. 27 ; 28 ; HotkeyBar_TimerTickHandler 29 ; Parameters: 30 ; DS: RAMVARS segment 31 ; ES: BDA segment (zero) 32 ; Returns: 33 ; Nothing 34 ; Corrupts registers: 35 ; AX, CX, DX, SI, DI 36 ;-------------------------------------------------------------------- 37 HotkeyBar_TimerTickHandler: 38 push es 39 push ds 40 %ifdef USE_186 41 ePUSHA 42 %else 43 push di 44 push si 45 push dx 46 push cx 47 push ax 48 %endif 49 sti ; Enable interrupts (is this really necessary? Do we lose key inputs if we keep interrupts disabled?) 50 ; There would be no need for FLG_HOTKEY_UPDATING if we can keep interrupts disabled during whole update. 51 52 LOAD_BDA_SEGMENT_TO es, ax 53 call RamVars_GetSegmentToDS 54 55 ; Call previous handler 56 pushf 57 call far [es:BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler] 58 59 ; Do not start updating if update is already in progress (do we need this on AT systems?) 60 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_UPDATING 61 jnz SHORT .ReturnFromHandler 62 63 ; Update Hotkeybar (process key input and draw) 64 %ifndef USE_AT ; Ease XT systems a bit by updating every other timer tick 65 call TimerTicks_ReadFromBdaToAX 66 shr ax, 1 67 jnc SHORT .ReturnFromHandler 68 %endif 69 or BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_UPDATING 70 call UpdateDuringDriveDetection 71 and BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], ~FLG_HOTKEY_UPDATING 72 73 .ReturnFromHandler: 74 %ifdef USE_186 75 ePOPA 76 %else 77 pop ax 78 pop cx 79 pop dx 80 pop si 81 pop di 82 %endif 83 pop ds 84 pop es 85 iret 86 87 23 88 ;-------------------------------------------------------------------- 24 89 ; Scans key presses and draws any hotkey changes. … … 33 98 ; AX, CX, DX, SI, DI 34 99 ;-------------------------------------------------------------------- 35 HotkeyBar_UpdateDuringDriveDetection:100 UpdateDuringDriveDetection: 36 101 call ScanHotkeysFromKeyBufferAndStoreToBootvars 102 103 ; If ESC pressed, abort detection by forcing timeout 104 cmp al, ESC_SCANCODE 105 jne SHORT .ContinueDrawing 106 mov BYTE [RAMVARS.bTimeoutTicksLeft], 0 107 .ContinueDrawing: 108 37 109 ; Fall to HotkeyBar_DrawToTopOfScreen 38 110 … … 78 150 ; Clear CH if floppy drive is selected for boot 79 151 mov ch, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags] 80 ; and ch, FLG_HOTKEY_HD_FIRST ; Needed if more flags are added 152 and ch, FLG_HOTKEY_HD_FIRST 81 153 call FormatDriveHotkeyString 82 154 … … 97 169 mov ah, ANGLE_QUOTE_RIGHT 98 170 mov cx, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddLetterAndFlags] ; Letter to CL, flags to CH 99 ; and ch, FLG_HOTKEY_HD_FIRST ; Needed if more flags are added 171 and ch, FLG_HOTKEY_HD_FIRST 100 172 xor ch, FLG_HOTKEY_HD_FIRST ; Clear CH if HD is selected for boot, set otherwise 101 173 mov di, g_szHDD … … 332 404 333 405 ;-------------------------------------------------------------------- 406 ; HotkeyBar_StoreDefaultDriveLettersToHotkeyVars 407 ; Parameters: 408 ; ES: BDA Segment 409 ; Returns: 410 ; Nothing 411 ; Corrupts registers: 412 ; AX 413 ;-------------------------------------------------------------------- 414 HotkeyBar_StoreDefaultDriveLettersToHotkeyVars: 415 call BootVars_GetLetterForFirstHardDriveToAX 416 mov ah, DEFAULT_FLOPPY_DRIVE_LETTER 417 xchg al, ah 418 mov [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters], ax 419 ret 420 421 422 ;-------------------------------------------------------------------- 423 ; HotkeyBar_InitializeVariables 424 ; Parameters: 425 ; DS: RAMVARS Segment 426 ; ES: BDA Segment 427 ; Returns: 428 ; Nothing 429 ; Corrupts registers: 430 ; AX, CX, DX, DI 431 ;-------------------------------------------------------------------- 432 HotkeyBar_InitializeVariables: 433 push ds 434 push es 435 pop ds 436 437 ; Store system 1Ch Timer Tick handler and install our hotkeybar handler 438 mov ax, [SYSTEM_TIMER_TICK*4] 439 mov [BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler], ax 440 mov ax, [SYSTEM_TIMER_TICK*4+2] 441 mov [BOOTVARS.hotkeyVars+HOTKEYVARS.fpPrevTimerHandler+2], ax 442 mov al, SYSTEM_TIMER_TICK 443 mov si, HotkeyBar_TimerTickHandler 444 call Interrupts_InstallHandlerToVectorInALFromCSSI 445 446 ; Store time when hotkeybar is displayed 447 ; (it will be displayed after initialization is complete) 448 call TimerTicks_ReadFromBdaToAX 449 mov [BOOTVARS.hotkeyVars+HOTKEYVARS.wTimeWhenDisplayed], ax 450 451 pop ds 452 453 ; Initialize HOTKEYVARS by storing default drives to boot from 454 call HotkeyBar_StoreDefaultDriveLettersToHotkeyVars 455 mov dl, [cs:ROMVARS.bBootDrv] 456 ; Fall to HotkeyBar_StoreHotkeyToBootvarsForDriveNumberInDL 457 458 459 ;-------------------------------------------------------------------- 334 460 ; HotkeyBar_StoreHotkeyToBootvarsForDriveNumberInDL 335 461 ; Parameters: -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r593 r599 45 45 add cx, BYTE HOTKEYVARS_size 46 46 call Memory_ZeroESDIwithSizeInCX 47 48 ; Store time when hotkeybar is displayed 49 ; (it will be displayed after initialization is complete) 50 call TimerTicks_ReadFromBdaToAX 51 mov [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wTimeWhenDisplayed], ax 52 53 ; Initialize HOTKEYVARS by storing default drives to boot from 54 call BootVars_StoreDefaultDriveLettersToHotkeyVars 55 mov dl, [cs:ROMVARS.bBootDrv] 56 jmp HotkeyBar_StoreHotkeyToBootvarsForDriveNumberInDL 57 58 59 ;-------------------------------------------------------------------- 60 ; BootVars_StoreDefaultDriveLettersToHotkeyVars 61 ; Parameters: 62 ; ES: BDA Segment 63 ; Returns: 64 ; Nothing 65 ; Corrupts registers: 66 ; Nothing 67 ;-------------------------------------------------------------------- 68 BootVars_StoreDefaultDriveLettersToHotkeyVars: 69 call BootVars_GetLetterForFirstHardDriveToAX 70 mov ah, DEFAULT_FLOPPY_DRIVE_LETTER 71 xchg al, ah 72 mov [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters], ax 73 ret 74 47 jmp HotkeyBar_InitializeVariables 75 48 %endif ; MODULE_HOTKEYS 76 49
Note:
See TracChangeset
for help on using the changeset viewer.