Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialBaud.txt
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialBaud.txt	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialBaud.txt	(revision 233)
@@ -1,1 +1,1 @@
-Supported baud rates are 2400, 9600, 38.4K, and 115.2K. The server must also be set to this same speed. Older UARTs may only support 2400 and 9600 baud, but sometimes can be pushed to 38.4K. 115.2K will likely only be possible with a newer UART that inclues a FIFO. Some high speed serial ports include UART clock multipliers, allowing for speeds at 230.4K (2x multiplier) and 460.8K (4x multiplier). These high speeds are supported by these BIOS, even on original 4.77MHz 8088 systems. Note that UART clock multipliers are not detectable by the software and 115.2K will still be used during configuration for high speeds; but if a multiplier is used, the actual speed (including the multiplier) will need to be used on the server.
+Supported baud rates are 2400, 4800, 9600, 19.2K, 28.8K, 38.4K, 57.6K, and 115.2K. The server must also be set to this same speed. Older UARTs may only support up to 9600 baud, but sometimes can be pushed to 38.4K. 115.2K will likely only be possible with a newer UART that inclues a FIFO. Some high speed serial ports include UART clock multipliers, allowing for speeds at 230.4K (2x multiplier) and 460.8K (4x multiplier) above 115.2K. These high speeds are supported by these BIOS, even on original 4.77MHz 8088 systems. Note that UART clock multipliers are not detectable by the software and 115.2K will still be used during configuration for high speeds; but if a multiplier is used, the actual speed (including the multiplier) will need to be used by the server.
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialCOM.txt
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialCOM.txt	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialCOM.txt	(revision 233)
@@ -1,1 +1,1 @@
-Select a serial port by COM port number. COM1 through COM4 have well established I/O port assignments, COM5 and onward are less well established. "COMA" represents COM10, "COMB" represents COM11, and "COMC" represents COM12. Selecting COMx enables the manual selection of an I/O port address.
+Select a serial port by COM port number. COM1 through COM4 have well established I/O port assignments, COM5 and onward are less well established. "COMA" represents COM10, "COMB" represents COM11, and "COMC" represents COM12. Selecting "COMx" enables the manual selection of an I/O port address.
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialPort.txt
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialPort.txt	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/Help/IDE_SerialPort.txt	(revision 233)
@@ -1,1 +1,1 @@
-Select a serial port by I/O address. Supported values are between 240h and 430h, and must be on an 8-byte boundary. If the entered value corresponds to one of the established COM port numbers, then the selection of serial port will use COM numbers instead.
+Select a serial port by I/O address. Any port address is supported up to 3f8h, but must be on an 8-byte boundary. If the entered value corresponds to one of the established COM port numbers, then the selection will snap to that COM port and "COMx" must be selected again for custom I/O address entry.
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Inc/MenuStructs.inc	(revision 233)
@@ -30,4 +30,6 @@
 FLG_MENUITEM_BYTEVALUE		EQU	(1<<3)	; Item value is single byte
 FLG_MENUITEM_PROGRAMVAR		EQU	(1<<4)	; Item is for configuring program, not BIOS
+FLG_MENUITEM_CHOICESTRINGS  EQU (1<<5)  ; ChoiceToStringLookup table is 1-1 with ChoiceToValueLookup table, 
+										; ChoiceToStringLookup table must also NULL terminated
 
 ; Values for MENUITEM.bType
@@ -47,4 +49,5 @@
 	.rgwChoiceToValueLookup	resb	2	; Ptr to lookup table for translating selected choice to actual value
 	.rgszValueToStringLookup:			; Ptr to lookup table for translating value to string
+	.rgszChoiceToStringLookup:
 	.wMinValue				resb	2	; Minimum allowed integer value
 	.wMaxValue:
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menuitem.asm	(revision 233)
@@ -289,4 +289,10 @@
 	mov		ax, [es:di]
 
+	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE
+	jz		SHORT .NoConvertWordToByteValue
+	xor		ah, ah				; conversion needs to happen before call to the reader,
+								; in case the reader unpacks the byte to a word
+		
+.NoConvertWordToByteValue:
 	mov		bx, [si+MENUITEM.itemValue+ITEM_VALUE.fnValueReader]
 	test	bx,bx
@@ -300,6 +306,4 @@
 	pop		es
 
-	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_BYTEVALUE
-	jnz		SHORT .ConvertWordToByteValue
 	test	BYTE [si+MENUITEM.bFlags], FLG_MENUITEM_FLAGVALUE
 	jz		SHORT .Return
@@ -309,7 +313,5 @@
 	jnz		SHORT .Return
 	xor		ax, ax
-ALIGN JUMP_ALIGN
-.ConvertWordToByteValue:
-	xor		ah, ah
+
 ALIGN JUMP_ALIGN, ret
 .Return:
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/MenuitemPrint.asm	(revision 233)
@@ -156,4 +156,5 @@
 ALIGN JUMP_ALIGN
 MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI:
+MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI:
 	call	Menuitem_GetValueToAXfromMenuitemInDSSI
 	; Fall to PrintLookupValueFromAXtoBufferInESDI
@@ -173,11 +174,42 @@
 PrintLookupValueFromAXtoBufferInESDI:
 	push	si
+	test	byte [si+MENUITEM.bFlags], FLG_MENUITEM_CHOICESTRINGS
+	jnz		.lookupChoice	
+		
 	add		ax, [si+MENUITEM.itemValue+ITEM_VALUE.rgszValueToStringLookup]
 	xchg	bx, ax
+.found:	
 	mov		si, [bx]
+.errorReturn:
 	call	String_CopyDSSItoESDIandGetLengthToCX
 	pop		si
 	ret
 
+;
+; With FLG_MENUITEM_CHOICESTRINGS, the array at .rgszChoiceToStringLookup is based on the 
+; Choice number (offset within .rgwChoiceToValueLookup) instead of the value stored.
+; Here, we scan the .rgwChoiceToValueLookup array until we find the value there, and then
+; use the same offset in .rgszChoiceToStringLookup.  If we don't find the value, we 
+; return an "Error!" string instead.  
+;
+; Note that the pointer array at .rgszChoiceToStringLookup must be NULL terminated.  Since the
+; value could be zero, we don't use the .rgwChoiceToValueLookup array to find the end.
+;
+.lookupChoice:
+	mov		bx,[si+MENUITEM.itemValue+ITEM_VALUE.rgszChoiceToStringLookup]		
+	mov		si,[si+MENUITEM.itemValue+ITEM_VALUE.rgwChoiceToValueLookup]
+		
+.wordLoop:
+	cmp		ax,[si]
+	jz		.found
+	inc		si
+	inc		si
+	inc		bx
+	inc		bx
+	cmp		word [bx],0
+	jnz		.wordLoop
+
+	mov		si,g_szValueUnknownError
+	jmp		.errorReturn
 
 ;--------------------------------------------------------------------
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Menupages/IdeControllerMenu.asm	(revision 233)
@@ -46,5 +46,5 @@
 istruc MENUITEM
 	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
-	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromShiftedItemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI
 	at	MENUITEM.szName,			dw	g_szItemIdeDevice
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeDevice
@@ -93,16 +93,15 @@
 istruc MENUITEM
 	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
-	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI
 	at	MENUITEM.szName,			dw	g_szItemSerialCOM
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeSerialCOM
 	at	MENUITEM.szHelp,			dw	g_szHelpIdeSerialCOM
-	at	MENUITEM.bFlags,			db	FLG_MENUITEM_MODIFY_MENU
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_CHOICESTRINGS
 	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOICE 
 	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
 	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDevice
 	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoice,				dw	g_szSerialCOMChoice
-	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup,		dw	NULL
-	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForCOM
-	at	MENUITEM.itemValue + ITEM_VALUE.fnValueReader,				dw	IdeControllerMenu_SerialReadCOM  
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup,		dw	g_rgbChoiceToValueLookupForCOM
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup,	dw	g_rgszChoiceToStringLookupForCOM
 	at	MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,				dw	IdeControllerMenu_SerialWriteCOM
 iend
@@ -115,10 +114,10 @@
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeSerialPort
 	at	MENUITEM.szHelp,			dw	g_szHelpIdeSerialPort
-	at	MENUITEM.bFlags,			db	FLG_MENUITEM_MODIFY_MENU		
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_MODIFY_MENU | FLG_MENUITEM_BYTEVALUE
 	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	DEVICE_SERIAL_PACKEDPORTANDBAUD_MINPORT
-	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	DEVICE_SERIAL_PACKEDPORTANDBAUD_MAXPORT
+	at	MENUITEM.itemValue + ITEM_VALUE.wMinValue,					dw	8h
+	at	MENUITEM.itemValue + ITEM_VALUE.wMaxValue,					dw	3f8h
 	at	MENUITEM.itemValue + ITEM_VALUE.fnValueReader,				dw	IdeControllerMenu_SerialReadPort
 	at	MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,				dw	IdeControllerMenu_SerialWritePort
@@ -128,16 +127,15 @@
 istruc MENUITEM
 	at	MENUITEM.fnActivate,		dw	Menuitem_ActivateMultichoiceSelectionForMenuitemInDSSI
-	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromUnshiftedItemInDSSI
+	at	MENUITEM.fnFormatValue,		dw	MenuitemPrint_WriteLookupValueStringToBufferInESDIfromRawItemInDSSI
 	at	MENUITEM.szName,			dw	g_szItemSerialBaud
 	at	MENUITEM.szQuickInfo,		dw	g_szNfoIdeSerialBaud
 	at	MENUITEM.szHelp,			dw	g_szHelpIdeSerialBaud
+	at	MENUITEM.bFlags,			db	FLG_MENUITEM_BYTEVALUE | FLG_MENUITEM_CHOICESTRINGS
 	at	MENUITEM.bType,				db	TYPE_MENUITEM_MULTICHOICE
 	at	MENUITEM.itemValue + ITEM_VALUE.wRomvarsValueOffset,		dw	NULL
 	at	MENUITEM.itemValue + ITEM_VALUE.szDialogTitle,				dw	g_szDlgDevice
 	at	MENUITEM.itemValue + ITEM_VALUE.szMultichoice,				dw	g_szSerialBaudChoice
-	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup,		dw	NULL
-	at	MENUITEM.itemValue + ITEM_VALUE.rgszValueToStringLookup,	dw	g_rgszValueToStringLookupForBaud
-	at	MENUITEM.itemValue + ITEM_VALUE.fnValueReader,				dw	IdeControllerMenu_SerialReadBaud
-	at	MENUITEM.itemValue + ITEM_VALUE.fnValueWriter,				dw	IdeControllerMenu_SerialWriteBaud
+	at	MENUITEM.itemValue + ITEM_VALUE.rgwChoiceToValueLookup,		dw	g_rgbChoiceToValueLookupForBaud
+	at	MENUITEM.itemValue + ITEM_VALUE.rgszChoiceToStringLookup,	dw	g_rgszChoiceToStringLookupForBaud
 iend
 		
@@ -188,5 +186,19 @@
 	dw	g_szValueCfgDeviceSerial
 
-g_rgszValueToStringLookupForCOM:		
+g_rgbChoiceToValueLookupForCOM:
+	dw	'1'
+	dw	'2'
+	dw	'3'
+	dw	'4'
+	dw	'5'
+	dw	'6'
+	dw	'7'
+	dw	'8'
+	dw	'9'
+	dw	'A'
+	dw	'B'
+	dw	'C'
+	dw	'x'				; must be last entry (see reader/write routines)
+g_rgszChoiceToStringLookupForCOM:		
 	dw	g_szValueCfgCOM1
 	dw	g_szValueCfgCOM2
@@ -202,16 +214,44 @@
 	dw	g_szValueCfgCOMC
 	dw	g_szValueCfgCOMx
-
-g_rgszValueToStringLookupForBaud:
-	dw	g_szValueCfgBaud2400
-	dw	g_szValueCfgBaud9600
-	dw	g_szValueCfgBaud38_4
-	dw	g_szValueCfgBaud115_2
-
-g_wPrintBaud:
-	dw	DEVICE_SERIAL_PRINTBAUD_2400
-	dw	DEVICE_SERIAL_PRINTBAUD_9600
-	dw	DEVICE_SERIAL_PRINTBAUD_38_4
-	dw	DEVICE_SERIAL_PRINTBAUD_115_2
+	dw	NULL
+
+DEVICE_SERIAL_DEFAULT_CUSTOM_PORT   EQU		300h           ; can't be any of the pre-defined COM values
+
+PackedCOMPortAddresses:				; COM1 - COMC (or COM12)
+	db      DEVICE_SERIAL_COM1 >> 2
+	db		DEVICE_SERIAL_COM2 >> 2 
+	db		DEVICE_SERIAL_COM3 >> 2 
+	db		DEVICE_SERIAL_COM4 >> 2 
+	db		DEVICE_SERIAL_COM5 >> 2 
+	db		DEVICE_SERIAL_COM6 >> 2 
+	db		DEVICE_SERIAL_COM7 >> 2 
+	db		DEVICE_SERIAL_COM8 >> 2 
+	db		DEVICE_SERIAL_COM9 >> 2 
+	db		DEVICE_SERIAL_COMA >> 2 
+	db		DEVICE_SERIAL_COMB >> 2 
+	db		DEVICE_SERIAL_COMC >> 2
+	db		DEVICE_SERIAL_DEFAULT_CUSTOM_PORT >> 2			; must be last entry (see reader/writer routines)
+DEVICE_SERIAL_DEFAULT_COM			EQU		'1'
+		
+g_rgbChoiceToValueLookupForBaud:
+	dw		(115200 / 115200) & 0xff
+	dw		(115200 /  57600) & 0xff
+	dw		(115200 /  38400) & 0xff
+	dw		(115200 /  28800) & 0xff
+	dw		(115200 /  19200) & 0xff
+	dw		(115200 /   9600) & 0xff
+	dw		(115200 /   4800) & 0xff
+	dw		(115200 /   2400) & 0xff
+g_rgszChoiceToStringLookupForBaud:
+	dw		g_szValueCfgBaud115_2
+	dw		g_szValueCfgBaud57_6
+	dw		g_szValueCfgBaud38_4
+	dw		g_szValueCfgBaud28_8
+	dw		g_szValueCfgBaud19_2
+	dw		g_szValueCfgBaud9600
+	dw		g_szValueCfgBaud4800
+	dw		g_szValueCfgBaud2400
+	dw		NULL
+DEVICE_SERIAL_DEFAULT_BAUD			EQU		((115200 / 9600)	& 0xff)
 
 ; Section containing code
@@ -240,11 +280,16 @@
 	lea		ax, [bx+IDEVARS.wPort]
 	mov		[cs:g_MenuitemIdeControllerCommandBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+		
+	lea		ax, [bx+IDEVARS.bSerialPort]		
 	mov		[cs:g_MenuitemIdeControllerSerialPort+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
-	mov		[cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax		
+
+	lea		ax, [bx+IDEVARS.bSerialBaud]
 	mov		[cs:g_MenuitemIdeControllerSerialBaud+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
-				;; baud also modifies the next two bytes (print chars in wPortCtrl), but it never reads them
 		
 	lea		ax, [bx+IDEVARS.wPortCtrl]
 	mov		[cs:g_MenuitemIdeControllerControlBlockAddress+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax
+		
+	lea		ax, [bx+IDEVARS.bSerialCOMPortChar]
+	mov		[cs:g_MenuitemIdeControllerSerialCOM+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset], ax				
 
 	lea		ax, [bx+IDEVARS.bIRQ]
@@ -382,21 +427,22 @@
 ALIGN JUMP_ALIGN
 DisplayMasterSlaveMenu:
+;
+; block mode is not supported on serial drives, disable/enable the option as appropriate
+;
+	push	bx
+	mov		bx, [cs:g_MenuitemIdeControllerDevice+MENUITEM.itemValue+ITEM_VALUE.wRomvarsValueOffset]		
+	call	Buffers_GetRomvarsValueToAXfromOffsetInBX
+	mov		bx, g_MenuitemMasterSlaveBlockModeTransfers
+	cmp		al,DEVICE_SERIAL_PORT
+	jz		.isSerial
+	or		BYTE [cs:bx+MENUITEM.bFlags], FLG_MENUITEM_VISIBLE
+	jmp		.isDone
+.isSerial:		
+	and		BYTE [cs:bx+MENUITEM.bFlags], ~FLG_MENUITEM_VISIBLE
+.isDone:
+	pop		bx
+			
 	call	MasterSlaveMenu_InitializeToDrvparamsOffsetInBX
 	jmp		MasterSlaveMenu_EnterMenuOrModifyItemVisibility
-
-PackedCOMPortAddresses:				; COM1 - COMC (or COM12)
-	db      (DEVICE_SERIAL_COM1 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COM2 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COM3 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COM4 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1   
-	db		(DEVICE_SERIAL_COM5 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COM6 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COM7 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1   
-	db		(DEVICE_SERIAL_COM8 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1   
-	db		(DEVICE_SERIAL_COM9 - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COMA - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1   
-	db		(DEVICE_SERIAL_COMB - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1
-	db		(DEVICE_SERIAL_COMC - DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT) >> 1  
-	db		0						; null terminated
 
 ;------------------------------------------------------------------------------------------
@@ -474,16 +520,11 @@
 		jz		.done								; if we were already serial, nothing to do
 
-		mov		ax,DEVICE_SERIAL_DEFAULT_COM
+		mov		byte [es:di+IDEVARS.bSerialBaud-IDEVARS.wPort],DEVICE_SERIAL_DEFAULT_BAUD
+
+		mov		al,DEVICE_SERIAL_DEFAULT_COM
+		add		di,IDEVARS.bSerialCOMPortChar-IDEVARS.wPort
 		call	IdeControllerMenu_SerialWriteCOM
-		mov		[es:di],ax
-		
-		mov		ax,DEVICE_SERIAL_DEFAULT_BAUD
-		call	IdeControllerMenu_SerialWriteBaud
-		mov		[es:di],ax
+		mov		[es:di],al
 				
-		add		di,IDEVARS.bIRQ - IDEVARS.wPort		; clear out the interrupt information, we don't use interrupts
-		mov		al,0
-		mov		[es:di],al
-
 .done:	
 		pop		di
@@ -494,133 +535,96 @@
 
 ;
-; "COMn" ASCII characer -> Numeric COM number
-;
-ALIGN JUMP_ALIGN
-IdeControllerMenu_SerialReadCOM:
-		xor		ah,ah								; clear out packedportbaud value
-
-		cmp		al,'x'								; base this on the ASCII character used to print
-		jz		.custom
-
-		cmp		al,'A'
-		jae		.over10
-
-		sub		al, '0'+1							; convert ASCII value '0'-'9' to numeric
+; Doesn't modify COM character (unless it is not recognized, which would be an error case),
+; But does update the port address based on COM port selection  
+;				
+ALIGN JUMP_ALIGN
+IdeControllerMenu_SerialWriteCOM:
+		push	ax
+		push	bx
+		push	si
+		
+		mov		si,g_rgbChoiceToValueLookupForCOM
+		mov		bx,PackedCOMPortAddresses
+
+.loop:
+		mov		ah,[bx]
+
+		cmp		ah,(DEVICE_SERIAL_DEFAULT_CUSTOM_PORT >> 2)
+		jz		.notFound
+		
+		cmp		al,[si]
+		jz		.found
+		
+		inc		si
+		inc		si
+		inc		bx
+		
+		jmp		.loop
+
+.notFound:
+		mov		al, 'x'
+		
+.found:			
+		mov		[es:di+IDEVARS.bSerialPort-IDEVARS.bSerialCOMPortChar], ah
+
+		pop		si
+		pop		bx
+		pop		ax
+		
 		ret
-
-.over10:
-		sub		al, 'A'-10+1						; convert ASCII value 'A'-'C' to numeric
+		
+
+;
+; Packed Port (byte) -> Numeric Port (word)
+;				
+ALIGN JUMP_ALIGN
+IdeControllerMenu_SerialReadPort:
+		xor		ah,ah
+		shl		ax,1
+		shl		ax,1
 		ret
 
-.custom:
-		mov		al, 12								; convert ASCII value 'x' (for custom) to numeric
-		ret
-
-;
-; Numeric COM number -> Packed port address, and update ASCII character for printing "COMn"
-;				
-ALIGN JUMP_ALIGN
-IdeControllerMenu_SerialWriteCOM:
-		push	bx
-
-		cmp		al,12								; custom?
-		jge		.custom
-
-		mov		bx,ax								; lookup packed port address based on COM address
-		mov		ah,[cs:bx+PackedCOMPortAddresses]
-
-		cmp		al,9								; COMA or higher, but not custom
-		jge		.atorabove10
-
-		add		al, '0'+1							; convert numeric to ASCII '1' to '9'
-		jmp		IdeControllerMenu_SerialWriteCOM_PackAndRet
-
-.custom:
-		mov		al,'x'								; ASCII value 'x' for custom
-		mov		ah,1 << DEVICE_SERIAL_PACKEDPORTANDBAUD_PORT_FIELD_POSITION	; 248h 
-		jmp		IdeControllerMenu_SerialWriteCOM_PackAndRet
-
-.atorabove10:
-		add		al, 'A'-10+1						; convert numeric to ASCII 'A' to 'C'
-
-IdeControllerMenu_SerialWriteCOM_PackAndRet:
-		mov		bl,[es:di+1]						; read baud rate bits
-		and		bl,DEVICE_SERIAL_PACKEDPORTANDBAUD_BAUDMASK  	
-		or		ah,bl
-
-		pop		bx
-		ret		
-
-;
-; Packed Baud -> Numeric Baud
-;				
-ALIGN JUMP_ALIGN
-IdeControllerMenu_SerialReadBaud:
-		xchg	al,ah
-		and		ax,DEVICE_SERIAL_PACKEDPORTANDBAUD_BAUDMASK			; also clears high order byte
-		ret
-
-;
-; Numeric Baud -> Packed Baud, also update ASCII printing characters for baud rate
-;				
-ALIGN JUMP_ALIGN
-IdeControllerMenu_SerialWriteBaud:
-		and		ax,DEVICE_SERIAL_PACKEDPORTANDBAUD_BAUDBITS 		; ensure we only have the bits we want
-		
-		push	bx
-
-		mov		bx,ax												; lookup printing word for wPortCtrl
-		shl		bx,1
-		mov		bx,[cs:bx+g_wPrintBaud]
-		mov		[es:di+2],bx
-
-		xchg	al,ah												; or in port bits
-		mov		bx,[es:di]
-		and		bh,DEVICE_SERIAL_PACKEDPORTANDBAUD_PORTMASK 
-		or		ax,bx
-
-		pop		bx
-		ret
-
-;
-; Packed Port -> Numeric Port
-;				
-ALIGN JUMP_ALIGN
-IdeControllerMenu_SerialReadPort:		
-		mov		al,ah
-		and		ax,DEVICE_SERIAL_PACKEDPORTANDBAUD_PORTMASK    		; note that this clears AH
-		shl		ax,1
-		add		ax,DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT
-		ret
-
-;
-; Numeric Port -> Packed Port, convert from Custom to a defined COM port if we match one
+;
+; Numeric Port (word) -> Packed Port (byte)
+; And convert from Custom to a defined COM port if we match one of the pre-defined COM port numbers
 ;
 ALIGN JUMP_ALIGN
 IdeControllerMenu_SerialWritePort:		
 		push	bx
-
-		sub		ax,DEVICE_SERIAL_PACKEDPORTANDBAUD_STARTINGPORT		; convert from numeric to packed port number
+		push	si
+
 		shr		ax,1
-		and		al,DEVICE_SERIAL_PACKEDPORTANDBAUD_PORTMASK
-
-		mov		bx,PackedCOMPortAddresses							; loop, looking for port address in known COM address list
-.next:	
-		mov		ah,[cs:bx]
+		shr		ax,1
+		and		al,0feh			; force 8-byte boundary
+
+		mov		si,g_rgbChoiceToValueLookupForCOM						
+		mov		bx,PackedCOMPortAddresses			; loop, looking for port address in known COM address list
+
+.loop:
+		mov		ah,[si]
+		cmp		ah,'x'
+		jz		.found
+				
+		cmp		al,[bx]
+		jz		.found
+		
+		inc		si
+		inc		si
 		inc		bx
-		test	ah,ah
-		jz		.notfound
-		cmp		al,ah
-		jnz		.next
-
-		sub		bx,PackedCOMPortAddresses + 1						; FOUND!, +1 since we already incremented
-		mov		ax,bx
+		
+		jmp		.loop
+
+.found:	
+		mov		[es:di+IDEVARS.bSerialCOMPortChar-IDEVARS.bSerialPort], ah
+
+		pop		si
 		pop		bx
-		jmp		IdeControllerMenu_SerialWriteCOM					; if found, use that logic to get ASCII character
-
-.notfound:
-		xchg	ah,al												
-		mov		al,'x'
-		jmp		IdeControllerMenu_SerialWriteCOM_PackAndRet
-
-
+
+		ret
+
+
+
+
+
+
+
Index: trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm
===================================================================
--- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm	(revision 206)
+++ trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Strings.asm	(revision 233)
@@ -135,5 +135,5 @@
 g_szNfoIdeSerialCOM:	db	"Select a COM port by number.",NULL
 g_szNfoIdeSerialBaud:	db	"Select the COM port's Baud Rate. The server must match this speed. Note that UART clock multipliers may impact the actual speed.",NULL
-g_szNfoIdeSerialPort:	db	"Select a COM port by custom I/O port address. Address must be in the range 248h to 430h and be on an 8-byte boundary.", NULL
+g_szNfoIdeSerialPort:	db	"Select a COM port by custom I/O port address. Any address is valud up to 3f8h, but must be on an 8-byte boundary.", NULL
 
 g_szHelpIdeCmdPort:		incbin	"IDE_CommandPort.txt"
@@ -161,17 +161,17 @@
 
 g_szSerialCOMChoice:
-						db  "COM1 - Port 3f8h",LF
-						db	"COM2 - Port 2f8h",LF
-						db  "COM3 - Port 3e8h",LF
-						db  "COM4 - Port 2e8h",LF
-						db  "COM5 - Port 2f0h",LF
-						db  "COM6 - Port 3e0h",LF
-						db	"COM7 - Port 2e0h",LF
-						db	"COM8 - Port 260h",LF
-						db	"COM9 - Port 368h",LF
-						db	"COMA - Port 268h",LF
-						db	"COMB - Port 360h",LF
-						db	"COMC - Port 270h",LF
-						db  "COMx - Custom Port",NULL
+						db  "COM1 - address 3f8h",LF
+						db	"COM2 - address 2f8h",LF
+						db  "COM3 - address 3e8h",LF
+						db  "COM4 - address 2e8h",LF
+						db  "COM5 - address 2f0h",LF
+						db  "COM6 - address 3e0h",LF
+						db	"COM7 - address 2e0h",LF
+						db	"COM8 - address 260h",LF
+						db	"COM9 - address 368h",LF
+						db	"COMA - address 268h",LF
+						db	"COMB - address 360h",LF
+						db	"COMC - address 270h",LF
+						db  "COMx - Custom address",NULL
 
 g_szValueCfgCOM1:		db		"COM1",NULL
@@ -190,13 +190,22 @@
 		
 g_szSerialBaudChoice:
-						db  "2400 baud",LF
+						db  "115.2K baud",LF
+						db  "57.6K baud",LF
+						db	"38.4K baud",LF
+						db  "28.8K baud",LF
+						db  "19.2K baud",LF
 						db	"9600 baud",LF
-						db	"38.4K baud",LF
-						db  "115.2K baud",NULL
-
+						db  "4800 baud",LF		
+						db  "2400 baud",NULL
+
+g_szValueCfgBaud115_2:	db		"115.2K",NULL
+g_szValueCfgBaud57_6:	db		"57.6K",NULL
+g_szValueCfgBaud38_4:	db		"38.4K",NULL
+g_szValueCfgBaud28_8:	db		"28.8K",NULL
+g_szValueCfgBaud19_2:	db		"19.2K",NULL
+g_szValueCfgBaud9600:	db		"9600",NULL
+g_szValueCfgBaud4800:	db		"4800",NULL		
 g_szValueCfgBaud2400:	db		"2400",NULL
-g_szValueCfgBaud9600:	db		"9600",NULL
-g_szValueCfgBaud38_4:	db		"38.4K",NULL
-g_szValueCfgBaud115_2:	db		"115.2K",NULL
+
 		
 g_szValueCfgDeviceDual8b:	db	"XTIDE",NULL
@@ -363,2 +372,7 @@
 
 g_szDashForZero:		db		"- ",NULL
+
+g_szValueUnknownError:	db	"Error!",NULL
+
+
+
