RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Building latest ScummVM with "The Longest Journey" Playable

    Scheduled Pinned Locked Moved Ideas and Development
    scummvmglespatchscriptmodule
    4 Posts 2 Posters 1.7k 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.
    • LolonoisL
      Lolonois
      last edited by Lolonois

      Update February 2022: As with latest changes in ScummVM and provided binaries of ScummVM (2.6.0-git) in RetroPie it is no longer needed to to the below limbo. TLJ can be played on a Rpi3 with the software renderer enabled. See also here for a related discussion: https://retropie.org.uk/forum/topic/32216/myst-iii-don-t-running-well-on-pi3b

      --- snip ---

      I was puzzled about the note in another thread it was communicated that The Longest Journey (TLJ) is not startable with the latest scummvm. As there is/was no "outcry" of scummvm users on other platforms that the TLJ is not playable, I strongly assumed the cause is related to how scummvm is build on retropie and no regression in scummvm itself.

      It turned out that with some changes to the configure build flags TLJ does run well. :-)

      Currently the below changes are only verified to be working on a Rpi4 (Retropie 4.7.11) with scummvm master.

      The reason why I do table it here is to ask what is needed to make it also run on a Rpi3 (e.g. with the renderer opengl_shaders as the residualvm build does?) and who wants to volunteer to test it on Rpi3?
      (I guess on any other smaller HW than a Rpi3 it is not feasible to run TLJ at all.)

      So, these are the changes to the scriptmodule to make TLJ run like charm on a Rpi4 (note that also the --host=raspberry is removed):

      diff --git a/scriptmodules/emulators/scummvm.sh b/scriptmodules/emulators/scummvm.sh
      index da4ccb90..8a6f9af8 100644
      --- a/scriptmodules/emulators/scummvm.sh
      +++ b/scriptmodules/emulators/scummvm.sh
      @@ -13,7 +13,8 @@ rp_module_id="scummvm"
       rp_module_desc="ScummVM"
       rp_module_help="Copy your ScummVM games to $romdir/scummvm"
       rp_module_licence="GPL2 https://raw.githubusercontent.com/scummvm/scummvm/master/COPYING"
      -rp_module_repo="git https://github.com/scummvm/scummvm.git v2.2.0"
      +###rp_module_repo="git https://github.com/scummvm/scummvm.git v2.2.0"
      +rp_module_repo="git https://github.com/scummvm/scummvm.git master"
       rp_module_section="opt"
       rp_module_flags=""
       
      @@ -42,16 +43,10 @@ function build_scummvm() {
           local params=(
               --enable-release --enable-vkeybd
               --disable-debug --disable-eventrecorder --prefix="$md_inst"
      +        --opengl-mode=auto
           )
      -    isPlatform "rpi" && isPlatform "32bit" && params+=(--host=raspberrypi)
      -    isPlatform "gles" && params+=(--opengl-mode=gles2)
      -    # stop scummvm using arm-linux-gnueabihf-g++ which is v4.6 on
      -    # wheezy and doesn't like rpi2 cpu flags
      -    if isPlatform "rpi"; then
      -        CC="gcc" CXX="g++" ./configure "${params[@]}"
      -    else
      -        ./configure "${params[@]}"
      -    fi
      +    isPlatform "gles" && params+=(--force-opengl-game-es2)
      +    ./configure "${params[@]}"
           make clean
           make
           strip "$md_build/scummvm"
      
      

      Notes:

      If you want to reduce compile time add to the params these switches --disable-all-engines --enable-engine=stark.

      If you encounter the output during configure like:

      Checking for OpenGL for game... yes (shaders disabled)
      

      or

      Checking for OpenGL for game... no
      

      you can stop the build rightaway: TLJ will not run, scummvm will terminate with "No renderers have been found for this game"

      Cheers

      1 Reply Last reply Reply Quote 1
      • P
        plimbs
        last edited by

        @Lolonois Thanks for your efforts here.
        I finally had a chance to try it out. Unfortunately, it still doesn't work.

        I really think the issue is specific to the Pi 3. I also have a Pi 4 set up with RetroPie, and Longest Journey works great on that device with the final ResidualVM release. So, I guess I would expect it to work out of the box, so to speak, in ScummVM.

        I have tons of ScummVM games, so I did the whole lengthy build here. Made sure I didn't see the warnings you called out. Good news is the build change doesn't seem to break any other games. I only had time to try a few, but Grim Fandango still runs as does Blade Runner and PQ1 VGA.

        The runncommand.log for TLJ still gives the same error as before:

        pi@retropie3:~ $ cat /dev/shm/runcommand.log
        Parameters:
        Executing: bash /home/pi/RetroPie/roms/scummvm/+Start\ ScummVM.sh "tlj-win"
        Virtual keyboard pack 'vkeybd_default' loaded successfully
        WARNING: Could not get GLSL version!
        Could not compile shader box.vertex: !
        User picked target 'tlj-win' (engine ID 'stark', game ID 'tlj')...
           Looking for a plugin supporting this target... Stark
        Debugger started, type 'exit' to return to the game.
        Type 'help' to see a little list of commands and variables.
        ERROR: Could not compile shader box.vertex: !
        /home/pi/RetroPie/roms/scummvm/+Start ScummVM.sh: line 4:  1666 Segmentation fault      /opt/retropie/emulators/scummvm/bin/scummvm --fullscreen --joystick=0 --                                extrapath="/opt/retropie/emulators/scummvm/extra" $game
        
        
        LolonoisL 1 Reply Last reply Reply Quote 0
        • LolonoisL
          Lolonois @plimbs
          last edited by

          @plimbs and all. I had succcess. I resinstalled a RPI3 with the latest RetroPie image on it. It turned out that vc4-fkms-v3d has to be enabled in the boot config:

          Open /boot/config.txt and scroll all down.
          Then remove the # before dtoverlay=vc4-fkms-v3 to enable it,
          safe file, reboot:

          
          ...
          
          [all]
          dtoverlay=vc4-fkms-v3d
          
          ...
          

          It should not be needed to recompile scummvm. I built it with

          --opengl-mode=gles2 --force-opengl-game-es2

          but I assume

          --opengl-mode=auto --force-opengl-game-es2

          will also work. Maybe you can confirm which configure switches worked for you @plimbs .

          Here is my ScummVM start output:

          /opt/retropie/emulators/scummvm/bin/scummvm --fullscreen --joystick=0 --gfx-mode=hq3x --extrapath=/opt/retropie/emulators/scummvm/extra --path=The Longest Journey tlj
          Virtual keyboard pack 'vkeybd_default' loaded successfully
          User picked target 'tlj' (engine ID 'stark', game ID 'tlj')...
             Looking for a plugin supporting this target... Stark
          INFO: OpenGL Vendor: Broadcom
          INFO: OpenGL Renderer: VC4 V3D 2.1
          INFO: OpenGL Version: 2.1 Mesa 19.3.2
          INFO: OpenGL Red bits: 8
          INFO: OpenGL Green bits: 8
          INFO: OpenGL Blue bits: 8
          INFO: OpenGL Alpha bits: 8
          INFO: OpenGL Z buffer depth bits: 24
          INFO: OpenGL Double Buffer: 1
          INFO: OpenGL Stencil buffer bits: 8
          INFO: GLEW Version: 2.1.0
          INFO: GLSL version: 1.20
          INFO: OpenGL Vendor: Broadcom
          INFO: OpenGL Renderer: VC4 V3D 2.1
          INFO: OpenGL Version: 2.1 Mesa 19.3.2
          INFO: OpenGL Red bits: 8
          INFO: OpenGL Green bits: 8
          INFO: OpenGL Blue bits: 8
          INFO: OpenGL Alpha bits: 8
          INFO: OpenGL Z buffer depth bits: 24
          INFO: OpenGL Double Buffer: 1
          INFO: OpenGL Stencil buffer bits: 8
          INFO: GLEW Version: 2.1.0
          INFO: GLSL version: 1.20
          

          ... and then the magic starts :)

          TLJ starts and runs smooth in the cutscenes and in the game (just started a game and walked around and examined the scenery a bit).

          Epilog: You may note that emulationsstation won't start any more ("greets" you with the (infamous) "already in use?" question (can't recall the exact message from my memory), but this can be easily remediated:

          pi@retropie:~ $ cd RetroPie-Setup/
          pi@retropie:~/RetroPie-Setup $ sudo ./retropie_packages.sh emulationstation 
          

          Other things I did, but I assume they are unrelated:

          1. Did update to latest RetroPie-Setup Script
          2. Did update all Raspian Packages
          3. Installed libglew headers for ./configure of scummvm: apt-get install libglew-dev

          HTH

          PS: However, I installed a minimal RetroPie (ES and ScummVM). I did not test other emulators. I can not tell what possible knock-on effects the vc4-fkms-v3d enabling may have.

          Maybe someone of the community can chime in why vc4-fkms-v3d is initially disabled at RetroPie?

          Thanks

          P 1 Reply Last reply Reply Quote 0
          • P
            plimbs @Lolonois
            last edited by

            @lolonois I am really sorry. I finally got back to playing with the Pi today. I was all set to try out your hard work here. I thought I should begin with an updated ScummVM release, so I did that first. Lo and behold, TLJ works! I was able to boot and play the prologue scene.

            I definitely appreciate your help, though!

            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.