aboutsummaryrefslogtreecommitdiff
path: root/patches/mame2000/0001-trimui-build.patch
diff options
context:
space:
mode:
authorneonloop2021-08-10 00:16:40 +0000
committerneonloop2021-08-10 00:16:40 +0000
commitebcd69fef4208af05aea6b1f963db1a9613bc470 (patch)
tree1c44f731176dc7479d843dd1b8e2e58c4100b87c /patches/mame2000/0001-trimui-build.patch
parent8ad26356f5e92bd396e58290217da55858345a4e (diff)
downloadpicoarch-ebcd69fef4208af05aea6b1f963db1a9613bc470.tar.gz
picoarch-ebcd69fef4208af05aea6b1f963db1a9613bc470.tar.bz2
picoarch-ebcd69fef4208af05aea6b1f963db1a9613bc470.zip
Adds mame2000 core and fixes options/scaler
Diffstat (limited to 'patches/mame2000/0001-trimui-build.patch')
-rw-r--r--patches/mame2000/0001-trimui-build.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/patches/mame2000/0001-trimui-build.patch b/patches/mame2000/0001-trimui-build.patch
new file mode 100644
index 0000000..52492b8
--- /dev/null
+++ b/patches/mame2000/0001-trimui-build.patch
@@ -0,0 +1,51 @@
+diff --git a/Makefile b/Makefile
+index 4b0667a..8ebaebe 100644
+--- a/Makefile
++++ b/Makefile
+@@ -335,6 +335,26 @@ else ifeq ($(platform), gcw0)
+ DISABLE_ERROR_LOGGING := 1
+ CFLAGS += -march=mips32 -mtune=mips32r2 -mhard-float
+
++# Trimui
++else ifeq ($(platform), trimui)
++ TARGET = $(TARGET_NAME)_libretro.so
++ CC = $(CROSS_COMPILE)gcc
++ CXX = $(CROSS_COMPILE)g++
++ AR = $(CROSS_COMPILE)ar
++ LDFLAGS += -shared -Wl,--version-script=link.T -Wl,-no-undefined -fno-PIC -flto
++ CFLAGS += -fomit-frame-pointer -ffast-math -mcpu=arm926ej-s -mtune=arm926ej-s -fno-PIC -flto
++ CFLAGS += -fsingle-precision-constant
++ CFLAGS += -fno-exceptions -fcommon -fno-unwind-tables -fno-asynchronous-unwind-tables
++ CFLAGS += -funroll-loops -fno-optimize-sibling-calls
++ DISABLE_ERROR_LOGGING := 1
++ ARM = 1
++ USE_CYCLONE = 1
++ USE_DRZ80 = 1
++ OPTIMIZE := -Ofast -DNDEBUG
++ ifeq (,$(DEBUG))
++ LDFLAGS += -s
++ endif
++
+ # Windows MSVC 2010 x64
+ else ifeq ($(platform), windows_msvc2010_x64)
+ CC = cl.exe
+@@ -522,10 +542,19 @@ endif
+
+ ifeq ($(DEBUG), 1)
+ CFLAGS += -O0 -g
++else ifneq (,$(OPTIMIZE))
++CFLAGS += $(OPTIMIZE)
+ else
+ CFLAGS += -O2 -DNDEBUG
+ endif
+
++ifeq ($(PROFILE), GENERATE)
++ CFLAGS += -fprofile-generate=./profile/mame2000
++ LDFLAGS += -lgcov
++else ifeq ($(PROFILE), APPLY)
++ CFLAGS += -fprofile-use -fprofile-dir=../profile/mame2000 -fbranch-probabilities
++endif
++
+ # compiler, linker and utilities
+ RM = rm -f
+ LIBS = -lm