shithub: riscv

Download patch

ref: 55ea9a80b19c24851131d8f78d163b3e20920049
parent: 442d17ab18c3650bc4f554e16417f1d68d44d53a
author: aiju <devnull@localhost>
date: Sat Mar 15 06:06:18 EDT 2014

games/snes: fix flickering sprite bug

--- a/sys/src/games/snes/mem.c
+++ b/sys/src/games/snes/mem.c
@@ -203,12 +203,10 @@
 	}
 	switch(p){
 	case 0x2102:
-		oamaddr &= 0x200;
-		oamaddr |= v << 1;
+		oamaddr = (reg[0x2103] & 1) << 9 | v << 1;
 		break;
 	case 0x2103:
-		oamaddr &= 0x1fe;
-		oamaddr |= (v & 1) << 9;
+		oamaddr = (v & 1) << 9 | reg[0x2102];
 		break;
 	case 0x2104:
 		if((oamaddr & 1) == 0)