Skip to content

Add missing libretro cores#146958

Merged
thiagokokada merged 13 commits intoNixOS:masterfrom
thiagokokada:add-missing-libretro-cores
Nov 25, 2021
Merged

Add missing libretro cores#146958
thiagokokada merged 13 commits intoNixOS:masterfrom
thiagokokada:add-missing-libretro-cores

Conversation

@thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Nov 22, 2021

Motivation for this change

We are missing some RetroArch cores, so this PR will add some of them.

The idea is not to package everything from upstream though (some of them are even impossible since they're missing the necessary files, e.g.: DuckStation). However I want to package at least some of the more interesting ones.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

Sadly the original repository (stenzek/duckstation) is missing the
necessary files to build a libretro core, so we need to use the fork
instead.
This will allow users to package their own core derivations if they want
without necessary submitting to nixpkgs.
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Nov 22, 2021
@ofborg ofborg bot requested review from MP2E, edwtjo and hrdinka November 22, 2021 02:36
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 22, 2021
Copy link
Contributor Author

@thiagokokada thiagokokada Nov 22, 2021

Choose a reason for hiding this comment

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

This core never worked as it should: libretro/libretro-core-info#8. And since RetroArch 1.9.13.2 bump, this also doesn't work at all since the lack of core info.

However I am not sure how to deprecate this core correctly. Maybe we can simply remove it since there shouldn't be many people using it anyway and we already broke compatibility in #146714 🤔 ?

@ofborg ofborg bot added the 8.has: clean-up This PR removes packages or removes other cruft label Nov 22, 2021
@ofborg ofborg bot requested a review from matthewbauer November 22, 2021 03:42
@ofborg ofborg bot added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 22, 2021
@SuperSamus
Copy link
Contributor

melonds is also an interesting core that I think should be added.

@thiagokokada
Copy link
Contributor Author

melonds is also an interesting core that I think should be added.

Done.

The original repository was abandoned.
@ofborg ofborg bot added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Nov 22, 2021
@thiagokokada thiagokokada marked this pull request as ready for review November 22, 2021 22:23
@thiagokokada
Copy link
Contributor Author

I think that is it for now, opening this PR for review.

@thiagokokada
Copy link
Contributor Author

thiagokokada commented Nov 22, 2021

Just an explanation on why I am adding those specific cores:

  • SwanStation: fork of DuckStation, that is probably one of the most interesting PSX emulators right now. It has features like upscalling, PXGP, widescreen, etc., while being reasonable fast and accurate (not its main focus).
  • bsnes: the best and most update fork of Near contributions to the SNES community. Probably the recommended emulator if you don't want improvements.
  • bsnes-hd: this is fun, running SNES games in high definition and widescreen. Doesn't work in all cases, but where it does it looks beautiful.
  • bsnes-mercury-{balanced,accuracy}: this is the only available fork of bsnes that still has the old, more performant, balanced and accuracy cores, so it seems a waste to not enable them. Should be useful for less powerful hardware (aarch64-linux maybe?).
  • mesen-s: another accuracy-focused SNES emulator that also supports GB/GBC. Have some interesting features like overclock, so maybe worth it in some cases (bsnes is still recommended if you don't care about improvements).
  • melonds: seems fair, there isn't many Nintendo DS emulators in RetroArch and this one seems very competent.

Some cores that I don't think it is worth the addition so I didn't package them:

  • higan-snes: the higan fork of libretro is out-of-date, higan itself was kinda abandoned since it was (eventually) replaced by ares. So doesn't seem worth to have, bsnes is newer and better.
  • bsnes C++98: an older version of bsnes that only makes sense on very odd targets that don't have a working C++11 compiler.

There are also cores for more obscure targets that I don't care, however we can always add it later if someone is interested.

Edit: some more:

  • blastem: seems to claim to be one of the most accurate emulators for Mega Drive/Genesis, and also fast.
  • pcsx2: I wanted to include it, however I couldn't get it to compile correctly for libretro (it does compile, however it doesn't generate an artefact).

"rev": "b8e16159734c2068db0f2f12b11bc16ef55058ce",
"sha256": "qjp1rEjmDAAB2wXITA3lAS+ERJuZinoneJToYiYRi/w=",
"rev": "6b9cc418004c01a195c78387752cc99245ba54d5",
"sha256": "sha256-7nU5fQ8pQLmKy9Swmshkv2oj+HV0oTcqQ93LfNSq1us=",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to update the hash manually here, since the last update has some git module issues that nix-prefetch-github is having difficult to parse. This is why the hash here is in the new format (I am using nix 2.4).

@thiagokokada
Copy link
Contributor Author

Result of nixpkgs-review pr 146958 run on x86_64-linux 1

88 packages built:
  • kodiPackages.libretro-genplus
  • kodiPackages.libretro-mgba
  • kodiPackages.libretro-snes9x
  • libretro.atari800
  • libretro.beetle-gba
  • libretro.beetle-lynx
  • libretro.beetle-ngp
  • libretro.beetle-pce-fast
  • libretro.beetle-pcfx
  • libretro.beetle-psx
  • libretro.beetle-psx-hw
  • libretro.beetle-saturn
  • libretro.beetle-snes
  • libretro.beetle-supergrafx
  • libretro.beetle-vb
  • libretro.beetle-wswan
  • libretro.blastem
  • libretro.bluemsx
  • libretro.bsnes
  • libretro.bsnes-hd
  • libretro.bsnes-mercury
  • libretro.bsnes-mercury-balanced
  • libretro.bsnes-mercury-performance
  • libretro.citra
  • libretro.desmume
  • libretro.desmume2015
  • libretro.dolphin
  • libretro.dosbox
  • libretro.eightyone
  • libretro.fbalpha2012
  • libretro.fbneo
  • libretro.fceumm
  • libretro.flycast
  • libretro.fmsx
  • libretro.freeintv
  • libretro.gambatte
  • libretro.genesis-plus-gx
  • libretro.gpsp
  • libretro.gw
  • libretro.handy
  • libretro.hatari
  • libretro.mame
  • libretro.mame2000
  • libretro.mame2003
  • libretro.mame2003-plus
  • libretro.mame2010
  • libretro.mame2015
  • libretro.mame2016
  • libretro.melonds
  • libretro.mesen
  • libretro.mesen-s
  • libretro.meteor
  • libretro.mgba
  • libretro.mupen64plus
  • libretro.neocd
  • libretro.nestopia
  • libretro.np2kai
  • libretro.o2em
  • libretro.opera
  • libretro.parallel-n64
  • libretro.pcsx_rearmed
  • libretro.picodrive
  • libretro.play
  • libretro.ppsspp
  • libretro.prboom
  • libretro.prosystem
  • libretro.quicknes
  • libretro.sameboy
  • libretro.scummvm
  • libretro.smsplus-gx
  • libretro.snes9x
  • libretro.snes9x2002
  • libretro.snes9x2005
  • libretro.snes9x2010
  • libretro.stella
  • libretro.stella2014
  • libretro.swanstation
  • libretro.tgbdual
  • libretro.thepowdertoy
  • libretro.tic80
  • libretro.vba-m
  • libretro.vba-next
  • libretro.vecx
  • libretro.virtualjaguar
  • libretro.yabause
  • retroarch
  • retroarchBare
  • retroarchFull

@thiagokokada
Copy link
Contributor Author

CC @aanderse.

@aanderse
Copy link
Member

I think branch off for 21.11 already occurred. We should probably backport this, if so.

Looks good @thiagokokada 🚀

@thiagokokada
Copy link
Contributor Author

thiagokokada commented Nov 23, 2021

I think branch off for 21.11 already occurred. We should probably backport this, if so.

Yeah, I already marked this PR to be backported.

If you can review the changes I would be grateful @aanderse.

@thiagokokada
Copy link
Contributor Author

thiagokokada commented Nov 25, 2021

@aanderse Sorry to bother you, but if possible I would like to merge this PR before the 21.11 release (just to avoid the issue with the beetle-saturn-hw that I removed).

So can I get your review here?

@aanderse
Copy link
Member

Sorry this slipped by me. It looks good to me. Let's ship it!

@thiagokokada thiagokokada merged commit 3ecace5 into NixOS:master Nov 25, 2021
@thiagokokada thiagokokada deleted the add-missing-libretro-cores branch November 25, 2021 18:14
@github-actions
Copy link
Contributor

Successfully created backport PR #147391 for release-21.11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: clean-up This PR removes packages or removes other cruft 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants