aboutsummaryrefslogtreecommitdiff
path: root/patches/gme
diff options
context:
space:
mode:
authorneonloop2021-10-21 00:19:07 +0000
committerneonloop2021-10-21 00:19:07 +0000
commita1b4714da9b135a864ebe1b53b8bf4c67b8b18d5 (patch)
tree5c26ecaa9595e2af7e46512bfc6dc67bf87b0512 /patches/gme
parent7c003401f4f1e5463f20af1dc63b25ad8a15e3c1 (diff)
downloadpicoarch-a1b4714da9b135a864ebe1b53b8bf4c67b8b18d5.tar.gz
picoarch-a1b4714da9b135a864ebe1b53b8bf4c67b8b18d5.tar.bz2
picoarch-a1b4714da9b135a864ebe1b53b8bf4c67b8b18d5.zip
Adds gme (Game Music Emu) core
Diffstat (limited to 'patches/gme')
-rw-r--r--patches/gme/0001-fix-sample-size.patch26
-rw-r--r--patches/gme/1000-trimui-build.patch32
2 files changed, 58 insertions, 0 deletions
diff --git a/patches/gme/0001-fix-sample-size.patch b/patches/gme/0001-fix-sample-size.patch
new file mode 100644
index 0000000..27cc6b1
--- /dev/null
+++ b/patches/gme/0001-fix-sample-size.patch
@@ -0,0 +1,26 @@
+diff --git a/src/libretro.c b/src/libretro.c
+index 1e2b37f..d393a5a 100644
+--- a/src/libretro.c
++++ b/src/libretro.c
+@@ -180,7 +180,7 @@ void retro_run(void)
+ draw_ui();
+ video_cb(framebuffer->pixel_data, framebuffer->width, framebuffer->height, framebuffer->bytes_per_pixel * framebuffer->width);
+ //audio handling
+- audio_batch_cb(play(),1470);
++ audio_batch_cb(play(),735);
+ }
+
+ // File Loading
+diff --git a/src/player.c b/src/player.c
+index 1daf980..e7c69be 100644
+--- a/src/player.c
++++ b/src/player.c
+@@ -86,7 +86,7 @@ short *play(void)
+ is_playing_ = false;
+ }
+ else
+- gme_play( emu, 2048, audio_buffer );
++ gme_play( emu, 1470, audio_buffer );
+ }
+ else
+ memset(audio_buffer,0,8192 * sizeof(short));
diff --git a/patches/gme/1000-trimui-build.patch b/patches/gme/1000-trimui-build.patch
new file mode 100644
index 0000000..0c20db3
--- /dev/null
+++ b/patches/gme/1000-trimui-build.patch
@@ -0,0 +1,32 @@
+diff --git a/Makefile b/Makefile
+index fa45fb3..9e20a41 100644
+--- a/Makefile
++++ b/Makefile
+@@ -39,6 +39,7 @@ ifeq ($(platform), unix)
+ ifneq ($(findstring Haiku,$(shell uname -a)),)
+ LIBM :=
+ endif
++ CFLAGS += -D_GNU_SOURCE
+
+ # OS X
+ else ifeq ($(platform), osx)
+@@ -214,6 +215,19 @@ else ifeq ($(platform), switch)
+ include $(LIBTRANSISTOR_HOME)/libtransistor.mk
+ STATIC_LINKING=1
+
++else ifeq ($(platform), trimui)
++ TARGET := $(TARGET_NAME)_libretro.so
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
++ AR = $(CROSS_COMPILE)ar
++ SHARED := -shared -Wl,--version-script=link.T
++ CFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s -ffast-math -fno-PIC -flto -D_GNU_SOURCE
++ CXXFLAGS += -fomit-frame-pointer -march=armv5te -mtune=arm926ej-s -ffast-math -fno-PIC -flto -D_GNU_SOURCE
++ LDFLAGS += -flto
++ ifeq (,$(DEBUG))
++ LDFLAGS += -s
++ endif
++
+ # ARM
+ else ifneq (,$(findstring armv,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so