diff options
-rw-r--r-- | emulators/libretro-fbneo/distinfo | 3 | ||||
-rw-r--r-- | emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h | 29 |
2 files changed, 31 insertions, 1 deletions
diff --git a/emulators/libretro-fbneo/distinfo b/emulators/libretro-fbneo/distinfo index 4b79fa03bba..c2fe1374dc7 100644 --- a/emulators/libretro-fbneo/distinfo +++ b/emulators/libretro-fbneo/distinfo @@ -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 --git a/emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h b/emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h new file mode 100644 index 00000000000..9a85b3da2a7 --- /dev/null +++ b/emulators/libretro-fbneo/patches/patch-src_burner_libretro_burn__endian.h @@ -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)) |