/To run the games in your language:
_(Made in French)_
Pour l'émulateur pcsx2 certain jeux pour être en français doivent démarrer en "fullboot" (démarrage complet) par exemple god of war tandis que d'autre ISO de ma liste ne seront reconnu qu'en démarrage rapide.
1/ chercher dans le fichier .ahk
dans notre cas D:\Hyperspin\Modules\Sony Playstation 2/Sony Playstation 2.ahk
ouvrer le .ahk avec le bloc note ou clic droit modifier
;----------------------------------------------------------------------------
; Sony Playstation 2
; PCSX2 v0.9.8
; by layer0730 chillinwater
; 1.0
;
; Notes:
; remove all ";" below to enable blackscreen if needed
;----------------------------------------------------------------------------
;\\\optional blackscreen\\\
Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
Run, %executable% "%romPath%%romName%%romExtension%" --fullscreen, %emuPath%
Sleep, 1000
Gui Destroy ;kills optional blackscreen
Process, WaitClose, %executable%
ExitApp
CloseProcess:
sleep, 3000
Process, Close, hypersplash.exe
Process, Close, %executable%
return
2/ repérer les lignes de commandes de l'émulateur et rajouter la commande --fullboot pour que tous les jeux fassent un démarrage complet
Run, %executable% "%romPath%%romName%%romExtension%" --fullboot --fullscreen, %emuPath%
3/ mettre une exception
un peu comme excel avec une commade "si" ce qui donne :
;----------------------------------------------------------------------------
; Sony Playstation 2
; PCSX2 v0.9.8
; by layer0730 chillinwater
; 1.0
;
; Notes:
; remove all ";" below to enable blackscreen if needed
;----------------------------------------------------------------------------
;\\\optional blackscreen\\\
Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
If ( romName = "Tekken 5" or romName = "CAPCOM VS SNK 2" or romName = "FINAL_FANTASY_12"
or romName = "RAYMAN 3" or romName = "Rogue Galaxy" or romName = "Virtua Fighter 4 Evolution" ) {
Run, %executable% "%romPath%%romName%%romExtension%" --fullscreen, %emuPath%
} Else
Run, %executable% "%romPath%%romName%%romExtension%" --fullboot --fullscreen, %emuPath%
Sleep, 1000
Gui Destroy ;kills optional blackscreen
Process, WaitClose, %executable%
ExitApp
CloseProcess:
sleep, 3000
Process, Close, hypersplash.exe
Process, Close, %executable%
return
EDIT : je voulais revenir sur mon but premier, à savoir avoir 2 configurations pour les controles (pour les jeux 1 joueur utiliser le 2eme joystique comme étant le 2eme stick de la manette une)
1/dans pcsx2 configurer 2 plugins "PAD" avec bien sur 2 configuration différentes,
par exemple "LilyPad" pour une configuration 1 joueur (pour "FF12", "GOW",...) et "PadSSSPSX" pour une configuration 2 joueurs (pour "TEKKEN 5", "Virtua Fighter 4 Evolution")
2/ utiliser la commande --pad="chemin du plugin\nom du plugin"
ce qui donne :
Run, %executable% "%romPath%%romName%%romExtension%" --pad="D:\Hyperspin\Emulators\Sony Playstation 2\Plugins\LilyPad.dll"--fullscreen, %emuPath%ou
Run, %executable% "%romPath%%romName%%romExtension%" --pad="D:\Hyperspin\Emulators\Sony Playstation 2\Plugins\PadSSSPSX.dll"--fullscreen, %emuPath%
3/ rajouter une exception (commande "if") et faire un mixe avec les commandes précédentes
a noter que vous n’êtes pas obliger de préciser le plugin par défaut de votre pcsx2
;----------------------------------------------------------------------------
; Sony Playstation 2
; PCSX2 v0.9.8
; by layer0730 chillinwater
; 1.0
;
; Notes:
; remove all ";" below to enable blackscreen if needed
;----------------------------------------------------------------------------
;\\\optional blackscreen\\\
Gui +AlwaysOnTop -Caption +ToolWindow
Gui, color, 0
Gui Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
If ( romName = "Tekken 5" or romName = "CAPCOM VS SNK 2" or romName = "Virtua Fighter 4 Evolution" ) {
Run, %executable% "%romPath%%romName%%romExtension%" --pad="D:\Hyperspin\Emulators\Sony Playstation 2\Plugins\PadSSSPSX.dll" --fullscreen, %emuPath%
} Else
If (romName = "FINAL_FANTASY_12" or romName = "RAYMAN 3" or romName = "Rogue Galaxy") {
Run, %executable% "%romPath%%romName%%romExtension%" --fullscreen, %emuPath%
} Else
Run, %executable% "%romPath%%romName%%romExtension%" --fullboot --fullscreen, %emuPath%
Sleep, 1000
Gui Destroy ;kills optional blackscreen
Process, WaitClose, %executable%
ExitApp
CloseProcess:
sleep, 3000
Process, Close, hypersplash.exe
Process, Close, %executable%
return
pcsx2-v1.7.0-dev-1-g8f3b908e3-windows-x86.zip
51.45 Mo
https://1fichier.com/?bw9em5mk55xriy2tgfaf
MEmu := "PCSX2"
MEmuV := "v1.7.0-dev-1"
MURL := ["http://pcsx2.net/"]
MAuthor := ["djvj"]
MVersion := ""
MCRC := ""
iCRC := ""
MID := ""
MSystem := ["Sony PlayStation 2"]
;----------------------------------------------------------------------------
; Notes:
; This module has many settings that can be controlled via RocketLauncherUI
; If you want to customize settings per game, add the game to the module's ini using RocketLauncherUI
; If you use Daemon Tools, make sure you have a SCSI virtual drive setup. Not a DT one.
; Tested Virtual Drive support with the cdvdGigaherz CDVD plugin. Make sure you set it to use your SCSI Virtual Drive letter.
; If the incorrect drive is used, the emu will boot to the bios screen and emu will hang in your running processes on exit and require it to be force closed
; Module will set the CdvdSource to Plugin or Iso depending on if you have Virtual Drive enabled or not.
; If you have any problems closing the emulator, make sure noGUI module setting in RocketLauncherUI is set to default or false.
; Most stable bios is Japan v01.00(17/01/2000)
;
; Per-game memory cards
; This module supports per-game memory cards to prevent them from ever becoming full
; To use this feature, set the PerGameMemoryCards to true in RocketLauncherUI
; You need to create a default blank memory card in the path you have defined in pcsx's ini found in section [Folders], key MemoryCards.
; Make sure one of the current memory cards are blank, then copy it in that folder and rename it to "default.ps2". The module will copy this file to a romName.ps2 for each game launched.
; The module will only insert memory cards into Slot 1. So save your games there.
;
; Linuz cdvd plugin stores its settings in the registry @ HKEY_CURRENT_USER\Software\PS2Eplugin\CDVD\CDVDiso
;
; v1.4.0 setup guide: https://www.youtube.com/watch?v=ovagz8UXFTU
;
; Run pcsx2 with the --help option to see current CLI parameters
; Known CLI options not currently supported by this module:
; --console forces the program log/console to be visible
; --portable enables portable mode operation (requires admin/root access)
; --elf=<str> executes an ELF image
; --forcewiz forces PCSX2 to start the First-time Wizard
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()
primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object emuPrimaryWindow := new Window(new WindowTitle(,"wxWindowNR"),,,"PCSX2") ; instantiate primary emulator window object emuGUIWindow := new Window(new WindowTitle("PCSX2","wxWindowNR")) emuLoadingWindow := new Window(new WindowTitle("Speed","wxWindowNR"),,"PCSX2") emuBootingWindow := new Window(new WindowTitle("Booting","wxWindowNR")) Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1) AspectRatio := moduleIni.Read(romName . "|Settings", "AspectRatio","16:9",,1) noGUI := moduleIni.Read("Settings", "noGUI","false",,1) ; disables display of the gui while running games perGameMemCards := moduleIni.Read("Settings", "PerGameMemoryCards","false",,1) hideConsole := moduleIni.Read("Settings", "HideConsole","true",,1) ; Hides console window from view if it shows up cfgPath := moduleIni.Read("Settings", "cfgpath", emuPath . "\Game Configs",,1) ; specifies the config folder; applies to pcsx2 + plugins autoCreateINIDir := moduleIni.Read("Settings", "AutoCreateINIDir","false",,1) ; Enables the module to auto-create of per game ini files and directories defaultINISPath := moduleIni.Read("Settings", "DefaultINISPath",,,1) ; Path to default INIS folder of PCSX2. fullboot := moduleIni.Read(romName . "|Settings", "fullboot","true",,1) ; disables the quick boot feature, forcing you to sit through the PS2 startup splash screens gs := moduleIni.Read(romName . "|Settings", "gs",,,1) ; override for the GS plugin pad := moduleIni.Read(romName . "|Settings", "pad",,,1) ; override for the PAD plugin spu2 := moduleIni.Read(romName . "|Settings", "spu2",,,1) ; override for the SPU2 plugin cdvd := moduleIni.Read(romName, "cdvd",,,1) ; override for the CDVD plugin usb := moduleIni.Read(romName . "|Settings", "usb",,,1) ; override for the USB plugin fw := moduleIni.Read(romName . "|Settings", "fw",,,1) ; override for the FW plugin dev9 := moduleIni.Read(romName . "|Settings", "dev9",,,1) ; override for the DEV9 plugin vdOveride := moduleIni.Read(romName, "VDOveride",,,1) nohacks := moduleIni.Read(romName, "nohacks","false",,1) ; disables all speedhacks gamefixes := moduleIni.Read(romName, "gamefixes",,,1) ; Enable specific gamefixes for this session. Use the specified comma or pipe-delimited list of gamefixes: VuAddSub,VuClipFlag,FpuCompare,FpuMul,FpuNeg,EETiming,SkipMpeg,OPHFlag,DMABusy,VIFFIFO,VI,FMVinSoftware ; GS plugin settings, primarily to fix upscaling issues in games. Game specific settings can be found here: http://www.neogaf.com/forum/showpost.php?p=27110555&postcount=2 userHacks_MSAA := If moduleIni.Read(romName, "MSAA",0,,1) ; Applies hardware anti-aliasing userHacks_SkipDraw := moduleIni.Read(romName, "Skipdraw",0,,1) ; Can remove ghost images userHacks_HalfPixelOffset := If moduleIni.Read(romName, "Half-pixel_Offset",0,,1) ; Fixes blur or halo effects userHacks_WildHack := If moduleIni.Read(romName, "Wild_Arms_Offset",0,,1) ; Fixes fonts in many games userHacks_unsafe_fbmask := If moduleIni.Read(romName, "Fast_Accurate_Blending",0,,1) ; Accelerates blending operations, speeds up Xenosaga userHacks_AlphaStencil := If moduleIni.Read(romName, "Alpha_Stencil",0,,1) ; May improve drawing shadows userHacks_align_sprite_X := If moduleIni.Read(romName, "Align_Sprite",0,,1) ; Fixes issues with vertical lines in Ace Combat, Tekken, Soul Calibur userHacks_AlphaHack := If moduleIni.Read(romName, "Alpha",0,,1) ; Improves drawing fog-like effects preload_frame_with_gs_data := If moduleIni.Read(romName, "Preload_Data_Frame",0,,1) ; Fixes black screen issues in Armored Core: Last Raven userHacks_round_sprite_offset := moduleIni.Read(romName, "Round_Sprite",0,,1) ; Fixes lines in sprites in Ar tonelico userHacks_SpriteHack := moduleIni.Read(romName, "Sprite",0,,1) ; Fixes inner lines in sprites in Mana Khemia, Ar tonelico, Tales of Destiny userHacks_TCOffset := moduleIni.Read(romName, "TC_Offset",0,,1) ; Fixes misaligned textures in Persona 3, Haunting Ground, Xenosaga ; Set the userHacks variable to 1 if any of the hacks are used. userHacks := If (userHacks_MSAA || userHacks_SkipDraw || userHacks_HalfPixelOffset || userHacks_WildHack || userHacks_unsafe_fbmask || userHacks_AlphaStencil || userHacks_align_sprite_X || userHacks_AlphaHack || preload_frame_with_gs_data || userHacks_round_sprite_offset || userHacks_SpriteHack || userHacks_TCOffset) ? 1 : "" cfgPath := new Folder(GetFullName(cfgPath)) If !cfgPath.Exist() cfgPath.CreateDir() ; create the cfg folder if it does not exist ; PCSX2_ui.ini = default ini that contains memory card info and general settings portableIni := new File(emuPath . "\portable.ini") If portableIni.Exist() { ; portable install RLLog.Info("Module - PCSX2 is operating in a portable mode") pcsx2IniFolder := emuPath . "\inis" pcsx2_GS_IniFile := CheckFile(emuPath . "\inis\GSdx.ini", "Could not find the default GSdx.ini file. Please manually run and configure PCSX2 first so this file is created with all your default settings.") } Else { ; default not portable install RLLog.Info("Module - PCSX2 is operating in a standard installation mode") pcsx2IniFolder := Registry.Read("HKCU", "Software\PCSX2", "SettingsFolder") } pcsx2Ini := new IniFile(pcsx2IniFolder . "\PCSX2_ui.ini") pcsx2Ini.CheckFile("Could not find the default PCSX2_ui.ini file. Please manually run and configure PCSX2 first so this file is created with all your default settings.") pcsx2GSdxIni := new IniFile(pcsx2IniFolder . "\GSdx.ini") pcsx2GSdxIni.CheckFile("Could not find the default GSdx.ini file. Please manually run and configure PCSX2 first so this file is created with all your default settings.") pcsx2IniFolder := new Folder(pcsx2IniFolder) ; Create INIs subfolder for the game if it does not exist and if AutoCreateINIDir is true perGameINIPath := new Folder(cfgPath.FileFullPath . "\" . romName) If (autoCreateINIDir = "true") { RLLog.Info("Module - PerGameIni - perGameINIPath = " . perGameINIPath.FileFullPath) If !perGameINIPath.Exist() { perGameINIPath.CreateDir() If (defaultINISPath != "") { defaultINISPath := new Folder(defaultINISPath) RLLog.Info("Module - PerGameIni - perGameINIPath does not exist. So we will create it at " . perGameINIPath.FileFullPath) RLLog.Info("Module - PerGameIni - Now copying the ini files from " . defaultINISPath.FileFullPath . " to " . perGameINIPath.FileFullPath) defaultINISPath.Copy(perGameINIPath.FileFullPath,0,"\*.ini") } Else { RLLog.Info("Module - PerGameIni - perGameINIPath does not exist. So we will create it at " . perGameINIPath.FileFullPath) RLLog.Info("Module - PerGameIni - Now copying the ini files from " . pcsx2IniFolder.FileFullPath . " to " . perGameINIPath.FileFullPath) pcsx2IniFolder.Copy(perGameINIPath.FileFullPath,0,"\*.ini") } } } BezelStart() Fullscreen := If Fullscreen = "true" ? noGUI := If noGUI = "true" ? " --nogui" : "" If (noGUI != "") RLLog.Warning("Module - noGUI is set to true, THIS MAY PREVENT PCSX2 FROM CLOSING PROPERLY. If you have any issues, set it to false or default in RocketLauncherUI.") fullboot := If fullboot = "true" ? nohacks := If nohacks = "true" ? " --nohacks" : "" gamefixes := If gamefixes ? " --gamefixes=" . gamefixes : "" gs := If gs ? " --gs=""" . GetFullName(gs) . """" : "" pad := If pad ? " --pad=""" . GetFullName(pad) . """" : "" spu2 := If spu2 ? " --spu2=""" . GetFullName(spu2) . """" : "" usb := If usb ? " --usb=""" . GetFullName(usb) . """" : "" fw := If fw ? " --fw=""" . GetFullName(fw) . """" : "" dev9 := If dev9 ? " --dev9=""" . GetFullName(dev9) . """" : "" ; cfgRomPath := new File(cfgPath . "\" . romName) cfgPathCLI := If perGameINIPath.Exist() ? " --cfgpath=""" . perGameINIPath.FileFullPath . """" : "" ; Specify what main ini PCSX2 should use pcsx2GameIni := new File(perGameINIPath.FileFullPath . "\PCSX2_ui.ini") If (cfgPathCLI && pcsx2GameIni.Exist()) { ;We can't set both cfgpath and cfg CLI switches, so if only PCSX2_ui.ini file exists we use cfg otherwise we use cfgpath ;--cfg specifies a custom configuration file to use instead of PCSX2.ini (does not affect plugins) filecount := 0 Loop % perGameINIPath.FileFullPath . "\*.ini" filecount++ If (filecount = 1) { ;Only PCSX2_ui.ini found pcsx2IniFile := pcsx2GameIni RLLog.Info("Module - Found a game-specific PCSX2_ui.ini in the cfgPath. Telling PCSX2 to use this one instead: " . pcsx2IniFile.FileFullPath) cfg := " --cfg=""" . pcsx2IniFile.FileFullPath . """" cfgPathCLI := "" } } RLLog.Info("Module - " . (If cfgPathCLI != "" ? "Setting PCSX2's config path to """ . perGameINIPath.FileFullPath . """" : "Using PCSX2's default configuration folder: """ . pcsx2IniFolder.FileFullPath . """")) ; Update the aspect ratio if the user selected one. If AspectRatio { pcsx2Ini.Write(AspectRatio, "GSWindow", "AspectRatio") ; Write the aspect ratio value to the pcsx2Ini. } ; Update the GS plugin settings if hacks were selected. If userHacks { RLLog.Info("Module - UserHacks are being used. Updating GSdx.ini") pcsx2GSdxIni.Write(userHacks, "Settings", "UserHacks") pcsx2GSdxIni.Write(userHacks_MSAA, "Settings", "UserHacks_MSAA") pcsx2GSdxIni.Write(userHacks_SkipDraw, "Settings", "UserHacks_SkipDraw") pcsx2GSdxIni.Write(userHacks_HalfPixelOffset, "Settings", "UserHacks_HalfPixelOffset") pcsx2GSdxIni.Write(userHacks_WildHack, "Settings", "UserHacks_WildHack") pcsx2GSdxIni.Write(userHacks_unsafe_fbmask, "Settings", "UserHacks_unsafe_fbmask") pcsx2GSdxIni.Write(userHacks_AlphaStencil, "Settings", "UserHacks_AlphaStencil") pcsx2GSdxIni.Write(userHacks_align_sprite_X, "Settings", "UserHacks_align_sprite_X") pcsx2GSdxIni.Write(userHacks_AlphaHack, "Settings", "UserHacks_AlphaHack") pcsx2GSdxIni.Write(preload_frame_with_gs_data, "Settings", "preload_frame_with_gs_data") pcsx2GSdxIni.Write(userHacks_round_sprite_offset, "Settings", "UserHacks_round_sprite_offset") pcsx2GSdxIni.Write(userHacks_SpriteHack, "Settings", "UserHacks_SpriteHack") pcsx2GSdxIni.Write(userHacks_TCOffset, "Settings", "UserHacks_TCOffset") } Else { ; Make sure hacks are disabled. pcsx2GSdxIni.Write(UserHacks, "Settings", "UserHacks") } ; Memory Cards If (perGameMemCards = "true") { currentMemCard1 := pcsx2Ini.Read("MemoryCards", "Slot1_Filename") memCardPath := pcsx2Ini.Read("Folders", "MemoryCards") ; folder where memory cards are stored memCardPathLeft := StringUtils.SubStr(memCardPath,1,3) ; get left 3 characters memCardPathIsAbsolute := If (StringUtils.RegExMatch(memCardPathLeft, "[a-zA-Z]:\\") && (StringUtils.StringLength(memCardPath) >= 3)) ; this is 1 only when path looks like this "C:\" memCardPath := If memCardPathIsAbsolute ? memCardPath : emuPath . "\" . memCardPath ; if only a folder name is defined for the memory card path, tack on the emuPath to find the memory cards, otherwise leave the full path as is defaultMemCard := new File(memCardPath . "\default.ps2") ; defining default blank memory card for slot 1 RLLog.Info("Module - Default memory card for Slot 1 should be: " . defaultMemCard.FileFullPath) romMemCard1 := new File(memCardPath . "\" . romName . ".ps2") ; defining name for rom's memory card for slot 1 RLLog.Info("Module - Rom memory card for Slot 1 should be: " . romMemCard1.FileFullPath) RLLog.Info("Module - Current memory card inserted in PCSX2's ini in Slot 1 is: " . currentMemCard1.FileFullPath) If (currentMemCard1 != romName . ".ps2") { ; if current memory card in slot 1 does not match this romName, switch to one that does if exist or load a default one If !romMemCard1.Exist() ; first check if romName.ps2 memory card exists If !defaultMemCard.Exist() RLLog.Error("Module - A default memory card for Slot 1 was not found in """ . memCardPath . """. Please create an empty memory card called ""default.ps2"" in this folder for per-game memory card support.") Else { defaultMemCard.Copy(romMemCard1.FileFullPath) ; create a new blank memory card for this game RLLog.Info("Module - Creating a new blank memory card for this game in Slot 1: " . romMemCard1.FileFullPath) } pcsx2Ini.Write(romName . ".ps2", "MemoryCards", "Slot1_Filename") ; update the ini to use this rom's card RLLog.Info("Module - Switched memory card in Slot 1 to: " . romMemCard1.FileFullPath) } } hideEmuObj := Object(emuBootingWindow,0,emuGUIWindow,0,emuPrimaryWindow,1) 7z(romPath, romName, romExtension, SevenZExtractPath) pcsx2Ini := LoadProperties(pcsx2IniFile.FileFullPath) ; load the config into memory dvdSource := ReadProperty(pcsx2Ini,"CdvdSource") ; read value If (vdEnabled != "true" && romExtension = ".cue") { RLLog.Warning("Module - Virtual Drive is disabled but you supplied a .cue as your rom which is not supported by PCSX2") pcsx2GameVcd := new File(romPath . "\" . romName . ".vcd") pcsx2GameBin := new File(romPath . "\" . romName . ".bin") pcsx2GameCue := new File(romPath . "\" . romName . ".cue") pcsx2GameIso := new File(romPath . "\" . romName . ".iso") If pcsx2GameBin.Exist() { romExtension := ".bin" RLLog.Warning("Module - Found a .bin file with the same name as your cue, using it instead. Please change the order of your rom extensions if you want bins to be found first.") } Else If pcsx2GameIso.Exist() { romExtension := ".iso" RLLog.Warning("Module - Found a .iso file with the same name as your cue, using it instead. Please change the order of your rom extensions if you want isos to be found first.") } } ; Mount the CD using a Virtual Drive If vdOveride ; this allows per-game Virtual Drive support because some games boot to black when Virtual Drive is enabled vdEnabled := vdOveride If (vdEnabled = "true" && StringUtils.Contains(romExtension,"\.mds|\.mdx|\.b5t|\.b6t|\.bwt|\.ccd|\.cue|\.isz|\.nrg|\.cdi|\.iso|\.ape|\.flac")) { ; if Virtual Drive is enabled and using an image type Virtual Drive can load If !cdvd { vdCDVDPlugin := moduleIni.Read("Settings", "VD_CDVD_Plugin",,,1) If vdCDVDPlugin cdvd := vdCDVDPlugin } cdvd := If cdvd ? " --cdvd=""" . GetFullName(cdvd) . """" : "" If (dvdSource != "Plugin") { RLLog.Info("Module - CdvdSource was not set to ""Plugin"", changing it so PCSX2 can read from Virtual Drive.") WriteProperty(pcsx2Ini,"CdvdSource","Plugin") ; write a new value to the pcsx2IniFile SaveProperties(pcsx2IniFile.FileFullPath,pcsx2Ini) ; save pcsx2IniFile to disk } pcsx2cdvdIni := new IniFile(pcsx2IniFolder . "\cdvdGigaherz.ini") dvdDrive := pcsx2cdvdIni.Read("Config", "Source") ; cdvd drive If StringUtils.InStr(dvdDrive,"@") { If (vdDriveLetter != "") pcsx2cdvdIni.Write(vdDriveLetter, "Config", "Source") Else ScriptError("You are using a Virtual Drive but have not selected the drive you want to use in PCSX2 CDVD Plugin settings. Select your drive first, either in RLUI Virtual Drive Third Party Settings or within the PCSX2's plugin settings, then try launching again.") } Else If (dvdDrive != vdDriveLetter) { RLLog.Warning("Module - PCSX2 is set to use drive """ . dvdDrive . """ but RocketLauncher is set to use """ . vdDriveLetter . """. Ignore this warning if this is expected.") } VirtualDrive("mount",romPath . "\" . romName . romExtension) HideAppStart(hideEmuObj,hideEmu) errLvl := primaryExe.Run(" --usecd" . noGUI . Fullscreen . fullboot . nohacks . gamefixes . cfg . cfgPathCLI . gs . pad . spu2 . cdvd . usb . fw . dev9, "UseErrorLevel") usedVD := 1 ; tell the rest of the script to use VD methods } Else If StringUtils.Contains(romExtension,"\.iso|\.mdf|\.nrg|\.bin|\.img|\.gz|\.cso|\.cso|\.vcd\.cue.dump") ; the only formats PCSX2 supports loading directly { If !cdvd { imageCDVDPlugin := moduleIni.Read("Settings", "Image_CDVD_Plugin",,,1) If imageCDVDPlugin cdvd := imageCDVDPlugin } cdvd := If cdvd ? " --cdvd=""" . GetFullName(cdvd) . """" : "" If (dvdSource != "Iso") { RLLog.Info("Module - CdvdSource was not set to ""Iso"", changing it so PCSX2 can launch this " . romExtension . " image directly") WriteProperty(pcsx2Ini,"CdvdSource","Iso") ; write a new value to the pcsx2IniFile SaveProperties(pcsx2IniFile.FileFullPath,pcsx2Ini) ; save pcsx2IniFile to disk } HideAppStart(hideEmuObj,hideEmu) errLvl := primaryExe.Run(" """ . romPath . "\" . romName . romExtension . """ " . noGUI . Fullscreen . fullboot . nohacks . gamefixes . cfg . cfgPathCLI . gs . pad . spu2 . cdvd . usb . fw . dev9, "UseErrorLevel") } Else If StringUtils.Contains(romExtension,"\.bz2") ; special case format that requires plugin mode and pcsx2 loads it directly { If !cdvd { linuzCDVDPlugin := moduleIni.Read("Settings", "Linuz_CDVD_Plugin",,,1) If linuzCDVDPlugin cdvd := linuzCDVDPlugin } cdvd := If cdvd ? " --cdvd=""" . GetFullName(cdvd) . """" : "" If (dvdSource != "plugin") { RLLog.Info("Module - CdvdSource was not set to ""Plugin"", changing it so PCSX2 can launch this " . romExtension . " image directly") WriteProperty(pcsx2Ini,"CdvdSource","Plugin") ; write a new value to the pcsx2IniFile SaveProperties(pcsx2IniFile.FileFullPath,pcsx2Ini) ; save pcsx2IniFile to disk } oldHex := Registry.Read("HKEY_CURRENT_USER", "Software\PS2Eplugin\CDVD\CDVDiso", "IsoFile") ; read last used bz2 image newHex := StringUtils.StringToHex(romPath . "\" . romName . romExtension) ; convert new bz2 image path to hex i := 512 - StringUtils.StringLength(newHex) ; get total amount of 0's to add to end of hex to make it 512 bytes Loop % i newHex := newHex . "0" ; add required bytes to end If (oldHex != newHex) { RLLog.Info("Module - Writing new bz2 path to registry") Registry.Write("REG_BINARY", "HKEY_CURRENT_USER", "Software\PS2Eplugin\CDVD\CDVDiso", "IsoFile", newHex) ; write new bz2 path to registry } HideAppStart(hideEmuObj,hideEmu) errLvl := primaryExe.Run(" """ . romPath . "\" . romName . romExtension . """ " . noGUI . Fullscreen . fullboot . nohacks . gamefixes . cfg . cfgPathCLI . gs . pad . spu2 . cdvd . usb . fw . dev9, "UseErrorLevel") } Else ScriptError("You are trying to run a rom type of """ . romExtension . """ but PCSX2 only supports loading iso|mdf|nrg|bin|img|gz directly. Please turn on Virtual Drive and/or 7z support or put ""cue"" last in your rom extensions for " . MEmu . " instead.") If errLvl ScriptError("Error launching emulator, closing script.") emuPrimaryWindow.Wait() emuPrimaryWindow.WaitActive() BezelDraw() ; If (hideConsole = "true") { ; should not be needed anymore ; TimerUtils.SetTimerF("HidePCSX2Console", 10) ; SetTimerF("HidePCSX2Console", 10) ; emuBootingWindow.Set("Transparent",0) ; ,"Booting ahk_class wxWindowNR",,"fps:","fps:") ; hiding the console window ; emuGUIWindow.Set("Transparent",0) ;,"PCSX2 ahk_class wxWindowNR",,"fps:","fps:") ; hiding the GUI window with the menubar ; } SetTitleMatchMode 2 ; Wrong window might be detected in the next loop if we only use the class name for WinGetTitle so we will add fps to it Loop { ; Looping until pcsx2 is done loading game Sleep, 200 loopWinTitle := emuLoadingWindow.GetTitle(0) ; Excluding the title of the GUI window so we can read the title of the game window instead StringUtils.RegExMatch(loopWinTitle,"(?<=\()(.*?)(?=\))",winText) ;,1,0) ; Only get value between parenthesis If (winText > 0) { ; If FPS shows any value, break out RLLog.Debug("Module - Game is now running, waiting for exit") Break } If A_Index > 150 ; After 30 seconds, error out ScriptError("There was an error detecting when PCSX2 finished loading your game. Please report this so the module can be fixed.") ; Old method here in case devs change something back ; StringSplit, winTextSplit, winTitle, |, %A_Space% ; If (winTextSplit10 != "") ; 10th position in the array is empty until game actually starts ; Break ; tipText:= ; Loop % winTextSplit0 ; tipText .= "`nposition " . A_Index . ": " . winTextSplit%A_Index% ; ToolTip, % "Loop: " . A_Index . "`ntitle: " . winTitle . "`ntext: " . winText . tipText,0,0 } HideAppEnd(hideEmuObj,hideEmu) FadeInExit() primaryExe.Process("WaitClose") If usedVD VirtualDrive("unmount") 7zCleanUp() BezelExit() FadeOutExit() ExitModule() MultiGame: ; msgbox % "selectedRom = " . selectedRom . "`nselected game = " . currentButton . "`nmgRomPath = " . mgRomPath . "`nmgRomExt = " . mgRomExt . "`nmgRomName = " . mgRomName ; Unmount the CD from Virtual Drive If usedVD VirtualDrive("unmount") Sleep, 500 ; Required to prevent your Virtual Drive from bugging ; Mount the CD using Virtual Drive If usedVD VirtualDrive("mount",selectedRom) Return ; HidePCSX2Console: ; hideConsoleTimer++ ; If emuBootingWindow.Exist() ; { RLLog.Info("Module - HidePCSX2Console - Console window found, hiding it out of view.") ; emuBootingWindow.Set("Transparent",0) ; ,"Booting ahk_class wxWindowNR",,"fps:","fps:") ; hiding the console window ; emuGUIWindow.Set("Transparent",0) ; ,"PCSX2 ahk_class wxWindowNR",,"fps:","fps:") ; hiding the GUI window with the menubar ; SetTimer("HidePCSX2Console", "Off") ; } Else If (hideConsoleTimer >= 200) ; SetTimer("HidePCSX2Console", "Off") ; Return ; HidePCSX2Console() { ; Static hideConsoleTimer ; hideConsoleTimer++ ; If emuBootingWindow.Exist() ; { RLLog.Info("Module - HidePCSX2Console - Console window found, hiding it out of view.") ; emuBootingWindow.Set("Transparent",0) ; ,"Booting ahk_class wxWindowNR",,"fps:","fps:") ; hiding the console window ; emuGUIWindow.Set("Transparent",0) ; ,"PCSX2 ahk_class wxWindowNR",,"fps:","fps:") ; hiding the GUI window with the menubar ; TimerUtils.SetTimerF("HidePCSX2Console", "Off") ; } Else If (hideConsoleTimer >= 200) ; TimerUtils.SetTimerF("HidePCSX2Console", "Off") ; } CloseProcess: FadeOutStart() If (fullscreen = "true") { ; emuPrimaryWindow.CreateControl("wxWindowNR1") ; instantiate new control for wxWindowNR1 ; emuPrimaryWindow.GetControl("wxWindowNR1").Send("Esc") ; Send ESC to the main window when fullscreen is true to close the emu emuPrimaryWindow.Close() } Else { emuGUIWindow.MenuSelectItem("System","Pause") emuGUIWindow.Close() } ExitApp Return
L'émulateur PCSX2 pour PS2 est sorti, la version qui s’avère être la dernière
"release en date" est V2.6.3 voici v1.7.0-dev-1 [custom] stable
DISPONIBLE sur le site officiel à l'adresse suivante :
https://pcsx2.net/download/releases/windows/category/40-windows.html
Les créateurs de l'émulateur PCSX2 pour les jeux PlayStation 2 ont sorti sa première version «stable».
Cela a été annoncé le 8 mai par le magazine PC Gamer.
La publication note que les développeurs n'ont publié aucune mise à jour significative de PCSX2 depuis 2016. Cependant, il s'est avéré que le projet n'a pas été abandonné par eux, ils ont juste dû faire d'autres travaux liés à des corrections mineures.
TRACKLISTING GAMES SONY PS2
Available at:
"iso converted to gz compressed format"
Def Jam Fight For NY (USA) [Language En, Fr]:
Warriors, The (USA) [Language En, Fr]:
Capcom Classics Collection Vol. 1
Capcom Classics Collection Vol. 2
MEmu := "Demul"
MEmuV := "v0.7a 221215"
MURL := ["http://demul.emulation64.com/"]
MAuthor := ["djvj","bleasby"]
MVersion := "2.1.10"
MCRC :=
iCRC :=
MID := "636025126320548084"
MSystem := ["Cave 3rd","Gaelco","Gaelco 3D","Sammy Atomiswave","Sega System SP","Sega Dreamcast","Sega Hikaru","Sega Naomi","Sega Naomi 2"]
;----------------------------------------------------------------------------
; Notes:
; Required - control and nvram files setup for each game/control type
; Required - moduleName ini example can be found on GIT in the Demul module folder
; moduleName ini must be placed in same folder as this module if you use the provided example, just be sure to rename it to just Demul.ini first so it matches the module's name
; GDI images must match mame zip names and be extracted and have a .dat extension
; Rom_Extension should include 7z|zip|gdi|cue|cdi|chd|mds|ccd|nrg
; Module will automatically set your rom path for you on first launch
;
; Make sure the awbios, dc, hikaru, naomi, naomi2, saturn.zip bios archives are in any of your rom paths as they are needed to play all the games.
; Set your Video Plugin to gpuDX11 and set your desired resolution there
; In case your control codes do not match mine, set your desired control type in demul, then open the demul.ini and find section PORTB and look for the device key. Use this number instead of the one I provided
; gpuDX10 and gpuDX11 are the only supported plugins. You can define what plugin you want to use for each game in the module settings in RocketLauncherUI
; Read the tooltip for the Fullscreen module setting in RocketLauncherUI on how to control windowed fullscreen, true fullscreen, or windowed mode
; Windowed fullscreen will take effect the 2nd time you run the emu. It has to calculate your resolution on first run.
;
; Controls:
; Start a game of each control type (look in the RocketLauncherUI's module settings for these types, they all have their own tabs) and configure your controls to play the game. After configuring your controls manually in Demul, open padDemul.ini and Copy/paste the JAMMA0_0 and JAMMA0_1 (for naomi) or the ATOMISWAVE0_0 and ATOMISWAVE0_1 (for atomiswave) into RocketLauncherUI's module settings for each controls tab (standard, sfstyle, etc).
; Each pair of control tabs designates another real arcade control schema for a grouping of games. Demul does not handle this like MAME, so the module does instead.
;
; Gaelco:
; There is no known way to launch the desired Gaelco rom from CLI. You will always be presented with the rom selection window on launch.
; GPUDX11 does not yet support Gaelco in true fullscreen mode. Either use DX10 which does support fullscreen for Gaelco
; or if using DX11, choose fullscreen in the video options and then match the windows resolution to your desktop. This will give a pseudo fullscreen mode.
;
; Sega Hikaru:
; Windowed Fullscreen doesn't seem to work as demul does not allow stretching of its window
;
; Troubleshooting:
; For some reason demul's ini files can get corrupted and ahk can't read/write to them correctly.
; If your ini keys are not being read or not writing to their existing keys in the demul inis, create a new file and copy/paste everything from the old ini into the new one and save.
; If you use Fade_Out, the module will disable it. Demul crashes when Fade tries to draw on top of it in windowed and fullscreen modes.
;
;Bezel:
;If the game has the wrong aspect ratio, go to demul module settings, rom settings, and set the aspect ratio option to stretch. The game will follow the aspect ratio defined by the bezel.
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
ExtraFixedResBezelGUI()
FadeInStart()
primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object
emuPrimaryWindow := new Window(new WindowTitle("","window")) ; instantiate primary emulator window object
emuLCD0Window := new Window(new WindowTitle("LCD 0","LCD 0"))
-run=%2% -rom=%1%
sleep 4000
MouseMove, 1920,1080
; This object controls how the module reacts to different systems. Demul can play a few systems, but needs to know what system you want to run, so this module has to adapt.
mType := Object("Cave 3rd","cave3rd","Gaelco","gaelco","Gaelco 3D","gaelco","Sammy Atomiswave","awave","Sega System SP","naomi","Sega Dreamcast","dc","Sega Hikaru","hikaru","Sega Naomi","naomi","Sega Naomi 2","naomi2","Demul Gun Games","awave")
ident := mType[systemName] ; search object for the systemName identifier Demul uses
If !ident
ScriptError("Your systemName is: " . systemName . "`nIt is not one of the known supported systems for this Demul module: " . moduleName)
DemuleIni := new IniFile(emuPath . "\Demul.ini")
demuleIniEncoding := RLObject.getFileEncoding(DemuleIni.FileFullPath)
If demuleIniEncoding {
If (demuleIniEncoding = "ERROR")
RLLog.Warning("Module - Demul.ini set to Read-only and BOM cannot be changed. Check the DLL log for further details: " . DemuleIni.FileFullPath)
Else {
RLLog.Info("Module - Recreating " . DemuleIni.FileFullPath . " as ANSI because UTF-8 format cannot be read")
If RLObject.removeBOM(DemuleIni.FileFullPath)
RLLog.Info("Module - Successfully converted " . DemuleIni.FileFullPath . " to ANSI")
Else
RLLog.Error("Module - Failed to convert " . DemuleIni.FileFullPath . " to ANSI")
}
}
maxHideTaskbar := moduleIni.Read("Settings", "MaxHideTaskbar", "true",,1)
controllerCode := moduleIni.Read("Settings", "ControllerCode", "16777216",,1)
mouseCode := moduleIni.Read("Settings", "MouseCode", "131072",,1)
keyboardCode := moduleIni.Read("Settings", "KeyboardCode", "1073741824",,1)
lightgunCode := moduleIni.Read("Settings", "LightgunCode", "-2147483648",,1)
hideDemulGUI := moduleIni.Read("Settings", "HideDemulGUI", "true",,1)
PerGameMemoryCards := moduleIni.Read("Settings", "PerGameMemoryCards", "true",,1)
memCardPath := moduleIni.Read("Settings", "MemCardPath", emuPath . "\memsaves",,1)
memCardPath := AbsoluteFromRelative(emuPath, memCardPath)
fullscreen := moduleIni.Read(romName . "|Settings", "Fullscreen", "windowedfullscreen",,1)
plugin := moduleIni.Read(romName . "|Settings", "Plugin", "gpuDX11",,1)
shaderUsePass1 := moduleIni.Read(romName . "|Settings", "ShaderUsePass1", "false",,1)
shaderUsePass2 := moduleIni.Read(romName . "|Settings", "ShaderUsePass2", "false",,1)
shaderNamePass1 := moduleIni.Read(romName . "|Settings", "ShaderNamePass1",,,1)
shaderNamePass2 := moduleIni.Read(romName . "|Settings", "ShaderNamePass2",,,1)
listSorting := moduleIni.Read(romName . "|Settings", "ListSorting", "true",,1)
OpaqueMod := moduleIni.Read(romName . "|Settings", "OModifier", "true",,1)
TransMod := moduleIni.Read(romName . "|Settings", "TModifier", "true",,1)
internalResolutionScale := moduleIni.Read(romName . "|Settings", "InternalResolutionScale", "1",,1)
videomode := moduleIni.Read(romName . "|Settings", "VideoMode", "0",,1)
aspectRatio := moduleIni.Read(romName . "|Settings", "AspectRatio", "1",,1)
MaxLayers := moduleIni.Read(romName . "|Settings", "MaxLayers", "32",,1)
demulShooterEnabled := moduleIni.Read(romName . "|Settings", "DemulShooterEnabled", "false",,1)
showVMU := moduleIni.Read("Settings", "showVMU", "true",,1)
VMU1Pos := moduleIni.Read("Settings", "VMU1Pos", "topLeft",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter
VMU2Pos := moduleIni.Read("Settings", "VMU2Pos", "topRight",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter
VMU3Pos := moduleIni.Read("Settings", "VMU3Pos", "bottomLeft",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter
VMU4Pos := moduleIni.Read("Settings", "VMU4Pos", "bottomRight",,1) ; topRight, topCenter, topLeft, leftCenter, bottomLeft, bottomCenter, bottomRight, rightCenter
VMUHideKey := moduleIni.Read("Settings", "VMUHideKey","F10",,1)
Bios := moduleIni.Read(romName, "Bios",,,1)
LoadDecrypted := moduleIni.Read(romName, "LoadDecrypted",,,1) ; not currently supported
; Read all the control values
controls := moduleIni.Read(romname, "Controls", "standard",,1) ; have to read this first so the below ini reads work
push1_0 := moduleIni.Read(controls . "_JAMMA0_0", "push1",,,1)
push2_0 := moduleIni.Read(controls . "_JAMMA0_0", "push2",,,1)
push3_0 := moduleIni.Read(controls . "_JAMMA0_0", "push3",,,1)
push4_0 := moduleIni.Read(controls . "_JAMMA0_0", "push4",,,1)
push5_0 := moduleIni.Read(controls . "_JAMMA0_0", "push5",,,1)
push6_0 := moduleIni.Read(controls . "_JAMMA0_0", "push6",,,1)
push7_0 := moduleIni.Read(controls . "_JAMMA0_0", "push7",,,1)
push8_0 := moduleIni.Read(controls . "_JAMMA0_0", "push8",,,1)
service_0 := moduleIni.Read(controls . "_JAMMA0_0", "SERVICE",,,1)
start_0 := moduleIni.Read(controls . "_JAMMA0_0", "START",,,1)
coin_0 := moduleIni.Read(controls . "_JAMMA0_0", "COIN",,,1)
digitalup_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALUP",,,1)
digitaldown_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALDOWN",,,1)
digitalleft_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALLEFT",,,1)
digitalright_0 := moduleIni.Read(controls . "_JAMMA0_0", "DIGITALRIGHT",,,1)
analogup_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGUP",,,1)
analogdown_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGDOWN",,,1)
analogleft_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGLEFT",,,1)
analogright_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGRIGHT",,,1)
analogup2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGUP2",,,1)
analogdown2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGDOWN2",,,1)
analogleft2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGLEFT2",,,1)
analogright2_0 := moduleIni.Read(controls . "_JAMMA0_0", "ANALOGRIGHT2",,,1)
push1_1 := moduleIni.Read(controls . "_JAMMA0_1", "push1",,,1)
push2_1 := moduleIni.Read(controls . "_JAMMA0_1", "push2",,,1)
push3_1 := moduleIni.Read(controls . "_JAMMA0_1", "push3",,,1)
push4_1 := moduleIni.Read(controls . "_JAMMA0_1", "push4",,,1)
push5_1 := moduleIni.Read(controls . "_JAMMA0_1", "push5",,,1)
push6_1 := moduleIni.Read(controls . "_JAMMA0_1", "push6",,,1)
push7_1 := moduleIni.Read(controls . "_JAMMA0_1", "push7",,,1)
push8_1 := moduleIni.Read(controls . "_JAMMA0_1", "push8",,,1)
service_1 := moduleIni.Read(controls . "_JAMMA0_1", "SERVICE",,,1)
start_1 := moduleIni.Read(controls . "_JAMMA0_1", "START",,,1)
coin_1 := moduleIni.Read(controls . "_JAMMA0_1", "COIN",,,1)
digitalup_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALUP",,,1)
digitaldown_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALDOWN",,,1)
digitalleft_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALLEFT",,,1)
digitalright_1 := moduleIni.Read(controls . "_JAMMA0_1", "DIGITALRIGHT",,,1)
analogup_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGUP",,,1)
analogdown_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGDOWN",,,1)
analogleft_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGLEFT",,,1)
analogright_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGRIGHT",,,1)
analogup2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGUP2",,,1)
analogdown2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGDOWN2",,,1)
analogleft2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGLEFT2",,,1)
analogright2_1 := moduleIni.Read(controls . "_JAMMA0_1", "ANALOGRIGHT2",,,1)
;Bezel settings
bezelTopOffset := moduleIni.Read(romName . "|Settings", "Bezel_Top_Offset","0",,1)
bezelBottomOffset := moduleIni.Read(romName . "|Settings", "Bezel_Bottom_Offset","0",,1)
bezelRightOffset := moduleIni.Read(romName . "|Settings", "Bezel_Right_Offset", "0",,1)
bezelLeftOffset := moduleIni.Read(romName . "|Settings", "Bezel_Left_Offset", "0",,1)
If (plugin = "gpuDX11ng") ; this is for legacy support. Original demul 0.7 used gpuDX11ng
plugin := "gpuDX11old"
If (InStr(systemName, "Hikaru") && plugin != "gpuDX11")
plugin := "gpuDX11" ; Hikaru does not work with gpuDX10 gpu plugin, setting it dumps an error
; Verify user set desired gpu plugin name correctly
If (plugin != "gpuDX11old" && plugin != "gpuDX11" && plugin != "gpuDX10" && plugin != "")
ScriptError(plugin . " is not a supported gpu plugin.`nLeave the plugin blank to use the default ""gpuDX11"".`nValid options are gpuDX11old, gpuDX11 or gpuDX10.")
; Read and write videomode value for cable type
rvideomode := DemuleIni.Read("main", "videomode")
RLLog.Info("Module - Demul is reading the config with videomode = " . rvideomode)
DemuleIni.Write(videomode, "main", "videomode")
RLLog.Info("Module - Demul is updating the config with videomode = " . videomode)
; Handle Demul's rom paths so the user doesn't have to
romPathCount := DemuleIni.Read("files", "romsPathsCount")
RLLog.Info("Module - Demul is configured with " . romPathCount . " rom path(s). Scanning these for a romPath to this rom.")
Loop % romPathCount
{ demulRomPath := A_Index - 1 ; rompaths in demul start with 0
path%A_Index% := DemuleIni.Read("files", "roms" . demulRomPath)
RLLog.Info("Module - Path" . demulRomPath . ": " . path%A_Index%)
; msgbox % path%A_Index%
If (path%A_Index% = romPath . "\") ; demul tacks on the backslash at the end
{ romPathFound := 1 ; flag that demul has this romPath in its config and no need to add it
RLLog.Info("Module - Stopping search because Demul is already configured with the correct romPath to this rom: " . path%A_Index%)
Break ; stop looking for a correct romPath
}
}
If !romPathFound ; if demul doesn't have the romPath in its ini, add it
{ RLLog.Warning("Module - Demul does not have this romPath in Demul.ini, adding it for you.")
nextPath := romPathCount + 1 ; add 1 to the romPathCount and write that to the ini
DemuleIni.Write(nextPath, "files", "romsPathsCount")
DemuleIni.Write(romPath . "\", "files", "roms" . romPathCount) ; write the rompath to the ini
}
; Force Fade_Out to disabled as it causes demul to not close properly
; fadeOut = false
; RLLog.Warning("Module - Turning off Fade_Out because it doesn't let Demul exit properly.")
GpuIni := new IniFile(emuPath . "\" . plugin . ".ini")
GpuIni.CheckFile("Please run Demul manually first and select the " . plugin . " gpu plugin so it creates this file for you: " . GpuIni.FileFullPath)
demulFileEncoding := RLObject.getFileEncoding(GpuIni.FileFullPath)
If demulFileEncoding {
If (demulFileEncoding = "ERROR")
RLLog.Warning("Module - GPU ini set to Read-only and BOM cannot be changed. Check the DLL log for further details: " . GpuIni.FileFullPath)
Else {
RLLog.Info("Module - Recreating " . GpuIni.FileFullPath . " as ANSI because UTF-8 format cannot be read")
If RLObject.removeBOM(GpuIni.FileFullPath)
RLLog.Info("Module - Successfully converted " . GpuIni.FileFullPath . " to ANSI")
Else
RLLog.Error("Module - Failed to convert " . GpuIni.FileFullPath . " to ANSI")
}
}
BezelStart()
; Setting emu resolution if bezel is enabled
If (BezelPath)
{ If (plugin = "gpuDX11" || plugin = "gpuDX11old") {
GpuIni.Write(bezelScreenWidth, "resolution", "Width")
GpuIni.Write(bezelScreenHeight, "resolution", "Height")
} Else {
GpuIni.Write(bezelScreenWidth, "resolution", "wWidth")
GpuIni.Write(bezelScreenHeight, "resolution", "wHeight")
}
}
; This updates the DX11gpu ini file to turn List Sorting on or off. Depending on the games, turning this on for some games may remedy missing graphics, having it off on other games may fix corrupted graphics. Untill they improve the DX11gpu, this is the best it's gonna get.
If (ListSorting = "true")
GpuIni.Write(0, "main", "AutoSort")
Else
GpuIni.Write(1, "main", "AutoSort")
; This will set the Opaque or Trans modifier for each game
If (OpaqueMod = "true")
GpuIni.Write(0, "main", "OModifier")
Else
GpuIni.Write(1, "main", "OModifier")
If (TransMod = "true")
GpuIni.Write(0, "main", "TModifier")
Else
GpuIni.Write(1, "main", "TModifier")
; This updates the DX10gpu or DX11gpu ini file to the ratio and scale you want to use for this game
GpuIni.Write(aspectRatio, "main", "aspect")
GpuIni.Write(InternalResolutionScale, "main", "scaling")
If (plugin = "gpuDX11" || plugin = "gpuDX11old") {
GpuIni.Write(MaxLayers, "main", "MaxLayers")
}
; This updates the demul.ini with your gpu plugin choice for the selected rom
DemuleIni.Write(plugin . ".dll", "plugins", "gpu")
; This updates the demul.ini with your VMU display choice
VMUscreendisable := If (showVMU = "true") ? "false" : "true"
DemuleIni.Write(VMUscreendisable, "main", "VMUscreendisable")
; Shader Effects
Loop, 2 {
shaderUsePass%A_Index% := If (ShaderUsePass%A_Index% != "" and ShaderUsePass%A_Index% != "ERROR" ? (ShaderUsePass%A_Index%) : (GlobalShaderUsePass%A_Index%)) ; determine what shaderUsePass to use
currentusePass%A_Index% := GpuIni.Read("shaders", "usePass" . A_Index)
If (shaderUsePass%A_Index% = "true")
{
shaderNamePass%A_Index% := If (ShaderNamePass%A_Index% != "" and ShaderNamePass%A_Index% != "ERROR" ? (ShaderNamePass%A_Index%) : (GlobalShaderNamePass%A_Index%)) ; determine what shaderNamePass to use
If !StringUtils.Contains(shaderNamePass%A_Index%,"FXAA|HDR-TV|SCANLINES|CARTOON|RGB DOT\(MICRO\)|RGB DOT\(TINY\)|BLUR")
ScriptError(shaderNamePass%A_Index% . " is not a valid choice for a shader. Your options are FXAA, HDR-TV, SCANLINES, CARTOON, RGB DOT(MICRO), RGB DOT(TINY), or BLUR.")
If (currentusePass%A_Index% = 0)
GpuIni.Write(1, "shaders", "usePass" . A_Index) ; turn shader on in gpuDX11 ini
GpuIni.Write(shaderNamePass%A_Index%, "shaders", "shaderPass" . A_Index) ; update gpuDX11 ini with the shader name to use
}Else If (shaderUsePass%A_Index% != "true" and currentusePass%A_Index% = 1)
GpuIni.Write(0, "shaders", "usePass" . A_Index) ; turn shader off in gpuDX11 ini
}
If (ident = "dc")
{
7z(romPath, romName, romExtension, sevenZExtractPath)
defaultIni := "[main]`r`nimageFileName = `r`nopenDialog = false"
If (romExtension = ".cdi" || romExtension = ".mds" || romExtension = ".ccd" || romExtension = ".nrg" || romExtension = ".gdi" || romExtension = ".cue") {
GdrImageIni := new IniFile(emuPath . "\gdrImage.ini")
If !GdrImageIni.Exist() {
GdrImageIni.Append(defaultIni) ; Create a default gdrImage.ini in your emu folder if one does not exist already.
; GdrImageIni.Delete(gdrImageFile) ; don't know why this was in the old module, no point in deleting the file I just made
}
TimerUtils.Sleep(500)
DemuleIni.Write("gdrImage.dll", "plugins", "gdr")
GdrImageIni.Write("false", "Main", "openDialog")
GdrImageIni.Write(romPath . "\" . romName . romExtension, "Main", "imagefilename")
} Else If (romExtension = ".chd")
{
GdrCHDIni := new IniFile(emuPath . "\gdrCHD.ini")
If !GdrCHDIni.Exist() {
GdrCHDIni.Append(defaultIni) ; Create a default gdrCHD.ini in your emu folder if one does not exist already.
; GdrCHDIni.Delete(gdrCHDFile) ; don't know why this was in the old module, no point in deleting the file I just made
}
TimerUtils.Sleep(500)
GdrCHDIni.Write("false", "Main", "openDialog")
DemuleIni.Write("gdrCHD.dll", "plugins", "gdr")
GdrCHDIni.Write(romPath . "\" . romName . romExtension, "Main", "imagefilename")
} Else
ScriptError(romExtension . " is not a supported file type for this " . moduleName . " module.")
DemuleIni.Write(1, "main", "region") ; Set BIOS to Auto Region
} Else { ; all other systems, Naomi and Atomiswave
; This updates the demul.ini with your Bios choice for the selected rom
If (Bios != "" && Bios != "ERROR") {
Bios := StringUtils.RegExReplace(Bios,"\s.*") ; Cleans off the added text from the key's value so only the number is left
DemuleIni.Write("false", "main", "naomiBiosAuto") ; turning auto bios off so we can use a specific one instead
DemuleIni.Write(Bios, "main", "naomiBios") ; setting specific bios user has set from the moduleName ini
} Else
DemuleIni.Write("true", "main", "naomiBiosAuto") ; turning auto bios on if user did not specify a specific one
}
; This section writes your custom keys to the padDemul.ini. Naomi games had many control panel layouts. The only way we can accomodate these differing controls, is to keep track of them all and write them to the ini at the launch of each game.
; First we check if the last controls used are the same as the game we want to play, so we don't waste time updating the ini if it is not necessary. For example playing 2 sfstyle type games in a row, we wouldn't need to write to the ini.
; This section tells demul what arcade control type should be connected to the game. Options are standard (aka controller), mouse, lightgun, or keyboard
If (controls = "lightgun" || controls = "mouse") {
RLLog.Info("Module - This game uses a Mouse or Lightgun control type.")
DemuleIni.Write(MouseCode, "PORTB", "device")
} Else If (controls = "keyboard") {
RLLog.Info("Module - This game uses a Keyboard control type.")
DemuleIni.Write(KeyboardCode, "PORTB", "device")
} Else { ; accounts for all other control types
RLLog.Info("Module - This game uses a standard (controller) control type.")
DemuleIni.Write(ControllerCode, "PORTB", "device")
}
WriteControls(0,push1_0,push2_0,push3_0,push4_0,push5_0,push6_0,push7_0,push8_0,SERVICE_0,START_0,COIN_0,DIGITALUP_0,DIGITALDOWN_0,DIGITALLEFT_0,DIGITALRIGHT_0,ANALOGUP_0,ANALOGDOWN_0,ANALOGLEFT_0,ANALOGRIGHT_0,ANALOGUP2_0,ANALOGDOWN2_0,ANALOGLEFT2_0,ANALOGRIGHT2_0)
WriteControls(1,push1_1,push2_1,push3_1,push4_1,push5_1,push6_1,push7_1,push8_1,SERVICE_1,START_1,COIN_1,DIGITALUP_1,DIGITALDOWN_1,DIGITALLEFT_1,DIGITALRIGHT_1,ANALOGUP_1,ANALOGDOWN_1,ANALOGLEFT_1,ANALOGRIGHT_1,ANALOGUP2_1,ANALOGDOWN2_1,ANALOGLEFT2_1,ANALOGRIGHT2_1)
RLLog.Info("Module - Wrote " . controls . " controls to padDemul.ini.")
; This will check the save game files and create per game ones if enabled.
If (PerGameMemoryCards = "true")
{
MemCardFolder := new Folder(memCardPath)
DefaultMemCard := new File(memCardPath . "\default_vms.bin") ; defining default blank VMU file
If !DefaultMemCard.Exist("Folder")
DefaultMemCard.CreateDir() ; create memcard folder if it doesn't exist
If defaultMemCard.Exist()
{
RLLog.Info("VMU - Default VMU file location - " . defaultMemCard.FileFullPath)
Loop, 4
{
outerLoop := A_Index
If (A_Index = 1)
contrPort := "A"
Else If (A_Index = 2)
contrPort := "B"
Else If (A_Index = 3)
contrPort := "C"
Else If (A_Index = 4)
contrPort := "D"
controllerPort%contrPort% := DemuleIni.Read("PORT" . contrPort, "device")
RLLog.Info("VMU - Config for controller PORT" . contrPort . " = " . controllerPort%contrPort%)
If (controllerPort%contrPort% = -1)
Continue
Loop, 2
{
SubCount := A_Index - 1
VMUPort%SubCount% := DemuleIni.Read("PORT" . contrPort, "port" . SubCount)
RLLog.Info("VMU - Config Plugin VMUPort" . contrPort . SubCount . " for controller PORT" . contrPort . " = " . VMUPort%SubCount%)
If (VMUPort%SubCount% <> -1)
{
VMUPortFile%SubCount% := DemuleIni.Read("VMS", "VMS" . contrPort . SubCount)
RLLog.Info("VMU - VMUPortFile" . contrPort . SubCount . " controllerVMU" . contrPort . SubCount . " " . "VMS" . contrPort . SubCount . " = " . VMUPortFile%SubCount%)
memCardName := If romTable[1,5] ? romTable[1,4] : romName ; defining rom name for multi disc rom
PerGameVMUBin%A_Index% := new File(memCardPath . "\" . memCardName . "_vms_" . contrPort . SubCount . ".bin")
RLLog.Info("VMU - PerGameVMUBin = " . PerGameVMUBin%A_Index%.FileFullPath)
If PerGameVMUBin%A_Index%.Exist()
{
RLLog.Info("VMU - PerGameVMU file exists at " . PerGameVMUBin%A_Index%.FileFullPath)
} Else {
RLLog.Info("VMU - PerGameVMU file does not exist. So we will create one at " . PerGameVMUBin%A_Index%.FileFullPath)
DefaultMemCard.Copy(PerGameVMUBin%A_Index%.FileFullPath)
}
DemuleIni.Write(PerGameVMUBin%A_Index%.FileFullPath, "VMS", "VMS" . contrPort . SubCount)
RLLog.Info("VMU - PerGameVMU file written to " . DemuleIni.FileFullPath . " at section VMS to variable VMS" . contrPort . SubCount . " as " . PerGameVMUBin%A_Index%.FileFullPath)
} Else {
RLLog.Info("VMU - No VMU Plugged In.")
}
}
}
} Else {
RLLog.Info("VMU - No default VMU file at " . DefaultMemCard.FileFullPath)
}
}
; Setting demul to use true fullscreen if defined in settings.ini, otherwise sets demul to run windowed. This is for gpuDX11 plugin only
If (plugin = "gpuDX11" || plugin = "gpuDX11old")
If (fullscreen = "truefullscreen")
GpuIni.Write(1, "main", "UseFullscreen")
Else
GpuIni.Write(0, "main", "UseFullscreen")
If (fullscreen = "windowedfullscreen")
{
If (plugin = "gpuDX11" || plugin = "gpuDX11old") {
GpuIni.Write(appWidthNew, "resolution", "Width")
GpuIni.Write(appHeightNew, "resolution", "Height")
} Else {
GpuIni.Write(appWidthNew, "resolution", "wWidth")
GpuIni.Write(appHeightNew, "resolution", "wHeight")
}
If (maxHideTaskbar = "true") {
RLLog.Info("Module - Hiding Taskbar and Start Button.")
MiscUtils.TaskBar("off")
}
; Create black background to give the emu the fullscreen look
RLLog.Info("Module - Creating black background to simulate a fullscreen look.")
Gui demulGUI: -Caption +ToolWindow +0x08000000
Gui demulGUI: Color, Black
Gui demulGUI: Show, x0 y0 h%A_ScreenHeight% w%A_ScreenWidth%
}
If (ident != "dc" && demulShooterEnabled = "true") { ; If demulshooter is enabled for this game, launch it with relevant options
DemulShooterExe := New DemulShooter()
DemulShooterExe.Launch("demul07a",romName,"-noresize")
}
TimerUtils.Sleep(250)
; Construct the CLI for demul and send romName if naomi or atomiswave. Dreamcast needs a full path and romName.
If (LoadDecrypted = "true") ; decrypted naomi rom
romCLI := "-customrom=" . """" . romPath . "\" . romName . ".bin"""
Else If (ident = "dc") ; dreamcast game
romCLI := " -image=" . """" . romPath . "\" . romName . romExtension . """"
Else ; standard naomi rom
romCLI := "-rom=" . romName
hideEmuObj := Object(emuLCD0Window,0,emuPrimaryWindow,1)
HideAppStart(hideEmuObj,hideEmu)
primaryExe.Run(" -run=" . ident . " " . romCLI, (If hideDemulGUI = "true" ? "min" : "")) ; launching minimized, then restoring later hides the launch completely
TimerUtils.Sleep(1000) ; Need a second for demul to launch, increase if yours takes longer and the emu is NOT appearing and staying minimized. This is required otherwise bezel backgrounds do not appear
DetectHiddenWindows, On
If (hideDemulGUI = "true")
{
emuPrimaryWindow.Restore()
emuPrimaryWindow.Activate()
}
RLLog.Info("Module - Waiting for Demul to finish loading game.")
winTextSplit := []
Loop { ; looping until demul is done loading rom and gpu starts showing frames
TimerUtils.Sleep(200,0)
winTitle := emuPrimaryWindow.GetTitle(0) ; do not update the wintitle otherwise emu won't close on exit
winTextSplit := StringUtils.Split(winTitle, A_Space)
If (winTextSplit[5] = "gpu:" And winTextSplit[6] != "0" And winTextSplit[6] != "1")
Break
}
RLLog.Info("Module - Demul finished loading game.")
If (StringUtils.Contains(systemName, "Gaelco|Hikaru") && fullscreen = "truefullscreen")
KeyUtils.Send("!{Enter}") ; Automatic fullscreen seems to be broken in the Gaelco driver, must alt+Enter to get fullscreen
; This is where we calculate and maximize demul's window using our pseudo fullscreen code
If (fullscreen = "windowedfullscreen")
{
emuPrimaryWindow.Maximize() ; this will take effect after you run demul once because we cannot stretch demul's screen while it is running.
}
BezelDraw()
If (showVMU = "true"){
ExtraFixedResBezel := new Window(new WindowTitle("ahk_ID " . extraFixedRes_Bezel_hwnd))
SetTimer, CheckforVMU, 5000
}
HideAppEnd(hideEmuObj,hideEmu)
FadeInExit()
primaryExe.Process("WaitClose")
If (fullscreen = "windowedfullscreen")
{ Gui demulGUI: Destroy
RLLog.Info("Module - Destroyed black gui background.")
}
If (ident = "dc")
7zCleanUp()
BezelExit()
ExtraFixedResBezelExit()
FadeOutExit()
If (fullscreen = "windowedfullscreen" && maxHideTaskbar = "true") {
RLLog.Info("Module - Showing Taskbar and Start Button.")
MiscUtils.TaskBar("on")
}
ExitModule()
; Write new controls to padDemul.ini
WriteControls(player,push1,push2,push3,push4,push5,push6,push7,push8,service,start,coin,digitalup,digitaldown,digitalleft,digitalright,analogup,analogdown,analogleft,analogright,analogup2,analogdown2,analogleft2,analogright2) {
Global PadIni
PadIni.Write(push1, "JAMMA0_" . player, "PUSH1")
PadIni.Write(push2, "JAMMA0_" . player, "PUSH2")
PadIni.Write(push3, "JAMMA0_" . player, "PUSH3")
PadIni.Write(push4, "JAMMA0_" . player, "PUSH4")
PadIni.Write(push5, "JAMMA0_" . player, "PUSH5")
PadIni.Write(push6, "JAMMA0_" . player, "PUSH6")
PadIni.Write(push7, "JAMMA0_" . player, "PUSH7")
PadIni.Write(push8, "JAMMA0_" . player, "PUSH8")
PadIni.Write(service, "JAMMA0_" . player, "SERVICE")
PadIni.Write(start, "JAMMA0_" . player, "START")
PadIni.Write(coin, "JAMMA0_" . player, "COIN")
PadIni.Write(digitalup, "JAMMA0_" . player, "DIGITALUP")
PadIni.Write(digitaldown, "JAMMA0_" . player, "DIGITALDOWN")
PadIni.Write(digitalleft, "JAMMA0_" . player, "DIGITALLEFT")
PadIni.Write(digitalright, "JAMMA0_" . player, "DIGITALRIGHT")
PadIni.Write(analogup, "JAMMA0_" . player, "ANALOGUP")
PadIni.Write(analogdown, "JAMMA0_" . player, "ANALOGDOWN")
PadIni.Write(analogleft, "JAMMA0_" . player, "ANALOGLEFT")
PadIni.Write(analogright, "JAMMA0_" . player, "ANALOGRIGHT")
PadIni.Write(analogup2, "JAMMA0_" . player, "ANALOGUP2")
PadIni.Write(analogdown2, "JAMMA0_" . player, "ANALOGDOWN2")
PadIni.Write(analogleft2, "JAMMA0_" . player, "ANALOGLEFT2")
PadIni.Write(analogright2, "JAMMA0_" . player, "ANALOGRIGHT2")
}
HaltEmu:
If (fullscreen = "truefullscreen")
KeyUtils.Send("!{Enter}")
If VMUHideKey
XHotKeywrapper(VMUHideKey,"VMUHide","OFF")
Return
RestoreEmu:
If (fullscreen = "truefullscreen")
KeyUtils.Send("!{Enter}")
If (showVMU = "true") {
Loop, 4
{ VMUWindow%A_Index%.Set("Transparent", 0)
VMUWindow%A_Index%.Activate()
VMUWindow%A_Index%.Set("AlwaysOnTop", "On")
ExtraFixedResBezel.Set("AlwaysOnTop", "On")
If !(VMUHidden)
VMUWindow%A_Index%.Set("Transparent", "off")
}
emuPrimaryWindow.Activate()
}
If VMUHideKey
XHotKeywrapper(VMUHideKey,"VMUHide","ON")
Return
HideGUIWindow:
emuPrimaryWindow.Set("Transparent", "On")
emuPrimaryWindow.Activate() ; once activated, demul starts loading the rom
Return
CheckforVMU:
Loop, 4
{ Transform, letter, Chr, % A_Index + asc("A") - 1 ; transform number to letter
If ((!(VMUWindow%A_Index%)) and (VMUScreenID%A_Index%:=WinExist("PORT " . letter . " VMU 0 ahk_class PORT " . letter . " VMU 0")))
{ VMUWindow%A_Index% := new Window(new WindowTitle("ahk_ID " . VMUScreenID%A_Index%))
VMUWindow%A_Index%.Set("Transparent", 0)
ExtraFixedResBezelDraw(VMUScreenID%A_Index%, "VMU",VMU%A_Index%Pos, 144, 96, 8, 8, 28, 😎
VMUWindow%A_Index%.Activate()
VMUWindow%A_Index%.Set("AlwaysOnTop", "On")
ExtraFixedResBezel.Set("AlwaysOnTop", "On")
VMU%A_Index%Draw := true
If !(VMUHidden)
VMUWindow%A_Index%.Set("Transparent", "off")
If !(VMULoaded){
VMUHideKey := xHotKeyVarEdit(VMUHideKey,"VMUHideKey","~","Add")
xHotKeywrapper(VMUHideKey,"VMUHide")
VMULoaded := true
}
emuPrimaryWindow.Activate()
}
}
If ((VMU1Draw) and (VMU2Draw) and (VMU3Draw) and (VMU4Draw))
SetTimer, CheckforVMU, off
Return
VMUHide:
If VMUHidden {
Loop, 4
VMUWindow%a_index%.Set("Transparent", "off")
UpdateLayeredWindow(extraFixedRes_Bezel_hwnd, extraFixedRes_Bezel_hdc,0,0, A_ScreenWidth, A_ScreenHeight,255)
VMUHidden := false
} Else {
Loop, 4
VMUWindow%a_index%.Set("Transparent", 0)
UpdateLayeredWindow(extraFixedRes_Bezel_hwnd, extraFixedRes_Bezel_hdc,0,0, A_ScreenWidth, A_ScreenHeight,0)
VMUHidden := true
}
Return
CloseProcess:
FadeOutStart()
If (demulShooterEnabled = "true") {
DemulShooterExe.Close()
}
emuPrimaryWindow.PostMessage("0x111", "40085") ; Stop emulation first for a clean exit
TimerUtils.Sleep(5) ; just like to give a little time before closing
emuPrimaryWindow.PostMessage("0x111", "40080") ; Exit
~Escape::
Process, Close, demul.exe
ExitAPP
return