Changeset 528 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Menus
- Timestamp:
- Mar 22, 2013, 5:43:54 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/Menus
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
r526 r528 69 69 MENUEVENT_ExitMenu equ (BootMenuEvent_Completed - FirstEvent) 70 70 MENUEVENT_ItemHighlightedFromCX equ (EventItemHighlightedFromCX - FirstEvent) 71 MENUEVENT_KeyStrokeInAX equ (EventKeyStrokeInAX - FirstEvent) 71 72 MENUEVENT_ItemSelectedFromCX equ (EventItemSelectedFromCX - FirstEvent) 72 73 MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - FirstEvent) … … 94 95 dw EventNotHandled ; MENUEVENT.IdleProcessing 95 96 dw EventItemHighlightedFromCX ; MENUEVENT.ItemHighlightedFromCX 97 96 98 dw EventItemSelectedFromCX ; MENUEVENT.ItemSelectedFromCX 97 99 dw EventKeyStrokeInAX ; MENUEVENT.KeyStrokeInAX … … 161 163 EventItemHighlightedFromCX: 162 164 push cx 165 166 ; Drive number translations and hotkeys must be reset to defaults so highlighted 167 ; selections are correctly displayed on Hotkey Bar and on Boot Menu 168 %ifdef MODULE_HOTKEYS 169 call BootVars_StoreDefaultDriveLettersToHotkeyVars 170 %endif 171 call DriveXlate_Reset 172 173 ; Set highlighted item to be drive to boot from for visual purposes only 163 174 call BootMenu_GetDriveToDXforMenuitemInCX 164 jnc .noDriveSwap175 jnc SHORT .noDriveSwapSinceRomBootSelected 165 176 call DriveXlate_SetDriveToSwap 166 .noDriveSwap: 177 178 %ifdef MODULE_HOTKEYS 179 ; Store highlighted drive as hotkey 180 call HotkeyBar_StoreHotkeyToBootvarsForDriveNumberInDL 181 jmp SHORT .UpdateHotkeyBar 182 .noDriveSwapSinceRomBootSelected: 183 mov ah, ROM_BOOT_HOTKEY_SCANCODE 184 call HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 185 186 .UpdateHotkeyBar: 187 ; Redraw Hotkey Bar for updated boot drive letters 188 mov al, MONO_NORMAL 189 CALL_DISPLAY_LIBRARY SetCharacterAttributeFromAL 190 191 mov bl, ATTRIBUTES_ARE_USED 192 mov ax, TELETYPE_OUTPUT_WITH_ATTRIBUTE 193 CALL_DISPLAY_LIBRARY SetCharOutputFunctionFromAXwithAttribFlagInBL 194 call HotkeyBar_DrawToTopOfScreen 195 %else 196 .noDriveSwapSinceRomBootSelected: 197 %endif ; MODULE_HOTKEYS 167 198 168 199 ; Redraw changes in drive numbers … … 181 212 182 213 ;-------------------------------------------------------------------- 214 ; EventKeyStrokeInAX 215 ; Parameters 216 ; AL: ASCII character for the key 217 ; AH: Keyboard library scan code for the key 218 ; DS: Ptr to RAMVARS 219 ; ES: Ptr to BDA (zero) 220 ; SS:BP: Menu library handle 221 ; Returns: 222 ; CF: Set if event processed 223 ; Cleared if event not processed 224 ; Corrupts registers: 225 ; Does not matter 226 ;-------------------------------------------------------------------- 227 %ifdef MODULE_HOTKEYS 228 EventKeyStrokeInAX: 229 ; Keypress will be the primary boot drive 230 cmp ah, BOOT_MENU_HOTKEY_SCANCODE 231 je SHORT BootMenuEvent_Completed ; Ignore Boot Menu hotkey 232 call HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 233 jnc SHORT BootMenuEvent_Completed 234 ; Fall to CloseBootMenu through EventItemSelectedFromCX 235 %endif 236 237 238 ;-------------------------------------------------------------------- 183 239 ; EventItemSelectedFromCX 184 240 ; Parameters … … 223 279 BootMenuEvent_Completed: 224 280 stc 225 ret 281 %ifndef MODULE_HOTKEYS 282 EventKeyStrokeInAX: 283 %endif 284 ret -
trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
r526 r528 143 143 ; Nothing 144 144 ; Corrupts registers: 145 ; AX, DI, DL145 ; Nothing 146 146 ;-------------------------------------------------------------------- 147 147 DriveXlate_Reset: 148 xor dl, dl ; no translation for a floppy 149 ;; fall through to DriveXlate_SetDriveToSwap 148 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], 8000h 149 ret 150 150 151 151 152 ;-------------------------------------------------------------------- … … 154 155 ; DriveXlate_SetDriveToSwap 155 156 ; Parameters: 156 ; DL: Drive to swap to 00h or 80h 157 ; DL: Hard Drive to swap to first Hard Drive 158 ; Floppy Drive to swap to first Floppy Drive 157 159 ; DS: RAMVARS segment 158 160 ; Returns: 159 161 ; Nothing 160 162 ; Corrupts registers: 161 ; AX, DI163 ; Nothing 162 164 ;-------------------------------------------------------------------- 163 165 DriveXlate_SetDriveToSwap: 164 mov ax, 8000h ; Default mapping (no translation)165 166 test dl, dl ; Floppy drive? 166 167 js SHORT .SetHardDriveToSwap 167 mov al, dl ; Store floppy translation 168 SKIP2B di 168 169 ; Set Floppy Drive to swap 170 mov [RAMVARS.xlateVars+XLATEVARS.bFDSwap], dl 171 ret 172 169 173 .SetHardDriveToSwap: 170 mov ah, dl ; Store HD translation 171 mov WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], ax 174 mov [RAMVARS.xlateVars+XLATEVARS.bHDSwap], dl 172 175 ret -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r526 r528 22 22 23 23 ;-------------------------------------------------------------------- 24 ; Scans key presses and draws any hotkey changes. 25 ; 24 26 ; HotkeyBar_UpdateDuringDriveDetection 25 27 ; Parameters: … … 32 34 ;-------------------------------------------------------------------- 33 35 HotkeyBar_UpdateDuringDriveDetection: 34 call HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars36 call ScanHotkeysFromKeyBufferAndStoreToBootvars 35 37 ; Fall to HotkeyBar_DrawToTopOfScreen 36 38 … … 311 313 312 314 ;-------------------------------------------------------------------- 313 ; HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL 315 ; HotkeyBar_StoreHotkeyToBootvarsForDriveNumberInDL 316 ; Parameters: 317 ; DS: RAMVARS segment 318 ; ES: BDA segment (zero) 319 ; DL: Drive Number 320 ; Returns: 321 ; Nothing 322 ; Corrupts registers: 323 ; AX, CX, DL, DI 324 ;-------------------------------------------------------------------- 325 HotkeyBar_StoreHotkeyToBootvarsForDriveNumberInDL: 326 call DriveXlate_ConvertDriveNumberFromDLtoDriveLetter 327 ; Fall to StoreHotkeyToBootvarsForDriveLetterInDL 328 329 330 ;-------------------------------------------------------------------- 331 ; StoreHotkeyToBootvarsForDriveLetterInDL 314 332 ; Parameters: 315 333 ; DS: RAMVARS segment … … 321 339 ; AX, CX, DI 322 340 ;-------------------------------------------------------------------- 323 HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL:341 StoreHotkeyToBootvarsForDriveLetterInDL: 324 342 eMOVZX ax, dl 325 343 or al, 32 ; Upper case drive letter to lower case keystroke … … 328 346 329 347 ;-------------------------------------------------------------------- 330 ; HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars348 ; ScanHotkeysFromKeyBufferAndStoreToBootvars 331 349 ; Parameters: 332 350 ; DS: RAMVARS segment … … 337 355 ; AH, CX 338 356 ;-------------------------------------------------------------------- 339 HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars:357 ScanHotkeysFromKeyBufferAndStoreToBootvars: 340 358 call Keyboard_GetKeystrokeToAX 341 359 jz SHORT NoHotkeyToProcess 342 360 343 ePUSH_T cx, HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars 361 ; Prepare to read another key from buffer 362 ePUSH_T cx, ScanHotkeysFromKeyBufferAndStoreToBootvars 344 363 ; Fall to HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 345 364 … … 354 373 ; Returns: 355 374 ; AL: Last scancode seen 375 ; CF: Set if valid hotkey in AL 376 ; Clear if scancode in AL is not for any hotkey 356 377 ; Corrupts registers: 357 378 ; AH, CX, DI … … 387 408 xchg ax, cx 388 409 mov [es:di], al 410 stc ; Valid hotkey scancode returned in AL 389 411 390 412 .KeystrokeIsNotValidDriveLetter: … … 392 414 mov al, [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode] 393 415 ret 416 394 417 395 418 ;--------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.