• 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.5k 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.
  • P
    pi2user
    last edited by 29 Jan 2022, 18:56

    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.

    1 Reply Last reply Reply Quote 0
    • S
      sleve_mcdichael
      last edited by sleve_mcdichael 29 Jan 2022, 22:32

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

      P 1 Reply Last reply 31 Jan 2022, 01:06 Reply Quote 0
      • P
        pi2user @sleve_mcdichael
        last edited by pi2user 31 Jan 2022, 01:06

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

        S 1 Reply Last reply 31 Jan 2022, 04:53 Reply Quote 0
        • S
          sleve_mcdichael @pi2user
          last edited by 31 Jan 2022, 04:53

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

          P 1 Reply Last reply 31 Jan 2022, 23:41 Reply Quote 0
          • P
            pi2user @sleve_mcdichael
            last edited by 31 Jan 2022, 23:41

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

            S 2 Replies Last reply 1 Feb 2022, 00:38 Reply Quote 0
            • S
              sleve_mcdichael @pi2user
              last edited by sleve_mcdichael 2 Jan 2022, 00:41 1 Feb 2022, 00:38

              @pi2user

              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"
              

              What's this SDL_VIDEO stuff before the command? Mine doesn't have that. Is that the runcommand display settings? I don't know why that would affect the audio output but try clearing that and running whatever it thinks your default res is? (Or do you have to do this because 4k? Is setting 1080 in /boot/config.txt not enough? Lol I have no idea how it works, my TV is only 720p and it "just works" for everything except one port that I had to force 640x480 mode.)

              Mine also doesn't have the repeating "ALCplaybackAlsa_mixer" error at the end but otherwise looks pretty similar (I ran this from the build dir to not step on my installed Release configuration, but I did checked it through runcommand too and it does not put those SDL vars before the command like yours shows). I don't know what "code cave" is but yours is bigger. Also all of my "missing..." warnings are in a different order but that's probably immaterial, I imagine.

              pi@retropie:~ $ ~/RetroPie-Setup/tmp/build/gmloader/build/gmloader ~/RetroPie/roms/ports/droidports/am2r_155.apk 
              code cave: 1860 bytes (@0x403AA8BC).
              Missing: mktime64
              Missing: rename
              Missing: perror
              Missing: alcGetString
              Missing: alcResumeCurrentDevice
              Missing: alcPauseCurrentDevice
              Missing: shutdown
              Missing: close
              Missing: select
              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: getpeername
              Missing: mkstemp
              Missing: fdopen
              Missing: localtime
              Missing: zError
              Missing: tmpfile
              Missing: munmap
              Missing: mmap
              Missing: __assert2
              Missing: opendir
              Missing: closedir
              Missing: readdir
              Missing: pthread_detach
              Missing: getpid
              Missing: open
              Missing: write
              Missing: vfork
              Missing: getppid
              Missing: execl
              Missing: _exit
              Missing: umask
              Missing: mknod
              Missing: read
              Missing: sleep
              Missing: flock
              Missing: poll
              Missing: access
              Missing: siglongjmp
              Missing: alarm
              Missing: sigsetjmp
              Missing: inet_ntop
              Missing: strerror_r
              Missing: getsockname
              Missing: inet_pton
              Missing: strtok_r
              Missing: memrchr
              Missing: freeaddrinfo
              Missing: fstat
              Missing: lseek
              Missing: geteuid
              Missing: getpwuid
              Missing: gmtime_r
              Missing: strlcat
              Missing: basename
              Missing: getuid
              Unable to find method `ExpandCompressedFile` (aka: 'Java_com_yoyogames_runner_RunnerJNILib_ExpandCompressedFile') for 'RunnerJNILib'.
              Saving to folder /home/pi/.config/gmloader/am2r_155/.
              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.
              Class RunnerJNILib does not have method GetApplicationContext.
              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
              yoyo died.
              AL lib: (EE) alc_cleanup: 1 device not closed
              pi@retropie:~ $ 
              

              If someone here can't help you out, the author has also helped me out in the past. You could start an issue on the GitHub or he's also on discord. I won't post his actual address but he's posted it himself, here: https://github.com/JohnnyonFlame/droidports/pull/2#issuecomment-989148953

              P 1 Reply Last reply 1 Feb 2022, 00:51 Reply Quote 0
              • S
                sleve_mcdichael @pi2user
                last edited by 1 Feb 2022, 00:48

                @pi2user (a thought: did you build your APK with the HQ music pack, or the regular version? I just have the regular in mine.)

                1 Reply Last reply Reply Quote 0
                • P
                  pi2user @sleve_mcdichael
                  last edited by 1 Feb 2022, 00:51

                  @sleve_mcdichael
                  Well this is embarrassing. After doing an 'apt upgrade', the sound on this is working just fine. I read in another thread where there was a similar issue the advice was to upgrade and well, I wasnt expecting that to work. But it has!

                  S 1 Reply Last reply 1 Feb 2022, 01:15 Reply Quote 0
                  • S
                    sleve_mcdichael @pi2user
                    last edited by 1 Feb 2022, 01:15

                    @pi2user haha, cheers! I wonder which one was giving you problems. Did you happen to catch which packages were upgraded?

                    P 1 Reply Last reply 1 Feb 2022, 23:31 Reply Quote 0
                    • P
                      pi2user @sleve_mcdichael
                      last edited by 1 Feb 2022, 23:31

                      @sleve_mcdichael
                      Sorry it's not much help but it was these ones:

                        base-files bind9-host bluetooth bluez debconf debconf-i18n debconf-utils distro-info-data firmware-atheros firmware-brcm80211 firmware-libertas
                        firmware-misc-nonfree firmware-realtek libasound2 libasound2-data libasound2-dev libavcodec-dev libavcodec58 libavdevice-dev libavdevice58 libavfilter-dev
                        libavfilter7 libavformat-dev libavformat58 libavutil-dev libavutil56 libbind9-161 libbluetooth3 libc-bin libc-dev-bin libc-l10n libc6 libc6-dbg libc6-dev
                        libdns-export1104 libdns1104 libgssapi-krb5-2 libicu63 libisc-export1100 libisc1100 libisccc161 libisccfg163 libk5crypto3 libkrb5-3 libkrb5support0
                        liblwres161 libnftnl11 libnss3 libntfs-3g883 libpam-systemd libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpostproc-dev libpostproc55
                        libraspberrypi-bin libraspberrypi-dev libraspberrypi-doc libraspberrypi0 libsndfile1 libssl1.1 libswresample-dev libswresample3 libswscale-dev libswscale5
                        libsystemd0 libtiff5 libudev-dev libudev1 libvlc-bin libvlc-dev libvlc5 libvlccore-dev libvlccore9 linux-libc-dev locales multiarch-support ntfs-3g
                        openssl pi-bluetooth policykit-1 psmisc python3-debconf raspberrypi-bootloader raspberrypi-kernel raspberrypi-net-mods raspberrypi-sys-mods rpi-eeprom
                        systemd systemd-sysv tzdata udev vlc vlc-bin vlc-data vlc-plugin-base vlc-plugin-qt vlc-plugin-video-output
                      

                      I also increased the gpu mem from 64mb to 96mb but I suspect it was the updates that fixed it.

                      1 Reply Last reply Reply Quote 1
                      44 out of 44
                      • First post
                        44/44
                        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