Index: tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_DefaultDrive.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_DefaultDrive.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_DefaultDrive.txt	(revision 72)
@@ -0,0 +1,1 @@
+Drive to be set selected by default when Boot Menu is displayed.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_FloppyDrives.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_FloppyDrives.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_FloppyDrives.txt	(revision 72)
@@ -0,0 +1,1 @@
+Detecting correct number of floppy drives might fail when using floppy controller with it's own BIOS. Minimum number of floppy drives can be specified to force non-detected drives to appear on boot menu.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_RomBoot.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_RomBoot.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_RomBoot.txt	(revision 72)
@@ -0,0 +1,1 @@
+Some old systems have BASIC or DOS in ROM. Since most systems don't have either, ROM Boot setting is disabled by default. Enable it if you have use for it.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_SwapDrives.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_SwapDrives.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_SwapDrives.txt	(revision 72)
@@ -0,0 +1,1 @@
+Some old operating systems (DOS) can only boot from Floppy Drive A (00h) or first Hard Disk (80h, usually drive C). Drive Translation can be used to modify drive numbers so that selected drive will be mapped to 00h or 80h so that it can be booted.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_Timeout.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_Timeout.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Bootmenu_Timeout.txt	(revision 72)
@@ -0,0 +1,1 @@
+Boot Menu selection timeout in seconds. When time goes to zero, currently selected drive will be booted automatically. Timeout can be disabled by setting this to 0.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Configuration_FullMode.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Configuration_FullMode.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Configuration_FullMode.txt	(revision 72)
@@ -0,0 +1,5 @@
+Full mode supports up to 5 IDE controllers (10 drives). Full mode reserves a bit of RAM from top of Conventional memory. This makes possible to use ROM BASIC and software that requires top of interrupt vectors where XTIDE Universal BIOS parameters would be stored in Lite mode.
+
+Lite mode supports only one IDE controller (2 drives) and stores parameters to top of interrupt vectors (30:0h) so no Conventional memory needs to be reserved. Lite mode cannot be used if some software requires top of interrupt vectors. Usually this is not a problem since only IBM ROM BASIC uses them.
+
+Tandy 1000 models with 640 kiB or less memory need to use Lite mode since top of Conventional memory gets dynamically reserved by video hardware. This happens only with Tandy integrated video controller and not when using expansion graphics cards. It is possible to use Full mode if reserving RAM for video memory + what is required for XTIDE Universal BIOS. This would mean 129 kiB but most software should work with 65 kiB reserved.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Configuration_StealSize.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Configuration_StealSize.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Configuration_StealSize.txt	(revision 72)
@@ -0,0 +1,1 @@
+Parameters for detected hard disks must be stored somewhere. In Full mode they are stored to top of Conventional memory. At the moment 1 kiB is always enough but you might want to reserve more if you want to use Full mode on Tandy 1000.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Drive_BlockMode.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Drive_BlockMode.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Drive_BlockMode.txt	(revision 72)
@@ -0,0 +1,1 @@
+Block Mode will speed up transfers since multiple sectors can be transferred before waiting next data request. Normally Block Mode should always be kept enabled but there is at least one drive with buggy Block Mode implementation.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Drive_UserCHS.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Drive_UserCHS.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Drive_UserCHS.txt	(revision 72)
@@ -0,0 +1,1 @@
+Specify (P-)CHS parameters manually instead of autodetecting them. This can be used to limit drive size for old operating systems that do not support large hard disks. Some early IDE drives have buggy autodetecing so they require CHS to be specified manually. Limiting Cylinders will work for all drives but drives may not accept all values for Heads and Sectors per Track.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Flash_Checksum.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Flash_Checksum.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Flash_Checksum.txt	(revision 72)
@@ -0,0 +1,1 @@
+PC BIOSes require checksum byte to the end of expansion card BIOS ROMs. You might not want to generate checksum byte when flashing some other images than XTIDE Universal BIOS.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Flash_PageSize.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Flash_PageSize.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Flash_PageSize.txt	(revision 72)
@@ -0,0 +1,1 @@
+Larger page size will improve write performance but not all EEPROMs support large pages or page writing at all. Byte writing mode will be used when page size is set to 1. Byte writing mode is supported by every EEPROM. Large pages cannot be flashed with slow CPUs.
Index: tags/Configurator_for_v1.1.5/Inc/Help/Flash_SdpCommand.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/Flash_SdpCommand.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/Flash_SdpCommand.txt	(revision 72)
@@ -0,0 +1,6 @@
+Software Data Protection Command:
+None    = Do not use Software Data Protection. Meant for EEPROMs that do not support SDP.
+
+Enable  = Write protects the EEPROM after flashing. Software Data Protection should always be enabled if EEPROM supports it.
+
+Disable = Disables Software Data Protection after flashing.
Index: tags/Configurator_for_v1.1.5/Inc/Help/IDE_CommandPort.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/IDE_CommandPort.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/IDE_CommandPort.txt	(revision 72)
@@ -0,0 +1,1 @@
+IDE controller command block address is the usual address mentioned for IDE controllers. By default the primary IDE controller uses port 1F0h and secondary controller uses port 170h. XTIDE card uses port 300h by default.
Index: tags/Configurator_for_v1.1.5/Inc/Help/IDE_ControlPort.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/IDE_ControlPort.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/IDE_ControlPort.txt	(revision 72)
@@ -0,0 +1,1 @@
+IDE controller Control Block address is normally Command Block address + 200h. For XTIDE card the Control Block registers are mapped right after Command Block registers so use Command Block address + 8h for XTIDE card.
Index: tags/Configurator_for_v1.1.5/Inc/Help/IDE_EnableInterrupt.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/IDE_EnableInterrupt.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/IDE_EnableInterrupt.txt	(revision 72)
@@ -0,0 +1,1 @@
+IDE controller can use interrupts to signal when it is ready to transfer data. This makes possible to do other tasks while waiting drive to be ready. That is usually not useful in MS-DOS but using interrupts frees the bus for any DMA transfers. Polling mode is used when interrupts are disabled. Polling usually gives a little better access times since interrupt handling requires extra processing. There can be some compatibility issues with some old drives when polling is used with Block Mode transfers.
Index: tags/Configurator_for_v1.1.5/Inc/Help/IDE_IRQ.txt
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Help/IDE_IRQ.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Help/IDE_IRQ.txt	(revision 72)
@@ -0,0 +1,1 @@
+IRQ channel to use. All controllers managed by XTIDE Universal BIOS can use the same IRQ when MS-DOS is used. Other operating systems are likely to require different interrupts for each controller.
Index: tags/Configurator_for_v1.1.5/Inc/MenuCfg.inc
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/MenuCfg.inc	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/MenuCfg.inc	(revision 72)
@@ -0,0 +1,20 @@
+; File name		:	MenuCfg.inc
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	18.10.2010
+; Author		:	Tomi Tilli
+; Description	:	Menu configuration.
+%ifndef MENUCFG_INC
+%define MENUCFG_INC
+
+TITLE_LINES_IN_MENU			EQU		3
+INFO_LINES_IN_MENU			EQU		4
+MENU_WIDTH					EQU		40
+MAX_VALUE_STRING_LENGTH		EQU		12
+
+
+KEY_BACK_TO_PREVIOUS_MENU	EQU		ESC
+KEY_DISPLAY_ITEM_HELP		EQU		3Bh		; F1
+
+
+%endif ; MENUCFG_INC
Index: tags/Configurator_for_v1.1.5/Inc/MenuStructs.inc
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/MenuStructs.inc	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/MenuStructs.inc	(revision 72)
@@ -0,0 +1,59 @@
+; File name		:	MenuStructs.inc
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	18.11.2010
+; Author		:	Tomi Tilli
+; Description	:	Menu page and item structs.
+%ifndef MENU_STRUCTS_INC
+%define MENU_STRUCTS_INC
+
+struc MENUPAGE
+	.fnEnter			resb	2	; Function to initialize MENUPAGE
+	.fnBack				resb	2	; Function to initialize previous MENUPAGE
+	.wMenuitems			resb	2	; Number of MENUITEM structs
+	.rgMenuitem:					; All MENUITEM structs in this MENUPAGE
+endstruc
+
+struc MENUITEM
+	.fnActivate			resb	2	; Offset to item activation function
+	.fnFormatValue		resb	2	; Offset to item value formatting function
+
+	.szName				resb	2	; Offset to item name string
+	.szQuickInfo		resb	2	; Offset to item quick information string
+	.szHelp				resb	2	; Offset to item help string
+
+	.bFlags				resb	1	; Item flags
+	.bType				resb	1	; Item type
+	.itemValue			resb	ITEM_VALUE_size		; ITEM_VALUE for automated item handling
+endstruc
+
+; Bit defines for MENUITEM.bFlags
+FLG_MENUITEM_VISIBLE		EQU	(1<<0)	; Item is visible
+FLG_MENUITEM_MODIFY_MENU	EQU	(1<<1)	; Item modifies visibility of other items
+FLG_MENUITEM_FLAGVALUE		EQU	(1<<2)	; Item value is single bit
+FLG_MENUITEM_BYTEVALUE		EQU	(1<<3)	; Item value is single byte
+FLG_MENUITEM_PROGRAMVAR		EQU	(1<<4)	; Item is for configuring program, not BIOS
+
+; Values for MENUITEM.bType
+TYPE_MENUITEM_PAGEBACK		EQU	(0<<1)	; Item returns to previous MENUPAGE
+TYPE_MENUITEM_PAGENEXT		EQU	(1<<1)	; Item changes to next MENUPAGE
+TYPE_MENUITEM_ACTION		EQU	(2<<1)	; Non-configurable item
+TYPE_MENUITEM_MULTICHOISE	EQU	(3<<1)	; Item with multiple predefined choises
+TYPE_MENUITEM_UNSIGNED		EQU	(4<<1)	; Menuitem with user inputted unsigned decimal value
+TYPE_MENUITEM_HEX			EQU	(5<<1)	; Menuitem with user inputted hexadecimal value
+
+
+struc ITEM_VALUE
+	.wRomvarsValueOffset	resb	2	; ROMVARS offset to actual value to be configured
+	.szDialogTitle			resb	2	; Dialog title string
+
+	.szMultichoise			resb	2	; Multiple choises in one string
+	.rgwChoiseToValueLookup	resb	2	; Ptr to lookup table for translating selected choise to actual value
+	.rgszValueToStringLookup:			; Ptr to lookup table for translating value to string
+	.wMinValue				resb	2	; Minimum allowed integer value
+	.wMaxValue:
+	.wValueBitmask			resb	2	; Bitmask for item value flag
+endstruc
+
+
+%endif ; MENU_STRUCTS_INC
Index: tags/Configurator_for_v1.1.5/Inc/Variables.inc
===================================================================
--- tags/Configurator_for_v1.1.5/Inc/Variables.inc	(revision 72)
+++ tags/Configurator_for_v1.1.5/Inc/Variables.inc	(revision 72)
@@ -0,0 +1,96 @@
+; File name		:	Variables.inc
+; Project name	:	XTIDE Univeral BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	6.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Global variables for configuration program.
+%ifndef VARIABLES_INC
+%define VARIABLES_INC
+
+; Equates and defines
+MAX_ALLOWED_IDE_CONTROLLERS			EQU		5	; Maximum number of IDE controllers
+EEPROM_POLLING_TIMEOUT_TICKS		EQU		3	; 1 tick = 54.9 ms
+XTIDE_SIGNATURE_LENGTH				EQU		8	; XTIDE Universal BIOS signature string length
+NUMBER_OF_EEPROM_TYPES				EQU		4
+MAX_EEPROM_SIZE_IN_BYTES			EQU		65536
+
+
+; Program global variables
+struc CFGVARS
+	.pMenupage			resb	2			; Offset to MENUPAGE to display
+	.wFlags				resb	2			; Program flags
+	.wImageSizeInWords	resb	2			; Size in words for loaded ROM or FILE
+	.wEepromSegment		resb	2			; Segment where EEPROM is located
+	.bEepromType		resb	1			; EEPROM type
+	.bEepromPage		resb	1			; EEPROM page size (EEPROM_PAGE)
+	.bSdpCommand		resb	1			; Command for Software Data Protection
+						resb	1
+	.szOpenedFile		resb	FILENAME_BUFFER_SIZE
+endstruc
+
+; Bit defines for CFGVARS.wFlags
+FLG_CFGVARS_FILELOADED	EQU		(1<<0)	; BIOS is loaded from file
+FLG_CFGVARS_ROMLOADED	EQU		(1<<1)	; BIOS is loaded from EEPROM
+FLG_CFGVARS_UNSAVED		EQU		(1<<2)	; BIOS has unsaved changes
+FLG_CFGVARS_CHECKSUM	EQU		(1<<3)	; Generate checksum byte
+
+; EEPROM types
+struc EEPROM_TYPE
+	.2816_2kiB			resb	2
+	.2864_8kiB			resb	2
+	.28256_32kiB		resb	2
+	.28512_64kiB		resb	2
+endstruc
+
+; Software Data Protection commands
+struc SDP_COMMAND
+	.none				resb	2	; Do not use any SDP command
+	.enable				resb	2	; Flash with SDP enable command
+	.disable			resb	2	; Flash with SDP disable command
+endstruc
+
+; Page sizes
+struc EEPROM_PAGE
+	.1_byte				resb	2
+	.2_bytes			resb	2
+	.4_bytes			resb	2
+	.8_bytes			resb	2
+	.16_bytes			resb	2
+	.32_bytes			resb	2
+	.64_bytes			resb	2
+endstruc
+
+; Default CFGVARS settings
+DEFAULT_CFGVARS_FLAGS	EQU		FLG_CFGVARS_CHECKSUM
+DEFAULT_EEPROM_SEGMENT	EQU		0D000h
+DEFAULT_EEPROM_TYPE		EQU		EEPROM_TYPE.2864_8kiB
+DEFAULT_PAGE_SIZE		EQU		EEPROM_PAGE.1_byte
+DEFAULT_SDP_COMMAND		EQU		SDP_COMMAND.enable
+
+
+; Variables required for flashing
+struc FLASHVARS
+	.fpNextSourcePage			resb	4
+	.fpNextComparisonPage		resb	4
+	.fpNextDestinationPage		resb	4
+	.wPagesToFlash				resb	2	; 0 = 65536
+	.wEepromPageSize			resb	2	; 1, 2, 4, 8, 16, 32 or 64
+	.bEepromSdpCommand			resb	1
+	.bEepromType				resb	1
+
+	.wProgressUpdateParam		resb	2
+	.wTimeoutCounter			resb	2
+	.wLastOffsetWritten			resb	2
+	.bLastByteWritten			resb	1
+	.flashResult				resb	1
+endstruc
+
+; Flashing results
+struc FLASH_RESULT
+	.success					resb	2
+	.PollingTimeoutError		resb	2
+	.DataVerifyError			resb	2
+endstruc
+
+
+%endif ; VARIABLES_INC
Index: tags/Configurator_for_v1.1.5/Src/BiosFile.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/BiosFile.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/BiosFile.asm	(revision 72)
@@ -0,0 +1,218 @@
+; File name		:	BiosFile.asm
+; Project name	:	XTIDE Univeral BIOS Configurator v2
+; Created date	:	10.10.2010
+; Last update	:	6.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for loading and saving BIOS image file.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; BiosFile_LoadFileFromDSSItoRamBuffer
+;	Parameters:
+;		DS:SI:	Name of file to open
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, DX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BiosFile_LoadFileFromDSSItoRamBuffer:
+	push	ds
+
+	call	.OpenFileForLoadingFromDSSIandGetSizeToDXCX
+	jc		SHORT .DisplayErrorMessage
+	call	.LoadFileWithNameInDSSIhandleInBXandSizeInDXCXtoRamBuffer
+	jc		SHORT .DisplayErrorMessage
+
+	mov		ax, FLG_CFGVARS_FILELOADED
+	call	Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
+	call	DisplayFileLoadedSuccesfully
+	call	FileIO_CloseUsingHandleFromBX
+	jmp		SHORT .Return
+
+.DisplayErrorMessage:
+	call	FileIO_CloseUsingHandleFromBX
+	call	DisplayFailedToLoadFile
+ALIGN JUMP_ALIGN
+.Return:
+	pop		ds
+	ret
+
+;--------------------------------------------------------------------
+; .OpenFileForLoadingFromDSSIandGetSizeInBytesToDXCX
+;	Parameters:
+;		DS:SI:	Name of file to open
+;	Returns:
+;		BX:		File handle (if succesfull)
+;		DX:CX:	File size (if succesfull)
+;		CF:		Clear if successfull
+;				Set if error
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.OpenFileForLoadingFromDSSIandGetSizeToDXCX:
+	mov		al, FILE_ACCESS.ReadOnly
+	call	FileIO_OpenWithPathInDSSIandFileAccessInAL
+	jc		SHORT .FileError
+	call	FileIO_GetFileSizeToDXAXusingHandleFromBXandResetFilePosition
+	jc		SHORT .FileError
+
+	cmp		dx, MAX_EEPROM_SIZE_IN_BYTES >> 16
+	ja		SHORT .FileTooBig
+	jb		SHORT .FileNotTooBig
+	cmp		ax, MAX_EEPROM_SIZE_IN_BYTES & 0FFFFh
+	ja		SHORT .FileTooBig
+.FileNotTooBig:
+	xchg	cx, ax
+	clc
+	ret
+.FileTooBig:
+	call	DisplayFileTooBig
+	stc
+.FileError:
+	ret
+
+;--------------------------------------------------------------------
+; .LoadFileWithNameInDSSIhandleInBXandSizeInDXCXtoRamBuffer
+;	Parameters:
+;		BX:		File Handle
+;		DX:CX:	File size
+;		DS:SI:	File name
+;	Returns:
+;		CF:		Clear if successfull
+;				Set if error
+;	Corrupts registers:
+;		AX, SI, DI, DS
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.LoadFileWithNameInDSSIhandleInBXandSizeInDXCXtoRamBuffer:
+	push	es
+
+	call	Buffers_GetFileBufferToESDI
+	call	Registers_ExchangeDSSIwithESDI
+	call	FileIO_ReadDXCXbytesToDSSIusingHandleFromBX
+	jnc		SHORT .StoreFileNameToCfgvarsFromESDI
+
+	pop		es
+	ret
+
+ALIGN JUMP_ALIGN
+.StoreFileNameToCfgvarsFromESDI:
+	push	cx
+
+	call	Registers_CopyESDItoDSSI	; File name in DS:SI
+	push	cs
+	pop		es
+	mov		di, g_cfgVars+CFGVARS.szOpenedFile
+	cld
+	call	String_CopyDSSItoESDIandGetLengthToCX
+
+	pop		cx
+	pop		es
+	clc
+	ret
+
+
+;--------------------------------------------------------------------
+; BiosFile_SaveUnsavedChanges
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BiosFile_SaveUnsavedChanges:
+	push	ds
+
+	push	cs
+	pop		ds
+	mov		si, g_cfgVars+CFGVARS.szOpenedFile
+	call	BiosFile_SaveRamBufferToFileInDSSI
+
+	pop		ds
+	ret
+
+
+;--------------------------------------------------------------------
+; BiosFile_SaveRamBufferToFileInDSSI
+;	Parameters:
+;		DS:SI:	Name of file to save
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BiosFile_SaveRamBufferToFileInDSSI:
+	push	es
+	push	ds
+
+	mov		al, FILE_ACCESS.WriteOnly
+	call	FileIO_OpenWithPathInDSSIandFileAccessInAL
+	jc		SHORT .DisplayErrorMessage
+
+	call	Buffers_GenerateChecksum
+	call	Buffers_GetFileBufferToESDI
+	call	Registers_CopyESDItoDSSI
+	xor		dx, dx
+	mov		cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	shl		cx, 1
+	rcl		dx, 1			; WORDs to BYTEs
+	call	FileIO_WriteDXCXbytesFromDSSIusingHandleFromBX
+	jc		SHORT .DisplayErrorMessage
+
+	call	Buffers_ClearUnsavedChanges
+	call	DisplayFileSavedSuccesfully
+	jmp		SHORT .Return
+
+.DisplayErrorMessage:
+	call	FileIO_CloseUsingHandleFromBX
+	call	DisplayFailedToSaveFile
+ALIGN JUMP_ALIGN
+.Return:
+	pop		ds
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; DisplayFileLoadedSuccesfully
+; DisplayFileSavedSuccesfully
+; DisplayFailedToLoadFile
+; DisplayFailedToSaveFile
+; DisplayFileTooBig
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+DisplayFileLoadedSuccesfully:
+	mov		dx, g_szDlgMainLoadFile
+	jmp		Dialogs_DisplayNotificationFromCSDX
+
+ALIGN JUMP_ALIGN
+DisplayFileSavedSuccesfully:
+	mov		dx, g_szDlgMainSaveFile
+	jmp		Dialogs_DisplayNotificationFromCSDX
+
+DisplayFailedToLoadFile:
+	mov		dx, g_szDlgMainLoadErr
+	jmp		Dialogs_DisplayErrorFromCSDX
+
+DisplayFailedToSaveFile:
+	mov		dx, g_szDlgMainSaveErr
+	jmp		Dialogs_DisplayErrorFromCSDX
+
+DisplayFileTooBig:
+	mov		dx, g_szDlgMainFileTooBig
+	jmp		Dialogs_DisplayErrorFromCSDX
Index: tags/Configurator_for_v1.1.5/Src/Buffers.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Buffers.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Buffers.asm	(revision 72)
@@ -0,0 +1,259 @@
+; File name		:	Buffers.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	6.10.2010
+; Last update	:	6.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for accessing file and flash buffers.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Buffers_Clear
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, CX, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_Clear:
+	call	Buffers_GetFileBufferToESDI
+	mov		cx, ROMVARS_size
+	jmp		Memory_ZeroESDIwithSizeInCX
+
+
+;--------------------------------------------------------------------
+; Buffers_IsXtideUniversalBiosLoaded
+;	Parameters:
+;		Nothing
+;	Returns:
+;		ZF:		Set if supported version of XTIDE Universal BIOS is loaded
+;				Cleared no file or some other file is loaded
+;	Corrupts registers:
+;		CX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_IsXtideUniversalBiosLoaded:
+	test	WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
+	jz		SHORT .NoFileOrBiosLoaded
+
+	call	Buffers_GetFileBufferToESDI
+	jmp		SHORT Buffers_IsXtideUniversalBiosSignatureInESDI
+.NoFileOrBiosLoaded:
+	or		cl, 1		; Clear ZF
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_IsXtideUniversalBiosSignatureInESDI
+;	Parameters:
+;		ES:DI:	Ptr to possible XTIDE Universal BIOS location
+;	Returns:
+;		ZF:		Set if supported version of XTIDE Universal BIOS is loaded
+;				Cleared no file or some other file is loaded
+;	Corrupts registers:
+;		CX, SI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_IsXtideUniversalBiosSignatureInESDI:
+	push	di
+
+	mov		si, g_szXtideUniversalBiosSignature
+	add		di, BYTE ROMVARS.rgbSign
+	mov		cx, XTIDE_SIGNATURE_LENGTH / 2
+	cld
+	eSEG_STR repe, cs, cmpsw
+
+	pop		di
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_NewBiosWithSizeInCXandSourceInAXhasBeenLoadedForConfiguration
+;	Parameters:
+;		AX:		EEPROM source (FLG_CFGVARS_FILELOADED or FLG_CFGVARS_ROMLOADED)
+;		DX:CX:	EEPROM size in bytes
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, CX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration:
+	and		WORD [cs:g_cfgVars+CFGVARS.wFlags], ~(FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED | FLG_CFGVARS_UNSAVED)
+	or		WORD [cs:g_cfgVars+CFGVARS.wFlags], ax
+	shr		dx, 1
+	rcr		cx, 1
+	mov		[cs:g_cfgVars+CFGVARS.wImageSizeInWords], cx
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_SetUnsavedChanges
+; Buffers_ClearUnsavedChanges
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_SetUnsavedChanges:
+	or		WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
+	ret
+
+ALIGN JUMP_ALIGN
+Buffers_ClearUnsavedChanges:
+	and		WORD [g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_SaveChangesIfFileLoaded
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_SaveChangesIfFileLoaded:
+	mov		ax, [cs:g_cfgVars+CFGVARS.wFlags]
+	and		ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED)
+	cmp		ax, BYTE (FLG_CFGVARS_FILELOADED | FLG_CFGVARS_UNSAVED)
+	jne		SHORT .NothingToSave
+	call	Dialogs_DisplaySaveChangesDialog
+	jnz		SHORT .NothingToSave
+	jmp		BiosFile_SaveUnsavedChanges
+ALIGN JUMP_ALIGN
+.NothingToSave:
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_AppendZeroesIfNeeded
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, CX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_AppendZeroesIfNeeded:
+	push	es
+
+	eMOVZX	di, BYTE [cs:g_cfgVars+CFGVARS.bEepromType]
+	mov		cx, [cs:di+g_rgwEepromTypeToSizeInWords]
+	sub		cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]	; CX = WORDs to append
+	jle		SHORT .NoNeedToAppendZeroes
+
+	call	Buffers_GetFileBufferToESDI
+	mov		ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	shl		ax, 1
+	add		di, ax			; ES:DI now point first unused image byte
+	xor		ax, ax
+	cld
+	rep stosw
+ALIGN JUMP_ALIGN
+.NoNeedToAppendZeroes:
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_GenerateChecksum
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_GenerateChecksum:
+	push	es
+
+	call	Buffers_GetFileBufferToESDI
+	mov		cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	shl		cx, 1			; Words to bytes
+	dec		cx				; Leave space for checksum byte
+	xor		ax, ax
+ALIGN JUMP_ALIGN
+.SumNextByte:
+	add		al, [es:di]
+	inc		di
+	loop	.SumNextByte
+	neg		al
+	mov		[es:di], al
+
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_GetRomvarsFlagsToAX
+;	Parameters:
+;		Nothing
+;	Returns:
+;		AX:		ROMVARS.wFlags
+;	Corrupts registers:
+;		BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_GetRomvarsFlagsToAX:
+	mov		bx, ROMVARS.wFlags
+	; Fall to Buffers_GetRomvarsValueToAXfromOffsetInBX
+
+;--------------------------------------------------------------------
+; Buffers_GetRomvarsValueToAXfromOffsetInBX
+;	Parameters:
+;		BX:		ROMVARS offset
+;	Returns:
+;		AX:		Value
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_GetRomvarsValueToAXfromOffsetInBX:
+	push	es
+	push	di
+	call	Buffers_GetFileBufferToESDI
+	mov		ax, [es:bx+di]
+	pop		di
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; Buffers_GetFileBufferToESDI
+; Buffers_GetFlashComparisonBufferToESDI
+; Buffers_GetFileDialogItemBufferToESDI
+;	Parameters:
+;		Nothing
+;	Returns:
+;		ES:DI:	Ptr to file buffer
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Buffers_GetFlashComparisonBufferToESDI:
+Buffers_GetFileDialogItemBufferToESDI:
+	call	Buffers_GetFileBufferToESDI
+	push	di
+	mov		di, es
+	add		di, 1000h		; Third 64k page
+	mov		es, di
+	pop		di
+	ret
+ALIGN JUMP_ALIGN
+Buffers_GetFileBufferToESDI:
+	mov		di, cs
+	add		di, 1000h		; Change to next 64k page
+	mov		es, di
+	xor		di, di			; Ptr now in ES:DI
+	ret
Index: tags/Configurator_for_v1.1.5/Src/Dialogs.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Dialogs.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Dialogs.asm	(revision 72)
@@ -0,0 +1,206 @@
+; File name		:	Dialogs.asm
+; Project name	:	XTIDE Univeral BIOS Configurator v2
+; Created date	:	10.10.2010
+; Last update	:	2.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for displaying dialogs.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Dialogs_DisplayHelpFromCSDXwithTitleInCSDI
+;	Parameters:
+;		CS:DX:	Ptr to help string to display
+;		CS:DI:	Ptr to title string for help dialog
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Dialogs_DisplayHelpFromCSDXwithTitleInCSDI:
+	push	ds
+	push	si
+	push	di
+	push	cx
+
+	mov		cx, DIALOG_INPUT_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputFromDSSI
+	mov		[si+DIALOG_INPUT.fszTitle], di
+	jmp		SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
+
+;--------------------------------------------------------------------
+; Dialogs_DisplayNotificationFromCSDX
+; Dialogs_DisplayErrorFromCSDX
+;	Parameters:
+;		CS:DX:	Ptr to notification string to display
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Dialogs_DisplayNotificationFromCSDX:
+	push	ds
+	push	si
+	push	di
+	push	cx
+
+	mov		cx, DIALOG_INPUT_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputFromDSSI
+	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szNotificationDialog
+	jmp		SHORT DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI
+
+ALIGN JUMP_ALIGN
+Dialogs_DisplayErrorFromCSDX:
+	push	ds
+	push	si
+	push	di
+	push	cx
+
+	mov		cx, DIALOG_INPUT_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szErrorDialog
+ALIGN JUMP_ALIGN
+DisplayMessageDialogWithMessageInCSDXandDialogInputInDSSI:
+	call	InitializeDialogInputFromDSSI
+	mov		[si+DIALOG_INPUT.fszItems], dx
+	CALL_MENU_LIBRARY DisplayMessageWithInputInDSSI
+
+	add		sp, BYTE DIALOG_INPUT_size
+	pop		cx
+	pop		di
+	pop		si
+	pop		ds
+	ret
+
+
+;--------------------------------------------------------------------
+; Dialogs_DisplayFileDialogWithDialogIoInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to FILE_DIALOG_IO
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Dialogs_DisplayFileDialogWithDialogIoInDSSI:
+	push	es
+
+	call	Buffers_GetFileDialogItemBufferToESDI
+	mov		WORD [si+FILE_DIALOG_IO.fszTitle], g_szDlgFileTitle
+	mov		[si+FILE_DIALOG_IO.fszTitle+2], cs
+	mov		[si+FILE_DIALOG_IO.fszItemBuffer], di
+	mov		[si+FILE_DIALOG_IO.fszItemBuffer+2], es
+	mov		BYTE [si+FILE_DIALOG_IO.bDialogFlags], FLG_FILEDIALOG_DRIVES
+	mov		BYTE [si+FILE_DIALOG_IO.bFileAttributes], FLG_FILEATTR_DIRECTORY | FLG_FILEATTR_ARCHIVE
+	mov		WORD [si+FILE_DIALOG_IO.fpFileFilterString], g_szDlgFileFilter
+	mov		[si+FILE_DIALOG_IO.fpFileFilterString+2], cs
+	CALL_MENU_LIBRARY GetFileNameWithIoInDSSI
+
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; Dialogs_DisplayQuitDialog
+; Dialogs_DisplaySaveChangesDialog
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		ZF:		Set if user wants to do the action
+;				Cleared if user wants to cancel
+;	Corrupts registers:
+;		AX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Dialogs_DisplayQuitDialog:
+	push	ds
+
+	mov		cx, DIALOG_INPUT_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputFromDSSI
+	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szDlgExitToDos
+	mov		WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiseBooleanFlag
+	CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI
+	add		sp, BYTE DIALOG_INPUT_size
+	cmp		ax, BYTE 1		; 1 = YES
+
+	pop		ds
+	ret
+
+
+ALIGN JUMP_ALIGN
+Dialogs_DisplaySaveChangesDialog:
+	push	ds
+
+	mov		cx, DIALOG_INPUT_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputFromDSSI
+	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szDlgSaveChanges
+	mov		WORD [si+DIALOG_INPUT.fszItems], g_szMultichoiseBooleanFlag
+	CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI
+	add		sp, BYTE DIALOG_INPUT_size
+	cmp		ax, BYTE 1		; 1 = YES
+
+	pop		ds
+	ret
+
+
+;--------------------------------------------------------------------
+; Dialogs_DisplayProgressDialogForFlashingWithDialogIoInDSSIandFlashvarsInDSBX
+;	Parameters:
+;		DS:BX:	Ptr to FLASHVARS
+;		DS:SI:	Ptr to PROGRESS_DIALOG_IO
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Dialogs_DisplayProgressDialogForFlashingWithDialogIoInDSSIandFlashvarsInDSBX:
+	call	.InitializeProgressDialogIoInDSSIwithFlashvarsInDSBX
+	mov		dx, ds
+	mov		ax, bx
+	CALL_MENU_LIBRARY StartProgressTaskWithIoInDSSIandParamInDXAX
+	ret
+
+ALIGN JUMP_ALIGN
+.InitializeProgressDialogIoInDSSIwithFlashvarsInDSBX:
+	call	InitializeDialogInputFromDSSI
+	mov		WORD [si+DIALOG_INPUT.fszTitle], g_szEEPROM
+
+	xor		ax, ax
+	mov		[si+PROGRESS_DIALOG_IO.wCurrentProgressValue], ax
+	mov		dx, [bx+FLASHVARS.wPagesToFlash]
+	mov		[si+PROGRESS_DIALOG_IO.wMaxProgressValue], dx
+	mov		[si+PROGRESS_DIALOG_IO.wMinProgressValue], ax
+	mov		WORD [si+PROGRESS_DIALOG_IO.fnTaskWithParamInDSSI], Flash_EepromWithFlashvarsInDSSI
+	mov		[si+PROGRESS_DIALOG_IO.fnTaskWithParamInDSSI+2], cs
+	ret
+
+
+;--------------------------------------------------------------------
+; InitializeDialogInputFromDSSI
+;	Parameters:
+;		DS:SI:	Ptr to DIALOG_INPUT
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+InitializeDialogInputFromDSSI:
+	mov		[si+DIALOG_INPUT.fszTitle+2], cs
+	mov		[si+DIALOG_INPUT.fszItems+2], cs
+	mov		WORD [si+DIALOG_INPUT.fszInfo], g_szGenericDialogInfo
+	mov		[si+DIALOG_INPUT.fszInfo+2], cs
+	ret
Index: tags/Configurator_for_v1.1.5/Src/EEPROM.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/EEPROM.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/EEPROM.asm	(revision 72)
@@ -0,0 +1,181 @@
+; File name		:	EEPROM.asm
+; Project name	:	XTIDE Univeral BIOS Configurator v2
+; Created date	:	19.4.2010
+; Last update	:	9.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for managing EEPROM contents.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_rgwEepromTypeToSizeInWords:
+	dw		(2<<10) / 2		; EEPROM_TYPE.2816_2kiB
+	dw		(8<<10) / 2
+	dw		(32<<10) / 2
+	dw		(64<<10) / 2
+
+g_rgwEepromPageToSizeInBytes:
+	dw		1				; EEPROM_PAGE.1_byte
+	dw		2
+	dw		4
+	dw		8
+	dw		16
+	dw		32
+	dw		64
+
+
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; EEPROM_LoadXtideUniversalBiosFromRomToRamBufferAndReturnSizeInDXCX
+;	Parameters:
+;		Nothing
+;	Returns:
+;		DX:CX:	BIOS size in bytes
+;	Corrupts registers:
+;		AX, BX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+EEPROM_LoadXtideUniversalBiosFromRomToRamBufferAndReturnSizeInDXCX:
+	push	es
+
+	call	EEPROM_FindXtideUniversalBiosROMtoESDI
+	call	.GetXtideUniversalBiosSizeFromEStoDXCX
+	xor		si, si				; Load from beginning of ROM
+	call	LoadBytesFromRomToRamBuffer
+
+	call	.GetXtideUniversalBiosSizeFromEStoDXCX
+	pop		es
+	ret
+
+;--------------------------------------------------------------------
+; .GetXtideUniversalBiosSizeFromEStoDXCX
+;	Parameters:
+;		Nothing
+;	Returns:
+;		DX:CX:	Bios size in bytes
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.GetXtideUniversalBiosSizeFromEStoDXCX:
+	xor		dx, dx
+	eMOVZX	cx, BYTE [es:ROMVARS.bRomSize]
+	eSHL_IM	cx, 9				; *= 512 for byte count
+	ret
+
+
+;--------------------------------------------------------------------
+; EEPROM_LoadOldSettingsFromRomToRamBuffer
+;	Parameters:
+;		Nothing
+;	Returns:
+;		CF:		Set if EEPROM was found
+;				Cleared if EEPROM not found
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+EEPROM_LoadOldSettingsFromRomToRamBuffer:
+	mov		cx, ROMVARS_size - ROMVARS.wFlags	; Number of bytes to load
+	mov		si, ROMVARS.wFlags					; Offset where to start loading
+	; Fall to LoadBytesFromRomToRamBuffer
+
+;--------------------------------------------------------------------
+; LoadBytesFromRomToRamBuffer
+;	Parameters:
+;		CX:		Number of bytes to load from ROM
+;		SI:		Offset to first byte to load
+;	Returns:
+;		CF:		Set if EEPROM was found
+;				Cleared if EEPROM not found
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+LoadBytesFromRomToRamBuffer:
+	push	es
+	push	ds
+
+	call	EEPROM_FindXtideUniversalBiosROMtoESDI
+	jnc		SHORT .XtideUniversalBiosNotFound
+	push	es
+	pop		ds											; DS:SI points to ROM
+
+	call	Buffers_GetFileBufferToESDI
+	mov		di, si										; ES:DI points to RAM buffer
+
+	cld
+	call	Memory_CopyCXbytesFromDSSItoESDI
+	stc
+
+.XtideUniversalBiosNotFound:
+	pop		ds
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; EEPROM_FindXtideUniversalBiosROMtoESDI
+;	Parameters:
+;		Nothing
+;	Returns:
+;		ES:DI:	EEPROM segment
+;		CF:		Set if EEPROM was found
+;				Cleared if EEPROM not found
+;	Corrupts registers:
+;		AX, BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+EEPROM_FindXtideUniversalBiosROMtoESDI:
+	push	si
+	push	cx
+
+	xor		di, di					; Zero DI (offset)
+	mov		bx, 0C000h				; First possible ROM segment
+ALIGN JUMP_ALIGN
+.SegmentLoop:
+	mov		es, bx					; Possible ROM segment to ES
+	call	Buffers_IsXtideUniversalBiosSignatureInESDI
+	je		SHORT .RomFound
+	add		bx, 200h				; Increment by 8kB
+	jnc		SHORT .SegmentLoop		; Loop until segment overflows
+	clc
+	jmp		SHORT .ReturnWithoutUpdatingCF
+ALIGN JUMP_ALIGN
+.RomFound:
+	stc
+.ReturnWithoutUpdatingCF:
+	pop		cx
+	pop		si
+	ret
+
+
+;--------------------------------------------------------------------
+; EEPROM_LoadFromRomToRamComparisonBuffer
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+EEPROM_LoadFromRomToRamComparisonBuffer:
+	push	es
+	push	ds
+
+	mov		ds, [cs:g_cfgVars+CFGVARS.wEepromSegment]
+	xor		si, si
+	call	Buffers_GetFlashComparisonBufferToESDI
+	eMOVZX	bx, BYTE [cs:g_cfgVars+CFGVARS.bEepromType]
+	mov		cx, [cs:bx+g_rgwEepromTypeToSizeInWords]
+	cld
+	rep movsw
+
+	pop		ds
+	pop		es
+	ret
Index: tags/Configurator_for_v1.1.5/Src/Flash.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Flash.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Flash.asm	(revision 72)
@@ -0,0 +1,343 @@
+; File name		:	Flash.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	1.12.2010
+; Last update	:	3.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for flashing the EEPROM.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Flash_EepromWithFlashvarsInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to FLASHVARS
+;	Returns:
+;		FLASHVARS.flashResult
+;	Corrupts registers:
+;		All, including segments
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Flash_EepromWithFlashvarsInDSSI:
+	mov		[si+FLASHVARS.wProgressUpdateParam], bp	; Store handle to progress DIALOG
+	mov		bp, si									; Flashvars now in SS:BP
+	mov		cx, [bp+FLASHVARS.wPagesToFlash]
+ALIGN JUMP_ALIGN
+.FlashNextPage:
+	call	DisplayFlashProgressWithPagesLeftInCXandFlashvarsInSSBP
+	call	Flash_SinglePageWithFlashvarsInSSBP
+	jc		SHORT .PollingError
+	call	AreSourceAndDestinationPagesEqualFromFlashvarsInSSBP
+	jne		SHORT .DataVerifyError
+
+	mov		ax, [bp+FLASHVARS.wEepromPageSize]
+	add		[bp+FLASHVARS.fpNextSourcePage], ax
+	add		[bp+FLASHVARS.fpNextComparisonPage], ax
+	add		[bp+FLASHVARS.fpNextDestinationPage], ax
+
+	loop	.FlashNextPage
+	mov		BYTE [bp+FLASHVARS.flashResult], FLASH_RESULT.success
+	ret
+
+.PollingError:
+	mov		BYTE [bp+FLASHVARS.flashResult], FLASH_RESULT.PollingTimeoutError
+	ret
+.DataVerifyError:
+	mov		BYTE [bp+FLASHVARS.flashResult], FLASH_RESULT.DataVerifyError
+	ret
+
+
+;--------------------------------------------------------------------
+; Flash_SinglePageWithFlashvarsInSSBP
+;	Parameters:
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		CF:		Set if polling timeout error
+;				Cleared if page written successfully
+;	Corrupts registers:
+;		AX, BX, DX, SI, DI, DS, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Flash_SinglePageWithFlashvarsInSSBP:
+	cld
+	call	AreSourceAndDestinationPagesEqualFromFlashvarsInSSBP
+	je		SHORT .NoNeedToFlashThePage	; CF cleared
+
+	push	cx
+	call	.GetSdpCommandFunctionToDXwithFlashvarsInSSBP
+	mov		cx, [bp+FLASHVARS.wEepromPageSize]
+	mov		si, [bp+FLASHVARS.fpNextSourcePage]
+	les		di, [bp+FLASHVARS.fpNextComparisonPage]
+	mov		bx, [bp+FLASHVARS.fpNextDestinationPage]
+	call	WriteAllChangedBytesFromPageToEeprom
+	pop		cx
+.NoNeedToFlashThePage:
+	ret
+
+;--------------------------------------------------------------------
+; .GetSdpCommandFunctionToDXwithFlashvarsInSSBP
+;	Parameters:
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		DX:		Ptr to SDP Command function
+;	Corrupts registers:
+;		BX, SI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.GetSdpCommandFunctionToDXwithFlashvarsInSSBP:
+	eMOVZX	bx, BYTE [bp+FLASHVARS.bEepromSdpCommand]
+	mov		si, [cs:bx+.rgpSdpCommandToEepromTypeLookupTable]
+	mov		bl, [bp+FLASHVARS.bEepromType]
+	mov		dx, [cs:bx+si]
+	ret
+
+ALIGN WORD_ALIGN
+.rgpSdpCommandToEepromTypeLookupTable:
+	dw		.rgfnFlashWithoutSDP					; SDP_COMMAND.none
+	dw		.rgfnEnableSdpAndFlash					; SDP_COMMAND.enable
+	dw		.rgfnDisableSdpAndFlash					; SDP_COMMAND.disable
+.rgfnFlashWithoutSDP:		; SDP_COMMAND.none
+	dw		DoNotWriteAnySdpCommand					; EEPROM_TYPE.2816_2kiB
+	dw		DoNotWriteAnySdpCommand					; EEPROM_TYPE.2864_8kiB
+	dw		DoNotWriteAnySdpCommand					; EEPROM_TYPE.28256_32kiB
+	dw		DoNotWriteAnySdpCommand					; EEPROM_TYPE.28512_64kiB
+.rgfnEnableSdpAndFlash:		; SDP_COMMAND.enable
+	dw		WriteSdpEnableCommandFor2816			; EEPROM_TYPE.2816_2kiB
+	dw		WriteSdpEnableCommandFor2864			; EEPROM_TYPE.2864_8kiB
+	dw		WriteSdpEnableCommandFor28256or28512	; EEPROM_TYPE.28256_32kiB
+	dw		WriteSdpEnableCommandFor28256or28512	; EEPROM_TYPE.28512_64kiB
+.rgfnDisableSdpAndFlash:	; SDP_COMMAND.disable
+	dw		WriteSdpDisableCommandFor2816			; EEPROM_TYPE.2816_2kiB
+	dw		WriteSdpDisableCommandFor2864			; EEPROM_TYPE.2864_8kiB
+	dw		WriteSdpDisableCommandFor28256or28512	; EEPROM_TYPE.28256_32kiB
+	dw		WriteSdpDisableCommandFor28256or28512	; EEPROM_TYPE.28512_64kiB
+
+
+;--------------------------------------------------------------------
+; AreSourceAndDestinationPagesEqualFromFlashvarsInSSBP
+;	Parameters:
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		ZF:		Set if pages are equal
+;				Cleared if pages are not equal
+;	Corrupts registers:
+;		SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+AreSourceAndDestinationPagesEqualFromFlashvarsInSSBP:
+	push	cx
+	mov		cx, [bp+FLASHVARS.wEepromPageSize]
+	lds		si, [bp+FLASHVARS.fpNextSourcePage]
+	les		di, [bp+FLASHVARS.fpNextDestinationPage]
+	repe cmpsb
+	pop		cx
+	ret
+
+
+;--------------------------------------------------------------------
+; ENABLE_SDP
+;	Parameters:
+;		%1:		Offset for first command byte
+;		%2:		Offset for second command byte
+;		DS:		Segment to beginning of EEPROM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro ENABLE_SDP 2
+	mov		BYTE [%1], 0AAh
+	mov		BYTE [%2], 55h
+	mov		BYTE [%1], 0A0h
+%endmacro
+
+;--------------------------------------------------------------------
+; DISABLE_SDP
+;	Parameters:
+;		%1:		Offset for first command byte
+;		%2:		Offset for second command byte
+;		DS:		Segment to beginning of EEPROM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+%macro DISABLE_SDP 2
+	mov		BYTE [%1], 0AAh
+	mov		BYTE [%2], 55h
+	mov		BYTE [%1], 80h
+	mov		BYTE [%1], 0AAh
+	mov		BYTE [%2], 55h
+	mov		BYTE [%1], 20h
+%endmacro
+
+;--------------------------------------------------------------------
+; SDP Command Functions
+;	Parameters:
+;		DS:		Segment to beginning of EEPROM
+;	Returns:
+;		Nothing but jumps to WriteActualDataByteAfterSdpCommand
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+WriteSdpEnableCommandFor2816:
+	ENABLE_SDP 555h, 2AAh
+	jmp		ReturnFromSdpCommand
+
+ALIGN JUMP_ALIGN
+WriteSdpEnableCommandFor2864:
+	ENABLE_SDP 1555h, 0AAAh
+	jmp		SHORT ReturnFromSdpCommand
+
+ALIGN JUMP_ALIGN
+WriteSdpEnableCommandFor28256or28512:
+	ENABLE_SDP 5555h, 2AAAh
+	jmp		SHORT ReturnFromSdpCommand
+
+
+ALIGN JUMP_ALIGN
+WriteSdpDisableCommandFor2816:
+	DISABLE_SDP 555h, 2AAh
+	jmp		SHORT ReturnFromSdpCommand
+
+ALIGN JUMP_ALIGN
+WriteSdpDisableCommandFor2864:
+	DISABLE_SDP 1555h, 0AAAh
+	jmp		SHORT ReturnFromSdpCommand
+
+ALIGN JUMP_ALIGN
+WriteSdpDisableCommandFor28256or28512:
+	DISABLE_SDP 5555h, 2AAAh
+DoNotWriteAnySdpCommand:
+	jmp		SHORT ReturnFromSdpCommand
+
+
+;--------------------------------------------------------------------
+; WriteNextChangedByteFromPageToEeprom
+;	Parameters:
+;		CX:		Number of bytes left to write
+;		DX:		Offset to SDP command function
+;		BX:		Offset to next destination byte
+;		SI:		Offset to next source byte
+;		ES:DI:	Ptr to next comparison byte
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		CF:		Set if polling timeout error
+;				Cleared if page written successfully
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI, DS, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+WriteAllChangedBytesFromPageToEeprom:
+	mov		ax, [bp+FLASHVARS.fpNextSourcePage+2]		; AX = Source segment
+	mov		ds, [bp+FLASHVARS.fpNextDestinationPage+2]	; DS = EEPROM segment
+	cli						; Disable interrupts
+	jmp		dx				; Write SDP command (once to the beginning of page)
+ALIGN JUMP_ALIGN
+ReturnFromSdpCommand:
+	mov		ds, ax			; DS:SI now points to source byte
+
+ALIGN JUMP_ALIGN
+.WriteActualDataByteAfterSdpCommand:
+	lodsb					; Load source byte to AL
+	scasb					; Compare source byte to comparison byte
+	je		SHORT .NoChangesForThisByte
+
+	mov		ds, [bp+FLASHVARS.fpNextDestinationPage+2]	; DS:BX now points to EEPROM
+	mov		[bx], al		; Write byte to EEPROM
+	mov		ds, [bp+FLASHVARS.fpNextSourcePage+2]		; Restore DS
+	mov		[bp+FLASHVARS.wLastOffsetWritten], bx
+	mov		[bp+FLASHVARS.bLastByteWritten], al
+
+ALIGN JUMP_ALIGN
+.NoChangesForThisByte:
+	inc		bx				; Increment destination offset
+	loop	.WriteActualDataByteAfterSdpCommand
+	sti						; Enable interrupts
+	; Fall to WaitUntilEepromPageWriteHasCompleted
+
+
+;--------------------------------------------------------------------
+; WaitUntilEepromPageWriteHasCompleted
+;	Parameters:
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		CF:		Set if polling timeout error
+;				Cleared if page written successfully
+;	Corrupts registers:
+;		AX, BX, DI, DS, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+WaitUntilEepromPageWriteHasCompleted:
+	call	.InitializeTimeoutCounterForEepromPollingWithFlashvarsInSSBP
+	mov		es, [bp+FLASHVARS.fpNextDestinationPage+2]
+	mov		di, [bp+FLASHVARS.wLastOffsetWritten]
+ALIGN JUMP_ALIGN
+.PollEeprom:
+	call	.HasWriteCycleCompleted
+	je		SHORT .PageWriteCompleted	; CF cleared
+	call	TimerTicks_GetTimeoutTicksLeftToAXfromDSBX
+	jnc		SHORT .PollEeprom
+ALIGN JUMP_ALIGN
+.PageWriteCompleted:
+	ret
+
+;--------------------------------------------------------------------
+; .InitializeTimeoutCounterForEepromPollingWithFlashvarsInSSBP
+;	Parameters:
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		DS:BX:	Ptr to timeout counter variable
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.InitializeTimeoutCounterForEepromPollingWithFlashvarsInSSBP:
+	push	ss
+	pop		ds
+	lea		bx, [bp+FLASHVARS.wTimeoutCounter]
+	mov		ax, EEPROM_POLLING_TIMEOUT_TICKS
+	jmp		TimerTicks_InitializeTimeoutFromAX
+
+;--------------------------------------------------------------------
+; .HasWriteCycleCompleted
+;	Parameters:
+;		ES:DI:	Ptr to last written byte in EEPROM
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		ZF:		Set if write cycle has completed
+;				Cleared if write cycle in progress
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.HasWriteCycleCompleted:
+	mov		ah, [es:di]		; Load byte from EEPROM
+	mov		al, [bp+FLASHVARS.bLastByteWritten]
+	and		ax, 8080h		; Clear all but bit 7 from both bytes
+	cmp		al, ah			; Set ZF if high bits are the same
+	ret
+
+
+;--------------------------------------------------------------------
+; DisplayFlashProgressWithPagesLeftInCXandFlashvarsInSSBP
+;	Parameters:
+;		CX:		Number of pages left to flash
+;		SS:BP:	Ptr to FLASHVARS
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+DisplayFlashProgressWithPagesLeftInCXandFlashvarsInSSBP:
+	push	bp
+
+	mov		ax, [bp+FLASHVARS.wPagesToFlash]
+	sub		ax, cx
+	mov		bp, [bp+FLASHVARS.wProgressUpdateParam]	; BP now has MENU handle
+	CALL_MENU_LIBRARY SetProgressValueFromAX
+
+	pop		bp
+	ret
Index: tags/Configurator_for_v1.1.5/Src/Main.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Main.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Main.asm	(revision 72)
@@ -0,0 +1,126 @@
+; File name		:	main.asm
+; Project name	:	XTIDE Univeral BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	7.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Program start and exit.			
+
+; Include .inc files
+%define INCLUDE_MENU_DIALOGS
+%include "AssemblyLibrary.inc"	; Assembly Library. Must be included first!
+%include "Romvars.inc"			; XTIDE Universal BIOS variables
+
+%include "MenuCfg.inc"
+%include "MenuStructs.inc"
+%include "Variables.inc"
+
+
+; Section containing code
+SECTION .text
+
+
+; Program first instruction.
+ORG	100h						; Code starts at offset 100h (DOS .COM)
+Start:
+	jmp		Main_Start
+
+; Include library sources
+%include "AssemblyLibrary.asm"
+
+; Include sources for this program
+%include "BiosFile.asm"
+%include "Buffers.asm"
+%include "Dialogs.asm"
+%include "EEPROM.asm"
+%include "Flash.asm"
+%include "MenuEvents.asm"
+%include "Menuitem.asm"
+%include "MenuitemPrint.asm"
+%include "Menupage.asm"
+%include "Strings.asm"
+
+%include "BootMenuSettingsMenu.asm"
+%include "ConfigurationMenu.asm"
+%include "FlashMenu.asm"
+%include "IdeControllerMenu.asm"
+%include "MainMenu.asm"
+%include "MasterSlaveMenu.asm"
+
+
+
+;--------------------------------------------------------------------
+; Program start
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Main_Start:
+	mov		ax, SCREEN_BACKGROUND_CHARACTER_AND_ATTRIBUTE
+	call	InitializeScreenWithBackgroudCharAndAttrInAX
+
+	call	Main_InitializeCfgVars
+	call	MenuEvents_DisplayMenu
+	mov		ax, DOS_BACKGROUND_CHARACTER_AND_ATTRIBUTE
+	call	InitializeScreenWithBackgroudCharAndAttrInAX
+
+	; Exit to DOS
+	mov 	ax, 4C00h			; Exit to DOS
+	int 	21h
+
+
+;--------------------------------------------------------------------
+; InitializeScreenWithBackgroudCharAndAttrInAX
+;	Parameters:
+;		AL:		Background character
+;		AH:		Background attribute
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+InitializeScreenWithBackgroudCharAndAttrInAX:
+	xchg	dx, ax
+	CALL_DISPLAY_LIBRARY InitializeDisplayContext	; Reset cursor etc
+	xchg	ax, dx
+	CALL_DISPLAY_LIBRARY ClearScreenWithCharInALandAttrInAH
+	ret
+
+
+;--------------------------------------------------------------------
+; Main_InitializeCfgVars
+;	Parameters:
+;		DS:		Segment to CFGVARS
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Main_InitializeCfgVars:
+	push	es
+
+	call	Buffers_Clear
+	call	EEPROM_FindXtideUniversalBiosROMtoESDI
+	jnc		SHORT .InitializationCompleted
+	mov		[CFGVARS.wEepromSegment], es
+.InitializationCompleted:
+	pop		es
+	ret
+
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_cfgVars:
+istruc CFGVARS
+	at	CFGVARS.pMenupage,			dw	g_MenupageForMainMenu
+	at	CFGVARS.wFlags,				dw	DEFAULT_CFGVARS_FLAGS
+	at	CFGVARS.wEepromSegment,		dw	DEFAULT_EEPROM_SEGMENT
+	at	CFGVARS.bEepromType,		db	DEFAULT_EEPROM_TYPE
+	at	CFGVARS.bEepromPage,		db	DEFAULT_PAGE_SIZE
+	at	CFGVARS.bSdpCommand,		db	DEFAULT_SDP_COMMAND
+iend
+
+
+; Section containing uninitialized data
+SECTION .bss
Index: tags/Configurator_for_v1.1.5/Src/MenuEvents.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/MenuEvents.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/MenuEvents.asm	(revision 72)
@@ -0,0 +1,253 @@
+; File name		:	MenuEvents.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	30.11.2010
+; Author		:	Tomi Tilli
+; Description	:	Menu event handling.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; MenuEvents_DisplayMenu
+;	Parameters:
+;		Nothing
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except segments
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MenuEvents_DisplayMenu:
+	mov		bx, MenuEventHandler
+	CALL_MENU_LIBRARY DisplayWithHandlerInBXandUserDataInDXAX
+	ret
+
+
+;--------------------------------------------------------------------
+; MenuEventHandler
+;	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
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MenuEventHandler:
+	cmp		bx, MENUEVENT.RefreshItemFromCX	; Above last supported item?
+	ja		SHORT .EventNotHandled
+	jmp		[bx+.rgfnEventSpecificHandlers]
+.EventNotHandled:
+.IdleProcessing:
+	clc
+	ret
+
+ALIGN WORD_ALIGN
+.rgfnEventSpecificHandlers:
+	dw		.InitializeMenuinitFromDSSI
+	dw		.ExitMenu
+	dw		.IdleProcessing
+	dw		.ItemHighlightedFromCX
+	dw		.ItemSelectedFromCX
+	dw		.KeyStrokeInAX
+	dw		.RefreshTitle
+	dw		.RefreshInformation
+	dw		.RefreshItemFromCX
+
+
+; Parameters:
+;	DS:SI:		Ptr to MENUINIT struct to initialize
+; Returns:
+;	DS:SI:		Ptr to initialized MENUINIT struct
+ALIGN JUMP_ALIGN
+.InitializeMenuinitFromDSSI:
+	push	ds
+	push	cs
+	pop		ds
+	mov		di, g_MenupageForMainMenu
+	call	Menupage_SetActiveMenupageFromDSDI
+	call	Menupage_GetVisibleMenuitemsToAXfromDSDI
+	pop		ds
+
+	mov		WORD [si+MENUINIT.wItems], ax
+	mov		WORD [si+MENUINIT.bTitleLines], TITLE_LINES_IN_MENU
+	mov		WORD [si+MENUINIT.bInfoLines], INFO_LINES_IN_MENU
+	mov		WORD [si+MENUINIT.bWidth], MENU_WIDTH
+	CALL_DISPLAY_LIBRARY GetColumnsToALandRowsToAH
+	mov		[si+MENUINIT.bHeight], ah
+	stc
+	ret
+
+
+; Parameters:
+;	None
+; Returns:
+;	CF:		Set to exit menu
+;			Clear to cancel exit
+ALIGN JUMP_ALIGN
+.ExitMenu:
+	call	Menupage_GetActiveMenupageToDSDI
+	mov		si, [di+MENUPAGE.fnBack]
+	cmp		si, ExitToDos
+	je		SHORT .QuitProgram
+	call	si					; Back to previous menu
+	clc
+	ret
+
+ALIGN JUMP_ALIGN
+.QuitProgram:
+	call	Dialogs_DisplayQuitDialog
+	jz		SHORT .ExitToDOS
+	clc
+	ret
+.ExitToDOS:
+	call	Buffers_SaveChangesIfFileLoaded
+	stc
+	ret
+
+
+; Parameters:
+;	CX:			Index of new highlighted item
+;	DX:			Index of previously highlighted item or NO_ITEM_HIGHLIGHTED
+ALIGN JUMP_ALIGN
+.ItemHighlightedFromCX:
+	CALL_MENU_LIBRARY ClearInformationArea
+	CALL_MENU_LIBRARY RefreshInformation
+	stc
+	ret
+
+
+; Parameters:
+;	CX:			Index of selected item
+ALIGN JUMP_ALIGN
+.ItemSelectedFromCX:
+	call	Menupage_GetActiveMenupageToDSDI
+	call	Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
+	call	[si+MENUITEM.fnActivate]
+	stc
+	ret
+
+
+; Parameters:
+;	AL:			ASCII character for the key
+;	AH:			Keyboard library scan code for the key
+ALIGN JUMP_ALIGN
+.KeyStrokeInAX:
+	cmp		ah, KEY_DISPLAY_ITEM_HELP
+	je		SHORT .DisplayHelp
+	jmp		SHORT .EventNotHandled
+
+ALIGN JUMP_ALIGN
+.DisplayHelp:
+	call	Menupage_GetActiveMenupageToDSDI
+	CALL_MENU_LIBRARY GetHighlightedItemToAX
+	xchg	cx, ax
+	call	Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
+	call	Menuitem_DisplayHelpMessageFromDSSI
+	stc
+	ret
+
+
+; Parameters:
+;	CX:			Index of item to refresh
+;	Cursor has been positioned to the beginning of item line
+ALIGN JUMP_ALIGN
+.RefreshItemFromCX:
+	cmp		cx, NO_ITEM_HIGHLIGHTED
+	je		SHORT .NothingToRefresh
+	call	Menupage_GetActiveMenupageToDSDI
+	call	Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
+	jnc		SHORT .NothingToRefresh
+	call	MenuitemPrint_NameWithPossibleValueFromDSSI
+.NothingToRefresh:
+	stc
+	ret
+
+
+; Parameters:
+;	CX:			Index of highlighted item
+;	Cursor has been positioned to the beginning of first line
+ALIGN JUMP_ALIGN
+.RefreshInformation:
+	cmp		cx, NO_ITEM_HIGHLIGHTED
+	je		SHORT .NothingToRefresh
+	call	Menupage_GetActiveMenupageToDSDI
+	call	Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
+	call	MenuitemPrint_PrintQuickInfoFromDSSI
+	stc
+	ret
+
+
+; Parameters:
+;	CX:			Index of highlighted item
+;	Cursor has been positioned to the beginning of first line
+ALIGN JUMP_ALIGN
+.RefreshTitle:
+	call	.PrintProgramName
+	call	.PrintLoadStatus
+	call	.PrintStatusOfUnsavedChanges
+	stc
+	ret
+
+ALIGN JUMP_ALIGN
+.PrintProgramName:
+	mov		si, g_szProgramTitle
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+	ret
+
+ALIGN JUMP_ALIGN
+.PrintLoadStatus:
+	mov		ax, [g_cfgVars+CFGVARS.wFlags]
+	test	ax, FLG_CFGVARS_FILELOADED
+	jnz		SHORT .PrintNameOfLoadedFile
+	test	ax, FLG_CFGVARS_ROMLOADED
+	jnz		SHORT .PrintLoadedEeprom
+	; Fall to .PrintNothingLoaded
+
+.PrintNothingLoaded:
+	mov		si, g_szBiosIsNotLoaded
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+	ret
+
+ALIGN JUMP_ALIGN
+.PrintNameOfLoadedFile:
+	mov		si, g_cfgVars+CFGVARS.szOpenedFile
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+	jmp		SHORT .PrintTypeOfLoadedBios
+
+ALIGN JUMP_ALIGN
+.PrintLoadedEeprom:
+	mov		si, g_szEEPROM
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+	; Fall to .PrintTypeOfLoadedBios
+
+ALIGN JUMP_ALIGN
+.PrintTypeOfLoadedBios:
+	mov		si, g_szSourceAndTypeSeparator
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+	call	Buffers_IsXtideUniversalBiosLoaded
+	jne		SHORT .PrintUnidentifiedType
+
+	call	Buffers_GetFileBufferToESDI
+	mov		bx, es
+	lea		si, [di+ROMVARS.szVersion]
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromBXSI
+	ret
+
+ALIGN JUMP_ALIGN
+.PrintUnidentifiedType:
+	mov		si, g_szUnidentified
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+	ret
+
+ALIGN JUMP_ALIGN
+.PrintStatusOfUnsavedChanges:
+	test	WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_UNSAVED
+	jz		SHORT .ReturnSinceNothingToPrint
+	mov		si, g_szUnsaved
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+.ReturnSinceNothingToPrint:
+	ret
Index: tags/Configurator_for_v1.1.5/Src/Menuitem.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menuitem.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menuitem.asm	(revision 72)
@@ -0,0 +1,328 @@
+; File name		:	Menuitem.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	19.11.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for accessing MENUITEM structs.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Menuitem_DisplayHelpMessageFromDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menuitem_DisplayHelpMessageFromDSSI:
+	mov		di, [si+MENUITEM.szName]
+	mov		dx, [si+MENUITEM.szHelp]
+	jmp		Dialogs_DisplayHelpFromCSDXwithTitleInCSDI
+
+
+;--------------------------------------------------------------------
+; Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI:
+	call	Registers_CopyDSSItoESDI
+
+	mov		cx, DIALOG_INPUT_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputInDSSIfromMenuitemInESDI
+	mov		ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.szMultichoise]
+	mov		[si+DIALOG_INPUT.fszItems], ax
+	push	di
+	CALL_MENU_LIBRARY GetSelectionToAXwithInputInDSSI
+	pop		di
+
+	cmp		ax, BYTE NO_ITEM_SELECTED
+	je		SHORT .NothingToChange
+	call	Registers_CopyESDItoDSSI
+	call	Menuitem_StoreValueFromAXtoMenuitemInDSSI
+.NothingToChange:
+	add		sp, BYTE DIALOG_INPUT_size
+	ret
+
+
+;--------------------------------------------------------------------
+; Menuitem_ActivateHexInputForMenuitemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menuitem_ActivateHexInputForMenuitemInDSSI:
+	call	Registers_CopyDSSItoESDI
+
+	mov		cx, WORD_DIALOG_IO_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputInDSSIfromMenuitemInESDI
+	mov		BYTE [si+WORD_DIALOG_IO.bNumericBase], 16
+	jmp		SHORT ContinueWordInput
+
+;--------------------------------------------------------------------
+; Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menuitem_ActivateUnsignedInputForMenuitemInDSSI:
+	call	Registers_CopyDSSItoESDI
+
+	mov		cx, WORD_DIALOG_IO_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	InitializeDialogInputInDSSIfromMenuitemInESDI
+	mov		BYTE [si+WORD_DIALOG_IO.bNumericBase], 10
+ContinueWordInput:
+	mov		ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.wMinValue]
+	mov		[si+WORD_DIALOG_IO.wMin], ax
+	mov		ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.wMaxValue]
+	mov		[si+WORD_DIALOG_IO.wMax], ax
+	push	di
+	CALL_MENU_LIBRARY GetWordWithIoInDSSI
+	pop		di
+
+	cmp		BYTE [si+WORD_DIALOG_IO.bUserCancellation], TRUE
+	je		SHORT .NothingToChange
+	mov		ax, [si+WORD_DIALOG_IO.wReturnWord]
+	call	Registers_CopyESDItoDSSI
+	call	Menuitem_StoreValueFromAXtoMenuitemInDSSI
+.NothingToChange:
+	add		sp, BYTE WORD_DIALOG_IO_size
+	ret
+
+
+;--------------------------------------------------------------------
+; InitializeDialogInputInDSSIfromMenuitemInESDI
+;	Parameters:
+;		DS:SI:	Ptr to DIALOG_INPUT
+;		ES:DI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+InitializeDialogInputInDSSIfromMenuitemInESDI:
+	mov		ax, [es:di+MENUITEM.itemValue + ITEM_VALUE.szDialogTitle]
+	mov		[si+DIALOG_INPUT.fszTitle], ax
+	mov		[si+DIALOG_INPUT.fszTitle+2], cs
+
+	mov		[si+DIALOG_INPUT.fszItems+2], cs
+
+	mov		ax, [es:di+MENUITEM.szQuickInfo]
+	mov		[si+DIALOG_INPUT.fszInfo], ax
+	mov		[si+DIALOG_INPUT.fszInfo+2], cs
+	ret
+
+;--------------------------------------------------------------------
+; Menuitem_StoreValueFromAXtoMenuitemInDSSI
+;	Parameters:
+;		AX:		Value or multichoise selection to store
+;		DS:SI:	Ptr to MENUITEM
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menuitem_StoreValueFromAXtoMenuitemInDSSI:
+	eMOVZX	bx, BYTE [si+MENUITEM.bType]
+	cmp		bl, TYPE_MENUITEM_HEX
+	ja		SHORT .InvalidItemType
+
+	call	GetConfigurationBufferToESDIforMenuitemInDSSI
+	add		di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	jmp		[cs:bx+.rgfnJumpToStoreValueBasedOnItemType]
+.InvalidItemType:
+	ret
+
+ALIGN WORD_ALIGN
+.rgfnJumpToStoreValueBasedOnItemType:
+	dw		.InvalidItemType									; TYPE_MENUITEM_PAGEBACK
+	dw		.InvalidItemType									; TYPE_MENUITEM_PAGENEXT
+	dw		.InvalidItemType									; TYPE_MENUITEM_ACTION
+	dw		.StoreMultichoiseValueFromAXtoESDIwithItemInDSSI	; TYPE_MENUITEM_MULTICHOISE
+	dw		.StoreByteOrWordValueFromAXtoESDIwithItemInDSSI		; TYPE_MENUITEM_UNSIGNED
+	dw		.StoreByteOrWordValueFromAXtoESDIwithItemInDSSI		; TYPE_MENUITEM_HEX
+
+;--------------------------------------------------------------------
+; .StoreMultichoiseValueFromAXtoESDIwithItemInDSSI
+;	Parameters:
+;		AX:		Multichoise selection (index)
+;		DS:SI:	Ptr to MENUITEM
+;		ES:DI:	Ptr to value variable
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.StoreMultichoiseValueFromAXtoESDIwithItemInDSSI:
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_FLAGVALUE
+	jz		SHORT .TranslateChoiseToValueUsingLookupTable
+
+	test	ax, ax			; Setting item flag?
+	mov		ax, [si+MENUITEM.itemValue+ITEM_VALUE.wValueBitmask]
+	jnz		SHORT .SetFlagFromAX
+	not		ax
+	and		[es:di], ax		; Clear flag
+	jmp		SHORT .SetUnsavedChanges
+ALIGN JUMP_ALIGN
+.SetFlagFromAX:
+	or		[es:di], ax
+	jmp		SHORT .SetUnsavedChanges
+
+ALIGN JUMP_ALIGN
+.TranslateChoiseToValueUsingLookupTable:
+	shl		ax, 1			; Shift for WORD lookup
+	add		ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiseToValueLookup]
+	xchg	bx, ax
+	mov		ax, [bx]		; Lookup complete
+	; Fall to .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI
+
+;--------------------------------------------------------------------
+; .StoreByteOrWordValueFromAXtoESDIwithItemInDSSI
+;	Parameters:
+;		AX:		Value to store
+;		DS:SI:	Ptr to MENUITEM
+;		ES:DI:	Ptr to value variable
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.StoreByteOrWordValueFromAXtoESDIwithItemInDSSI:
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE
+	jnz		SHORT .StoreByteFromAL
+
+	mov		[es:di+1], ah
+ALIGN JUMP_ALIGN
+.StoreByteFromAL:
+	mov		[es:di], al
+	; Fall to .SetUnsavedChanges
+
+;--------------------------------------------------------------------
+; .SetUnsavedChanges
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.SetUnsavedChanges:
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_PROGRAMVAR
+	jnz		SHORT .NoUnsavedChangesForProgramVariables
+	call	Buffers_SetUnsavedChanges
+.NoUnsavedChangesForProgramVariables:
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_MODIFY_MENU
+	jnz		SHORT .ModifyItemVisibility
+	CALL_MENU_LIBRARY RefreshTitle
+	CALL_MENU_LIBRARY GetHighlightedItemToAX
+	CALL_MENU_LIBRARY RefreshItemFromAX
+	ret
+
+ALIGN JUMP_ALIGN
+.ModifyItemVisibility:
+	push	es
+	push	ds
+	ePUSHA
+	call	Menupage_GetActiveMenupageToDSDI
+	call	[di+MENUPAGE.fnEnter]
+	ePOPA
+	pop		ds
+	pop		es
+	ret
+
+
+;--------------------------------------------------------------------
+; Menuitem_GetValueToAXfromMenuitemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		AX:		Menuitem value
+;	Corrupts registers:
+;		BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menuitem_GetValueToAXfromMenuitemInDSSI:
+	call	.GetMenuitemValueToAX
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE
+	jnz		SHORT .ConvertWordToByteValue
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_FLAGVALUE
+	jnz		SHORT .ConvertWordToFlagValue
+	ret
+
+ALIGN JUMP_ALIGN
+.GetMenuitemValueToAX:
+	push	es
+	push	di
+	call	GetConfigurationBufferToESDIforMenuitemInDSSI
+	add		di, [si+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	mov		ax, [es:di]
+	pop		di
+	pop		es
+	ret
+
+ALIGN JUMP_ALIGN
+.ConvertWordToByteValue:
+	xor		ah, ah
+	ret
+
+ALIGN JUMP_ALIGN
+.ConvertWordToFlagValue:
+	test	ax, [si+MENUITEM.itemValue+ITEM_VALUE.wValueBitmask]
+	jnz		SHORT .ReturnTrue
+	xor		ax, ax
+	ret
+ALIGN JUMP_ALIGN
+.ReturnTrue:
+	mov		ax, TRUE<<1		; Shift for lookup
+	ret
+
+
+;--------------------------------------------------------------------
+; GetConfigurationBufferToESDIforMenuitemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		ES:DI:	Ptr to configuration buffer
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+GetConfigurationBufferToESDIforMenuitemInDSSI:
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_PROGRAMVAR
+	jnz		SHORT .ReturnCfgvarsInESDI
+	jmp		Buffers_GetFileBufferToESDI
+ALIGN JUMP_ALIGN
+.ReturnCfgvarsInESDI:
+	push	cs
+	pop		es
+	mov		di, g_cfgVars
+	ret
Index: tags/Configurator_for_v1.1.5/Src/MenuitemPrint.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/MenuitemPrint.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/MenuitemPrint.asm	(revision 72)
@@ -0,0 +1,247 @@
+; File name		:	MenuitemPrint.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	5.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for printing MENUITEM name and value.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; MenuitemPrint_PrintQuickInfoFromDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MenuitemPrint_PrintQuickInfoFromDSSI:
+	push	si
+
+	mov		si, [si+MENUITEM.szQuickInfo]
+	CALL_DISPLAY_LIBRARY PrintNullTerminatedStringFromCSSI
+
+	pop		si
+	ret
+
+
+;--------------------------------------------------------------------
+; MenuitemPrint_NameWithPossibleValueFromDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MenuitemPrint_NameWithPossibleValueFromDSSI:
+	eMOVZX	bx, BYTE [si+MENUITEM.bType]
+	cmp		bl, TYPE_MENUITEM_ACTION
+	ja		SHORT .PrintNameAndValueFromDSSI
+	; Fall to .PrintNameWithoutValueFromDSSI
+
+;--------------------------------------------------------------------
+; .PrintNameWithoutValueFromDSSI
+;	Parameters:
+;		BX:		Menuitem type (MENUITEM.bType)
+;		DS:SI:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+.PrintNameWithoutValueFromDSSI:
+	push	bp
+	push	si
+
+	mov		bp, sp				; BP = SP before pushing parameters
+	push	WORD [cs:bx+.rgwMenuitemTypeCharacter]
+	push	WORD [si+MENUITEM.szName]
+	mov		si, g_szFormatItemWithoutValue
+	CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
+
+	pop		si
+	pop		bp
+	ret
+.rgwMenuitemTypeCharacter:
+	dw		'-'		; TYPE_MENUITEM_PAGEBACK
+	dw		'+'		; TYPE_MENUITEM_PAGENEXT
+	dw		'*'		; TYPE_MENUITEM_ACTION
+
+
+;--------------------------------------------------------------------
+; .PrintNameAndValueFromDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		SS:BP:	Ptr to buffer for item value
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.PrintNameAndValueFromDSSI:
+	eENTER_STRUCT	MAX_VALUE_STRING_LENGTH+2	; +2 for NULL and alignment
+	call	.FormatValueStringFromItemInDSSItoBufferInSSBP
+	call	.FormatNameFromItemInDSSIandValueFromSSBP
+	eLEAVE_STRUCT	MAX_VALUE_STRING_LENGTH+2
+	ret
+
+;--------------------------------------------------------------------
+; .FormatValueStringFromItemInDSSItoBufferInSSBP
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		SS:BP:	Ptr to buffer for item value
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.FormatValueStringFromItemInDSSItoBufferInSSBP:
+	push	es
+	call	Registers_CopySSBPtoESDI
+	mov		al, '['
+	stosb
+	call	[si+MENUITEM.fnFormatValue]
+	mov		ax, ']'
+	stosw	; Also terminate with NULL
+	pop		es
+	ret
+
+;--------------------------------------------------------------------
+; .FormatNameFromItemInDSSIandValueFromSSBP
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		SS:BP:	Ptr to value string
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.FormatNameFromItemInDSSIandValueFromSSBP:
+	push	si
+
+	mov		bx, bp
+	mov		bp, sp				; BP = SP before pushing parameters
+	push	WORD [si+MENUITEM.szName]
+	push	bx
+	push	ss
+	mov		si, g_szFormatItemNameWithValue
+	CALL_DISPLAY_LIBRARY FormatNullTerminatedStringFromCSSI
+
+	mov		bp, bx
+	pop		si
+	ret
+
+
+;--------------------------------------------------------------------
+; MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
+; MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		ES:DI:	Ptr to destination buffer
+;	Returns:
+;		DI:		Updated
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------	
+ALIGN JUMP_ALIGN
+MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI:
+	call	Menuitem_GetValueToAXfromMenuitemInDSSI
+	shl		ax, 1
+	jmp		SHORT PrintLookupValueFromAXtoBufferInESDI
+
+ALIGN JUMP_ALIGN
+MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI:
+	call	Menuitem_GetValueToAXfromMenuitemInDSSI
+	; Fall to PrintLookupValueFromAXtoBufferInESDI
+
+;--------------------------------------------------------------------
+; MenuitemPrint_WriteLookupValueStringToBufferInESDIfromItemInDSSI
+;	Parameters:
+;		AX:		Value to print
+;		DS:SI:	Ptr to MENUITEM
+;		ES:DI:	Ptr to destination buffer
+;	Returns:
+;		DI:		Updated
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------	
+ALIGN JUMP_ALIGN
+PrintLookupValueFromAXtoBufferInESDI:
+	push	si
+	add		ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgszValueToStringLookup]
+	xchg	bx, ax
+	mov		si, [bx]
+	call	String_CopyDSSItoESDIandGetLengthToCX
+	pop		si
+	ret
+
+
+;--------------------------------------------------------------------
+; MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		ES:DI:	Ptr to destination buffer
+;	Returns:
+;		DI:		Updated
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------	
+ALIGN JUMP_ALIGN
+MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI:
+	mov		bx, di
+	mov		cx, MAX_VALUE_STRING_LENGTH
+	CALL_DISPLAY_LIBRARY PushDisplayContext
+	CALL_DISPLAY_LIBRARY PrepareOffScreenBufferInESBXwithLengthInCX
+
+	call	Menuitem_GetValueToAXfromMenuitemInDSSI
+	mov		bx, 10
+	CALL_DISPLAY_LIBRARY PrintWordFromAXwithBaseInBX
+	jmp		SHORT FinishPrintingUnsignedOrHexValue
+
+;--------------------------------------------------------------------
+; MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to MENUITEM
+;		ES:DI:	Ptr to destination buffer
+;	Returns:
+;		DI:		Updated
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------	
+ALIGN JUMP_ALIGN
+MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI:
+	mov		bx, di
+	mov		cx, MAX_VALUE_STRING_LENGTH
+	CALL_DISPLAY_LIBRARY PushDisplayContext
+	CALL_DISPLAY_LIBRARY PrepareOffScreenBufferInESBXwithLengthInCX
+
+	call	Menuitem_GetValueToAXfromMenuitemInDSSI
+	mov		bx, 16
+	CALL_DISPLAY_LIBRARY PrintWordFromAXwithBaseInBX
+	mov		al, 'h'
+	CALL_DISPLAY_LIBRARY PrintCharacterFromAL
+ALIGN JUMP_ALIGN
+FinishPrintingUnsignedOrHexValue:
+	CALL_DISPLAY_LIBRARY GetCharacterPointerToBXAX
+	xchg	bx, ax
+
+	CALL_DISPLAY_LIBRARY PopDisplayContext
+	mov		di, bx
+	ret
+
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_rgszValueToStringLookupForFlagBooleans:
+	dw		g_szNo
+	dw		g_szYes
Index: tags/Configurator_for_v1.1.5/Src/Menupage.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupage.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupage.asm	(revision 72)
@@ -0,0 +1,127 @@
+; File name		:	Menupage.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	1.11.2010
+; Author		:	Tomi Tilli
+; Description	:	Functions for accessing MENUPAGE structs.
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; Menupage_ChangeToNewMenupageInDSSI
+;	Parameters:
+;		DS:SI:	Ptr to new MENUPAGE
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menupage_ChangeToNewMenupageInDSSI:
+	mov		di, si
+	call	Menupage_SetActiveMenupageFromDSDI
+	call	Menupage_GetVisibleMenuitemsToAXfromDSDI
+	CALL_MENU_LIBRARY SetTotalItemsFromAX
+	xor		ax, ax
+	CALL_MENU_LIBRARY HighlightItemFromAX
+	CALL_MENU_LIBRARY RefreshWindow
+	ret
+
+
+;--------------------------------------------------------------------
+; Menupage_SetActiveMenupageFromDSDI
+;	Parameters:
+;		DS:DI:	Ptr to MENUPAGE to set active
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menupage_SetActiveMenupageFromDSDI:
+	mov		[g_cfgVars+CFGVARS.pMenupage], di
+	ret
+
+
+;--------------------------------------------------------------------
+; Menupage_GetActiveMenupageToDSDI:
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		DS:DI:	Ptr to MENUPAGE
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menupage_GetActiveMenupageToDSDI:
+	push	cs
+	pop		ds
+	mov		di, [g_cfgVars+CFGVARS.pMenupage]
+	ret
+
+
+;--------------------------------------------------------------------
+; Menupage_GetVisibleMenuitemsToAXfromDSDI
+;	Parameters:
+;		DS:DI:	Ptr to MENUPAGE
+;	Returns:
+;		AX:		Number of visible MENUITEMs in MENUPAGE
+;	Corrupts registers:
+;		BX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menupage_GetVisibleMenuitemsToAXfromDSDI:
+	xor		ax, ax
+	mov		cx, [di+MENUPAGE.wMenuitems]
+	lea		bx, [di+MENUPAGE.rgMenuitem]
+
+ALIGN JUMP_ALIGN
+.CheckVisibilityFromNextMenuitem:
+	test	BYTE [bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	jz		SHORT .PrepareToLoop
+	inc		ax
+.PrepareToLoop:
+	add		bx, BYTE MENUITEM_size
+	loop	.CheckVisibilityFromNextMenuitem
+	ret
+
+
+;--------------------------------------------------------------------
+; Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI
+;	Parameters:
+;		CX:		nth visible MENUITEM to find
+;		DS:DI:	Ptr to MENUPAGE
+;	Returns:
+;		DS:SI:	Ptr to CXth visible MENUITEM
+;		CF:		Set if MENUITEM found
+;				Cleared if MENUITEM not found
+;	Corrupts registers:
+;		AX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+Menupage_GetCXthVisibleMenuitemToDSSIfromDSDI:
+	mov		ax, [di+MENUPAGE.wMenuitems]
+	cmp		cx, ax
+	jae		SHORT .MenuitemNotFound
+	xchg	ax, cx
+	inc		ax
+	lea		si, [di+MENUPAGE.rgMenuitem]
+ALIGN JUMP_ALIGN
+.CheckNextMenuitem:
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	jz		SHORT .PrepareToLoop
+	dec		ax
+	jz		SHORT .MenuitemFound
+.PrepareToLoop:
+	add		si, BYTE MENUITEM_size
+	loop	.CheckNextMenuitem
+.MenuitemNotFound:
+	clc
+	ret
+ALIGN JUMP_ALIGN
+.MenuitemFound:
+	stc
+	ret
Index: tags/Configurator_for_v1.1.5/Src/Menupages/BootMenuSettingsMenu.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupages/BootMenuSettingsMenu.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupages/BootMenuSettingsMenu.asm	(revision 72)
@@ -0,0 +1,138 @@
+; File name		:	BootMenuSettingsMenu.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	18.11.2010
+; Last update	:	18.11.2010
+; Author		:	Tomi Tilli
+; Description	:	"Boot Menu Settings" menu structs and functions.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_MenupageForBootMenuSettingsMenu:
+istruc MENUPAGE
+	at	MENUPAGE.fnEnter,			dw	BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.wMenuitems,		dw	6
+iend
+
+g_MenuitemBootMnuStngsBackToConfigurationMenu:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemBackToCfgMenu
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeBackToCfgMenu
+	at	MENUITEM.szHelp,			dw	g_szNfoIdeBackToCfgMenu
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGEBACK
+iend
+
+g_MenuitemBootMnuStngsDefaultBootDrive:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateHexInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemBootDrive
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoBootDrive
+	at	MENUITEM.szHelp,			dw	g_szHelpBootDrive
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_HEX
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bBootDrv
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgBootDrive
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	0
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	0FFh
+iend
+
+g_MenuitemBootMnuStngsDisplayRomBoot:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemBootRomBoot
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoBootRomBoot
+	at	MENUITEM.szHelp,			dw	g_szHelpBootRomBoot
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.wFlags
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgBootRomBoot
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	FLG_ROMVARS_ROMBOOT
+iend
+
+g_MenuitemBootMnuStngsFloppyDrives:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemBootFloppyDrvs
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoBootFloppyDrvs
+	at	MENUITEM.szHelp,			dw	g_szHelpBootFloppyDrvs
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bMinFddCnt
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgBootFloppyDrvs
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBootFloppyDrvs
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	g_rgwChoiseToValueLookupForFloppyDrives
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFloppyDrives
+iend
+
+g_MenuitemBootMnuStngsSelectionTimeout:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemBootTimeout
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoBootTimeout
+	at	MENUITEM.szHelp,			dw	g_szHelpBootTimeout
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bBootDelay
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgBootTimeout
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	0
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	60
+iend
+
+g_MenuitemBootMnuStngsSwapBootDriveNumbers:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemBootSwap
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoBootSwap
+	at	MENUITEM.szHelp,			dw	g_szHelpBootSwap
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.wFlags
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgBootSwap
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	FLG_ROMVARS_DRVXLAT
+iend
+
+g_rgwChoiseToValueLookupForFloppyDrives:	; (No translation)
+	dw	0
+	dw	1
+	dw	2
+	dw	3
+	dw	4
+g_rgszValueToStringLookupForFloppyDrives:
+	dw	g_szValueBootFloppyDrvsAuto
+	dw	g_szValueBootFloppyDrvs1
+	dw	g_szValueBootFloppyDrvs2
+	dw	g_szValueBootFloppyDrvs3
+	dw	g_szValueBootFloppyDrvs4
+
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except BP
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility:
+	push	cs
+	pop		ds
+	mov		si, g_MenupageForBootMenuSettingsMenu
+	jmp		Menupage_ChangeToNewMenupageInDSSI
Index: tags/Configurator_for_v1.1.5/Src/Menupages/ConfigurationMenu.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupages/ConfigurationMenu.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupages/ConfigurationMenu.asm	(revision 72)
@@ -0,0 +1,359 @@
+; File name		:	ConfigurationMenu.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	24.10.2010
+; Last update	:	18.11.2010
+; Author		:	Tomi Tilli
+; Description	:	"Configure XTIDE Universal BIOS" menu structs and functions.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_MenupageForConfigurationMenu:
+istruc MENUPAGE
+	at	MENUPAGE.fnEnter,			dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	MainMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.wMenuitems,		dw	11
+iend
+
+g_MenuitemConfigurationBackToMainMenu:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	MainMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemCfgBackToMain
+	at	MENUITEM.szQuickInfo,		dw	g_szItemCfgBackToMain
+	at	MENUITEM.szHelp,			dw	g_szItemCfgBackToMain
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGEBACK
+iend
+
+g_MenuitemConfigurationPrimaryIdeController:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	PrimaryIdeController
+	at	MENUITEM.szName,			dw	g_szItemCfgIde1
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgIde
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgIde
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemConfigurationSecondaryIdeController:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	SecondaryIdeController
+	at	MENUITEM.szName,			dw	g_szItemCfgIde2
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgIde
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgIde
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemConfigurationTertiaryIdeController:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	TertiaryIdeController
+	at	MENUITEM.szName,			dw	g_szItemCfgIde3
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgIde
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgIde
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemConfigurationQuaternaryIdeController:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	QuaternaryIdeController
+	at	MENUITEM.szName,			dw	g_szItemCfgIde4
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgIde
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgIde
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemConfigurationQuinaryIdeController:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	QuinaryIdeController
+	at	MENUITEM.szName,			dw	g_szItemCfgIde5
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgIde
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgIde
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemConfigurationBootMenuSettings:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	BootMenuSettingsMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemCfgBootMenu
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgBootMenu
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgBootMenu
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemConfigurationBootLoaderType:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemCfgBootLoader
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgBootLoader
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgBootLoader
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bBootLdrType
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szItemCfgBootLoader
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseCfgBootLoader
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	g_rgwChoiseToValueLookupForBootLoaderType
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForBootLoaderType
+iend
+
+g_MenuitemConfigurationFullOperatingMode:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemCfgFullMode
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgFullMode
+	at	MENUITEM.szHelp,			dw	g_szHelpCfgFullMode
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.wFlags
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgCfgFullMode
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	FLG_ROMVARS_FULLMODE
+iend
+
+g_MenuitemConfigurationKiBtoStealFromRAM:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemCfgStealSize
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgStealSize
+	at	MENUITEM.szHelp,			dw	g_szHelpCfgStealSize
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bStealSize
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgCfgStealSize
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	1
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	255
+iend
+
+g_MenuitemConfigurationIdeControllers:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemCfgIdeCnt
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoCfgIdeCnt
+	at	MENUITEM.szHelp,			dw	g_szNfoCfgIdeCnt
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	ROMVARS.bIdeCnt
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgCfgIdeCnt
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	1
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	5
+iend
+
+
+g_rgwChoiseToValueLookupForBootLoaderType:
+	dw	BOOTLOADER_TYPE_MENU
+	dw	BOOTLOADER_TYPE_SIMPLE
+	dw	BOOTLOADER_TYPE_NONE
+g_rgszValueToStringLookupForBootLoaderType:
+	dw	g_szValueCfgBootLoaderMenu
+	dw	g_szValueCfgBootLoaderAthenC
+	dw	g_szUnidentified
+	dw	g_szValueCfgBootLoaderSystem
+	
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; MainMenu_EnterMenuOrModifyItemVisibility
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except BP
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+ConfigurationMenu_EnterMenuOrModifyItemVisibility:
+	push	cs
+	pop		ds
+	call	.DisableAllIdeControllerMenuitems
+	call	.EnableIdeControllerMenuitemsBasedOnConfiguration
+	call	.EnableOrDisableBootMenuSettings
+	call	.EnableOrDisableKiBtoStealFromRAM
+	call	.EnableOrDisableIdeControllerCount
+	mov		si, g_MenupageForConfigurationMenu
+	jmp		Menupage_ChangeToNewMenupageInDSSI
+
+;--------------------------------------------------------------------
+; .DisableAllIdeControllerMenuitems
+; .EnableIdeControllerMenuitemsBasedOnConfiguration
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.DisableAllIdeControllerMenuitems:
+	mov		cx, MAX_ALLOWED_IDE_CONTROLLERS-1
+	mov		bx, g_MenuitemConfigurationSecondaryIdeController
+ALIGN JUMP_ALIGN
+.DisableNextIdeControllerMenuitem:
+	call	.DisableMenuitemFromCSBX
+	add		bx, BYTE MENUITEM_size
+	loop	.DisableNextIdeControllerMenuitem
+	ret
+
+ALIGN JUMP_ALIGN
+.EnableIdeControllerMenuitemsBasedOnConfiguration:
+	call	.GetIdeControllerCountToCX
+	dec		cx			; Primary always enabled
+	jcxz	.PrimaryControllerAlreadyEnabled
+	mov		bx, g_MenuitemConfigurationSecondaryIdeController
+ALIGN JUMP_ALIGN
+.EnableNextIdeControllerMenuitem:
+	call	.EnableMenuitemFromCSBX
+	add		bx, BYTE MENUITEM_size
+	loop	.EnableNextIdeControllerMenuitem
+.PrimaryControllerAlreadyEnabled:
+	ret
+
+;--------------------------------------------------------------------
+; .GetIdeControllerCountToCX
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		CX:		Number of IDE controllers to configure
+;	Corrupts registers:
+;		AX, BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.GetIdeControllerCountToCX:
+	call	Buffers_GetRomvarsFlagsToAX
+	test	ax, FLG_ROMVARS_FULLMODE
+	jz		SHORT .AllowOnlyOneIdeControllerInLiteMode
+
+	mov		bx, ROMVARS.bIdeCnt
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	eMOVZX	cx, al
+	ret
+ALIGN JUMP_ALIGN
+.AllowOnlyOneIdeControllerInLiteMode:
+	mov		cx, 1
+	ret
+
+
+;--------------------------------------------------------------------
+; .EnableOrDisableBootMenuSettings
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableBootMenuSettings:
+	mov		bx, ROMVARS.bBootLdrType
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	mov		bx, g_MenuitemConfigurationBootMenuSettings
+	cmp		ax, BYTE BOOTLOADER_TYPE_MENU
+	jne		SHORT .DisableMenuitemFromCSBX
+	jmp		SHORT .EnableMenuitemFromCSBX
+
+
+;--------------------------------------------------------------------
+; .EnableOrDisableKiBtoStealFromRAM
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableKiBtoStealFromRAM:
+	call	Buffers_GetRomvarsFlagsToAX
+	mov		bx, g_MenuitemConfigurationKiBtoStealFromRAM
+	test	ax, FLG_ROMVARS_FULLMODE
+	jz		SHORT .DisableMenuitemFromCSBX
+	jmp		SHORT .EnableMenuitemFromCSBX
+
+;--------------------------------------------------------------------
+; .EnableOrDisableKiBtoStealFromRAM
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableIdeControllerCount:
+	call	Buffers_GetRomvarsFlagsToAX
+	mov		bx, g_MenuitemConfigurationIdeControllers
+	test	ax, FLG_ROMVARS_FULLMODE
+	jz		SHORT .DisableMenuitemFromCSBX
+	jmp		SHORT .EnableMenuitemFromCSBX
+
+;--------------------------------------------------------------------
+; .EnableMenuitemFromCSBX
+; .DisableMenuitemFromCSBX
+;	Parameters:
+;		CS:BX:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableMenuitemFromCSBX:
+	or		BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableMenuitemFromCSBX:
+	and		BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
+
+
+
+;--------------------------------------------------------------------
+; MENUITEM activation functions (.fnActivate)
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except segments
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+PrimaryIdeController:
+	mov		bx, ROMVARS.ideVars0
+	jmp		SHORT DisplayIdeControllerMenu
+
+ALIGN JUMP_ALIGN
+SecondaryIdeController:
+	mov		bx, ROMVARS.ideVars1
+	jmp		SHORT DisplayIdeControllerMenu
+
+ALIGN JUMP_ALIGN
+TertiaryIdeController:
+	mov		bx, ROMVARS.ideVars2
+	jmp		SHORT DisplayIdeControllerMenu
+
+ALIGN JUMP_ALIGN
+QuaternaryIdeController:
+	mov		bx, ROMVARS.ideVars3
+	jmp		SHORT DisplayIdeControllerMenu
+
+ALIGN JUMP_ALIGN
+QuinaryIdeController:
+	mov		bx, ROMVARS.ideVars4
+	; Fall to DisplayIdeControllerMenu
+
+ALIGN JUMP_ALIGN
+DisplayIdeControllerMenu:
+	call	IdeControllerMenu_InitializeToIdevarsOffsetInBX
+	jmp		IdeControllerMenu_EnterMenuOrModifyItemVisibility
Index: tags/Configurator_for_v1.1.5/Src/Menupages/FlashMenu.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupages/FlashMenu.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupages/FlashMenu.asm	(revision 72)
@@ -0,0 +1,394 @@
+; File name		:	FlashMenu.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	19.11.2010
+; Last update	:	5.12.2010
+; Author		:	Tomi Tilli
+; Description	:	"Flash EEPROM" menu structs and functions.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_MenupageForFlashMenu:
+istruc MENUPAGE
+	at	MENUPAGE.fnEnter,			dw	FlashMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	MainMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.wMenuitems,		dw	7
+iend
+
+g_MenuitemFlashBackToMainMenu:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	MainMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemCfgBackToMain
+	at	MENUITEM.szQuickInfo,		dw	g_szItemCfgBackToMain
+	at	MENUITEM.szHelp,			dw	g_szItemCfgBackToMain
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGEBACK
+iend
+
+g_MenuitemFlashStartFlashing:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	StartFlashing
+	at	MENUITEM.szName,			dw	g_szItemFlashStart
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoFlashStart
+	at	MENUITEM.szHelp,			dw	g_szNfoFlashStart
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_ACTION
+iend
+
+g_MenuitemFlashEepromType:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemFlashEepromType
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoFlashEepromType
+	at	MENUITEM.szHelp,			dw	g_szNfoFlashEepromType
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	CFGVARS.bEepromType
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgFlashEepromType
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseEepromType
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	g_rgwChoiseToValueLookupForEepromType
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForEepromType
+iend
+
+g_MenuitemFlashSdpCommand:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemFlashSDP
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoFlashSDP
+	at	MENUITEM.szHelp,			dw	g_szHelpFlashSDP
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	CFGVARS.bSdpCommand
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgFlashSDP
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseSdpCommand
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	g_rgwChoiseToValueLookupForSdpCommand
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForSdpCommand
+iend
+
+g_MenuitemFlashPageSize:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemFlashPageSize
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoFlashPageSize
+	at	MENUITEM.szHelp,			dw	g_szHelpFlashPageSize
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	CFGVARS.bEepromPage
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgFlashPageSize
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoisePageSize
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	g_rgwChoiseToValueLookupForPageSize
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForPageSize
+iend
+
+g_MenuitemFlashEepromAddress:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateHexInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemFlashAddr
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoFlashAddr
+	at	MENUITEM.szHelp,			dw	g_szNfoFlashAddr
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_HEX
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	CFGVARS.wEepromSegment
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgFlashAddr
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	0C000h
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	0F800h
+iend
+
+g_MenuitemFlashGenerateChecksum:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemFlashChecksum
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoFlashChecksum
+	at	MENUITEM.szHelp,			dw	g_szHelpFlashChecksum
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_PROGRAMVAR | FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	CFGVARS.wFlags
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgFlashChecksum
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	FLG_CFGVARS_CHECKSUM
+iend
+
+g_rgwChoiseToValueLookupForEepromType:
+	dw	EEPROM_TYPE.2816_2kiB
+	dw	EEPROM_TYPE.2864_8kiB
+	dw	EEPROM_TYPE.28256_32kiB
+	dw	EEPROM_TYPE.28512_64kiB
+g_rgszValueToStringLookupForEepromType:
+	dw	g_szValueFlash2816
+	dw	g_szValueFlash2864
+	dw	g_szValueFlash28256
+	dw	g_szValueFlash28512
+
+g_rgwChoiseToValueLookupForSdpCommand:
+	dw	SDP_COMMAND.none
+	dw	SDP_COMMAND.enable
+	dw	SDP_COMMAND.disable
+g_rgszValueToStringLookupForSdpCommand:
+	dw	g_szValueFlashNone
+	dw	g_szValueFlashEnable
+	dw	g_szValueFlashDisable
+
+g_rgwChoiseToValueLookupForPageSize:
+	dw	EEPROM_PAGE.1_byte
+	dw	EEPROM_PAGE.2_bytes
+	dw	EEPROM_PAGE.4_bytes
+	dw	EEPROM_PAGE.8_bytes
+	dw	EEPROM_PAGE.16_bytes
+	dw	EEPROM_PAGE.32_bytes
+	dw	EEPROM_PAGE.64_bytes
+g_rgszValueToStringLookupForPageSize:
+	dw	g_szValueFlash1byte
+	dw	g_szValueFlash2bytes
+	dw	g_szValueFlash4bytes
+	dw	g_szValueFlash8bytes
+	dw	g_szValueFlash16bytes
+	dw	g_szValueFlash32bytes
+	dw	g_szValueFlash64bytes
+
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; MainMenu_EnterMenuOrModifyItemVisibility
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except BP
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+FlashMenu_EnterMenuOrModifyItemVisibility:
+	push	cs
+	pop		ds
+	mov		si, g_MenupageForFlashMenu
+	jmp		Menupage_ChangeToNewMenupageInDSSI
+
+
+;--------------------------------------------------------------------
+; MENUITEM activation functions (.fnActivate)
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except segments
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+StartFlashing:
+	call	.MakeSureThatImageFitsInEeprom
+	jc		SHORT .InvalidFlashingParameters
+	push	es
+	push	ds
+
+	call	.PrepareBuffersForFlashing
+	mov		cx, FLASHVARS_size + PROGRESS_DIALOG_IO_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	.InitializeFlashvarsFromDSSI
+	mov		bx, si							; DS:BX now points to FLASHVARS
+	add		si, BYTE FLASHVARS_size			; DS:SI now points to PROGRESS_DIALOG_IO
+	call	Dialogs_DisplayProgressDialogForFlashingWithDialogIoInDSSIandFlashvarsInDSBX
+	call	.DisplayFlashingResultsFromFlashvarsInDSBX
+
+	add		sp, BYTE FLASHVARS_size + PROGRESS_DIALOG_IO_size
+	pop		ds
+	pop		es
+.InvalidFlashingParameters:
+	ret
+
+;--------------------------------------------------------------------
+; .MakeSureThatImageFitsInEeprom
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.MakeSureThatImageFitsInEeprom:
+	call	.GetSelectedEepromSizeInWordsToAX
+	cmp		ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	jae		SHORT .ImageFitsInSelectedEeprom
+	mov		dx, g_szErrEepromTooSmall
+	call	Dialogs_DisplayErrorFromCSDX
+	stc
+	ret
+ALIGN JUMP_ALIGN
+.ImageFitsInSelectedEeprom:
+	clc
+	ret
+
+;--------------------------------------------------------------------
+; .PrepareBuffersForFlashing
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.PrepareBuffersForFlashing:
+	call	EEPROM_LoadFromRomToRamComparisonBuffer
+	call	Buffers_AppendZeroesIfNeeded
+	test	WORD [cs:g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_CHECKSUM
+	jz		SHORT .DoNotGenerateChecksumByte
+	jmp		Buffers_GenerateChecksum
+.DoNotGenerateChecksumByte:
+	ret
+
+;--------------------------------------------------------------------
+; .InitializeFlashvarsFromDSSI
+;	Parameters:
+;		DS:SI:	Ptr to FLASHVARS to initialize
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.InitializeFlashvarsFromDSSI:
+	call	Buffers_GetFileBufferToESDI
+	mov		[si+FLASHVARS.fpNextSourcePage], di
+	mov		[si+FLASHVARS.fpNextSourcePage+2], es
+
+	call	Buffers_GetFlashComparisonBufferToESDI
+	mov		[si+FLASHVARS.fpNextComparisonPage], di
+	mov		[si+FLASHVARS.fpNextComparisonPage+2], es
+
+	mov		ax, [cs:g_cfgVars+CFGVARS.wEepromSegment]
+	mov		WORD [si+FLASHVARS.fpNextDestinationPage], 0
+	mov		[si+FLASHVARS.fpNextDestinationPage+2], ax
+
+	mov		al, [cs:g_cfgVars+CFGVARS.bEepromType]
+	mov		[si+FLASHVARS.bEepromType], al
+
+	mov		al, [cs:g_cfgVars+CFGVARS.bSdpCommand]
+	mov		[si+FLASHVARS.bEepromSdpCommand], al
+
+	eMOVZX	bx, BYTE [cs:g_cfgVars+CFGVARS.bEepromPage]
+	mov		ax, [cs:bx+g_rgwEepromPageToSizeInBytes]
+	mov		[si+FLASHVARS.wEepromPageSize], ax
+
+	call	.GetNumberOfPagesToFlashToAX
+	mov		[si+FLASHVARS.wPagesToFlash], ax
+	ret
+
+;--------------------------------------------------------------------
+; .GetNumberOfPagesToFlashToAX
+;	Parameters:
+;		DS:SI:	Ptr to FLASHVARS to initialize
+;	Returns:
+;		AX:		Number of pages to flash (0 = 65536)
+;	Corrupts registers:
+;		BX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.GetNumberOfPagesToFlashToAX:
+	call	.GetSelectedEepromSizeInWordsToAX
+	xor		dx, dx
+	shl		ax, 1		; Size in bytes to...
+	rcl		dx, 1		; ...DX:AX
+
+	cmp		WORD [si+FLASHVARS.wEepromPageSize], BYTE 1
+	jbe		SHORT .PreventDivideException
+	div		WORD [si+FLASHVARS.wEepromPageSize]
+.PreventDivideException:
+	ret
+
+;--------------------------------------------------------------------
+; .GetSelectedEepromSizeInWordsToAX
+;	Parameters:
+;		Nothing
+;	Returns:
+;		AX:		Selected EEPROM size in WORDs
+;	Corrupts registers:
+;		BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.GetSelectedEepromSizeInWordsToAX:
+	eMOVZX	bx, BYTE [cs:g_cfgVars+CFGVARS.bEepromType]
+	mov		ax, [cs:bx+g_rgwEepromTypeToSizeInWords]
+	ret
+
+;--------------------------------------------------------------------
+; .DisplayFlashingResultsFromFlashvarsInDSBX
+;	Parameters:
+;		DS:BX:	Ptr to FLASHVARS
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, DX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.DisplayFlashingResultsFromFlashvarsInDSBX:
+	eMOVZX	bx, BYTE [bx+FLASHVARS.flashResult]
+	jmp		[cs:bx+.rgfnFlashResultMessage]
+
+ALIGN WORD_ALIGN
+.rgfnFlashResultMessage:
+	dw		.DisplayFlashSuccessful
+	dw		.DisplayPollingError
+	dw		.DisplayDataVerifyError
+
+
+;--------------------------------------------------------------------
+; .DisplayPollingError
+; .DisplayDataVerifyError
+; .DisplayFlashSuccessful
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, DX, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.DisplayPollingError:
+	mov		dx, g_szErrEepromPolling
+	jmp		Dialogs_DisplayErrorFromCSDX
+
+ALIGN JUMP_ALIGN
+.DisplayDataVerifyError:
+	mov		dx, g_szErrEepromVerify
+	jmp		Dialogs_DisplayErrorFromCSDX
+
+ALIGN JUMP_ALIGN
+.DisplayFlashSuccessful:
+	call	Buffers_GetFileBufferToESDI
+	cmp		WORD [es:di+ROMVARS.wRomSign], 0AA55h	; PC ROM?
+	je		SHORT .DisplayRebootMessageAndReboot
+	mov		dx, g_szForeignFlash
+	jmp		Dialogs_DisplayNotificationFromCSDX
+ALIGN JUMP_ALIGN
+.DisplayRebootMessageAndReboot:
+	mov		dx, g_szPCFlashSuccessfull
+	call	Dialogs_DisplayNotificationFromCSDX
+	; Fall to .RebootComputer
+
+
+;--------------------------------------------------------------------
+; .RebootComputer
+;	Parameters:
+; 		Nothing
+;	Returns:
+;		Nothing, function never returns
+;	Corrupts registers:
+;		Doesn't matter
+;--------------------------------------------------------------------
+.RebootComputer:
+	mov		al, 0FEh				; System reset (AT+ keyboard controller)
+	out		64h, al					; Reset computer (AT+)
+	nop
+	jmp		WORD 0F000h:0FFF0h		; XT reset
Index: tags/Configurator_for_v1.1.5/Src/Menupages/IdeControllerMenu.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupages/IdeControllerMenu.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupages/IdeControllerMenu.asm	(revision 72)
@@ -0,0 +1,251 @@
+; File name		:	IdeControllerMenu.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	2.11.2010
+; Last update	:	18.11.2010
+; Author		:	Tomi Tilli
+; Description	:	"IDE Controller" menu structs and functions.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_MenupageForIdeControllerMenu:
+istruc MENUPAGE
+	at	MENUPAGE.fnEnter,			dw	IdeControllerMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.wMenuitems,		dw	8
+iend
+
+g_MenuitemIdeControllerBackToConfigurationMenu:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemBackToCfgMenu
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeBackToCfgMenu
+	at	MENUITEM.szHelp,			dw	g_szNfoIdeBackToCfgMenu
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGEBACK
+iend
+
+g_MenuitemIdeControllerMasterDrive:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	MasterDrive
+	at	MENUITEM.szName,			dw	g_szItemIdeMaster
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeMaster
+	at	MENUITEM.szHelp,			dw	g_szNfoIdeMaster
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemIdeControllerSlaveDrive:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	SlaveDrive
+	at	MENUITEM.szName,			dw	g_szItemIdeSlave
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeSlave
+	at	MENUITEM.szHelp,			dw	g_szNfoIdeSlave
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemIdeControllerBusType:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemIdeBusType
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeBusType
+	at	MENUITEM.szHelp,			dw	g_szNfoIdeBusType
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgBusType
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseCfgBusType
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	g_rgwChoiseToValueLookupForBusType
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForBusType
+iend
+
+g_MenuitemIdeControllerCommandBlockAddress:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateHexInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemIdeCmdPort
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeCmdPort
+	at	MENUITEM.szHelp,			dw	g_szHelpIdeCmdPort
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_HEX
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgIdeCmdPort
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	0
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	-1
+iend
+
+g_MenuitemIdeControllerControlBlockAddress:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateHexInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteHexValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemIdeCtrlPort
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeCtrlPort
+	at	MENUITEM.szHelp,			dw	g_szHelpIdeCtrlPort
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_HEX
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgIdeCtrlPort
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	0
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	-1
+iend
+
+g_MenuitemIdeControllerEnableInterrupt:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemIdeEnIRQ
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeEnIRQ
+	at	MENUITEM.szHelp,			dw	g_szHelpIdeEnIRQ
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgIdeEnIRQ
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	15
+iend
+
+g_MenuitemIdeControllerIdeIRQ:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemIdeIRQ
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeIRQ
+	at	MENUITEM.szHelp,			dw	g_szHelpIdeIRQ
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgIdeIRQ
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	2
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	15
+iend
+
+g_rgwChoiseToValueLookupForBusType:
+	dw	BUS_TYPE_8_DUAL
+	dw	BUS_TYPE_8_SINGLE
+	dw	BUS_TYPE_16
+	dw	BUS_TYPE_32
+g_rgszValueToStringLookupForBusType:
+	dw	g_szValueCfgBusTypeDual8b
+	dw	g_szValueCfgBusType16b
+	dw	g_szValueCfgBusType32b
+	dw	g_szValueCfgBusTypeSingle8b
+
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; IdeControllerMenu_InitializeToIdevarsOffsetInBX
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+IdeControllerMenu_InitializeToIdevarsOffsetInBX:
+	lea		ax, [bx+IDEVARS.drvParamsMaster]
+	mov		[cs:g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+IDEVARS.drvParamsSlave]
+	mov		[cs:g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+IDEVARS.bBusType]
+	mov		[cs:g_MenuitemIdeControllerBusType+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+IDEVARS.wPort]
+	mov		[cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+IDEVARS.wPortCtrl]
+	mov		[cs:g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+IDEVARS.bIRQ]
+	mov		[cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[cs:g_MenuitemIdeControllerIdeIRQ+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	ret
+
+
+;--------------------------------------------------------------------
+; IdeControllerMenu_EnterMenuOrModifyItemVisibility
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except BP
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+IdeControllerMenu_EnterMenuOrModifyItemVisibility:
+	push	cs
+	pop		ds
+	call	.EnableOrDisableIRQ
+	mov		si, g_MenupageForIdeControllerMenu
+	jmp		Menupage_ChangeToNewMenupageInDSSI
+
+;--------------------------------------------------------------------
+; .EnableOrDisableIRQ
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableIRQ:
+	mov		bx, [cs:g_MenuitemIdeControllerEnableInterrupt+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	mov		bx, g_MenuitemIdeControllerIdeIRQ
+	test	ax, ax
+	jz		SHORT .DisableMenuitemFromCSBX
+	; Fall to .EnableMenuitemFromCSBX
+
+;--------------------------------------------------------------------
+; .EnableMenuitemFromCSBX
+; .DisableMenuitemFromCSBX
+;	Parameters:
+;		CS:BX:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableMenuitemFromCSBX:
+	or		BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableMenuitemFromCSBX:
+	and		BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
+
+
+;--------------------------------------------------------------------
+; MENUITEM activation functions (.fnActivate)
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except segments
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MasterDrive:
+	mov		bx, [cs:g_MenuitemIdeControllerMasterDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	jmp		SHORT DisplayMasterSlaveMenu
+
+ALIGN JUMP_ALIGN
+SlaveDrive:
+	mov		bx, [cs:g_MenuitemIdeControllerSlaveDrive+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	; Fall to DisplayMasterSlaveMenu
+
+ALIGN JUMP_ALIGN
+DisplayMasterSlaveMenu:
+	call	MasterSlaveMenu_InitializeToDrvparamsOffsetInBX
+	jmp		MasterSlaveMenu_EnterMenuOrModifyItemVisibility
Index: tags/Configurator_for_v1.1.5/Src/Menupages/MainMenu.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupages/MainMenu.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupages/MainMenu.asm	(revision 72)
@@ -0,0 +1,241 @@
+; File name		:	MainMenu.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	6.10.2010
+; Last update	:	9.12.2010
+; Author		:	Tomi Tilli
+; Description	:	Main menu structs and functions.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_MenupageForMainMenu:
+istruc MENUPAGE
+	at	MENUPAGE.fnEnter,			dw	MainMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	ExitToDos
+	at	MENUPAGE.wMenuitems,		dw	6
+iend
+
+g_MenuitemMainMenuExitToDos:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	ExitToDos
+	at	MENUITEM.szName,			dw	g_szItemMainExitToDOS
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoMainExitToDOS
+	at	MENUITEM.szHelp,			dw	g_szNfoMainExitToDOS
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGEBACK
+iend
+
+g_MenuitemMainMenuLoadBiosFromFile:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	LoadBiosFromFile
+	at	MENUITEM.szName,			dw	g_szItemMainLoadFile
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoMainLoadFile
+	at	MENUITEM.szHelp,			dw	g_szNfoMainLoadFile
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_ACTION
+iend
+
+g_MenuitemMainMenuLoadXtideUniversalBiosFromRom:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	LoadXtideUniversalBiosFromRom
+	at	MENUITEM.szName,			dw	g_szItemMainLoadROM
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoMainLoadROM
+	at	MENUITEM.szHelp,			dw	g_szNfoMainLoadROM
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_ACTION
+iend
+
+g_MenuitemMainMenuLoadOldSettingsFromEeprom:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	LoadOldSettingsFromEeprom
+	at	MENUITEM.szName,			dw	g_szItemMainLoadStngs
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoMainLoadStngs
+	at	MENUITEM.szHelp,			dw	g_szNfoMainLoadStngs
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_ACTION
+iend
+
+g_MenuitemMainMenuConfigureXtideUniversalBios:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	ConfigurationMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemMainConfigure
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoMainConfigure
+	at	MENUITEM.szHelp,			dw	g_szNfoMainConfigure
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+g_MenuitemMainMenuFlashEeprom:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	FlashMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemMainFlash
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoMainFlash
+	at	MENUITEM.szHelp,			dw	g_szNfoMainFlash
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGENEXT
+iend
+
+%if FALSE
+g_Menuitem:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	NULL
+	at	MENUITEM.fnFormatValue,		dw	NULL
+	at	MENUITEM.szName,			dw	NULL
+	at	MENUITEM.szQuickInfo,		dw	NULL
+	at	MENUITEM.szHelp,			dw	NULL
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiseToValueLookup,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	NULL
+iend
+%endif
+
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; MainMenu_EnterMenuOrModifyItemVisibility
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except BP
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MainMenu_EnterMenuOrModifyItemVisibility:
+	push	cs
+	pop		ds
+	call	.EnableOrDisableXtideRomItems
+	call	.EnableOrDisableConfigureXtideUniversalBios
+	call	.EnableOrDisableFlashEeprom
+	mov		si, g_MenupageForMainMenu
+	jmp		Menupage_ChangeToNewMenupageInDSSI
+
+;--------------------------------------------------------------------
+; .EnableOrDisableXtideRomItems
+;	Parameters:
+;		DS:		CFGVARS segment
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX, CX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableXtideRomItems:
+	call	EEPROM_FindXtideUniversalBiosROMtoESDI
+	jnc		SHORT .DisableAllRomItems
+	or		BYTE [g_MenuitemMainMenuLoadXtideUniversalBiosFromRom+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	call	Buffers_IsXtideUniversalBiosLoaded
+	jne		SHORT .DisableLoadSettingFromRom
+	or		BYTE [g_MenuitemMainMenuLoadOldSettingsFromEeprom+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableAllRomItems:
+	and		BYTE [g_MenuitemMainMenuLoadXtideUniversalBiosFromRom+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+.DisableLoadSettingFromRom:
+	and		BYTE [g_MenuitemMainMenuLoadOldSettingsFromEeprom+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
+
+;--------------------------------------------------------------------
+; .EnableOrDisableConfigureXtideUniversalBios
+;	Parameters:
+;		DS:		CFGVARS segment
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		CX, SI, DI, ES
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableConfigureXtideUniversalBios:
+	call	Buffers_IsXtideUniversalBiosLoaded
+	jne		SHORT .DisableConfigureXtideUniversalBios
+	or		BYTE [g_MenuitemMainMenuConfigureXtideUniversalBios+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableConfigureXtideUniversalBios:
+	and		BYTE [g_MenuitemMainMenuConfigureXtideUniversalBios+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
+
+;--------------------------------------------------------------------
+; .EnableOrDisableFlashEeprom
+;	Parameters:
+;		DS:		CFGVARS segment
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableFlashEeprom:
+	test	WORD [g_cfgVars+CFGVARS.wFlags], FLG_CFGVARS_FILELOADED | FLG_CFGVARS_ROMLOADED
+	jz		SHORT .DisableFlashEeprom
+	or		BYTE [g_MenuitemMainMenuFlashEeprom+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableFlashEeprom:
+	and		BYTE [g_MenuitemMainMenuFlashEeprom+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
+
+
+
+;--------------------------------------------------------------------
+; MENUITEM activation functions (.fnActivate)
+;	Parameters:
+;		SS:BP:	Ptr to MENU
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except segments
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+ExitToDos:
+	CALL_MENU_LIBRARY Close
+	ret
+
+
+ALIGN JUMP_ALIGN
+LoadBiosFromFile:
+	call	Buffers_SaveChangesIfFileLoaded
+	mov		cx, FILE_DIALOG_IO_size
+	call	Memory_ReserveCXbytesFromStackToDSSI
+	call	Dialogs_DisplayFileDialogWithDialogIoInDSSI
+	cmp		BYTE [si+FILE_DIALOG_IO.bUserCancellation], TRUE
+	je		SHORT .CancelFileLoading
+
+	add		si, BYTE FILE_DIALOG_IO.szFile
+	call	BiosFile_LoadFileFromDSSItoRamBuffer
+	call	MainMenu_EnterMenuOrModifyItemVisibility
+.CancelFileLoading:
+	add		sp, BYTE FILE_DIALOG_IO_size
+	ret
+
+
+ALIGN JUMP_ALIGN
+LoadXtideUniversalBiosFromRom:
+	call	Buffers_SaveChangesIfFileLoaded
+	call	EEPROM_LoadXtideUniversalBiosFromRomToRamBufferAndReturnSizeInDXCX
+	mov		ax, FLG_CFGVARS_ROMLOADED
+	call	Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
+	mov		dx, g_szDlgMainLoadROM
+	jmp		Dialogs_DisplayNotificationFromCSDX
+
+
+ALIGN JUMP_ALIGN
+LoadOldSettingsFromEeprom:
+	call	Buffers_SaveChangesIfFileLoaded
+	call	EEPROM_LoadOldSettingsFromRomToRamBuffer
+	and		WORD [g_cfgVars+CFGVARS.wFlags], ~FLG_CFGVARS_UNSAVED
+	mov		dx, g_szDlgMainLoadStngs
+	jmp		Dialogs_DisplayNotificationFromCSDX
Index: tags/Configurator_for_v1.1.5/Src/Menupages/MasterSlaveMenu.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Menupages/MasterSlaveMenu.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Menupages/MasterSlaveMenu.asm	(revision 72)
@@ -0,0 +1,205 @@
+; File name		:	MasterSlaveMenu.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	3.11.2010
+; Last update	:	18.11.2010
+; Author		:	Tomi Tilli
+; Description	:	"Master/Slave Drive" menu structs and functions.
+
+; Section containing initialized data
+SECTION .data
+
+ALIGN WORD_ALIGN
+g_MenupageForMasterSlaveMenu:
+istruc MENUPAGE
+	at	MENUPAGE.fnEnter,			dw	MasterSlaveMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.fnBack,			dw	IdeControllerMenu_EnterMenuOrModifyItemVisibility
+	at	MENUPAGE.wMenuitems,		dw	6
+iend
+
+g_MenuitemMasterSlaveBackToIdeControllerMenu:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	IdeControllerMenu_EnterMenuOrModifyItemVisibility
+	at	MENUITEM.szName,			dw	g_szItemDrvBackToIde
+	at	MENUITEM.szQuickInfo,		dw	g_szItemDrvBackToIde
+	at	MENUITEM.szHelp,			dw	g_szItemDrvBackToIde
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_PAGEBACK
+iend
+
+g_MenuitemMasterSlaveBlockModeTransfers:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemDrvBlockMode
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoDrvBlockMode
+	at	MENUITEM.szHelp,			dw	g_szHelpDrvBlockMode
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDrvBlockMode
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	FLG_DRVPARAMS_BLOCKMODE
+iend
+
+g_MenuitemMasterSlaveUserCHS:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiseSelectionForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemDrvUserCHS
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoDrvUserCHS
+	at	MENUITEM.szHelp,			dw	g_szHelpDrvUserCHS
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_VISIBLE | FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_FLAGVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOISE
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDrvUserCHS
+	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoise,				dw	g_szMultichoiseBooleanFlag
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForFlagBooleans
+	at	MENUITEM.itemValue + ITEM_VALUE.wValueBitmask,				dw	FLG_DRVPARAMS_USERCHS
+iend
+
+g_MenuitemMasterSlaveCylinders:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemDrvCyls
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoDrvCyls
+	at	MENUITEM.szHelp,			dw	g_szNfoDrvCyls
+	at	MENUITEM.bFlags,			db	NULL
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDrvCyls
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	1
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	16383
+iend
+
+g_MenuitemMasterSlaveHeads:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemDrvHeads
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoDrvHeads
+	at	MENUITEM.szHelp,			dw	g_szNfoDrvHeads
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDrvHeads
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	1
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	16
+iend
+
+g_MenuitemMasterSlaveSectors:
+istruc MENUITEM
+	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateUnsignedInputForMenuitemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteUnsignedValueStringToBufferInESDIfromItemInDSSI
+	at	MENUITEM.szName,			dw	g_szItemDrvSect
+	at	MENUITEM.szQuickInfo,		dw	g_szNfoDrvSect
+	at	MENUITEM.szHelp,			dw	g_szNfoDrvSect
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_BYTEVALUE
+	at	MENUITEM.bType,				db	TYPE_MENUITEM_UNSIGNED
+	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
+	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDrvSect
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	1
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	63
+iend
+
+
+; Section containing code
+SECTION .text
+
+;--------------------------------------------------------------------
+; MasterSlaveMenu_InitializeToDrvparamsOffsetInBX
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MasterSlaveMenu_InitializeToDrvparamsOffsetInBX:
+	lea		ax, [bx+DRVPARAMS.wFlags]
+	mov		[cs:g_MenuitemMasterSlaveBlockModeTransfers+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	mov		[cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+DRVPARAMS.wCylinders]
+	mov		[cs:g_MenuitemMasterSlaveCylinders+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+DRVPARAMS.bHeads]
+	mov		[cs:g_MenuitemMasterSlaveHeads+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+
+	lea		ax, [bx+DRVPARAMS.bSect]
+	mov		[cs:g_MenuitemMasterSlaveSectors+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+	ret
+
+
+;--------------------------------------------------------------------
+; MasterSlaveMenu_EnterMenuOrModifyItemVisibility
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		All, except BP
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+MasterSlaveMenu_EnterMenuOrModifyItemVisibility:
+	push	cs
+	pop		ds
+	call	.EnableOrDisableCHandS
+	mov		si, g_MenupageForMasterSlaveMenu
+	jmp		Menupage_ChangeToNewMenupageInDSSI
+
+;--------------------------------------------------------------------
+; .EnableOrDisableCHandS
+;	Parameters:
+;		SS:BP:	Menu handle
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		AX, BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableOrDisableCHandS:
+	mov		bx, [cs:g_MenuitemMasterSlaveUserCHS+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	test	ax, FLG_DRVPARAMS_USERCHS
+	jz		SHORT .DisableCHandS
+
+	mov		bx, g_MenuitemMasterSlaveCylinders
+	call	.EnableMenuitemFromCSBX
+	mov		bx, g_MenuitemMasterSlaveHeads
+	call	.EnableMenuitemFromCSBX
+	mov		bx, g_MenuitemMasterSlaveSectors
+	call	.EnableMenuitemFromCSBX
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableCHandS:
+	mov		bx, g_MenuitemMasterSlaveCylinders
+	call	.DisableMenuitemFromCSBX
+	mov		bx, g_MenuitemMasterSlaveHeads
+	call	.DisableMenuitemFromCSBX
+	mov		bx, g_MenuitemMasterSlaveSectors
+	call	.DisableMenuitemFromCSBX
+	ret
+
+;--------------------------------------------------------------------
+; .EnableMenuitemFromCSBX
+; .DisableMenuitemFromCSBX
+;	Parameters:
+;		CS:BX:	Ptr to MENUITEM
+;	Returns:
+;		Nothing
+;	Corrupts registers:
+;		Nothing
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+.EnableMenuitemFromCSBX:
+	or		BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	ret
+
+ALIGN JUMP_ALIGN
+.DisableMenuitemFromCSBX:
+	and		BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+	ret
Index: tags/Configurator_for_v1.1.5/Src/Strings.asm
===================================================================
--- tags/Configurator_for_v1.1.5/Src/Strings.asm	(revision 72)
+++ tags/Configurator_for_v1.1.5/Src/Strings.asm	(revision 72)
@@ -0,0 +1,296 @@
+; File name		:	Strings.asm
+; Project name	:	XTIDE Universal BIOS Configurator v2
+; Created date	:	5.10.2010
+; Last update	:	9.12.2010
+; Author		:	Tomi Tilli
+; Description	:	All strings.
+
+
+; Section containing initialized data
+SECTION .data
+
+; Menu title
+g_szProgramTitle:
+	db	"Configuration and Flashing program for XTIDE Universal BIOS v1.1.5.",LF,CR,NULL
+g_szXtideUniversalBiosSignature:	db	"XTIDE110",NULL
+g_szBiosIsNotLoaded:				db	"BIOS is not loaded!",NULL
+g_szEEPROM:							db	"EEPROM",NULL
+g_szSourceAndTypeSeparator:			db	" : ",NULL
+g_szUnidentified:					db	"Unidentified",NULL
+g_szUnsaved:						db	" ",SINGLE_LEFT_HORIZONTAL_TO_VERTICAL,
+									db	"Unsaved",SINGLE_RIGHT_HORIZONTAL_TO_VERTICAL, NULL
+									
+; Item formatting
+g_szFormatItemWithoutValue:			db	"%c%s",NULL
+g_szFormatItemNameWithValue:		db	"%25s%-10S",NULL
+
+
+g_szNo:								db	"No",NULL
+g_szYes:							db	"Yes",NULL
+g_szMultichoiseBooleanFlag:
+									db	"No",LF
+									db	"Yes",NULL
+
+; Exit messages
+g_szDlgExitToDos:		db	"Exit to DOS?",NULL
+g_szDlgSaveChanges:		db	"Do you want to save changes to XTIDE Universal BIOS image file?",NULL
+
+
+; Generic dialog strings
+g_szNotificationDialog:	db	"Notification.",NULL
+g_szErrorDialog:		db	"Error!",NULL
+g_szGenericDialogInfo:	db	"Press ENTER or ESC to close dialog.",NULL
+
+; Flashing related strings
+g_szErrEepromTooSmall:	db	"Image is too large for selected EEPROM type!",NULL
+g_szErrEepromPolling:	db	"Timeout when polling EEPROM.",LF
+						db	"EEPROM was not flashed properly!",NULL
+g_szErrEepromVerify:	db	"EEPROM did not return the same byte that was written.",LF
+						db	"EEPROM was not flashed properly!",NULL
+g_szPCFlashSuccessfull:	db	"EEPROM was written successfully.",LF
+						db	"Press any key to reboot.",NULL
+g_szForeignFlash:		db	"EEPROM was written successfully.",NULL
+
+
+; Strings for main menu
+g_szItemMainExitToDOS:	db	"Exit to DOS",NULL
+g_szItemMainLoadFile:	db	"Load BIOS from file",NULL
+g_szItemMainLoadROM:	db	"Load BIOS from EEPROM",NULL
+g_szItemMainLoadStngs:	db	"Load old settings from EEPROM",NULL
+g_szItemMainConfigure:	db	"Configure XTIDE Universal BIOS",NULL
+g_szItemMainFlash:		db	"Flash EEPROM",NULL
+
+g_szDlgMainLoadROM:		db	"Successfully loaded XTIDE Universal BIOS from EEPROM.",NULL
+g_szDlgMainLoadStngs:	db	"Successfully loaded settings from EEPROM.",NULL
+g_szDlgMainLoadFile:	db	"Successfully loaded file for flashing.",NULL
+g_szDlgMainSaveFile:	db	"Successfully saved XTIDE Universal BIOS to file.",NULL
+g_szDlgMainFileTooBig:	db	"Selected file is too big to be loaded for flashing!",NULL
+g_szDlgMainLoadErr:		db	"Failed to load file!",NULL
+g_szDlgMainSaveErr:		db	"Failed to save file!",NULL
+g_szDlgFileTitle:		db	"Select file to be flashed.",NULL
+g_szDlgFileFilter:		db	"*.*",NULL
+
+g_szNfoMainExitToDOS:	db	"Quits XTIDE Universal BIOS Configurator.",NULL
+g_szNfoMainLoadFile:	db	"Load BIOS file to be configured or flashed.",NULL
+g_szNfoMainLoadROM:		db	"Load BIOS from EEPROM to be reconfigured.",NULL
+g_szNfoMainLoadStngs:	db	"Load old XTIDE Universal BIOS settings from EEPROM.",NULL
+g_szNfoMainConfigure:	db	"Configure XTIDE Universal BIOS settings.",NULL
+g_szNfoMainFlash:		db	"Flash loaded BIOS image to EEPROM.",NULL
+
+
+; Strings for XTIDE Universal BIOS configuration menu
+g_szItemCfgBackToMain:	db	"Back to Main Menu",NULL
+g_szItemCfgIde1:		db	"Primary IDE Controller",NULL
+g_szItemCfgIde2:		db	"Secondary IDE Controller",NULL
+g_szItemCfgIde3:		db	"Tertiary IDE Controller",NULL
+g_szItemCfgIde4:		db	"Quaternary IDE Controller",NULL
+g_szItemCfgIde5:		db	"Quinary IDE Controller",NULL
+g_szItemCfgBootMenu:	db	"Boot menu settings",NULL
+g_szItemCfgBootLoader:	db	"Boot loader type",NULL
+g_szItemCfgFullMode:	db	"Full operating mode",NULL
+g_szItemCfgStealSize:	db	"kiB to steal from RAM",NULL
+g_szItemCfgIdeCnt:		db	"IDE controllers",NULL
+
+g_szDlgCfgFullMode:		db	"Enable full operating mode?",NULL
+g_szDlgCfgStealSize:	db	"How many kiB of base memory to steal for XTIDE Universal BIOS variables (1...255)?",NULL
+g_szDlgCfgIdeCnt:		db	"How many IDE controllers to manage (1...5)?",NULL
+
+g_szNfoCfgIde:			db	"IDE controller and drive configuration.",NULL
+g_szNfoCfgBootMenu:		db	"Boot menu configuration.",NULL
+g_szNfoCfgBootLoader:	db	"Boot loader selection for INT 19h.",NULL
+g_szNfoCfgFullMode:		db	"Full mode supports multiple controllers and has more features.",NULL
+g_szNfoCfgStealSize:	db	"How many kiB's to steal from Conventional memory for XTIDE Universal BIOS variables.",NULL
+g_szNfoCfgIdeCnt:		db	"Number of IDE controllers to manage.",NULL
+
+g_szHelpCfgFullMode:	incbin	"Configuration_FullMode.txt"
+						db	NULL
+g_szHelpCfgStealSize:	incbin	"Configuration_StealSize.txt"
+						db	NULL
+
+g_szMultichoiseCfgBootLoader:
+						db	"Boot menu",LF
+						db	"Drive A then C",LF
+						db	"System boot loader",NULL
+
+g_szValueCfgBootLoaderMenu:		db	"Menu",NULL
+g_szValueCfgBootLoaderAthenC:	db	"A, C",NULL
+g_szValueCfgBootLoaderSystem:	db	"System",NULL
+
+
+; Strings for IDE Controller menu
+g_szItemBackToCfgMenu:	db	"Back to Configuration Menu",NULL
+g_szItemIdeMaster:		db	"Master Drive",NULL
+g_szItemIdeSlave:		db	"Slave Drive",NULL
+g_szItemIdeBusType:		db	"Bus type",NULL
+g_szItemIdeCmdPort:		db	"Base (cmd block) address",NULL
+g_szItemIdeCtrlPort:	db	"Control block address",NULL
+g_szItemIdeEnIRQ:		db	"Enable interrupt",NULL
+g_szItemIdeIRQ:			db	"IRQ",NULL
+
+g_szDlgBusType:			db	"Select type of bus where Ide Controller is connected.",NULL
+g_szDlgIdeCmdPort:		db	"Enter IDE command block (base port) address.",NULL
+g_szDlgIdeCtrlPort:		db	"Enter IDE control block address (usually command block + 200h).",NULL
+g_szDlgIdeEnIRQ:		db	"Enable interrupt?",NULL
+g_szDlgIdeIRQ:			db	"Enter IRQ channel (2...7 for 8-bit controllers, 2...15 for any other controller).",NULL
+
+g_szNfoIdeBackToCfgMenu:db	"Back to XTIDE Universal BIOS Configuration Menu.",NULL
+g_szNfoIdeMaster:		db	"Settings for Master Drive.",NULL
+g_szNfoIdeSlave:		db	"Settings for Slave Drive.",NULL
+g_szNfoIdeBusType:		db	"Select controller bus type.",NULL
+g_szNfoIdeCmdPort:		db	"IDE Controller Command Block (base port) address.",NULL
+g_szNfoIdeCtrlPort:		db	"IDE Controller Control Block address. Usually Cmd Block + 200h.",NULL
+g_szNfoIdeEnIRQ:		db	"Interrupt or polling mode.",NULL
+g_szNfoIdeIRQ:			db	"IRQ channel to use.",NULL
+
+g_szHelpIdeCmdPort:		incbin	"IDE_CommandPort.txt"
+						db	NULL
+g_szHelpIdeCtrlPort:	incbin	"IDE_ControlPort.txt"
+						db	NULL
+g_szHelpIdeEnIRQ:		incbin	"IDE_EnableInterrupt.txt"
+						db	NULL
+g_szHelpIdeIRQ:			incbin	"IDE_IRQ.txt"
+						db	NULL
+
+g_szMultichoiseCfgBusType:
+						db	"8-bit dual port (XTIDE)",LF
+						db	"8-bit single port",LF
+						db	"16-bit",LF
+						db	"32-bit generic",NULL
+
+g_szValueCfgBusTypeDual8b:		db	"2x8-bit",NULL
+g_szValueCfgBusTypeSingle8b:	db	"1x8-bit",NULL
+g_szValueCfgBusType16b:			db	"16-bit",NULL
+g_szValueCfgBusType32b:			db	"32-bit",NULL
+
+
+; Strings for DRVPARAMS menu
+g_szItemDrvBackToIde:	db	"Back to IDE Controller Menu",NULL
+g_szItemDrvBlockMode:	db	"Block Mode Transfers",NULL
+g_szItemDrvUserCHS:		db	"User specified CHS",NULL
+g_szItemDrvCyls:		db	"Cylinders",NULL
+g_szItemDrvHeads:		db	"Heads",NULL
+g_szItemDrvSect:		db	"Sectors per track",NULL
+
+g_szDlgDrvBlockMode:	db	"Enable Block Mode Transfers?",NULL
+g_szDlgDrvUserCHS:		db	"Specify (P-)CHS parameters manually?",NULL
+g_szDlgDrvCyls:			db	"Enter number of P-CHS cylinders (1...16383).",NULL
+g_szDlgDrvHeads:		db	"Enter number of P-CHS heads (1...16).",NULL
+g_szDlgDrvSect:			db	"Enter number of sectors per track (1...63).",NULL
+
+g_szNfoDrvBlockMode:	db	"Transfer multiple sectors per data request.",NULL
+g_szNfoDrvUserCHS:		db	"Specify (P-)CHS parameters manually instead of autodetecting them.",NULL
+g_szNfoDrvCyls:			db	"Number of user specified P-CHS cylinders.",NULL
+g_szNfoDrvHeads:		db	"Number of user specified P-CHS heads.",NULL
+g_szNfoDrvSect:			db	"Number of user specified P-CHS sectors per track.",NULL
+
+g_szHelpDrvBlockMode:	incbin	"Drive_BlockMode.txt"
+						db	NULL
+g_szHelpDrvUserCHS:		incbin	"Drive_UserCHS.txt"
+						db	NULL
+
+
+; Strings for boot menu settings menu
+g_szItemBootTimeout:	db	"Selection timeout",NULL
+g_szItemBootDrive:		db	"Default boot drive",NULL
+g_szItemBootFloppyDrvs:	db	"Number of Floppy Drives",NULL
+g_szItemBootSwap:		db	"Swap boot drive numbers",NULL
+g_szItemBootRomBoot:	db	"Display ROM boot",NULL
+
+g_szDlgBootTimeout:		db	"Enter Boot Menu selection timeout in seconds (1...60, 0 disables timeout).",NULL
+g_szDlgBootDrive:		db	"Enter default drive number (0xh for Floppy Drives, 8xh for Hard Disks, FFh for ROM boot).",NULL
+g_szDlgBootFloppyDrvs:	db	"Enter number of Floppy Drives to display on boot menu.",NULL
+g_szDlgBootSwap:		db	"Enable drive number translation?",NULL
+g_szDlgBootRomBoot:		db	"Show ROM Boot option on boot menu?",NULL
+
+g_szNfoBootTimeout:		db	"Menu item selection timeout in seconds.",NULL
+g_szNfoBootDrive:		db	"Default drive on boot menu.",NULL
+g_szNfoBootFloppyDrvs:	db	"Number of Floppy Drives to display on boot menu.",NULL
+g_szNfoBootSwap:		db	"Drive Number Translation (swap first drive with selected).",NULL
+g_szNfoBootRomBoot:		db	"Show ROM Basic or ROM DOS boot option.",NULL
+
+g_szHelpBootTimeout:	incbin	"Bootmenu_Timeout.txt"
+						db	NULL
+g_szHelpBootDrive:		incbin	"Bootmenu_DefaultDrive.txt"
+						db	NULL
+g_szHelpBootFloppyDrvs:	incbin	"Bootmenu_FloppyDrives.txt"
+						db	NULL
+g_szHelpBootSwap:		incbin	"Bootmenu_SwapDrives.txt"
+						db	NULL
+g_szHelpBootRomBoot:	incbin	"Bootmenu_RomBoot.txt"
+						db	NULL
+
+g_szMultichoiseBootFloppyDrvs:
+						db	"Autodetect",LF
+						db	"1",LF
+						db	"2",LF
+						db	"3",LF
+						db	"4",NULL
+
+g_szValueBootFloppyDrvsAuto:	db	"Auto",NULL
+g_szValueBootFloppyDrvs1:		db	"1",NULL
+g_szValueBootFloppyDrvs2:		db	"2",NULL
+g_szValueBootFloppyDrvs3:		db	"3",NULL
+g_szValueBootFloppyDrvs4:		db	"4",NULL
+
+
+; Strings for Flash menu
+g_szItemFlashStart:		db	"Start flashing",NULL
+g_szItemFlashEepromType:db	"EEPROM type",NULL
+g_szItemFlashSDP:		db	"SDP command",NULL
+g_szItemFlashAddr:		db	"EEPROM address",NULL
+g_szItemFlashPageSize:	db	"Page size",NULL
+g_szItemFlashChecksum:	db	"Generate checksum byte",NULL
+
+g_szDlgFlashEepromType:	db	"Select EEPROM type.",NULL
+g_szDlgFlashSDP:		db	"Select Software Data Protection command.",NULL
+g_szDlgFlashAddr:		db	"Enter segment address where EEPROM is located.",NULL
+g_szDlgFlashPageSize:	db	"Select write page size.",NULL
+g_szDlgFlashChecksum:	db	"Generate checksum byte to the end of BIOS image?",NULL
+
+g_szNfoFlashEepromType:	db	"EEPROM type.",NULL
+g_szNfoFlashStart:		db	"Writes BIOS to EEPROM.",NULL
+g_szNfoFlashSDP:		db	"Software Data Protection command.",NULL
+g_szNfoFlashAddr:		db	"Address (segment) where EEPROM is located.",NULL
+g_szNfoFlashPageSize:	db	"Number of bytes to write before delay.",NULL
+g_szNfoFlashChecksum:	db	"Generate checksum byte to the end of BIOS image.",NULL
+
+g_szHelpFlashSDP:		incbin	"Flash_SdpCommand.txt"
+						db	NULL
+g_szHelpFlashPageSize:	incbin	"Flash_PageSize.txt"
+						db	NULL
+g_szHelpFlashChecksum:	incbin	"Flash_Checksum.txt"
+						db	NULL
+
+g_szMultichoiseEepromType:
+						db	"2816 (2 kiB)",LF
+						db	"2864 (8 kiB)",LF
+						db	"28256 (32 kiB)",LF
+						db	"28512 (64 kiB)",NULL
+g_szValueFlash2816:		db	"2816",NULL
+g_szValueFlash2864:		db	"2864",NULL
+g_szValueFlash28256:	db	"28256",NULL
+g_szValueFlash28512:	db	"28512",NULL
+
+g_szMultichoiseSdpCommand:
+						db	"None",LF
+						db	"Enable",LF
+						db	"Disable",NULL
+g_szValueFlashNone:		db	"None",NULL
+g_szValueFlashEnable:	db	"Enable",NULL
+g_szValueFlashDisable:	db	"Disable",NULL
+
+g_szMultichoisePageSize:
+						db	"1 byte",LF
+						db	"2 bytes",LF
+						db	"4 bytes",LF
+						db	"8 bytes",LF
+						db	"16 bytes",LF
+						db	"32 bytes",LF
+						db	"64 bytes",NULL
+g_szValueFlash1byte:	db	"1 byte",NULL
+g_szValueFlash2bytes:	db	"2 bytes",NULL
+g_szValueFlash4bytes:	db	"4 bytes",NULL
+g_szValueFlash8bytes:	db	"8 bytes",NULL
+g_szValueFlash16bytes:	db	"16 bytes",NULL
+g_szValueFlash32bytes:	db	"32 bytes",NULL
+g_szValueFlash64bytes:	db	"64 bytes",NULL
Index: tags/Configurator_for_v1.1.5/gpl-2.0.txt
===================================================================
--- tags/Configurator_for_v1.1.5/gpl-2.0.txt	(revision 72)
+++ tags/Configurator_for_v1.1.5/gpl-2.0.txt	(revision 72)
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Index: tags/Configurator_for_v1.1.5/makefile
===================================================================
--- tags/Configurator_for_v1.1.5/makefile	(revision 72)
+++ tags/Configurator_for_v1.1.5/makefile	(revision 72)
@@ -0,0 +1,134 @@
+###############################################################################
+# Generic makefile for building binary files.                                 #
+# v. 1.1.0 (28.7.2007 ... 5.10.2010)                                          #
+# (C) Tomi Tilli                                                              #
+# aitotat@gmail.com                                                           #
+#                                                                             #
+# Valid makefile targets are:                                                 #
+# all		Removes existing files and builds binary file in \Build           #
+# build		Builds binary file in \Build                                      #
+# clean		Removes all files from \Build                                     #
+#                                                                             #
+# Build directory must be created manually if it does not exist.              #
+#                                                                             #
+###############################################################################
+
+###########################################
+# Source files and destination executable #
+###########################################
+
+# Assembly source code file (*.asm):
+SRC_ASM = Src/Main.asm
+
+# Program executable file name without extension:
+PROG = xtidecfg
+EXTENSION = com
+
+
+#######################################
+# Destination and include directories #
+#######################################
+
+# Directory where binary file will be compiled to
+BUILD_DIR = Build
+
+# Subdirectories where included files are:
+HEADERS = Inc/
+HEADERS += Inc/Help/
+HEADERS += Src/
+HEADERS += Src/Menupages/
+
+# Subdirectories where library files are:
+LIBS = ../Assembly_Library/Inc/
+LIBS += ../Assembly_Library/Src/
+LIBS += ../Assembly_Library/Src/Display/
+LIBS += ../Assembly_Library/Src/File/
+LIBS += ../Assembly_Library/Src/Keyboard/
+LIBS += ../Assembly_Library/Src/Menu/
+LIBS += ../Assembly_Library/Src/Menu/Dialog/
+LIBS += ../Assembly_Library/Src/String/
+LIBS += ../Assembly_Library/Src/Time/
+LIBS += ../Assembly_Library/Src/Util/
+LIBS += ../XTIDE_Universal_BIOS/Inc/
+HEADERS += $(LIBS)
+
+
+
+#################################################################
+# Assembler preprocessor defines.                               #
+#################################################################
+DEFINES = 
+DEFINES_XT = ELIMINATE_CGA_SNOW
+DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW
+DEFINES_AT = USE_186 USE_286 USE_AT
+
+
+###################
+# Other variables #
+###################
+
+# Add -D in front of every preprocessor define declaration
+DEFS = $(DEFINES:%=-D%)
+DEFS_XT = $(DEFINES_XT:%=-D%)
+DEFS_XTPLUS = $(DEFINES_XTPLUS:%=-D%)
+DEFS_AT = $(DEFINES_AT:%=-D%)
+
+# Add -I in front of all header directories
+IHEADERS = $(HEADERS:%=-I%)
+
+# Path + target file to be build
+TARGET = $(BUILD_DIR)/$(PROG)
+
+
+#########################
+# Compilers and linkers #
+#########################
+
+# Make
+MAKE = mingw32-make.exe
+
+# Assembler
+AS = yasm.exe
+#AS = nasm.exe
+
+# use this command to erase files.
+RM = -del /Q
+
+
+#############################
+# Compiler and linker flags #
+#############################
+
+# 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
+ASFLAGS += -O9					# Optimize operands to their shortest forms
+
+
+############################################
+# Build process. Actual work is done here. #
+############################################
+
+.PHONY: all at xtplus xt clean
+
+# Make clean debug and release versions
+all: clean xt
+	@echo All build!
+
+at:
+	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_AT) -o"$(TARGET)_at.$(EXTENSION)"
+	@echo AT version "$(TARGET)_at.$(EXTENSION)" build.
+
+xtplus:
+	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XTPLUS) -o"$(TARGET)_xtp.$(EXTENSION)"
+	@echo XT plus version "$(TARGET)_xtp.$(EXTENSION)" build.
+
+xt:
+	@$(AS) "$(SRC_ASM)" $(ASFLAGS) $(DEFS_XT) -o"$(TARGET).$(EXTENSION)"
+	@echo XT version "$(TARGET).$(EXTENSION)" build.
+
+clean:
+	@$(RM) $(BUILD_DIR)\*.*
+	@echo Deleted "(*.*)" from "$(BUILD_DIR)/"
