Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DuckStation standalone PSX emulator #3486

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dankcushions
Copy link
Member

Standalone version using the (archived) repo. Draft as there's some issue:

  1. GUI (escape key) is not navigable on the keyboard for me - i'm unable to get to the different horizontal 'tabs' within the settings menu. this makes binding a controller impossible.
  2. Sometimes it seems the GUI does not load the graphics correctly, and all the menu items are just black boxes, making it impossible to navigate. however i'm unable to recreate this consistently

i would still like to generate a default controller setup via an emulationstation script - i started doing this via the evdev backend here: https://github.com/dankcushions/RetroPie-Setup/tree/duckstation-nogui - didn't get very far, but i believe it's possible.

mkRomDir "psx"

# needed?
chown -R $user:$user "$md_inst/bin"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed because -portable is used ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i removed it and everything seems to still work, so hopefully all ok!?

touch "$config"
chown -R $user:$user "$config"

# set config defaults
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the entire config handling should be similar to how we do it in retroarch: create a default file and copy it when it doesn't exist (i.e. on first installs, otherwise it's added with .rp-dist).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree! I think I've done this now

}

function build_duckstation() {
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_DISCORD_PRESENCE=OFF -DUSE_X11=OFF -DUSE_DRMKMS=ON -DBUILD_NOGUI_FRONTEND=ON -DBUILD_QT_FRONTEND=OFF .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the X11 support be enabled for x11 platforms ? (this might need additional dependencies also).

Copy link
Contributor

@mrcmunir mrcmunir Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's needed X11 enabled option platform also will be great option enable option for Desktop QT BUILD frontend will be better for some custom option in the GUI.
And DRMKMS only for only KMS platform .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't have an X11 platform to test but have enabled x11, and drmkms where appropriate

@cmitu
Copy link
Contributor

cmitu commented Feb 20, 2022

IMHO trying to create an evdev backend mapping is not so important.
Do note that evdev input codes are not 100% the same as the ones reported by SDL's joystick input IDs, so the mapping will not always be accurate (see my comment here).


local config="$md_conf_root/psx/duckstation.ini"

addEmulator 0 "$md_id" "psx" "$md_inst/bin/duckstation-nogui -portable -settings $config -- %ROM%"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I recommended will add, for the duckstation-qt build on the X11/wayland platforms.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have an x11 platform to test but for a RetroPie context i would have thought the controller-driven NOGUI front end would be more appropriate more than a mouse-driven one which I presume QT is?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean similar this
addEmulator 1 "$md_id" "psx" "$md_inst/bin/duckstation-nogui -portable -settings $config -- %ROM%"
addEmulator 0 "$md_id" "psx" "$md_inst/bin/duckstation-qt -portable -settings $config -- %ROM%"

https://github.com/stenzek/duckstation/wiki/Command-Line-Arguments

Will needed -fullscreen if you have switch fullscreen Window .

In any case, this would be an alternative option to the no interface and it is the user who chooses which one to use sometimes qt build it's more friendly custom automatic remaps gamepads options than nogui in Desktop Options .

As soon as I have some time I try it on my x86-64 PC or aarch64 platform, which are the devices I have at hand.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, yes that makes sense giving the choice, although as I don't have a device to test this is not something I would want to add in this PR, although please feel free to add it yourself later! :)

@ghost
Copy link

ghost commented Mar 18, 2022

Many thanks, I test it and it is working very well!

@cmitu
Copy link
Contributor

cmitu commented Mar 20, 2022

I've re-tested this with the latest changes, seems to work fine, with a few notices:

  • Conf file generation - should be simplified, no need to use the ini routines, just write the config with cat << EOF >> $config. It's easier to read and we only copy it once, on the 1st install, so we don't have to account for existing settings.
    Some defaults I see changed:

    • Start Fullscreen should be on
    • Don't load cheats automatically (Automatically Load Cheats).
    • Lower the logging level to ERROR, WARN produces a lot of messages and it spams /dev/shm/runcommand.log.
    • Confirm Power Off should be off
    • Save State on Exit should be off
  • Controller setup. I was expecting some auto-config for in-game controls to work (via SDL's GameControllerApi), but it didn't work for me. However, the settings menu is navigable OOB - L1/R1 are working to switch between the settings menu tabs. The Back/Action buttons are reversed compared to RetroArch's RGUI - East is back/cancel and South is Activate/Enter. It may be possible to change this in the source (see here).
    It's possible to map the settings menu to a button, but an extra button would be needed (i.e. Xbox button or the PS button on a Dualshock). I tested with a pair of DS3/DS4 controllers, don't have an Xbox one to see.

@ghost
Copy link

ghost commented Jul 24, 2022

I don't know if the team is still working on this emulator or not. I use it so far on all my systems and I prefer it to the libretro variant. After the massive updates the emulator has gotten a few days ago, it is not possible to build it anymore. I would be obliged if someone can guide me in finding the solution to the problem. Here is the log :https://pastebin.com/q9sCZVB0. Thanks

@ghost
Copy link

ghost commented Aug 11, 2022

I don't know if the team is still working on this emulator or not. I use it so far on all my systems and I prefer it to the libretro variant. After the massive updates the emulator has gotten a few days ago, it is not possible to build it anymore. I would be obliged if someone can guide me in finding the solution to the problem. Here is the log :https://pastebin.com/q9sCZVB0. Thanks

Change the source toLatestand it will work.

gitPullOrClone "$md_build" https://github.com/stenzek/duckstation.git Latest

@mrcmunir
Copy link
Contributor

SDL nogui seems deprecated and not recommended by author fot latest improvements
stenzek/duckstation@68866f3

For Qt build Needed qt6.1 and recommended sdl2 2.0.22 with HIDAPI ON .

@w1ndg
Copy link

w1ndg commented Jul 28, 2023

Changing this line: gitPullOrClone "$md_build" https://github.com/stenzek/duckstation.git Latest to gitPullOrClone "$md_build" https://github.com/stenzek/duckstation.git legacy it allows the installation of this emulator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants