[PATCH 0/1] gnu: emulators: Add libretro-beetle-gba.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxim Cournoyer
  • Noé Lopez
Owner
unassigned
Submitted by
Noé Lopez
Severity
normal
N
N
Noé Lopez wrote on 22 Nov 22:15 +0100
(address . guix-patches@gnu.org)(name . Noé Lopez)(address . noelopez@free.fr)
cover.1732309972.git.noelopez@free.fr
From: Noé Lopez <noelopez@free.fr>

Hi,

Here is a patch to add Beetle GBA’s libretro port, to use with RetroArch.

You can test it with “./pre-inst-env guix shell libretro-beetle-gba retroarch -- retroarch“. It will appear in the cores list and can be used to play GBA games.

I checked that BSD code was not included like in the original Beetle GBA from
Mednafen (the fork only contains a subset of it).

Have a great day,
Noé Lopez

Noé Lopez (1):
gnu: emulators: Add libretro-beetle-gba.

gnu/packages/emulators.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)


base-commit: 1affd2b5aa7f5467a44cf757c4fc0c6956d3f3c9
--
2.46.0
N
N
Noé Lopez wrote on 22 Nov 22:19 +0100
[PATCH 1/1] gnu: emulators: Add libretro-beetle-gba.
(address . 74485@debbugs.gnu.org)(name . Noé Lopez)(address . noe@xn--no-cja.eu)
c898c2e52364b474ba7ff4596a5e36a4e5ec6c07.1732309972.git.noelopez@free.fr
From: Noé Lopez <noelopez@free.fr>

* gnu/packages/emulators.scm (libretro-beetle-gba): New variable.

Change-Id: I3f58972ae9065e7e59b2d9fd5b31d528f7690da2
---
gnu/packages/emulators.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (50 lines)
diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index 948e588c4c..4d757048a4 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -743,6 +743,43 @@ (define-public mednafen
;; Main license is GPL2+. Some parts are BSD-3.
(license (list license:gpl2+ license:bsd-3))))
+(define-public libretro-beetle-gba
+ ;; There are no releases. Use the latest commit.
+ (let ((commit "6cee80685f735ea6c2373db2622a1f1ee9f39d39")
+ (revision "0"))
+ (package
+ (name "libretro-beetle-gba")
+ ;; Use Mednafen core version as base. Defined in libretro.cpp:73.
+ (version (git-version "0.9.36" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libretro/beetle-gba-libretro")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14fm2g3hrsvvd57d6m9apzc30ypa4m0m5hk2viq422fm2l9y0xbb"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list
+ #:make-flags #~(list "CC=gcc"
+ (string-append "GIT_VERSION="
+ #$commit)
+ (string-append "DESTDIR="
+ #$output) "prefix=/")
+ ;; No tests.
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure))))
+ (home-page "https://github.com/libretro/beetle-gba-libretro")
+ (synopsis "Standalone port of Mednafen GBA to libretro")
+ (description
+ "A standalone port of Mednafen’s GameBoy Advance emulator called
+Beetle GBA to libretro. Beetle GBA is based on VBA-M, itself a fork of Visual Boy
+Advance. This is an old fork, and is not recommended over newer alternatives.")
+ (license license:gpl2+))))
+
(define-public mgba
(package
(name "mgba")
--
2.46.0
M
M
Maxim Cournoyer wrote 6 days ago
(name . Noé Lopez)(address . noe@xn--no-cja.eu)
87ldwckwf6.fsf@gmail.com
Hi Noé,

Noé Lopez <noe@noé.eu> writes:

Toggle quote (4 lines)
> From: Noé Lopez <noelopez@free.fr>
>
> * gnu/packages/emulators.scm (libretro-beetle-gba): New variable.

Cool!

Toggle quote (35 lines)
> Change-Id: I3f58972ae9065e7e59b2d9fd5b31d528f7690da2
> ---
> gnu/packages/emulators.scm | 37 +++++++++++++++++++++++++++++++++++++
> 1 file changed, 37 insertions(+)
>
> diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
> index 948e588c4c..4d757048a4 100644
> --- a/gnu/packages/emulators.scm
> +++ b/gnu/packages/emulators.scm
> @@ -743,6 +743,43 @@ (define-public mednafen
> ;; Main license is GPL2+. Some parts are BSD-3.
> (license (list license:gpl2+ license:bsd-3))))
>
> +(define-public libretro-beetle-gba
> + ;; There are no releases. Use the latest commit.
> + (let ((commit "6cee80685f735ea6c2373db2622a1f1ee9f39d39")
> + (revision "0"))
> + (package
> + (name "libretro-beetle-gba")
> + ;; Use Mednafen core version as base. Defined in libretro.cpp:73.
> + (version (git-version "0.9.36" revision commit))
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/libretro/beetle-gba-libretro")
> + (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "14fm2g3hrsvvd57d6m9apzc30ypa4m0m5hk2viq422fm2l9y0xbb"))))
> + (build-system gnu-build-system)
> + (arguments
> + (list
> + #:make-flags #~(list "CC=gcc"

You should prefer to use (string-append "CC=" #$(cc-for-target)), which
gives the right gcc command name when cross-compiling.

Toggle quote (15 lines)
> + (string-append "GIT_VERSION="
> + #$commit)
> + (string-append "DESTDIR="
> + #$output) "prefix=/")
> + ;; No tests.
> + #:tests? #f
> + #:phases #~(modify-phases %standard-phases
> + (delete 'configure))))
> + (home-page "https://github.com/libretro/beetle-gba-libretro")
> + (synopsis "Standalone port of Mednafen GBA to libretro")
> + (description
> + "A standalone port of Mednafen’s GameBoy Advance emulator called
> +Beetle GBA to libretro. Beetle GBA is based on VBA-M, itself a fork of Visual Boy
> +Advance. This is an old fork, and is not recommended over newer alternatives.")

Is the last sentence about VBA-M, or Visual Boy Advance? I'm guessing
the later, but it could confuse so I'd drop it.

I've done the two above modifications myself:

Toggle snippet (35 lines)
modified gnu/packages/emulators.scm
@@ -762,22 +762,18 @@ (define-public libretro-beetle-gba
(base32 "14fm2g3hrsvvd57d6m9apzc30ypa4m0m5hk2viq422fm2l9y0xbb"))))
(build-system gnu-build-system)
(arguments
- (list
- #:make-flags #~(list "CC=gcc"
- (string-append "GIT_VERSION="
- #$commit)
- (string-append "DESTDIR="
- #$output) "prefix=/")
- ;; No tests.
- #:tests? #f
- #:phases #~(modify-phases %standard-phases
- (delete 'configure))))
+ (list #:make-flags #~(list (string-append "CC=" #$(cc-for-target))
+ (string-append "GIT_VERSION=" #$commit)
+ (string-append "prefix=" #$output))
+ #:tests? #f ;no tests
+ #:phases #~(modify-phases %standard-phases
+ (delete 'configure))))
(home-page "https://github.com/libretro/beetle-gba-libretro")
(synopsis "Standalone port of Mednafen GBA to libretro")
(description
- "A standalone port of Mednafen’s GameBoy Advance emulator called
-Beetle GBA to libretro. Beetle GBA is based on VBA-M, itself a fork of Visual Boy
-Advance. This is an old fork, and is not recommended over newer alternatives.")
+ "A standalone port of Mednafen’s GameBoy Advance emulator called Beetle
+GBA to libretro. Beetle GBA is based on VBA-M, itself a fork of Visual Boy
+Advance.")
(license license:gpl2+))))
(define-public mgba

I've also ordered this package before libretro-bsnes-jg (it's nice to
keep packages sorted in alphabetic order, as much as possible).

Pushed as commit f73588e3b0.

--
Thanks,
Maxim
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74485@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74485
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch