Configuration Scummvm HL3

Ici se règle les problèmes concernant une configuration Hyperspin tournant sous HyperLaunch 3.

Modérateurs : Porko, Modérateurs

Répondre
Avatar de l’utilisateur
faeze
Mentor
Mentor
Messages : 2089
Inscription : 16 mai 2013 - 01:00
Localisation : Henin Beaumont
A remercié : 198 fois
A été remercié : 118 fois

Configuration Scummvm HL3

Message par faeze » 28 mars 2015 - 01:13

Apres m'être arraché tous les cheveux, j'ai craqué je demande de l'aide pour cette config, pas si simple finalement.

J'ai testé sous deux version d'HyperLaunch3 je suis surtout sur celle ci: 1.1.1.3

Voici le module:
ScummVM.ahk-2.0.8
MEmu = ScummVM
MEmuV = v1.7.0
MURL = http://scummvm.org/" onclick="window.open(this.href);return false;
MAuthor = djvj, brolly
MVersion = 2.0.8
MCRC = 8DE09DA4
iCRC = C211523C
MID = 635038268922749586
MSystem = "ScummVM","Microsoft MS-DOS"
;----------------------------------------------------------------------------
; Notes:
; If your games are compressed archives, set your Rom_Path to the folder with all your games and Rom_Extension to just the archive type.
; Set Skipchecks to "Rom Extension" for this system If your roms are compressed archives and also turn on 7z support.
; If your games are already uncompressed into their own folders, set Skipchecks to "Rom Only" so HL knows not to look for rom files.
;
; You can set your Save/Load/Menu hotkeys below to access them in game.
; The hotkeys will be processed by xHotkey, so they can be defined just like you would your Exit_Emulator_Key (like with delays or multiple sets of keys)
;
; If you prefer a portable ScummVM, place your scummvm.ini somewhere Else, like in the emulator's folder and set CustomConfig's path to this file. It will work with the ini from there instead of your appdata folder.
; http://www.hyperspin-fe.com/forum/showp ... stcount=81" onclick="window.open(this.href);return false;
;
; You can manually map your database rom names to archive files If you keep your games compressed and have the files named differently from your database by putting a file named ZipMapping.ini in the modules folder (or ZipMapping - SystemName.ini), this file contents should be as follows:
; [mapping]
; romName=zipFileName
;
; Launch Method 1 - Rom_Path has archived games inside a zip, 7z, rar, etc
; Set Skipchecks to Rom Extension and enable 7z
; Launch Method 2 - Rom_Path has each game inside its own folder and uncompressed
; Set Skipchecks to Rom Only and disable 7z
; Launch Method 3 - Rom_Path has archived games inside a zip, 7z, rar, etc, all named from the scummvm torrent that does not match the names on your xml
; Set Skipchecks to Rom Extension, enable 7z, enable Rom Mapping. Make sure a proper mapping ini exists in the appropriate settings Rom Mapping folder and it contains all the correct mapping info.
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()

settingsFile := modulePath . "\" . (If FileExist(modulePath . "\" . systemName . ".ini") ? systemName : moduleName) . ".ini" ; use a custom systemName ini If it exists
scummDefaultConfigFile := A_AppData . "\ScummVM\scummvm.ini" ; ScummVM's default ini file it creates on first launch
customConfigFile := IniReadCheck(settingsFile, "Settings", "CustomConfig","",,1) ; Set the path to a custom config file and the module will use this instead of the ScummVM's default one
customConfigFile := GetFullName(customConfigFile) ; convert relative path to absolute
configFile := CheckFile(If customConfigFile ? customConfigFile : scummDefaultConfigFile) ; checks If either the default config file or the custom one exists
Fullscreen := IniReadCheck(settingsFile, "Settings", "Fullscreen","true",,1)
LaunchMode := IniReadCheck(settingsFile, "Settings|" . romName, "LaunchMode", "Auto",,1)
TargetName := IniReadCheck(settingsFile, romName, "TargetName", romName,,1)
ForceExtractionToRomPath := IniReadCheck(settingsFile, "Settings" . "|" . romName, "ForceExtractionToRomPath", "false",,1)
BezelDelay := IniReadCheck(settingsFile, "Settings|" . romName, "BezelDelay", "0",,1)

SaveKey := IniReadCheck(settingsFile, "Settings", "SaveKey","1",,1) ; hotkey to save state
LoadKey := IniReadCheck(settingsFile, "Settings", "LoadKey","2",,1) ; hotkey to load state
MenuKey := IniReadCheck(settingsFile, "Settings", "MenuKey","p",,1) ; hotkey to access the ScummVM menu

BezelStart()

If 7zEnabled != true
If romExtension in %7zFormats%
ScriptError("Your rom """ . romName . """ is a compressed archive`, but you have 7z support disabled. ScummVM does not support launching compressed roms directly. Enable 7z or extract your rom.",8)

;Find the zip filename by looking it up in the ZipMapping.ini file or ZipMapping - SystemName.ini If one exists
IfExist, % modulePath . "\ZipMapping - " . systemName ".ini"
ZipMappingFile := modulePath . "\ZipMapping - " . systemName ".ini"
Else
ZipMappingFile := modulePath . "\ZipMapping.ini"

ZipName := IniReadCheck(ZipMappingFile, "mapping", romname, romname . (If romExtension ? romExtension : ".zip"),,1)

If (LaunchMode = "eXoDOS") {
;Find and set the romPath in case we have several
romPathFound := "false"
If (7zEnabled = "true")
{
Loop, Parse, romPath, |
{
currentPath := A_LoopField
Log("Module - Searching for rom " . ZipName . " in " . currentPath,4)
If FileExist(currentPath . "\" . ZipName)
{
romPath := currentPath
romPathFound := "true"
}
}
If (romPathFound != "true")
ScriptError("Couldn't find rom " . ZipName . " in any of the defined rom paths")
} Else {
Loop, Parse, romPath, |
{
currentPath := A_LoopField
Log("Module - Searching for rom " . romname . " in " . currentPath,4)
If InStr(FileExist(currentPath . "\" . romname), "D")
{
romPath := currentPath
romPathFound := "true"
}
}
If (romPathFound != "true")
ScriptError("Couldn't find rom " . romname . " in any of the defined rom paths")
}

If (ForceExtractionToRomPath = "true") {
Log("Module - ForceExtractionToRomPath is set to true, setting 7zExtractPath to " . romPath . ". Careful when using this setting!",4)
7zExtractPath := romPath
}
}

;Lets split filename and extension
SplitPath, ZipName,,,zipExtension,zipFileName

hideEmuObj := Object("ahk_class SDL_app",1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
;7z(romPath, romName, romExtension, 7zExtractPath)
7z(romPath,zipFileName,"." . zipExtension,7zExtractPath,,If LaunchMode = "eXoDOS" ? "false" : "true")

; Send ScummVM hotkeys through xHotkey so they are linked to the labels below
SaveKey := xHotKeyVarEdit(SaveKey,"SaveKey","~","Add")
LoadKey := xHotKeyVarEdit(LoadKey,"LoadKey","~","Add")
MenuKey := xHotKeyVarEdit(MenuKey,"MenuKey","~","Add")
xHotKeywrapper(SaveKey,"ScummvmSave")
xHotKeywrapper(LoadKey,"ScummvmLoad")
xHotKeywrapper(MenuKey,"ScummvmMenu")

If (LaunchMode = "ParseIni")
{ Log("Module - Launch mode: ParseIni")
;Try parsing the scummvm config ini file for the path
StringReplace, romNameChanged, TargetName, %A_Space%, _, All ; replace all spaces in the name we lookup in ScummVM's ini because ScummVM does not support spaces in the section name
romNameChanged := RegExReplace(romNameChanged, "\(|\)", "_") ; replaces all parenthesis with underscores
If (TargetName != romNameChanged)
Log("Module - Removed all unsupported characters from """ . TargetName . """ and using this to search for a section in ScummVM's ini: """ . romNameChanged . """")

scummRomPath := IniReadCheck(configFile, romNameChanged, "path",,,1) ; Grab the path in ScummVM's config
; msgbox % scummRomPath
If (SubStr(scummRomPath, 0, 1) = "\") ; scummvm doesn't like sending it paths with a \ as the last character. If it exists, remove it.
StringTrimRight, scummRomPath, scummRomPath, 1
; msgbox % scummRomPath
If !scummRomPath {
Log("Module - Could not locate a path in ScummVM's ini for section """ . romNameChanged . """. Checking If a path exists for the dbName instead: """ . dbName . """",2)
scummRomPath := IniReadCheck(configFile, dbName, "path",,,1) ; If the romName, after removing all unsupporting characters to meet ScummVM's section name requirements, could not be found, try looking up the dbName instead
}
If !FileExist(scummRomPath) ; If user does not have a path set to this game in the ScummVM ini or the path does not exist that is set, attempt to send a proper one in CLI
{ Log("Module - " . (If !scummRomPath ? "No path defined in ScummVM's ini" : ("The path defined in ScummVM's ini does not exist : " . scummRomPath)) . ". Attempting to find a correct path to your rom and sending that to ScummVM.",2)
If (InStr(romPath, romName) && FileExist(romPath)) { ; If the romName is already in the path of the romPath and that path exists, attempt to set that as the path we send to ScummVM
scummRomPath := romPath
Log("Module - Changing " . romName . " path to: " . scummRomPath,2)
} Else If (FileExist(romPath . "\" . romName)) { ; If the romPath doesn't have the romName in the path, let's add it to check If that exists and send that.
scummRomPath := romPath . "\" . romName
Log("Module - Changing " . romName . " path to: " . scummRomPath,2)
} Else
ScriptError("The path to """ . romName . """ was not found. Please set it correctly by manually launching ScummVM and editing this rom's path to where it can be found.")
}
} Else If (LaunchMode = "eXoDOS") {
Log("Module - Launch mode: eXoDOS")
;On eXoDOS sets game MUST be at this folder
scummRomPath := CheckFile(romPath . "\" . romName)
romNameChanged := TargetName
} Else {
Log("Module - Launch mode: Standard")
;Auto mode, scummRomPath will be empty here as everything will be read from the scummvm config ini file
romNameChanged := TargetName
}

options := " --no-console"
configFile := If customConfigFile ? " -c""" . configFile . """" : "" ; If user set a path to a custom config file
fullscreen := If Fullscreen = "true" ? " -f" : " -F"
scummRomPath := If scummRomPath ? " -p""" . scummRomPath . """" : ""

HideEmuStart()
Run(executable . options . fullscreen . configFile . scummRomPath . " " . romNameChanged, emuPath)

WinWait("ahk_class SDL_app")
WinWaitActive("ahk_class SDL_app")

Sleep, 700 ; Necessary otherwise the HyperSpin window flashes back into view

If bezelPath
Sleep, % bezelDelay

BezelDraw()
HideEmuEnd()
FadeInExit()
Process("WaitClose", executable)
7zCleanUp(If LaunchMode = "eXoDOS" ? 7zExtractPath . "\" . romName : "")
BezelExit()
FadeOutExit()
ExitModule()


ScummvmSave:
Send, !1
Return
ScummvmLoad:
Send, ^1
Return
ScummvmMenu:
Send, ^{F5}
Return

CloseProcess:
FadeOutStart()
WinClose("ahk_class SDL_app")
Return
Dans le meme répértoire il y a un fichier ini en voici un extrait:
ScummVM.ini
[Settings]
CustomConfig=.\HyperLaunch.exe
Fullscreen=true
LaunchMode=ParseIni
SaveKey=1
LoadKey=2
MenuKey=p
[Beneath a Steel Sky (CD VGA)]
ScummVMName=sky
Fullscreen=true
LaunchMode=ParseIni
CustomConfig=D:\Hyperspin\Emulateurs\ScummVM\sky.ini
Comme indiqué dans le module, j'ai mis "Skipchecks=Rom Only" et disactivé 7z

Les jeux sont présenté comme cela:
Image

Le BATCH de chaque jeu fonctionne avec un test préalable du fichier de config par jeu, puis le crée s'il n'existe pas. Ensuite il passe au lancement de scumm avec les paramètres adéquats, qui fonctionnent dans l'environnement windows.
En voici un exemple:
BATCH de lancement de jeu
if exist dig.ini goto :lanceur
ECHO [scummvm] >> dig.ini
ECHO speech_volume=192 >> dig.ini
ECHO native_mt32=false >> dig.ini
ECHO midi_gain=100 >> dig.ini
ECHO talkspeed=70 >> dig.ini
ECHO gfx_mode=3x >> dig.ini
ECHO subtitles=false >> dig.ini
ECHO multi_midi=false >> dig.ini
ECHO fullscreen=false >> dig.ini
ECHO sfx_volume=192 >> dig.ini
ECHO music_volume=192 >> dig.ini
ECHO autosave_period=300 >> dig.ini
ECHO lastselectedgame=dig >> dig.ini
ECHO music_driver=auto >> dig.ini
ECHO aspect_ratio=true >> dig.ini
ECHO versioninfo=1.7.0 >> dig.ini
ECHO speech_mute=false >> dig.ini
ECHO enable_gs=false >> dig.ini

ECHO [dig] >> dig.ini
ECHO music_driver=adlib >> dig.ini
ECHO gameid=dig >> dig.ini
ECHO description=The dig>> dig.ini
ECHO language=fr >> dig.ini
ECHO path=%~dp0dig>> dig.ini
ECHO sfx_mute=false >> dig.ini
ECHO savepath=%~dp0dig>> dig.ini
ECHO subtitles=true >> dig.ini
ECHO speech_mute=false >> dig.ini
ECHO platform=windows >> dig.ini

:lanceur
"..\..\emulateurs\ScummVM\scummvm.exe" -c dig.ini -f dig
Dans l'état ce ne fonctionne pas, le background deviens noir quand je lance le jeu sous HLHQ, une petite fenetre noire style invite de commande s'ouvre 0.3 sec (ce n'est pas mes batch car j'en ai volontairement laisser sans batch et cette fenetre apparait aussi), HyperLaunch est présent dans la barre des taches, au bout de 30 sec j'ai un message d'erreur ahk_class... bref le message qu'il mets lorqu'il est résté trop longtemps sans bosser

En LaunchMode j'ai "ParseINI":
Image


J'ai fait des tas et des tas de tests. J'en étais arrivé au point de me dire bha c'est du batch, on va mettre le module PCLauncher pour tous les jeux et basta, mais nan c'est pas si simple la life.

Cette version avec un batch par jeu, était valable il fut un temps (quand j'était sous HL2), mais désormais je crois qu'il faudra tout mettre dans un fichier de config global comme scumm le fait dans appdata. A la limite c'est du détail là.

Le Log d'hyperlaunch est ici :https://justpaste.it/k70d


edit:

Ajout de la vidéo sous hyperlauch pour avoir un visu du probleme. GRace a cette vidéo j'ai pu lire le message d'erreur au lancement, ca viens de scumm:

Code : Tout sélectionner

Using configuartion file: D:\Hyperspin\Hyperlaunch\Modules\ScummVM\ScummVM.ahk
Config gile bugg: Key/value pair found outside a domain in line 1!
Ca avance ;)

[BBvideo 560,340][/BBvideo]
Dernière modification par faeze le 28 mars 2015 - 14:43, modifié 1 fois.

Avatar de l’utilisateur
lavro
Connaisseur
Connaisseur
Messages : 203
Inscription : 28 nov. 2014 - 18:50

Re: Configuration Scummvm HL3

Message par lavro » 28 mars 2015 - 14:08

Je suis sûr qu'une bonne âme va t'aider pour qu'on integre ScummVm à la HFSBox donc up.

Avatar de l’utilisateur
faeze
Mentor
Mentor
Messages : 2089
Inscription : 16 mai 2013 - 01:00
Localisation : Henin Beaumont
A remercié : 198 fois
A été remercié : 118 fois

Re: Configuration Scummvm HL3

Message par faeze » 28 mars 2015 - 14:10

Probleme résolu ! mais je laisse en cours, tant que c'est pas nickel pour partager l’expérience, ca dépannera bien quelqu'un un jour

En fait le fichier de config scummvm n'était pas au bon endroit. Maintenant reste le probleme du fullscreen qui ne se mets pas en marche correctement.

Du coup avec cette solution là, j'ai fait les batch dans le vide. Ha bah non pour les utilisateurs d'HL2 ! Non de dzeus

Avatar de l’utilisateur
lavro
Connaisseur
Connaisseur
Messages : 203
Inscription : 28 nov. 2014 - 18:50

Re: Configuration Scummvm HL3

Message par lavro » 28 mars 2015 - 14:12

Bravo mec !

Avatar de l’utilisateur
faeze
Mentor
Mentor
Messages : 2089
Inscription : 16 mai 2013 - 01:00
Localisation : Henin Beaumont
A remercié : 198 fois
A été remercié : 118 fois

Re: Configuration Scummvm HL3

Message par faeze » 28 mars 2015 - 14:44

En virant le bezel le fullscreen est activé, incompréhensible pour le commun des mortels. On balancera le pack avec le bezel mais pas activé du coup

Avatar de l’utilisateur
lavro
Connaisseur
Connaisseur
Messages : 203
Inscription : 28 nov. 2014 - 18:50

Re: Configuration Scummvm HL3

Message par lavro » 28 mars 2015 - 14:45

C'est dommage !

Avatar de l’utilisateur
faeze
Mentor
Mentor
Messages : 2089
Inscription : 16 mai 2013 - 01:00
Localisation : Henin Beaumont
A remercié : 198 fois
A été remercié : 118 fois

Re: Configuration Scummvm HL3

Message par faeze » 28 mars 2015 - 14:49

Carrement ! Le choix sera possible, soit du fullscreen sans bezel, soit du fénétré avec bezel... je déconne c'est pas drole, pensez aux enfants qui n'ont pas de bezel pour jouer

Avatar de l’utilisateur
lavro
Connaisseur
Connaisseur
Messages : 203
Inscription : 28 nov. 2014 - 18:50

Re: Configuration Scummvm HL3

Message par lavro » 28 mars 2015 - 14:52

:D

Avatar de l’utilisateur
Playmobil
Guide
Guide
Messages : 1849
Inscription : 11 janv. 2013 - 00:00
Localisation : Trou perdu sur la frontière Belge !
A remercié : 86 fois
A été remercié : 177 fois

Re: Configuration Scummvm HL3

Message par Playmobil » 28 mars 2015 - 15:25

Bha Fullscreen c'est bien ! C'est des jeux PC à la base...

Avatar de l’utilisateur
StartOS
Amateur
Amateur
Messages : 40
Inscription : 31 oct. 2015 - 23:18
Localisation : Bondy
A été remercié : 2 fois

Re: Configuration Scummvm HL3

Message par StartOS » 03 sept. 2016 - 02:33

Réponse tardive, pour ne pas avoir de fullscreen tu mets le mode graphique de ScummVM en OpenGL ;)

Répondre

Revenir à « Aide sur RocketLauncher »