Gamoover

[move]Pour vous aussi la chipo ne sera jamais qu'un bootleg de merguez (c)sushy18 ? Alors soyez les bienvenus sur Gamoover ! [/move]

Demul e SuperModel dans HyperSpin

Démarré par Mout, Vendredi 17 Mai 2024, 23:07:56 PM

Mout

Bonjour,

voulant intégrer des PCs dans des bornes arcade (SimCab), je me lance dans l'installation d'HyperSpin avec des Emulateurs Model2, Model3 et Naomi. Pas de problème avec M2 emulator et je n'ai pas commencé la Naomi. Par contre belle galère avec SuperModel....

Apres des heures passé devant l'ordinateur j'arrive enfin a démarrer un jeu en plein écran  :D , par contre je n'arrive pas a charger les paramètres de mon fichier .ini. Le jeu démarre donc avec les paramètres par défaut ; y a t'il une astuce pour faire communiquer le .ahk avec le .ini ?

Merci de votre aide

Mon SuperModel.ahk

MEmu := "SuperModel"
MEmuV := "r845"
MURL := ["http://www.supermodel3.com/"]
MAuthor := ["djvj","chillin","Maximumstyle"]
MVersion := "2.0.8"
MCRC := ""
iCRC := ""
MID := "635038268926572770"
MSystem := ["Sega Model 3"]
;----------------------------------------------------------------------------
; Notes:
; You can find r271 on emucr: https://www.emucr.com/2020/12/supermodel-svn-r840.html
; Required module ini file found on git with this module (rename it to remove the Example part so it matches the ahk name). It contains a few settings to get some games to work. It goes in the folder with this module.
; Set ConfigInputs to true if you want to configure the controls for the emulator. Set to false when you want to play a game
;----------------------------------------------------------------------------
StartModule()
BezelGui()
FadeInStart()

settingsFile = C:\HyperSpin\RocketLauncher\Modules\SuperModel\SuperModel.ini

;---------------------------------------------Core Options----------------------------------------------
Frequency := IniReadCheck(SettingsFile, "Core|" . romName, "Frequency",,,1)
MultiThreading := IniReadCheck(SettingsFile, "Core|" . romName, "MultiThreading","true",,1)
GPUmultiThreaded := IniReadCheck(SettingsFile, "Core|" . romName, "GPUmultiThreaded",,,1)
GPUThreaded := IniReadCheck(SettingsFile, "Core|" . romName, "GPUThreaded",,,1)
LoadSaveState := IniReadCheck(settingsFile, "Core|" . romName, "LoadSaveState",A_Space,,1) ; Filename of the 3D fragment shader
LoadSaveState := GetFullName(LoadSaveState) ; convert from relative to absolute
;---------------------------------------------Video Options---------------------------------------------
ScreenWidth := IniReadCheck(settingsFile, "Video|" . romName, "ScreenWidth",A_ScreenWidth,,1) ; Width
ScreenHeight := IniReadCheck(settingsFile, "Video|" . romName, "ScreenHeight",A_ScreenHeight,,1) ; Height
Fullscreen := IniReadCheck(settingsFile, "Video|" . romName, "Fullscreen",,,1)
Widescreen := IniReadCheck(settingsFile, "Video|" . romName, "Widescreen",,,1)
WidescreenExpand := IniReadCheck(settingsFile, "Video|" . romName, "WidescreenExpand",,,1)
Throttle := IniReadCheck(SettingsFile, "Video|" . romName, "Throttle",,,1)
VertShader := IniReadCheck(settingsFile, "Video|" . romName, "VertShader",A_Space,,1) ; Filename of the 3D vertex shader
VertShader := GetFullName(vertShader) ; convert from relative to absolute
FragShader := IniReadCheck(settingsFile, "Video|" . romName, "FragShader",A_Space,,1) ; Filename of the 3D fragment shader
FragShader := GetFullName(fragShader) ; convert from relative to absolute
Crosshairs := IniReadCheck(SettingsFile, "Video|" . romName, "Crosshairs",,,1)
;---------------------------------------------Audio Options---------------------------------------------
MusicVolume := IniReadCheck(SettingsFile, "Audio|" . romName, "MusicVolume",,,1)
SoundVolume := IniReadCheck(SettingsFile, "Audio|" . romName, "SoundVolume",,,1)
;---------------------------------------------Net Options-----------------------------------------------
NoNet := IniReadCheck(SettingsFile, "Net|" . romName, "nonet",,,1)
Net := IniReadCheck(SettingsFile, "Net|" . romName, "net",,,1)
;---------------------------------------------Input  Options--------------------------------------------
ForceFeedback := IniReadCheck(settingsFile, "Input|" . romName, "ForceFeedback",,,1) ; Turns on force feedback if you have a controller that supports it. Scud Race' (including 'Scud Race Plus'), 'Daytona USA 2' (both editions), and 'Sega Rally 2' are the only games that support it.
ConfigInputs := IniReadCheck(settingsFile, "Input|" . romName, "ConfigInputs",,,1)
InputSystem := IniReadCheck(settingsFile, "Input|" . romName, "InputSystem",,,1) ; Choices are dinput (default), xinput, & rawinput. Use dinput for most setups. Use xinput if you use XBox 360 controllers. Use rawinput for multiple mice or keyboard support.
FFBPlugin := IniReadCheck(settingsFile, "Input|" . romName, "FFBPlugin",,,1)
Crosshairs := IniReadCheck(SettingsFile, "Input|" . romName, "Crosshairs",,,1)





clearNVRAM := IniReadCheck(SettingsFile, "Settings|" . romName, "ClearNVRAM","false",,1)


BezelStart()

If bezelEnabled = true ; If bezels are enabled, the emu's width and height need to be set to the width and height of the bezel. Otherwise the user defined width and height are used.
{ screenWidth := If bezelEnabled = "true" ? bezelScreenWidth : screenWidth
screenHeight := If bezelEnabled = "true" ? bezelScreenHeight : screenHeight
}

;---------------------------------------------Core Options----------------------------------------------
frequency := If Frequency != "" ? "-ppc-frequency=" . frequency : ""
MultiThreading := If MultiThreading = "true" ? "-no-threads" : ""
GPUmultiThreaded := If GPUmultiThreaded = "true" ? "-gpu-multi-threaded" : ""
GPUThreaded := If GPUThreaded = "true" ? "-no-gpu-thread" : ""
LoadSaveState := If LoadSaveState != "" ? "-load-state=" . LoadSaveState : ""
;---------------------------------------------Video Options---------------------------------------------
Resolution := If ScreenWidth != "" ? "-res=" . screenWidth . "`," . screenHeight : ""
Fullscreen := If Fullscreen = "true" ? "-window" : "-window"
Widescreen := If Widescreen = "true" ? "-wide-screen" : ""
WidescreenExpand := If WidescreenExpand = "true" ? "-wide-bg" : ""
Throttle := If Throttle = "true" ? "-no-throttle" : ""
VertShader := If VertShader != "" ? "-vert-shader=""" . vertShader . """" : ""
FragShader := If FragShader != "" ? "-frag-shader=""" . fragShader . """" : ""
Crosshairs := If Crosshairs != "" ? "-crosshairs=" . crosshairs : ""
;---------------------------------------------Audio Options---------------------------------------------
MusicVolume := If MusicVolume != "" ? "-music-volume=" . musicVolume : ""
SoundVolume := If SoundVolume != "" ? "-sound-volume=" . soundVolume : ""
;---------------------------------------------Net Options-----------------------------------------------
NoNet := If NoNet = "true" ? "-no-net" : ""
Net := If Net = "true" ? "-net" : ""
;---------------------------------------------Input  Options--------------------------------------------
ForceFeedback := If ForceFeedback = "true" ? "-force-feedback" : ""
InputSystem := If InputSystem != "" ? "-input-system=" . inputSystem : ""
FFBPlugin := If FFBPlugin = "true" ? "-outputs=win" : ""



If clearNVRAM = true
{ Log("Module - Clearing NVRAM")
nvramFile := emuPath . "\NVRAM\" . romName . ".nv"
If FileExist(nvramFile) {
Log("Module - This NVRAM file exists and will be deleted: """ . nvramFile . """",4)
FileDelete, %nvramFile%
} Else
Log("Module - This NVRAM file does not exist: """ . nvramFile . """",4)
}

If ConfigInputs = true
Run(executable . " -config-inputs", emuPath)



Else
Run(executable . " """ . romPath . "\" . romName . romExtension . """ " . Crosshairs . " " . GPUThreaded . " " . GPUmultiThreaded . " " . fullscreen . " " . nonet . " " . net . " " . WidescreenExpand . " " . widescreen . " " . resolution . " " . frequency . " " . throttle . " " . vertShader . " " . fragShader . " " . inputSystem . " " . forceFeedback . " " . FFBPlugin . " " . multiThreading, emuPath, "")

WinWait("Supermodel")

If ConfigInputs = true
{ WinWait("ahk_class ConsoleWindowClass")
WinGetPos,,, width,, ahk_class ConsoleWindowClass
x := ( A_ScreenWidth / 2 ) - ( width / 2 )
WinMove, ahk_class ConsoleWindowClass,, %x%, 0,, %A_ScreenHeight%
WinHide, ahk_class SDL_app ; hides the small emu window that pops up as it is not needed when configuring controls
WinActivate, ahk_class ConsoleWindowClass
} Else {
WinWaitActive("Supermodel ahk_class SDL_app")
Sleep, 1000
BezelDraw()
}

FadeInExit()
Process("WaitClose", executable)
BezelExit()
FadeOutExit()
ExitModule()


CloseProcess:
FadeOutStart()
WinClose("Supermodel ahk_class SDL_app")
Return

Mout

Réponse a moi même : le settings fonctionne sur certaines commandes mais j'ai fait mes premiers test avec le fullscreen et cette commande ne fonctionne pas ... Va savoir pourquoi

Mout

B'jour,

j'ai un problème avec Demul maintenant... Quand j'utilise l'"exitkey" Demul se ferme, mais pas rocketlauncher.exe. Je ne peux donc relancer aucun jeu tant que je n'ai pas forcé l'arrêt avec la combinaison de touche  q+s

08:55:55:054 | RL |      INFO  | +0     | BuildScript - Loaded Multi-Player scripts
08:55:55:054 | RL |      INFO  | +0     | BuildScript - Loaded Statistics.ahk script
08:55:55:054 | RL |      INFO  | +0     | BuildScript - "C:\HyperSpin\RocketLauncher\Lib\User Functions\Global.ahk" not found
08:55:55:054 | RL |      INFO  | +0     | BuildScript - "C:\HyperSpin\RocketLauncher\Lib\User Functions\SEGA Naomi.ahk" not found
08:55:55:054 | RL |      INFO  | +0     | BuildScript - "C:\HyperSpin\RocketLauncher\Lib\User Functions\Emulators\Demul.ahk" not found
08:55:55:054 | RL |      INFO  | +0     | BuildScript - "C:\HyperSpin\RocketLauncher\Lib\User Functions\SEGA Naomi\Emulators\Demul.ahk" not found
08:55:55:054 | RL |      INFO  | +0     | BuildScript - "C:\HyperSpin\RocketLauncher\Lib\User Functions\SEGA Naomi\clubkrt.ahk" not found
08:55:55:054 | RL |      INFO  | +0     | BuildScript - Finished injecting functions into module
08:55:55:054 | RL |      INFO  | +0     | Main - Module is built
08:55:55:054 | RL |      INFO  | +0     | CheckFile - Checking if C:\HyperSpin\RocketLauncher\AutoHotkey.dll exists
08:55:55:054 | RL |      INFO  | +0     | Main - Running module

J'ai l'impression qu'aucun script ne se lance a la fermeture, pourtant Demul se ferme correctement.