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
33 static void StrobeARKFC(void)
39 static uint8 FP_FASTAPASS(2) ReadARKFC(int w,uint8 ret)
49 ret|=((FCArk.mzx>>(7-FCArk.readbit))&1)<<1;
59 static uint32 FixX(uint32 x)
67 static void FP_FASTAPASS(2) UpdateARKFC(void *data, int arg)
69 uint32 *ptr=(uint32 *)data;
70 FCArk.mzx=FixX(ptr[0]);
74 static INPUTCFC ARKCFC={ReadARKFC,0,StrobeARKFC,UpdateARKFC,0,0};
76 INPUTCFC *FCEU_InitArkanoidFC(void)
83 static uint8 FP_FASTAPASS(1) ReadARK(int w)
87 if(NESArk[w].readbit>=8)
91 ret|=((NESArk[w].mzx>>(7-NESArk[w].readbit))&1)<<4;
95 ret|=(NESArk[w].mzb&1)<<3;
100 static void FP_FASTAPASS(1) StrobeARK(int w)
105 static void FP_FASTAPASS(3) UpdateARK(int w, void *data, int arg)
107 uint32 *ptr=(uint32*)data;
108 NESArk[w].mzx=FixX(ptr[0]);
109 NESArk[w].mzb=ptr[2]?1:0;
112 static INPUTC ARKC={ReadARK, 0, StrobeARK, UpdateARK, 0, 0};
114 INPUTC *FCEU_InitArkanoid(int w)