• 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

GemRB support?

Scheduled Pinned Locked Moved Help and Support
gemrb
64 Posts 6 Posters 10.2k 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.
  • S
    Stuffu
    last edited by 22 Jun 2020, 12:58

    Hi

    I have tried to get GemRB to run on Rpi4 for a while but end up not getting the result I want. Primarily resolution and screen position.

    So then I posted an issue on the GemRB GitHub https://github.com/gemrb/gemrb/issues/836 trying to find a way forward.

    I don't have the skills to investigate further but maybe someone can help out finding out how to get the latest build of GemRB on RetroPie?

    "chilvence commented 7 minutes ago
    From what I can tell, the setup script pulls the source into a temporary folder RetroPie-Setup/tmp, installs the game files under /opt/ , then closes the terminal used to build and cleans up the tmp directory, so unfortunately it is not geared in a way that helps us. I'm not able to hazard a guess at what parameters retropie is using to run the script, you would have to ask over there for help getting a build log (or you could just try to take a camera recording of the error)

    The only other thing I can suggest at this point is add -DDISABLE_WERROR=ON to the options given to cmake in the gemrb.sh retropie script, in the function build_gemrb()

    It is definitely possible to build and run both development branches of gemrb on the pi4 though, it's just a case of finding what step we are missing."

    Anyone that can contribute here? :) It would be awesome to have GemRB working on RetroPie!

    Thanks!

    1 Reply Last reply Reply Quote 0
    • M
      mitu Global Moderator
      last edited by 22 Jun 2020, 13:24

      Ideally, on a PI4 GemRB should be using SDL2. SDL1 is ancient and using it on Pi4 exhibits the scaling artifacts you've noticed. Maybe adding a GemRB-SDL2 version of the module would be better and/or enhancing the current version to use dispmanx for scaling.

      1 Reply Last reply Reply Quote 0
      • C
        chilvence
        last edited by 22 Jun 2020, 13:47

        GemRB does build and run with SDL2 , but it may not be enough to solve the resolution issue here, I may have spoken too soon.

        The version currently used in RetroPie is 0.8.4, which is very old, and we'd like to update it in any case, but true resolution independence only comes with using the development branch.

        The historical solution was to use the compromise, it was almost certain that BG2/IWD players would be playing with the widescreen mod installed in the past, which when installed would modify the UI to fit any resolution, so all GemRB needed to do was rely on that fact. Unfortunately, that solution does not work for projects like RetroPie.

        True resolution independence is already supported in the development branches, but they will not be stable for a while yet.

        Is there any way to find some sort of compromise for RetroPie users in the meantime?

        M 1 Reply Last reply 22 Jun 2020, 14:06 Reply Quote 0
        • M
          mitu Global Moderator @chilvence
          last edited by 22 Jun 2020, 14:06

          @chilvence said [..]

          Thanks for stopping by :).

          The version currently used in RetroPie is 0.8.4, which is very old, and we'd like to update it in any case, but true resolution independence only comes with using the development branch.

          That can be easily arranged - we can update to the latest tagged release (0.8.6 is it ?).

          The historical solution was to use the compromise, it was almost certain that BG2/IWD players would be playing with the widescreen mod installed in the past, which when installed would modify the UI to fit any resolution, so all GemRB needed to do was rely on that fact. Unfortunately, that solution does not work for projects like RetroPie.

          Why is that ? Does the mod installer needs to know the desired resolution when patching the original game files ? Or it's not compatible with Linux/ARM ? Sorry, I don't have any experience with GemRB.

          For what is worth, the RetroPie launcher can pass the current/chosen screen resolution at runtime, so if GemRB accepts CLI parameters to set the resolution, that would be ideal.

          I can put together a SDL2 build scriptmodule to test how scaling works on Pi4.

          1 Reply Last reply Reply Quote 0
          • C
            chilvence
            last edited by 22 Jun 2020, 14:22

            Yes, 0.8.6 is the latest stable release (although there has been a ton of work since that version as well!) I know the GemRB dev's definitely prefer people to use that than previous versions, there is a massive difference in bugfixes between each release.

            I am not sure how flexible the mod installer is, it is based on an Infinity Engine mod tool called Weidu, and it needs to know where the game data is to patch, I'm not sure how well that fits the installation process. It is currently the only way to support resolutions higher than the standard 640x480 / 800x600 for the classic CD/Gog versions of the games.

            I think the problem Stuffu was having was it doesn't run on arm, but I could have sworn the tool itself was open source. [ it is https://github.com/WeiDUorg/weidu ]

            I'm not that well versed in its secrets myself, it was (is?) just a well known staple of infinity engine mods. It is a command line tool, even though I mostly used it on windows, but I have never tried it on a linux system. I will see if I can convince my pi to run it.

            1 Reply Last reply Reply Quote 0
            • M
              mitu Global Moderator
              last edited by 22 Jun 2020, 14:35

              @chilvence said in GemRB support?:

              I think the problem Stuffu was having was it doesn't run on arm, but I could have sworn the tool itself was open source. [ it is https://github.com/WeiDUorg/weidu ]

              It may be easier to run the mod installer/patcher on Windows, then copy the resulting modified files over to a RetroPie installation.

              1 Reply Last reply Reply Quote 0
              • C
                chilvence
                last edited by 22 Jun 2020, 19:32

                I've been informed by Lynx (one of the main developers) that it is indeed SDL2 that is they key to allowing at least the basic "window scaling" feature, after building my own tree to v0.8.6 I was able to maximise the window in the desktop

                However, I don't know how it could be configured to do this at launch, because I haven't done much digging into RetroPie. I'm going to try modifying the gemrb.sh RP install script to use SDL2 and v0.8.6, but at the moment github seems to be down for me.

                1 Reply Last reply Reply Quote 0
                • C
                  chilvence
                  last edited by chilvence 22 Jun 2020, 20:04

                  @mitu

                  I was able to use these 3 terminal commands to maximize the window to the size of the desktop

                  sudo apt install wmctrl

                  (it wasn't installed by default on my retropie)

                  wmctrl -l | grep GemRB

                  To get the window handle number (in hex)

                  wmctrl -ir <window_id> -b add,maximized_vert,maximized_horz

                  But I am not sure that will work for basic Retropie setups, my RP is basically an image of Raspian with RetroPie built from source, because I wanted a full desktop environment for general use and not just an emulation box. Does that sound like it might work though?

                  M 1 Reply Last reply 22 Jun 2020, 20:09 Reply Quote 0
                  • M
                    mitu Global Moderator @chilvence
                    last edited by 22 Jun 2020, 20:09

                    @chilvence said in GemRB support?:

                    Does that sound like it might work though?

                    It should be an easier way to do this, but I haven't had a chance to run any tests. Isn't there a 'fullscreen' configuration option that can be set to do this automatically ?

                    C 1 Reply Last reply 22 Jun 2020, 20:28 Reply Quote 0
                    • C
                      chilvence @mitu
                      last edited by chilvence 22 Jun 2020, 20:28

                      @mitu There is, and it also works on my end an with sdl2/0.8.6 build, but Stuffu mentioned in the original thread that he tried it and there was an issue. Although with recent knowledge, I think it was simply that SDL1.2 was used (which is being phased out of GemRB slowly anyway)

                      @Stuffu, if you are not already tired of trying things out, you could try adding

                      -DSDL_BACKEND=SDL2

                      to the cmake arguments in gemrb.sh

                      You'll also need to change the libsdl12-dev to just libsdl2-dev in the "function_depends" block, to be sure that sdl2 is installed

                      You might also need to find where the GemRB.cfg files got installed and make sure that the fullscreen option is enabled there, I am not sure if the install script updates them once the game is installed or not (but that's just my own fault for not understanding how cat and sh files work very well)

                      I think github is back online, so I'm trying it out now

                      edit: Ok, I just managed to install from retro-pie setup with the modified gemrb.sh, sdl2 and the config set to fullscreen=1
                      There is still no way for me to test on generic RetroPie though without re-imaging my SD card, so I can't guarantee it will work out of the box for everyone. However, if those changes are not enough to solve the problem, I am willing to go further trying to solve this.

                      S 1 Reply Last reply 22 Jun 2020, 20:47 Reply Quote 1
                      • S
                        Stuffu @chilvence
                        last edited by 22 Jun 2020, 20:47

                        @chilvence I will test it in a moment, getting back soon with results! :)

                        Thanks for looking into this!

                        1 Reply Last reply Reply Quote 0
                        • C
                          chilvence
                          last edited by 22 Jun 2020, 20:50

                          No problem at all, I would really like to see this sorted so that people only have to worry about installing the game data!

                          S 1 Reply Last reply 22 Jun 2020, 21:06 Reply Quote 0
                          • S
                            Stuffu @chilvence
                            last edited by 22 Jun 2020, 21:06

                            @chilvence Somehow it won't build (using 0.8.6):

                            "Error running 'git clone --recursive --depth 1 --branch 0.8.6 https://github.com/gemrb/gemrb.git /home/pi/RetroPie-Setup/tmp/build/gemrb' - returned 128

                            gemrb.sh here https://pastebin.com/k05xnx8K if you can spot what's wrong...

                            1 Reply Last reply Reply Quote 0
                            • C
                              chilvence
                              last edited by chilvence 22 Jun 2020, 21:22

                              Git error 128 seems to get hits about having a bad git staging tree. You may need to manually purge the git source tree (but I think RP is supposed to be doing that each time?)

                              Also, it's very easy to miss, but it should be v0.8.6 rather than 0.8.6, even I keep typing it wrong.

                              Other than that, your command line looks ok, just don't forget to modify the config entries lower down to use fullscreen.

                              Just to be sure, it also couldn't hurt to completely remove the gemrb package and start from scratch, the results of experimenting this way can sometimes lead to unpredictable errors.

                              You should also be able to inspect the build log that git created, on my system it is in RetroPie-Setup/logs, if you can find, unzip and paste one of those logs, that would really help diagnose the issue

                              S 1 Reply Last reply 22 Jun 2020, 21:40 Reply Quote 0
                              • S
                                Stuffu @chilvence
                                last edited by 22 Jun 2020, 21:40

                                @chilvence It works! It was the missing "v"! When launching a game it now scales properly and is centered.

                                Fullscreen option doesn't work though. Tried with IWD2, fullscreen option is also enabled in graphics menu in game but it's not using the full display. It's not the most important part at least for me, so for me I'm happy, big thanks!

                                I see one thing not really working in IWD2, the videos are full of artefacts. It was that before as well, so it might be something with my game files.

                                1 Reply Last reply Reply Quote 0
                                • C
                                  chilvence
                                  last edited by 22 Jun 2020, 21:52

                                  Glad we solved one problem, I will have to see if I can find another SD card to put base RetroPie and see if I can resolve the scaling issue

                                  If nothing else, the aim is to deal with the resolution automatically, so the next versions of GemRB will not have these kind of difficulties

                                  I will have to let you down gently though, BG1/2 and IWD are much better supported than PST or IWD2 : you can still play the latter, but you will run into unsupported features or gameplay bugs because they are still both heavily in development. Just a hint at the todo list:

                                  https://github.com/gemrb/gemrb/issues?q=is%3Aopen+is%3Aissue+label%3A"game%3A+iwd2"+
                                  https://github.com/gemrb/gemrb/issues?q=is%3Aopen+is%3Aissue+label%3A"game%3A+pst"

                                  You will have much more joy with either game if you use the 'master' branch, but there is still a lot of work to do to make them fully playable

                                  S 1 Reply Last reply 22 Jun 2020, 22:01 Reply Quote 1
                                  • S
                                    Stuffu @chilvence
                                    last edited by 22 Jun 2020, 22:01

                                    @chilvence To be honest, the BG Games are the only ones that I have played a lot. The other ones I have barely touched. It’s just that I have only the enhanced versions of BG1/2 and they are from Mac App Store, I don’t want to buy them again from GOG just to get the original versions. So I’m just stingy... But someday I will probably buy them again :)

                                    By the way should I bother about the missing directories GemRB complains about when launching a game? Like missing portraits folder or CD X/Data? It launches just fine, but might be a problem later in game maybe?

                                    C 1 Reply Last reply 22 Jun 2020, 22:08 Reply Quote 1
                                    • C
                                      chilvence @Stuffu
                                      last edited by 22 Jun 2020, 22:08

                                      @Stuffu Some of the warnings are from the resource manager trying different directories to find the data - if it cannot find what it needs, the game would not load so you can usually ignore them. It's just a result of the modular design of the engine, the resource manager doesn't know exactly what the particular game will load, it just continually spits out a 'debug' output so that we can use it to diagnose problems. The game is actually very loud in the console for this reason.

                                      S 1 Reply Last reply 22 Jun 2020, 22:10 Reply Quote 0
                                      • S
                                        Stuffu @chilvence
                                        last edited by 22 Jun 2020, 22:10

                                        @chilvence Good to know, again big thanks! This is going to be a good summer :)

                                        C 1 Reply Last reply 22 Jun 2020, 22:11 Reply Quote 0
                                        • C
                                          chilvence @Stuffu
                                          last edited by 22 Jun 2020, 22:11

                                          @Stuffu Good luck, don't hesitate to get more support on github or the discord channel if you need it

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