Index: /trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 410)
+++ /trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 411)
@@ -45,20 +45,32 @@
 	MASKL_DPT_CHS_SHIFT_COUNT					EQU	(7<<0)	; Bits 0...2, P-CHS to L-CHS bit shift count (0...4)
 	FLGL_DPT_SLAVE								EQU	FLG_DRVNHEAD_DRV	; (1<<4), Drive is slave drive
-	MASKL_DPT_ADDRESSING_MODE					EQU	(3<<5)	; Bits 5..6, Addressing Mode (bit 6 == FLG_DRVNHEAD_LBA)
+	MASKL_DPT_ADDRESSING_MODE					EQU	(3<<ADDRESSING_MODE_FIELD_POSITION)	; Bits 5..6, Addressing Mode (bit 6 == FLG_DRVNHEAD_LBA)
+%ifdef MODULE_IRQ
 	FLGL_DPT_ENABLE_IRQ							EQU	(1<<7)
+%endif
 
 	; Bit definitions for DPT.bFlagsHigh
 	FLGH_DPT_BLOCK_MODE_SUPPORTED				EQU	(1<<1)	; Use block transfer commands (must be bit 1!)
+%ifdef MODULE_SERIAL
 	FLGH_DPT_SERIAL_DEVICE						EQU	(1<<2)	; Serial Port Device
+%endif
+%ifdef MODULE_IRQ
 	FLGH_DPT_INTERRUPT_IN_SERVICE				EQU	(1<<3)	; Set when waiting for IRQ
+%endif
+%ifdef MODULE_FEATURE_SETS
 	FLGH_DPT_POWER_MANAGEMENT_SUPPORTED			EQU (1<<5)
+%endif
 
 	; IDE device only
+%ifdef MODULE_ADVANCED_ATA
 	FLGH_DPT_IORDY								EQU	(1<<7)	; Controller and Drive supports IORDY
+%endif
 
 	; Serial device only
+%ifdef MODULE_SERIAL_FLOPPY
 	FLGH_DPT_SERIAL_FLOPPY						EQU	(1<<4)
 	FLGH_DPT_SERIAL_FLOPPY_TYPE_MASK			EQU	0e0h
 	FLGH_DPT_SERIAL_FLOPPY_TYPE_FIELD_POSITION	EQU	5
+%endif
 
 	; Addressing modes for DPT.wFlags
@@ -67,5 +79,7 @@
 	ADDRESSING_MODE_PCHS						EQU		1	; P-CHS Addressing Mode (LARGE in many other BIOSes)
 	ADDRESSING_MODE_LBA28						EQU		2	; 28-bit LBA Addressing Mode
+%ifdef MODULE_EBIOS
 	ADDRESSING_MODE_LBA48						EQU		3	; 48-bit LBA Addressing Mode
+%endif
 
 
@@ -89,5 +103,4 @@
 	.bInitError				resb	1	; Flags for initialization errors
 endstruc
-%endif
 
 	; Flags for DPT_ADVANCED_ATA.bInitError
@@ -99,4 +112,5 @@
 	FLG_INITERROR_FAILED_TO_SET_PIO_MODE				EQU (1<<5)
 	FLG_INITERROR_FAILED_TO_INITIALIZE_STANDBY_TIMER	EQU	(1<<6)
+%endif
 
 
Index: /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 410)
+++ /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 411)
@@ -90,5 +90,5 @@
 	mov		dl, 1						; Sector count (required by IdeTransfer.asm)
 	mov		al, COMMAND_IDENTIFY_DEVICE
-	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_IDENTIFY_DEVICE, FLG_STATUS_DRQ)
+	mov		bx, TIMEOUT_AND_STATUS_TO_WAIT(TIMEOUT_DRQ, FLG_STATUS_DRQ)
 	call	Idepack_StoreNonExtParametersAndIssueCommandFromAL
 
Index: /trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm	(revision 410)
+++ /trunk/XTIDE_Universal_BIOS/Src/Initialization/AtaID.asm	(revision 411)
@@ -71,10 +71,14 @@
 ;--------------------------------------------------------------------
 .GetLbaSectorCount:
+%ifdef MODULE_EBIOS
 	test	BYTE [di+ATA6.wSetSup83+1], A6_wSetSup83_LBA48>>8
 	jz		SHORT .GetLba28SectorCount
+
+	; Get LBA48 sector count
 	mov		ax, [di+ATA6.qwLBACnt]
 	mov		dx, [di+ATA6.qwLBACnt+2]
 	mov		bx, [di+ATA6.qwLBACnt+4]
 	ret
+%endif
 
 .GetLba28SectorCount:
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 410)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 411)
@@ -68,4 +68,5 @@
 ALIGN JUMP_ALIGN
 AccessDPT_GetDeviceControlByteToAL:
+%ifdef MODULE_IRQ
 	xor		al, al
 	test	BYTE [di+DPT.bFlagsLow], FLGL_DPT_ENABLE_IRQ
@@ -73,4 +74,7 @@
 	or		al, FLG_DEVCONTROL_nIEN	; Disable IRQ
 .EnableDeviceIrq:
+%else
+	mov		al, FLG_DEVCONTROL_nIEN	; Disable IRQ
+%endif
 	ret
 
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 410)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 411)
@@ -74,8 +74,10 @@
 	mov		al, bh
 	and		ax, BYTE FLG_DRVNHEAD_DRV		; AL now has Master/Slave bit
+%ifdef MODULE_IRQ
 	cmp		[cs:bp+IDEVARS.bIRQ], ah		; Interrupts enabled?
 	jz		SHORT .StoreFlags				;  If not, do not set interrupt flag
 	or		al, FLGL_DPT_ENABLE_IRQ
 .StoreFlags:
+%endif
 	mov		[di+DPT.wFlags], ax
 	; Fall to .StoreAddressing
@@ -281,4 +283,5 @@
 	mov		[di+DPT.twLbaSectors+4], bx
 
+%ifdef MODULE_EBIOS
 	and		BYTE [di+DPT.bFlagsLow], ~MASKL_DPT_ADDRESSING_MODE
 	test	bx, bx
@@ -292,4 +295,5 @@
 	or		BYTE [di+DPT.bFlagsLow], ADDRESSING_MODE_LBA48<<ADDRESSING_MODE_FIELD_POSITION
 .SetLba28AddressingToDPT:
+%endif
 	or		BYTE [di+DPT.bFlagsLow], ADDRESSING_MODE_LBA28<<ADDRESSING_MODE_FIELD_POSITION
 	ret
