Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/libretro-fbneo libretro-fbalpha: bswap for b...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8331dc92b933
branches:  trunk
changeset: 433133:8331dc92b933
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun May 31 12:28:12 2020 +0000

description:
libretro-fbalpha: bswap for big endian NetBSD

diffstat:

 emulators/libretro-fbneo/distinfo                                         |   3 +-
 emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h |  29 ++++++++++
 2 files changed, 31 insertions(+), 1 deletions(-)

diffs (45 lines):

diff -r 7784b63d66ec -r 8331dc92b933 emulators/libretro-fbneo/distinfo
--- a/emulators/libretro-fbneo/distinfo Sun May 31 12:19:47 2020 +0000
+++ b/emulators/libretro-fbneo/distinfo Sun May 31 12:28:12 2020 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2020/05/31 12:19:33 nia Exp $
+$NetBSD: distinfo,v 1.2 2020/05/31 12:28:12 nia Exp $
 
 SHA1 (libretro-fbneo-20200530-301cf7b6eeb3e7683952b98b66f39008f580b26d.tar.gz) = c7b22edc2ae2ac2fff494dd80acfec6e49b9133c
 RMD160 (libretro-fbneo-20200530-301cf7b6eeb3e7683952b98b66f39008f580b26d.tar.gz) = b4d9a8c285aec224e7da70a004e64825548936bf
 SHA512 (libretro-fbneo-20200530-301cf7b6eeb3e7683952b98b66f39008f580b26d.tar.gz) = 
0ef4a27bd9fa0d49f5ea09777f2144a9b0be9c9fced59593ba15e9f4818a305d2ca85a2ef3850cef77032157265376f5f3204b6c81226001c94d85f346829843
 Size (libretro-fbneo-20200530-301cf7b6eeb3e7683952b98b66f39008f580b26d.tar.gz) = 14602038 bytes
+SHA1 (patch-src_burner_libretro_burn__endian.h) = 35b3ea13154bd5380ad5d067f3ec5f32ab18ce36
diff -r 7784b63d66ec -r 8331dc92b933 emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h Sun May 31 12:28:12 2020 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_burner_libretro_burn__endian.h,v 1.1 2020/05/31 12:28:12 nia Exp $
+
+More than games consoles are big endian.
+
+--- src/burner/libretro/burn_endian.h.orig     2020-05-30 15:55:11.000000000 +0000
++++ src/burner/libretro/burn_endian.h
+@@ -1,7 +1,7 @@
+ #ifndef _FBNEO_ENDIAN_H
+ #define _FBNEO_ENDIAN_H
+ 
+-#ifndef _XBOX
++#if !defined(_XBOX) && !defined(__NetBSD__)
+ #define NO_64BIT_BYTESWAP
+ #endif
+ 
+@@ -46,6 +46,13 @@ typedef union {
+ #define BURN_ENDIAN_SWAP_INT8(x)                              (x^1)
+ #define BURN_ENDIAN_SWAP_INT16(x)                             ({uint16_t tt; __sthbrx(&tt, 0, x); tt;})
+ #define BURN_ENDIAN_SWAP_INT32(x)                             ({uint32_t tt; __stwbrx(&tt, 0, x); tt;})
++/* NetBSD */
++#elif defined(__NetBSD__)
++#include <machine/endian.h>
++#define BURN_ENDIAN_SWAP_INT8(x)                              (x^1)
++#define BURN_ENDIAN_SWAP_INT16(x)                             (bswap16(x))
++#define BURN_ENDIAN_SWAP_INT32(x)                             (bswap32(x))
++#define BURN_ENDIAN_SWAP_INT64(x)                             (bswap64(x))
+ #else
+ #define BURN_ENDIAN_SWAP_INT8(x)                              (x^1)
+ #define BURN_ENDIAN_SWAP_INT16(x)                             ((((x) << 8) & 0xff00) | (((x) >> 8) & 0x00ff))



Home | Main Index | Thread Index | Old Index