Index: trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc	(revision 396)
+++ trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc	(revision 397)
@@ -32,39 +32,3 @@
 
 
-; Boot Menu Information Table. These are generated for all XTIDE Universal
-; BIOS drives. Available only until boot is successful.
-MAX_HARD_DISK_NAME_LENGTH				EQU		30		; Bytes reserved for drive name
-
-struc BOOTMENUINFO
-	.szDrvName				resb	MAX_HARD_DISK_NAME_LENGTH
-							resb	2	; Zero word (ensures string terminates)
-	.wInitErrorFlags		resb	2	; Errors during initialization
-	
-%ifdef MODULE_ADVANCED_ATA
-							resb	6	; padding to make BOOTMENUINFO size an even multiple of DPT size
-%else
-							resb	2	; padding to make BOOTMENUINFO size an even multiple of DPT size
-%endif				
-endstruc
-
-
-DPT_BOOTMENUINFO_SIZE_MULTIPLIER  equ	BOOTMENUINFO_size / LARGEST_DPT_SIZE
-
-%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
-
-%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
-	%error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
-%endif
-
-%if BOOTMENUINFO_size % LARGEST_DPT_SIZE <> 0
-	%error "BOOTMENUINFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of BOOTMENUINFO to bring the two sizes into alignment.  As BOOTMENUINFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
-%endif
-
-%if BOOTMENUINFO.szDrvName <> 0
-	%error "BOOTMENUINFO.szDrvName is assumed to be the first member of struc BOOTMENUINFO, in BootMenuPrint_RefreshItem"
-%endif
-
-%endif
-
-
 %endif ; BOOTMENU_INC
Index: trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 396)
+++ trunk/XTIDE_Universal_BIOS/Inc/BootVars.inc	(revision 397)
@@ -22,5 +22,5 @@
 %define BOOTVARS_INC
 
-
+; Number of times to retry booting before accepting error
 BOOT_READ_RETRY_TIMES		EQU		3
 
@@ -36,8 +36,14 @@
 	.rgbMnuStack:
 	.dwPostStack		resb	4		; POST stack pointer when entering INT 19h
+
+	.clearToZeroFromThisPoint:
+%ifdef MODULE_HOTKEYS
 	.hotkeyVars			resb	HOTKEYVARS_size
-	.rgBootNfo:							; Array containing BOOTNFO structs
+%endif
+	
+	.rgDrvDetectInfo:					; Array containing DRVDETECTINFO structs
 endstruc
 
+%ifdef MODULE_HOTKEYS
 struc HOTKEYVARS
 	.bScancode			resb	1		; Function hotkey scancode
@@ -51,4 +57,41 @@
 FLG_HOTKEY_HD_FIRST		EQU		(1<<0)	; First try to boot from HDD, then FDD
 
+%endif ; MODULE_HOTKEY
+
+
+
+struc DRVDETECTINFO
+	.szDrvName				resb	MAX_HARD_DISK_NAME_LENGTH
+							resb	2	; Zero word (ensures string terminates)
+	.wInitErrorFlags		resb	2	; Errors during initialization
+	
+%ifdef MODULE_ADVANCED_ATA
+							resb	6	; padding to make DRVDETECTINFO size an even multiple of DPT size
+%else
+							resb	2	; padding to make DRVDETECTINFO size an even multiple of DPT size
+%endif				
+endstruc
+
+; Boot Menu Information Table. These are generated for all XTIDE Universal
+; BIOS drives. Available only until boot is successful.
+MAX_HARD_DISK_NAME_LENGTH			EQU		30		; Bytes reserved for drive name
+DPT_DRVDETECTINFO_SIZE_MULTIPLIER	EQU		DRVDETECTINFO_size / LARGEST_DPT_SIZE
+
+
+%ifndef CHECK_FOR_UNUSED_ENTRYPOINTS
+
+%if MAX_HARD_DISK_NAME_LENGTH % 2 <> 0
+	%error "MAX_HARD_DISK_NAME_LENGTH needs to be a multiple of 2, memory is moved with word operations."
+%endif
+
+%if DRVDETECTINFO_size % LARGEST_DPT_SIZE <> 0
+	%error "DRVDETECTINFO's size must be an even multiple of DPT's size.  Add or remove padding at the bottom of DRVDETECTINFO to bring the two sizes into alignment.  As DRVDETECTINFO is only used at boot time, with plenty of memory to consume, it is OK to waste some space here."
+%endif
+
+%if DRVDETECTINFO.szDrvName <> 0
+	%error "DRVDETECTINFO.szDrvName is assumed to be the first member of struc DRVDETECTINFO, in BootMenuPrint_RefreshItem"
+%endif
+
+%endif
 
 
Index: trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 396)
+++ trunk/XTIDE_Universal_BIOS/Inc/CustomDPT.inc	(revision 397)
@@ -81,5 +81,5 @@
 endstruc
 
-; Flags for BOOTMENUINFO.wInitErrorFlags
+; Flags for DPT_ATA.bInitError
 FLG_INITERROR_FAILED_TO_SELECT_DRIVE				EQU		(1<<0)
 FLG_INITERROR_FAILED_TO_INITIALIZE_CHS_PARAMETERS	EQU		(1<<1)
Index: trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc	(revision 396)
+++ trunk/XTIDE_Universal_BIOS/Inc/ModuleDependency.inc	(revision 397)
@@ -25,2 +25,72 @@
 	%endif
 %endif
+
+
+
+; Include module specific .INC files
+%ifdef MODULE_EBIOS
+	%include "EBIOS.inc"			; Equates for EBIOS functions
+%endif
+
+%ifdef MODULE_HOTKEYS
+	%include "HotkeyBar.inc"		; For Hotkeys
+	%ifdef MODULE_BOOT_MENU
+		%include "BootMenu.inc"			; For Boot Menu
+	%endif
+%endif
+
+%ifdef MODULE_ADVANCED_ATA
+	%include "Vision.inc"			; For QDI Vision QD65xx VLB IDE Controllers
+%endif
+
+
+; Included modules for ROMVARS.wFlags
+%ifdef MODULE_ADVANCED_ATA
+	MAIN_FLG_MODULE_ADVANCED_ATA	EQU	FLG_ROMVARS_MODULE_ADVANCED_ATA
+%else
+	MAIN_FLG_MODULE_ADVANCED_ATA	EQU	0
+%endif
+
+%ifdef MODULE_BOOT_MENU
+	MAIN_FLG_MODULE_BOOT_MENU	EQU	FLG_ROMVARS_MODULE_BOOT_MENU
+%else
+	MAIN_FLG_MODULE_BOOT_MENU	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_HOTKEYS
+	MAIN_FLG_MODULE_HOTKEYS	EQU	FLG_ROMVARS_MODULE_HOTKEYS
+%else
+	MAIN_FLG_MODULE_HOTKEYS	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_SERIAL
+	MAIN_FLG_MODULE_SERIAL	EQU	FLG_ROMVARS_MODULE_SERIAL
+%else
+	MAIN_FLG_MODULE_SERIAL	EQU	0
+%endif
+
+%ifdef MODULE_SERIAL_FLOPPY
+	MAIN_FLG_MODULE_SERIAL_FLOPPY	EQU	FLG_ROMVARS_MODULE_SERIAL_FLOPPY
+%else
+	MAIN_FLG_MODULE_SERIAL_FLOPPY	EQU	0
+%endif
+
+%ifdef MODULE_STRINGS_COMPRESSED
+	MAIN_FLG_MODULE_STRINGS_COMPRESSED	EQU	FLG_ROMVARS_MODULE_STRINGS_COMPRESSED
+%else
+	MAIN_FLG_MODULE_STRINGS_COMPRESSED	EQU	0
+%endif
+
+MASK_ROMVARS_INCLUDED_MODULES	EQU	MAIN_FLG_MODULE_ADVANCED_ATA | MAIN_FLG_MODULE_BOOT_MENU | MAIN_FLG_MODULE_EBIOS | MAIN_FLG_MODULE_HOTKEYS | MAIN_FLG_MODULE_JRIDE | MAIN_FLG_MODULE_SERIAL | MAIN_FLG_MODULE_SERIAL_FLOPPY | MAIN_FLG_MODULE_STRINGS_COMPRESSED
Index: trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 396)
+++ trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 397)
@@ -66,12 +66,17 @@
 ; Bit defines for ROMVARS.wFlags
 FLG_ROMVARS_FULLMODE				EQU	(1<<0)	; Full operating mode (steals base RAM, supports EBIOS etc.)
-FLG_ROMVARS_DRVXLAT					EQU	(1<<2)	; Enable drive number translation
 FLG_ROMVARS_SERIAL_SCANDETECT 		EQU	(1<<3)	; Scan COM ports at the end of drive detection.  Can also be invoked
 												; by holding down the ALT key at the end of drive detection.
 												; (Conveniently, this is 8, a fact we exploit when testing the bit)
-FLG_ROMVARS_MODULE_ADVATA			EQU	(1<<4)	; Here in case the configuration needs to know functionality is present
-FLG_ROMVARS_MODULE_JRIDE			EQU	(1<<5)	; Here in case the configuration needs to know functionality is present
-FLG_ROMVARS_MODULE_SERIAL			EQU (1<<6)	; Here in case the configuration needs to know functionality is present
-FLG_ROMVARS_MODULE_EBIOS			EQU (1<<7)	; Here in case the configuration needs to know functionality is present
+
+FLG_ROMVARS_MODULE_ADVANCED_ATA			EQU	(1<<8)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_BOOT_MENU			EQU	(1<<9)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_EBIOS				EQU	(1<<10)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_HOTKEYS				EQU	(1<<11)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_JRIDE				EQU (1<<12)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_SERIAL				EQU (1<<13)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_SERIAL_FLOPPY		EQU (1<<14)	; Here in case the configuration needs to know functionality is present
+FLG_ROMVARS_MODULE_STRINGS_COMPRESSED	EQU (1<<15)	; Here in case the configuration needs to know functionality is present
+
 
 ; Boot Menu Display Modes (see Assembly Library Display.inc for standard modes)
Index: trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Handlers/Int19h.asm	(revision 396)
+++ 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 396)
+++ 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 396)
+++ 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 396)
+++ 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 396)
+++ 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 396)
+++ 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 396)
+++ 	(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 396)
+++ 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	
Index: trunk/XTIDE_Universal_BIOS/makefile
===================================================================
--- trunk/XTIDE_Universal_BIOS/makefile	(revision 396)
+++ trunk/XTIDE_Universal_BIOS/makefile	(revision 397)
@@ -91,15 +91,16 @@
 #################################################################
 DEFINES_COMMON = MODULE_STRINGS_COMPRESSED MODULE_HOTKEYS MODULE_EBIOS
-
-DEFINES_XT = ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY
-DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW MODULE_SERIAL MODULE_SERIAL_FLOPPY
-DEFINES_AT = USE_AT USE_286 MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
-
-DEFINES_XT_LARGE = $(DEFINES_XT) MODULE_BOOT_MENU MODULE_JRIDE MODULE_ADVANCED_ATA
-DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) MODULE_BOOT_MENU MODULE_JRIDE MODULE_ADVANCED_ATA
-DEFINES_AT_LARGE = $(DEFINES_AT) MODULE_BOOT_MENU MODULE_JRIDE MODULE_ADVANCED_ATA
-
-DEFINES_JRIDE_8K = ELIMINATE_CGA_SNOW MODULE_JRIDE
-DEFINES_386_8K = USE_AT USE_386 MODULE_ADVANCED_ATA
+DEFINES_COMMON_LARGE = MODULE_BOOT_MENU MODULE_JRIDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
+
+DEFINES_XT = $(DEFINES_COMMON) ELIMINATE_CGA_SNOW MODULE_JRIDE MODULE_SERIAL MODULE_SERIAL_FLOPPY
+DEFINES_XTPLUS = $(DEFINES_COMMON) $(DEFINES_XT) USE_186
+DEFINES_AT = $(DEFINES_COMMON) USE_AT USE_286 MODULE_SERIAL MODULE_SERIAL_FLOPPY MODULE_ADVANCED_ATA
+
+DEFINES_XT_LARGE = $(DEFINES_XT) $(DEFINES_COMMON_LARGE)
+DEFINES_XTPLUS_LARGE = $(DEFINES_XTPLUS) $(DEFINES_COMMON_LARGE)
+DEFINES_AT_LARGE = $(DEFINES_AT) $(DEFINES_COMMON_LARGE)
+
+DEFINES_XT_TINY = MODULE_STRINGS_COMPRESSED
+DEFINES_386_8K = $(DEFINES_AT) USE_386
 
 
@@ -113,5 +114,4 @@
 
 # Add -D in front of every preprocessor define declaration
-DEFS = $(DEFINES_COMMON:%=-D%)
 DEFS_XT = $(DEFINES_XT:%=-D%) -DROMSIZE=$(ROMSIZE)
 DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%) -DROMSIZE=$(ROMSIZE)
@@ -120,5 +120,5 @@
 DEFS_XTPLUS_LARGE = $(DEFINES_XTPLUS_LARGE:%=-D%) -DROMSIZE=$(ROMSIZE_LARGE)
 DEFS_AT_LARGE = $(DEFINES_AT_LARGE:%=-D%) -DROMSIZE=$(ROMSIZE_LARGE)
-DEFS_JRIDE_8K = $(DEFINES_JRIDE_8K:%=-D%) -DROMSIZE=$(ROMSIZE)
+DEFS_XT_TINY = $(DEFINES_XT_TINY:%=-D%) -DROMSIZE=$(ROMSIZE)
 DEFS_386_8K = $(DEFINES_386_8K:%=-D%) -DROMSIZE=$(ROMSIZE)
 
@@ -149,5 +149,4 @@
 # Assembly compiler flags
 ASFLAGS = -f bin				# Produce binary object files
-ASFLAGS += $(DEFS)				# Preprocessor defines
 ASFLAGS += $(IHEADERS)			# Set header file directory paths
 ASFLAGS += -Worphan-labels		# Warn about labels without colon
@@ -162,8 +161,8 @@
 	@echo All done!
 
-small: at xtplus xt jride_8k 386_8k
+small: xt_tiny xt xtplus at 386_8k
 	@echo All 8 kiB binaries built!
 
-large: at_large xtplus_large xt_large
+large: xt_large xtplus_large at_large
 	@echo All 15 kiB binaries built!
 
@@ -192,7 +191,7 @@
 	@echo *15k XT version "$(TARGET)_xtl.bin" built.
 
-jride_8k:
-	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_JRIDE_8K) -l"$(TARGET)_jr8k.lst" -o"$(TARGET)_jr8k.bin"
-	@echo * 8k JR-IDE/ISA version "$(TARGET)_jr8k.bin" built.
+xt_tiny:
+	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT_TINY) -l"$(TARGET)_tiny.lst" -o"$(TARGET)_tiny.bin"
+	@echo * Tiny XT version "$(TARGET)_tiny.bin" built.
 
 386_8k:
@@ -210,11 +209,11 @@
 
 checksum: all
+	@perl ..\tools\checksum.pl $(TARGET)_tiny.bin $(ROMSIZE)
+	@perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE)
+	@perl ..\tools\checksum.pl $(TARGET)_xtp.bin $(ROMSIZE)
+	@perl ..\tools\checksum.pl $(TARGET)_at.bin $(ROMSIZE)
+	@perl ..\tools\checksum.pl $(TARGET)_xtl.bin $(ROMSIZE_LARGE)
+	@perl ..\tools\checksum.pl $(TARGET)_xtpl.bin $(ROMSIZE_LARGE)
 	@perl ..\tools\checksum.pl $(TARGET)_atl.bin $(ROMSIZE_LARGE)
-	@perl ..\tools\checksum.pl $(TARGET)_xtpl.bin $(ROMSIZE_LARGE)
-	@perl ..\tools\checksum.pl $(TARGET)_xtl.bin $(ROMSIZE_LARGE)
-	@perl ..\tools\checksum.pl $(TARGET)_at.bin $(ROMSIZE)
-	@perl ..\tools\checksum.pl $(TARGET)_xtp.bin $(ROMSIZE)
-	@perl ..\tools\checksum.pl $(TARGET)_xt.bin $(ROMSIZE)
-	@perl ..\tools\checksum.pl $(TARGET)_jr8k.bin $(ROMSIZE)
 	@perl ..\tools\checksum.pl $(TARGET)_386.bin $(ROMSIZE)
 
