Changeset 395 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS


Ignore:
Timestamp:
Apr 18, 2012, 6:04:48 PM (13 years ago)
Author:
aitotat@…
google:author:
aitotat@gmail.com
Message:

Changes to XTIDE Universal BIOS:

  • Hotkey Bar and drive translations are now in MODULE_HOTKEYS.
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  
    4343    call    RamVars_GetSegmentToDS
    4444
     45%ifdef MODULE_HOTKEYS
    4546    call    DriveXlate_ToOrBack
     47%endif
    4648    mov     [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl
    4749
  • trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm

    r392 r395  
    9090;--------------------------------------------------------------------
    9191SelectDriveToBootFrom:
     92%ifdef MODULE_HOTKEYS
    9293    call    HotkeyBar_UpdateDuringDriveDetection
    9394
     
    103104.DoNotDisplayBootMenu:
    104105%endif
     106%endif
    105107
    106108    ; Check if ROM boot (INT 18h) wanted
     
    109111
    110112    ; Try to boot from Primary boot drive (00h by default)
     113%ifdef MODULE_HOTKEYS
    111114    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
    112119    call    TryToBootFromPrimaryOrSecondaryBootDevice
    113120    jc      SHORT JumpToBootSector_or_RomBoot
    114121
    115122    ; Try to boot from Secondary boot device (80h by default)
     123%ifdef MODULE_HOTKEYS
    116124    call    HotkeyBar_GetSecondaryBootDriveNumberToDL
     125%else
     126    mov     dl, [cs:ROMVARS.bBootDrv]
     127    and     dl, 80h
     128    xor     dl, 80h
     129%endif
    117130    call    TryToBootFromPrimaryOrSecondaryBootDevice
    118131
     
    179192;       AX, CX, DH, SI, DI, (DL if failed to read boot sector)
    180193;--------------------------------------------------------------------
     194%ifndef MODULE_HOTKEYS
     195TryToBootFromPrimaryOrSecondaryBootDevice   EQU     BootSector_TryToLoadFromDriveDL
     196
     197%else
    181198TryToBootFromPrimaryOrSecondaryBootDevice:
    182199    call    DriveXlate_SetDriveToSwap
    183200    call    DriveXlate_ToOrBack
    184201    jmp     BootSector_TryToLoadFromDriveDL
     202%endif
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm

    r392 r395  
    154154StartDetectionWithDriveSelectByteInBHandStringInCX:
    155155    call    DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
     156%ifdef MODULE_HOTKEYS
    156157    call    HotkeyBar_UpdateDuringDriveDetection
     158%endif
    157159    ; Fall to .ReadAtaInfoFromHardDisk
    158160
  • trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm

    r392 r395  
    206206    mov     bp, sp
    207207
     208%ifdef MODULE_HOTKEYS
     209
    208210    call    DriveXlate_ToOrBack ; DL = Untranslated Drive number
    209211    mov     dh, dl
     
    217219    push    dx
    218220
    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
    220236
    221237    mov     si, g_szTryToBoot
  • trunk/XTIDE_Universal_BIOS/Src/Main.asm

    r392 r395  
    4747    %include "AssemblyLibrary.inc"  ; Assembly Library. Must be included first!
    4848    %include "Version.inc"
     49    %include "ModuleDependency.inc" ; Dependency checks for optional modules
    4950    %include "IntController.inc"    ; For Interrupt Controller equates
    5051    %include "ATA_ID.inc"           ; For ATA Drive Information structs
     
    224225    %include "DetectDrives.asm"     ; For detecting IDE drives
    225226    %include "DetectPrint.asm"      ; For printing drive detection strings
     227
     228    ; Hotkey Bar
     229%ifdef MODULE_HOTKEYS
    226230    %include "HotkeyBar.asm"        ; For hotkeys during drive detection and boot menu
     231    %include "DriveXlate.asm"       ; For swapping drive numbers
     232%endif
    227233
    228234    ; Boot menu
     
    297303    %include "AH24h_HSetBlocks.asm" ; Required by Int13h_Jump.asm
    298304    %include "AH25h_HDrvID.asm"     ; Required by Int13h_Jump.asm
    299     %include "DriveXlate.asm"       ; For swapping drive numbers
    300305    %include "Address.asm"          ; For sector address translations
    301306    %include "Prepare.asm"          ; For buffer pointer normalization
  • trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm

    r392 r395  
    8787
    8888;--------------------------------------------------------------------
    89 ; ConvertKeystrokeToAXfromDriveLetterInDL
    90 ;   Parameters:
    91 ;       DL:     Drive Letter ('A'...)
    92 ;   Returns:
    93 ;       AX:     Hotkey keystroke
    94 ;   Corrupts registers:
    95 ;       Nothing
    96 ;--------------------------------------------------------------------
    97 ConvertKeystrokeToAXfromDriveLetterInDL:
    98     eMOVZX  ax, dl
    99     jmp     Char_ChangeCaseInAL ; Upper case drive letter to lower case keystroke
    100 
    101 
    102 ;--------------------------------------------------------------------
    10389; BootMenuEvent_Handler
    10490;   Common parameters for all events:
     
    228214    ; The secondary boot drive is selected by highlighting it using menu keys
    229215    ; 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
    233217    call    RedrawHotkeyBarFromInsideMenuEventHandler
    234218
     
    248232
    249233;--------------------------------------------------------------------
    250 ; EventItemSelectedFromCX
    251 ;   Parameters
    252 ;       CX:     Index of selected item
    253 ;       DS:     Ptr to RAMVARS
    254 ;       ES:     Ptr to BDA (zero)
    255 ;       SS:BP:  Menu library handle
    256 ;   Returns:
    257 ;       CF:     Set if event processed
    258 ;               Cleared if event not processed
    259 ;   Corrupts registers:
    260 ;       Does not matter
    261 ;--------------------------------------------------------------------
    262 EventItemSelectedFromCX:
    263     call    BootMenu_GetDriveToDXforMenuitemInCX
    264     jnc     SHORT BootMenuEvent_Completed   ; No menuitem selected
    265 
    266     ; Convert selected drive to hotkey keystroke
    267     call    HotkeyBar_ConvertDriveNumberFromDLtoDriveLetter
    268     call    ConvertKeystrokeToAXfromDriveLetterInDL
    269     ; Fall to EventKeyStrokeInAX
    270 
    271 
    272 ;--------------------------------------------------------------------
    273234; EventKeyStrokeInAX
    274235;   Parameters
     
    291252
    292253    ; 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;--------------------------------------------------------------------
     270EventItemSelectedFromCX:
     271    call    BootMenu_GetDriveToDXforMenuitemInCX
     272    jnc     SHORT BootMenuEvent_Completed   ; No menuitem selected
     273
     274    ; Convert selected drive to hotkey keystroke
     275    call    HotkeyBar_StoreHotkeyToBootvarsForDriveLetterInDL
    293276    ; Fall to CloseBootMenu
    294277
  • trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm

    r392 r395  
    305305
    306306;--------------------------------------------------------------------
     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;--------------------------------------------------------------------
     317HotkeyBar_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;--------------------------------------------------------------------
    307324; ScanHotkeysFromKeyBufferAndStoreToBootvars
    308325;   Parameters:
     
    399416    test    BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bFlags], FLG_HOTKEY_HD_FIRST
    400417    eCMOVZ  dl, dh
    401     ; Fall to ConvertDriveLetterInDLtoDriveNumber
    402 
    403 
    404 ;--------------------------------------------------------------------
    405 ; ConvertDriveLetterInDLtoDriveNumber
     418    ; Fall to HotkeyBar_ConvertDriveLetterInDLtoDriveNumber
     419
     420
     421;--------------------------------------------------------------------
     422; HotkeyBar_ConvertDriveLetterInDLtoDriveNumber
    406423;   Parameters:
    407424;       DS:     RAMVARS segment
     
    412429;       AX, DH
    413430;--------------------------------------------------------------------
    414 ConvertDriveLetterInDLtoDriveNumber:
     431HotkeyBar_ConvertDriveLetterInDLtoDriveNumber:
    415432    call    HotkeyBar_GetLetterForFirstHardDriveToAX
    416433    cmp     dl, al
  • trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm

    r392 r395  
    3939    sub     ax, di
    4040    xchg    cx, ax
     41
     42%ifdef MODULE_HOTKEYS
    4143    call    Memory_ZeroESDIwithSizeInCX
    4244
    4345    ; 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]
    4847
    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;--------------------------------------------------------------------
     59BootVars_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
    5563
    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  
    9191.InitializeDriveTranslationAndReturn:
    9292    pop     es
     93%ifdef MODULE_HOTKEYS
    9394    jmp     DriveXlate_Reset
     95%else
     96    ret
     97%endif
    9498
    9599
  • trunk/XTIDE_Universal_BIOS/makefile

    r392 r395  
    1818# MODULE_BOOT_MENU          Boot Menu for selection of drive to boot from                        #
    1919# MODULE_EBIOS              Enhanced functions for accessing drives over 8.4 GB                  #
     20# MODULE_HOTKEYS            Hotkey Bar to boot from any drive                                    #
    2021# MODULE_JRIDE              Support for JR-IDE/ISA                                               #
    2122# MODULE_SERIAL             Virtual hard disks using serial port                                 #
     
    8990# Assembler preprocessor defines.                               #
    9091#################################################################
    91 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_EBIOS
     92DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS
    9293
    9394DEFINES_XT = ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY
Note: See TracChangeset for help on using the changeset viewer.