1 /* FCE Ultra - NES/Famicom Emulator
\r
3 * Copyright notice for this file:
\r
4 * Copyright (C) 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
\r
19 * 700in1 and 400in1 carts
\r
25 static uint16 cmd, bank;
\r
27 static SFORMAT StateRegs[]=
\r
34 static void Sync(void)
\r
36 setmirror((cmd&1)^1);
\r
42 setprg16(0x8000,((cmd&0xe0)>>2)|bank);
\r
43 setprg16(0xC000,((cmd&0xe0)>>2)|7);
\r
47 setprg16(0x8000,((cmd&0xe0)>>2)|(bank&6));
\r
48 setprg16(0xC000,((cmd&0xe0)>>2)|((bank&6)|1));
\r
53 setprg16(0x8000,((cmd&0xe0)>>2)|bank);
\r
54 setprg16(0xC000,((cmd&0xe0)>>2)|bank);
\r
58 static DECLFW(UNLN625092WriteCommand)
\r
64 static DECLFW(UNLN625092WriteBank)
\r
70 static void UNLN625092Power(void)
\r
75 SetReadHandler(0x8000,0xFFFF,CartBR);
\r
76 SetWriteHandler(0x8000,0xBFFF,UNLN625092WriteCommand);
\r
77 SetWriteHandler(0xC000,0xFFFF,UNLN625092WriteBank);
\r
80 static void UNLN625092Reset(void)
\r
86 static void StateRestore(int version)
\r
91 void UNLN625092_Init(CartInfo *info)
\r
93 info->Reset=UNLN625092Reset;
\r
94 info->Power=UNLN625092Power;
\r
95 GameStateRestore=StateRestore;
\r
96 AddExState(&StateRegs, ~0, 0, 0);
\r