Changeset 492 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Inc


Ignore:
Timestamp:
Dec 21, 2012, 1:01:55 AM (12 years ago)
Author:
gregli@…
google:author:
gregli@hotmail.com
Message:

Removed the dependency between MODULE_BOOT_MENU and MODULE_HOTKEYS. With these changes, 0, 1, or 2 of them can be included in a build. This change also means that the hotkeys don't work while the menu is up. But the most important hotkey there was for Rom Boot, and that has been added to the menu as a choice proper. Lots of changes across the board in the hotkeys code - even if we eventually back this change out (becaue, for example we want hotkeys to work in the menu) we should probably start from this base and add that functionality back in, as these changes results in approximately 120 bytes of savings and includes new functionality, such as the Rom Boot menu item and the Com Detect hotkey.

Location:
trunk/XTIDE_Universal_BIOS/Inc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc

    r473 r492  
    2222%define BOOTVARS_INC
    2323
     24; Default drives
     25DEFAULT_FLOPPY_DRIVE_LETTER             EQU 'A'
     26DEFAULT_HARD_DRIVE_LETTER               EQU 'C'
     27
    2428; Number of times to retry booting before accepting error
    2529BOOT_READ_RETRY_TIMES       EQU     3
     
    4347    .clearToZeroFromThisPoint:
    4448%ifdef MODULE_HOTKEYS
    45     .hotkeyVars         resb    HOTKEYVARS_size
     49    .hotkeyVars             resb    HOTKEYVARS_size
    4650%endif
    4751
     
    5054
    5155%ifdef MODULE_HOTKEYS
     56
    5257struc HOTKEYVARS
    5358    .wTimeToClose       resb    2       ; Earliest system time when Hotkey Bar can be closed
    54     .bScancode          resb    1       ; Function hotkey scancode
    55     .bFlags             resb    1       ; Must be just before .bHddLetter!
    5659    .wHddAndFddLetters:
     60    .bFddLetter         resb    1       ; Floppy Drive letter hotkey (upper case)
    5761    .bHddLetter         resb    1       ; Hard Drive letter hotkey (upper case)
    58     .bFddLetter         resb    1       ; Floppy Drive letter hotkey (upper case)
     62    .bFlags             resb    1       ; Must be just after .bHddLetter!  (dependency in Hotkeybar.asm)
     63    .bScancode          resb    1       ; Function hotkey scancode, must be just after .bFlags!
    5964endstruc
    6065
    61 ; Bit defines for HOTKEYVARS.bFlags
     66%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
     67%if HOTKEYVARS.bFddLetter+1 != HOTKEYVARS.bHddLetter || HOTKEYVARS.bHddLetter+1 != HOTKEYVARS.bFlags || HOTKEYVARS.bFlags+1 != HOTKEYVARS.bScancode
     68%error "HOTKEYVARS: bytes need to come in the order .bFddLetter, then .bHddLetter, then .bFlags, then .bScancode"
     69%endif
     70%endif
     71
     72; Bit defines for KEYBOARDVARS.bFlags
    6273FLG_HOTKEY_HD_FIRST     EQU     (1<<0)  ; First try to boot from HDD, then FDD
    6374
    64 %endif ; MODULE_HOTKEY
    65 
    66 
     75%endif ; MODULE_HOTKEYS
    6776
    6877struc DRVDETECTINFO
  • trunk/XTIDE_Universal_BIOS/Inc/HotkeyBar.inc

    r413 r492  
    2323MIN_TIME_TO_DISPLAY_HOTKEY_BAR          EQU (5000/55)   ; 5000 ms
    2424
    25 
    26 ; Hotkeys
    27 BOOT_MENU_HOTKEY_SCANCODE               EQU 3Ch ; F2
    2825ROM_BOOT_HOTKEY_SCANCODE                EQU 42h ; F8
    2926
    30 ; Default drives
    31 DEFAULT_FLOPPY_DRIVE_LETTER             EQU 'A'
    32 DEFAULT_HARD_DRIVE_LETTER               EQU 'C'
     27%ifdef MODULE_BOOT_MENU
     28BOOT_MENU_HOTKEY_SCANCODE               EQU 3Ch ; F2
     29%endif
    3330
     31%ifdef MODULE_SERIAL
     32COM_DETECT_HOTKEY_SCANCODE              EQU 40h ; F6
     33%endif
    3434
    3535%endif ; HOTKEYBAR_INC
  • trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc

    r491 r492  
    1818;
    1919
    20 ; Boot Menu requires Hotkey support
    21 %ifdef MODULE_BOOT_MENU
    22     %ifndef MODULE_HOTKEYS
    23         %define MODULE_HOTKEYS
    24     %endif
    25 %endif
    26 
    2720%ifdef MODULE_SERIAL_FLOPPY
    2821    %ifndef MODULE_SERIAL
     
    3023    %endif
    3124%endif
    32 
    3325
    3426; Include module specific .INC files
     
    5042%ifdef MODULE_HOTKEYS
    5143    %include "HotkeyBar.inc"        ; For Hotkeys
    52     %ifdef MODULE_BOOT_MENU
    53         %include "BootMenu.inc"     ; For Boot Menu
    54     %endif
     44%endif
     45
     46%ifdef MODULE_BOOT_MENU
     47    %include "BootMenu.inc"         ; For Boot Menu
     48%endif
     49
     50%ifdef MODULE_BOOT_MENU OR MODULE_HOTKEYS
     51    %define MODULE_DRIVEXLATE
    5552%endif
    5653
  • trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc

    r444 r492  
    2626%endif
    2727
     28%ifdef MODULE_SERIAL_FLOPPY
     29    %define NEED_XLATEVARS
     30%endif
     31
     32%ifdef MODULE_DRIVEXLATE
     33    %define NEED_XLATEVARS
     34%endif
     35
     36
    2837; RAM Variables.
    2938; Variables should be kept to minimum since they might be located
     
    5059
    5160    ; Variables for drive number translation
    52 %ifdef MODULE_HOTKEYS
     61%ifdef NEED_XLATEVARS
    5362    .xlateVars          resb    XLATEVARS_size
    5463%endif
     
    6069
    6170
    62 
     71%ifdef NEED_XLATEVARS
    6372; Variables for translating drive numbers.
    64 %ifdef MODULE_HOTKEYS
    6573    struc XLATEVARS
    6674    %ifdef MODULE_SERIAL_FLOPPY
     
    6977                                        ; and number of drives (low order bit, max 2 drives supported).
    7078                                        ; During initialization, until the end of DetectDrives_FromAllIDEControllers,
    71                                         ; this byte contains the raw number of floppy drives seen (using .bFlopCreateCnt)
     79                                        ; this byte contains the raw number of floppy drives seen
     80                                        ; (using .bFlopCreateCnt)
    7281    %else
    7382                            resb    1   ; alignment
    7483    %endif
     84
     85    %ifdef MODULE_DRIVEXLATE
    7586        .bXlatedDrv         resb    1   ; Drive number after translation
    7687        .wFDandHDswap:
    7788        .bFDSwap            resb    1   ; Floppy Drive to swap to 00h and vice versa
    7889        .bHDSwap            resb    1   ; Hard Drive to swap to 80h and vice versa
     90    %else
     91                            resb    1   ; alignment
     92    %endif
    7993    endstruc
    8094%endif
    81 
    8295
    8396%ifdef MODULE_SERIAL_FLOPPY
Note: See TracChangeset for help on using the changeset viewer.