Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Ici se règle les problèmes concernant la configuration des différents émulateurs.

Modérateurs : Porko, Modérateurs

Répondre
Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 30 avr. 2014 - 23:35

Bonsoir !
Je me présente, Vians, petit nouveau sur ce forum, ayant pour projet 2014/15 de se monter une belle borne !   :D  

Je débute donc sur hyperspin via la Heavybox d'Heavyarms et je bloque sur un petit soucis :

Lorsque je lance le jeu "Astérix" sur snes dans hyperspin, il est par défaut très lent, car en pal 50hz.
J'ai donc fermé hyperspin, lancé zsnes seul et j'ai vu que dans le menu de chargement de roms, il y avait une option "force ntsc" qui permet de lancer le fichier en 60hz donc à la bonne vitesse.

Je me demandais si je n'avais pas moyen de forcer cela via un ahk spécifique à cette rom, en configurant hyperlaunch pour utiliser un ahk par jeu... Ce qui j'en conviens demanderait par la suite d'écrire un ahk pour chacun des jeux de ma borne, soit un travail titanesque :shock:   Le plus simple serait peut-être de choper la rom non-européenne en fait, non ?

Qu'en pensez-vous ?   :?:

Avatar de l’utilisateur
Veusti
Connaisseur
Connaisseur
Messages : 219
Inscription : 11 févr. 2014 - 00:00
A remercié : 132 fois
A été remercié : 17 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Veusti » 01 mai 2014 - 01:38

Bonsoir Vians,

je crois que tu patauges dans la semoule .... Je vais tenter d’éclairer ta lanterne ;)  (j'écris comme un vieux mdr)

"  Forcer zsnes à lancer un jeu en ntfs via hyperlaunch ? "Tout d'abord ton titre : "ntfs" ... euh tu veux dire en ntsc ?

Lorsque je lance le jeu "Astérix" sur snes dans hyperspin, il est par défaut très lent, car en pal.Tu dis " il est par défaut très lent, car en pal. " Ce n'est pas parce que un jeu est en PAL qu'il est lent. Certes le PAL est standard de couleur avec 25 images par seconde et 576 lignes par image (contre 30 image par seconde et 525 lignes pour le ntsc) mas un jeu PAL n'est pas un jeu lent.
Après tu peux affiner les réglages (activer le triple buffer, etc.) et les sauvegarder. Ainsi, l'émulateur lancera ton jeu avec tes réglages.

J'ai donc fermé hyperspin, lancé zsnes seul et j'ai vu que dans le menu de chargement de roms, il y avait une option "force ntsc" qui permet de lancer le fichier en ntsc donc à la bonne vitesse.La on voit bien qu'il y a une confusion avec les termes PAL / NTSC.
Si ton jeu est en PAL, tu ne peux que le lancer en PAL. Activer le NTSC ne changera rien.


Pour finir, PAL et NTSC sont des standards d'image et un jeu NTSC n'ira pas plus vite qu'un jeu PAL.

Voila, j'espère t'avoir éclaircit. Si tu as d'autres questions, n'hésite pas   :cheers:    :cheers:

Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 01 mai 2014 - 14:47

Merci d'avoir pris le temps de me répondre.
Je ne patauge en revanche pas du tout, j'ai fait une faute de frappe dans le titre d'une part, et j'utilise les abus de langage de zsnes d'autre part.

Testes toi-même : lance ce jeu via le menu de load de zsnes et il sera par défaut lancé avec l'option "Pal" ce qui est un mauvais choix de dénomination car voulant dire en fait "en 50hz". Et lorsque tu coches "force ntsc", cela lance le jeu en 60hz, d'où un gain en vitesse.

Bien sûr qu'un jeu lancé en 60hz plutôt qu'en 50hz est "plus rapide" (sur console en tout cas, je t'avoue que pour l'émulation cela m'a étonné :suspect:  ). Quel serait l'avantage de switcher des consoles sinon, en dehors de la géométrie ? Cela se vérifie très simplement au lancement en plus...

Le soucis c'est qu'en lançant un jeu tournant sur zsnes via hyperspin, on ne peut en apparence pas activer cette option 60hz. D'où ma requête...
Je crois que la rom n'existe de toute façon pas en us. Tant pis !

Mais merci quand même !   ;)

Avatar de l’utilisateur
Veusti
Connaisseur
Connaisseur
Messages : 219
Inscription : 11 févr. 2014 - 00:00
A remercié : 132 fois
A été remercié : 17 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Veusti » 02 mai 2014 - 10:15

Ah pardon, au premier abord je pensais qu'il y avait une confusion. J'espère ne pas t'avoir offensé.
  :oops:  

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par soft-bug » 02 mai 2014 - 10:49

Bonjour,

Je n'utilise pas cet émulateur mais il doit bien y avoir un fichier INI dans lequel ce paramétre est stocké entre 50 hz et 60 hz.

Donc il y a possibilité d'agir via de deux façons :

- Soit tu déclares un "nouveau" système HyperSpin pour y mettre les roms US uniquement. Et en fonction du répertoire ton ahk change le paramétre.
- Soit tu nommes les roms US avec une description que ton ahk va analyser pour en déduire le US et agir sur le fichier INI pour mettre le Hz qui va bien
- etc ...

Merci donc d'utiliser la balise code dans un message pour mettre le fameux fichier ini et le ahk que tu utilises actuellement.  :pirat:

J'avais ouvert un sujet ... il y a bien longtemps qui titrait "Pensez aux fichiers INI" ... mais je peux te remettre les éléments adaptés à ta problèmatique lorsque j'aurai connaissance de ce fichier INI

Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 02 mai 2014 - 22:23

Y'a pas de mal Veusti, c'était plutôt sympa de ta part et ça m'a permis de corriger mon énoncé pour être plus clair... Donc merci !   :D  

Je suis allé voir ton post SB, c'est instructif.

Je vais aller jeter un coup d'oeil ce weekend et essayer de te trouver ça. Ta deuxième solution me parait plus simple, je ne suis pas très familier avec le code même si avide de connaissances mais ce sujet de 60hz me turlupine...   :suspect:

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par soft-bug » 03 mai 2014 - 08:31

Y'a pas de mal Veusti, c'était plutôt sympa de ta part et ça m'a permis de corriger mon énoncé pour être plus clair... Donc merci !   :D  

Je suis allé voir ton post SB, c'est instructif.

Je vais aller jeter un coup d'oeil ce weekend et essayer de te trouver ça. Ta deuxième solution me parait plus simple, je ne suis pas très familier avec le code même si avide de connaissances mais ce sujet de 60hz me turlupine...   :suspect:
L'intérêt c'est que je peux t'aider ...   :pirat:  

Moi je suis à l'aise avec le code AHK quand je sais ce qu'il faut faire !!!

Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 03 mai 2014 - 10:13

Alors, voici le fichier Super Nintendo.ini situé dans Hyperspin\Settings :

[exe info]
hyperlaunch=true
path=.\Emulators\Super Nintendo\
exe=zsnesw.exe
rompath=.\Roms\Super Nintendo\
romextension=sfc, mgd, smc
userompath=false
searchsubfolders=false
Per_Game_Modules=false
Skipchecks=false
Hide_Cursor=use_global
Hide_Desktop=use_global
Hide_Taskbar=use_global
CPWizard_Enabled=use_global
CPWizard_Delay=use_global
CPWizard_Params=use_global
Fade_In=use_global
Fade_Out=use_global
Fade_Color=use_global
Fade_In_Duration=use_global
Fade_Out_Duration=use_global
Fade_In_Delay=use_global
7z_Enabled=use_global
7z_Extract_Dir=use_global
7z_Delete_Temp=use_global
Keymapper_Enabled=use_global
Keymapper=use_global
MultiGame_Enabled=use_global
MultiGame_Background_Color=use_global
MultiGame_Side_Padding=use_global
MultiGame_Y_Offset=use_global
MultiGame_Image_Adjust=use_global
MultiGame_Font=use_global
MultiGame_Text_1_Options=use_global
MultiGame_Text_1_Text=use_global
MultiGame_Text_2_Options=use_global
MultiGame_Text_2_Offset=use_global
MultiGame_Use_Sound=use_global
MultiGame_Sound_Frequency=use_global
MultiGame_Exit_Effect=use_global
MultiGame_Selected_Effect=use_global
MultiGame_Use_Game_Art=use_global
MultiGame_Art_Folder=use_global
Cp_Wizard_Enabled=use_global
[navigation]
last_game=Donkey Kong Country 2 - Diddy's Kong Quest (USA) (En,Fr)
start_on_favorites=false
remove_info_wheel=true
remove_info_text=true
use_last_game=true
[Special Art A]
active=true
[Special Art B]
active=true
[Special Art C]
active=true
[themes]
use_parent_vids=true
use_parent_themes=true
[wheel]
text_color1=0x000NAN
text_color2=0x000NAN
text_color3=0x000NAN
text_stroke_color=0x000NAN
shadow_color=0x000NAN
alpha=0.3
[sounds]
wheel_click=true


Et voilà mon Hyperlaunch.ahk :

/**
 * HyperLaunch Version 1.05
 * Autohotkey script by BadBoyBill  badboybill@hyperspin-fe.com
 * CursorHide by Lazlo
 * Integrated FreeDO wrapper by brian_hoffman
 *
 * If you are reading this and do not have autohotkey you can get it
 * @ http://www.autohotkey.com/download/
 * If you would like to modify this script and share it thats OK, but
 * see if your modification is something that we would like to add
 * to the official version.  
 *
 * Refer to the autohotkey documentation for the keyoboard keylist
 *
 * If this script does not support your favorite emulator
 * then please request support @ http://www.hyperspin-fe.com/forum  
 *
 *                    :Supported emulators:
 *    :System:                                :Emulators:
 *Atari 5200.............................messpp.exe
 *Atari Lynx.............................handy.exe
 *Daphne.................................daphne.exe
 *Future Pinball.........................Future Pinball.exe
 *Gameboy Advance........................visualboyadvance.exe  
 *Gameboy................................visualboyadvance.exe
 *Gameboy Color..........................visualboyadvance.exe  
 *MAME...................................mame.exe
 *Neo Geo................................mame.exe
 *Neo Geo Pocket Color...................NeoPop-Win32.exe
 *Nintendo 64............................project64.exe
 *Nintendo Entertainment System..........nestopia.exe
 *Panasonic 3DO..........................FreeDO.exe
 *Sega 32X...............................fusion.exe
 *Sega CD................................fusion.exe
 *Sega Dreamcast.........................nullDC_100b1_6.exe  
 *Sega Game Gear.........................fusion.exe
 *Sega Genesis...........................fusion.exe
 *Sega Master System.....................fusion.exe
 *Sony Playstation.......................psxfin.exe
 *Super Nintendo Entertainment System....zsnesw.exe
 *TurboGrafx 16..........................mednafen.exe
 *Zinc...................................zinc.exe
 *JukeBox................................silverjuke.exe
 *JukeBox................................SKJukebox.exe
 *
 *  
 */
 
#SingleInstance force      ;Prevent multiple instances
#InstallKeybdHook
SetTitleMatchMode 2

;------------------------------------------------------------------------------;
;                                 MAIN SETTINGS                                ;
;------------------------------------------------------------------------------;

;[UNIVERSAL HOTKEYS]            ;SEPERATE MULTIPLE KEYS WITH (ampersand) up to 2 keys.
exitScriptKey   = q s         ;Secret hotkey(s) to exit script if needed
                                ;Not to be confused with exit emulator keys
                                
exitEmulatorKey = Esc           ;This key/key combo will close any emulators
                                ;that do not have normal closing methods.
                                
toggleCursorKey = t             ;hotkey(s) to show or hide cursor if needed
                                ;when hideCursor below is true

;[MOUSE CURSOR]
hideCursor      = false         ;Automatically hide cursor during script
                                ;WARNING: Make sure ALL your emu's are running fine
                                ;before setting this to true as a precaution.*
                                
;[WINDOWS]
hideDesktop     = true          ;Attempts to hide desktop with black screen, might help
                                ;on some emu's for hiding launching windows.
                                
hideTaskbar     = false         ;Hide the windows taskbar when running emu's.
                                ;WARNING: Make sure ALL your emu's are running fine
                                ;         before setting this to true as a precaution.*

daemontools     = "C:\Program Files\DAEMON Tools Lite\daemon.exe"        ;Hide the windows taskbar when running emu's.
                                ;WARNING: Make sure ALL your emu's are running fine
                                ;         before setting this to true as a precaution.*

/*
    *:If for some weird reason the script hangs follow these steps to get back to normal.
      1. If an emulator hangs up or cant load your game then first try to exit the emu
         by pressing your Emulator exit hotkey above.
      2. If your emu exited but your mouse cursor is gone use your cursor toggle hotkey.  
      3. Next try to exit the script by pressing your Exit Script Hotkey above. This
         will also bring back your cursor and taskbar is they are set to true.
*/
      






;*******************************************************************************
;*                  EDIT BELOW THIS POINT AT YOUR OWN RISK                     *
;*******************************************************************************  
                                
;------------------------------------------------------------------------------;
;                       GET PARAMATERS AND SET HOTKEYS                         ;
;------------------------------------------------------------------------------;

;CHECKING FOR 2 PARAMS, IF NOT THEN EXIT
if 0 2
{
    MsgBox Usage: HyperLaunch.ahk/exe "System Name" "Rom Name"
    ExitApp
}

systemName = %1%
romName = %2%

Hotkey, %exitScriptKey%, ExitScript
if (hideCursor = "true")
{
  Hotkey, %toggleCursorKey%, ToggleCursor
  SystemCursor("Off")
}

WinClose, cmd.exe
;------------------------------------------------------------------------------;
;                              GET AND CHECK PATHS                             ;
;------------------------------------------------------------------------------;
GoSub, CheckINI
IniRead, iniEmuPath, %A_ScriptDir%\Settings\%systemName%.ini, exe info, path
emuPath := GetFullName(iniEmuPath)
IniRead, iniRomPath, %A_ScriptDir%\Settings\%systemName%.ini, exe info, rompath
romPath := GetFullName(iniRomPath)
IniRead, executable, %A_ScriptDir%\Settings\%systemName%.ini, exe info, exe
IniRead, romExtensions, %A_ScriptDir%\Settings\%systemName%.ini, exe info, romextension

romExtension =
GoSub, CheckPaths

;------------------------------------------------------------------------------;
;                                  RUN SYSTEM                                  ;
;------------------------------------------------------------------------------;


;**********************************ATARI 5200***********************************
if (systemName = "Atari 5200" (executable = "messpp.exe" || executable = "mess.exe"))
{   
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %executable% a5200 -cart "%romPath%%romName%%romExtension%" -skip_gameinfo -nowindow -nonewui, %emuPath%, Hide UseErrorLevel
}

;**********************************ATARI Lynx***********************************
else if (systemName = "Atari Lynx" executable = "handy.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %executable% "%romPath%%romName%%romExtension%", %emuPath%, UseErrorLevel
}

;************************************DAPHNE*************************************
else if (systemName = "Daphne" executable = "daphne.exe"){
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    daphneParams = vldp -fullscreen -x 640 -y 480 -nohwaccel -framefile
    frameFilePath = %romPath%%romName%%romExtension%
    RunWait, %executable% %romName% %daphneParams% %frameFilePath%, %emuPath%, UseErrorLevel  
}

;********************************GAMEBOY ADVANCE********************************

else if (systemName = "Gameboy Advance" executable = "visualboyadvance.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, "%emuPath%%executable%" "%romPath%%romName%%romExtension%", UseErrorLevel    
}

;********************************GAMEBOY********** **********************
else if (systemName = "Gameboy" executable = "visualboyadvance.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, "%emuPath%%executable%" "%romPath%%romName%%romExtension%", UseErrorLevel
}

;********************************GAMEBOY COLOR********************************
else if (systemName = "Gameboy Color" executable = "visualboyadvance.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, "%emuPath%%executable%" "%romPath%%romName%%romExtension%", UseErrorLevel
}

;********************************Future Pinball********************************
else if (systemName = "Future Pinball" executable = "Future Pinball.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Runwait, "%emuPath%%executable%" /open "%romPath%%romName%%romExtension%" /play /exit %emuPath%, Hide UseErrorLevel
}

;*************************************MAME**************************************

else if (systemName = "MAME" executable = "mame.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Runwait, %executable% %romName%, %EmuPath%, Hide UseErrorLevel
    Process, waitClose, %executable%
    exitapp
}

;***********************************NEO GEO*************************************

else if (systemName = "Neo Geo" executable = "mame.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %executable% "%romName%", %emuPath%, Hide UseErrorLevel
}

;*****************************NEO GEO POCKET COLOR******************************

else if (systemName = "Neo Geo Pocket Color" executable = "NeoPop-Win32.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %executable% "%romPath%%romName%%romExtension%", %emuPath%, UseErrorLevel
}

;***********************************NINTENDO 64*********************************

else if (systemName = "Nintendo 64" executable = "Project64.exe")
{
    hideDesktop()
    Sleep, 2000
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %executable% "%romPath%%romName%%romExtension%", %emuPath%, Hide UseErrorLevel
}

;****************************NINTENDO ENTERTAINMENT SYSTEM**********************

else if (systemName = "Nintendo Entertainment System" executable = "Nestopia.exe")
{
    Gui, Color, 000000
    Gui -Caption +ToolWindow +AlwaysOnTop
    Gui, Show, W%A_ScreenWidth% H%A_ScreenHeight%, BlackGui
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %executable% "%romPath%%romName%%romExtension%", %emuPath%, UseErrorLevel
    Sleep, 2000
    Gui, destroy
    Process, waitClose, %executable%
    exitapp
}

;***********************************Panasonic 3DO*******************************

else if (systemName = "Panasonic 3DO" executable = "FreeDO.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, "%EmuPath%%Executable%",,Hide UseErrorLevel
    DetectHiddenWindows, on
    WinShow, FreeDO Beta 1.6.2
    WinWait, FreeDO Beta 1.6.2
    ControlSend, , {F4}, FreeDO Beta 1.6.2
    WinWaitActive, FreeDO Beta 1.6.2
    SendInput, {ALTDOWN}f{ALTUP}{ENTER}
    IfWinNotActive, Open, Common Places Host W
    WinActivate, Open, Common Places Host W
    WinWaitActive, Open, Common Places Host W
    clipboard=
    clipboard=%romPath%%romName%%romExtension%
    ClipWait
    Sleep,100
    Send,^v
    Sleep,100
    send, {ENTER}
    WinWait, FreeDO Beta 1.6.2
    IfWinNotActive, FreeDO Beta 1.6.2, , WinActivate, FreeDO Beta 1.6.2,
    WinWaitActive, FreeDO Beta 1.6.2,
    SendInput, {ALTDOWN}c{ALTUP}{ENTER}{ENTER}
    Process, WaitClose, FreeDO.exe
}

;***********************************SEGA 32X************************************

else if (systemName = "Sega 32X" executable = "Fusion.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% "%romPath%%romName%%romExtension%" -auto -32X -fullscreen, %EmuPath%, Hide UseErrorLevel
    Process, WaitClose, fusion.exe
}

;***********************************SEGA CD*************************************

else if (systemName = "Sega CD" executable = "Fusion.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% "%romPath%%romName%%romExtension%" -auto -scd -fullscreen, %EmuPath%, Hide UseErrorLevel
    Process, WaitClose, %Executable%
    exitapp
}

;*********************************SEGA DREAMCAST********************************

else if (systemName = "Sega Dreamcast" executable = "nullDC_100b1_6.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% -config ImageReader:DefaultImage="%romPath%%romName%%romExtension%", %EmuPath%,Hide UseErrorLevel
    WinWait, nullDC
    Sleep,1000
    WinShow, ahk_class ndc_main_window
    Process, WaitClose, nullDC_100b1_6.exe
}


;*********************************SEGA Game Gear********************************

else if (systemName = "Sega Game Gear" executable = "Fusion.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% "%romPath%%romName%%romExtension%" -auto -sms -fullscreen, %EmuPath%, Hide UseErrorLevel
    Process, WaitClose, fusion.exe
}

;*********************************SEGA Genesis**********************************

else if (systemName = "Sega Genesis" executable = "Fusion.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% "%romPath%%romName%%romExtension%" -auto -gen -fullscreen, %EmuPath%, Hide UseErrorLevel
    Process, WaitClose, fusion.exe
}

;*******************************SEGA Master System******************************

else if (systemName = "Sega Master System" executable = "Fusion.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% "%romPath%%romName%%romExtension%" -auto -sms -fullscreen, %EmuPath%, Hide UseErrorLevel
    Process, WaitClose, fusion.exe
}

;***********************************SEGA MODEL 2*********************************

else if (systemName = "Sega Model 2")
{
    if(executable = "emulator_multicpu.exe" || executable = "emulator.exe" )
    {  
      ;hideDesktop()
      Hotkey, %exitEmulatorKey%, CloseProcess
      Run, %executable% %romName%, %emuPath%, Hide UseErrorLevel
      DetectHiddenWindows, on
      WinWait, Model 2
      WinShow
      Process, WaitClose, %executable%
    }
}

;***********************************SEGA Naomi***********************************

else if (systemName = "SEGA Naomi")
{
    if(executable = "NAOMI.exe" || executable = "nullDC-Naomi_1.0.3_mmu.exe" )  
SetWorkingDir, %emuPath%
Hotkey, %exitEmulatorKey%, CloseProcess
IniWrite, %romPath%%romName%%romExtension%, %A_WorkingDir%\DIMM.ini, Settings, image
Run, %executable% ; launches emulator
Process, WaitClose, %executable%
exitapp
}


;**********************************SEGA SATURN***********************************
else if (systemName = "Sega Saturn" executable = "SSF.exe")
{
    RunWait, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %executable% , %emuPath%, UseErrorLevel
}

;********************************Sony Playstation*******************************

else if (systemName = "Sony Playstation" executable = "psxfin.exe")
{
    psxParams = -f
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %Executable% %psxParams% "%romPath%%romName%%romExtension%", %EmuPath%, Hide UseErrorLevel
    DetectHiddenWindows, on
    WinWait, ahk_class pSX
    hideDesktop()
    WinWaitClose, ahk_class pSX
}

;***********************Super Nintendo Entertainment System*********************

else if (systemName = "Super Nintendo Entertainment System" executable = "zsnesw.exe")
{
    hideDesktop()
    SetKeyDelay, 250
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %Executable% "%romPath%%romName%%romExtension%", %EmuPath%
}

;**********************************Turbo Duo***********************************
else if (systemName = "Turbo Duo" executable = "pce.exe")
{
    RunWait, %DAEMONTOOLS% -mount 0`,"%romPath%%romName%%romExtension%"
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    Run, %executable% syscard3.pce , %emuPath%, UseErrorLevel
}

;**********************************TurboGrafx 16********************************

else if (systemName = "TurboGrafx 16" executable = "mednafen.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, "%EmuPath%%Executable%" "%romPath%%romName%%romExtension%" -fs 1,, UseErrorLevel
}

;***********************************JukeBox*************************************

else if (systemName = "Jukebox" executable = "Silverjuke.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseJuke
    RunWait, %emuPath%%executable% --kiosk, Hide UseErrorLevel
}
else if (systemName = "Jukebox" executable = "SKJukebox.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %emuPath%%executable%, Hide UseErrorLevel
}

;***************************************Zinc************************************

else if (systemName = "Zinc" executable = "zinc.exe")
{
    hideDesktop()
    Hotkey, %exitEmulatorKey%, CloseProcess
    RunWait, %Executable% %romName%, %EmuPath%, Hide UseErrorLevel
}

else
{
    MsgBox,48,Error,%systemName% is an invalid System Name or %executable% isnt supported yet,6
}
                                

;------------------------------------------------------------------------------;
;                WHEN EMULATOR FINISHES OR IF LAUNCH EXE FAILS                 ;
;------------------------------------------------------------------------------;
;************PROBABLY DO NOT NEED TO EDIT THIS AREA*************

if (ErrorLevel = "ERROR")
{
  MsgBox,48,Error,Failed to run executable check your paths,6
}
Goto ExitScript ; Exits script and returns to frontend


;------------------------------------------------------------------------------;
;                                KILL COMMANDS                                 ;
;------------------------------------------------------------------------------;
;************PROBABLY DO NOT NEED TO EDIT THIS AREA*************

/*
 Most emu's can be closed with CloseProcess when using a 2 key combo, if not set a custom
 close.
*/
CloseJuke:
RunWait, %emuPath%%executable% --execute="program.shutdown(30);", Hide UseErrorLevel
return

CloseProcess:
Hotkey, %exitScriptKey%, Off
Process, Close, %Executable%
Process, WaitClose, %Executable%
Gui, Color, 000000
Gui -Caption +ToolWindow +AlwaysOnTop
Gui, Show, W%A_ScreenWidth% H%A_ScreenHeight%, BlackGui
return

ExitScript:
Process, Exist, HyperSpin.exe
PID := errorLevel
if (PID)
{
  WinActivate, ahk_pid %PID%
  WinWaitActive, ahk_pid %PID%
  Gui, destroy
  if (hideCursor)
    SystemCursor("On")
  if (hideTaskbar)
    WinShow ahk_class Shell_TrayWnd
  ExitApp
}


OnExit, ExitScript
return








;------------------------------------------------------------------------------;
;                                 REST OF SCRIPT                               ;
;------------------------------------------------------------------------------;
;************PROBABLY DO NOT NEED TO EDIT THIS AREA*************



SystemCursor(OnOff=1)   ; INIT = "I","Init"; OFF = 0,"Off"; TOGGLE = -1,"T","Toggle"; ON = others
{
    static AndMask, XorMask, $, h_cursor
        ,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13 ; system cursors
        , b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13   ; blank cursors
        , h1,h2,h3,h4,h5,h6,h7,h8,h9,h10,h11,h12,h13   ; handles of default cursors
    if (OnOff = "Init" or OnOff = "I" or $ = "")       ; init when requested or at first call
    {
        $ = h                                          ; active default cursors
        VarSetCapacity( h_cursor,4444, 1 )
        VarSetCapacity( AndMask, 32*4, 0xFF )
        VarSetCapacity( XorMask, 32*4, 0 )
        system_cursors = 32512,32513,32514,32515,32516,32642,32643,32644,32645,32646,32648,32649,32650
        StringSplit c, system_cursors, `,
        Loop %c0%
        {
            h_cursor   := DllCall( "LoadCursor", "uint",0, "uint",c%A_Index% )
            h%A_Index% := DllCall( "CopyImage",  "uint",h_cursor, "uint",2, "int",0, "int",0, "uint",0 )
            b%A_Index% := DllCall("CreateCursor","uint",0, "int",0, "int",0
                , "int",32, "int",32, "uint",AndMask, "uint",XorMask )
        }
    }
    if (OnOff = 0 or OnOff = "Off" or $ = "h" and (OnOff 0 or OnOff = "Toggle" or OnOff = "T"))
        $ = b  ; use blank cursors
    else
        $ = h  ; use the saved cursors

    Loop %c0%
    {
        h_cursor := DllCall( "CopyImage", "uint",%$%%A_Index%, "uint",2, "int",0, "int",0, "uint",0 )
        DllCall( "SetSystemCursor", "uint",h_cursor, "uint",c%A_Index% )
    }
}
ToggleCursor:
  SystemCursor("Toggle")
return

IniRead(Filename, Section, Key, Default = "") {
   FileRead, text, *t %Filename%
   text = `n%text%`n
   StringTrimLeft, text, text, InStr(text, "`n[" . Section . "]`n")
   Loop, 8 {
      sp := sp . " "
      StringReplace, text, text, %Key%%sp%=, %Key%=
      If ErrorLevel
         Break
   }
   start := InStr(text, "`n" . Key . "=")
   If !start
      Return, Default
   start += StrLen(Key) + 2
   StringMid, Value, text, start, InStr(text, "`n", false, start) - start
   Return, Value
}

;Get Full Path from Relative Path
GetFullName( fn ) {
   static buf, i
   if !i
      i := VarSetCapacity(buf, 512)
   DllCall("GetFullPathNameA", "str", fn, "uint", 512, "str", buf, "str*", 0)
   return buf
}

hideDesktop(){
    ;WinHide ahk_class Shell_TrayWnd
    ;Gui, +toolwindow
    ;Gui, -Caption
    ;Gui, Color, black
    ;Gui, show, +toolwindow Maximize
Gui, Color, 000000
Gui -Caption +ToolWindow
Gui, Show, W%A_ScreenWidth% H%A_ScreenHeight%, BlackScreen
    
}

CheckINI:
  IfNotExist, %A_ScriptDir%\HyperSpin.exe
  {
    MsgBox,48,Error, Must be in same directory as HyperSpin.exe,6
    Goto ExitScript
  }
  IfNotExist, %A_ScriptDir%\Settings\%systemName%.ini
  {
    MsgBox,48,Error,Cannot Find %A_ScriptDir%\Settings\%systemName%.ini,6
    Goto ExitScript
  }
return

CheckPaths:
  romFound =
  StringRight, emuPathBackSlash, EmuPath, 1
  StringRight, romPathBackSlash, RomPath, 1
  
  If (emuPathBackSlash != "\" || romPathBackSlash != "\")
  {
    MsgBox,48,Error, Make sure your paths contains a backslash on the end ,6
    Goto ExitScript
  }
  If (executable = "")
  {
    MsgBox,48,Error, Missing executable in %systemName%.ini ,6
    Goto ExitScript  
  }
  If (romPath = "")
  {
    MsgBox,48,Error, Missing rom path in %systemName%.ini ,6
    Goto ExitScript  
  }
  If (emuPath = "")
  {
    MsgBox,48,Error, Missing emulator path in %systemName%.ini ,6
    Goto ExitScript  
  }
  IfNotExist, %EmuPath%%Executable%
  {
    MsgBox,48,Error,Cannot Find %EmuPath%%Executable%,6
    Goto ExitScript
  }
  if(systemName != "zinc")  
  {
    If (romExtensions = "")
      {
        MsgBox,48,Error, Missing rom extension in %systemName%.ini ,6
        Goto ExitScript  
      }
    Loop, parse, romExtensions, `,
    {
      inputVar = %A_LoopField%
      StringLeft, charToCheck, inputVar, 1
      If(charToCheck = ".")
      {
        MsgBox,48,Error, Make sure your rom extensions do not contain a ".",6
        Goto ExitScript
      }
      IfExist %RomPath%%RomName%.%A_LoopField%
      {
        romExtension = .%A_LoopField%
        romFound = true
        break
      }else{
        IfExist %RomPath%%RomName%\%RomName%.%A_LoopField%
        {
          RomPath = %RomPath%%RomName%\
          MsgBox %RomPath%
          romExtension = .%A_LoopField%
          romFound = true
          break      
        }else{
           romFound = false
        }
      }
    }
  }
  if (romFound = "false")
  {
    if(systemName != "daphne"){
      MsgBox,48,Error,Cannot find Rom - %RomPath%%RomName% with any provided extension,6
      Goto ExitScript
    }else{
      MsgBox,48,Error,Cannot find Daphne framefile - %RomPath%%RomName% with any provided extension,6
      Goto ExitScript
    }
  }
return




Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 03 mai 2014 - 10:19

Oups, il te fallait sûrement plutôt le module Super Nintendo.ahk !   :oops:  
Le voilà :

;----------------------------------------------------------------------------
; Super Nintendo Entertainment System
; zsnesw v1.51
; by djvj
; 1.1
;
; Notes:
; Be sure to set the settings you want below
;----------------------------------------------------------------------------
Fullscreen = true
Stretch = false
resX = 1024
resY = 768
DisplayRomInfo = false   ; Display rom info on load along bottom of screen
;----------------------------------------------------------------------------

SetKeyDelay, 50
zsnesFile := CheckFile(emuPath . "zsnesw.cfg")
FileRead, zsnesCfg, %zsnesFile%

GUI_ID := FadeInStart()

xLine := TF_Find(zsnesCfg,"","","CustomResX=") ; find location in zsnes cfg where it stores its custom X res
yLine := TF_Find(zsnesCfg,"","","CustomResY=") ; find location in zsnes cfg where it stores its custom Y res
modeLine := TF_Find(zsnesCfg,"","","cvidmode=") ; find location in zsnes cfg where it stores its custom vid mode
zsnesCfg := TF_ReplaceLine(zsnesCfg,xLine,xLine,"CustomResX=" . resX) ; update custom X res in zsnes cfg file
zsnesCfg := TF_ReplaceLine(zsnesCfg,yLine,yLine,"CustomResY=" . resY) ; update custom Yres in zsnes cfg file

If ( Fullscreen = "true" Stretch = "true" ) ; sets fullscreen, stretch, and filter support
   vidMode = 39
Else If ( Fullscreen = "true" Stretch != "true" ) ; sets fullscreen, correct aspect ratio, and filter support
   vidMode = 42
Else ; sets windowed mode with filter support
   vidMode = 38

zsnesCfg := TF_ReplaceLine(zsnesCfg,modeLine,modeLine,"cvidmode=" . vidMode) ; update custom vid mode in zsnes cfg file

; Setting DisplayRomInfo setting in cfg if it doesn't match what user wants above
currentDRI := (InStr(zsnesCfg, "DisplayInfo=1") ? ("true") : ("false"))
If ( DisplayRomInfo != "true" And currentDRI = "true" ) {
      StringReplace, zsnesCfg, zsnesCfg, DisplayInfo=1, DisplayInfo=0
   } Else If ( DisplayRomInfo = "true" And currentDRI = "false" ) {
      StringReplace, zsnesCfg, zsnesCfg, DisplayInfo=0, DisplayInfo=1
   }

SaveFile(zsnesCfg, zsnesFile) ; save changes to zsnesw.cfg

7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)

Run, %executable% "%romPath%%romName%%romExtension%", %emuPath%

WinWait, ZSNES ahk_class ZSNES
WinWaitActive, ZSNES ahk_class ZSNES

GUI_ID2 := FadeInExit()

Process, WaitClose, %executable%

7z2 := 7zCleanUp()

GUI_ID4 := FadeOutExit()

WinActivate, Hyperspin

ExitApp


SaveFile(text,file) {
      FileDelete, %file%
      FileAppend, %text%, %file%
   }

CloseProcess:
   GUI_ID3 := FadeOutStart()
   Send, {Alt Down}{F4 Down}{F4 Up}{Alt Up} ; No other closing method seems to work
Return


TF_Find(Text, StartLine = 1, EndLine = 0, SearchText = "", ReturnFirst = 1, ReturnText = 0)
   { ; complete rewrite for 3.1
    TF_GetData(OW, Text, FileName)
    If (RegExMatch(Text, SearchText) 1)
       Return "0" ; SearchText not in file or error, do nothing
         TF_MatchList:=_MakeMatchList(Text, StartLine, EndLine) ; create MatchList
    Loop, Parse, Text, `n
      {
       If A_Index in %TF_MatchList%
          {
          If (RegExMatch(A_LoopField, SearchText) 0)
            {
             If (ReturnText = 0)
               Lines .= A_Index "," ; line number
             Else If (ReturnText = 1)
               Lines .= A_LoopField "`n" ; text of line
             Else If (ReturnText = 2)
               Lines .= A_Index ": " A_LoopField "`n" ; add line number
             If (ReturnFirst = 1) ; only return first occurence
               Break
            }   
          }   
      }
    If (Lines "")
      StringTrimRight, Lines, Lines, 1 ; trim trailing , or `n
    Else
      Lines = 0 ; make sure we return 0
    Return Lines
   }

TF_ReplaceLine(Text, StartLine = 1, Endline = 0, ReplaceText = "")
   {
    TF_GetData(OW, Text, FileName)
    TF_MatchList:=_MakeMatchList(Text, StartLine, EndLine) ; create MatchList
    Loop, Parse, Text, `n, `r
      {
       If A_Index in %TF_MatchList%
         Output .= ReplaceText "`n"
       Else
         Output .= A_LoopField "`n"
      }
    Return TF_ReturnOutPut(OW, OutPut, FileName)
   }

TF_GetData(byref OW, byref Text, byref FileName)
   {
   OW=0 ; default setting: asume it is a file and create file_copy
   IfNotInString, Text, `n ; it can be a file as the Text doesn't contact a newline character
      {
       If (SubStr(Text,1,1)="!") ; first we check for "overwrite"
         {
          Text:=SubStr(Text,2)
          OW=1 ; overwrite file (if it is a file)
         }
       IfNotExist, %Text% ; now we can check if the file exists, it doesn't so it is a var
       {
        If (OW=1) ; the variable started with a ! so we need to put it back because it is variable/text not a file
         Text:= "!" . Text
        OW=2 ; no file, so it is a var or Text passed on directly to TF
       }
      }
   Else ; there is a newline character in Text so it has to be a variable
      {
       OW=2
      }
    If (OW = 0) or (OW = 1) ; it is a file, so we have to read into var Text
      {
        Text := (SubStr(Text,1,1)="!") ? (SubStr(Text,2)) : Text
       FileName=%Text% ; Store FileName
       FileRead, Text, %Text% ; Read file and return as var Text
       If (ErrorLevel 0)
         {
           MsgBox, 48, TF Lib Error, % "Can not read " FileName
          ExitApp
         }
      }
   Return
   }
   
TF_Count(String, Char)
   {
   StringReplace, String, String, %Char%,, UseErrorLevel
   Return ErrorLevel
   }

TF_ReturnOutPut(OW, Text, FileName, TrimTrailing = 1, CreateNewFile = 0) { ; HugoV
   If (OW = 0) ; input was file, file_copy will be created, if it already exist file_copy will be overwritten
      {
       IfNotExist, % FileName ; check if file Exist, if not return otherwise it would create an empty file. Thanks for the idea Murp|e
          {
           If (CreateNewFile = 1) ; CreateNewFile used for TF_SplitFileBy* and others
            {
             OW = 1
              Goto CreateNewFile
            }
          Else
            Return
         }
       If (TrimTrailing = 1)
          StringTrimRight, Text, Text, 1 ; remove trailing `n
      SplitPath, FileName,, Dir, Ext, Name
       If (Dir = "") ; if Dir is empty Text script are in same directory
         Dir := A_ScriptDir
       IfExist, % Dir "\backup" ; if there is a backup dir, copy original file there
         FileCopy, % Dir "\" Name "_copy." Ext, % Dir "\backup\" Name "_copy.bak", 1
       FileDelete, % Dir "\" Name "_copy." Ext
       FileAppend, %Text%, % Dir "\" Name "_copy." Ext
       Return Errorlevel ? False : True
      }
    CreateNewFile:   
    If (OW = 1) ; input was file, will be overwritten by output
      {
       IfNotExist, % FileName ; check if file Exist, if not return otherwise it would create an empty file. Thanks for the idea Murp|e
          {
          If (CreateNewFile = 0) ; CreateNewFile used for TF_SplitFileBy* and others
             Return
         }
       If (TrimTrailing = 1)
          StringTrimRight, Text, Text, 1 ; remove trailing `n
       SplitPath, FileName,, Dir, Ext, Name
       If (Dir = "") ; if Dir is empty Text script are in same directory
         Dir := A_ScriptDir
       IfExist, % Dir "\backup" ; if there is a backup dir, copy original file there
         FileCopy, % Dir "\" Name "." Ext, % Dir "\backup\" Name ".bak", 1
       FileDelete, % Dir "\" Name "." Ext
       FileAppend, %Text%, % Dir "\" Name "." Ext
       Return Errorlevel ? False : True
      }
   If (OW = 2) ; input was var, return variable
      {
       If (TrimTrailing = 1)
         StringTrimRight, Text, Text, 1 ; remove trailing `n
       Return Text
      }
   }

_MakeMatchList(Text, Start = 1, End = 0)
   {
   ErrorList=
    (join|
    Error 01: Invalid StartLine parameter (non numerical character)
    Error 02: Invalid EndLine parameter (non numerical character)
    Error 03: Invalid StartLine parameter (only one + allowed)
    )
    StringSplit, ErrorMessage, ErrorList, |
    Error = 0
   
     TF_MatchList= ; just to be sure
    If (Start = 0 or Start = "")
      Start = 1
      
    ; some basic error checking
   
    ; error: only digits - and + allowed
    If (RegExReplace(Start, "[ 0-9+\-\,]", "") "")
       Error = 1
      
    If (RegExReplace(End, "[0-9 ]", "") "")
       Error = 2

    ; error: only one + allowed
    If (TF_Count(Start,"+") 1)
       Error = 3
       
    If (Error 0 )
      {
       MsgBox, 48, TF Lib Error, % ErrorMessage%Error%
       ExitApp
      }
      
     ; Option #1
    ; StartLine has + character indicating startline + incremental processing.
    ; EndLine will be used
    ; Make TF_MatchList
 
    IfInString, Start, `+
      {
       If (End = 0 or End = "") ; determine number of lines
         End:= TF_Count(Text, "`n") + 1
       StringSplit, Section, Start, `, ; we need to create a new "TF_MatchList" so we split by ,
       Loop, %Section0%
         {
          StringSplit, SectionLines, Section%A_Index%, `+
          LoopSection:=End + 1 - SectionLines1
          Counter=0
                TF_MatchList .= SectionLines1 ","
          Loop, %LoopSection%
            {
             If (A_Index = End) ;
               Break
             If (Counter = (SectionLines2-1)) ; counter is smaller than the incremental value so skip
               {
                TF_MatchList .= (SectionLines1 + A_Index) ","
                Counter=0
               }
             Else
               Counter++
            }
         }
       StringTrimRight, TF_MatchList, TF_MatchList, 1 ; remove trailing ,
       Return TF_MatchList
      }

    ; Option #2
    ; StartLine has - character indicating from-to, COULD be multiple sections.
    ; EndLine will be ignored
    ; Make TF_MatchList

    IfInString, Start, `-
      {
       StringSplit, Section, Start, `, ; we need to create a new "TF_MatchList" so we split by ,
       Loop, %Section0%
         {
          StringSplit, SectionLines, Section%A_Index%, `-
          LoopSection:=SectionLines2 + 1 - SectionLines1
          Loop, %LoopSection%
            {
             TF_MatchList .= (SectionLines1 - 1 + A_Index) ","
            }
         }
       StringTrimRight, TF_MatchList, TF_MatchList, 1 ; remove trailing ,
       Return TF_MatchList
      }

    ; Option #3
    ; StartLine has comma indicating multiple lines.
    ; EndLine will be ignored
    IfInString, Start, `,
      {
       TF_MatchList:=Start
       Return TF_MatchList
      }

    ; Option #4
    ; parameters passed on as StartLine, EndLine.
    ; Make TF_MatchList from StartLine to EndLine

    If (End = 0 or End = "") ; determine number of lines
         End:= TF_Count(Text, "`n") + 1
    LoopTimes:=End-Start
    Loop, %LoopTimes%
      {   
       TF_MatchList .= (Start - 1 + A_Index) ","
      }
    TF_MatchList .= End ","
    StringTrimRight, TF_MatchList, TF_MatchList, 1 ; remove trailing ,
    Return TF_MatchList
   }

Besoin de zsnesw.cfg ?

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par soft-bug » 03 mai 2014 - 13:02

Oups, il te fallait sûrement plutôt le module Super Nintendo.ahk !   :oops:  
Le voilà :

;----------------------------------------------------------------------------
; Super Nintendo Entertainment System
; zsnesw v1.51
; by djvj
; 1.1
;
; Notes:
; Be sure to set the settings you want below
;----------------------------------------------------------------------------
Fullscreen = true
Stretch = false
resX = 1024
resY = 768
DisplayRomInfo = false   ; Display rom info on load along bottom of screen
;----------------------------------------------------------------------------

SetKeyDelay, 50
zsnesFile := CheckFile(emuPath . "zsnesw.cfg")
FileRead, zsnesCfg, %zsnesFile%

GUI_ID := FadeInStart()

xLine := TF_Find(zsnesCfg,"","","CustomResX=") ; find location in zsnes cfg where it stores its custom X res
yLine := TF_Find(zsnesCfg,"","","CustomResY=") ; find location in zsnes cfg where it stores its custom Y res
modeLine := TF_Find(zsnesCfg,"","","cvidmode=") ; find location in zsnes cfg where it stores its custom vid mode
zsnesCfg := TF_ReplaceLine(zsnesCfg,xLine,xLine,"CustomResX=" . resX) ; update custom X res in zsnes cfg file
zsnesCfg := TF_ReplaceLine(zsnesCfg,yLine,yLine,"CustomResY=" . resY) ; update custom Yres in zsnes cfg file

If ( Fullscreen = "true" Stretch = "true" ) ; sets fullscreen, stretch, and filter support
   vidMode = 39
Else If ( Fullscreen = "true" Stretch != "true" ) ; sets fullscreen, correct aspect ratio, and filter support
   vidMode = 42
Else ; sets windowed mode with filter support
   vidMode = 38

zsnesCfg := TF_ReplaceLine(zsnesCfg,modeLine,modeLine,"cvidmode=" . vidMode) ; update custom vid mode in zsnes cfg file

; Setting DisplayRomInfo setting in cfg if it doesn't match what user wants above
currentDRI := (InStr(zsnesCfg, "DisplayInfo=1") ? ("true") : ("false"))
If ( DisplayRomInfo != "true" And currentDRI = "true" ) {
      StringReplace, zsnesCfg, zsnesCfg, DisplayInfo=1, DisplayInfo=0
   } Else If ( DisplayRomInfo = "true" And currentDRI = "false" ) {
      StringReplace, zsnesCfg, zsnesCfg, DisplayInfo=0, DisplayInfo=1
   }

SaveFile(zsnesCfg, zsnesFile) ; save changes to zsnesw.cfg

7z1 := 7z(romPath, romName, romExtension, 7zExtractDir)

Run, %executable% "%romPath%%romName%%romExtension%", %emuPath%

WinWait, ZSNES ahk_class ZSNES
WinWaitActive, ZSNES ahk_class ZSNES

GUI_ID2 := FadeInExit()

Process, WaitClose, %executable%

7z2 := 7zCleanUp()

GUI_ID4 := FadeOutExit()

WinActivate, Hyperspin

ExitApp


SaveFile(text,file) {
      FileDelete, %file%
      FileAppend, %text%, %file%
   }

CloseProcess:
   GUI_ID3 := FadeOutStart()
   Send, {Alt Down}{F4 Down}{F4 Up}{Alt Up} ; No other closing method seems to work
Return


TF_Find(Text, StartLine = 1, EndLine = 0, SearchText = "", ReturnFirst = 1, ReturnText = 0)
   { ; complete rewrite for 3.1
    TF_GetData(OW, Text, FileName)
    If (RegExMatch(Text, SearchText) 1)
       Return "0" ; SearchText not in file or error, do nothing
         TF_MatchList:=_MakeMatchList(Text, StartLine, EndLine) ; create MatchList
    Loop, Parse, Text, `n
      {
       If A_Index in %TF_MatchList%
          {
          If (RegExMatch(A_LoopField, SearchText) 0)
            {
             If (ReturnText = 0)
               Lines .= A_Index "," ; line number
             Else If (ReturnText = 1)
               Lines .= A_LoopField "`n" ; text of line
             Else If (ReturnText = 2)
               Lines .= A_Index ": " A_LoopField "`n" ; add line number
             If (ReturnFirst = 1) ; only return first occurence
               Break
            }   
          }   
      }
    If (Lines "")
      StringTrimRight, Lines, Lines, 1 ; trim trailing , or `n
    Else
      Lines = 0 ; make sure we return 0
    Return Lines
   }

TF_ReplaceLine(Text, StartLine = 1, Endline = 0, ReplaceText = "")
   {
    TF_GetData(OW, Text, FileName)
    TF_MatchList:=_MakeMatchList(Text, StartLine, EndLine) ; create MatchList
    Loop, Parse, Text, `n, `r
      {
       If A_Index in %TF_MatchList%
         Output .= ReplaceText "`n"
       Else
         Output .= A_LoopField "`n"
      }
    Return TF_ReturnOutPut(OW, OutPut, FileName)
   }

TF_GetData(byref OW, byref Text, byref FileName)
   {
   OW=0 ; default setting: asume it is a file and create file_copy
   IfNotInString, Text, `n ; it can be a file as the Text doesn't contact a newline character
      {
       If (SubStr(Text,1,1)="!") ; first we check for "overwrite"
         {
          Text:=SubStr(Text,2)
          OW=1 ; overwrite file (if it is a file)
         }
       IfNotExist, %Text% ; now we can check if the file exists, it doesn't so it is a var
       {
        If (OW=1) ; the variable started with a ! so we need to put it back because it is variable/text not a file
         Text:= "!" . Text
        OW=2 ; no file, so it is a var or Text passed on directly to TF
       }
      }
   Else ; there is a newline character in Text so it has to be a variable
      {
       OW=2
      }
    If (OW = 0) or (OW = 1) ; it is a file, so we have to read into var Text
      {
        Text := (SubStr(Text,1,1)="!") ? (SubStr(Text,2)) : Text
       FileName=%Text% ; Store FileName
       FileRead, Text, %Text% ; Read file and return as var Text
       If (ErrorLevel 0)
         {
           MsgBox, 48, TF Lib Error, % "Can not read " FileName
          ExitApp
         }
      }
   Return
   }
   
TF_Count(String, Char)
   {
   StringReplace, String, String, %Char%,, UseErrorLevel
   Return ErrorLevel
   }

TF_ReturnOutPut(OW, Text, FileName, TrimTrailing = 1, CreateNewFile = 0) { ; HugoV
   If (OW = 0) ; input was file, file_copy will be created, if it already exist file_copy will be overwritten
      {
       IfNotExist, % FileName ; check if file Exist, if not return otherwise it would create an empty file. Thanks for the idea Murp|e
          {
           If (CreateNewFile = 1) ; CreateNewFile used for TF_SplitFileBy* and others
            {
             OW = 1
              Goto CreateNewFile
            }
          Else
            Return
         }
       If (TrimTrailing = 1)
          StringTrimRight, Text, Text, 1 ; remove trailing `n
      SplitPath, FileName,, Dir, Ext, Name
       If (Dir = "") ; if Dir is empty Text script are in same directory
         Dir := A_ScriptDir
       IfExist, % Dir "\backup" ; if there is a backup dir, copy original file there
         FileCopy, % Dir "\" Name "_copy." Ext, % Dir "\backup\" Name "_copy.bak", 1
       FileDelete, % Dir "\" Name "_copy." Ext
       FileAppend, %Text%, % Dir "\" Name "_copy." Ext
       Return Errorlevel ? False : True
      }
    CreateNewFile:   
    If (OW = 1) ; input was file, will be overwritten by output
      {
       IfNotExist, % FileName ; check if file Exist, if not return otherwise it would create an empty file. Thanks for the idea Murp|e
          {
          If (CreateNewFile = 0) ; CreateNewFile used for TF_SplitFileBy* and others
             Return
         }
       If (TrimTrailing = 1)
          StringTrimRight, Text, Text, 1 ; remove trailing `n
       SplitPath, FileName,, Dir, Ext, Name
       If (Dir = "") ; if Dir is empty Text script are in same directory
         Dir := A_ScriptDir
       IfExist, % Dir "\backup" ; if there is a backup dir, copy original file there
         FileCopy, % Dir "\" Name "." Ext, % Dir "\backup\" Name ".bak", 1
       FileDelete, % Dir "\" Name "." Ext
       FileAppend, %Text%, % Dir "\" Name "." Ext
       Return Errorlevel ? False : True
      }
   If (OW = 2) ; input was var, return variable
      {
       If (TrimTrailing = 1)
         StringTrimRight, Text, Text, 1 ; remove trailing `n
       Return Text
      }
   }

_MakeMatchList(Text, Start = 1, End = 0)
   {
   ErrorList=
    (join|
    Error 01: Invalid StartLine parameter (non numerical character)
    Error 02: Invalid EndLine parameter (non numerical character)
    Error 03: Invalid StartLine parameter (only one + allowed)
    )
    StringSplit, ErrorMessage, ErrorList, |
    Error = 0
   
     TF_MatchList= ; just to be sure
    If (Start = 0 or Start = "")
      Start = 1
      
    ; some basic error checking
   
    ; error: only digits - and + allowed
    If (RegExReplace(Start, "[ 0-9+\-\,]", "") "")
       Error = 1
      
    If (RegExReplace(End, "[0-9 ]", "") "")
       Error = 2

    ; error: only one + allowed
    If (TF_Count(Start,"+") 1)
       Error = 3
       
    If (Error 0 )
      {
       MsgBox, 48, TF Lib Error, % ErrorMessage%Error%
       ExitApp
      }
      
     ; Option #1
    ; StartLine has + character indicating startline + incremental processing.
    ; EndLine will be used
    ; Make TF_MatchList
 
    IfInString, Start, `+
      {
       If (End = 0 or End = "") ; determine number of lines
         End:= TF_Count(Text, "`n") + 1
       StringSplit, Section, Start, `, ; we need to create a new "TF_MatchList" so we split by ,
       Loop, %Section0%
         {
          StringSplit, SectionLines, Section%A_Index%, `+
          LoopSection:=End + 1 - SectionLines1
          Counter=0
                TF_MatchList .= SectionLines1 ","
          Loop, %LoopSection%
            {
             If (A_Index = End) ;
               Break
             If (Counter = (SectionLines2-1)) ; counter is smaller than the incremental value so skip
               {
                TF_MatchList .= (SectionLines1 + A_Index) ","
                Counter=0
               }
             Else
               Counter++
            }
         }
       StringTrimRight, TF_MatchList, TF_MatchList, 1 ; remove trailing ,
       Return TF_MatchList
      }

    ; Option #2
    ; StartLine has - character indicating from-to, COULD be multiple sections.
    ; EndLine will be ignored
    ; Make TF_MatchList

    IfInString, Start, `-
      {
       StringSplit, Section, Start, `, ; we need to create a new "TF_MatchList" so we split by ,
       Loop, %Section0%
         {
          StringSplit, SectionLines, Section%A_Index%, `-
          LoopSection:=SectionLines2 + 1 - SectionLines1
          Loop, %LoopSection%
            {
             TF_MatchList .= (SectionLines1 - 1 + A_Index) ","
            }
         }
       StringTrimRight, TF_MatchList, TF_MatchList, 1 ; remove trailing ,
       Return TF_MatchList
      }

    ; Option #3
    ; StartLine has comma indicating multiple lines.
    ; EndLine will be ignored
    IfInString, Start, `,
      {
       TF_MatchList:=Start
       Return TF_MatchList
      }

    ; Option #4
    ; parameters passed on as StartLine, EndLine.
    ; Make TF_MatchList from StartLine to EndLine

    If (End = 0 or End = "") ; determine number of lines
         End:= TF_Count(Text, "`n") + 1
    LoopTimes:=End-Start
    Loop, %LoopTimes%
      {   
       TF_MatchList .= (Start - 1 + A_Index) ","
      }
    TF_MatchList .= End ","
    StringTrimRight, TF_MatchList, TF_MatchList, 1 ; remove trailing ,
    Return TF_MatchList
   }

Besoin de zsnesw.cfg ?
Oui, car ton AHK commence à regarder son existence et chope les paramétres ...

Donc zsnesw.cfg semble être notre fameux fichier de configuration (INI au sens large) de notre émulateur !

Par contre ton ahk est coton !   :pirat:  

Tu es donc en HL2 ...

Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 03 mai 2014 - 13:09

Voilà le zsnesw.cfg :

; PSR-produced config file (stock default in CAPS)

; Note, if you're worried you messed up a setting, removing the line will have
; ZSNES use the default settings for that option.
; The next time ZSNES is run, the line will reappear with the default settings.

;  ----
; -- Input --
;  ----

; For other input settings see zinput.cfg

; Enable Game-Specific Key Combos (0 = NO, 1 = Yes)
GUIComboGameSpec=0

; Enable Game-Specific Key Input (0 = NO, 1 = Yes)
GameSpecificInput=0

;  ----
; -- Options --
;  ----

; Enable MMX Support (0 = No, 1 = YES)
; Disable this only if you actually do NOT have a processor that supports MMX.
; Disabling this option will prevent you from using some of the more advanced
; video/sound filters.
MMXSupport=1

; Pause Emulation when ZSNES is Out of Focus (0 = NO, 1 = Yes)
PauseFocusChange=0

; Increase Priority of ZSNES (0 = NO, 1 = Yes)
; Enable this if it improves performance. This option is not for everyone.
; This may cause other background apps to be sluggish.
; The priority in Win9x will be High, Win2k will be Above Normal.
HighPriority=1

; Disable Power Management while ZSNES Runs (0 = No, 1 = YES)
; This is very necessary for gamepad users.
DisableScreenSaver=1

; Enable New Graphics Engine (0 = No, 1 = YES)
; Toggle off when there are graphical problems in the new graphics engine
newengen=1

; Enable Older Graphics Engine Tweak for Mode 2 (0 = NO, 1 = Yes)
; Enable this to see if it helps with rendering problems
; Only works with old graphic engine
bgfixer=0

; Snapshot Format (0 = BMP, 1 = PNG)
ScreenShotFormat=0

; Auto-Patch ROM with IPS (0 = No, 1 = YES)
AutoPatch=1

; Display ROM Info on Load (0 = No, 1 = YES)
DisplayInfo=0

; Log Info About the Last ROM Loaded to rominfo.txt (0 = No, 1 = YES)
RomInfo=0

; Enable FPS Counter when ZSNES is Started (0 = NO, 1 = Yes)
; This option is disabled when manual frameskip is in use.
FPSAtStart=0

; Display Clock (0 = NO, 1 = Yes)
TimerEnable=0

; Change Clock Mode (0 = 24 HOUR, 1 = 12 Hour)
TwelveHourClock=0

; Display Black Box Around Clock (0 = No, 1 = YES)
ClockBox=1

; Use Small Font for Messages (0 = NO, 1 = Yes)
SmallMsgText=0

; Transparent Messages - doesn't work with small font (0 = NO, 1 = Yes)
GUIEnableTransp=0

;  ----
; -- Video --
;  ----

; Video Mode [0..42]
;  0 = 256x224      R WIN    1 = 256x224        R FULL
;  2 = 512x448      R WIN    3 = 512x448      DR WIN
;  4 = 640x480      S WIN    5 = 640x480      DS WIN
;  6 = 640x480    DR FULL    7 = 640x480      DS FULL
;  8 = 640x480      S FULL    9 = 768x672        R WIN
;  10 = 768x672    DR WIN    11 = 800x600        S WIN
;  12 = 800x600    DS WIN    13 = 800x600        S FULL
;  14 = 800x600    DR FULL  15 = 800x600      DS FULL
;  16 = 1024x768    S WIN    17 = 1024x768      DS WIN
;  18 = 1024x768    S FULL  19 = 1024x768      DR FULL
;  20 = 1024x768    DS FULL  21 = 1024x896      R WIN
;  22 = 1024x896    DR WIN    23 = 1280x960      S WIN
;  24 = 1280x960    DS WIN    25 = 1280x960      S FULL
;  26 = 1280x960    DR FULL  27 = 1280x960      DS FULL
;  28 = 1280x1024    S WIN    29 = 1280x1024    DS WIN
;  30 = 1280x1024    S FULL  31 = 1280x1024    DR FULL
;  32 = 1280x1024  DS FULL  33 = 1600x1200      S WIN
;  34 = 1600x1200  DS WIN    35 = 1600x1200    DR FULL
;  36 = 1600x1200  DS FULL  37 = 1600x1200      S FULL
;  38 = CUSTOM      D  WIN    39 = CUSTOM        DS FULL
;  40 = CUSTOM        WIN    41 = CUSTOM        S FULL
;  42 = CUSTOM      DR FULL
; You need to select one of the custom video modes and modify CustomResX/Y to
; properly use custom res support.
; WARNING: Custom resolutions are only valid if they are supported by your system!
; ZSNES will hang if an invalid fullscreen resolution is used.
cvidmode=42
; Last windowed fullscreen modes (used when alt-tabbing)
PrevWinMode=5
PrevFSMode=42

; Custom Resolution X and Y for Custom Video Modes [256x224..2048x1536]
CustomResX=640
CustomResY=480

; Enable Video Interpolation (0 = NO, 1 = Yes)
; Video Interpolation is compatible with scanlines.
; Blends the neighboring pixels on the screen to eliminate pixelation.
antienab=0

; Enable NTSC Filter (0 = NO, 1 = Yes)
; Enable Blargg's wonderful NTSC filter which simulates the artifacts of an
; NTSC TV set - it is probably not a good idea to use with TV-out
; Recommended to use a minimum res of 602x448
NTSCFilter=0
; Blend Frames, Refresh Screen (0 = OFF, 1 = On)
; Blend Frames allows smoother transitions between frames for non-60Hz refresh rates.
; Refresh Screen allows the screen to be updated while changing the filter's parameters.
NTSCBlend=0
NTSCRef=0
; NTSC TV Attributes [-100..100]
NTSCHue=0
NTSCSat=0
NTSCCont=0
NTSCBright=0
NTSCSharp=0
NTSCGamma=0
NTSCRes=0
NTSCArt=0
NTSCFringe=0
NTSCBleed=0
NTSCWarp=0

; Enable Kreed's 2x Filters (0 = NONE, 1 = 2xSaI, 2 = Super Eagle, 3 = Super 2xSaI)
; These are Kreed's various 2x filters. They do not exhibit the same level of
; blurring than interpolation/bilinear. MMX support is required.
; This is disabled when other filters are used.
En2xSaI=0

; Use HQ*x Filter (0 = NO, 1 = Yes)
; This is a filter MaxSt has created. These are very CPU intensive filters that
; do very awesome blending to remove the pixelation.
; This is disabled when other filters are used. MMX support is required.
hqFilter=0
; Set HQ*x level [2..4]
; Recommended min resolutions
; HQ2x = 512x448
; HQ3x = 768x672
; HQ4x = 1024x896
hqFilterlevel=2

; Enable Scanlines (0 = NONE, 1 = Full, 2 = 25%, 3 = 50%) - simulate TV scanlines
; This is compatible with interpolation.
scanlines=0

; Enable Grayscale Mode (0 = NO, 1 = Yes) - don't enable this for other than nostalgia
; The whole screen is displayed in monochrome color.
GrayscaleMode=0

; Enable High-Res Mode 7 (0 = NO, 1 = Yes)
; Doubles the internal resolution of the image when Mode 7 is in use
; However this disables most filters, except for interpolation.
; This is only useful in certain games and is not useful in general.
; Requires a minimum res of 512x448
Mode7HiRes16b=0

; Sync Frames to Monitor Refresh Rate (0 = NO, 1 = Yes)
; Do not enable if you cannot normally sustain 60fps
vsyncon=0

; Use Triple Buffering (0 = NO, 1 = Yes) - replaces vsync
; This is usually more beneficial than VSync.
; This is not available in Windowed modes.
TripleBufferWin=0

; Force Refresh Rate (0 = NO, 1 = Yes)
; Enable this if you are experiencing visual tearing
; WARNING: Setting a refresh rate that your monitor cannot handle will have
; consequences! The DX Refresh Rate Override in dxdiag must be set to default
; in order for this to work! The refresh rate is only valid if it is supported
; by your system! This option is only useful in fullscreen modes.
ForceRefreshRate=0
SetRefreshRate=60

; Enable KitchenSync/KitchenSyncPAL (0 = NO, 1 = Yes)
; When enabled, ZSNES will use double the refresh rate of the game and use
; half of it to sync with the game to reduce/prevent visual tearing.
; You can enable this if your video card/monitor AND current ZSNES resolution
; supports 100Hz (for PAL games) and 120Hz (for NTSC games)
; KitchenSyncPAL applies to PAL games only, use KitchenSync for PAL+NTSC games.
; WARNING: The DX Refresh Rate Override in dxdiag must be set to default in
; order for this to work!
; This option is completely useless in a non-fullscreen mode.
KitchenSync=0
KitchenSyncPAL=0

; Keep 4:3 Ratio (0 = No, 1 = YES)
; This is particularly handy for those that use laptops/LCDs+non 4:3 resolutions.
; This can be used for any S/DS mode and any Custom Windowed mode.
; It is not recommended to enable this while under 298x224.
; Disable this if you want to use the non-standard ratio instead.
Keep4_3Ratio=0

; Set Gamma Level [0..15]
gammalevel=0

;  ----
; -- Sound --
;  ----

; Disable SPC Emulation (0 = NO, 1 = Yes)
; Disabling SPC emulation can improve performance, but at the expense of
; emulation accuracy. There will be no sound output and games might crash.
SPCDisable=0

; Enable Sound Emulation (0 = Off, 1 = ON) - disable if you need the performance
; If SPC emulation is disabled, there will be no sound output.
soundon=1

; Enable Stereo Sound (0 = Off, 1 = ON) - disable if you need the performance
StereoSound=1

; Swap Left Audio Channel w/Right (0 = NO, 1 = Yes)
RevStereo=0

; Simulate Surround Sound (0 = NO, 1 = Yes)
; Enable a simulated 2 speaker surround sound effect.
; Do not enable if playing a game that has its own surround sound effects.
; Stereo Sound must be enabled for this to work.
Surround=0

; Use Primary Sound Buffer (0 = NO, 1 = Yes)
; Enable this if you are experiencing sound playback/static problems.
PrimaryBuffer=0

; Sampling Rate: (0 = 8000Hz, 1 = 11025Hz, 2 = 22050Hz, 3 = 44100Hz,
;                            4 = 16000Hz, 5 = 32000Hz, 6 = 48000Hz)
; Using any other sound frequencies other than the default 32000Hz
; is COMPLETELY UNACCEPTABLE in use for sound bug reports.
SoundQuality=5

; Sound Volume Level [0..100]
MusicRelVol=100

; Enable Sound Interpolation (0 = None, 1 = GAUSSIAN, 2 = Cubic, 3 = 8-point)
; Sound interpolation smooths out the waveform of lower frequency sounds.
; Using any other setting other than the default Gaussian interpolation is
; COMPLETELY UNACCEPTABLE in sound bug reports.
SoundInterpType=1

; Enable Low-Pass Filter (0 = NONE, 1 = Simple, 2 = Dynamic, 3 = Hi-quality)
; A low-pass filter improves the bass in the sounds.
; This is useful if you have a Subwoofer.
LowPassFilterType=3

; Disable Echo (0 = NO, 1 = Yes)
; Disables the echo effect in the sound.
EchoDis=0

;  ----
; -- Saves --
;  ----

; Number of Rewind States [0..99]
RewindStates=8
; Delay between rewinds [1..99] - (1 = 200ms, 5 = 1s, 10 = 2s)
RewindFrames=15

; Don't Save SRAM (0 = NO, 1 = Yes)
; Only enable this if you don't want to Save SRAM at any given time.
; This option will make Update SRAM in Real-Time useless.
nosaveSRAM=0

; Update SRAM in Real-Time (0 = NO, 1 = Yes)
; This is useful if you fear something will prevent ZSNES from exiting normally.
; It is required to play games that store important values directly to SRAM.
; ZSNES normally updates SRAM on exit.
; If Don't Save SRAM is enabled, this option is useless.
SRAMSave5Sec=0

; Load SRAM w/Savestates (0 = No, 1 = YES)
; Enable this when you want to use the SRM that is stored within the savestate.
; Warning: You will overwrite the existing SRM that you are currently using.
; It is required to properly use states with games storing important values
; directly in SRM.
SRAMState=1

; Select Latest Save State Slot on Game Load (0 = NO, 1 = Yes)
; Enable this if you want to load the last saved savestate quickly
; (via the load savestate button/GUI option) after loading the game.
LatestSave=0

; Auto Increment State Slot First, then Save State (0 = NO, 1 = Yes)
; Enable this if you have a tendency in saving accidentally to an existing
; savestate.
AutoIncSaveSlot=0

; Save in 10 save block (0 = NO, 1 = Yes)
; This may be handy if you want to save within a block (0-9, 10-19, etc.)
AutoIncSaveSlotBlock=0

; Auto State Save/Load (0 = NO, 1 = Yes) - uses a special state
; Enable this if you wish a special state to be saved on a visit to the GUI.
; This state will automatically be loaded when you load a game.
AutoState=0

; Pause Emulation After Loading a Save State (0 = NO, 1 = Yes)
PauseLoad=0
; Pause Emulation After Using Rewind (0 = NO, 1 = Yes)
PauseRewind=0

;  ----
; -- Emulation --
;  ----

; Percent to Execute [50..150] - only modify if you know what you are doing
; Changing this value may help certain games run.
per2exec=100

; Disable Hacks (0 = NO, 1 = Yes)
; Set this to 1 if you want to disable game specific hacks
HacksDisable=0

; Frameskip: [0..10] (0 = AUTO, 1-10 = Manual 0-9)
frameskip=0

; Max Frameskip Allowed for Auto Frameskip [0..9]
maxskip=0

; Fastforward/Slowdown Keys Behaviour (0 = HELD, 1 = Toggle)
FastFwdToggle=0
; Fastforward/Slowdown Factors [0..28] (0 = factor 2, 28 = factor 30)
FFRatio=8
SDRatio=0

; Emulation Speed Throttle [0..58] (0 = speed/30, 29 = 1x, 58 = 30x)
; Fast-forward multiplicator is currently inaccurate
EmuSpeed=29

;  ----
; -- Paths --
;  ----
; It is suggested to go to GUI-Paths and modify the paths from there.
; ROMs drive + directory

; Note, when entering a path, make sure every backslash is doubled
; "C:\Games\SNES" for example is incorrect.
; "C:\\Games\\SNES" is correct.

ROMPath="D:\\HeavyBox V2\\Hyperspin\\Emulators\\Super Nintendo\\"
; Save states SRAMs, snapshots, SPCs
SRAMPath=""
SnapPath=""
SPCPath=""
; BIOS/base carts (BS-X, Sufami Turbo, Same Game SD Gundam G-Next)
BSXPath=""
STPath=""
SGPath=""
GNextPath=""
; SPC7110 graphic packs
FEOEZPath=""
SJNSPath=""
MDHPath=""
SPL4Path=""

;  ----
; -- GUI --
;  ----

; Disable GUI (0 = NO, 1 = Yes)
guioff=0

; Show All Files in 'Load Game' Menu (0 = NO, 1 = Yes)
showallext=0

; Filename Display Mode (0 = LONG FILENAME, 1 = Internal header name)
GUIloadfntype=0

; Recent games played, you shouldn't edit this manually (8.3 / Paths / LFN)
prevloadiname="Illusion of Time (France).s"\0"!    "\"Final Fantasy II (USA).smc"\0"\"    "\"Breath Of Fire 2 (fr).smc"\0"#    "\"Battletoads Double Dragon"\0"!    "\"Donkey Kong Country (USA).s"\0"!    "\"7th Saga.sfc"\0"0    "\"Street Fighter II - The Wor"\0"!    "\"Bahamut Lagoon.sfc"\0"*    "\"Secret Of Mana 1 (fr).sfc"\0"?    "
prevloaddnamel=0"!    "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%  "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%  "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%  "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%  "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$  "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$  "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$  "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$  "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms FR\\"\0"E*  "
prevloadfnamel="Illusion of Time (France).smc"\0"-%  "\"Final Fantasy II (USA).smc"\0"0%  "\"Breath Of Fire 2 (fr).smc"\0"1%  "\"Battletoads Double Dragon - The Ultimate Team (U) [T+Fre].smc"\0"i$  "\"Donkey Kong Country (USA).sfc"\0"-%  "\"7th Saga.sfc"\0"%  "\"Street Fighter II - The World Warrior (USA).sfc"\0"y$  "\"Bahamut Lagoon.sfc"\0"8%  "\"Secret Of Mana 1 (fr).sfc"\0"[*  "

; Freeze Recent Games List (0 = NO, 1 = Yes)
prevlfreeze=0

; Right Mouse Click Enters/Exits GUI (0 = NO, 1 = Yes)
GUIRClick=0

; Left Handed Mouse Behavior for GUI (0 = NO SWAP, 1 = Swap)
; (swap left and right buttons)
lhguimouse=0

; Show Mouse Cursor Shadow (0 = No, 1 = YES)
; Displays a shadow under the mouse cursor.
mouseshad=1

; Wrap Mouse Cursor (0 = NO, 1 = Yes)
; If enabled, the cursor will wrap around to the other side.
; Only useful for Fullscreen modes.
mousewrap=0

; Trap Mouse Cursor in Window (0 = NO, 1 = Yes)
; Only useful in Windowed modes.
TrapMouseCursor=0

; Use Mouse Wheel to Scroll (0 = No, 1 = YES)
MouseWheel=1

; ESC to Game Menu (0 = No, 1 = YES)
; If yes, visiting the GUI will have the Game Menu automatically selected.
; It will also enable the main menu keyboard shortcuts.
esctomenu=0

; Control the GUI Using Gamepad 1 (0 = NO, 1 = Yes)
JoyPad1Move=0

; Filter GUI Display (0 = No, 1 = YES)
; If enabled, the current filter you are using will also filter the GUI.
FilteredGUI=1

; Use Custom Font (0 = NO, 1 = Yes)
; The font currently reads off a format as defined by zfile.txt
newfont=0

; Save GUI Window Positions (0 = NO, 1 = Yes)
savewinpos=0

; GUI windows X/Y coordinates - GUI setup showing windows #

;    Game          Config        Cheat      Netplay      Misc
; -------------------------------------------------------------------
;  1:Load        3:Input      7:Add Code  [Internet]  9:Misc Keys
;    Run          -------      7:Browse                10:GUI Opts
; 12:Reset      17:Devices  13:Search                15:Movie Opt
;  -------      18:Chip Cfg                          16:Key Comb.
; 14:Save State  -------                                Save Cfg
;  2:Open State  4:Options                            -------
; 14:Pick State  5:Video                              11:About
;  -------        6:Sound
;    Quit        19:Paths
;                20:Saves
;                21:Speed

; X positions [-233..254] (windows #0 to #22)
GUIwinposx=0,6,65,33,42,5,34,6,64,8,5,33,56,64,56,5,3,28,48,6,28,53,0
; Y positions [8..221] (windows #0 to #22)
GUIwinposy=0,20,70,20,20,20,20,20,30,30,20,20,60,30,60,20,20,60,60,20,30,20,0

; GUI Background Effect
; (0 = NONE, 1 = Snow, 2 = Water A, 3 = Water B, 4 = Burn, 5 = Smoke)
GUIEffect=1

; GUI Palette Mods:
; Background RGB Tint [0..31]
GUIRAdd=15
GUIGAdd=10
GUIBAdd=31
; Titlebar RGB Tint [0..31]
GUITRAdd=0
GUITGAdd=10
GUITBAdd=31
; Windows RGB Tint [0..31]
GUIWRAdd=8
GUIWGAdd=8
GUIWBAdd=25

; Main Window Always on Top (0 = NO, 1 = Yes)
AlwaysOnTop=0

; Save Main Window Position (0 = No, 1 = YES) and X/Y coordinates
SaveMainWindowPos=1
MainWindowX=256
MainWindowY=87

; Allow Multiple ZSNES Instances at Once (0 = No, 1 = YES)
AllowMultipleInst=1

;  ----
; -- Cheats --
;  ----

; Autoload .CHT files (0 = NO, 1 = Yes)
; Enable the use of stored cheat files on load.
AutoLoadCht=0

; Selected Size Search (0 = 1 BYTE, 1 = 2B, 2 = 3B, 3 = 4B)
CheatSrcByteSize=0

; Selected Numerical Base (0 = DECIMAL, 1 = Hexadecimal)
CheatSrcByteBase=0

; Search Type (0 = EXACT VALUE, 1 = Comparative)
CheatSrcSearchType=0

; Add Code for Most Significant Byte Only (0 = NO, 1 = Yes)
CheatUpperByteOnly=0

;  ----
; -- Movies --
;  ----

; For other input settings see zmovie.cfg

; Display Movie Frame # During Record/Replay (0 = NO, 1 = Yes)
MovieDisplayFrame=0

; Movie Default Start Method (0 = NOW, 1 = Power-On,
;                            2 = Reset, 3 = Power-On without SRAM)
MovieStartMethod=0

; Switch Modes when Loading a Movie State (0 = NO, 1 = Switch to Record, 2 = Switch to Playback)
MZTForceRTR=0

; ZMV - AVI Conversion Mode: (0 = No Video, 1 = Raw Video, 2 = Ffv1, 3 = x264,
;                              4 = XVID, 5 = Custom)
; The compression codecs can only be used if you provide them yourself.
; See zmovie.cfg for details.
MovieVideoMode=1

; Dump Audio Along w/Video (0 = No, 1 = YES)
MovieAudio=1

; Compress Audio Stream On-The-Fly (0 = No, 1 = YES)
; The compression codecs can only be used if you provide them yourself.
; See zmovie.cfg for details.
MovieAudioCompress=1

; Merge Audio and Video Streams Upon Conversion End (0 = No, 1 = YES)
MovieVideoAudio=0

;  ----
; -- Keyboard Hotkeys --
;  ----
; (you shouldn't edit these directly unless you know what you're doing)

; Super Scope Keys:
; Extra Device in Port 1/2 Cycle
KeyExtraEnab1=0
KeyExtraEnab2=0

; State Keys:
; Save State / Select Slot Menu / Load State
KeySaveState=60
KeyStateSelct=61
KeyLoadState=62
; Increase / Decrease Slot # / Direct Slot # Select
KeyIncStateSlot=0
KeyDecStateSlot=0
KeyStateSlc0=0
KeyStateSlc1=0
KeyStateSlc2=0
KeyStateSlc3=0
KeyStateSlc4=0
KeyStateSlc5=0
KeyStateSlc6=0
KeyStateSlc7=0
KeyStateSlc8=0
KeyStateSlc9=0
; Rewind
KeyRewind=0

; Speed Keys:
; Fast-Forward, Slow-Motion
KeyFastFrwrd=41
KeySlowDown=0
; Frame Rate Up/Down (Manual Frameskip)
KeyFRateUp=0
KeyFRateDown=0
; Speed Throttle Up/Down/Reset to Normal (Auto Frameskip)
KeyEmuSpeedUp=0
KeyEmuSpeedDown=0
KeyResetSpeed=0

; Pause Emulation, Frame Advance Keys
EMUPauseKey=25
INCRFrameKey=0

; Shortcuts:
; BG 0-3, Sprite Layer Display Toggles
KeyBGDisble0=2
KeyBGDisble1=3
KeyBGDisble2=4
KeyBGDisble3=5
KeySprDisble=6

; Sound Channel 0-7 Output Toggles
KeyDisableSC0=63
KeyDisableSC1=64
KeyDisableSC2=65
KeyDisableSC3=66
KeyDisableSC4=67
KeyDisableSC5=68
KeyDisableSC6=87
KeyDisableSC7=88

; Sound Volume Up/Down
KeyVolUp=0
KeyVolDown=0

; Quit ZSNES / Load Menu / Reset Game / Panic Key
KeyQuickExit=1
KeyQuickLoad=0
KeyQuickRst=0
KeyResetAll=42

; Clock Display Toggle
KeyQuickClock=0

; Netplay In-Game Chat
KeyQuickChat=20

; Screenshot Hotkey
KeyQuickSnapShot=0

; Capture SPC Hotkey
KeyQuickSaveSPC=0

; Use Player 3/4 Input as Player 1/2's Toggle
KeyUsePlayer1234=0

; FPS Display Toggle
KeyDisplayFPS=0

; Laptop Battery Display Toggle
KeyDisplayBatt=0

; Video Engine: Old/New Graphic Engine | Windowing | Offset Effects Toggles
KeyNewGfxSwt=9
KeyWinDisble=10
KeyOffsetMSw=11

; Gamma Correction Up/Down
KeyIncreaseGamma=0
KeyDecreaseGamma=0

; Movie Chapters: Insert / Go to Previous / Go to Next
KeyInsrtChap=0
KeyPrevChap=0
KeyNextChap=0

; Movie state load mode cycle
KeyRTRCycle=0

;  ----
; -- Misc --
;  ----

; Calculated Checksum Hash: Don't Edit by Hand !
TimeChecker=176
PrevBuildNum=510472830

; Display First-Time Use Reminder (0 = YES, 1 = No)
FirstTimeData=1

; Enable Debugger (0 = NO, 1 = Yes)
debuggeron=0

; Prevent ZSNES from Saving the Configuration on Exit (0 = NO, 1 = Yes)
cfgdontsave=0

; - EOF -


Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par soft-bug » 03 mai 2014 - 13:28

Voilà le zsnesw.cfg :

; PSR-produced config file (stock default in CAPS)

; Note, if you're worried you messed up a setting, removing the line will have
; ZSNES use the default settings for that option.
; The next time ZSNES is run, the line will reappear with the default settings.

;  ----
; -- Input --
;  ----

; For other input settings see zinput.cfg

; Enable Game-Specific Key Combos (0 = NO, 1 = Yes)
GUIComboGameSpec=0

; Enable Game-Specific Key Input (0 = NO, 1 = Yes)
GameSpecificInput=0

;  ----
; -- Options --
;  ----

; Enable MMX Support (0 = No, 1 = YES)
; Disable this only if you actually do NOT have a processor that supports MMX.
; Disabling this option will prevent you from using some of the more advanced
; video/sound filters.
MMXSupport=1

; Pause Emulation when ZSNES is Out of Focus (0 = NO, 1 = Yes)
PauseFocusChange=0

; Increase Priority of ZSNES (0 = NO, 1 = Yes)
; Enable this if it improves performance. This option is not for everyone.
; This may cause other background apps to be sluggish.
; The priority in Win9x will be High, Win2k will be Above Normal.
HighPriority=1

; Disable Power Management while ZSNES Runs (0 = No, 1 = YES)
; This is very necessary for gamepad users.
DisableScreenSaver=1

; Enable New Graphics Engine (0 = No, 1 = YES)
; Toggle off when there are graphical problems in the new graphics engine
newengen=1

; Enable Older Graphics Engine Tweak for Mode 2 (0 = NO, 1 = Yes)
; Enable this to see if it helps with rendering problems
; Only works with old graphic engine
bgfixer=0

; Snapshot Format (0 = BMP, 1 = PNG)
ScreenShotFormat=0

; Auto-Patch ROM with IPS (0 = No, 1 = YES)
AutoPatch=1

; Display ROM Info on Load (0 = No, 1 = YES)
DisplayInfo=0

; Log Info About the Last ROM Loaded to rominfo.txt (0 = No, 1 = YES)
RomInfo=0

; Enable FPS Counter when ZSNES is Started (0 = NO, 1 = Yes)
; This option is disabled when manual frameskip is in use.
FPSAtStart=0

; Display Clock (0 = NO, 1 = Yes)
TimerEnable=0

; Change Clock Mode (0 = 24 HOUR, 1 = 12 Hour)
TwelveHourClock=0

; Display Black Box Around Clock (0 = No, 1 = YES)
ClockBox=1

; Use Small Font for Messages (0 = NO, 1 = Yes)
SmallMsgText=0

; Transparent Messages - doesn't work with small font (0 = NO, 1 = Yes)
GUIEnableTransp=0

;  ----
; -- Video --
;  ----

; Video Mode [0..42]
;   0 = 256x224      R WIN     1 = 256x224        R FULL
;   2 = 512x448      R WIN     3 = 512x448       DR WIN
;   4 = 640x480      S WIN     5 = 640x480       DS WIN
;   6 = 640x480     DR FULL    7 = 640x480       DS FULL
;   8 = 640x480      S FULL    9 = 768x672        R WIN
;  10 = 768x672     DR WIN    11 = 800x600        S WIN
;  12 = 800x600     DS WIN    13 = 800x600        S FULL
;  14 = 800x600     DR FULL   15 = 800x600       DS FULL
;  16 = 1024x768     S WIN    17 = 1024x768      DS WIN
;  18 = 1024x768     S FULL   19 = 1024x768      DR FULL
;  20 = 1024x768    DS FULL   21 = 1024x896       R WIN
;  22 = 1024x896    DR WIN    23 = 1280x960       S WIN
;  24 = 1280x960    DS WIN    25 = 1280x960       S FULL
;  26 = 1280x960    DR FULL   27 = 1280x960      DS FULL
;  28 = 1280x1024    S WIN    29 = 1280x1024     DS WIN
;  30 = 1280x1024    S FULL   31 = 1280x1024     DR FULL
;  32 = 1280x1024   DS FULL   33 = 1600x1200      S WIN
;  34 = 1600x1200   DS WIN    35 = 1600x1200     DR FULL
;  36 = 1600x1200   DS FULL   37 = 1600x1200      S FULL
;  38 = CUSTOM      D  WIN    39 = CUSTOM        DS FULL
;  40 = CUSTOM         WIN    41 = CUSTOM         S FULL
;  42 = CUSTOM      DR FULL
; You need to select one of the custom video modes and modify CustomResX/Y to
; properly use custom res support.
; WARNING: Custom resolutions are only valid if they are supported by your system!
; ZSNES will hang if an invalid fullscreen resolution is used.
cvidmode=42
; Last windowed fullscreen modes (used when alt-tabbing)
PrevWinMode=5
PrevFSMode=42

; Custom Resolution X and Y for Custom Video Modes [256x224..2048x1536]
CustomResX=640
CustomResY=480

; Enable Video Interpolation (0 = NO, 1 = Yes)
; Video Interpolation is compatible with scanlines.
; Blends the neighboring pixels on the screen to eliminate pixelation.
antienab=0

; Enable NTSC Filter (0 = NO, 1 = Yes)
; Enable Blargg's wonderful NTSC filter which simulates the artifacts of an
; NTSC TV set - it is probably not a good idea to use with TV-out
; Recommended to use a minimum res of 602x448
NTSCFilter=0
; Blend Frames, Refresh Screen (0 = OFF, 1 = On)
; Blend Frames allows smoother transitions between frames for non-60Hz refresh rates.
; Refresh Screen allows the screen to be updated while changing the filter's parameters.
NTSCBlend=0
NTSCRef=0
; NTSC TV Attributes [-100..100]
NTSCHue=0
NTSCSat=0
NTSCCont=0
NTSCBright=0
NTSCSharp=0
NTSCGamma=0
NTSCRes=0
NTSCArt=0
NTSCFringe=0
NTSCBleed=0
NTSCWarp=0

; Enable Kreed's 2x Filters (0 = NONE, 1 = 2xSaI, 2 = Super Eagle, 3 = Super 2xSaI)
; These are Kreed's various 2x filters. They do not exhibit the same level of
; blurring than interpolation/bilinear. MMX support is required.
; This is disabled when other filters are used.
En2xSaI=0

; Use HQ*x Filter (0 = NO, 1 = Yes)
; This is a filter MaxSt has created. These are very CPU intensive filters that
; do very awesome blending to remove the pixelation.
; This is disabled when other filters are used. MMX support is required.
hqFilter=0
; Set HQ*x level [2..4]
; Recommended min resolutions
; HQ2x = 512x448
; HQ3x = 768x672
; HQ4x = 1024x896
hqFilterlevel=2

; Enable Scanlines (0 = NONE, 1 = Full, 2 = 25%, 3 = 50%) - simulate TV scanlines
; This is compatible with interpolation.
scanlines=0

; Enable Grayscale Mode (0 = NO, 1 = Yes) - don't enable this for other than nostalgia
; The whole screen is displayed in monochrome color.
GrayscaleMode=0

; Enable High-Res Mode 7 (0 = NO, 1 = Yes)
; Doubles the internal resolution of the image when Mode 7 is in use
; However this disables most filters, except for interpolation.
; This is only useful in certain games and is not useful in general.
; Requires a minimum res of 512x448
Mode7HiRes16b=0

; Sync Frames to Monitor Refresh Rate (0 = NO, 1 = Yes)
; Do not enable if you cannot normally sustain 60fps
vsyncon=0

; Use Triple Buffering (0 = NO, 1 = Yes) - replaces vsync
; This is usually more beneficial than VSync.
; This is not available in Windowed modes.
TripleBufferWin=0

; Force Refresh Rate (0 = NO, 1 = Yes)
; Enable this if you are experiencing visual tearing
; WARNING: Setting a refresh rate that your monitor cannot handle will have
; consequences! The DX Refresh Rate Override in dxdiag must be set to default
; in order for this to work! The refresh rate is only valid if it is supported
; by your system! This option is only useful in fullscreen modes.
ForceRefreshRate=0
SetRefreshRate=60

; Enable KitchenSync/KitchenSyncPAL (0 = NO, 1 = Yes)
; When enabled, ZSNES will use double the refresh rate of the game and use
; half of it to sync with the game to reduce/prevent visual tearing.
; You can enable this if your video card/monitor AND current ZSNES resolution
; supports 100Hz (for PAL games) and 120Hz (for NTSC games)
; KitchenSyncPAL applies to PAL games only, use KitchenSync for PAL+NTSC games.
; WARNING: The DX Refresh Rate Override in dxdiag must be set to default in
; order for this to work!
; This option is completely useless in a non-fullscreen mode.
KitchenSync=0
KitchenSyncPAL=0

; Keep 4:3 Ratio (0 = No, 1 = YES)
; This is particularly handy for those that use laptops/LCDs+non 4:3 resolutions.
; This can be used for any S/DS mode and any Custom Windowed mode.
; It is not recommended to enable this while under 298x224.
; Disable this if you want to use the non-standard ratio instead.
Keep4_3Ratio=0

; Set Gamma Level [0..15]
gammalevel=0

;  ----
; -- Sound --
;  ----

; Disable SPC Emulation (0 = NO, 1 = Yes)
; Disabling SPC emulation can improve performance, but at the expense of
; emulation accuracy. There will be no sound output and games might crash.
SPCDisable=0

; Enable Sound Emulation (0 = Off, 1 = ON) - disable if you need the performance
; If SPC emulation is disabled, there will be no sound output.
soundon=1

; Enable Stereo Sound (0 = Off, 1 = ON) - disable if you need the performance
StereoSound=1

; Swap Left Audio Channel w/Right (0 = NO, 1 = Yes)
RevStereo=0

; Simulate Surround Sound (0 = NO, 1 = Yes)
; Enable a simulated 2 speaker surround sound effect.
; Do not enable if playing a game that has its own surround sound effects.
; Stereo Sound must be enabled for this to work.
Surround=0

; Use Primary Sound Buffer (0 = NO, 1 = Yes)
; Enable this if you are experiencing sound playback/static problems.
PrimaryBuffer=0

; Sampling Rate: (0 = 8000Hz, 1 = 11025Hz, 2 = 22050Hz, 3 = 44100Hz,
;                            4 = 16000Hz, 5 = 32000Hz, 6 = 48000Hz)
; Using any other sound frequencies other than the default 32000Hz
; is COMPLETELY UNACCEPTABLE in use for sound bug reports.
SoundQuality=5

; Sound Volume Level [0..100]
MusicRelVol=100

; Enable Sound Interpolation (0 = None, 1 = GAUSSIAN, 2 = Cubic, 3 = 8-point)
; Sound interpolation smooths out the waveform of lower frequency sounds.
; Using any other setting other than the default Gaussian interpolation is
; COMPLETELY UNACCEPTABLE in sound bug reports.
SoundInterpType=1

; Enable Low-Pass Filter (0 = NONE, 1 = Simple, 2 = Dynamic, 3 = Hi-quality)
; A low-pass filter improves the bass in the sounds.
; This is useful if you have a Subwoofer.
LowPassFilterType=3

; Disable Echo (0 = NO, 1 = Yes)
; Disables the echo effect in the sound.
EchoDis=0

;  ----
; -- Saves --
;  ----

; Number of Rewind States [0..99]
RewindStates=8
; Delay between rewinds [1..99] - (1 = 200ms, 5 = 1s, 10 = 2s)
RewindFrames=15

; Don't Save SRAM (0 = NO, 1 = Yes)
; Only enable this if you don't want to Save SRAM at any given time.
; This option will make Update SRAM in Real-Time useless.
nosaveSRAM=0

; Update SRAM in Real-Time (0 = NO, 1 = Yes)
; This is useful if you fear something will prevent ZSNES from exiting normally.
; It is required to play games that store important values directly to SRAM.
; ZSNES normally updates SRAM on exit.
; If Don't Save SRAM is enabled, this option is useless.
SRAMSave5Sec=0

; Load SRAM w/Savestates (0 = No, 1 = YES)
; Enable this when you want to use the SRM that is stored within the savestate.
; Warning: You will overwrite the existing SRM that you are currently using.
; It is required to properly use states with games storing important values
; directly in SRM.
SRAMState=1

; Select Latest Save State Slot on Game Load (0 = NO, 1 = Yes)
; Enable this if you want to load the last saved savestate quickly
; (via the load savestate button/GUI option) after loading the game.
LatestSave=0

; Auto Increment State Slot First, then Save State (0 = NO, 1 = Yes)
; Enable this if you have a tendency in saving accidentally to an existing
; savestate.
AutoIncSaveSlot=0

; Save in 10 save block (0 = NO, 1 = Yes)
; This may be handy if you want to save within a block (0-9, 10-19, etc.)
AutoIncSaveSlotBlock=0

; Auto State Save/Load (0 = NO, 1 = Yes) - uses a special state
; Enable this if you wish a special state to be saved on a visit to the GUI.
; This state will automatically be loaded when you load a game.
AutoState=0

; Pause Emulation After Loading a Save State (0 = NO, 1 = Yes)
PauseLoad=0
; Pause Emulation After Using Rewind (0 = NO, 1 = Yes)
PauseRewind=0

;  ----
; -- Emulation --
;  ----

; Percent to Execute [50..150] - only modify if you know what you are doing
; Changing this value may help certain games run.
per2exec=100

; Disable Hacks (0 = NO, 1 = Yes)
; Set this to 1 if you want to disable game specific hacks
HacksDisable=0

; Frameskip: [0..10] (0 = AUTO, 1-10 = Manual 0-9)
frameskip=0

; Max Frameskip Allowed for Auto Frameskip [0..9]
maxskip=0

; Fastforward/Slowdown Keys Behaviour (0 = HELD, 1 = Toggle)
FastFwdToggle=0
; Fastforward/Slowdown Factors [0..28] (0 = factor 2, 28 = factor 30)
FFRatio=8
SDRatio=0

; Emulation Speed Throttle [0..58] (0 = speed/30, 29 = 1x, 58 = 30x)
; Fast-forward multiplicator is currently inaccurate
EmuSpeed=29

;  ----
; -- Paths --
;  ----
; It is suggested to go to GUI-Paths and modify the paths from there.
; ROMs drive + directory

; Note, when entering a path, make sure every backslash is doubled
; "C:\Games\SNES" for example is incorrect.
; "C:\\Games\\SNES" is correct.

ROMPath="D:\\HeavyBox V2\\Hyperspin\\Emulators\\Super Nintendo\\"
; Save states SRAMs, snapshots, SPCs
SRAMPath=""
SnapPath=""
SPCPath=""
; BIOS/base carts (BS-X, Sufami Turbo, Same Game SD Gundam G-Next)
BSXPath=""
STPath=""
SGPath=""
GNextPath=""
; SPC7110 graphic packs
FEOEZPath=""
SJNSPath=""
MDHPath=""
SPL4Path=""

;  ----
; -- GUI --
;  ----

; Disable GUI (0 = NO, 1 = Yes)
guioff=0

; Show All Files in 'Load Game' Menu (0 = NO, 1 = Yes)
showallext=0

; Filename Display Mode (0 = LONG FILENAME, 1 = Internal header name)
GUIloadfntype=0

; Recent games played, you shouldn't edit this manually (8.3 / Paths / LFN)
prevloadiname="Illusion of Time (France).s"\0"!    "\"Final Fantasy II (USA).smc"\0"\"    "\"Breath Of Fire 2 (fr).smc"\0"#    "\"Battletoads Double Dragon"\0"!    "\"Donkey Kong Country (USA).s"\0"!    "\"7th Saga.sfc"\0"0    "\"Street Fighter II - The Wor"\0"!    "\"Bahamut Lagoon.sfc"\0"*    "\"Secret Of Mana 1 (fr).sfc"\0"?    "
prevloaddnamel=0"!    "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%   "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%   "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%   "\"E:\\Hyperspin\\Roms\\Super Nintendo\\"\0")%   "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$   "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$   "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$   "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms\\"\0"}$   "\"D:\\Hyperspin\\Emulators\\Super Nintendo\\Roms FR\\"\0"E*   "
prevloadfnamel="Illusion of Time (France).smc"\0"-%   "\"Final Fantasy II (USA).smc"\0"0%   "\"Breath Of Fire 2 (fr).smc"\0"1%   "\"Battletoads Double Dragon - The Ultimate Team (U) [T+Fre].smc"\0"i$   "\"Donkey Kong Country (USA).sfc"\0"-%   "\"7th Saga.sfc"\0"%   "\"Street Fighter II - The World Warrior (USA).sfc"\0"y$   "\"Bahamut Lagoon.sfc"\0"8%   "\"Secret Of Mana 1 (fr).sfc"\0"[*   "

; Freeze Recent Games List (0 = NO, 1 = Yes)
prevlfreeze=0

; Right Mouse Click Enters/Exits GUI (0 = NO, 1 = Yes)
GUIRClick=0

; Left Handed Mouse Behavior for GUI (0 = NO SWAP, 1 = Swap)
; (swap left and right buttons)
lhguimouse=0

; Show Mouse Cursor Shadow (0 = No, 1 = YES)
; Displays a shadow under the mouse cursor.
mouseshad=1

; Wrap Mouse Cursor (0 = NO, 1 = Yes)
; If enabled, the cursor will wrap around to the other side.
; Only useful for Fullscreen modes.
mousewrap=0

; Trap Mouse Cursor in Window (0 = NO, 1 = Yes)
; Only useful in Windowed modes.
TrapMouseCursor=0

; Use Mouse Wheel to Scroll (0 = No, 1 = YES)
MouseWheel=1

; ESC to Game Menu (0 = No, 1 = YES)
; If yes, visiting the GUI will have the Game Menu automatically selected.
; It will also enable the main menu keyboard shortcuts.
esctomenu=0

; Control the GUI Using Gamepad 1 (0 = NO, 1 = Yes)
JoyPad1Move=0

; Filter GUI Display (0 = No, 1 = YES)
; If enabled, the current filter you are using will also filter the GUI.
FilteredGUI=1

; Use Custom Font (0 = NO, 1 = Yes)
; The font currently reads off a format as defined by zfile.txt
newfont=0

; Save GUI Window Positions (0 = NO, 1 = Yes)
savewinpos=0

; GUI windows X/Y coordinates - GUI setup showing windows #

;    Game          Config        Cheat      Netplay       Misc
; -------------------------------------------------------------------
;  1:Load         3:Input      7:Add Code  [Internet]   9:Misc Keys
;    Run          -------      7:Browse                10:GUI Opts
; 12:Reset       17:Devices   13:Search                15:Movie Opt
;  -------       18:Chip Cfg                           16:Key Comb.
; 14:Save State   -------                                 Save Cfg
;  2:Open State   4:Options                             -------
; 14:Pick State   5:Video                              11:About
;  -------        6:Sound
;    Quit        19:Paths
;                20:Saves
;                21:Speed

; X positions [-233..254] (windows #0 to #22)
GUIwinposx=0,6,65,33,42,5,34,6,64,8,5,33,56,64,56,5,3,28,48,6,28,53,0
; Y positions [8..221] (windows #0 to #22)
GUIwinposy=0,20,70,20,20,20,20,20,30,30,20,20,60,30,60,20,20,60,60,20,30,20,0

; GUI Background Effect
; (0 = NONE, 1 = Snow, 2 = Water A, 3 = Water B, 4 = Burn, 5 = Smoke)
GUIEffect=1

; GUI Palette Mods:
; Background RGB Tint [0..31]
GUIRAdd=15
GUIGAdd=10
GUIBAdd=31
; Titlebar RGB Tint [0..31]
GUITRAdd=0
GUITGAdd=10
GUITBAdd=31
; Windows RGB Tint [0..31]
GUIWRAdd=8
GUIWGAdd=8
GUIWBAdd=25

; Main Window Always on Top (0 = NO, 1 = Yes)
AlwaysOnTop=0

; Save Main Window Position (0 = No, 1 = YES) and X/Y coordinates
SaveMainWindowPos=1
MainWindowX=256
MainWindowY=87

; Allow Multiple ZSNES Instances at Once (0 = No, 1 = YES)
AllowMultipleInst=1

;  ----
; -- Cheats --
;  ----

; Autoload .CHT files (0 = NO, 1 = Yes)
; Enable the use of stored cheat files on load.
AutoLoadCht=0

; Selected Size Search (0 = 1 BYTE, 1 = 2B, 2 = 3B, 3 = 4B)
CheatSrcByteSize=0

; Selected Numerical Base (0 = DECIMAL, 1 = Hexadecimal)
CheatSrcByteBase=0

; Search Type (0 = EXACT VALUE, 1 = Comparative)
CheatSrcSearchType=0

; Add Code for Most Significant Byte Only (0 = NO, 1 = Yes)
CheatUpperByteOnly=0

;  ----
; -- Movies --
;  ----

; For other input settings see zmovie.cfg

; Display Movie Frame # During Record/Replay (0 = NO, 1 = Yes)
MovieDisplayFrame=0

; Movie Default Start Method (0 = NOW, 1 = Power-On,
;                             2 = Reset, 3 = Power-On without SRAM)
MovieStartMethod=0

; Switch Modes when Loading a Movie State (0 = NO, 1 = Switch to Record, 2 = Switch to Playback)
MZTForceRTR=0

; ZMV - AVI Conversion Mode: (0 = No Video, 1 = Raw Video, 2 = Ffv1, 3 = x264,
;                              4 = XVID, 5 = Custom)
; The compression codecs can only be used if you provide them yourself.
; See zmovie.cfg for details.
MovieVideoMode=1

; Dump Audio Along w/Video (0 = No, 1 = YES)
MovieAudio=1

; Compress Audio Stream On-The-Fly (0 = No, 1 = YES)
; The compression codecs can only be used if you provide them yourself.
; See zmovie.cfg for details.
MovieAudioCompress=1

; Merge Audio and Video Streams Upon Conversion End (0 = No, 1 = YES)
MovieVideoAudio=0

;  ----
; -- Keyboard Hotkeys --
;  ----
; (you shouldn't edit these directly unless you know what you're doing)

; Super Scope Keys:
; Extra Device in Port 1/2 Cycle
KeyExtraEnab1=0
KeyExtraEnab2=0

; State Keys:
; Save State / Select Slot Menu / Load State
KeySaveState=60
KeyStateSelct=61
KeyLoadState=62
; Increase / Decrease Slot # / Direct Slot # Select
KeyIncStateSlot=0
KeyDecStateSlot=0
KeyStateSlc0=0
KeyStateSlc1=0
KeyStateSlc2=0
KeyStateSlc3=0
KeyStateSlc4=0
KeyStateSlc5=0
KeyStateSlc6=0
KeyStateSlc7=0
KeyStateSlc8=0
KeyStateSlc9=0
; Rewind
KeyRewind=0

; Speed Keys:
; Fast-Forward, Slow-Motion
KeyFastFrwrd=41
KeySlowDown=0
; Frame Rate Up/Down (Manual Frameskip)
KeyFRateUp=0
KeyFRateDown=0
; Speed Throttle Up/Down/Reset to Normal (Auto Frameskip)
KeyEmuSpeedUp=0
KeyEmuSpeedDown=0
KeyResetSpeed=0

; Pause Emulation, Frame Advance Keys
EMUPauseKey=25
INCRFrameKey=0

; Shortcuts:
; BG 0-3, Sprite Layer Display Toggles
KeyBGDisble0=2
KeyBGDisble1=3
KeyBGDisble2=4
KeyBGDisble3=5
KeySprDisble=6

; Sound Channel 0-7 Output Toggles
KeyDisableSC0=63
KeyDisableSC1=64
KeyDisableSC2=65
KeyDisableSC3=66
KeyDisableSC4=67
KeyDisableSC5=68
KeyDisableSC6=87
KeyDisableSC7=88

; Sound Volume Up/Down
KeyVolUp=0
KeyVolDown=0

; Quit ZSNES / Load Menu / Reset Game / Panic Key
KeyQuickExit=1
KeyQuickLoad=0
KeyQuickRst=0
KeyResetAll=42

; Clock Display Toggle
KeyQuickClock=0

; Netplay In-Game Chat
KeyQuickChat=20

; Screenshot Hotkey
KeyQuickSnapShot=0

; Capture SPC Hotkey
KeyQuickSaveSPC=0

; Use Player 3/4 Input as Player 1/2's Toggle
KeyUsePlayer1234=0

; FPS Display Toggle
KeyDisplayFPS=0

; Laptop Battery Display Toggle
KeyDisplayBatt=0

; Video Engine: Old/New Graphic Engine | Windowing | Offset Effects Toggles
KeyNewGfxSwt=9
KeyWinDisble=10
KeyOffsetMSw=11

; Gamma Correction Up/Down
KeyIncreaseGamma=0
KeyDecreaseGamma=0

; Movie Chapters: Insert / Go to Previous / Go to Next
KeyInsrtChap=0
KeyPrevChap=0
KeyNextChap=0

; Movie state load mode cycle
KeyRTRCycle=0

;  ----
; -- Misc --
;  ----

; Calculated Checksum Hash: Don't Edit by Hand !
TimeChecker=176
PrevBuildNum=510472830

; Display First-Time Use Reminder (0 = YES, 1 = No)
FirstTimeData=1

; Enable Debugger (0 = NO, 1 = Yes)
debuggeron=0

; Prevent ZSNES from Saving the Configuration on Exit (0 = NO, 1 = Yes)
cfgdontsave=0

; - EOF -


Hello,

Bon maintenant à toi d'identifier les paramétres qui changent lorsque tu sélectionne 60 ou 50 hz ...

et jeter un oeil dans un autre fichier cité : zinput.cfg

L'idéal serait d'utiliser un éditeur de texte pour voir toutes les différences entre le fichier avec 60 hz et fichier 50 hz pour voir toutes les mises à jour ... et donc tous les paramétres à modifier !   :pirat:  

A priori les paramétres vidéo du fichier de config sont dans cette partie :

; Sync Frames to Monitor Refresh Rate (0 = NO, 1 = Yes)
; Do not enable if you cannot normally sustain 60fps
vsyncon=0

; Use Triple Buffering (0 = NO, 1 = Yes) - replaces vsync
; This is usually more beneficial than VSync.
; This is not available in Windowed modes.
TripleBufferWin=0

; Force Refresh Rate (0 = NO, 1 = Yes)
; Enable this if you are experiencing visual tearing
; WARNING: Setting a refresh rate that your monitor cannot handle will have
; consequences! The DX Refresh Rate Override in dxdiag must be set to default
; in order for this to work! The refresh rate is only valid if it is supported
; by your system! This option is only useful in fullscreen modes.
ForceRefreshRate=0
SetRefreshRate=60


; Enable KitchenSync/KitchenSyncPAL (0 = NO, 1 = Yes)
; When enabled, ZSNES will use double the refresh rate of the game and use
; half of it to sync with the game to reduce/prevent visual tearing.
; You can enable this if your video card/monitor AND current ZSNES resolution
; supports 100Hz (for PAL games) and 120Hz (for NTSC games)
; KitchenSyncPAL applies to PAL games only, use KitchenSync for PAL+NTSC games.
; WARNING: The DX Refresh Rate Override in dxdiag must be set to default in
; order for this to work!
; This option is completely useless in a non-fullscreen mode.
KitchenSync=0
KitchenSyncPAL=0


To be contined !   :clown:

Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 03 mai 2014 - 14:01

Ok, merci.
Si j'ai bien compris, quand je lance zsnes, au moment où je coche "force ntsc" et que je lance le jeu, l'émulateur écrit cette modif dans zsnesw.cfg (et peut-être zinput.cfg). Il me suffit donc d'éplucher ces deux fichiers quand le jeu est lancé pour identifier les éventuels changements d'éntrées que tu m'as indiquées...

Avatar de l’utilisateur
soft-bug
Connaisseur
Connaisseur
Messages : 478
Inscription : 10 févr. 2013 - 00:00
A été remercié : 1 fois

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par soft-bug » 03 mai 2014 - 14:08

Ok, merci.
Si j'ai bien compris, quand je lance zsnes, au moment où je coche "force ntsc" et que je lance le jeu, l'émulateur écrit cette modif dans zsnesw.cfg (et peut-être zinput.cfg). Il me suffit donc d'éplucher ces deux fichiers quand le jeu est lancé pour identifier les éventuels changements d'éntrées que tu m'as indiquées...
Oui, tu as tout compris   :cheers:  

Avatar de l’utilisateur
Vians
Apprenti
Apprenti
Messages : 15
Inscription : 30 avr. 2014 - 01:00

Re: Forcer zsnes à lancer un jeu en 60hz via hyperlaunch ?

Message par Vians » 06 mai 2014 - 09:51

Bon, et bien pas super avancé : aucun changement dans ces fichiers une fois le jeu lancé...   :no:   Je les ai vérifiés de A à Z. La modif est peut-être seulement chargée dans la RAM, à la volée...
Je pense que je vais tester ces paramètres en les appliquant un par un à la main dans le fichier de config, pour voir lequel crée ce changement en 60hz, et je verrai après à créer un ahk avec une (ou plusieurs) exception(s)...

Répondre

Revenir à « Aide Configuration d'Emulateurs »