Index: agos/agos.h
===================================================================
--- agos/agos.h	(revision 25419)
+++ agos/agos.h	(working copy)
@@ -479,7 +479,7 @@
 	uint8 _currentPalette[1024];
 	uint8 _displayPalette[1024];
 
-	byte _videoBuf1[32000];
+	byte _videoBuf1[64000];
 	uint16 _videoWindows[128];
 
 	VgaTimerEntry _vgaTimerList[205];
@@ -558,7 +558,7 @@
 	void setUserItem(Item *item, int n, int m);
 
 	void paletteFadeOut(byte *palPtr, uint num, uint size);
-	
+
 	byte *allocateItem(uint size);
 	byte *allocateTable(uint size);
 	void alignTableMem();
@@ -796,7 +796,7 @@
 	void drawIconArray_Simon(uint i, Item *item_ptr, int line, int classMask);
 	void removeIconArray(uint num);
 
-	void loadIconData();	
+	void loadIconData();
 	void loadIconFile();
 	void loadMenuFile();
 
@@ -1119,7 +1119,7 @@
 	void oe1_printPlayerHit();
 	void oe1_printMonsterHit();
 
-	int16 levelOf(Item *item); 
+	int16 levelOf(Item *item);
 	int16 moreText(Item *i);
 	void lobjFunc(Item *i, const char *f);
 	uint confirmQuit();
@@ -1278,6 +1278,7 @@
 
 	void drawImages(VC10_state *state);
 	void drawImages_Simon(VC10_state *state);
+	void drawImages_Amiga(VC10_state *state);
 	void drawImages_Feeble(VC10_state *state);
 
 	void scaleClip(int16 h, int16 w, int16 y, int16 x, int16 scrollY);
@@ -1335,7 +1336,8 @@
 	byte *getBackGround();
 	byte *getScaleBuf();
 
-	void convertAmiga(byte *srcBuf, int32 fileSize);
+	byte *convertclip(const byte *src, bool is32Colors, uint height, uint width, byte flags);
+
 	bool decrunchFile(byte *src, byte *dst, uint32 size);
 	void loadVGABeardFile(uint id);
 	void loadVGAVideoFile(uint id, uint type);
Index: agos/intern.h
===================================================================
--- agos/intern.h	(revision 25419)
+++ agos/intern.h	(working copy)
@@ -210,7 +210,8 @@
 	GF_CRUNCHED_GAMEPC = 1 << 3,
 	GF_ZLIBCOMP        = 1 << 4,
 	GF_32COLOR         = 1 << 5,
-	GF_DEMO            = 1 << 6
+	GF_PLANAR          = 1 << 6,
+	GF_DEMO            = 1 << 7
 };
 
 enum GameFileTypes {
Index: agos/vga.cpp
===================================================================
--- agos/vga.cpp	(revision 25419)
+++ agos/vga.cpp	(working copy)
@@ -541,25 +541,39 @@
 }
 
 byte *AGOSEngine::vc10_flip(const byte *src, uint w, uint h) {
-	w *= 8;
-
 	byte *dstPtr;
 	uint i;
 
-	dstPtr = _videoBuf1 + w;
+	if (getFeatures() & GF_32COLOR) {
+		w *= 16;
+		dstPtr = _videoBuf1 + w;
 
-	do {
-		byte *dst = dstPtr;
-		for (i = 0; i != w; ++i) {
-			byte b = src[i];
-			b = (b >> 4) | (b << 4);
-			*--dst = b;
-		}
+		do {
+			byte *dst = dstPtr;
+			for (i = 0; i != w; ++i) {
+				*--dst = src[i];
+			}
 
-		src += w;
-		dstPtr += w;
-	} while (--h);
+			src += w;
+			dstPtr += w;
+		} while (--h);
+	} else {
+		w *= 8;
+		dstPtr = _videoBuf1 + w;
 
+		do {
+			byte *dst = dstPtr;
+			for (i = 0; i != w; ++i) {
+				byte b = src[i];
+				b = (b >> 4) | (b << 4);
+				*--dst = b;
+			}
+
+			src += w;
+			dstPtr += w;
+		} while (--h);
+	}
+
 	return _videoBuf1;
 }
 
@@ -620,6 +634,25 @@
 	if (_dumpImages)
 		dumpSingleBitmap(_vgaCurZoneNum, state.image, state.depack_src, width, height,
 											 state.palette);
+	if (getFeatures() & GF_PLANAR) {
+		bool is32Colors = (getFeatures() & GF_32COLOR);
+		if ((((_lockWord & 0x20) && !state.palette) || state.palette == 0xC0) &&
+		getGameType() == GType_SIMON1) {
+			is32Colors = true;
+		}
+
+		state.depack_src = convertclip(state.depack_src, is32Colors, height, width * 16, flags);
+		// decoded data in res_ami.cpp is always uncompressed
+		flags &= ~0x80;
+		if (state.flags & kDFCompressedFlip) {
+			state.flags &= ~kDFCompressedFlip;
+			state.flags |= kDFFlip;
+		}
+		if (state.flags & kDFCompressed) {
+			state.flags &= ~kDFCompressed;
+		}
+	}
+
 	// Check if image is compressed
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
 		if (flags & 0x80) {
@@ -654,6 +687,12 @@
 		return;
 	}
 
+	state.surf2_addr = getFrontBuf();
+	state.surf2_pitch = _dxSurfacePitch;
+
+	state.surf_addr = getBackBuf();
+	state.surf_pitch = _dxSurfacePitch;
+
 	if (getGameType() != GType_FF && getGameType() != GType_PP) {
 		if (state.flags & kDFCompressedFlip) {
 			state.depack_src = vc10_uncompressFlip(state.depack_src, width, height);
@@ -662,16 +701,16 @@
 		}
 	}
 
-	state.surf2_addr = getFrontBuf();
-	state.surf2_pitch = _dxSurfacePitch;
-
-	state.surf_addr = getBackBuf();
-	state.surf_pitch = _dxSurfacePitch;
-
 	if (getGameType() == GType_FF || getGameType() == GType_PP) {
 		drawImages_Feeble(&state);
+	} else if (getFeatures() & GF_32COLOR) {
+		drawImages_Amiga(&state);
 	} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
-		drawImages_Simon(&state);
+		if ((((_lockWord & 0x20) && state.palette == 0) || state.palette == 0xC0)) {
+			drawImages_Amiga(&state);
+		} else {
+			drawImages_Simon(&state);
+		}
 	} else {
 		drawImages(&state);
 	}
@@ -1107,7 +1146,7 @@
 
 	if (num == 3) {
 		memset(getBackBuf(), 0, _screenWidth * _screenHeight);
-	} else { 
+	} else {
 		const uint16 *vlut = &_videoWindows[num * 4];
 		byte *dst = getBackBuf() + vlut[0] * 16 + vlut[1] * _dxSurfacePitch;
 
Index: agos/res.cpp
===================================================================
--- agos/res.cpp	(revision 25419)
+++ agos/res.cpp	(working copy)
@@ -718,28 +718,13 @@
 				error("loadVGAVideoFile: Read failed");
 
 			dstSize = READ_BE_UINT32(srcBuffer + srcSize - 4);
-			if (type == 2) {
-				dst = (byte *)malloc(dstSize);
-				decrunchFile(srcBuffer, dst, srcSize);
-				convertAmiga(dst, dstSize);
-				free(dst);
-			} else {
-				dst = allocBlock (dstSize + extraBuffer);
-				decrunchFile(srcBuffer, dst, srcSize);
-			}
+			dst = allocBlock (dstSize + extraBuffer);
+			decrunchFile(srcBuffer, dst, srcSize);
 			free(srcBuffer);
 		} else {
-			if (getGameId() == GID_SIMON1CD32 && type == 2) {
-				dst = (byte *)malloc(dstSize);
-				if (in.read(dst, dstSize) != dstSize)
-					error("loadVGAVideoFile: Read failed");
-				convertAmiga(dst, dstSize);
-				free(dst);
-			} else {
-				dst = allocBlock(dstSize + extraBuffer);
-				if (in.read(dst, dstSize) != dstSize)
-					error("loadVGAVideoFile: Read failed");
-			}
+			dst = allocBlock(dstSize + extraBuffer);
+			if (in.read(dst, dstSize) != dstSize)
+				error("loadVGAVideoFile: Read failed");
 		}
 		in.close();
 	} else {
Index: agos/res_ami.cpp
===================================================================
--- agos/res_ami.cpp	(revision 25419)
+++ agos/res_ami.cpp	(working copy)
@@ -29,40 +29,30 @@
 
 namespace AGOS {
 
-byte *buffer;
-byte *bufptr;
-byte *bufferout;
-byte *bufptrout;
-uint32 bufoutend;
-byte *clipptr;
-byte *clipoutptr;
-int clipnumber;
+enum {
+	kMaxColorDepth = 5
+};
 
-static void uncompressplane(byte *plane, byte *outptr, uint16 length) {
-	debug(10, "uncompressplane: length %d", length);
-
-	char x;
-	byte y, z;
-	while (length) {
-		x = *plane++;
+static void uncompressplane(const byte *plane, byte *outptr, uint16 length) {
+	debug(0, "uncompressplane: length %d", length);
+	while (length != 0) {
+		char x = *plane++;
 		if (x >= 0) {
-			x += 1;
-			y = *plane++;
-			z = *plane++;
-			while (x) {
+			x++;
+			byte y = *plane++;
+			byte z = *plane++;
+			while (x != 0) {
 				*outptr++ = y;
 				*outptr++ = z;
-				length--;
-				if (length == 0)
+				if (--length == 0)
 					break;
 				x--;
 			}
 		} else {
-			while (x) {
+			while (x != 0) {
 				*outptr++ = *plane++;
 				*outptr++ = *plane++;
-				length--;
-				if (length == 0)
+				if (--length == 0)
 					break;
 				x++;
 			}
@@ -70,254 +60,102 @@
 	}
 }
 
-static void convertcompressedclip(uint16 height, uint16 width) {
-	debug(10, "convertcompressedclip: height %d width %d", height, width);
-
-	byte *plane0;
-	byte *plane1;
-	byte *plane2;
-	byte *plane3;
-	byte *uncbuffer;
-	byte *uncptr0;
-	byte *uncptr1;
-	byte *uncptr2;
-	byte *uncptr3;
-	byte *uncbfrout;
-	byte *uncbfroutptr;
-	uint16 length, i, j, k, word1, word2, word3, word4, cliplength;
-	byte outbyte, outbyte1, x, y;
-	char n;
-	uncbuffer = (byte *)malloc(height * width * 4);
-	uncbfrout = (byte *)malloc(height * width * 4);
-	
-	byte *free_uncbuffer = uncbuffer;
-	byte *free_uncbfrout = uncbfrout;
-	
-	length = width / 16;
-	length *= height;
-	plane0 = READ_BE_UINT16(clipptr) + READ_BE_UINT16(clipptr + 2) + clipptr; clipptr += 4; plane0 += 4;
-	plane1 = READ_BE_UINT16(clipptr) + READ_BE_UINT16(clipptr + 2) + clipptr; clipptr += 4; plane1 += 4;
-	plane2 = READ_BE_UINT16(clipptr) + READ_BE_UINT16(clipptr + 2) + clipptr; clipptr += 4; plane2 += 4;
-	plane3 = READ_BE_UINT16(clipptr) + READ_BE_UINT16(clipptr + 2) + clipptr; clipptr += 4; plane3 += 4;
-	plane0 -= 4;
-	plane1 -= 8;
-	plane2 -= 12;
-	plane3 -= 16;
-	uncptr0 = uncbuffer;
-	uncptr1 = uncptr0+(length*2);
-	uncptr2 = uncptr1+(length*2);
-	uncptr3 = uncptr2+(length*2);
-	uncompressplane(plane0, uncptr0, length);
-	uncompressplane(plane1, uncptr1, length);
-	uncompressplane(plane2, uncptr2, length);
-	uncompressplane(plane3, uncptr3, length);
-	uncbfroutptr = uncbfrout;
-	for (i = 0; i < length; i++) {
-		word1=READ_BE_UINT16(uncptr0); uncptr0 += 2;
-		word2=READ_BE_UINT16(uncptr1); uncptr1 += 2;
-		word3=READ_BE_UINT16(uncptr2); uncptr2 += 2;
-		word4=READ_BE_UINT16(uncptr3); uncptr3 += 2;
-		for (j = 0; j < 8; j++) {
-			outbyte = ((word1 / 32768) + ((word2 / 32768) * 2) + ((word3 / 32768) * 4) + ((word4 / 32768) * 8));
-			word1 <<= 1;
-			word2 <<= 1;
-			word3 <<= 1;
-			word4 <<= 1;
-			outbyte1 = ((word1 / 32768) + ((word2 / 32768) * 2) + ((word3 / 32768) * 4) + ((word4 / 32768) * 8));
-			word1 <<= 1;
-			word2 <<= 1;
-			word3 <<= 1;
-			word4 <<= 1;
-			*uncbfroutptr++ = (outbyte * 16 + outbyte1);
-		}
-	}
-	uncptr0 = uncbuffer;
-	uncptr1 = uncbfrout;
-	uncptr2 = uncbfrout;
-	uncptr3 = uncbfrout;
-	for (i = 0; i < (width / 16); i++) {
-		for (k = 0; k < 8; k++) {
-			for (j = 0; j < height; j++) {
-				*uncptr0++ = *uncptr1;
-				uncptr1 += 8;
+static void bitplanetochunky(uint16 *w, uint8 colorDepth, uint8 *&dst) {
+	for (int j = 0; j < 8; j++) {
+		byte color1 = 0;
+		byte color2 = 0;
+		for (int p = 0; p < 5; ++p) {
+			if (w[p] & 0x8000) {
+				color1 |= 1 << p;
 			}
-			uncptr2++;
-			uncptr1 = uncptr2;
-		}
-		uncptr3 += (height * 8);
-		uncptr2 = uncptr3;
-		uncptr1 = uncptr2;
-	}
-	length *= 8;
-	cliplength = 0;
-	while(1) {
-		if (length == 1) {
-			*clipoutptr++ = 0xFF; bufoutend++;
-			*clipoutptr++ = *uncbuffer; bufoutend++;
-			cliplength += 2;
-			break;
-		}
-		x = *uncbuffer++;
-		y = *uncbuffer++;
-		length -= 2;
-		if (x == y) {
-			n = 1;
-			y = *uncbuffer++;
-			if (length == 0) {
-				*clipoutptr++ = n; bufoutend++;
-				*clipoutptr++ = x; bufoutend++;
-				cliplength += 2;
-				break;
+			if (w[p] & 0x4000) {
+				color2 |= 1 << p;
 			}
-			length--;
-			while (x == y) 	{
-				n++;
-				y = *uncbuffer++;
-				if (length == 0)
-					break;
-				length--;
-				if(n == 127)
-					break;
-			}
-			*clipoutptr++ = n; bufoutend++;
-			*clipoutptr++ = x; bufoutend++;
-			cliplength += 2;
-			uncbuffer--;
-			if (length == 0)
-				break;
-			length++;
+			w[p] <<= 2;
+		}
+		if (colorDepth > 4) {
+			*dst++ = color1;
+			*dst++ = color2;
 		} else {
-			n =- 1;
-			uncptr0 = clipoutptr;
-			clipoutptr++;
-			bufoutend++;
-			*clipoutptr++ = x; bufoutend++;
-			cliplength += 2;
-			x = y;
-			y = *uncbuffer++;
-			if (length == 0) {
-				*uncptr0 = n;
-				break;
-			}
-			length--;
-			while (x != y) {
-				if (n == -127)
-					break;
-				n--;
-				*clipoutptr++ = x; bufoutend++;
-				cliplength++;
-				x = y;
-				y = *uncbuffer++;
-				if (length == 0)
-					break;
-				length--;
-			}
-			*uncptr0 = n;
-			if (length == 0)
-				break;
-			uncbuffer -= 2;
-			length += 2;
+			*dst++ = (color1 << 4) | color2;
 		}
 	}
-	if (cliplength > (height * width / 2))
-		warning("Negative compression. Clip %d. %d bytes bigger.",clipnumber,(cliplength-(height*width/2)));
-	free(free_uncbuffer);
-	free(free_uncbfrout);
 }
 
-static void convertclip(uint32 offset, uint16 height, uint16 width) {
-	debug(10, "convertclip: height %d width %d", height, width);
+static void convertcompressedclip(const byte *src, byte *dst, uint8 colorDepth, uint16 height, uint16 width) {
+	debug(0, "convertcompressedclip: height %d width %d", height, width);
 
+	const byte *plane[kMaxColorDepth];
+	byte *uncptr[kMaxColorDepth];
 	uint32 length, i, j;
-	uint16 word1, word2, word3, word4;
-	byte outbyte, outbyte1;
-	clipptr = offset + buffer;
-	clipoutptr = bufoutend + bufferout;
-	WRITE_BE_UINT32(bufptrout, bufoutend); bufptrout += 4;
-	WRITE_BE_UINT16(bufptrout, height); bufptrout += 2;
-	WRITE_BE_UINT16(bufptrout, width); bufptrout += 2;
-	if (height > 32000) {
-		convertcompressedclip((uint16)(height - 32768), width);
-	} else {
-		width /= 16;
-		length = height * width;
-		for (i = 0; i < length; i++) {
-			word1 = READ_BE_UINT16(clipptr); clipptr += 2;
-			word2 = READ_BE_UINT16(clipptr); clipptr += 2;
-			word3 = READ_BE_UINT16(clipptr); clipptr += 2;
-			word4 = READ_BE_UINT16(clipptr); clipptr += 2;
-			for (j = 0; j < 8; j++) {
-				outbyte = ((word1 / 32768) + ((word2 / 32768) * 2) + ((word3 / 32768) * 4) + ((word4 / 32768) * 8));
-				word1 <<= 1;
-				word2 <<= 1;
-				word3 <<= 1;
-				word4 <<= 1;
-				outbyte1 = ((word1 / 32768) + ((word2 / 32768) * 2) + ((word3 / 32768) * 4) + ((word4 / 32768) * 8));
-				word1 <<= 1;
-				word2 <<= 1;
-				word3 <<= 1;
-				word4 <<= 1;
-				*clipoutptr++ = (outbyte * 16 + outbyte1); bufoutend++;
-			}
+	uint16 w[kMaxColorDepth];
+
+	byte *uncbfrout = (byte *)malloc(width * height);
+
+	length = (width + 15) / 16 * height;
+
+	for (i = 0; i < colorDepth; ++i) {
+		plane[i] = src + READ_BE_UINT16(src + i * 4) + READ_BE_UINT16(src + i * 4 + 2);
+		uncptr[i] = (uint8 *)malloc(length * 2);
+		uncompressplane(plane[i], uncptr[i], length);
+		plane[i] = uncptr[i];
+	}
+
+	byte *uncbfroutptr = uncbfrout;
+	for (i = 0; i < length; ++i) {
+		for (j = 0; j < colorDepth; ++j) {
+			w[j] = READ_BE_UINT16(plane[j]); plane[j] += 2;
 		}
+		bitplanetochunky(w, colorDepth, uncbfroutptr);
 	}
-}
 
-void AGOSEngine::convertAmiga(byte *srcBuf, int32 fileSize) {
-	// TODO Better detection of full screen images
-	if ((getGameType() == GType_WW && fileSize == 178624) ||
-		fileSize == 64800) {
-		byte *dstBuf = allocBlock (fileSize);
-		memcpy(dstBuf, srcBuf, fileSize);
-		return;
+	uncbfroutptr = uncbfrout;
+	const int chunkSize = colorDepth > 4 ? 16 : 8;
+	for (i = 0; i < width / 16; ++i) {
+		for (j = 0; j < height; ++j) {
+			memcpy(dst + width * chunkSize / 16 * j + chunkSize * i, uncbfroutptr, chunkSize);
+			uncbfroutptr += chunkSize;
+		}
 	}
 
-	uint32 clipoffset, outlength;
-	uint16 clipwidth, clipheight;
-	byte *clipsend;
+	free(uncbfrout);
+	for (i = 0; i < colorDepth; ++i) {
+		free(uncptr[i]);
+  	}
+}
 
-	debug(10, "convertAmiga: fizeSize %d", fileSize);
+byte *AGOSEngine::convertclip(const byte *src, bool is32Colors, uint height, uint width, byte flags) {
+	debug(0, "convertclip: is32Colors %d height %d width %d", is32Colors, height, width);
 
-	buffer = (byte *)malloc((int32)fileSize);
-	memcpy(buffer, srcBuf, fileSize);
-	bufptr = buffer;
+	static byte *_planarBuf = 0;
+	static uint32 _planarBufSize = 0; // FIXME move these variables to AGOSEngine
 
-	bufferout = (byte *)malloc((int32)(fileSize * 2));
-	bufptr = buffer;
-	bufptrout = bufferout;
-	clipnumber = 0;
-	while(1) {
-		clipoffset = READ_BE_UINT32(bufptr); bufptr += 4;
-		clipheight = READ_BE_UINT16(bufptr); bufptr += 2;
-		clipwidth = READ_BE_UINT16(bufptr); bufptr += 2;
-		if (clipoffset != 0)
-			break;
-		WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4;
-		WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4;
-		clipnumber++;
+	uint8 colorDepth = is32Colors ? 5 : 4;
+
+	uint32 length, i, j;
+
+	if (_planarBufSize < width * height) {
+		free(_planarBuf);
+		_planarBufSize = width * height;
+		_planarBuf = (byte *)malloc(_planarBufSize);
 	}
 
-	clipsend = buffer + clipoffset;
-	bufoutend = clipoffset;
-	while (bufptr <= clipsend) {
-		if (clipoffset != 0) {
-			convertclip(clipoffset, clipheight, clipwidth);
-		} else {
-			WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4;
-			WRITE_BE_UINT32(bufptrout, 0); bufptrout += 4;
+	byte *dst = _planarBuf; // can't re-use _videoBuf1 here as it's already used in vc10_flip
+	if (flags & 0x80) {
+		convertcompressedclip(src, dst, colorDepth, height, width);
+	} else {
+		length = (width + 15) / 16 * height;
+		for (i = 0; i < length; i++) {
+			uint16 w[kMaxColorDepth];
+			for (j = 0; j < colorDepth; ++j) {
+				w[j] = READ_BE_UINT16(src); src += 2;
+			}
+			bitplanetochunky(w, colorDepth, dst);
 		}
-		clipoffset = READ_BE_UINT32(bufptr); bufptr += 4;
-		clipheight = READ_BE_UINT16(bufptr); bufptr += 2;
-		clipwidth = READ_BE_UINT16(bufptr); bufptr += 2;
-		clipnumber++;
 	}
-	outlength = bufoutend;
-	debug(10, "convertAmiga: outlength %d",outlength);
 
-	byte *dstBuf = allocBlock (outlength);
-	memcpy(dstBuf, bufferout, outlength);
-	free(buffer);
-	free(bufferout);
+//	printf("Decode complete\n");
+	return _planarBuf;
 }
 
 } // End of namespace AGOS
Index: agos/agosgame.cpp
===================================================================
--- agos/agosgame.cpp	(revision 25419)
+++ agos/agosgame.cpp	(working copy)
@@ -16,7 +16,7 @@
 
 		GType_ELVIRA1,
 		GID_ELVIRA1,
-		GF_OLD_BUNDLE | GF_CRUNCHED
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
 	},
 
 	// Elvira 1 - English Amiga Demo
@@ -37,7 +37,7 @@
 
 		GType_ELVIRA1,
 		GID_ELVIRA1,
-		GF_OLD_BUNDLE | GF_CRUNCHED | GF_DEMO
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR | GF_DEMO
 	},
 
 	// Elvira 1 - English Atari ST Floppy
@@ -59,7 +59,7 @@
 
 		GType_ELVIRA1,
 		GID_ELVIRA1,
-		GF_OLD_BUNDLE | GF_CRUNCHED
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
 	},
 
 	// Elvira 1 - French Atari ST Floppy
@@ -81,7 +81,7 @@
 
 		GType_ELVIRA1,
 		GID_ELVIRA1,
-		GF_OLD_BUNDLE | GF_CRUNCHED
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
 	},
 
 	// Elvira 1 - English DOS Floppy
@@ -171,7 +171,7 @@
 
 		GType_ELVIRA2,
 		GID_ELVIRA2,
-		GF_OLD_BUNDLE | GF_CRUNCHED
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
 	},
 
 	// Elvira 2 - English Atari ST Floppy
@@ -195,7 +195,7 @@
 
 		GType_ELVIRA2,
 		GID_ELVIRA2,
-		GF_OLD_BUNDLE | GF_CRUNCHED
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
 	},
 
 	// Elvira 2 - French Atari ST Floppy
@@ -219,7 +219,7 @@
 
 		GType_ELVIRA2,
 		GID_ELVIRA2,
-		GF_OLD_BUNDLE | GF_CRUNCHED
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_PLANAR
 	},
 
 
@@ -365,7 +365,7 @@
 
 		GType_WW,
 		GID_WAXWORKS,
-		GF_OLD_BUNDLE | GF_CRUNCHED | GF_CRUNCHED_GAMEPC
+		GF_OLD_BUNDLE | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_PLANAR
 	},
 
 	// Waxworks - English DOS Floppy
@@ -459,7 +459,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1AMIGA,
-		GF_32COLOR | GF_CRUNCHED | GF_OLD_BUNDLE
+		GF_32COLOR | GF_CRUNCHED | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - English Amiga ECS Demo
@@ -481,7 +481,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1AMIGA,
-		GF_32COLOR | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_OLD_BUNDLE | GF_DEMO
+		GF_32COLOR | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_OLD_BUNDLE | GF_PLANAR | GF_DEMO
 	},
 
 	// Simon the Sorcerer 1 - English Amiga AGA Floppy
@@ -503,7 +503,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1AMIGA,
-		GF_CRUNCHED | GF_OLD_BUNDLE
+		GF_CRUNCHED | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - French Amiga AGA Floppy
@@ -525,7 +525,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1AMIGA,
-		GF_CRUNCHED | GF_OLD_BUNDLE
+		GF_CRUNCHED | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - German Amiga AGA Floppy
@@ -547,7 +547,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1AMIGA,
-		GF_CRUNCHED | GF_OLD_BUNDLE
+		GF_CRUNCHED | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - English Amiga CD32
@@ -569,7 +569,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1CD32,
-		GF_TALKIE | GF_OLD_BUNDLE
+		GF_TALKIE | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - English Amiga CD32 alternative?
@@ -591,7 +591,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1CD32,
-		GF_TALKIE | GF_OLD_BUNDLE
+		GF_TALKIE | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - English DOS Floppy Demo
Index: agos/gfx.cpp
===================================================================
--- agos/gfx.cpp	(revision 25419)
+++ agos/gfx.cpp	(working copy)
@@ -175,7 +175,7 @@
 
 	if (getGameType() != GType_FF && getGameType() != GType_PP) {
 		state->draw_width = state->width * 2;
-	} 
+	}
 
 	cur = state->x;
 	if (cur < 0) {
@@ -384,7 +384,7 @@
 			dst += _screenWidth;
 			src += state->width;
 		} while (--state->draw_height);
-	} 
+	}
 }
 
 void AGOSEngine::drawImages_Simon(VC10_state *state) {
@@ -408,6 +408,8 @@
 	state->surf_addr += xoffs + yoffs * state->surf2_pitch;
 
 	if (state->flags & kDFMasked) {
+		return;
+
 		byte *mask, *src, *dst;
 		byte h;
 		uint w;
@@ -529,6 +531,9 @@
 		}
 
 		if (state->flags & kDFCompressed) {
+
+			return;
+
 			uint w, h;
 			byte *src, *dst, *dstPtr;
 
@@ -589,6 +594,39 @@
 	}
 }
 
+void AGOSEngine::drawImages_Amiga(VC10_state *state) {
+	uint8 *dst;
+	const byte *src;
+	const uint16 *vlut = &_videoWindows[_windowNum * 4];
+
+	if (drawImages_clip(state) == 0)
+		return;
+
+	uint xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8;
+	uint yoffs = (vlut[1] - _videoWindows[17] + state->y);
+
+	state->surf2_addr += xoffs + yoffs * state->surf_pitch;
+	state->surf_addr += xoffs + yoffs * state->surf2_pitch;
+
+	if (state->flags & kDFMasked) {
+		warning("Unhandled kDFMasked");
+	} else {
+		src = state->depack_src + (state->width * state->y_skip * 16) + (state->x_skip * 8);
+		dst = state->surf_addr;
+
+		state->draw_width *= 2;
+
+		uint h = state->draw_height;
+		do {
+			for (uint i = 0; i != state->draw_width; i++)
+				if ((state->flags & kDFNonTrans) || src[i])
+					dst[i] = src[i] | state->palette;
+			dst += _screenWidth;
+			src += state->width * 16;
+		} while (--h);
+	}
+}
+
 void AGOSEngine::drawImages(VC10_state *state) {
 	const uint16 *vlut = &_videoWindows[_windowNum * 4];
 
