diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bb37f0f6..1a98697e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -352,6 +352,7 @@ set(SRC_CORE
${CMAKE_CURRENT_SOURCE_DIR}/input/suborkb.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/toprider.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/virtualboy.cpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/input/lcdcompzapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/zapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/backward.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/ConvertUTF.c
diff --git a/src/drivers/win/input.cpp b/src/drivers/win/input.cpp
index e56fe8cb..2b61cc98 100644
--- a/src/drivers/win/input.cpp
+++ b/src/drivers/win/input.cpp
@@ -438,11 +438,11 @@ static uint32 UpdateVirtualBoyData(int w)
return r;
}
-// Holds the button configurations for the "Real" Zapper.
+// Holds the button configurations for the LCD Compatible Zapper.
// Two collections of two buttons.
// One for each controller port.
// The defaults shouldn't matter since this is intended to be configured by the user to match their custom hardware.
-ButtConfig realzappersc[2][2] = {
+ButtConfig lcdcompzappersc[2][2] = {
{
MK(A), MK(B)
},
@@ -452,18 +452,18 @@ ButtConfig realzappersc[2][2] = {
};
// buffer to hold the state of the zapper.
-static uint32 realzapperbuf[2];
+static uint32 lcdcompzapperbuf[2];
// Determines if the zapper trigger is pressed and/or if it's sensing light based on the button config and return
// the result as a two bit value.
-static uint32 UpdateRealZapperData(int w)
+static uint32 UpdateLCDCompatibleZapperData(int w)
{
uint32 r = 0;
- ButtConfig* realzappertsc = realzappersc[w];
+ ButtConfig* lcdcompzappertsc = lcdcompzappersc[w];
int x;
for (x = 0; x < 2; x++)
- if (DTestButton(&realzappertsc[x])) r |= 1 << x;
+ if (DTestButton(&lcdcompzappertsc[x])) r |= 1 << x;
return r;
}
@@ -517,8 +517,8 @@ void FCEUD_UpdateInput()
case SI_VIRTUALBOY:
virtualboybuf[x]=UpdateVirtualBoyData(x);
break;
- case SI_REAL_ZAPPER:
- realzapperbuf[x] = UpdateRealZapperData(x);
+ case SI_LCDCOMP_ZAPPER:
+ lcdcompzapperbuf[x] = UpdateLCDCompatibleZapperData(x);
break;
}
@@ -616,8 +616,8 @@ void InitInputPorts(bool fourscore)
case SI_VIRTUALBOY:
InputDPtr=&virtualboybuf[i];
break;
- case SI_REAL_ZAPPER:
- InputDPtr = &realzapperbuf[i];
+ case SI_LCDCOMP_ZAPPER:
+ InputDPtr = &lcdcompzapperbuf[i];
break;
}
FCEUI_SetInput(i,(ESI)InputType[i],InputDPtr,attrib);
@@ -870,7 +870,7 @@ CFGSTRUCT InputConfig[]={
AC(fkbmap),
AC(suborkbmap),
AC(virtualboysc),
- AC(realzappersc),
+ AC(lcdcompzappersc),
ENDCFGSTRUCT
};
@@ -909,7 +909,7 @@ void InitInputStuff(void)
for (x = 0; x < 2; x++)
for (y = 0; y < 2; y++)
- JoyClearBC(&realzappersc[x][y]);
+ JoyClearBC(&lcdcompzappersc[x][y]);
}
static char *MakeButtString(ButtConfig *bc)
@@ -1579,8 +1579,8 @@ INT_PTR CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
case SI_VIRTUALBOY:
DoTBConfig(hwndDlg, text, "VIRTUALBOYDIALOG", virtualboysc[which], 14);
break;
- case SI_REAL_ZAPPER:
- DoTBConfig(hwndDlg, text, "REALZAPPERDIALOG", realzappersc[which], 2);
+ case SI_LCDCOMP_ZAPPER:
+ DoTBConfig(hwndDlg, text, "LCDCOMPZAPPERDIALOG", lcdcompzappersc[which], 2);
break;
}
}
diff --git a/src/drivers/win/res.aps b/src/drivers/win/res.aps
new file mode 100644
index 00000000..9d042afd
Binary files /dev/null and b/src/drivers/win/res.aps differ
diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc
index 593057a3..7d15cc47 100644
--- a/src/drivers/win/res.rc
+++ b/src/drivers/win/res.rc
@@ -1102,7 +1102,7 @@ BEGIN
PUSHBUTTON "A", 313,162,19,32,12
END
-REALZAPPERDIALOG DIALOGEX 4, 109, 129, 116
+LCDCOMPZAPPERDIALOG DIALOGEX 4, 109, 129, 116
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Zapper Configuration"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
@@ -2484,7 +2484,7 @@ BEGIN
BEGIN
END
- "REALZAPPERDIALOG", DIALOG
+ "LCDCOMPZAPPERDIALOG", DIALOG
BEGIN
END
diff --git a/src/git.h b/src/git.h
index e7ed6d90..28ab8127 100644
--- a/src/git.h
+++ b/src/git.h
@@ -39,9 +39,9 @@ enum ESI
SI_SNES = 7,
SI_SNES_MOUSE = 8,
SI_VIRTUALBOY = 9,
- SI_REAL_ZAPPER = 10,
+ SI_LCDCOMP_ZAPPER = 10,
- SI_COUNT = SI_REAL_ZAPPER
+ SI_COUNT = SI_LCDCOMP_ZAPPER
};
inline const char* ESI_Name(ESI esi)
@@ -58,7 +58,7 @@ inline const char* ESI_Name(ESI esi)
"SNES Pad",
"SNES Mouse",
"Virtual Boy",
- "Real Zapper"
+ "LCD Zapper (Advance)"
};
if(esi >= SI_NONE && esi <= SI_COUNT)
diff --git a/src/input.cpp b/src/input.cpp
index 7906897c..00986885 100644
--- a/src/input.cpp
+++ b/src/input.cpp
@@ -65,7 +65,7 @@ extern INPUTC *FCEU_InitArkanoid(int w);
extern INPUTC *FCEU_InitMouse(int w);
extern INPUTC *FCEU_InitSNESMouse(int w);
extern INPUTC *FCEU_InitVirtualBoy(int w);
-extern INPUTC *FCEU_InitRealZapper(int w);
+extern INPUTC *FCEU_InitLCDCompZapper(int w);
extern INPUTCFC *FCEU_InitArkanoidFC(void);
extern INPUTCFC *FCEU_InitSpaceShadow(void);
@@ -484,8 +484,8 @@ static void SetInputStuff(int port)
case SI_VIRTUALBOY:
joyports[port].driver=FCEU_InitVirtualBoy(port);
break;
- case SI_REAL_ZAPPER:
- joyports[port].driver = FCEU_InitRealZapper(port);
+ case SI_LCDCOMP_ZAPPER:
+ joyports[port].driver = FCEU_InitLCDCompZapper(port);
break;
case SI_NONE:
case SI_UNSET:
diff --git a/src/input/realzapper.cpp b/src/input/lcdcompzapper.cpp
similarity index 66%
rename from src/input/realzapper.cpp
rename to src/input/lcdcompzapper.cpp
index 93d80594..64be1b39 100644
--- a/src/input/realzapper.cpp
+++ b/src/input/lcdcompzapper.cpp
@@ -17,32 +17,32 @@
#include "share.h"
-static uint32 realZapperStrobe[2];
-static uint32 realZapperData[2];
+static uint32 lcdCompZapperStrobe[2];
+static uint32 lcdCompZapperData[2];
-static uint8 ReadRealZapper(int w)
+static uint8 ReadLCDCompZapper(int w)
{
- return realZapperData[w];
+ return lcdCompZapperData[w];
}
-static void StrobeRealZapper(int w)
+static void StrobeLCDCompZapper(int w)
{
- realZapperStrobe[w] = 0;
+ lcdCompZapperStrobe[w] = 0;
}
-void UpdateRealZapper(int w, void* data, int arg)
+void UpdateLCDCompZapper(int w, void* data, int arg)
{
// In the '(*(uint32*)data)' variable, bit 0 holds the trigger value and bit 1 holds the light sense value.
// Ultimately this needs to be converted from 0000 00lt to 000t l000 where l is the light bit and t
// is the trigger bit.
- realZapperData[w] = ((((*(uint32*)data) & 1) << 4) |
+ lcdCompZapperData[w] = ((((*(uint32*)data) & 1) << 4) |
(((*(uint32*)data) & 2) << 2));
}
-static INPUTC RealZapperCtrl = { ReadRealZapper,0,StrobeRealZapper,UpdateRealZapper,0,0 };
+static INPUTC LCDCompZapperCtrl = { ReadLCDCompZapper,0,StrobeLCDCompZapper,UpdateLCDCompZapper,0,0 };
-INPUTC* FCEU_InitRealZapper(int w)
+INPUTC* FCEU_InitLCDCompZapper(int w)
{
- realZapperStrobe[w] = realZapperData[w] = 0;
- return(&RealZapperCtrl);
+ lcdCompZapperStrobe[w] = lcdCompZapperData[w] = 0;
+ return(&LCDCompZapperCtrl);
}
diff --git a/vc/vc14_fceux.vcxproj b/vc/vc14_fceux.vcxproj
index 910c729e..f6ffe04d 100644
--- a/vc/vc14_fceux.vcxproj
+++ b/vc/vc14_fceux.vcxproj
@@ -710,7 +710,7 @@
-
+
diff --git a/vc/vc14_fceux.vcxproj.filters b/vc/vc14_fceux.vcxproj.filters
index eb74f269..913c212a 100644
--- a/vc/vc14_fceux.vcxproj.filters
+++ b/vc/vc14_fceux.vcxproj.filters
@@ -1105,7 +1105,7 @@
input
-
+
input