problem with command line switches
#1
Having a rather simple problem. I use advanced launcher in xbmc to launch ps2 games through pcsx2. Basically it just sends a launch command using command line switches. Pretty simple stuff. The problem I'm having is one of my switches aren't working.

Firstly I will just go through the way my games folder structure to makes things easy:

Game\game.iso
Game\files\PCSX2_ui.ini
Game\files\memCard.ps2

So every game has it's own config file and memory card, which are both always named the same thing. I auto generate the config files for each game so that they always contain the correct pointers to the memory card.

Now that all that is out of the way I can go to my exact problem, the following is my launch command:

--cfg="%rompath%\files\PCSX2_ui.ini" --nogui --fullscreen "%rom%"

Advanced launcher %rompath% to the path of the iso and %rom% to the path and filename of the iso.

The problem I'm having is that PCSX2 is using the default config file rather than the specified config file. Anyone know what I'm doing wrong?
Reply

Sponsored links

#2
Well, PCSX2 0.97 (r3878) had a single pcsx2.ini for which --cfg worked. However, 0.98 (r4600) has two main ini files: pcsx_vm.ini and pcsx_ui.ini . I'm not sure --cfg can be used properly with 2 ini files instead of one (haven't tested it though, it might work somehow or might be broken).

You can, however, use --cfgpath="path\to\inis\folder" which might work better, and will probably make the plugins to use that folder as well (for their ini files).

However, it might behave slightly different in portable mode vs installed mode. My suggestion would be to use portable mode, and use absolute paths within the ini files themselves.

Let us know how it worked out eventually.
Reply
#3
Still can't get it to go. Did all your suggestions and double checked that the config files were all pointing to the correct spots but cpsx2 (r4600) just seems to completely ignore the config file. The following is the exact command I was putting into the command line:

E:\PS2\Emulator\PCSX2\pcsx2-r4600.exe --cfgpath="E:\PS2\Games\The Nightmare Tower of Druaga\files" --nogui --fullscreen "E:\PS2\Games\The Nightmare Tower of Druaga\The Nightmare Tower of Druaga.iso"

The behavior exhibited by r4600 was to ignore the config files and use the ones found in its "inis" directory, creating them if they weren't there.

For now I am going to make a small launcher script to move files around during launch, it'll fix my issue but hardly an ideal solution.
Reply
#4
Also, try taking the "quotes" off the path to the inis.
Last I knew, it wouldn't take it with "quotes". Smile
Reply
#5
In the switches? That's not going to work, anything with a space or a dash will break it (and I just tested and found that to be true).

I've just finished up writing and testing my script now. Works a treat but won't function too well if pcsx2 crashes (or if the script itself does but not much room for that to happen).
Reply
#6
Other than following Rezard's recommendation, I'd also try (at least for the sake of this test) to use a path without spaces (and without using the quotes). Also, how exactly is it "just seems to completely ignore the config file"? care to post your config files as well?
Reply
#7
The inis folder path can't be in "quotes".

http://forums.pcsx2.net/Thread-Auto-Boot...Separately

"C:\Games\Playstation 2\PCSX2\pcsx2-r4600.exe" "C:\Games\Playstation 2\Final Fantasy X.iso" --cfgpath=C:\Games\PCSX2-cfg\FFX-inis\

This will load the specified inis folder as desired.
If I add quotes to the ini folder path (i.e. if any folder(s) in that path have spaces), then it will not work.

If that still gives you trouble, try putting the ISO right after the PCSX2 path, as per Air's recommended syntax:

Syntax: pcsx2 [IsoFile] --toggle --option=value ... etc
Reply
#8
Okay I've just tried for a game with no space, the game is baroque and I launched using the following command:
E:\PS2\Emulator\PCSX2\pcsx2-r4600.exe --cfgpath=E:\PS2\Games\Baroque\files --nogui --fullscreen "E:\PS2\Games\Baroque\Baroque.iso"

also just tried:

E:\PS2\Emulator\PCSX2\pcsx2-r4600.exe "E:\PS2\Games\Baroque\Baroque.iso" --cfgpath=E:\PS2\Games\Baroque\files --nogui --fullscreen

The contents of PCSX2_ui.ini can be found at: http://pastebin.com/sYzf5Pbz

The files that can be found at the path "E:\PS2\Games\Baroque\files" are:
Dev9null.ini
FWnull.ini
GSdx.ini
LilyPad.ini
memCard.ps2
PCSX2_ui.ini
PCSX2_vm.ini
SPU2-X.ini
USBnull.ini

I've got 2 indications that PCSX2 aren't using the config files, they are as follows:
1 - PCSX2 will create config files in the default location (E:\PS2\Emulator\PCSX2\inis) if they aren't already there
2 - Memory card has no game information, indicating it isn't the memory card found at: E:\PS2\Games\Baroque\files\memCard.ps2

Hmm I think I covered everything, just tell me if you have any ideas or need more information.
Reply
#9
Thanks for the detailed info.

Earlier I tried to use --cfgpath=full\path\to\inis (no spaces) and it seemed to work for me (just watched a single config value change, didn't look at memcards).

You might need these values set to disabled, for the custom folders to actually be used:
Code:
...
UseDefaultBios=enabled
UseDefaultSnapshots=enabled
UseDefaultSavestates=enabled
UseDefaultMemoryCards=enabled
UseDefaultLogs=enabled
UseDefaultLangs=enabled
...

Also, you didn't write if you used portable mode (--portable or put portable.ini file at the same folder as pcsx2.exe), it might affect how/where the values are read.

And finally, yes, the command line arguments might be buggy. If you get to any conclusions beyond the notes which Rezard linked to, please post them here. Thanks.

Keep us updated.
Reply
#10
dang it! Those were originally disabled but while testing I used altered a freshly generated ini by PCSX2 to try eliminate errors. It's working now (in portable mode). The following 2 commands worked:

E:\PS2\Emulator\PCSX2\pcsx2-r4600.exe "E:\PS2\Games\Baroque\Baroque.iso" --cfgpath=E:\PS2\Games\Baroque\files --nogui --fullscreen
E:\PS2\Emulator\PCSX2\pcsx2-r4600.exe "E:\PS2\Games\Persona 3 FES\Persona 3 FES.iso" --cfgpath="E:\PS2\Games\Persona 3 FES\files" --nogui --fullscreen

(just note that I added quotes in the second command)

The following doesn't (which is what I was originally using):

E:\PS2\Emulator\PCSX2\pcsx2-r4600.exe --cfgpath="E:\PS2\Games\Persona 3 FES\files" --nogui --fullscreen "E:\PS2\Games\Persona 3 FES\Persona 3 FES.iso"

Thanks a lot for your help.
Reply




Users browsing this thread: 1 Guest(s)