diff options
author | aiju <devnull@localhost> | 2014-03-15 00:57:03 +0100 |
---|---|---|
committer | aiju <devnull@localhost> | 2014-03-15 00:57:03 +0100 |
commit | 77a3391cf36cd24a3c01b0e45f512603b4d78e81 (patch) | |
tree | 0e70b38a59fa11b447226d0985983cf4589c0969 /sys/src/games | |
parent | d1822db1876754048ade2278aba664a6545590c8 (diff) |
games/snes: small hdma fix
Diffstat (limited to 'sys/src/games')
-rw-r--r-- | sys/src/games/snes/mem.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/src/games/snes/mem.c b/sys/src/games/snes/mem.c index 9cc0469db..6b6fb0286 100644 --- a/sys/src/games/snes/mem.c +++ b/sys/src/games/snes/mem.c @@ -486,7 +486,7 @@ hdmastep(void) { int i, j, cyc; u8int *p, *q, n, m, b, v, c; - u32int a; + u32int a, br; cyc = 0; if(dma != 0) @@ -502,12 +502,15 @@ hdmastep(void) if((hdma & (1<<(16+i))) != 0){ n = nbytes[c & 7]; m = modes[c & 7]; - if((c & 0x40) != 0) + if((c & 0x40) != 0){ q = p + 5; - else + br = p[7] << 16; + }else{ q = p + 8; + br = p[4] << 16; + } for(j = 0; j < n; j++){ - a = q[0] | q[1] << 8 | p[4] << 16; + a = q[0] | q[1] << 8 | br; b = p[1] + (m & 3); if((c & 0x80) != 0){ v = dmavalid(b, 1) ? memread(0x2100 | b) : 0; |