Work in progress, no time to finish that now. Currently produces weird results.
Will probably need some effort to merge the spritecache.c part.

Index: table/palettes.h
===================================================================
--- table/palettes.h	(revision 650)
+++ table/palettes.h	(working copy)
@@ -1,7 +1,7 @@
 byte _palettes[4][256 * 3] = {
-/* palette 1 */
+/* palette 0 - Windows */
 {
-0,   0,   0,   212,   0, 212,   212,   0, 212,   212,   0, 212, 
+  0,   0,   0,   212,   0, 212,   212,   0, 212,   212,   0, 212, 
 212,   0, 212,   212,   0, 212,   212,   0, 212,   212,   0, 212, 
 212,   0, 212,   212,   0, 212,   168, 168, 168,   184, 184, 184, 
 200, 200, 200,   216, 216, 216,   232, 232, 232,   252, 252, 252, 
@@ -67,6 +67,29 @@
 212,   0, 212,   212,   0, 212,   212,   0, 212,   252, 252, 252, 
 }};
 
+/* Which colors to remap to which when loading sprites in DOS palette. */
+/* XXX: The first six colors have no equivalent in the Windows palette, but I'm
+ * not sure if they are even ever used. We remap them to white so that the possible
+ * glitches are easily visible. --pasky */
+const byte dospal_remap[256] = {
+	0, 255, 255, 255, 255, 255, 255, 215, 216, 217, 10, 11, 12, 13, 14, 15, 16,
+	17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6,
+	7, 34, 35, 36, 37, 38, 39, 8, 41, 42, 43, 44, 45, 46, 47, 48,
+	49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+	65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
+	81, 82, 83, 84, 85, 86, 87, 4, 89, 90, 91, 92, 93, 94, 95, 96,
+	97, 98, 99, 100, 101, 102, 103, 104, 105, 5, 107, 108, 109, 110, 111, 112,
+	113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128,
+	129, 130, 131, 132, 133, 134, 135, 3, 137, 138, 139, 140, 141, 142, 143, 144,
+	145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160,
+	161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176,
+	177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
+	193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208,
+	209, 210, 211, 212, 213, 214, 1, 2, 245, 246, 247, 248, 249, 250, 251, 252,
+	253, 254, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240,
+	241, 242, 243, 244, 9, 218, 219, 220, 221, 222, 223, 224, 225, 226, 255,
+};
+
 #define GET_PALETTE(x) _palettes[x]
 
 typedef struct {
Index: gfx.c
===================================================================
--- gfx.c	(revision 650)
+++ gfx.c	(working copy)
@@ -7,6 +7,9 @@
 static void GfxMainBlitter(byte *sprite, int x, int y, int mode);
 void GfxInitPalettes();
 
+extern byte _sprite_pal_remap[NUM_SPRITES];
+static int _pal_remap;
+
 static int _stringwidth_out;
 static byte _cursor_backup[64*64];
 static Rect _invalid_rect;
@@ -521,6 +524,7 @@
 		if (c >= ASCII_LETTERSTART) {
 			if (x >= dpi->left + dpi->width) goto skip_char;
 			if (x + 26 >= dpi->left) {
+				_pal_remap = _sprite_pal_remap[base + 2 + c - ASCII_LETTERSTART];
 				GfxMainBlitter(GetSpritePtr(base + 2 + c - ASCII_LETTERSTART), x, y, 1);
 			}
 			x += _stringwidth_table[base + c - ' '];
@@ -552,6 +556,7 @@
 }
 
 void DrawSprite(uint32 img, int x, int y) {
+	_pal_remap = _sprite_pal_remap[img & 0x3fff];
 	if (img & 0x8000) {
 		_color_remap_ptr = GetSpritePtr(img >> 16) + 1;
 		GfxMainBlitter(GetSpritePtr(img & 0x3FFF), x, y, 1);
@@ -574,6 +579,8 @@
 	byte info;
 } BlitterParams;
 
+#define palremap(x) (_pal_remap ? dospal_remap[x] : x)
+
 static void GfxBlitTileZoomIn(BlitterParams *bp)
 {
 	byte *src_o = bp->sprite, *src;
@@ -614,16 +621,16 @@
 				ctab = _color_remap_ptr;
 
 				while (num >= 4) {
-					dst[3] = ctab[src[3]];
-					dst[2] = ctab[src[2]];
-					dst[1] = ctab[src[1]];
-					dst[0] = ctab[src[0]];
+					dst[3] = ctab[palremap(src[3])];
+					dst[2] = ctab[palremap(src[2])];
+					dst[1] = ctab[palremap(src[1])];
+					dst[0] = ctab[palremap(src[0])];
 					dst += 4;
 					src += 4;
 					num -= 4;
 				}
 				while (num) {
-					*dst++ = ctab[*src++];
+					*dst++ = ctab[palremap(*src++)];
 					num--;
 				}
 			} while (!(done & 0x80));
@@ -697,7 +704,8 @@
 						continue;
 				}
 #if defined(_WIN32)
-				if (num & 1) *dst++ = *src++;
+				if (num & 1) *dst++ = palremap(*src++);
+				// TODO: palremap()
 				if (num & 2) { *(uint16*)dst = *(uint16*)src; dst += 2; src += 2; }
 				if (num >>= 2) {
 					do {
@@ -707,7 +715,13 @@
 					} while (--num);
 				}
 #else
-				memcpy(dst, src, num);
+				if (!_pal_remap) {
+					memcpy(dst, src, num);
+				} else {
+					int i;
+					for (i = 0; i < num; i++)
+						*dst = dospal_remap[*src++];
+				}
 #endif
 			} while (!(done & 0x80));
 
@@ -734,7 +748,7 @@
 
 			do {
 				for(i=0; i!=width; i++) {
-					if ((b=ctab[src[i]]) != 0)
+					if ((b=ctab[palremap(src[i])]) != 0)
 						dst[i] = b;
 				}
 				src += bp->width_org;
@@ -755,7 +769,13 @@
 	} else {
 		if (!(bp->info & 1)) {
 			do {
-				memcpy(dst, src, width);
+				if (!_pal_remap) {
+					memcpy(dst, src, width);
+				} else {
+					int i;
+					for (i = 0; i < width; i++)
+						*dst = dospal_remap[*src++];
+				}
 				src += bp->width_org;
 				dst += bp->pitch;
 			} while (--height);
@@ -763,10 +783,10 @@
 			do {
 				int n = width;
 				while (n >= 4) {
-					if (src[0]) dst[0] = src[0];
-					if (src[1]) dst[1] = src[1];
-					if (src[2]) dst[2] = src[2];
-					if (src[3]) dst[3] = src[3];
+					if (src[0]) dst[0] = palremap(src[0]);
+					if (src[1]) dst[1] = palremap(src[1]);
+					if (src[2]) dst[2] = palremap(src[2]);
+					if (src[3]) dst[3] = palremap(src[3]);
 
 					dst += 4;
 					src += 4;
@@ -774,7 +794,7 @@
 				}
 
 				while (n) {
-					if (src[0]) dst[0] = src[0];
+					if (src[0]) dst[0] = palremap(src[0]);
 					src++;
 					dst++;
 					n--;
@@ -835,7 +855,7 @@
 				num = (num + 1) >> 1;
 				if (num) {
 					do {
-						*dst = ctab[*src];
+						*dst = palremap(*src);
 						dst++;
 						src+=2;
 					} while (--num);
@@ -943,7 +963,7 @@
 
 				if (num) {
 					do {
-						*dst = *src;
+						*dst = palremap(*src);
 						dst++;
 						src+=2;
 					} while (--num);
@@ -981,7 +1001,7 @@
 			height >>= 1;
 			if (height)	do {
 				for(i=0; i!=width>>1; i++)
-					if ((b=ctab[src[i*2]]) != 0)
+					if ((b=ctab[palremap(src[i*2])]) != 0)
 						dst[i] = b;
 				src += bp->width_org * 2;
 				dst += bp->pitch;
@@ -1005,7 +1025,7 @@
 			if (height)	do {
 				for(i=0; i!=width>>1; i++)
 					if (src[i*2])
-						dst[i] = src[i*2];
+						dst[i] = palremap(src[i*2]);
 				src += bp->width_org * 2;
 				dst += bp->pitch;
 			} while (--height);
@@ -1067,7 +1087,7 @@
 				num = (num + 3) >> 2;
 				if (num) {
 					do {
-						*dst = ctab[*src];
+						*dst = palremap(*src);
 						dst++;
 						src+=4;
 					} while (--num);
@@ -1219,7 +1239,7 @@
 
 				if (num) {
 					do {
-						*dst = *src;
+						*dst = palremap(*src);
 						dst++;
 						src+=4;
 					} while (--num);
@@ -1272,7 +1292,7 @@
 			height >>= 2;
 			if (height)	do {
 				for(i=0; i!=width>>2; i++)
-					if ((b=ctab[src[i*4]]) != 0)
+					if ((b=ctab[palremap(src[i*4])]) != 0)
 						dst[i] = b;
 				src += bp->width_org * 4;
 				dst += bp->pitch;
@@ -1296,7 +1316,7 @@
 			if (height)	do {
 				for(i=0; i!=width>>2; i++)
 					if (src[i*4])
-						dst[i] = src[i*4];
+						dst[i] = palremap(src[i*4]);
 				src += bp->width_org * 4;
 				dst += bp->pitch;
 			} while (--height);
@@ -1442,7 +1462,7 @@
 				if (b >= 0) {
 					int i, count=b;
 					for(i=0; i!=count; i++)
-						dst[i] = src[i];
+						dst[i] = palremap(src[i]);
 					dst += count;
 					src += count;
 					totpix -= count;
@@ -1460,6 +1480,7 @@
 		}
 		zf_uncomp[dpi->zoom](&bp);
 	}
+
 }
 
 
Index: spritecache.c
===================================================================
--- spritecache.c	(revision 650)
+++ spritecache.c	(working copy)
@@ -13,11 +13,12 @@
 //#define WANT_LOCKED
 
 
 static SpriteHdr _cur_sprite;
 
 static byte *_sprite_ptr[NUM_SPRITES];
 static uint16 _sprite_size[NUM_SPRITES];
 static uint32 _sprite_file_pos[NUM_SPRITES];
+byte _sprite_pal_remap[NUM_SPRITES];
 
 // This one is probably not needed.
 #if defined(WANT_LOCKED)
@@ -43,7 +48,9 @@
 static uint32 _spritecache_size;
 static int _compact_cache_counter;
 
+static int pal_remap = 0;
 
+
 static const char * const _filename_list[] = {
 	"TRG1R.GRF",
 	"TRGIR.GRF",
@@ -171,8 +192,9 @@
 
 	_sprite_size[load_index] = size;
 	_sprite_file_pos[load_index] = FioGetPos() | (file_index << 24);
+	_sprite_pal_remap[load_index] = pal_remap;
 
	ReadSpriteHeaderSkipData(size);
 
 #ifdef WANT_SPRITESIZES
 	_sprite_xsize[load_index] = _cur_sprite.width;
@@ -197,14 +219,30 @@
 	return true;
 }
 
-// Checks, if trg1r.grf is the Windows version
-static bool CheckGrfFile()
+// Checks if a given GRF file is of the Windows version
+static void CheckGrfFile(const char *filename)
 {
 	byte check;
-	FioSeekToFile(38); // Byte 38 has the value 0x21 in Windows version, 0x07 in DOS
+
+	// Byte 38 has the value 0x21 in Windows version, 0x07 in DOS
+	// This however applies only to trg1r, any better method?
+	FioSeekTo(38, SEEK_SET);
 	check = FioReadWord();
-	FioSeekToFile(0);
-	return (check==0x21);
+	FioSeekTo(0, SEEK_SET);
+
+	if (check == 0x21) {
+		pal_remap = 0;
+	} else if (check == 0x07) {
+		pal_remap = 1;
+	} else {
+		pal_remap = _default_dos_grf;
+		fprintf(stderr, "Warning! Unable to determine whether %s is a DOS or Windows GRF file.\n", filename);
+		if (_default_dos_grf) {
+			fprintf(stderr, "Assuming DOS since -D argument was passed.\n");
+		} else {
+			fprintf(stderr, "Assuming Windows, use -D to make me assume DOS instead.\n");
+		}
+	}
 }
 
 static int LoadGrfFile(const char *filename, int load_index, int file_index)
@@ -212,15 +250,13 @@
 	int load_index_org = load_index;
 
 	FioOpenFile(file_index, filename);
 
-	if(file_index==0 && !_ignore_wrong_grf)
-		if(!CheckGrfFile())
-			error("Wrong version of grf files!\nThe Windows 95 edition of Transport Tycoon Deluxe is required to play OTTD!\n(you can disable this message by starting with the \"-i\" switch.");
+	CheckGrfFile(filename);
 
 	while (LoadNextSprite(load_index, file_index)) {
 		load_index++;
 	}
 
 	return load_index - load_index_org;
 }
 
@@ -229,7 +272,9 @@
 	int start, end;
 
 	FioOpenFile(file_index, filename);
 
+	CheckGrfFile(filename);
+
 	for(;(start=*index_tbl++) != 0xffff;) {
 		end = *index_tbl++;
 		do {
