Viewing 35 posts - 1 through 35 (of 38 total)
  • Author
    Posts
  • #94001
    ronoh55
    Participant

    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=66506

    Easy 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!

    #96934
    ronoh55
    Participant

    The 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.

    #97177
    InsecureSpike
    Participant

    awesome!! this looks cool!!

    thanks man!!

    #100779
    gordon55m
    Participant

    I 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#p780578

    #100785
    ronoh55
    Participant

    Try 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.

    #100865
    gordon55m
    Participant

    Ronoh55, 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!

    #100879
    gordon55m
    Participant

    I 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.rej

    Thoughts? 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
    #100881
    gordon55m
    Participant

    I 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.

    #100884
    ronoh55
    Participant

    Yes. 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!

    #101814
    ronoh55
    Participant

    It 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.

    #102693
    herbfargus
    Member

    Ok- 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. :)

    #102712
    ronoh55
    Participant

    This 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!

    #102714
    herbfargus
    Member

    Its 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.

    #102751
    herbfargus
    Member

    Just 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.

    #102780
    ronoh55
    Participant

    Last 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.

    #102846
    ronoh55
    Participant

    Still 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.

    #102848
    herbfargus
    Member

    Mine 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.

    #102859
    herbfargus
    Member

    I 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?

    #102953
    herbfargus
    Member

    It 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.

    #102954
    ronoh55
    Participant

    I 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.

    #102955
    herbfargus
    Member

    according 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.

    #102957
    ronoh55
    Participant

    Yeah, 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.

    #102958
    herbfargus
    Member

    That 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.

    #102959
    herbfargus
    Member

    My 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.

    #102960
    ronoh55
    Participant

    The 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!

    #103011
    ronoh55
    Participant

    Here’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?

    #103022
    herbfargus
    Member

    Unfortunately 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.

    #103057
    herbfargus
    Member

    It 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.

    #103058
    ronoh55
    Participant

    Awesome! 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.

    #103059
    Anonymous
    Inactive

    Hey guys sorry to dive in the middle im on RP 3.0 Beta 2 still how would I go about installing this?

    #103060
    herbfargus
    Member

    Update your setup script, don’t forget to restart the setup script. go into the experimental menu and install super Mario war.

    #103061
    Anonymous
    Inactive

    Im sorry for sounding like such a newb here, I installed off of an image would this be similar to a manual update from binaries?

    #103062
    herbfargus
    Member

    If 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.

    #103064
    ronoh55
    Participant

    I am correct that if I rerun the experimental package, it will properly update my current install to the fixed one, right?

    #103065
    Anonymous
    Inactive

    Thanks! I will try that later!

Viewing 35 posts - 1 through 35 (of 38 total)
  • The forum ‘Ideas for Further Enhancements’ is closed to new topics and replies.