1 /* FCE Ultra - NES/Famicom Emulator
\r
3 * Copyright notice for this file:
\r
4 * Copyright (C) 2008 CaH4e3
\r
6 * This program is free software; you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation; either version 2 of the License, or
\r
9 * (at your option) any later version.
\r
11 * This program is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with this program; if not, write to the Free Software
\r
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
21 // actually cart ID is 811120-C, sorry ;) K-3094 - another ID
\r
26 static uint8 reset_flag = 0;
\r
28 static void BMC411120CCW(uint32 A, uint8 V)
\r
30 setchr1(A,V|((EXPREGS[0]&3)<<7));
\r
33 static void BMC411120CPW(uint32 A, uint8 V)
\r
35 if(EXPREGS[0]&(8|reset_flag))
\r
36 setprg32(0x8000,((EXPREGS[0]>>4)&3)|(0x0C));
\r
38 setprg8(A,(V&0x0F)|((EXPREGS[0]&3)<<4));
\r
41 static DECLFW(BMC411120CLoWrite)
\r
44 FixMMC3PRG(MMC3_cmd);
\r
45 FixMMC3CHR(MMC3_cmd);
\r
48 static void BMC411120CReset(void)
\r
55 static void BMC411120CPower(void)
\r
59 SetWriteHandler(0x6000,0x7FFF,BMC411120CLoWrite);
\r
62 void BMC411120C_Init(CartInfo *info)
\r
64 GenMMC3_Init(info, 128, 128, 8, 0);
\r
67 info->Power=BMC411120CPower;
\r
68 info->Reset=BMC411120CReset;
\r
69 AddExState(EXPREGS, 1, 0, "EXPR");
\r