Aloshi / EmulationStation

A flexible emulator front-end supporting keyboardless navigation and custom system themes.
MIT License
2.07k stars 905 forks source link

Additional per-game options per system #381

Open Tenebrous opened 9 years ago

Tenebrous commented 9 years ago

Support having additional per-game options that get passed to the relevant emulator.

The possible options would be defined in es_systems.cfg.

For example, for FUSE (ZX Spectrum emulator), you can specify 128k mode with "--machine 128" or 48k mode with "--machine 48" - some games have to run in the correct mode.

Example es_systems.cfg layout:

<system>
  <fullname>ZX Spectrum</fullname>
  <name>zxspectrum</name>
  <path>~/RetroPie/roms/zxspectrum</path>
  <extension>.sna .SNA .szx .SZX .z80 .Z80 .ipf .IPF .tap .TAP .tzx .TZX .gz .bz2 .udi .UDI .mgt .MGT .img .IMG .trd .TRD .scl .SCL .dsk .DSK</extension>
  <command>fuse %OPTIONS% %ROM%</command>
  <platform>zxspectrum</platform>
  <theme>zxspectrum</theme>
  <options>
    <option>
      <id>mode</id>
      <section>OPTIONS</section>
      <description>Emulation mode</description>
      <values>
        <value>
          <id>48k</id>
          <description>48k</description>
          <code>--machine 48</code>
        </value>
        <value>
          <id>128k</id>
          <description>128k</description>
          <code>--machine 128</code>
        </value>
      </values>
    </option>
  </options>
</system>

This could also be used to select between multiple emulators:

<system>
  <fullname>ZX Spectrum</fullname>
  <name>zxspectrum</name>
  <path>~/RetroPie/roms/zxspectrum</path>
  <extension>.sna .SNA .szx .SZX .z80 .Z80 .ipf .IPF .tap .TAP .tzx .TZX .gz .bz2 .udi .UDI .mgt .MGT .img .IMG .trd .TRD .scl .SCL .dsk .DSK</extension>
  <command>%EMULATOR% %ROM%</command>
  <platform>zxspectrum</platform>
  <theme>zxspectrum</theme>
  <options>
    <option>
      <id>mode</id>
      <section>EMULATOR</section>
      <description>Emulator</description>
      <values>
        <value>
          <id>fuse</id>
          <description>FUSE</description>
          <code>fuse</code>
        </value>
        <value>
          <id>fuse-sdl</id>
          <description>FUSE (SDL mode)</description>
          <code>fuse-sdl</code>
        </value>
        <value>
          <id>unrealspeccy</id>
          <description>Unreal Speccy</description>
          <code>unrealspeccy</code>
        </value>
      </values>
    </option>
  </options>
</system>
Tenebrous commented 9 years ago

Looking at adding this feature myself :)

Tenebrous commented 9 years ago

Follow-up article here: http://emulationstation.org/forum/index.php?topic=280.0

nilsbyte commented 9 years ago

We are planning a feature to configure emulators from inside ES. Your suggestion goes one step further by defining options for a emulator on a per-game basis, am i right?

Tenebrous commented 9 years ago

Yes absolutely - I've implemented this in my fork (both in unstable & gamelistdb).

I use it for changing the ZX Spectrum emulator FUSE per-game to select either 128k or 48k emulation mode, and also for selecting emulators per game whilst having them all appear in the same 'system'.

SillyPilleus commented 9 years ago

Something like this would be awesome. I would love to be able to modify the command to initiate the emulator on a per-game basis. This would make it possible to launch emulators with different command line options per-game- I use ePSXe for PSX and would like to launch some games with the multitap option enabled. Is this something that might feature in a future release? That would be cool as.