shithub: riscv

Download patch

ref: 447672be5c1e3e0b972c793d243383c429240b71
parent: f14e277c584f6f7d1967bb005976cd831b4b74de
author: aiju <devnull@localhost>
date: Tue Mar 28 15:43:09 EDT 2017

add games/blit

--- /dev/null
+++ b/sys/src/games/blit/blit.c
@@ -1,0 +1,219 @@
+#include <u.h>
+#include <libc.h>
+#include <thread.h>
+#include <draw.h>
+#include <keyboard.h>
+#include <mouse.h>
+#include <cursor.h>
+#include "dat.h"
+#include "fns.h"
+
+int baud = 40000;
+int scale = 1;
+Rectangle picr;
+Image *tmp, *bg;
+Channel *keych, *uartrxch, *uarttxch;
+Mousectl *mc;
+int daddr;
+u16int dstat;
+u8int invert;
+int vblctr, uartrxctr;
+Rectangle updated;
+u32int colbgv, colfgv;
+Image *colbg, *colfg;
+int realcolors;
+
+static void
+screeninit(void)
+{
+	Point p;
+
+	p = divpt(addpt(screen->r.min, screen->r.max), 2);
+	picr = (Rectangle){subpt(p, Pt(scale * SX/2, scale * SY/2)), addpt(p, Pt(scale * SX/2, scale * SY/2))};
+	if(tmp != nil) freeimage(tmp);
+	tmp = allocimage(display, Rect(0, 0, scale * SX, scale > 1 ? 1 : scale * SY), CHAN1(CMap, 1), scale > 1, 0);
+	if(bg != nil) freeimage(bg);
+	bg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, 0xCCCCCCFF);
+	colbg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, colbgv);
+	colfg = allocimage(display, Rect(0, 0, 1, 1), screen->chan, 1, colfgv);	
+	draw(screen, screen->r, bg, nil, ZP);
+	updated = Rect(0, 0, SX, SY);	
+}
+
+static void
+redraw(void)
+{
+	static uchar pic[SX*SY/8];
+	ushort *p;
+	uchar *q;
+	int o, n;
+	Mouse m;
+	Rectangle r;
+		
+	if(nbrecvul(mc->resizec) > 0){
+		if(getwindow(display, Refnone) < 0)
+			sysfatal("resize failed: %r");
+		screeninit();
+	}
+	while(nbrecv(mc->c, &m) > 0){
+		if(ptinrect(m.xy, picr)){
+			mousex = picr.max.x - m.xy.x - 1;
+			mousey = picr.max.y - m.xy.y - 1;
+		}
+		n = m.buttons >> 2 & 1 | m.buttons & 2 | m.buttons << 2 & 4;
+		if(n != mousebut){
+			mousebut = n;
+			irq |= INTMOUSE;
+		}
+	}
+
+	if(Dy(updated) <= 0 || Dx(updated) <= 0)
+		return;
+
+	assert(daddr + sizeof(pic) <= sizeof(ram));
+
+	r = tmp->r;
+	if(updated.min.y > r.min.y)
+		r.min.y = updated.min.y;
+	if(updated.max.y < r.max.y)
+		r.max.y = updated.max.y;
+
+	o = r.min.y*(SX/8);
+	p = ram + (daddr + o) / 2;
+	q = pic + o;
+	for(n = Dy(r)*(SX/16); --n >= 0; ){
+		*q++ = invert ^ *p >> 8;
+		*q++ = invert ^ *p++;
+	}
+
+	loadimage(tmp, r, pic+o, Dy(r)*(SX/8));
+	if(realcolors){
+		draw(screen, rectaddpt(r, picr.min), colfg, nil, r.min);
+		draw(screen, rectaddpt(r, picr.min), colbg, tmp, r.min);
+	}else
+		draw(screen, rectaddpt(r, picr.min), tmp, nil, r.min);
+	updated = Rect(SX, SY, 0, 0);
+	flushimage(display, 1);
+}
+
+static uchar
+keymap[] = {
+	[Kup-KF] 0xf1,
+	[Kdown-KF] 0xf2,
+	[Kleft-KF] 0xf3,
+	[Kright-KF] 0xf4,
+	[1] 0xf6, /* PF1 */
+	[2] 0xf7, /* PF2 */
+	[3] 0xf8, /* PF3 */
+	[4] 0xf9, /* PF4 */
+	[12] 0xfe, /* SET-UP */
+	[Kpgdown-KF] 0xb0, /* SCROLL */
+	[Kins-KF] 0xe0, /* BREAK */
+};
+
+static void
+keyproc(void *)
+{
+	int fd, cfd, ch, rc;
+	static char buf[256];
+	char *p;
+	Rune r;
+
+	fd = open("/dev/cons", OREAD);
+	if(fd < 0)
+		sysfatal("open: %r");
+	cfd = open("/dev/consctl", OWRITE);
+	if(cfd < 0)
+		sysfatal("open: %r");
+	fprint(cfd, "rawon");
+	for(;;){
+		rc = read(fd, buf, sizeof(buf) - 1);
+		if(rc <= 0)
+			sysfatal("read /dev/cons: %r");
+		for(p = buf; p < buf + rc && (p += chartorune(&r, p)); ){
+			if(r == Kend){
+				close(fd);
+				threadexitsall(nil);
+			}
+			ch = r;
+			if(ch == '\n') ch = '\r';
+			else if(ch >= KF){
+				if(ch >= KF + nelem(keymap)) continue;
+				ch = keymap[ch - KF];
+				if(ch == 0) continue;
+			}else if(ch >= 0x80) continue;
+			send(keych, &ch);
+		}
+	}
+}
+
+void
+usage(void)
+{
+	fprint(2, "usage: %s [-b baud] [-C bg,fg] [-d] [-t [net!]host[!service]]\n", argv0);
+	threadexitsall("usage");
+}
+
+void
+threadmain(int argc, char **argv)
+{
+	int n;
+	static Cursor blank;
+	char *telnet;
+	char *p;
+	extern int diag;
+	
+	telnet = nil;
+	ARGBEGIN{
+	case 'b':
+		baud = strtol(EARGF(usage()), &p, 0);
+		if(*p != 0) usage();
+		break;
+	case 't':
+		telnet = EARGF(usage());
+		break;
+	case 'C':
+		if(realcolors) usage();
+		realcolors++;
+		p = EARGF(usage());
+		colbgv = strtol(p, &p, 16) << 8 | 0xff;
+		if(*p++ != ',') usage();
+		colfgv = strtol(p, &p, 16) << 8 | 0xff;
+		if(*p != 0) usage();
+		break;		
+	case 'd':
+		diag++;
+		break;
+	default: usage();
+	}ARGEND;
+	if(argc != 0) usage();
+	
+	keych = chancreate(sizeof(int), 64);
+	uartrxch = chancreate(sizeof(int), 128);
+	uarttxch = chancreate(sizeof(int), 128);
+	if(telnet != nil) telnetinit(telnet);
+	meminit();
+	if(initdraw(nil, nil, nil) < 0)
+		sysfatal("initdraw: %r");
+	
+	screeninit();
+	proccreate(keyproc, nil, mainstacksize);
+	mc = initmouse(nil, screen);
+	if(mc == nil)
+		sysfatal("initmouse: %r");
+	setcursor(mc, &blank);
+
+	cpureset();
+	for(;;){
+		keycheck();
+		n = step();
+		vblctr += n;
+		if(vblctr >= VBLDIV){
+			irq |= INTVBL;
+			redraw();
+			vblctr -= VBLDIV;
+		}
+		if(uartrxctr > 0)
+			uartrxctr -= n;
+	}
+}
--- /dev/null
+++ b/sys/src/games/blit/cpu.c
@@ -1,0 +1,1184 @@
+#include <u.h>
+#include <libc.h>
+#include <thread.h>
+#include "dat.h"
+#include "fns.h"
+
+enum {
+	FLAGS = 1<<13,
+	FLAGX = 16,
+	FLAGN = 8,
+	FLAGZ = 4,
+	FLAGV = 2,
+	FLAGC = 1,
+};
+
+u32int r[16], pc, curpc;
+u32int asp, irq, stop;
+extern u32int irql[8];
+u32int irqla[8];
+u16int rS;
+static u32int op;
+int trace, tim;
+#define ra (r+8)
+
+static void
+undef(void)
+{
+	sysfatal("undefined opcode %#o at pc=%#.6x", op, curpc);
+}
+
+static u16int
+fetch16(void)
+{
+	u16int v;
+	
+	v = memread(pc);
+	pc += 2;
+	return v;
+}
+
+static u32int
+fetch32(void)
+{
+	u32int v;
+	
+	v = fetch16() << 16;
+	return v | fetch16();
+}
+
+static void
+push16(u16int u)
+{
+	ra[7] -= 2;
+	memwrite(ra[7], u, -1);
+}
+
+static u16int
+pop16(void)
+{
+	u16int v;
+	
+	v = memread(ra[7]);
+	ra[7] += 2;
+	return v;
+}
+
+static void
+push32(u32int u)
+{
+	ra[7] -= 4;
+	memwrite(ra[7], u >> 16, -1);
+	memwrite(ra[7] + 2, u, -1);
+}
+
+static u32int
+pop32(void)
+{
+	u32int v;
+	v = memread(ra[7]) << 16;
+	v |= memread(ra[7] + 2);
+	ra[7] += 4;
+	return v;
+}
+
+static vlong
+amode(int m, int n, int s)
+{
+	u16int w;
+	u32int v;
+	
+	m &= 7;
+	n &= 7;
+	s &= 3;
+	if(n == 7 && s == 0)
+		s++;
+	switch(m){
+	case 0:
+		return ~n;
+	case 1:
+		return ~(n+8);
+	case 2:
+		tim += s == 2 ? 8 : 4;
+		return ra[n];
+	case 3:
+		v = ra[n];
+		ra[n] += 1<<s;
+		tim += s == 2 ? 8 : 4;
+		return v;
+	case 4:
+		tim += s == 2 ? 10 : 6;
+		return ra[n] -= 1<<s;
+	case 5:
+		tim += s == 2 ? 12 : 8;
+		return (u32int)(ra[n] + (s16int)fetch16());
+	case 6:
+		tim += s == 2 ? 14 : 10;
+		w = fetch16();
+		v = r[w >> 12];
+		if((w & 1<<11) == 0)
+			v = (s16int)v;
+		return (u32int)(ra[n] + v + (s8int)w);
+	case 7:
+		switch(n){
+		case 0:
+			tim += s == 2 ? 12 : 8;
+			return (u32int)(s16int)fetch16();
+		case 1:
+			tim += s == 2 ? 16 : 12;
+			return fetch32();
+		case 2:
+			tim += s == 2 ? 12 : 8;
+			v = fetch16();
+			return (u32int)(pc + (s16int)v - 2);
+		case 3:
+			tim += s == 2 ? 14 : 4;
+			w = fetch16();
+			v = r[w >> 12];
+			if((w & 1<<11) == 0)
+				v = (s16int)v;
+			return (u32int)(pc + v + (s8int)w - 2);
+		case 4:
+			tim += s == 2 ? 8 : 4;
+			v = pc;
+			pc += 1<<s;
+			if(s == 0)
+				v = pc++;
+			return v;
+		default:
+			undef();
+		}
+	default:
+		undef();
+	}
+	return 0;
+}
+
+static u32int
+rmode(vlong a, int s)
+{
+	u32int v;
+
+	if(a >= 0){
+		switch(s & 3){
+		case 0:
+			v = memread(a);
+			if((a & 1) == 0)
+				v >>= 8;
+			return (s8int) v;
+		default:
+			return (s16int) memread(a);
+		case 2:
+			v = memread(a) << 16;
+			return v | memread(a + 2);
+		}
+	}
+	v = r[~a];
+	switch(s & 3){
+	case 0: return (s8int) v;
+	case 1: return (s16int) v;
+	default: return v;
+	}
+}
+
+static void
+wmode(vlong a, int s, u32int v)
+{
+	int n;
+
+	if(a >= 0){
+		switch(s & 3){
+		case 0:
+			memwrite(a, (u8int)v | (u8int)v << 8, (a & 1) != 0 ? 0xff : 0xff00);
+			return;
+		default:
+			memwrite(a, v, -1);
+			return;
+		case 2:
+			memwrite(a, v >> 16, -1);
+			memwrite(a + 2, v, -1);
+			return;
+		}
+	}
+	n = ~a;
+	if(n < 8){
+		switch(s){
+		case 0: r[n] = r[n] & 0xffffff00 | v & 0xff; break;
+		case 1: r[n] = r[n] & 0xffff0000 | v & 0xffff; break;
+		default: r[n] = v;
+		}
+	}else{
+		if(s == 1)
+			v = (s16int) v;
+		r[n] = v;
+	}
+}
+
+static void
+nz(u32int v, int s)
+{
+	switch(s){
+	case 0: v = (s8int) v; break;
+	case 1: v = (s16int) v; break;
+	}
+	rS &= ~(FLAGC|FLAGN|FLAGV|FLAGZ);
+	if(v == 0)
+		rS |= FLAGZ;
+	if((s32int)v < 0)
+		rS |= FLAGN;
+}
+
+static u32int
+add(u32int u, u32int w, int c, int s)
+{
+	u64int v;
+
+	rS &= ~(FLAGN|FLAGV|FLAGC);
+	switch(s){
+	case 0:
+		v = (u8int)w + (u8int)u + c;
+		if(v >= 0x100)
+			rS |= FLAGC;
+		if((v & 0x80) != 0)
+			rS |= FLAGN;
+		if((~(w ^ u) & (v ^ u) & 0x80) != 0)
+			rS |= FLAGV;
+		if((u8int)v != 0)
+			rS &= ~FLAGZ;
+		break;
+	case 1:
+		v = (u16int)w + (u16int)u + c;
+		if(v >= 0x10000)
+			rS |= FLAGC;
+		if((v & 0x8000) != 0)
+			rS |= FLAGN;
+		if((~(w ^ u) & (v ^ u) & 0x8000) != 0)
+			rS |= FLAGV;
+		if((u16int)v != 0)
+			rS &= ~FLAGZ;
+		break;
+	default:
+		v = (u64int)w + u + c;
+		if((v >> 32) != 0)
+			rS |= FLAGC;
+		if((v & 0x80000000) != 0)
+			rS |= FLAGN;
+		if((~(w ^ u) & (v ^ u) & 0x80000000) != 0)
+			rS |= FLAGV;
+		if((u32int)v != 0)
+			rS &= ~FLAGZ;
+		break;
+	}
+	return v;
+} 
+
+static u32int
+sub(u32int u, u32int w, int c, int s)
+{
+	u64int v;
+
+	rS &= ~(FLAGN|FLAGV|FLAGC);
+	switch(s){
+	case 0:
+		v = (u8int)u - (u8int)w - c;
+		if(v >= 0x100)
+			rS |= FLAGC;
+		if((v & 0x80) != 0)
+			rS |= FLAGN;
+		if(((w ^ u) & (v ^ u) & 0x80) != 0)
+			rS |= FLAGV;
+		if((u8int)v != 0)
+			rS &= ~FLAGZ;
+		break;
+	case 1:
+		v = (u16int)u - (u16int)w - c;
+		if(v >= 0x10000)
+			rS |= FLAGC;
+		if((v & 0x8000) != 0)
+			rS |= FLAGN;
+		if(((w ^ u) & (v ^ u) & 0x8000) != 0)
+			rS |= FLAGV;
+		if((u16int)v != 0)
+			rS &= ~FLAGZ;
+		break;
+	default:
+		v = (u64int)u - w - c;
+		if((v >> 32) != 0)
+			rS |= FLAGC;
+		if((v & 0x80000000) != 0)
+			rS |= FLAGN;
+		if(((w ^ u) & (v ^ u) & (1<<31)) != 0)
+			rS |= FLAGV;
+		if((u32int)v != 0)
+			rS &= ~FLAGZ;
+		break;
+	}
+	return v;
+}
+
+static int
+cond(int n)
+{
+	switch(n){
+	case 0: return 1; break;
+	default: return 0; break;
+	case 2: return (rS & (FLAGC|FLAGZ)) == 0; break;
+	case 3: return (rS & (FLAGC|FLAGZ)) != 0; break;
+	case 4: return (rS & FLAGC) == 0; break;
+	case 5: return (rS & FLAGC) != 0; break;
+	case 6: return (rS & FLAGZ) == 0; break;
+	case 7: return (rS & FLAGZ) != 0; break;
+	case 8: return (rS & FLAGV) == 0; break;
+	case 9: return (rS & FLAGV) != 0; break;
+	case 10: return (rS & FLAGN) == 0; break;
+	case 11: return (rS & FLAGN) != 0; break;
+	case 12: return ((rS ^ (rS << 2)) & FLAGN) == 0; break;
+	case 13: return ((rS ^ (rS << 2)) & FLAGN) != 0; break;
+	case 14: return ((rS ^ (rS << 2)) & FLAGN) == 0 && (rS & FLAGZ) == 0; break;
+	case 15: return ((rS ^ (rS << 2)) & FLAGN) != 0 || (rS & FLAGZ) != 0; break;
+	}
+}
+
+static u32int
+rot(u32int v, int m, int n, int s)
+{
+	int l, ll, x, vf;
+	u32int msb;
+	
+	msb = 1 << ((8 << s) - 1);
+	v &= (msb << 1) - 1;
+	if(m == 0)
+		x = (v & msb) != 0;
+	else
+		x = 0;
+	if((m & 6) == 4)
+		ll = l = (rS & FLAGX) != 0;
+	else
+		ll = l = 0;
+	vf = 0;
+	while(n--){
+		if((m & 1) == 0){
+			l = v & 1;
+			v >>= 1;
+		}else{
+			l = (v & msb) != 0;
+			v <<= 1;
+		}
+		rS = rS & ~FLAGX | l << 4;
+		if(m >= 6)
+			x = l;
+		else if(m >= 4){
+			x = ll;
+			ll = l;
+		}
+		if((m & 1) == 0){
+			if(x != 0)
+				v |= msb;
+		}else
+			v |= x;
+		vf |= x ^ (v & msb) != 0;
+		tim += 2;
+	}
+	nz(v, s);
+	rS |= l;
+	if(m <= 1 && vf)
+		rS |= FLAGV;
+	tim += s == 2 ? 8 : 6;
+	return v;
+}
+
+static u8int
+addbcd(u8int a, u8int b)
+{
+	int r;
+	
+	r = (a & 0xf) + (b & 0xf) + ((rS & FLAGX) != 0);
+	if(r > 0x09) r += 0x06;
+	if(r > 0x1f) r -= 0x10;
+	r += (a & 0xf0) + (b & 0xf0);
+	if(r > 0x9f) r += 0x60;
+	if((u8int)r != 0)
+		rS &= ~FLAGZ;
+	if(r > 0xff)
+		rS |= FLAGC|FLAGX;
+	else
+		rS &= ~(FLAGC|FLAGX);
+	return r;
+}
+
+static u8int
+subbcd(u8int a, u8int b)
+{
+	int x;
+	
+	x = (a & 0xf) + (~b & 0xf) + ((rS & FLAGX) == 0);
+	if(x < 0x10) x -= 0x06;
+	if(x < 0) x += 0x10;
+	x += (a & 0xf0) + (~b & 0xf0);
+	if(x > 0xff)
+		rS &= ~(FLAGC|FLAGX);
+	else{
+		rS |= FLAGC|FLAGX;
+		x -= 0x60;
+	}
+	if((u8int)x != 0)
+		rS &= ~FLAGZ;
+	return x;
+}
+
+static void
+dtime(u16int op, u8int s)
+{
+	if((op & 0x100) != 0){
+		if(s == 2)
+			if((op & 0x30) == 0 || (op & 0x3f) == 0x3c)
+				tim += 8;
+			else
+				tim += 6;
+		else
+			tim += 4;
+	}else
+		tim += s == 2 ? 12 : 8;
+}
+
+static void
+stime(int a, u8int s)
+{
+	if(a)
+		tim += s == 2 ? 6 : 4;
+	else
+		tim += s == 2 ? 12 : 8;
+}
+
+static void
+trap(int n, u32int pcv)
+{
+	int l, v;
+	u32int sr, t;
+	
+	sr = rS;
+	if(n < 0){
+		for(l = 7; l > ((rS >> 8) & 7); l--)
+			if((irql[l] & irq) != 0)
+				break;
+		v = intack(l);
+		rS = rS & ~0x700 | l << 8;
+		tim += 44;
+	}else{
+		switch(n){
+		case 2: case 3: tim += 50; break;
+		case 5: tim += 38; break;
+		case 6: tim += 40; break;
+		default: tim += 34; break;
+		}
+		v = n;
+	}
+	if((rS & FLAGS) == 0){
+		t = asp;
+		asp = ra[7];
+		ra[7] = t;
+	}
+	rS |= FLAGS;
+	push32(pcv);
+	push16(sr);
+	pc = memread(v * 4) << 16;
+	pc |= memread(v * 4 + 2);
+	stop = 0;
+}
+
+void
+cpureset(void)
+{
+	u32int v;
+	int i;
+
+	ra[7] = memread(0) << 16 | memread(2);
+	pc = memread(4) << 16 | memread(6);
+	rS = 0x2700;
+	for(i = 7, v = 0; i >= 0; i--){
+		irqla[i] = v;
+		v |= irql[i];
+	}
+}
+
+int
+step(void)
+{
+	u32int v, w;
+	vlong a;
+	int s;
+	int n, m, d;
+	static int cnt;
+
+	if(0 && pc == 0x4118c){
+		trace++;
+		print("%x\n", curpc);
+	}
+	tim = 0;
+	curpc = pc;
+	if(irq && (irqla[(rS >> 8) & 7] & irq) != 0){
+		trap(-1, curpc);
+		return tim;
+	}
+	if(stop)
+		return 1;
+	op = fetch16();
+	if(trace)
+		print("%.6ux %.6uo %.4ux %.8ux | %.8ux %.8ux %.8ux %.8ux | %.8ux %.8ux %.8ux\n", curpc, op, rS, memread(ra[7])<<16|memread(ra[7]+2), r[0], r[1], r[2], r[3], ra[0], ra[6], ra[7]);
+	s = op >> 6 & 3;
+	n = op >> 9 & 7;
+	switch(op >> 12){
+	case 0:
+		if((op & 0x3f) == 0x3c){ /* (ORI|ANDI|EORI) to (CCR|SR) */
+			if(s == 1 && (rS & FLAGS) == 0){
+				trap(8, curpc);
+				break;
+			}
+			v = rS;
+			w = fetch16();
+			switch(n){
+			case 0: v |= w; break;
+			case 1: v &= w; break;
+			case 5: v ^= w; break;
+			default: undef();
+			}
+			if(s != 1)
+				v = v & 0xff | rS & 0xff00;
+			rS = v;
+			if(s == 1 && (rS & FLAGS) == 0){
+				v = ra[7];
+				ra[7] = asp;
+				asp = v;
+			}
+			tim += 20;
+			break;
+		}
+		if((op & 0x138) == 0x108){ /* MOVEP */
+			a = ra[op & 7] + (s16int)fetch16();
+			switch(s){
+			case 0:
+				v = (u8int)rmode(a, 0) << 8;
+				v |= (u8int)rmode(a + 2, 0);
+				r[n] = r[n] & 0xff00 | v;
+				tim += 16;
+				break;
+			case 1:
+				v = (u8int)rmode(a, 0) << 24;
+				v |= (u8int)rmode(a + 2, 0) << 16;
+				v |= (u8int)rmode(a + 4, 0) << 8;
+				v |= (u8int)rmode(a + 6, 0);
+				tim += 24;
+				r[n] = v;
+				break;
+			case 2:
+				wmode(a, 0, r[n] >> 8);
+				wmode(a + 2, 0, r[n]);
+				tim += 16;
+				break;
+			case 3:
+				wmode(a, 0, r[n] >> 24);
+				wmode(a + 2, 0, r[n] >> 16);
+				wmode(a + 4, 0, r[n] >> 8);
+				wmode(a + 6, 0, r[n]);
+				tim += 24;
+				break;
+			}
+			break;
+		}
+		if((op & 0x100) != 0 || n == 4){ /* BTST, BCHG, BCLR, BSET */
+			if((op & 0x100) != 0)
+				w = r[n];
+			else
+				w = fetch16();
+			if((op & 0x38) != 0){
+				n = 0;
+				w = 1<<(w & 7);
+			}else{
+				n = 2;
+				w = 1<<(w & 31);
+			}
+			a = amode(op >> 3, op, n);
+			v = rmode(a, n);
+			rS &= ~FLAGZ;
+			if((v & w) == 0)
+				rS |= FLAGZ;
+			switch(s){
+			case 1: v ^= w; break;
+			case 2: v &= ~w; if(n == 2) tim += 2; break;
+			case 3: v |= w; break;
+			}
+			if(s != 0){
+				wmode(a, n, v);
+				tim += (op & 0x100) != 0 ? 8 : 12;
+			}else{
+				tim += (op & 0x100) != 0 ? 4 : 8;
+				if(n == 2)
+					tim += 2;
+			}
+			break;
+		}
+		switch(s){
+		case 0: w = (s8int)fetch16(); break;
+		default: w = fetch16(); break;
+		case 2: w = fetch32(); break;
+		}
+		a = amode(op >> 3, op, s);
+		v = rmode(a, s);
+		switch(n){
+		case 0: nz(v |= w, s); break;
+		case 1: nz(v &= w, s); break;
+		case 2: rS |= FLAGZ; v = sub(v, w, 0, s); break;
+		case 3: rS |= FLAGZ; v = add(v, w, 0, s); break;
+		case 5: nz(v ^= w, s); break;
+		case 6: rS |= FLAGZ; sub(v, w, 0, s); break;
+		default: undef();
+		}
+		if(a < 0)
+			tim += s == 2 ? (n == 1 || n == 6 ? 14 : 16) : 8;
+		else
+			tim += s == 2 ? 20 : 12;
+		if(n != 6)
+			wmode(a, s, v);
+		break;
+	case 1: /* MOVE */
+		s = 0;
+		goto move;
+	case 2:
+		s = 2;
+		goto move;
+	case 3:
+		s = 1;
+	move:
+		v = rmode(amode(op >> 3, op, s), s);
+		wmode(amode(op >> 6, op >> 9, s), s, v);
+		if((op & 0x1c0) != 0x40)
+			nz(v, s);
+		tim += 4;
+		break;
+	case 4:
+		if((op & 0x1c0) == 0x1c0){ /* LEA */
+			ra[n] = amode(op >> 3, op, 2);
+			break;
+		}
+		if((op & 0x1c0) == 0x180){ /* CHK */
+			a = amode(op >> 3, op, s);
+			v = rmode(a, s);
+			if((s32int)r[n] < 0 || (s32int)r[n] > (s32int)v)
+				trap(6, curpc);
+			else
+				tim += 10;
+		}
+		if((op & 0xb80) == 0x880 && (op & 0x38) >= 0x10){ /* MOVEM */
+			s = (op >> 6 & 1) + 1;
+			w = fetch16();
+			if((op & 0x38) == 0x18){
+				n = op & 7;
+				a = ra[n];
+				for(m = 0; m < 16; m++){
+					if((w & 1) != 0){
+						r[m] = rmode(a, s);
+						a += 1<<s;
+						tim += 2<<s;
+					}
+					w >>= 1;
+				}
+				ra[n] = a;
+				tim += 12;
+				break;
+			}
+			if((op & 0x38) == 0x20){
+				n = op & 7;
+				a = ra[n];
+				for(m = 0; m < 16; m++){
+					if((w & 1) != 0){
+						a -= 1<<s;
+						wmode(a, s, r[15 - m]);
+						tim += 2<<s;
+					}
+					w >>= 1;
+				}
+				ra[n] = a;
+				tim += 8;
+				break;
+			}
+			a = amode(op >> 3, op, s);
+			for(m = 0; m < 16; m++){
+				if((w & 1) != 0){
+					if((op & 0x400) != 0)
+						r[m] = rmode(a, s);
+					else
+						wmode(a, s, r[m]);
+					a += 1<<s;
+					tim += 2<<s;
+				}
+				w >>= 1;
+			}
+			tim += (op & 0x400) != 0 ? 8 : 12;
+			break;
+		}
+		switch(op >> 8 & 0xf){
+		case 0:
+			if(s == 3){ /* MOVE from SR */
+				if((rS & FLAGS) != 0){
+					a = amode(op >> 3, op, 1);
+					wmode(a, 1, rS);
+					tim += a < 0 ? 6 : 8;
+				}else
+					trap(8, curpc);
+				break;
+			} /* NEGX */
+			a = amode(op >> 3, op, s);
+			m = (rS & FLAGX) != 0;
+			d = 1<<(8<<s)-1;
+			v = rmode(a, s);
+			w = -(v+m) & (d << 1) - 1;
+			rS &= ~(FLAGC|FLAGX|FLAGN|FLAGV);
+			if((w & d) != 0)
+				rS |= FLAGN;
+			if(m && w == d)
+				rS |= FLAGV;
+			if(w != 0){
+				rS |= FLAGC|FLAGX;
+				rS &= ~FLAGZ;
+			}
+			wmode(a, s, w);
+			stime(a < 0, s);
+			break;
+		case 2: /* CLR */
+			a = amode(op >> 3, op, s);
+			wmode(a, s, 0);
+			nz(0, 0);
+			stime(a < 0, s);
+			break;
+		case 4:
+			if(s == 3){ /* MOVE to CCR */
+				rS = rS & 0xff00 | rmode(amode(op >> 3, op, 1), 1);
+				tim += 12;
+				break;
+			} /* NEG */
+			a = amode(op >> 3, op, s);
+			v = -rmode(a, s);
+			nz(v, s);
+			rS = rS & ~FLAGX | ~rS << 2 & FLAGX | ~rS >> 2 & FLAGC;
+			wmode(a, s, v);
+			stime(a < 0, s);
+			break;
+		case 6:
+			if(s == 3){ /* MOVE to SR */
+				if((rS & FLAGS) != 0){
+					rS = rmode(amode(op >> 3, op, 1), 1);
+					if((rS & FLAGS) == 0){
+						v = asp;
+						asp = ra[7];
+						ra[7] = v;
+					}
+					tim += 12;
+				}else
+					trap(8, curpc);
+				break;
+			} /* NOT */
+			a = amode(op >> 3, op, s);
+			v = ~rmode(a, s);
+			nz(v, s);
+			wmode(a, s, v);
+			stime(a < 0, s);
+			break;
+		case 8:
+			n = op & 7;
+			switch(s){
+			case 0: /* NBCD */
+				a = amode(op >> 3, op, 0);
+				v = rmode(a, 0);
+				wmode(a, 0, subbcd(0, v));
+				if(a < 0)
+					tim += 8;
+				else
+					tim += 6;
+				break;
+			case 1:
+				if((op >> 3 & 7) != 0){
+					push32(amode(op >> 3, op, 0)); /* PEA */
+					tim += 8;
+				}else{
+					nz(r[n] = r[n] >> 16 | r[n] << 16, 2); /* SWAP */
+					tim += 4;
+				}
+				break;
+			case 2: /* EXT */
+				nz(r[n] = r[n] & 0xffff0000 | (u16int)(s8int)r[n], 1);
+				tim += 4;
+				break;
+			case 3: /* EXT */
+				nz(r[n] = (s16int)r[n], 2);
+				tim += 4;
+				break;
+			}
+			break;
+		case 10:
+			if(s == 3){ /* TAS */
+				a = amode(op >> 3, op, 0);
+				v = rmode(a, 0);
+				nz(v, 0);
+				wmode(a, s, v | 0x80);
+				tim += a < 0 ? 4 : 14;
+				break;
+			} /* TST */
+			a = amode(op >> 3, op, s);
+			nz(rmode(a, s), s);
+			tim += 4;
+			break;
+		case 14:
+			v = op >> 4 & 0xf;
+			n = op & 7;
+			if(v == 4){ /* TRAP */
+				trap(0x20 | op & 0xf, pc);
+				break;
+			}else if(v == 5){
+				if((op & 8) == 0){ /* LINK */
+					push32(ra[n]);
+					ra[n] = ra[7];
+					ra[7] += (s16int)fetch16();
+					tim += 16;
+				}else{ /* UNLK */
+					ra[7] = ra[n];
+					ra[n] = pop32();
+					tim += 12;
+				}
+				break;
+			}else if(v == 6){ /* MOVE USP */
+				if((rS & FLAGS) != 0){
+					if((op & 8) != 0)
+						ra[n] = asp;
+					else
+						asp = ra[n];
+					tim += 4;
+				}else
+					trap(8, curpc);
+				break;
+			}
+			if((op & 0xc0) == 0xc0){ /* JMP */
+				pc = amode(op >> 3, op, 2);
+				tim += 4;
+				break;
+			}
+			if((op & 0xc0) == 0x80){ /* JSR */
+				a = amode(op >> 3, op, 2);
+				push32(pc);
+				pc = a;
+				tim += 12;
+				break;
+			}
+			switch(op){
+			case 0x4e70: tim += 132; break; /* RESET */
+			case 0x4e71: tim += 4; break; /* NOP */
+			case 0x4e72: /* STOP */
+				if((rS & FLAGS) != 0){
+					rS = fetch16();
+					stop = 1;
+				}else
+					trap(8, curpc);
+				tim += 4;
+				break;
+			case 0x4e73: /* RTE */
+				if((rS & FLAGS) != 0){
+					v = rS;
+					rS = pop16();
+					pc = pop32();
+					if(((v ^ rS) & FLAGS) != 0){
+						v = asp;
+						asp = ra[7];
+						ra[7] = v;
+					}
+					tim += 20;
+				}else
+					trap(8, curpc);
+				break;
+			case 0x4e75: pc = pop32(); tim += 16; break; /* RTS */
+			case 0x4e76: if((rS & FLAGV) != 0) trap(7, curpc); tim += 4; break; /* TRAPV */
+			case 0x4e77: /* RTR */
+				rS = rS & 0xff00 | pop16() & 0xff;
+				pc = pop32();
+				tim += 20;
+				break;
+			default: undef();
+			}
+			break;
+		default:
+			undef();
+		}
+		break;
+	case 5:
+		if((op & 0xf8) == 0xc8){ /* DBcc */
+			n = op & 7;
+			v = (s16int)fetch16();
+			if(!cond((op >> 8) & 0xf)){
+				if((u16int)r[n] != 0){
+					r[n]--;
+					pc = pc + v - 2;
+					tim += 10;
+				}else{
+					r[n] |= 0xffff;
+					tim += 14;
+				}
+			}else
+				tim += 12;
+			break;
+		}
+		if(s == 3){ /* Scc */
+			a = amode(op >> 3, op, 0);
+			v = cond(op >> 8 & 0xf);
+			wmode(a, 0, -v);
+			if(a < 0)
+				tim += 4 + 2 * v;
+			else
+				tim += 8;
+			break;
+		} /* ADDQ, SUBQ */
+		rS |= FLAGZ;
+		if((op & 0x38) == 0x08)
+			s = 2;
+		a = amode(op >> 3, op, s);
+		v = rmode(a, s);
+		if(n == 0)
+			n = 8;
+		if((op & 0x100) == 0)
+			v = add(v, n, 0, s);
+		else
+			v = sub(v, n, 0, s);
+		rS = rS & ~FLAGX | rS << 4 & FLAGX;
+		if(a < 0)
+			tim += s == 2 || (op & 0x130) == 0x110 ? 8 : 4;
+		else
+			tim += s == 2 ? 12 : 8;
+		wmode(a, s, v);
+		break;
+	case 6: /* BRA */
+		v = (s8int)op;
+		if(v == 0)
+			v = (s16int)fetch16();
+		else if(v == (u32int)-1)
+			v = fetch32();
+		if((op & 0xf00) == 0x100){ /* BSR */
+			push32(pc);
+			pc = curpc + 2 + v;
+			tim += 18;
+			break;
+		}
+		if(cond((op >> 8) & 0xf)){
+			pc = curpc + 2 + v;
+			tim += 10;
+		}else
+			tim += (u8int)(op + 1) <= 1 ? 12 : 8;
+		break;
+	case 7: /* MOVEQ */
+		r[n] = (s8int)op;
+		nz(r[n], 0);
+		tim += 4;
+		break;
+	case 8:
+		if(s == 3){ /* DIVU, DIVS */
+			a = amode(op >> 3, op, 1);
+			v = rmode(a, 1);
+			if(v == 0){
+				trap(5, curpc);
+				break;
+			}
+			if((op & 0x100) != 0){
+				w = (s32int)r[n] % (s16int)v;
+				v = (s32int)r[n] / (s16int)v;
+				if(((s16int)w ^ (s16int)v) < 0)
+					w = -w;
+				if(v != (u32int)(s16int)v){
+					rS = rS & ~FLAGC | FLAGV;
+					break;
+				}
+				tim += 158;
+			}else{
+				w = r[n] % (u16int)v;
+				v = r[n] / (u16int)v;
+				if(v >= 0x10000){
+					rS = rS & ~FLAGC | FLAGV;
+					break;
+				}
+				tim += 140;
+			}
+			r[n] = (u16int)v | w << 16;
+			nz(v, 1);
+			break;
+		}
+		if((op & 0x1f0) == 0x100){ /* SBCD */
+			n = (op >> 9) & 7;
+			m = op & 7;
+			if((op & 8) != 0){
+				a = amode(4, n, 0);
+				v = rmode(a, 0);
+				w = rmode(amode(4, m, 0), 0);
+				v = subbcd(v, w);
+				wmode(a, 0, v);
+				tim += 18;
+			}else{
+				r[n] = r[n] & 0xffffff00 | subbcd((u8int)r[n], (u8int)r[m]);
+				tim += 6;
+			}
+			break;
+		}
+	logic: /* OR, EOR, AND */
+		a = amode(op >> 3, op, s);
+		n = (op >> 9) & 7;
+		v = rmode(a, s);
+		switch(op >> 12){
+		case 8: v |= r[n]; break;
+		case 11: v ^= r[n]; break;
+		case 12: v &= r[n]; break;
+		}
+		if((op & 0x100) == 0)
+			a = ~n;
+		wmode(a, s, v);
+		nz(v, s);
+		dtime(op, s);
+		break;
+	case 11:
+		if(s == 3){ /* CMPA */
+			s = (op >> 8 & 1) + 1;
+			a = amode(op >> 3, op, s);
+			rS |= FLAGZ;
+			sub(ra[n], rmode(a, s), 0, 2);
+			tim += 6;
+			break;
+		}
+		if((op & 0x138) == 0x108){ /* CMPM */
+			m = op & 7;
+			rS |= FLAGZ;
+			sub(rmode(amode(3, n, s), s), rmode(amode(3, m, s), s), 0, s);
+			tim += s == 2 ? 20 : 12;
+			break;
+		}
+		if((op & 0x100) == 0){ /* CMP */
+			a = amode(op >> 3, op, s);
+			rS |= FLAGZ;
+			sub(r[n], rmode(a, s), 0, s);
+			tim += s == 2 ? 6 : 4;
+			break;
+		}
+		goto logic;
+	case 12:
+		if(s == 3){ /* MULU, MULS */
+			a = amode(op >> 3, op, 1);
+			v = rmode(a, 1);
+			if((op & 0x100) != 0)
+				v *= (s16int)r[n];
+			else
+				v = (u16int)v * (u16int)r[n];
+			r[n] = v;
+			nz(v, 1);
+			tim += 70;
+			break;
+		}
+		if((op & 0x1f0) == 0x100){ /* ABCD */
+			n = (op >> 9) & 7;
+			m = op & 7;
+			if((op & 8) != 0){
+				a = amode(4, n, 0);
+				v = rmode(a, 0);
+				w = rmode(amode(4, m, 0), 0);
+				v = addbcd(v, w);
+				wmode(a, 0, v);
+				tim += 18;
+			}else{
+				r[n] = r[n] & 0xffffff00 | addbcd((u8int)r[n], (u8int)r[m]);
+				tim += 6;
+			}
+			break;
+		
+		}
+		if((op & 0x130) == 0x100){ /* EXG */
+			m = op & 0xf;
+			if((op & 0xc8) == 0x48)
+				n |= 8;
+			v = r[n];
+			r[n] = r[m];
+			r[m] = v;
+			tim += 6;
+			break;
+		}
+		goto logic;
+	case 9:
+	case 13:
+		if(s == 3){ /* ADDA, SUBA */
+			if((op & 0x100) != 0){
+				s = 2;
+				tim += 6;
+			}else{
+				s = 1;
+				tim += 8;
+			}
+			a = amode(op >> 3, op, s);
+			if((op >> 12) == 13)
+				ra[n] += rmode(a, s);
+			else
+				ra[n] -= rmode(a, s);
+			break;
+		}
+		if((op & 0x130) == 0x100){ /* ADDX, SUBX */
+			m = op & 7;
+			if((op & 8) != 0){
+				a = ra[n] -= 1<<s;
+				v = rmode(a, s);
+				w = rmode(ra[m] -= 1<<s, s);
+				tim += s == 2 ? 30 : 18;
+			}else{
+				v = r[n];
+				w = r[m];
+				a = ~n;
+				tim += s == 2 ? 8 : 4;
+			}
+			if((op >> 12) == 13)
+				v = add(v, w, (rS & FLAGX) != 0, s);
+			else
+				v = sub(v, w, (rS & FLAGX) != 0, s);
+			wmode(a, s, v);
+			rS = rS & ~FLAGX | rS << 4 & FLAGX;
+			break;
+		} /* ADD, SUB */
+		a = amode(op >> 3, op, s);
+		rS |= FLAGZ;
+		d = (op & 0x100) == 0;
+		v = rmode(a, s);
+		if((op >> 12) == 13)
+			v = add(v, r[n], 0, s);
+		else
+			v = sub(d ? r[n] : v, d ? v : r[n], 0, s);
+		rS = rS & ~FLAGX | rS << 4 & FLAGX;
+		if(d)
+			a = ~n;
+		wmode(a, s, v);
+		dtime(op, s);
+		break;
+	case 14: /* shifts */
+		if(s == 3){
+			m = op >> 8 & 7;
+			n = 1;
+			s = 1;
+			a = amode(op >> 3, op, s);
+		}else{
+			a = ~(uvlong)(op & 7);
+			m = op >> 2 & 6 | op >> 8 & 1;
+			n = (op >> 9) & 7;
+			if((op & 0x20) != 0)
+				n = r[n] & 63;
+			else if(n == 0)
+				n = 8;
+		}
+		wmode(a, s, rot(rmode(a, s), m, n, s));
+		break;
+	case 10:
+		trap(10, curpc);
+		break;
+	case 15:
+		trap(11, curpc);
+		break;
+	default:
+		undef();
+	}
+	return tim;
+}
--- /dev/null
+++ b/sys/src/games/blit/dat.h
@@ -1,0 +1,31 @@
+typedef signed char s8int;
+typedef signed short s16int;
+typedef signed long s32int;
+
+extern u32int curpc, irq;
+extern int trace, debug;
+
+extern ushort ram[128*1024];
+
+extern int daddr;
+extern ushort dstat;
+extern uchar invert;
+
+extern int mousex, mousey, mousebut;
+
+extern int vblctr, uartrxctr;
+extern int baud;
+
+enum {
+	INTKEY = 1,
+	INTMOUSE = 2,
+	INTUART = 4,
+	INTVBL = 8,
+};
+
+enum {
+	SX = 800,
+	SY = 1024,
+	FREQ = 8000*1000,
+	VBLDIV = FREQ / 60,
+};
binary files /dev/null b/sys/src/games/blit/diagbits differ
--- /dev/null
+++ b/sys/src/games/blit/fns.h
@@ -1,0 +1,8 @@
+u16int memread(u32int);
+void memwrite(u32int, u16int, u16int);
+int intack(int);
+int step(void);
+void meminit(void);
+void cpureset(void);
+void keycheck(void);
+void telnetinit(char *);
--- /dev/null
+++ b/sys/src/games/blit/mem.c
@@ -1,0 +1,180 @@
+#include <u.h>
+#include <libc.h>
+#include <thread.h>
+#include <draw.h>
+#include <bio.h>
+#include <mouse.h>
+#include "dat.h"
+#include "fns.h"
+
+u32int irq;
+u32int irql[8] = {
+	[1] INTVBL,
+	[2] INTKEY,
+	[4] INTMOUSE,
+	[5] INTUART,
+};
+int diag;
+
+ushort ram[128*1024];
+ushort rom[3*4096];
+Channel *keych;
+Channel *uartrxch, *uarttxch;
+int mousex, mousey, mousebut;
+
+int yes;
+u8int kbdctrl, uartctrl;
+enum {
+	ACIATXMASK = 0x60,
+	ACIATXIRQ = 0x20,
+	ACIARXIRQ = 0x80,
+};
+
+int keybuf = -1;
+int uartrxbuf = -1;
+int uarttxbuf = -1;
+
+void
+meminit(void)
+{
+	int i, x;
+	Biobuf *bp;
+	char *s;
+	ushort *p, *q;
+	
+	p = rom;
+	if(diag){
+		bp = Bopen("diagbits", OREAD);
+		if(bp == nil) sysfatal("Bopen: %r");
+		Bread(bp, rom, sizeof(rom));
+		Bterm(bp);
+		return;
+	}
+	for(i = 0; i < 6; i++){
+		bp = Bopen(smprint("rom%d", i), OREAD);
+		if(bp == nil) sysfatal("Bopen: %r");
+		q = p;
+		for(;;){
+			s = Brdline(bp, '\n');
+			if(s == nil || Blinelen(bp) == 0) break;
+			s[Blinelen(bp) - 1] = 0;
+			x = strtol(s, nil, 8);
+			if((i & 1) != 0)
+				*p |= x << 8;
+			else
+				*p |= x;
+			p++;
+		}
+		if((i & 1) == 0) p = q;
+		Bterm(bp);
+	}
+	write(3, rom, sizeof(rom));
+}
+
+void
+keycheck(void)
+{
+	yield();
+
+	if(keybuf < 0)
+		nbrecv(keych, &keybuf);
+	if(keybuf >= 0 && (kbdctrl & ACIARXIRQ) != 0)
+		irq |= INTKEY;
+	else
+		irq &= ~INTKEY;
+	
+	if(uartrxbuf < 0 && uartrxctr <= 0){
+		nbrecv(uartrxch, &uartrxbuf);
+		uartrxctr = FREQ * 11 / baud;
+	}
+	if(uarttxbuf >= 0 && nbsend(uarttxch, &uarttxbuf) > 0)
+		uarttxbuf = -1;
+	if(uartrxbuf >= 0 && (uartctrl & ACIARXIRQ) != 0 || uarttxbuf < 0 && (uartctrl & ACIATXMASK) == ACIATXIRQ)
+		irq |= INTUART;
+	else
+		irq &= ~INTUART;
+}
+
+u16int
+memread(u32int a)
+{
+	int rc;
+
+	a &= 0x3fffff;
+	if(a < 8) a += 0x40000;
+	if(a < 0x40000) return ram[a/2];
+	if(a >= 0x40000 && a < 0x40000 + sizeof(rom))
+		return rom[(a - 0x40000)/2];
+	switch(a & ~1){
+	case 01400000: return mousey;
+	case 01400002: return mousex;
+	case 01400010: /* uart status */
+		rc = 0;
+		if(uartrxbuf >= 0) rc |= 1;
+		if(uarttxbuf < 0) rc |= 2;
+		return rc | rc << 8;
+	case 01400012: /* uart data */
+		rc = uartrxbuf;
+		uartrxbuf = -1;
+		yes=1;
+		return rc | rc << 8;
+	case 01400020:
+	case 01400024:
+		irq &= ~INTMOUSE;
+		return mousebut | mousebut << 8;
+	case 01400026: return 0; /* mouse: unknown purpose */
+	case 01400030: return daddr >> 2; /* display address */
+	case 01400040: return dstat; /* display status */
+	case 01400060: /* keyboard status */
+		rc = 2;
+		if(keybuf >= 0) rc |= 1;
+		return rc | rc << 8;
+	case 01400062: /* keyboard data */
+		rc = keybuf;
+		keybuf = -1;
+		return rc | rc << 8;
+	}
+	print("read %.8o (curpc = %.6x)\n", a, curpc & 0x3fffff);
+	return 0;
+}
+
+void
+memwrite(u32int a, u16int v, u16int m)
+{
+	extern Rectangle updated;
+	int x, y;
+
+	a &= 0x3fffff;
+	if(a < 0x40000){
+		if(a >= daddr){
+			y = (a - daddr) / 100;
+			x = (((a & ~1) - daddr) % 100) * 8;
+			if(updated.min.x > x) updated.min.x = x;
+			if(updated.max.x < x+16) updated.max.x = x+16;
+			if(updated.min.y > y) updated.min.y = y;
+			if(updated.max.y <= y) updated.max.y = y+1;
+		}
+		ram[a/2] = ram[a/2] & ~m | v & m;
+		return;
+	}
+	switch(a & ~1){
+	case 01400010: uartctrl = v; return;
+	case 01400012: uarttxbuf = (uchar) v; return;
+	case 01400024: return; /* mouse: purpose unknown */
+	case 01400026: return; /* mouse: purpose unknown */
+	case 01400030: daddr = ((daddr >> 2) & ~m | v & m) << 2; return;
+	case 01400040: dstat = dstat & ~m | v & m; invert = -(dstat & 1); updated = Rect(0, 0, SX, SY); return;
+	case 01400056: /* sound; exact function unknown */ return;
+	case 01400060: kbdctrl = v; return;
+	case 01400062: /* reset keyboard */ return;
+	case 01400070: irq &= ~INTVBL; return;
+	case 01400156: /* sound; exact function unknown */ return;
+	}
+	print("write %.8o = %.4x (mask = %.4x, curpc = %.6x)\n", a, v, m, curpc & 0x3fffff);
+}
+
+int
+intack(int l)
+{
+	return 24+l;
+}
--- /dev/null
+++ b/sys/src/games/blit/mkfile
@@ -1,0 +1,12 @@
+</$objtype/mkfile
+
+BIN=/$objtype/bin
+TARG=blit
+HFILES=dat.h fns.h
+OFILES=\
+	blit.$O\
+	cpu.$O\
+	mem.$O\
+	telnet.$O\
+
+</sys/src/cmd/mkone
--- /dev/null
+++ b/sys/src/games/blit/mmap
@@ -1,0 +1,88 @@
+- main CPU is a MC68000 running at 8 MHz.
+    the exact clock speed is most likely one of: 7.9872, 7.68 or 7.3728 MHz (to divide to 19200 baud)
+- display is 800x1024, refreshed at 30 Hz (60 Hz interlaced).
+    it simply displays the 100K framebuffer from the address given in register 030.
+- the host is connected through a UART running at 19200 baud.
+- the keyboard is connected through a UART running at an unknown baudrate.
+- the mouse is connected through some unknown circuitry.
+
+memory map
+
+start		end		purpose
+0x00000		0x00008		see register 050 below
+0x00008		0x40000		RAM (256K)
+0x40000		???		ROM (24K ?) (not known if mirrored)
+0x60000		???		memory mapped I/O
+
+mmio addresses (in *octal*):
+
+0000	16-bit	mouse y
+0002	16-bit	mouse x
+
+0011	8-bit	terminal UART status/control (MC 6850 ACIA)
+0013	8-bit	terminal UART data
+	the software uses 2 stop bits, no parity, 8 bits; clock divided by 16
+
+0021	8-bit	mouse buttons
+			bit 0: rmb
+			bit 1: mmb
+			bit 2: lmb
+			reading clears the mouse interrupt
+
+0025	8-bit	second copy of 0021 (?)
+0027	8-bit	???
+		only the ROM binaries contain references to 0025, 0027 in buttons.c.
+		the corresponding source code appears to have been deleted.
+		possibly some older variant of the button hardware?
+
+0030	16-bit	start address of framebuffer divided by 4 (800*1024/8 = 100K bytes)
+0040	16-bit	status/control register of display
+			bit 0: invert display
+			with this bit set 0 bits are white and 1 bits are black (most software does this).
+
+0050	16-bit	writing different values makes 0-8 either mapped to 0x40000 or error out (details unclear)
+		resets so that they map to the reset vector at 0x40000.
+
+0056	8-bit	some kind of sound-making device (standard programmable timer + piezoelectric speaker?)
+0156		referenced by demo pacman.
+0256
+	
+0060	8-bit	keyboard status/control register (MC 6850 ACIA)
+	the software uses 2 stop bits, no parity, 8 bits; clock divided by 16
+0062	8-bit	keyboard data register
+
+0070	16-bit?	acknowledge vblank interrupt; software writes 0
+
+tx to the keyboard sets the 7 lights and can also ring the bell.
+could deduce the order of lights from diag.c.
+writing 2 is used to sound the bell.
+
+irq lines; using the 68k autovectoring
+
+vector 1 (0x64) is vblank
+vector 2 (0x68) is keyboard
+vector 4 (0x70) is mouse buttons
+vector 5 (0x74) is uart
+
+MC 6850 bits:
++0 (r)	status register
+	bit 0: receive buffer full
+	bit 1: transmit buffer empty
+	bit 2: data carrier detected (inverted)
+	bit 3: clear-to-send (inverted)
+	bit 4: framing error
+	bit 5: receiver overrun
+	bit 6: parity error
+	bit 7: irq active
++0 (w)	control register
+	bit 1-0: clock divider
+		00: /1
+		01: /16
+		10: /64
+		11: master reset
+	bit 4-2: parity and stop bits (see datasheet)
+	bit 6-5:
+		RTS/ is high only if these bits are 10
+		TX interrupts are enabled only if these bits are 01
+		break is transmitted continuously if these bits are 11
+	bit 7: RX interrupt enabled
--- /dev/null
+++ b/sys/src/games/blit/rom0
@@ -1,0 +1,4096 @@
+002
+374
+004
+320
+371
+004
+316
+004
+122
+002
+000
+062
+000
+000
+040
+000
+000
+000
+004
+314
+004
+250
+004
+216
+004
+052
+004
+326
+004
+176
+004
+130
+004
+104
+004
+154
+004
+032
+004
+034
+004
+356
+004
+254
+004
+322
+004
+234
+004
+162
+004
+052
+004
+046
+004
+354
+004
+352
+004
+110
+004
+270
+004
+304
+004
+174
+004
+032
+004
+266
+004
+314
+004
+210
+004
+320
+004
+302
+004
+100
+004
+374
+004
+030
+004
+362
+004
+232
+004
+264
+004
+174
+004
+126
+004
+006
+004
+344
+004
+364
+004
+054
+004
+072
+174
+000
+010
+074
+000
+376
+230
+200
+372
+374
+004
+046
+000
+140
+374
+004
+050
+000
+144
+374
+004
+106
+000
+150
+374
+004
+126
+000
+154
+374
+004
+130
+000
+160
+374
+004
+150
+000
+164
+371
+004
+326
+376
+163
+347
+300
+374
+000
+006
+070
+271
+004
+254
+271
+004
+262
+337
+003
+163
+347
+300
+271
+004
+152
+337
+003
+163
+163
+347
+300
+271
+004
+364
+337
+003
+163
+347
+300
+071
+006
+011
+000
+000
+010
+271
+004
+376
+032
+074
+000
+071
+006
+013
+000
+074
+002
+222
+271
+004
+116
+217
+337
+003
+163
+300
+374
+000
+165
+300
+374
+000
+165
+300
+374
+000
+165
+300
+374
+000
+165
+300
+374
+000
+165
+357
+004
+165
+374
+000
+006
+030
+374
+000
+006
+040
+074
+000
+376
+174
+000
+010
+230
+200
+372
+174
+002
+374
+113
+271
+004
+004
+371
+004
+136
+374
+003
+006
+011
+374
+025
+006
+011
+165
+071
+006
+011
+001
+001
+364
+300
+006
+013
+165
+000
+071
+006
+011
+000
+161
+362
+000
+160
+014
+071
+006
+013
+074
+377
+165
+071
+006
+013
+165
+157
+040
+145
+040
+062
+000
+174
+000
+000
+000
+271
+004
+052
+100
+000
+306
+073
+006
+373
+002
+014
+104
+126
+142
+156
+274
+174
+002
+000
+300
+000
+106
+300
+106
+200
+012
+174
+000
+000
+001
+010
+106
+300
+012
+000
+000
+105
+000
+216
+106
+100
+254
+377
+356
+000
+103
+240
+100
+204
+232
+000
+300
+336
+300
+102
+152
+107
+024
+322
+006
+002
+105
+105
+000
+200
+106
+006
+110
+071
+002
+000
+171
+002
+002
+103
+036
+014
+000
+142
+107
+022
+271
+004
+026
+271
+004
+026
+271
+004
+026
+323
+107
+006
+271
+004
+026
+174
+002
+006
+332
+103
+372
+000
+060
+174
+000
+001
+000
+046
+000
+017
+000
+201
+174
+004
+276
+061
+000
+010
+100
+036
+174
+004
+336
+060
+000
+104
+116
+106
+000
+374
+126
+352
+356
+034
+360
+156
+010
+202
+056
+014
+000
+062
+032
+003
+017
+003
+200
+174
+004
+276
+061
+000
+013
+103
+036
+174
+004
+336
+060
+000
+101
+112
+102
+104
+000
+322
+022
+000
+004
+104
+302
+112
+022
+000
+004
+104
+302
+004
+356
+034
+360
+136
+165
+126
+366
+356
+004
+374
+174
+000
+373
+374
+001
+002
+210
+271
+004
+224
+271
+004
+130
+374
+126
+002
+212
+374
+107
+002
+214
+374
+000
+002
+216
+374
+000
+002
+220
+271
+004
+240
+274
+010
+271
+004
+164
+271
+004
+240
+274
+002
+222
+271
+004
+260
+177
+101
+100
+372
+056
+372
+200
+000
+334
+271
+004
+300
+371
+004
+010
+002
+300
+006
+062
+000
+002
+171
+002
+220
+000
+370
+007
+171
+002
+216
+171
+002
+216
+000
+346
+271
+004
+346
+000
+270
+271
+004
+046
+300
+002
+216
+271
+004
+046
+300
+002
+220
+274
+002
+216
+271
+004
+004
+071
+002
+216
+171
+002
+212
+000
+014
+371
+002
+212
+002
+216
+071
+002
+220
+171
+002
+214
+000
+014
+371
+002
+214
+002
+220
+000
+254
+171
+002
+220
+000
+242
+000
+254
+171
+002
+216
+000
+224
+000
+224
+271
+004
+046
+000
+271
+002
+220
+074
+000
+001
+171
+002
+214
+000
+001
+171
+002
+212
+000
+071
+002
+220
+102
+000
+074
+000
+271
+004
+330
+374
+000
+012
+000
+114
+271
+004
+046
+000
+271
+002
+216
+001
+171
+002
+220
+000
+001
+171
+002
+212
+000
+071
+002
+220
+071
+002
+216
+102
+000
+271
+004
+330
+217
+000
+016
+271
+004
+046
+000
+071
+002
+220
+102
+200
+074
+000
+001
+171
+002
+214
+102
+000
+001
+171
+002
+212
+000
+071
+002
+220
+074
+000
+271
+004
+330
+374
+000
+012
+000
+310
+271
+004
+046
+000
+271
+002
+220
+071
+002
+216
+102
+000
+001
+171
+002
+220
+000
+001
+171
+002
+212
+102
+000
+071
+002
+220
+071
+002
+216
+271
+004
+330
+374
+000
+012
+000
+176
+001
+171
+002
+220
+200
+001
+171
+002
+212
+000
+071
+002
+220
+071
+002
+216
+271
+004
+154
+217
+000
+122
+100
+101
+000
+240
+100
+102
+000
+242
+100
+103
+000
+236
+100
+104
+000
+240
+100
+105
+000
+234
+100
+106
+000
+026
+100
+113
+000
+236
+100
+131
+000
+014
+100
+145
+000
+300
+100
+146
+000
+074
+000
+322
+171
+002
+216
+000
+310
+271
+004
+262
+000
+276
+374
+000
+002
+216
+000
+262
+001
+171
+002
+214
+200
+001
+171
+002
+212
+000
+074
+000
+074
+000
+271
+004
+154
+217
+374
+000
+002
+216
+374
+000
+002
+220
+000
+172
+274
+000
+071
+002
+216
+271
+004
+110
+217
+000
+074
+004
+022
+156
+372
+074
+004
+056
+271
+004
+006
+374
+000
+020
+171
+002
+216
+000
+100
+100
+100
+024
+000
+276
+100
+073
+006
+373
+002
+036
+132
+064
+144
+052
+172
+156
+262
+262
+022
+262
+262
+262
+262
+262
+262
+262
+262
+262
+262
+106
+071
+002
+216
+171
+002
+212
+000
+020
+271
+004
+262
+374
+000
+002
+216
+274
+002
+216
+271
+004
+004
+171
+002
+232
+000
+006
+000
+224
+271
+004
+240
+000
+172
+356
+004
+374
+136
+165
+126
+370
+356
+004
+374
+071
+002
+220
+171
+002
+214
+000
+116
+274
+000
+074
+000
+001
+171
+002
+214
+000
+001
+171
+002
+212
+000
+271
+004
+050
+000
+002
+000
+074
+000
+271
+004
+330
+374
+000
+012
+001
+171
+002
+214
+102
+300
+002
+220
+000
+010
+171
+002
+220
+356
+004
+374
+136
+165
+126
+360
+356
+004
+364
+000
+171
+002
+226
+012
+000
+062
+000
+122
+013
+000
+050
+152
+033
+004
+000
+036
+152
+013
+004
+000
+024
+152
+012
+004
+000
+004
+102
+113
+000
+324
+102
+000
+034
+171
+002
+214
+000
+010
+002
+000
+010
+071
+002
+214
+000
+004
+001
+000
+002
+356
+004
+364
+136
+165
+126
+374
+356
+000
+000
+274
+003
+071
+002
+216
+271
+004
+110
+217
+000
+074
+004
+022
+074
+004
+052
+074
+004
+056
+271
+004
+006
+374
+000
+020
+356
+000
+000
+136
+165
+126
+374
+356
+000
+000
+171
+002
+232
+000
+020
+274
+010
+271
+004
+164
+000
+352
+274
+002
+222
+271
+004
+260
+177
+101
+000
+002
+356
+000
+000
+136
+165
+126
+374
+356
+000
+000
+271
+004
+346
+040
+101
+000
+002
+356
+000
+000
+136
+165
+126
+370
+356
+000
+374
+356
+010
+022
+374
+011
+200
+132
+022
+374
+016
+200
+122
+056
+010
+000
+002
+356
+000
+374
+136
+165
+126
+370
+356
+000
+374
+356
+010
+022
+374
+011
+200
+132
+022
+374
+016
+200
+132
+022
+374
+011
+200
+132
+022
+374
+016
+200
+122
+356
+010
+174
+002
+266
+330
+150
+000
+000
+000
+002
+174
+002
+266
+356
+000
+374
+136
+165
+126
+374
+356
+000
+000
+156
+010
+271
+004
+004
+217
+156
+014
+271
+004
+004
+217
+156
+020
+271
+004
+004
+217
+256
+010
+056
+020
+271
+004
+104
+217
+100
+000
+006
+000
+334
+274
+000
+056
+020
+271
+004
+110
+217
+000
+074
+004
+022
+356
+010
+050
+004
+050
+000
+271
+004
+174
+217
+050
+004
+050
+000
+074
+004
+022
+271
+004
+326
+374
+000
+024
+056
+020
+156
+010
+000
+110
+056
+022
+156
+012
+000
+044
+256
+014
+056
+016
+156
+012
+156
+022
+000
+056
+020
+271
+004
+154
+217
+000
+026
+256
+022
+056
+014
+056
+010
+271
+004
+154
+217
+000
+104
+056
+020
+156
+010
+000
+044
+256
+014
+056
+022
+056
+014
+156
+010
+156
+020
+000
+271
+004
+154
+217
+000
+026
+256
+016
+056
+020
+056
+010
+271
+004
+154
+217
+356
+000
+000
+136
+165
+126
+370
+356
+000
+374
+156
+010
+122
+000
+006
+274
+000
+152
+002
+000
+010
+174
+000
+002
+001
+171
+002
+212
+022
+100
+000
+014
+001
+171
+002
+212
+200
+001
+171
+002
+214
+052
+002
+100
+000
+016
+001
+171
+002
+214
+100
+002
+356
+000
+374
+136
+165
+126
+374
+356
+000
+000
+274
+002
+356
+010
+050
+004
+050
+000
+271
+004
+174
+217
+050
+004
+050
+000
+074
+004
+022
+271
+004
+232
+374
+000
+014
+356
+000
+000
+136
+165
+126
+366
+356
+004
+374
+171
+002
+246
+000
+144
+274
+002
+236
+271
+004
+260
+100
+373
+056
+373
+200
+200
+100
+200
+000
+364
+056
+373
+200
+100
+377
+000
+120
+171
+002
+210
+000
+010
+001
+000
+004
+000
+300
+002
+210
+271
+002
+210
+271
+004
+306
+000
+242
+271
+004
+216
+000
+230
+171
+002
+276
+000
+010
+001
+000
+004
+000
+300
+002
+276
+000
+174
+100
+260
+000
+336
+100
+340
+000
+314
+100
+371
+000
+234
+000
+102
+026
+000
+162
+174
+004
+376
+002
+301
+201
+360
+000
+056
+373
+020
+000
+006
+000
+116
+002
+300
+200
+174
+004
+377
+161
+000
+373
+056
+373
+200
+000
+000
+006
+000
+062
+056
+373
+200
+100
+200
+000
+014
+274
+033
+271
+004
+336
+056
+373
+200
+200
+271
+004
+336
+000
+010
+102
+000
+212
+000
+116
+056
+177
+373
+000
+012
+374
+000
+002
+276
+056
+021
+373
+000
+016
+374
+000
+002
+276
+000
+046
+056
+023
+373
+000
+016
+374
+001
+002
+276
+000
+020
+056
+373
+200
+200
+271
+004
+336
+000
+226
+171
+002
+300
+000
+050
+171
+234
+002
+232
+000
+014
+171
+002
+276
+000
+022
+274
+023
+271
+004
+336
+171
+002
+300
+171
+002
+300
+000
+052
+171
+144
+002
+232
+000
+036
+171
+002
+276
+000
+024
+274
+021
+271
+004
+336
+374
+000
+002
+300
+356
+004
+374
+136
+165
+126
+374
+374
+000
+006
+030
+374
+001
+006
+040
+271
+004
+034
+271
+004
+216
+271
+004
+214
+271
+004
+120
+271
+004
+204
+274
+001
+000
+074
+002
+016
+271
+004
+156
+217
+271
+004
+240
+136
+165
+126
+360
+356
+034
+364
+056
+010
+056
+012
+056
+014
+002
+104
+300
+002
+352
+001
+104
+300
+002
+354
+102
+012
+010
+374
+001
+002
+354
+102
+025
+006
+171
+002
+354
+103
+125
+006
+171
+002
+352
+103
+252
+010
+374
+002
+002
+352
+071
+002
+352
+171
+002
+354
+356
+034
+364
+136
+165
+126
+370
+356
+004
+374
+271
+004
+250
+000
+071
+002
+014
+171
+002
+014
+100
+046
+171
+002
+016
+036
+071
+002
+012
+200
+200
+071
+002
+004
+071
+002
+002
+271
+004
+016
+217
+202
+271
+004
+310
+356
+004
+374
+136
+165
+126
+374
+310
+210
+271
+004
+060
+171
+002
+014
+136
+165
+126
+374
+171
+002
+014
+006
+171
+002
+014
+136
+165
+126
+354
+356
+034
+360
+071
+006
+002
+100
+000
+071
+006
+000
+100
+000
+102
+004
+103
+006
+000
+000
+372
+371
+002
+002
+002
+006
+371
+002
+004
+002
+010
+371
+002
+012
+002
+013
+102
+220
+004
+102
+000
+103
+000
+004
+103
+000
+071
+002
+012
+200
+200
+003
+002
+271
+004
+344
+217
+000
+300
+210
+171
+002
+346
+361
+000
+052
+004
+100
+100
+010
+052
+004
+100
+000
+020
+152
+004
+102
+100
+040
+020
+020
+152
+004
+074
+040
+100
+101
+001
+052
+006
+100
+100
+010
+052
+006
+100
+000
+020
+152
+006
+103
+100
+000
+020
+020
+152
+006
+074
+000
+100
+101
+001
+171
+002
+006
+022
+171
+002
+010
+012
+171
+002
+016
+000
+052
+302
+002
+002
+303
+002
+004
+304
+002
+012
+302
+002
+020
+303
+002
+022
+302
+002
+024
+001
+356
+034
+360
+136
+165
+126
+364
+356
+004
+370
+056
+014
+300
+210
+171
+002
+346
+361
+000
+322
+002
+356
+274
+003
+056
+012
+152
+006
+000
+056
+010
+152
+004
+000
+074
+004
+022
+174
+002
+364
+050
+004
+050
+000
+074
+002
+356
+271
+004
+326
+357
+024
+001
+171
+002
+016
+300
+002
+016
+356
+004
+370
+136
+165
+126
+374
+374
+004
+254
+002
+346
+374
+001
+002
+362
+020
+300
+002
+372
+300
+002
+370
+136
+165
+126
+374
+271
+004
+340
+100
+114
+171
+002
+014
+104
+171
+002
+016
+036
+071
+002
+013
+200
+200
+071
+002
+010
+071
+002
+006
+271
+004
+016
+217
+071
+002
+012
+200
+200
+071
+002
+004
+071
+002
+002
+271
+004
+016
+217
+171
+002
+000
+136
+165
+126
+374
+156
+010
+022
+171
+002
+000
+071
+002
+000
+156
+010
+364
+136
+165
+126
+364
+356
+000
+370
+156
+010
+271
+004
+130
+012
+014
+374
+004
+254
+002
+346
+050
+374
+002
+306
+002
+346
+174
+002
+306
+016
+212
+370
+100
+006
+100
+004
+213
+374
+002
+346
+352
+271
+004
+312
+356
+000
+370
+136
+165
+126
+370
+356
+004
+374
+171
+004
+314
+274
+000
+374
+000
+006
+025
+074
+171
+004
+314
+200
+064
+171
+004
+314
+200
+171
+004
+314
+020
+200
+100
+200
+012
+071
+006
+025
+200
+000
+074
+171
+004
+314
+200
+065
+171
+004
+314
+200
+356
+004
+374
+136
+165
+126
+374
+064
+171
+004
+314
+200
+074
+171
+004
+314
+200
+071
+006
+025
+200
+300
+002
+030
+074
+171
+004
+314
+200
+064
+171
+004
+314
+200
+075
+171
+004
+314
+200
+136
+165
+126
+374
+274
+002
+236
+271
+004
+260
+136
+165
+126
+374
+003
+300
+006
+060
+074
+221
+300
+006
+060
+136
+165
+126
+374
+071
+006
+062
+200
+100
+377
+200
+074
+002
+236
+271
+004
+116
+217
+136
+165
+126
+374
+003
+300
+006
+011
+074
+221
+300
+006
+011
+374
+001
+002
+032
+136
+165
+126
+370
+356
+004
+374
+274
+002
+222
+271
+004
+260
+000
+102
+377
+004
+102
+377
+002
+356
+004
+374
+136
+165
+126
+374
+256
+010
+074
+002
+252
+271
+004
+116
+217
+271
+004
+376
+136
+165
+126
+364
+356
+014
+370
+271
+004
+270
+000
+004
+071
+006
+011
+201
+100
+012
+071
+006
+013
+200
+000
+002
+071
+006
+011
+201
+100
+000
+106
+171
+002
+032
+004
+377
+016
+274
+002
+252
+271
+004
+260
+000
+103
+377
+014
+303
+006
+013
+074
+261
+022
+171
+002
+032
+006
+074
+221
+004
+074
+321
+300
+006
+011
+202
+271
+004
+310
+356
+014
+370
+136
+165
+126
+374
+171
+002
+032
+004
+377
+044
+140
+300
+006
+011
+271
+004
+240
+274
+012
+271
+004
+020
+074
+221
+300
+006
+011
+000
+136
+165
+126
+374
+356
+010
+002
+032
+271
+004
+376
+136
+165
+126
+374
+004
+071
+006
+011
+201
+100
+004
+001
+002
+000
+136
+165
+126
+374
+074
+261
+300
+006
+011
+136
+165
+126
+374
+074
+221
+300
+006
+011
+136
+165
+126
+364
+356
+000
+370
+313
+174
+002
+302
+006
+213
+112
+212
+374
+002
+302
+362
+313
+002
+302
+356
+000
+370
+136
+165
+126
+350
+356
+034
+354
+156
+010
+056
+014
+303
+374
+000
+171
+002
+302
+013
+006
+303
+000
+060
+323
+002
+302
+223
+102
+004
+152
+010
+012
+213
+113
+110
+004
+006
+122
+213
+213
+152
+010
+052
+010
+000
+303
+004
+356
+034
+354
+136
+165
+126
+354
+356
+014
+360
+156
+010
+303
+374
+000
+152
+004
+013
+006
+303
+377
+050
+152
+010
+012
+310
+210
+110
+004
+004
+123
+004
+271
+002
+302
+053
+004
+313
+002
+302
+303
+002
+356
+014
+360
+136
+165
+126
+360
+356
+014
+364
+156
+010
+303
+374
+000
+152
+010
+032
+152
+010
+122
+271
+002
+302
+352
+004
+002
+302
+252
+004
+222
+303
+356
+014
+364
+136
+165
+126
+370
+356
+004
+374
+026
+171
+002
+246
+004
+001
+100
+171
+002
+232
+004
+010
+100
+002
+356
+004
+374
+136
+165
+126
+370
+356
+004
+374
+271
+004
+104
+156
+010
+000
+362
+002
+356
+004
+374
+136
+165
+126
+370
+356
+000
+374
+156
+030
+252
+010
+056
+014
+056
+024
+052
+004
+356
+014
+050
+004
+050
+000
+271
+004
+264
+357
+014
+050
+004
+050
+000
+022
+271
+004
+326
+357
+024
+356
+000
+374
+136
+165
+126
+360
+256
+014
+056
+030
+271
+004
+364
+217
+100
+374
+200
+356
+014
+050
+004
+050
+000
+271
+004
+374
+217
+356
+364
+330
+150
+000
+000
+256
+034
+056
+374
+056
+010
+356
+364
+050
+004
+050
+000
+074
+004
+230
+056
+024
+271
+004
+046
+357
+030
+136
+165
+126
+374
+156
+030
+220
+356
+014
+050
+004
+050
+000
+056
+024
+271
+004
+232
+357
+014
+136
+165
+126
+374
+256
+024
+356
+014
+050
+004
+050
+000
+074
+004
+124
+056
+010
+271
+004
+046
+357
+020
+136
+165
+126
+374
+256
+034
+032
+156
+030
+220
+356
+014
+050
+004
+050
+000
+271
+004
+146
+217
+136
+165
+126
+340
+356
+004
+354
+271
+002
+034
+256
+344
+171
+002
+350
+000
+046
+152
+016
+000
+024
+154
+020
+254
+004
+054
+000
+356
+010
+050
+004
+050
+000
+271
+004
+030
+357
+014
+100
+000
+346
+212
+356
+010
+050
+004
+050
+000
+054
+004
+054
+000
+014
+271
+004
+042
+357
+024
+000
+000
+276
+102
+377
+000
+174
+310
+210
+271
+004
+356
+256
+344
+054
+152
+016
+314
+134
+154
+024
+250
+020
+352
+016
+002
+034
+310
+210
+271
+004
+356
+114
+016
+254
+024
+070
+156
+344
+150
+020
+314
+054
+154
+024
+250
+020
+156
+344
+350
+020
+002
+034
+310
+210
+271
+004
+356
+156
+344
+114
+020
+156
+344
+024
+310
+000
+122
+254
+024
+014
+154
+024
+154
+020
+020
+006
+154
+020
+016
+254
+020
+012
+154
+020
+154
+024
+024
+254
+010
+271
+004
+112
+214
+271
+004
+246
+114
+344
+115
+014
+000
+352
+152
+026
+012
+000
+330
+274
+032
+271
+004
+216
+110
+013
+014
+213
+271
+004
+356
+000
+220
+356
+010
+353
+006
+330
+150
+000
+000
+171
+002
+034
+016
+171
+002
+350
+044
+212
+352
+006
+050
+004
+050
+000
+074
+004
+250
+013
+271
+004
+046
+357
+020
+152
+026
+012
+330
+171
+002
+034
+016
+153
+016
+042
+254
+004
+054
+000
+271
+004
+052
+217
+110
+350
+000
+210
+156
+350
+010
+154
+020
+014
+332
+171
+002
+354
+022
+253
+026
+271
+002
+354
+012
+171
+002
+354
+113
+026
+271
+002
+350
+006
+313
+002
+350
+271
+002
+354
+006
+313
+002
+354
+256
+010
+074
+004
+022
+271
+004
+250
+217
+210
+171
+004
+026
+004
+213
+271
+004
+072
+213
+271
+004
+110
+113
+356
+004
+354
+136
+165
+126
+344
+356
+000
+360
+356
+024
+356
+350
+356
+014
+356
+350
+330
+150
+000
+000
+253
+004
+053
+000
+054
+004
+054
+000
+271
+004
+030
+357
+014
+100
+000
+124
+024
+123
+064
+256
+034
+356
+024
+050
+004
+050
+000
+054
+006
+023
+024
+056
+010
+271
+004
+042
+357
+024
+100
+377
+006
+377
+000
+302
+223
+054
+002
+153
+002
+064
+256
+034
+356
+024
+050
+004
+050
+000
+053
+002
+054
+004
+024
+056
+010
+271
+004
+042
+357
+024
+100
+377
+300
+153
+002
+002
+054
+004
+153
+004
+070
+256
+034
+356
+024
+050
+004
+050
+000
+054
+004
+054
+002
+053
+004
+056
+010
+271
+004
+042
+357
+024
+100
+377
+000
+200
+153
+004
+004
+054
+006
+153
+006
+066
+256
+034
+356
+024
+050
+004
+050
+000
+054
+004
+053
+006
+024
+056
+010
+271
+004
+042
+357
+024
+100
+377
+000
+100
+153
+006
+006
+356
+014
+250
+004
+050
+000
+054
+004
+054
+000
+271
+004
+154
+357
+014
+100
+036
+156
+010
+250
+014
+054
+004
+054
+000
+271
+004
+146
+217
+000
+000
+300
+156
+010
+250
+014
+054
+004
+054
+000
+271
+004
+146
+217
+254
+004
+054
+000
+271
+004
+052
+217
+110
+015
+016
+310
+210
+271
+004
+356
+000
+276
+274
+030
+271
+004
+216
+110
+012
+014
+215
+271
+004
+112
+000
+244
+127
+056
+350
+015
+356
+350
+050
+004
+050
+000
+156
+010
+050
+010
+271
+004
+326
+357
+024
+156
+010
+150
+014
+014
+334
+154
+000
+000
+212
+214
+115
+010
+156
+034
+150
+016
+020
+156
+034
+250
+016
+010
+150
+016
+112
+024
+156
+034
+112
+016
+001
+356
+000
+360
+136
+165
+126
+354
+356
+014
+360
+056
+010
+056
+012
+171
+002
+034
+024
+023
+102
+012
+053
+002
+103
+000
+126
+153
+020
+013
+350
+274
+030
+271
+004
+216
+110
+012
+074
+156
+020
+014
+356
+010
+330
+150
+000
+000
+212
+252
+010
+171
+002
+034
+020
+252
+024
+271
+002
+034
+012
+171
+002
+034
+112
+024
+312
+002
+034
+356
+014
+360
+136
+165
+126
+364
+356
+000
+370
+171
+002
+034
+036
+152
+020
+252
+010
+012
+252
+010
+271
+004
+112
+212
+271
+004
+246
+113
+012
+336
+256
+010
+012
+256
+010
+271
+004
+246
+356
+000
+370
+136
+165
+126
+354
+356
+000
+360
+156
+030
+122
+353
+130
+153
+130
+310
+000
+212
+153
+130
+256
+024
+356
+014
+354
+004
+330
+150
+000
+000
+113
+030
+253
+130
+014
+271
+004
+204
+217
+100
+014
+374
+000
+014
+353
+130
+342
+353
+130
+012
+253
+000
+014
+130
+076
+153
+130
+253
+000
+014
+130
+110
+026
+355
+364
+330
+330
+150
+000
+000
+215
+374
+000
+014
+314
+346
+256
+024
+356
+014
+354
+004
+330
+150
+000
+000
+356
+000
+360
+136
+165
+126
+354
+356
+000
+370
+156
+010
+250
+016
+076
+256
+034
+056
+030
+056
+024
+356
+014
+050
+004
+050
+000
+056
+010
+156
+024
+250
+016
+010
+174
+004
+352
+006
+174
+004
+326
+220
+357
+024
+000
+076
+256
+014
+056
+030
+271
+004
+364
+217
+300
+002
+330
+374
+002
+040
+002
+170
+274
+002
+040
+071
+002
+330
+356
+014
+050
+004
+050
+000
+271
+004
+374
+357
+014
+050
+004
+050
+000
+074
+004
+074
+056
+024
+271
+004
+046
+357
+020
+374
+002
+174
+002
+324
+274
+002
+174
+356
+014
+050
+004
+050
+000
+074
+004
+074
+056
+010
+271
+004
+046
+357
+020
+174
+002
+174
+000
+234
+174
+002
+040
+000
+202
+271
+002
+330
+353
+004
+050
+004
+050
+000
+271
+004
+374
+217
+356
+360
+330
+150
+000
+000
+352
+004
+250
+004
+050
+000
+156
+360
+271
+004
+362
+217
+100
+070
+127
+056
+360
+022
+071
+002
+330
+356
+360
+050
+004
+050
+000
+271
+004
+264
+357
+014
+050
+004
+050
+000
+023
+271
+004
+326
+357
+024
+374
+000
+014
+371
+002
+170
+000
+170
+374
+000
+014
+371
+002
+324
+000
+136
+356
+000
+370
+136
+165
+126
+360
+356
+004
+364
+156
+010
+156
+014
+052
+006
+153
+012
+040
+053
+006
+152
+012
+026
+052
+004
+153
+004
+371
+002
+330
+200
+026
+001
+024
+052
+006
+153
+006
+371
+002
+332
+200
+352
+000
+356
+004
+364
+136
+165
+126
+370
+356
+000
+374
+156
+030
+252
+010
+052
+004
+022
+356
+014
+050
+004
+050
+000
+056
+024
+271
+004
+352
+357
+024
+356
+000
+374
+136
+165
+126
+364
+156
+014
+374
+056
+014
+156
+020
+012
+056
+016
+156
+022
+102
+256
+020
+056
+014
+271
+004
+050
+217
+100
+370
+256
+024
+056
+370
+056
+374
+156
+010
+210
+050
+004
+050
+000
+074
+004
+336
+056
+010
+271
+004
+046
+357
+030
+136
+165
+126
+370
+356
+000
+374
+156
+030
+252
+004
+022
+356
+014
+050
+004
+050
+000
+056
+024
+271
+004
+054
+357
+020
+356
+000
+374
+136
+165
+126
+374
+256
+030
+056
+024
+356
+014
+050
+004
+050
+000
+074
+004
+176
+056
+010
+271
+004
+046
+357
+024
+136
+165
+126
+354
+356
+000
+360
+156
+010
+156
+034
+356
+020
+113
+013
--- /dev/null
+++ b/sys/src/games/blit/rom1
@@ -1,0 +1,4096 @@
+000
+157
+000
+000
+116
+000
+001
+000
+002
+000
+160
+000
+000
+000
+003
+004
+000
+000
+000
+074
+000
+074
+000
+053
+000
+051
+000
+060
+000
+041
+000
+075
+000
+076
+000
+076
+000
+055
+000
+075
+000
+070
+000
+070
+000
+070
+000
+070
+000
+056
+000
+071
+000
+041
+000
+034
+000
+025
+000
+044
+000
+044
+000
+043
+000
+026
+000
+037
+000
+037
+000
+046
+000
+075
+000
+026
+000
+051
+000
+052
+000
+075
+000
+054
+000
+056
+000
+056
+000
+075
+000
+057
+000
+071
+000
+060
+000
+066
+000
+074
+000
+067
+000
+042
+040
+000
+000
+040
+000
+377
+102
+123
+146
+043
+000
+001
+000
+000
+043
+000
+001
+000
+000
+043
+000
+001
+000
+000
+043
+000
+001
+000
+000
+043
+000
+001
+000
+000
+043
+000
+001
+000
+000
+116
+000
+003
+140
+116
+110
+300
+063
+000
+000
+000
+116
+000
+020
+116
+000
+013
+114
+003
+116
+110
+300
+116
+000
+022
+114
+003
+116
+116
+110
+300
+116
+000
+021
+114
+003
+116
+110
+300
+020
+000
+000
+010
+000
+146
+116
+000
+022
+140
+060
+000
+020
+000
+000
+077
+057
+000
+130
+116
+000
+024
+134
+114
+003
+116
+100
+106
+040
+116
+100
+106
+041
+116
+100
+106
+044
+116
+100
+106
+045
+116
+100
+106
+047
+116
+106
+000
+116
+063
+000
+000
+000
+063
+000
+000
+000
+040
+000
+377
+040
+000
+000
+102
+123
+146
+046
+000
+157
+056
+116
+000
+002
+116
+000
+002
+023
+000
+000
+000
+023
+000
+000
+000
+116
+022
+000
+000
+010
+000
+147
+023
+000
+000
+116
+160
+020
+000
+000
+002
+000
+147
+002
+000
+147
+020
+000
+000
+060
+377
+116
+020
+000
+000
+116
+162
+142
+123
+160
+070
+000
+050
+000
+000
+172
+116
+000
+002
+112
+155
+000
+062
+120
+116
+020
+000
+000
+000
+000
+000
+000
+044
+000
+130
+024
+074
+002
+000
+014
+000
+146
+050
+000
+000
+176
+140
+014
+000
+146
+176
+174
+124
+140
+000
+014
+000
+146
+176
+140
+066
+131
+155
+014
+000
+156
+064
+024
+140
+024
+123
+156
+112
+155
+140
+260
+147
+124
+124
+140
+377
+340
+260
+146
+020
+000
+130
+046
+000
+130
+112
+146
+042
+146
+377
+112
+157
+116
+000
+002
+116
+000
+002
+116
+000
+002
+116
+112
+157
+116
+000
+002
+044
+000
+130
+026
+123
+146
+140
+377
+050
+000
+000
+140
+377
+275
+162
+302
+322
+042
+000
+106
+062
+030
+346
+002
+000
+040
+000
+106
+070
+000
+263
+340
+271
+140
+376
+116
+377
+110
+004
+377
+044
+000
+102
+070
+000
+157
+000
+026
+265
+160
+300
+320
+042
+000
+106
+060
+010
+346
+002
+000
+040
+000
+106
+062
+060
+261
+340
+263
+123
+156
+377
+264
+147
+000
+122
+024
+340
+264
+147
+000
+122
+024
+060
+114
+004
+377
+116
+116
+116
+377
+110
+000
+377
+035
+000
+377
+063
+000
+000
+130
+116
+000
+015
+116
+000
+016
+063
+000
+000
+130
+063
+000
+000
+130
+063
+000
+000
+130
+063
+000
+000
+130
+116
+000
+010
+076
+000
+116
+000
+025
+116
+000
+010
+056
+000
+130
+116
+000
+024
+162
+300
+035
+377
+020
+377
+110
+140
+002
+116
+000
+001
+116
+000
+000
+160
+023
+000
+000
+140
+003
+123
+000
+130
+140
+002
+160
+201
+000
+130
+122
+000
+130
+140
+002
+116
+000
+010
+140
+001
+116
+000
+011
+063
+000
+130
+116
+000
+011
+063
+000
+130
+056
+000
+130
+116
+000
+013
+060
+000
+130
+260
+000
+130
+157
+000
+063
+000
+130
+000
+130
+060
+000
+130
+260
+000
+130
+157
+000
+063
+000
+130
+000
+130
+140
+001
+123
+000
+130
+140
+001
+140
+001
+122
+000
+130
+140
+001
+140
+001
+116
+000
+011
+064
+076
+000
+130
+077
+000
+160
+320
+000
+130
+077
+160
+320
+000
+130
+077
+060
+000
+130
+320
+077
+077
+000
+116
+000
+011
+337
+000
+000
+140
+001
+116
+000
+011
+064
+056
+000
+130
+160
+320
+000
+130
+077
+160
+320
+000
+130
+077
+077
+000
+130
+060
+000
+130
+320
+077
+116
+000
+011
+120
+140
+001
+116
+000
+011
+064
+060
+000
+130
+320
+076
+077
+000
+160
+320
+000
+130
+220
+077
+160
+320
+000
+130
+077
+077
+000
+130
+077
+000
+116
+000
+011
+337
+000
+000
+140
+000
+116
+000
+011
+064
+076
+000
+130
+060
+000
+130
+320
+077
+160
+320
+000
+130
+077
+160
+320
+000
+130
+220
+077
+077
+000
+130
+077
+000
+130
+116
+000
+011
+337
+000
+000
+140
+000
+160
+320
+000
+130
+076
+160
+320
+000
+130
+077
+077
+000
+130
+077
+000
+130
+116
+000
+013
+134
+140
+000
+014
+000
+147
+376
+014
+000
+147
+376
+014
+000
+147
+376
+014
+000
+147
+376
+014
+000
+147
+376
+014
+000
+147
+377
+014
+000
+147
+377
+014
+000
+147
+376
+014
+000
+147
+376
+014
+000
+147
+377
+140
+000
+123
+000
+130
+140
+000
+116
+000
+007
+140
+000
+063
+000
+000
+130
+140
+000
+160
+320
+000
+130
+076
+160
+320
+000
+130
+077
+077
+000
+077
+000
+116
+000
+013
+134
+063
+000
+000
+130
+063
+000
+000
+130
+140
+000
+076
+000
+057
+000
+130
+116
+000
+011
+130
+057
+057
+000
+000
+110
+377
+057
+000
+116
+116
+000
+060
+337
+000
+000
+122
+000
+130
+140
+000
+137
+014
+000
+142
+377
+320
+060
+000
+116
+000
+375
+377
+375
+377
+375
+377
+377
+377
+377
+375
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+375
+060
+000
+130
+260
+000
+130
+157
+000
+116
+000
+007
+063
+000
+000
+130
+056
+000
+130
+116
+000
+013
+112
+000
+130
+157
+000
+140
+374
+116
+000
+010
+140
+374
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+060
+000
+130
+260
+000
+130
+155
+000
+076
+000
+077
+000
+160
+320
+000
+130
+077
+160
+320
+000
+130
+077
+116
+000
+010
+064
+060
+077
+077
+000
+116
+000
+011
+337
+000
+000
+160
+320
+000
+130
+220
+063
+000
+130
+140
+000
+122
+000
+130
+114
+000
+377
+116
+116
+116
+377
+110
+014
+377
+164
+044
+000
+130
+040
+147
+000
+164
+046
+040
+147
+000
+014
+000
+000
+147
+000
+014
+000
+000
+147
+000
+014
+000
+000
+146
+000
+122
+044
+140
+377
+112
+157
+000
+264
+000
+130
+154
+000
+060
+140
+000
+060
+000
+130
+140
+000
+160
+140
+000
+114
+014
+377
+116
+116
+116
+377
+110
+000
+000
+076
+000
+057
+000
+130
+116
+000
+011
+130
+057
+057
+000
+000
+057
+000
+107
+057
+000
+116
+116
+000
+060
+337
+000
+000
+114
+000
+000
+116
+116
+116
+377
+110
+000
+000
+112
+000
+130
+146
+000
+076
+000
+116
+000
+025
+140
+377
+056
+000
+130
+116
+000
+024
+162
+300
+140
+000
+114
+000
+000
+116
+116
+116
+377
+110
+000
+000
+116
+000
+010
+162
+220
+140
+000
+114
+000
+000
+116
+116
+116
+377
+110
+004
+377
+105
+000
+060
+301
+000
+064
+132
+060
+301
+000
+064
+126
+040
+000
+140
+000
+114
+004
+377
+116
+116
+116
+377
+110
+004
+377
+105
+000
+060
+301
+000
+064
+132
+060
+301
+000
+064
+126
+060
+301
+000
+064
+132
+060
+301
+000
+064
+126
+101
+000
+042
+000
+130
+042
+043
+000
+000
+140
+000
+040
+000
+130
+114
+004
+377
+116
+116
+116
+377
+110
+000
+000
+110
+000
+116
+000
+013
+130
+110
+000
+116
+000
+013
+130
+110
+000
+116
+000
+013
+130
+056
+000
+057
+000
+116
+000
+076
+130
+112
+147
+000
+140
+000
+076
+000
+057
+000
+116
+000
+011
+130
+057
+057
+000
+000
+101
+000
+057
+000
+057
+000
+116
+000
+011
+120
+057
+000
+057
+000
+057
+000
+000
+116
+000
+060
+337
+000
+000
+060
+000
+260
+000
+146
+000
+060
+000
+260
+000
+154
+000
+056
+000
+060
+000
+220
+000
+320
+000
+077
+077
+000
+116
+000
+013
+130
+140
+000
+076
+000
+077
+000
+057
+000
+116
+000
+013
+134
+140
+000
+060
+000
+260
+000
+154
+000
+056
+000
+077
+000
+060
+000
+220
+000
+320
+000
+077
+116
+000
+013
+130
+140
+000
+076
+000
+077
+000
+057
+000
+116
+000
+013
+134
+114
+000
+000
+116
+116
+116
+377
+110
+004
+377
+044
+000
+112
+154
+000
+064
+000
+112
+000
+154
+000
+065
+000
+000
+160
+320
+000
+130
+062
+262
+157
+000
+160
+320
+000
+130
+064
+160
+320
+000
+130
+062
+000
+262
+157
+000
+160
+320
+000
+130
+065
+000
+114
+004
+377
+116
+116
+116
+377
+110
+000
+000
+076
+000
+101
+000
+057
+000
+057
+000
+116
+000
+011
+120
+057
+000
+057
+000
+057
+000
+000
+116
+000
+056
+337
+000
+000
+114
+000
+000
+116
+116
+116
+377
+110
+000
+377
+112
+000
+130
+157
+001
+056
+000
+130
+116
+000
+024
+035
+377
+020
+377
+110
+110
+002
+000
+147
+000
+020
+377
+110
+002
+000
+140
+000
+112
+000
+130
+146
+000
+160
+140
+000
+160
+063
+000
+130
+076
+000
+130
+116
+000
+023
+140
+377
+116
+000
+023
+140
+377
+112
+000
+130
+146
+000
+160
+140
+000
+160
+063
+000
+130
+140
+377
+014
+000
+147
+377
+014
+000
+147
+377
+014
+000
+147
+377
+164
+014
+000
+144
+000
+040
+000
+106
+062
+110
+322
+101
+030
+022
+377
+262
+147
+000
+140
+000
+060
+110
+320
+042
+000
+106
+035
+010
+377
+020
+377
+110
+112
+146
+000
+140
+000
+020
+377
+110
+002
+000
+146
+000
+076
+000
+116
+000
+022
+020
+377
+110
+076
+116
+000
+022
+140
+000
+122
+140
+377
+140
+000
+014
+000
+377
+146
+000
+063
+000
+000
+130
+014
+000
+377
+146
+000
+063
+000
+000
+130
+140
+000
+014
+000
+377
+146
+000
+063
+000
+000
+130
+140
+000
+020
+377
+110
+076
+116
+000
+022
+140
+376
+112
+000
+130
+146
+000
+014
+001
+000
+130
+156
+000
+112
+000
+130
+147
+000
+076
+000
+116
+000
+022
+122
+000
+130
+112
+000
+130
+147
+000
+014
+000
+000
+130
+154
+000
+112
+000
+130
+146
+000
+076
+000
+116
+000
+022
+063
+000
+000
+130
+114
+000
+377
+116
+116
+116
+377
+063
+234
+000
+000
+063
+000
+000
+000
+116
+000
+024
+116
+000
+022
+116
+000
+021
+116
+000
+022
+116
+000
+020
+056
+000
+150
+057
+000
+152
+116
+000
+052
+130
+116
+000
+001
+116
+116
+116
+377
+110
+000
+377
+064
+000
+066
+000
+070
+000
+160
+300
+063
+000
+144
+160
+300
+063
+000
+144
+014
+001
+154
+063
+000
+000
+144
+014
+002
+157
+102
+000
+144
+014
+001
+154
+102
+000
+144
+014
+002
+157
+063
+000
+000
+144
+060
+000
+144
+200
+000
+144
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+116
+000
+001
+064
+060
+000
+145
+122
+000
+145
+112
+146
+112
+000
+145
+147
+020
+000
+145
+110
+076
+077
+000
+145
+077
+000
+145
+116
+000
+020
+130
+076
+116
+000
+001
+114
+000
+377
+116
+116
+116
+377
+221
+056
+116
+000
+021
+102
+000
+145
+116
+116
+116
+377
+112
+000
+145
+157
+123
+000
+145
+116
+116
+116
+377
+110
+004
+377
+060
+000
+000
+104
+064
+060
+000
+000
+104
+066
+112
+156
+112
+157
+160
+140
+000
+063
+000
+145
+000
+145
+063
+000
+145
+000
+145
+023
+000
+145
+000
+145
+014
+375
+154
+006
+010
+014
+376
+154
+006
+010
+020
+000
+145
+110
+076
+077
+077
+116
+000
+015
+130
+070
+110
+347
+042
+000
+144
+105
+010
+060
+000
+104
+264
+154
+060
+000
+104
+064
+160
+320
+000
+320
+014
+003
+155
+160
+320
+000
+062
+003
+222
+123
+064
+060
+000
+104
+266
+154
+060
+000
+104
+066
+160
+320
+000
+320
+014
+004
+155
+160
+320
+000
+062
+004
+222
+123
+066
+264
+000
+145
+146
+266
+000
+145
+146
+112
+000
+145
+146
+377
+063
+000
+145
+063
+000
+145
+023
+000
+145
+063
+000
+145
+063
+000
+145
+043
+000
+145
+160
+114
+004
+377
+116
+116
+116
+377
+110
+004
+377
+060
+000
+110
+347
+042
+000
+144
+105
+010
+043
+000
+144
+076
+000
+060
+000
+320
+000
+077
+060
+000
+320
+000
+077
+057
+000
+000
+040
+000
+144
+057
+000
+057
+000
+057
+000
+144
+116
+000
+060
+117
+000
+160
+220
+000
+145
+063
+000
+145
+114
+004
+377
+116
+116
+116
+377
+043
+000
+107
+000
+144
+063
+000
+000
+144
+160
+063
+000
+144
+063
+000
+144
+116
+116
+116
+377
+116
+000
+016
+112
+147
+112
+000
+145
+146
+112
+000
+145
+147
+020
+000
+145
+110
+076
+077
+000
+145
+077
+000
+145
+116
+000
+020
+130
+020
+000
+145
+110
+076
+077
+000
+145
+077
+000
+145
+116
+000
+020
+130
+122
+000
+145
+116
+116
+116
+377
+112
+000
+157
+102
+000
+145
+060
+000
+145
+260
+000
+155
+116
+116
+116
+377
+110
+014
+377
+044
+000
+116
+000
+016
+040
+146
+043
+000
+107
+000
+144
+140
+043
+000
+144
+000
+144
+046
+000
+144
+140
+046
+160
+067
+000
+067
+000
+120
+267
+000
+144
+145
+116
+000
+016
+114
+014
+377
+116
+116
+116
+377
+110
+000
+377
+040
+000
+107
+020
+000
+023
+000
+000
+000
+160
+042
+000
+107
+022
+160
+042
+000
+107
+022
+040
+000
+107
+020
+110
+002
+000
+147
+020
+000
+000
+110
+064
+160
+042
+000
+107
+022
+160
+042
+000
+107
+022
+114
+000
+377
+116
+116
+116
+377
+160
+042
+000
+107
+022
+160
+042
+000
+107
+022
+020
+000
+000
+110
+063
+000
+145
+160
+042
+000
+107
+022
+160
+042
+000
+107
+022
+160
+042
+000
+107
+022
+116
+116
+116
+377
+056
+000
+130
+116
+000
+024
+116
+116
+116
+377
+160
+023
+000
+000
+060
+000
+023
+000
+000
+116
+116
+116
+377
+020
+000
+000
+110
+002
+000
+076
+057
+000
+130
+116
+000
+024
+130
+116
+116
+116
+377
+160
+023
+000
+000
+060
+000
+023
+000
+000
+063
+000
+000
+145
+116
+116
+116
+377
+110
+000
+377
+056
+000
+130
+116
+000
+024
+064
+014
+377
+147
+002
+000
+060
+114
+000
+377
+116
+116
+116
+377
+076
+000
+057
+000
+130
+116
+000
+024
+130
+116
+000
+022
+116
+116
+116
+377
+110
+000
+377
+116
+000
+001
+064
+160
+022
+000
+000
+110
+302
+147
+020
+000
+000
+110
+066
+160
+022
+000
+000
+110
+302
+147
+000
+112
+000
+145
+146
+166
+140
+056
+000
+130
+116
+000
+024
+066
+014
+377
+147
+023
+000
+000
+060
+000
+140
+112
+000
+145
+147
+060
+000
+140
+060
+000
+023
+000
+000
+076
+116
+000
+001
+114
+000
+377
+116
+116
+116
+377
+112
+000
+145
+146
+160
+140
+160
+023
+000
+000
+116
+000
+001
+076
+000
+116
+000
+021
+060
+000
+023
+000
+000
+160
+116
+116
+116
+377
+063
+000
+000
+145
+116
+000
+022
+116
+116
+116
+377
+160
+022
+000
+000
+110
+302
+146
+160
+140
+160
+116
+116
+116
+377
+060
+000
+023
+000
+000
+116
+116
+116
+377
+060
+000
+023
+000
+000
+116
+116
+116
+377
+110
+014
+377
+227
+044
+000
+130
+140
+044
+046
+134
+265
+000
+144
+145
+043
+000
+144
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+064
+000
+100
+106
+047
+046
+000
+144
+040
+146
+106
+160
+140
+043
+000
+144
+102
+067
+000
+112
+000
+146
+044
+040
+045
+000
+140
+040
+040
+044
+122
+000
+060
+000
+070
+106
+060
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+100
+106
+047
+046
+000
+040
+146
+106
+160
+140
+123
+000
+146
+221
+044
+045
+000
+140
+045
+000
+046
+000
+144
+064
+000
+043
+000
+144
+106
+060
+114
+014
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+100
+106
+047
+112
+000
+147
+102
+000
+040
+040
+000
+144
+043
+000
+000
+144
+102
+000
+102
+106
+114
+004
+377
+116
+116
+116
+377
+110
+000
+377
+164
+112
+000
+130
+157
+160
+204
+112
+000
+130
+157
+160
+204
+060
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+116
+000
+025
+300
+000
+064
+147
+060
+114
+000
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+076
+000
+057
+000
+057
+000
+057
+000
+101
+000
+057
+000
+057
+000
+116
+000
+075
+117
+000
+057
+000
+057
+000
+057
+116
+000
+060
+117
+000
+114
+004
+377
+116
+116
+116
+377
+056
+000
+057
+000
+116
+000
+074
+130
+055
+377
+056
+101
+000
+057
+000
+057
+000
+116
+000
+075
+120
+103
+377
+042
+043
+000
+000
+076
+000
+057
+377
+057
+000
+101
+377
+057
+000
+057
+000
+057
+000
+025
+057
+000
+116
+000
+041
+117
+000
+116
+116
+116
+377
+040
+000
+076
+101
+000
+057
+000
+057
+000
+057
+000
+116
+000
+056
+117
+000
+116
+116
+116
+377
+076
+000
+101
+000
+057
+000
+057
+000
+057
+000
+026
+057
+000
+116
+000
+041
+117
+000
+116
+116
+116
+377
+112
+000
+146
+040
+000
+056
+101
+000
+057
+000
+057
+000
+116
+000
+033
+120
+116
+116
+116
+377
+110
+074
+377
+102
+000
+145
+102
+377
+044
+000
+151
+140
+001
+050
+000
+140
+001
+052
+000
+056
+000
+057
+000
+101
+000
+057
+000
+057
+000
+116
+000
+054
+117
+000
+112
+147
+000
+056
+101
+000
+057
+000
+057
+000
+057
+000
+057
+000
+057
+116
+000
+031
+117
+000
+064
+147
+000
+014
+377
+146
+000
+221
+056
+116
+000
+033
+112
+377
+146
+040
+000
+261
+147
+040
+000
+102
+000
+043
+000
+000
+145
+221
+056
+116
+000
+033
+045
+000
+102
+000
+140
+040
+377
+040
+000
+261
+147
+040
+000
+102
+000
+040
+377
+043
+000
+000
+145
+221
+056
+116
+000
+033
+040
+377
+041
+000
+051
+377
+000
+221
+140
+001
+112
+000
+147
+040
+000
+041
+000
+000
+140
+045
+000
+000
+112
+000
+147
+040
+000
+041
+000
+000
+056
+000
+116
+000
+051
+056
+116
+000
+053
+055
+377
+050
+040
+146
+376
+044
+000
+040
+146
+376
+076
+000
+116
+000
+053
+046
+040
+146
+056
+116
+000
+033
+140
+377
+101
+000
+103
+000
+042
+043
+000
+000
+047
+000
+145
+000
+044
+000
+151
+140
+056
+101
+000
+057
+000
+057
+000
+057
+000
+026
+057
+116
+000
+041
+117
+000
+044
+000
+040
+146
+047
+000
+145
+000
+050
+000
+140
+056
+000
+057
+000
+116
+000
+051
+130
+055
+377
+147
+377
+051
+377
+000
+050
+000
+040
+146
+047
+000
+151
+000
+102
+000
+112
+000
+151
+147
+040
+000
+151
+041
+000
+112
+000
+151
+146
+043
+000
+151
+112
+000
+151
+146
+043
+000
+151
+056
+000
+057
+000
+000
+116
+000
+074
+130
+046
+067
+000
+000
+000
+056
+116
+000
+042
+056
+116
+000
+044
+040
+114
+074
+377
+116
+116
+116
+377
+110
+074
+377
+107
+000
+111
+377
+101
+000
+103
+377
+042
+043
+000
+000
+056
+000
+057
+000
+057
+000
+057
+000
+116
+000
+054
+117
+000
+112
+147
+001
+060
+260
+154
+056
+000
+101
+000
+057
+000
+057
+000
+077
+000
+077
+057
+057
+000
+116
+000
+031
+117
+000
+014
+377
+146
+160
+140
+001
+070
+060
+000
+260
+000
+154
+056
+000
+101
+000
+057
+000
+057
+000
+077
+000
+077
+000
+057
+057
+000
+116
+000
+031
+117
+000
+014
+377
+147
+071
+000
+000
+060
+000
+260
+000
+157
+056
+000
+101
+000
+057
+000
+057
+000
+057
+000
+077
+000
+077
+000
+057
+000
+116
+000
+031
+117
+000
+014
+377
+147
+377
+071
+000
+000
+060
+000
+260
+000
+157
+056
+000
+101
+000
+057
+000
+057
+000
+057
+000
+077
+000
+077
+057
+000
+116
+000
+031
+117
+000
+014
+377
+147
+377
+071
+000
+000
+101
+000
+056
+000
+057
+000
+057
+000
+057
+000
+116
+000
+076
+117
+000
+112
+147
+040
+000
+056
+000
+057
+000
+057
+000
+116
+000
+033
+120
+160
+140
+000
+040
+000
+056
+000
+057
+000
+057
+000
+116
+000
+033
+120
+056
+000
+057
+000
+116
+000
+051
+130
+052
+040
+146
+221
+056
+116
+000
+033
+140
+376
+076
+000
+116
+000
+053
+044
+040
+146
+056
+116
+000
+051
+140
+377
+102
+057
+377
+057
+101
+377
+057
+000
+057
+000
+040
+000
+057
+000
+116
+000
+060
+117
+000
+040
+000
+045
+000
+000
+044
+045
+000
+000
+131
+131
+045
+000
+040
+000
+045
+000
+000
+040
+000
+112
+000
+147
+040
+000
+041
+000
+040
+000
+041
+000
+160
+114
+074
+377
+116
+116
+116
+377
+110
+014
+377
+064
+000
+066
+000
+046
+000
+145
+140
+060
+260
+146
+060
+000
+260
+147
+000
+046
+000
+040
+146
+076
+000
+116
+000
+053
+044
+040
+147
+045
+000
+000
+101
+000
+044
+045
+000
+000
+131
+102
+000
+045
+000
+145
+000
+102
+000
+112
+000
+145
+147
+040
+000
+145
+041
+000
+043
+000
+145
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+145
+140
+046
+000
+112
+000
+147
+056
+000
+116
+000
+051
+056
+116
+000
+053
+044
+040
+146
+112
+000
+147
+056
+000
+116
+000
+053
+114
+014
+377
+116
+116
+116
+377
+110
+074
+377
+044
+000
+046
+101
+002
+042
+002
+263
+147
+000
+050
+002
+050
+000
+101
+000
+103
+000
+042
+043
+000
+000
+050
+140
+056
+002
+057
+116
+000
+036
+130
+112
+147
+331
+000
+000
+271
+002
+146
+271
+002
+146
+006
+000
+000
+002
+140
+040
+002
+006
+000
+000
+002
+052
+140
+101
+377
+052
+052
+053
+000
+000
+121
+233
+000
+000
+273
+146
+050
+000
+101
+000
+103
+000
+042
+043
+000
+000
+114
+074
+377
+116
+116
+116
+377
+110
+014
+377
+040
+000
+112
+000
+146
+076
+000
+057
+000
+057
+000
+101
+000
+057
+000
+057
+000
+057
+000
+040
+000
+112
+000
+147
+040
+000
+025
+140
+040
+000
+060
+116
+117
+000
+140
+001
+056
+000
+057
+000
+116
+000
+074
+130
+043
+000
+151
+043
+000
+145
+000
+147
+056
+000
+145
+057
+000
+151
+101
+000
+057
+000
+057
+000
+116
+000
+075
+117
+000
+057
+000
+057
+000
+057
+000
+034
+057
+000
+116
+000
+041
+117
+000
+043
+000
+147
+000
+151
+056
+000
+147
+101
+000
+057
+000
+057
+000
+057
+000
+034
+057
+000
+116
+000
+041
+117
+000
+046
+000
+147
+140
+000
+044
+000
+145
+140
+000
+056
+000
+151
+101
+000
+057
+000
+057
+000
+116
+000
+075
+120
+103
+377
+042
+043
+000
+000
+101
+000
+056
+000
+057
+000
+110
+377
+116
+000
+056
+120
+112
+147
+102
+057
+377
+057
+057
+000
+151
+101
+377
+057
+000
+057
+000
+116
+000
+075
+117
+000
+057
+000
+057
+000
+057
+116
+000
+060
+117
+000
+325
+000
+000
+265
+000
+147
+146
+377
+327
+000
+000
+267
+000
+151
+146
+377
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+046
+000
+060
+000
+260
+000
+154
+060
+000
+260
+000
+154
+060
+000
+220
+000
+301
+000
+151
+112
+155
+160
+140
+060
+000
+220
+000
+301
+000
+151
+112
+154
+160
+114
+014
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+076
+000
+057
+000
+057
+101
+000
+057
+000
+057
+000
+057
+000
+116
+000
+076
+117
+000
+114
+004
+377
+116
+116
+116
+377
+055
+000
+377
+060
+000
+260
+000
+146
+060
+000
+260
+000
+147
+056
+000
+057
+000
+116
+000
+073
+130
+055
+377
+076
+000
+057
+377
+057
+377
+040
+000
+134
+057
+000
+057
+000
+057
+000
+036
+057
+000
+116
+000
+041
+117
+000
+116
+116
+116
+377
+110
+004
+377
+044
+000
+076
+000
+057
+101
+000
+057
+000
+057
+000
+057
+000
+116
+000
+067
+117
+000
+114
+004
+377
+116
+116
+116
+377
+076
+000
+057
+000
+101
+000
+057
+000
+057
+000
+057
+000
+037
+057
+000
+116
+000
+041
+117
+000
+116
+116
+116
+377
+110
+074
+377
+044
+000
+046
+000
+111
+000
+052
+040
--- /dev/null
+++ b/sys/src/games/blit/rom2
@@ -1,0 +1,4096 @@
+030
+213
+056
+030
+012
+356
+020
+050
+004
+050
+000
+000
+370
+255
+004
+055
+000
+054
+004
+054
+000
+271
+004
+030
+357
+014
+100
+006
+153
+020
+276
+024
+125
+042
+253
+020
+056
+030
+054
+006
+025
+024
+056
+014
+012
+271
+004
+346
+357
+024
+225
+054
+002
+155
+002
+050
+253
+020
+056
+030
+055
+002
+054
+004
+024
+056
+014
+012
+271
+004
+346
+357
+024
+155
+002
+002
+054
+004
+155
+004
+052
+253
+020
+056
+030
+054
+004
+054
+002
+055
+004
+056
+014
+012
+271
+004
+346
+357
+024
+155
+004
+004
+054
+006
+155
+006
+050
+253
+020
+056
+030
+054
+004
+055
+006
+024
+056
+014
+012
+271
+004
+346
+357
+024
+155
+006
+006
+213
+056
+030
+053
+010
+054
+004
+054
+000
+012
+156
+014
+220
+357
+024
+356
+000
+360
+136
+165
+126
+370
+356
+000
+374
+156
+010
+352
+006
+250
+004
+050
+000
+156
+020
+271
+004
+362
+217
+100
+044
+252
+016
+156
+030
+356
+020
+050
+004
+050
+000
+056
+014
+012
+271
+004
+346
+357
+024
+356
+000
+374
+136
+165
+126
+364
+356
+000
+370
+156
+010
+012
+000
+236
+212
+271
+004
+072
+100
+006
+377
+000
+216
+271
+004
+130
+352
+006
+250
+004
+050
+000
+271
+004
+270
+217
+271
+004
+312
+020
+271
+002
+354
+271
+004
+072
+100
+310
+171
+002
+354
+312
+346
+152
+016
+026
+253
+010
+271
+004
+112
+213
+271
+004
+246
+153
+020
+013
+346
+352
+022
+002
+354
+171
+002
+350
+312
+006
+271
+002
+350
+252
+022
+010
+152
+022
+250
+026
+212
+271
+004
+246
+000
+356
+000
+370
+136
+165
+126
+354
+356
+000
+360
+156
+010
+012
+006
+252
+022
+004
+000
+144
+271
+004
+130
+152
+022
+000
+262
+352
+006
+250
+004
+050
+000
+353
+006
+050
+004
+050
+000
+271
+004
+030
+357
+014
+100
+000
+206
+152
+016
+000
+170
+154
+020
+154
+014
+313
+000
+150
+254
+004
+054
+000
+054
+004
+054
+000
+054
+010
+271
+004
+174
+357
+020
+254
+024
+014
+154
+024
+154
+020
+020
+006
+154
+020
+016
+254
+020
+012
+154
+020
+154
+024
+024
+153
+016
+020
+254
+024
+112
+014
+253
+016
+010
+153
+016
+114
+024
+114
+016
+115
+014
+000
+206
+153
+022
+013
+000
+114
+171
+002
+350
+312
+110
+171
+002
+354
+312
+010
+352
+022
+002
+354
+252
+026
+012
+152
+026
+152
+022
+022
+152
+022
+152
+026
+026
+171
+002
+350
+112
+022
+171
+002
+350
+026
+252
+022
+312
+002
+350
+171
+002
+354
+070
+153
+016
+052
+352
+006
+250
+004
+050
+000
+054
+004
+054
+000
+271
+004
+030
+357
+014
+100
+004
+112
+014
+154
+020
+014
+322
+153
+022
+312
+000
+304
+271
+004
+312
+001
+356
+000
+360
+136
+165
+126
+360
+356
+004
+364
+156
+010
+056
+020
+352
+006
+250
+004
+050
+000
+056
+014
+271
+004
+100
+217
+100
+000
+114
+152
+016
+060
+253
+004
+053
+000
+056
+014
+271
+004
+100
+217
+100
+024
+202
+056
+014
+053
+010
+271
+004
+302
+217
+030
+153
+020
+013
+314
+202
+056
+014
+012
+271
+004
+302
+217
+356
+004
+364
+136
+165
+126
+370
+356
+000
+374
+156
+010
+271
+004
+130
+127
+352
+006
+050
+004
+050
+000
+012
+271
+004
+174
+357
+014
+274
+002
+074
+002
+352
+006
+050
+004
+050
+000
+271
+004
+034
+357
+012
+050
+004
+050
+000
+012
+271
+004
+174
+357
+014
+271
+004
+312
+356
+000
+374
+136
+165
+126
+374
+127
+074
+004
+320
+356
+010
+050
+004
+050
+000
+074
+004
+022
+271
+004
+054
+357
+020
+136
+165
+126
+334
+356
+014
+354
+156
+010
+122
+233
+271
+004
+312
+000
+000
+030
+233
+271
+004
+312
+200
+003
+271
+004
+234
+217
+000
+102
+223
+344
+012
+100
+001
+102
+100
+004
+152
+006
+006
+174
+007
+006
+003
+100
+056
+014
+100
+201
+147
+271
+004
+234
+217
+100
+350
+056
+016
+152
+006
+200
+147
+271
+004
+234
+217
+100
+352
+074
+040
+103
+200
+056
+350
+271
+004
+166
+217
+100
+350
+016
+352
+004
+074
+000
+100
+101
+201
+056
+352
+271
+004
+166
+217
+100
+352
+056
+350
+100
+344
+100
+340
+156
+344
+016
+352
+004
+100
+156
+346
+356
+340
+250
+004
+050
+000
+271
+004
+052
+217
+110
+110
+010
+271
+004
+130
+014
+044
+127
+056
+350
+014
+356
+340
+050
+004
+050
+000
+074
+004
+022
+271
+004
+326
+357
+024
+274
+001
+356
+340
+050
+004
+050
+000
+074
+004
+022
+271
+004
+232
+357
+014
+274
+002
+074
+001
+356
+340
+050
+004
+050
+000
+271
+004
+034
+357
+012
+050
+004
+050
+000
+074
+004
+022
+271
+004
+232
+357
+014
+156
+352
+122
+076
+274
+003
+056
+352
+023
+271
+004
+312
+217
+003
+100
+101
+156
+350
+001
+074
+004
+022
+023
+074
+004
+056
+271
+004
+006
+357
+020
+016
+156
+352
+213
+223
+276
+271
+004
+312
+356
+340
+174
+002
+266
+330
+150
+000
+000
+174
+002
+266
+356
+014
+354
+136
+165
+126
+334
+356
+034
+354
+156
+010
+377
+052
+006
+271
+002
+020
+012
+271
+004
+344
+217
+356
+340
+330
+150
+000
+000
+377
+000
+256
+356
+340
+250
+004
+050
+000
+071
+002
+020
+100
+350
+000
+271
+004
+100
+217
+100
+000
+112
+056
+352
+156
+342
+000
+300
+374
+016
+000
+002
+000
+152
+004
+010
+052
+004
+100
+000
+104
+036
+104
+032
+016
+302
+100
+003
+100
+201
+271
+004
+062
+100
+004
+002
+004
+002
+377
+104
+056
+204
+356
+340
+050
+004
+050
+000
+271
+004
+024
+217
+202
+356
+340
+050
+004
+050
+000
+271
+004
+024
+217
+002
+274
+002
+271
+004
+020
+056
+014
+010
+141
+171
+002
+030
+000
+104
+152
+010
+013
+074
+271
+004
+130
+353
+006
+250
+004
+050
+000
+353
+006
+050
+004
+050
+000
+013
+271
+004
+174
+357
+020
+271
+004
+312
+213
+271
+004
+112
+252
+010
+103
+006
+002
+356
+034
+354
+136
+165
+126
+370
+356
+004
+374
+056
+020
+074
+016
+302
+100
+156
+012
+016
+156
+012
+100
+016
+156
+010
+156
+014
+274
+003
+356
+010
+050
+004
+050
+000
+074
+004
+022
+271
+004
+232
+357
+014
+356
+004
+374
+136
+165
+126
+340
+356
+374
+344
+056
+010
+056
+012
+056
+014
+056
+016
+256
+020
+074
+022
+271
+004
+262
+217
+110
+012
+006
+310
+000
+202
+360
+102
+000
+017
+004
+007
+100
+004
+100
+107
+007
+106
+100
+100
+004
+102
+006
+103
+010
+104
+012
+105
+014
+256
+020
+012
+005
+103
+300
+000
+052
+004
+201
+000
+001
+271
+004
+366
+217
+000
+271
+004
+116
+217
+010
+000
+236
+252
+016
+274
+001
+352
+006
+050
+004
+050
+000
+012
+271
+004
+232
+357
+014
+112
+356
+374
+344
+136
+165
+126
+374
+310
+210
+356
+010
+050
+004
+050
+000
+271
+004
+152
+217
+136
+165
+126
+370
+356
+000
+374
+156
+010
+012
+020
+222
+271
+004
+066
+212
+271
+004
+246
+356
+000
+374
+136
+165
+126
+364
+356
+014
+370
+056
+010
+056
+012
+103
+004
+002
+002
+003
+356
+014
+370
+136
+165
+126
+364
+356
+014
+370
+056
+010
+056
+012
+103
+004
+002
+002
+003
+356
+014
+370
+136
+165
+126
+360
+356
+004
+364
+156
+010
+256
+014
+012
+271
+004
+250
+217
+110
+352
+006
+250
+004
+050
+000
+056
+014
+271
+004
+100
+217
+100
+000
+072
+017
+156
+014
+017
+100
+001
+150
+000
+056
+020
+100
+026
+100
+001
+020
+100
+002
+016
+100
+003
+004
+123
+012
+123
+006
+002
+100
+123
+356
+004
+364
+136
+165
+126
+374
+056
+010
+156
+014
+032
+156
+020
+024
+056
+012
+156
+016
+012
+156
+022
+004
+001
+002
+000
+136
+165
+126
+374
+356
+010
+002
+366
+356
+014
+002
+372
+171
+002
+372
+210
+171
+002
+366
+210
+171
+002
+366
+210
+171
+002
+372
+211
+210
+371
+002
+366
+002
+360
+136
+165
+126
+354
+356
+004
+360
+017
+156
+010
+200
+000
+377
+374
+010
+000
+171
+002
+360
+112
+171
+002
+364
+001
+222
+006
+054
+223
+112
+122
+113
+001
+220
+362
+002
+300
+210
+362
+000
+310
+020
+002
+300
+210
+362
+000
+312
+000
+066
+112
+376
+222
+100
+110
+313
+040
+371
+002
+360
+006
+310
+000
+132
+171
+002
+364
+071
+002
+364
+100
+001
+004
+000
+234
+342
+002
+300
+210
+362
+000
+314
+002
+222
+001
+014
+200
+101
+210
+352
+010
+010
+223
+253
+004
+213
+002
+300
+210
+362
+000
+310
+352
+156
+012
+004
+352
+010
+356
+004
+360
+136
+165
+126
+374
+310
+210
+056
+010
+271
+004
+262
+217
+136
+165
+126
+370
+356
+000
+374
+156
+010
+210
+110
+376
+222
+100
+210
+252
+004
+356
+000
+374
+136
+165
+126
+360
+356
+000
+364
+156
+010
+171
+002
+360
+026
+154
+004
+312
+014
+154
+010
+271
+004
+246
+217
+114
+376
+223
+100
+110
+313
+336
+212
+271
+004
+166
+356
+000
+364
+136
+165
+126
+374
+056
+010
+156
+024
+042
+056
+020
+156
+014
+030
+056
+012
+156
+026
+016
+056
+022
+156
+016
+004
+001
+002
+000
+136
+165
+126
+360
+356
+014
+364
+056
+010
+000
+271
+002
+376
+012
+374
+002
+000
+002
+376
+001
+256
+020
+006
+310
+000
+224
+202
+212
+202
+062
+302
+002
+002
+071
+002
+376
+271
+002
+372
+274
+000
+004
+271
+004
+132
+300
+002
+006
+003
+103
+100
+306
+271
+004
+266
+071
+002
+376
+271
+002
+372
+274
+000
+004
+271
+004
+132
+202
+262
+171
+002
+376
+350
+364
+156
+020
+004
+256
+014
+002
+200
+100
+010
+002
+210
+271
+002
+376
+012
+171
+002
+376
+200
+171
+002
+376
+210
+122
+210
+356
+014
+364
+136
+165
+126
+374
+310
+210
+056
+014
+056
+010
+271
+004
+116
+217
+136
+165
+126
+370
+356
+000
+374
+156
+010
+371
+002
+376
+040
+374
+002
+000
+030
+152
+374
+371
+002
+376
+014
+374
+002
+000
+004
+001
+222
+356
+000
+374
+136
+165
+126
+370
+356
+000
+374
+174
+002
+000
+034
+014
+300
+152
+004
+356
+010
+004
+001
+222
+001
+252
+010
+210
+300
+371
+002
+376
+334
+356
+000
+374
+136
+165
+126
+354
+356
+004
+360
+274
+003
+174
+004
+360
+050
+004
+050
+000
+074
+004
+022
+271
+004
+232
+357
+014
+174
+002
+000
+112
+000
+112
+004
+254
+010
+210
+300
+000
+074
+353
+364
+001
+224
+350
+054
+010
+002
+000
+054
+004
+024
+014
+300
+112
+002
+210
+112
+300
+122
+211
+202
+006
+043
+202
+372
+213
+014
+000
+371
+002
+376
+000
+276
+312
+002
+376
+274
+003
+174
+004
+360
+050
+004
+050
+000
+074
+004
+022
+271
+004
+232
+357
+014
+356
+004
+360
+136
+165
+126
+374
+256
+020
+074
+004
+370
+356
+010
+050
+004
+050
+000
+271
+004
+306
+357
+014
+136
+165
+126
+374
+256
+024
+074
+004
+370
+356
+014
+050
+004
+050
+000
+056
+010
+271
+004
+054
+357
+020
+136
+165
+126
+374
+256
+024
+056
+020
+356
+010
+050
+004
+050
+000
+074
+004
+022
+271
+004
+054
+357
+020
+136
+165
+126
+364
+356
+000
+370
+156
+010
+356
+014
+022
+153
+004
+040
+023
+152
+004
+030
+052
+002
+153
+006
+016
+053
+002
+152
+006
+004
+001
+002
+000
+100
+000
+004
+000
+072
+022
+123
+002
+223
+052
+002
+153
+002
+006
+153
+002
+002
+052
+004
+153
+004
+006
+153
+004
+004
+052
+006
+153
+006
+006
+153
+006
+006
+001
+356
+000
+370
+136
+165
+126
+370
+356
+000
+374
+156
+010
+274
+003
+056
+014
+012
+356
+024
+050
+004
+050
+000
+074
+004
+022
+271
+004
+326
+357
+024
+274
+003
+056
+024
+074
+004
+022
+356
+014
+050
+004
+050
+000
+012
+271
+004
+326
+357
+024
+274
+003
+056
+014
+012
+356
+024
+050
+004
+050
+000
+074
+004
+022
+271
+004
+326
+357
+024
+356
+000
+374
+136
+165
+126
+342
+356
+004
+360
+156
+010
+156
+020
+156
+030
+004
+001
+002
+000
+100
+356
+100
+016
+156
+350
+052
+002
+200
+100
+354
+000
+172
+002
+374
+006
+352
+014
+361
+000
+156
+356
+030
+074
+000
+054
+002
+100
+350
+074
+000
+054
+003
+100
+354
+124
+346
+154
+006
+352
+256
+030
+056
+026
+156
+350
+000
+054
+004
+200
+156
+024
+000
+013
+356
+346
+050
+004
+050
+000
+052
+010
+271
+004
+326
+357
+024
+074
+000
+054
+005
+156
+024
+156
+014
+256
+014
+020
+200
+000
+000
+170
+056
+024
+356
+004
+360
+136
+165
+347
+076
+357
+037
+060
+100
+103
+157
+104
+354
+011
+006
+355
+140
+006
+372
+076
+000
+101
+004
+000
+107
+103
+002
+003
+005
+104
+004
+005
+107
+001
+106
+104
+107
+002
+007
+002
+101
+107
+010
+320
+357
+120
+217
+337
+374
+165
+100
+101
+102
+103
+104
+105
+106
+107
+372
+004
+256
+101
+004
+006
+007
+106
+377
+017
+100
+153
+377
+017
+101
+102
+155
+105
+105
+003
+100
+101
+100
+101
+000
+055
+004
+103
+054
+004
+102
+315
+052
+006
+011
+300
+014
+007
+100
+300
+200
+103
+102
+107
+020
+020
+111
+014
+011
+107
+100
+107
+377
+105
+006
+100
+000
+015
+017
+372
+056
+100
+004
+372
+026
+010
+316
+316
+001
+200
+011
+101
+100
+101
+001
+014
+371
+004
+250
+223
+110
+217
+323
+000
+005
+105
+105
+004
+004
+105
+107
+373
+016
+106
+004
+106
+216
+326
+326
+020
+050
+100
+122
+144
+170
+214
+236
+022
+020
+270
+200
+205
+200
+200
+302
+303
+317
+354
+000
+372
+022
+020
+270
+200
+205
+200
+200
+302
+303
+317
+354
+000
+340
+022
+270
+205
+220
+302
+303
+317
+362
+000
+314
+022
+270
+205
+220
+302
+303
+317
+362
+000
+270
+022
+270
+205
+200
+220
+302
+303
+317
+360
+000
+242
+022
+270
+205
+200
+220
+302
+303
+317
+360
+000
+214
+022
+270
+205
+220
+302
+303
+317
+362
+000
+170
+022
+270
+205
+220
+302
+303
+317
+362
+000
+144
+300
+000
+130
+000
+130
+100
+130
+000
+373
+356
+104
+004
+306
+037
+007
+004
+306
+030
+100
+100
+100
+100
+206
+004
+100
+210
+100
+005
+105
+104
+377
+004
+306
+020
+105
+377
+301
+004
+306
+021
+106
+074
+111
+006
+100
+200
+107
+120
+073
+046
+002
+107
+000
+002
+107
+100
+206
+006
+030
+006
+006
+023
+156
+304
+152
+104
+104
+144
+200
+200
+000
+000
+201
+101
+017
+106
+100
+106
+006
+002
+101
+121
+100
+111
+101
+230
+101
+000
+101
+271
+001
+104
+012
+101
+104
+004
+111
+016
+107
+306
+023
+304
+004
+104
+104
+101
+001
+105
+012
+101
+105
+004
+111
+024
+317
+006
+107
+014
+306
+024
+305
+004
+105
+105
+157
+114
+004
+306
+025
+011
+100
+206
+004
+100
+212
+100
+357
+260
+117
+103
+102
+374
+002
+000
+236
+074
+032
+206
+002
+100
+300
+000
+074
+000
+074
+100
+372
+176
+377
+106
+006
+106
+250
+002
+250
+006
+030
+072
+306
+023
+010
+304
+004
+104
+104
+306
+024
+010
+305
+004
+105
+105
+205
+004
+204
+000
+134
+204
+205
+200
+004
+374
+100
+106
+000
+374
+052
+313
+374
+000
+204
+200
+300
+000
+200
+100
+100
+300
+372
+004
+016
+104
+074
+001
+102
+103
+372
+006
+000
+322
+105
+000
+174
+106
+006
+006
+022
+014
+001
+107
+111
+000
+252
+104
+107
+002
+012
+006
+025
+004
+374
+014
+115
+107
+100
+012
+036
+374
+004
+214
+107
+046
+004
+176
+000
+014
+100
+200
+000
+004
+115
+300
+000
+152
+000
+107
+010
+374
+316
+315
+314
+006
+021
+006
+004
+122
+105
+107
+012
+006
+025
+004
+374
+014
+103
+103
+006
+103
+374
+311
+102
+102
+006
+102
+374
+313
+374
+317
+117
+024
+140
+012
+054
+001
+200
+364
+002
+315
+314
+374
+325
+107
+007
+107
+372
+350
+327
+137
+073
+072
+101
+006
+074
+001
+101
+102
+103
+206
+002
+100
+106
+104
+200
+011
+021
+060
+006
+025
+032
+070
+100
+111
+101
+100
+000
+300
+351
+002
+100
+032
+101
+032
+074
+000
+074
+100
+102
+000
+000
+270
+111
+354
+006
+023
+346
+356
+021
+156
+111
+134
+100
+000
+300
+074
+000
+100
+101
+200
+201
+301
+001
+200
+074
+114
+354
+206
+002
+230
+106
+002
+230
+006
+023
+012
+230
+074
+000
+074
+100
+230
+030
+215
+230
+004
+125
+001
+230
+012
+215
+025
+100
+200
+215
+215
+101
+102
+006
+024
+010
+074
+000
+074
+100
+206
+301
+001
+002
+100
+300
+101
+021
+110
+012
+074
+000
+100
+300
+026
+206
+022
+006
+024
+014
+106
+004
+215
+004
+355
+374
+013
+000
+300
+021
+104
+000
+000
+006
+006
+020
+070
+103
+101
+001
+006
+025
+052
+100
+074
+020
+102
+206
+004
+100
+020
+300
+074
+100
+103
+001
+100
+300
+100
+300
+002
+001
+300
+032
+300
+056
+002
+006
+103
+001
+300
+006
+025
+024
+002
+001
+100
+126
+206
+002
+101
+300
+351
+002
+001
+000
+103
+010
+350
+126
+374
+256
+010
+074
+004
+056
+271
+004
+344
+217
+136
+165
+126
+360
+356
+004
+364
+156
+014
+000
+156
+010
+350
+014
+036
+022
+200
+300
+274
+000
+006
+271
+004
+366
+074
+000
+063
+005
+101
+212
+022
+336
+002
+356
+004
+364
+136
+165
+126
+334
+356
+374
+334
+356
+301
+010
+100
+353
+003
+006
+106
+002
+000
+101
+002
+001
+017
+106
+102
+106
+030
+100
+101
+106
+107
+106
+002
+000
+101
+002
+001
+007
+106
+000
+336
+001
+006
+100
+000
+013
+271
+004
+250
+217
+004
+017
+107
+377
+154
+104
+374
+017
+106
+377
+153
+107
+107
+106
+106
+022
+104
+056
+030
+073
+006
+200
+022
+020
+020
+107
+074
+003
+107
+100
+100
+100
+000
+053
+004
+107
+101
+201
+101
+117
+007
+107
+056
+030
+101
+373
+042
+114
+331
+321
+300
+107
+313
+313
+062
+000
+102
+102
+036
+000
+103
+005
+324
+052
+062
+170
+172
+116
+134
+004
+006
+130
+321
+130
+130
+130
+130
+316
+366
+104
+120
+317
+306
+042
+020
+101
+103
+130
+321
+300
+300
+300
+300
+316
+366
+020
+101
+104
+120
+317
+242
+356
+374
+334
+136
+165
+103
+104
+214
+100
+000
+103
+130
+321
+130
+130
+130
+130
+316
+366
+104
+120
+317
+164
+320
+130
+321
+130
+130
+130
+130
+316
+366
+104
+120
+317
+132
+266
+126
+374
+356
+010
+002
+344
+136
+165
+126
+374
+256
+014
+056
+010
+071
+002
+344
+271
+004
+052
+217
+356
+010
+002
+344
+136
+165
+126
+374
+056
+010
+171
+002
+344
+056
+012
+171
+002
+346
+136
+165
+126
+370
+256
+010
+071
+002
+344
+271
+004
+314
+217
+100
+374
+256
+014
+056
+374
+071
+002
+344
+271
+004
+052
+217
+356
+374
+002
+344
+136
+165
+126
+374
+256
+020
+056
+014
+056
+010
+074
+004
+022
+271
+004
+126
+357
+014
+356
+014
+002
+344
+136
+165
+126
+374
+056
+014
+156
+020
+012
+056
+016
+156
+022
+074
+256
+020
+056
+014
+271
+004
+050
+217
+100
+020
+256
+024
+056
+020
+056
+014
+156
+010
+210
+050
+004
+050
+000
+056
+010
+271
+004
+352
+357
+024
+136
+165
+126
+364
+356
+014
+370
+056
+010
+056
+014
+024
+103
+004
+002
+034
+003
+100
+000
+002
+200
+000
+202
+010
+003
+100
+300
+200
+002
+303
+356
+014
+370
+136
+165
+126
+364
+356
+014
+370
+056
+010
+056
+014
+024
+103
+004
+002
+034
+003
+100
+000
+002
+200
+000
+202
+010
+003
+100
+300
+200
+002
+303
+356
+014
+370
+136
+165
+126
+364
+356
+014
+370
+056
+010
+071
+002
+340
+100
+200
+071
+002
+336
+300
+002
+171
+002
+012
+301
+201
+000
+001
+271
+004
+366
+217
+071
+002
+340
+301
+201
+000
+271
+004
+256
+217
+171
+002
+014
+000
+171
+002
+342
+006
+003
+100
+002
+003
+356
+014
+370
+136
+165
+126
+364
+356
+014
+370
+056
+010
+071
+002
+336
+100
+200
+171
+002
+342
+006
+002
+100
+002
+002
+171
+002
+014
+300
+200
+071
+002
+340
+301
+001
+271
+004
+366
+217
+071
+002
+336
+301
+201
+000
+271
+004
+360
+217
+171
+002
+012
+000
+171
+002
+336
+004
+022
+103
+003
+100
+200
+271
+004
+062
+102
+356
+003
+356
+014
+370
+136
+165
+126
+350
+356
+034
+364
+156
+356
+374
+001
+002
+334
+171
+002
+342
+056
+014
+156
+010
+000
+056
+016
+156
+012
+000
+202
+271
+004
+062
+100
+354
+203
+271
+004
+062
+156
+354
+050
+171
+002
+334
+056
+010
+156
+012
+010
+104
+012
+056
+014
+156
+016
+014
+104
+016
+002
+003
+004
+102
+054
+156
+356
+056
+010
+156
+014
+010
+104
+014
+056
+012
+156
+016
+012
+104
+016
+002
+100
+000
+003
+100
+000
+103
+040
+171
+002
+342
+003
+100
+000
+056
+012
+100
+100
+012
+056
+016
+100
+100
+016
+303
+002
+336
+302
+002
+340
+356
+010
+002
+012
+356
+012
+002
+014
+156
+356
+010
+001
+156
+010
+006
+056
+014
+100
+100
+360
+200
+271
+004
+062
+100
+362
+171
+002
+334
+014
+056
+360
+100
+360
+104
+362
+056
+360
+356
+034
+364
+136
+165
+126
+364
+356
+014
+370
+056
+010
+202
+271
+004
+062
+000
+171
+002
+342
+006
+003
+100
+000
+003
+171
+002
+014
+100
+100
+371
+002
+340
+002
+171
+002
+012
+101
+101
+371
+002
+336
+200
+001
+356
+014
+370
+136
+165
+157
+004
+131
+017
+231
+157
+010
+101
+101
+301
+057
+012
+121
+101
+301
+200
+300
+165
+126
+364
+356
+000
+370
+356
+010
+356
+014
+033
+132
+023
+122
+056
+010
+356
+000
+370
+136
+165
+126
+364
+356
+000
+370
+356
+010
+356
+014
+033
+132
+023
+122
+056
+010
+356
+000
+370
+136
+165
+126
+364
+356
+004
+370
+056
+020
+356
+010
+132
+132
+132
+122
+356
+010
+174
+002
+266
+330
+150
+000
+000
+174
+002
+266
+356
+004
+370
+136
+165
+126
+364
+356
+004
+370
+056
+014
+356
+010
+022
+300
+302
+300
+022
+300
+302
+200
+056
+010
+356
+004
+370
+136
+165
+126
+364
+356
+004
+370
+056
+014
+356
+010
+022
+302
+300
+022
+302
+200
+056
+010
+356
+004
+370
+136
+165
+126
+364
+356
+000
+370
+356
+010
+356
+020
+033
+132
+113
+213
+020
+132
+033
+132
+023
+122
+356
+010
+174
+002
+266
+330
+150
+000
+000
+174
+002
+266
+356
+000
+370
+136
+165
+126
+364
+356
+000
+370
+356
+010
+356
+020
+033
+132
+113
+213
+020
+132
+033
+132
+023
+122
+356
+010
+174
+002
+266
+330
+150
+000
+000
+174
+002
+266
+356
+000
+370
+136
+165
+126
+364
+356
+000
+370
+356
+010
+356
+014
+022
+223
+004
+001
+002
+000
+356
+000
+370
+136
+165
+126
+364
+356
+000
+370
+356
+010
+356
+020
+032
+233
+012
+022
+223
+004
+001
+002
+000
+356
+000
+370
+136
+165
+126
+372
+056
+010
+156
+014
+004
+001
+020
+056
+010
+156
+020
+004
+002
+002
+000
+100
+376
+056
+012
+156
+016
+004
+004
+020
+056
+012
+156
+022
+004
+010
+002
+000
+156
+376
+056
+376
+136
+165
+126
+330
+356
+374
+344
+156
+010
+156
+336
+171
+002
+334
+074
+056
+024
+156
+026
+024
+102
+026
+056
+030
+156
+032
+030
+102
+032
+056
+014
+156
+016
+014
+102
+016
+056
+020
+156
+022
+020
+102
+022
+156
+336
+056
+014
+056
+020
+056
+016
+056
+022
+356
+014
+250
+004
+050
+000
+056
+024
+271
+004
+232
+217
+000
+356
+014
+250
+004
+050
+000
+056
+030
+271
+004
+232
+217
+000
+000
+362
+002
+103
+000
+054
+102
+034
+156
+024
+340
+156
+030
+024
+156
+340
+030
+102
+334
+003
+056
+334
+102
+000
+314
+001
+102
+026
+104
+024
+004
+200
+271
+004
+062
+100
+026
+000
+216
+002
+102
+030
+005
+100
+100
+024
+200
+271
+004
+062
+100
+026
+000
+160
+004
+102
+056
+171
+002
+342
+024
+106
--- /dev/null
+++ b/sys/src/games/blit/rom3
@@ -1,0 +1,4096 @@
+146
+056
+057
+000
+057
+101
+000
+057
+000
+057
+000
+140
+000
+056
+000
+057
+000
+057
+000
+057
+000
+116
+000
+054
+117
+000
+112
+146
+046
+000
+140
+060
+260
+154
+056
+000
+057
+000
+077
+000
+077
+057
+057
+000
+057
+116
+000
+037
+117
+000
+070
+060
+000
+260
+000
+154
+056
+000
+057
+000
+077
+000
+077
+000
+057
+057
+000
+057
+116
+000
+037
+117
+000
+071
+000
+000
+060
+000
+260
+000
+157
+056
+000
+057
+000
+057
+000
+077
+000
+077
+000
+057
+000
+057
+116
+000
+037
+117
+000
+071
+000
+000
+060
+000
+260
+000
+157
+056
+000
+057
+000
+057
+000
+077
+000
+077
+057
+000
+057
+116
+000
+037
+117
+000
+071
+000
+000
+056
+057
+000
+057
+000
+057
+000
+057
+000
+057
+040
+000
+116
+117
+000
+114
+074
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+101
+000
+056
+000
+057
+000
+110
+000
+116
+000
+056
+120
+112
+147
+056
+000
+110
+000
+101
+000
+057
+000
+057
+000
+057
+000
+057
+116
+000
+037
+117
+000
+114
+004
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+040
+147
+000
+056
+116
+000
+042
+112
+146
+160
+140
+000
+116
+000
+016
+101
+000
+056
+000
+057
+000
+116
+000
+044
+130
+116
+000
+016
+140
+056
+000
+151
+116
+000
+042
+112
+147
+040
+000
+151
+261
+146
+046
+000
+140
+056
+000
+116
+000
+051
+056
+116
+000
+053
+046
+000
+040
+146
+043
+000
+000
+151
+040
+000
+151
+261
+146
+102
+000
+151
+112
+000
+147
+040
+000
+102
+000
+056
+116
+000
+053
+160
+114
+014
+377
+116
+116
+116
+377
+110
+074
+377
+044
+000
+040
+147
+112
+000
+146
+140
+001
+116
+000
+016
+046
+000
+140
+000
+101
+000
+056
+000
+057
+000
+101
+000
+057
+000
+057
+000
+116
+000
+054
+117
+000
+112
+147
+000
+050
+000
+140
+000
+052
+000
+040
+000
+261
+146
+000
+056
+000
+057
+000
+057
+000
+057
+000
+057
+000
+116
+000
+057
+117
+000
+112
+000
+147
+040
+000
+041
+000
+000
+140
+045
+000
+000
+112
+000
+147
+040
+000
+041
+000
+000
+051
+000
+000
+102
+000
+051
+000
+112
+000
+147
+040
+000
+041
+000
+047
+000
+050
+040
+146
+377
+046
+000
+040
+146
+377
+040
+000
+151
+261
+147
+040
+000
+151
+261
+146
+043
+000
+000
+151
+112
+000
+147
+040
+000
+041
+000
+000
+040
+000
+041
+000
+000
+040
+000
+151
+041
+000
+045
+000
+151
+000
+102
+000
+043
+000
+151
+046
+000
+151
+140
+050
+000
+140
+101
+000
+056
+000
+057
+000
+057
+000
+057
+000
+116
+000
+054
+117
+000
+112
+147
+051
+000
+050
+000
+040
+146
+046
+000
+267
+146
+377
+116
+000
+016
+160
+114
+074
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+064
+000
+101
+000
+056
+000
+057
+000
+057
+000
+116
+000
+052
+120
+112
+147
+000
+046
+000
+140
+056
+000
+057
+000
+057
+000
+116
+000
+052
+120
+112
+147
+076
+057
+000
+057
+000
+116
+000
+051
+120
+140
+046
+000
+040
+146
+076
+057
+000
+057
+116
+000
+051
+120
+114
+014
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+116
+000
+016
+102
+101
+000
+057
+000
+057
+000
+057
+116
+000
+026
+117
+000
+076
+000
+077
+000
+101
+000
+057
+000
+057
+000
+116
+000
+075
+117
+000
+057
+000
+057
+000
+057
+116
+000
+026
+117
+000
+116
+000
+016
+114
+004
+377
+116
+116
+116
+377
+102
+057
+000
+107
+101
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+067
+117
+000
+116
+116
+116
+377
+110
+034
+377
+044
+000
+046
+056
+116
+000
+066
+066
+164
+140
+056
+116
+000
+066
+076
+077
+116
+000
+051
+124
+066
+122
+112
+146
+160
+326
+160
+320
+065
+000
+112
+000
+156
+065
+000
+000
+060
+342
+062
+000
+222
+076
+102
+116
+000
+051
+124
+075
+377
+060
+000
+220
+000
+076
+102
+116
+000
+051
+124
+075
+377
+060
+003
+220
+076
+077
+377
+116
+000
+051
+124
+075
+377
+160
+301
+000
+062
+004
+222
+125
+076
+077
+377
+116
+000
+051
+124
+075
+377
+040
+377
+055
+377
+055
+377
+327
+377
+160
+301
+000
+124
+321
+377
+101
+377
+056
+000
+057
+000
+116
+000
+051
+130
+050
+045
+000
+116
+000
+016
+040
+147
+102
+057
+377
+057
+101
+377
+057
+000
+057
+000
+057
+000
+000
+116
+000
+060
+117
+000
+076
+000
+101
+377
+057
+000
+057
+000
+057
+000
+000
+116
+000
+056
+117
+000
+076
+000
+077
+000
+101
+377
+057
+000
+057
+000
+116
+000
+075
+117
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+056
+117
+000
+124
+377
+046
+140
+076
+000
+077
+377
+057
+116
+000
+066
+130
+062
+222
+342
+322
+377
+077
+057
+000
+000
+057
+057
+000
+116
+116
+000
+060
+117
+000
+160
+321
+377
+130
+112
+146
+116
+000
+016
+101
+377
+042
+000
+130
+042
+043
+000
+000
+040
+000
+130
+114
+034
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+164
+066
+000
+056
+000
+145
+057
+116
+000
+044
+130
+103
+377
+042
+043
+000
+000
+170
+140
+000
+101
+377
+056
+000
+057
+000
+040
+000
+145
+055
+377
+057
+116
+000
+052
+120
+112
+147
+000
+060
+377
+220
+377
+066
+110
+201
+000
+064
+154
+164
+264
+000
+155
+060
+000
+123
+064
+264
+147
+112
+157
+160
+301
+136
+062
+222
+076
+116
+000
+106
+014
+000
+157
+064
+140
+164
+264
+147
+076
+101
+377
+057
+000
+057
+000
+116
+000
+050
+120
+076
+101
+377
+057
+000
+057
+000
+116
+000
+050
+120
+070
+076
+000
+116
+000
+021
+060
+000
+162
+340
+302
+000
+145
+146
+377
+046
+000
+040
+147
+116
+000
+016
+101
+000
+056
+000
+057
+000
+101
+000
+057
+000
+057
+000
+057
+116
+000
+057
+117
+000
+116
+000
+016
+056
+116
+000
+051
+102
+000
+065
+000
+060
+114
+014
+377
+116
+116
+116
+377
+110
+000
+377
+064
+000
+155
+160
+301
+122
+321
+000
+160
+320
+000
+075
+000
+122
+000
+123
+000
+076
+000
+101
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+056
+117
+000
+114
+000
+377
+116
+116
+116
+377
+110
+004
+377
+064
+000
+066
+000
+070
+000
+072
+000
+056
+000
+077
+000
+116
+000
+052
+124
+044
+040
+146
+221
+140
+000
+160
+300
+074
+160
+076
+062
+302
+147
+216
+122
+060
+220
+350
+065
+000
+065
+000
+065
+000
+065
+000
+065
+000
+056
+000
+057
+060
+220
+110
+162
+062
+000
+322
+057
+040
+116
+000
+105
+130
+057
+116
+000
+054
+120
+040
+147
+377
+102
+000
+076
+000
+101
+000
+057
+000
+057
+000
+057
+116
+000
+056
+117
+000
+040
+114
+004
+377
+116
+116
+116
+377
+221
+056
+101
+000
+057
+000
+057
+000
+116
+000
+050
+120
+116
+116
+116
+377
+110
+004
+377
+044
+000
+040
+147
+056
+116
+000
+055
+056
+116
+000
+053
+114
+004
+377
+116
+116
+116
+377
+110
+000
+377
+064
+000
+066
+000
+264
+154
+060
+140
+060
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+064
+000
+066
+000
+264
+157
+060
+140
+060
+114
+000
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+056
+000
+057
+116
+000
+074
+130
+046
+101
+000
+056
+000
+057
+000
+057
+000
+116
+000
+052
+120
+112
+147
+000
+160
+300
+000
+162
+222
+160
+343
+064
+060
+000
+112
+147
+014
+000
+147
+014
+000
+147
+014
+000
+146
+265
+140
+205
+140
+060
+106
+301
+114
+014
+377
+116
+116
+116
+377
+060
+000
+260
+000
+155
+260
+000
+154
+060
+000
+260
+000
+155
+260
+000
+154
+160
+140
+160
+116
+116
+116
+377
+043
+000
+000
+151
+043
+000
+000
+151
+040
+000
+151
+131
+042
+000
+151
+042
+040
+000
+151
+122
+042
+000
+151
+131
+042
+043
+000
+151
+000
+151
+116
+116
+116
+377
+110
+034
+377
+160
+320
+000
+002
+000
+377
+200
+000
+064
+044
+000
+151
+050
+102
+000
+151
+160
+300
+147
+140
+044
+050
+046
+040
+162
+302
+147
+060
+110
+347
+101
+010
+267
+145
+060
+110
+347
+101
+010
+261
+144
+000
+046
+160
+300
+040
+044
+265
+142
+265
+000
+151
+147
+221
+140
+000
+122
+000
+151
+060
+000
+151
+014
+000
+156
+140
+377
+140
+060
+110
+347
+111
+010
+267
+143
+050
+160
+042
+202
+040
+044
+107
+000
+140
+102
+102
+000
+120
+060
+110
+347
+101
+010
+267
+145
+045
+000
+000
+101
+000
+114
+034
+377
+116
+116
+116
+377
+221
+056
+077
+000
+116
+000
+052
+124
+116
+116
+116
+377
+110
+004
+377
+040
+000
+121
+044
+160
+300
+040
+044
+102
+000
+114
+004
+377
+116
+116
+116
+377
+110
+034
+377
+044
+000
+046
+000
+151
+140
+040
+000
+261
+146
+110
+000
+116
+000
+053
+130
+046
+160
+300
+040
+050
+261
+142
+056
+116
+000
+055
+114
+034
+377
+116
+116
+116
+377
+060
+000
+260
+000
+154
+060
+000
+260
+000
+154
+060
+000
+260
+000
+154
+060
+000
+260
+000
+154
+160
+140
+160
+116
+116
+116
+377
+110
+004
+377
+044
+000
+166
+112
+000
+151
+146
+043
+000
+130
+000
+151
+160
+300
+000
+147
+221
+140
+000
+126
+344
+130
+140
+043
+000
+152
+040
+000
+151
+220
+000
+151
+056
+000
+000
+116
+000
+106
+043
+000
+152
+060
+122
+112
+146
+116
+000
+055
+040
+000
+151
+220
+000
+151
+056
+000
+000
+116
+000
+106
+260
+145
+040
+000
+151
+105
+377
+045
+000
+000
+044
+000
+040
+131
+045
+000
+040
+345
+221
+000
+151
+040
+042
+000
+151
+042
+040
+000
+151
+130
+042
+042
+114
+004
+377
+116
+116
+116
+377
+221
+056
+057
+000
+057
+000
+116
+000
+054
+120
+116
+116
+116
+377
+110
+004
+377
+044
+000
+265
+000
+151
+143
+265
+000
+130
+144
+044
+377
+265
+000
+151
+143
+265
+000
+130
+144
+160
+201
+114
+004
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+130
+140
+160
+225
+040
+000
+261
+000
+146
+160
+201
+160
+320
+000
+345
+225
+265
+000
+151
+142
+114
+004
+377
+116
+116
+116
+377
+110
+034
+377
+076
+000
+040
+000
+107
+057
+000
+057
+000
+057
+000
+000
+116
+000
+056
+117
+000
+044
+000
+130
+046
+140
+000
+160
+320
+000
+345
+227
+140
+000
+111
+377
+160
+300
+146
+044
+000
+040
+045
+045
+000
+045
+160
+227
+050
+040
+345
+042
+223
+040
+040
+112
+147
+045
+123
+146
+131
+040
+045
+267
+000
+151
+142
+377
+043
+000
+151
+076
+000
+040
+000
+107
+057
+000
+057
+000
+057
+000
+000
+116
+000
+056
+117
+000
+114
+034
+377
+116
+116
+116
+377
+076
+000
+057
+000
+107
+101
+000
+057
+000
+057
+000
+116
+000
+056
+117
+000
+116
+116
+116
+377
+076
+000
+057
+000
+107
+101
+000
+057
+000
+057
+000
+057
+000
+116
+000
+067
+117
+000
+116
+116
+116
+377
+076
+000
+057
+000
+101
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+067
+117
+000
+116
+116
+116
+377
+110
+014
+377
+044
+000
+107
+000
+060
+260
+000
+154
+060
+260
+000
+154
+060
+000
+260
+000
+154
+060
+000
+260
+000
+154
+160
+140
+160
+014
+000
+146
+160
+140
+060
+260
+154
+064
+060
+000
+260
+000
+154
+065
+000
+000
+060
+000
+260
+000
+157
+065
+000
+000
+060
+000
+260
+000
+157
+065
+000
+000
+160
+114
+014
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+076
+000
+057
+000
+057
+101
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+060
+117
+000
+076
+000
+057
+000
+057
+000
+000
+101
+000
+057
+000
+057
+000
+057
+116
+000
+060
+117
+000
+076
+000
+057
+000
+057
+101
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+060
+117
+000
+114
+004
+377
+116
+116
+116
+377
+110
+034
+377
+044
+000
+046
+000
+112
+000
+146
+160
+140
+160
+075
+377
+112
+147
+102
+377
+020
+000
+110
+075
+377
+140
+000
+060
+301
+000
+103
+000
+111
+010
+112
+377
+146
+060
+000
+020
+000
+075
+377
+060
+000
+020
+000
+075
+377
+075
+377
+075
+000
+377
+076
+000
+060
+000
+320
+377
+077
+020
+000
+110
+320
+000
+077
+057
+101
+377
+057
+000
+057
+000
+057
+000
+116
+000
+060
+117
+000
+060
+000
+020
+000
+321
+000
+040
+000
+122
+000
+020
+110
+064
+146
+377
+040
+000
+114
+034
+377
+116
+116
+110
+077
+114
+000
+000
+050
+052
+074
+000
+114
+000
+000
+114
+000
+000
+101
+000
+076
+236
+157
+062
+330
+264
+157
+064
+076
+236
+157
+070
+322
+076
+336
+236
+264
+157
+064
+076
+236
+123
+155
+116
+117
+000
+120
+114
+174
+116
+110
+110
+110
+110
+110
+110
+110
+110
+101
+000
+140
+042
+054
+060
+062
+322
+166
+164
+304
+344
+172
+164
+304
+122
+344
+106
+110
+072
+350
+350
+222
+123
+170
+066
+000
+326
+064
+000
+324
+271
+146
+040
+060
+263
+154
+040
+102
+323
+334
+104
+104
+014
+000
+155
+274
+157
+040
+320
+042
+334
+170
+110
+040
+110
+057
+057
+160
+101
+000
+276
+157
+101
+001
+057
+334
+334
+076
+314
+042
+300
+234
+110
+057
+057
+107
+000
+074
+116
+044
+120
+116
+170
+070
+110
+310
+147
+052
+110
+110
+115
+340
+112
+154
+104
+124
+334
+116
+000
+000
+000
+000
+000
+000
+000
+000
+040
+042
+354
+263
+300
+263
+040
+324
+320
+121
+377
+140
+376
+040
+042
+355
+263
+300
+263
+040
+324
+320
+121
+377
+140
+376
+040
+354
+300
+201
+324
+320
+121
+377
+140
+376
+040
+355
+300
+201
+324
+320
+121
+377
+140
+376
+040
+354
+300
+106
+301
+324
+320
+121
+377
+140
+376
+040
+355
+300
+106
+301
+324
+320
+121
+377
+140
+376
+040
+354
+300
+261
+324
+320
+121
+377
+140
+376
+040
+355
+300
+261
+324
+320
+121
+377
+140
+376
+060
+000
+201
+000
+301
+106
+261
+000
+115
+340
+112
+152
+010
+000
+060
+146
+010
+000
+122
+062
+122
+320
+112
+152
+104
+124
+226
+070
+110
+014
+377
+147
+010
+000
+014
+377
+127
+147
+010
+000
+112
+146
+122
+040
+110
+110
+342
+343
+020
+000
+152
+122
+320
+152
+123
+110
+261
+010
+000
+146
+010
+000
+147
+110
+153
+110
+106
+140
+202
+004
+002
+104
+110
+236
+160
+120
+314
+121
+062
+154
+104
+343
+302
+341
+006
+340
+066
+162
+106
+354
+060
+300
+147
+106
+302
+147
+122
+140
+123
+010
+000
+110
+153
+110
+106
+110
+060
+300
+147
+106
+302
+147
+122
+140
+121
+000
+102
+140
+010
+000
+110
+153
+110
+106
+112
+000
+146
+010
+000
+060
+320
+112
+152
+104
+124
+224
+117
+377
+052
+110
+110
+262
+000
+156
+000
+060
+040
+112
+152
+120
+072
+162
+064
+360
+066
+000
+103
+000
+160
+112
+152
+104
+355
+140
+354
+010
+000
+147
+010
+000
+146
+110
+153
+110
+106
+010
+000
+146
+110
+153
+110
+106
+310
+052
+122
+147
+002
+123
+300
+272
+147
+072
+110
+112
+146
+001
+140
+072
+072
+042
+300
+270
+127
+104
+110
+006
+110
+072
+103
+000
+140
+300
+062
+002
+102
+102
+103
+000
+140
+001
+300
+140
+000
+112
+146
+010
+000
+146
+162
+302
+345
+141
+000
+300
+014
+000
+157
+010
+000
+147
+072
+074
+050
+342
+155
+144
+147
+072
+140
+122
+122
+147
+162
+141
+000
+060
+104
+010
+000
+147
+320
+030
+162
+141
+000
+123
+157
+072
+121
+231
+072
+010
+000
+147
+162
+141
+300
+112
+157
+010
+000
+146
+072
+074
+110
+112
+147
+062
+072
+320
+110
+112
+147
+066
+072
+324
+072
+121
+050
+014
+000
+146
+020
+000
+110
+111
+000
+231
+072
+072
+116
+070
+074
+110
+113
+373
+116
+042
+040
+020
+112
+147
+062
+002
+110
+102
+102
+112
+152
+120
+112
+146
+010
+000
+062
+146
+010
+000
+147
+162
+302
+347
+200
+006
+360
+072
+116
+000
+110
+060
+110
+062
+064
+360
+066
+000
+320
+162
+140
+000
+342
+145
+010
+000
+146
+140
+062
+147
+342
+145
+006
+360
+072
+040
+042
+110
+102
+263
+112
+126
+220
+052
+040
+000
+200
+112
+152
+342
+112
+152
+344
+010
+000
+147
+350
+064
+360
+066
+000
+342
+152
+124
+340
+152
+012
+000
+340
+152
+125
+040
+110
+052
+124
+124
+110
+140
+010
+000
+147
+064
+360
+066
+000
+112
+133
+275
+152
+110
+052
+110
+060
+342
+145
+060
+042
+263
+072
+140
+112
+153
+010
+000
+147
+112
+152
+125
+140
+072
+377
+060
+263
+072
+060
+147
+010
+000
+146
+010
+000
+147
+320
+320
+220
+010
+000
+147
+110
+060
+074
+320
+112
+152
+006
+000
+072
+060
+275
+320
+320
+110
+052
+110
+072
+060
+320
+162
+140
+072
+060
+000
+147
+320
+320
+072
+010
+000
+147
+060
+320
+162
+320
+112
+152
+320
+072
+116
+000
+060
+102
+320
+162
+140
+116
+377
+056
+000
+057
+000
+116
+116
+000
+066
+130
+116
+116
+116
+377
+110
+014
+377
+044
+000
+164
+040
+000
+107
+000
+140
+020
+110
+110
+056
+000
+000
+116
+000
+105
+062
+000
+022
+010
+324
+122
+112
+146
+060
+114
+014
+377
+116
+116
+116
+377
+110
+034
+377
+114
+004
+000
+046
+114
+000
+000
+260
+157
+074
+276
+157
+076
+164
+304
+324
+236
+157
+110
+110
+110
+110
+260
+157
+074
+276
+157
+076
+062
+222
+157
+000
+050
+040
+110
+057
+057
+116
+000
+074
+120
+042
+160
+300
+170
+340
+106
+147
+160
+300
+166
+340
+123
+350
+350
+236
+156
+306
+062
+000
+020
+020
+110
+140
+024
+020
+123
+060
+000
+300
+131
+104
+320
+162
+062
+000
+222
+123
+322
+046
+344
+072
+110
+062
+000
+345
+111
+020
+042
+330
+322
+322
+123
+221
+321
+060
+040
+124
+002
+000
+062
+302
+074
+116
+000
+000
+000
+000
+000
+000
+000
+000
+263
+116
+261
+261
+261
+261
+121
+377
+300
+261
+121
+377
+140
+062
+261
+302
+263
+116
+060
+060
+060
+060
+121
+377
+062
+261
+302
+263
+121
+377
+114
+034
+377
+116
+116
+106
+106
+134
+106
+062
+202
+303
+116
+301
+301
+301
+301
+121
+377
+200
+301
+121
+377
+140
+203
+116
+201
+201
+201
+201
+121
+377
+300
+201
+121
+377
+140
+116
+377
+043
+000
+000
+151
+116
+116
+116
+377
+076
+000
+057
+000
+057
+000
+151
+116
+000
+071
+120
+043
+000
+000
+151
+116
+116
+116
+377
+060
+000
+321
+000
+151
+060
+000
+321
+000
+151
+116
+116
+116
+377
+056
+000
+057
+000
+151
+116
+000
+074
+130
+055
+377
+076
+000
+057
+377
+057
+000
+151
+116
+000
+071
+120
+043
+377
+000
+151
+116
+116
+116
+377
+076
+000
+057
+000
+057
+000
+057
+000
+000
+116
+000
+071
+117
+000
+043
+000
+000
+151
+116
+116
+116
+377
+060
+000
+260
+000
+146
+060
+000
+260
+000
+147
+056
+000
+057
+000
+116
+000
+073
+130
+055
+000
+076
+000
+057
+000
+057
+000
+040
+000
+134
+057
+000
+057
+000
+057
+000
+116
+000
+076
+117
+000
+116
+116
+116
+377
+110
+000
+377
+044
+000
+066
+000
+156
+112
+146
+040
+140
+060
+104
+066
+040
+104
+044
+112
+154
+060
+123
+110
+224
+040
+201
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+044
+000
+066
+000
+156
+112
+146
+040
+140
+060
+104
+066
+040
+104
+044
+112
+157
+060
+123
+110
+324
+040
+201
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+064
+000
+060
+000
+151
+320
+076
+060
+000
+151
+110
+062
+222
+000
+152
+110
+322
+057
+040
+116
+000
+105
+130
+062
+000
+151
+110
+320
+057
+116
+000
+071
+130
+320
+000
+152
+066
+112
+000
+151
+147
+060
+104
+140
+060
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+064
+000
+060
+000
+151
+320
+076
+112
+000
+151
+147
+060
+104
+140
+060
+220
+000
+152
+110
+320
+062
+000
+151
+110
+057
+116
+000
+105
+130
+062
+000
+151
+110
+220
+057
+116
+000
+071
+130
+320
+000
+152
+066
+112
+000
+151
+146
+140
+123
+060
+123
+076
+116
+000
+072
+260
+147
+060
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+102
+377
+063
+000
+000
+151
+102
+000
+151
+060
+000
+220
+000
+064
+060
+000
+220
+000
+066
+076
+116
+000
+106
+075
+377
+076
+116
+000
+106
+260
+377
+157
+102
+000
+151
+070
+000
+075
+000
+000
+075
+000
+070
+000
+075
+000
+000
+075
+000
+070
+064
+066
+112
+154
+122
+377
+070
+000
+075
+000
+000
+075
+000
+070
+000
+075
+000
+000
+075
+000
+060
+104
+064
+060
+104
+066
+112
+154
+122
+000
+151
+060
+104
+066
+060
+000
+104
+075
+000
+060
+000
+104
+075
+000
+063
+000
+151
+063
+000
+151
+063
+000
+000
+152
+063
+000
+000
+152
+112
+377
+147
+160
+320
+000
+140
+060
+000
+123
+075
+377
+076
+116
+000
+072
+075
+377
+112
+000
+151
+146
+070
+377
+075
+377
+075
+377
+040
+377
+114
+000
+377
+116
+116
+116
+377
+110
+000
+377
+064
+000
+076
+116
+000
+072
+066
+112
+000
+151
+147
+060
+104
+066
+060
+220
+000
+152
+320
+122
+301
+000
+151
+062
+222
+000
+152
+322
+124
+303
+000
+151
+222
+040
+114
+000
+377
+116
+116
+042
+000
+040
+162
+202
+222
+000
+350
+322
+220
+060
+000
+220
+110
+301
+320
+321
+116
+116
+377
+110
+014
+377
+105
+000
+107
+000
+060
+321
+060
+321
+040
+000
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+105
+000
+107
+000
+060
+221
+060
+221
+040
+000
+114
+014
+377
+116
+116
+116
+377
+110
+004
+377
+064
+000
+105
+000
+325
+325
+225
+225
+101
+000
+042
+000
+130
+042
+043
+000
+000
+040
+000
+130
+114
+004
+377
+116
+116
+116
+377
+110
+004
+377
+064
+000
+105
+000
+060
+110
+201
+064
+060
+110
+201
+064
+040
+000
+114
+004
+377
+116
+116
+116
+377
+110
+004
+377
+064
+000
+105
+000
+060
+301
+064
+060
+301
+064
+040
+000
+114
+004
+377
+116
+116
+116
+377
+110
+014
+377
+105
+000
+107
+000
+060
+221
+040
+125
+060
+221
+060
+221
+060
+221
+101
+000
+042
+000
+130
+042
+043
+000
+000
+040
+000
+130
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+105
+000
+107
+000
+060
+321
+040
+125
+060
+321
+060
+321
+060
+321
+101
+000
+042
+000
+130
+042
+043
+000
+000
+040
+000
+130
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+105
+000
+107
+000
+040
+260
+146
+160
+140
+160
+114
+014
+377
+116
+116
+116
+377
+110
+014
+377
+105
+000
+107
+000
+040
+260
+146
+040
+260
+146
+160
+140
+160
+114
+014
+377
+116
+116
+116
+377
+060
+000
+260
+000
+154
+160
+140
+060
+000
+260
+000
+155
+160
+140
+160
+075
+377
+060
+000
+260
+000
+154
+160
+140
+060
+000
+260
+000
+155
+160
+140
+160
+201
+377
+060
+377
+116
+116
+116
+377
+110
+004
+377
+044
+000
+102
+377
+112
+000
+151
+146
+064
+000
+075
+000
+000
+075
+000
+064
+000
+075
+000
+000
+075
+000
+064
+000
+075
+000
+000
+075
+000
+064
+000
+075
+000
+000
+075
+000
+122
+377
+070
+000
+072
+000
+074
+000
+076
+000
+101
+000
+056
+000
+057
+000
+057
+000
+116
+000
+076
+120
+064
+101
+000
+056
+000
+057
+000
+057
+000
+116
+000
+076
+120
+066
+140
+000
+060
+300
+146
+001
+112
+146
+055
+000
+377
+055
+000
+000
+055
+377
+000
+075
+377
+064
+066
+377
+112
+147
+000
+160
+300
+147
+075
+000
+060
+076
+116
+000
+072
+075
+000
+140
+000
+160
+300
+147
+060
+123
+075
+000
+076
+116
+000
+072
+075
+000
+140
+000
+160
+300
+147
+112
+000
+151
+147
+075
--- /dev/null
+++ b/sys/src/games/blit/rom4
@@ -1,0 +1,2239 @@
+026
+006
+100
+200
+271
+004
+240
+100
+014
+106
+026
+206
+271
+004
+240
+100
+024
+072
+010
+102
+064
+171
+002
+342
+026
+007
+100
+100
+026
+007
+100
+200
+271
+004
+240
+022
+007
+100
+100
+026
+207
+271
+004
+240
+100
+100
+024
+356
+014
+250
+004
+050
+000
+056
+024
+271
+004
+232
+217
+000
+002
+103
+000
+012
+156
+336
+034
+056
+024
+156
+026
+024
+102
+026
+056
+030
+156
+032
+030
+102
+032
+256
+034
+056
+030
+056
+024
+012
+271
+004
+304
+357
+014
+356
+374
+344
+136
+165
+126
+316
+356
+374
+340
+156
+010
+171
+002
+334
+056
+056
+016
+156
+022
+022
+156
+014
+322
+156
+020
+014
+156
+322
+020
+056
+014
+156
+020
+044
+156
+000
+024
+034
+056
+014
+156
+020
+022
+156
+014
+322
+156
+020
+014
+156
+322
+020
+156
+014
+332
+156
+016
+330
+056
+020
+156
+332
+100
+336
+056
+022
+156
+330
+100
+334
+100
+004
+001
+002
+377
+000
+256
+014
+012
+271
+004
+250
+217
+110
+003
+352
+004
+300
+000
+017
+156
+332
+017
+100
+001
+150
+000
+256
+336
+271
+004
+062
+100
+336
+256
+334
+271
+004
+062
+100
+334
+171
+002
+334
+000
+216
+001
+156
+336
+000
+156
+334
+000
+304
+056
+332
+107
+100
+330
+017
+156
+332
+000
+374
+017
+156
+332
+300
+200
+174
+004
+072
+061
+000
+056
+024
+100
+066
+100
+001
+060
+100
+002
+000
+140
+100
+003
+000
+214
+000
+306
+100
+001
+000
+310
+100
+002
+000
+370
+100
+003
+000
+046
+000
+324
+360
+156
+330
+360
+156
+332
+100
+034
+017
+156
+330
+300
+200
+174
+004
+072
+061
+000
+102
+123
+000
+250
+002
+100
+133
+000
+150
+360
+156
+330
+360
+156
+332
+100
+040
+017
+156
+330
+300
+200
+174
+004
+072
+061
+000
+102
+002
+100
+123
+000
+156
+133
+062
+360
+156
+330
+360
+156
+332
+100
+034
+017
+156
+330
+300
+200
+174
+004
+072
+061
+000
+102
+123
+000
+076
+002
+100
+133
+017
+156
+332
+100
+100
+332
+056
+024
+100
+000
+064
+004
+374
+377
+020
+156
+332
+056
+332
+156
+330
+354
+017
+156
+330
+026
+017
+156
+330
+300
+200
+174
+004
+072
+061
+000
+123
+000
+352
+002
+133
+020
+156
+332
+056
+332
+156
+330
+356
+017
+156
+330
+340
+017
+156
+330
+300
+200
+174
+004
+072
+061
+000
+100
+123
+306
+000
+006
+133
+377
+020
+156
+332
+056
+332
+156
+330
+354
+017
+156
+330
+000
+246
+017
+156
+330
+300
+200
+174
+004
+072
+061
+000
+123
+000
+214
+256
+332
+271
+004
+120
+000
+071
+002
+336
+100
+000
+071
+002
+340
+100
+006
+100
+101
+326
+056
+024
+000
+162
+156
+326
+005
+200
+300
+123
+107
+000
+070
+114
+006
+213
+074
+000
+102
+340
+106
+346
+156
+326
+005
+200
+300
+004
+100
+123
+107
+000
+020
+114
+006
+213
+074
+000
+102
+334
+106
+342
+156
+326
+005
+200
+300
+123
+107
+000
+354
+114
+006
+213
+074
+000
+102
+340
+106
+346
+100
+000
+226
+100
+001
+000
+216
+100
+002
+000
+252
+100
+003
+312
+001
+156
+334
+000
+156
+336
+000
+134
+056
+024
+000
+070
+123
+107
+000
+236
+005
+200
+300
+360
+004
+100
+000
+123
+107
+000
+210
+005
+200
+300
+360
+123
+107
+000
+170
+005
+200
+300
+360
+100
+000
+306
+100
+001
+000
+276
+100
+002
+000
+306
+100
+003
+324
+256
+330
+271
+004
+120
+000
+071
+002
+336
+100
+000
+071
+002
+340
+100
+006
+100
+101
+326
+056
+024
+000
+350
+123
+107
+000
+036
+102
+004
+106
+016
+156
+326
+114
+006
+213
+074
+000
+005
+200
+300
+332
+123
+107
+000
+370
+102
+004
+106
+014
+156
+326
+104
+004
+213
+001
+005
+200
+300
+334
+004
+100
+123
+107
+000
+320
+102
+004
+106
+016
+156
+326
+114
+006
+213
+074
+000
+005
+200
+300
+326
+004
+100
+123
+107
+000
+246
+102
+004
+106
+014
+156
+326
+104
+004
+213
+001
+005
+200
+300
+330
+123
+107
+000
+202
+102
+004
+106
+016
+156
+326
+114
+006
+213
+074
+000
+005
+200
+300
+332
+123
+107
+000
+134
+102
+004
+106
+014
+156
+326
+104
+004
+213
+001
+005
+200
+300
+334
+100
+000
+026
+100
+001
+000
+016
+100
+002
+000
+120
+100
+003
+000
+232
+100
+000
+000
+034
+100
+001
+000
+024
+100
+002
+000
+132
+100
+003
+000
+240
+356
+374
+340
+136
+165
+126
+000
+074
+014
+347
+000
+000
+000
+301
+101
+100
+100
+056
+012
+000
+303
+103
+156
+010
+300
+302
+101
+302
+100
+103
+100
+337
+014
+136
+165
+126
+000
+056
+010
+000
+004
+100
+300
+136
+165
+002
+003
+032
+002
+044
+201
+001
+037
+037
+165
+002
+003
+006
+022
+200
+356
+002
+057
+020
+004
+202
+000
+165
+000
+006
+201
+103
+001
+227
+202
+000
+377
+030
+101
+000
+001
+302
+100
+000
+101
+302
+001
+101
+101
+165
+001
+101
+101
+100
+100
+017
+200
+201
+201
+004
+202
+100
+313
+362
+165
+000
+301
+201
+100
+001
+300
+200
+101
+001
+300
+200
+101
+000
+301
+201
+100
+000
+001
+001
+000
+001
+000
+000
+001
+001
+000
+000
+001
+000
+001
+001
+000
+101
+102
+104
+103
+267
+270
+271
+255
+264
+265
+266
+254
+261
+262
+263
+215
+260
+256
+167
+170
+171
+172
+000
+200
+000
+000
+000
+000
+000
+200
+300
+340
+360
+370
+174
+076
+037
+016
+004
+004
+016
+037
+076
+174
+370
+360
+340
+300
+200
+000
+000
+000
+000
+000
+200
+377
+177
+037
+077
+177
+373
+363
+341
+301
+200
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+200
+301
+341
+363
+373
+177
+077
+037
+177
+377
+004
+154
+360
+000
+004
+054
+000
+000
+004
+214
+360
+360
+004
+114
+000
+360
+006
+027
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+000
+000
+062
+062
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+200
+003
+140
+140
+070
+003
+000
+000
+000
+003
+006
+307
+143
+374
+077
+200
+000
+000
+176
+006
+307
+343
+376
+141
+200
+066
+015
+176
+017
+307
+373
+206
+141
+337
+303
+360
+000
+000
+000
+030
+074
+140
+000
+003
+000
+000
+000
+000
+000
+000
+000
+000
+360
+300
+167
+200
+003
+140
+371
+154
+006
+000
+000
+000
+003
+016
+356
+343
+316
+163
+300
+000
+000
+303
+017
+356
+163
+200
+141
+000
+146
+235
+347
+231
+356
+303
+206
+063
+200
+003
+060
+000
+000
+000
+030
+146
+140
+001
+000
+000
+000
+000
+000
+200
+000
+000
+000
+200
+140
+167
+214
+003
+143
+375
+314
+014
+211
+300
+000
+006
+236
+140
+343
+200
+141
+300
+000
+000
+303
+031
+154
+073
+200
+141
+000
+306
+375
+303
+260
+154
+303
+206
+063
+200
+001
+060
+000
+000
+000
+030
+140
+140
+000
+000
+000
+000
+000
+000
+200
+000
+000
+000
+200
+140
+335
+236
+003
+143
+140
+314
+014
+205
+300
+000
+006
+206
+300
+143
+200
+141
+300
+301
+000
+003
+060
+154
+033
+200
+141
+000
+206
+375
+303
+260
+154
+303
+206
+036
+000
+001
+061
+000
+000
+000
+030
+140
+140
+000
+000
+000
+000
+000
+000
+200
+000
+000
+000
+200
+140
+001
+236
+003
+007
+340
+330
+014
+203
+300
+000
+014
+206
+200
+143
+200
+163
+307
+303
+374
+006
+260
+354
+033
+370
+141
+000
+006
+155
+303
+260
+356
+303
+206
+036
+001
+000
+060
+000
+037
+007
+031
+140
+177
+001
+140
+371
+174
+037
+307
+343
+206
+141
+337
+200
+161
+030
+236
+003
+003
+370
+160
+014
+217
+370
+374
+014
+206
+007
+373
+374
+077
+307
+006
+374
+014
+260
+314
+033
+200
+177
+000
+006
+015
+303
+060
+307
+303
+206
+014
+017
+000
+060
+000
+060
+314
+373
+370
+141
+001
+300
+155
+306
+260
+014
+203
+206
+063
+200
+000
+075
+000
+236
+003
+003
+174
+160
+014
+203
+370
+374
+030
+206
+000
+140
+216
+163
+300
+003
+000
+030
+277
+354
+033
+200
+141
+000
+006
+015
+303
+060
+000
+303
+314
+036
+006
+000
+060
+000
+000
+154
+033
+140
+141
+001
+200
+155
+306
+260
+014
+203
+314
+036
+201
+200
+160
+214
+263
+000
+007
+154
+330
+014
+205
+300
+000
+030
+206
+000
+140
+206
+141
+300
+301
+374
+030
+260
+154
+033
+200
+141
+000
+206
+015
+303
+066
+000
+303
+314
+036
+014
+000
+060
+000
+037
+154
+033
+140
+141
+001
+000
+155
+306
+260
+007
+203
+314
+014
+003
+200
+140
+003
+341
+000
+003
+375
+317
+014
+211
+300
+000
+060
+206
+000
+140
+206
+141
+307
+300
+374
+000
+260
+154
+073
+200
+141
+030
+306
+015
+303
+067
+200
+303
+170
+063
+030
+000
+060
+000
+060
+154
+033
+140
+141
+001
+200
+155
+306
+260
+000
+203
+170
+036
+006
+200
+140
+000
+377
+003
+003
+370
+306
+006
+000
+300
+000
+060
+006
+016
+143
+316
+163
+307
+200
+000
+000
+060
+356
+163
+200
+141
+035
+146
+015
+347
+033
+316
+303
+170
+063
+030
+000
+060
+000
+060
+154
+033
+140
+141
+001
+300
+155
+306
+037
+000
+263
+170
+063
+014
+200
+140
+010
+214
+003
+000
+140
+177
+003
+000
+001
+000
+140
+037
+347
+141
+374
+077
+200
+000
+000
+030
+260
+307
+343
+200
+141
+217
+067
+015
+176
+017
+147
+301
+060
+141
+037
+300
+360
+000
+037
+307
+371
+140
+141
+001
+143
+155
+174
+000
+017
+341
+060
+141
+037
+360
+300
+000
+200
+000
+000
+000
+000
+000
+000
+000
+000
+140
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+377
+000
+000
+000
+000
+000
+015
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+200
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+377
+000
+000
+000
+000
+000
+007
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+360
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+004
+030
+067
+000
+000
+150
+016
+000
+000
+176
+012
+000
+000
+004
+034
+000
+000
+000
+000
+015
+011
+011
+000
+000
+011
+000
+000
+011
+000
+000
+011
+000
+000
+011
+000
+000
+011
+013
+011
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+000
+000
+022
+015
+011
+033
+013
+011
+044
+004
+011
+055
+012
+011
+066
+013
+011
+077
+013
+011
+110
+013
+011
+121
+004
+011
+132
+013
+011
+143
+013
+011
+154
+011
+011
+165
+012
+011
+175
+013
+011
+206
+007
+011
+217
+012
+011
+230
+014
+011
+241
+013
+011
+252
+013
+011
+263
+013
+011
+274
+013
+011
+305
+013
+011
+316
+013
+011
+327
+013
+011
+340
+013
+011
+351
+013
+011
+362
+013
+011
+373
+012
+011
+004
+013
+011
+015
+013
+011
+026
+011
+011
+037
+013
+011
+050
+013
+011
+061
+013
+011
+072
+013
+011
+103
+013
+011
+114
+013
+011
+125
+013
+011
+136
+013
+011
+147
+013
+011
+160
+013
+011
+171
+013
+011
+202
+013
+011
+213
+013
+011
+224
+013
+011
+235
+013
+011
+246
+013
+011
+257
+013
+011
+270
+013
+011
+301
+013
+011
+312
+013
+011
+323
+013
+011
+334
+013
+011
+345
+013
+011
+356
+013
+011
+367
+013
+011
+000
+013
+011
+011
+013
+011
+022
+013
+011
+033
+013
+011
+044
+013
+011
+055
+014
+011
+066
+013
+011
+077
+004
+011
+110
+015
+011
+121
+004
+011
+132
+013
+011
+143
+013
+011
+154
+013
+011
+165
+013
+011
+176
+013
+011
+207
+013
+011
+220
+015
+011
+231
+013
+011
+242
+013
+011
+253
+015
+011
+264
+013
+011
+275
+013
+011
+306
+013
+011
+317
+013
+011
+330
+013
+011
+341
+015
+011
+352
+015
+011
+363
+013
+011
+374
+013
+011
+005
+013
+011
+016
+013
+011
+027
+013
+011
+040
+013
+011
+051
+013
+011
+062
+015
+011
+073
+013
+011
+104
+013
+011
+115
+015
+011
+126
+013
+011
+137
+007
+011
+150
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+200
+300
+340
+360
+370
+374
+376
+377
+000
+001
+003
+007
+017
+037
+077
+177
+377
+377
+377
+377
+377
+377
+377
+377
+377
--- /dev/null
+++ b/sys/src/games/blit/rom5
@@ -1,0 +1,2239 @@
+000
+060
+123
+076
+116
+000
+072
+123
+140
+075
+000
+076
+116
+000
+072
+075
+000
+140
+160
+300
+147
+112
+000
+151
+147
+060
+123
+075
+000
+060
+123
+076
+116
+000
+072
+140
+060
+123
+075
+000
+076
+116
+000
+072
+123
+075
+000
+101
+000
+056
+000
+057
+000
+057
+000
+116
+000
+076
+120
+064
+060
+200
+146
+377
+112
+377
+147
+064
+000
+075
+000
+000
+075
+000
+064
+000
+075
+000
+000
+075
+000
+076
+000
+057
+000
+057
+000
+057
+116
+000
+100
+117
+000
+114
+004
+377
+116
+116
+116
+377
+110
+014
+377
+044
+000
+112
+000
+151
+146
+060
+000
+260
+000
+157
+055
+000
+377
+055
+000
+000
+055
+377
+000
+060
+000
+260
+000
+157
+000
+004
+000
+140
+060
+000
+260
+000
+157
+055
+000
+377
+055
+000
+000
+055
+377
+000
+075
+000
+377
+075
+000
+377
+060
+000
+220
+377
+075
+377
+060
+000
+220
+377
+075
+377
+112
+157
+160
+140
+160
+066
+056
+000
+057
+116
+000
+074
+130
+046
+060
+301
+000
+110
+052
+160
+300
+377
+162
+222
+160
+343
+070
+076
+377
+116
+000
+106
+075
+377
+076
+377
+116
+000
+106
+075
+377
+112
+000
+151
+147
+002
+160
+320
+377
+076
+112
+377
+146
+001
+060
+377
+320
+075
+377
+160
+300
+377
+147
+000
+160
+300
+377
+110
+320
+042
+000
+121
+064
+010
+060
+000
+112
+147
+014
+000
+147
+014
+000
+147
+000
+014
+000
+147
+000
+140
+000
+014
+000
+147
+000
+014
+000
+147
+000
+014
+000
+147
+001
+140
+003
+160
+300
+377
+162
+302
+377
+262
+146
+160
+300
+377
+110
+320
+042
+000
+121
+060
+010
+261
+205
+140
+003
+060
+106
+201
+140
+000
+160
+300
+377
+162
+302
+377
+262
+146
+160
+300
+377
+110
+320
+042
+000
+121
+060
+010
+261
+060
+106
+301
+140
+003
+305
+140
+160
+300
+377
+162
+302
+377
+262
+146
+160
+300
+377
+110
+320
+042
+000
+121
+060
+010
+261
+265
+140
+003
+060
+106
+261
+160
+200
+377
+122
+075
+377
+060
+000
+112
+146
+377
+140
+066
+377
+160
+321
+377
+060
+377
+260
+377
+157
+160
+300
+377
+147
+160
+300
+377
+110
+320
+042
+000
+121
+060
+010
+201
+140
+002
+140
+102
+160
+321
+377
+060
+377
+260
+377
+157
+160
+300
+377
+147
+160
+300
+377
+110
+320
+042
+000
+121
+060
+010
+106
+301
+140
+140
+000
+012
+377
+160
+321
+377
+060
+377
+260
+377
+157
+160
+300
+377
+147
+377
+160
+300
+377
+110
+320
+042
+000
+121
+060
+010
+261
+140
+377
+076
+377
+116
+000
+074
+064
+060
+000
+151
+320
+074
+060
+000
+151
+320
+062
+222
+075
+377
+060
+000
+140
+000
+324
+377
+040
+320
+327
+211
+123
+147
+002
+342
+146
+124
+070
+200
+112
+154
+324
+140
+324
+377
+040
+320
+327
+060
+106
+301
+123
+147
+002
+342
+146
+124
+070
+200
+112
+154
+324
+140
+324
+377
+040
+320
+327
+271
+123
+147
+001
+342
+146
+124
+070
+200
+112
+154
+324
+140
+112
+147
+377
+014
+000
+147
+377
+014
+000
+147
+377
+014
+000
+147
+160
+320
+377
+076
+112
+377
+146
+000
+060
+000
+140
+000
+211
+123
+147
+001
+040
+320
+327
+140
+060
+106
+070
+311
+123
+147
+001
+040
+320
+327
+140
+271
+123
+147
+001
+040
+320
+327
+140
+112
+147
+377
+014
+000
+147
+377
+014
+000
+147
+377
+014
+000
+147
+076
+377
+116
+000
+074
+064
+060
+000
+151
+320
+074
+060
+000
+151
+320
+062
+222
+075
+377
+060
+000
+140
+000
+211
+123
+147
+001
+112
+154
+324
+140
+324
+377
+342
+146
+124
+070
+200
+040
+320
+327
+140
+211
+123
+147
+000
+112
+154
+324
+140
+324
+377
+330
+146
+125
+170
+040
+320
+327
+140
+060
+106
+301
+123
+147
+000
+112
+154
+324
+140
+324
+377
+342
+146
+124
+070
+200
+040
+320
+327
+140
+060
+106
+301
+123
+147
+000
+112
+154
+324
+140
+324
+377
+330
+146
+125
+170
+040
+320
+327
+140
+271
+123
+147
+000
+112
+154
+324
+140
+324
+377
+342
+146
+124
+070
+200
+040
+320
+327
+140
+271
+123
+147
+000
+112
+154
+324
+140
+324
+377
+330
+146
+125
+170
+040
+320
+327
+140
+112
+147
+377
+014
+000
+147
+377
+014
+000
+147
+377
+014
+000
+147
+377
+014
+004
+147
+377
+014
+004
+147
+377
+014
+004
+147
+377
+014
+004
+147
+377
+114
+014
+377
+116
+116
+116
+000
+077
+000
+110
+060
+064
+062
+110
+110
+110
+222
+060
+000
+066
+110
+110
+226
+000
+303
+307
+326
+301
+110
+220
+110
+114
+000
+116
+116
+116
+000
+060
+000
+154
+000
+104
+110
+116
+116
+057
+057
+141
+166
+141
+104
+040
+046
+044
+116
+057
+057
+141
+141
+104
+140
+166
+044
+000
+152
+104
+166
+116
+042
+152
+104
+010
+000
+327
+014
+000
+377
+142
+110
+160
+060
+200
+110
+062
+110
+202
+060
+102
+110
+116
+040
+102
+110
+110
+102
+166
+320
+323
+264
+142
+222
+122
+121
+377
+116
+000
+300
+301
+001
+303
+003
+002
+302
+306
+006
+007
+307
+005
+305
+304
+004
+000
+314
+330
+024
+360
+074
+050
+344
+240
+154
+170
+264
+120
+234
+210
+104
+361
+362
+363
+364
+341
+342
+343
+344
+320
+321
+322
+323
+300
+301
+302
+303
+261
+262
+376
+366
+367
+370
+001
+377
+376
+370
+374
+376
+337
+317
+207
+203
+001
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+001
+203
+207
+317
+337
+376
+374
+370
+376
+377
+001
+000
+000
+000
+000
+000
+001
+003
+007
+017
+037
+076
+174
+370
+160
+040
+040
+160
+370
+174
+076
+037
+017
+007
+003
+001
+000
+000
+000
+000
+000
+001
+000
+107
+377
+000
+000
+107
+000
+000
+000
+107
+377
+377
+000
+107
+000
+377
+000
+000
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+021
+104
+000
+000
+000
+000
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+377
+000
+003
+000
+340
+007
+006
+000
+000
+000
+036
+017
+340
+374
+377
+037
+000
+060
+300
+000
+037
+347
+375
+176
+237
+314
+003
+306
+177
+037
+347
+015
+303
+260
+343
+000
+060
+070
+030
+000
+000
+000
+000
+014
+300
+000
+000
+000
+000
+000
+000
+000
+000
+303
+000
+377
+000
+003
+001
+260
+006
+003
+000
+000
+000
+063
+034
+160
+001
+003
+271
+000
+140
+140
+000
+030
+166
+001
+347
+206
+314
+003
+306
+143
+230
+160
+015
+303
+031
+143
+000
+170
+030
+030
+000
+000
+000
+006
+214
+300
+000
+000
+000
+001
+000
+000
+000
+001
+300
+000
+377
+000
+003
+063
+266
+016
+001
+220
+000
+000
+141
+000
+061
+001
+003
+260
+000
+300
+060
+000
+230
+006
+001
+300
+206
+314
+003
+346
+141
+330
+000
+015
+303
+031
+143
+200
+314
+034
+030
+000
+000
+000
+000
+014
+300
+000
+000
+000
+001
+000
+000
+000
+001
+300
+000
+377
+000
+003
+063
+354
+014
+001
+240
+000
+000
+143
+000
+063
+001
+003
+260
+001
+200
+030
+077
+330
+006
+001
+300
+206
+315
+003
+346
+141
+330
+000
+015
+303
+017
+303
+200
+206
+014
+030
+000
+000
+000
+000
+014
+300
+000
+000
+000
+001
+000
+000
+000
+001
+300
+300
+377
+000
+000
+373
+030
+000
+001
+300
+000
+000
+147
+001
+166
+001
+006
+271
+001
+003
+014
+141
+330
+006
+001
+300
+206
+317
+003
+366
+143
+330
+000
+015
+303
+017
+203
+300
+000
+000
+230
+340
+370
+176
+006
+214
+303
+370
+177
+337
+367
+031
+303
+260
+343
+300
+342
+377
+000
+000
+061
+060
+000
+001
+367
+003
+000
+155
+003
+347
+371
+014
+037
+000
+003
+006
+156
+337
+006
+361
+300
+206
+316
+003
+266
+177
+337
+340
+015
+333
+006
+303
+300
+000
+000
+337
+063
+015
+303
+206
+214
+303
+214
+141
+334
+001
+031
+303
+031
+317
+300
+036
+377
+000
+000
+060
+140
+000
+001
+307
+003
+000
+171
+006
+160
+035
+030
+200
+000
+000
+014
+151
+330
+006
+001
+317
+206
+317
+003
+276
+140
+336
+160
+014
+333
+006
+003
+140
+000
+000
+330
+006
+014
+303
+206
+215
+303
+214
+141
+330
+001
+030
+303
+031
+203
+300
+014
+377
+000
+000
+370
+334
+000
+001
+240
+340
+000
+161
+014
+060
+015
+060
+200
+001
+203
+030
+155
+330
+006
+001
+303
+206
+315
+003
+236
+140
+333
+060
+014
+377
+006
+003
+140
+000
+000
+330
+006
+370
+303
+206
+217
+303
+214
+141
+330
+341
+030
+333
+017
+001
+300
+000
+377
+200
+000
+063
+266
+000
+001
+220
+340
+160
+141
+030
+060
+015
+060
+200
+001
+303
+060
+147
+330
+006
+001
+303
+206
+314
+003
+236
+140
+331
+060
+014
+377
+006
+003
+060
+000
+000
+330
+006
+000
+177
+206
+217
+303
+214
+141
+330
+061
+030
+377
+006
+001
+300
+000
+377
+200
+000
+061
+066
+000
+003
+000
+300
+160
+063
+030
+160
+235
+060
+271
+001
+140
+140
+060
+330
+166
+001
+347
+206
+314
+003
+216
+140
+230
+160
+234
+347
+006
+003
+060
+000
+000
+330
+066
+000
+003
+206
+214
+303
+214
+177
+330
+061
+030
+347
+014
+001
+300
+000
+377
+000
+000
+000
+034
+000
+006
+000
+200
+000
+036
+237
+340
+370
+060
+037
+003
+060
+300
+037
+337
+347
+375
+176
+237
+214
+373
+216
+140
+330
+340
+370
+303
+206
+343
+030
+000
+000
+337
+343
+374
+003
+206
+214
+363
+214
+140
+330
+340
+370
+303
+230
+340
+303
+000
+377
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+030
+000
+000
+000
+000
+000
+303
+000
+200
+000
+000
+140
+300
+000
+000
+000
+030
+000
+300
+000
+377
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+176
+000
+000
+000
+000
+140
+300
+000
+000
+000
+060
+000
+300
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+110
+000
+000
+000
+003
+000
+000
+000
+000
+016
+000
+000
+000
+116
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+002
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+015
+000
+000
+000
+000
+000
+000
+000
+000
+002
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+002
+000
+000
+002
+000
+000
+007
+000
+000
+005
+000
+000
+010
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+000
+004
+000
+001
+003
+000
+001
+000
+000
+001
+004
+000
+001
+000
+000
+001
+000
+000
+001
+003
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+001
+000
+000
+002
+000
+000
+002
+000
+000
+002
+000
+000
+002
+000
+000
+002
+000
+000
+002
+000
+000
+002
+000
+000
+002
+000
+000
+002
+013
+000
+002
+000
+000
+002
+004
+000
+002
+000
+000
+002
+004
+000
+002
+000
+000
+002
+004
+000
+002
+000
+000
+002
+004
+000
+002
+000
+000
+002
+001
+000
+002
+001
+000
+002
+000
+000
+002
+000
+000
+002
+004
+000
+002
+004
+000
+002
+004
+000
+002
+004
+000
+002
+004
+000
+002
+004
+000
+002
+004
+000
+003
+001
+000
+003
+004
+000
+003
+004
+000
+003
+004
+000
+003
+004
+000
+003
+004
+000
+003
+004
+000
+003
+000
+000
+003
+000
+000
+003
+000
+000
+003
+003
+000
+003
+000
+000
+000
+200
+300
+340
+360
+370
+374
+376
+377
+377
+377
+377
+377
+377
+377
+377
+377
+000
+000
+000
+000
+000
+000
+000
+000
+000
+001
+003
+007
+017
+037
+077
+177
+377
--- /dev/null
+++ b/sys/src/games/blit/telnet.c
@@ -1,0 +1,149 @@
+#include <u.h>
+#include <libc.h>
+#include <thread.h>
+#include "dat.h"
+#include "fns.h"
+
+Channel *telnetrxch, *telnettxch;
+extern Channel *uartrxch, *uarttxch;
+int teldebug;
+
+enum {
+	SE = 240,
+	NOP = 241,
+	BRK = 243,
+	IP = 244,
+	AO = 245,
+	AYT = 246,
+	EC = 247,
+	EL = 248,
+	GA = 249,
+	SB = 250,
+	WILL = 251,
+	WONT = 252,
+	DO = 253,
+	DONT = 254,
+	IAC = 255,
+	
+	XMITBIN = 0,
+	ECHO = 1,
+	SUPRGA = 3,
+	LINEEDIT = 34,
+	
+};
+
+int telfd;
+
+static void
+netrproc(void *)
+{
+	static uchar buf[512];
+	int n, c;
+	uchar *p;
+	
+	for(;;){
+		n = read(telfd, buf, sizeof(buf));
+		if(n < 0) sysfatal("read: %r");
+		for(p = buf; p < buf + n; p++){
+			c = *p;
+			send(telnetrxch, &c);
+		}
+	}
+}
+
+static void
+netwproc(void *)
+{
+	static uchar buf[512];
+	int c;
+	uchar *p;
+	
+	for(;;){
+		recv(telnettxch, &c);
+		p = buf;
+		do
+			*p++ = c;
+		while(nbrecv(telnettxch, &c) > 0);
+		if(write(telfd, buf, p - buf) < p - buf)
+			sysfatal("write: %r");
+	}
+}
+
+static void
+telnetrthread(void *)
+{
+	int c;
+
+	for(;;){
+		recv(telnetrxch, &c);
+		if(c != IAC){
+			send(uartrxch, &c);
+			continue;
+		}
+		recv(telnetrxch, &c);
+		switch(c){
+		case NOP: break;
+		case WILL:
+			recv(telnetrxch, &c);
+			if(teldebug) fprint(2, "WILL %d\n", c);
+			break;
+		case WONT:
+			recv(telnetrxch, &c);
+			if(teldebug) fprint(2, "WONT %d\n", c);
+			break;
+		case DO:
+			recv(telnetrxch, &c);
+			if(teldebug) fprint(2, "DO %d\n", c);
+			break;
+		case DONT:
+			recv(telnetrxch, &c);
+			if(teldebug) fprint(2, "DONT %d\n", c);
+			break;
+		case IAC:
+			send(uartrxch, &c);
+			break;
+		default:	
+			fprint(2, "unknown telnet command %d\n", c);
+		}
+	}
+}
+
+static void
+cmd(int a, int b)
+{
+	send(telnettxch, &a);
+	if(b >= 0) send(telnettxch, &b);
+}
+
+static void
+telnetwthread(void *)
+{
+	int c;
+
+	for(;;){
+		recv(uarttxch, &c);
+		send(telnettxch, &c);
+		if(c == 0xff)
+			send(telnettxch, &c);
+	}
+}
+
+void
+telnetinit(char *dialstr)
+{
+	telfd = dial(netmkaddr(dialstr, nil, "telnet"), nil, nil, nil);
+	if(telfd < 0) sysfatal("dial: %r");
+	telnetrxch = chancreate(sizeof(int), 128);
+	telnettxch = chancreate(sizeof(int), 128);
+	cmd(WILL, XMITBIN);
+	cmd(DO, XMITBIN);
+	cmd(DONT, ECHO);
+	cmd(DO, SUPRGA);
+	cmd(WILL, SUPRGA);
+	cmd(WONT, LINEEDIT);
+	cmd(DONT, LINEEDIT);
+	proccreate(netrproc, nil, mainstacksize);
+	proccreate(netwproc, nil, mainstacksize);
+	threadcreate(telnetrthread, nil, mainstacksize);
+	threadcreate(telnetwthread, nil, mainstacksize);
+}
--- a/sys/src/games/mkfile
+++ b/sys/src/games/mkfile
@@ -3,6 +3,7 @@
 TARG=4s\
 	5s\
 	ana\
+	blit\
 	catclock\
 	festoon\
 	geigerstats\