ECWolf - Wolfenstein 3D source port for mods
-
@cyperghost According to helpers.sh file, the function applyPatch is used for applying patches against upstream code and will apply a patch if it has not already been applied to the current folder.
This sounds like it could actually work, so meaning.
applyPatch -f -p1 ecwolf_keyboardpatch.diff
Let me try it out and get back to you.
-
-
@cyperghost I see. I am trying again.
Until now at this point it did apply the patch with the applyPatch so far so good.
Edit: Just tested it in game. It works. I can see the escape game key function in options.
-
@tpo1990 There should be now a (empty) file named
ecwolf_keyboardpatch.diff.applied
be inside the build folder.
(So the helpers function says)
You know$HOME/RetroPie-Setup/tmp/build/ecwolf/ecwolf
(??)Edit: Just tested it in game. It works. I can see the escape game key function in options.
Perfect! But if you see the messsage of a patched file you can break the process. It will work as usual. But consider this is testing ;)
-
@cyperghost Yes i noticed when i first tried the applyPatch function, it failed at the end when trying to install ecwolf with a patch failed message.
There is no empty file to be found inside the build folder "$HOME/RetroPie-Setup/tmp/build/ecwolf/ecwolf"
The actual tmp/build folder is empty when i look into it.
-
@tpo1990 I think the folder automatically gets cleanded up.
But does theapplyPatch
inside the scriptmodule works?
Because in your first posting you said there was a successfull build.
As far as my understanding is that you usually compare two files
a/sourcedir/testfile.dat
b/sourcedir/testfile.dat
With
-p1
you strip tosourcedir/testfile.dat
I used
./sourcedir/testfile.dat
andtestfile.dat
So with-p1
I also obtainsourcedir/testfile.dat
so I'm sure that the applyPatch function will work ;)About the path.... Maybe I remebered it wrong (can't test)
Yes the patch command fails if the file
ecwolf_keyboardpatch.diff.applied
is present. Then an error is added to ouput therefore the file needs to be deleted or you clean up the whole source build withRetroPie-Setup
and the option in the dialog menuZ clean build
-
@cyperghost It does seems to automatically clean up the tmp/builder folder after finalizing the install process of ECWolf scriptmodule.
I haven't noticed any other errors or points that need to be fixed yet. I can not see which file to compare with. Well you can always test it when you get back. For now i can reupload the file with the applyPatch addition.
Usually when the install process fails, it will present a clean source option in the RetroPie-Setup menu for that scriptmodule.
-
@tpo1990 So the
applyPatch
function works and you can build a ecWolf binary ;)
Perfect! Then modify the code with the applyPatch function and as you said, upload it
..... I may investigate thehelpers.sh
script later after my vacation.
Thank you ;)Usually when the install process fails, it will present a clean source option in the RetroPie-Setup menu for that scriptmodule.
Yes and therefore your modifications works like they should
EDIT:
It's a pleasure to develop with you. Thank you -
@cyperghost Okay so i have now uploaded latest change to my git repo for the applyPatch implementation in the ecwolf scriptmodule.
Great at this point i think i will leave the scriptmodule as it is at the moment and later create a PR for RetroPie project.
You too. Thank you as well. :-)
-
@tpo1990 I took a quick investigation inside the helpers.sh
There is no other function to get files.... So I really have nothing to add here.
Maybe some improvements for thels
command to find the empty dir (ls -A
) should be used for portabilty reasons but I think that only a sidenote because we usually build on Raspbian systems.So my final words. Nothing to add.
For me I learned some new things{!array[@]}
for searching the indexes of an array, usually you probe the value of the index-print -quit
forfind
can be very usefull (You have to know that find needs some special treatments for recurse file operations)- Never use
ls
for listing files and handling them in your script, except you will check if the directory is empty or not patch -p#
this was just an usecase by accident, but did work so far .... I hope my explainations what is the difference between p1 and p0 did not confuse you and I hope the explaination is right ;)
-
@SinisterSpatula said in OpenBOR 6xxx OpenBeta Testphase:
@cyperghost I'm back to being just an average joe, not making images, not part of a team. I'll get right on this tomorrow :)
Yes but your attitude is correct and I like your tutorials for the GPi case.
Back to topic:
I think we should use this thread for posting ecWolf issues ;)The ecWolf scriptmodule itself can be considered as RC1 it needs just one or two thing in code polishing (remove the dots for find and downloadAndExtract, add ls -A) but these are just minor things and it should do it's job as expected
-
Retroflag Gpi/Pi zero Testing
Forward = JY11 (D-pad up)
Backward = JY12 (D-pad down)
Turn left = JY13 (D-pad left)
Turn right = JY14 (D-pad right)
Attack = JY0 (A Button)
Use = JY1 (B button)
Strafe = JY3 (Y button)
Run = JY2 (X button)
Next Weapon = JY10 (LB button)
Prev Weapon = JY9 (RB button)
Escape Game = JY4 (Select Button)
Start button is not being detected when I try to assign it. But it is in fact
working as an ESC button.I hear a buzzing when I press the B button (JY1/Use) Same buzz if I press Spacebar which is assigned to Use.
The game is showing mouse curson on screen, need to disable that. (even with mouse disabled in controls)
Turning speed and movement speed are great without any change.
Very nice and playable, smooth, fast, good performance, music sounds great, no crackles or static. I did not need to use the --extravbls 2 to get good performance, however when I tried it, it does seem to be slightly better.I could exit the game just fine.
This plays very nice!
Menu's navigate nicely. B button is working to back out of menu's. A button is working to select a menu item. Only weirdness is if you want to setup inputs the A button is "firing twice" or something, it get's ready to take the input you want to set but then immediately takes A as the new button also. (So there's no way currently other than bluetooth keyboard to setup controls due to this)
Config file here:
https://github.com/SinisterSpatula/Misc/blob/master/ecwolf.cfgYoutube video here:
-
@cyperghost Good learning. I have not looked any further into the helpers file other than the applyPatch and downloadAndExtract funciton. I could probably learn a thing or two from it.
Now all that is left is just some further code polishing and then it will be ready for PR.
I agree that all folks here should only post ECWolf or Wolfenstein 3D related issues or posts so that we can maintain a clean topic.
-
@SinisterSpatula Thank you for this nice review and testing of ECWolf on the Retroflag GPI case. It seems to run very good. :-)
I think your modified ecwolf config file could provide useful to those that use the same case and that it is a good idea to add a link to the extra post that i have reserved at the moment, if i may do so with your accept.
-
@SinisterSpatula Thank your for this demo. ecWolf seems to run perfect on Pi1/0 then.
I think your button layout is okay. You properly missing the "MAP" options and I think the "SELECT" button is a good one for this.
I hear a buzzing when I press the B button (JY1/Use) Same buzz if I press Spacebar which is assigned to Use.
bzzzz bzzz ... That's the game engine, don't worry
The game is showing mouse curson on screen, need to disable that. (even with mouse disabled in controls)
Yes that's common. I disabled it, by setting mouse controls to off, activated fullscreen. Then the mouse is still showing but will vanish after next restart of ecWolf.
Turning speed and movement speed are great without any change.
Very nice and playable, smooth, fast, good performance, music sounds great, no crackles or static. I did not need to use the --extravbls 2 to get good performance, however when I tried it, it does seem to be slightly better.Yes the
--extravbls 2
sets the CPU usage massive down. On my Raspberry3 the peak CPU usage was 80%, with the switch sette I'm down to 50%. So my biggest concern was that the Pi0/1 is to weak for this game.I could exit the game just fine.
Yes with START and SELECT button I assume.
because your button layout is ....Start button is not being detected when I try to assign it. But it is in fact working as an ESC button. Therefore I assume that the SELECT button is free mabe for the Automap function ;)Menu's navigate nicely. B button is working to back out of menu's. A button is working to select a menu item. Only weirdness is if you want to setup inputs the A button is "firing twice" or something, it get's ready to take the input you want to set but then immediately takes A as the new button also. (So there's no way currently other than bluetooth keyboard to setup controls due to this)
Yes that's one of the caveeats now, you neeed a keyboard to navigate and reassign the keyboard layout inside the graphics menu or by using SSH edit. Therefore your premade config is worth to use it for the GPi case. Because not everybody is owner of a Bluetooth keyboard ;)
So thank you again for this nice review. If you need help how to add the fullversions then read description in posting 1. So I caused the usage of these
.ecwolf
files with the background of giving wolf3d the possibilty as own "system" inside ES.The
.ecwolf
files are simple bash scripts. You need to enter the directory with the game data and then you can parse commands to the binary.
/opt/retropie/ports/ecwolf/ecwolf --data wl6
(case sensitive!) will load the full version
/opt/retropie/ports/ecwolf/ecwolf --data wl6 --file ../addons/ECWolf_hdpack.pk3 ../addons/ECWolf_hdmus_3DO.pk3
loads full version in HD mode ;) -
I have created a quick mod install script to make it more easy to install mods into the ECWolf installation. You can find it in the new Extra section in the top of the topic. You can also do this manually by following the instructions for how to install mods in the first post.
The mod install script must be used in Raspbian Desktop with a keyboard, since you will be required to name the mod before it will be installed into ECWolf. You can name the mod with "spaces" as the script has been made sure to work this way.
At the moment it is only one .pk3 file it can handle to install. If you have more than one .pk3 placed in the new ecwolf folder that has been created, it will still create the .ecwolf file and mod.sh file, but it might not move the .pk3 files to the wolf3d roms. For this you can move them manually.
-
Some code polishing
You can avoid the additional dot as long as you don't parse additionals parameters to this. Helpers accepts source path and extraction path and shifts these 2 arguments.
So if you use additional parameters they will be shifted!
So I guess following. To just extract to current path just usedownloadAndExtract zipfile
if you use paramters then USE the destinationdownloadAndExtract zipfile extractto -parameter1 -parameter2
downloadAndExtract "https://bitbucket.org/ecwolf/ecwolf/get/5065aaefe055.zip" . downloadAndExtract "https://bitbucket.org/ecwolf/ecwolf/get/5065aaefe055.zip"
Edit: I think use the
find .
command
Do not remove the.
because it will strongen suggestions to search in current dir
But maybe some more advanced coders can say more to this.ecw=$(find . -iname "*.$game" -print -quit)
This may be answered by @hhromic
Because filename changes can be usefull do not collide with current Wolfenstein ports.
So I can't tell if this will higher the changes of a successfull PR or not - I think in the long term ecWolf could take advantage over Wolf4SDL. TheecWolfenstein
name is just my idea not set to stone... be creative ;)declare -A games=( ['wl1']="Wolfenstein 3D (demo)" .... ['sd3']="Wolfenstein 3D - SoD MP3 - Ultimate Challenge" ) declare -A games=( ['wl1']="ecWolfenstein 3D (demo)" .... ['sd3']="ecWolfenstein 3D - SoD MP3 - Ultimate Challenge" )
Code polishing your modscript .....
Better us a bash builtin
for i in *.pk3; do mv "$i" ..... filenames="$filenames $i" done cat.... EOF --file $filenames EOF
Using
ls
is the worst you can do ;)
You will see if you have to fight with globbing, special characters and other bash versions.
My code example resolves your issue with several pk3 files.
But this is only one way in doing something. If you use [P][p][K][k]3 then file extension does not care about upper/lower cases... ;) -
@cyperghost The downloadAndExtract command fails if i don't include the additional dot.
Error:
Error running 'unzip https://bitbucket.org/ecwolf/ecwolf/get/5065aaefe055.zip -o /tmp/tmp.GYUrhHrEWg/5065aaefe055.zip -d ' - returned 9
At least i can try to set up a PR and see how it goes. I have already managed to make the Hexen 2 scriptmodule apply after the RetroPie's scriptmodule guidelines and months have passed by without been merged.
Thank you. I was not aware that using ls is bad practice. I will try out your suggestion for the modscript. Also it is a bonus if it can handle more than one pk3 file. :-)
-
@tpo1990 Oh.... For me it worked without additonal dot but I've an older version of the RetroPie-Setup. Sorry for bothering you.
About the hexen2 branch ... Yes I know it's a long time ago you setted this PR. Don't know what's wrong here. Maybe you need to explain how the GL binary of hexen works?
About scripting:
Yes there are some don'ts in ParsingLS
ls
is fine if you want to check if the directory contains some data. I considerls
as command for human input, not for mashines.To check for a specfic file/directory you can always use the test command (= [[ ... ]])
and the mother of search is thefind
command but you really need to know the foe.
So the simplest way is imho thefor i in filename
loop.And even the internet is full of errors ;)
Here is a good tip to delete your whole mashine by accident (see last answer) -
@cyperghost No problem, i was not aware that it worked before updating the version of the RetroPie-Setup. At this moment it does not so i will keep the additional dot. :-)
The hexen2 PR was actually reviewed by joolswills and hhromic. hhromic helped me with making the scriptmodule ready so that the PR can be merged with the RetroPie project. hhromic did state that the PR is ready to merge, but no given answer by joolswills yet.
Oh yes the internet can be surprising without a doubt. :-)
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.