mirror of
https://github.com/NotImplementedLife/FSPDS.git
synced 2025-06-18 17:05:33 -04:00
added NitroFS support (#14)
This commit is contained in:
parent
1558a81899
commit
77909be2ed
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,4 +10,5 @@ FSPDS.layout
|
||||
*.nds
|
||||
run.bat
|
||||
arm9/source/build_counter.c
|
||||
*.pdn
|
||||
*.pdn
|
||||
*.ppm
|
3
Makefile
3
Makefile
@ -12,6 +12,8 @@ export GAME_ICON := $(CURDIR)/icon.bmp
|
||||
export TARGET := FSPDS
|
||||
export NDS_FILE := $(TARGET)
|
||||
|
||||
NITRO := nitrofs
|
||||
|
||||
|
||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
@ -33,6 +35,7 @@ TARGET_BUILD_VERSION := ${shell python build_counter.py}
|
||||
all: $(TARGET).nds
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
ifneq ($(strip $(NITRO)),)
|
||||
$(TARGET).nds : arm7/$(TARGET).elf arm9/$(TARGET).elf $(NITRO_FILES)
|
||||
@ndstool -7 arm7/$(TARGET).elf -9 arm9/$(TARGET).elf -b $(GAME_ICON) "$(GAME_TITLE)" -d $(NITRO_FILES) -c $(TARGET).nds
|
||||
|
@ -8,6 +8,18 @@ endif
|
||||
|
||||
include $(DEVKITARM)/ds_rules
|
||||
|
||||
|
||||
MAKEFILE_PATH:=$(realpath $(shell dirname $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
$(info MAKEFILE_PATH=$(MAKEFILE_PATH))
|
||||
|
||||
|
||||
# Read value of NTFS attribute in ../config.ini (default 0)
|
||||
USE_NTFS := ${shell grep -E "^NTFS\s*\=\s*.*\s*$$" $(MAKEFILE_PATH)/../config.ini | sed -E "s/^NTFS\s*\=\s*(.*)\s*$$/\1/" | grep . || echo "0"}
|
||||
|
||||
$(info Build Configuration)
|
||||
$(info NTFS Enabled = $(USE_NTFS))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
@ -25,7 +37,17 @@ DATA := data
|
||||
|
||||
# specify a directory which contains the nitro filesystem
|
||||
# this is relative to the Makefile
|
||||
NITRO :=
|
||||
ifeq ($(USE_NTFS), 1)
|
||||
$(info NTFS)
|
||||
NITRO := nitrofs
|
||||
else
|
||||
$(info NO_NTFS)
|
||||
NITRO :=
|
||||
endif
|
||||
|
||||
|
||||
|
||||
# $(error x)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
@ -33,7 +55,7 @@ NITRO :=
|
||||
ARCH := -marm -mthumb-interwork -march=armv5te -mtune=arm946e-s
|
||||
|
||||
CFLAGS := -g -Wall -O3\
|
||||
$(ARCH) $(INCLUDE) -DARM9
|
||||
$(ARCH) $(INCLUDE) -DARM9 -DUSE_NTFS=$(USE_NTFS)
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
BIN
arm9/nitrofs/data/FSPDS/locations
Normal file
BIN
arm9/nitrofs/data/FSPDS/locations
Normal file
Binary file not shown.
1
arm9/nitrofs/empty
Normal file
1
arm9/nitrofs/empty
Normal file
@ -0,0 +1 @@
|
||||
0
|
1
arm9/nitrofs/flipnotes/place_flipnotes_here
Normal file
1
arm9/nitrofs/flipnotes/place_flipnotes_here
Normal file
@ -0,0 +1 @@
|
||||
.
|
@ -1,13 +1,19 @@
|
||||
#include "scenes.hpp"
|
||||
|
||||
#include <fat.h>
|
||||
#include <filesystem.h>
|
||||
#include "globals.hpp"
|
||||
|
||||
using namespace DSC;
|
||||
|
||||
void DSC::init_main_scene()
|
||||
{
|
||||
set_fat_inited(fatInitDefault());
|
||||
DSC::Debug::log("NITRO = %i\n", USE_NTFS);
|
||||
#if USE_NTFS==1
|
||||
set_fat_inited(nitroFSInit(NULL));
|
||||
#else
|
||||
set_fat_inited(fatInitDefault());
|
||||
#endif
|
||||
|
||||
DSC::__MAIN_SCENE__= gen_title_scene();
|
||||
}
|
||||
|
1
config.ini
Normal file
1
config.ini
Normal file
@ -0,0 +1 @@
|
||||
NTFS = 1
|
@ -1,3 +1,3 @@
|
||||
BUILD_TYPE = 'R'
|
||||
BUILD_TYPE = 'D'
|
||||
MAJOR = 1
|
||||
MINOR = 0
|
||||
MINOR = 1
|
||||
|
Loading…
Reference in New Issue
Block a user