Attract-Mode Support Forum

Related Stuff => Emulators => Topic started by: SaltShakerOW on November 24, 2019, 03:37:52 PM

Title: How do I add PCSX2 to Attract Mode
Post by: SaltShakerOW on November 24, 2019, 03:37:52 PM
Sorry if I am bothering anyone with this stupid question but I have followed every guide out there and I am so confused on how to add PCSX2 to attract mode. Can anyone point me to another thread or walk me through it?
Title: Re: How do I add PCSX2 to Attract Mode
Post by: progets on November 24, 2019, 04:07:04 PM
Sony PlayStation 2.cfg (emulator configuration file)
Code: [Select]
# Generated by Attract-Mode v2.6.0
#
executable           \Emulators\PCSX2\pcsx2.exe
args                 --nogui --fullscreen --fullboot "[romfilename]"
rompath              \Roms\Sony PlayStation 2
romext               .cso
system               Sony Playstation 2
info_source          thegamesdb.net
Title: Re: How do I add PCSX2 to Attract Mode
Post by: bundangdon on December 19, 2019, 05:42:54 AM
Not sure what I'm doing wrong, and I think I've tried a few dozen different ways, but I can't get pcsx2 to work. I've used the configuration progets mentioned but the screen flashes for a second and returns to AttractMode. Any tips or ideas?
Title: Re: How do I add PCSX2 to Attract Mode
Post by: progets on December 19, 2019, 01:12:58 PM
Not sure what I'm doing wrong, and I think I've tried a few dozen different ways, but I can't get pcsx2 to work. I've used the configuration progets mentioned but the screen flashes for a second and returns to AttractMode. Any tips or ideas?

Do you have PCSX2 games working without using AttractMode?

Run attract-console.exe to see the output of what AttractMode is doing when you launch PS2 games in the FE. Post the results and your AM emulator file and let us know the location of pcsx2.exe and your PS2 roms.
Title: Re: How do I add PCSX2 to Attract Mode
Post by: bundangdon on December 19, 2019, 10:40:20 PM
Not sure what I'm doing wrong, and I think I've tried a few dozen different ways, but I can't get pcsx2 to work. I've used the configuration progets mentioned but the screen flashes for a second and returns to AttractMode. Any tips or ideas?

Do you have PCSX2 games working without using AttractMode?

Run attract-console.exe to see the output of what AttractMode is doing when you launch PS2 games in the FE. Post the results and your AM emulator file and let us know the location of pcsx2.exe and your PS2 roms.

Thanks a lot for the quick reply. I can use PCSX2 fine without AttractMode, and I wasn't able to find anything in the attract-console results. After playing around a little more, I found something wonky about the "rompath" in the emulators config. For example when I use this:

rompath      emulators\media\playstation2\files\  (location where playstation 2 games are, a subfolder of attractmode)
it doesn't work, but this rompath configuration works with all other emulators. And, when I use this:

rompath      C:\attractmode\emulators\media\playstation2\files\  (the specific location, but not good for portable setups)
it works fine :o

any ideas on how I can get the right folder/subfolder setup?

Title: Re: How do I add PCSX2 to Attract Mode
Post by: progets on December 20, 2019, 08:25:20 AM
try

Code: [Select]
rompath      .\emulators\media\playstation2\files

or

Code: [Select]
rompath      \attractmode\emulators\media\playstation2\files
Title: Re: How do I add PCSX2 to Attract Mode
Post by: bundangdon on December 20, 2019, 06:19:53 PM
try

Code: [Select]
rompath      .\emulators\media\playstation2\files

or

Code: [Select]
rompath      \attractmode\emulators\media\playstation2\files

Thanks again! Only the 2nd one worked, which implies that pcsx2 doesn't play well with relative paths I guess, or at least not for me :P
Title: Re: How do I add PCSX2 to Attract Mode
Post by: progets on December 20, 2019, 07:34:50 PM
Thanks again! Only the 2nd one worked, which implies that pcsx2 doesn't play well with relative paths I guess, or at least not for me :P

Doesn't that solve your portability issue?
Title: Re: How do I add PCSX2 to Attract Mode
Post by: bundangdon on December 20, 2019, 11:02:05 PM
Thanks again! Only the 2nd one worked, which implies that pcsx2 doesn't play well with relative paths I guess, or at least not for me :P

Doesn't that solve your portability issue?
In most cases yes, but in some cases no. As it's set up now and if the folder is put in the root of that drive (C, D, etc.) then there's no problem. But if it's inserted into another folder then it won't launch the games. For now this will work though :D
Title: Re: How do I add PCSX2 to Attract Mode
Post by: progets on December 20, 2019, 11:46:51 PM
In most cases yes, but in some cases no. As it's set up now and if the folder is put in the root of that drive (C, D, etc.) then there's no problem. But if it's inserted into another folder then it won't launch the games. For now this will work though :D

Agreed, there are differences between a relative path and a root path. I haven't tried relative paths with pcsx2 but whether it works or not could depend on the version of the emulator and/or the version or windows, I'm not using the latest of either.

I like root paths because they are relative, to the root, and don't seem to have issues with any systems I run. They aren't the best solution for everyone.

Some other options that might help but will also have similar limitations include:
- manually modify any emulator.cfg files needed when porting (not needed if just a drive moving around to different PCs or a port off the root of any volume)
- create a script that creates any needed symbolic links on a new machine
- create a script that prompts for path variables and modifies and AM emulator.cfg files as needed
 
Title: Re: How do I add PCSX2 to Attract Mode
Post by: bundangdon on December 21, 2019, 01:17:52 AM
In most cases yes, but in some cases no. As it's set up now and if the folder is put in the root of that drive (C, D, etc.) then there's no problem. But if it's inserted into another folder then it won't launch the games. For now this will work though :D

Agreed, there are differences between a relative path and a root path. I haven't tried relative paths with pcsx2 but whether it works or not could depend on the version of the emulator and/or the version or windows, I'm not using the latest of either.

I like root paths because they are relative, to the root, and don't seem to have issues with any systems I run. They aren't the best solution for everyone.

Some other options that might help but will also have similar limitations include:
- manually modify any emulator.cfg files needed when porting (not needed if just a drive moving around to different PCs or a port off the root of any volume)
- create a script that creates any needed symbolic links on a new machine
- create a script that prompts for path variables and modifies and AM emulator.cfg files as needed

Thanks again for the advice. I'll keep all of that in mind when it comes time to moving files around. But as of now the only issue in terms of *true* portability is with this emulator, pcsx2, so I wouldn't consider it a serious obstacle
Title: Re: How do I add PCSX2 to Attract Mode
Post by: PSOGene on January 15, 2020, 10:35:49 PM
is there way to hide the log text when launching ps2 emulator because I really like to hide it without its showing up
this also happen when i have my attract mode in full screen as well

(https://i.imgur.com/bZtcQ3U.png)
Title: Re: How do I add PCSX2 to Attract Mode
Post by: Sea Monkey on February 22, 2020, 03:36:47 PM
is there way to hide the log text when launching ps2 emulator

Sony PlayStation 2.cfg (emulator configuration file)
# Generated by Attract-Mode v2.6.0
#
executable           \Emulators\PCSX2\pcsx2.exe
args                 --nogui --fullscreen --fullboot "[romfilename]"
rompath              \Roms\Sony PlayStation 2
romext               .cso
system               Sony Playstation 2
info_source          thegamesdb.net
Title: Re: How do I add PCSX2 to Attract Mode
Post by: Sea Monkey on February 22, 2020, 03:50:40 PM
I've recently migrated my primary system from Windows to Linux and would like to get per-game profiles working with PS2 via Attract Mode.  I previously accomplished this by using RocketLauncher with the PCSX2 AutoHotkey module.  I'm not much of a coder, and I'm sure someone else could accomplish porting this over to a bash script that could be used in place of launching PCSX2 directly.  Anyhow, here's the PCSX2 module for RocketLauncher if anyone wants to take a shot at it.

Title: Re: How do I add PCSX2 to Attract Mode
Post by: hermine.potter on February 28, 2020, 07:16:51 PM
@ Sea Monkey
Are you using Linux (because of bash?!) or do you use Windows (cmd / commandline)?

On Linux you can autogenerate profiles per game and set it to frontend.
here (https://retropie.org.uk/forum/topic/13727/individual-per-game-profiles-for-pcsx2-x86-only)
here (https://www.youtube.com/watch?v=j1I0QxEvV4Q)
Title: Re: How do I add PCSX2 to Attract Mode
Post by: Sea Monkey on March 14, 2020, 08:20:58 AM
here (https://retropie.org.uk/forum/topic/13727/individual-per-game-profiles-for-pcsx2-x86-only)

Compiling of psisotool failed in Mint 19.3, but if I could get the script to simply use the .gz filename as the folder name for the config, that would be fine.  That was actually my initial plan anyhow.

https://pastebin.com/i28yjYx4
Title: Re: How do I add PCSX2 to Attract Mode
Post by: Sea Monkey on March 14, 2020, 07:51:28 PM
Here's what I cobbled together.  attract must be launched via terminal to work correctly with this script.  Alternatively, you can modify the .desktop file and change `Terminal=false` to `Terminal=true`.

Code: [Select]
#!/bin/bash
## This script makes it possible to use individual per game configuration files for PCSX2.
## Make sure your default PCSX2_ui.ini has Slot1_Filename set to default.ps2.
## This script only seems to work correctly with Attract Mode when attract is launched via terminal.
## Works with PCSX2 1.5.0.
## Credit to parasven for the RetroPie script that was the basis for this.

pcsx2_ini="$HOME/.config/PCSX2/PCSX2-reg.ini"
game_configpath="$HOME/.config/PCSX2/game_configs"
memcardpath="$HOME/.config/PCSX2/memcards"
pcsx2_config_default="$HOME/.config/PCSX2/inis"
fullfilename=$1
filename=$(basename "$fullfilename")
title_id="${filename%.*}"
memcard="$title_id.ps2"

## If no parameter was passed, set default path and exit.
if [[ ! $1 ]]
then
        ## Exchange the configpath
        sed -i s@"^SettingsFolder=.*"@"SettingsFolder=\"$pcsx2_config_default\""@g "$pcsx2_ini"
        exit
fi

## When the config folder does not exist, create it and copy over the default inis from the default ini folder.
if [[ ! -e "$game_configpath/$title_id"  ]]
then
        ## Create folder based on the filename of the game.
        mkdir -p "$game_configpath/$title_id/"
        ## Copy over the default inis from default directory for a start.
        cp -a "$pcsx2_config_default"/*.ini "$game_configpath/$title_id/"
fi

## If game-specific memory card does not exist, then create it using blank default.
if [[ ! -e "$memcardpath/$memcard"  ]]
then
        ## Copy default memcard
        cp "$memcardpath"/default.ps2 "$memcardpath/$memcard"
fi

echo "memcard = $memcard"

# Load relevant memory card.
sed -i "s|default.ps2|$memcard|g" "$game_configpath/$title_id/"PCSX2_ui.ini

# Launch PCSX2 using the relevant config folder.
/usr/games/PCSX2 --fullscreen --fullboot --cfgpath="$game_configpath/$title_id" "$1" &

# Close PCSX2 when Attract Mode's 'Exit Emulator' hotkey is pressed. 
cleanup() {
        echo "Caugh Signal ... terminating PCSX2."
        pkill PCSX2
        exit
}
trap cleanup INT TERM
read var
cleanup
Title: Re: How do I add PCSX2 to Attract Mode
Post by: markoattract on April 24, 2020, 05:54:42 PM
Hello all guys !!

I having some troubles running PS2 games on Attract Mode using PCSX2 .
I just know how to create a shortcuts for a ps2 game with PER-GAME config. then i did modify the ps2.ini emulators like this :

Code: [Select]
executable           cmd
args                 /c "[romfilename]"
rompath              S:\Emulazione\ROMS\PS2Shortcuts\
romext               .lnk
system               Sony Playstation 2
artwork    flyer           
artwork    snap     

the game start, but when i press esc button, Attract mode maximize again , but PCSX2 doesn't quit and if i choose another game i will have two instances of PCSX2 ...

THEN ,

I have tried a frontend for PCSX2 called SPECTABIS, that allow to launch games with own configs . This Frontend also allows to create a BATCH file or  a shortcut to launch a config. So i have modified again the emulator ini , but now , i have only one instance of the game, but the focus remain on Attract mode and the game runs in back ground ...

do you have any idea how to solve ??

Thank you for your answer ... Cheers :D