Skip to content

Commit

Permalink
all: modernize gpsp patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Inman committed Dec 8, 2024
1 parent c1b40ab commit 32facb1
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 96 deletions.
93 changes: 44 additions & 49 deletions todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,26 @@ EXTRAS

---

backup my emerald saves! (smart pro?)
help the kids backup their gba saves! (m17s)

core upgrades
change in cores/makefile
beetle-pce-fast to mednafen_pce_fast
beetle-vb to mednafen_vb
requires changes patch name too
see tg5040
check cores/makefile for frozen HASHes
- gkdpixel
- fake-08
not available
- fceumm
- gambatte
- gpsp
no patch required
- mednafen_pce_fast
- mednafen_supafaust
not available
- mednafen_vb
not available
- mgba
- pcsx_rearmed
required patching
- picodrive
- pokemini
- race
Expand All @@ -40,6 +43,7 @@ core upgrades
- fceumm
- gambatte
- gpsp
patch was broken
- mednafen_pce_fast
- mednafen_supafaust
- mednafen_vb
Expand All @@ -54,6 +58,7 @@ core upgrades
- fceumm
- gambatte
- gpsp
patch was broken
- mednafen_pce_fast
- mednafen_supafaust
- mednafen_vb
Expand All @@ -68,6 +73,7 @@ core upgrades
- fceumm
- gambatte
- gpsp
patch was broken
- mednafen_pce_fast
- mednafen_supafaust
- mednafen_vb
Expand All @@ -78,26 +84,29 @@ core upgrades
- race
- snes9x2005_plus
+ my282 (rg35xx)
- rg35xx
- fake-08
- fceumm
+ rg35xx
+ fake-08
+ fceumm
+ gambatte
- gpsp
- mednafen_pce_fast
- mednafen_supafaust
- mednafen_vb
- mgba
+ gpsp
breaks save state compat (expected)
patch was broken
+ mednafen_pce_fast
+ mednafen_supafaust
+ mednafen_vb
+ mgba
+ pcsx_rearmed
- picodrive
- pokemini
- race
- snes9x2005_plus
+ picodrive
+ pokemini
+ race
+ snes9x2005_plus
+ rg35xxplus (rg35xx)
- rgb30
- fake-08
- fceumm
- gambatte
- gpsp
patch was broken
- mednafen_pce_fast
- mednafen_supafaust
- mednafen_vb
Expand All @@ -108,7 +117,7 @@ core upgrades
- race
- snes9x2005_plus
+ tg3040 (tg5040)
- tg5040
+ tg5040
+ fake-08
+ fceumm
+ gambatte
Expand All @@ -125,38 +134,24 @@ core upgrades
+ race
doesn't fix audio resume bug
+ snes9x2005_plus
- trimuismart
- fake-08
- fceumm
- gambatte
- gpsp
- mednafen_pce_fast
- mednafen_supafaust
- mednafen_vb
- mgba
- pcsx_rearmed
- picodrive
- pokemini
- race
- snes9x2005_plus
+ trimuismart
+ fake-08
+ fceumm
+ gambatte
+ gpsp
breaks save state compat (expected)
patch was broken
+ mednafen_pce_fast
+ mednafen_supafaust
+ mednafen_vb
+ mgba
+ pcsx_rearmed
+ picodrive
+ pokemini
+ race
+ snes9x2005_plus


gambatte
light grid that matches palette
proof of concept added to tg5040 with patch for gambatte core
added patch
need to rebuild all gambatte cores (manually because building cores is disabled locally)
need to copy effect color changes to other sdl2 platforms
+ magicmini (took longer than expected because of faux-brightness)
+ my282
+ rg28xx (rotation/resolution is same as my282 but the math isn't adding up here?! fffffuuuuuu)
+ rgb30?
people are already asking for more
light grid for gbc (looks awful)
someone will ask for the same for ngp/ngpc
this is really entering shader territory...
started dabbling in OpenGL and shaders
hit a wall

minput
seems to be designed top,left aligned for 640x480

Expand Down
14 changes: 7 additions & 7 deletions workspace/m17/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c883c45f529 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..d09272e897def69e6a26024e2f7224d30be76ab5 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,23 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
@@ -499,6 +499,23 @@ else ifeq ($(platform), miyoo)
CPU_ARCH := arm


+# M17
+else ifeq ($(platform), m17)
Expand All @@ -22,7 +22,7 @@ index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c88
+ CPU_ARCH := arm
+ MMAP_JIT_CACHE = 1
+ HAVE_DYNAREC = 1
+
# Windows
else
TARGET := $(TARGET_NAME)_libretro.dll
+
else ifeq ($(platform), miyoomini)
TARGET := $(TARGET_NAME)_plus_libretro.so
CC = /opt/miyoomini-toolchain/usr/bin/arm-linux-gcc
13 changes: 6 additions & 7 deletions workspace/magicmini/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 063e5f4d51518fe706c5ee1d8f3a11980c3bc1f9..93db36d0fa5bcd810cc8275e49fd0adfe2fb9247 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..89f8f4ce13348c134d5c3bced1dc5259964fb647 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,19 @@ else ifeq ($(platform), miyoo)
@@ -498,6 +498,18 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
CPU_ARCH := arm

+else ifeq ($(platform), magicmini)
+ TARGET := $(TARGET_NAME)_libretro.so
+ CC = $(CROSS_COMPILE)gcc
Expand All @@ -18,7 +18,6 @@ index 063e5f4d51518fe706c5ee1d8f3a11980c3bc1f9..93db36d0fa5bcd810cc8275e49fd0adf
+ HAVE_DYNAREC := 1
+ MMAP_JIT_CACHE = 1
+ CPU_ARCH := arm64
+
# Windows
else
TARGET := $(TARGET_NAME)_libretro.dll

else ifeq ($(platform), miyoomini)
TARGET := $(TARGET_NAME)_plus_libretro.so
37 changes: 28 additions & 9 deletions workspace/miyoomini/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c883c45f529 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..754d227998603ec0ee49d7b35b607a344924d688 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,23 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
@@ -499,30 +499,22 @@ else ifeq ($(platform), miyoo)
CPU_ARCH := arm


+# MIYOOMINI
+else ifeq ($(platform), miyoomini)
else ifeq ($(platform), miyoomini)
- TARGET := $(TARGET_NAME)_plus_libretro.so
- CC = /opt/miyoomini-toolchain/usr/bin/arm-linux-gcc
- CXX = /opt/miyoomini-toolchain/usr/bin/arm-linux-g++
- AR = /opt/miyoomini-toolchain/usr/bin/arm-linux-ar
- 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) -std=gnu++11
- CPPFLAGS += $(CFLAGS)
- ASFLAGS += $(CFLAGS)
- CPU_ARCH := arm
- MMAP_JIT_CACHE = 1
- HAVE_DYNAREC = 1
+ TARGET := $(TARGET_NAME)_libretro.so
+ CC = $(CROSS_COMPILE)gcc
+ CXX = $(CROSS_COMPILE)g++
Expand All @@ -16,13 +36,12 @@ index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c88
+ fpic := -fPIC -DPIC
+ CFLAGS += -fomit-frame-pointer -ffast-math
+ CFLAGS += -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7ve
+ HAVE_NEON = 1
+ ARCH = arm
+ BUILTIN_GPU = neon
HAVE_NEON = 1
ARCH = arm
BUILTIN_GPU = neon
+ CPU_ARCH := arm
+ MMAP_JIT_CACHE = 1
+ HAVE_DYNAREC = 1
+
# Windows
else
TARGET := $(TARGET_NAME)_libretro.dll
8 changes: 4 additions & 4 deletions workspace/rg35xx/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 032e95b5a42ebe0dafb2746ac66f07d35583485c..a10ec8ffeeee3131406290740c44e0916b983565 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..918054035afe9a37bb24540d9a6ac3cc2f699dbb 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,25 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
CPU_ARCH := arm
@@ -524,6 +524,25 @@ else ifeq ($(platform), miyoomini)
ARCH = arm
BUILTIN_GPU = neon

+# RG35XX
+else ifeq ($(platform), rg35xx)
Expand Down
13 changes: 6 additions & 7 deletions workspace/rgb30/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 063e5f4d51518fe706c5ee1d8f3a11980c3bc1f9..93db36d0fa5bcd810cc8275e49fd0adfe2fb9247 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..4ef410b9999fdd744a8f9906a54122984cbe7fe1 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,19 @@ else ifeq ($(platform), miyoo)
@@ -498,6 +498,18 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
CPU_ARCH := arm

+else ifeq ($(platform), rgb30)
+ TARGET := $(TARGET_NAME)_libretro.so
+ CC = $(CROSS_COMPILE)gcc
Expand All @@ -18,7 +18,6 @@ index 063e5f4d51518fe706c5ee1d8f3a11980c3bc1f9..93db36d0fa5bcd810cc8275e49fd0adf
+ HAVE_DYNAREC := 1
+ MMAP_JIT_CACHE = 1
+ CPU_ARCH := arm64
+
# Windows
else
TARGET := $(TARGET_NAME)_libretro.dll

else ifeq ($(platform), miyoomini)
TARGET := $(TARGET_NAME)_plus_libretro.so
8 changes: 4 additions & 4 deletions workspace/tg5040/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c883c45f529 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..94c7f8dd037284153b6858730a10b6aaaafd5ad4 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,21 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
CPU_ARCH := arm
@@ -524,6 +524,21 @@ else ifeq ($(platform), miyoomini)
ARCH = arm
BUILTIN_GPU = neon

+# TRIMUI SMART PRO
+else ifeq ($(platform), tg5040)
Expand Down
17 changes: 8 additions & 9 deletions workspace/trimuismart/cores/patches/gpsp.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
diff --git forkSrcPrefix/Makefile forkDstPrefix/Makefile
index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c883c45f529 100644
index dc4b60dec7f70a153dbc2eb849cd5acfc90f9d4d..09339c7bf819559d5e570b592ac8ab9c50566fba 100644
--- forkSrcPrefix/Makefile
+++ forkDstPrefix/Makefile
@@ -482,6 +482,23 @@ else ifeq ($(platform), miyoo)
@@ -498,6 +498,22 @@ else ifeq ($(platform), miyoo)
HAVE_DYNAREC := 1
CPU_ARCH := arm

+# MIYOOMINI
+# TRIMUISMART
+else ifeq ($(platform), trimuismart)
+ TARGET := $(TARGET_NAME)_libretro.so
+ CC = $(CROSS_COMPILE)gcc
Expand All @@ -21,8 +21,7 @@ index 032e95b5a42ebe0dafb2746ac66f07d35583485c..933810b9e0255c501c668db55f5f3c88
+ BUILTIN_GPU = neon
+ CPU_ARCH := arm
+ MMAP_JIT_CACHE = 1
+ HAVE_DYNAREC = 1
+
# Windows
else
TARGET := $(TARGET_NAME)_libretro.dll
+ HAVE_DYNAREC = 1

else ifeq ($(platform), miyoomini)
TARGET := $(TARGET_NAME)_plus_libretro.so

0 comments on commit 32facb1

Please sign in to comment.