Skip to content

scummvm standalone improvements

Jason Tomsic edited this page Oct 6, 2021 · 24 revisions

PRIMARY GOAL: to create an easy way to create .svm files and start them using the standalone ScummVM emulator. See dev notes below for more details. These changes were built into citral's scummvm standalone port (use the multi version) but you can find instructions to add them to a different port below.

configuring simplemenu

update your section_groups/whatever.ini to include this section:

[SCUMMVM]
execs = /path/to/apps/scummvm_gcw0_multi.opk
romDirs = /path/to/roms/scummvm/
romExts = .svm

game autodetection

  • place an empty text file detect.svm in the same folder as all your games:
- roms/scummvm/
    - detect.svm
    - Game One/
        - (game one files)
    - Another Game/
        - (another game files)
  • start the detect.svm file with ScummVM
    • in simplemenu: it will show as detect
    • in gmenu: use the non-ui icon and navigate to detect.svm
  • the loading screen will show for a few moments
    • if you have many large games, this will take longer
    • the games will be detected and added to the UI
    • the games' .svm files will be automatically created for each of the games
  • the games' .svm files can be used to start the game directly, skipping the UI

manually creating .svm files

  • the game must exist in the UI for this method to work, either added manually or using the detect.svm method above
  • the file can can be named anything, giving you flexibility to see whatever you want in simplemenu
  • the file is basically just a text file that contains a GameID as it shows in the UI Edit Game menu
    • e.g. Sam & Max.svm contains only the text samnmax
    • note: the GameID may be different from the game's short name, this is different from retroarch's instructions

dev notes

I had a few other goals while creating these improvements.

I tried to make it so this could be done without adding another icon into gmenu.

  • One option would be to distribute an unsquashed .opk file with a specific .sh file. This option is more cumbersome for users than distributing a .opk file (see xmame).
  • Another option I researched is to target a misnamed .desktop file with opkrun. Unfortunately this is impossible, since opkrun only reads proper .desktop files.
  • Ultimately I decided this goal was not worth it.

I tried to make this work where the .svm files didn't need to have any contents, so they are easier to create, and closely follow RetroGameCorps instructions.

  • The first option I researched was running the game referencing the .svm's path. It turns out this option is destructive - it removes the game from the UI if it already exists, thus deleting any custom settings.
  • I also tried enforcing a specific filename (GameID.svm, e.g. samnmax.svm), to run it by GameID. This option wasn't ideal because it requires you to add the game to the UI manually first, and it also doesn't allow flexibility in simplemenu, since you must show the game as its GameID, and not the full name.
  • I tossed around the idea of building some smart detection between these two options, but it is very difficult to get right, and will probably not behave how 50% of people expect.
  • I ended up deciding to build an automated way to add games and create properly formatted .svm files. This is a very simple and robust solution that allows for name flexibility in simplemenu, quickly adding games to the UI for custom per-game settings, and foolproof execution of those games.

.opk updates (optional)

These changes are already in citral's standalone port. if you wish to use a different port, you can adapt these instructions to add these features.

startGame.gcw0.desktop

  • copy default.gcw0.desktop to startGame.gcw0.desktop
  • change Exec value from ./scummvm to ./scummvm.sh %f
    • everything else on that line should stay the same

startUI.gcw0.desktop

  • rename file from default.gcw0.desktop to startUI.gcw0.desktop
  • change Name value to ScummVM UI

scummvm.sh

  • copy the file from here
  • run chmod +x scummvm.sh

Clone this wiki locally