Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
systems:scummvm [2025/05/11 18:31] – Introduced v42 features: autodetection crcerrorsystems:scummvm [2025/05/17 03:33] (current) – typo tovarichtch
Line 40: Line 40:
 ==== Setup games ==== ==== Setup games ====
  
-Since **Batocera v42** it is easier as ever to setup the ScummVM. In the first example we explain the [[#General_Setup|general setup]] that will generally work even in older versions. Later the [[#Autodetection|autodetection]] and the specific setup by using the [[#GameID_or_EngineID|''gameID'' or ''engineID'']] (for example language) is explained.+Since **Batocera v42** it is easier than ever to setup the ScummVM. In the first example we explain the [[#General_Setup|general setup]] that will generally work in older versions and is a solid setup. Later the [[#Autodetection|autodetection]] and the specific setup by using the [[#GameID_or_EngineID|GameID or EngineID]] (for example language) is explained.
  
-As the ultimate setup, there is a small helper script available. This will create the correct ''gameID'' within the auto created ''scummvm''-file. The script will not work if there is a ''scummvm''-file already in the game directory or if the ''gameID'' is already inside the ''scummvm.ini'' file - read more about installation and the usage [[#Use_Setup_Script|here]]. +As the ultimate setup, there is a [[https://raw.githubusercontent.com/crcerror/BATOCERA-Shares/refs/heads/master/ScummVM/scummvm-addgames-v2.sh|small script]] available. This will create the correct ''GameID'' within the auto created ''scummvm''-file. The script will not work if there is a ''scummvm''-file already in the game directory or if the ''GameID'' is already inside the ''scummvm.ini'' file - read more about installation and the usage [[#Use_Setup_Script|here]]. 
  
-Be aware that a kind of priorizing takes place. Highest priority is **file content**, after that the **filename**, then the **autodetection** takes place.+Be aware that a kind of priorizing takes place. Highest priority is **file content**, after that the **filename**, then the **autodetection** takes place. If you enter a false GameID as file content this has highest priority - please take care about this.
  
 === General Setup === === General Setup ===
-Create a directory per game in ''/userdata/roms/scummvm/''. For this example, we will use the game files for **The Day of the Tentacle**. The game files will need to be put in the directory ''/userdata/roms/scummvm/Day_of_the_Tentacle/''. Then, in this game data directory, a blank file named ''<codename>.scummvm'' needs  of the game, like ''tentacle.scummvm''. Now you can even pack this directory to ''squashfs''-file and run it from there.+Create a directory per game in ''/userdata/roms/scummvm/''. For this example, we will use the game files for **The Day of the Tentacle**. The game files will need to be put in the directory ''/userdata/roms/scummvm/Day_of_the_Tentacle/''. Then, in this game data directory, a blank file named ''<GameID>.scummvm'' needs  of the game, like ''tentacle.scummvm''. Now you can even pack this directory to ''squashfs''-file and run it from there.
  
 === GameID or EngineID === === GameID or EngineID ===
Line 54: Line 54:
  
 === Autodetection === === Autodetection ===
-Create a directory per game in ''/userdata/roms/scummvm/''. For this example, we will use the game files for **The Day of the Tentacle**. The game files will need to be put in the directory ''/userdata/roms/scummvm/Day_of_the_Tentacle/''. Now create a game file like ''Day of the Tentacle.scummvm''. As there is no valid gameID detectable the autodetection is activated and ScummVM tries to autodetect the correct gameID. This is by far the most convinient way but at least needs Batocera v42. This feature also enables ''squashfs''-files that there is no need in containing any additional ''scummvm''-file inside the archive.+Create a directory per game in ''/userdata/roms/scummvm/''. For this example, we will use the game files for **The Day of the Tentacle**. The game files will need to be put in the directory ''/userdata/roms/scummvm/Day_of_the_Tentacle/''. Now create a game file like ''Day of the Tentacle.scummvm''. As there is no valid GameID detectable the autodetection is activated and ScummVM tries to autodetect the correct GameID. This is by far the most convinient way but at least needs Batocera v42. This feature also enables ''squashfs''-files that there is no need in containing any additional ''scummvm''-file inside the archive.
  
 **Attention:** Autodection displays a list of games from the current or specified directory and starts the **first game** in the list. This is usally the english version of a game. **Attention:** Autodection displays a list of games from the current or specified directory and starts the **first game** in the list. This is usally the english version of a game.
  
 === Use Setup Script === === Use Setup Script ===
-You can use a small script to setup everything for you. Be aware that the script will exit if there is a ''scummvm''-file already present in the specific game folder. If you already started the setup and the ''scummvm.ini'' contains already the gameID for your game then the script will refuse to create the start file. So best practise is to start from a clean setup. Means, you remove old ''scummvm''-files and delete the ''scummvm.ini''+You can use a [[https://raw.githubusercontent.com/crcerror/BATOCERA-Shares/refs/heads/master/ScummVM/scummvm-addgames-v2.sh|small script]] to setup everything for you. Be aware that the script will exit if there is a ''scummvm''-file already present in the specific game folder. If you already started the setup and the ''scummvm.ini'' contains already the GameID for your game then the script will refuse to create the start file. So best practise is to start from a clean setup. Means, you remove old ''scummvm''-files and delete the ''scummvm.ini''
  
 <code> <code>
 Usage: Usage:
-./scummvm-addgames-v2.sh <gamefolder> {auto|standalone|libretro|random}+./scummvm-addgames-v2.sh <gamefolder> {auto|standalone|libretro|random|ma-random}
 </code> </code>
  
-  * ''auto/standalone'' use ''scummvm.ini'' location of the standalone core and write gameID there +  * ''auto/standalone'' use ''scummvm.ini'' location of the standalone core and write GameID there 
-  * ''libretro'' use ''scummvm.ini'' location of the libretro core and write gameID there +  * ''libretro'' use ''scummvm.ini'' location of the libretro core and write GameID there 
-  * ''random'' use ''/tmp/scummvm_<RND#>.ini'' to write gameID within. It's basically a new file that can be copied over.+  * ''random'' use ''/tmp/scummvm_<RND#>.ini'' to write GameID within. It's basically a new file that can be copied over
 +  * ''ma-random'' use ''/tmp/scummvm_<RND#>.ini'' to write GameID within. As long as the file ''/tmp/scummvm.identifier'' is found all data is written into the same file. This is ideal if you use a script to mass add games to a new created ini-file.
  
 Download the script from [[https://raw.githubusercontent.com/crcerror/BATOCERA-Shares/refs/heads/master/ScummVM/scummvm-addgames-v2.sh|here]] and put it inside ''/userdata/roms/scummvm''. Make it executable with ''chmod +x scummvm-addgames-v2.sh'' or use interpreter ''bash scummvm-addgames-v2.sh''. Download the script from [[https://raw.githubusercontent.com/crcerror/BATOCERA-Shares/refs/heads/master/ScummVM/scummvm-addgames-v2.sh|here]] and put it inside ''/userdata/roms/scummvm''. Make it executable with ''chmod +x scummvm-addgames-v2.sh'' or use interpreter ''bash scummvm-addgames-v2.sh''.
  
 You can wrap a small script around this to autocreate all files needed for your games. Thanks to knulli for the script, I made some small modifications around that. You can wrap a small script around this to autocreate all files needed for your games. Thanks to knulli for the script, I made some small modifications around that.
 +
 +Here is a small example how to use the script to mass add games and to proper create scummvm-files. Please improve the scripts to make it work for you and share with the community. Me (crcerror aka cyperghost) has a real life ... so please see this as a scripting example.
 +<code>
 +    #!/bin/bash
 +    # Error Codes:
 +    # 0  - everything went okay
 +    # 1  - general error (missing parameters, wrong parameter
 +    # 11 - game folder does not exist
 +    # 12 - game folder is empty
 +    # 13 - scummvm file found in gamedir
 +    # 15 - scummvm.ini already contains GameID
 +    # So it's up to YOU to handle this, please delete /tmp/scummvm.identifier after you used ma-random parameter for mass adding
 +
 +    readarray -t array < <(find . -mindepth 1 -maxdepth 1 -name "*" -type d)
 +    for i in "${array[@]}"; do
 +        bash scummvm-addgames-v2.sh "$i" ma-random
 +    done
 +    rm /tmp/scummvm.identifier
 +</code>
  
 ==== Detect GameIDs ==== ==== Detect GameIDs ====
-GameIDs are needed to setup a game for a specific language or to use special features that are included inside the game. That means CD specials like Talkie versions. The EngineID can be more descriped as the base game features. That means, englisch language for multi language games.+GameIDs are needed to setup a game for a specific language or to use special features that are included inside the game. That means CD specials like //talkie versions//. The EngineID can be more descriped as the base game features without langue string. That means, englisch language is default for multi language games. For example EngineID is ''gob3'' only, whereas GameID is ''gob3-fr''
  
 <WRAP center round tip> <WRAP center round tip>
Line 87: Line 107:
 {{:systems:scummvmgameid3.png?720|}} {{:systems:scummvmgameid3.png?720|}}
  
-Here, the codename is ''11h''.+Here, the EngineID is ''11h''.
  
 <WRAP center round tip> <WRAP center round tip>
Line 93: Line 113:
 </WRAP> </WRAP>
  
-After the game been added on ScummVM it's possible to edit the codename. It's a good way to setup the launcher for [[#the_game_isn't_in_my_language/is_in_english|different languages]] for AGS games.+After the game been added on ScummVM it's possible to edit the EngineID. It's a good way to setup the launcher for [[#the_game_isn't_in_my_language/is_in_english|different languages]] for AGS games.
  
 {{:systems:scummvmagslanguagelaunchersetup1.png?720|}} {{:systems:scummvmagslanguagelaunchersetup1.png?720|}}
Line 121: Line 141:
 ==== Core Differences ==== ==== Core Differences ====
  
-Since Batocera v42 both cores work quite similarly. They share the same savegame location, both cores use autodetection if no ''gameID'' is setted from filename or file content. Let us now talk about the differences:+Since Batocera v42 both cores work quite similarly. They share the same savegame location, both cores use autodetection if no ''GameID'' is setted from filename or file content. Let us now talk about the differences:
  
   - Location of ''scummvm.ini''   - Location of ''scummvm.ini''
     - Standalone ScummVM: ''/userdata/system/config/scummvm/scummvm.ini''     - Standalone ScummVM: ''/userdata/system/config/scummvm/scummvm.ini''
     - Libretro ScummVM: ''/userdata/bios/scummvm.ini''     - Libretro ScummVM: ''/userdata/bios/scummvm.ini''
-  - Handling of gameID as filename +  - Handling of GameID as filename 
-    - Standalone ScummVM: Handles a gameID from file content and filename +    - Standalone ScummVM: Handles a GameID from file content and filename 
-    - Libretro ScummVM: Handles a gameID only from file content, engineID from filename +    - Libretro ScummVM: Handles a GameID only from file content, EngineID from filename 
-  - Versions +  - Different versions: 
-    - Refer to core and its version info. Usually the version number differs not so much+    - Refer to core and its version info. Usually the version number differs not so much, so libretro and standalone cores are almost compatible
   - Language Setup   - Language Setup
     - Standalone ScummVM: Use the GameID, setted from file content and filename or use EmulationStation Frontend to define the specific language     - Standalone ScummVM: Use the GameID, setted from file content and filename or use EmulationStation Frontend to define the specific language
     - Libretro ScummVM: Language can only be setted by proper GameID - there is no option in ES available      - Libretro ScummVM: Language can only be setted by proper GameID - there is no option in ES available 
  
-I made best experience to setup one core completly and then copy the setupd ''scummvm.ini'' to the second core location. Also working with a symblink works.+I made best experience to setup one core completly and then copy the setupd ''scummvm.ini'' to the second core location. Also using symblink works.
  
 ==== None of that works for me! ==== ==== None of that works for me! ====
Line 141: Line 161:
 First be aware that priorizing takes place. Highest priority is **file content**, after that the **filename**, then the **autodetection** takes place. So if you made a mistake here, ScummVM will fail to launch - check first the logs in ''\userdata\system\logs'' for errors. First be aware that priorizing takes place. Highest priority is **file content**, after that the **filename**, then the **autodetection** takes place. So if you made a mistake here, ScummVM will fail to launch - check first the logs in ''\userdata\system\logs'' for errors.
  
-Alternatively, [[:access_the_batocera_via_ssh|SSH]] into Batocera and run ''%%/usr/bin/scummvm --list-games >> /userdata/system/codename.txt%%'' to list //all// the game titles and search for your game in the resulting ''/userdata/system/codename.txt'' file.+Alternatively, [[:access_the_batocera_via_ssh|SSH]] into Batocera and run ''%%/usr/bin/scummvm --list-games >> /userdata/system/engineid.txt%%'' to list //all// the game titles and search for your game in the resulting ''/userdata/system/engineid.txt'' file.
  
-Game titles and their codenames are also provided on [[http://scummvm.org/compatibility/|the compatibility page from the main ScummVM website]] (AGS games specifically are [[https://wiki.scummvm.org/index.php?title=AGS/Games|on their wiki]], as well as [[ https://wiki.scummvm.org/index.php/Category:Fan_Games|fangames]]). If you //still// can't find the game ID for your game, then look up the ''detection_tables.h'' file for the specific group of games directly from the repository: https://github.com/scummvm/scummvm/tree/master/engines (for instance, AGS games are in the ''ags/detection_tables.h'' file).+Game titles and their EngineIDs are also provided on [[http://scummvm.org/compatibility/|the compatibility page from the main ScummVM website]] (AGS games specifically are [[https://wiki.scummvm.org/index.php?title=AGS/Games|on their wiki]], as well as [[ https://wiki.scummvm.org/index.php/Category:Fan_Games|fangames]]). If you //still// can't find the game ID for your game, then look up the ''detection_tables.h'' file for the specific group of games directly from the repository: https://github.com/scummvm/scummvm/tree/master/engines (for instance, AGS games are in the ''ags/detection_tables.h'' file).
  
 ==== MIDI ROMs / Roland MT-32 music ==== ==== MIDI ROMs / Roland MT-32 music ====
Line 167: Line 187:
   * Quit ScummVM and re-launch the game.   * Quit ScummVM and re-launch the game.
   * Enjoy the music.   * Enjoy the music.
- 
  
 ===== Emulators ===== ===== Emulators =====
Line 259: Line 278:
 - ''sword25-es.scummvm'' for Spanish - ''sword25-es.scummvm'' for Spanish
  
-==== I've put the codename in for my game but it's failing to launch ====+==== I've put the EngineID in for my game but it's failing to launch ====
  
 It's the launch file that needs to be ''tentacle.scummvm'', **not the directory** that contains the game files. It's the launch file that needs to be ''tentacle.scummvm'', **not the directory** that contains the game files.
Line 265: Line 284:
 If that's not it, some games could have different versions, you can specify it with (or a combination of): If that's not it, some games could have different versions, you can specify it with (or a combination of):
  
-- ''<codename>.scummvm'' for Floppy or DOS+- ''<EngineID>.scummvm'' for Floppy or DOS
  
-- ''<codename>-cd.scummvm'' or ''gameidcd.scummvm'' for CD+- ''<EngineID>-cd.scummvm'' or ''gameidcd.scummvm'' for CD
  
-- ''<codename>-win.scummvm'' or ''gameidwin.scummvm'' for Windows+- ''<EngineID>-win.scummvm'' or ''<EngineID>win.scummvm'' for Windows
  
-- ''<codename>-amiga.scummvm'' for Amiga+- ''<EngineID>-amiga.scummvm'' for Amiga
  
-- ''<codename>-fm.scummvm'' for FM-Towns+- ''<EngineID>-fm.scummvm'' for FM-Towns
  
-- ''<codename>-v2.scummvm'' for Version 2+- ''<EngineID>-v2.scummvm'' for Version 2
  
-- ''<codename>vga.scummvm'' or ''gameid-vga.scummvm'' for VGA+- ''<EngineID>-vga.scummvm'' or ''<EngineID>vga.scummvm'' for VGA
  
-- ''<codename>-ega.scummvm'' for EGA+- ''<EngineID>-ega.scummvm'' for EGA
  
-- ''<codename>sci.scummvm'' for SCI+- ''<EngineID>-sci.scummvm'' for SCI
  
-- ''<codename>agdi.scummvm'' for AGDI+- ''<EngineID>-agdi.scummvm'' for AGDI
  
-- ''<codename>-demo.scummvm'' for DEMO+- ''<EngineID>-demo.scummvm'' for DEMO
  
-- ''<codename>deluxe.scummvm'' for DELUXE+- ''<EngineID>-deluxe.scummvm'' for DELUXE
  
-- ''<codename>-steam.scummvm'' for STEAM+- ''<EngineID>-steam.scummvm'' for STEAM
  
-- ''<codename>-win-cd-us.scummvm'' for Windows, CD and US+- ''<EngineID>-win-cd-us.scummvm'' for Windows, CD and US
  
 ==== Further troubleshooting ==== ==== Further troubleshooting ====
  • systems/scummvm.1746988291.txt.gz
  • Last modified: 12 months ago
  • by crcerror