I hacked together a quick and dirty input display patch, taking advantage of FCEU_DispMessage. Use
-inputdisp x to tell fceu how many controllers' inputs you want to see, 0 is off (like normal). There won't be an option in the windows gui, because I couldn't have tested it if I had tried to put one in, but maybe the command line argument will work. I don't know for sure.
I don't know how to generate a good diff, but hopefully this will work well enough. When I tested it, running
patch -p0 < patchfile from the fceu-nitsuja-src directory worked ok after I made sure the carrieage returns were correct.
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/driver.h fceu-nitsuja-src/src/driver.h
--- orig.fceu-nitsuja-src/src/driver.h 2005-12-08 14:02:47.000000000 -0600
+++ fceu-nitsuja-src/src/driver.h 2005-12-08 18:14:50.000000000 -0600
@@ -126,6 +126,9 @@
/* Deallocates all allocated memory. Call after FCEUI_Emulate() returns. */
void FCEUI_Kill(void);
+/* Set number of controllers to display input of */
+void FCEUI_SetInputDisplay(int a);
+
/* Enable/Disable game genie. a=0 disable, a=1 enable */
void FCEUI_SetGameGenie(int a);
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/drivers/pc/main.c fceu-nitsuja-src/src/drivers/pc/main.c
--- orig.fceu-nitsuja-src/src/drivers/pc/main.c 2005-12-08 14:02:22.000000000 -0600
+++ fceu-nitsuja-src/src/drivers/pc/main.c 2005-12-08 18:13:15.000000000 -0600
@@ -44,6 +44,7 @@
static char *soundrecfn=0; /* File name of sound recording. */
static int ntsccol=0,ntschue=0,ntsctint=0;
+int inputdisp=0;
int soundvol=100;
long soundq=0;
int _sound=1;
@@ -111,6 +112,7 @@
extern CFGSTRUCT GUIConfig;
#endif
static CFGSTRUCT fceuconfig[]={
+ AC(inputdisp),
AC(soundrate),
AC(soundq),
AC(_sound),
@@ -224,6 +226,8 @@
{"-cpalette",0,&cpalette,0x4001},
{"-soundrecord",0,&soundrecfn,0x4001},
+ {"-inputdisp",0,&inputdisp,0},
+
{"-ntsccol",0,&ntsccol,0},
{"-pal",0,&eoptions,0x8000|EO_PAL},
@@ -258,6 +262,8 @@
FCEUI_DisableSpriteLimitation(eoptions&1);
FCEUI_SetSnapName(eoptions&EO_SNAPNAME);
+ FCEUI_SetInputDisplay(inputdisp);
+
for(x=0;x<2;x++)
{
if(srendlinev[x]<0 || srendlinev[x]>239) srendlinev[x]=0;
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/drivers/pc/main.h fceu-nitsuja-src/src/drivers/pc/main.h
--- orig.fceu-nitsuja-src/src/drivers/pc/main.h 2005-12-08 14:02:23.000000000 -0600
+++ fceu-nitsuja-src/src/drivers/pc/main.h 2005-12-08 17:27:57.000000000 -0600
@@ -41,6 +41,7 @@
extern int srendlinev[2],erendlinev[2];
extern int NoWaiting;
+extern int inputdisp;
extern int soundvol;
extern long soundq;
extern int _sound;
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/drivers/pc/usage.h fceu-nitsuja-src/src/drivers/pc/usage.h
--- orig.fceu-nitsuja-src/src/drivers/pc/usage.h 2005-12-08 14:02:24.000000000 -0600
+++ fceu-nitsuja-src/src/drivers/pc/usage.h 2005-12-08 17:27:10.000000000 -0600
@@ -41,6 +41,7 @@
-fcexp str Select Famicom expansion port device.\n\
str may be: none, shadow, arkanoid, 4player, fkb\n\
-inputcfg s Configure virtual input device \"s\".\n\
+-inputdisp x Display input from first x controllers.\n\
-nofs x Disables Four-Score emulation if x is 1.\n\
-gg x Enable Game Genie emulation if x is 1.\n\
-no8lim x Disables the 8 sprites per scanline limitation.\n\
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/fceu.c fceu-nitsuja-src/src/fceu.c
--- orig.fceu-nitsuja-src/src/fceu.c 2005-12-08 14:02:46.000000000 -0600
+++ fceu-nitsuja-src/src/fceu.c 2005-12-08 18:19:39.000000000 -0600
@@ -556,6 +556,11 @@
return(PAL);
}
+void FCEUI_SetInputDisplay(int a)
+{
+ FSettings.InputDisplay=a;
+}
+
void FCEUI_SetGameGenie(int a)
{
FSettings.GameGenie=a?1:0;
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/fceu.h fceu-nitsuja-src/src/fceu.h
--- orig.fceu-nitsuja-src/src/fceu.h 2005-12-08 14:02:47.000000000 -0600
+++ fceu-nitsuja-src/src/fceu.h 2005-12-08 16:39:46.000000000 -0600
@@ -71,6 +71,7 @@
uint32 SndRate;
int soundq;
int lowpass;
+ int InputDisplay;
} FCEUS;
extern FCEUS FSettings;
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/input.c fceu-nitsuja-src/src/input.c
--- orig.fceu-nitsuja-src/src/input.c 2005-12-08 14:02:46.000000000 -0600
+++ fceu-nitsuja-src/src/input.c 2005-12-08 16:56:50.000000000 -0600
@@ -169,6 +169,43 @@
static INPUTC GPC={ReadGP,0,StrobeGP,0,0,0};
static INPUTC GPCVS={ReadGPVS,0,StrobeGP,0,0,0};
+void FCEU_PrintInput()
+{
+ char inputs[37];
+ char buttons[] = "ABsS^v<>";
+ int x,n;
+ switch(FSettings.InputDisplay)
+ {
+ case 1:
+ strcpy(inputs," --------");
+ break;
+ case 2:
+ strcpy(inputs," -------- --------");
+ break;
+ case 3:
+ strcpy(inputs," -------- -------- --------");
+ break;
+ case 4:
+ strcpy(inputs," -------- -------- -------- --------");
+ break;
+ default:
+ FSettings.InputDisplay = 0;
+ return;
+ }
+
+ for (x=0;x<FSettings.InputDisplay;x++)
+ {
+ for (n=0;n<8;n++)
+ {
+ if (1 & (joy[x] >> n))
+ {
+ inputs[1+4*x+n] = buttons[n];
+ }
+ }
+ }
+ FCEU_DispMessage(inputs);
+}
+
void FCEU_DrawInput(uint8 *buf)
{
int x;
diff -NaHudr --strip-trailing-cr orig.fceu-nitsuja-src/src/video.c fceu-nitsuja-src/src/video.c
--- orig.fceu-nitsuja-src/src/video.c 2005-12-08 14:02:46.000000000 -0600
+++ fceu-nitsuja-src/src/video.c 2005-12-08 16:47:27.000000000 -0600
@@ -182,6 +182,8 @@
}
// if(!movieDrawInAVI)
DrawMessage();
+ if(FSettings.InputDisplay)
+ FCEU_PrintInput();
FCEU_DrawInput(XBuf);
}