1
/* FCE Ultra - NES/Famicom Emulator
3
* Copyright notice for this file:
4
* Copyright (C) 2002 Xodnizel
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
24
static uint8 DRegs[8];
26
static SFORMAT DEI_StateRegs[]=
33
static void Sync(void)
36
setchr2(0x0000,DRegs[0]);
37
setchr2(0x0800,DRegs[1]);
39
setchr1(0x1000+(x<<10),DRegs[2+x]);
40
setprg8(0x8000,DRegs[6]);
41
setprg8(0xa000,DRegs[7]);
44
static void StateRestore(int version)
49
static DECLFW(DEIWrite)
53
case 0x8000: cmd=V&0x07; break;
54
case 0x8001: if(cmd<=0x05)
65
static void DEIPower(void)
72
SetReadHandler(0x8000,0xFFFF,CartBR);
73
SetWriteHandler(0x8000,0xFFFF,DEIWrite);
77
void DEIROM_Init(CartInfo *info)
80
GameStateRestore=StateRestore;
81
AddExState(&DEI_StateRegs, ~0, 0, 0);