Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm	(revision 392)
+++ 	(revision )
@@ -1,230 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Displays 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
-
-;--------------------------------------------------------------------
-; Displays Boot Menu and returns Drive or Function number.
-;
-; BootMenu_DisplayAndReturnSelectionInDX
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		DX:		Untranslated drive number to be used for booting
-;	Corrupts registers:
-;		All General Purpose Registers
-;--------------------------------------------------------------------
-BootMenu_DisplayAndReturnSelectionInDX:
-	call	DriveXlate_Reset
-	call	BootMenuPrint_TheBottomOfScreen
-	call	BootMenu_Enter			; Get selected menuitem index to CX
-	call	BootMenuPrint_ClearScreen
-	call	BootMenu_GetDriveToDXforMenuitemInCX
-	jnc		BootMenu_DisplayAndReturnSelectionInDX
-	ret
-
-;--------------------------------------------------------------------
-; BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
-; BootMenu_GetDriveToDXforMenuitemInCX
-;	Parameters:
-;		CX:		Index of menuitem selected from Boot Menu
-;	Returns:
-;		DX:		Drive number to be used for booting
-;		DS:		RAMVARS segment
-;       CF:     Set: There is a selected menu item, DL is valid
-;               Clear: There is no selected menu item, DL is not valid
-;	Corrupts registers:
-;		AX, DI
-;--------------------------------------------------------------------
-BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS:
-	call	RamVars_GetSegmentToDS
-;;; fall-through
-
-BootMenu_GetDriveToDXforMenuitemInCX:
-	cmp		cl, NO_ITEM_HIGHLIGHTED
-	je		SHORT .ReturnFloppyDriveInDX	; Clear CF if branch taken
-
-	mov		dl, cl							; Copy menuitem index to DX
-	call	FloppyDrive_GetCountToAX
-	cmp		dl, al							; Floppy drive?
-	jb		SHORT .ReturnFloppyDriveInDX	; Set CF if branch taken
-	or		al, 80h							; Or 80h into AL before the sub
-											; to cause CF to be set after
-											; and result has high order bit set
-	sub		dl, al							; Remove floppy drives from index
-
-.ReturnFloppyDriveInDX:
-	ret
-
-
-;--------------------------------------------------------------------
-; Enters Boot Menu or submenu.
-;
-; BootMenu_Enter
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CX:		Index of selected item or NO_ITEM_SELECTED
-;	Corrupts registers:
-;		AX, BX, DI
-;--------------------------------------------------------------------
-BootMenu_Enter:
-	mov		bx, BootMenuEvent_Handler
-	CALL_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX
-	xchg	cx, ax
-	ret
-
-
-;--------------------------------------------------------------------
-; Returns number of menuitems in Boot Menu.
-;
-; BootMenu_GetMenuitemCountToAX
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		AX:		Number of boot menu items
-;	Corrupts registers:
-;		CX
-;--------------------------------------------------------------------
-BootMenu_GetMenuitemCountToAX:
-	call	RamVars_GetHardDiskCountFromBDAtoAX
-	xchg	ax, cx
-	call	FloppyDrive_GetCountToAX
-	add		ax, cx
-	ret
-
-
-;--------------------------------------------------------------------
-; BootMenu_GetHeightToAHwithItemCountInAL
-;	Parameters:
-;		AL:		Number of menuitems
-;	Returns:
-;		AH:		Boot menu height
-;	Corrupts registers:
-;		AL, CX, DI
-;--------------------------------------------------------------------
-BootMenu_GetHeightToAHwithItemCountInAL:
-	add		al, BOOT_MENU_HEIGHT_WITHOUT_ITEMS
-	xchg	cx, ax
-	CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
-	sub		ah, MENU_SCREEN_BOTTOM_LINES*2	; Leave space for bottom info
-	cmp		ah, cl
-	jb		SHORT .Return
-	mov		ah, cl
-
-.Return:
-	ret
-
-
-;--------------------------------------------------------------------
-; BootMenu_GetMenuitemToAXforAsciiHotkeyInAL
-;	Parameters:
-;		AL:		ASCII hotkey
-;	Returns:
-;		AX:		Menuitem index
-;	Corrupts registers:
-;		CX
-;--------------------------------------------------------------------
-BootMenu_GetMenuitemToAXforAsciiHotkeyInAL:
-	call	Char_ALtoUpperCaseLetter
-	cbw
-	xchg	ax, cx
-	call	BootMenu_GetLetterForFirstHardDiskToAL
-	cmp		cl, al						; Letter is for Hard Disk?
-	jae		SHORT .StartFromHardDiskLetter
-	xchg	ax, cx
-	sub		al, 'A'						; Letter to Floppy Drive menuitem
-	ret
-
-.StartFromHardDiskLetter:
-	sub		cl, al						; Hard Disk index
-	call	FloppyDrive_GetCountToAX
-	add		ax, cx						; Menuitem index
-										; Note: no need to xchg ax, cx as above, since adding with result to ax
-	ret
-
-
-;--------------------------------------------------------------------
-; Returns letter for first hard disk. Usually it will be 'c' but it
-; can be higher if more than two floppy drives are found.
-;
-; BootMenu_GetLetterForFirstHardDiskToCL
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CL:		Upper case letter for first hard disk
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-BootMenu_GetLetterForFirstHardDiskToAL:
-	call	FloppyDrive_GetCountToAX
-	add		al, 'A'
-	cmp		al, 'C'
-	ja		.Return
-	mov		al, 'C'
-		
-.Return:
-	ret
-
-
-;--------------------------------------------------------------------
-; BootMenu_GetMenuitemToDXforDriveInDL
-;	Parameters:
-;		DL:		Drive number
-;	Returns:
-;		DX:		Menuitem index (assuming drive is available)
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-BootMenu_GetMenuitemToDXforDriveInDL:
-	xor		dh, dh						; Drive number now in DX
-	test	dl, dl
-	jns		SHORT .ReturnItemIndexInDX	; Return if floppy drive (HD bit not set)
-	call	FloppyDrive_GetCountToAX
-	and		dl, ~80h					; Clear HD bit
-	add		dx, ax
-.ReturnItemIndexInDX:
-	ret
-
-
-;--------------------------------------------------------------------
-; Checks is drive number valid for this system.
-;
-; BootMenu_IsDriveInSystem
-;	Parameters:
-;		DL:		Drive number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set if drive number is valid
-;				Clear if drive is not present in system
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-BootMenu_IsDriveInSystem:
-	test	dl, dl								; Floppy drive?
-	jns		SHORT .IsFloppyDriveInSystem
-	call	RamVars_GetHardDiskCountFromBDAtoAX	; Hard Disk count to AX
-	or		al, 80h								; Set Hard Disk bit to AX
-	jmp		SHORT .CompareDriveNumberToDriveCount
-.IsFloppyDriveInSystem:
-	call	FloppyDrive_GetCountToAX
-.CompareDriveNumberToDriveCount:
-	cmp		dl, al								; Set CF when DL is smaller
-	ret
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 392)
+++ 	(revision )
@@ -1,166 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Boot Menu event handler for menu library callbacks.
-
-;
-; 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
-
-;--------------------------------------------------------------------
-; BootMenuEvent_Handler
-;	Common parameters for all events:
-;		BX:			Menu event (anything from MENUEVENT struct)
-;		SS:BP:		Menu library handle
-;	Common return values for all events:
-;		CF:			Set if event processed
-;					Cleared if event not processed
-;	Corrupts registers:
-;		All
-;--------------------------------------------------------------------
-BootMenuEvent_Handler:
-
-%ifdef MENUEVENT_INLINE_OFFSETS
-
-	add		bx, BootMenuEvent_Handler.FirstEvent
-	jmp		bx
-
-MENUEVENT_InitializeMenuinitFromDSSI equ  (BootMenuEvent_Handler.InitializeMenuinitFromDSSI - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_ExitMenu equ  (BootMenuEvent_EventCompleted - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_ItemHighlightedFromCX equ (BootMenuEvent_Handler.ItemHighlightedFromCX - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_ItemSelectedFromCX equ (BootMenuEvent_Handler.ItemSelectedFromCX - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_KeyStrokeInAX equ (BootMenuEvent_Handler.KeyStrokeInAX - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_RefreshTitle equ (BootMenuPrint_TitleStrings - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_RefreshInformation equ (BootMenuPrint_RefreshInformation - BootMenuEvent_Handler.FirstEvent)
-MENUEVENT_RefreshItemFromCX equ (BootMenuPrint_RefreshItem - BootMenuEvent_Handler.FirstEvent)
-;
-; Note that there is no entry for MENUEVENT_IdleProcessing.  If MENUEVENT_IDLEPROCESSING_ENABLE is not %defined,
-; then the entry point will not be called (saving memory on this end and at the CALL point).
-;
-
-%else
-
-	cmp		bx, BYTE MENUEVENT.RefreshItemFromCX	; Above last supported item?
-	ja		SHORT .EventNotHandled
-	jmp		[cs:bx+.rgfnEventSpecificHandlers]
-
-.EventNotHandled:
-	clc
-	ret
-
-ALIGN WORD_ALIGN
-.rgfnEventSpecificHandlers:
-	dw		.InitializeMenuinitFromDSSI			; MENUEVENT.InitializeMenuinitFromDSSI
-	dw		BootMenuEvent_EventCompleted		; MENUEVENT.ExitMenu
-	dw		.EventNotHandled					; MENUEVENT.IdleProcessing
-	dw		.ItemHighlightedFromCX				; MENUEVENT.ItemHighlightedFromCX
-	dw		.ItemSelectedFromCX					; MENUEVENT.ItemSelectedFromCX
-	dw		.KeyStrokeInAX						; MENUEVENT.KeyStrokeInAX
-	dw		BootMenuPrint_TitleStrings			; MENUEVENT.RefreshTitle
-	dw		BootMenuPrint_RefreshInformation	; MENUEVENT.RefreshInformation
-	dw		BootMenuPrint_RefreshItem			; MENUEVENT.RefreshItemFromCX
-
-%endif
-
-
-; Parameters:
-;	DS:SI:		Ptr to MENUINIT struct to initialize
-; Returns:
-;	DS:SI:		Ptr to initialized MENUINIT struct
-.FirstEvent:	
-.InitializeMenuinitFromDSSI:
-	push	ds
-	call	RamVars_GetSegmentToDS
-	call	.GetDefaultMenuitemToDX
-	call	BootMenu_GetMenuitemCountToAX
-	pop		ds
-	mov		[si+MENUINIT.wItems], ax
-	mov		[si+MENUINIT.wHighlightedItem], dx
-	mov		WORD [si+MENUINIT.wTitleAndInfoLines], BOOT_MENU_TITLE_AND_INFO_LINES
-	mov		BYTE [si+MENUINIT.bWidth], BOOT_MENU_WIDTH
-	call	BootMenu_GetHeightToAHwithItemCountInAL
-	mov		[si+MENUINIT.bHeight], ah
-	mov		ax, [cs:ROMVARS.wBootTimeout]
-	CALL_MENU_LIBRARY StartSelectionTimeoutWithTicksInAX
-	stc
-	ret
-
-.GetDefaultMenuitemToDX:
-	mov		dl, [cs:ROMVARS.bBootDrv]	; Default boot drive
-	call	BootMenu_IsDriveInSystem
-	jnc		SHORT .DoNotSetDefaultMenuitem
-	call	DriveXlate_SetDriveToSwap
-	jmp		BootMenu_GetMenuitemToDXforDriveInDL
-
-.DoNotSetDefaultMenuitem:
-	xor		dx, dx						; Whatever appears first on boot menu
-	ret
-
-
-; Parameters:
-;	CX:			Index of new highlighted item
-;	DX:			Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
-.ItemHighlightedFromCX:
-	push	cx
-	call	BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS		
-	call	DriveXlate_Reset
-	call	DriveXlate_SetDriveToSwap
-
-	xor		ax, ax	; Update first floppy drive (for translated drive number)
-	CALL_MENU_LIBRARY RefreshItemFromAX
-	mov		dl, 80h
-	call	BootMenu_GetMenuitemToDXforDriveInDL
-	xchg	ax, dx	; Update first hard disk (for translated drive number)
-	CALL_MENU_LIBRARY RefreshItemFromAX
-	pop		ax		; Update new item (for translated drive number)
-	CALL_MENU_LIBRARY RefreshItemFromAX
-	CALL_MENU_LIBRARY RefreshInformation
-	stc
-	ret
-
-
-; Parameters:
-;	AL:			ASCII character for the key
-;	AH:			Keyboard library scan code for the key
-.KeyStrokeInAX:
-	cmp		ah, ROM_BOOT_HOTKEY_SCANCODE
-	jne		SHORT .CheckDriveHotkeys
-	;; NOTE: carry flag will be clear after compare above that resulted in zero
-	jmp		Int19hMenu_JumpToBootSector_or_RomBoot   	
-
-.CheckDriveHotkeys:
-	call	BootMenu_GetMenuitemToAXforAsciiHotkeyInAL
-	cmp		ax, [bp+MENUINIT.wItems]
-	jae		SHORT BootMenuEvent_EventCompleted	; Invalid key
-
-	; Highlighting new item resets drive translation and we do not want that.
-	; We must be able to translate both floppy drive and hard drive when using hotkey.
-	call	RamVars_GetSegmentToDS	
-	mov		dx, [RAMVARS.xlateVars+XLATEVARS.wFDandHDswap]
-	CALL_MENU_LIBRARY HighlightItemFromAX
-	or		[RAMVARS.xlateVars+XLATEVARS.wFDandHDswap], dx
-	; Fall to .ItemSelectedFromCX
-
-
-; Parameters:
-;	CX:			Index of selected item
-.ItemSelectedFromCX:
-	CALL_MENU_LIBRARY Close
-
-BootMenuEvent_EventCompleted:
-	stc
-	ret
-
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuInfo.asm	(revision 392)
+++ 	(revision )
@@ -1,99 +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
-;--------------------------------------------------------------------
-BootMenuInfo_GetTotalSectorCount:
-	test	BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA
-	jnz		SHORT .ReturnFullCapacity
-	jmp		AH15h_GetSectorCountToBXDXAX
-.ReturnFullCapacity:
-	jmp		AccessDPT_GetLbaSectorCountToBXDXAX
-
-
-;--------------------------------------------------------------------
-; 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/Boot/BootMenuPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm	(revision 392)
+++ 	(revision )
@@ -1,345 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Functions for printing boot menu strings.
-
-;
-; 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
-
-;--------------------------------------------------------------------
-; BootMenuPrint_RefreshItem
-;
-;	Parameters:
-;		DL:		Untranslated Floppy Drive number
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, DX, SI, DI
-;--------------------------------------------------------------------
-BootMenuPrint_RefreshItem:
-	call	BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
-	jnc		BootMenuEvent_EventCompleted			; if no menu item selected, out we go
-
-	push	bp
-	mov		bp, sp
-
-	call	FindDPT_ForDriveNumberInDL
-	jc		.notOurs
-
-	call	BootMenuInfo_ConvertDPTtoBX
-	mov		si, g_szDriveNumBOOTNFO					; special g_szDriveNum that prints from BDA
-	jmp		.go
-
-.notOurs:
-	mov		si,g_szDriveNum
-	mov		bx,g_szForeignHD						; assume a hard disk for the moment
-
-	test	dl, dl
-	js		.go
-	mov		bl,((g_szFloppyDrv)-$$ & 0xff)			; and revisit the earlier assumption...
-
-.go:
-	mov		ax, dx									; preserve DL for the floppy drive letter addition
-	call	DriveXlate_ToOrBack
-	push	dx										; translated drive number
-	push	bx										; sub string
-	add		al, 'A'									; floppy drive letter (we always push this although
-	push	ax										; the hard disks don't ever use it, but it does no harm)
-
-	jmp		SHORT BootMenuPrint_RefreshInformation.FormatRelay
-
-;--------------------------------------------------------------------
-; Prints Boot Menu title strings.
-;
-; BootMenuPrint_TitleStrings
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CF:		Set since menu event handled
-;	Corrupts registers:
-;		AX, SI, DI
-;--------------------------------------------------------------------
-BootMenuPrint_TitleStrings:
-	mov		si, ROMVARS.szTitle
-	call	DetectPrint_NullTerminatedStringFromCSSIandSetCF
-	CALL_DISPLAY_LIBRARY PrintNewlineCharacters
-	mov		si, ROMVARS.szVersion
-	jmp		DetectPrint_NullTerminatedStringFromCSSIandSetCF
-
-
-;--------------------------------------------------------------------
-; BootMenuPrint_FloppyMenuitemInformation
-;	Parameters:
-;		DL:		Untranslated Floppy Drive number
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set since menu event was handled successfully
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI, DI, ES
-;--------------------------------------------------------------------
-BootMenuPrint_RefreshInformation:
-	CALL_MENU_LIBRARY ClearInformationArea
-
-	call	BootMenu_GetDriveToDXforMenuitemInCX_And_RamVars_GetSegmentToDS
-	jnc		BootMenuEvent_EventCompleted				; if no menu selection, abort
-
-	push	bp
-	mov		bp, sp
-
-	mov		si, g_szCapacity							; Setup print string now, carries through to print call
-
-	call	FindDPT_ForDriveNumberInDL
-
-	inc		dl											; are we a hard disk?
-	dec		dl											; inc/dec will set SF, without modifying CF or DL
-	js		.HardDiskRefreshInformation
-
-	jnc		.ours										; Based on CF from FindDPT_ForDriveNumberInDL above
-	call	FloppyDrive_GetType							; Get Floppy Drive type to BX
-	jmp		.around
-.ours:
-	call	AH8h_GetDriveParameters
-.around:
-
-	mov		ax, g_szFddSizeOr	        				; .PrintXTFloppyType
-	test	bl, bl										; Two possibilities? (FLOPPY_TYPE_525_OR_35_DD)
-	jz		SHORT .PushAXAndOutput
-
-	mov		al, (g_szFddUnknown - $$) & 0xff	        ; .PrintUnknownFloppyType
-	cmp		bl, FLOPPY_TYPE_35_ED
-	ja		SHORT .PushAXAndOutput
-
-	; Fall to .PrintKnownFloppyType
-
-;--------------------------------------------------------------------
-; .PrintKnownFloppyType
-;	Parameters:
-;		BX:		Floppy drive type
-;	Returns:
-;		CF:		Set since menu event was handled successfully
-;	Corrupts registers:
-;		AX, BX, SI, DI
-;
-; Floppy Drive Types:
-;
-;   0  Handled above
-;   1  FLOPPY_TYPE_525_DD          5 1/4   360K
-;   2  FLOPPY_TYPE_525_HD          5 1/4   1.2M
-;   3  FLOPPY_TYPE_35_DD           3 1/2   720K
-;   4  FLOPPY_TYPE_35_HD           3 1/2   1.44M
-;   5  3.5" ED on some BIOSes      3 1/2   2.88M
-;   6  FLOPPY_TYPE_35_ED		   3 1/2   2.88M
-;   >6 Unknwon, handled above
-;
-;--------------------------------------------------------------------
-.PrintKnownFloppyType:
-	mov		al, (g_szFddSize - $$) & 0xff
-	push	ax
-
-	mov		al, (g_szFddThreeHalf - $$) & 0xff
-	cmp		bl, FLOPPY_TYPE_525_HD
-	ja		.ThreeHalf
-	mov		al, (g_szFddFiveQuarter - $$) & 0xff
-.ThreeHalf:
-	push	ax											; "5 1/4" or "3 1/2"
-
-	mov		al,FloppyTypes.rgbCapacityMultiplier
-	mov		bh, 0
-	mul		byte [cs:bx+FloppyTypes.rgbCapacity - 1]    ; -1 since 0 is handled above and not in the table
-
-.PushAXAndOutput:
-	push	ax
-
-.FormatRelay:
-	jmp		DetectPrint_FormatCSSIfromParamsInSSBP
-
-
-;--------------------------------------------------------------------
-; Prints Hard Disk Menuitem information strings.
-;
-; BootMenuPrint_HardDiskMenuitemInformation
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		CF:		Set since menu event was handled successfully
-;	Corrupts registers:
-;		BX, CX, DX, SI, DI, ES
-;--------------------------------------------------------------------
-.HardDiskRefreshInformation:
-	jc		.HardDiskMenuitemInfoForForeignDrive		; Based on CF from FindDPT_ForDriveNumberInDL (way) above
-
-.HardDiskMenuitemInfoForOurDrive:
-	ePUSH_T ax, g_szInformation							; Add substring for our hard disk information
-	call	BootMenuInfo_GetTotalSectorCount			; Get Total LBA Size
-	jmp		.ConvertSectorCountInBXDXAXtoSizeAndPushForFormat
-
-.HardDiskMenuitemInfoForForeignDrive:
-	call	DriveXlate_ToOrBack
-	call	AH15h_GetSectorCountFromForeignDriveToDXAX
-
-.ConvertSectorCountInBXDXAXtoSizeAndPushForFormat:
-	ePUSH_T	cx, g_szCapacityNum		; Push format substring
-	call	Size_ConvertSectorCountInBXDXAXtoKiB
-	mov		cx, BYTE_MULTIPLES.kiB
-	call	Size_GetSizeToAXAndCharToDLfromBXDXAXwithMagnitudeInCX
-	push	ax						; Size in magnitude
-	push	cx						; Tenths
-	push	dx						; Magnitude character
-
-	test	di,di
-	jz		SHORT BootMenuPrint_RefreshInformation.FormatRelay
-
-%include "BootMenuPrintCfg.asm"			; inline of code to fill out remainder of information string
-	jmp		DetectPrint_FormatCSSIfromParamsInSSBP
-
-
-;--------------------------------------------------------------------
-; BootMenuPrint_ClearScreen
-;	Parameters:
-;		Nothing
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, DI
-;--------------------------------------------------------------------
-BootMenuPrint_ClearScreen:
-	call	BootMenuPrint_InitializeDisplayContext
-	xor		ax, ax
-	CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
-	mov		ax, ' ' | (MONO_NORMAL<<8)
-	CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH
-	ret
-
-
-;--------------------------------------------------------------------
-; BootMenuPrint_TheBottomOfScreen
-;	Parameters:
-;		DS:		RAMVARS segment
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX, SI, DI
-;--------------------------------------------------------------------
-BootMenuPrint_TheBottomOfScreen:
-	call	FloppyDrive_GetCountToAX
-	xchg	bx, ax					; Floppy Drive count to BL
-	call	RamVars_GetHardDiskCountFromBDAtoAX
-	mov		bh, al					; Hard Disk count to BH
-	; Fall to .MoveCursorToHotkeyStrings
-
-;--------------------------------------------------------------------
-; .MoveCursorToHotkeyStrings
-;	Parameters:
-;		Nothing
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, DI
-;--------------------------------------------------------------------
-.MoveCursorToHotkeyStrings:
-	CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
-	xor		al, al
-	dec		ah
-	CALL_DISPLAY_LIBRARY SetCursorCoordinatesFromAX
-	; Fall to .PrintHotkeyString
-
-;--------------------------------------------------------------------
-; .PrintHotkeyString
-;	Parameters:
-;		BL:		Floppy Drives
-;		BH:		Hard Drives
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, CX, DX, SI, DI
-;--------------------------------------------------------------------
-.PrintHotkeyString:
-	; Display Library should not be called like this
-	mov		si, ATTRIBUTE_CHARS.cHighlightedItem
-	call	MenuAttribute_GetToAXfromTypeInSI
-	xchg	dx, ax
-	mov		cx, MONO_BRIGHT
-
-	test	bl, bl		; Any Floppy Drives?
-	jz		SHORT .SkipFloppyDriveHotkeys
-	mov		ax, 'A' | (ANGLE_QUOTE_RIGHT<<8)
-	mov		si, g_szFDD
-	call	PushHotkeyParamsAndFormat
-
-.SkipFloppyDriveHotkeys:
-	test	bh, bh		; Any Hard Drives?
-	jz		SHORT .SkipHardDriveHotkeys
-	call	BootMenu_GetLetterForFirstHardDiskToAL
-	mov		ah, ANGLE_QUOTE_RIGHT
-	mov		si, g_szHDD
-	call	PushHotkeyParamsAndFormat
-
-.SkipHardDriveHotkeys:
-	; Fall to .PrintRomBootHotkey
-
-;--------------------------------------------------------------------
-; .PrintRomBootHotkey
-;	Parameters:
-;		CX:		Key Attribute
-;		DX:		Description Attribute
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, SI, DI
-;--------------------------------------------------------------------
-.PrintRomBootHotkey:
-	mov		ax, 'F' | ('8'<<8)		; F8
-	mov		si, g_szRomBoot
-	; Fall to PushHotkeyParamsAndFormat
-
-;--------------------------------------------------------------------
-; PushHotkeyParamsAndFormat
-;	Parameters:
-;		AL:		First character
-;		AH:		Second character
-;		CX:		Key Attribute
-;		DX:		Description Attribute
-;		CS:SI:	Description string
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, SI, DI
-;--------------------------------------------------------------------
-PushHotkeyParamsAndFormat:
-	push	bp
-	mov		bp, sp
-
-	push	cx			; Key attribute
-	push	ax			; First character
-	xchg	al, ah
-	push	ax			; Second character
-	push	dx			; Description attribute
-	push	si			; Description string
-	push	cx			; Key attribute for last space
-	mov		si, g_szHotkey
-	jmp		DetectPrint_FormatCSSIfromParamsInSSBP
-
-
-FloppyTypes:
-.rgbCapacityMultiplier equ 20	        ; Multiplier to reduce word sized values to byte size
-.rgbCapacity:
-	db		360   / FloppyTypes.rgbCapacityMultiplier    ;  type 1
-	db		1200  / FloppyTypes.rgbCapacityMultiplier    ;  type 2
-	db		720   / FloppyTypes.rgbCapacityMultiplier    ;  type 3
-	db		1440  / FloppyTypes.rgbCapacityMultiplier    ;  type 4
-	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 5
-	db		2880  / FloppyTypes.rgbCapacityMultiplier    ;  type 6
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrintCfg.asm	(revision 392)
+++ 	(revision )
@@ -1,142 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Functions for printing drive configuration
-;					information on Boot Menu.
-; 
-; Included by BootMenuPrint.asm, this routine is to be inserted into
-; BootMenuPrint_HardDiskRefreshInformation.
-;
-
-;
-; 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
-
-;;; fall-into from BootMenuPrint_HardDiskRefreshInformation.
-
-;--------------------------------------------------------------------
-; Prints Hard Disk configuration for drive handled by our BIOS.
-; Cursor is set to configuration header string position.
-;
-; BootMenuPrintCfg_ForOurDrive
-;	Parameters:
-;		DS:DI:		Pointer to DPT
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, BX, CX, DX
-;--------------------------------------------------------------------
-.BootMenuPrintCfg_ForOurDrive:
-	eMOVZX	ax, [di+DPT.bIdevarsOffset]
-	xchg	bx, ax						; CS:BX now points to IDEVARS
-	; Fall to .PushAndFormatCfgString
-
-;--------------------------------------------------------------------
-; PushAddressingMode
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (jumps to next push below)
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-.PushAddressingMode:
-	AccessDPT_GetUnshiftedAddressModeToALZF
-	;;
-	;; This multiply both shifts the addressing mode bits down to low order bits, and
-	;; at the same time multiplies by the size of the string displacement.  The result is in AH,
-	;; with AL clear, and so we exchange AL and AH after the multiply for the final result.
-	;;
-	mov		cl,(1<<(8-ADDRESSING_MODE_FIELD_POSITION)) * g_szAddressingModes_Displacement
-	mul		cl
-	xchg	al,ah
-	add		ax,g_szAddressingModes
-	push	ax
-
-;--------------------------------------------------------------------
-; PushBlockMode
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (falls to next push below)
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-.PushBlockMode:
-	mov		ax, 1
-	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_BLOCK_MODE_SUPPORTED
-	jz		SHORT .PushBlockSizeFromAX
-	mov		al, [di+DPT_ATA.bBlockSize]
-.PushBlockSizeFromAX:
-	push	ax
-
-;--------------------------------------------------------------------
-; PushBusType
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (jumps to next push below)
-;	Corrupts registers:
-;		AX, DX
-;--------------------------------------------------------------------
-.PushBusType:
-	mov		al,g_szBusTypeValues_Displacement
-	mul		BYTE [cs:bx+IDEVARS.bDevice]
-
-	shr		ax,1			; divide by 2 since IDEVARS.bDevice is multiplied by 2
-
-	add		ax,g_szBusTypeValues
-	push	ax
-
-;--------------------------------------------------------------------
-; PushIRQ
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (falls to next push below)
-;	Corrupts registers:
-;		AX, DX
-;--------------------------------------------------------------------
-.PushIRQ:
-	mov		al, [cs:bx+IDEVARS.bIRQ]
-	cbw
-	push	ax
-
-;--------------------------------------------------------------------
-; PushResetStatus
-;	Parameters:
-;		DS:DI:	Ptr to DPT
-;		CS:BX:	Ptr to IDEVARS
-;	Returns:
-;		Nothing (falls to next push below)
-;	Corrupts registers:
-;		AX, BX, DX, ES
-;--------------------------------------------------------------------
-.PushResetStatus:
-	xor		ax, ax
-%ifdef MODULE_SERIAL
-	test	BYTE [di+DPT.bFlagsHigh], FLGH_DPT_SERIAL_DEVICE
-	jnz		SHORT .AlwaysSuccess
-	mov		al, [di+DPT_ATA.bInitError]
-.AlwaysSuccess:
-%endif
-	push	ax
-
-;;; fall-out to BootMenuPrint_HardDiskRefreshInformation.
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootSector.asm	(revision 392)
+++ 	(revision )
@@ -1,121 +1,0 @@
-; Project name	:	XTIDE Universal BIOS
-; Description	:	Reading and jumping to boot sector.
-
-;
-; 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
-
-;--------------------------------------------------------------------
-; BootSector_TryToLoadFromDriveDL
-;	Parameters:
-;		DL:		Drive to boot from (translated, 00h or 80h)
-;		DS:		RAMVARS segment
-;	Returns:
-;		ES:BX:	Ptr to boot sector (if successful)
-;		CF:		Set if boot sector loaded successfully
-;				Cleared if failed to load boot sector
-;	Corrupts registers:
-;		AX, CX, DH, SI, DI, (DL if failed to read boot sector)
-;--------------------------------------------------------------------
-BootSector_TryToLoadFromDriveDL:
-	call	DetectPrint_TryToBootFromDL
-	call	LoadFirstSectorFromDriveDL
-	jc		SHORT .FailedToLoadFirstSector
-
-	test	dl, dl
-	jns		SHORT .AlwaysBootFromFloppyDriveForBooterGames
-	cmp		WORD [es:bx+510], 0AA55h		; Valid boot sector?
-	jne		SHORT .FirstHardDiskSectorNotBootable
-.AlwaysBootFromFloppyDriveForBooterGames:
-	stc
-	ret
-.FailedToLoadFirstSector:
-	call	DetectPrint_FailedToLoadFirstSector
-	clc
-	ret
-.FirstHardDiskSectorNotBootable:
-	mov		si, g_szBootSectorNotFound
-	call	DetectPrint_NullTerminatedStringFromCSSIandSetCF
-	clc
-	ret
-
-;--------------------------------------------------------------------
-; LoadFirstSectorFromDriveDL
-;	Parameters:
-;		DL:		Drive to boot from (translated, 00h or 80h)
-;	Returns:
-;		AH:		INT 13h error code
-;		ES:BX:	Ptr to boot sector (if successful)
-;		CF:		Cleared if read successful
-;				Set if any error
-;	Corrupts registers:
-;		AL, CX, DH, DI
-;--------------------------------------------------------------------
-LoadFirstSectorFromDriveDL:
-	LOAD_BDA_SEGMENT_TO	es, bx				; ES:BX now points to...
-	mov		bx, BOOTVARS.rgbBootSect		; ...boot sector location
-	mov		di, BOOT_READ_RETRY_TIMES		; Initialize retry counter
-
-.ReadRetryLoop:
-	call	.ResetBootDriveFromDL
-	call	.LoadFirstSectorFromDLtoESBX
-	jnc		SHORT .Return
-	dec		di								; Decrement retry counter
-	jnz		SHORT .ReadRetryLoop			; Loop while retries left
-.Return:
-	ret
-
-;--------------------------------------------------------------------
-; .ResetBootDriveFromDL
-;	Parameters:
-;		DL:		Drive to boot from (translated, 00h or 80h)
-;	Returns:
-;		AH:		INT 13h error code
-;		CF:		Cleared if read successful
-;				Set if any error
-;	Corrupts registers:
-;		AL
-;--------------------------------------------------------------------
-.ResetBootDriveFromDL:
-	xor		ax, ax							; AH=0h, Disk Controller Reset
-	test	dl, dl							; Floppy drive?
-	jns		SHORT .SkipAltReset
-	mov		ah, 0Dh							; AH=Dh, Reset Hard Disk (Alternate reset)
-.SkipAltReset:
-	int		BIOS_DISK_INTERRUPT_13h
-	ret
-
-;--------------------------------------------------------------------
-; .LoadFirstSectorFromDLtoESBX
-;	Parameters:
-;		DL:		Drive to boot from (translated, 00h or 80h)
-;		ES:BX:	Destination buffer for boot sector
-;	Returns:
-;		AH:		INT 13h error code
-;		ES:BX:	Ptr to boot sector
-;		CF:		Cleared if read successful
-;				Set if any error
-;	Corrupts registers:
-;		AL, CX, DH
-;--------------------------------------------------------------------
-.LoadFirstSectorFromDLtoESBX:
-	mov		ax, 0201h						; Read 1 sector
-	mov		cx, 1							; Cylinder 0, Sector 1
-	xor		dh, dh							; Head 0
-	int		BIOS_DISK_INTERRUPT_13h
-	ret
