MEmu = ePSXe
MEmuV = v2.0.0
MURL =
http://www.epsxe.com/" onclick="window.open(this.href);return false;
MAuthor = djvj,Shateredsoul,brolly,robbforce (ePSXe v2.0 updates and GamepadType modifications by slizzap)
MVersion = 2.1.4
MCRC = 1F6DC70F
iCRC = 97B121A8
MID = 635038268888210842
MSystem = "Sony PlayStation"
;----------------------------------------------------------------------------
; Notes:
; epsxe can't deal with bin/cue dumps with more than one audio track if you load the cue file directly.
; For these to work you must mount the cue on Virtual Drive and let epsxe boot the game from there.
; You need to make sure you have a SCSI virtual drive on Daemon Tools, NOT a DT one.
; On first time use, 2 default memory card files will be created called _default_001.mcr and _default_002.mcr in emuPath\memcards
;
; Extract all your BIOS files to the bios subfolder. Then goto Config->Bios and select the bios you wish to use.
;
; Go to Config->Video then choose a plugin. Pete's OpenGL line is preferred
; Click Configure (under video plugin) and choose fullscreen and set your desired resolution. Video options/results will vary based on the plugin you choose.
;
; If you are using images with multiple tracks, set your extension to cue (make sure all your cues are correctly pointing to their tracks).
; Go to Config->Cdrom->Configure button and select the drive letter associated with your Virtual Drive virtual drive.
;
; ePSXe will ONLY close via Escape, it will bug out with all other forms of closing a normal program. Do not edit CloseProcess!
;
; Requires at least Libs\Shared.ahk v1.1.3
;
; ePSXe stores its settings in the registry @ HKEY_CURRENT_USER\Software\epsxe\config
; Video plugins store their settings in the registry @ HKEY_CURRENT_USER\Software\epsxe\config\ogl2
;----------------------------------------------------------------------------
StartModule()
BezelGUI()
FadeInStart()
settingsFile := modulePath . "\" . moduleName . ".ini"
; Settings (Global)
slowBoot := IniReadCheck(settingsFile, "Settings", "Slow_Boot","false",,1) ; If true, force emulator to show bios screen at boot
hideEpsxeGUIs := IniReadCheck(settingsFile, "Settings", "Hide_ePSXe_GUIs","true",,1)
perGameMemCards := IniReadCheck(settingsFile, "Settings", "Per_Game_Memory_Cards","true",,1)
memCardPath := IniReadCheck(settingsFile, "Settings", "Memory_Card_Path", emuPath . "\memcards",,1)
memCardPath := AbsoluteFromRelative(emuPath, memCardPath)
; Settings (Overridable per ROM)
GfxPlugin := IniReadCheck(settingsFile, "Settings|" . romName, "Video_Plugin","GPUCOREGL2",,1) ; Use the gfx plugin name
Widescreen := IniReadCheck(settingsFile, "Settings|" . romName, "Widescreen","false",,1) ; Widescreen hack.
GamepadTypePlayer1 := IniReadCheck(settingsFile, "Settings|" . romName, "GamepadType_Player1","4",,1) ; Set Gamepad type for Player 1. Allows for setting of different analog or digital controllers since not all games support analog controllers. Default is "4" (DualShock).
GamepadTypePlayer2 := IniReadCheck(settingsFile, "Settings|" . romName, "GamepadType_Player2","4",,1) ; Set Gamepad type for Player 2. Allows for setting of different analog or digital controllers since not all games support analog controllers. Default is "4" (DualShock).
GamepadTypePlayer3 := IniReadCheck(settingsFile, "Settings|" . romName, "GamepadType_Player3","4",,1) ; Set Gamepad type for Player 3. Allows for setting of different analog or digital controllers since not all games support analog controllers. Default is "4" (DualShock).
GamepadTypePlayer4 := IniReadCheck(settingsFile, "Settings|" . romName, "GamepadType_Player4","4",,1) ; Set Gamepad type for Player 4. Allows for setting of different analog or digital controllers since not all games support analog controllers. Default is "4" (DualShock).
MultitapPort1 := IniReadCheck(settingsFile, "Settings|" . romName, "Multitap_Port1","false",,1) ; Enable Multitap for Port 1
enableFlightStick := IniReadCheck(settingsFile, "Settings|" . romName, "EnableFlightStick","false",,1) ; If true, GamepadType_Player1 and GamepadType_Player2 are forced to DualAnalog and enables Flight Stick mode at game start (Presses F5 twice).
enableAnalogDelay := IniReadCheck(settingsFile, "Settings|" . romName, "EnableAnalog_Delay","3",,1) ; Delay in seconds before Analog mode is enabled. This is set to 3 seconds by default, which works for the majority of games. Some games re-initialize at the loading screen and need to have a custom delay to enable analog afterwards (Colin McRae Rally = 30s, for example)
disableMemoryCard1 := IniReadCheck(settingsFile, romName, "DisableMemoryCard1","false",,1) ; If true, disables memory card 1 for this game. Some games may not boot if both memory cards are inserted.
disableMemoryCard2 := IniReadCheck(settingsFile, romName, "DisableMemoryCard2","false",,1) ; If true, disables memory card 2 for this game. Some games may not boot if both memory cards are inserted.
; Video plugin settings (global)
Fullscreen := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Fullscreen","true",,1)
DesktopResolutionX := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Desktop_Resolution_X",,,1)
DesktopResolutionY := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Desktop_Resolution_Y",,,1)
WindowSizeX := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Window_Size_X",,,1)
WindowSizeY := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Window_Size_Y",,,1)
ColorDepth := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Color_Depth","32",,1)
WindowSizeInFullscreen := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Window_Size_In_Fullscreen","false",,1)
Scanlines := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Scanlines","false",,1)
ScanlineBrightness := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "Scanline_Brightness",,,1)
MDECFilter := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin", "MDEC_Filter","false",,1)
; Video plugin settings (Overridable per ROM)
HiresX := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Internal_X_Resolution",1,,1)
HiresY := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Internal_Y_Resolution",1,,1)
KeepRatio := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Stretching_Mode",0,,1)
NoRenderTexture := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Render_Mode",0,,1)
FilterType := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Texture_Filtering",0,,1)
HiResTextures := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Hi_Res_Textures",0,,1)
VRamSize := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Gfx_Card_Vram",0,,1)
TWinShader := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Pixel_Shader","false",,1)
OffscreenDrawing := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Offscreen_Drawing",1,,1)
FrameTexType := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Framebuffer_Effects",0,,1)
FrameUpload := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Framebuffer_Upload",1,,1)
FullscreenBlur := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Screen_Filtering",0,,1)
FullscreenShader := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Shader_Effects",0,,1)
ShaderDir := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Shader_Directory",,,1)
FSShaderLevel := IniReadCheck(settingsFile, "Pete's OpenGL2 GPU Plugin|" . romName, "Shader_Level",1,,1)
; dialogOpen := i18n("dialog.open") ; Looking up local translation
dialogOpen := "Open" ; apparently ePSXe doesnt support multiple languages, forcing this until it does
BezelStart()
; Set the GPU plugin and it's settings.
WriteReg("SZ", "epsxe\config", "VideoPlugin", GfxPlugin)
; Set general video options
Widescreen := If Widescreen = "true" ? 3 : 4
WriteReg("SZ", "epsxe\config", "GTEWidescreen", Widescreen)
; TODO: The other video plugins might use the same settings and even if they don't, it probably won't hurt
; to have these values in the registry for the selected plugin.
; Only apply these settings if the user selected the OpenGL2 plugin.
If (GfxPlugin = "GPUCOREGL2") {
WriteReg("DWORD", "epsxe\config\ogl2", "ColDepth", ColorDepth)
WriteReg("DWORD", "epsxe\config\ogl2", "HiresX", HiresX)
WriteReg("DWORD", "epsxe\config\ogl2", "HiresY", HiresY)
WriteReg("DWORD", "epsxe\config\ogl2", "KeepRatio", KeepRatio)
WriteReg("DWORD", "epsxe\config\ogl2", "NoRenderTexture", NoRenderTexture)
WriteReg("DWORD", "epsxe\config\ogl2", "FilterType", FilterType)
WriteReg("DWORD", "epsxe\config\ogl2", "HiResTextures", HiResTextures)
WriteReg("DWORD", "epsxe\config\ogl2", "VRamSize", VRamSize)
TWinShader := If TWinShader = "true" ? 1 : 0 ; Convert texture shader bool into an int before writing to the registry
WriteReg("DWORD", "epsxe\config\ogl2", "TWinShader", TWinShader)
WriteReg("DWORD", "epsxe\config\ogl2", "OffscreenDrawing", OffscreenDrawing)
WriteReg("DWORD", "epsxe\config\ogl2", "FrameTexType", FrameTexType)
WriteReg("DWORD", "epsxe\config\ogl2", "FrameUpload", FrameUpload)
FullscreenBlur := If FullscreenBlur = "true" ? 1 : 0
WriteReg("DWORD", "epsxe\config\ogl2", "FullscreenBlur", FullscreenBlur)
Scanlines := If Scanlines = "true" ? 1 : 0
WriteReg("DWORD", "epsxe\config\ogl2", "UseScanlines", Scanlines)
If (Scanlines = "1") {
WriteReg("DWORD", "epsxe\config\ogl2", "ScanBlend", ScanlineBrightness)
}
MDECFilter := If MDECFilter = "true" ? 1 : 0
WriteReg("DWORD", "epsxe\config\ogl2", "UseMdecFilter", MDECFilter)
; If Shader_Effects is set to 3 or 5 and Shader_Directory is not set, disable Shader_Effects.
If (FullscreenShader = 3 or FullscreenShader = 5) {
If (ShaderDir = "") {
WriteReg("DWORD", "epsxe\config\ogl2", "FullscreenShader", 0)
} Else {
WriteReg("SZ", "epsxe\config\ogl2", "ShaderDir", ShaderDir . "\")
WriteReg("DWORD", "epsxe\config\ogl2", "FullscreenShader", FullscreenShader)
WriteReg("DWORD", "epsxe\config\ogl2", "FSShaderLevel", FSShaderLevel)
; Turn these settings off because they'll blur/alter the image before it gets to the shader.
WriteReg("DWORD", "epsxe\config\ogl2", "FilterType", 0)
WriteReg("DWORD", "epsxe\config\ogl2", "HiResTextures", 0)
WriteReg("DWORD", "epsxe\config\ogl2", "FullscreenBlur", 0)
}
} Else {
WriteReg("DWORD", "epsxe\config\ogl2", "FullscreenShader", FullscreenShader)
WriteReg("DWORD", "epsxe\config\ogl2", "FSShaderLevel", FSShaderLevel)
}
}
; Enable Fullscreen mode for the video plugin.
If (Fullscreen = "true") {
WriteReg("DWORD", "epsxe\config\ogl2", "WindowMode", 0)
If (WindowSizeInFullscreen = "true") { ; If true enable Window Size in Fullscreen mode.
WriteReg("DWORD", "epsxe\config\ogl2", "CenterFullScreen", 1)
If (WindowSizeX != "" or WindowSizeY != "") { ; If resolution configured, convert Window Resolution X and Y from decimal to hex, concatenate, then import into the registry as a single value.
SetFormat, integer, hex
WindowSizeX += 0
WindowSizeY += 0
SetFormat, integer, decimal
StringTrimLeft, WindowSizeX_Hex, WindowSizeX, 2
StringTrimLeft, WindowSizeY_Hex, WindowSizeY, 2
WindowSize := "0x0" . WindowSizeY_Hex . "0" . WindowSizeX_Hex
WriteReg("DWORD", "epsxe\config\ogl2", "WinSize", WindowSize)
}
} Else {
WriteReg("DWORD", "epsxe\config\ogl2", "CenterFullScreen", 0)
If (DesktopResolutionX != "" or DesktopResolutionY != "") {
WriteReg("DWORD", "epsxe\config\ogl2", "ResX", DesktopResolutionX)
WriteReg("DWORD", "epsxe\config\ogl2", "ResY", DesktopResolutionY)
}
}
} Else {
WriteReg("DWORD", "epsxe\config\ogl2", "WindowMode", 1)
If (WindowSizeX != "" or WindowSizeY != "") {
SetFormat, integer, hex
WindowSizeX += 0
WindowSizeY += 0
SetFormat, integer, decimal
StringTrimLeft, WindowSizeX_Hex, WindowSizeX, 2
StringTrimLeft, WindowSizeY_Hex, WindowSizeY, 2
WindowSize := "0x0" . WindowSizeY_Hex . "0" . WindowSizeX_Hex
WriteReg("DWORD", "epsxe\config\ogl2", "WinSize", WindowSize)
}
If (bezelEnabled = "true") {
winSize := bezelScreenHeight * 65536 + bezelScreenWidth ; convert desired windowed resolution to Decimal
WriteReg("DWORD", "epsxe\config\ogl2", "WinSize", winSize)
}
}
; Set Gamepad Type. If enableFlightStick is set to "true", GamepadType is forced to DualAnalog for Player 1 and Player 2.
If (enableFlightStick = "true") {
WriteReg("SZ", "epsxe\config", "Multitap1", "0") ; Disable Multitap if enableFlightStick is true
WriteReg("SZ", "epsxe\config", "GamepadType", "5,1,1,1,5,1,1,1")
} ELSE {
If (MultitapPort1 = "true") {
WriteReg("SZ", "epsxe\config", "Multitap1", "1")
WriteReg("SZ", "epsxe\config", "GamepadType", GamepadTypePlayer1 . "," . GamepadTypePlayer2 . "," . GamepadTypePlayer3 . "," . GamepadTypePlayer4 . ",4,4,4,4")
} Else {
WriteReg("SZ", "epsxe\config", "Multitap1", "0")
WriteReg("SZ", "epsxe\config", "GamepadType", GamepadTypePlayer1 . ",4,4,4," . GamepadTypePlayer2 . ",4,4,4")
}
}
; Memory Cards
defaultMemCard1 := memCardPath . "\_default_001.mcr" ; defining default blank memory card for slot 1
defaultMemCard2 := memCardPath . "\_default_002.mcr" ; defining default blank memory card for slot 2
memCardName := If romTable[1,5] ? romTable[1,4] : romName ; defining rom name for multi disc rom
romMemCard1 := memCardPath . "\" . memCardName . "_001.mcr" ; defining name for rom's memory card for slot 1
romMemCard2 := memCardPath . "\" . memCardName . "_002.mcr" ; defining name for rom's memory card for slot 2
memcardType := If perGameMemCards = "true" ? "rom" : "default" ; define the type of memory card we will create in the below loop
If !FileExist(memCardPath)
FileCreateDir, %memCardPath% ; create memcard folder if it doesn't exist
Loop 2
{ If !FileExist(%memcardType%MemCard%A_Index%)
{ FileAppend,, % %memcardType%MemCard%A_Index% ; create a new blank memory card if one does not exist
Log("Module - Created a new blank memory card in Slot " . A_Index . ":" . %memcardType%MemCard%A_Index%)
}
WriteReg("SZ", "epsxe\config", "Memcard" . A_Index, %memcardType%MemCard%A_Index%)
; Now disable a memory card if required for the game to boot properly
memcard%A_Index%Enable := ReadReg("epsxe\config", "Memcard" . A_Index . "Enable")
If (disableMemoryCard%A_Index% = "true")
WriteReg("SZ", "epsxe\config", "Memcard" . A_Index . "Enable", 0)
Else
WriteReg("SZ", "epsxe\config", "Memcard" . A_Index . "Enable", 1)
}
hideEmuObj := Object(dialogOpen . " PSX ISO ahk_class #32770",0,"ahk_class EPSXGUI",0,"ePSXe ahk_class EPSX",1) ; Hide_Emu will hide these windows. 0 = will never unhide, 1 = will unhide later
7z(romPath, romName, romExtension, sevenZExtractPath)
epsxeExtension := InStr(".ccd|.cue|.mds|.img|.iso|.pbp",romExtension) ; the psx extensions supported by the emu
RomTableCheck() ; make sure romTable is created already so the next line can calculate correctly
noGUI := If romTable.MaxIndex() ? "" : " -nogui" ; multidisc games will not use nogui because we need to select an option in epsxe's gui to swap discs
slowBoot := If slowBoot = "true" ? " -slowboot" : ""
If (noGUI = "" && hideEpsxeGUIs = "true") { ; for multi disc games only
Log("Module - Starting the HideGUIWindow timer to prevent them from showing")
SetTimer, HideGUIWindow, 10 ; start watching for gui window so it can be completely hidden
}
; Mount the CD using Virtual Drive
If (epsxeExtension && vdEnabled = "true") {
Log("Module - Virtual Drive is enabled and " . romExtension . " is a supported Virtual Drive extension")
VirtualDrive("get") ; populates the vdDriveLetter variable with the drive letter to your scsi or dt virtual drive
currentCDRomAscii := ReadReg("epsxe\config", "CdromLetter") ; read the current setting for ePSXe's cdrom it is using
currentCDRomLetter := Chr(currentCDRomAscii) ; converts the ascii code to a letter
If (currentCDRomLetter = "")
Log("Module - " . MEmu . " is not configured with a CDRom Drive")
Else If (currentCDRomAscii = 48)
Log("Module - " . MEmu . " is configured to read from the FirstCdrom Drive and will be updated to a proper letter instead")
Else
Log("Module - " . MEmu . " is configured to read from Drive " . currentCDRomLetter . ":")
If (currentCDRomLetter != vdDriveLetter) {
newCDRomAscii := Asc(vdDriveLetter) ; converts the letter to an ascii code
WriteReg("SZ", "epsxe\config", "CdromLetter", newCDRomAscii)
Log("Module - Updated " . MEmu . " to use Drive " . vdDriveLetter . ": for all future launches.",2)
} Else
Log("Module - " . MEmu . " is configured to use the correct drive already")
VirtualDrive("mount",romPath . "\" . romName . romExtension)
HideEmuStart() ; This fully ensures windows are completely hidden even faster than winwait
errorLvl := Run(executable . noGUI . slowBoot, emuPath)
usedVD := 1
} Else {
If (romExtension = ".pbp") {
Log("Module - Sending rom to emu directly with the load binary directive.")
HideEmuStart() ; This fully ensures windows are completely hidden even faster than winwait
errorLvl := Run(executable . noGUI . slowBoot . " -loadbin """ . romPath . "\" . romName . romExtension . """", emuPath)
} Else {
Log("Module - Sending rom to emu directly as Virtual Drive is not enabled or " . romExtension . " is not a supported Virtual Drive extension.")
HideEmuStart() ; This fully ensures windows are completely hidden even faster than winwait
errorLvl := Run(executable . noGUI . slowBoot . " -loadiso """ . romPath . "\" . romName . romExtension . """", emuPath)
}
}
If errorLvl
ScriptError("Error launching " . executable . "`, closing module.")
epsxeLaunchType := If usedVD ? "CDROM" : "ISO" ; determines which command gets sent to epsxe
If (noGUI = "") { ; for multi disc games only
Log("Module - " . romName . " is a multi-disc game, so launching " . MEmu . " with GUI enabled so swapping can occur.")
WinWait("ePSXe ahk_class EPSXGUI")
If (epsxeLaunchType = "CDROM") {
Log("Module - Telling ePSXe to run a CDROM")
PostMessage, 0x111, 40001,,,ahk_class EPSXGUI ; Run CDROM
} Else {
Log("Module - Telling ePSXe to run an ISO")
PostMessage, 0x111, 40003,,,ahk_class EPSXGUI ; Run ISO
}
} Else
Log("Module - " . romName . " is not a multi-disc game, so launching " . MEmu . " with GUI disabled.")
If (!usedVD && noGUI = "") { ; for some reason, epsxe still shows an open psx iso box even though it was provided on the run command when we don't also send -nogui. This handles loading the rom.
Log("Module - " . MEmu . " GUI and DT support are both disabled. Loading rom via the Open PSX ISO window.")
OpenROM(dialogOpen . " PSX ISO ahk_class #32770", romPath . "\" . romName . romExtension)
}
WinWait("ePSXe ahk_class EPSX")
WinWaitActive("ePSXe ahk_class EPSX")
If (noGUI = "" && hideEpsxeGUIs = "true") { ; for multi disc games only
Log("Module - Stopping the HideGUIWindow timer")
SetTimer, HideGUIWindow, Off
}
BezelDraw()
HideEmuEnd()
FadeInExit()
; Enable Analog mode. During boot, presses F5 twice to enable Flight Stick mode if enableFlightStick is true. Presses F5 once for all other controllers except Digital.
If (enableFlightStick = "true") {
Sleep, enableAnalogDelay . "000"
Send, {F5 down}
Sleep, 250
Send, {F5 up}
Sleep, 500 ; Half second delay until second F5 keypress
Send, {F5 down}
Sleep, 250
Send, {F5 up}
} ELSE If (GamepadType_Port1 = "2,1,1,1" or "5,1,1,1" or "4,1,1,1" or "7,1,1,1" or "3,1,1,1" or "8,1,1,1") {
Sleep, enableAnalogDelay . "000"
Send, {F5 down}
Sleep, 250
Send, {F5 up}
}
Process("WaitClose", executable)
If usedVD
VirtualDrive("unmount")
7zCleanUp()
BezelExit()
FadeOutExit()
ExitModule()
ReadReg(var1, var2) {
RegRead, regValue, HKEY_CURRENT_USER, Software\%var1%, %var2%
Return %regValue%
}
WriteReg(type, var1, var2, var3) {
RegWrite, REG_%type%, HKEY_CURRENT_USER, Software\%var1%, %var2%, %var3%
}
HaltEmu:
If (Fullscreen = "true")
{ PostMessage, 0x111, 40001,,,ahk_class EPSXGUI ; Go fullscreen, same as alt+enter
Sleep, 200
}
Return
MultiGame:
; msgbox % "selectedRom = " . selectedRom . "`nselected game = " . currentButton . "`nmgRomPath = " . mgRomPath . "`nmgRomExt = " . mgRomExt . "`nmgRomName = " . mgRomName
SetKeyDelay(50)
If usedVD
{ VirtualDrive("unmount") ; Unmount the CD from Virtual Drive
Sleep, 500 ; Required to prevent your Virtual Drive app from bugging
VirtualDrive("mount",selectedRom) ; Mount the CD using Virtual Drive
}
ControlSend,, {ESC down}{ESC Up}, ahk_class EPSX ; this exits the game window and brings back ePSXe's gui menu window
If (hideEpsxeGUIs = "true")
{ Log("Module - Starting the HideGUIWindow timer to prevent them from showing")
SetTimer, HideGUIWindow, 10
}
If (epsxeLaunchType = "CDROM") {
Log("Module - Telling ePSXe to swap to another CDROM")
PostMessage, 0x111, 40005,,,ahk_class EPSXGUI ; Change Disc CDROM
} Else {
Log("Module - Telling ePSXe to swap to another ISO")
PostMessage, 0x111, 40006,,,ahk_class EPSXGUI ; Change Disc ISO
}
If usedVD
{ WinWait("Change Disc Option ahk_class #32770")
ControlSend,Button1,{Enter},Change Disc Option ahk_class #32770
} Else {
OpenROM(dialogOpen . " PSX ISO ahk_class #32770", selectedRom)
}
If hideEpsxeGUIs := "true"
{ Log("Module - Stopping the HideGUIWindow timer")
SetTimer, HideGUIWindow, off
}
; If BezelEnabled
; BezelDraw()
Return
RestoreEmu:
WinActivate, ahk_id %emulatorID%
If (Fullscreen = "true")
PostMessage, 0x111, 40001,,,ahk_class EPSXGUI ; Go fullscreen, same as alt+enter
Return
HideGUIWindow:
WinSet, Transparent, On, ePSXe ahk_class EPSXGUI
WinSet, Transparent, On, Open PSX ISO ahk_class #32770 ; when not using DT
WinSet, Transparent, On, Change Disc Option ahk_class #32770 ; when using DT
Return
CloseProcess:
FadeOutStart()
SetWinDelay, 50
Log("Module - Sending Escape to close emulator")
If (noGUI = "") { ; for multi disc games only
PostMessage, 0x111, 40007,,,ahk_class EPSX ; Exit ePSXe, only works when guis are used though, basically when multigame supported games are launched
WinWait("ePSXe ahk_class EPSXGUI")
WinClose("ePSXe ahk_class EPSXGUI")
} Else
ControlSend,, {Esc down}{Esc up}, ePSXe ahk_class EPSX ; DO NOT CHANGE
Return
; PostMessage, 0x111, 40008,,,ahk_class EPSXGUI ; Continue
; PostMessage, 0x111, 40009,,,ahk_class EPSXGUI ; Reset