notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more 0.98.15-like timing, but sound glitches
[fceu.git]
/
input.c
diff --git
a/input.c
b/input.c
index
5bf8e96
..
a3a9979
100644
(file)
--- a/
input.c
+++ b/
input.c
@@
-1,7
+1,7
@@
/* FCE Ultra - NES/Famicom Emulator
*
* Copyright notice for this file:
/* 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
* Copyright (C) 2002 Ben Parnell
*
* This program is free software; you can redistribute it and/or modify
@@
-28,6
+28,9
@@
#include "svga.h"
#include "input.h"
#include "svga.h"
#include "input.h"
+#include "movie.h"
+
+#include "dprintf.h"
extern INPUTC *FCEU_InitZapper(int w);
extern INPUTC *FCEU_InitPowerpad(int w);
extern INPUTC *FCEU_InitZapper(int w);
extern INPUTC *FCEU_InitPowerpad(int w);
@@
-37,7
+40,7
@@
extern INPUTCFC *FCEU_InitArkanoidFC(void);
extern INPUTCFC *FCEU_InitSpaceShadow(void);
extern INPUTCFC *FCEU_InitFKB(void);
static uint8 joy_readbit[2];
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;
extern int coinon;
@@
-73,7
+76,7
@@
static uint8 FP_FASTAPASS(1) ReadGPVS(int w)
static uint8 FP_FASTAPASS(1) ReadGP(int w)
{
uint8 ret;
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);
//{
//ret = ((joy[w]>>(joy_readbit[w]))&1)|
//(((joy[w]>>(joy_readbit[w]+8))&1)<<1);
@@
-98,12
+101,13
@@
static DECLFR(JPRead)
if(JPorts[A&1]->Read)
ret|=JPorts[A&1]->Read(A&1);
if(JPorts[A&1]->Read)
ret|=JPorts[A&1]->Read(A&1);
-
+
if(FCExp)
if(FCExp->Read)
ret=FCExp->Read(A&1,ret);
ret|=X.DB&0xC0;
if(FCExp)
if(FCExp->Read)
ret=FCExp->Read(A&1,ret);
ret|=X.DB&0xC0;
+ dprintf("JPRead %02x", ret);
return(ret);
}
return(ret);
}
@@
-188,6
+192,7
@@
void UpdateInput(void)
#ifdef NETWORK
if(netplay) NetplayUpdate(&joy[0],&joy[1]);
#endif
#ifdef NETWORK
if(netplay) NetplayUpdate(&joy[0],&joy[1]);
#endif
+ if (current < 0) FCEUMOV_AddJoy(joy);
FlushCommandQueue();
}
FlushCommandQueue();
}
@@
-221,7
+226,7
@@
static void SLHLHook(uint8 *buf, int line)
for(x=0;x<2;x++)
if(JPorts[x]->SLHook)
JPorts[x]->SLHook(x,buf,line);
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);
}
if(FCExp->SLHook)
FCExp->SLHook(buf,line);
}
@@
-290,7
+295,7
@@
static void SetInputStuffFC(void)
// rewrite code to make this more sane?
void InitializeInput(void)
// rewrite code to make this more sane?
void InitializeInput(void)
-{
+{
memset(joy_readbit,0,sizeof(joy_readbit));
memset(joy,0,sizeof(joy));
memset(joy_readbit,0,sizeof(joy_readbit));
memset(joy,0,sizeof(joy));