Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add libretro core support #156

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
/build-switch
/build-vita
/build-wiiu
/build-libretro
/.gradle
/src/android/.cxx
/eboot.bin
/noods
/noods*.so
/noods*.dll
/noods*.dylib
/noods.aab
/NooDS.app
/NooDS.dmg
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,14 @@ wiiu:
vita:
$(MAKE) -f Makefile.vita

libretro:
$(MAKE) -f Makefile.libretro

clean:
if [ -d "build-android" ]; then ./gradlew clean; fi
if [ -d "build-switch" ]; then $(MAKE) -f Makefile.switch clean; fi
if [ -d "build-wiiu" ]; then $(MAKE) -f Makefile.wiiu clean; fi
if [ -d "build-vita" ]; then $(MAKE) -f Makefile.vita clean; fi
if [ -d "build-libretro" ]; then $(MAKE) -f Makefile.libretro clean; fi
rm -rf $(BUILD)
rm -f $(NAME)
36 changes: 36 additions & 0 deletions Makefile.libretro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
NAME := noods_libretro
BUILD := build-libretro
GIT_VERSION := "$(shell git describe --abbrev=7 --always --tags)"
SRCS := src src/common src/libretro
ARGS := -Ofast -flto -std=c++11 -D__LIBRETRO__ -DVERSION=\"$(GIT_VERSION)\"

CPPFILES := $(foreach dir,$(SRCS),$(wildcard $(dir)/*.cpp))
HFILES := $(foreach dir,$(SRCS),$(wildcard $(dir)/*.h))
OFILES := $(patsubst %.cpp,$(BUILD)/%.o,$(CPPFILES))

ifeq ($(OS),Windows_NT)
ARGS += -static -DWINDOWS
SHARED_EXT := .dll
else
ifeq ($(shell uname -s),Darwin)
ARGS += -DMACOS
SHARED_EXT := .dylib
else
SHARED_EXT := .so
endif
endif

all: $(NAME)

$(NAME): $(OFILES)
g++ -shared -o $@$(SHARED_EXT) $(ARGS) $^ $(LIBS)

$(BUILD)/%.o: %.cpp $(HFILES) $(BUILD)
g++ -c -fPIC -o $@ $(ARGS) $(INCS) $<

$(BUILD):
for dir in $(SRCS); do mkdir -p $(BUILD)/$$dir; done

clean:
rm -rf $(BUILD)
rm -f $(NAME)$(SHARED_EXT)
32 changes: 32 additions & 0 deletions noods_libretro.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
display_name = "Nintendo - DS (NooDS)"
authors = "Hydr8gon"
supported_extensions = "nds"
corename = "NooDS"
manufacturer = "Nintendo"
categories = "Emulator"
systemname = "Nintendo DS"
systemid = "nds"
database = "Nintendo - Nintendo DS|Nintendo - Nintendo DS (Download Play)"
license = "GPLv3"
permissions = ""
display_version = "Git"
supports_no_game = "true"
hw_render = "false"

# Firmware / BIOS
firmware_count = 4
firmware0_desc = "firmware.bin (NDS Firmware)"
firmware0_path = "firmware.bin"
firmware0_opt = "true"
firmware1_desc = "bios7.bin (ARM7 BIOS)"
firmware1_path = "bios7.bin"
firmware1_opt = "true"
firmware2_desc = "bios9.bin (ARM9 BIOS)"
firmware2_path = "bios9.bin"
firmware2_opt = "true"
firmware3_desc = "nds_sd_card.bin (NDS SD card)"
firmware3_path = "nds_sd_card.bin"
firmware3_opt = "true"
notes = "(!) bios7.bin (md5): df692a80a5b1bc90728bc3dfc76cd948|(!) bios9.bin (md5): a392174eb3e572fed6447e956bde4b25"

description = "A speedy DS emulator"
Loading