1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2002 Xodnizel
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #define reg1 mapbyte1[0]
25 #define reg2 mapbyte1[1]
26 #define reg3 mapbyte1[2]
27 #define reg4 mapbyte1[3]
33 case 0:return reg1;break;
34 case 1:return reg2;break;
35 case 2:return reg3;break;
36 case 3:return reg4;break;
44 case 0:reg1=V&0xF;break;
45 case 1:reg2=V&0xF;break;
46 case 2:reg3=V&0xF;break;
47 case 3:reg4=V&0xF;break;
51 DECLFW(Mapper225_write)
55 MIRROR_SET((A>>13)&1);
61 VROM_BANK8(((A&0x003f)+(banks<<6)));
66 ROM_BANK16(0x8000,((((((A>>7)&0x1F)+(banks<<5)))<<1)+1));
67 ROM_BANK16(0xC000,((((((A>>7)&0x1F)+(banks<<5)))<<1)+1));
71 ROM_BANK16(0x8000,(((((A>>7)&0x1F)+(banks<<5)))<<1));
72 ROM_BANK16(0xC000,(((((A>>7)&0x1F)+(banks<<5)))<<1));
77 ROM_BANK32(((((A>>7)&0x1F)+(banks<<5))));
81 void Mapper225_init(void)
83 SetWriteHandler(0x8000,0xffff,Mapper225_write);
84 SetReadHandler(0x5800,0x5fff,A110in1read);
85 SetWriteHandler(0x5800,0x5fff,A110in1regwr);