Skip to content

Commit df834d8

Browse files
committed
Changes after review #2:
- read retroarch_dbname from peas.json instead from platforms_idmap.csv - config.ini parameter fixed to accept -e from CLI as raExtra= - always write PNG for cover/boxart, screenshot and wheel/logo, by using a compositor artwork file - change "path" in target JSON from / to \\ for Windows - display of Textures in CLI summary output hidden for frontend RA - doc FRONTENDS,md updated - fixed unit tests - marked further FIXMEs in retroarch.cpp
1 parent 077c947 commit df834d8

21 files changed

Lines changed: 2612 additions & 302 deletions

docs/CLIHELP.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ This sets the extra command (or emulator command) for some frontends.
8484

8585
!!! info
8686

87-
This option is applicable _only_ when using the `-f attractmode` or the `-f pegasus` option.
87+
This option is applicable _only_ when using the `-f attractmode`, the `-f pegasus` or the `-f retroarch` option.
8888

8989
When using `-f attractmode` it is **required** to set the _emulator_ to be used when generating the `attractmode` game list. On RetroPie the emulator name is mostly the same as the platform. Consider setting this in [`config.ini`](CONFIGINI.md#emulator) instead.
9090

9191
The extra command can **optionally** be used with `-f pegasus` to set the launch command used by the Pegasus game list. On RetroPie this defaults to the RetroPie launch command which works with RetroPie, if this parameter is unset. Consider setting this in [`config.ini`](CONFIGINI.md#launch) instead.
9292

93+
The extra command can **optionally** be used with `-f retroarch` with `-e "<CORE_PATH>;<CORE_NAME>"` to set a default core (path,name) pair for the playlist. Consider setting this in [`config.ini`](CONFIGINI.md#emulator) instead.
94+
9395
**Example(s)**
9496

9597
```

docs/CONFIGINI.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ This is an alphabetical index of all configuration options their usage level and
121121
| [onlyMissing](CONFIGINI.md#onlymissing) | Advanced | Y | Y | | Y |
122122
| [platform](CONFIGINI.md#platform) | Basic | Y | | | |
123123
| [pretend](CONFIGINI.md#pretend) | Basic | Y | Y | | |
124+
| [raExtra](CONFIGINI.md#raextra) | Advanced | | Y | Y | |
124125
| [region](CONFIGINI.md#region) | Basic | Y | Y | | |
125126
| [regionPrios](CONFIGINI.md#regionprios) | Expert | Y | Y | | |
126127
| [relativePaths](CONFIGINI.md#relativepaths) | Basic | Y | Y | | |
@@ -460,6 +461,15 @@ Allowed in sections: `[main]`, `[<PLATFORM>]`, `[<FRONTEND>]`
460461

461462
---
462463

464+
#### raExtra
465+
466+
This option is _only_ applicable when also setting the `frontend="retroarch"` option. With this setting you can define a default core (path,name) pair for the playlist.
467+
468+
Default value: unset
469+
Allowed in sections: `[<PLATFORM>]`, `[retroarch]`
470+
471+
---
472+
463473
#### videos
464474

465475
By default Skyscraper does not scrape and cache video resources because of the significant disk space required to save them. You can enable videos using this option. If your frontend supports video display also explicitly set this option to true. See also the option to [symlink video files](#symlink) instead of copying, if space is a premium.

docs/FRONTENDS.md

Lines changed: 51 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Skyscraper will preserve the following metadata when re-generating a game list f
2525

2626
Folder data is not cached by Skyscraper, thus if you delete your `gamelist.xml`, Skyscraper cannot restore the edited folder elements from cache.
2727

28-
Automatic addition of folder elements if [`addFolder`](CONFIGINI.md#addfolders) is true:
28+
Automatic addition of folder elements if [`addFolder`](CONFIGINI.md#addfolders) is true:
2929
If at least one ROM is within a subfolder and this subfolder is not yet part of the `gamelist.xml` file, it will be added with two mandatory subelements:
3030

3131
- `<path/>` reflects the relative subpath from the system folder and
@@ -81,7 +81,7 @@ files into the `downloaded_media` folder (e.g.
8181
`~/ES-DE/downloaded_media/<PLATFORM>/screenshots/` for screenshots) from where
8282
ES-DE will pick them up. ES-DE does not support textures currently. Any manual
8383
or fanart data present in the cache will be put automagically into
84-
`~/ES-DE/downloaded_media/<PLATFORM>` where ES-DE will load it.
84+
`~/ES-DE/downloaded_media/<PLATFORM>` where ES-DE will load it.
8585
This frontend automatically enables the output of backcovers, fanart and manuals
8686
during gamelist creation, whenever cached data is present for a game.
8787

@@ -116,7 +116,7 @@ Over time the fork of EmulationStation in Batocera has diverted stark from the
116116
initial EmulationStation. Thus, the gamelist format is somewhat different, but
117117
the textual scraping elements are still the same. Most notably Batocera
118118
EmulationStation stores a lot of additional information in the gamelist, and the
119-
set of information may differ for each game.
119+
set of information may differ for each game.
120120
Skyscraper aims to cover the most frequent used elements for scraping, currently
121121
fanarts, manuals and videos. See the [scraping
122122
modules](SCRAPINGMODULES.md#capabilities-of-scrapers) for support of these
@@ -143,7 +143,7 @@ every `<PLATFORM>` you scrape.
143143
- Default media file location: `/userdata/roms/<PLATFORM>/{images,videos,manuals}`
144144

145145
If you set a game list location and do not specifiy the ROM folder (input
146-
folder) and media folder, then these are set relatively to the game list folder.
146+
folder) and media folder, then these are set relatively to the game list folder.
147147
This frontend automatically enables the output of backcovers, fanart and manuals
148148
whenever cached data is present for a game.
149149

@@ -217,7 +217,7 @@ Windows desktop users can use SMB shares and can adapt the following steps.
217217
```
218218
You may also set the default [frontend in the
219219
configuration](CONFIGINI.md#frontend), then you can even drop the `-f` CLI
220-
parameter.
220+
parameter.
221221
If you want to use your existing Batocera gamelist and mediafiles (to save
222222
some online scrape cycles), you can do so by using the
223223
[esgamelist](SCRAPINGMODULES.md#emulationstation-style-gamelists) scraping
@@ -283,7 +283,7 @@ You need to add the individual platform rom directories to Pegasus (if they are
283283

284284
!!! info
285285

286-
If you are generating game lists for Pegasus, it is highly recommended to disable third-party game list data sources! Otherwise you will have a mish-mash or different sources showing up in Pegasus. Start the Pegasus frontend, press ESC on the keyboard and choose _Settings_ -> _Enable/disable data sources_ and disable everything in that submenu.
286+
If you are generating game lists for Pegasus, it is highly recommended to disable third-party game list data sources! Otherwise you will have a mish-mash or different sources showing up in Pegasus. Start the Pegasus frontend, press ESC on the keyboard and choose _Settings_ -> _Enable/disable data sources_ and disable everything in that submenu.
287287
Then reload the game lists or restart Pegasus, and all of the platforms should show up with media and game information generated by Skyscraper.
288288

289289
#### Metadata preservation
@@ -292,37 +292,66 @@ Skyscraper will preserve any metadata key-value pairs added to the header and /
292292

293293
### RetroArch
294294

295-
- Default game list location: `/opt/retropie/configs/all/retroarch/playlists`
296-
- Default game list filename: `<DB_NAME>.lpl` (using its own platform name format)
297-
- Default media dir location: `/opt/retropie/configs/all/retroarch/thumbnails/<DB_NAME>/Named_*`
295+
- Default game list location: `~/.config/retroarch/playlists`
296+
- Default game list filename: `<DB_NAME>.lpl` (using its own platform name format, defined in Skyscraper's `peas.json`)
297+
- Default media dir location: `~/.config/retroarch/thumbnails/<DB_NAME>/Named_*` (see table below)
298298

299-
Despite the presence of all of these other fancy frontends, the lower-level RetroArch layer that manages most of your emulator cores has a perfectly-capable GUI in the form of a playlist creator/viewer. The playlists contain each platform's game list, and the playlist viewer has support for covers, screenshots, and logos for each ROM.
299+
RetroArch structuring element on the GUI is build around playlists. Each
300+
playlist contains each platform's game list, and the playlist viewer suports
301+
covers, screenshots, and logos for each game.
300302

301303
#### Configuration
302304

303-
When generating for RetroArch, Skyscraper uses a built-in mapping of platform names to RetroArch database names (e.g., `nes``Nintendo - Nintendo Entertainment System`). If we don't have it in our system, this can be easily added in `platforms_idmap.csv`.
305+
When generating for RetroArch, Skyscraper uses a configurable mapping of
306+
platform names to RetroArch database names (e.g., `nes` (folder) → `Nintendo -
307+
Nintendo Entertainment System` (core name), see file `~/.skyscraper/peas.json`).
308+
If you want to add a platform to RetroArch DB-Name mapping, please file an
309+
issue. That way it will be of use for every Skyscraper user. Any setting
310+
specific to your setup you can define in `~/.skyscraper/peas_local.json`. This
311+
file uses the same format as the `peas.json`.
304312

305-
You can optionally use the `-e` parameter with `frontendExtra="<CORE_PATH>;<CORE_NAME>"` to set a default core path/name for the playlist. Or set it in `config.ini`:
313+
You can optionally use the `-e` parameter with `"<CORE_PATH>;<CORE_NAME>"` to
314+
set a default core path/name for the playlist. Or set it in `config.ini` like:
306315

307316
```ini
308317
[retroarch]
309-
frontendExtra="<CORE_PATH>;<CORE_NAME>"
318+
raExtra="<CORE_PATH>;<CORE_NAME>"
310319
```
311320

321+
You will most likely have to adjust the game list folder (`gameListFolder=`) and
322+
the media files folder (`mediaFolder=`) by persisting them in your `config.ini`
323+
in the `[retroarch]` section. Also you may want to set the
324+
`artworkXml=retroarch-artwork.xml` in your configuration to assure every media
325+
file is in PNG format.
326+
312327
#### Media Support
313328

314329
RetroArch supports the following media types:
315330

316-
| Media Type | RetroArch Directory |
317-
| :---------- | :-------------- |
318-
| Covers (Box Art) | `Named_Boxarts` |
319-
| Screenshots | `Named_Snaps` |
320-
| Marquees/Wheels (Logos) | `Named_Logos` |
321-
322-
All media files are matched to games by their sanitized game title, not by ROM filename. Title screenshots (`Named_Titles`) are not currently supported.
331+
| Media Type | RetroArch Directory |
332+
| :---------------------- | :------------------ |
333+
| Covers (Box Art) | `Named_Boxarts` |
334+
| Screenshots | `Named_Snaps` |
335+
| Marquees/Wheels (Logos) | `Named_Logos` |
323336

324-
Media may not all be in PNG formats. You should turn on the _Settings_ -> _Playlists_ -> _Allow All Supported Image Types for Thumbnails_ option in your RetroArch config to support JPEG image displays.
337+
Title screenshots (`Named_Titles`) are not currently supported.
338+
All media files are matched to games by their [sanitized game
339+
title](https://docs.libretro.com/guides/roms-playlists-thumbnails/#custom-thumbnails),
340+
not by ROM filename.
325341

326342
#### Metadata preservation
327343

328-
Skyscraper will preserve existing game titles and paths when re-generating a game list for RetroArch. If an existing playlist file is found and you choose to skip existing entries, Skyscraper will use the old game list as a reference.
344+
Skyscraper will preserve existing game titles and paths when re-generating a
345+
game list for RetroArch. If an existing playlist file is found and you choose to
346+
skip existing entries, Skyscraper will use the old game list as a reference.
347+
348+
#### Known Limitations
349+
350+
1. Initial generation of a RetroArch playlist does not work for folders resp.
351+
platforms which may require a different RetroArch core per game (for example
352+
`arcade/` on RetroPie). However, updating an existing playlist file for such
353+
folder works, as the existing entry of `"db_name"` per each game is
354+
preserved.
355+
2. Any RetroArch configuration is not evaluated, thus if you changed your
356+
RetroArch configuration (e.g., by using non-default file paths) the produced
357+
JSON/lpl file might not display correctly in RetroArch frontend.

0 commit comments

Comments
 (0)