Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm	(revision 545)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm	(revision 547)
@@ -176,5 +176,5 @@
 ;		BL:		Number of L-CHS heads (?...240)
 ;		CX:		Number of bits shifted (0...3)
-;		DL:		ADDRESSING_MODE_NORMAL or ADDRESSING_MODE_LARGE
+;		DX:		ADDRESSING_MODE_NORMAL or ADDRESSING_MODE_LARGE
 ;	Corrupts registers:
 ;		Nothing
@@ -218,17 +218,17 @@
 ; ConvertPCHfromAXBLtoEnhancedCHinAXBL:
 ;	Parameters:
-;		AX:		Number of P-CHS cylinders (1...8192)
+;		AX:		Number of P-CHS cylinders (1...8192, or up to 17475 if fell from above)
 ;		BL:		Number of P-CHS heads (1...16)
 ;	Returns:
 ;		AX:		Number of L-CHS cylinders (?...1024)
-;		BL:		Number of L-CHS heads (?...128)
+;		BL:		Number of L-CHS heads (?...128, or up to 240 if fell from above)
 ;		CX:		Number of bits shifted (0...3)
-;		DL:		TRANSLATEMODE_NORMAL or TRANSLATEMODE_LARGE
+;		DX:		TRANSLATEMODE_NORMAL or TRANSLATEMODE_LARGE
 ;	Corrupts registers:
 ;		Nothing
 ;--------------------------------------------------------------------
 ConvertPCHfromAXBLtoEnhancedCHinAXBL:
+	cwd					; Assume TRANSLATEMODE_NORMAL
 	xor		cx, cx		; No bits to shift initially
-	xor		dl, dl		; Assume TRANSLATEMODE_NORMAL
 .ShiftIfMoreThan1024Cylinder:
 	cmp		ax, MAX_LCHS_CYLINDERS
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 545)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 547)
@@ -59,6 +59,28 @@
 ;--------------------------------------------------------------------
 BootVars_StoreDefaultDriveLettersToHotkeyVars:
-	mov		WORD [es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters], DEFAULT_FLOPPY_DRIVE_LETTER | (DEFAULT_HARD_DRIVE_LETTER<<8)
+	call	BootVars_GetLetterForFirstHardDriveToAX
+	mov		ah, DEFAULT_FLOPPY_DRIVE_LETTER
+	xchg	al, ah
+	mov		[es:BOOTVARS.hotkeyVars+HOTKEYVARS.wFddAndHddLetters], ax
 	ret
 
 %endif ; MODULE_HOTKEYS
+
+
+;--------------------------------------------------------------------
+; Returns letter for first hard disk. Usually it will be 'C' but it
+; can be higher if more than two floppy drives are found.
+;
+; BootVars_GetLetterForFirstHardDriveToAX
+;	Parameters:
+;		DS:		RAMVARS segment
+;	Returns:
+;		AX:		Upper case letter for first hard disk
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+BootVars_GetLetterForFirstHardDriveToAX:
+	call	FloppyDrive_GetCountToAX
+	add		al, DEFAULT_FLOPPY_DRIVE_LETTER		; First Hard Drive letter comes after last floppy drive letter...
+	MAX_U	al, DEFAULT_HARD_DRIVE_LETTER		; ...but it can never be 'A' or 'B'
+	ret
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 545)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 547)
@@ -109,5 +109,5 @@
 	; Store P-CHS and flags
 	call	AtaGeometry_GetPCHStoAXBLBHfromAtaInfoInESSI
-	dec		dx						; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL
+	dec		dl						; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL
 	js		SHORT .NothingToChange
 	jz		SHORT .LimitHeadsForLargeAddressingMode
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 545)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 547)
@@ -197,18 +197,2 @@
 	ret
 %endif
-
-
-%if 0							; unused...
-;--------------------------------------------------------------------
-; RamVars_IsDriveDetectionInProgress
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		ZF:		Set if drive detection is in progress (ROM initialization)
-;	Corrupts registers:
-;		None
-;--------------------------------------------------------------------
-RamVars_IsDriveDetectionInProgress:
-	cmp		WORD [RAMVARS.wSignature], RAMVARS_DRV_DETECT_SIGNATURE
-	ret
-%endif
