Subject: [PATCH 1/2] gnu: Add bsnes-hd.

From: Maxim Cournoyer <[email-masked]>
Date: Tue, 14 Jan 2025 00:28:10 +0900

* gnu/packages/emulators.scm (bsnes-hd): New variable.

Change-Id: Id3654e1231e24084e219c4d060eff2b4d888f62d
---
 gnu/packages/emulators.scm | 42 +++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/emulators.scm b/gnu/packages/emulators.scm
index b65c91cdf5..5a2ac8846f 100644
--- a/gnu/packages/emulators.scm
+++ b/gnu/packages/emulators.scm
@@ -15,7 +15,7 @@
 ;;; Copyright © 2020 Christopher Howard <[email-masked]>
 ;;; Copyright © 2021 Felipe Balbi <[email-masked]>
 ;;; Copyright © 2021, 2024 Felix Gruber <[email-masked]>
-;;; Copyright © 2021, 2024 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2021, 2025 Maxim Cournoyer <[email-masked]>
 ;;; Copyright © 2021 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2023 c4droid <[email-masked]>
 ;;; Copyright © 2023 Yovan Naumovski <[email-masked]>
@@ -3190,6 +3190,46 @@ (define-public bsnes
 performance, features, and ease of use.")
     (license license:gpl3)))
 
+(define-public bsnes-hd
+  (package
+    (inherit bsnes)
+    (name "bsnes-hd")
+    ;; As of 10.6, there only ever was beta releases -- treat these as the
+    ;; stable releases for now.
+    (version "10.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/DerKoun/bsnes-hd")
+                    (commit (string-append
+                             "beta_"
+                             (string-replace-substring version "." "_")))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0f3cd89fd0lqskzj98cc1pzmdbscq0psdjckp86w94rbchx7iw4h"))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/DerKoun/bsnes-hd/")
+    (synopsis "Fork of bsnes with added HD video features")
+    (description "bsnes-hd (called ``HD Mode 7 mod, for bsnes'' in early
+betas) is a fork of bsnes (the great SNES emulator by Near) that adds HD video
+features, such as:
+@table @asis
+@item HD Mode 7
+Renders the rotated, scaled or pseudo perspective backgrounds at
+higher resolutions.  This does not involve new custom imagery or upscaling
+algorithms.  It is a higher resolution version of the process the SNES uses.
+@item Widescreen
+Extends the scenes to the left and right, without distorting them.  It works
+for most Mode 7 scenes, but also for some other scenes/games, after some
+settings tweaking.
+@item True color
+Color calculation are done at true color instead of the SNES color depth (3x8
+instead of 3x5 bit).  With the optional line color smoothing color ``steps''
+turn into actual gradients (without influencing the sharpness of the artwork).
+@end table")
+    (license license:gpl3+)))
+
 (define-public jg-api
   (package
     (name "jg-api")
-- 
2.47.1