notaz.gp2x.de
/
fceu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SIG_IGN->SIG_DFL, fixes usb storage mode
[fceu.git]
/
input.c
diff --git
a/input.c
b/input.c
index
1548e41
..
b625583
100644
(file)
--- a/
input.c
+++ b/
input.c
@@
-36,7
+36,7
@@
#include "dprintf.h"
extern INPUTC *FCEU_InitZapper(int w);
#include "dprintf.h"
extern INPUTC *FCEU_InitZapper(int w);
-extern INPUTC *FCEU_InitPowerpad(int w);
+extern INPUTC *FCEU_InitPowerpad
A
(int w);
extern INPUTC *FCEU_InitArkanoid(int w);
extern INPUTCFC *FCEU_InitArkanoidFC(void);
extern INPUTC *FCEU_InitArkanoid(int w);
extern INPUTCFC *FCEU_InitArkanoidFC(void);
@@
-46,8
+46,6
@@
static uint8 joy_readbit[2];
static uint8 joy[4]={0,0,0,0};
static uint8 LastStrobe;
static uint8 joy[4]={0,0,0,0};
static uint8 LastStrobe;
-extern int coinon;
-
static int FSDisable=0; /* Set to 1 if NES-style four-player adapter is disabled. */
static int JPAttrib[2]={0,0};
static int JPType[2]={0,0};
static int FSDisable=0; /* Set to 1 if NES-style four-player adapter is disabled. */
static int JPAttrib[2]={0,0};
static int JPType[2]={0,0};
@@
-57,7
+55,7
@@
static int JPAttribFC=0;
static int JPTypeFC=0;
static void *InputDataPtrFC;
static int JPTypeFC=0;
static void *InputDataPtrFC;
-void (*InputScanlineHook)(uint8 *b
uf, int line
);
+void (*InputScanlineHook)(uint8 *b
g, uint8 *spr, uint32 linets, int final
);
static INPUTC DummyJPort={0,0,0,0,0};
static INPUTC *JPorts[2]={&DummyJPort,&DummyJPort};
static INPUTC DummyJPort={0,0,0,0,0};
static INPUTC *JPorts[2]={&DummyJPort,&DummyJPort};
@@
-119,7
+117,7
@@
static DECLFR(JPRead)
ret=FCExp->Read(A&1,ret);
ret|=X.DB&0xC0;
ret=FCExp->Read(A&1,ret);
ret|=X.DB&0xC0;
- dprintf("JPRead %
02x"
, ret);
+ dprintf("JPRead %
i %02x", A&1
, ret);
return(ret);
}
return(ret);
}
@@
-205,6
+203,7
@@
void UpdateInput(void)
if(netplay) NetplayUpdate(&joy[0],&joy[1]);
#endif
if (current < 0) FCEUMOV_AddJoy(joy);
if(netplay) NetplayUpdate(&joy[0],&joy[1]);
#endif
if (current < 0) FCEUMOV_AddJoy(joy);
+ else framecount++; // for debug
//FlushCommandQueue();
}
//FlushCommandQueue();
}
@@
-231,16
+230,16
@@
static DECLFR(VSUNIRead1)
return ret;
}
return ret;
}
-static void SLHLHook(uint8 *b
uf, int line
)
+static void SLHLHook(uint8 *b
g, uint8 *spr, uint32 linets, int final
)
{
int x;
for(x=0;x<2;x++)
if(JPorts[x]->SLHook)
{
int x;
for(x=0;x<2;x++)
if(JPorts[x]->SLHook)
- JPorts[x]->SLHook(x,b
uf,line
);
+ JPorts[x]->SLHook(x,b
g,spr,linets,final
);
if(FCExp)
if(FCExp->SLHook)
if(FCExp)
if(FCExp->SLHook)
- FCExp->SLHook(b
uf,line
);
+ FCExp->SLHook(b
g,spr,linets,final
);
}
static void CheckSLHook(void)
}
static void CheckSLHook(void)
@@
-265,7
+264,7
@@
static void FASTAPASS(1) SetInputStuff(int x)
break;
case SI_ARKANOID:JPorts[x]=FCEU_InitArkanoid(x);break;
case SI_ZAPPER:JPorts[x]=FCEU_InitZapper(x);break;
break;
case SI_ARKANOID:JPorts[x]=FCEU_InitArkanoid(x);break;
case SI_ZAPPER:JPorts[x]=FCEU_InitZapper(x);break;
- case SI_POWERPADA:JPorts[x]=FCEU_InitPowerpad(x);break;
+ case SI_POWERPADA:JPorts[x]=FCEU_InitPowerpad
A
(x);break;
case SI_NONE:JPorts[x]=&DummyJPort;break;
}
case SI_NONE:JPorts[x]=&DummyJPort;break;
}
@@
-347,18
+346,9
@@
void FCEUI_SetInputFC(int type, void *ptr, int attrib)
SetInputStuffFC();
}
SetInputStuffFC();
}
-// quick paste
-#define FCEUNPCMD_RESET 0x01
-#define FCEUNPCMD_POWER 0x02
-
-#define FCEUNPCMD_VSUNICOIN 0x07
-#define FCEUNPCMD_VSUNIDIP0 0x08
-#define FCEUNPCMD_FDSINSERT 0x18
-#define FCEUNPCMD_FDSSELECT 0x1A
-
-
void FCEU_DoSimpleCommand(int cmd)
{
void FCEU_DoSimpleCommand(int cmd)
{
+ printf("FCEU_DoSimpleCommand: %i\n", cmd);
switch(cmd)
{
case FCEUNPCMD_FDSINSERT: FCEU_FDSInsert();break;
switch(cmd)
{
case FCEUNPCMD_FDSINSERT: FCEU_FDSInsert();break;