summaryrefslogtreecommitdiff
path: root/sys/src/games
diff options
context:
space:
mode:
authoraiju <devnull@localhost>2014-03-16 09:52:38 +0100
committeraiju <devnull@localhost>2014-03-16 09:52:38 +0100
commit2fb68b633845ad67fbf03d6f0cf8faa6d7005a45 (patch)
treea107836c60ebec0ce945d199f5abc8050658ac2a /sys/src/games
parent74778941ed75b0a548d6f00e825d6d56bb5722d8 (diff)
games/snes: bug fixes
Diffstat (limited to 'sys/src/games')
-rw-r--r--sys/src/games/snes/mem.c2
-rw-r--r--sys/src/games/snes/ppu.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/games/snes/mem.c b/sys/src/games/snes/mem.c
index 330615d27..518fbb02e 100644
--- a/sys/src/games/snes/mem.c
+++ b/sys/src/games/snes/mem.c
@@ -342,7 +342,7 @@ regwrite(u16int p, u8int v)
vtime = vtime & 0xff | (v & 1) << 8;
break;
case 0x420b:
- dma |= v & ~reg[0x420c];
+ dma |= v & ~(reg[0x420c] & ~hdma >> 24);
break;
case 0x4210:
return;
diff --git a/sys/src/games/snes/ppu.c b/sys/src/games/snes/ppu.c
index 40ecd75a2..5edc52f5e 100644
--- a/sys/src/games/snes/ppu.c
+++ b/sys/src/games/snes/ppu.c
@@ -280,8 +280,8 @@ redo:
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){