shithub: riscv

Download patch

ref: 28c3c2bea7ac2d7c1b7abee4ac9c2c0435994ba3
parent: 1df8b3d2c15ae0e8acd4d4f341385d774213d292
author: aiju <devnull@localhost>
date: Tue Feb 25 04:39:30 EST 2014

games/nes: mmc3 chr inversion fixed

--- a/sys/src/games/nes/mem.c
+++ b/sys/src/games/nes/mem.c
@@ -281,7 +281,7 @@
 		prgb[2] = prg + (2 * nprg - 2) * 0x2000;
 	}
 	prgb[1] = prg + b[7] * 0x2000;
-	c = (m & 0x80) >> 6;
+	c = (m & 0x80) >> 5;
 	for(i = 0; i < 2; i++){
 		chrb[j = (i << 1) ^ c] = chr + (b[i] >> 1) * 0x800;
 		chrb[j+1] = chrb[j] + 0x400;