Index: trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Inc/BootMenu.inc	(revision 92)
@@ -10,7 +10,8 @@
 BOOT_MENU_WIDTH					EQU	40	; Menu width in characters
 BOOT_MENU_HEIGHT_WITHOUT_ITEMS	EQU	(BOOT_MENU_TITLE_LINES + BOOT_MENU_INFO_LINES + 4)
+MENU_SCREEN_BOTTOM_LINES		EQU	1
 
-; Function IDs
-ID_BOOTFUNC_ROMBOOT				EQU	0	; ROM boot
+; Hotkeys
+ROM_BOOT_HOTKEY_SCANCODE		EQU	42h	; F8
 
 
Index: trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Inc/RomVars.inc	(revision 92)
@@ -31,5 +31,4 @@
 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_ROMBOOT		EQU	(1<<3)	; Include ROMBOOT to boot menu
 FLG_ROMVARS_MAXSIZE		EQU	(1<<5)	; Maximize size by sacrificing compatibility with some old BIOSes
 
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenu.asm	(revision 92)
@@ -27,5 +27,5 @@
 	cmp		cx, BYTE NO_ITEM_SELECTED
 	je		SHORT BootMenu_DisplayAndReturnSelection
-	jmp		BootMenu_ConvertMenuitemToDriveOrFunction
+	jmp		SHORT BootMenu_ConvertMenuitemFromCXtoDriveInDX
 
 
@@ -66,27 +66,4 @@
 	call	FloppyDrive_GetCount
 	add		ax, cx
-	call	BootMenu_GetMenuFunctionCount
-	add		cx, ax
-	ret
-
-;--------------------------------------------------------------------
-; Returns number of functions displayed in Boot Menu.
-;
-; BootMenu_GetMenuFunctionCount
-;	Parameters:
-;		Nothing
-;	Returns:
-;		CX:		Number of boot menu functions
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenu_GetMenuFunctionCount:
-	xor		cx, cx
-	test	BYTE [cs:ROMVARS.wFlags], FLG_ROMVARS_ROMBOOT
-	jz		SHORT .DontIncludeRomBoot
-	inc		cx
-ALIGN JUMP_ALIGN
-.DontIncludeRomBoot:
 	ret
 
@@ -110,9 +87,7 @@
 
 ;--------------------------------------------------------------------
-; Converts any hotkey to Boot Menu menuitem index.
-;
-; BootMenu_ConvertHotkeyToMenuitem
-;	Parameters:
-;		AX:		ASCII hotkey starting from upper case 'A'
+; BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX
+;	Parameters:
+;		AL:		ASCII hotkey starting from upper case 'A'
 ;	Returns:
 ;		CX:		Menuitem index
@@ -121,6 +96,6 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-BootMenu_ConvertHotkeyToMenuitem:
-	call	BootMenu_GetLetterForFirstHardDisk
+BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX:
+	call	BootMenu_GetLetterForFirstHardDiskToCL
 	cmp		al, cl						; Letter is for Hard Disk?
 	jae		SHORT .StartFromHardDiskLetter
@@ -139,5 +114,5 @@
 ; can be higher if more than two floppy drives are found.
 ;
-; BootMenu_GetLetterForFirstHardDisk
+; BootMenu_GetLetterForFirstHardDiskToCL
 ;	Parameters:
 ;		Nothing
@@ -148,5 +123,5 @@
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
-BootMenu_GetLetterForFirstHardDisk:
+BootMenu_GetLetterForFirstHardDiskToCL:
 	call	FloppyDrive_GetCount
 	add		cl, 'A'
@@ -156,20 +131,15 @@
 
 ;--------------------------------------------------------------------
-; Converts selected menuitem index to drive number or function ID.
-;
-; BootMenu_ConvertMenuitemToDriveOrFunction
+; BootMenu_ConvertMenuitemFromCXtoDriveInDX
 ;	Parameters:
 ;		CX:		Index of menuitem selected from Boot Menu
 ;		DS:		RAMVARS segment
 ;	Returns:
-;		DX:		Drive number to be used for booting (if CF cleared)
-;				Function ID (if CF set)
-;		CF:		Cleared if drive selected
-;				Set if function selected
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenu_ConvertMenuitemToDriveOrFunction:
+;		DX:		Drive number to be used for booting
+;	Corrupts registers:
+;		CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BootMenu_ConvertMenuitemFromCXtoDriveInDX:
 	mov		dx, cx					; Copy menuitem index to DX
 	call	FloppyDrive_GetCount
@@ -177,35 +147,6 @@
 	jb		SHORT .ReturnFloppyDriveInDX
 	sub		dx, cx					; Remove floppy drives from index
-	call	RamVars_GetHardDiskCountFromBDAtoCX
-	cmp		dx, cx					; Hard disk?
-	jb		SHORT .ReturnHardDiskInDX
-	sub		dx, cx					; Remove hard disks from index
-	jmp		SHORT BootMenu_ConvertFunctionIndexToID
-ALIGN JUMP_ALIGN
-.ReturnHardDiskInDX:
 	or		dl, 80h
-ALIGN JUMP_ALIGN
 .ReturnFloppyDriveInDX:
-	clc
-	ret
-
-
-;--------------------------------------------------------------------
-; Converts selected menuitem index to drive number or function ID.
-;
-; BootMenu_ConvertFunctionIndexToID
-;	Parameters:
-;		CX:		Menuitem index
-;		DX:		Function index (Menuitem index - floppy count - HD count)
-;	Returns:
-;		DX:		Function ID
-;		CF:		Set to indicate function
-;	Corrupts registers:
-;		AX, CX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenu_ConvertFunctionIndexToID:
-	mov		dx, ID_BOOTFUNC_ROMBOOT
-	stc
 	ret
 
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuEvent.asm	(revision 92)
@@ -62,4 +62,5 @@
 	mov		BYTE [si+MENUINIT.bWidth], BOOT_MENU_WIDTH
 	call	BootMenu_GetHeightToAHwithItemCountInCL
+	sub		ah, MENU_SCREEN_BOTTOM_LINES*2
 	mov		[si+MENUINIT.bHeight], ah
 	stc
@@ -90,9 +91,6 @@
 	call	RamVars_GetSegmentToDS
 	call	DriveXlate_Reset
-	call	BootMenu_ConvertMenuitemToDriveOrFunction
-	jc		SHORT .UpdatePreviousAndNewMenuitem	; Selection changed to a function
+	call	BootMenu_ConvertMenuitemFromCXtoDriveInDX
 	call	DriveXlate_SetDriveToSwap
-
-.UpdatePreviousAndNewMenuitem:
 	pop		ax		; Update previous item
 	CALL_MENU_LIBRARY RefreshItemFromAX
@@ -109,8 +107,12 @@
 ALIGN JUMP_ALIGN
 .KeyStrokeInAX:
-	xor		ah, ah					; ASCII drive letter now in AX
-	call	BootMenu_ConvertHotkeyToMenuitem
+	cmp		ah, ROM_BOOT_HOTKEY_SCANCODE
+	jne		SHORT .CheckDriveHotkeys
+	int		INTV_BOOT_FAILURE		; ROM Boot, never returns
+ALIGN JUMP_ALIGN
+.CheckDriveHotkeys:
+	call	BootMenu_ConvertAsciiHotkeyFromALtoMenuitemInCX
 	cmp		cx, [bp+MENUINIT.wItems]
-	jae		SHORT .EventNotHandled	; Invalid key
+	jae		SHORT .EventCompleted	; Invalid key
 	xchg	ax, cx
 	CALL_MENU_LIBRARY HighlightItemFromAX
@@ -159,12 +161,8 @@
 
 	call	RamVars_GetSegmentToDS
-	call	BootMenu_ConvertMenuitemToDriveOrFunction
-	jc		SHORT .DrawFunction
+	call	BootMenu_ConvertMenuitemFromCXtoDriveInDX
 	test	dl, 80h					; Floppy drive?
 	jz		SHORT .DrawFloppyDrive
 	jmp		[cs:bx+ITEM_TYPE_REFRESH.HardDisk]
-ALIGN JUMP_ALIGN
-.DrawFunction:
-	jmp		[cs:bx+ITEM_TYPE_REFRESH.SpecialFunction]
 ALIGN JUMP_ALIGN
 .DrawFloppyDrive:
@@ -177,5 +175,4 @@
 	at	ITEM_TYPE_REFRESH.HardDisk,			dw	BootMenuPrint_HardDiskMenuitem
 	at	ITEM_TYPE_REFRESH.FloppyDrive,		dw	BootMenuPrint_FloppyMenuitem
-	at	ITEM_TYPE_REFRESH.SpecialFunction, 	dw	BootMenuPrint_FunctionMenuitem
 iend
 .rgwInformationItemTypeRefresh:
@@ -183,4 +180,3 @@
 	at	ITEM_TYPE_REFRESH.HardDisk,			dw	BootMenuPrint_HardDiskMenuitemInformation
 	at	ITEM_TYPE_REFRESH.FloppyDrive,		dw	BootMenuPrint_FloppyMenuitemInformation
-	at	ITEM_TYPE_REFRESH.SpecialFunction, 	dw	BootMenuPrint_ClearInformationArea
 iend
Index: trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Src/Boot/BootMenuPrint.asm	(revision 92)
@@ -39,65 +39,4 @@
 	ret
 
-
-;--------------------------------------------------------------------
-; Prints Floppy Drive hotkey string.
-;
-; BootMenuPrint_FloppyHotkeyString
-;	Parameters:
-;		BL:		Number of floppy drives in system
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, SI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_FloppyHotkeyString:
-	test	bl, bl					; Any floppy drives?
-	jz		SHORT NoFloppyDrivesOrHardDisksToPrint
-	push	bp
-
-	mov		bp, sp
-	mov		al, 'A'
-	push	ax						; 'A'
-	dec		ax
-	add		al, bl
-	push	ax						; Last floppy drive letter
-	ePUSH_T	ax, g_szFDD
-	ePUSH_T	ax, g_szHDD
-	jmp		SHORT PrintHotkeyString
-
-;--------------------------------------------------------------------
-; Prints Hard Disk hotkey string.
-;
-; BootMenuPrint_FloppyHotkeyString
-;	Parameters:
-;		BH:		Number of hard disks in system
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX, CX, SI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_HardDiskHotkeyString:
-	test	bh, bh					; Any hard disks?
-	jz		SHORT NoFloppyDrivesOrHardDisksToPrint
-	push	bp
-
-	mov		bp, sp
-	call	BootMenu_GetLetterForFirstHardDisk
-	push	cx						; First hard disk letter
-	dec		cx
-	add		cl, bh
-	push	cx						; Last hard disk letter
-	ePUSH_T	ax, g_szHDD
-	ePUSH_T	ax, g_szFDD
-	; Fall to PrintHotkeyString
-
-ALIGN JUMP_ALIGN
-PrintHotkeyString:
-	mov		si, g_szBottomScrn
-	jmp		BootMenuPrint_FormatCSSIfromParamsInSSBP
-NoFloppyDrivesOrHardDisksToPrint:
-	ret
 
 ;--------------------------------------------------------------------
@@ -216,25 +155,4 @@
 .HardDiskMenuitemForForeignDrive:
 	mov		si, g_szforeignHD
-	jmp		PrintNullTerminatedStringFromCSSIandSetCF
-
-
-;--------------------------------------------------------------------
-; BootMenuPrint_FunctionMenuitem
-;	Parameters:
-;		DX:		Function ID
-;	Returns:
-;		CF:		Set if menu event was handled successfully
-;	Corrupts registers:
-;		AX, DX, SI, DI
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_FunctionMenuitem:
-	test	dx, dx					; ID_BOOTFUNC_ROMBOOT
-	jz		SHORT .PrintRomBootMenuitem
-	ret
-
-ALIGN JUMP_ALIGN
-.PrintRomBootMenuitem:
-	mov		si, g_szRomBoot
 	jmp		PrintNullTerminatedStringFromCSSIandSetCF
 
@@ -479,6 +397,4 @@
 
 ;--------------------------------------------------------------------
-; Prints information strings to the bottom of the screen.
-;
 ; BootMenuPrint_TheBottomOfScreen
 ;	Parameters:
@@ -487,5 +403,5 @@
 ;		Nothing
 ;	Corrupts registers:
-;		AX, BX, CX, DX, SI
+;		AX, BX, CX, DX, SI, DI
 ;--------------------------------------------------------------------
 ALIGN JUMP_ALIGN
@@ -495,50 +411,99 @@
 	call	RamVars_GetHardDiskCountFromBDAtoCX
 	mov		bh, cl					; Hard Disk count to BH
-	call	BootMenuPrint_GetCoordinatesForBottomStrings
-	call	BootMenuPrint_SetCursorPosition
-	call	BootMenuPrint_FloppyHotkeyString
-	jmp		BootMenuPrint_HardDiskHotkeyString
-
-
-;--------------------------------------------------------------------
-; Returns coordinates for bottom strings.
-;
-; BootMenuPrint_GetCoordinatesForBottomStrings
-;	Parameters:
-;		BL:		Number of floppy drives in system
-;		BH:		Number of hard disks in system
-;	Returns:
-;		DL:		Cursor X coordinate
-;		DH:		Cursor Y coordinate
-;	Corrupts registers:
-;		Nothing
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_GetCoordinatesForBottomStrings:
-	mov		dx, 1800h				; (0, 24)
-	cmp		dl, bl					; Set CF if any floppy drives
-	sbb		dh, dl					; Decrement Y-coordinate if necessary
-	cmp		dl, bh					; Set CF if any hard disks
-	sbb		dh, dl					; Decrement Y-coordinate if necessary
-	ret
-
-
-;--------------------------------------------------------------------
-; Sets cursor to wanted screen coordinates.
-;
-; BootMenuPrint_SetCursorPosition
-;	Parameters:
-;		DL:		Cursor X coordinate
-;		DH:		Cursor Y coordinate
-;	Returns:
-;		Nothing
-;	Corrupts registers:
-;		AX
-;--------------------------------------------------------------------
-ALIGN JUMP_ALIGN
-BootMenuPrint_SetCursorPosition:
-	push	di
-	mov		ax, dx
+	; 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
-	pop		di
-	ret
+	; Fall to .PrintHotkeyString
+
+;--------------------------------------------------------------------
+; .PrintHotkeyString
+;	Parameters:
+;		BL:		Floppy Drives
+;		BH:		Hard Drives
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, CX, DX, SI
+;--------------------------------------------------------------------
+.PrintHotkeyString:
+	; Display Library should not be called like this
+	mov		si, ATTRIBUTE_CHARS.cTitle
+	call	MenuAttribute_GetToAXfromTypeInSI
+	xchg	cx, ax
+	mov		si, ATTRIBUTE_CHARS.cHighlightedItem
+	call	MenuAttribute_GetToAXfromTypeInSI
+	xchg	dx, ax
+
+	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_GetLetterForFirstHardDiskToCL
+	mov		ch, ANGLE_QUOTE_RIGHT
+	xchg	ax, cx
+	mov		si, g_szHDD
+	call	PushHotkeyParamsAndFormat
+
+.SkipHardDriveHotkeys:
+	; Fall to .PrintRomBootHotkey
+
+;--------------------------------------------------------------------
+; .PrintRomBootHotkey
+;	Parameters:
+;		CX:		Key Attribute
+;		DX:		Description Attribute
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, SI
+;--------------------------------------------------------------------
+.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
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+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		BootMenuPrint_FormatCSSIfromParamsInSSBP
Index: trunk/XTIDE_Universal_BIOS/Src/Main.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Src/Main.asm	(revision 92)
@@ -85,5 +85,5 @@
 ; XT and XT+ Build default settings ;
 ;-----------------------------------;
-	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_ROMBOOT | FLG_ROMVARS_MAXSIZE
+	at	ROMVARS.wFlags,			dw	FLG_ROMVARS_DRVXLAT | FLG_ROMVARS_MAXSIZE
 	at	ROMVARS.bIdeCnt,		db	1						; Number of supported controllers
 	at	ROMVARS.bBootDrv,		db	80h						; Boot Menu default drive
Index: trunk/XTIDE_Universal_BIOS/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 91)
+++ trunk/XTIDE_Universal_BIOS/Src/Strings.asm	(revision 92)
@@ -15,20 +15,20 @@
 g_szFloppyDrv:	db	"Floppy Drive",NULL
 g_szHardDrv:	db	" Hard Drive ",NULL
-g_szTryToBoot:	db	"Booting from %s %x",175,"%x ... ",NULL
+g_szTryToBoot:	db	"Booting from %s %x",ANGLE_QUOTE_RIGHT,"%x ... ",NULL
 g_szBootSector:	db	"Boot Sector",NULL
 g_szFound:		db	"found",NULL
 g_szSectRead:	db	"%s %s!",CR,LF,NULL
 g_szReadError:	db	"Error %x!",CR,LF,NULL
-g_sz18hCallback:db	"Boot menu callback via INT 18h",NULL
 
 ; Boot menu bottom of screen strings
 g_szFDD:		db	"FDD",NULL
 g_szHDD:		db	"HDD",NULL
-g_szBottomScrn:	db	"%c to %c boots from %s with %s mappings",CR,LF,NULL
+g_szRomBoot:	db	"ROM Boot",NULL
+g_szHotkey:		db	"%A%c%c%A%8s%a ",NULL
+
 
 ; Boot Menu menuitem strings
 g_szFDLetter:	db	"%s %c",NULL
 g_szforeignHD:	db	"Foreign Hard Disk",NULL
-g_szRomBoot:	db	"ROM Boot",NULL
 
 ; Boot Menu information strings
@@ -43,4 +43,4 @@
 g_szLBA48:		db	"LBA48",NULL
 g_szFddUnknown:	db	"%sUnknown",NULL
-g_szFddSizeOr:	db	"%s5",172,22h," or 3",171,22h," DD",NULL
-g_szFddSize:	db	"%s%c%c",22h,", %u kiB",NULL	; 3½", 1440 kiB
+g_szFddSizeOr:	db	"%s5",ONE_QUARTER,QUOTATION_MARK," or 3",ONE_HALF,QUOTATION_MARK," DD",NULL
+g_szFddSize:	db	"%s%c%c",QUOTATION_MARK,", %u kiB",NULL	; 3½", 1440 kiB
