ref: 105625e10b469d4012c148154563007cfa3acc4d
parent: 38c0dfacabb9b4e4ba4f8d6cd96166d355708f7e
parent: 2fb68b633845ad67fbf03d6f0cf8faa6d7005a45
author: aiju <aiju@phicode.de>
date: Sun Mar 16 05:53:14 EDT 2014
merge
--- a/sys/src/games/snes/mem.c
+++ b/sys/src/games/snes/mem.c
@@ -342,7 +342,7 @@
vtime = vtime & 0xff | (v & 1) << 8;
break;
case 0x420b:
- dma |= v & ~reg[0x420c];
+ dma |= v & ~(reg[0x420c] & ~hdma >> 24);
break;
case 0x4210:
return;
--- a/sys/src/games/snes/ppu.c
+++ b/sys/src/games/snes/ppu.c
@@ -280,8 +280,8 @@
p->t = tile(n, p->tx, p->ty);
chr(n, nb, p->sz, p->t, p->tnx, p->tny, p->c);
p->pal = palette(n, p->t >> 10 & 7);
- if(p->tnx != 0)
- shift(p->c, nb, p->tnx, p->t & 0x4000);
+ if((p->tnx & 7) != 0)
+ shift(p->c, nb, p->tnx & 7, p->t & 0x4000);
if(p->msz != 1 && p->mx != 0 && sx % p->msz == 0){
p->mv = bgpixel(p->c, nb, p->t & 0x4000);
if(p->tnx + p->mx >= 8){