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

Last change on this file since 373 was 365, checked in by aitotat@…, 13 years ago

Changes to XTIDE Universal BIOS:

  • Errors from AH=9h are stored to DPTs again.
  • XT build fits in 8k again.
File size: 2.1 KB
RevLine 
[88]1; Project name : XTIDE Universal BIOS
[254]2; Description : Equates and structs used in Boot Menu.
[294]3
[3]4%ifndef BOOTMENU_INC
5%define BOOTMENU_INC
6
7; Boot menu sizes
[291]8BOOT_MENU_DEFAULT_TIMEOUT EQU (30 * TICKS_PER_SECOND)
[127]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
[3]16
[92]17; Hotkeys
[127]18ROM_BOOT_HOTKEY_SCANCODE EQU 42h ; F8
[3]19
20
[254]21; Boot Menu Information Table. These are generated for all XTIDE Universal
[294]22; BIOS drives. Available only until boot is successful.
[284]23MAX_HARD_DISK_NAME_LENGTH EQU 30 ; Bytes reserved for drive name
[254]24
25struc BOOTMENUINFO
[363]26 .szDrvName resb MAX_HARD_DISK_NAME_LENGTH
27 resb 2 ; Zero word (ensures string terminates)
28 .wInitErrorFlags resb 2 ; Errors during initialization
[364]29
[363]30%ifdef MODULE_ADVANCED_ATA
[364]31 resb 6 ; padding to make BOOTMENUINFO size an even multiple of DPT size
[363]32%else
33 resb 2 ; padding to make BOOTMENUINFO size an even multiple of DPT size
[365]34%endif
[254]35endstruc
36
[363]37
[254]38DPT_BOOTMENUINFO_SIZE_MULTIPLIER equ BOOTMENUINFO_size / LARGEST_DPT_SIZE
39
[294]40%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
[254]41
[294]42%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
43 %error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
[284]44%endif
45
[254]46%if BOOTMENUINFO_size % LARGEST_DPT_SIZE <> 0
[294]47 %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."
[254]48%endif
49
50%if BOOTMENUINFO.szDrvName <> 0
[294]51 %error "BOOTMENUINFO.szDrvName is assumed to be the first member of struc BOOTMENUINFO, in BootMenuPrint_RefreshItem"
[254]52%endif
53
54%endif
55
56
[3]57%endif ; BOOTMENU_INC
Note: See TracBrowser for help on using the repository browser.