X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mappers%2F212.c;fp=mappers%2F212.c;h=b069fc3f2357bed16ebdabd123b9d95fd458b949;hb=d97315ac0bca825d2d50a44453bc5652946e2c67;hp=0000000000000000000000000000000000000000;hpb=890e37ba2b8ea1c7593dc05926d7431e3bd00bfb;p=fceu.git diff --git a/mappers/212.c b/mappers/212.c new file mode 100644 index 0000000..b069fc3 --- /dev/null +++ b/mappers/212.c @@ -0,0 +1,23 @@ +#include "mapinc.h" + +static DECLFW(Mapper212_write) +{ + if((A&0x4000)==0x4000) + { + ROM_BANK32((A&6)>>1); + } + else + { + ROM_BANK16(0x8000,A&7); + ROM_BANK16(0xc000,A&7); + } + VROM_BANK8(A&7); + MIRROR_SET((A>>3)&1); +} + +void Mapper212_init(void) +{ + ROM_BANK32(~0); + VROM_BANK8(~0); + SetWriteHandler(0x8000,0xFFFF,Mapper212_write); +}