Difference between revisions of "Command-line support"

From PCSX2 Wiki
Jump to navigation Jump to search
m
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
You can activate certain options when launching ''pcsx2.exe'' from the command line on Windows, or the terminal on a Linux environment, those options are called ''arguments'', wich are described below
+
You can specify certain options when launching ''pcsx2.exe'' from the command-line under Windows, or the terminal in Linux environment.
  
 
=Introduction=
 
=Introduction=
PCSX2 versions 0.9.7 and higher have full commandline support, announced on [http://forums.pcsx2.net/Thread-blog-The-return-of-the-Commandline?pid=118520#pid118520 The return of the Commandline!] blog entry.
+
PCSX2 versions 0.9.7 and higher have full command-line support, announced on [http://pcsx2.net/developer-blog/198-the-return-of-the-commandline.html The return of the Commandline!] blog entry.
  
Those command line options can be added to a shortcut. That means you can have as many shortcuts to ''pcsx2.exe'' with different options and settings as you need.
 
  
 
=Syntax=
 
=Syntax=
You should use the following format:
+
The following format can be used to launch PCSX2:
<code>
 
:pcsx2.exe ''"IsoFile" --option="value"''
 
</code>
 
  
Where:
+
:pcsx2.exe "'''IsoFile'''" --'''OptionName'''="'''OptionParameter'''" --'''Option2Name'''="'''Option2Parameter'''" ...
* <code>IsoFile</code> is the image file of the PS2 to be loaded. Remember to include full path between ( " ) and the file extension.
 
* <code>--option</code> is the argument used to active a certain option. Read below for the full list.
 
* <code>value</code> determines certain parameters needed for some options. Should be included betwen (''"'') and follow a (''='') symbol.
 
  
'''Example: '''  
+
* '''IsoFile''' is the image file of the PS2 game to be loaded (with full path and extension).
<code> c:\PCSX2\pcsx2.exe  "c:\PS2\Final Fantasy X.iso" --fullscreen --cfgpath="c:\My Configs\FFX" </code>
+
* '''OptionName''' specifies the option to be activated.
 +
* '''OptionValue''' is used for the options that require some additional parameters. Do not forget to include these parameters inside quote signs ('''"''').
 +
 
 +
Example:<br />
 +
''c:\PCSX2\pcsx2.exe  "c:\PS2\Final Fantasy X.iso" --fullscreen --cfgpath="c:\My Configs\FFX"''
 +
 
 +
The ISO file ''Final Fantasy X.iso'' will be launched in full screen mode automatically after PCSX2 is started. The plugin configuration files will to be loaded from the specified folder (''c:\My Configs\FFX'').
 +
{{Tip|It is possible to make a short-cut with predefined command-line parameters and place in on desktop to launch your current PS2 game directly from your desktop.}}
  
When running that line from the command prompt of Windows, or the terminal on Linux systems, PCSX2 is going to open Final Fantasy X, run it on full screen, and the plugin configuration files are going to he loaded from the folder specified folder, in this case: ''c:\My Configs\FFX''.
 
  
 
=Options list=
 
=Options list=
Remember that the path to the PS2 image file to use have to be '''before''' any option (unless you use the <code>--usecd </code> , <code>--nodisk</code>  or <code>--elf="''file''"</code> option.
+
Note that you can only specify ISO image name in the first command-line option. But you can also skip ISO image name altogether and, for instance, use ''--usecd'', ''--nodisk'' or ''--elf="'''ELFFileName'''"'' options.
 +
 
 +
At this time you can only use the following options:
 +
 
 +
==General Options==
 +
* ''--cfgpath="'''Path'''"'': Specifies the configuration files path to use instead of '''inis'''.
 +
* ''--cfg="'''CFGFile'''"'': Specifies the configuration file to use instead of PCSX2.ini (does not affect plugins)
 +
* ''--forcewiz'': Forces PCSX2 to start in the ''first time wizard'' mode.
 +
* ''--portable'': Enables portable mode to store ini and cfg the data to local PCSX2 paths instead of current user's documents path (This requires admin/root access).
 +
* ''--console'': Forces PCSX2 ''log console'' to be visible.
 +
* ''--fullscreen'': Starts in fullscreen mode.
 +
* ''--windowed'': Starts in windowed mode (default).
 +
* ''--nogui'': Disables display of the graphical user interface (you can combine it with ''--fullscreen'' when loading an ISO file, so PCSX2 presence will be hidden from the user)
 +
* ''-h'' or ''--help'': Displays full list of command-line options (this list).
  
The full list of options are:
+
==Auto-run Options==
 +
* ''--elf="'''ELFFile'''"'': Executes the specified ELF image on start.
 +
* ''--nodisc'': Boots PS2 BIOS without DVD image; It is usedful to enter the PS2 system menu.
 +
* ''--usecd'': Boots from the CDVD plugin on start (overrides '''IsoFile''' parameter). You can use this option to play directly from your DVD but you will need to set up CDVD plugin first.
  
'''General Options'''
+
==Compatibility Options==
* <code>--cfgpath="''path''"</code> Changes the configuration files path.
+
* ''--nohacks'': Disables all speedhacks.
* <code>--cfg="''file''"</code> Specifies the PCSX2 configuration file to use.
+
* ''--gamefixes='''[fix1,fix2,...]''''': Enables the specific gamefixes for the current PCSX2 session. Valid names are: '''VuAddSub''', '''VuClipFlag''', '''FpuCompare''', '''FpuMul''', '''FpuNeg''', '''EETiming''', '''SkipMpeg''', '''OPHFlag''', '''DMABusy''', '''VIFFIFO''', '''VI''', '''FMVinSoftware''' (see [[PCSX2]] for more information).
* <code>--forcewiz</code> Forces PCSX2 to start the First-time Wizard.
+
* ''--fullboot'': Disables fast booting (does not skip PS2 BIOS when booting an ISO, this may require by some games relying on BIOS to get start-up parameters)
* <code>--portable</code> Enables portable mode operation (requires admin/root access).
 
* <code>--console</code>  Forces the program log/console to be visible.
 
* <code>--fullscreen</code> Use fullscreen GS mode.
 
* <code>--windowed</code> Use windowed GS mode.
 
* <code>--nogui</code> Disables display of the graphical user interface.
 
* <code>-h, --help</code> Displays this list of command line options.
 
  
'''Auto-Run Options'''
+
==Plugin Overrides==
* <code>--elf="''file''"</code> Executes an ELF image.
+
* ''--gs="'''DLLpath'''"'': Specifies the file to use as the GS plugin.
* <code>--nodisc</code> Boots an empty dvd tray; use to enter the PS2 system menu.
+
* ''--pad="'''DLLpath'''"'': Specifies the file to use as the PAD plugin.
* <code>--usecd</code> Boots from the CDVD plugin (overrides IsoFile parameter).
+
* ''--spu2="'''DLLpath'''"'': Specifies the file to use the SPU2 plugin.
 +
* ''--cdvd="'''DLLpath'''"'': Specifies the file to use as the CDVD plugin.
 +
* ''--usb="'''DLLpath'''"'': Specifies the file to use as the USB plugin.
 +
* ''--fw="'''DLLpath'''"'': Specifies the file to use as the FW plugin.
 +
* ''--dev9="'''DLLpath'''"'': Specifies the file to use as the DEV9 plugin.
  
'''Compatibility Options'''
 
* <code>--nohacks</code> Disables all speedhacks.
 
* <code>--gamefixes=[fix,fix]</code> Enable specific gamefixes for this session. Valid fixes are: VuAddSub, VuClipFlag, FpuCompare, FpuMul, FpuNeg, EETiming, SkipMpeg, OPHFlag, DMABusy, VIFFIFO, VI, FMVinSoftware.
 
* <code>--fullboot</code> Disables fast booting.
 
'''Plugin Overrides'''
 
* <code>--gs="''dllpath''"</code> Specify the file to use as the GS plugin}.
 
* <code>--pad="''dllpath''"</code> Specify the file to use as the PAD plugin.
 
* <code>--spu2="''dllpath''"</code> Specify the file to use the SPU2 plugin.
 
* <code>--cdvd="''dllpath''"</code> Specify the file to use as the CDVD plugin.
 
* <code>--usb="''dllpath''"</code> Specify the file to use as the USB plugin.
 
* <code>--fw="''dllpath''"</code> Specify the file to use as the FW plugin.
 
* <code>--dev9="''dllpath''"</code> Specify the file to use as the DEV9 plugin.
 
  
=Commandline options and shortcuts=
+
=Command-line options and shortcuts=
The ordinary user may use this to create a shortcut to his/her game on the desktop so that PCSX2 will run the game immediately. To do this make a link to PCSX2 main executable (pcsx2.exe) and update the '''target''' field of this link, it will look something like:
+
The ordinary user may use command-line feature to create a shortcut to his/her game on the desktop so that PCSX2 will run without showing PCSX2 GUI at all. To do this make a link to PCSX2 main executable (pcsx2.exe) and update the '''target''' field of this link to something like this ''"C:\PS2\pcsx2.exe" -skipbios "C:\PS2\yourgame.iso"''.
:<code>"C:\PS2\pcsx2.exe" -skipbios "C:\PS2\yourgame.iso"</code>
+
Now you are able to start '''C:\PS2\yourgame.iso''' right from your desktop!
And thus you'll be able to start '''C:\PS2\yourgame.iso''' right from your desktop!
 
 
{{Tip|If you have different games that need different emulation settings and/or plugins configuration, consider making as many shortcuts as you need with custom settings, or use an external launcher as described on this guide.}}
 
{{Tip|If you have different games that need different emulation settings and/or plugins configuration, consider making as many shortcuts as you need with custom settings, or use an external launcher as described on this guide.}}
  
=Commandline options and Steam=
+
 
 +
=Command-line options and Steam=
 
[[image:Steam guide 4.png|400px|thumb|left|Click to enlarge.]]
 
[[image:Steam guide 4.png|400px|thumb|left|Click to enlarge.]]
Using command line arguments, you can use Steam as an external launcher for your PS2 games.
+
Command-line options are the key if you want to use Steam as an external launcher for your PS2 games.<br />
Here is a step by step guide on how to do so (you may repeat this process to add as many games as you want):
+
Below is a step by step guide on how to do this (you may repeat this process to add as many games as you want):
 
{{Clear new paragraph}}
 
{{Clear new paragraph}}
:'''1)''' On the Steam user interface go to ''Games => Add a non-steam game''.
+
:'''1)''' Go to ''Games'' => ''Add a non-steam game'' in the Steam user interface main menu.
 
:[[image:Steam guide 1.png]]
 
:[[image:Steam guide 1.png]]
  
 
:'''2)''' Click on ''Browse'' and locate ''pcsx2.exe''. Click on ''Add selected program''. '''It is important''' that you add ''pscx2.exe'' this way (rather than picking it from the list) so you can add more shortcuts later on.
 
:'''2)''' Click on ''Browse'' and locate ''pcsx2.exe''. Click on ''Add selected program''. '''It is important''' that you add ''pscx2.exe'' this way (rather than picking it from the list) so you can add more shortcuts later on.
  
:'''3)''' You will find ''psx2'' added to your game library. Open its properties.
+
:'''3)''' Now that ''pcsx2'' is added to your game library, open its properties.
 
:[[image:Steam guide 2.png]]
 
:[[image:Steam guide 2.png]]
  
:'''4)''' On the target field, insert the full command for your game. In this case, it's important to insert the path to pscx2.exe between (''"'') symbol.
+
:'''4)''' You can specify all described options and your ISO file name in the ''Target'' field. Do not remove quote signs ('''"''') from pcsx2.exe specification part (automatically added by Steam).
 
:[[image:Steam guide 3.png|400px]]
 
:[[image:Steam guide 3.png|400px]]
  
 
Optional steps:
 
Optional steps:
  
:'''5''') You can choose custom icons for the shortcuts. Such icon should be embedded on an .exe file, or it has to be a png image (preferably square dimensions).
+
:'''5''') You can choose custom icons for the shortcuts. These icons should be embedded on an .exe/.dll file, or have to be a PNG image (with preferably square resolution proportion).
  
 
:'''6)''' If you use ''Big Picture'' mode or grid display, you can set a custom banner for the game.  
 
:'''6)''' If you use ''Big Picture'' mode or grid display, you can set a custom banner for the game.  
:It has to be a png image with 460 x 215 size.
+
:It has to be a PNG image with 460 x 215 resolution.
 
{{Tip|
 
{{Tip|
 
You can find custom banners on the following sites:
 
You can find custom banners on the following sites:
<br />[http://www.consolegrid.com/ Console Grid]
+
*[http://www.consolegrid.com/ Console Grid]
<br />[http://www.reddit.com/r/steamgrid/ Steam Grid (Reddit)]
+
*[http://www.reddit.com/r/steamgrid/ Steam Grid (Reddit)]
<br />[http://steambanners.booru.org/ Steambanners]
+
*[http://steambanners.booru.org/ Steambanners]
 
}}
 
}}
:'''7)''' Background images are taken from the Steam screenshots folder (taken with the ''F12'' hotkey).
+
:'''7)''' By default, games added to Steam client in this manner do not have background images on their details pages. But any screenshots you take while playing a game using Steam (''F12'' '''Steam''' hotkey), are automatically used later as the background image for that game. Bear in mind though that ''F12'' key is also the movie capture shortcut in '''GSdx''' PCSX2 plugin, so you additionally will need to click ''Cancel'' when the movie capture dialog appears or edit the PCSX2_keys.ini file to assign that action to another key.
 +
 
 +
:'''8)''' You can also create a custom category like ''Playstation 2'', to group your PS2 games.
  
:'''8)''' You can also create a custom category named ''Playstation 2'', to group your PS2 games.
+
:'''9)''' If you use the ''big picture'' mode, you can also assign hot-keys to your controller (for example, to close the emulator). Learn more in this [http://forums.pcsx2.net/Thread-PCSX2-Steam-Command-Line-Switches?pid=327428#pid327428 forum post]
  
This image shows a shortcut added following all those steps, along with other shortcuts on a ''Playstation 2'' category
+
The following image shows the result of the above manipulations for [[Shinobido: Way Of The Ninja]] (click to enlarge):
  
 
:[[image:Steam guide 5.png|400px]]
 
:[[image:Steam guide 5.png|400px]]
  
 
{{Tip|
 
{{Tip|
There is an open source proyect called ICE, that automatically adds your console games to Steam library.
+
There is an open source project called ICE, that allows you to easily add your PS2/console games to Steam library. You can find it at [http://scottrice.github.io/Ice/ http://scottrice.github.io/Ice]<br />
<br />You can find it at [http://scottrice.github.io/Ice/ http://scottrice.github.io/Ice]
+
'''Please read its documentation carefully before using it.'''}}
<br />'''Please read its documentation carefully before using it.'''}}
 
:'''9)''' If you use big Picture mode, or you use PCSX2 away from uour keyboard, you can assign hotkeys to your controller (for example, to close the emulator). Learn more on this [http://forums.pcsx2.net/Thread-PCSX2-Wiki-collaboration-thread post]
 
  
 
=Commandline options and XBMC=
 
=Commandline options and XBMC=
  
Information on using ''XBMC'' as an external ''PCSX2'' launcher can be found on the following forum [http://forums.pcsx2.net/Thread-PCSX2-Steam-Command-Line-Switches?pid=327428#pid327428 thread].
+
Information on using ''XBMC'' as an external PCSX2 launcher can be found in the following forum [http://forums.pcsx2.net/Thread-PCSX2-and-XBMC-Advanced-Launcher thread].
  
 
{{General articles}}
 
{{General articles}}

Latest revision as of 04:13, 12 September 2017

You can specify certain options when launching pcsx2.exe from the command-line under Windows, or the terminal in Linux environment.

Introduction

PCSX2 versions 0.9.7 and higher have full command-line support, announced on The return of the Commandline! blog entry.


Syntax

The following format can be used to launch PCSX2:

pcsx2.exe "IsoFile" --OptionName="OptionParameter" --Option2Name="Option2Parameter" ...
  • IsoFile is the image file of the PS2 game to be loaded (with full path and extension).
  • OptionName specifies the option to be activated.
  • OptionValue is used for the options that require some additional parameters. Do not forget to include these parameters inside quote signs (").

Example:
c:\PCSX2\pcsx2.exe "c:\PS2\Final Fantasy X.iso" --fullscreen --cfgpath="c:\My Configs\FFX"

The ISO file Final Fantasy X.iso will be launched in full screen mode automatically after PCSX2 is started. The plugin configuration files will to be loaded from the specified folder (c:\My Configs\FFX).

Lightbulb.png Tip:
It is possible to make a short-cut with predefined command-line parameters and place in on desktop to launch your current PS2 game directly from your desktop.


Options list

Note that you can only specify ISO image name in the first command-line option. But you can also skip ISO image name altogether and, for instance, use --usecd, --nodisk or --elf="ELFFileName" options.

At this time you can only use the following options:

General Options

  • --cfgpath="Path": Specifies the configuration files path to use instead of inis.
  • --cfg="CFGFile": Specifies the configuration file to use instead of PCSX2.ini (does not affect plugins)
  • --forcewiz: Forces PCSX2 to start in the first time wizard mode.
  • --portable: Enables portable mode to store ini and cfg the data to local PCSX2 paths instead of current user's documents path (This requires admin/root access).
  • --console: Forces PCSX2 log console to be visible.
  • --fullscreen: Starts in fullscreen mode.
  • --windowed: Starts in windowed mode (default).
  • --nogui: Disables display of the graphical user interface (you can combine it with --fullscreen when loading an ISO file, so PCSX2 presence will be hidden from the user)
  • -h or --help: Displays full list of command-line options (this list).

Auto-run Options

  • --elf="ELFFile": Executes the specified ELF image on start.
  • --nodisc: Boots PS2 BIOS without DVD image; It is usedful to enter the PS2 system menu.
  • --usecd: Boots from the CDVD plugin on start (overrides IsoFile parameter). You can use this option to play directly from your DVD but you will need to set up CDVD plugin first.

Compatibility Options

  • --nohacks: Disables all speedhacks.
  • --gamefixes=[fix1,fix2,...]: Enables the specific gamefixes for the current PCSX2 session. Valid names are: VuAddSub, VuClipFlag, FpuCompare, FpuMul, FpuNeg, EETiming, SkipMpeg, OPHFlag, DMABusy, VIFFIFO, VI, FMVinSoftware (see PCSX2 for more information).
  • --fullboot: Disables fast booting (does not skip PS2 BIOS when booting an ISO, this may require by some games relying on BIOS to get start-up parameters)

Plugin Overrides

  • --gs="DLLpath": Specifies the file to use as the GS plugin.
  • --pad="DLLpath": Specifies the file to use as the PAD plugin.
  • --spu2="DLLpath": Specifies the file to use the SPU2 plugin.
  • --cdvd="DLLpath": Specifies the file to use as the CDVD plugin.
  • --usb="DLLpath": Specifies the file to use as the USB plugin.
  • --fw="DLLpath": Specifies the file to use as the FW plugin.
  • --dev9="DLLpath": Specifies the file to use as the DEV9 plugin.


Command-line options and shortcuts

The ordinary user may use command-line feature to create a shortcut to his/her game on the desktop so that PCSX2 will run without showing PCSX2 GUI at all. To do this make a link to PCSX2 main executable (pcsx2.exe) and update the target field of this link to something like this "C:\PS2\pcsx2.exe" -skipbios "C:\PS2\yourgame.iso". Now you are able to start C:\PS2\yourgame.iso right from your desktop!

Lightbulb.png Tip:
If you have different games that need different emulation settings and/or plugins configuration, consider making as many shortcuts as you need with custom settings, or use an external launcher as described on this guide.


Command-line options and Steam

Click to enlarge.

Command-line options are the key if you want to use Steam as an external launcher for your PS2 games.
Below is a step by step guide on how to do this (you may repeat this process to add as many games as you want):

 
1) Go to Games => Add a non-steam game in the Steam user interface main menu.
Steam guide 1.png
2) Click on Browse and locate pcsx2.exe. Click on Add selected program. It is important that you add pscx2.exe this way (rather than picking it from the list) so you can add more shortcuts later on.
3) Now that pcsx2 is added to your game library, open its properties.
Steam guide 2.png
4) You can specify all described options and your ISO file name in the Target field. Do not remove quote signs (") from pcsx2.exe specification part (automatically added by Steam).
Steam guide 3.png

Optional steps:

5) You can choose custom icons for the shortcuts. These icons should be embedded on an .exe/.dll file, or have to be a PNG image (with preferably square resolution proportion).
6) If you use Big Picture mode or grid display, you can set a custom banner for the game.
It has to be a PNG image with 460 x 215 resolution.
Lightbulb.png Tip:

You can find custom banners on the following sites:

7) By default, games added to Steam client in this manner do not have background images on their details pages. But any screenshots you take while playing a game using Steam (F12 Steam hotkey), are automatically used later as the background image for that game. Bear in mind though that F12 key is also the movie capture shortcut in GSdx PCSX2 plugin, so you additionally will need to click Cancel when the movie capture dialog appears or edit the PCSX2_keys.ini file to assign that action to another key.
8) You can also create a custom category like Playstation 2, to group your PS2 games.
9) If you use the big picture mode, you can also assign hot-keys to your controller (for example, to close the emulator). Learn more in this forum post

The following image shows the result of the above manipulations for Shinobido: Way Of The Ninja (click to enlarge):

Steam guide 5.png
Lightbulb.png Tip:

There is an open source project called ICE, that allows you to easily add your PS2/console games to Steam library. You can find it at http://scottrice.github.io/Ice

Please read its documentation carefully before using it.

Commandline options and XBMC

Information on using XBMC as an external PCSX2 launcher can be found in the following forum thread.