Skip to content

Commit efce099

Browse files
committed
PACKAGE-mame2000: fix SELECT btn & optimize patches
1 parent d9cddcd commit efce099

File tree

3 files changed

+89
-24
lines changed

3 files changed

+89
-24
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From dc4f3c5488deb32faf3dbe079af179eae56787b8 Mon Sep 17 00:00:00 2001
2+
From: Apaczer <94932128+Apaczer@users.noreply.github.com>
3+
Date: Wed, 22 Jan 2025 17:17:51 +0100
4+
Subject: [PATCH 1/3] LIBRETRO-usrintrf: disable "UI Cancel" event without osd
5+
menu
6+
7+
otherwise libretro core hangs on return
8+
---
9+
src/usrintrf.c | 2 ++
10+
1 file changed, 2 insertions(+)
11+
12+
diff --git a/src/usrintrf.c b/src/usrintrf.c
13+
index 147ee46..83237f7 100644
14+
--- a/src/usrintrf.c
15+
+++ b/src/usrintrf.c
16+
@@ -3450,8 +3450,10 @@ if (Machine->gamedrv->flags & GAME_COMPUTER)
17+
18+
/* if the user pressed ESC, stop the emulation */
19+
/* but don't quit if the setup menu is on screen */
20+
+#ifndef __LIBRETRO__
21+
if (setup_selected == 0 && input_ui_pressed(IPT_UI_CANCEL))
22+
return 1;
23+
+#endif
24+
25+
if (setup_selected == 0 && input_ui_pressed(IPT_UI_CONFIGURE))
26+
{
27+
--
28+
2.45.2.windows.1
29+
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 5d2c4b5731e646bc1c13a4ec9ebb87d21c411908 Mon Sep 17 00:00:00 2001
2+
From: Apaczer <94932128+Apaczer@users.noreply.github.com>
3+
Date: Wed, 22 Jan 2025 19:24:38 +0100
4+
Subject: [PATCH 2/3] Makefile: add miyoo new opt flags
5+
6+
don't use LTO due to buggy uClibc build and bad opt. in musl
7+
---
8+
Makefile | 10 +++++++---
9+
1 file changed, 7 insertions(+), 3 deletions(-)
10+
11+
diff --git a/Makefile b/Makefile
12+
index 1c63c18..d349bf4 100644
13+
--- a/Makefile
14+
+++ b/Makefile
15+
@@ -327,12 +327,12 @@ else ifeq ($(platform), miyoo)
16+
TARGET := $(TARGET_NAME)_libretro.so
17+
CC = /opt/miyoo/usr/bin/arm-linux-gcc
18+
AR = /opt/miyoo/usr/bin/arm-linux-ar
19+
- fpic := -fPIC
20+
+ fpic := -fno-PIC
21+
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
22+
23+
DISABLE_ERROR_LOGGING := 1
24+
- CFLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s
25+
- ARM = 1
26+
+ CFLAGS += -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -fdata-sections -ffunction-sections -fsingle-precision-constant
27+
+ ARM = 1
28+
USE_CYCLONE = 1
29+
USE_DRZ80 = 1
30+
31+
@@ -524,8 +524,12 @@ endif
32+
ifeq ($(DEBUG), 1)
33+
CFLAGS += -O0 -g
34+
else
35+
+ifeq ($(platform), miyoo)
36+
+CFLAGS += -Ofast -DNDEBUG
37+
+else
38+
CFLAGS += -O2 -DNDEBUG
39+
endif
40+
+endif
41+
42+
# compiler, linker and utilities
43+
RM = rm -f
44+
--
45+
2.45.2.windows.1
46+

package/miyoo/retroarch/libretro-mame2000/0001-optimize.patch renamed to package/miyoo/retroarch/libretro-mame2000/0003-libretro.c-use-frameskip-low-samplerate-by-def.patch

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,15 @@
1-
diff --git a/Makefile b/Makefile
2-
index 64d8115..63e27cd 100644
3-
--- a/Makefile
4-
+++ b/Makefile
5-
@@ -327,14 +327,14 @@ else ifeq ($(platform), miyoo)
6-
TARGET := $(TARGET_NAME)_libretro.so
7-
CC = /opt/miyoo/usr/bin/arm-linux-gcc
8-
AR = /opt/miyoo/usr/bin/arm-linux-ar
9-
- fpic := -fPIC
10-
+ fpic :=
11-
SHARED := -shared -Wl,--version-script=link.T -Wl,-no-undefined
12-
13-
DISABLE_ERROR_LOGGING := 1
14-
- CFLAGS += -fomit-frame-pointer -ffast-math -march=armv5te -mtune=arm926ej-s
15-
+ CFLAGS += -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -Ofast -fdata-sections -ffunction-sections -fsingle-precision-constant -flto
16-
ARM = 1
17-
- USE_CYCLONE = 1
18-
- USE_DRZ80 = 1
19-
+ USE_CYCLONE = 0
20-
+ USE_DRZ80 = 0
21-
22-
# Windows MSVC 2010 x64
23-
else ifeq ($(platform), windows_msvc2010_x64)
1+
From 7972d983687fa37877301f3f590a041639cda346 Mon Sep 17 00:00:00 2001
2+
From: Apaczer <94932128+Apaczer@users.noreply.github.com>
3+
Date: Wed, 22 Jan 2025 20:02:40 +0100
4+
Subject: [PATCH 3/3] libretro.c: use frameskip & low samplerate by def.
5+
6+
optimize
7+
---
8+
src/libretro/libretro.c | 26 +++++++++++++-------------
9+
1 file changed, 13 insertions(+), 13 deletions(-)
10+
2411
diff --git a/src/libretro/libretro.c b/src/libretro/libretro.c
25-
index 7fd3662..f9a2794 100644
12+
index 48f079a..4df5d0a 100644
2613
--- a/src/libretro/libretro.c
2714
+++ b/src/libretro/libretro.c
2815
@@ -51,8 +51,8 @@ static scond_t *libretro_cond = NULL;
@@ -104,3 +91,6 @@ index 7fd3662..f9a2794 100644
10491
{ NULL, NULL },
10592
};
10693
environ_cb = cb;
94+
--
95+
2.45.2.windows.1
96+

0 commit comments

Comments
 (0)