@lazd said in Wolfenstein3d (Wolf4sdl) remapping?:
I got a little carried away (again), and with SDL2 and the GameController API, plus the publicly curated GameController_DB, I've implemented what I think is full game controller support for Wolf, including the ability to remap all controls within Wolf's UI:
Gamepad Remapping UI
As well as the ability to adjust turn speed:
Gamepad turn speed
I also implemented a workaround for RetroPie's nasty xmod patch that forces triggers_as_buttons and confuses SDL's mapping for XBox controllers (this doesn't fix other controllers with analog triggers, you'll have to edit /etc/modprobe.d/xpad.conf and set triggers_to_buttons=0 for those).
You can try it by doing the following:
cd /home/pi/RetroPie-Setup/
sudo apt-get install libsdl2-dev libsdl2-mixer-dev
sudo ./retropie_packages.sh wolf4sdl depends
sudo ./retropie_packages.sh wolf4sdl sources
sudo chown -R pi:pi /home/pi/RetroPie-Setup/tmp/build/wolf4sdl/
cd ~/RetroPie-Setup/tmp/build/wolf4sdl/
git remote add lazd "https://github.com/lazd/wolf4sdl.git"
git fetch lazd
git checkout sdl2remap
git submodule init
git submodule update
cd ~/RetroPie-Setup/
sudo ./retropie_packages.sh wolf4sdl get_opts
sudo ./retropie_packages.sh wolf4sdl get_bins
sudo ./retropie_packages.sh wolf4sdl build
sudo ./retropie_packages.sh wolf4sdl install
sudo ./retropie_packages.sh wolf4sdl configure
rm ~/.wolf4sdl/config.wl*
Tested and working on RetroPie 4.4 with an XBox One controller, Logitech Dual Action, and 8BitDo N30 Pro, as well as macOS with an XBox One controller and keyboard/mouse controls (just to make sure they still work!).
Please let me know if this works for your gamepad of choice, and report back any issues!
Source code is available here: https://github.com/lazd/wolf4sdl/tree/sdl2remap
Thanks a lot for this, I was following the instructions today,
however at the build stage I'm getting the following error, any idea what it might be caused by?
I know it's about the missing directory.
pi@retropie:~/RetroPie-Setup $ sudo ./retropie_packages.sh wolf4sdl build
/home/pi/RetroPie-Setup/tmp/build/wolf4sdl /home/pi/RetroPie-Setup
= = = = = = = = = = = = = = = = = = = = =
Building 'wolf4sdl' : Wolf4SDL - port of Wolfenstein 3D / Spear of Destiny engine
= = = = = = = = = = = = = = = = = = = = =
===> CLEAN
===> DEP wl_text.cpp
===> DEP wl_state.cpp
===> DEP wl_play.cpp
===> DEP wl_parallax.cpp
===> DEP wl_menu.cpp
===> DEP wl_main.cpp
===> DEP wl_inter.cpp
===> DEP wl_game.cpp
===> DEP wl_floorceiling.cpp
===> DEP wl_draw.cpp
===> DEP wl_debug.cpp
===> DEP wl_cloudsky.cpp
===> DEP wl_atmos.cpp
===> DEP wl_agent.cpp
===> DEP wl_act2.cpp
===> DEP wl_act1.cpp
===> DEP signon.cpp
===> DEP id_vl.cpp
===> DEP id_vh.cpp
===> DEP id_us_1.cpp
===> DEP id_sd.cpp
===> DEP id_pm.cpp
===> DEP id_in.cpp
===> DEP id_ca.cpp
===> DEP mame/fmopl.cpp
===> CXX mame/fmopl.cpp
===> CXX id_ca.cpp
===> CXX id_in.cpp
===> CXX id_pm.cpp
===> CXX id_sd.cpp
===> CXX id_us_1.cpp
===> CXX id_vh.cpp
===> CXX id_vl.cpp
id_sd.cpp: In function ‘void SD_PrepareSound(int)’:
id_sd.cpp:632:88: warning: narrowing conversion of ‘param_samplerate’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
^
id_sd.cpp:632:79: warning: narrowing conversion of ‘(param_samplerate * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
~~~~~~~~~~~~~~~~^~
id_sd.cpp:633:57: warning: narrowing conversion of ‘(destsamples * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
wavechunk dhead = {{'d', 'a', 't', 'a'}, destsamples*2};
~~~~~~~~~~~^~
===> CXX signon.cpp
===> CXX wl_act1.cpp
===> CXX wl_act2.cpp
===> CXX wl_agent.cpp
===> CXX wl_atmos.cpp
===> CXX wl_cloudsky.cpp
===> CXX wl_debug.cpp
===> CXX wl_draw.cpp
===> CXX wl_floorceiling.cpp
===> CXX wl_game.cpp
===> CXX wl_inter.cpp
===> CXX wl_main.cpp
===> CXX wl_menu.cpp
===> CXX wl_parallax.cpp
===> CXX wl_play.cpp
===> CXX wl_state.cpp
===> CXX wl_text.cpp
===> LD wolf3d
mv: cannot stat 'wolf4sdl': No such file or directory
===> CLEAN
===> DEP wl_text.cpp
===> DEP wl_state.cpp
===> DEP wl_play.cpp
===> DEP wl_parallax.cpp
===> DEP wl_menu.cpp
===> DEP wl_main.cpp
===> DEP wl_inter.cpp
===> DEP wl_game.cpp
===> DEP wl_floorceiling.cpp
===> DEP wl_draw.cpp
===> DEP wl_debug.cpp
===> DEP wl_cloudsky.cpp
===> DEP wl_atmos.cpp
===> DEP wl_agent.cpp
===> DEP wl_act2.cpp
===> DEP wl_act1.cpp
===> DEP signon.cpp
===> DEP id_vl.cpp
===> DEP id_vh.cpp
===> DEP id_us_1.cpp
===> DEP id_sd.cpp
===> DEP id_pm.cpp
===> DEP id_in.cpp
===> DEP id_ca.cpp
===> DEP mame/fmopl.cpp
===> CXX mame/fmopl.cpp
===> CXX id_ca.cpp
===> CXX id_in.cpp
===> CXX id_pm.cpp
===> CXX id_sd.cpp
===> CXX id_us_1.cpp
===> CXX id_vh.cpp
===> CXX id_vl.cpp
id_sd.cpp: In function ‘void SD_PrepareSound(int)’:
id_sd.cpp:632:88: warning: narrowing conversion of ‘param_samplerate’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
^
id_sd.cpp:632:79: warning: narrowing conversion of ‘(param_samplerate * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
~~~~~~~~~~~~~~~~^~
id_sd.cpp:633:57: warning: narrowing conversion of ‘(destsamples * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
wavechunk dhead = {{'d', 'a', 't', 'a'}, destsamples*2};
~~~~~~~~~~~^~
===> CXX signon.cpp
===> CXX wl_act1.cpp
===> CXX wl_act2.cpp
===> CXX wl_agent.cpp
===> CXX wl_atmos.cpp
===> CXX wl_cloudsky.cpp
===> CXX wl_debug.cpp
===> CXX wl_draw.cpp
===> CXX wl_floorceiling.cpp
===> CXX wl_game.cpp
===> CXX wl_inter.cpp
===> CXX wl_main.cpp
===> CXX wl_menu.cpp
===> CXX wl_parallax.cpp
===> CXX wl_play.cpp
===> CXX wl_state.cpp
===> CXX wl_text.cpp
===> LD wolf3d
mv: cannot stat 'wolf4sdl': No such file or directory
===> CLEAN
===> DEP wl_text.cpp
===> DEP wl_state.cpp
===> DEP wl_play.cpp
===> DEP wl_parallax.cpp
===> DEP wl_menu.cpp
===> DEP wl_main.cpp
===> DEP wl_inter.cpp
===> DEP wl_game.cpp
===> DEP wl_floorceiling.cpp
===> DEP wl_draw.cpp
===> DEP wl_debug.cpp
===> DEP wl_cloudsky.cpp
===> DEP wl_atmos.cpp
===> DEP wl_agent.cpp
===> DEP wl_act2.cpp
===> DEP wl_act1.cpp
===> DEP signon.cpp
===> DEP id_vl.cpp
===> DEP id_vh.cpp
===> DEP id_us_1.cpp
===> DEP id_sd.cpp
===> DEP id_pm.cpp
===> DEP id_in.cpp
===> DEP id_ca.cpp
===> DEP mame/fmopl.cpp
===> CXX mame/fmopl.cpp
===> CXX id_ca.cpp
===> CXX id_in.cpp
===> CXX id_pm.cpp
===> CXX id_sd.cpp
===> CXX id_us_1.cpp
===> CXX id_vh.cpp
===> CXX id_vl.cpp
id_sd.cpp: In function ‘void SD_PrepareSound(int)’:
id_sd.cpp:632:88: warning: narrowing conversion of ‘param_samplerate’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
^
id_sd.cpp:632:79: warning: narrowing conversion of ‘(param_samplerate * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
~~~~~~~~~~~~~~~~^~
id_sd.cpp:633:57: warning: narrowing conversion of ‘(destsamples * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
wavechunk dhead = {{'d', 'a', 't', 'a'}, destsamples*2};
~~~~~~~~~~~^~
===> CXX signon.cpp
===> CXX wl_act1.cpp
===> CXX wl_act2.cpp
===> CXX wl_agent.cpp
===> CXX wl_atmos.cpp
===> CXX wl_cloudsky.cpp
===> CXX wl_debug.cpp
===> CXX wl_draw.cpp
===> CXX wl_floorceiling.cpp
===> CXX wl_game.cpp
===> CXX wl_inter.cpp
===> CXX wl_main.cpp
===> CXX wl_menu.cpp
===> CXX wl_parallax.cpp
===> CXX wl_play.cpp
===> CXX wl_state.cpp
===> CXX wl_text.cpp
===> LD wolf3d
mv: cannot stat 'wolf4sdl': No such file or directory
===> CLEAN
===> DEP wl_text.cpp
===> DEP wl_state.cpp
===> DEP wl_play.cpp
===> DEP wl_parallax.cpp
===> DEP wl_menu.cpp
===> DEP wl_main.cpp
===> DEP wl_inter.cpp
===> DEP wl_game.cpp
===> DEP wl_floorceiling.cpp
===> DEP wl_draw.cpp
===> DEP wl_debug.cpp
===> DEP wl_cloudsky.cpp
===> DEP wl_atmos.cpp
===> DEP wl_agent.cpp
===> DEP wl_act2.cpp
===> DEP wl_act1.cpp
===> DEP signon.cpp
===> DEP id_vl.cpp
===> DEP id_vh.cpp
===> DEP id_us_1.cpp
===> DEP id_sd.cpp
===> DEP id_pm.cpp
===> DEP id_in.cpp
===> DEP id_ca.cpp
===> DEP mame/fmopl.cpp
===> CXX mame/fmopl.cpp
===> CXX id_ca.cpp
===> CXX id_in.cpp
===> CXX id_pm.cpp
===> CXX id_sd.cpp
===> CXX id_us_1.cpp
===> CXX id_vh.cpp
===> CXX id_vl.cpp
id_sd.cpp: In function ‘void SD_PrepareSound(int)’:
id_sd.cpp:632:88: warning: narrowing conversion of ‘param_samplerate’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
^
id_sd.cpp:632:79: warning: narrowing conversion of ‘(param_samplerate * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
~~~~~~~~~~~~~~~~^~
id_sd.cpp:633:57: warning: narrowing conversion of ‘(destsamples * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
wavechunk dhead = {{'d', 'a', 't', 'a'}, destsamples*2};
~~~~~~~~~~~^~
===> CXX signon.cpp
===> CXX wl_act1.cpp
===> CXX wl_act2.cpp
===> CXX wl_agent.cpp
===> CXX wl_atmos.cpp
===> CXX wl_cloudsky.cpp
===> CXX wl_debug.cpp
===> CXX wl_draw.cpp
===> CXX wl_floorceiling.cpp
===> CXX wl_game.cpp
===> CXX wl_inter.cpp
===> CXX wl_main.cpp
===> CXX wl_menu.cpp
===> CXX wl_parallax.cpp
===> CXX wl_play.cpp
===> CXX wl_state.cpp
===> CXX wl_text.cpp
===> LD wolf3d
mv: cannot stat 'wolf4sdl': No such file or directory
===> CLEAN
===> DEP wl_text.cpp
===> DEP wl_state.cpp
===> DEP wl_play.cpp
===> DEP wl_parallax.cpp
===> DEP wl_menu.cpp
===> DEP wl_main.cpp
===> DEP wl_inter.cpp
===> DEP wl_game.cpp
===> DEP wl_floorceiling.cpp
===> DEP wl_draw.cpp
===> DEP wl_debug.cpp
===> DEP wl_cloudsky.cpp
===> DEP wl_atmos.cpp
===> DEP wl_agent.cpp
===> DEP wl_act2.cpp
===> DEP wl_act1.cpp
===> DEP signon.cpp
===> DEP id_vl.cpp
===> DEP id_vh.cpp
===> DEP id_us_1.cpp
===> DEP id_sd.cpp
===> DEP id_pm.cpp
===> DEP id_in.cpp
===> DEP id_ca.cpp
===> DEP mame/fmopl.cpp
===> CXX mame/fmopl.cpp
===> CXX id_ca.cpp
===> CXX id_in.cpp
===> CXX id_pm.cpp
===> CXX id_sd.cpp
===> CXX id_us_1.cpp
===> CXX id_vh.cpp
===> CXX id_vl.cpp
id_sd.cpp: In function ‘void SD_PrepareSound(int)’:
id_sd.cpp:632:88: warning: narrowing conversion of ‘param_samplerate’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
^
id_sd.cpp:632:79: warning: narrowing conversion of ‘(param_samplerate * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
{'f','m','t',' '}, 0x10, 0x0001, 1, param_samplerate, param_samplerate*2, 2, 16};
~~~~~~~~~~~~~~~~^~
id_sd.cpp:633:57: warning: narrowing conversion of ‘(destsamples * 2)’ from ‘int’ to ‘longword’ {aka ‘unsigned int’} inside { } [-Wnarrowing]
wavechunk dhead = {{'d', 'a', 't', 'a'}, destsamples*2};
~~~~~~~~~~~^~
===> CXX signon.cpp
===> CXX wl_act1.cpp
===> CXX wl_act2.cpp
===> CXX wl_agent.cpp
===> CXX wl_atmos.cpp
===> CXX wl_cloudsky.cpp
===> CXX wl_debug.cpp
===> CXX wl_draw.cpp
===> CXX wl_floorceiling.cpp
===> CXX wl_game.cpp
===> CXX wl_inter.cpp
===> CXX wl_main.cpp
===> CXX wl_menu.cpp
===> CXX wl_parallax.cpp
===> CXX wl_play.cpp
===> CXX wl_state.cpp
===> CXX wl_text.cpp
===> LD wolf3d
mv: cannot stat 'wolf4sdl': No such file or directory
Could not successfully build wolf4sdl - Wolf4SDL - port of Wolfenstein 3D / Spear of Destiny engine (bin/wolf4sdl-sw-v14 not found).
/home/pi/RetroPie-Setup
Errors:
Could not successfully build wolf4sdl - Wolf4SDL - port of Wolfenstein 3D / Spear of Destiny engine (bin/wolf4sdl-sw-v14 not found).