Homepage › Forums › RetroPie Project › Ideas for Further Enhancements › Super Mario War
Tagged: apps, pi, smw, super mario war
- This topic has 37 replies, 6 voices, and was last updated 9 years, 3 months ago by Anonymous.
-
AuthorPosts
-
04/06/2015 at 20:37 #94001ronoh55Participant
Hello all,
Not sure if this is the right place to put it but Super Mario War a great PC game that was ported to Linux. Unfortunately the games developer passed away in 2009 so it’s no longer under development. The Last version does work well on the Pi though!
I followed this post for directions to installing it.
http://www.raspberrypi.org/forums/viewtopic.php?f=78&t=66506Easy first compile if you’ve never done it before (as was my case before doing this). The only thing so far I found wrong is the stages for the fights are glitched out. I’ll be working on fixing that once I get home from work.
Hope you all can and will enjoy!
05/05/2015 at 00:42 #96934ronoh55ParticipantThe stages glitch has been fixed! Follow the directions in the post above, but also apply the patch in this thread before compiling http://72dpiarmy.supersanctuary.net/index.php?topic=11144.0 to fix the stages glitch.
For some reason I had to apply the patch manually, but that was not hard at all to do. It is literally changing 3 lines in one file to get this working.
05/10/2015 at 08:25 #97177InsecureSpikeParticipantawesome!! this looks cool!!
thanks man!!
06/26/2015 at 16:56 #100779gordon55mParticipantI followed that post that you linked to ronoh55 and got a configuration file error. Any chance you can help me out as to what I did wrong? Like you, this was my first compile.
I posted my full code on the tutorial link you posted:
https://www.raspberrypi.org/forums/viewtopic.php?p=780578#p78057806/26/2015 at 19:26 #100785ronoh55ParticipantTry Just running smw from command line. If that runs you know it is in your smw.sh or your es_systems.cfg
In my second post there is a link to the smw forums post that helped me fix a glitch in the game as you compiled it. You may want to check that out as well after you get this working. What version of RetroPie are you on? I did this on a Pi2 version 3.0beta2, though it should work on any version in theory.
06/28/2015 at 00:07 #100865gordon55mParticipantRonoh55, thanks for the tips. I decided to start from a clean RetroPie Raspberry Pi 2 Version 3.0 BETA 4 and followed my previous steps and I got it to work.
However I ran into the same trouble you had I think in which the maps just loaded as tiles. I read your posts, but am not quite clear as to how or when to apply the patch you mention. Any chance you can write up some directions on how to download and apply the patch? If so, maybe I can then write up a full step by step tutorial on the most recent version of RetroPie.
Thanks for you help, this is a great game, I am getting my buddies addicted to it!
06/28/2015 at 04:40 #100879gordon55mParticipantI tried moving the .patch file that I got here from FluffyPillow to the directory /home/pi/smw-svn/. I then ran:
patch -Np0 < ../smw_fileio.patch
I got the response:
(Stripping trailing CRs from patch.)
patching file _src/FileIO.cpp
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 130.
2 out of 2 hunks FAILED — saving rejects to file _src/FileIO.cpp.rejThoughts? I ran that code after I ran the code below:
sudo apt-get update wget https://aur.archlinux.org/packages/sm/smw-svn/smw-svn.tar.gz tar -xf smw-svn.tar.gz cd smw-svn sudo apt-get install subversion svn co http://supermariowar.googlecode.com/svn/trunk smw cd smw sudo apt-get install dos2unix dos2unix configure chmod +x configure patch -Np0 < ../gcc.patch
06/28/2015 at 05:02 #100881gordon55mParticipantI manually went in and updated the patch changes in the FileIO.cpp file. It worked!
I’ve had it freeze on me a few times though. I am overclocked at Pi2 settings and set the memory to 256.
06/28/2015 at 08:37 #100884ronoh55ParticipantYes. That is exactly what I had to do to get it working as well. Unfortunately I also have the issue of it randomly freezing on me and having to hard boot the pi to fix it. I’m running same settings as you.
I will write up a step by step guide combining the two processes above to make it easier to figure out for others that want to check out this amazing game though!
07/10/2015 at 22:54 #101814ronoh55ParticipantIt wouldn’t let me edit my Opening post with the tutorial…odd. Anyways Here is the directions I promised. These are based on My memory of installing SMW and from reading my forum posts from links above aiding the memory. I will be reinstalling SMW on 3.0b4 soon(ish) and will edit this as needed.
This tutorial assumes you know how to use nano to create/edit .sh files and the es_systems.cfg
First you need to download a patch that makes SMW run on the Raspberry Pi.
You can get the patch here: https://mmatyas.github.io/smw_fileio.zip
Unzip and throw that file on a flash drive so you can move it to the pi later.On your pi run the following code:
sudo apt-get update wget https://aur.archlinux.org/packages/sm/smw-svn/smw-svn.tar.gz tar -xf smw-svn.tar.gz cd smw-svn sudo apt-get install subversion svn co http://supermariowar.googlecode.com/svn/trunk smw cd smw sudo apt-get install dos2unix dos2unix configure chmod +x configure
This is where you need to locate the patch we downloaded earlier.
sudo mv /Your/Patch/Location/smw_fileio.patch ~/smw-svn/ patch -Np0 < ../gcc.patch patch -Np0 < ../smw_fileio.patch (If this fails see section at the bottom of post) ./configure make sudo make install
After the ‘make install’ command is finished you need to make your way to your es_systems.cfg file (in /etc/emulationstation/)
And add this entry to the file:
<system> <name>apps</name> <fullname>Apps</fullname> <path>~/RetroPie/roms/apps</path> <extension>.sh .SH</extension> <platform>pc</platform> <command>%ROM%</command> </system>
Then you have to make an shell script file in ‘~/RetroPie/roms/apps/‘ with the contents:
!/bin/bash smw
And name the file smw.sh
Then type:
sudo chmod +x smw.sh
To allow the .sh file to execute.
Reboot back into Emulation station and you should have a new system with one item in it (smw) that launches the game!
smw_fileio.patch failed to apply?
This happened to me the first time. You will need to manually edit the files to apply the patch. Fortunately it’s pretty easy to do. You have to go to ‘~/smw-svn/smw/_src/FileIO.cpp’ and edit it.First search for ‘#include “global.h”’ and add ‘#include <stdint.h>’ directly below it.
Then search for :
void WriteByteFromShort(short out, FILE * outFile) { char b = (char)out; fwrite(&b, sizeof(Uint8), 1, outFile); } short ReadByteAsShort(FILE * inFile) { char b; fread(&b, sizeof(Uint8), 1, inFile); return (short)b;
And you will replace ‘char b = (char)out;’ with ‘int8_t b = (int8_t)out;’ and ‘char b;’ with ‘int8_t b;’
Save and exit, the patch is now manually applied and you can continue with running ./configure (Don’t forget to go back to ~/smw-svn/smw first though!)Sources:
http://72dpiarmy.supersanctuary.net/index.php?topic=11144.0
https://www.raspberrypi.org/forums/viewtopic.php?f=78&t=66506
http://supermariowar.supersanctuary.net/Other issues:
I know there is an issue where SMW randomly crashes. I’m not sure what causes this, and have not had the time to play with settings to see if it can be fixed easily. I am on the pi2 and am running the pi2 overclock setting as is.07/25/2015 at 10:44 #102693herbfargusMemberOk- so I’ve been inspired by your posts Ronoh55 and how helpful you’ve been in detailing how to compile it so I took the liberty of testing it out. Not only was I able to get it to work based on your posts but I was able to clone the repo onto my own github account (https://github.com/HerbFargus/smw) and in the process removed the need for subversion, add all the patches to the source code, change all the line endings so that dos2unix is no longer necessary, and just for kicks I created a scriptmodule that can be added to the retropie setup script:
https://github.com/RetroPie/RetroPie-Setup/pull/917
I’m not sure if it will be added to the project but the code is there if you want to use it. :)
07/25/2015 at 17:36 #102712ronoh55ParticipantThis is awesome! Have you possibly found anything that is causing the random crash while you were simplifying everything? That’s the only issue that I know of that would keep it out of the setup script. Thanks for taking the time to simplify it for us all!
07/25/2015 at 17:55 #102714herbfargusMemberIts been merged to the source so if you update your setup script you can install it from the experimental menu.
I was more worried about the whole Nintendo intellectual property issue than the stability for adding it.
I haven’t tested it out enough to see what might be causing it to crash, I’m not the most gifted when it comes to coding so you’d probably have a better idea than me at the moment, but I’ll see what I can figure out as it goes on.
07/26/2015 at 09:31 #102751herbfargusMemberJust out of curiosity- when is it crashing? Is it a specific battle or in the menus? I played it for maybe an hour or so today and it didn’t crash at all. I’m just running on a fresh image on a rpi2. Perhaps test my build out through the setup script and see if it still crashes.
07/26/2015 at 17:21 #102780ronoh55ParticipantLast time I played it was Retropie 2.6 on my pi2, it was crashing semi randomly, but mostly in battle. It would last between 5 and 15 mins. I’ll have a chance to test out a fresh install of it tomorrow though.
07/27/2015 at 18:44 #102846ronoh55ParticipantStill froze, in game after about 5 mins. What are your overclock and memory split settings? maybe that has something to do with it? I’m on Retropie 3.0 b4 right now with pi2 overclock and default mem split.
07/27/2015 at 19:12 #102848herbfargusMemberMine was just stock straight from a rpi2 3.0 RC1 build. I didn’t over clock it or anything. Perhaps it has something to do with over clocking. I’ll have to test it more today and see if I can get it to freeze.
07/28/2015 at 01:14 #102859herbfargusMemberI tested it for another hour today on a fresh rpi2 3.0 rc1 build with two SNES USB controllers plugged in- no over clock and default memory split. I played it with a bunch of different game settings and I couldn’t reproduce the issue. It did have the pause menu show up at the beginning of each battle which is annoying but I just press the pause button to make it go away. So idk. Has anyone else had it freeze on them?
07/29/2015 at 06:32 #102953herbfargusMemberIt finally froze on me. out of curiosity were you playing with bots- and if so, how many? I never had it freeze just with two players but once I added two bots with me and my friend it started to freeze so it has something to do either with the bots, the number of players, or both.
07/29/2015 at 06:37 #102954ronoh55ParticipantI do play with bots! Usually 2 (so three active players) I’m gonna try with one bot right now and see if it still freezes.
07/29/2015 at 06:41 #102955herbfargusMemberaccording to this issue at the end : https://github.com/dborth/smw-wii/issues/29 its the AI (i.e. Bots) it’s the wii version but its based on the same code and sounds like the same issue. knowing its the bots narrows it down a lot.
07/29/2015 at 07:40 #102957ronoh55ParticipantYeah, I just confirmed one bot will freeze it, though it lasts longer. I’ll see if I can start a new thread on the games forums and find a fix tomorrow.
07/29/2015 at 07:51 #102958herbfargusMemberThat would be brilliant- if this last issue could be fixed I’d be ecstatic. I’ll peruse the code a bit but its doubtful I’ll come up with anything in my inexperience. Out of all the forks I’ve found this is the only one I’ve seen that has any development going on with it:
https://github.com/mmatyas/supermariowar
But it looks to be more of a netplay thing, idk.
07/29/2015 at 07:59 #102959herbfargusMemberMy guess is it has something to do with these two:
https://github.com/HerbFargus/smw/blob/master/_src/ai.cpp
https://github.com/HerbFargus/smw/blob/master/_src/ai.h
It is possible I may have missed something manually running the patches as that was one of the files I patched but I’ll take another look at it tomorrow and see if I overlooked something.
07/29/2015 at 08:02 #102960ronoh55ParticipantThe fork you linked to is definitely an active member of the forums over there, but I don’t remember quite in what capacity. There are 2 or three members working on their own updates of the game (the original creator died unfortunately).
I’m off to bed now but I’ll definitely jump on there tomorrow. I hope you can find something in one of those files that would help even!
07/30/2015 at 09:04 #103011ronoh55ParticipantHere’s my link to the SMW “official” forums. It’s actually the same thread as linked near the top of the thread, but Obviously with the new question of bots freezing the game.
http://72dpiarmy.supersanctuary.net/index.php?topic=11144.0
Any luck diving into those files?
07/30/2015 at 17:07 #103022herbfargusMemberUnfortunately no. I double checked the patches and they all look correct, so outside of the patches I wouldn’t even know where to begin with the code. Hopefully fluffypillow has an idea- who knows, maybe once he finishes his build with netplay enabled we can just use that version instead- he’s made enough changes with the code that its possible the issue will have been fixed.
07/31/2015 at 02:29 #103057herbfargusMemberIt should be fixed now. I tested it for an hour with 3 bots and it ran perfectly. Thanks for submitting the request. Once he gets netplay sorted that will be fantastic.
07/31/2015 at 03:03 #103058ronoh55ParticipantAwesome! Still at work for 2 hrs, but this will be the first thing I do when I get home! Thanks for all the help. Hope to be able to play against you when netplay is working.
07/31/2015 at 03:20 #103059AnonymousInactiveHey guys sorry to dive in the middle im on RP 3.0 Beta 2 still how would I go about installing this?
07/31/2015 at 03:24 #103060herbfargusMemberUpdate your setup script, don’t forget to restart the setup script. go into the experimental menu and install super Mario war.
07/31/2015 at 03:50 #103061AnonymousInactiveIm sorry for sounding like such a newb here, I installed off of an image would this be similar to a manual update from binaries?
07/31/2015 at 04:24 #103062herbfargusMemberIf you built from RPI 3 beta 2 then in the retropie menu on emulation station there is an option called retropie-setup once you open that a new menu will open up. Near the end is an option to update the setup script. Choose that and then exit out of the script so it can reload the updated script (I just modified the code so in the future you shouldn’t have to restart the setup script) then once you go back into the setup script there is an option called experimental packages (option 4). Once you go into that super Mario war will be near the bottom of the list. Select that and it will compile it on your pi.
07/31/2015 at 05:31 #103064ronoh55ParticipantI am correct that if I rerun the experimental package, it will properly update my current install to the fixed one, right?
07/31/2015 at 05:33 #103065AnonymousInactiveThanks! I will try that later!
-
AuthorPosts
- The forum ‘Ideas for Further Enhancements’ is closed to new topics and replies.