static DECLFW(Mapper34_write) { switch(A) { case 0x7FFD:ROM_BANK32(V);break; case 0x7FFE:VROM_BANK4(0x0000,V);break; case 0x7fff:VROM_BANK4(0x1000,V);break; } if(A>=0x8000) ROM_BANK32(V); }
static DECLFW(Mapper201_write) { // FCEU_printf("%04x, %02x\n",A,V); if(A&0x08) { ROM_BANK32(A&0x03); VROM_BANK8(A&0x03); } else { ROM_BANK32(0); VROM_BANK8(0); } }
void Mapper46_init(void) { MIRROR_SET(0); ROM_BANK32(0); SetWriteHandler(0x8000,0xffff,Mapper46_write); SetWriteHandler(0x6000,0x7fff,Mapper46_writel); }
void Mapper241_init(void) { ROM_BANK32(0); SetWriteHandler(0x5000,0x5fff,M241wr); SetWriteHandler(0x8000,0xFFFF,M241wr); SetReadHandler(0x4020,0x5fff,M241rd); }
static DECLFW(M241wr) { if(A<0x8000) { // printf("$%04x:$%02x, $%04x\n",A,V,X.PC); } else ROM_BANK32(V); }
void Mapper34_init(void) { ROM_BANK32(0); SetWriteHandler(0x7ffd,0xffff,Mapper34_write); }
void Mapper201_init(void) { ROM_BANK32(~0); VROM_BANK8(~0); SetWriteHandler(0x8000,0xffff,Mapper201_write); }