source: xtideuniversalbios/trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/BootMenuSettingsMenu.asm@ 325

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

Changes to Configurator v2:

  • Added option to disable boot menu.
File size: 9.9 KB
Line 
1; Project name : XTIDE Universal BIOS Configurator v2
2; Description : "Boot Menu Settings" menu structs and functions.
3
4; Section containing initialized data
5SECTION .data
6
7ALIGN WORD_ALIGN
8g_MenupageForBootMenuSettingsMenu:
9istruc MENUPAGE
10 at MENUPAGE.fnEnter, dw BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
11 at MENUPAGE.fnBack, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility
12 at MENUPAGE.wMenuitems, dw 8
13iend
14
15g_MenuitemBootMnuStngsBackToConfigurationMenu:
16istruc MENUITEM
17 at MENUITEM.fnActivate, dw ConfigurationMenu_EnterMenuOrModifyItemVisibility
18 at MENUITEM.szName, dw g_szItemBackToCfgMenu
19 at MENUITEM.szQuickInfo, dw g_szNfoIdeBackToCfgMenu
20 at MENUITEM.szHelp, dw g_szNfoIdeBackToCfgMenu
21 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE
22 at MENUITEM.bType, db TYPE_MENUITEM_PAGEBACK
23iend
24
25g_MenuitemBootMnuStngsDisplayMode:
26istruc MENUITEM
27 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
28 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
29 at MENUITEM.szName, dw g_szItemBootDispMode
30 at MENUITEM.szQuickInfo, dw g_szNfoDispMode
31 at MENUITEM.szHelp, dw g_szNfoDispMode
32 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE
33 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
34 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.wDisplayMode
35 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgBootDispMode
36 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBootDispMode
37 at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgwChoiceToValueLookupForDisplayModes
38 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForDisplayModes
39iend
40
41g_MenuitemBootMnuStngsFloppyDrives:
42istruc MENUITEM
43 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
44 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
45 at MENUITEM.szName, dw g_szItemBootFloppyDrvs
46 at MENUITEM.szQuickInfo, dw g_szNfoBootFloppyDrvs
47 at MENUITEM.szHelp, dw g_szHelpBootFloppyDrvs
48 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
49 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
50 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.bMinFddCnt
51 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgBootFloppyDrvs
52 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBootFloppyDrvs
53 at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw NULL
54 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFloppyDrives
55iend
56
57g_MenuitemBootMenuSerialScanDetect:
58istruc MENUITEM
59 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
60 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
61 at MENUITEM.szName, dw g_szItemSerialDetect
62 at MENUITEM.szQuickInfo, dw g_szNfoSerialDetect
63 at MENUITEM.szHelp, dw g_szHelpSerialDetect
64 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
65 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
66 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.wFlags
67 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgSerialDetect
68 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag
69 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans
70 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_ROMVARS_SERIAL_SCANDETECT
71iend
72
73g_MenuitemBootMnuStngsEnableBootMenu:
74istruc MENUITEM
75 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
76 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
77 at MENUITEM.szName, dw g_szItemBootEnableMenu
78 at MENUITEM.szQuickInfo, dw g_szNfoBootEnableMenu
79 at MENUITEM.szHelp, dw g_szNfoBootEnableMenu
80 at MENUITEM.bFlags, db FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU
81 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
82 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.wfDisplayBootMenu
83 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgBootEnableMenu
84 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag
85 at MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup, dw g_rgwChoiceToValueLookupForEnableBootMenu
86 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans
87 at MENUITEM.itemValue + ITEM_VALUE.fnValueReader, dw ValueReaderForEnableBootMenu
88iend
89
90g_MenuitemBootMnuStngsDefaultBootDrive:
91istruc MENUITEM
92 at MENUITEM.fnActivate, dw Menuitem_ActivateHexInputForMenuitemInDSSI
93 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
94 at MENUITEM.szName, dw g_szItemBootDrive
95 at MENUITEM.szQuickInfo, dw g_szNfoBootDrive
96 at MENUITEM.szHelp, dw g_szHelpBootDrive
97 at MENUITEM.bFlags, db FLG_MENUITEM_BYTEVALUE
98 at MENUITEM.bType, db TYPE_MENUITEM_HEX
99 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.bBootDrv
100 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgBootDrive
101 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 0
102 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 0FFh
103iend
104
105g_MenuitemBootMnuStngsSelectionTimeout:
106istruc MENUITEM
107 at MENUITEM.fnActivate, dw Menuitem_ActivateUnsignedInputForMenuitemInDSSI
108 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
109 at MENUITEM.szName, dw g_szItemBootTimeout
110 at MENUITEM.szQuickInfo, dw g_szNfoBootTimeout
111 at MENUITEM.szHelp, dw g_szHelpBootTimeout
112 at MENUITEM.bFlags, db NULL
113 at MENUITEM.bType, db TYPE_MENUITEM_UNSIGNED
114 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.wBootTimeout
115 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgBootTimeout
116 at MENUITEM.itemValue + ITEM_VALUE.wMinValue, dw 2
117 at MENUITEM.itemValue + ITEM_VALUE.wMaxValue, dw 1092
118iend
119
120g_MenuitemBootMnuStngsSwapBootDriveNumbers:
121istruc MENUITEM
122 at MENUITEM.fnActivate, dw Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
123 at MENUITEM.fnFormatValue, dw MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
124 at MENUITEM.szName, dw g_szItemBootSwap
125 at MENUITEM.szQuickInfo, dw g_szNfoBootSwap
126 at MENUITEM.szHelp, dw g_szHelpBootSwap
127 at MENUITEM.bFlags, db FLG_MENUITEM_FLAGVALUE
128 at MENUITEM.bType, db TYPE_MENUITEM_MULTICHOICE
129 at MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset, dw ROMVARS.wFlags
130 at MENUITEM.itemValue + ITEM_VALUE.szDialogTitle, dw g_szDlgBootSwap
131 at MENUITEM.itemValue + ITEM_VALUE.szMultichoice, dw g_szMultichoiceBooleanFlag
132 at MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup, dw g_rgszValueToStringLookupForFlagBooleans
133 at MENUITEM.itemValue + ITEM_VALUE.wValueBitmask, dw FLG_ROMVARS_DRVXLAT
134iend
135
136
137g_rgwChoiceToValueLookupForEnableBootMenu:
138 dw FALSE
139 dw BOOT_MENU_DEFAULT_TIMEOUT
140
141g_rgwChoiceToValueLookupForDisplayModes:
142 dw DEFAULT_TEXT_MODE
143 dw CGA_TEXT_MODE_BW40
144 dw CGA_TEXT_MODE_CO40
145 dw CGA_TEXT_MODE_BW80
146 dw CGA_TEXT_MODE_CO80
147 dw MDA_TEXT_MODE
148g_rgszValueToStringLookupForDisplayModes:
149 dw g_szValueBootDispModeBW40
150 dw g_szValueBootDispModeCO40
151 dw g_szValueBootDispModeBW80
152 dw g_szValueBootDispModeCO80
153 dw g_szValueBootDispModeDefault
154 dw NULL
155 dw NULL
156 dw g_szValueBootDispModeMono
157
158g_rgszValueToStringLookupForFloppyDrives:
159 dw g_szValueBootFloppyDrvsAuto
160 dw g_szValueBootFloppyDrvs1
161 dw g_szValueBootFloppyDrvs2
162 dw g_szValueBootFloppyDrvs3
163 dw g_szValueBootFloppyDrvs4
164
165
166; Section containing code
167SECTION .text
168
169;--------------------------------------------------------------------
170; BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
171; Parameters:
172; SS:BP: Menu handle
173; Returns:
174; Nothing
175; Corrupts registers:
176; All, except BP
177;--------------------------------------------------------------------
178ALIGN JUMP_ALIGN
179BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility:
180 push cs
181 pop ds
182 call EnableOrDisableBootMenuSettings
183 mov si, g_MenupageForBootMenuSettingsMenu
184 jmp Menupage_ChangeToNewMenupageInDSSI
185
186
187;--------------------------------------------------------------------
188; EnableOrDisableBootMenuSettings
189; Parameters:
190; SS:BP: Menu handle
191; Returns:
192; Nothing
193; Corrupts registers:
194; AX, BX
195;--------------------------------------------------------------------
196ALIGN JUMP_ALIGN
197EnableOrDisableBootMenuSettings:
198 mov bx, [cs:g_MenuitemBootMnuStngsEnableBootMenu+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
199 call Buffers_GetRomvarsValueToAXfromOffsetInBX
200 test ax, ax
201 mov al, FLG_MENUITEM_VISIBLE
202 jz SHORT .DisableBootMenuSettings
203
204 ; Enable boot menu related
205 or [g_MenuitemBootMnuStngsDefaultBootDrive+MENUITEM.bFlags], al
206 or [g_MenuitemBootMnuStngsSelectionTimeout+MENUITEM.bFlags], al
207 or [g_MenuitemBootMnuStngsSwapBootDriveNumbers+MENUITEM.bFlags], al
208 ret
209
210.DisableBootMenuSettings:
211 not ax
212 and [g_MenuitemBootMnuStngsDefaultBootDrive+MENUITEM.bFlags], al
213 and [g_MenuitemBootMnuStngsSelectionTimeout+MENUITEM.bFlags], al
214 and [g_MenuitemBootMnuStngsSwapBootDriveNumbers+MENUITEM.bFlags], al
215 ret
216
217
218;--------------------------------------------------------------------
219; MENUITEM value reader functions
220; Parameters:
221; AX: Value from MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset
222; DS:SI: Ptr to MENUITEM
223; ES:DI: Ptr to value variable
224; Returns:
225; AX: Value with possible modifications
226; Corrupts registers:
227; Nothing
228;--------------------------------------------------------------------
229ALIGN JUMP_ALIGN
230ValueReaderForEnableBootMenu:
231 test ax, ax
232 jz SHORT .NoNeedToModify
233 mov ax, TRUE<<1
234.NoNeedToModify:
235 ret
Note: See TracBrowser for help on using the repository browser.