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 |
|
---|
23 | struc MENUPAGE
|
---|
24 | .fnEnter resb 2 ; Function to initialize MENUPAGE
|
---|
25 | .fnBack resb 2 ; Function to initialize previous MENUPAGE
|
---|
26 | .wMenuitems resb 2 ; Number of MENUITEM structs
|
---|
27 | .rgMenuitem: ; All MENUITEM structs in this MENUPAGE
|
---|
28 | endstruc
|
---|
29 |
|
---|
30 | struc MENUITEM
|
---|
31 | .fnActivate resb 2 ; Offset to item activation function
|
---|
32 | .fnFormatValue resb 2 ; Offset to item value formatting function
|
---|
33 |
|
---|
34 | .szName resb 2 ; Offset to item name string
|
---|
35 | .szQuickInfo resb 2 ; Offset to item quick information string
|
---|
36 | .szHelp resb 2 ; Offset to item help string
|
---|
37 |
|
---|
38 | .bFlags resb 1 ; Item flags
|
---|
39 | .bType resb 1 ; Item type
|
---|
40 | .itemValue resb ITEM_VALUE_size ; ITEM_VALUE for automated item handling
|
---|
41 | endstruc
|
---|
42 |
|
---|
43 | ; Bit defines for MENUITEM.bFlags
|
---|
44 | FLG_MENUITEM_VISIBLE EQU (1<<0) ; Item is visible
|
---|
45 | FLG_MENUITEM_MODIFY_MENU EQU (1<<1) ; Item modifies visibility of other items
|
---|
46 | FLG_MENUITEM_FLAGVALUE EQU (1<<2) ; Item value is single bit
|
---|
47 | FLG_MENUITEM_BYTEVALUE EQU (1<<3) ; Item value is single byte
|
---|
48 | FLG_MENUITEM_PROGRAMVAR EQU (1<<4) ; Item is for configuring program, not BIOS
|
---|
49 | FLG_MENUITEM_CHOICESTRINGS EQU (1<<5) ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table,
|
---|
50 | ; ChoiceToStringLookup table must also be NULL terminated
|
---|
51 | FLG_MENUITEM_MASKVALUE EQU (1<<6) ; Item value is more than one bit among other bits
|
---|
52 |
|
---|
53 |
|
---|
54 | ; Values for MENUITEM.bType
|
---|
55 | TYPE_MENUITEM_PAGEBACK EQU (0<<1) ; Item returns to previous MENUPAGE
|
---|
56 | TYPE_MENUITEM_PAGENEXT EQU (1<<1) ; Item changes to next MENUPAGE
|
---|
57 | TYPE_MENUITEM_ACTION EQU (2<<1) ; Non-configurable item
|
---|
58 | TYPE_MENUITEM_MULTICHOICE EQU (3<<1) ; Item with multiple predefined choices
|
---|
59 | TYPE_MENUITEM_UNSIGNED EQU (4<<1) ; Menuitem with user inputted unsigned decimal value
|
---|
60 | TYPE_MENUITEM_HEX EQU (5<<1) ; Menuitem with user inputted hexadecimal value
|
---|
61 |
|
---|
62 |
|
---|
63 | struc ITEM_VALUE
|
---|
64 | .wRomvarsValueOffset resb 2 ; ROMVARS offset to actual value to be configured
|
---|
65 | .szDialogTitle resb 2 ; Dialog title string
|
---|
66 |
|
---|
67 | .szMultichoice resb 2 ; Multiple choices in one string
|
---|
68 | .rgwChoiceToValueLookup resb 2 ; Ptr to lookup table for translating selected choice to actual value
|
---|
69 | .rgszValueToStringLookup: ; Ptr to lookup table for translating value to string
|
---|
70 | .rgszChoiceToStringLookup:
|
---|
71 | .wMinValue resb 2 ; Minimum allowed integer value
|
---|
72 | .wMaxValue:
|
---|
73 | .wValueBitmask resb 2 ; Bitmask for item value flag or field
|
---|
74 | .fnValueReader resb 2 ; Called just after ROMVARS is read, providing a hook for further action
|
---|
75 | .fnValueWriter resb 2 ; Called just before ROMVARS is written, providing a hook for further action
|
---|
76 | .bFieldPosition resb 1 ; Bit field position
|
---|
77 | endstruc
|
---|
78 |
|
---|
79 |
|
---|
80 | %endif ; MENU_STRUCTS_INC
|
---|