Guide: AM2R (Another Metroid 2 Remake) on RPi 4
-
@sleve_mcdichael
find
knows about-iname
, the command can be shortened tofind "$romdir/ports/droidports" -maxdepth 1 -type f -iname \*.apk
-
@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? -
@sleve_mcdichael It's just shorter, you can use which version you prefer.
-
I tried the port and AM2R works without issues on my Pi4. Great work !
-
@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.)
-
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.
-
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. :/
-
@addison it's on a repo. it's linked above: https://github.com/s1eve-mcdichae1/GMLoader-RPi
-
@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 yourscriptmodules/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. -
Such happy joy!
Will be installing this tonight! :D
-
I just tried installing GMLoader with the scriptmodule, and so far of the three games I tested, AM2R, Sonic 1 remake, and Sonic 2 remake, all worked fine. However, I'm having some specific issues with each of them, and I'm not sure what to do about them.
- They seem to only work with Xbox controllers from what I've tested. I tried using my 8bitdo Pro+, but it only recognizes it when it's in Xinput mode. I haven't tried the other input modes though, just Xinput and Dinput.
- AM2R doesn't seem to let me remap controls. When I navigate to the controller menu, I press a button to remap any of the control options, but they always just default to LT no matter what I do. I press the button to start the remap, and a split second later it's set to LT.
- There is no way to quit without actually killing the process. AM2R has a quit option on the main menu, but the Sonic games don't have any way to quit from the main menu, so the only way to stop them is to kill the process. There doesn't seem to be a hotkey combo that will stop GMLoader.
-
@g30ff I can remap AM2R controls on my Logitech F710 wireless; don't have anything else to try with enough buttons. (I suppose if I switch it to 1-button aiming and "classic" morph ball it might fit on a SNES pad? Maybe I'll try that tomorrow.)
XInput is the suggested mode to be using with RetroPie in general, I believe. Is there a particular reason you want to be using DirectInput?
The issue with games lacking an "exit" function is, I suppose, because these are smartphone apps that expect you to just use the phone's "home" button.
To reiterate, the project is still in early alpha, so all features may not be fully functional. I'm not sure if this is something that's on the author's radar or not, you could always post an issue upstream.
-
@sleve_mcdichael Thanks for the feedback. I might just raise an issue on the github regarding the quit functionality. That's fair that the project is in early alpha. It's pretty exciting however, and opens up a whole bunch of new options!
I had just been using the pad in D-input mode normally, and when I booted up AM2R, it didn't recognize the controller as being connected. It seemed unusual to me. I can easily run in X-input mode. It wouldn't be the only port that has issues with some controllers; VVVVVV doesn't work with anything that isn't X-input, for example.
The mapping is unusual to me. I might try with a different controller and see if it helps. Something else odd is that despite Start being mapped as the menu button, pressing Start does nothing, and in fact Right Trigger brings up the map. I guess I was wondering if anyone else is having issues with controller remapping, or whether it's the fault of my specific controller. I did do a full upgrade, and reinstalled the xpad driver just to be sure.
-
@g30ff yeah, I just tried my Amazon generic SNES pad and it didn't work in either of my games (AM2R or Maldita Castilla.) No response at all when mashing all 12 inputs.
I'm gonna look into creating a custom SDL2 map (I think that's what I'm looking for?) for the gamepad and see if that does anything.
-
@sleve_mcdichael said in Guide: AM2R (Another Metroid 2 Remake) on Pi 4:
I'm gonna look into creating a custom SDL2 map (I think that's what I'm looking for?) for the gamepad and see if that does anything.
@G30FF this worked for me:
git clone https://github.com/retropie/sdl --branch retropie-2.0.10 --recursive # I'm not sure if "--recursive" is needed but it doesn't break anything so I left it in cd sdl/test ./configure make controllermap ./controllermap 0 # I ran this command from SSH so I could copy/paste the output string. # replace "0" with the controller you want to configure if you have more than one connected. # run "./controllermap" with no arguments to list attached controllers.
Press the buttons on your controller when indicated on-screen. Use Spacebar (on a connected keyboard, unfortunately this doesn't appear to work over SSH) to skip a button that your controller doesn't have. Use backspace to correct a mistake.
When you are done it will output a string like
030000001f08000001e4000010010000,USB gamepad,platform:Linux,a:b1,b:b0,x:b3,y:b2,back:b8,start:b9,leftshoulder:b4,rightshoulder:b5,dpup:-a1,dpdown:+a1,dpleft:-a0,dpright:+a0,
. Copy this string.Edit
$HOME/.profile
and add the line:export SDL_GAMECONTROLLERCONFIG="<string>"
...where
<string>
is the string output by the controllermap tool.Relog or reboot.
After this, I was able to use the generic SNES pad in both my GMLoader games. Also works in Hurrican (non-GMLoader) which was not reading "Start" correctly on the generic pad.
EDIT: this only worked when launching the games from terminal. To make it work when launching them from ES I had to add the same line to
autostart.sh
(before "emulationstation #auto
".) To have it work by both methods, I need it in both places. Currently looking into that. -
I got this almost working on Pi4 2gb thanks to the script in the first post, but with no sound effects, music or audio of any kind. Any ideas as to what I should check?
Everything else I have on the Pi (ports, retroarch etc.) the sound works fine with. -
@pi2user hmm, sound is working for me on the same hardware (I'm through HDMI into a TV set, you?)
Maybe a missing dependency? SDL2-mixer for example, wasn't shown as needed so I didn't make it a dependency but I do already have it from other installs.
I don't "know" how any of this works but here are some thoughts. If you're up to do some testing, please try them out and report back.
First, check if you have the package, or the dev tools installed:
apt list libsdl2-mixer-2.0-0 libsdl2-mixer-dev
If you already have them then it won't be that. If not, it may be worth a shot.
It doesn't mention it when building the makefiles, and you got through the build process without errors so if it's only needed at run-time, maybe the dev-tools package aren't needed. Try installing just the regular one first:
sudo apt -y install libsdl2-mixer-2.0-0
See if the sound works. If it doesn't, try reinstalling the module and see if the sound works. If it doesn't, try adding the dev tools:
sudo apt -y install libsdl2-mixer-dev
Again, try the game, then if necessary, recompile and try again. Please let me know how it works out for you.
If it doesn't work and you didn't have the SDL-mixer packages before and you don't want them now and want to remove them completely from your system, do:
sudo apt remove --purge libsdl2-mixer-dev libsdl2-mixer-2.0-0 sudo apt autoremove --purge
The first one removes the listed packages and any associated configuration files, and the second one cleans up any leftover packages that were initially automatically installed as dependencies of another package but are no longer a dependency of any currently-installed package.
-
@sleve_mcdichael
Thanks for taking a look at this. I'm running the pi4 over HDMI.
libsdl2-mixer-dev and libsdl2-mixer-2.0-0 were both already installed.
Do you know if there be any log files anywhere I could have a look at, or can I alter any of the startup process to generate log files? -
@pi2user it doesn't log much as is but if you build it with
-DCMAKE_BUILD_TYPE=Debug
then it will be a bit more verbose.Edit your
gmloader.sh
file, line 30:cmake -DCMAKE_BUILD_TYPE=Release -DPLATFORM=linux -DPORT=gmloader ..
Change the "build type" from "Release" to "Debug":
cmake -DCMAKE_BUILD_TYPE=Debug -DPLATFORM=linux -DPORT=gmloader ..
Save the file and reinstall the module through RetroPie-Setup. Verbose output should be captured by
/dev/shm/runcommand.log
.To restore the Release version, just change the line back and reinstall the module one more time.
-
@sleve_mcdichael
Here it is:Parameters: Executing: SDL_VIDEO_KMSDRM_CRTCID=87 SDL_VIDEO_KMSDRM_MODEID=16 /opt/retropie/ports/gmloader/gmloader "/home/pi/RetroPie/roms/ports/droidports/am2r-another-metroid-2-remake-1-5-2.apk" code cave: 3280 bytes (@0x41622330). Missing: pthread_attr_init Missing: pthread_attr_setstacksize Missing: pthread_attr_destroy Missing: __isfinitef Missing: rename Missing: mktime64 Missing: sched_yield Missing: sysconf Missing: __android_log_write Missing: tmpfile Missing: perror Missing: select Missing: getpeername Missing: shutdown Missing: close Missing: getsockopt Missing: setsockopt Missing: socket Missing: ioctl Missing: bind Missing: listen Missing: accept Missing: recvfrom Missing: inet_ntoa Missing: recv Missing: send Missing: inet_addr Missing: getaddrinfo Missing: fcntl Missing: connect Missing: sendto Missing: mkstemp Missing: fdopen Missing: localtime Missing: zError Missing: fstat Missing: munmap Missing: mmap Missing: memalign Missing: __assert2 Unable to find method `ExpandCompressedFile` (aka: 'Java_com_yoyogames_runner_RunnerJNILib_ExpandCompressedFile') for 'RunnerJNILib'. Saving to folder /home/pi/.config/gmloader/am2r_another_metroid_2_remake_1_5_2/. LOG[yoyo]: RenderSplashCheck1.1LOG[yoyo]: RenderSplashCheck1.2LOG[yoyo]: RenderSplashCheck1.3LOG[yoyo]: RenderSplashCheck1.4LOG[yoyo]: RenderSplashCheck1.6LOG[yoyo]: RenderSplashCheck1.7Class RunnerJNILib does not have method OpenURL. Class RunnerJNILib does not have method SendHighScore. Class RunnerJNILib does not have method SendAchievement. Class RunnerJNILib does not have method IncrementAchievement. Class RunnerJNILib does not have method OpenAchievements. Class RunnerJNILib does not have method OpenLeaderboards. Class RunnerJNILib does not have method AchievementLoadFriends. Class RunnerJNILib does not have method AchievementLoadLeaderboard. Class RunnerJNILib does not have method CallExtensionFunction. Class RunnerJNILib does not have method AchievementLoadPic. Class RunnerJNILib does not have method AchievementShow. Class RunnerJNILib does not have method AchievementEvent. Class RunnerJNILib does not have method AchievementGetInfo. Class RunnerJNILib does not have method AchievementLogin. Class RunnerJNILib does not have method AchievementLoginStatus. Class RunnerJNILib does not have method AchievementLogout. Class RunnerJNILib does not have method EnableAds. Class RunnerJNILib does not have method MoveAds. Class RunnerJNILib does not have method AdsSetup. Class RunnerJNILib does not have method AdsRewardCallback. Class RunnerJNILib does not have method AdsEngagementLaunch. Class RunnerJNILib does not have method PocketChangeDisplayShop. Class RunnerJNILib does not have method PocketChangeDisplayReward. Class RunnerJNILib does not have method PlayHavenUpdateNotificationBadge. Class RunnerJNILib does not have method PlayHavenHideNotificationBadge. Class RunnerJNILib does not have method PlayHavenAddNotificationBadge. Class RunnerJNILib does not have method PlayHavenPositionNotificationBadge. Class RunnerJNILib does not have method AdsEngagementActive. Class RunnerJNILib does not have method AdsEngagementAvailable. Class RunnerJNILib does not have method AdsInterstitialDisplay. Class RunnerJNILib does not have method AdsInterstitialAvailable. Class RunnerJNILib does not have method DisableAds. Class RunnerJNILib does not have method AdsEvent. Class RunnerJNILib does not have method AdsEventPreload. Class RunnerJNILib does not have method AdsDisplayWidth. Class RunnerJNILib does not have method AdsDisplayHeight. Class RunnerJNILib does not have method LeaveRating. Class RunnerJNILib does not have method EnableInAppBilling. Class RunnerJNILib does not have method RestoreInAppPurchases. Class RunnerJNILib does not have method AcquireInAppPurchase. Class RunnerJNILib does not have method ConsumeInAppPurchase. Class RunnerJNILib does not have method GetInAppPurchaseDetail. Class RunnerJNILib does not have method FacebookInit. Class RunnerJNILib does not have method FacebookLogin. Class RunnerJNILib does not have method FacebookAccessToken. Class RunnerJNILib does not have method FacebookUserId. Class RunnerJNILib does not have method FacebookGraphRequest. Class RunnerJNILib does not have method FacebookDialog. Class RunnerJNILib does not have method FacebookInviteDialog. Class RunnerJNILib does not have method FacebookLogout. Class RunnerJNILib does not have method FacebookLoginStatus. Class RunnerJNILib does not have method FacebookCheckPermission. Class RunnerJNILib does not have method FacebookRequestPermissions. Class RunnerJNILib does not have method HttpGet. Class RunnerJNILib does not have method HttpPost. Class RunnerJNILib does not have method HttpRequest. Class RunnerJNILib does not have method PlayMP3. Class RunnerJNILib does not have method ShowMessage. Class RunnerJNILib does not have method setSystemUIVisibilityFlags. Class RunnerJNILib does not have method InputString. Class RunnerJNILib does not have method ShowQuestion. Class RunnerJNILib does not have method ShowMessageAsync. Class RunnerJNILib does not have method InputStringAsync. Class RunnerJNILib does not have method ShowQuestionAsync. Class RunnerJNILib does not have method ShowLogin. Class RunnerJNILib does not have method RestrictOrientation. Class RunnerJNILib does not have method isNetworkConnected. Class RunnerJNILib does not have method powersaveEnable. Class RunnerJNILib does not have method analyticsEvent. Class RunnerJNILib does not have method analyticsEventExt. Class RunnerJNILib does not have method cloudStringSave. Class RunnerJNILib does not have method cloudSynchronise. Class RunnerJNILib does not have method DumpUsedMemory. Class RunnerJNILib does not have method PushLocalNotification. Class RunnerJNILib does not have method PushGetLocalNotification. Class RunnerJNILib does not have method PushCancelLocalNotification. Class RunnerJNILib does not have method GetUDID. Warning, stubbed function "RunnerJNILib_GetDefaultFrameBuffer". Could not look up method getPackageManager, NULL class. Class RunnerJNILib does not have field ms_context. Could not look up method hasSystemFeature, NULL class. Warning, stubbed function "iface_DeleteLocalRef". LOG[yoyo]: android.software.leanback = 0 LOG[yoyo]: MANUFACTURER = JohnnyonFlame AL lib: (EE) ALCplaybackAlsa_mixerProc: Wait timeout... buffer size too low? AL lib: (EE) ALCplaybackAlsa_mixerProc: Wait timeout... buffer size too low? AL lib: (EE) ALCplaybackAlsa_mixerProc: Wait timeout... buffer size too low? AL lib: (EE) ALCplaybackAlsa_mixerProc: Wait timeout... buffer size too low? AL lib: (EE) ALCplaybackAlsa_mixerProc: Wait timeout... buffer size too low? AL lib: (EE) ALCplaybackAlsa_mixerProc: Wait timeout... buffer size too low?
The last line regarging the mixer buffer size repeats in the log file for as long as the process is running.
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.