summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwinaphex2018-11-08 13:35:56 +0100
committerGitHub2018-11-08 13:35:56 +0100
commit142b0ed8aa7487f73d401736d3b24ce6e851a060 (patch)
treea80235415f37a4a0da8eb9bbd44a17f1fc55787e
parentc98e1c3a8414d35aa94ea588d1ca693986a76ca8 (diff)
parent52ae829fc67ea2dbc0efd3e9319508576b8ea572 (diff)
downloadsnes9x2002-142b0ed8aa7487f73d401736d3b24ce6e851a060.tar.gz
snes9x2002-142b0ed8aa7487f73d401736d3b24ce6e851a060.tar.bz2
snes9x2002-142b0ed8aa7487f73d401736d3b24ce6e851a060.zip
Merge pull request #27 from Classicmods/master
Added Classic Platform structure - ARMv7 Cortex A7 build
-rw-r--r--Makefile54
-rw-r--r--libretro/hakchi/bin/snes38
-rw-r--r--libretro/hakchi/bin/snes0238
-rw-r--r--libretro/hakchi/etc/preinit.d/pe9b0_retroarch_snes1
-rw-r--r--libretro/hakchi/readme.md23
-rw-r--r--snes9x2002_libretro.sobin742284 -> 0 bytes
6 files changed, 37 insertions, 117 deletions
diff --git a/Makefile b/Makefile
index ea489fa..fa416d2 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,9 @@ DEBUG=0
TARGET_NAME = snes9x2002
ifeq ($(platform),)
-platform = unix
+ ifeq (,$(findstring classic_,$(platform)))
+ platform = unix
+ endif
ifeq ($(shell uname -a),)
platform = win
else ifneq ($(findstring MINGW,$(shell uname -a)),)
@@ -103,12 +105,37 @@ else ifeq ($(platform), wiiu)
CFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
STATIC_LINKING := 1
-#Nintendo Classics (Hakchi)
-else ifeq ($(platform), nintendoc)
- TARGET := $(TARGET_NAME)_libretro.so
- fpic := -fPIC
- SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined
- CFLAGS += -fno-builtin -fno-exceptions -DARM -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
+# (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=libretro/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
+#######################################
# Vita
else ifeq ($(platform), vita)
@@ -192,20 +219,13 @@ else
all: $(TARGET)
$(TARGET): $(OBJS)
+ @echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJS)
else
$(CC) $(fpic) $(SHARED) $(INCLUDES) -o $@ $(OBJS) -lm
endif
-
-ifeq ($(platform),nintendoc)
- @echo "** BUILDING HAKCHI HMOD PACKAGE **"
- mkdir -p libretro/hakchi/etc/libretro/core/ libretro/hakchi/etc/libretro/info/ libretro/hakchi/etc/preinit.d/
- rm -f libretro/hakchi/etc/libretro/info/*
- cp $(TARGET_NAME)_libretro.so libretro/hakchi/etc/libretro/core/
- cd libretro/hakchi/etc/libretro/info/; wget https://buildbot.libretro.com/assets/frontend/info/$(TARGET_NAME)_libretro.info
- cd libretro/hakchi/; tar -czvf "CORE_$(TARGET_NAME).hmod" *
-endif
+ @echo "** BUILD SUCCESSFUL! GG NO RE **"
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
@@ -214,7 +234,7 @@ endif
$(CC) $(CFLAGS) -Wa,-I./src/ -c -o $@ $<
clean:
- rm -f $(OBJS) $(TARGET) hakchi/CORE_$(TARGET_NAME).hmod
+ rm -f $(OBJS) $(TARGET)
.PHONY: clean
diff --git a/libretro/hakchi/bin/snes b/libretro/hakchi/bin/snes
deleted file mode 100644
index 032fbe7..0000000
--- a/libretro/hakchi/bin/snes
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-setFileName(){
- filename="$(readlink -f "$1")"
- filebase="$(basename "$filename")"
- extension="${filebase##*.}"
-}
-
-getSfrom(){
- local rom="$(hexdump -e '1/4 "%u"' -s8 -n4 "$1")"
- local footer="$(hexdump -e '1/4 "%u"' -s20 -n4 "$1")"
- local size="$(hexdump -e '1/4 "%u"' -s$((footer+1)) -n4 "$1")"
- dd "status=none" "if=$1" "iflag=skip_bytes" "skip=$rom" "bs=$size" "count=1"
-}
-
-setFileName "$1"
-shift
-
-tmppath="/tmp/rom"
-rm -rf "$tmppath"
-mkdir -p "$tmppath"
-cd "$tmppath"
-
-if [ "$extension" = "7z" ]; then
- tiny7zx x "$filename"
- filename="$tmppath/$(ls | head -n1)"
- filename_str="${filename// /_}"
- mv "$filename" "$filename_str"
- setFileName "$filename_str"
-fi
-
-if [ "$extension" = "sfrom" ]; then
- filename_str="$filebase.sfc"
- getSfrom "$filename" > "$filename_str"
- setFileName "$filename_str"
-fi
-
-exec retroarch-clover snes9x2002 "$filename" "$@"
diff --git a/libretro/hakchi/bin/snes02 b/libretro/hakchi/bin/snes02
deleted file mode 100644
index 032fbe7..0000000
--- a/libretro/hakchi/bin/snes02
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-setFileName(){
- filename="$(readlink -f "$1")"
- filebase="$(basename "$filename")"
- extension="${filebase##*.}"
-}
-
-getSfrom(){
- local rom="$(hexdump -e '1/4 "%u"' -s8 -n4 "$1")"
- local footer="$(hexdump -e '1/4 "%u"' -s20 -n4 "$1")"
- local size="$(hexdump -e '1/4 "%u"' -s$((footer+1)) -n4 "$1")"
- dd "status=none" "if=$1" "iflag=skip_bytes" "skip=$rom" "bs=$size" "count=1"
-}
-
-setFileName "$1"
-shift
-
-tmppath="/tmp/rom"
-rm -rf "$tmppath"
-mkdir -p "$tmppath"
-cd "$tmppath"
-
-if [ "$extension" = "7z" ]; then
- tiny7zx x "$filename"
- filename="$tmppath/$(ls | head -n1)"
- filename_str="${filename// /_}"
- mv "$filename" "$filename_str"
- setFileName "$filename_str"
-fi
-
-if [ "$extension" = "sfrom" ]; then
- filename_str="$filebase.sfc"
- getSfrom "$filename" > "$filename_str"
- setFileName "$filename_str"
-fi
-
-exec retroarch-clover snes9x2002 "$filename" "$@"
diff --git a/libretro/hakchi/etc/preinit.d/pe9b0_retroarch_snes b/libretro/hakchi/etc/preinit.d/pe9b0_retroarch_snes
deleted file mode 100644
index 82b9be4..0000000
--- a/libretro/hakchi/etc/preinit.d/pe9b0_retroarch_snes
+++ /dev/null
@@ -1 +0,0 @@
-[ -f "$mountpoint/usr/bin/clover-canoe-shvc" ] && overmount /usr/bin/clover-canoe-shvc
diff --git a/libretro/hakchi/readme.md b/libretro/hakchi/readme.md
deleted file mode 100644
index 5a9c826..0000000
--- a/libretro/hakchi/readme.md
+++ /dev/null
@@ -1,23 +0,0 @@
------------------------
-Name: SNES9x2002
-Creator: Libretro
-Category: RetroArch Cores
------------------------
-=== SNES9x2002 Core for RetroArch ===
-
-Module adds support for Super Famicom / Super Nintendo
-
-Available executables and arguments to run Core:
-- /bin/snes <rom> <clover_args>
-- /bin/snes02 <rom> <clover_args>
-
-Core by libretro
-
-Built and assembled by HakchiCloud - [Website](https://hakchiresources.com)
-
-Hakchi module system by madmonkey
-
-NES/SNES Mini shell integration by Cluster
-
-(c) 2016-2018
-
diff --git a/snes9x2002_libretro.so b/snes9x2002_libretro.so
deleted file mode 100644
index c874720..0000000
--- a/snes9x2002_libretro.so
+++ /dev/null
Binary files differ