Index: emu/lcd.c
===================================================================
--- emu/lcd.c	(revision 18e37d6b1462414e9ab922d0c90c363051c24772)
+++ emu/lcd.c	(revision cd50b8c77a90c07c307cd4025a98bb8e0921bd65)
@@ -27,7 +27,9 @@
 #define WIN_H (64 * 2)
 
-#define CON_BGR 0x00000000
-#define CON_DRW 0xFFFFFFFF
-#define CON_FGR ((SDL_Color){ .r = 255, .b = 255, .g = 255, .a = 255 })
+#define GFX_BGR 0x00000000
+#define GFX_FGR 0xFFFFFFFF
+
+#define TXT_BGR 0x000000FF
+#define TXT_FGR ((SDL_Color){ .r = 255, .b = 255, .g = 255, .a = 255 })
 
 #define REG_ARG 0
@@ -59,4 +61,5 @@
 #define GFX_W 85
 #define GFX_H 64
+#define GFX_PIX 6
 
 #define BASE_TXT 0x0000
@@ -78,7 +81,7 @@
 static int32_t fon_w, fon_h;
 
-static int32_t sur_w, sur_h;
-static SDL_Surface *sur;
-static SDL_Surface *gfx_sur;
+static int32_t txt_w, txt_h;
+static SDL_Surface *txt;
+static SDL_Texture *gfx;
 
 static int32_t com;
@@ -101,10 +104,54 @@
 	last = now;
 
-	if (SDL_FillRect(sur, NULL, CON_BGR) < 0) {
+	void *buf;
+	int32_t pitch;
+
+	if (SDL_LockTexture(gfx, NULL, &buf, &pitch) < 0) {
+		fail("SDL_LockTexture() failed: %s", SDL_GetError());
+	}
+
+	uint32_t *pix = buf;
+
+	for (int32_t y = 0; y < GFX_H; ++y) {
+		for (int32_t x = 0; x < GFX_W * GFX_PIX; ++x) {
+			*pix++ = GFX_BGR;
+		}
+
+		pix += pitch / 4 - GFX_W * GFX_PIX;
+	}
+
+	if (SDL_AtomicGet(&ena) == 0) {
+		SDL_UnlockTexture(gfx);
+
+		if (SDL_RenderCopy(ren, gfx, NULL, NULL) < 0) {
+			fail("SDL_RenderCopy() failed: %s", SDL_GetError());
+		}
+
+		SDL_RenderPresent(ren);
+		return;
+	}
+
+	pix = buf;
+
+	for (int32_t y = 0; y < GFX_H; ++y) {
+		for (int32_t x = 0; x < GFX_W; ++x) {
+			uint8_t b = mem_gfx[y * GFX_W + x];
+
+			for (int32_t p = 0; p < GFX_PIX; ++p) {
+				if ((b & (1 << (7 - p))) != 0) {
+					*pix = GFX_FGR;
+				}
+
+				++pix;
+			}
+		}
+
+		pix += pitch / 4 - GFX_W * GFX_PIX;
+	}
+
+	SDL_UnlockTexture(gfx);
+
+	if (SDL_FillRect(txt, NULL, TXT_BGR) < 0) {
 		fail("SDL_FillRect() failed: %s", SDL_GetError());
-	}
-
-	if (SDL_AtomicGet(&ena) == 0) {
-		return;
 	}
 
@@ -116,10 +163,5 @@
 		}
 
-		for (int32_t x = 0; x < TXT_W; ++x) {
-			uint8_t c = mem_txt[y * TXT_W + x];
-			line[x] = (char)(c == 0x00 ? ' ' : c);
-		}
-
-		line[TXT_W] = 0;
+		memcpy(line, mem_txt + y * TXT_W, TXT_W);
 
 		if (SDL_UnlockMutex(cpu_mutex) < 0) {
@@ -127,5 +169,13 @@
 		}
 
-		SDL_Surface *lin = TTF_RenderText_Blended(fon, line, CON_FGR);
+		for (int32_t x = 0; x < TXT_W; ++x) {
+			if (line[x] == 0x00) {
+				line[x] = ' ';
+			}
+		}
+
+		line[TXT_W] = 0;
+
+		SDL_Surface *lin = TTF_RenderText_Blended(fon, line, TXT_FGR);
 
 		if (lin == NULL) {
@@ -133,5 +183,5 @@
 		}
 
-		if (SDL_BlitSurface(lin, NULL, sur, &(SDL_Rect){
+		if (SDL_BlitSurface(lin, NULL, txt, &(SDL_Rect){
 			.x = 0,
 			.y = y * fon_h,
@@ -145,5 +195,5 @@
 	}
 
-	SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, sur);
+	SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, txt);
 
 	if (tex == NULL) {
@@ -155,38 +205,10 @@
 	}
 
-	for (int32_t y = 0; y < GFX_H * GFX_W; ++y) {
-		for (int32_t p = 7; p > 1; --p) {
-			uint32_t col = CON_BGR;
-			if ((mem_gfx[y] & (1 << p)) > 0) {
-				col = CON_DRW;
-			}
-
-			if (SDL_FillRect(gfx_sur, &(SDL_Rect){
-				.x = y % 85 * fon_w + (8 - p) * fon_w / 6,
-				.y = y / 85 * fon_h / 8,
-				.w = fon_w / 6 + 1,
-				.h = fon_h / 8 + 1
-			}, col) < 0) {
-				fail("SDL_FillRect() failed: %s", SDL_GetError());
-			}
-		}
-	}
-
-	SDL_Texture *gfx_tex = SDL_CreateTextureFromSurface(ren, gfx_sur);
-
-	if (gfx_tex == NULL) {
-		fail("SDL_CreateTextureFromSurface() failed: %s", SDL_GetError());
-	}
-
-	if (SDL_SetTextureBlendMode(gfx_tex, SDL_BLENDMODE_ADD) < 0) {
-		fail("SDL_SetTextureBlendMode() failed: %s", SDL_GetError());
-	}
-
-	if (SDL_RenderCopy(ren, gfx_tex, NULL, NULL) < 0) {
+	SDL_DestroyTexture(tex);
+
+	if (SDL_RenderCopy(ren, gfx, NULL, NULL) < 0) {
 		fail("SDL_RenderCopy() failed: %s", SDL_GetError());
 	}
 
-	SDL_DestroyTexture(tex);
-	SDL_DestroyTexture(gfx_tex);
 	SDL_RenderPresent(ren);
 }
@@ -196,5 +218,5 @@
 	ver("lcd init");
 
-	win = SDL_CreateWindow("Front LCD", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
+	win = SDL_CreateWindow("LCD", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
 			WIN_W, WIN_H, 0);
 
@@ -209,6 +231,14 @@
 	}
 
-	SDL_AtomicSet(&frame, 1);
-	SDL_AtomicSet(&ena, 0);
+	gfx = SDL_CreateTexture(ren, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING,
+			GFX_W * GFX_PIX, GFX_H);
+
+	if (gfx == NULL) {
+		fail("SDL_CreateTexture() failed: %s", SDL_GetError());
+	}
+
+	if (SDL_SetTextureBlendMode(gfx, SDL_BLENDMODE_BLEND) < 0) {
+		fail("SDL_SetTextureBlendMode() failed: %s", SDL_GetError());
+	}
 
 	SDL_RWops *ops = SDL_RWFromFile(font, "rb");
@@ -230,21 +260,15 @@
 	}
 
-	sur_w = TXT_W * fon_w;
-	sur_h = TXT_H * fon_h;
-
-	sur = SDL_CreateRGBSurface(0, sur_w, sur_h, 32, 0, 0, 0, 0);
-
-	if (sur == NULL) {
+	txt_w = TXT_W * fon_w;
+	txt_h = TXT_H * fon_h;
+
+	txt = SDL_CreateRGBSurfaceWithFormat(0, txt_w, txt_h, 32, SDL_PIXELFORMAT_RGBA8888);
+
+	if (txt == NULL) {
 		fail("SDL_CreateRGBSurface() failed: %s", SDL_GetError());
 	}
 
-	gfx_sur = SDL_CreateRGBSurface(0, sur_w, sur_h, 32, 0, 0, 0, 0);
-
-	if (gfx_sur == NULL) {
-		fail("SDL_CreateRGBSurface() failed: %s", SDL_GetError());
-	}
-
-	for (int32_t y = 0; y < TXT_W * TXT_H; ++y) {
-		mem_txt[y] = ' ';
+	for (int32_t i = 0; i < TXT_W * TXT_H; ++i) {
+		mem_txt[i] = ' ';
 	}
 }
@@ -254,7 +278,8 @@
 	ver("lcd quit");
 
-	SDL_FreeSurface(sur);
-	SDL_FreeSurface(gfx_sur);
+	SDL_FreeSurface(txt);
 	TTF_CloseFont(fon);
+
+	SDL_DestroyTexture(gfx);
 
 	SDL_DestroyRenderer(ren);
@@ -272,5 +297,5 @@
 	ver2("lcd rd %u:%d", off, sz * 8);
 
-	if (sz != 1 || off > 0) {
+	if (sz != 1 || off != 1) {
 		fail("invalid lcd rd %u:%d", off, sz * 8);
 	}
Index: emu/vid.c
===================================================================
--- emu/vid.c	(revision 18e37d6b1462414e9ab922d0c90c363051c24772)
+++ emu/vid.c	(revision cd50b8c77a90c07c307cd4025a98bb8e0921bd65)
@@ -231,5 +231,5 @@
 	ver("vid init");
 
-	win = SDL_CreateWindow("Display", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
+	win = SDL_CreateWindow("Screen", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
 			WIN_W, WIN_H, 0);
 
