Index: /trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 493)
@@ -41,5 +41,5 @@
 	.dwPostStack		resb	4		; POST stack pointer when entering INT 19h
 
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	.wNextXTCFportToScan	resb	2	; Needed for XT-CF port autodetection
 %endif
Index: /trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc	(revision 493)
@@ -24,10 +24,14 @@
 %endif
 
+%ifdef MODULE_8BIT_IDE_ADVANCED
+	%define MODULE_8BIT_IDE
+	%include "DmaController.inc"
+	%include "XTCF.inc"				; For Lo-tech XT-CF
+	%include "JRIDE_ISA.inc"		; For JR-IDE/ISA
+%endif
+
 ; Include module specific .INC files
 %ifdef MODULE_8BIT_IDE
-	%include "DmaController.inc"
 	%include "IDE_8bit.inc"			; For IDE 8-bit data port macros
-	%include "XTCF.inc"				; For Lo-tech XT-CF
-	%include "JRIDE_ISA.inc"		; For JR-IDE/ISA
 %endif
 
@@ -118,3 +122,10 @@
 %endif
 
-MASK_ROMVARS_INCLUDED_MODULES	EQU	MAIN_FLG_MODULE_8BIT_IDE | MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED | MAIN_FLG_MODULE_FEATURE_SETS
+%ifdef MODULE_8BIT_IDE_ADVANCED
+	MAIN_FLG_MODULE_8BIT_IDE_ADVANCED	EQU	FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED
+%else
+	MAIN_FLG_MODULE_8BIT_IDE_ADVANCED	EQU	0
+%endif
+
+MASK_ROMVARS_INCLUDED_MODULES	EQU	MAIN_FLG_MODULE_8BIT_IDE | MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_IRQ | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED | MAIN_FLG_MODULE_FEATURE_SETS | MAIN_FLG_MODULE_8BIT_IDE_ADVANCED
+
Index: /trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 493)
@@ -72,5 +72,5 @@
 FLG_ROMVARS_MODULE_FEATURE_SETS			EQU	(1<<5)
 FLG_ROMVARS_MODULE_8BIT_IDE				EQU	(1<<6)
-
+FLG_ROMVARS_MODULE_8BIT_IDE_ADVANCED	EQU (1<<7)
 FLG_ROMVARS_MODULE_ADVANCED_ATA			EQU	(1<<8)
 FLG_ROMVARS_MODULE_BOOT_MENU			EQU	(1<<9)
@@ -123,6 +123,6 @@
 DEVICE_XTIDE_DEFAULT_PORTCTRL			EQU		(DEVICE_XTIDE_DEFAULT_PORT + 8h)
 
-DEVICE_ATA_PRIMARY_PORT					EQU		1F0h
-DEVICE_ATA_PRIMARY_PORTCTRL				EQU		(DEVICE_ATA_PRIMARY_PORT + 200h)
+DEVICE_ATA_PRIMARY_PORT					EQU		300h
+DEVICE_ATA_PRIMARY_PORTCTRL				EQU		(DEVICE_ATA_PRIMARY_PORT + 8h)
 
 DEVICE_ATA_SECONDARY_PORT				EQU		170h
Index: /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeCommand.asm	(revision 493)
@@ -87,5 +87,5 @@
 	call	Idepack_FakeToSSBP
 
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	; Enable 8-bit PIO mode for 8-bit ATA and XT-CF
 	push	si
@@ -94,5 +94,5 @@
 	call	AH9h_SetModeFromALtoXTCF
 	pop		si
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
 
 	; Prepare to output Identify Device command
@@ -172,5 +172,5 @@
 	cmp		bl, FLG_STATUS_DRQ				; Data transfer started?
 	jne		SHORT .WaitUntilNonTransferCommandCompletes
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	cmp		BYTE [di+DPT_ATA.bDevice], DEVICE_8BIT_XTCF_MEMMAP
 	jae		SHORT JrIdeTransfer_StartWithCommandInAL	; DEVICE_8BIT_XTCF_MEMMAP or DEVICE_8BIT_JRIDE_ISA
Index: /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeIO.asm	(revision 493)
@@ -58,4 +58,6 @@
 	je		SHORT .ReverseA0andA3fromRegisterIndexInDX
 	jb		SHORT .InputToALfromRegisterInDX	; Standard IDE controllers and XTIDE rev 1
+		
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	cmp		al, DEVICE_8BIT_JRIDE_ISA
 	jne		SHORT .ShlRegisterIndexInDX			; All XT-CF modes
@@ -68,5 +70,6 @@
 	pop		ds
 	ret
-
+%endif
+		
 .ReverseA0andA3fromRegisterIndexInDX:
 	mov		dl, [cs:bx+g_rgbSwapA0andA3fromIdeRegisterIndex]
@@ -103,4 +106,6 @@
 	cmp		bl, DEVICE_8BIT_XTIDE_REV2
 	jbe		SHORT .OutputALtoControlBlockRegisterInDX	; Standard IDE controllers and XTIDE rev 1
+		
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	cmp		bl, DEVICE_8BIT_JRIDE_ISA
 	jne		SHORT .ShlRegisterIndexInDX		; All XT-CF modes
@@ -115,4 +120,5 @@
 	eSHL_IM	dx, 1
 	jmp		SHORT OutputALtoRegisterInDX
+%endif
 
 .OutputALtoControlBlockRegisterInDX:
@@ -141,4 +147,6 @@
 	je		SHORT .ReverseA0andA3fromRegisterIndexInDX
 	jb		SHORT OutputALtoRegisterInDX	; Standard IDE controllers and XTIDE rev 1
+
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	cmp		bl, DEVICE_8BIT_JRIDE_ISA
 	jne		SHORT .ShlRegisterIndexInDX		; All XT-CF modes
@@ -154,5 +162,6 @@
 	pop		ds
 	ret
-
+%endif
+		
 .ReverseA0andA3fromRegisterIndexInDX:
 	mov		bx, dx
Index: /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeTransfer.asm	(revision 493)
@@ -218,5 +218,5 @@
 	xchg	ax, bx								; Lookup table offset to AX
 	mov		bl, [di+DPT_ATA.bDevice]
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	mov		dl, bl
 %endif
@@ -226,5 +226,5 @@
 
 	; Normalize pointer for PIO-transfers and convert to physical address for DMA transfers
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	cmp		dl, DEVICE_8BIT_XTCF_DMA
 	jb		SHORT IdeTransfer_NormalizePointerInESSI
@@ -281,5 +281,5 @@
 %endif					; 26	29/26
 	ret
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
 	; Fall to IdeTransfer_NormalizePointerInESSI if no MODULE_8BIT_IDE
 
@@ -308,6 +308,8 @@
 		dw		IdePioBlock_ReadFromXtideRev1		; 3, DEVICE_8BIT_XTIDE_REV1
 		dw		IdePioBlock_ReadFromXtideRev2		; 4, DEVICE_8BIT_XTIDE_REV2
+%ifdef MODULE_8BIT_IDE_ADVANCED
 		dw		IdePioBlock_ReadFrom8bitDataPort	; 5, DEVICE_8BIT_XTCF_PIO8
 		dw		IdeDmaBlock_ReadFromXTCF			; 6, DEVICE_8BIT_XTCF_DMA
+%endif
 %endif
 
@@ -320,5 +322,7 @@
 		dw		IdePioBlock_WriteToXtideRev1		; 3, DEVICE_8BIT_XTIDE_REV1
 		dw		IdePioBlock_WriteToXtideRev2		; 4, DEVICE_8BIT_XTIDE_REV2
+%ifdef MODULE_8BIT_IDE_ADVANCED		
 		dw		IdePioBlock_WriteTo8bitDataPort		; 5, DEVICE_8BIT_XTCF_PIO8
 		dw		IdeDmaBlock_WriteToXTCF				; 6, DEVICE_8BIT_XTCF_DMA
 %endif
+%endif
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h.asm	(revision 493)
@@ -93,5 +93,5 @@
 	call	RamVars_GetSegmentToDS
 
-%ifdef MODULE_HOTKEYS
+%ifdef MODULE_DRIVEXLATE
 	call	DriveXlate_ToOrBack
 	mov		[RAMVARS.xlateVars+XLATEVARS.bXlatedDrv], dl
@@ -179,5 +179,5 @@
 	mov		[bp+IDEPACK.intpack+INTPACK.si], si
 	mov		[bp+IDEPACK.intpack+INTPACK.bx], bx
-%ifdef MODULE_HOTKEYS
+%ifdef MODULE_DRIVEXLATE
 	mov		[bp+IDEPACK.intpack+INTPACK.dh], dh
 %else
@@ -190,5 +190,5 @@
 	call	RamVars_GetSegmentToDS
 
-%ifdef MODULE_HOTKEYS
+%ifdef MODULE_DRIVEXLATE
 	cmp		dl, [RAMVARS.xlateVars+XLATEVARS.bXlatedDrv]	; DL is still drive number?
 	je		SHORT .ExchangeInt13hHandlers
@@ -395,5 +395,5 @@
 	dw	UnsupportedFunction							; 1Ch, ESDI Special Functions (PS/2)
 	dw	UnsupportedFunction							; 1Dh,
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	dw	AH1Eh_HandlerForXTCFfeatures				; 1Eh, Lo-tech XT-CF features (XTIDE Universal BIOS)
 %else
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH23h_HFeatures.asm	(revision 493)
@@ -76,5 +76,4 @@
 
 
-%ifdef MODULE_8BIT_IDE
 ;--------------------------------------------------------------------
 ; AH23h_Enable8bitPioMode
@@ -88,6 +87,7 @@
 ;		AL, BX, CX, DX, SI
 ;--------------------------------------------------------------------
+%ifdef MODULE_8BIT_IDE
 AH23h_Enable8bitPioMode:
 	mov		si, FEATURE_ENABLE_8BIT_PIO_TRANSFER_MODE
 	jmp		SHORT AH23h_SetControllerFeatures
-%endif ; MODULE_8BIT_IDE
+%endif
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH24h_HSetBlocks.asm	(revision 493)
@@ -59,5 +59,5 @@
 ;--------------------------------------------------------------------
 AH24h_SetBlockSize:
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	; XT-CF does not support largest block size in DMA mode.
 	cmp		al, XTCF_DMA_MODE_MAX_BLOCK_SIZE
@@ -66,5 +66,5 @@
 	je		SHORT AH1Eh_LoadInvalidCommandToAHandSetCF
 .NoNeedToLimitBlockSize:
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
 
 	push	bx
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm	(revision 493)
@@ -107,5 +107,5 @@
 
 ;;; Set XT-CF mode
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	call	AccessDPT_GetIdevarsToCSBX
 	mov		al, [cs:bx+IDEVARS.bXTCFcontrolRegister]
@@ -113,6 +113,7 @@
 	STORE_ERROR_FLAG_TO_DPT		FLG_INITERROR_FAILED_TO_SET_XTCF_MODE
 .DoNotSetXTCFmode:
-
-
+%endif	; MODULE_8BIT_IDE_ADVANCED
+
+%ifdef MODULE_8BIT_IDE
 ;;; Set 8-bit PIO mode
 	call	AH9h_Enable8bitModeForDevice8bitAta
@@ -266,5 +267,5 @@
 
 
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 ;--------------------------------------------------------------------
 ; AH9h_SetModeFromALtoXTCF
@@ -284,6 +285,7 @@
 	jne		SHORT IgnoreInvalidCommandError
 	jmp		AH1Eh_ChangeXTCFmodeBasedOnControlRegisterInAL
-
-
+%endif ; MODULE_8BIT_IDE_ADVANCED
+
+%ifdef MODULE_8BIT_IDE
 ;--------------------------------------------------------------------
 ; AH9h_Enable8bitModeForDevice8bitAta
@@ -302,3 +304,3 @@
 	jne		SHORT IgnoreInvalidCommandError
 	jmp		AH23h_Enable8bitPioMode
-%endif ; MODULE_8BIT_IDE
+%endif
Index: /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 493)
@@ -121,5 +121,5 @@
 	call	HotkeyBar_ScanHotkeysFromKeyBufferAndStoreToBootvars		
 	cmp		al, ROM_BOOT_HOTKEY_SCANCODE
-	jz		JumpToBootSector_or_RomBoot			; CF clear so ROM boot
+	jz		.RomBoot							; CF clear so ROM boot
 %ifdef MODULE_BOOT_MENU
 	cmp		al, BOOT_MENU_HOTKEY_SCANCODE
@@ -135,5 +135,5 @@
 .BootMenu:		
 	call	BootMenu_DisplayAndReturnDriveInDLRomBootClearCF
-	jnc		JumpToBootSector_or_RomBoot			; CF clear so ROM boot
+	jnc		.RomBoot							; CF clear so ROM boot
 
 	mov		dh, dl								; Setup for secondary drive
@@ -158,7 +158,10 @@
 %endif
 
-%ifndef MODULE_BOOT_MENU
-	clc		;  fall through with flag for ROM boot.  Boot Menu goes back to menu and doesn't fall through.
-%endif		
+.RomBoot:
+%ifdef MODULE_DRIVEXLATE
+	call	DriveXlate_Reset					; Clean up any drive mappings before Rom Boot
+%endif
+	clc		
+	;; fall through to JumpToBootSector_or_RomBoot
 
 ;--------------------------------------------------------------------
Index: /trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 493)
@@ -162,5 +162,5 @@
 ;--------------------------------------------------------------------
 StartDetectionWithDriveSelectByteInBHandStringInCX:
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	; Autodetect port for XT-CF
 	call	DetectDrives_DoesIdevarsInCSBPbelongToXTCF
@@ -195,5 +195,5 @@
 .SkipXTCFportDetection:
 	push	dx
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
 
 	call	DetectPrint_StartDetectWithMasterOrSlaveStringInCXandIdeVarsInCSBP
@@ -203,5 +203,5 @@
 %endif				
 		
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	pop		dx
 %endif
@@ -282,5 +282,5 @@
 
 
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 ;--------------------------------------------------------------------
 ; DetectDrives_DoesIdevarsInCSBPbelongToXTCF
@@ -303,3 +303,3 @@
 NoSlaveDriveAvailable:
 	ret
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
Index: /trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 493)
@@ -128,5 +128,9 @@
 	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
 %endif
+%ifdef MODULE_8BIT_IDE_ADVANCED		
 	at	ROMVARS.bIdeCnt,		db	2						; Number of supported controllers
+%else
+	at  ROMVARS.bIdeCnt,		db	1
+%endif
 	at	ROMVARS.bBootDrv,		db	80h						; Boot Menu default drive
 	at	ROMVARS.bMinFddCnt, 	db	0						; Do not force minimum number of floppy drives
@@ -140,8 +144,13 @@
 	at	ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
 
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	at	ROMVARS.ideVars1+IDEVARS.bXTCFcontrolRegister,	db	XTCF_8BIT_PIO_MODE
 	at	ROMVARS.ideVars1+IDEVARS.bDevice,				db	DEVICE_8BIT_XTCF_PIO8
 	at	ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
 	at	ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
+%else
+	at	ROMVARS.ideVars1+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
+	at	ROMVARS.ideVars1+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
+%endif		
 
 	at	ROMVARS.ideVars2+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE | (TRANSLATEMODE_AUTO<<TRANSLATEMODE_FIELD_POSITION)
@@ -227,5 +236,5 @@
 %endif
 	%include "IdeCommand.asm"
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	%include "JrIdeTransfer.asm"	; Must be included after IdeCommand.asm
 	%include "IdeDmaBlock.asm"
@@ -261,5 +270,5 @@
 	%include "AH11h_HRecal.asm"		; Required by Int13h_Jump.asm
 	%include "AH15h_HSize.asm"		; Required by Int13h_Jump.asm
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	%include "AH1Eh_XTCF.asm"
 %endif
Index: /trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuEvent.asm	(revision 493)
@@ -161,5 +161,4 @@
 EventItemHighlightedFromCX:
 	push	cx
-	call	DriveXlate_Reset		
 	call	BootMenu_GetDriveToDXforMenuitemInCX		
 	jnc		.noDriveSwap		
@@ -209,5 +208,4 @@
 ;--------------------------------------------------------------------
 CloseBootMenu:
-	call	DriveXlate_Reset
 	CALL_MENU_LIBRARY	Close
 	; Fall to BootMenuEvent_Completed
Index: /trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm	(revision 493)
@@ -144,10 +144,9 @@
 ;		Nothing
 ;	Corrupts registers:
-;		Nothing
+;		AX, DI, DL
 ;--------------------------------------------------------------------
 DriveXlate_Reset:
-	mov		WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], 8000h
-	ret
-
+	xor		dl, dl				; no translation for a floppy
+	;; fall through to DriveXlate_SetDriveToSwap
 
 ;--------------------------------------------------------------------
@@ -161,15 +160,14 @@
 ;		Nothing
 ;	Corrupts registers:
-;		Nothing
+;		AX, DI
 ;--------------------------------------------------------------------
 DriveXlate_SetDriveToSwap:
+	mov		ax, 8000h			; Default mapping (no translation)
 	test	dl, dl				; Floppy drive?
 	js		SHORT .SetHardDriveToSwap
-
-	; Set Floppy Drive to swap
-	mov		[RAMVARS.xlateVars+XLATEVARS.bFDSwap], dl
+	mov		al, dl				; Store floppy translation
+	SKIP2B	di
+.SetHardDriveToSwap:	
+	mov		ah, dl				; Store HD translation
+	mov		WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], ax
 	ret
-
-.SetHardDriveToSwap:
-	mov		[RAMVARS.xlateVars+XLATEVARS.bHDSwap], dl
-	ret
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/AccessDPT.asm	(revision 493)
@@ -104,5 +104,5 @@
 
 
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 ;--------------------------------------------------------------------
 ; AccessDPT_IsThisDeviceXTCF
@@ -125,5 +125,5 @@
 .DeviceIsXTCF:
 	ret
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
 
 
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 493)
@@ -32,5 +32,5 @@
 ;--------------------------------------------------------------------
 BootVars_Initialize:
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	mov		WORD [es:BOOTVARS.wNextXTCFportToScan], XTCF_BASE_PORT_DETECTION_SEED
 %endif
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/CreateDPT.asm	(revision 493)
@@ -245,5 +245,5 @@
 	mov		[di+DPT.bIdevarsOffset], bp		; IDEVARS must start in first 256 bytes of ROM
 
-%ifdef MODULE_8BIT_IDE
+%ifdef MODULE_8BIT_IDE_ADVANCED
 	call	DetectDrives_DoesIdevarsInCSBPbelongToXTCF
 	jne		SHORT .DeviceUsesPortSpecifiedInIDEVARS
@@ -251,5 +251,5 @@
 	ret
 .DeviceUsesPortSpecifiedInIDEVARS:
-%endif ; MODULE_8BIT_IDE
+%endif ; MODULE_8BIT_IDE_ADVANCED
 
 	mov		ax, [cs:bp+IDEVARS.wBasePort]
Index: /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm
===================================================================
--- /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/RamVars.asm	(revision 493)
@@ -94,23 +94,11 @@
 	mov		[RAMVARS.wNewStackOffset], ax
 %endif
-	; Fall to .InitializeDriveTranslationAndReturn
-
-;--------------------------------------------------------------------
-; .InitializeDriveTranslationAndReturn
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-.InitializeDriveTranslationAndReturn:
+
+;; There used to be a DriveXlate_Reset call here.  It isn't necessary, as we reset
+;; when entering the boot menu and also before transferring control at boot time and
+;; for ROM boots (in int19h.asm).
+		
 	pop		es
-%ifdef MODULE_DRIVEXLATE
-	jmp		DriveXlate_Reset
-%else
-	ret
-%endif
-
+	ret
 
 ;--------------------------------------------------------------------
Index: /trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- /trunk/XTIDE_Universal_BIOS/makefile	(revision 492)
+++ /trunk/XTIDE_Universal_BIOS/makefile	(revision 493)
@@ -16,4 +16,5 @@
 # Following modules can be included or excluded:                                                   #
 # MODULE_8BIT_IDE             Support for 8-BIT IDE cards like XTIDE                               #
+# MODULE_8BIT_IDE_ADVANCED	  Support for memory mapped and DMA based cards like JRIDE and XTCF    #
 # MODULE_ADVANCED_ATA         Native support for some VLB IDE controllers                          #
 # MODULE_BOOT_MENU            Boot Menu for selection of drive to boot from                        #
@@ -96,9 +97,9 @@
 #################################################################
 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS MODULE_FEATURE_SETS RESERVE_DIAGNOSTIC_CYLINDER
-DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_8BIT_IDE
+DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_8BIT_IDE MODULE_8BIT_IDE_ADVANCED
 
 DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_8BIT_IDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
 DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186
-DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 USE_UNDOC_INTEL RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
+DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 USE_UNDOC_INTEL RELOCATE_INT13H_STACK MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA 
 
 DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
@@ -109,5 +110,5 @@
 DEFINES_386_8K = $(DEFINES_AT) USE_386
 
-DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_ADVANCED_ATA MODULE_BOOT_MENU MODULE_EBIOS MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS
+DEFINES_ALL_FEATURES = MODULE_8BIT_IDE MODULE_ADVANCED_ATA MODULE_BOOT_MENU MODULE_EBIOS MODULE_HOTKEYS MODULE_IRQ MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_STRINGS_COMPRESSED MODULE_FEATURE_SETS MODULE_8BIT_IDE_ADVANCED
 
 
