Index: trunk/Serial_Server/library/FlatImage.h
===================================================================
--- trunk/Serial_Server/library/FlatImage.h	(revision 258)
+++ trunk/Serial_Server/library/FlatImage.h	(revision 259)
@@ -24,4 +24,5 @@
 			double sizef;
 			FileAccess cf;
+			char sizeChar;
 
 			size = (unsigned long) p_cyl * (unsigned long) p_sect * (unsigned long) p_head;
@@ -29,4 +30,10 @@
 				log( -1, "'%s', can't create flat file with size greater than %lu 512-byte sectors", name, cf.MaxSectors );
 			sizef = size / 2048.0;   // 512 byte sectors -> MB
+			sizeChar = 'M';
+			if( sizef < 1 ) 
+			{
+				sizef *= 1024;
+				sizeChar = 'K';
+			}
 
 			if( cf.Create( name ) )
@@ -37,7 +44,7 @@
 				
 				if( p_cyl > 1024 )
-					log( 0, "Created file '%s', size %.1lf MB", name, sizef );
+					log( 0, "Created file '%s', size %.2lf %cB", name, sizef, sizeChar );
 				else
-					log( 0, "Created file '%s', geometry %u:%u:%u, size %.1lf MB", name, p_cyl, p_sect, p_head, sizef );
+					log( 0, "Created file '%s', geometry %u:%u:%u, size %.2lf %cB", name, p_cyl, p_head, p_sect, sizef, sizeChar );
 				cf.Close();
 			}
Index: trunk/Serial_Server/library/Image.cpp
===================================================================
--- trunk/Serial_Server/library/Image.cpp	(revision 258)
+++ trunk/Serial_Server/library/Image.cpp	(revision 259)
@@ -12,22 +12,31 @@
 #include <stdio.h>
 
-struct floppyInfo {
-	unsigned long size;
-	unsigned char type;
-	unsigned char cylinders;
-	unsigned char heads;
-	unsigned char sectors;
-} floppyInfos[] = 
-{
-{ 2949120 / 512, 6, 80, 2, 36 },   // 2.88MB 3.5"
-{ 1474560 / 512, 4, 80, 2, 18 },        // 1.44MB 3.5"
-{ 1228800 / 512, 2, 80, 2, 15 },     // 1.2MB 5.25"
-{ 737280 / 512, 3, 80, 1, 18 },    // 720KB 3.5"
-{ 368640 / 512, 1, 40, 2, 9 }, // 360KB 5.25"
-{ 327680 / 512, 0, 40, 2, 8 }, // 320KB 5.25"
-{ 184320 / 512, 0, 40, 1, 9 }, // 180KB 5.25" single sided
-{ 163840 / 512, 0, 40, 1, 8 }, // 160KB 5.25" single sided
-{ 0, 0, 0, 0, 0 }
+struct floppyInfo floppyInfos[] = 
+{
+	{ 1, 2949120 / 512, 6, 80, 2, 36 },   		// 2.88MB 3.5"
+	{ 0, 2867200 / 512, 6, 80, 2, 36 },   		// 2.88MB 3.5" (alternate spelling with 2.8)
+	{ 0, 2969600 / 512, 6, 80, 2, 36 },   		// 2.88MB 3.5" (alternate spelling with 2.9)
+	{ 1, 1474560 / 512, 4, 80, 2, 18 },         // 1.44MB 3.5"
+	{ 0, 1433600 / 512, 4, 80, 2, 18 },         // 1.44MB 3.5" (alternate spelling with 1.4)
+	{ 1, 1228800 / 512, 2, 80, 2, 15 },     	// 1.2MB 5.25"
+	{ 1, 737280 / 512, 3, 80, 1, 18 },    		// 720KB 3.5"
+	{ 1, 368640 / 512, 1, 40, 2, 9 }, 			// 360KB 5.25"
+	{ 1, 327680 / 512, 0, 40, 2, 8 }, 			// 320KB 5.25"
+	{ 1, 184320 / 512, 0, 40, 1, 9 }, 			// 180KB 5.25" single sided
+	{ 1, 163840 / 512, 0, 40, 1, 8 }, 			// 160KB 5.25" single sided
+	{ 0, 0, 0, 0, 0, 0 }
 };
+
+struct floppyInfo *FindFloppyInfoBySize( double size )
+{
+	struct floppyInfo *fi;
+
+	for( fi = floppyInfos; fi->size != 0 && !(size+5 > fi->size && size-5 < fi->size); fi++ ) ;
+
+	if( fi->size == 0 )
+		fi = NULL;
+
+	return( fi );
+}
 
 Image::Image( char *name, int p_readOnly, int p_drive )
@@ -69,5 +78,5 @@
 
 	floppy = 0;
-	for( f = floppyInfos; f->size && f->size != totallba; f++ ) ;
+	for( f = floppyInfos; f->size && !(f->size == totallba && f->real); f++ ) ;
 	if( f->size )
 	{
@@ -78,4 +87,5 @@
 		p_head = f->heads;
 		p_sect = f->sectors;
+		totallba = p_cyl * p_head * p_sect;
 	}
 
Index: trunk/Serial_Server/library/Library.h
===================================================================
--- trunk/Serial_Server/library/Library.h	(revision 258)
+++ trunk/Serial_Server/library/Library.h	(revision 259)
@@ -15,4 +15,15 @@
 
 unsigned short checksum( unsigned short *wbuff, int wlen );
+
+struct floppyInfo {
+	unsigned char real;
+	unsigned long size;
+	unsigned char type;
+	unsigned char cylinders;
+	unsigned char heads;
+	unsigned char sectors;
+};
+
+struct floppyInfo *FindFloppyInfoBySize( double size );
 
 class Image
