Index: trunk/BIOS_Drive_Information_Tool/Src/AtaInfo.asm
===================================================================
--- trunk/BIOS_Drive_Information_Tool/Src/AtaInfo.asm	(revision 611)
+++ trunk/BIOS_Drive_Information_Tool/Src/AtaInfo.asm	(revision 612)
@@ -243,5 +243,4 @@
 	mov		dx, TRANSLATEMODE_AUTO
 	call	AtaGeometry_GetLCHStoAXBLBHfromAtaInfoInESSIwithTranslateModeInDX
-	dec		ax					; Reserve diagnostics cylinder
 	MIN_U	ax, MAX_LCHS_CYLINDERS
 	jmp		Print_ModeFromDLandCHSfromAXLBH
Index: trunk/BIOS_Drive_Information_Tool/Src/Strings.asm
===================================================================
--- trunk/BIOS_Drive_Information_Tool/Src/Strings.asm	(revision 611)
+++ trunk/BIOS_Drive_Information_Tool/Src/Strings.asm	(revision 612)
@@ -22,5 +22,5 @@
 
 g_szProgramName:	db	"BIOS Drive Information Tool v1.0.3",CR,LF
-					db	"(C) 2012-2018 by XTIDE Universal BIOS Team",CR,LF
+					db	"(C) 2012-2021 by XTIDE Universal BIOS Team",CR,LF
 					db	"Released under GNU GPL v2",CR,LF
 					db	"http://xtideuniversalbios.org/",CR,LF,NULL
Index: trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 611)
+++ trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 612)
@@ -173,6 +173,6 @@
 	; Output Sector Address High (only used by LBA48)
 %ifdef MODULE_EBIOS
-	eMOVZX	ax, [bp+IDEPACK.bLbaLowExt]		; Zero sector count
-	xchg	al, ah		; LBA low ext to AH, zero sectors to AL
+	mov		ah, [bp+IDEPACK.bLbaLowExt]
+	xor		al, al							; Zero sector count
 	mov		cx, [bp+IDEPACK.wLbaMiddleAndHighExt]
 	call	OutputSectorCountAndAddress
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm	(revision 611)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH8h_HParams.asm	(revision 612)
@@ -102,5 +102,5 @@
 AH8h_GetDriveParameters:
 	call	AccessDPT_GetLCHStoAXBLBH
-	call	AH8h_LimitAXtoMaximumLCylinders
+	call	AtaGeometry_LimitAXtoMaximumLCylinders
 	; Fall to .PackReturnValues
 
@@ -136,18 +136,4 @@
 	eSHR_IM	bl, FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION
 %endif
-	ret
-
-
-;--------------------------------------------------------------------
-; AH8h_LimitAXtoMaximumLCylinders
-;	Parameters:
-;		AX:		Number of total L-CHS cylinders (1...1027)
-;	Returns:
-;		AX:		Number of usable L-CHS cylinders (1...1024)
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
-AH8h_LimitAXtoMaximumLCylinders:
-	MIN_U	ax, MAX_LCHS_CYLINDERS
 	ret
 
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm	(revision 611)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AtaGeometry.asm	(revision 612)
@@ -84,5 +84,5 @@
 	dec		dx						; Set ZF if TRANSLATEMODE_LARGE, SF if TRANSLATEMODE_NORMAL
 	jns		SHORT .CheckIfLargeTranslationWanted
-	call	AH8h_LimitAXtoMaximumLCylinders	; TRANSLATEMODE_NORMAL maximum cylinders
+	call	AtaGeometry_LimitAXtoMaximumLCylinders	; TRANSLATEMODE_NORMAL maximum cylinders
 	inc		dx
 .CheckIfLargeTranslationWanted:
@@ -239,4 +239,9 @@
 	mov		bl, [es:si+ATA1.wHeadCnt]	; Heads (1...16)
 	mov		bh, [es:si+ATA1.wSPT]		; Sectors per Track (1...63)
+%ifndef EXCLUDE_FROM_BIOSDRVS	; We want the true value in BIOSDRVS
+	; Some CF cards (for example Sandisk Ultra 16/32 GB) violates
+	; the ATA specification by reporting more than 16383 cylinders.
+	MIN_U	ax, MAX_PCHS_CYLINDERS		; Limit the count to avoid problems.
+%endif
 	ret
 
@@ -360,2 +365,16 @@
 	ret
 
+
+;--------------------------------------------------------------------
+; AtaGeometry_LimitAXtoMaximumLCylinders
+;	Parameters:
+;		AX:		Number of total L-CHS cylinders (1...1027)
+;	Returns:
+;		AX:		Number of usable L-CHS cylinders (1...1024)
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+AtaGeometry_LimitAXtoMaximumLCylinders:
+	MIN_U	ax, MAX_LCHS_CYLINDERS
+	ret
+
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm	(revision 611)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm	(revision 612)
@@ -96,5 +96,5 @@
 FillToESDIusingDPTfromDSSI:
 	mov		ax, [si+DPT.wLchsCylinders]
-	call	AH8h_LimitAXtoMaximumLCylinders
+	call	AtaGeometry_LimitAXtoMaximumLCylinders
 	test	BYTE [si+DPT.bFlagsLow], MASKL_DPT_TRANSLATEMODE
 	jz		SHORT FillStandardDPTtoESDIfromDPTinDSSI
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm	(revision 611)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm	(revision 612)
@@ -92,10 +92,10 @@
 g_szNfoMainFlash:		db	"Flash loaded BIOS image to EEPROM.",NULL
 g_szNfoMainSave:		db	"Save BIOS changes back to original file from which it was loaded.",NULL
-g_szNfoMainLicense:		db	"XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2019 by XTIDE Universal BIOS Team."
+g_szNfoMainLicense:		db	"XTIDE Universal BIOS and XTIDECFG Copyright (C) 2009-2010 by Tomi Tilli, 2011-2021 by XTIDE Universal BIOS Team."
 						db	" Released under GNU GPL v2, with ABSOLUTELY NO WARRANTY. Press ENTER for more details...",NULL
 g_szNfoMainHomePage:	db	"Visit http://xtideuniversalbios.org (home page) and http://vcfed.org/forum (support)",NULL
 
 g_szHelpMainLicense:	db	"XTIDE Universal BIOS and XTIDECFG Configuration program are Copyright 2009-2010 by Tomi Tilli,"
-						db	" 2011-2019 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
+						db	" 2011-2021 by XTIDE Universal BIOS Team. Released under GNU GPL v2. This software comes with ABSOLUTELY NO WARRANTY."
 						db	" This is free software, and you are welcome to redistribute it under certain conditions."
 						db	" See the LICENSE.TXT file that was included with this distribution,"
