summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-02-16 21:40:33 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-02-16 21:40:33 +0100
commit87fcb107ef333f5dce7618e0f4c73d69ebc75eb5 (patch)
tree54ad75bd4eabbbb6009db45998520645494257af /sys/src
parentcd27c0cca2d72e467c26c78097b059b8e5a74c87 (diff)
games/nes: add mapper 7 support
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/games/nes/mem.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/src/games/nes/mem.c b/sys/src/games/nes/mem.c
index ff5ecc2dd..1354678d8 100644
--- a/sys/src/games/nes/mem.c
+++ b/sys/src/games/nes/mem.c
@@ -108,9 +108,21 @@ t:
n = 0;
}
+static void
+mmc7(int v, u8int p)
+{
+ if(v < 0){
+ nrom(-1, 0);
+ p = 0;
+ }
+ prgb[0] = prg + (p & 3) * 0x8000;
+ prgb[1] = prgb[0] + 0x4000;
+}
+
void (*mapper[256])(int, u8int) = {
[0] nrom,
[1] mmc1,
+ [7] mmc7,
};
static void