source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc @ 596

Last change on this file since 596 was 596, checked in by krille_n_, 6 years ago

Changes:

  • Made changes to HotkeyBar.asm to give the Boot Menu and Hotkey Bar a more consistent look. It will probably seem a bit strange at first to people used to the classic theme.
  • Added the missing parts of USE_NEC_V that should have been committed with the rest in r593.
  • Removed DEFINES_ALL_FEATURES from the BIOS makefile. It didn't work anymore and never really made sense anyway. Added all the official builds to 'make unused' instead which actually uncovered some unused code in the Tiny build.
  • XTIDECFG will no longer load color themes from unrecognized versions of the BIOS.
  • Other fixes in comments and some minor optimizations.
File size: 3.5 KB
Line 
1; Project name  :   XTIDE Universal BIOS Configurator v2
2; Description   :   Menu page and item structs.
3
4;
5; XTIDE Universal BIOS and Associated Tools
6; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 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 MENU_STRUCTS_INC
21%define MENU_STRUCTS_INC
22
23struc ITEM_VALUE
24    .wRomvarsValueOffset    resb    2   ; ROMVARS offset to actual value to be configured
25    .szDialogTitle          resb    2   ; Dialog title string
26
27    .szMultichoice          resb    2   ; Multiple choices in one string
28    .rgwChoiceToValueLookup resb    2   ; Ptr to lookup table for translating selected choice to actual value
29    .rgszValueToStringLookup:           ; Ptr to lookup table for translating value to string
30    .rgszChoiceToStringLookup:
31    .wMinValue              resb    2   ; Minimum allowed integer value
32    .wMaxValue:
33    .wValueBitmask          resb    2   ; Bitmask for item value flag or field
34    .fnValueReader          resb    2   ; Called just after ROMVARS is read, providing a hook for further action
35    .fnValueWriter          resb    2   ; Called just before ROMVARS is written, providing a hook for further action
36    .bFieldPosition         resb    1   ; Bit field position
37endstruc
38
39struc MENUPAGE
40    .fnEnter                resb    2   ; Function to initialize MENUPAGE
41    .fnBack                 resb    2   ; Function to initialize previous MENUPAGE
42    .wMenuitems             resb    2   ; Number of MENUITEM structs
43    .rgMenuitem:                        ; All MENUITEM structs in this MENUPAGE
44endstruc
45
46struc MENUITEM
47    .fnActivate             resb    2   ; Offset to item activation function
48    .fnFormatValue          resb    2   ; Offset to item value formatting function
49
50    .szName                 resb    2   ; Offset to item name string
51    .szQuickInfo            resb    2   ; Offset to item quick information string
52    .szHelp                 resb    2   ; Offset to item help string
53
54    .bFlags                 resb    1   ; Item flags
55    .bType                  resb    1   ; Item type
56    .itemValue              resb    ITEM_VALUE_size     ; ITEM_VALUE for automated item handling
57endstruc
58
59; Bit defines for MENUITEM.bFlags
60FLG_MENUITEM_VISIBLE        EQU (1<<0)  ; Item is visible
61FLG_MENUITEM_MODIFY_MENU    EQU (1<<1)  ; Item modifies visibility of other items
62FLG_MENUITEM_FLAGVALUE      EQU (1<<2)  ; Item value is single bit
63FLG_MENUITEM_BYTEVALUE      EQU (1<<3)  ; Item value is single byte
64FLG_MENUITEM_PROGRAMVAR     EQU (1<<4)  ; Item is for configuring program, not BIOS
65FLG_MENUITEM_CHOICESTRINGS  EQU (1<<5)  ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table,
66                                        ; ChoiceToStringLookup table must also be NULL terminated
67FLG_MENUITEM_MASKVALUE      EQU (1<<6)  ; Item value is more than one bit among other bits
68
69
70; Values for MENUITEM.bType
71TYPE_MENUITEM_PAGEBACK      EQU (0<<1)  ; Item returns to previous MENUPAGE
72TYPE_MENUITEM_PAGENEXT      EQU (1<<1)  ; Item changes to next MENUPAGE
73TYPE_MENUITEM_ACTION        EQU (2<<1)  ; Non-configurable item
74TYPE_MENUITEM_MULTICHOICE   EQU (3<<1)  ; Item with multiple predefined choices
75TYPE_MENUITEM_UNSIGNED      EQU (4<<1)  ; Menuitem with user inputted unsigned decimal value
76TYPE_MENUITEM_HEX           EQU (5<<1)  ; Menuitem with user inputted hexadecimal value
77
78
79%endif ; MENU_STRUCTS_INC
Note: See TracBrowser for help on using the repository browser.