Thread: Rpcs3

Page 14 of 17 FirstFirst ... 491011121314151617 LastLast
Results 261 to 280 of 333
  1. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    Quote Originally Posted by Yardley View Post
    I tried this and the module you posted on 10/27 and both work great except that if fade is onscreen too long because the PPU compiling is taking long I get the following error message:

    ScriptError - There was an error waiting for the window "FPS". Please check you have the correct version emulator installed for this module, followed any notes in the module, and have this emulator working outside your Frontend first. Also turn off Fade to see if you are hiding your problem.

    EDIT: just wanted to point out that I disabled fade and still got the error so it has nothing to do with fade, it just happens if the PPU compiling takes too long, like when starting a game for the first time.
    Quote Originally Posted by oldhag270 View Post
    I get this same error but only when my game is in disc instead of game.
    Edit the following section of the module:
    Code:
    ; Waiting 3 seconds to see if compiling window appears
    If (gameSerial != "" && !Fileexist(gamePPUemuPath . "\" . gameSerial))
    {
      WinWait, Compiling, , 3000
      If (!ErrorLevel)
      {
        WinWaitClose, Compiling
      }
    }
    Increase the "3000" to "10000" and see if that avoids the error.

    If the emulator loads a bit slower and the PPU window takes longer than 3 seconds to appear after the emulator main window is found, then it will start testing for the game window too early.

    I'm sure almost all games take longer than 10 seconds to compile, so there should be no wasted time. Also, it skips this check if the PPU files already exist, for those who have already compiled them and/or use the PPU compression option I added.


    Edit: I just realized that if the PPU compiling never finished then the folder will exist, but not with all the files needed, so it will skip the PPU window check even though the emulator still needs to compile. I will add a secondary check that will only be skipped if 7z is enabled and the PPU files were extracted.

    Updated code coming soon.
    Last edited by slashin8r ; 11-16-2019 at 09:30 AM.
     

  2. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Code:
    MEmu := "RPCS3"
    MEmuV := "v0.0.7-8981-2cc71afd Alpha"
    MURL := ["https://rpcs3.net"]
    MAuthor := ["slashin8r", "wallmachine", "jviegas", "brolly", "aurel102001"]
    MVersion := "1.0.14"
    MDate := "2019-11-16"
    MCRC := ""
    iCRC := ""
    MID := ""
    MSystem := ["Sony Playstation 3"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; [IMPORTANT]
    ; To run games without the use of 7z
    ; 
    ; 1) Create shortcuts of your EBOOT.BIN files, rename them to the name of the game, and place them all within the same folder then add that folder as a romPath in RocketLauncher.
    ; 2) Add the "lnk" (LNK) extension for the RPCS3 emulator within RocketLauncher.
    ; 3) Generate a new database based on the new rom path.
    ; 4) Audit all games for the system and enjoy.
    ; [IMPORTANT]
    ; 
    ; 
    ;  
    ; To save additional space, this module now automatically compresses each game's PPU folder and Game Data folder (if exists) as long as 7z is enabled.
    ; PPU file saved in: %romPath%\cache\%romName%_%A_ComputerName%.7z
    ; Game Data file saved in: %romPath%\data\%romName%_data.7z
    ; 
    ; Example:
    ; Rom File = "D:\PS3\PS3 Test Game.rar"
    ; A_ComputerName = "PC001"
    ; 
    ; PPU File = "D:\PS3\cache\PS3 Test Game_PC001.7z")
    ; Game Data File = "D:\PS3\data\PS3 Test Game_data.7z")
    ;----------------------------------------------------------------------------
    
    StartModule()
    BezelGUI()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)
    primaryWindowClassName := "Qt5QWindowIcon"
    emuPrimaryWindow := new Window(new WindowTitle(,primaryWindowClassName, executable))
    emuGameWindow := new Window(new WindowTitle("FPS"))
    
    ; Finding emulator config file
    Rpcs3config := new File(emuPath . "\config.yml")
    Rpcs3config.CheckFile("Could not find RPCS3 config.yml! Run your emulator, go to Settings and save them.")
    
    ; Finding emulator games file
    Rpcs3games := new File(emuPath . "\games.yml")
    Rpcs3games.CheckFile("Could not find RPCS3 games.yml! Update this file with your list of game serials and game installation directories.")
    
    BezelStart()
    
    hideEmuObj := Object(emuPrimaryWindow,1)
    HideAppStart(hideEmuObj,hideEmu)
    
    ; Find game location
    gameFolder := romPath
    If (sevenZEnabled = "true")
    {
      gameFolder := sevenZExtractPath . "\" . romName
      If (sevenZAttachSystemName = "true")
      {
        gameFolder := sevenZExtractPath . "\" . systemName . "\" . romName
      }
    }
    
    ; Set variables
    gameType := ""
    gameSerial := ""
    gamePPU := "false"
    originalRomPath := romPath
    gamePPUromPath := romPath . "\cache\" . romName . "_" . A_ComputerName . ".7z"
    gamePPUemuPath := emuPath . "\cache"
    gameDATA := "false"
    gameDATAromPath := romPath . "\data\" . romName . "_data.7z"
    gameDATAemuPath := emuPath . "\dev_hdd0\game"
    
    ; Extract PPU files if they exist
    If (sevenZEnabled = "true" && Fileexist(gamePPUromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gamePPUromPath%" -aos -o"%gamePPUemuPath%", , Hide
      gamePPU := "true"
    }
    
    ; Extract Game Data files if they exist
    If (sevenZEnabled = "true" && Fileexist(gameDATAromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gameDATAromPath%" -aos -o"%gameDATAemuPath%", , Hide
      gameDATA := "true"
    }
    
    7z(romPath, romName, romExtension, sevenZExtractPath)
    
    ; Find the game location and determine the type of game (disc or hdd)
    StringRight, stringTest, romPath, 6
    If (stringTest = "USRDIR")
    {
      gameType := "game"
      StringReplace, gameFolder, romPath, \USRDIR
      StringRight, stringTest, gameFolder, 8
      If (stringTest = "PS3_GAME")
      {
        gameType := "disc"
        StringReplace, gameFolder, gameFolder, \PS3_GAME
      }
      If (sevenZEnabled != "true")
      {
        StringRight, gameSerial, gameFolder, 9
        
        ; Create the directory junction
        If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
        {
          If (gameSerial != "" && gameType != "")
          {
            RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
          }
          Else
          {
            ScriptError("Game serial not found. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
          }
        }
      }
    }
    Else If (sevenZEnabled = "true" && (romPath = originalRomPath || romPath = ""))
    {
      ScriptError("Rom was not found in the USRDIR directory. Please make sure ""bin"" is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Run the game
    If (Fileexist(romPath . "\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . romPath . "\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . ".BIN"))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . ".BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN"))
    {
        primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . romExtension))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . romExtension . """")
    }
    Else
    {
      ScriptError("Unable to find EBOOT.BIN file. Please make sure ""bin"" (and ""lnk"" [LNK] if you are loading from shortcuts) is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Waiting for main emulator window
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.Active()
    emuPrimaryWindow.WaitActive()
    
    If (sevenZEnabled = "true")
    {
      ; Find the game serial
      If (Fileexist(emuPath . "\games.yml") && gameSerial = "")
      {
        Loop, read, %emuPath%\games.yml
        {
          StringReplace, gameLine, A_LoopReadLine, /, \, All
          IfInString, gameLine, %gameFolder%
          {
            StringLeft, gameSerial, gameLine, 9
            break
          }
        }
      }
    
      ; Create the directory junction
      If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
      {
        If (gameSerial != "" && gameType != "")
        {
          RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
        }
        Else
        {
          ScriptError("Game serial not found in your RPCS3 games.yml file. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
        }
      }
    }
    
    ; Waiting 5 seconds to see if compiling window appears
    If (gameSerial != "" && gamePPU != "true")
    {
      WinWait, Compiling, , 5000
      If (!ErrorLevel)
      {
        WinWaitClose, Compiling
      }
    }
    
    ; Waiting for emulator game window
    emuGameWindow.Wait()
    emuGameWindow.Active()
    emuGameWindow.WaitActive()
    
    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    7zCleanUp()
    
    ; Remove the directory junction
    If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial) && gameSerial != "" && gameType != "")
    {
      RunWait, %ComSpec% /c "rmdir "%emuPath%\dev_hdd0\%gameType%\%gameSerial%", , Hide
    }
    
    ; Remove the PPU files if they were extracted or creates PPU compressed file if needed
    If (gamePPU = "true")
    {
      If (gameSerial != "")
      {
        FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
      }
    }
    Else If (sevenZEnabled = "true")
    {
      IfExist, %gamePPUemuPath%\%gameSerial%
      {
        IfNotExist, %gamePPUromPath%
        {
          If (gameSerial != "")
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gamePPUromPath%" "%gamePPUemuPath%\%gameSerial%", , Hide
            FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
          }
        }
      }
    }
    
    ; Remove the Game Data files if they were extracted or creates Game Data compressed file if needed
    If (gameDATA = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    Else If (sevenZEnabled = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%GAMEDATA" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    CloseProcess:
      FadeOutStart()
      emuGameWindow.Close()
      Process, Close, %executable%
    Return
    
    BezelLabel:
      disableHideBorder := "true"
      disableHideTitleBar := "true"
      disableHideToggleMenu := "true"
    return
    I have not tested this yet, but I have a feeling it may be what was needed. I skipped checking for the PPU folder since that method is flawed (no way to know if all PPU files needed exist) and instead I only skip that check if the PPU files were extracted. Also increased the timer to 5 seconds by default.

    Anyone using the PPU compression option and still running into this error, then it is most likely due to the PPU archive not containing all the PPU files (this happens if you exit the emulator before the game has been fully compiled). Delete the PPU archive and let the module recreate it after the game is fully compiled.
     

  3. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    I increased the value you mentioned to 10000 but still got the same error. Can it be that something changed in the latest version of the emulator with the window titles?
     

  4. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Aug 2014
    Posts
    58
    I only get this error when games are located in the disc folder within dev_hdd0,all other games work fine for me.

    Something has definitely changed with the emulator,games that were in the game folder are now in the disc folder.
    Last edited by oldhag270 ; 11-16-2019 at 12:42 PM.
     

  5. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Quote Originally Posted by Yardley View Post
    I increased the value you mentioned to 10000 but still got the same error. Can it be that something changed in the latest version of the emulator with the window titles?
    I will download the latest version to see if anything changed. What version are you currently using?


    Quote Originally Posted by oldhag270 View Post
    I only get this error when games are located in the disc folder within dev_hdd0,all other games work fine for me.
    Not quite sure why that is happening. Could also have something to do with a newer version of the emulator. What version are you using as well?
     

  6. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Aug 2014
    Posts
    58
    I just tried with the latest version and it's doing the same thing.

    Latest version 9142.
     

  7. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    I'm on version 0.0.7-9129-fcc841ea Alpha

    I tried moving the game out of disc folder as oldhag270 suggested but that made no difference. Oldhag270, are you sure you're not just confusing starting a game you've started and compiled before vs starting a game for the first time?
     

  8. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    The module is having trouble figuring out the gameID again. When using the shortcut method, the games.yml file is updated with the path of the EBOOT.BIN file with no indicator of which game is which.

    I will need to figure out how to pull the properties of the shortcut to figure out the gameID from there.
     

  9. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Ended up being a pretty simple fix. Test the module below and let me know how it works out.

    Code:
    MEmu := "RPCS3"
    MEmuV := "v0.0.7-9142-9a8c59a1 Alpha"
    MURL := ["https://rpcs3.net"]
    MAuthor := ["slashin8r", "wallmachine", "jviegas", "brolly", "aurel102001"]
    MVersion := "1.0.15"
    MDate := "2019-11-16"
    MCRC := ""
    iCRC := ""
    MID := ""
    MSystem := ["Sony Playstation 3"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; [IMPORTANT]
    ; To run games without the use of 7z
    ; 
    ; 1) Create shortcuts of your EBOOT.BIN files, rename them to the name of the game, and place them all within the same folder then add that folder as a romPath in RocketLauncher.
    ; 2) Add the "lnk" (LNK) extension for the RPCS3 emulator within RocketLauncher.
    ; 3) Generate a new database based on the new rom path.
    ; 4) Audit all games for the system and enjoy.
    ; [IMPORTANT]
    ; 
    ; 
    ;  
    ; To save additional space, this module now automatically compresses each game's PPU folder and Game Data folder (if exists) as long as 7z is enabled.
    ; PPU file saved in: %romPath%\cache\%romName%_%A_ComputerName%.7z
    ; Game Data file saved in: %romPath%\data\%romName%_data.7z
    ; 
    ; Example:
    ; Rom File = "D:\PS3\PS3 Test Game.rar"
    ; A_ComputerName = "PC001"
    ; 
    ; PPU File = "D:\PS3\cache\PS3 Test Game_PC001.7z")
    ; Game Data File = "D:\PS3\data\PS3 Test Game_data.7z")
    ;----------------------------------------------------------------------------
    
    StartModule()
    BezelGUI()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)
    primaryWindowClassName := "Qt5QWindowIcon"
    emuPrimaryWindow := new Window(new WindowTitle(,primaryWindowClassName, executable))
    emuGameWindow := new Window(new WindowTitle("FPS"))
    
    ; Finding emulator config file
    Rpcs3config := new File(emuPath . "\config.yml")
    Rpcs3config.CheckFile("Could not find RPCS3 config.yml! Run your emulator, go to Settings and save them.")
    
    ; Finding emulator games file
    Rpcs3games := new File(emuPath . "\games.yml")
    Rpcs3games.CheckFile("Could not find RPCS3 games.yml! Update this file with your list of game serials and game installation directories.")
    
    BezelStart()
    
    hideEmuObj := Object(emuPrimaryWindow,1)
    HideAppStart(hideEmuObj,hideEmu)
    
    ; Find game location
    gameFolder := romPath
    If (sevenZEnabled = "true")
    {
      gameFolder := sevenZExtractPath . "\" . romName
      If (sevenZAttachSystemName = "true")
      {
        gameFolder := sevenZExtractPath . "\" . systemName . "\" . romName
      }
    }
    
    ; Set variables
    gameType := ""
    gameSerial := ""
    gamePPU := "false"
    originalRomPath := romPath
    gamePPUromPath := romPath . "\cache\" . romName . "_" . A_ComputerName . ".7z"
    gamePPUemuPath := emuPath . "\cache"
    gameDATA := "false"
    gameDATAromPath := romPath . "\data\" . romName . "_data.7z"
    gameDATAemuPath := emuPath . "\dev_hdd0\game"
    
    ; Extract PPU files if they exist
    If (sevenZEnabled = "true" && Fileexist(gamePPUromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gamePPUromPath%" -aos -o"%gamePPUemuPath%", , Hide
      gamePPU := "true"
    }
    
    ; Extract Game Data files if they exist
    If (sevenZEnabled = "true" && Fileexist(gameDATAromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gameDATAromPath%" -aos -o"%gameDATAemuPath%", , Hide
      gameDATA := "true"
    }
    
    7z(romPath, romName, romExtension, sevenZExtractPath)
    
    If (romExtension = ".lnk")
    {
      FileGetShortCut, %romPath%\%romName%%romExtension%, shortcutTarget
      StringReplace, romPath, shortcutTarget, \EBOOT.BIN
    }
    
    ; Find the game location and determine the type of game (disc or hdd)
    StringRight, stringTest, romPath, 6
    If (stringTest = "USRDIR")
    {
      gameType := "game"
      StringReplace, gameFolder, romPath, \USRDIR
      StringRight, stringTest, gameFolder, 8
      If (stringTest = "PS3_GAME")
      {
        gameType := "disc"
        StringReplace, gameFolder, gameFolder, \PS3_GAME
      }
      If (sevenZEnabled != "true")
      {
        StringRight, gameSerial, gameFolder, 9
        
        ; Create the directory junction
        If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
        {
          If (gameSerial != "" && gameType != "")
          {
            RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
          }
          Else
          {
            ScriptError("Game serial not found. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
          }
        }
      }
    }
    Else If (sevenZEnabled = "true" && (romPath = originalRomPath || romPath = ""))
    {
      ScriptError("Rom was not found in the USRDIR directory. Please make sure ""bin"" is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Run the game
    If (Fileexist(romPath . "\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . romPath . "\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . ".BIN"))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . ".BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN"))
    {
        primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . romExtension))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . romExtension . """")
    }
    Else
    {
      ScriptError("Unable to find EBOOT.BIN file. Please make sure ""bin"" (and ""lnk"" [LNK] if you are loading from shortcuts) is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Waiting for main emulator window
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.Active()
    emuPrimaryWindow.WaitActive()
    
    If (sevenZEnabled = "true")
    {
      ; Find the game serial
      If (Fileexist(emuPath . "\games.yml") && gameSerial = "")
      {
        Loop, read, %emuPath%\games.yml
        {
          StringReplace, gameLine, A_LoopReadLine, /, \, All
          IfInString, gameLine, %gameFolder%
          {
            StringLeft, gameSerial, gameLine, 9
            break
          }
        }
      }
    
      ; Create the directory junction
      If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
      {
        If (gameSerial != "" && gameType != "")
        {
          RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
        }
        Else
        {
          ScriptError("Game serial not found in your RPCS3 games.yml file. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
        }
      }
    }
    
    ; Waiting 5 seconds to see if compiling window appears
    If (gameSerial != "" && gamePPU != "true")
    {
      WinWait, Compiling, , 5000
      If (!ErrorLevel)
      {
        WinWaitClose, Compiling
      }
    }
    
    ; Waiting for emulator game window
    emuGameWindow.Wait()
    emuGameWindow.Active()
    emuGameWindow.WaitActive()
    
    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    7zCleanUp()
    
    ; Remove the directory junction
    If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial) && gameSerial != "" && gameType != "")
    {
      RunWait, %ComSpec% /c "rmdir "%emuPath%\dev_hdd0\%gameType%\%gameSerial%", , Hide
    }
    
    ; Remove the PPU files if they were extracted or creates PPU compressed file if needed
    If (gamePPU = "true")
    {
      If (gameSerial != "")
      {
        FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
      }
    }
    Else If (sevenZEnabled = "true")
    {
      IfExist, %gamePPUemuPath%\%gameSerial%
      {
        IfNotExist, %gamePPUromPath%
        {
          If (gameSerial != "")
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gamePPUromPath%" "%gamePPUemuPath%\%gameSerial%", , Hide
            FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
          }
        }
      }
    }
    
    ; Remove the Game Data files if they were extracted or creates Game Data compressed file if needed
    If (gameDATA = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    Else If (sevenZEnabled = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%GAMEDATA" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    CloseProcess:
      FadeOutStart()
      emuGameWindow.Close()
      Process, Close, %executable%
    Return
    
    BezelLabel:
      disableHideBorder := "true"
      disableHideTitleBar := "true"
      disableHideToggleMenu := "true"
    return
     

  10. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    That works great! I'm trying to understand the different ways this module works and the notes in the module about the PPU compression. I have 7z enabled but I don't see any directories that are created like those shown in the example in the module notes. I've been using the shortcut method for launching the games. What is the other method? Is it possible to leave the games compressed?
     

  11. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Quote Originally Posted by Yardley View Post
    That works great! I'm trying to understand the different ways this module works and the notes in the module about the PPU compression. I have 7z enabled but I don't see any directories that are created like those shown in the example in the module notes. I've been using the shortcut method for launching the games. What is the other method? Is it possible to leave the games compressed?
    Yes, you definitely can leave the games compressed. That is how I prefer my setup. You can have all your games compressed and stored in the same folder. Clear your "disc" and "game" folders of any installed games. Make sure the file extension of your compressed files is added to RPCS3 in RLUI. Make sure you only have 1 rom path set for Sony Playstation 3 in RLUI, the path to all your compressed games.

    The module will extract the game to your designated temporary folder (no need to have it extract directly into the emulator folder, in fact, it will cause errors if the games are extracted to the "game" folder), then it will load as expected. When you close the game for the first time, it will locate the PPU files and/or extra Game Data files and compress them in folders within your rom path.
     

  12. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Code:
    MEmu := "RPCS3"
    MEmuV := "v0.0.7-9142-9a8c59a1 Alpha"
    MURL := ["https://rpcs3.net"]
    MAuthor := ["slashin8r", "wallmachine", "jviegas", "brolly", "aurel102001"]
    MVersion := "1.0.15"
    MDate := "2019-11-16"
    MCRC := ""
    iCRC := ""
    MID := ""
    MSystem := ["Sony Playstation 3"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; [IMPORTANT]
    ; To run games without the use of 7z
    ; 
    ; 1) Create shortcuts of your EBOOT.BIN files, rename them to the name of the game, and place them all within the same folder then add that folder as a romPath in RocketLauncher.
    ; 2) Add the "lnk" (LNK) extension for the RPCS3 emulator within RocketLauncher.
    ; 3) Generate a new database based on the new rom path.
    ; 4) Audit all games for the system and enjoy.
    ; [IMPORTANT]
    ; 
    ; 
    ;  
    ; To save additional space, this module now automatically compresses each game's PPU folder and Game Data folder (if exists) as long as 7z is enabled.
    ; PPU file saved in: %romPath%\cache\%romName%_%A_ComputerName%.7z
    ; Game Data file saved in: %romPath%\data\%romName%_data.7z
    ; 
    ; Example:
    ; Rom File = "D:\PS3\PS3 Test Game.rar"
    ; A_ComputerName = "PC001"
    ; 
    ; PPU File = "D:\PS3\cache\PS3 Test Game_PC001.7z")
    ; Game Data File = "D:\PS3\data\PS3 Test Game_data.7z")
    ;----------------------------------------------------------------------------
    
    StartModule()
    BezelGUI()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)
    primaryWindowClassName := "Qt5QWindowIcon"
    emuPrimaryWindow := new Window(new WindowTitle(,primaryWindowClassName, executable))
    emuGameWindow := new Window(new WindowTitle("FPS"))
    
    ; Finding emulator config file
    Rpcs3config := new File(emuPath . "\config.yml")
    Rpcs3config.CheckFile("Could not find RPCS3 config.yml! Run your emulator, go to Settings and save them.")
    
    ; Finding emulator games file
    Rpcs3games := new File(emuPath . "\games.yml")
    Rpcs3games.CheckFile("Could not find RPCS3 games.yml! Update this file with your list of game serials and game installation directories.")
    
    BezelStart()
    
    hideEmuObj := Object(emuPrimaryWindow,1)
    HideAppStart(hideEmuObj,hideEmu)
    
    ; Find game location
    gameFolder := romPath
    If (sevenZEnabled = "true")
    {
      gameFolder := sevenZExtractPath . "\" . romName
      If (sevenZAttachSystemName = "true")
      {
        gameFolder := sevenZExtractPath . "\" . systemName . "\" . romName
      }
    }
    
    ; Set variables
    gameType := ""
    gameSerial := ""
    originalRomPath := romPath
    gameDirectoryJunction := "false"
    gamePPU := "false"
    gamePPUromPath := romPath . "\cache\" . romName . "_" . A_ComputerName . ".7z"
    gamePPUemuPath := emuPath . "\cache"
    gameDATA := "false"
    gameDATAromPath := romPath . "\data\" . romName . "_data.7z"
    gameDATAemuPath := emuPath . "\dev_hdd0\game"
    
    ; Extract PPU files if they exist
    If (sevenZEnabled = "true" && Fileexist(gamePPUromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gamePPUromPath%" -aos -o"%gamePPUemuPath%", , Hide
      gamePPU := "true"
    }
    
    ; Extract Game Data files if they exist
    If (sevenZEnabled = "true" && Fileexist(gameDATAromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gameDATAromPath%" -aos -o"%gameDATAemuPath%", , Hide
      gameDATA := "true"
    }
    
    7z(romPath, romName, romExtension, sevenZExtractPath)
    
    If (romExtension = ".lnk")
    {
      FileGetShortCut, %romPath%\%romName%%romExtension%, shortcutTarget
      StringReplace, romPath, shortcutTarget, \EBOOT.BIN
    }
    
    ; Find the game location and determine the type of game (disc or hdd)
    StringRight, stringTest, romPath, 6
    If (stringTest = "USRDIR")
    {
      gameType := "game"
      StringReplace, gameFolder, romPath, \USRDIR
      StringRight, stringTest, gameFolder, 8
      If (stringTest = "PS3_GAME")
      {
        gameType := "disc"
        StringReplace, gameFolder, gameFolder, \PS3_GAME
      }
      If (sevenZEnabled != "true")
      {
        StringRight, gameSerial, gameFolder, 9
        
        ; Create the directory junction
        If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
        {
          If (gameSerial != "" && gameType != "")
          {
            RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
            gameDirectoryJunction := "true"
          }
          Else
          {
            ScriptError("Game serial not found. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
          }
        }
      }
    }
    Else If (sevenZEnabled = "true" && (romPath = originalRomPath || romPath = ""))
    {
      ScriptError("Rom was not found in the USRDIR directory. Please make sure ""bin"" is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Run the game
    If (Fileexist(romPath . "\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . romPath . "\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . ".BIN"))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . ".BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN"))
    {
        primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . romExtension))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . romExtension . """")
    }
    Else
    {
      ScriptError("Unable to find EBOOT.BIN file. Please make sure ""bin"" (and ""lnk"" [LNK] if you are loading from shortcuts) is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Waiting for main emulator window
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.Active()
    emuPrimaryWindow.WaitActive()
    
    If (sevenZEnabled = "true")
    {
      ; Find the game serial
      If (Fileexist(emuPath . "\games.yml") && gameSerial = "")
      {
        Loop, read, %emuPath%\games.yml
        {
          StringReplace, gameLine, A_LoopReadLine, /, \, All
          IfInString, gameLine, %gameFolder%
          {
            StringLeft, gameSerial, gameLine, 9
            break
          }
        }
      }
    
      ; Create the directory junction
      If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
      {
        If (gameSerial != "" && gameType != "")
        {
          RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
          gameDirectoryJunction := "true"
        }
        Else
        {
          ScriptError("Game serial not found in your RPCS3 games.yml file. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
        }
      }
    }
    
    ; Waiting 5 seconds to see if compiling window appears
    If (gameSerial != "" && gamePPU != "true")
    {
      WinWait, Compiling, , 5000
      If (!ErrorLevel)
      {
        WinWaitClose, Compiling
      }
    }
    
    ; Waiting for emulator game window
    emuGameWindow.Wait()
    emuGameWindow.Active()
    emuGameWindow.WaitActive()
    
    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    7zCleanUp()
    
    ; Remove the directory junction
    If (gameDirectoryJunction = "true")
    {
      RunWait, %ComSpec% /c "rmdir "%emuPath%\dev_hdd0\%gameType%\%gameSerial%", , Hide
    }
    
    ; Remove the PPU files if they were extracted or creates PPU compressed file if needed
    If (gamePPU = "true")
    {
      If (gameSerial != "")
      {
        FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
      }
    }
    Else If (sevenZEnabled = "true")
    {
      IfExist, %gamePPUemuPath%\%gameSerial%
      {
        IfNotExist, %gamePPUromPath%
        {
          If (gameSerial != "")
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gamePPUromPath%" "%gamePPUemuPath%\%gameSerial%", , Hide
            FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
          }
        }
      }
    }
    
    ; Remove the Game Data files if they were extracted or creates Game Data compressed file if needed
    If (gameDATA = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    Else If (sevenZEnabled = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%GAMEDATA" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    CloseProcess:
      FadeOutStart()
      emuGameWindow.Close()
      Process, Close, %executable%
    Return
    
    BezelLabel:
      disableHideBorder := "true"
      disableHideTitleBar := "true"
      disableHideToggleMenu := "true"
    return
    Added additional error checking.
     

  13. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    Quote Originally Posted by slashin8r View Post
    Yes, you definitely can leave the games compressed. That is how I prefer my setup. You can have all your games compressed and stored in the same folder. Clear your "disc" and "game" folders of any installed games. Make sure the file extension of your compressed files is added to RPCS3 in RLUI. Make sure you only have 1 rom path set for Sony Playstation 3 in RLUI, the path to all your compressed games.

    The module will extract the game to your designated temporary folder (no need to have it extract directly into the emulator folder, in fact, it will cause errors if the games are extracted to the "game" folder), then it will load as expected. When you close the game for the first time, it will locate the PPU files and/or extra Game Data files and compress them in folders within your rom path.
    Thank you, I tested the last module you posted and it works well. I'm going to try compressing the games next. Won't they take forever to load though? Any recommendations for settings to use for 7z when compressing?
     

  14. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Quote Originally Posted by Yardley View Post
    Thank you, I tested the last module you posted and it works well. I'm going to try compressing the games next. Won't they take forever to load though? Any recommendations for settings to use for 7z when compressing?
    You will want to archive them using 7zip (or another program) and set the compression level to "Store". There will be no compression done so it will only copy the contents, being much faster than extracting a highly compressed folder. After it is archived, you can rename it whatever you like.
    Last edited by slashin8r ; 11-16-2019 at 04:04 PM.
     

  15. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    Quote Originally Posted by slashin8r View Post
    You will want to archive them using 7zip (or another program) and set the compression level to "Store". There will be no compression done so it will only copy the contents, being much faster than extracting a highly compressed folder. After it is archived, you can rename it whatever you like.
    Ah ok, so we're not really compressing them. Is the advantage of this method to not have to make shortcuts for all of the eboot.bin files?
     

  16. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Quote Originally Posted by Yardley View Post
    Ah ok, so we're not really compressing them. Is the advantage of this method to not have to make shortcuts for all of the eboot.bin files?
    Yes, that and you can store them in any location. Many of the games come prepared like this so no work would need to be done. They may not be archived without compression though.
     

  17. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    Quote Originally Posted by slashin8r View Post
    Yes, that and you can store them in any location. Many of the games come prepared like this so no work would need to be done. They may not be archived without compression though.
    Does the part of the module that compresses the PPU only work with this method and not the with the shortcut method?
     

  18. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Jul 2016
    Posts
    80
    Quote Originally Posted by Yardley View Post
    Does the part of the module that compresses the PPU only work with this method and not the with the shortcut method?
    Yeah, as of now. I can add support for the shortcut method as well. There are many variables I can store in an "ini" file for easy customization I just haven't taken the time to convert the code to read from a file. I think once I get that done, I could safely call it version 1.1.0
     

  19. Collapse Details
    Re: Rpcs3 
    Member
    MainSecondary
    Join Date
    Aug 2014
    Posts
    58
    Quote Originally Posted by slashin8r View Post
    Code:
    MEmu := "RPCS3"
    MEmuV := "v0.0.7-9142-9a8c59a1 Alpha"
    MURL := ["https://rpcs3.net"]
    MAuthor := ["slashin8r", "wallmachine", "jviegas", "brolly", "aurel102001"]
    MVersion := "1.0.15"
    MDate := "2019-11-16"
    MCRC := ""
    iCRC := ""
    MID := ""
    MSystem := ["Sony Playstation 3"]
    ;----------------------------------------------------------------------------
    ; Notes:
    ; [IMPORTANT]
    ; To run games without the use of 7z
    ; 
    ; 1) Create shortcuts of your EBOOT.BIN files, rename them to the name of the game, and place them all within the same folder then add that folder as a romPath in RocketLauncher.
    ; 2) Add the "lnk" (LNK) extension for the RPCS3 emulator within RocketLauncher.
    ; 3) Generate a new database based on the new rom path.
    ; 4) Audit all games for the system and enjoy.
    ; [IMPORTANT]
    ; 
    ; 
    ;  
    ; To save additional space, this module now automatically compresses each game's PPU folder and Game Data folder (if exists) as long as 7z is enabled.
    ; PPU file saved in: %romPath%\cache\%romName%_%A_ComputerName%.7z
    ; Game Data file saved in: %romPath%\data\%romName%_data.7z
    ; 
    ; Example:
    ; Rom File = "D:\PS3\PS3 Test Game.rar"
    ; A_ComputerName = "PC001"
    ; 
    ; PPU File = "D:\PS3\cache\PS3 Test Game_PC001.7z")
    ; Game Data File = "D:\PS3\data\PS3 Test Game_data.7z")
    ;----------------------------------------------------------------------------
    
    StartModule()
    BezelGUI()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)
    primaryWindowClassName := "Qt5QWindowIcon"
    emuPrimaryWindow := new Window(new WindowTitle(,primaryWindowClassName, executable))
    emuGameWindow := new Window(new WindowTitle("FPS"))
    
    ; Finding emulator config file
    Rpcs3config := new File(emuPath . "\config.yml")
    Rpcs3config.CheckFile("Could not find RPCS3 config.yml! Run your emulator, go to Settings and save them.")
    
    ; Finding emulator games file
    Rpcs3games := new File(emuPath . "\games.yml")
    Rpcs3games.CheckFile("Could not find RPCS3 games.yml! Update this file with your list of game serials and game installation directories.")
    
    BezelStart()
    
    hideEmuObj := Object(emuPrimaryWindow,1)
    HideAppStart(hideEmuObj,hideEmu)
    
    ; Find game location
    gameFolder := romPath
    If (sevenZEnabled = "true")
    {
      gameFolder := sevenZExtractPath . "\" . romName
      If (sevenZAttachSystemName = "true")
      {
        gameFolder := sevenZExtractPath . "\" . systemName . "\" . romName
      }
    }
    
    ; Set variables
    gameType := ""
    gameSerial := ""
    originalRomPath := romPath
    gameDirectoryJunction := "false"
    gamePPU := "false"
    gamePPUromPath := romPath . "\cache\" . romName . "_" . A_ComputerName . ".7z"
    gamePPUemuPath := emuPath . "\cache"
    gameDATA := "false"
    gameDATAromPath := romPath . "\data\" . romName . "_data.7z"
    gameDATAemuPath := emuPath . "\dev_hdd0\game"
    
    ; Extract PPU files if they exist
    If (sevenZEnabled = "true" && Fileexist(gamePPUromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gamePPUromPath%" -aos -o"%gamePPUemuPath%", , Hide
      gamePPU := "true"
    }
    
    ; Extract Game Data files if they exist
    If (sevenZEnabled = "true" && Fileexist(gameDATAromPath))
    {
      RunWait, %ComSpec% /c ""%sevenZPath%" x "%gameDATAromPath%" -aos -o"%gameDATAemuPath%", , Hide
      gameDATA := "true"
    }
    
    7z(romPath, romName, romExtension, sevenZExtractPath)
    
    If (romExtension = ".lnk")
    {
      FileGetShortCut, %romPath%\%romName%%romExtension%, shortcutTarget
      StringReplace, romPath, shortcutTarget, \EBOOT.BIN
    }
    
    ; Find the game location and determine the type of game (disc or hdd)
    StringRight, stringTest, romPath, 6
    If (stringTest = "USRDIR")
    {
      gameType := "game"
      StringReplace, gameFolder, romPath, \USRDIR
      StringRight, stringTest, gameFolder, 8
      If (stringTest = "PS3_GAME")
      {
        gameType := "disc"
        StringReplace, gameFolder, gameFolder, \PS3_GAME
      }
      If (sevenZEnabled != "true")
      {
        StringRight, gameSerial, gameFolder, 9
        
        ; Create the directory junction
        If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
        {
          If (gameSerial != "" && gameType != "")
          {
            RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
            gameDirectoryJunction := "true"
          }
          Else
          {
            ScriptError("Game serial not found. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
          }
        }
      }
    }
    Else If (sevenZEnabled = "true" && (romPath = originalRomPath || romPath = ""))
    {
      ScriptError("Rom was not found in the USRDIR directory. Please make sure ""bin"" is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Run the game
    If (Fileexist(romPath . "\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . romPath . "\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . ".BIN"))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . ".BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN"))
    {
      primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\PS3_GAME\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN"))
    {
        primaryExe.Run(" """ . emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial . "\USRDIR\EBOOT.BIN""")
    }
    Else If (Fileexist(romPath . "\" . romName . romExtension))
    {
      primaryExe.Run(" """ . romPath . "\" . romName . romExtension . """")
    }
    Else
    {
      ScriptError("Unable to find EBOOT.BIN file. Please make sure ""bin"" (and ""lnk"" [LNK] if you are loading from shortcuts) is an RPCS3 extension and also verify the folder structure of your rom.")
    }
    
    ; Waiting for main emulator window
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.Active()
    emuPrimaryWindow.WaitActive()
    
    If (sevenZEnabled = "true")
    {
      ; Find the game serial
      If (Fileexist(emuPath . "\games.yml") && gameSerial = "")
      {
        Loop, read, %emuPath%\games.yml
        {
          StringReplace, gameLine, A_LoopReadLine, /, \, All
          IfInString, gameLine, %gameFolder%
          {
            StringLeft, gameSerial, gameLine, 9
            break
          }
        }
      }
    
      ; Create the directory junction
      If (!Fileexist(emuPath . "\dev_hdd0\" . gameType . "\" . gameSerial))
      {
        If (gameSerial != "" && gameType != "")
        {
          RunWait, %ComSpec% /c "mklink /J "%emuPath%\dev_hdd0\%gameType%\%gameSerial%" "%gameFolder%", , Hide
          gameDirectoryJunction := "true"
        }
        Else
        {
          ScriptError("Game serial not found in your RPCS3 games.yml file. If this is your first time loading this game, please check that its game serial and path were added to the games.yml file and try running again.")
        }
      }
    }
    
    ; Waiting 5 seconds to see if compiling window appears
    If (gameSerial != "" && gamePPU != "true")
    {
      WinWait, Compiling, , 5000
      If (!ErrorLevel)
      {
        WinWaitClose, Compiling
      }
    }
    
    ; Waiting for emulator game window
    emuGameWindow.Wait()
    emuGameWindow.Active()
    emuGameWindow.WaitActive()
    
    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    7zCleanUp()
    
    ; Remove the directory junction
    If (gameDirectoryJunction = "true")
    {
      RunWait, %ComSpec% /c "rmdir "%emuPath%\dev_hdd0\%gameType%\%gameSerial%", , Hide
    }
    
    ; Remove the PPU files if they were extracted or creates PPU compressed file if needed
    If (gamePPU = "true")
    {
      If (gameSerial != "")
      {
        FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
      }
    }
    Else If (sevenZEnabled = "true")
    {
      IfExist, %gamePPUemuPath%\%gameSerial%
      {
        IfNotExist, %gamePPUromPath%
        {
          If (gameSerial != "")
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gamePPUromPath%" "%gamePPUemuPath%\%gameSerial%", , Hide
            FileRemoveDir, %gamePPUemuPath%\%gameSerial%, 1
          }
        }
      }
    }
    
    ; Remove the Game Data files if they were extracted or creates Game Data compressed file if needed
    If (gameDATA = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    Else If (sevenZEnabled = "true")
    {
      If (gameSerial != "")
      {
        IfExist, %gameDATAemuPath%\%gameSerial%
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%, 1
        }
        IfExist, %gameDATAemuPath%\%gameSerial%GAMEDATA
        {
          IfNotExist, %gameDATAromPath%
          {
            RunWait, %ComSpec% /c ""%sevenZPath%" a "%gameDATAromPath%" "%gameDATAemuPath%\%gameSerial%GAMEDATA" -mx=0, , Hide
          }
          FileRemoveDir, %gameDATAemuPath%\%gameSerial%GAMEDATA, 1
        }
      }
    }
    
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    CloseProcess:
      FadeOutStart()
      emuGameWindow.Close()
      Process, Close, %executable%
    Return
    
    BezelLabel:
      disableHideBorder := "true"
      disableHideTitleBar := "true"
      disableHideToggleMenu := "true"
    return
    Added additional error checking.
    With this latest version I am having the emulator not close along with the fade,but everything loads correctly.BTW I'm using the shortcut method.
     

  20. Collapse Details
    Re: Rpcs3 
    Senior Member

    MainSecondary
    Join Date
    Jan 2015
    Posts
    158
    That would be great. With the 7z compression method the emulator won’t be able to audit the games correct?
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •