1 | ; Project name : XTIDE Universal BIOS
|
---|
2 | ; Description : Equates and structs used in Boot Menu.
|
---|
3 |
|
---|
4 | ;
|
---|
5 | ; XTIDE Universal BIOS and Associated Tools
|
---|
6 | ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
|
---|
7 | ;
|
---|
8 | ; This program is free software; you can redistribute it and/or modify
|
---|
9 | ; it under the terms of the GNU General Public License as published by
|
---|
10 | ; the Free Software Foundation; either version 2 of the License, or
|
---|
11 | ; (at your option) any later version.
|
---|
12 | ;
|
---|
13 | ; This program is distributed in the hope that it will be useful,
|
---|
14 | ; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
15 | ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
16 | ; GNU General Public License for more details.
|
---|
17 | ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
---|
18 | ;
|
---|
19 |
|
---|
20 | %ifndef BOOTMENU_INC
|
---|
21 | %define BOOTMENU_INC
|
---|
22 |
|
---|
23 | ; Boot menu sizes
|
---|
24 | BOOT_MENU_DEFAULT_TIMEOUT EQU (30 * TICKS_PER_SECOND)
|
---|
25 | BOOT_MENU_TITLE_LINES EQU 2 ; Number of title lines
|
---|
26 | BOOT_MENU_INFO_LINES EQU 3 ; Number of info lines
|
---|
27 | BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW EQU 5
|
---|
28 | BOOT_MENU_TITLE_AND_INFO_LINES EQU (BOOT_MENU_TITLE_LINES | (BOOT_MENU_INFO_LINES<<8))
|
---|
29 | BOOT_MENU_WIDTH EQU 40 ; Menu width in characters (including shadow)
|
---|
30 | BOOT_MENU_HEIGHT_WITHOUT_ITEMS EQU (BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + BOOT_MENU_SEPARATOR_LINES_PLUS_SHADOW)
|
---|
31 | MENU_SCREEN_BOTTOM_LINES EQU 1
|
---|
32 |
|
---|
33 |
|
---|
34 | ; Boot Menu Information Table. These are generated for all XTIDE Universal
|
---|
35 | ; BIOS drives. Available only until boot is successful.
|
---|
36 | MAX_HARD_DISK_NAME_LENGTH EQU 30 ; Bytes reserved for drive name
|
---|
37 |
|
---|
38 | struc BOOTMENUINFO
|
---|
39 | .szDrvName resb MAX_HARD_DISK_NAME_LENGTH
|
---|
40 | resb 2 ; Zero word (ensures string terminates)
|
---|
41 | .wInitErrorFlags resb 2 ; Errors during initialization
|
---|
42 |
|
---|
43 | %ifdef MODULE_ADVANCED_ATA
|
---|
44 | resb 6 ; padding to make BOOTMENUINFO size an even multiple of DPT size
|
---|
45 | %else
|
---|
46 | resb 2 ; padding to make BOOTMENUINFO size an even multiple of DPT size
|
---|
47 | %endif
|
---|
48 | endstruc
|
---|
49 |
|
---|
50 |
|
---|
51 | DPT_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
|
---|