Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm	(revision 57)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/ConfigurationMenu.asm	(revision 59)
@@ -2,5 +2,5 @@
 ; Project name	:	XTIDE Universal BIOS Configurator v2
 ; Created date	:	24.10.2010
-; Last update	:	3.11.2010
+; Last update	:	18.11.2010
 ; Author		:	Tomi Tilli
 ; Description	:	"Configure XTIDE Universal BIOS" menu structs and functions.
@@ -13,4 +13,5 @@
 istruc MENUPAGE
 	at	MENUPAGE.fnEnter,			dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	MainMenu_EnterMenuOrModifyItemVisibility
 	at	MENUPAGE.wMenuitems,		dw	11
 iend
@@ -78,5 +79,5 @@
 g_MenuitemConfigurationBootMenuSettings:
 istruc MENUITEM
-	at	MENUITEM.fnActivate,		dw	BootMenuSettings
+	at	MENUITEM.fnActivate,		dw	BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
 	at	MENUITEM.szName,			dw	g_szItemCfgBootMenu
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgBootMenu
@@ -89,9 +90,9 @@
 istruc MENUITEM
 	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
-	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
 	at	MENUITEM.szName,			dw	g_szItemCfgBootLoader
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgBootLoader
 	at	MENUITEM.szHelp,			dw	g_szNfoCfgBootLoader
-	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE
 	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
 	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bBootLdrType
@@ -105,5 +106,5 @@
 istruc MENUITEM
 	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
-	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
 	at	MENUITEM.szName,			dw	g_szItemCfgFullMode
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgFullMode
@@ -178,4 +179,5 @@
 	call	.DisableAllIdeControllerMenuitems
 	call	.EnableIdeControllerMenuitemsBasedOnConfiguration
+	call	.EnableOrDisableBootMenuSettings
 	call	.EnableOrDisableKiBtoStealFromRAM
 	call	.EnableOrDisableIdeControllerCount
@@ -229,6 +231,5 @@
 ALIGN JUMP_ALIGN
 .GetIdeControllerCountToCX:
-	mov		bx, ROMVARS.wFlags
-	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	call	Buffers_GetRomvarsFlagsToAX
 	test	ax, FLG_ROMVARS_FULLMODE
 	jz		SHORT .AllowOnlyOneIdeControllerInLiteMode
@@ -243,4 +244,24 @@
 	ret
 
+
+;--------------------------------------------------------------------
+; .EnableOrDisableBootMenuSettings
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableBootMenuSettings:
+	mov		bx, ROMVARS.bBootLdrType
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	mov		bx, g_MenuitemConfigurationBootMenuSettings
+	cmp		ax, BYTE BOOTLOADER_TYPE_MENU
+	jne		SHORT .DisableMenuitemFromCSBX
+	jmp		SHORT .EnableMenuitemFromCSBX
+
+
 ;--------------------------------------------------------------------
 ; .EnableOrDisableKiBtoStealFromRAM
@@ -254,6 +275,5 @@
 ALIGN JUMP_ALIGN
 .EnableOrDisableKiBtoStealFromRAM:
-	mov		bx, ROMVARS.wFlags
-	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	call	Buffers_GetRomvarsFlagsToAX
 	mov		bx, g_MenuitemConfigurationKiBtoStealFromRAM
 	test	ax, FLG_ROMVARS_FULLMODE
@@ -272,6 +292,5 @@
 ALIGN JUMP_ALIGN
 .EnableOrDisableIdeControllerCount:
-	mov		bx, ROMVARS.wFlags
-	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	call	Buffers_GetRomvarsFlagsToAX
 	mov		bx, g_MenuitemConfigurationIdeControllers
 	test	ax, FLG_ROMVARS_FULLMODE
@@ -339,7 +358,2 @@
 	call	IdeControllerMenu_InitializeToIdevarsOffsetInBX
 	jmp		IdeControllerMenu_EnterMenuOrModifyItemVisibility
-
-
-ALIGN JUMP_ALIGN
-BootMenuSettings:
-	ret
