Index: trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc	(revision 408)
+++ trunk/XTIDE_Universal_BIOS/Inc/DeviceIDE.inc	(revision 410)
@@ -34,6 +34,6 @@
 TIMEOUT_DRDY			EQU		TIMEOUT_MOTOR_STARTUP
 %else
-TIMEOUT_BSY				EQU		(2000/55)	; 2000 ms
-TIMEOUT_DRDY			EQU		(2000/55)	; 2000 ms
+TIMEOUT_BSY				EQU		(2500/55)	; 2500 ms
+TIMEOUT_DRDY			EQU		(2500/55)	; 2500 ms
 %endif
 
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm	(revision 408)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeDPT.asm	(revision 410)
@@ -47,8 +47,23 @@
 .DetectPowerManagementSupport:
 	test	BYTE [es:si+ATA6.wSetSup82], A6_wSetSup82_POWERMAN
-	jz		.NoPowerManagementSupport
+	jz		SHORT .NoPowerManagementSupport
 	or		BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED
 .NoPowerManagementSupport:
 %endif ; MODULE_FEATURE_SETS
+
+
+;--------------------------------------------------------------------
+; .StoreDeviceType
+;	Parameters:
+;		DS:DI:	Ptr to Disk Parameter Table
+;		CS:BP:	Ptr to IDEVARS for the controller
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AL
+;--------------------------------------------------------------------
+.StoreDeviceType:
+	call	IdeDPT_StoreDeviceTypeFromIdevarsInCSBPtoDPTinDSDI
+
 
 ;--------------------------------------------------------------------
@@ -63,4 +78,5 @@
 .StoreBlockMode:
 	mov		BYTE [di+DPT_ATA.bBlockSize], 1
+
 
 %ifdef MODULE_ADVANCED_ATA
@@ -81,4 +97,5 @@
 	mov		[di+DPT_ADVANCED_ATA.bPioMode], al
 	or		[di+DPT.bFlagsHigh], ah
+
 
 ;--------------------------------------------------------------------
@@ -111,9 +128,11 @@
 .ChangeTo32bitDevice:
 	mov		BYTE [di+DPT_ATA.bDevice], DEVICE_32BIT_ATA
+.NoAdvancedControllerDetected:
+%endif	; MODULE_ADVANCED_ATA
 
-.NoAdvancedControllerDetected:
-	; Fall to IdeDPT_StoreDeviceTypeFromIdevarsInCSBPtoDPTinDSDI
 
-%endif	; MODULE_ADVANCED_ATA
+; End DPT
+	clc
+	ret
 
 
@@ -131,5 +150,3 @@
 	mov		al, [cs:bp+IDEVARS.bDevice]
 	mov		[di+DPT_ATA.bDevice], al
-; End DPT
-	clc
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 408)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 410)
@@ -20,4 +20,25 @@
 ; Section containing code
 SECTION .text
+
+;--------------------------------------------------------------------
+; STORE_ERROR_FLAG_TO_DPT
+;	Parameters:
+;		%1:		Error flag to set
+;		AH:		BIOS Error Code
+;		DS:DI:	Ptr to DPT
+;		CF:		Set if error code in AH
+;	Returns:
+;		CF:		Clear if no error
+;				Set if error flag was set
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro STORE_ERROR_FLAG_TO_DPT 1
+%ifdef MODULE_ADVANCED_ATA
+	mov		al, %1
+	call	SetErrorFlagFromALwithErrorCodeInAH
+%endif
+%endmacro
+
 
 ;--------------------------------------------------------------------
@@ -57,5 +78,5 @@
 ;--------------------------------------------------------------------
 AH9h_InitializeDriveForUse:
-	xor		ax, ax
+	xor		ax, ax				; Clear AH to assume no errors
 
 %ifdef MODULE_ADVANCED_ATA
@@ -69,9 +90,10 @@
 	jz		SHORT .ContinueInitialization
 	ret		; With AH and CF cleared
-	.ContinueInitialization:
+.ContinueInitialization:
 %endif
 
 	push	es
 	push	si
+
 
 ;;;	SelectDrive
@@ -80,10 +102,9 @@
 	mov		[bp+IDEPACK.bDrvAndHead], al
 	call	Device_SelectDrive
-
-%ifdef MODULE_ADVANCED_ATA
-	mov		al, FLG_INITERROR_FAILED_TO_SELECT_DRIVE
-	call	.SetErrorFlagFromALwithErrorCodeInAH
-%endif
-	jc		.ReturnWithErrorCodeInAH
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_SELECT_DRIVE
+	jnc		SHORT .ContinueInitializationSinceDriveSelectedSuccesfully
+	jmp		.ReturnWithErrorCodeInAH
+.ContinueInitializationSinceDriveSelectedSuccesfully:
+
 
 ;;;	InitializeDeviceParameters
@@ -99,10 +120,7 @@
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY)
 	call	Idepack_StoreNonExtParametersAndIssueCommandFromAL
-
-%ifdef MODULE_ADVANCED_ATA
-	mov		al, FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS
-	call	.SetErrorFlagFromALwithErrorCodeInAH
-%endif
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS
 .SkipInitializeDeviceParameters:
+
 
 ;;;	SetWriteCache
@@ -115,19 +133,13 @@
 	mov		si, [cs:bx+.rgbWriteCacheCommands]
 	call	AH23h_SetControllerFeatures
-
-%ifdef MODULE_ADVANCED_ATA
-	mov		al, FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE
-	call	.SetErrorFlagFromALwithErrorCodeInAH
-%endif
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_SET_WRITE_CACHE
 .SkipSetWriteCache:
+
 
 ;;;	RecalibrateDrive
 	; Recalibrate drive by seeking to cylinder 0
 	call	AH11h_RecalibrateDrive
-
-%ifdef MODULE_ADVANCED_ATA
-	mov		al, FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE
-	call	.SetErrorFlagFromALwithErrorCodeInAH
-%endif
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_RECALIBRATE_DRIVE
+
 
 ;;;	InitializeBlockMode
@@ -147,11 +159,8 @@
 	shr		bl, 1
 	jnc		SHORT .TryNextBlockSize
-
-%ifdef MODULE_ADVANCED_ATA
-	mov		al, FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE
-	call	.SetErrorFlagFromALwithErrorCodeInAH
-%endif
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_SET_BLOCK_MODE
 .BlockModeNotSupportedOrDisabled:
 .SupportedBlockSizeFound:
+
 
 %ifdef MODULE_ADVANCED_ATA
@@ -169,8 +178,7 @@
 	mov		si, FEATURE_SET_TRANSFER_MODE
 	call	AH23h_SetControllerFeatures
-
-	mov		al, FLG_INITERROR_FAILED_TO_SET_PIO_MODE
-	call	.SetErrorFlagFromALwithErrorCodeInAH
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_SET_PIO_MODE
 %endif ; MODULE_ADVANCED_ATA
+
 
 %ifdef MODULE_FEATURE_SETS
@@ -178,5 +186,5 @@
 	; Initialize the standby timer (if supported)
 	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_POWER_MANAGEMENT_SUPPORTED
-	jz		.NoPowerManagementSupport
+	jz		SHORT .NoPowerManagementSupport
 
 	mov		al, COMMAND_IDLE
@@ -184,22 +192,20 @@
 	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_BSY, FLG_STATUS_BSY)
 	call	Idepack_StoreNonExtParametersAndIssueCommandFromAL
-
-%ifdef MODULE_ADVANCED_ATA
-	mov		al, FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER
-	call	.SetErrorFlagFromALwithErrorCodeInAH
-%endif
+	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER
 .NoPowerManagementSupport:
 %endif ; MODULE_FEATURE_SETS
 
+
 	; There might have been several errors so just return one error code for them all
+.ReturnWithErrorCodeInAH:
 %ifdef MODULE_ADVANCED_ATA
 	mov		ah, [di+DPT_ADVANCED_ATA.bInitError]
 	test	ah, ah	; Clears CF
-	jz		SHORT .ReturnWithErrorCodeInAH
+	jz		SHORT .ReturnWithSuccess
 	mov		ah, RET_HD_RESETFAIL
 	stc
-%endif
-
-.ReturnWithErrorCodeInAH:
+.ReturnWithSuccess:
+%endif
+
 	pop		si
 	pop		es
@@ -207,11 +213,20 @@
 
 
-%ifdef MODULE_ADVANCED_ATA
-;--------------------------------------------------------------------
-; .SetErrorFlagFromALwithErrorCodeInAH
+.rgbWriteCacheCommands:
+	db		0								; DEFAULT_WRITE_CACHE
+	db		FEATURE_DISABLE_WRITE_CACHE		; DISABLE_WRITE_CACHE
+	db		FEATURE_ENABLE_WRITE_CACHE		; ENABLE_WRITE_CACHE
+
+
+
+%ifdef MODULE_ADVANCED_ATA
+;--------------------------------------------------------------------
+; SetErrorFlagFromALwithErrorCodeInAH
 ;	Parameters:
 ;		AH:		BIOS Error Code
 ;		AL:		Error flag to set
 ;		DS:DI:	Ptr to DPT
+;		CF:		Set if error code in AH
+;				Clear if AH = 0
 ;	Returns:
 ;		CF:		Clear if no error
@@ -220,11 +235,10 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-.IgnoreInvalidCommandError:
+IgnoreInvalidCommandError:
 	xor		ah, ah	; Clears CF
-
-.SetErrorFlagFromALwithErrorCodeInAH:
+SetErrorFlagFromALwithErrorCodeInAH:
 	jnc		SHORT .NoErrorFlagToSet
 	cmp		ah, RET_HD_INVALID
-	jbe		SHORT .IgnoreInvalidCommandError
+	jbe		SHORT IgnoreInvalidCommandError
 
 	or		[di+DPT_ADVANCED_ATA.bInitError], al
@@ -234,8 +248,2 @@
 
 %endif
-
-
-.rgbWriteCacheCommands:
-	db		0								; DEFAULT_WRITE_CACHE
-	db		FEATURE_DISABLE_WRITE_CACHE		; DISABLE_WRITE_CACHE
-	db		FEATURE_ENABLE_WRITE_CACHE		; ENABLE_WRITE_CACHE
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 408)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/HotkeyBar.asm	(revision 410)
@@ -209,4 +209,5 @@
 ;		CF:		Set if selected hotkey
 ;				Cleared if unselected hotkey
+;		ES:		BDA segment (zero)
 ;	Returns:
 ;		DX:		Description Attribute
@@ -234,10 +235,19 @@
 
 GetSelectedHotkeyDescriptionAttributeToDX:
-	mov		dl, MONO_REVERSE_BLINK
-	ret
+	mov		dx, (COLOR_ATTRIBUTE(COLOR_YELLOW, COLOR_CYAN) << 8) | MONO_REVERSE_BLINK
+	jmp		SHORT SelectAttributeFromDHorDLbasedOnVideoMode
 
 GetNonSelectedHotkeyDescriptionAttributeToDX:
-	mov		dl, MONO_REVERSE
-	ret
+	mov		dx, (COLOR_ATTRIBUTE(COLOR_BLACK, COLOR_CYAN) << 8) | MONO_REVERSE
+SelectAttributeFromDHorDLbasedOnVideoMode:
+	mov		al, [es:BDA.bVidMode]
+	shr		al, 1
+	jnc		SHORT .AttributeLoadedToDL	; Black & White modes
+	shr		al, 1
+	jnz		SHORT .AttributeLoadedToDL	; MDA
+	mov		dl, dh
+.AttributeLoadedToDL:
+	ret
+
 %endif
 
