source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc @ 363

Last change on this file since 363 was 363, checked in by aitotat@…, 12 years ago

Changes to XTIDE Universal BIOS:

  • Added Advanced ATA Module (MODULE_ADVANCED_ATA) with native support for QDI Vision QD6500 and QD6580 VLB IDE Controllers.
  • Hopefully optimized IDE transfer functions for 8088 (replaced some memory accesses from WORD to BYTE).
  • XT build does not fit in 8k at the moment!!!
File size: 2.8 KB
Line 
1; Project name  :   XTIDE Universal BIOS
2; Description   :   Equates and structs used in Boot Menu.
3
4%ifndef BOOTMENU_INC
5%define BOOTMENU_INC
6
7; Boot menu sizes
8BOOT_MENU_DEFAULT_TIMEOUT               EQU (30 * TICKS_PER_SECOND)
9BOOT_MENU_TITLE_LINES                   EQU 2   ; Number of title lines
10BOOT_MENU_INFO_LINES                    EQU 3   ; Number of info lines
11BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW   EQU 5
12BOOT_MENU_TITLE_AND_INFO_LINES          EQU (BOOT_MENU_TITLE_LINES | (BOOT_MENU_INFO_LINES<<8))
13BOOT_MENU_WIDTH                         EQU 40  ; Menu width in characters (including shadow)
14BOOT_MENU_HEIGHT_WITHOUT_ITEMS          EQU (BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW)
15MENU_SCREEN_BOTTOM_LINES                EQU 1
16
17; Hotkeys
18ROM_BOOT_HOTKEY_SCANCODE                EQU 42h ; F8
19
20
21; Boot Menu Information Table. These are generated for all XTIDE Universal
22; BIOS drives. Available only until boot is successful.
23MAX_HARD_DISK_NAME_LENGTH               EQU     30      ; Bytes reserved for drive name
24
25struc BOOTMENUINFO
26    .szDrvName              resb    MAX_HARD_DISK_NAME_LENGTH
27                            resb    2   ; Zero word (ensures string terminates)
28    .wInitErrorFlags        resb    2   ; Errors during initialization
29
30%ifdef MODULE_ADVANCED_ATA
31    .wIdeBasePort           resb    2   ; IDE Base Port
32    .wMinPioActiveTimeNs    resb    2   ; Minimum PIO Active Time in ns
33    .wMinPioRecoveryTimeNs  resb    2   ; Minimum PIO Recovery Time in ns
34    .wControllerID          resb    2   ; Controller specific ID WORD
35    .wControllerBasePort    resb    2   ; Advanced Controller port (not IDE port)
36                            resb    12  ; padding to make BOOTMENUINFO size an even multiple of DPT size
37
38%else
39                            resb    2   ; padding to make BOOTMENUINFO size an even multiple of DPT size
40%endif
41endstruc
42
43; Flags for BOOTMENUINFO.wInitErrorFlags
44FLG_INIT_FAILED_TO_SELECT_DRIVE                 EQU     (1<<0)
45FLG_INIT_FAILED_TO_INITIALIZE_CHS_PARAMETERS    EQU     (1<<1)
46FLG_INIT_FAILED_TO_SET_WRITE_CACHE              EQU     (1<<2)
47FLG_INIT_FAILED_TO_RECALIBRATE_DRIVE            EQU     (1<<3)
48FLG_INIT_FAILED_TO_SET_BLOCK_MODE               EQU     (1<<4)
49FLG_INIT_FAILED_TO_SET_PIO_MODE                 EQU     (1<<5)
50
51DPT_BOOTMENUINFO_SIZE_MULTIPLIER  equ   BOOTMENUINFO_size / LARGEST_DPT_SIZE
52
53%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
54
55%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
56    %error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
57%endif
58
59%if BOOTMENUINFO_size % LARGEST_DPT_SIZE <> 0
60    %error "BOOTMENUINFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of BOOTMENUINFO to bring the two sizes into alignment.  As BOOTMENUINFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
61%endif
62
63%if BOOTMENUINFO.szDrvName <> 0
64    %error "BOOTMENUINFO.szDrvName is assumed to be the first member of struc BOOTMENUINFO, in BootMenuPrint_RefreshItem"
65%endif
66
67%endif
68
69
70%endif ; BOOTMENU_INC
Note: See TracBrowser for help on using the repository browser.