1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2002 Ben Parnell
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
25 static void FP_FASTAPASS(1) FFEIRQHook(int a)
41 DECLFW(Mapper17_write)
52 case 0x4501:IRQa=V&1;break;
53 case 0x4502:IRQCount&=0xFF00;IRQCount|=V;break;
54 case 0x4503:IRQCount&=0x00FF;IRQCount|=V<<8;IRQa=1;break;
55 case 0x4504: ROM_BANK8(0x8000,V);
57 case 0x4505: ROM_BANK8(0xA000,V);
59 case 0x4506: ROM_BANK8(0xC000,V);
61 case 0x4507: ROM_BANK8(0xE000,V);
63 case 0x4510: VROM_BANK1(0x0000,V);break;
64 case 0x4511: VROM_BANK1(0x0400,V);break;
65 case 0x4512: VROM_BANK1(0x0800,V);break;
66 case 0x4513: VROM_BANK1(0x0C00,V);break;
67 case 0x4514: VROM_BANK1(0x1000,V);break;
68 case 0x4515: VROM_BANK1(0x1400,V);break;
69 case 0x4516: VROM_BANK1(0x1800,V);break;
70 case 0x4517: VROM_BANK1(0x1C00,V);break;
74 void Mapper17_init(void)
76 MapIRQHook=FFEIRQHook;
77 SetWriteHandler(0x4020,0x5fff,Mapper17_write);