Commit 7888fcf1 authored by Ryan 'Swingflip' Hamlin's avatar Ryan 'Swingflip' Hamlin
Browse files

Added Hakchi Specifc automated make ((S)NESC platform)

parent 22124a90
......@@ -28,6 +28,8 @@ else ifneq (,$(findstring armv,$(platform)))
override platform += unix
else ifneq (,$(findstring rpi,$(platform)))
override platform += unix
else ifneq (,$(findstring snesc,$(platfrom)))
override platform += unix
endif
TARGET_NAME = snes9x
......@@ -68,6 +70,9 @@ ifneq (,$(findstring unix,$(platform)))
# Raspberry Pi
else ifneq (,$(findstring rpi,$(platform)))
CXXFLAGS += -DARM
# (S)NESC
else ifneq (,$(findstring snesc,$(platfrom)))
CXXFLAGS += -DARM
endif
# OS X
......@@ -524,6 +529,14 @@ else
$(LD) $(fpic) $(SHARED) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) $(LIBS)
endif
ifneq (,$(findstring snesc,$(platform)))
mkdir -p hakchi/etc/libretro/core/ hakchi/etc/libretro/info/ hakchi/etc/preinit.d/
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 ../../../; tar -czvf "../CORE_$(TARGET_NAME).hmod" *
touch "../CORE_$(TARGET_NAME).hmod"
endif
%.o: %.cpp
$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $(OBJOUT)$@ $<
......
#!/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" "$@"
#!/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" "$@"
#!/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" "$@"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment