Index: trunk/Serial_Server/library/Image.cpp
===================================================================
--- trunk/Serial_Server/library/Image.cpp	(revision 225)
+++ trunk/Serial_Server/library/Image.cpp	(revision 233)
@@ -137,5 +137,5 @@
 #define ATA_dwLBACnt 60
 
-#define ATA_VendorSpecific_ReturnPortBaud 158
+#define ATA_wVendor 159
 
 #define ATA_wCaps_LBA 0x200
@@ -164,24 +164,27 @@
 };
 
-void Image::respondInquire( unsigned short *buff, struct baudRate *baudRate, unsigned char portAndBaud )
-{
-	unsigned short comPort = 0;
-	struct comPorts *cp;
-
-	if( portAndBaud )
-	{
-		for( cp = supportedComPorts; cp->port && cp->port != ((portAndBaud << 3) + 0x260); cp++ ) ;
-		if( cp->port )
-			comPort = cp->com;
-	}
-	  
+void Image::respondInquire( unsigned short *buff, struct baudRate *baudRate, unsigned short port, unsigned char scan )
+{
 	memset( &buff[0], 0, 514 );
 
-	if( comPort )
-		sprintf( (char *) &buff[ATA_strModel], "%.20s (COM%d/%s)", shortFileName, comPort, baudRate->display );
-	else
-		sprintf( (char *) &buff[ATA_strModel], "%.30s (%s baud)", shortFileName, baudRate->display );
-
-	// strncpy( (char *) &buff[ATA_strModel], img->shortFileName, 40 );
+	if( scan )
+	{
+		unsigned short comPort = 0;
+		struct comPorts *cp;
+
+		if( port )
+		{
+			for( cp = supportedComPorts; cp->port && cp->port != port; cp++ ) ;
+			if( cp->port )
+				comPort = cp->com;
+		}
+
+		if( comPort )
+			sprintf( (char *) &buff[ATA_strModel], "%.15s (COM%c/%s)", shortFileName, comPort, baudRate->display );
+		else
+			sprintf( (char *) &buff[ATA_strModel], "%.25s (%s baud)", shortFileName, baudRate->display );
+	}
+	else
+		sprintf( (char *) &buff[ATA_strModel], "%.30s", shortFileName );
 
 	strncpy( (char *) &buff[ATA_strSerial], "serial", 20 );
Index: trunk/Serial_Server/library/Library.h
===================================================================
--- trunk/Serial_Server/library/Library.h	(revision 225)
+++ trunk/Serial_Server/library/Library.h	(revision 233)
@@ -42,5 +42,5 @@
 	static int parseGeometry( char *str, unsigned long *p_cyl, unsigned long *p_head, unsigned long *p_sect );
 
-	void respondInquire( unsigned short *buff, struct baudRate *baudRate, unsigned char portAndBaud );
+	void respondInquire( unsigned short *buff, struct baudRate *baudRate, unsigned short port, unsigned char scan );
 
 	void init( char *name, int p_readOnly, int p_drive, unsigned long p_cyl, unsigned long p_head, unsigned long p_sect, int p_useCHS );
Index: trunk/Serial_Server/library/Process.cpp
===================================================================
--- trunk/Serial_Server/library/Process.cpp	(revision 225)
+++ trunk/Serial_Server/library/Process.cpp	(revision 233)
@@ -31,7 +31,7 @@
 		unsigned char driveAndHead;
 		unsigned char count;
-		unsigned char undefined1;
-		unsigned char portAndBaud;
-		unsigned char undefined2;
+		unsigned char scan;
+		unsigned char port;
+		unsigned char baud;
 	} inquire;
 	unsigned char b[514];
@@ -48,10 +48,4 @@
 #define SERIAL_COMMAND_MASK 0xe3
 #define SERIAL_COMMAND_HEADERMASK 0xe0
-
-#define SERIAL_INQUIRE_PORTANDBAUD_BAUDMASK 3
-#define SERIAL_INQUIRE_PORTANDBAUD_PORTMASK 0xfc
-#define SERIAL_INQUIRE_PORTANDBAUD_STARTINGPORT 0x240
-
-#define SERIAL_INQUIRE_PORTANDBAUD_PORTTRANSLATE( a ) ( ((a) & SERIAL_INQUIRE_PORTANDBAUD_PORT) << 1 | SERIAL_INQUIRE_PORTANDBAUD_STARTINGPORT )
 
 #define ATA_COMMAND_LBA 0x40
@@ -96,4 +90,5 @@
 	unsigned long cyl, sect, head;
 	unsigned long perfTimer;
+	unsigned char lastScan;
 
 	GetTime_Timeout_Local = GetTime_Timeout();
@@ -102,4 +97,5 @@
 	readto = 0;
 	workCount = workOffset = workCommand = 0;
+	lastScan = 0;
 
 	lasttick = GetTime();
@@ -282,7 +278,6 @@
 					if( workCommand == SERIAL_COMMAND_INQUIRE )
 						log( 1, "Inquire %d: Client Port=0x%x, Client Baud=%s", img == image0 ? 0 : 1,
-							 ((buff.inquire.portAndBaud & SERIAL_INQUIRE_PORTANDBAUD_PORTMASK) << 1) 
-							 + SERIAL_INQUIRE_PORTANDBAUD_STARTINGPORT,
-							 baudRateMatchDivisor( buff.inquire.portAndBaud & SERIAL_INQUIRE_PORTANDBAUD_BAUDMASK )->display );
+							 ((unsigned short) buff.inquire.port) << 2,
+							 baudRateMatchDivisor( buff.inquire.baud )->display );
 					else if( buff.chs.driveAndHead & ATA_COMMAND_LBA )
 						log( 1, "%s %d: LBA=%u, Count=%u", comStr, img == image0 ? 0 : 1,
@@ -325,6 +320,8 @@
 				if( workCommand == SERIAL_COMMAND_INQUIRE )
 				{
+					unsigned char localScan;
+
 					if( serial->speedEmulation && 
-						(buff.inquire.portAndBaud & SERIAL_INQUIRE_PORTANDBAUD_BAUDMASK) != serial->baudRate->divisor )
+						buff.inquire.baud != serial->baudRate->divisor )
 					{
 						log( 1, "    Ignoring Inquire with wrong baud rate" );
@@ -333,5 +330,10 @@
 					}
 
-					img->respondInquire( &buff.w[0], serial->baudRate, buff.inquire.portAndBaud );
+					localScan = buff.inquire.scan;         // need to do this before the call to 
+					                                       // img->respondInquire, as it will clear the buff
+					img->respondInquire( &buff.w[0], serial->baudRate, 
+										 ((unsigned short) buff.inquire.port) << 2, 
+										 (img == image1 && lastScan) || buff.inquire.scan );
+					lastScan = localScan;
 				}
 				//
@@ -342,4 +344,5 @@
 					img->seekSector( mylba + workOffset );
 					img->readSector( &buff.w[0] );
+					lastScan = 0;
 				}
 
Index: trunk/Serial_Server/library/Serial.cpp
===================================================================
--- trunk/Serial_Server/library/Serial.cpp	(revision 225)
+++ trunk/Serial_Server/library/Serial.cpp	(revision 233)
@@ -12,15 +12,17 @@
 struct baudRate supportedBaudRates[] = 
 { 
-	{   2400,  0x0,   "2400" },
-	{   4800, 0xff,   "4800" },
-	{   9600,  0x1,   "9600" },
-	{  19200, 0xff,  "19.2K" },
-	{  38400,  0x2,  "38.4K" },
-	{  76800, 0xff,  "76.8K" },
-	{ 115200,  0x3, "115.2K" },
-	{ 153600, 0xff, "153.6K" },
-	{ 230400, 0xff, "230.4K" },
-	{ 460800, 0xff, "460.8K" },
-	{      0,    0,     NULL }
+	{   2400,  0x30,    "2400" },
+	{   4800,  0x18,    "4800" },
+	{   9600,   0xc,    "9600" },
+	{  19200,  0xff,   "19.2K" },
+	{  28800,   0x4,   "28.8K" },
+	{  38400,  0xff,   "38.4K" },
+	{  57600,   0x2,   "57.6K" },
+	{  76800,  0xff,   "76.8K" },
+	{ 115200,   0x1,  "115.2K" },
+	{ 153600,  0xff,  "153.6K" },
+	{ 230400,  0xff,  "230.4K" },
+	{ 460800,  0xff,  "460.8K" },
+	{      0,     0, "Unknown" },
 };
 
@@ -37,5 +39,5 @@
 	}
 
-	return( NULL );
+	return( b );
 }
 
@@ -47,5 +49,5 @@
 		;
 
-	return( b->rate ? b : NULL );
+	return( b );
 }
 
Index: trunk/Serial_Server/win32/Win32.cpp
===================================================================
--- trunk/Serial_Server/win32/Win32.cpp	(revision 225)
+++ trunk/Serial_Server/win32/Win32.cpp	(revision 233)
@@ -32,14 +32,15 @@
 		"                      (default is a 32 MB disk, with CHS geometry 65:63:16)",
 		"",
-		"  -p                  Named Pipe mode for emulators (pipe is '" PIPENAME "')",
+		"  -p                  Named Pipe mode for emulators (pipe is \"" PIPENAME "\")",
 		"",
 		"  -c COMPortNumber    COM Port to use (default is first found)",
 		"",
-		"  -b BaudRate         Baud rate to use on the COM port ",
-		"                      Without a rate multiplier: 2400, 9600, 38400, 115200",
-		"                      With a 2x rate multiplier: 4800, 19200, 76800, 230400",
-		"                      With a 4x rate multiplier: 9600, 38400, 153600, 460800",
-		"                      Abbreviations also accepted (ie, '460K', '38.4K', etc)",
-		"                      (default is 38400, 115200 in named pipe mode)",
+		"  -b BaudRate         Baud rate to use on the COM port, with client machine",
+		"                      rate multiplier in effect:",
+		"                          None:  2400,  4800,  9600,  28.8K,  57.6K, 115.2K",
+		"                          2x:    4800,  9600, 19200,  57.6K, 115.2K, 230.4K",
+		"                          4x:    9600, 19200, 38400, 115.2K, 230.4K, 460.8K",
+		"                          and for completeness:               76.8K, 153.6K",
+		"                      (default is 9600, 115.2K when in named pipe mode)",
 		"",
 		"  -t                  Disable timeout, useful for long delays when debugging",
@@ -148,13 +149,9 @@
 				break;
 			case 'b': case 'B':
-				if( !(baudRate = baudRateMatchString( argv[++t] )) )
-				{
-					fprintf( stderr, "Unknown Baud Rate %s\n\n", argv[t] );
-					usage();
-				}
+				if( !(baudRate = baudRateMatchString( argv[++t] )) || !baudRate->rate )
+					log( -2, "Unknown Baud Rate \"%s\"", argv[t] );
 				break;
 			default:
-				fprintf( stderr, "Unknown Option: %s\n\n", argv[t] );
-				usage();
+				log( -2, "Unknown Option: \"%s\"", argv[t] );
 			}
 		}
@@ -179,5 +176,5 @@
 
 	if( !baudRate )
-		baudRate = baudRateMatchString( "38400" );
+		baudRate = baudRateMatchString( "9600" );
 
 	do
@@ -206,4 +203,9 @@
 		vfprintf( stderr, message, args );
 		fprintf( stderr, "\n" );
+		if( level < -1 )
+		{
+			fprintf( stderr, "\n" );
+			usage();
+		}
 		exit( 1 );
 	}
Index: trunk/Serial_Server/win32/Win32Serial.h
===================================================================
--- trunk/Serial_Server/win32/Win32Serial.h	(revision 225)
+++ trunk/Serial_Server/win32/Win32Serial.h	(revision 233)
@@ -37,5 +37,5 @@
 		if( !strcmp( name, "PIPE" ) )
 		{
-			log( 0, "Opening named pipe %s (simulating %lu baud)", PIPENAME, baudRate->rate );
+			log( 0, "Opening named pipe %s (simulating %s baud)", PIPENAME, baudRate->display );
 		
 			pipe = CreateNamedPipeA( PIPENAME, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE|PIPE_REJECT_REMOTE_CLIENTS, 2, 1024, 1024, 0, NULL );
