aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTwinaphex2018-11-02 03:35:04 +0100
committerGitHub2018-11-02 03:35:04 +0100
commitf4a5a7afa4fe054845ba741be8a3878a8022c4eb (patch)
tree9d236b83a88e4b4e804895820f3d4c11cc6a7a40
parent30fe01d0516db2bf861546cfb8c97055fafc6235 (diff)
parent75646227ccf5b32e78cc7a707c5f2e9dd400ca38 (diff)
downloadsnesemu-f4a5a7afa4fe054845ba741be8a3878a8022c4eb.tar.gz
snesemu-f4a5a7afa4fe054845ba741be8a3878a8022c4eb.tar.bz2
snesemu-f4a5a7afa4fe054845ba741be8a3878a8022c4eb.zip
Merge pull request #62 from Classicmods/master
Added Classic Platform structure - ARMv7 Cortex A7 build
-rw-r--r--Makefile56
-rwxr-xr-xhakchi/bin/snes38
-rwxr-xr-xhakchi/bin/snes0538
-rw-r--r--hakchi/etc/preinit.d/pe9b0_retroarch_snes1
-rw-r--r--hakchi/readme.md23
5 files changed, 38 insertions, 118 deletions
diff --git a/Makefile b/Makefile
index 1cd2a1f..ca4e440 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,9 @@ USE_BLARGG_APU = 0
LAGFIX = 1
ifeq ($(platform),)
- platform = unix
+ ifeq (,$(findstring classic_,$(platform)))
+ platform = unix
+ endif
ifeq ($(shell uname -a),)
platform = win
else ifneq ($(findstring Darwin,$(shell uname -a)),)
@@ -226,12 +228,38 @@ else ifeq ($(platform), gcw0)
LIBM :=
LOAD_FROM_MEMORY_TEST = 0
CFLAGS += -ffast-math -march=mips32 -mtune=mips32r2 -mhard-float
-#Nintendo Classics (Hakchi)
-else ifeq ($(platform), nintendoc)
- TARGET := $(TARGET_NAME)_libretro.so
- fpic := -fPIC
- SHARED := -shared -Wl,--no-undefined -Wl,--version-script=link.T
- CFLAGS += -fno-builtin -fno-exceptions -ffunction-sections -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=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 x86
else ifeq ($(platform), windows_msvc2010_x86)
@@ -362,24 +390,16 @@ ifeq ($(platform), theos_ios)
else
all: $(TARGET)
$(TARGET): $(OBJECTS)
+ @echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **"
ifeq ($(STATIC_LINKING), 1)
$(AR) rcs $@ $(OBJECTS)
else
$(CC) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) $(LIBS)
endif
-
-ifeq ($(platform),nintendoc)
- @echo "** BUILDING HAKCHI HMOD PACKAGE **"
- mkdir -p hakchi/etc/libretro/core/ hakchi/etc/libretro/info/ hakchi/etc/preinit.d/
- rm -f hakchi/etc/libretro/info/*
- cp $(TARGET_NAME)_libretro.so hakchi/etc/libretro/core/
- cd hakchi/etc/libretro/info/; wget https://buildbot.libretro.com/assets/frontend/info/$(TARGET_NAME)_libretro.info
- cd hakchi/; tar -czvf "CORE_$(TARGET_NAME).hmod" *
-endif
-
+ @echo "** BUILD SUCCESSFUL! GG NO RE **"
clean:
- rm -f $(TARGET) $(OBJECTS) hakchi/CORE_$(TARGET_NAME).hmod
+ rm -f $(TARGET) $(OBJECTS)
.PHONY: clean
endif
diff --git a/hakchi/bin/snes b/hakchi/bin/snes
deleted file mode 100755
index 4447455..0000000
--- a/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 snes9x "$filename" "$@"
diff --git a/hakchi/bin/snes05 b/hakchi/bin/snes05
deleted file mode 100755
index c6da74b..0000000
--- a/hakchi/bin/snes05
+++ /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 snes9x2005 "$filename" "$@"
diff --git a/hakchi/etc/preinit.d/pe9b0_retroarch_snes b/hakchi/etc/preinit.d/pe9b0_retroarch_snes
deleted file mode 100644
index 82b9be4..0000000
--- a/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/hakchi/readme.md b/hakchi/readme.md
deleted file mode 100644
index 18bc086..0000000
--- a/hakchi/readme.md
+++ /dev/null
@@ -1,23 +0,0 @@
------------------------
-Name: SNES9x2005
-Creator: Libretro
-Category: RetroArch Cores
------------------------
-=== SNES9x2005 Core for RetroArch ===
-
-Module adds support for Super Famicom / Super Nintendo
-
-Available executables and arguments to run Core:
-- /bin/snes <rom> <clover_args>
-- /bin/snes05 <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
-