Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 438)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 459)
@@ -163,5 +163,5 @@
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeEnIRQ
 	at	MENUITEM.szHelp,			dw	g_szHelpIdeEnIRQ
-	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
 	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOICE
 	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
@@ -332,11 +332,13 @@
 	push	cs
 	pop		ds
-	call	.EnableOrDisableIRQ
+	call	.DisableIRQchannelSelection
+	call	.EnableOrDisableEnableInterrupt
 	call	.EnableOrDisableSerial
 	mov		si, g_MenupageForIdeControllerMenu
 	jmp		Menupage_ChangeToNewMenupageInDSSI
 
-;--------------------------------------------------------------------
-; .EnableOrDisableIRQ
+
+;--------------------------------------------------------------------
+; .EnableOrDisableEnableInterrupt
 ;	Parameters:
 ;		SS:BP:	Menu handle
@@ -347,15 +349,46 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-.EnableOrDisableIRQ:
+.EnableOrDisableEnableInterrupt:
+	call	Buffers_GetRomvarsFlagsToAX
+	mov		bx, g_MenuitemIdeControllerEnableInterrupt
+	test	ax, FLG_ROMVARS_MODULE_IRQ
+	jz		SHORT .DisableMenuitemFromCSBX
+
+	mov		bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	mov		bx, g_MenuitemIdeControllerEnableInterrupt
+	cmp		al, DEVICE_SERIAL_PORT
+	jae		SHORT .DisableMenuitemFromCSBX
+	cmp		al, DEVICE_8BIT_XTCF
+	jbe		SHORT .DisableMenuitemFromCSBX
+
+	call	.EnableMenuitemFromCSBX
+	; Fall to .EnableOrDisableIRQchannelSelection
+
+;--------------------------------------------------------------------
+; .EnableOrDisableIRQchannelSelection
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableIRQchannelSelection:
 	mov		bx, [cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
 	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
 	mov		bx, g_MenuitemIdeControllerIdeIRQ
 	test	al, al
+	jnz		SHORT .EnableMenuitemFromCSBX
+.DisableIRQchannelSelection:
+	mov		bx, g_MenuitemIdeControllerIdeIRQ
 	jz		SHORT .DisableMenuitemFromCSBX
-	; Fall to .EnableMenuitemFromCSBX
-
-;--------------------------------------------------------------------
+	; Fall to .DisableMenuitemFromCSBX
+
+
+;--------------------------------------------------------------------
+; .DisableMenuitemFromCSBX
 ; .EnableMenuitemFromCSBX
-; .DisableMenuitemFromCSBX
 ;	Parameters:
 ;		CS:BX:	Ptr to MENUITEM
@@ -365,4 +398,9 @@
 ;		Nothing
 ;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.DisableMenuitemFromCSBX:
+	and		BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
+
 ALIGN JUMP_ALIGN
 .EnableMenuitemFromCSBX:
@@ -370,8 +408,4 @@
 	ret
 
-ALIGN JUMP_ALIGN
-.DisableMenuitemFromCSBX:
-	and		BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
-	ret
 
 .EnableOrDisableSerial:
@@ -382,7 +416,4 @@
 	call	.DisableMenuitemFromCSBX
 
-	mov		bx, g_MenuitemIdeControllerEnableInterrupt
-	call	.DisableMenuitemFromCSBX
-
 	mov		bx, g_MenuitemIdeControllerSerialBaud
 	call	.DisableMenuitemFromCSBX
@@ -396,5 +427,5 @@
 	mov		bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
 	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
-	cmp		al,DEVICE_SERIAL_PORT
+	cmp		al, DEVICE_SERIAL_PORT
 	jnz		.DisableAllSerial
 
@@ -418,7 +449,4 @@
 
 	mov		bx, g_MenuitemIdeControllerControlBlockAddress
-	call	.EnableMenuitemFromCSBX
-
-	mov		bx, g_MenuitemIdeControllerEnableInterrupt
 	call	.EnableMenuitemFromCSBX
 
