Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
What is a custom profile?
A custom profile is basically a text file in a very structured format, that informs Gamesome about how to process some kind of data, i.e. roms and emulators. Gamesome is bundled with a set of basic profiles.
Where are profiles stored?
In the root of your internal storage, you can notice a
Gamesome folder. Inside you have a
platforms and an
emulators folder. They will contain the profiles respectively for platforms and emulators.
Which custom profiles can I create?
You can create two kinds of profiles: the first is a platform profile, each profile tells Gamesome that there is a new console; the latter is an emulator profile, it tells Gamesome that the games of a specific platform can be launched by using a 3rd-party Android application.
How do I create a profile?
Custom profiles are written in XML format, which is much simpler that what it seems by reading its Wikipedia page.
This sucks, what's the advantage of profiles?
Custom profiles allow me to add compatibility for new platforms/emulators without having to release an entire update of the app. You just need to add the new profiles in your folders.
Creating a Custom Profile
Creating a platform profile is pretty straight-forward. Consider the following example:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <color>#212121</color> <name>Sony PlayStation</name> <extension>bin|iso|img|pbp</extension> <scanmode>1</scanmode> </configuration>
Each file has to be called platform_platformalias.xml where platformalias is the alias of your platform. It is used by Gamesome in order to make distinction between different consoles, aliases are therefore unique, you cannot have two platforms with the psx alias.
The first two lines and the last line are mandatory, but they don't provide any information, then you have several fields to fill:
- name: The name of your platform
- color: Platforms are shown in the app with a randomly generated color background. You can set a specific background color by adding this field.
- extension: at least one of these is mandatory, extension tells gamesome which file type it has to look for in the platform paths. Extensions are separated by the pipe "|" character.
- scanmode: scanmode tells Gamesome how the scan of each folder has to be done for a specific platform, read the table below.
|Scan subfolders||Look inside zip/7z Archives||Arcade Mode||One game = One folder|
|0||[X]||[X]||[ ]||[ ]|
|1||[X]||[ ]||[X]||[ ]|
|2||[X]||[ ]||[ ]||[ ]|
|3||[ ]||[ ]||[ ]||[X]|
Gamesome has four scan modes, each of them having different features:
- 0 is the default scan mode, it includes recursive search of rom files and it even looks inside zip or 7-zip files for roms.
- 1 is the scan mode used for arcade consoles (MAME, NeoGeo) where roms are in zip format. Folders are scanned recursively.
- 2 is the scan mode used for consoles having games in disk image format, such as PS1 or PSP. Folders are scanned recursively.
- 3 is the scan mode used for consoles having multi-track roms, such as Dreamcast where each rom is stored into a folder containing one main gdi file and several track0X files.
Creating an emulator profile is more complicated and it requires more knowledge about how Android Intents work.
Each emulator profile has to be named emu_platformalias_emulatoralias.xml where platformalias has to be the very same alias used in the name of platform profile and emulatoralias is a unique emulator alias. If you need two profiles of the same emulators, for instance when you have more than one RetroArch core, you can name these files like:
Instead of explaining Android's technical details, I'll leave you several examples of "simple" and "advanced" emulator profiles.
You can see that they use a
category is optional as well as
extra fields have a special
%VARIABLE% value, which is replaced with the proper data by Gamesome.
<?xml version="1.0" encoding="UTF-8"?> <configuration> <name>My Boy!</name> <package_name>com.fastemulator.gba</package_name> <component_name>com.fastemulator.gba.EmulatorActivity</component_name> <action>android.intent.action.VIEW</action> </configuration>
<?xml version="1.0" encoding="UTF-8"?> <configuration> <name>RetroArch (VBA-M)</name> <package_name>com.retroarch</package_name> <component_name>com.retroarch.browser.retroactivity.RetroActivityFuture</component_name> <action>android.intent.action.MAIN</action> <category>android.intent.category.LAUNCHER</category> <extra> <key>ROM</key> <value>%ROMFILE%</value> <type>string</type> </extra> <extra> <key>LIBRETRO</key> <value>/data/data/com.retroarch/cores/vbam_libretro_android.so</value> <type>string</type> </extra> <extra> <key>CONFIGFILE</key> <value>/storage/sdcard0/Android/data/com.retroarch/files/retroarch.cfg</value> <type>string</type> </extra> <extra> <key>IME</key> <value>%CURRENT_IME%</value> <type>string</type> </extra> <extra> <key>DATADIR</key> <value>%APP_DATA_DIR%</value> <type>string</type> </extra> </configuration>