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 // M-022 MMC3 based 830118C T-106 4M + 4M
\r
26 static void BMC830118CCW(uint32 A, uint8 V)
\r
28 setchr1(A,(V&0x7F)|((EXPREGS[0]&0x0c)<<5));
\r
31 static void BMC830118CPW(uint32 A, uint8 V)
\r
33 if((EXPREGS[0]&0x0C)==0x0C)
\r
37 setprg8(A,(V&0x0F)|((EXPREGS[0]&0x0c)<<2));
\r
38 setprg8(0xC000,(V&0x0F)|0x32);
\r
42 setprg8(A,(V&0x0F)|((EXPREGS[0]&0x0c)<<2));
\r
43 setprg8(0xE000,(V&0x0F)|0x32);
\r
48 setprg8(A,(V&0x0F)|((EXPREGS[0]&0x0c)<<2));
\r
52 static DECLFW(BMC830118CLoWrite)
\r
55 FixMMC3PRG(MMC3_cmd);
\r
56 FixMMC3CHR(MMC3_cmd);
\r
59 static void BMC830118CReset(void)
\r
65 static void BMC830118CPower(void)
\r
69 SetWriteHandler(0x6800,0x68FF,BMC830118CLoWrite);
\r
72 void BMC830118C_Init(CartInfo *info)
\r
74 GenMMC3_Init(info, 128, 128, 8, 0);
\r
77 info->Power=BMC830118CPower;
\r
78 info->Reset=BMC830118CReset;
\r
79 AddExState(EXPREGS, 1, 0, "EXPR");
\r