Rename "Real Zapper" to "LCD Compatible Zapper"

Per feedback, "Real Zapper" was renamed to "LCD Compatible Zapper" to better reflect the purpose of this input device.
This commit is contained in:
Jason W. Thompson 2020-07-20 22:28:29 -05:00
parent ca472ee6ae
commit 79d3396d6e
9 changed files with 37 additions and 36 deletions

View File

@ -352,6 +352,7 @@ set(SRC_CORE
${CMAKE_CURRENT_SOURCE_DIR}/input/suborkb.cpp ${CMAKE_CURRENT_SOURCE_DIR}/input/suborkb.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/toprider.cpp ${CMAKE_CURRENT_SOURCE_DIR}/input/toprider.cpp
${CMAKE_CURRENT_SOURCE_DIR}/input/virtualboy.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}/input/zapper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/backward.cpp ${CMAKE_CURRENT_SOURCE_DIR}/utils/backward.cpp
${CMAKE_CURRENT_SOURCE_DIR}/utils/ConvertUTF.c ${CMAKE_CURRENT_SOURCE_DIR}/utils/ConvertUTF.c

View File

@ -438,11 +438,11 @@ static uint32 UpdateVirtualBoyData(int w)
return r; return r;
} }
// Holds the button configurations for the "Real" Zapper. // Holds the button configurations for the LCD Compatible Zapper.
// Two collections of two buttons. // Two collections of two buttons.
// One for each controller port. // 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. // 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) MK(A), MK(B)
}, },
@ -452,18 +452,18 @@ ButtConfig realzappersc[2][2] = {
}; };
// buffer to hold the state of the zapper. // 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 // 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. // the result as a two bit value.
static uint32 UpdateRealZapperData(int w) static uint32 UpdateLCDCompatibleZapperData(int w)
{ {
uint32 r = 0; uint32 r = 0;
ButtConfig* realzappertsc = realzappersc[w]; ButtConfig* lcdcompzappertsc = lcdcompzappersc[w];
int x; int x;
for (x = 0; x < 2; x++) for (x = 0; x < 2; x++)
if (DTestButton(&realzappertsc[x])) r |= 1 << x; if (DTestButton(&lcdcompzappertsc[x])) r |= 1 << x;
return r; return r;
} }
@ -517,8 +517,8 @@ void FCEUD_UpdateInput()
case SI_VIRTUALBOY: case SI_VIRTUALBOY:
virtualboybuf[x]=UpdateVirtualBoyData(x); virtualboybuf[x]=UpdateVirtualBoyData(x);
break; break;
case SI_REAL_ZAPPER: case SI_LCDCOMP_ZAPPER:
realzapperbuf[x] = UpdateRealZapperData(x); lcdcompzapperbuf[x] = UpdateLCDCompatibleZapperData(x);
break; break;
} }
@ -616,8 +616,8 @@ void InitInputPorts(bool fourscore)
case SI_VIRTUALBOY: case SI_VIRTUALBOY:
InputDPtr=&virtualboybuf[i]; InputDPtr=&virtualboybuf[i];
break; break;
case SI_REAL_ZAPPER: case SI_LCDCOMP_ZAPPER:
InputDPtr = &realzapperbuf[i]; InputDPtr = &lcdcompzapperbuf[i];
break; break;
} }
FCEUI_SetInput(i,(ESI)InputType[i],InputDPtr,attrib); FCEUI_SetInput(i,(ESI)InputType[i],InputDPtr,attrib);
@ -870,7 +870,7 @@ CFGSTRUCT InputConfig[]={
AC(fkbmap), AC(fkbmap),
AC(suborkbmap), AC(suborkbmap),
AC(virtualboysc), AC(virtualboysc),
AC(realzappersc), AC(lcdcompzappersc),
ENDCFGSTRUCT ENDCFGSTRUCT
}; };
@ -909,7 +909,7 @@ void InitInputStuff(void)
for (x = 0; x < 2; x++) for (x = 0; x < 2; x++)
for (y = 0; y < 2; y++) for (y = 0; y < 2; y++)
JoyClearBC(&realzappersc[x][y]); JoyClearBC(&lcdcompzappersc[x][y]);
} }
static char *MakeButtString(ButtConfig *bc) static char *MakeButtString(ButtConfig *bc)
@ -1579,8 +1579,8 @@ INT_PTR CALLBACK InputConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
case SI_VIRTUALBOY: case SI_VIRTUALBOY:
DoTBConfig(hwndDlg, text, "VIRTUALBOYDIALOG", virtualboysc[which], 14); DoTBConfig(hwndDlg, text, "VIRTUALBOYDIALOG", virtualboysc[which], 14);
break; break;
case SI_REAL_ZAPPER: case SI_LCDCOMP_ZAPPER:
DoTBConfig(hwndDlg, text, "REALZAPPERDIALOG", realzappersc[which], 2); DoTBConfig(hwndDlg, text, "LCDCOMPZAPPERDIALOG", lcdcompzappersc[which], 2);
break; break;
} }
} }

BIN
src/drivers/win/res.aps Normal file

Binary file not shown.

View File

@ -1102,7 +1102,7 @@ BEGIN
PUSHBUTTON "A", 313,162,19,32,12 PUSHBUTTON "A", 313,162,19,32,12
END 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 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Zapper Configuration" CAPTION "Zapper Configuration"
FONT 8, "MS Shell Dlg", 0, 0, 0x0 FONT 8, "MS Shell Dlg", 0, 0, 0x0
@ -2484,7 +2484,7 @@ BEGIN
BEGIN BEGIN
END END
"REALZAPPERDIALOG", DIALOG "LCDCOMPZAPPERDIALOG", DIALOG
BEGIN BEGIN
END END

View File

@ -39,9 +39,9 @@ enum ESI
SI_SNES = 7, SI_SNES = 7,
SI_SNES_MOUSE = 8, SI_SNES_MOUSE = 8,
SI_VIRTUALBOY = 9, 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) inline const char* ESI_Name(ESI esi)
@ -58,7 +58,7 @@ inline const char* ESI_Name(ESI esi)
"SNES Pad", "SNES Pad",
"SNES Mouse", "SNES Mouse",
"Virtual Boy", "Virtual Boy",
"Real Zapper" "LCD Zapper (Advance)"
}; };
if(esi >= SI_NONE && esi <= SI_COUNT) if(esi >= SI_NONE && esi <= SI_COUNT)

View File

@ -65,7 +65,7 @@ extern INPUTC *FCEU_InitArkanoid(int w);
extern INPUTC *FCEU_InitMouse(int w); extern INPUTC *FCEU_InitMouse(int w);
extern INPUTC *FCEU_InitSNESMouse(int w); extern INPUTC *FCEU_InitSNESMouse(int w);
extern INPUTC *FCEU_InitVirtualBoy(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_InitArkanoidFC(void);
extern INPUTCFC *FCEU_InitSpaceShadow(void); extern INPUTCFC *FCEU_InitSpaceShadow(void);
@ -484,8 +484,8 @@ static void SetInputStuff(int port)
case SI_VIRTUALBOY: case SI_VIRTUALBOY:
joyports[port].driver=FCEU_InitVirtualBoy(port); joyports[port].driver=FCEU_InitVirtualBoy(port);
break; break;
case SI_REAL_ZAPPER: case SI_LCDCOMP_ZAPPER:
joyports[port].driver = FCEU_InitRealZapper(port); joyports[port].driver = FCEU_InitLCDCompZapper(port);
break; break;
case SI_NONE: case SI_NONE:
case SI_UNSET: case SI_UNSET:

View File

@ -17,32 +17,32 @@
#include "share.h" #include "share.h"
static uint32 realZapperStrobe[2]; static uint32 lcdCompZapperStrobe[2];
static uint32 realZapperData[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. // 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 // Ultimately this needs to be converted from 0000 00lt to 000t l000 where l is the light bit and t
// is the trigger bit. // is the trigger bit.
realZapperData[w] = ((((*(uint32*)data) & 1) << 4) | lcdCompZapperData[w] = ((((*(uint32*)data) & 1) << 4) |
(((*(uint32*)data) & 2) << 2)); (((*(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; lcdCompZapperStrobe[w] = lcdCompZapperData[w] = 0;
return(&RealZapperCtrl); return(&LCDCompZapperCtrl);
} }

View File

@ -710,7 +710,7 @@
<ClCompile Include="..\src\input\toprider.cpp" /> <ClCompile Include="..\src\input\toprider.cpp" />
<ClCompile Include="..\src\input\virtualboy.cpp" /> <ClCompile Include="..\src\input\virtualboy.cpp" />
<ClCompile Include="..\src\input\zapper.cpp" /> <ClCompile Include="..\src\input\zapper.cpp" />
<ClCompile Include="..\src\input\realzapper.cpp" /> <ClCompile Include="..\src\input\lcdcompzapper.cpp" />
<ClCompile Include="..\src\boards\emu2413.c" /> <ClCompile Include="..\src\boards\emu2413.c" />
<ClCompile Include="..\src\utils\ConvertUTF.c" /> <ClCompile Include="..\src\utils\ConvertUTF.c" />
<ClCompile Include="..\src\utils\crc32.cpp" /> <ClCompile Include="..\src\utils\crc32.cpp" />

View File

@ -1105,7 +1105,7 @@
<ClCompile Include="..\src\input\virtualboy.cpp"> <ClCompile Include="..\src\input\virtualboy.cpp">
<Filter>input</Filter> <Filter>input</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\src\input\realzapper.cpp"> <ClCompile Include="..\src\input\lcdcompzapper.cpp">
<Filter>input</Filter> <Filter>input</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>