1 /* FCE Ultra - NES/Famicom Emulator
3 * Copyright notice for this file:
4 * Copyright (C) 2002 Ben Parnell
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;
58 static uint32 FixX(uint32 x)
66 static void FP_FASTAPASS(2) UpdateARKFC(void *data, int arg)
69 FCArk.mzx=FixX(ptr[0]);
73 static INPUTCFC ARKCFC={ReadARKFC,0,StrobeARKFC,UpdateARKFC,0,0};
75 INPUTCFC *FCEU_InitArkanoidFC(void)
82 static uint8 FP_FASTAPASS(1) ReadARK(int w)
86 if(NESArk[w].readbit>=8)
90 ret|=((NESArk[w].mzx>>(7-NESArk[w].readbit))&1)<<4;
93 ret|=(NESArk[w].mzb&1)<<3;
98 static void FP_FASTAPASS(1) StrobeARK(int w)
103 static void FP_FASTAPASS(3) UpdateARK(int w, void *data, int arg)
106 NESArk[w].mzx=FixX(ptr[0]);
107 NESArk[w].mzb=ptr[2]?1:0;
110 static INPUTC ARKC={ReadARK, 0, StrobeARK, UpdateARK, 0, 0};
112 INPUTC *FCEU_InitArkanoid(int w)