diff --git a/Makefile b/Makefile index 2be874e..f624b10 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ include $(DEVKITARM)/3ds_rules #--------------------------------------------------------------------------------- export TARGET := $(shell basename $(CURDIR)) BUILD := build -SOURCES := source source/fatfs +SOURCES := source source/fatfs source/gamecart DATA := data INCLUDES := source @@ -43,21 +43,21 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions ASFLAGS := -g $(ARCH) LDFLAGS = -nostartfiles -g --specs=../stub.specs $(ARCH) -Wl,-Map,$(TARGET).map -LIBS := +LIBS := #--------------------------------------------------------------------------------- # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- LIBDIRS := - + #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional # rules for different file extensions #--------------------------------------------------------------------------------- ifneq ($(BUILD),$(notdir $(CURDIR))) #--------------------------------------------------------------------------------- - + export OUTPUT := $(CURDIR)/$(TARGET) export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ @@ -94,7 +94,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) .PHONY: $(BUILD) clean all - + #--------------------------------------------------------------------------------- all: $(BUILD) @@ -102,18 +102,18 @@ $(BUILD): @[ -d $@ ] || mkdir -p $@ @make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile cp $(OUTPUT).bin arm9payload.bin - + #--------------------------------------------------------------------------------- clean: @echo clean ... @rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).bin arm9payload.bin - - + + #--------------------------------------------------------------------------------- else - + DEPENDS := $(OFILES:.o=.d) - + #--------------------------------------------------------------------------------- # main targets #--------------------------------------------------------------------------------- @@ -125,11 +125,11 @@ $(OUTPUT).elf : $(OFILES) %.bin: %.elf @$(OBJCOPY) -O binary $< $@ @echo built ... $(notdir $@) - + -include $(DEPENDS) - + #--------------------------------------------------------------------------------------- endif #--------------------------------------------------------------------------------------- diff --git a/source/gamecart.c b/source/gamecart/gamecart.c similarity index 100% rename from source/gamecart.c rename to source/gamecart/gamecart.c diff --git a/source/gamecart.h b/source/gamecart/gamecart.h similarity index 100% rename from source/gamecart.h rename to source/gamecart/gamecart.h diff --git a/source/main.c b/source/main.c index f700da3..a51e0ea 100644 --- a/source/main.c +++ b/source/main.c @@ -6,7 +6,7 @@ #include "framebuffer.h" #include "hid.h" #include "fatfs/ff.h" -#include "gamecart.h" +#include "gamecart/gamecart.h" extern s32 CartID; extern s32 CartID2; diff --git a/source/misc.h b/source/misc.h index 3b2f8bd..419298f 100644 --- a/source/misc.h +++ b/source/misc.h @@ -80,15 +80,15 @@ #define AES_MODE_UNK6 (6) #define AES_MODE_UNK7 (7) -#define REG_NTRCARDMCNT (*(vu16*)0x10164000) -#define REG_NTRCARDMDATA (*(vu16*)0x10164002) -#define REG_NTRCARDROMCNT (*(vu32*)0x10164004) -#define REG_NTRCARDCMD ((vu8*)0x10164008) +#define REG_NTRCARDMCNT (*(vu16*)0x10164000) +#define REG_NTRCARDMDATA (*(vu16*)0x10164002) +#define REG_NTRCARDROMCNT (*(vu32*)0x10164004) +#define REG_NTRCARDCMD ((vu8*)0x10164008) #define REG_NTRCARDSEEDX_L (*(vu32*)0x10164010) #define REG_NTRCARDSEEDY_L (*(vu32*)0x10164014) #define REG_NTRCARDSEEDX_H (*(vu16*)0x10164018) #define REG_NTRCARDSEEDY_H (*(vu16*)0x1016401A) -#define REG_NTRCARDFIFO (*(vu32*)0x1016401C) +#define REG_NTRCARDFIFO (*(vu32*)0x1016401C) #define NTRCARD_PAGESIZE_0 (0<<24) #define NTRCARD_PAGESIZE_4 (7<<24)