/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
- * Copyright (C) 1998 BERO
+ * Copyright (C) 1998 BERO
* Copyright (C) 2002 Ben Parnell
*
* This program is free software; you can redistribute it and/or modify
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
+#include <string.h>
#include "types.h"
#include "x6502.h"
#include "svga.h"
#include "input.h"
+#include "movie.h"
extern INPUTC *FCEU_InitZapper(int w);
extern INPUTC *FCEU_InitPowerpad(int w);
extern INPUTCFC *FCEU_InitSpaceShadow(void);
extern INPUTCFC *FCEU_InitFKB(void);
static uint8 joy_readbit[2];
-static uint16 joy[2]={0,0};
+static uint16 joy[4]={0,0,0,0};
extern int coinon;
static uint8 FP_FASTAPASS(1) ReadGP(int w)
{
uint8 ret;
- //if(JoyMulti)
+ //if(JoyMulti)
//{
//ret = ((joy[w]>>(joy_readbit[w]))&1)|
//(((joy[w]>>(joy_readbit[w]+8))&1)<<1);
if(JPorts[A&1]->Read)
ret|=JPorts[A&1]->Read(A&1);
-
+
if(FCExp)
if(FCExp->Read)
ret=FCExp->Read(A&1,ret);
#ifdef NETWORK
if(netplay) NetplayUpdate(&joy[0],&joy[1]);
#endif
+ if (current < 0) FCEUMOV_AddJoy(joy);
FlushCommandQueue();
}
for(x=0;x<2;x++)
if(JPorts[x]->SLHook)
JPorts[x]->SLHook(x,buf,line);
- if(FCExp)
+ if(FCExp)
if(FCExp->SLHook)
FCExp->SLHook(buf,line);
}
// rewrite code to make this more sane?
void InitializeInput(void)
-{
+{
memset(joy_readbit,0,sizeof(joy_readbit));
memset(joy,0,sizeof(joy));