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
* BMC 42-in-1 reset switch
27
static SFORMAT StateRegs[]=
33
static void Sync(void)
38
setprg32(0x8000,regs[1]&0x1F);
41
int bank=((regs[1]&0x1f)<<1)|((regs[1]>>6)&1);
42
setprg16(0x8000,bank);
43
setprg16(0xC000,bank);
48
int bank=((regs[1]&0x1f)<<1)|((regs[1]>>6)&1);
49
setprg16(0xC000,bank);
55
setchr8((regs[2]<<2)|((regs[0]>>1)&3));
58
static DECLFW(BMC64in1nrWriteLo)
64
static DECLFW(BMC64in1nrWriteHi)
70
static void BMC64in1nrPower(void)
76
SetWriteHandler(0x5000,0x5003,BMC64in1nrWriteLo);
77
SetWriteHandler(0x8000,0xFFFF,BMC64in1nrWriteHi);
78
SetReadHandler(0x8000,0xFFFF,CartBR);
81
static void StateRestore(int version)
86
void BMC64in1nr_Init(CartInfo *info)
88
info->Power=BMC64in1nrPower;
89
AddExState(&StateRegs, ~0, 0, 0);
90
GameStateRestore=StateRestore;