RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
15.14k stars 1.89k forks source link

RPCS3 does not accept - when using elf arg #8926

Open illusion0001 opened 3 years ago

illusion0001 commented 3 years ago

Unreal Engine 3 titles have command line parameters left in the executable that has -- or - prefixes for frostbite and homebrew apps. + for source engine games.

These don't work on the emulator when passed as --novsync for example gets accepted as emulator parameter. rpcs3.exe eboot.bin --novsync

https://docs.unrealengine.com/udk/Three/CommandLineArguments.html

Megamouse commented 3 years ago

try rpcs3.exe "F:\example-folder\USRDIR\EBOOT.BIN --novsync"

illusion0001 commented 3 years ago

That does absolutely nothing, doesn't launch the game either. Just opens the emulator

dio-gh commented 3 years ago

Would be nice if that's how argument passing to guest applications worked though. On that note, RPCS3 being unable to consume the params passed and just a launching blank is pretty annoying, and can cause an issue while scripting things, so would be nice if that could be fixed in the same go.

bevanweiss commented 3 years ago

Would there be any issue if the command line changed to be strictly: rpcs3 [{rpcs3 options}] {app path} [{app options}]

I've got a bit of an idea that I'll try out on Friday

RipleyTom commented 3 years ago

Cargo(build system for rust) handles this by using a separator '--' between the arguments for cargo and the arguments for the application. cargo run --release -- --this_is_passed_to_app for example.

bevanweiss commented 3 years ago

The PR will accept stuff like: rpcs3 --no-gui --hidpi=1 "C:\Games\GameHere\EBOOT.BIN" --vsync -no-dogs -etc -etc

The first parts get sent to the rpcs3 side of things, the bootROM path passed to the emulator as the boot path, and the rest of the stuff at the end just gets passed as args to the boot ROM.

One other thing I added was another pathway for if the following was used instead: rpcs3 --no-gui --hidpi=1 [BLE080123] --vsync -no-dogs -etc -etc

Which currently doesn't do much interesting... but eventually I think it should be able to launch a game (from the game list) based on the title id. The key requirement would be the square brackets, which shouldn't be much of a limitation in regards to pathnames anyway.

elad335 commented 3 years ago

It was probably a bad idea to pass PS3 CLI arguments using the same interface as other rpcs3 CLI arguments, see #10247.

SilverBeamx commented 2 years ago

I too would need to pass "-" prefaced arguments to a game's executable. Any hope the above PR might get merged? Thanks in advance

Margen67 commented 1 year ago

This makes passing CLI args almost impossible.

Margen67 commented 1 year ago

I've found a workaround that involves Cheat Engine:

  1. Launch the game with some garbage argument that's guaranteed to not be anywhere else (i.e. 42069aaaa)
  2. Before PPU/SPU compilation has finished, go into the rpcs3 debugger and pause the main thread.
  3. Search for the launch args (String) you provided.
  4. Now you can change them to what you want.
  5. Since you have the address(es) you no longer need to launch rpcs3 from cli. Just pause the main thread and change the value to what you want in Cheat Engine as mentioned before.

I only tried this with The Orange Box, but it should work with any game.