diff --git a/.gitignore b/.gitignore index 8fb1840..1c0b063 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ host/__pycache__ host/build host/dist host/nxdumptool +romfs/shaders *.elf *.nacp *.nro diff --git a/Makefile b/Makefile index 5e84d02..0727a75 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,6 @@ include $(DEVKITPRO)/libnx/switch_rules # SOURCES is a list of directories containing source code # DATA is a list of directories containing data files # INCLUDES is a list of directories containing header files -# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". # ROMFS is the directory containing data to be added to RomFS, relative to the Makefile (Optional) # # NO_ICON: if set to anything, do not use icon. @@ -29,39 +28,47 @@ include $(DEVKITPRO)/libnx/switch_rules # - .jpg # - icon.jpg # - /default_icon.jpg +# +# CONFIG_JSON is the filename of the NPDM config file (.json), relative to the project folder. +# If not set, it attempts to use one of the following (in this order): +# - .json +# - config.json +# If a JSON file is provided or autodetected, an ExeFS PFS0 (.nsp) is built instead +# of a homebrew executable (.nro). This is intended to be used for sysmodules. +# NACP building is skipped as well. #--------------------------------------------------------------------------------- -GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -GIT_COMMIT := $(shell git rev-parse --short HEAD) +GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +GIT_COMMIT := $(shell git rev-parse --short HEAD) -VERSION_MAJOR := 2 -VERSION_MINOR := 0 -VERSION_MICRO := 0 +VERSION_MAJOR := 2 +VERSION_MINOR := 0 +VERSION_MICRO := 0 -APP_TITLE := nxdumptool-rewrite -APP_AUTHOR := DarkMatterCore -APP_VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO} +APP_TITLE := nxdumptool +APP_AUTHOR := DarkMatterCore +APP_VERSION := ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO} -ifneq ($(origin BUILD_TYPE),undefined) -APP_TITLE := ${BUILD_TYPE} -endif +TARGET := ${APP_TITLE} +BUILD := build +SOURCES := source source/core source/fatfs +DATA := data +ICON := romfs/icon/${APP_TITLE}.jpg +INCLUDES := include include/core include/fatfs +ROMFS := romfs -TARGET := ${APP_TITLE} -BUILD := build -SOURCES := source source/core source/fatfs -DATA := data -INCLUDES := include include/core include/fatfs -EXEFS_SRC := exefs_src -ROMFS := romfs +USBHSFS_PATH := $(TOPDIR)/libs/libusbhsfs +BOREALIS_PATH := libs/borealis -ICON := $(ROMFS)/icon.jpg +# Output folders for autogenerated files in romfs +OUT_SHADERS := shaders #--------------------------------------------------------------------------------- # options for code generation #--------------------------------------------------------------------------------- ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE -CFLAGS := -g -Wall -Wextra -Werror -O2 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) -D__SWITCH__ +CFLAGS := -g -Wall -Wno-unused-function -Wno-misleading-indentation -O2 -ffunction-sections $(ARCH) $(DEFINES) $(INCLUDE) -D__SWITCH__ CFLAGS += -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO} -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\" CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\" CFLAGS += `aarch64-none-elf-pkg-config zlib --cflags` @@ -69,21 +76,20 @@ CFLAGS += `aarch64-none-elf-pkg-config libxml-2.0 --cflags` CFLAGS += `aarch64-none-elf-pkg-config json-c --cflags` CFLAGS += `aarch64-none-elf-pkg-config libturbojpeg --cflags` -CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=c++1z -O2 -Wno-volatile +CXXFLAGS := $(CFLAGS) -std=c++1z -O2 -Wno-volatile ASFLAGS := -g $(ARCH) LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) -LIBS := -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -lxml2 -lz -lusbhsfs -lntfs-3g -llwext4 -lnx -ljson-c -lm -lturbojpeg - -LIBUSBHSFS_DIR := $(CURDIR)/libs/libusbhsfs +LIBS := -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -lxml2 -lz -lusbhsfs -lntfs-3g -llwext4 -lnx -ljson-c -lturbojpeg #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- -LIBDIRS := $(PORTLIBS) $(LIBNX) $(LIBUSBHSFS_DIR) +LIBDIRS := $(PORTLIBS) $(LIBNX) $(USBHSFS_PATH) +include $(TOPDIR)/$(BOREALIS_PATH)/library/borealis.mk #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional @@ -103,6 +109,7 @@ export DEPSDIR := $(CURDIR)/$(BUILD) CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) +GLSLFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.glsl))) BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) #--------------------------------------------------------------------------------- @@ -124,13 +131,36 @@ export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) export OFILES := $(OFILES_BIN) $(OFILES_SRC) export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES))) +ifneq ($(strip $(ROMFS)),) + ROMFS_TARGETS := + ROMFS_FOLDERS := + ifneq ($(strip $(OUT_SHADERS)),) + ROMFS_SHADERS := $(ROMFS)/$(OUT_SHADERS) + ROMFS_TARGETS += $(patsubst %.glsl, $(ROMFS_SHADERS)/%.dksh, $(GLSLFILES)) + ROMFS_FOLDERS += $(ROMFS_SHADERS) + endif + + export ROMFS_DEPS := $(foreach file,$(ROMFS_TARGETS),$(CURDIR)/$(file)) +endif + export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ -I$(CURDIR)/$(BUILD) export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) -export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC) +ifeq ($(strip $(CONFIG_JSON)),) + jsons := $(wildcard *.json) + ifneq (,$(findstring $(TARGET).json,$(jsons))) + export APP_JSON := $(TOPDIR)/$(TARGET).json + else + ifneq (,$(findstring config.json,$(jsons))) + export APP_JSON := $(TOPDIR)/config.json + endif + endif +else + export APP_JSON := $(TOPDIR)/$(CONFIG_JSON) +endif ifeq ($(strip $(ICON)),) icons := $(wildcard *.jpg) @@ -164,22 +194,59 @@ endif .PHONY: $(BUILD) clean clean_all all #--------------------------------------------------------------------------------- -all: $(BUILD) +all: $(ROMFS_TARGETS) usbhsfs | $(BUILD) + @MSYS2_ARG_CONV_EXCL="-D;$(MSYS2_ARG_CONV_EXCL)" $(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile usbhsfs: - @$(MAKE) --no-print-directory -C $(LIBUSBHSFS_DIR) BUILD_TYPE=GPL release + @$(MAKE) --no-print-directory -C $(USBHSFS_PATH) BUILD_TYPE=GPL release -$(BUILD): usbhsfs - @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile +$(BUILD): + @mkdir -p $@ + +ifneq ($(strip $(ROMFS_TARGETS)),) + +$(ROMFS_TARGETS): | $(ROMFS_FOLDERS) + +$(ROMFS_FOLDERS): + @mkdir -p $@ + +$(ROMFS_SHADERS)/%_vsh.dksh: %_vsh.glsl + @echo {vert} $(notdir $<) + @uam -s vert -o $@ $< + +$(ROMFS_SHADERS)/%_tcsh.dksh: %_tcsh.glsl + @echo {tess_ctrl} $(notdir $<) + @uam -s tess_ctrl -o $@ $< + +$(ROMFS_SHADERS)/%_tesh.dksh: %_tesh.glsl + @echo {tess_eval} $(notdir $<) + @uam -s tess_eval -o $@ $< + +$(ROMFS_SHADERS)/%_gsh.dksh: %_gsh.glsl + @echo {geom} $(notdir $<) + @uam -s geom -o $@ $< + +$(ROMFS_SHADERS)/%_fsh.dksh: %_fsh.glsl + @echo {frag} $(notdir $<) + @uam -s frag -o $@ $< + +$(ROMFS_SHADERS)/%.dksh: %.glsl + @echo {comp} $(notdir $<) + @uam -s comp -o $@ $< + +endif #--------------------------------------------------------------------------------- clean: @echo clean ... - @rm -fr $(BUILD) *.pfs0 *.nso *.nro *.nacp *.elf +ifeq ($(strip $(APP_JSON)),) + @rm -fr $(BUILD) $(ROMFS_FOLDERS) $(TARGET).nro $(TARGET).nacp $(TARGET).elf +else + @rm -fr $(BUILD) $(ROMFS_FOLDERS) $(TARGET).nsp $(TARGET).nso $(TARGET).npdm $(TARGET).elf +endif clean_all: clean - @$(MAKE) --no-print-directory -C $(LIBUSBHSFS_DIR) clean + @$(MAKE) --no-print-directory -C $(USBHSFS_PATH) clean #--------------------------------------------------------------------------------- else @@ -190,16 +257,24 @@ DEPENDS := $(OFILES:.o=.d) #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- -all : $(OUTPUT).pfs0 $(OUTPUT).nro +ifeq ($(strip $(APP_JSON)),) -$(OUTPUT).pfs0 : $(OUTPUT).nso +all : $(OUTPUT).nro + +ifeq ($(strip $(NO_NACP)),) +$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp $(ROMFS_DEPS) +else +$(OUTPUT).nro : $(OUTPUT).elf $(ROMFS_DEPS) +endif + +else + +all : $(OUTPUT).nsp + +$(OUTPUT).nsp : $(OUTPUT).nso $(OUTPUT).npdm $(OUTPUT).nso : $(OUTPUT).elf -ifeq ($(strip $(NO_NACP)),) -$(OUTPUT).nro : $(OUTPUT).elf $(OUTPUT).nacp -else -$(OUTPUT).nro : $(OUTPUT).elf endif $(OUTPUT).elf : $(OFILES) @@ -209,7 +284,7 @@ $(OFILES_SRC) : $(HFILES_BIN) #--------------------------------------------------------------------------------- # you need a rule like this for each extension you use as binary data #--------------------------------------------------------------------------------- -%.bin.o : %.bin +%.bin.o %_bin.h : %.bin #--------------------------------------------------------------------------------- @echo $(notdir $<) @$(bin2o) diff --git a/build.sh b/build.sh index c0aea4e..6feffa9 100644 --- a/build.sh +++ b/build.sh @@ -8,7 +8,7 @@ rm -f ./*.tar.bz2 rm -rf ./code_templates/tmp mkdir ./code_templates/tmp -make clean +make clean_all for f in ./code_templates/*.c; do basename="$(basename "$f")" @@ -23,16 +23,16 @@ for f in ./code_templates/*.c; do rm -f ./source/main.c cp $f ./source/main.c - make BUILD_TYPE="$filename" -j$(nproc) + make -j$(nproc) mkdir ./code_templates/tmp/$filename - cp ./$filename.nro ./code_templates/tmp/$filename/nxdumptool-rewrite.nro - #cp ./$filename.elf ./code_templates/tmp/$filename/nxdumptool-rewrite.elf + cp ./nxdumptool.nro ./code_templates/tmp/$filename/nxdumptool.nro + #cp ./nxdumptool.elf ./code_templates/tmp/$filename/nxdumptool.elf - rm -f ./build/main.o ./build/main.d ./build/utils.o ./build/utils.d ./build/usb.o ./build/usb.d ./build/log.o ./build/log.d ./$filename.* + rm -f ./build/main.o ./build/main.d ./build/nxdt_utils.o ./build/nxdt_utils.d ./build/usb.o ./build/usb.d ./build/nxdt_log.o ./build/nxdt_log.d ./nxdumptool.* done -make clean +make clean_all cd ./code_templates/tmp tar -cjf ../../$tar_filename * diff --git a/code_templates/nsp_dumper_stor.c b/code_templates/nsp_dumper_stor.c index a2437f7..4339412 100644 --- a/code_templates/nsp_dumper_stor.c +++ b/code_templates/nsp_dumper_stor.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "gamecard.h" #include "title.h" #include "cnmt.h" diff --git a/code_templates/nsp_dumper_usb.c b/code_templates/nsp_dumper_usb.c index 9942ac3..a38a7fb 100644 --- a/code_templates/nsp_dumper_usb.c +++ b/code_templates/nsp_dumper_usb.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "gamecard.h" #include "title.h" #include "cnmt.h" diff --git a/code_templates/sd_romfs_dumper.c b/code_templates/sd_romfs_dumper.c index da07d64..1eb80de 100644 --- a/code_templates/sd_romfs_dumper.c +++ b/code_templates/sd_romfs_dumper.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "bktr.h" #include "gamecard.h" #include "title.h" diff --git a/code_templates/system_title_dumper.c b/code_templates/system_title_dumper.c index bc60086..d3d4e75 100644 --- a/code_templates/system_title_dumper.c +++ b/code_templates/system_title_dumper.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "nca.h" #include "title.h" #include "pfs.h" diff --git a/code_templates/usb_gc_dumper.c b/code_templates/usb_gc_dumper.c index 952a418..55d691f 100644 --- a/code_templates/usb_gc_dumper.c +++ b/code_templates/usb_gc_dumper.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "gamecard.h" #include "usb.h" #include "title.h" diff --git a/code_templates/usb_romfs_dumper.c b/code_templates/usb_romfs_dumper.c index 4c1f6c5..7b0d8eb 100644 --- a/code_templates/usb_romfs_dumper.c +++ b/code_templates/usb_romfs_dumper.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "bktr.h" #include "gamecard.h" #include "usb.h" diff --git a/code_templates/xml_generator.c b/code_templates/xml_generator.c index 16516cb..50ba78d 100644 --- a/code_templates/xml_generator.c +++ b/code_templates/xml_generator.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "gamecard.h" #include "title.h" #include "cnmt.h" diff --git a/include/core/common.h b/include/core/common.h index ed985f1..40cc7d0 100644 --- a/include/core/common.h +++ b/include/core/common.h @@ -46,7 +46,7 @@ #define _Atomic(X) std::atomic< X > #endif -#include "log.h" +#include "nxdt_log.h" #include "ums.h" #define FS_SYSMODULE_TID (u64)0x0100000000000000 diff --git a/include/core/log.h b/include/core/nxdt_log.h similarity index 96% rename from include/core/log.h rename to include/core/nxdt_log.h index 617ffb0..821d2d9 100644 --- a/include/core/log.h +++ b/include/core/nxdt_log.h @@ -1,5 +1,5 @@ /* - * log.h + * nxdt_log.h * * Copyright (c) 2020-2021, DarkMatterCore . * @@ -21,8 +21,8 @@ #pragma once -#ifndef __LOG_H__ -#define __LOG_H__ +#ifndef __NXDT_LOG_H__ +#define __NXDT_LOG_H__ #ifdef __cplusplus extern "C" { @@ -63,4 +63,4 @@ void logControlMutex(bool lock); } #endif -#endif /* __LOG_H__ */ +#endif /* __NXDT_LOG_H__ */ diff --git a/include/core/utils.h b/include/core/nxdt_utils.h similarity index 98% rename from include/core/utils.h rename to include/core/nxdt_utils.h index 91048fc..edafcd1 100644 --- a/include/core/utils.h +++ b/include/core/nxdt_utils.h @@ -1,5 +1,5 @@ /* - * utils.h + * nxdt_utils.h * * Copyright (c) 2020-2021, DarkMatterCore . * @@ -21,8 +21,8 @@ #pragma once -#ifndef __UTILS_H__ -#define __UTILS_H__ +#ifndef __NXDT_UTILS_H__ +#define __NXDT_UTILS_H__ #include "common.h" @@ -146,4 +146,4 @@ NX_INLINE void utilsSleep(u64 seconds) } #endif -#endif /* __UTILS_H__ */ +#endif /* __NXDT_UTILS_H__ */ diff --git a/romfs/icon.jpg b/romfs/icon/nxdumptool.jpg similarity index 100% rename from romfs/icon.jpg rename to romfs/icon/nxdumptool.jpg diff --git a/source/core/aes.c b/source/core/aes.c index 0fe77e5..70a721f 100644 --- a/source/core/aes.c +++ b/source/core/aes.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" size_t aes128XtsNintendoCrypt(Aes128XtsContext *ctx, void *dst, const void *src, size_t size, u64 sector, size_t sector_size, bool encrypt) { diff --git a/source/core/bfttf.c b/source/core/bfttf.c index d03e80e..956de3e 100644 --- a/source/core/bfttf.c +++ b/source/core/bfttf.c @@ -20,7 +20,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "bfttf.h" #include "romfs.h" #include "title.h" diff --git a/source/core/bktr.c b/source/core/bktr.c index 3ce41d9..4f86ba6 100644 --- a/source/core/bktr.c +++ b/source/core/bktr.c @@ -20,7 +20,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "bktr.h" /* Function prototypes. */ diff --git a/source/core/cert.c b/source/core/cert.c index 7fe0775..bd81b48 100644 --- a/source/core/cert.c +++ b/source/core/cert.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "cert.h" #include "save.h" #include "gamecard.h" diff --git a/source/core/cnmt.c b/source/core/cnmt.c index d77e829..5f635a3 100644 --- a/source/core/cnmt.c +++ b/source/core/cnmt.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "cnmt.h" #include "title.h" diff --git a/source/core/crc32_fast.c b/source/core/crc32_fast.c index 3d56b0f..a0d177c 100644 --- a/source/core/crc32_fast.c +++ b/source/core/crc32_fast.c @@ -22,7 +22,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" static u32 crc32FastGetTableValueByIndex(u32 r) { diff --git a/source/core/es.c b/source/core/es.c index 4a16f00..6bf6908 100644 --- a/source/core/es.c +++ b/source/core/es.c @@ -20,7 +20,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "es.h" #include "service_guard.h" diff --git a/source/core/fs_ext.c b/source/core/fs_ext.c index 7d01cd2..980dc01 100644 --- a/source/core/fs_ext.c +++ b/source/core/fs_ext.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "fs_ext.h" /* IFileSystemProxy. */ diff --git a/source/core/gamecard.c b/source/core/gamecard.c index 2f549ba..11e03bd 100644 --- a/source/core/gamecard.c +++ b/source/core/gamecard.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "mem.h" #include "gamecard.h" diff --git a/source/core/hfs.c b/source/core/hfs.c index ec8da2c..6870cdc 100644 --- a/source/core/hfs.c +++ b/source/core/hfs.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "gamecard.h" bool hfsReadPartitionData(HashFileSystemContext *ctx, void *out, u64 read_size, u64 offset) diff --git a/source/core/keys.c b/source/core/keys.c index d9d6439..f8d2748 100644 --- a/source/core/keys.c +++ b/source/core/keys.c @@ -21,7 +21,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "keys.h" #include "mem.h" #include "nca.h" diff --git a/source/core/legal_info.c b/source/core/legal_info.c index f95af45..391c179 100644 --- a/source/core/legal_info.c +++ b/source/core/legal_info.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "legal_info.h" #include "romfs.h" diff --git a/source/core/mem.c b/source/core/mem.c index c3ac54a..88c3028 100644 --- a/source/core/mem.c +++ b/source/core/mem.c @@ -20,7 +20,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "mem.h" #define MEMLOG(fmt, ...) LOG_MSG_BUF(&g_memLogBuf, &g_memLogBufSize, fmt, ##__VA_ARGS__) diff --git a/source/core/nacp.c b/source/core/nacp.c index 7805d36..0cfe22d 100644 --- a/source/core/nacp.c +++ b/source/core/nacp.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "nacp.h" #include "title.h" diff --git a/source/core/nca.c b/source/core/nca.c index 6beb5d7..1ace1c1 100644 --- a/source/core/nca.c +++ b/source/core/nca.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "nca.h" #include "keys.h" #include "aes.h" diff --git a/source/core/npdm.c b/source/core/npdm.c index 357ab14..37d4602 100644 --- a/source/core/npdm.c +++ b/source/core/npdm.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "npdm.h" #include "rsa.h" diff --git a/source/core/nso.c b/source/core/nso.c index 541d163..4f4d540 100644 --- a/source/core/nso.c +++ b/source/core/nso.c @@ -21,7 +21,7 @@ #define LZ4_STATIC_LINKING_ONLY /* Required by LZ4 to enable in-place decompression. */ -#include "utils.h" +#include "nxdt_utils.h" #include "nso.h" #include "lz4.h" diff --git a/source/core/log.c b/source/core/nxdt_log.c similarity index 99% rename from source/core/log.c rename to source/core/nxdt_log.c index 0363bc0..2be0e5d 100644 --- a/source/core/log.c +++ b/source/core/nxdt_log.c @@ -1,5 +1,5 @@ /* - * log.c + * nxdt_log.c * * Copyright (c) 2020-2021, DarkMatterCore . * @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #define LOG_FILE_NAME APP_TITLE ".log" #define LOG_BUF_SIZE 0x400000 /* 4 MiB. */ diff --git a/source/core/utils.c b/source/core/nxdt_utils.c similarity index 99% rename from source/core/utils.c rename to source/core/nxdt_utils.c index 99797cf..92e5453 100644 --- a/source/core/utils.c +++ b/source/core/nxdt_utils.c @@ -1,5 +1,5 @@ /* - * utils.c + * nxdt_utils.c * * Copyright (c) 2020-2021, DarkMatterCore . * @@ -21,7 +21,7 @@ #include -#include "utils.h" +#include "nxdt_utils.h" #include "keys.h" #include "gamecard.h" #include "services.h" diff --git a/source/core/pfs.c b/source/core/pfs.c index 9813099..f22936e 100644 --- a/source/core/pfs.c +++ b/source/core/pfs.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "pfs.h" #include "npdm.h" diff --git a/source/core/program_info.c b/source/core/program_info.c index 13cca67..ab39ce1 100644 --- a/source/core/program_info.c +++ b/source/core/program_info.c @@ -21,7 +21,7 @@ #include -#include "utils.h" +#include "nxdt_utils.h" #include "program_info.h" #include "elf_symbol.h" diff --git a/source/core/romfs.c b/source/core/romfs.c index 1a6cfcf..e465690 100644 --- a/source/core/romfs.c +++ b/source/core/romfs.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "romfs.h" /* Function prototypes. */ diff --git a/source/core/rsa.c b/source/core/rsa.c index f541507..e5f501e 100644 --- a/source/core/rsa.c +++ b/source/core/rsa.c @@ -21,7 +21,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "rsa.h" #include diff --git a/source/core/save.c b/source/core/save.c index 5afc22b..cd8fc60 100644 --- a/source/core/save.c +++ b/source/core/save.c @@ -20,7 +20,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "save.h" static inline void save_bitmap_set_bit(void *buffer, size_t bit_offset) diff --git a/source/core/services.c b/source/core/services.c index 210c18b..662952e 100644 --- a/source/core/services.c +++ b/source/core/services.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "services.h" #include "es.h" diff --git a/source/core/tik.c b/source/core/tik.c index 4ebe2df..432c9f9 100644 --- a/source/core/tik.c +++ b/source/core/tik.c @@ -20,7 +20,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "tik.h" #include "cert.h" #include "save.h" diff --git a/source/core/title.c b/source/core/title.c index 6f55c0f..114f124 100644 --- a/source/core/title.c +++ b/source/core/title.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "title.h" #include "gamecard.h" diff --git a/source/core/ums.c b/source/core/ums.c index 908c413..c92f249 100644 --- a/source/core/ums.c +++ b/source/core/ums.c @@ -19,7 +19,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" /* Global variables. */ diff --git a/source/core/usb.c b/source/core/usb.c index e32ae90..b028bfb 100644 --- a/source/core/usb.c +++ b/source/core/usb.c @@ -22,7 +22,7 @@ * along with this program. If not, see . */ -#include "utils.h" +#include "nxdt_utils.h" #include "usb.h" #define USB_ABI_VERSION 1 diff --git a/source/fatfs/diskio.c b/source/fatfs/diskio.c index 06a43aa..9197636 100644 --- a/source/fatfs/diskio.c +++ b/source/fatfs/diskio.c @@ -12,7 +12,7 @@ #include -#include "utils.h" +#include "nxdt_utils.h" /*-----------------------------------------------------------------------*/ /* Get Drive Status */