merge mapper code from FCEUX
[fceu.git] / mappers / 193.c
1 #include "mapinc.h"
2
3 static DECLFW(m193w)
4 {
5   //printf("$%04x:$%02x\n",A,V);
6  switch(A&3)
7  {
8   case 0:VROM_BANK4(0x0000,V>>2);break;
9   case 1:VROM_BANK2(0x1000,V>>1);break;
10   case 2:VROM_BANK2(0x1800,V>>1);break;
11   case 3:ROM_BANK8(0x8000,V);break;
12  }
13 }
14
15 void Mapper193_init(void)
16 {
17  ROM_BANK32(~0);
18  SetWriteHandler(0x4018,0x7fff,m193w);
19  SetReadHandler(0x4018,0x7fff,0);
20 }