Skip to content

Commit

Permalink
Update for 3.4 Preview 5 / Extended Memory mode on Old3DS
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanquitas committed Feb 10, 2017
1 parent a42a8dc commit 11c5986
Show file tree
Hide file tree
Showing 15 changed files with 765 additions and 433 deletions.
69 changes: 47 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,24 @@ endif

FONZD = 0
PABLOMK7 = 0
EXTENDEDMODE = 0

ifeq ($(FONZD), 1)
NAME := BootNTRSelector-FONZD-Banner
endif
ifeq ($(EXTENDEDMODE), 1)
ifeq ($(FONZD), 1)
NAME := BootNTRSelectorMode-3-FONZD-Banner
endif

ifeq ($(PABLOMK7), 1)
NAME := BootNTRSelector-Mode3-PabloMK7-Banner
endif
else
ifeq ($(FONZD), 1)
NAME := BootNTRSelector-FONZD-Banner
endif

ifeq ($(PABLOMK7), 1)
NAME := BootNTRSelector-PabloMK7-Banner
ifeq ($(PABLOMK7), 1)
NAME := BootNTRSelector-PabloMK7-Banner
endif
endif


Expand All @@ -34,7 +45,7 @@ LIBRARY_DIRS := $(PORTLIBS) $(CTRULIB)
LIBRARIES := citro3d ctru png z m

VERSION_MAJOR := 2
VERSION_MINOR := 5
VERSION_MINOR := 6
VERSION_MICRO := 0


Expand All @@ -45,7 +56,8 @@ BUILD_FLAGS_CC := -g -Wall -Wno-strict-aliasing -O3 -mword-relocations \
-DFONZD_BANNER=${FONZD} -DPABLOMK7_BANNER=${PABLOMK7} \
-DAPP_VERSION_MAJOR=${VERSION_MAJOR} \
-DAPP_VERSION_MINOR=${VERSION_MINOR} \
-DAPP_VERSION_REVISION=${VERSION_MICRO}
-DAPP_VERSION_REVISION=${VERSION_MICRO} \
-DEXTENDEDMODE=${EXTENDEDMODE}
BUILD_FLAGS_CXX := $(COMMON_FLAGS) -std=gnu++11
RUN_FLAGS :=

Expand All @@ -56,7 +68,11 @@ RUN_FLAGS :=
# 3DS/Wii U CONFIGURATION #

ifeq ($(TARGET),$(filter $(TARGET),3DS WIIU))
TITLE := Boot NTR Selector
ifeq ($(EXTENDEDMODE), 1)
TITLE := Boot NTR Selector Mode 3
else
TITLE := Boot NTR Selector
endif
DESCRIPTION := Enhanced NTR CFW Loader
AUTHOR := Nanquitas
endif
Expand All @@ -68,13 +84,21 @@ ifeq ($(TARGET),3DS)
LIBRARIES += citro3d ctru png z m

PRODUCT_CODE := CTR-P-BNTR
UNIQUE_ID := 0xEB000
ifeq ($(EXTENDEDMODE), 1)
UNIQUE_ID := 0xEB300
else
UNIQUE_ID := 0xEB000
endif

CATEGORY := Application
USE_ON_SD := true

MEMORY_TYPE := Application
SYSTEM_MODE := 64MB
ifeq ($(EXTENDEDMODE), 1)
SYSTEM_MODE := 80MB
else
SYSTEM_MODE := 64MB
endif
SYSTEM_MODE_EXT := Legacy
CPU_SPEED := 268MHz
ENABLE_L2_CACHE := true
Expand All @@ -89,20 +113,15 @@ ifeq ($(TARGET),3DS)
ifeq ($(PABLOMK7), 1)
BANNER_IMAGE := resources/PabloMK7_banner.cgfx
endif
ICON := resources/icon.png
ifeq ($(EXTENDEDMODE), 1)
ICON := resources/iconM3.png
else
ICON := resources/icon.png
endif

LOGO :=
endif

# Wii U CONFIGURATION #

ifeq ($(TARGET),WIIU)
LIBRARY_DIRS +=
LIBRARIES +=

LONG_DESCRIPTION := Enhanced NTR CFW Loader
ICON :=
endif

# INTERNAL #

include buildtools/make_base
Expand All @@ -111,4 +130,10 @@ FONZD: clean
make FONZD=1

PABLOMK7: clean
make PABLOMK7=1
make PABLOMK7=1

FONZDM3: clean
make FONZD=1 EXTENDEDMODE=1

PABLOMK7M3: clean
make PABLOMK7=1 EXTENDEDMODE=1
Binary file added resources/iconM3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed romfs/ntr_3_4.bin → romfs/ntr.n3ds.bin
Binary file not shown.
Binary file added romfs/ntr.o3ds.bin
Binary file not shown.
8 changes: 5 additions & 3 deletions source/appInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

#include "draw.h"

#define MAX_ENTRIES 10
#define BUFFER_SIZE 100
#define DEFAULT_COLOR 0xFFF8AE2D
#define MAX_ENTRIES 10
#define BUFFER_SIZE 100
#define DEFAULT_COLOR 0xFFF8AE2D
#define RED 0xFFFF0000
#define GREEN 0xFF00FF00


typedef enum
Expand Down
14 changes: 12 additions & 2 deletions source/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,31 @@ void configInit(void)
firstLaunch();
if (!saveConfig())
newAppTop(DEFAULT_COLOR, 0, "A problem occured while saving the settings.");
#if EXTENDEDMODE
bnConfig->versionToLaunch = V34;
#endif
}
else
{

time_t current = time(NULL);

if (current - config->lastUpdateTime >= SECONDS_IN_WEEK)
#if EXTENDEDMODE
if (current - config->lastUpdateTime3 >= SECONDS_IN_WEEK)
#else
if (current - config->lastUpdateTime >= SECONDS_IN_WEEK)
#endif
bnConfig->checkForUpdate = true;
else
bnConfig->checkForUpdate = false;
}
// svcCloseHandle(fsuHandle);
#if EXTENDEDMODE
bnConfig->versionToLaunch = V34;
#else
if (config->flags & LV32) bnConfig->versionToLaunch = V32;
else if (config->flags & LV33) bnConfig->versionToLaunch = V33;
else if (config->flags & LV34) bnConfig->versionToLaunch = V34;
#endif
error:
return;
}
Expand Down
5 changes: 4 additions & 1 deletion source/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(((major)<<24)|((minor)<<16)|((revision)<<8))
#endif

#define CURRENT_CONFIG_VERSION SYSTEM_VERSION(1, 0, 2)
#define CURRENT_CONFIG_VERSION SYSTEM_VERSION(1, 0, 3)

#define SECONDS_IN_WEEK 604800
#define SECONDS_IN_DAY 86400
Expand All @@ -31,6 +31,7 @@ typedef struct config_s
char binariesPath[0x100];
char pluginPath[0x100];
time_t lastUpdateTime;
time_t lastUpdateTime3;

} config_t;

Expand Down Expand Up @@ -67,6 +68,8 @@ typedef struct ntrConfig_s
u32 arm11BinStart;
u32 arm11BinSize;
u32 ShowDbgFunc;
u32 memorymode;
char path[0x100];
} ntrConfig_t;

typedef struct bootNtrConfig_s
Expand Down
Loading

0 comments on commit 11c5986

Please sign in to comment.