Splitwolf: 2-4 player co-op Wolfenstein 3D on RetroPie
-
shareware version works.
Note that the full version of splitwolf could be likely too working, but also the shareware:
here it is the md5 of the full:
~/games/WOLF3D $ md5sum *
a41af25a2f193e7d4afbcc4301b3d1ce AUDIOHED.WL6
2385b488b18f8721633e5b2bdf054853 AUDIOT.WL6
a4e73706e100dc0cadfb02d23de46481 GAMEMAPS.WL6
b8d2a78bc7c50da7ec9ab1d94f7975e1 MAPHEAD.WL6
dec8939cff5a4ec27ae7b43e8f52ec28 VGADICT.WL6
8b40b5b785f898e229bf1c2f2e3ee003 VGAGRAPH.WL6
8e75e3ffb842ed3d08abe6ffea97b231 VGAHEAD.WL6
b8ff4997461bafa5ef2a94c11f9de001 VSWAP.WL6
56f24e74ad4fe1836b0ac9047e59df78 WOLF3D.EXEibm-pc/wolfenstein-3d-v1.4-shareware
MD5 hash: 26dfc7e545439cdbe723154d870c5835 *WOLF3D/CATALOG.EXE
MD5 hash: 92a8bc5d67547281ace8b4abf7e5dc47 *WOLF3D/DEALERS.EXE
MD5 hash: 3ffe897960956fe85d76abe4c584501e *WOLF3D/SWCBBS.EXE
MD5 hash: 87b311d6383c5df2aad6f4963d13995c *WOLF3D/WOLF3D.EXEType: HDD
ID: 1e199a1c9fe50e48923a0e56c0e40bb2
Tracks: 16
Sides: 16
Sectors: 63
Total sectors: 16128
MD5: 61dc83a9d32997f321cc4ff00140d5b9Entry: N/A N/A 12 /
Entry: 19900101000000 58aa1b9892d5adfa725fab343d9446f8 1156 /AUDIOHED.WL1
Entry: 19900101000000 4b6109e957b584e4ad7f376961f3887e 132613 /AUDIOT.WL1
Entry: 19900101000000 30fecd7cce6bc70402651ec922d2da3d 27425 /GAMEMAPS.WL1
Entry: 19900101000000 7b6dd4e55c33c33a41d1600be5df3228 402 /MAPHEAD.WL1
Entry: 19900101000000 063d3bfda9c014b6395c1aa952ad2f8b 5714 /ORDER.FRM
Entry: 19900101000000 eccc7fc421f3d1f00e6eabd6848637f6 7641 /VENDOR.DOC
Entry: 19900101000000 76a6128f3c0dd9b77939ce8313992746 1024 /VGADICT.WL1
Entry: 19900101000000 74decb641b1a4faed173e10ab744bff0 326568 /VGAGRAPH.WL1
Entry: 19900101000000 61bf1616e78367853c91f2c04e2c1cb7 471 /VGAHEAD.WL1
Entry: 19900101000000 6efa079414b817c97db779cecfb081c9 742912 /VSWAP.WL1
Entry: 19900101000000 80ff45d34b91148cd92894b383f875f9 33161 /W3DHELP.EXE
Entry: 19900101000000 998945a6c0cedc2634b539a26b7f60a6 109959 /WOLF3D.EXEwhere to place wolf3d-full dir?
-
Wow nice, thanks for the inclusion!
-
Wow wow ! That's awesome! Gotta test it on my RPi2 ASAP.
BTW, I tested the Windows version today, and I couldn't map the right analog stick to look. Is the windows version updated, just like the Raspberry version?
-
@Solid-One Easy with the swearing, we're trying to keep this forum suitable for kids also.
-
@mitu Ops, sorry. Lemme edit that.
-
I've tested SplitWolf yesterday on my RPI2 and I confirm that it worked. However, I got some issues that I don't know for sure where to report them, so for now, lemme post them here.
The first one is about automatic game data detection. I copied Wolf3D and Spear of Destiny data files (both full versions) to "rom/ports/wolf3d" folder, and I've even renamed all files in order to make them lowercase. Spear of Destiny worked fine, but Wolf3D gave me the error below:
Wolf4SDL was not compiled for these data files: vgahead.wl6 contains a wrong number of offsets (162 instead of 150)! Please check whether you are using the right executable! (For mod developers: Perhaps you forgot to update NUMCHUNKS?)
After analysing how splitwolf works, I noticed there's various binaries for each game version: one for Wolf3D shareware, other for Wolf3D full, another for Spear of Destiny (both demo and full), etc. And you have to use the right binary according to your game version. In the case of the Retropie version, it tries to detect automatically which is your game version by looking into the md5sum of the "vswap.wl6" or "vswap.sod" files, and based on that, it chooses its respective binary file.
The problem relies exactly in the md5sum game version detection in the splitwolf.sh file, from RetroPie-Setup:
function launch_splitwolf() { local wad_file="\$1" declare -A game_checksums=( ['6efa079414b817c97db779cecfb081c9']="splitwolf-wolf3d" ['a6d901dfb455dfac96db5e4705837cdb']="splitwolf-wolf3d_apogee" ['b8ff4997461bafa5ef2a94c11f9de001']="splitwolf-wolf3d_full" ['b1dac0a8786c7cdbb09331a4eba00652']="splitwolf-sod" ['25d92ac0ba012a1e9335c747eb4ab177']="splitwolf-sodmp --mission 2" ['94aeef7980ef640c448087f92be16d83']="splitwolf-sodmp --mission 3" ['35afda760bea840b547d686a930322dc']="splitwolf-spear_demo" ) ... }
Inside the "launch_splitwolf" function, I noticed that the checksums for "splitwolf-wolf3d_apogee" and "splitwolf-wolf3d_full" are swapped, and that was making splitwolf uses the binary for "apogee" version, instead of "full" version. After making the change below, it worked:
['b8ff4997461bafa5ef2a94c11f9de001']="splitwolf-wolf3d_apogee" ['a6d901dfb455dfac96db5e4705837cdb']="splitwolf-wolf3d_full"
Just for confirmation: the md5sum of my "vswap.wl6" is exactly "a6d901dfb455dfac96db5e4705837cdb". And I don't remember seeing any Apogee mentions on the Wolf3D version I have here.
The second one is about controller mappings. I used this adapter, with two PS2 controllers plugged:
When I opened the game the first time, I noticed that the right analog was wrongly mapped: when I press up, the player looks left, and when I press down, the player looks right.
I noticed that SplitWolf now uses SDL_GameControllerDB, in order to automatically detect and map buttons for a lot of different controllers. I followed the instructions mentioned in "Help, my controller is still not mapped properly" section, downloaded libsdl, compiled "controllermap" and run the following commands:
hg clone http://hg.libsdl.org/SDL cd SDL/tests gcc controllermap.c -lSDL2 -I/usr/include/SDL2 -o controllermap ./controllermap 0
After pressing the buttons on my controller, I got a line similar as the one below:
03000000100800000100000010010000,Twin USB Joystick,a:b22,b:b21,back:b28,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b26,leftstick:b30,lefttrigger:b24,leftx:a0,lefty:a1,rightshoulder:b27,rightstick:b31,righttrigger:b25,rightx:a3,righty:a2,start:b29,x:b23,y:b20,platform:Linux,
However, there's already a very similar line in "gamecontrollerdb.txt" file, in the Linux section, line 573:
03000000100800000100000010010000,Twin USB PS2 Adapter,a:b2,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,leftshoulder:b6,leftstick:b10,lefttrigger:b4,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b11,righttrigger:b5,rightx:a3,righty:a2,start:b9,x:b3,y:b0,platform:Linux,
Assuming the line already exists, then it should work. And after a lot of tests and analysis, I got it to work by adding the line below, in "launch_splitwolf" function:
function launch_splitwolf() { local wad_file="\$1" declare -A game_checksums=( ['6efa079414b817c97db779cecfb081c9']="splitwolf-wolf3d" ['a6d901dfb455dfac96db5e4705837cdb']="splitwolf-wolf3d_apogee" ['b8ff4997461bafa5ef2a94c11f9de001']="splitwolf-wolf3d_full" ['b1dac0a8786c7cdbb09331a4eba00652']="splitwolf-sod" ['25d92ac0ba012a1e9335c747eb4ab177']="splitwolf-sodmp --mission 2" ['94aeef7980ef640c448087f92be16d83']="splitwolf-sodmp --mission 3" ['35afda760bea840b547d686a930322dc']="splitwolf-spear_demo" ) if [[ "\${game_checksums[\$(get_md5sum \$wad_file)]}" ]] 2>/dev/null; then export SDL_GAMECONTROLLERCONFIG="$(cat $md_inst/bin/gamecontrollerdb.txt)" #This is the line I've added $md_inst/bin/\${game_checksums[\$(get_md5sum \$wad_file)]} --splitdatadir $md_inst/bin/lwmp/ --split 2 --splitlayout 2x1 else echo "Error: \$wad_file (md5: \$(get_md5sum \$wad_file)) is not a supported version" fi }
The reason why I think this worked: Splitwolf wasn't using "gamecontrollerdb.txt" file, and instead, was using default control mappings, probably identical mappings from Xbox360 controllers (I confirmed it by removing "gamecontrollerdb.txt" file, then running SplitWolf, and the results was the same as before). In order to make Splitwolf use the controller mappings from that file, you have to put its contents inside a environment variable called SDL_GAMECONTROLLERCONFIG. And that's exactly what the line above does.
For now, that's it. Can you guys tell me where's the right place to post the issues above? In your bitbucket repo? Or in RetroPie-Setup github repo?
-
@Solid-One Thanks for putting in the work to troubleshoot your issue!
As far as the MD5s, you can verify the MD5s on the RetroPie wiki here, which are used for both wolf4sdl and splitwolf. It does seem you have the GT/ID/Activision/Bethesda (Steam/GOG.com) version of the game files, so it's very confusing as to why you had to swap the binaries out... I would urge you to try again with clean game files, perhaps something got mixed up.
As far as your controller mappings issue, I could definitely see something like that happening; that was one of the last things I put together, and it's possible I screwed something up between when I implemented it and the release. The environment variable fix you've proposed is quite a bit simpler than reading the file in directly, which is what I did here.
If your fix works, I think you'd need a pull request against the splitwolf repo to remove the reading in of the file (optional, as it does not seem to error when the file isn't present, which explains why it may be silently failing right now), as well as a pull request against RetroPie-Setup repo to add that line to the start script.
That said, I think it would make more sense to put
gamecontrollerdb.txt
within the~/RetroPie/roms/ports/wolf3d/
folder and read it in from there, but that will require modifying the install script to copy the file to that location since it currently comes from the Splitwolf build.In the mean time, I'm glad you're enjoying Splitwolf, and thanks for coming back with detailed troubleshooting information when you ran into problems! And yes, you're right, only the RetroPie version got the benefit of the SDL2 port and GameController work. Maybe @linuxwolf will update the Windows builds at some point, but I think RetroPie is the right audience for the project, so maybe not!
-
@lazd Yes, there's the probability that any of my Wolf3D files got mixed up. I'll check this out later, so forget it for now.
About the controller mappings, although my workaround of tweating the environment variable worked, I don't think it's a better approach than reading the file directly from Splitwolf's source code. Instead, it'd be interesting to implement a routine that, when unable to read / parse gamecontrollerdb.txt, then show the errors in the screen (or any kind of log), instead of silently failing. However, putting
gamecontrollerdb.txt
in the~/RetroPie/roms/ports/wolf3d/
is a interesting idea, since it'll become easier to add new lines if necessary, and it won't be lost on future updates.Anyway, I'll post those suggestions above in splitwolf repo as soon as possible. And since I'm gonna post issues there, I'll post some suggestions for the project that I got yesterday when I was playing SplitWolf on my RPi2 at home.
-
Hi there! I know Im bumping an old post but I need some help.
Im getting errors when running the configure script and im not sure if thats why I cant see the full wolf3d (gog version). I tried renaming the files toilower case and that didnt work either, the game still boots into the shareware version.
Thanks in advance!
-
@f33dbacknz The error printed during installation can be fixed by installing the
rename
package (viasudo apt install rename
). Try installing it the package and then re-run the installation for splitwolf. -
@mitu said in Splitwolf: 2-4 player co-op Wolfenstein 3D on RetroPie:
@f33dbacknz The error printed during installation can be fixed by installing the
rename
package (viasudo apt install rename
). Try installing it the package and then re-run the installation for splitwolf.It should be added as a dependency of splitwolf then.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.