1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2005 CaH4e3
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
20 * Family Study Box by Fukutake Shoten
25 static uint8 *DummyCHR=NULL;
27 static void(*Sync)(void);
30 static SFORMAT StateRegs[]=
32 {&datareg, 1, "DREG"},
37 //1 0x0F, 0xF0 - Bird Week
38 //2 0x33, 0x00 - B-Wings
39 //3 0x11, 0x00 - Mighty Bomb Jack
40 //4 0x22, 0x20 - Sansuu 1 Nen, Sansuu 2 Nen
41 //5 0xFF, 0x00 - Sansuu 3 Nen
42 //6 0x21, 0x13 - Spy vs Spy
43 //7 0x20, 0x21 - Seicross
45 static void Sync185(void)
47 // little dirty eh? ;_)
48 if((datareg&3)&&(datareg!=0x13)) // 1, 2, 3, 4, 5, 6
54 static void Sync181(void)
68 static void MPower(void)
74 SetWriteHandler(0x8000,0xFFFF,MWrite);
75 SetReadHandler(0x8000,0xFFFF,CartBR);
78 static void MClose(void)
85 static void MRestore(int version)
90 void Mapper185_Init(CartInfo *info)
95 GameStateRestore=MRestore;
96 DummyCHR=(uint8*)FCEU_gmalloc(8192);
100 SetupCartCHRMapping(0x10,DummyCHR,8192,0);
101 AddExState(StateRegs, ~0, 0, 0);
104 void Mapper181_Init(CartInfo *info)
109 GameStateRestore=MRestore;
110 DummyCHR=(uint8*)FCEU_gmalloc(8192);
114 SetupCartCHRMapping(0x10,DummyCHR,8192,0);
115 AddExState(StateRegs, ~0, 0, 0);