Per System (es_systems.cfg) pre & post commandline
-
Hi all,
AFAIK there's no way to run a script before booting a system or after.
I would humbly ask for a /prerunscript and a /postrunscript to be added/read in es_systems.cfg
For example;
<system>
<fullname>Sega Game Gear</fullname>
<name>gamegear</name>
<path>~/RetroPie/roms/gamegear</path>
<extension>.gg .GG</extension>
<command>/opt/retropie/emulators/osmose-0.8.1+rpi20121122/osmose %ROM% -joy -tv -fs</command>
<platform>gamegear</platform>
<theme>gamegear</theme>
<prerunscript>/path/to/BeforeEmulation_SegaGameGear.sh</prerunscript>
<postrunscript>/path/to/AfterEmulation_EmulationStation.sh</postrunscript>
</system>I can find many reasons for this but my reason to ask is to support the RGB-Pi and RetroTINK Raspberry Pi hats that output to SCART / Component to original CRT TV's.
They adjust the HDMI_Timings to match the original system, so it matches the output from the original system, timing and all.
I could request this via RetroArch but its probably easier to implement in the runcommand script :)
(I'd ask for in future maybe a MAME/FB Alpha per game prescript, but i'd be more than grateful for the Console Systems for now)
Actually if the scripts could be passed the rom parameter, we could take care of the per game code in the script. (even if the console scripts probably wouldn't use it, the mess/mame/fb alpha/psx cores could and the ones that don't need it can just ignore it)so the actual command would look like;
/path/to/BeforeEmulation_SegaGameGear.sh AlexKidd.zip
or
/path/to/BeforeEmulation_FBAlpha.sh sfa2People could even downclock their pies per core to save heat/power etc.
Thank you for reading,
Kind Regards,
Vyk
-
I kept getting blocked, but pass whatever the rom on the commandline is, let the script filter it for its needs for the system
if the romfile parameter is sfa2 pass that
is the romfile parameter is /mnt/hdd/Super Mario Kart.zipetc let the script writers deal with it. (To make your lives easier!)
-
Would the
runcommand-onstart.sh
andruncommand-onend.sh
scripts detailed here handle what you need? -
Oh wow, thank you mediamogul! I knew about those scripts but didn't realise there was anything passed to them :/
Will need to make a IF system equals script but I can do that, save you guys to work on more important stuff
Really sorry about not RTFM :S
Thanks a heap, MediaMogul and again, I apologise.
-
No problem. Glad it helped.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.