Unofficial 3DS ScummVM builds

Discussion in '3DS - Homebrew Development and Emulators' started by MrHuu, Jun 13, 2019.

  1. MrHuu
    OP

    MrHuu GBAtemp Regular

    Member
    4
    Sep 19, 2015
    Netherlands
    [​IMG]

    Github: https://github.com/MrHuu/scummvm

    Here's a customized version of ScummVM for the 3DS. This will allow you to build your own stand-alone .cia games without to much effort.
    I've included a simple bash script which takes care of most actions.

    Currently, assets for 15 games are included. More will follow when i'm able to create more assets (banners/icons)
    GameID

    Save-games and scummvm.ini will be generated in 'sdmc:/3ds/data/scummvm/*GAMEID/'


    Issues:
    A few minor issues still remain as this is still very much a WIP.
    -scummvm settings are not being saved on first launch.
    A workaround for this is to manually add the game ID to the .ini file generated at first launch.
    Example: scummvm.ini
    With the gameid added, saving settings won't be an issue anymore.


    Instructions:

    -Copy gamefiles to the scummvm source folder in: 'scummvm/backends/platform/3ds/app/*GAMEID*/game'
    -Run './build_custom_3ds.sh *GAMEID*'

    *Replace *GAMEID* with the ID of the desired game, e.g. BBVS (uppercase!)

    The script will copy all required files and build the custom .cia in the 'pkg' folder.


    Screenshots:
    [​IMG][​IMG][​IMG]


    Credits:

    All of the Team ScummVM members ofcourse!
     
  2. Jmbenetti

    Jmbenetti Member

    Newcomer
    1
    May 14, 2019
    Argentina
    Beautiful! I've been waiting for this, great Jon! I believe I'll be trying it next week, as I'm on a travel now.
    One question: on the regular version of Scummvm for 3ds I couldn't play Monkey Island 2, as it won't let me open the virtual keyboard for the copy protección. Does it work on your build? Thanks.
     
  3. RedL

    RedL Advanced Member

    Newcomer
    2
    Aug 5, 2018
    France
    I love you.
     
  4. MrHuu
    OP

    MrHuu GBAtemp Regular

    Member
    4
    Sep 19, 2015
    Netherlands
    Yes, virtual keyboard works fine. All required files will be included in the .cia's romfs.
    On regular scummvm make sure you have this file available on your sd: 'sdmc:/3ds/scummvm/kb/vkeybd_small.zip'

    Also, are you familiar with the Ultimate Talkie versions of Monkey Island 1 & 2? Those have the copy protection removed.
    http://www.gratissaugen.de/ultimatetalkies/

    Love you more.
     
  5. Nitrus

    Nitrus Member

    Newcomer
    2
    Sep 27, 2018
    United States
    Excellent work!
     
  6. Rajo

    Rajo Member

    Newcomer
    1
    May 24, 2019
    Czech Republic
    I'm getting this on compilation

    Code:
    TFLibrary::TTFLibrary()':
    
    /Users/stooovie/Downloads/scummvm-master/graphics/fonts/ttf.cpp:87: undefined reference to `FT_Init_FreeType'
    
    /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/8.3.0/../../../../arm-none-eabi/bin/ld: /Users/stooovie/Downloads/scummvm-master/graphics/fonts/ttf.cpp:87: undefined reference to `FT_Init_FreeType'
    
    /opt/devkitpro/devkitARM/bin/../lib/gcc/arm-none-eabi/8.3.0/../../../../arm-none-eabi/bin/ld: graphics/libgraphics.a(ttf.o): in function `Graphics::TTFFont::getKerningOffset(unsigned int, unsigned int) const':
    
    /Users/stooovie/Downloads/scummvm-master/graphics/fonts/ttf.cpp:447: undefined reference to `FT_Get_Kerning'
    
    collect2: error: ld returned 1 exit status
    Any tips? I'm on Mac, devkitPro is installed, Freetype (which is what the error should pertain to) too.

    Thanks!
     
  7. mike a

    mike a GBAtemp Advanced Fan

    Member
    6
    Oct 28, 2014
    United States
    Ok, so I may sound dumb, but what is scummvm, is it a cool game, what kind of game is it
     
  8. RedL

    RedL Advanced Member

    Newcomer
    2
    Aug 5, 2018
    France
    TurdPooCharger likes this.
  9. Rajo

    Rajo Member

    Newcomer
    1
    May 24, 2019
    Czech Republic
    It's an interpreter of the classic adventure games. The scripts and assets are from the original games but scummvm is the actual engine. This means the games can be run on almost any semi-modern system as it's interpreted, not emulated (emulation is more CPU-intensive).
     
  10. MrHuu
    OP

    MrHuu GBAtemp Regular

    Member
    4
    Sep 19, 2015
    Netherlands
    It seems it can't find the FreeType lib, it can be installed as a portlib from DevkitPro's pacman.
    It looks for 'Freetype-config', and the default location for it would be './devkitpro/portlibs/3ds/bin' if you installed it using pacman.

    Instead of running the script, just run:
    Code:
    ./configure --host=3ds 
    You'll get a list of found library's scummvm will use. If it doesn't find the FreeType lib, try pointing to it manually:
    Code:
    ./configure --host=3ds --with-freetype2-prefix=/opt/devkitpro/portlibs/3ds/bin
    Adjust it to make it point to your config file.

    Make sure the path to your configurations is added to your $PATH variable.

    Or force it in the scummvm configure file: https://github.com/MrHuu/scummvm/blob/master/configure#L3003
    Add the line:
    Code:
    _freetypepath="/opt/devkitpro/portlibs/3ds/bin"
    Again, adjust it to make it point to your config file.

    Also, the first few lines of the script (build_custom_3ds.sh) are used to set the environment, this may differ from your installation. Remove of change those if needed.
     
    Rajo likes this.
  11. Rajo

    Rajo Member

    Newcomer
    1
    May 24, 2019
    Czech Republic
    It's weird, "./configure --host=3ds" gives me "Looking C++ compiler... none found!" but "./build_custom_3ds.sh MONKEY" finds
    arm-none-eabi-g++ and goes on to work, resulting in the above error.

    I don't want to rob you of your time, it's probably over my head :)
     
  12. MrHuu
    OP

    MrHuu GBAtemp Regular

    Member
    4
    Sep 19, 2015
    Netherlands
    The first lines in the script are used to setup your devkitpro environment, required for scummvm.
    https://github.com/MrHuu/scummvm/blob/master/build_custom_3ds.sh#L3-L12

    Code:
    export DEVKITPRO=/opt/devkitpro
    export DEVKITARM=$DEVKITPRO/devkitARM
    export CTRULIB=$DEVKITPRO/libctru
    
    export PATH=$DEVKITARM/bin:$PATH
    export PATH=$DEVKITPRO/tools/bin:$PATH
    export PORTLIBS=$DEVKITPRO/portlibs/3ds
    
    Adjust to your setup and enter these lines manually in your terminal once, before running configure.

    Info on how to compile scummvm can also be found at the end of the README.md.
     
  13. Rajo

    Rajo Member

    Newcomer
    1
    May 24, 2019
    Czech Republic
    ./configure --host=3ds DOES list Freetype as YES, but compile gives me the original error anyway. I give up, thanks for your time.
     
  14. MrHuu
    OP

    MrHuu GBAtemp Regular

    Member
    4
    Sep 19, 2015
    Netherlands
    Don't give up that easily! You still have some options.

    First one, try to add the lib manually:

    At https://github.com/MrHuu/scummvm/blob/master/configure#L2509
    Replace:
    Code:
    append_var LIBS "-lcitro3d -lctru"
    With:
    Code:
    append_var LIBS "-lcitro3d -lctru -lfreetype"
    append_var CXXFLAGS "-I$DEVKITPRO/portlibs/3ds/include/freetype2/"
    That should definitely include the lib.

    Or, Second, try it with the lib disabled.

    At https://github.com/MrHuu/scummvm/blob/master/configure#L3003
    Add:
    Code:
    _freetype2=no
    Some engines may need it tho..

    Please feel free to ask any question, could also be useful for other users who may run into similar issues.
     
    Rajo likes this.
  15. Rajo

    Rajo Member

    Newcomer
    1
    May 24, 2019
    Czech Republic
    My /opt/devkitpro folder is missing the required "portlibs" folder. Pacman was installed without any errors.

    EDIT: I'll rather go through the readme more thoroughly one more time
     
    Last edited by Rajo, Jun 16, 2019
  16. Jmbenetti

    Jmbenetti Member

    Newcomer
    1
    May 14, 2019
    Argentina
    Thanks for your work and your time. I've been trying tu use your script, but I can't get it. It gives me two g++ errors:

    unrecognized command line option '-mworld-relocations'
    and
    unrecognized command line option '-mfloat-abi=hard'

    I can't get through this and Google has no results for that errors. I thought it was a problem with the g++ version, but I updated it, and no luck.

    Thanks again.
     
  17. Nitrus

    Nitrus Member

    Newcomer
    2
    Sep 27, 2018
    United States
    @Jmbenetti when you first run the script, it should print out the ./configure output.
    Your first two lines should say:
    Running ScummVM configure...
    Looking for C++ compiler... arm-none-eabi-g++

    Is that the case? If not, there might be a problem with your devkitPro installation.
    EDIT: Also, it might be worth saying what your OS is.
    EDIT2: In case devkitPro is installed in a different location for your OS, or you purposefully installed it elsewhere, take a look at the build script with a text editor, and correct the export paths at its very top.
     
    Last edited by Nitrus, Jun 20, 2019
    Jmbenetti likes this.
  18. Jmbenetti

    Jmbenetti Member

    Newcomer
    1
    May 14, 2019
    Argentina
    Thanks! I'm on Linux Mint. It couldn't find the compiler even after installing Devkitpro, so I forced $CXX yo my g++ path. I'll check what you say :)
     
  19. Nitrus

    Nitrus Member

    Newcomer
    2
    Sep 27, 2018
    United States
    Allright, Mint is Debian, not sure how you installed devkitPro though it should be enough to download the .deb package from here:
    https://github.com/devkitPro/pacman/releases/tag/devkitpro-pacman-1.0.1
    ... and then run:
    Code:
    sudo dpkg -i devkitpro-pacman.deb
    I guess it would be useful to see if the '/opt/devkitpro' path exists at all, and if it has all the files inside.
    The script that MrHuu has written should handle the exports on its own.

    And if you haven't done so already, install the following packages:
    Code:
    dkp-pacman -S 3ds-dev
    dkp-pacman -S devkitpro-pkgbuild-helpers
    dkp-pacman -S 3ds-zlib
    dkp-pacman -S 3ds-libpng
    dkp-pacman -S 3ds-libjpeg-turbo
    dkp-pacman -S 3ds-freetype
    dkp-pacman -S 3ds-libmad
    dkp-pacman -S 3ds-libogg
    dkp-pacman -S 3ds-libvorbisidec
    dkp-pacman -S 3ds-flac
    
     
    Last edited by Nitrus, Jun 20, 2019
  20. Jmbenetti

    Jmbenetti Member

    Newcomer
    1
    May 14, 2019
    Argentina
    Thanks for your help! I had to set the environment variables on the bash profile. Your script is running now. I hope it works :)
     
Loading...