• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

Guide: AM2R (Another Metroid 2 Remake) on RPi 4

Scheduled Pinned Locked Moved Help and Support
guideam2rscriptmodule
44 Posts 9 Posters 11.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    mitu Global Moderator @sleve_mcdichael
    last edited by 30 Nov 2021, 05:31

    @sleve_mcdichael said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

    Are there any other ports that function similar that I can check out to base this on?

    Yes, Quake2 or Wolfenstein work similarly - if the games are detected during install, then the corresponding port entries are added. For printing messages, I think there's a printMsgs helper function you can use.

    The executable from the installation differs from the one I built manually. I can't test if it works or not until tomorrow, probably. But why aren't they identical?

    Compilation flags may be different, the setup script tries to optimize the build by adding platform specific tweaks.

    S 1 Reply Last reply 30 Nov 2021, 17:47 Reply Quote 0
    • S
      sleve_mcdichael
      last edited by 30 Nov 2021, 05:54

      Only one of my APK files was configured with a ~/.config folder and launch script.

      Found the typo!

      E 1 Reply Last reply 30 Nov 2021, 14:35 Reply Quote 0
      • E
        ExarKunIv @sleve_mcdichael
        last edited by 30 Nov 2021, 14:35

        @sleve_mcdichael i would like to include your script in my Port list I have going here once its all done of course

        and have it posted on my Github for easy download and install.
        Of course you get full credit

        cant wait to give it a try

        RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
        RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
        Maintainer of RetroPie-Extra .

        1 Reply Last reply Reply Quote 1
        • S
          sleve_mcdichael @mitu
          last edited by sleve_mcdichael 30 Nov 2021, 17:47

          @mitu said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

          Compilation flags may be different, the setup script tries to optimize the build by adding platform specific tweaks.

          The installed version still runs the game and loads my save.

          Why does it say "update is available", immediately after installation?

          I found the typo that broke the configure function.

          I think this is almost ready.

          It doesn't log very much. There's a "-debug" version we can build that is more verbose. Should we build & install them both at the same time so the -debug version is available from the start, or split it up into two separate modules so the initial installation is more streamlined, but users can still install the debug version only if they need it?

          Pro-combined:
          Only clone into the repo once
          Both executables in the same /opt/retropie/ports/gmloader directory
          Cons:
          Takes longer since it has to build both (but, it's only like a minute for each one.)
          Extra file (but only 1.5MB) that they may not even need.

          Pro-split:
          Faster installation (each) since it only builds the one you need.
          Cons:
          Have to clone into the repo two times if you want to install both versions.
          Executables in separate gmloader and gmloader-debug dirs.

          M 1 Reply Last reply 30 Nov 2021, 18:05 Reply Quote 0
          • M
            mitu Global Moderator @sleve_mcdichael
            last edited by 30 Nov 2021, 18:05

            @sleve_mcdichael said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

            Why does it say "update is available", immediately after installation?

            Probably because your script is not commited to the git repo and the setup script doesn't know the date of its last modification.

            Should we build & install them both at the same time so the -debug version is available from the start, or split it up into two separate modules so the initial installation is more streamlined, but users can still install the debug version only if they need it?

            I don't think it's needed.

            S 1 Reply Last reply 1 Dec 2021, 03:47 Reply Quote 0
            • S
              sleve_mcdichael @mitu
              last edited by sleve_mcdichael 12 Jan 2021, 05:43 1 Dec 2021, 03:47

              @mitu said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

              @sleve_mcdichael said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:
              I don't think it's needed.

              Sure, less is more, right? I think it's ready to go live, then. Please test:

              GMLoader-RPi

              wget https://raw.githubusercontent.com/s1eve-mcdichae1/GMLoader-RPi/main/gmloader.sh -P $HOME/RetroPie-Setup/scriptmodules/ports/
              

              If for some reason the debug module is desired, then just edit the file, find the "build" function and change -DCMAKE_BUILD_TYPE=Release to -DCMAKE_BUILD_TYPE=Debug, then re-install. This will log verbose output to runcommand.log.

              E 1 Reply Last reply 1 Dec 2021, 15:07 Reply Quote 0
              • E
                ExarKunIv @sleve_mcdichael
                last edited by 1 Dec 2021, 15:07

                @sleve_mcdichael works great.
                I will be linking your script on my post. if you dont mind.

                Now we need a list of the games that will work. lol

                RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                Maintainer of RetroPie-Extra .

                S 1 Reply Last reply 1 Dec 2021, 16:42 Reply Quote 0
                • S
                  sleve_mcdichael @ExarKunIv
                  last edited by sleve_mcdichael 12 Jan 2021, 16:44 1 Dec 2021, 16:42

                  @exarkuniv said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

                  Now we need a list of the games that will work. lol

                  I don't know how to get any of the rest of these or how to get them in APK format, but there's a partial list here:

                  www.reddit.com/r/AM2R/comments/pgp2x7/am2r_raspberry_pi_take_4/hbh8vgr

                  • Minit (Android, linux w/ wrapper)
                  • Downwell (linux w/ wrapper, game crashes on death, still haven't investigated why)
                  • Maldita Castilla (ouya)
                  • Retro Highway (Android)
                  • Underswap Demo (Android)
                  • Nuclear Throne (Linux build converted to gms1.4.1804 + wrapper)
                  • AM2R 1.5.2 and 1.5.5 (Android)
                  • Psycron Demo (Windows w/ Wrapper)
                  • Unworthy (Windows w/ Wrapper, runs too slow to be usable even on pi4)

                  Someone also mentioned Gato Roboto, which looks cool as heck.

                  E 1 Reply Last reply 1 Dec 2021, 16:56 Reply Quote 0
                  • E
                    ExarKunIv @sleve_mcdichael
                    last edited by 1 Dec 2021, 16:56

                    @sleve_mcdichael its better then nothing.

                    still very cool

                    RPi3B+ / 200GB/ RetroPie v4.5.14, RPi4 Model B 4gb / 256gb / RetroPie 4.8.2
                    RPi5 4gb / 512gb / RetroPie 4.8.9 -Basic
                    Maintainer of RetroPie-Extra .

                    1 Reply Last reply Reply Quote 0
                    • S
                      sleve_mcdichael
                      last edited by sleve_mcdichael 12 Feb 2021, 04:44 2 Dec 2021, 01:45

                      Update: refined the "find" command that configured the games. Now uses:

                      done < <(find "$romdir/ports/droidports" -maxdepth 1 -type f \( -name "*.apk" -o -name "*.APK" \))
                      

                      1: -type f - we don't want to return directories even if they're called *.apk. This forces it to only return files.

                      2: -maxdepth 1 - nothing inherently wrong with using subdirs and normally it would work just fine, but if a user has two files with the same name in different dirs (for example, both FooBar.apk and subdir/FooBar.apk) then their launch scripts and config dirs will conflict. Setting -maxdepth 1 forces it to only return files in the main droidports directory so there can be no filename conflicts. (Edit: FooBar.apk and FooBar.APK would still conflict. Don't do that, I guess. Anyone know a way to safeguard against this that's simple and easy enough for a noob like me to understand?)

                      M 1 Reply Last reply 2 Dec 2021, 05:07 Reply Quote 0
                      • M
                        mitu Global Moderator @sleve_mcdichael
                        last edited by 2 Dec 2021, 05:07

                        @sleve_mcdichael find knows about -iname, the command can be shortened to

                        find "$romdir/ports/droidports" -maxdepth 1 -type f -iname \*.apk
                        
                        S 1 Reply Last reply 2 Dec 2021, 05:29 Reply Quote 1
                        • S
                          sleve_mcdichael @mitu
                          last edited by 2 Dec 2021, 05:29

                          @mitu said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

                          \*.apk
                          

                          That's the same as "*.apk"? Is one preferred or "more correct" over the other?

                          M 1 Reply Last reply 2 Dec 2021, 05:43 Reply Quote 0
                          • M
                            mitu Global Moderator @sleve_mcdichael
                            last edited by 2 Dec 2021, 05:43

                            @sleve_mcdichael It's just shorter, you can use which version you prefer.

                            1 Reply Last reply Reply Quote 1
                            • M
                              mitu Global Moderator
                              last edited by 5 Dec 2021, 17:56

                              I tried the port and AM2R works without issues on my Pi4. Great work !

                              1 Reply Last reply Reply Quote 1
                              • S
                                sleve_mcdichael @sleve_mcdichael
                                last edited by 8 Dec 2021, 19:32

                                @sleve_mcdichael said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

                                @mitu said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

                                It would be better if each game would have its own config folder under $HOME/.config/gmloader.

                                I agree but I didn't write the software. Is this something that we can config?

                                Hey guess what. I "wrote" some software:

                                https://github.com/JohnnyonFlame/droidports/pull/2/files

                                (Well, I edited one line in one file. Does this do what I think it does, and without breaking anything else? It seems to work on cursory inspection, but I'm gonna wait a bit and see if the author merges my PR, or has any feedback, rather than just link the script to my version.)

                                1 Reply Last reply Reply Quote 1
                                • vic-viper-001V
                                  vic-viper-001
                                  last edited by 21 Dec 2021, 05:20

                                  It's been great playing AM2R. MAJOR kudos!

                                  I've also been able to run .apks of
                                  Sonic SMS Remake 1&2,
                                  Love 2: Kuso,
                                  Undertale aka "Droidtale",
                                  and Spelunky HD Classic.

                                  Several of the games have the minor issue of not giving you an option anywhere to quit, but typing the command "pkill gmloader" into the terminal will return you to the ES menu. Spelunky HD Classic crashes when you read a certain signpost in the tutorial level, and has issues if you try to configure your own controls. As for the others, they seem to work fine.

                                  I don't know if any of these will have game-breaking bugs later, but they SEEM to run okay, which is pretty awesome.

                                  1 Reply Last reply Reply Quote 1
                                  • AddisonA
                                    Addison
                                    last edited by 2 Jan 2022, 19:08

                                    Will this be heading to a repo anytime soon?

                                    I've read through the thread more times than needed and still don't quite understand how to have the port fully installed.

                                    I have it on Xbox One, but there are some strange lighting issues and also a few hard crashes at times. :/

                                    dankcushionsD S 2 Replies Last reply 2 Jan 2022, 20:55 Reply Quote 0
                                    • dankcushionsD
                                      dankcushions Global Moderator @Addison
                                      last edited by 2 Jan 2022, 20:55

                                      @addison it's on a repo. it's linked above: https://github.com/s1eve-mcdichae1/GMLoader-RPi

                                      1 Reply Last reply Reply Quote 1
                                      • S
                                        sleve_mcdichael @Addison
                                        last edited by 2 Jan 2022, 22:25

                                        @addison said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:

                                        still don't quite understand how to have the port fully installed.

                                        There is a script module linked in the first post and by dankcushions above. Just download the gmloader.sh file from that repo and put it in your scriptmodules/ports directory on your RPi4. You can do that from the terminal with command:

                                        wget https://raw.githubusercontent.com/s1eve-mcdichae1/GMLoader-RPi/main/gmloader.sh -P $HOME/RetroPie-Setup/scriptmodules/ports/
                                        

                                        After that you can install the port through RetroPie-Setup > Manage packages > Manage experimental packages

                                        ROM Extensions: .apk .APK

                                        To configure the run-command launch script(s) for EmulationStation, you must first copy at least one APK file to ~/RetroPie/roms/ports/droidports and then run (or re-run) the installer.

                                        1 Reply Last reply Reply Quote 1
                                        • AddisonA
                                          Addison
                                          last edited by 3 Jan 2022, 04:03

                                          Such happy joy!

                                          Will be installing this tonight! :D

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          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.

                                            This community forum collects and processes your personal information.
                                            consent.not_received