Index: emu/vid.c
===================================================================
--- emu/vid.c	(revision ca779254fbf0fda55b10534a9472c19126ec3e68)
+++ emu/vid.c	(revision e26a6322873655ebf2194f02b2dfb27a3f4ceeca)
@@ -64,5 +64,11 @@
 
 typedef struct {
-	int32_t x, y, w, h;
+	int32_t y, h;
+} ver_t;
+
+typedef struct {
+	int32_t x, w;
+	int32_t n_vers;
+	ver_t vers[SCR_H / 2];
 	uint16_t *mem;
 	bool tran;
@@ -87,5 +93,5 @@
 static SDL_atomic_t frame;
 
-static void rend_bm(uint16_t *vid, int32_t w, int32_t h, uint32_t *pix, int32_t pitch)
+static uint16_t *rend_bm(uint16_t *vid, int32_t w, int32_t h, uint32_t *pix, int32_t pitch)
 {
 	for (int32_t y = 0; y < h; ++y) {
@@ -101,7 +107,9 @@
 		pix += pitch / 4 - w;
 	}
-}
-
-static void rend_tx(uint16_t *vid, int32_t w, int32_t h, int32_t fon_h,
+
+	return vid;
+}
+
+static uint16_t *rend_tx(uint16_t *vid, int32_t w, int32_t h, int32_t fon_h,
 		uint32_t *pix, int32_t pitch)
 {
@@ -154,4 +162,6 @@
 		pix += pitch / 4 - w;
 	}
+
+	return vid;
 }
 
@@ -182,39 +192,42 @@
 
 		pal[0] = obj->tran ? pal[0] & 0xffffff00 : pal[0] | 0x000000ff;
-
-		SDL_Rect src = {
-			.x = 0, .y = 0, .w = obj->w, .h = obj->h
-		};
-
-		void *buf;
-		int32_t pitch;
-
-		if (SDL_LockTexture(tex, &src, &buf, &pitch) < 0) {
-			fail("SDL_LockTexture() failed: %s", SDL_GetError());
-		}
-
-		if (obj->fon_h < 0) {
-			rend_bm(obj->mem, obj->w, obj->h, buf, pitch);
-		}
-		else {
-			rend_tx(obj->mem, obj->w, obj->h, obj->fon_h, buf, pitch);
-		}
-
-		SDL_UnlockTexture(tex);
-
-		SDL_Rect dst = {
-			.x = SCALE(obj->x), .y = SCALE(obj->y),
-			.w = SCALE(obj->w), .h = SCALE(obj->h)
-		};
-
-		ver2("vid rend %d %dx%d -> (%d, %d) (%d, %d) %dx%d",
-				i,
-				obj->w, obj->h,
-				obj->x, obj->y,
-				SCALE(obj->x), SCALE(obj->y),
-				SCALE(obj->w), SCALE(obj->h));
-
-		if (SDL_RenderCopy(ren, tex, &src, &dst) < 0) {
-			fail("SDL_RenderCopy() failed: %s", SDL_GetError());
+		uint16_t *m = obj->mem;
+
+		for (int32_t k = 0; k < obj->n_vers; ++k) {
+			SDL_Rect src = {
+				.x = 0, .y = 0, .w = obj->w, .h = obj->vers[k].h
+			};
+
+			void *buf;
+			int32_t pitch;
+
+			if (SDL_LockTexture(tex, &src, &buf, &pitch) < 0) {
+				fail("SDL_LockTexture() failed: %s", SDL_GetError());
+			}
+
+			if (obj->fon_h < 0) {
+				m = rend_bm(m, obj->w, obj->vers[k].h, buf, pitch);
+			}
+			else {
+				m = rend_tx(m, obj->w, obj->vers[k].h, obj->fon_h, buf, pitch);
+			}
+
+			SDL_UnlockTexture(tex);
+
+			SDL_Rect dst = {
+				.x = SCALE(obj->x), .y = SCALE(obj->vers[k].y),
+				.w = SCALE(obj->w), .h = SCALE(obj->vers[k].h)
+			};
+
+			ver2("vid rend %d %d %dx%d -> (%d, %d) (%d, %d) %dx%d",
+					i, k,
+					obj->w, obj->vers[k].h,
+					obj->x, obj->vers[k].y,
+					SCALE(obj->x), SCALE(obj->vers[k].y),
+					SCALE(obj->w), SCALE(obj->vers[k].h));
+
+			if (SDL_RenderCopy(ren, tex, &src, &dst) < 0) {
+				fail("SDL_RenderCopy() failed: %s", SDL_GetError());
+			}
 		}
 	}
@@ -357,5 +370,5 @@
 		}
 
-		if (n_flips == 1) {
+		if (n_flips % 2 != 0) {
 			flips[n_flips] = SCR_H;
 			++n_flips;
@@ -383,13 +396,18 @@
 
 		obj->x = x;
-		obj->y = flips[0];
 		obj->w = w;
-		obj->h = flips[1] - flips[0];
+		obj->n_vers = n_flips / 2;
+
+		for (int32_t k = 0; k < obj->n_vers; ++k) {
+			obj->vers[k].y = flips[2 * k];
+			obj->vers[k].h = flips[2 * k + 1] - flips[2 * k];
+		}
+
 		obj->mem = mem + off;
 		obj->tran = tde;
 		obj->fon_h = fon_h;
 
-		ver2("vid obj %d %c %c %d:%d %d+%d 0x%05x",
-				i, cb ? 'c' : 'b', tde ? 't' : '-', flips[0], flips[1], x, w, off);
+		ver2("vid obj %d %c %c %d:%d %d+%d %d 0x%05x",
+				i, cb ? 'c' : 'b', tde ? 't' : '-', flips[0], flips[1], x, w, fon_h, off);
 
 		++n_objs;
