aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorneonloop2023-01-09 14:36:40 +0000
committerneonloop2023-01-09 14:36:40 +0000
commit6d0d8f2ce924a0b1a433280160d90f71121509a4 (patch)
treef2e99784fa3e708ae8ac70d65f721c65cf171184 /patches
parent50d426b6d2c84d4ddc32009268d99047e83ced7f (diff)
downloadpicoarch-6d0d8f2ce924a0b1a433280160d90f71121509a4.tar.gz
picoarch-6d0d8f2ce924a0b1a433280160d90f71121509a4.tar.bz2
picoarch-6d0d8f2ce924a0b1a433280160d90f71121509a4.zip
Adds initial Funkey S support
Diffstat (limited to 'patches')
-rw-r--r--patches/libpicofe/0002-small-screen.patch13
-rw-r--r--patches/snes9x2005/1001-funkey-s-support.patch93
-rw-r--r--patches/snes9x2005_plus/1001-funkey-s-support.patch93
3 files changed, 199 insertions, 0 deletions
diff --git a/patches/libpicofe/0002-small-screen.patch b/patches/libpicofe/0002-small-screen.patch
new file mode 100644
index 0000000..2a5d828
--- /dev/null
+++ b/patches/libpicofe/0002-small-screen.patch
@@ -0,0 +1,13 @@
+diff --git a/menu.c b/menu.c
+index e91f84a..3c98f1f 100644
+--- a/menu.c
++++ b/menu.c
+@@ -518,7 +518,7 @@ static void me_draw(const menu_entry *entries, int sel, void (*draw_more)(void))
+ {
+ const menu_entry *ent, *ent_sel = entries;
+ int x, y, w = 0, h = 0;
+- int offs, col2_offs = 27 * me_mfont_w;
++ int offs, col2_offs = (g_menuscreen_w >= 320 ? 27 : 0) * me_mfont_w;
+ int vi_sel_ln = 0;
+ const char *name;
+ int i, n;
diff --git a/patches/snes9x2005/1001-funkey-s-support.patch b/patches/snes9x2005/1001-funkey-s-support.patch
new file mode 100644
index 0000000..1825917
--- /dev/null
+++ b/patches/snes9x2005/1001-funkey-s-support.patch
@@ -0,0 +1,93 @@
+diff --git a/Makefile b/Makefile
+index 23b8979..0a09e85 100644
+--- a/Makefile
++++ b/Makefile
+@@ -74,13 +74,46 @@ ifeq ($(platform), unix)
+ fpic := -fPIC
+ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
+ CFLAGS += -fno-builtin -fno-exceptions -ffunction-sections
+-# ARM
++# (armv7 a7, hard point, neon based) ###
++# NESC, SNESC, C64 mini
++else ifeq ($(platform), classic_armv7_a7)
++ TARGET := $(TARGET_NAME)_libretro.so
++ fpic := -fPIC
++ SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
++ CFLAGS += -Ofast \
++ -flto=4 -fwhole-program -fuse-linker-plugin \
++ -fdata-sections -ffunction-sections -Wl,--gc-sections \
++ -fno-stack-protector -fno-ident -fomit-frame-pointer \
++ -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
++ -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
++ -fmerge-all-constants -fno-math-errno \
++ -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
++ CC = $(CROSS_COMPILE)gcc
++ AR = $(CROSS_COMPILE)ar
++ CXXFLAGS += $(CFLAGS)
++ CPPFLAGS += $(CFLAGS)
++ ASFLAGS += $(CFLAGS)
++ HAVE_NEON = 1
++ ARCH = arm
++ BUILTIN_GPU = neon
++ USE_DYNAREC = 1
++ ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
++ CFLAGS += -march=armv7-a
++ else
++ CFLAGS += -march=armv7ve
++ # If gcc is 5.0 or later
++ ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
++ LDFLAGS += -static-libgcc -static-libstdc++
++ endif
++ endif
++#######################################
++# generic ARM
+ else ifneq (,$(findstring armv,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
+- CC = gcc
+- CXX = g++
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
+ PLATFORM_DEFINES += -marm
+ ifneq (,$(findstring softfloat,$(platform)))
+ PLATFORM_DEFINES += -mfloat-abi=softfp
+@@ -306,38 +339,6 @@ else
+ endif
+ OPTIMIZE += -Ofast -DNDEBUG=1
+
+-# (armv7 a7, hard point, neon based) ###
+-# NESC, SNESC, C64 mini
+-else ifeq ($(platform), classic_armv7_a7)
+- TARGET := $(TARGET_NAME)_libretro.so
+- fpic := -fPIC
+- SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
+- CFLAGS += -Ofast \
+- -flto=4 -fwhole-program -fuse-linker-plugin \
+- -fdata-sections -ffunction-sections -Wl,--gc-sections \
+- -fno-stack-protector -fno-ident -fomit-frame-pointer \
+- -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
+- -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
+- -fmerge-all-constants -fno-math-errno \
+- -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
+- CXXFLAGS += $(CFLAGS)
+- CPPFLAGS += $(CFLAGS)
+- ASFLAGS += $(CFLAGS)
+- HAVE_NEON = 1
+- ARCH = arm
+- BUILTIN_GPU = neon
+- USE_DYNAREC = 1
+- ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
+- CFLAGS += -march=armv7-a
+- else
+- CFLAGS += -march=armv7ve
+- # If gcc is 5.0 or later
+- ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
+- LDFLAGS += -static-libgcc -static-libstdc++
+- endif
+- endif
+-#######################################
+-
+ # Windows MSVC 2010 x64
+ else ifeq ($(platform), windows_msvc2010_x64)
+ CC = cl.exe
diff --git a/patches/snes9x2005_plus/1001-funkey-s-support.patch b/patches/snes9x2005_plus/1001-funkey-s-support.patch
new file mode 100644
index 0000000..1825917
--- /dev/null
+++ b/patches/snes9x2005_plus/1001-funkey-s-support.patch
@@ -0,0 +1,93 @@
+diff --git a/Makefile b/Makefile
+index 23b8979..0a09e85 100644
+--- a/Makefile
++++ b/Makefile
+@@ -74,13 +74,46 @@ ifeq ($(platform), unix)
+ fpic := -fPIC
+ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
+ CFLAGS += -fno-builtin -fno-exceptions -ffunction-sections
+-# ARM
++# (armv7 a7, hard point, neon based) ###
++# NESC, SNESC, C64 mini
++else ifeq ($(platform), classic_armv7_a7)
++ TARGET := $(TARGET_NAME)_libretro.so
++ fpic := -fPIC
++ SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
++ CFLAGS += -Ofast \
++ -flto=4 -fwhole-program -fuse-linker-plugin \
++ -fdata-sections -ffunction-sections -Wl,--gc-sections \
++ -fno-stack-protector -fno-ident -fomit-frame-pointer \
++ -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
++ -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
++ -fmerge-all-constants -fno-math-errno \
++ -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
++ CC = $(CROSS_COMPILE)gcc
++ AR = $(CROSS_COMPILE)ar
++ CXXFLAGS += $(CFLAGS)
++ CPPFLAGS += $(CFLAGS)
++ ASFLAGS += $(CFLAGS)
++ HAVE_NEON = 1
++ ARCH = arm
++ BUILTIN_GPU = neon
++ USE_DYNAREC = 1
++ ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
++ CFLAGS += -march=armv7-a
++ else
++ CFLAGS += -march=armv7ve
++ # If gcc is 5.0 or later
++ ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
++ LDFLAGS += -static-libgcc -static-libstdc++
++ endif
++ endif
++#######################################
++# generic ARM
+ else ifneq (,$(findstring armv,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
+- CC = gcc
+- CXX = g++
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
+ PLATFORM_DEFINES += -marm
+ ifneq (,$(findstring softfloat,$(platform)))
+ PLATFORM_DEFINES += -mfloat-abi=softfp
+@@ -306,38 +339,6 @@ else
+ endif
+ OPTIMIZE += -Ofast -DNDEBUG=1
+
+-# (armv7 a7, hard point, neon based) ###
+-# NESC, SNESC, C64 mini
+-else ifeq ($(platform), classic_armv7_a7)
+- TARGET := $(TARGET_NAME)_libretro.so
+- fpic := -fPIC
+- SHARED := -shared -Wl,--version-script=link.T -Wl,--no-undefined
+- CFLAGS += -Ofast \
+- -flto=4 -fwhole-program -fuse-linker-plugin \
+- -fdata-sections -ffunction-sections -Wl,--gc-sections \
+- -fno-stack-protector -fno-ident -fomit-frame-pointer \
+- -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
+- -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
+- -fmerge-all-constants -fno-math-errno \
+- -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
+- CXXFLAGS += $(CFLAGS)
+- CPPFLAGS += $(CFLAGS)
+- ASFLAGS += $(CFLAGS)
+- HAVE_NEON = 1
+- ARCH = arm
+- BUILTIN_GPU = neon
+- USE_DYNAREC = 1
+- ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
+- CFLAGS += -march=armv7-a
+- else
+- CFLAGS += -march=armv7ve
+- # If gcc is 5.0 or later
+- ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
+- LDFLAGS += -static-libgcc -static-libstdc++
+- endif
+- endif
+-#######################################
+-
+ # Windows MSVC 2010 x64
+ else ifeq ($(platform), windows_msvc2010_x64)
+ CC = cl.exe