Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm	(revision 114)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm	(revision 118)
@@ -158,6 +158,7 @@
 	call	Buffers_GetFileBufferToESDI
 	call	Registers_CopyESDItoDSSI
+	mov		ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	call	EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX
 	xor		dx, dx
-	mov		cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
 	shl		cx, 1
 	rcl		dx, 1			; WORDs to BYTEs
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm	(revision 114)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm	(revision 118)
@@ -176,5 +176,6 @@
 
 	call	Buffers_GetFileBufferToESDI
-	mov		cx, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	mov		ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords]
+	call	EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX
 	shl		cx, 1			; Words to bytes
 	dec		cx				; Leave space for checksum byte
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm	(revision 114)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm	(revision 118)
@@ -1,6 +1,3 @@
-; 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.
@@ -31,4 +28,35 @@
 
 ;--------------------------------------------------------------------
+; EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX
+;	Parameters:
+;		AX:		Image size in WORDs
+;	Returns:
+;		CX:		Required EEPROM size in WORDs
+;		CF:		Set if EEPROM size found
+;				Cleared if no valid EEPROM found
+;	Corrupts registers:
+;		BX
+;--------------------------------------------------------------------
+ALIGN JUMP_ALIGN
+EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX:
+	mov		bx, g_rgwEepromTypeToSizeInWords
+	mov		cx, NUMBER_OF_EEPROM_TYPES
+ALIGN JUMP_ALIGN
+.CheckNextEepromSize:
+	cmp		ax, [cs:bx]
+	jbe		SHORT .ReturnEepromSizeInAX
+	inc		bx
+	inc		bx
+	loop	.CheckNextEepromSize
+	clc		; None of the supported EEPROMs are large enough
+	ret
+ALIGN JUMP_ALIGN
+.ReturnEepromSizeInAX:
+	mov		cx, [cs:bx]
+	stc
+	ret
+
+
+;--------------------------------------------------------------------
 ; EEPROM_LoadXtideUniversalBiosFromRomToRamBufferAndReturnSizeInDXCX
 ;	Parameters:
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm	(revision 114)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/FlashMenu.asm	(revision 118)
@@ -206,5 +206,5 @@
 ;		SS:BP:	Ptr to MENU
 ;	Returns:
-;		Nothing
+;		CF:		Set if EEPROM too small
 ;	Corrupts registers:
 ;		AX, BX, DX
@@ -386,4 +386,6 @@
 .RebootComputer:
 .ResetAT:
+	LOAD_BDA_SEGMENT_TO ds, ax
+	mov		[BDA.wBoot], ax			; Make sure soft reset flag is not set
 	mov		al, 0FEh				; System reset (AT+ keyboard controller)
 	out		64h, al					; Reset computer (AT+)
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm	(revision 114)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/MainMenu.asm	(revision 118)
@@ -205,5 +205,6 @@
 	call	Buffers_NewBiosWithSizeInDXCXandSourceInAXhasBeenLoadedForConfiguration
 	mov		dx, g_szDlgMainLoadROM
-	jmp		Dialogs_DisplayNotificationFromCSDX
+	call	Dialogs_DisplayNotificationFromCSDX
+	jmp		MainMenu_EnterMenuOrModifyItemVisibility
 
 
