diff --git a/.gitignore b/.gitignore index a982660b..6b03d97e 100644 --- a/.gitignore +++ b/.gitignore @@ -177,4 +177,6 @@ PGOHelper/PGOMesenHome *.profraw *.profdata -packages/* \ No newline at end of file +packages/* + +!Libretro/hakchi/bin \ No newline at end of file diff --git a/Libretro/Makefile b/Libretro/Makefile index 5590d2eb..1c4a510a 100644 --- a/Libretro/Makefile +++ b/Libretro/Makefile @@ -74,6 +74,17 @@ else ifeq ($(platform), linux-portable) fpic := -fPIC -nostdlib SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T LIBM := +else ifeq ($(platform), nintendoc) + # Nintendo Classics (Hakchi) + CC = arm-linux-gnueabihf-gcc-5 + CXX = arm-linux-gnueabihf-g++-5 + EXT ?= so + TARGET := $(TARGET_NAME)_libretro.$(EXT) + fpic := -fPIC -pthread + SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined + CXXFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -static -static-libgcc -static-libstdc++ + CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -static -static-libgcc -static-libstdc++ + LDFLAGS += /usr/lib/gcc-cross/arm-linux-gnueabihf/5/libstdc++.a else ifneq (,$(findstring osx,$(platform))) TARGET := $(TARGET_NAME)_libretro.dylib fpic := -fPIC @@ -240,7 +251,7 @@ else endif else OBJOUT = -o - LINKOUT = -o + LINKOUT = -o LD = $(CXX) endif @@ -269,6 +280,15 @@ else $(LD) $(fpic) $(SHARED) $(INCLUDES) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) 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 + %.o: %.c $(CC) $(CFLAGS) $(fpic) -c $< $(OBJOUT)$@ @@ -276,7 +296,7 @@ endif $(CXX) $(CXXFLAGS) $(fpic) -c $< $(OBJOUT)$@ clean: - rm -f $(OBJECTS) $(TARGET) + rm -f $(OBJECTS) $(TARGET) hakchi/CORE_$(TARGET_NAME).hmod .PHONY: clean diff --git a/Libretro/hakchi/bin/mesen b/Libretro/hakchi/bin/mesen new file mode 100644 index 00000000..01e8e507 --- /dev/null +++ b/Libretro/hakchi/bin/mesen @@ -0,0 +1,3 @@ +#!/bin/sh + +exec retroarch-clover mesen "$@" diff --git a/Libretro/hakchi/install b/Libretro/hakchi/install new file mode 100644 index 00000000..6e0a0071 --- /dev/null +++ b/Libretro/hakchi/install @@ -0,0 +1,4 @@ +transfer_default +chmod +x $rootfs/bin/* +chmod +x $rootfs/usr/bin/* +return 1 diff --git a/Libretro/hakchi/readme.md b/Libretro/hakchi/readme.md new file mode 100644 index 00000000..766ca2ce --- /dev/null +++ b/Libretro/hakchi/readme.md @@ -0,0 +1,22 @@ +----------------------- +Name: Mesen +Creator: Sour +Category: RetroArch Cores +----------------------- +=== Mesen Core for RetroArch === + +Module adds support for Famicom / Nintendo Entertainment System + +Available executables and arguments to run Core: +- /bin/mesen + +Core by Sour + +Built and assembled by HakchiCloud - [Website](https://hakchiresources.com) + +Hakchi module system by madmonkey + +NES/SNES Mini shell integration by Cluster + +(c) 2016-2018 +