@nosh2 le post ici explique bien comment faire vectrex-mit-schablonen (merci Google Translate)
avec la simple modif du seul fichier libretroGenerator.py (rien d''autre à changer nulle part)
| |
| import Command |
| import libretroControllers |
| import recalboxFiles |
| import libretroConfig |
| import shutil |
| from generators.Generator import Generator |
| import os.path |
| |
| |
| class LibretroGenerator(Generator): |
| |
| |
| def generate(self, system, rom, playersControllers): |
| |
| if not system.config['configfile']: |
| |
| system.config['configfile'] = recalboxFiles.retroarchCustom |
| |
| |
| if not os.path.isfile(recalboxFiles.retroarchCustom): |
| shutil.copyfile(recalboxFiles.retroarchCustomOrigin, recalboxFiles.retroarchCustom) |
| |
| |
| libretroControllers.writeControllersConfig(system, playersControllers) |
| |
| libretroConfig.writeLibretroConfig(system) |
| |
| |
| |
| retroarchCore = recalboxFiles.retroarchCores + system.config['core'] + recalboxFiles.libretroExt |
| romName = os.path.basename(rom) |
| |
| if system.name in {'mame', 'neogeo', 'fba_libretro', 'vectrex'}: |
| overlayFile = "/recalbox/share/overlays/{}.cfg".format(romName) |
| else: |
| overlayFile = "/recalbox/share/overlays/{}.zip.cfg".format(system.name) |
| |
| if os.path.isfile(overlayFile): |
| commandArray = [recalboxFiles.retroarchBin, "-L", retroarchCore, "--append", overlayFile, "--config", system.config['configfile'], rom] |
| else: |
| commandArray = [recalboxFiles.retroarchBin, "-L", retroarchCore, "--config", system.config['configfile'], rom] |
| return Command.Command(videomode=system.config['videomode'], array=commandArray) |
j'ai ajouté un test pour que les consoles aient un overlay unique et qu'il y ait un overlay par rom pour l'arcade
il suffit alors d'avoir les fichiers system.zip.cfg + system.cfg dans le dossier /recalbox/share/overlays/ pour les consoles, et les fichiers rom.zip.cfg + rom.cfg pour l'arcade. ça marche pas mal, testé sous mame et psx.
cette méthode est au final bien plus propre que le launcher.sh et marche pour tout système, pas seulement Vectrex
il faut probablement affiner pour les jeux sans overlay, qui gardent le dernier utilisé (écrase la conf retroarch), sans doute avec un null.zip.cfg qui repasse input_overlay à ""