Index: trunk/XTIDE_Universal_BIOS/Inc/CompatibleDPT.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/CompatibleDPT.inc	(revision 96)
+++ 	(revision )
@@ -1,46 +1,0 @@
-; File name		:	CompatibleDPT.inc
-; Project name	:	IDE BIOS
-; Created date	:	6.4.2010
-; Last update	:	6.4.2010
-; Author		:	Tomi Tilli
-; Description	:	Structs for standard DPTs used for software
-;					compatibility.
-%ifndef COMPATIBLEDPT_INC
-%define COMPATIBLEDPT_INC
-
-; Fixed Disk Parameter table used for drives with capacity up to 504 MiB
-struc COMPATIBLE_FDPT
-	.wCyls			resb	2	; 0, Maximum number of cylinders
-	.bHeads			resb	1	; 2, Maximum number of heads
-	.wRedWrCyl		resb	2	; 3, Starting cylinder for reduced write current (MFM)
-	.wWrPreCmpCyl	resb	2	; 5, Starting write precompensation cylinder (MFM)
-	.bMaxECCLen		resb	1	; 7, Maximum ECC data burst length (MFM)
-	.bDrvCtrl		resb	1	; 8, Control Byte
-	.bNormTimeout	resb	1	; 9, Normal timeout value
-	.bFormatTimeout	resb	1	; 10, Timeout value for format disk drive
-	.bCheckTimeout	resb	1	; 11, Timeout value for check disk drive
-	.wLZoneCyl		resb	2	; 12, Landing zone cylinder
-	.bSectPerTrack	resb	1	; 14, Number of sectors per track
-					resb	1	; 15, unused
-endstruc
-
-
-; Fixed Disk Parameter table used for drives with P-CHS or LBA addressing
-struc COMPATIBLE_EDPT
-	.wLCyls			resb	2	; 0, L-CHS cylinders (1...1024)
-	.bLHeads		resb	1	; 2, L-CHS heads (1...255)
-	.bSignature		resb	1	; 3, EDPT signature (A0h)
-	.bPSect			resb	1	; 4, P-CHS sectors per track (1...63)
-					resb	3	; 5...7, unused
-	.bDrvCtrl		resb	1	; 8, Control Byte
-	.wPCyls			resb	2	; 9, P-CHS cylinders (1...16383)
-	.bPHeads		resb	1	; 11, P-CHS heads (1...16)
-					resb	2	; 12...13, unused
-	.bLSect			resb	1	; 14, L-CHS sectors per track (1...63)
-	.bChecksum		resb	1	; 15, Checksum of bytes 0 to 14		
-endstruc
-
-COMPATIBLE_EDPT_SIGNATURE	EQU		0A0h
-
-
-%endif ; COMPATIBLEDPT_INC
Index: trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Inc/RamVars.inc	(revision 97)
@@ -41,6 +41,4 @@
 	.ramVars		resb	RAMVARS_size
 	.wSign			resb	2			; FULLRAMVARS signature for finding segment
-	.drv80hCompDPT	resb	COMPATIBLE_FDPT_size
-	.drv81hCompDPT	resb	COMPATIBLE_FDPT_size
 endstruc
 
Index: trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 97)
@@ -13,5 +13,5 @@
 	.rgbSign		resb	8	; Signature for XTIDE Configurator Program
 	.szTitle		resb	31	; BIOS title string
-	.szVersion		resb	23	; BIOS version string
+	.szVersion		resb	25	; BIOS version string
 
 	.wFlags			resb	2	; Word for ROM flags
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 97)
@@ -45,9 +45,11 @@
 DetectDrives_WithIDEVARS:
 	push	cx
-	call	DetectPrint_StartingMasterDetect	; Print detection string
+	mov		ax, g_szMaster
+	call	DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
 	call	DetectDrives_DetectMasterDrive		; Detect and create DPT + BOOTNFO
 	call	DetectPrint_DriveNameOrNotFound		; Print found or not found string
 
-	call	DetectPrint_StartingSlaveDetect
+	mov		ax, g_szSlave
+	call	DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
 	call	DetectDrives_DetectSlaveDrive
 	call	DetectPrint_DriveNameOrNotFound
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm	(revision 97)
@@ -16,10 +16,8 @@
 ;		AX, SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 DetectPrint_RomFoundAtSegment:
 	push	bp
-
+	mov		bp, sp
 	mov		si, g_szRomAt
-	mov		bp, sp
 	ePUSH_T	ax, ROMVARS.szTitle			; Bios title string
 	push	cs							; BIOS segment
@@ -28,28 +26,5 @@
 
 ;--------------------------------------------------------------------
-; Displays IDE drive detection string for specific device.
-;
-; DetectPrint_StartingMasterDetect
-; DetectPrint_StartingSlaveDetect
-;	Parameters:
-;		CS:BP:	Ptr to IDEVARS
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, SI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-DetectPrint_StartingMasterDetect:
-	mov		ax, g_szMaster
-	jmp		SHORT DetectPrint_StartingDriveDetect
-ALIGN JUMP_ALIGN
-DetectPrint_StartingSlaveDetect:
-	mov		ax, g_szSlave
-	; Fall to DetectPrint_StartingDriveDetect
-
-;--------------------------------------------------------------------
-; Displays IDE drive detection string.
-;
-; DetectPrint_StartingDriveDetect
+; DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP
 ;	Parameters:
 ;		CS:AX:	Ptr to "Master" or "Slave" string
@@ -60,8 +35,6 @@
 ;		AX, SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-DetectPrint_StartingDriveDetect:
+DetectPrint_StartDetectWithMasterOrSlaveStringInAXandIdeVarsInCSBP:
 	push	bp
-
 	mov		si, [cs:bp+IDEVARS.wPort]
 	mov		bp, sp
@@ -86,5 +59,4 @@
 ;		AX, SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 DetectPrint_DriveNameOrNotFound:
 	push	di
@@ -101,5 +73,4 @@
 	ret
 
-ALIGN JUMP_ALIGN
 .PrintDriveNotFound:
 	mov		si, g_szNotFound
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/Initialize.asm	(revision 97)
@@ -17,5 +17,4 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Initialize_FromMainBiosRomSearch:
 	pushf
@@ -53,5 +52,4 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Initialize_ShouldSkip:
 	sti										; Enable interrupts
@@ -67,22 +65,41 @@
 ;		ES:		BDA Segment
 ;	Returns:
-;		Nothing
+;		DS:		RAMVARS segment
 ;	Corrupts registers:
-;		All, including segments
+;		All
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Initialize_AndDetectDrives:
 	call	DetectPrint_RomFoundAtSegment
 	call	RamVars_Initialize
-	call	RamVars_GetSegmentToDS
 	call	Interrupts_InitializeInterruptVectors
 	call	DetectDrives_FromAllIDEControllers
-	call	CompatibleDPT_CreateForDrives80hAnd81h
+	; Fall to .StoreDptPointersToBDA
+
+;--------------------------------------------------------------------
+; .StoreDptPointersToBDA
+;	Parameters:
+;		DS:		RAMVARS segment
+;		ES:		BDA and interrupt vector segment (zero)
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		DX, DI
+;--------------------------------------------------------------------
+.StoreDptPointersToBDA:
+	mov		dl, 80h
+	call	FindDPT_ForDriveNumber	; DPT to DS:DI
+	jnc		SHORT .FindForDrive81h	; Store nothing if not our drive
+	mov		[es:INTV_HD0DPT*4], di
+	mov		[es:INTV_HD0DPT*4+2], ds
+.FindForDrive81h:
+	inc		dx
+	call	FindDPT_ForDriveNumber
+	jnc		SHORT .ResetDetectedDrives
+	mov		[es:INTV_HD1DPT*4], di
+	mov		[es:INTV_HD1DPT*4+2], ds
 	; Fall to .ResetDetectedDrives
 
 ;--------------------------------------------------------------------
-; Resets all hard disks.
-;
-; Initialize_ResetDetectedDrives
+; .ResetDetectedDrives
 ;	Parameters:
 ;		DS:		RAMVARS segment
@@ -92,5 +109,4 @@
 ;		AX, BX, CX, DX, DI
 ;--------------------------------------------------------------------
-;ALIGN JUMP_ALIGN
 .ResetDetectedDrives:
 	jmp		AH0h_ResetHardDisksHandledByOurBIOS
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/Interrupts.asm	(revision 97)
@@ -15,14 +15,9 @@
 ;		All except segments
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Interrupts_InitializeInterruptVectors:
-	call	Interrupts_InitializeInt13hAnd40h
-	call	Interrupts_InitializeInt19h
-	jmp		SHORT Interrupts_InitializeHardwareIrqHandlers
-	; Maybe all this should be inlined?
-
-
-;--------------------------------------------------------------------
-; Interrupts_Int13hAnd40h
+	; Fall to .InitializeInt13hAnd40h
+
+;--------------------------------------------------------------------
+; .InitializeInt13hAnd40h
 ;	Parameters:
 ;		DS:		RAMVARS segment
@@ -33,6 +28,5 @@
 ;		AX, BX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Interrupts_InitializeInt13hAnd40h:
+.InitializeInt13hAnd40h:
 	mov		ax, [es:INTV_DISK_FUNC*4]			; Load old INT 13h offset
 	mov		dx, [es:INTV_DISK_FUNC*4+2]			; Load old INT 13h segment
@@ -47,13 +41,11 @@
 	; 40h from 13h. That system locks to infinite loop if we copy 13h to 40h.
 	call	FloppyDrive_IsInt40hInstalled
-	jc		SHORT .Return
-	mov		[es:INTV_FLOPPY_FUNC*4], ax		; Store offset
-	mov		[es:INTV_FLOPPY_FUNC*4+2], dx	; Store segment
-.Return:
-	ret
-
-
-;--------------------------------------------------------------------
-; Interrupts_InitializeInt19h
+	jc		SHORT .InitializeInt19h
+	mov		[es:INTV_FLOPPY_FUNC*4], ax		; Store old INT 13h offset
+	mov		[es:INTV_FLOPPY_FUNC*4+2], dx	; Store old INT 13h segment
+	; Fall to .InitializeInt19h
+
+;--------------------------------------------------------------------
+; .InitializeInt19h
 ;	Parameters:
 ;		DS:		RAMVARS segment
@@ -64,13 +56,12 @@
 ;		BX, SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Interrupts_InitializeInt19h:
+.InitializeInt19h:
 	mov		bx, INTV_BOOTSTRAP
 	mov		si, Int19hMenu_BootLoader
-	jmp		Interrupts_InstallHandlerToVectorInBXFromCSSI
-
-
-;--------------------------------------------------------------------
-; Interrupts_InitializeHardwareIrqHandlers
+	call	Interrupts_InstallHandlerToVectorInBXFromCSSI
+	; Fall to .InitializeHardwareIrqHandlers
+
+;--------------------------------------------------------------------
+; .InitializeHardwareIrqHandlers
 ;	Parameters:
 ;		ES:		BDA and Interrupt Vector segment (zero)
@@ -80,9 +71,7 @@
 ;		BX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-Interrupts_InitializeHardwareIrqHandlers:
+.InitializeHardwareIrqHandlers:
 	call	RamVars_GetIdeControllerCountToCX
 	mov		di, ROMVARS.ideVars0			; CS:SI points to first IDEVARS
-ALIGN JUMP_ALIGN
 .IdeControllerLoop:
 	eMOVZX	bx, BYTE [cs:di+IDEVARS.bIRQ]
@@ -103,5 +92,4 @@
 ;		BX, SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 .InstallLowOrHighIrqHandler:
 	test	bl, bl
@@ -121,6 +109,5 @@
 ;		BX, SI
 ;--------------------------------------------------------------------
-;ALIGN JUMP_ALIGN
-;.InstallHighIrqHandler:
+.InstallHighIrqHandler:
 	add		bx, BYTE INTV_IRQ8 - 8			; Interrupt vector number
 	mov		si, HIRQ_InterruptServiceRoutineForIrqs8to15
@@ -137,5 +124,4 @@
 ;		BX, SI
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 .InstallLowIrqHandler:
 	add		bx, BYTE INTV_IRQ0				; Interrupt vector number
@@ -155,5 +141,4 @@
 ;		BX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Interrupts_InstallHandlerToVectorInBXFromCSSI:
 	eSHL_IM	bx, 2					; Shift for DWORD offset
@@ -172,5 +157,4 @@
 ;		AX, BX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 Interrupts_UnmaskInterruptControllerForDriveInDSDI:
 	eMOVZX	bx, BYTE [di+DPT.bIdeOff]
@@ -191,6 +175,5 @@
 ;		AX, DX
 ;--------------------------------------------------------------------
-;ALIGN JUMP_ALIGN
-;.UnmaskHighIrqController:
+.UnmaskHighIrqController:
 	sub		al, 8				; Slave interrupt number
 	mov		dx, PORT_8259SL_IMR	; Load Slave Mask Register address
@@ -208,5 +191,4 @@
 ;		AX, DX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 .UnmaskLowIrqController:
 	mov		dx, PORT_8259MA_IMR	; Load Mask Register address
@@ -223,5 +205,4 @@
 ;		AX
 ;--------------------------------------------------------------------
-;ALIGN JUMP_ALIGN
 .ClearBitFrom8259MaskRegister:
 	push	cx
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 97)
@@ -12,4 +12,5 @@
 ORG 000h						; Code start offset 0000h
 
+
 ; Included .inc files
 %include "AssemblyLibrary.inc"	; Assembly Library. Must be included first!
@@ -21,5 +22,4 @@
 %include "Int13h.inc"			; Equates for INT 13h functions
 %include "CustomDPT.inc"		; For Disk Parameter Table
-%include "CompatibleDPT.inc"	; For standard Disk Parameter Tables
 %include "RomVars.inc"			; For ROMVARS and IDEVARS structs
 %include "RamVars.inc"			; For RAMVARS struct
@@ -48,5 +48,5 @@
 		db	" (XT)=-",NULL
 %endif
-	at	ROMVARS.szVersion,	db	"v1.2.0_wip (01/27/11)",NULL	; mm/dd/yy
+	at	ROMVARS.szVersion,	db	"v1.2.0_wip (",__DATE__,")",NULL
 
 ;---------------------------;
@@ -113,5 +113,4 @@
 %include "FindDPT.asm"			; For finding DPTs
 %include "AccessDPT.asm"		; For accessing DPTs
-%include "CompatibleDPT.asm"	; For creating compatible DPTs
 %include "BootInfo.asm"			; For creating BOOTNFO structs
 %include "AtaID.asm"			; For ATA Identify Device information
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CompatibleDPT.asm	(revision 96)
+++ 	(revision )
@@ -1,213 +1,0 @@
-; File name		:	CompatibleDPT.asm
-; Project name	:	IDE BIOS
-; Created date	:	6.4.2010
-; Last update	:	6.4.2010
-; Author		:	Tomi Tilli
-; Description	:	Functions for creating Disk Parameter Tables for
-;					software compatibility only. These DPTs are not used
-;					by our BIOS.
-
-; Section containing code
-SECTION .text
-
-;--------------------------------------------------------------------
-; Creates compatible for drives 80h and 81h. There will be stored
-; to interrupt vectors 41h and 46h.
-;
-; CompatibleDPT_CreateForDrives80hAnd81h
-;	Parameters:
-;		DS:		RAMVARS segment
-;		ES:		BDA segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		All except DS and ES
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-CompatibleDPT_CreateForDrives80hAnd81h:
-	; Only create compatible DPTs in full mode
-	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
-	jz		SHORT CompatibleDPT_StoreCustomDPTs
-
-	mov		dl, 80h
-	call	FindDPT_ForDriveNumber	; DPT to DS:DI
-	jnc		SHORT .CreateForDrive81h
-	call	CompatibleDPT_CreateForDrive80h
-ALIGN JUMP_ALIGN
-.CreateForDrive81h:
-	mov		dl, 81h
-	call	FindDPT_ForDriveNumber
-	jnc		SHORT .Return
-	call	CompatibleDPT_CreateForDrive81h
-ALIGN JUMP_ALIGN
-.Return:
-	ret
-
-
-;--------------------------------------------------------------------
-; Stores pointers to our custom DPTs for drives 80h and 81h.
-;
-; CompatibleDPT_StoreCustomDPTs
-;	Parameters:
-;		ES:		BDA and interrupt vector segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		DX, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-CompatibleDPT_StoreCustomDPTs:
-	mov		dl, 80h
-	call	FindDPT_ForDriveNumber	; DPT to DS:DI
-	jnc		SHORT .FindForDrive81h
-	mov		[es:INTV_HD0DPT*4], di
-	mov		[es:INTV_HD0DPT*4+2], ds
-ALIGN JUMP_ALIGN
-.FindForDrive81h:
-	inc		dx
-	call	FindDPT_ForDriveNumber
-	jnc		SHORT .Return
-	mov		[es:INTV_HD1DPT*4], di
-	mov		[es:INTV_HD1DPT*4+2], ds
-ALIGN JUMP_ALIGN
-.Return:
-	ret
-
-
-;--------------------------------------------------------------------
-; Copies parameters from our custom DPT struct to a
-; standard COMPATIBLE_FDPT or COMPATIBLE_EDPT struct.
-;
-; CompatibleDPT_CreateForDrive80h
-; CompatibleDPT_CreateForDrive81h
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		ES:		BDA and interrupt vector segment (zero)
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-CompatibleDPT_CreateForDrive80h:
-	mov		si, FULLRAMVARS.drv80hCompDPT	; DS:SI now points compatible DPT
-	call	CompatibleDPT_CopyFromCustom
-	mov		[es:INTV_HD0DPT*4], si
-	mov		[es:INTV_HD0DPT*4+2], ds
-	ret
-ALIGN JUMP_ALIGN
-CompatibleDPT_CreateForDrive81h:
-	mov		si, FULLRAMVARS.drv81hCompDPT	; DS:SI now points compatible DPT
-	call	CompatibleDPT_CopyFromCustom
-	mov		[es:INTV_HD1DPT*4], si
-	mov		[es:INTV_HD1DPT*4+2], ds
-	ret
-
-
-;--------------------------------------------------------------------
-; Copies parameters from our custom DPT struct to a
-; standard COMPATIBLE_FDPT or COMPATIBLE_EDPT struct.
-;
-; CompatibleDPT_CopyFromCustom
-;	Parameters:
-;		DS:SI:	Ptr to COMPATIBLE_FDPT or COMPATIBLE_EDPT
-;		DS:DI:	Ptr to DPT
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-CompatibleDPT_CopyFromCustom:
-	call	AccessDPT_GetLCHSfromPCHS			; AX=Lsects, BX=Lcyls, DX=Lheads
-	test	BYTE [di+DPT.bFlags], FLG_DPT_EBIOS	; Drive larger than 504 MiB?
-	jnz		SHORT CompatibleDPT_CopyFromCustomToEDPT
-	; Fall to CompatibleDPT_CopyFromCustomToFDPT
-
-;--------------------------------------------------------------------
-; Copies parameters from our custom DPT struct to a
-; standard COMPATIBLE_FDPT struct for drives up to 504 MiB.
-;
-; CompatibleDPT_CopyFromCustomToFDPT
-;	Parameters:
-;		AX:		L-CHS sectors per track
-;		BX:		L-CHS cylinders
-;		DX:		L-CHS heads
-;		DS:SI:	Ptr to COMPATIBLE_FDPT
-;		DS:DI:	Ptr to DPT
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX
-;--------------------------------------------------------------------
-;ALIGN JUMP_ALIGN
-CompatibleDPT_CopyFromCustomToFDPT:
-	mov		[si+COMPATIBLE_FDPT.wCyls], bx
-	mov		[si+COMPATIBLE_FDPT.bHeads], dl
-	mov		[si+COMPATIBLE_FDPT.bSectPerTrack], al
-	mov		WORD [si+COMPATIBLE_FDPT.wWrPreCmpCyl], -1
-	mov		al, [di+DPT.bDrvCtrl]
-	mov		[si+COMPATIBLE_FDPT.bDrvCtrl], al
-	mov		BYTE [si+COMPATIBLE_FDPT.bNormTimeout], B_TIMEOUT_BSY
-	mov		BYTE [si+COMPATIBLE_FDPT.bFormatTimeout], B_TIMEOUT_DRQ
-	mov		BYTE [si+COMPATIBLE_FDPT.bCheckTimeout], B_TIMEOUT_DRQ
-	dec		bx
-	mov		[si+COMPATIBLE_FDPT.wLZoneCyl], bx
-	ret
-
-
-;--------------------------------------------------------------------
-; Copies parameters from our custom DPT struct to a
-; standard COMPATIBLE_EDPT struct.
-;
-; CompatibleDPT_CopyFromCustomToEDPT
-;	Parameters:
-;		AX:		L-CHS sectors per track
-;		BX:		L-CHS cylinders
-;		DX:		L-CHS heads
-;		DS:SI:	Ptr to COMPATIBLE_EDPT
-;		DS:DI:	Ptr to DPT
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-CompatibleDPT_CopyFromCustomToEDPT:
-	mov		[si+COMPATIBLE_EDPT.wLCyls], bx
-	mov		[si+COMPATIBLE_EDPT.bLHeads], dl
-	mov		BYTE [si+COMPATIBLE_EDPT.bSignature], COMPATIBLE_EDPT_SIGNATURE
-	mov		[si+COMPATIBLE_EDPT.bPSect], al
-	mov		[si+COMPATIBLE_EDPT.bLSect], al
-	mov		al, [di+DPT.bDrvCtrl]
-	mov		[si+COMPATIBLE_EDPT.bDrvCtrl], al
-	mov		ax, [di+DPT.wPCyls]
-	mov		[si+COMPATIBLE_EDPT.wPCyls], ax
-	mov		al, [di+DPT.bPHeads]
-	mov		[si+COMPATIBLE_EDPT.bPHeads], al
-	; Fall to CompatibleDPT_StoreChecksum
-
-;--------------------------------------------------------------------
-; Stores checksum byte to the end of COMPATIBLE_EDPT struct.
-;
-; CompatibleDPT_StoreChecksum
-;	Parameters:
-;		DS:SI:	Ptr to COMPATIBLE_EDPT
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX
-;--------------------------------------------------------------------
-;ALIGN JUMP_ALIGN
-CompatibleDPT_StoreChecksum:
-	xor		ax, ax
-	xor		bx, bx
-	mov		cx, COMPATIBLE_EDPT_size-1
-ALIGN JUMP_ALIGN
-.SumLoop:
-	add		al, [bx+si]
-	inc		bx
-	loop	.SumLoop
-	neg		al
-	mov		[si+COMPATIBLE_EDPT.bChecksum], al
-	ret
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 96)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 97)
@@ -13,15 +13,11 @@
 ;		Nothing
 ;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, CX, DI, DS
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
+;		DS:		RAMVARS segment
+;	Corrupts registers:
+;		AX, CX, DI
+;--------------------------------------------------------------------
 RamVars_Initialize:
 	push	es
-	call	.StealMemoryForRAMVARS	; Get RAMVARS segment to DS even if no stealing
-	call	.ClearRamvarsFromDS
-	pop		es
-	jmp		DriveXlate_Reset
+	; Fall to .StealMemoryForRAMVARS
 
 ;--------------------------------------------------------------------
@@ -34,37 +30,47 @@
 ;		AX
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 .StealMemoryForRAMVARS:
 	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_FULLMODE
-	jz		SHORT RamVars_GetSegmentToDS
-
-	LOAD_BDA_SEGMENT_TO	ds, ax		; Zero AX
+	jz		SHORT .InitializeRamvars	; No need to steal RAM
+
+	LOAD_BDA_SEGMENT_TO	ds, ax			; Zero AX
 	mov		al, [cs:ROMVARS.bStealSize]
 	sub		[BDA.wBaseMem], ax
 	mov		ax, [BDA.wBaseMem]
-	eSHL_IM	ax, 6					; Segment to first stolen kB (*=40h)
+	eSHL_IM	ax, 6						; Segment to first stolen kB (*=40h)
 	mov		ds, ax
-	ret
-
-;--------------------------------------------------------------------
-; .ClearRamvarsFromDS
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		Nothing
+	mov		WORD [FULLRAMVARS.wSign], W_SIGN_FULLRAMVARS
+	; Fall to .InitializeRamvarsFromDS
+
+;--------------------------------------------------------------------
+; .InitializeRamvars
+;	Parameters:
+;		Nothing
+;	Returns:
+;		DS:		RAMVARS segment
 ;	Corrupts registers:
 ;		AX, CX, DI, ES
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-.ClearRamvarsFromDS:
-	call	FindDPT_PointToFirstDPT	; Get RAMVARS/FULLRAMVARS size to DI
-	mov		cx, di					; Copy byte count to CX
+.InitializeRamvars:
+	call	RamVars_GetSegmentToDS
+	mov		cx, RAMVARS_size
+	xor		di, di
 	push	ds
 	pop		es
-	xor		di, di					; ES:DI now points to RAMVARS/FULLRAMVARS
-	xor		ax, ax					; Store zeroes
-	rep stosb
-	mov		WORD [FULLRAMVARS.wSign], W_SIGN_FULLRAMVARS
-	ret
+	call	Memory_ZeroESDIwithSizeInCX
+	; Fall to .InitializeDriveTranslationAndReturn
+
+;--------------------------------------------------------------------
+; .InitializeDriveTranslationAndReturn
+;	Parameters:
+;		DS:		RAMVARS segment
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+.InitializeDriveTranslationAndReturn:
+	pop		es
+	jmp		DriveXlate_Reset
 
 
