ref: f9cd75d17702ae391624dac6f570a5d7fd2f7a3c
parent: 6dcd1e56f0cfc2c40258df223f631b6cb978e709
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Feb 16 16:40:33 EST 2014
games/nes: add mapper 7 support
--- a/sys/src/games/nes/mem.c
+++ b/sys/src/games/nes/mem.c
@@ -108,9 +108,21 @@
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
--
⑨