--- 8086tiny.c	2014-02-05 11:34:12.000000000 +0800
+++ 8086tiny.qhack.c	2014-02-06 09:19:12.763250000 +0800
@@ -290,10 +290,15 @@
 
 	// Set DL equal to the boot device: 0 for the FD, or 0x80 for the HD. Normally, boot from the FD.
 	// But, if the HD image file is prefixed with @, then boot from the HD.
 	regs8[REG_DL] = ((argc > 3) && (*argv[3] == '@')) ? argv[3]++, 0x80 : 0;
 
+	// set hostiswin to 1 for windows host
+#ifdef _WIN32
+	regs8[REG_DH] = 1;
+#endif
+
 	// Open BIOS (file id disk[2]), floppy disk image (disk[1]), and hard disk image (disk[0]) if specified
 	for (file_index = 3; file_index;)
 		disk[--file_index] = *++argv ? open(*argv, 32898) : 0;
 
 	// Set CX:AX equal to the hard disk image size, if present
@@ -567,10 +572,11 @@
 					i_d || (regs16[REG_SP] += i_data0)
 			NEXT_OPCODE // MOV r/m, immed
 				R_M_OP(op_from_addr[mem], =, i_data2)
 			NEXT_OPCODE // IN AL/AX, DX/imm8
 				io_ports[0x3DA] ^= 9,
+				io_ports[0x340] = io_ports[0x341] = io_ports[0x3E0] = io_ports[0x3E1] = io_ports[0x24F] = io_ports[0x924F] = io_ports[0x927F] = io_ports[0x27F] = 0xFF, // quickfix for misdetecting ACER Pattern Card
 				scratch_uint = extra ? regs16[REG_DX] : (unsigned char)i_data0,
 				scratch_uint == 0x3D5 && io_ports[0x3D4] == 15 && (io_ports[0x3D5] = (mem[0x49E]*80 + mem[0x49D]) & 0xFF), // CRT cursor position (low byte)
 				scratch_uint == 0x3D5 && io_ports[0x3D4] == 14 && (io_ports[0x3D5] = ((mem[0x49E]*80 + mem[0x49D]) & 0xFF00) >> 8),  // " (high byte)
 				R_M_OP(regs8[REG_AL], =, io_ports[scratch_uint])
 			NEXT_OPCODE // OUT DX/imm8, AL/AX
@@ -706,11 +712,11 @@
 			if (io_ports[0x3B8] & 2)
 			{
 				// Hercules card is in graphics mode. If we don't already have an SDL window open, set it up
 				SDL_PumpEvents();
 				if (!sdl_screen)
-					sdl_screen = SDL_SetVideoMode(GRAPHICS_X, GRAPHICS_Y, 32, 0);
+					sdl_screen = SDL_SetVideoMode(GRAPHICS_X, GRAPHICS_Y, 32, 0), SDL_WM_SetCaption("8086tiny graphics output","8086tiny");
 
 				// Update the display from video RAM
 				video_mem_update();
 			}
 			else if (sdl_screen) // Application has gone back to text mode, so close the SDL window
