Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 397)
@@ -107,6 +107,8 @@
 
 	; Check if ROM boot (INT 18h) wanted
+%ifdef MODULE_HOTKEYS
 	cmp		BYTE [es:BOOTVARS.hotkeyVars+HOTKEYVARS.bScancode], ROM_BOOT_HOTKEY_SCANCODE
 	je		SHORT JumpToBootSector_or_RomBoot	; CF clear so ROM boot
+%endif
 
 	; Try to boot from Primary boot drive (00h by default)
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectDrives.asm	(revision 397)
@@ -211,5 +211,5 @@
 ;		ES:SI	Ptr to ATA information for the drive
 ;		DS:		RAMVARS segment
-;		ES:		BDA/Bootnfo segment
+;		ES:		BDA segment
 ;	Returns:
 ;		Nothing
@@ -220,4 +220,4 @@
 	call	CreateDPT_FromAtaInformation
 	jc		SHORT DetectDrives_DriveNotFound
-	call	BootMenuInfo_CreateForHardDisk
-	jmp		SHORT DetectPrint_DriveNameFromBootnfoInESBX
+	call	DriveDetectInfo_CreateForHardDisk
+	jmp		SHORT DetectPrint_DriveNameFromDrvDetectInfoInESBX
Index: trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/Initialization/DetectPrint.asm	(revision 397)
@@ -153,7 +153,7 @@
 
 ;--------------------------------------------------------------------
-; DetectPrint_DriveNameFromBootnfoInESBX
-;	Parameters:
-;		ES:BX:	Ptr to BOOTMENUINFO (if drive found)
+; DetectPrint_DriveNameFromDrvDetectInfoInESBX
+;	Parameters:
+;		ES:BX:	Ptr to DRVDETECTINFO (if drive found)
 ;	Returns:
 ;		Nothing
@@ -161,9 +161,9 @@
 ;		AX, SI
 ;--------------------------------------------------------------------
-DetectPrint_DriveNameFromBootnfoInESBX:
+DetectPrint_DriveNameFromDrvDetectInfoInESBX:
 	push	di
 	push	bx
 
-	lea		si, [bx+BOOTMENUINFO.szDrvName]
+	lea		si, [bx+DRVDETECTINFO.szDrvName]
 	mov		bx, es
 	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 397)
@@ -52,16 +52,11 @@
 	%include "IdeRegisters.inc"		; For ATA Registers, flags and commands
 	%include "Int13h.inc"			; Equates for INT 13h functions
-%ifdef MODULE_EBIOS
-	%include "EBIOS.inc"			; Equates for EBIOS functions
-%endif
 	%include "CustomDPT.inc"		; For Disk Parameter Table
 	%include "RomVars.inc"			; For ROMVARS and IDEVARS structs
 	%include "RamVars.inc"			; For RAMVARS struct
 	%include "BootVars.inc"			; For BOOTVARS struct
-	%include "HotkeyBar.inc"		; For Hotkeys
-	%include "BootMenu.inc"			; For Boot Menu
 	%include "IDE_8bit.inc"			; For IDE 8-bit data port macros
 	%include "DeviceIDE.inc"		; For IDE device equates
-	%include "Vision.inc"			; For QDI Vision QD65xx VLB IDE Controllers
+
 
 
@@ -79,38 +74,13 @@
 	at	ROMVARS.szVersion,	db	ROM_VERSION_STRING
 
-;;; For OR'ing into wFlags below
-;;;
-%ifdef MODULE_SERIAL
-	MAIN_FLG_MODULE_SERIAL	equ	FLG_ROMVARS_MODULE_SERIAL
-%else
-	MAIN_FLG_MODULE_SERIAL	equ	0
-%endif
-
-%ifdef MODULE_EBIOS
-	MAIN_FLG_MODULE_EBIOS	equ	FLG_ROMVARS_MODULE_EBIOS
-%else
-	MAIN_FLG_MODULE_EBIOS	equ	0
-%endif
-
-%ifdef MODULE_JRIDE
-	MAIN_FLG_MODULE_JRIDE	equ	FLG_ROMVARS_MODULE_JRIDE
-%else
-	MAIN_FLG_MODULE_JRIDE	equ	0
-%endif
-
-%ifdef MODULE_ADVANCED_ATA
-	MAIN_FLG_MODULE_ADVATA	equ	FLG_ROMVARS_MODULE_ADVATA
-%else
-	MAIN_FLG_MODULE_ADVATA	equ	0
-%endif
-
-
 ;---------------------------;
 ; AT Build default settings ;
 ;---------------------------;
 %ifdef USE_AT
-	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_FULLMODE | FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_ADVATA
+	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_FULLMODE | MASK_ROMVARS_INCLUDED_MODULES
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
-	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
+%ifdef MODULE_BOOT_MENU
+		at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
+%endif
 	at	ROMVARS.bIdeCnt,		db	4						; Number of supported controllers
 	at	ROMVARS.bBootDrv,		db	80h						; Boot Menu default drive
@@ -154,7 +124,9 @@
 ; XT and XT+ Build default settings ;
 ;-----------------------------------;
-	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_DRVXLAT | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_ADVATA
+	at	ROMVARS.wFlags,			dw	MASK_ROMVARS_INCLUDED_MODULES
 	at	ROMVARS.wDisplayMode,	dw	DEFAULT_TEXT_MODE
-	at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
+%ifdef MODULE_BOOT_MENU
+		at	ROMVARS.wBootTimeout,	dw	BOOT_MENU_DEFAULT_TIMEOUT
+%endif
 	at	ROMVARS.bIdeCnt,		db	1						; Number of supported controllers
 	at	ROMVARS.bBootDrv,		db	80h						; Boot Menu default drive
@@ -165,10 +137,5 @@
 	at	ROMVARS.ideVars0+IDEVARS.wPort,			dw	DEVICE_XTIDE_DEFAULT_PORT			; Controller Command Block base port
 	at	ROMVARS.ideVars0+IDEVARS.wPortCtrl,		dw	DEVICE_XTIDE_DEFAULT_PORTCTRL		; Controller Control Block base port
-%ifdef MODULE_JRIDE
-	at	ROMVARS.ideVars0+IDEVARS.bDevice,		db	DEVICE_JRIDE_ISA
-%else
 	at	ROMVARS.ideVars0+IDEVARS.bDevice,		db	DEVICE_XTIDE_REV1
-%endif
-	at	ROMVARS.ideVars0+IDEVARS.bIRQ,			db	0				; IRQ
 	at	ROMVARS.ideVars0+IDEVARS.drvParamsMaster+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
 	at	ROMVARS.ideVars0+IDEVARS.drvParamsSlave+DRVPARAMS.wFlags,	db	DISABLE_WRITE_CACHE | FLG_DRVPARAMS_BLOCKMODE
@@ -221,5 +188,5 @@
 	%include "AccessDPT.asm"		; For accessing DPTs
 	%include "LbaAssist.asm"		; For generating L-CHS parameters to LBA drives
-	%include "BootMenuInfo.asm"		; For creating BOOTMENUINFO structs
+	%include "DrvDetectInfo.asm"	; For creating DRVDETECTINFO structs
 	%include "AtaID.asm"			; For ATA Identify Device information
 	%include "DetectDrives.asm"		; For detecting IDE drives
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/BootMenu/BootMenuPrint.asm	(revision 397)
@@ -42,5 +42,5 @@
 	jc		.notOurs
 
-	call	BootMenuInfo_ConvertDPTtoBX
+	call	DriveDetectInfo_ConvertDPTtoBX
 	mov		si, g_szDriveNumBOOTNFO					; special g_szDriveNum that prints from BDA
 	jmp		.go
@@ -186,5 +186,5 @@
 .HardDiskMenuitemInfoForOurDrive:
 	ePUSH_T ax, g_szInformation							; Add substring for our hard disk information
-	call	BootMenuInfo_GetTotalSectorCount			; Get Total LBA Size
+	call	GetTotalSectorCount
 	jmp		.ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
 
@@ -218,2 +218,19 @@
 	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
 	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
+
+
+;--------------------------------------------------------------------
+; GetTotalSectorCount
+;	Parameters:
+;		DS:DI:		DPT Pointer
+;	Returns:
+;		BX:DX:AX:	48-bit sector count
+;	Corrupts registers:
+;		CX
+;--------------------------------------------------------------------
+GetTotalSectorCount:
+	test	BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
+	jnz		SHORT .ReturnFullCapacity
+	jmp		AH15h_GetSectorCountToBXDXAX
+.ReturnFullCapacity:
+	jmp		AccessDPT_GetLbaSectorCountToBXDXAX
Index: trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/Menus/DriveXlate.asm	(revision 397)
@@ -33,6 +33,4 @@
 ALIGN JUMP_ALIGN
 DriveXlate_ToOrBack:
-	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_DRVXLAT
-	jz		SHORT .Return			; Return if translation disabled
 	xchg	di, ax					; Backup AX
 
@@ -57,6 +55,4 @@
 .RestoreAXandReturn:
 	xchg	ax, di					; Restore AX
-ALIGN JUMP_ALIGN, ret
-.Return:
 	ret
 
@@ -73,5 +69,4 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 DriveXlate_Reset:
 	mov		WORD [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], 8000h
@@ -91,13 +86,13 @@
 ;		Nothing
 ;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
 DriveXlate_SetDriveToSwap:
 	test	dl, dl				; Floppy drive?
-	js		SHORT .SetHardDiskToSwap
-.SetFloppyDriveToSwap:
+	js		SHORT .SetHardDriveToSwap
+
+	; Set Floppy Drive to swap
 	mov		[RAMVARS.xlateVars+XLATEVARS.bFDSwap], dl
 	ret
-ALIGN JUMP_ALIGN
-.SetHardDiskToSwap:
+
+.SetHardDriveToSwap:
 	mov		[RAMVARS.xlateVars+XLATEVARS.bHDSwap], dl
 	ret
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootMenuInfo.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootMenuInfo.asm	(revision 395)
+++ 	(revision )
@@ -1,101 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Functions for generating and accessing drive
-;					information to be displayed on boot menu.
-
-;
-; XTIDE Universal BIOS and Associated Tools 
-; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
-;
-; This program is free software; you can redistribute it and/or modify
-; it under the terms of the GNU General Public License as published by
-; the Free Software Foundation; either version 2 of the License, or
-; (at your option) any later version.
-; 
-; This program is distributed in the hope that it will be useful,
-; but WITHOUT ANY WARRANTY; without even the implied warranty of
-; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-; GNU General Public License for more details.
-; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html				
-;
-				
-; Section containing code
-SECTION .text
-
-;--------------------------------------------------------------------
-; Creates new BOOTMENUINFO struct for detected hard disk.
-;
-; BootMenuInfo_CreateForHardDisk
-;	Parameters:
-;		DL:		Drive number
-;		DS:DI:	Ptr to Disk Parameter Table
-;		ES:SI:	Ptr to 512-byte ATA information read from the drive
-;	Returns:
-;		ES:BX:	Ptr to BOOTMENUINFO (if successful)
-;	Corrupts registers:
-;		AX, BX, CX, DX, DI
-;--------------------------------------------------------------------
-BootMenuInfo_CreateForHardDisk:
-	call	BootMenuInfo_ConvertDPTtoBX			; ES:BX now points to new BOOTMENUINFO
-
-	; Store Drive Name
-	push	ds									; Preserve RAMVARS
-	push	si
-
-	push	es									; ES copied to DS
-	pop		ds
-
-	add		si, BYTE ATA1.strModel				; DS:SI now points drive name
-	lea		di, [bx+BOOTMENUINFO.szDrvName]		; ES:DI now points to name destination
-	mov		cx, MAX_HARD_DISK_NAME_LENGTH / 2	; Max number of WORDs allowed
-.CopyNextWord:
-	lodsw
-	xchg	al, ah								; Change endianness
-	stosw
-	loop	.CopyNextWord
-	xor		ax, ax								; Zero AX and clear CF
-	stosw										; Terminate with NULL
-
-	pop		si
-	pop		ds
-		
-	ret
-
-
-;--------------------------------------------------------------------
-; BootMenuInfo_GetTotalSectorCount
-;	Parameters:
-;		DS:DI:		DPT Pointer
-;	Returns:
-;		BX:DX:AX:	48-bit sector count
-;	Corrupts registers:
-;		CX
-;--------------------------------------------------------------------
-%ifdef MODULE_BOOT_MENU
-BootMenuInfo_GetTotalSectorCount:
-	test	BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
-	jnz		SHORT .ReturnFullCapacity
-	jmp		AH15h_GetSectorCountToBXDXAX
-.ReturnFullCapacity:
-	jmp		AccessDPT_GetLbaSectorCountToBXDXAX
-%endif
-
-
-;--------------------------------------------------------------------
-; Returns offset to BOOTMENUINFO based on DPT pointer.
-;
-; BootMenuInfo_ConvertDPTtoBX
-;	Parameters:
-;		DS:DI:	DPT Pointer
-;	Returns:
-;		BX:		Offset to BOOTMENUINFO struct
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-BootMenuInfo_ConvertDPTtoBX:
-	mov		ax, di
-	sub		ax, BYTE RAMVARS_size					; subtract off base of DPTs
-	mov		bl, DPT_BOOTMENUINFO_SIZE_MULTIPLIER	; BOOTMENUINFO's are a whole number multiple of DPT size
-	mul		bl								
-	add		ax, BOOTVARS.rgBootNfo					; add base of BOOTMENUINFO
-	xchg	ax, bx
-	ret	
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 395)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm	(revision 397)
@@ -33,7 +33,7 @@
 BootVars_Initialize:
 	; Clear to zero
-	mov		al, BOOTMENUINFO_size
+	mov		al, DRVDETECTINFO_size
 	mul		BYTE [cs:ROMVARS.bIdeCnt]
-	mov		di, BOOTVARS.hotkeyVars	; We must not initialize anything before this!
+	mov		di, BOOTVARS.clearToZeroFromThisPoint	; We must not initialize anything before this!
 	add		ax, BOOTVARS_size
 	sub		ax, di
Index: trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm	(revision 397)
+++ trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm	(revision 397)
@@ -0,0 +1,82 @@
+; Project name	:	XTIDE Universal BIOS
+; Description	:	Functions for generating and accessing drive
+;					information to be displayed on boot menu.
+
+;
+; XTIDE Universal BIOS and Associated Tools 
+; Copyright (C) 2009-2010 by Tomi Tilli, 2011-2012 by XTIDE Universal BIOS Team.
+;
+; This program is free software; you can redistribute it and/or modify
+; it under the terms of the GNU General Public License as published by
+; the Free Software Foundation; either version 2 of the License, or
+; (at your option) any later version.
+; 
+; This program is distributed in the hope that it will be useful,
+; but WITHOUT ANY WARRANTY; without even the implied warranty of
+; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+; GNU General Public License for more details.
+; Visit http://www.gnu.org/licenses/old-licenses/gpl-2.0.html				
+;
+				
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Creates new DRVDETECTINFO struct for detected hard disk.
+;
+; DriveDetectInfo_CreateForHardDisk
+;	Parameters:
+;		DL:		Drive number
+;		DS:DI:	Ptr to Disk Parameter Table
+;		ES:SI:	Ptr to 512-byte ATA information read from the drive
+;	Returns:
+;		ES:BX:	Ptr to DRVDETECTINFO (if successful)
+;	Corrupts registers:
+;		AX, BX, CX, DX, DI
+;--------------------------------------------------------------------
+DriveDetectInfo_CreateForHardDisk:
+	call	DriveDetectInfo_ConvertDPTtoBX		; ES:BX now points to new DRVDETECTINFO
+
+	; Store Drive Name
+	push	ds									; Preserve RAMVARS
+	push	si
+
+	push	es									; ES copied to DS
+	pop		ds
+
+	add		si, BYTE ATA1.strModel				; DS:SI now points drive name
+	lea		di, [bx+DRVDETECTINFO.szDrvName]		; ES:DI now points to name destination
+	mov		cx, MAX_HARD_DISK_NAME_LENGTH / 2	; Max number of WORDs allowed
+.CopyNextWord:
+	lodsw
+	xchg	al, ah								; Change endianness
+	stosw
+	loop	.CopyNextWord
+	xor		ax, ax								; Zero AX and clear CF
+	stosw										; Terminate with NULL
+
+	pop		si
+	pop		ds
+		
+	ret
+
+
+;--------------------------------------------------------------------
+; Returns offset to DRVDETECTINFO based on DPT pointer.
+;
+; DriveDetectInfo_ConvertDPTtoBX
+;	Parameters:
+;		DS:DI:	DPT Pointer
+;	Returns:
+;		BX:		Offset to DRVDETECTINFO struct
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+DriveDetectInfo_ConvertDPTtoBX:
+	mov		ax, di
+	sub		ax, BYTE RAMVARS_size					; subtract off base of DPTs
+	mov		bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER	; DRVDETECTINFO are a whole number multiple of DPT size
+	mul		bl								
+	add		ax, BOOTVARS.rgDrvDetectInfo			; add base of DRVDETECTINFO
+	xchg	ax, bx
+	ret	
