- Timestamp:
- Apr 18, 2012, 6:04:48 PM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS
- Files:
-
- 2 added
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
r376 r395 43 43 call RamVars_GetSegmentToDS 44 44 45 %ifdef MODULE_HOTKEYS 45 46 call DriveXlate_ToOrBack 47 %endif 46 48 mov [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl 47 49 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
r392 r395 90 90 ;-------------------------------------------------------------------- 91 91 SelectDriveToBootFrom: 92 %ifdef MODULE_HOTKEYS 92 93 call HotkeyBar_UpdateDuringDriveDetection 93 94 … … 103 104 .DoNotDisplayBootMenu: 104 105 %endif 106 %endif 105 107 106 108 ; Check if ROM boot (INT 18h) wanted … … 109 111 110 112 ; Try to boot from Primary boot drive (00h by default) 113 %ifdef MODULE_HOTKEYS 111 114 call HotkeyBar_GetPrimaryBootDriveNumberToDL 115 %else 116 mov dl, [cs:ROMVARS.bBootDrv] 117 and dl, 80h ; Only 00h and 80h allowed when not using MODULE_HOTKEYS 118 %endif 112 119 call TryToBootFromPrimaryOrSecondaryBootDevice 113 120 jc SHORT JumpToBootSector_or_RomBoot 114 121 115 122 ; Try to boot from Secondary boot device (80h by default) 123 %ifdef MODULE_HOTKEYS 116 124 call HotkeyBar_GetSecondaryBootDriveNumberToDL 125 %else 126 mov dl, [cs:ROMVARS.bBootDrv] 127 and dl, 80h 128 xor dl, 80h 129 %endif 117 130 call TryToBootFromPrimaryOrSecondaryBootDevice 118 131 … … 179 192 ; AX, CX, DH, SI, DI, (DL if failed to read boot sector) 180 193 ;-------------------------------------------------------------------- 194 %ifndef MODULE_HOTKEYS 195 TryToBootFromPrimaryOrSecondaryBootDevice EQU BootSector_TryToLoadFromDriveDL 196 197 %else 181 198 TryToBootFromPrimaryOrSecondaryBootDevice: 182 199 call DriveXlate_SetDriveToSwap 183 200 call DriveXlate_ToOrBack 184 201 jmp BootSector_TryToLoadFromDriveDL 202 %endif -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
r392 r395 154 154 StartDetectionWithDriveSelectByteInBHandStringInCX: 155 155 call DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP 156 %ifdef MODULE_HOTKEYS 156 157 call HotkeyBar_UpdateDuringDriveDetection 158 %endif 157 159 ; Fall to .ReadAtaInfoFromHardDisk 158 160 -
trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
r392 r395 206 206 mov bp, sp 207 207 208 %ifdef MODULE_HOTKEYS 209 208 210 call DriveXlate_ToOrBack ; DL = Untranslated Drive number 209 211 mov dh, dl … … 217 219 push dx 218 220 219 call ConvertDriveLetterInDLtoDriveNumber ; Restore DL 221 call HotkeyBar_ConvertDriveLetterInDLtoDriveNumber ; Restore DL 222 223 %else 224 ePUSH_T ax, ' ' ; No drive translation so print space 225 226 ; Get boot drive letters 227 call FloppyDrive_GetCountToAX 228 mov ah, 'A' ; AH = First Floppy Drive letter (always 'A') 229 add al, ah 230 MAX_U al, 'C' ; AL = First Hard Drive letter ('C', 'D', or 'E') 231 test dl, dl 232 eCMOVNS al, ah 233 push ax 234 235 %endif ; MODULE_HOTKEYS 220 236 221 237 mov si, g_szTryToBoot -
trunk/XTIDE_Universal_BIOS/Src/Main.asm
r392 r395 47 47 %include "AssemblyLibrary.inc" ; Assembly Library. Must be included first! 48 48 %include "Version.inc" 49 %include "ModuleDependency.inc" ; Dependency checks for optional modules 49 50 %include "IntController.inc" ; For Interrupt Controller equates 50 51 %include "ATA_ID.inc" ; For ATA Drive Information structs … … 224 225 %include "DetectDrives.asm" ; For detecting IDE drives 225 226 %include "DetectPrint.asm" ; For printing drive detection strings 227 228 ; Hotkey Bar 229 %ifdef MODULE_HOTKEYS 226 230 %include "HotkeyBar.asm" ; For hotkeys during drive detection and boot menu 231 %include "DriveXlate.asm" ; For swapping drive numbers 232 %endif 227 233 228 234 ; Boot menu … … 297 303 %include "AH24h_HSetBlocks.asm" ; Required by Int13h_Jump.asm 298 304 %include "AH25h_HDrvID.asm" ; Required by Int13h_Jump.asm 299 %include "DriveXlate.asm" ; For swapping drive numbers300 305 %include "Address.asm" ; For sector address translations 301 306 %include "Prepare.asm" ; For buffer pointer normalization -
trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
r392 r395 87 87 88 88 ;-------------------------------------------------------------------- 89 ; ConvertKeystrokeToAXfromDriveLetterInDL90 ; Parameters:91 ; DL: Drive Letter ('A'...)92 ; Returns:93 ; AX: Hotkey keystroke94 ; Corrupts registers:95 ; Nothing96 ;--------------------------------------------------------------------97 ConvertKeystrokeToAXfromDriveLetterInDL:98 eMOVZX ax, dl99 jmp Char_ChangeCaseInAL ; Upper case drive letter to lower case keystroke100 101 102 ;--------------------------------------------------------------------103 89 ; BootMenuEvent_Handler 104 90 ; Common parameters for all events: … … 228 214 ; The secondary boot drive is selected by highlighting it using menu keys 229 215 ; and the primary boot drive is selected by pressing drive letter hotkey. 230 call HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter 231 call ConvertKeystrokeToAXfromDriveLetterInDL 232 call HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 216 call BootVars_StoreHotkeyForDriveNumberInDL 233 217 call RedrawHotkeyBarFromInsideMenuEventHandler 234 218 … … 248 232 249 233 ;-------------------------------------------------------------------- 250 ; EventItemSelectedFromCX251 ; Parameters252 ; CX: Index of selected item253 ; DS: Ptr to RAMVARS254 ; ES: Ptr to BDA (zero)255 ; SS:BP: Menu library handle256 ; Returns:257 ; CF: Set if event processed258 ; Cleared if event not processed259 ; Corrupts registers:260 ; Does not matter261 ;--------------------------------------------------------------------262 EventItemSelectedFromCX:263 call BootMenu_GetDriveToDXforMenuitemInCX264 jnc SHORT BootMenuEvent_Completed ; No menuitem selected265 266 ; Convert selected drive to hotkey keystroke267 call HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter268 call ConvertKeystrokeToAXfromDriveLetterInDL269 ; Fall to EventKeyStrokeInAX270 271 272 ;--------------------------------------------------------------------273 234 ; EventKeyStrokeInAX 274 235 ; Parameters … … 291 252 292 253 ; Hotkey is now stored to BOOTVARS and menu can be closed 254 jmp SHORT CloseBootMenu 255 256 257 ;-------------------------------------------------------------------- 258 ; EventItemSelectedFromCX 259 ; Parameters 260 ; CX: Index of selected item 261 ; DS: Ptr to RAMVARS 262 ; ES: Ptr to BDA (zero) 263 ; SS:BP: Menu library handle 264 ; Returns: 265 ; CF: Set if event processed 266 ; Cleared if event not processed 267 ; Corrupts registers: 268 ; Does not matter 269 ;-------------------------------------------------------------------- 270 EventItemSelectedFromCX: 271 call BootMenu_GetDriveToDXforMenuitemInCX 272 jnc SHORT BootMenuEvent_Completed ; No menuitem selected 273 274 ; Convert selected drive to hotkey keystroke 275 call HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL 293 276 ; Fall to CloseBootMenu 294 277 -
trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
r392 r395 305 305 306 306 ;-------------------------------------------------------------------- 307 ; HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL 308 ; Parameters: 309 ; DS: RAMVARS segment 310 ; ES: BDA segment (zero) 311 ; DL: Drive Letter ('A'...) 312 ; Returns: 313 ; Nothing 314 ; Corrupts registers: 315 ; AX, CX, DI 316 ;-------------------------------------------------------------------- 317 HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL: 318 eMOVZX ax, dl 319 call Char_ChangeCaseInAL ; Upper case drive letter to lower case keystroke 320 jmp SHORT HotkeyBar_StoreHotkeyToBootvarsIfValidKeystrokeInAX 321 322 323 ;-------------------------------------------------------------------- 307 324 ; ScanHotkeysFromKeyBufferAndStoreToBootvars 308 325 ; Parameters: … … 399 416 test BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST 400 417 eCMOVZ dl, dh 401 ; Fall to ConvertDriveLetterInDLtoDriveNumber402 403 404 ;-------------------------------------------------------------------- 405 ; ConvertDriveLetterInDLtoDriveNumber418 ; Fall to HotkeyBar_ConvertDriveLetterInDLtoDriveNumber 419 420 421 ;-------------------------------------------------------------------- 422 ; HotkeyBar_ConvertDriveLetterInDLtoDriveNumber 406 423 ; Parameters: 407 424 ; DS: RAMVARS segment … … 412 429 ; AX, DH 413 430 ;-------------------------------------------------------------------- 414 ConvertDriveLetterInDLtoDriveNumber:431 HotkeyBar_ConvertDriveLetterInDLtoDriveNumber: 415 432 call HotkeyBar_GetLetterForFirstHardDriveToAX 416 433 cmp dl, al -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r392 r395 39 39 sub ax, di 40 40 xchg cx, ax 41 42 %ifdef MODULE_HOTKEYS 41 43 call Memory_ZeroESDIwithSizeInCX 42 44 43 45 ; Store default drives to boot from 44 mov di, BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters 45 call HotkeyBar_GetLetterForFirstHardDriveToAX 46 mov ah, DEFAULT_FLOPPY_DRIVE_LETTER 47 mov [es:di], ax 46 mov dl, [cs:ROMVARS.bBootDrv] 48 47 49 ; Check if boot drive is overridden in ROMVARs 50 mov al, [cs:ROMVARS.bBootDrv] 51 test al, al 52 js SHORT .StoreUserHardDiskToBootFrom 53 inc di 54 jmp SHORT .AddToDefaultDrive 48 ;-------------------------------------------------------------------- 49 ; BootVars_StoreHotkeyForDriveNumberInDL 50 ; Parameters: 51 ; DL: Floppy or Hard Drive number 52 ; DS: RAMVARS Segment 53 ; ES: BDA Segment 54 ; Returns: 55 ; Nothing 56 ; Corrupts registers: 57 ; AX, CX, DI 58 ;-------------------------------------------------------------------- 59 BootVars_StoreHotkeyForDriveNumberInDL: 60 mov WORD [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wHddAndFddLetters], DEFAULT_HARD_DRIVE_LETTER | (DEFAULT_FLOPPY_DRIVE_LETTER<<8) 61 call HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter 62 jmp HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL 55 63 56 .StoreUserHardDiskToBootFrom: 57 sub al, 80h ; Clear HD bit 58 .AddToDefaultDrive: 59 add [es:di], al 60 ret 64 %else 65 jmp Memory_ZeroESDIwithSizeInCX 66 67 %endif ; MODULE_HOTKEYS -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
r392 r395 91 91 .InitializeDriveTranslationAndReturn: 92 92 pop es 93 %ifdef MODULE_HOTKEYS 93 94 jmp DriveXlate_Reset 95 %else 96 ret 97 %endif 94 98 95 99 -
trunk/XTIDE_Universal_BIOS/makefile
r392 r395 18 18 # MODULE_BOOT_MENU Boot Menu for selection of drive to boot from # 19 19 # MODULE_EBIOS Enhanced functions for accessing drives over 8.4 GB # 20 # MODULE_HOTKEYS Hotkey Bar to boot from any drive # 20 21 # MODULE_JRIDE Support for JR-IDE/ISA # 21 22 # MODULE_SERIAL Virtual hard disks using serial port # … … 89 90 # Assembler preprocessor defines. # 90 91 ################################################################# 91 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_ EBIOS92 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS 92 93 93 94 DEFINES_XT = ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY
Note:
See TracChangeset
for help on using the changeset viewer.