[57] | 1 | ; Project name : XTIDE Universal BIOS Configurator v2
|
---|
| 2 | ; Description : Menu page and item structs.
|
---|
[376] | 3 |
|
---|
| 4 | ;
|
---|
[526] | 5 | ; XTIDE Universal BIOS and Associated Tools
|
---|
| 6 | ; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2013 by XTIDE Universal BIOS Team.
|
---|
[376] | 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.
|
---|
[526] | 12 | ;
|
---|
[376] | 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
|
---|
[526] | 16 | ; GNU General Public License for more details.
|
---|
[376] | 17 | ; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
---|
| 18 | ;
|
---|
| 19 |
|
---|
[57] | 20 | %ifndef MENU_STRUCTS_INC
|
---|
| 21 | %define MENU_STRUCTS_INC
|
---|
| 22 |
|
---|
[593] | 23 | struc 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
|
---|
| 37 | endstruc
|
---|
| 38 |
|
---|
[57] | 39 | struc MENUPAGE
|
---|
[596] | 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
|
---|
[57] | 44 | endstruc
|
---|
| 45 |
|
---|
| 46 | struc MENUITEM
|
---|
[596] | 47 | .fnActivate resb 2 ; Offset to item activation function
|
---|
| 48 | .fnFormatValue resb 2 ; Offset to item value formatting function
|
---|
[57] | 49 |
|
---|
[596] | 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
|
---|
[57] | 53 |
|
---|
[596] | 54 | .bFlags resb 1 ; Item flags
|
---|
| 55 | .bType resb 1 ; Item type
|
---|
| 56 | .itemValue resb ITEM_VALUE_size ; ITEM_VALUE for automated item handling
|
---|
[57] | 57 | endstruc
|
---|
| 58 |
|
---|
| 59 | ; Bit defines for MENUITEM.bFlags
|
---|
| 60 | FLG_MENUITEM_VISIBLE EQU (1<<0) ; Item is visible
|
---|
| 61 | FLG_MENUITEM_MODIFY_MENU EQU (1<<1) ; Item modifies visibility of other items
|
---|
| 62 | FLG_MENUITEM_FLAGVALUE EQU (1<<2) ; Item value is single bit
|
---|
| 63 | FLG_MENUITEM_BYTEVALUE EQU (1<<3) ; Item value is single byte
|
---|
[59] | 64 | FLG_MENUITEM_PROGRAMVAR EQU (1<<4) ; Item is for configuring program, not BIOS
|
---|
[567] | 65 | FLG_MENUITEM_CHOICESTRINGS EQU (1<<5) ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table,
|
---|
[242] | 66 | ; ChoiceToStringLookup table must also be NULL terminated
|
---|
[286] | 67 | FLG_MENUITEM_MASKVALUE EQU (1<<6) ; Item value is more than one bit among other bits
|
---|
[57] | 68 |
|
---|
[286] | 69 |
|
---|
[57] | 70 | ; Values for MENUITEM.bType
|
---|
| 71 | TYPE_MENUITEM_PAGEBACK EQU (0<<1) ; Item returns to previous MENUPAGE
|
---|
| 72 | TYPE_MENUITEM_PAGENEXT EQU (1<<1) ; Item changes to next MENUPAGE
|
---|
| 73 | TYPE_MENUITEM_ACTION EQU (2<<1) ; Non-configurable item
|
---|
[108] | 74 | TYPE_MENUITEM_MULTICHOICE EQU (3<<1) ; Item with multiple predefined choices
|
---|
[57] | 75 | TYPE_MENUITEM_UNSIGNED EQU (4<<1) ; Menuitem with user inputted unsigned decimal value
|
---|
| 76 | TYPE_MENUITEM_HEX EQU (5<<1) ; Menuitem with user inputted hexadecimal value
|
---|
| 77 |
|
---|
| 78 |
|
---|
| 79 | %endif ; MENU_STRUCTS_INC
|
---|