Skip to content

Commit

Permalink
2.8: Update to NTR 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanquitas committed May 11, 2017
1 parent f4e10fb commit e742fc4
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 41 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ LIBRARY_DIRS := $(PORTLIBS) $(CTRULIB)
LIBRARIES := citro3d ctru png z m

VERSION_MAJOR := 2
VERSION_MINOR := 7
VERSION_MICRO := 3
VERSION_MINOR := 8
VERSION_MICRO := 0



Expand Down
Binary file added resources/Nasalization.ttf
Binary file not shown.
Binary file modified romfs/ntr.n3ds.bin
Binary file not shown.
Binary file modified romfs/ntr.o3ds.bin
Binary file not shown.
Binary file removed romfs/sprites/Thumbs.db
Binary file not shown.
Binary file added romfs/sprites/textSprites/35Version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions source/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void resetConfig(void)
strJoin(path, config->binariesPath + 5, "ntr_3_3.bin");
remove(path);
memset(path, 0, 0x100);
strJoin(path, config->binariesPath + 5, "ntr_3_4.bin");
strJoin(path, config->binariesPath + 5, "ntr_3_5.bin");
remove(path);

exit:
Expand Down Expand Up @@ -146,7 +146,7 @@ void configInit(void)
if (!saveConfig())
newAppTop(DEFAULT_COLOR, 0, "A problem occured while saving the settings.");
if (g_bnConfig.isMode3)
g_bnConfig.versionToLaunch = V34;
g_bnConfig.versionToLaunch = V35;
}
else
{
Expand All @@ -162,14 +162,13 @@ void configInit(void)

if (g_bnConfig.isMode3)
{
bnConfig->versionToLaunch = V34;
config->flags = LV34;
bnConfig->versionToLaunch = V35;
}
else
{
if (config->flags & LV32) bnConfig->versionToLaunch = V32;
else if (config->flags & LV33) bnConfig->versionToLaunch = V33;
else if (config->flags & LV34) bnConfig->versionToLaunch = V34;
else if (config->flags & LV35) bnConfig->versionToLaunch = V35;
}
error:
return;
Expand All @@ -187,7 +186,7 @@ void configExit(void)
{
if (version == V32) flags = LV32;
else if (version == V33) flags = LV33;
else if (version == V34) flags = LV34;
else if (version == V35) flags = LV35;
else flags = 0;
config->flags = flags;
}
Expand Down
4 changes: 2 additions & 2 deletions 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, 6)
#define CURRENT_CONFIG_VERSION SYSTEM_VERSION(1, 0, 7)

#define SECONDS_IN_WEEK 604800
#define SECONDS_IN_DAY 86400
Expand All @@ -20,7 +20,7 @@ enum
{
LV32 = BIT(0),
LV33 = BIT(1),
LV34 = BIT(2),
LV35 = BIT(2),
CUSTOM_PLUGIN_PATH = BIT(3)
}configFlags;

Expand Down
16 changes: 8 additions & 8 deletions source/firstLaunchMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,28 +369,28 @@ static void setFiles(void)
newAppTop(COLOR_LIMEGREEN, SKINNY, "Setting up 3.3... Done.");
updateUI();

newAppTop(COLOR_BLANK, SKINNY, "Setting up 3.4...");
newAppTop(COLOR_BLANK, SKINNY, "Setting up 3.5...");
updateUI();
ret = loadAndPatch(V34);
ret = loadAndPatch(V35);
if (!bnConfig->isDebug)
removeAppTop();
if (ret)
newAppTop(COLOR_SALMON, SKINNY, "Setting up 3.4... Error.");
newAppTop(COLOR_SALMON, SKINNY, "Setting up 3.5... Error.");
else
newAppTop(COLOR_LIMEGREEN, SKINNY, "Setting up 3.4... Done.");
newAppTop(COLOR_LIMEGREEN, SKINNY, "Setting up 3.5... Done.");
updateUI();

if (!bnConfig->isNew3DS)
{
newAppTop(COLOR_BLANK, SKINNY, "Setting up 3.4 unpatched...");
newAppTop(COLOR_BLANK, SKINNY, "Setting up 3.5 unpatched...");
updateUI();
ret = loadAndPatch(V34);
ret = loadAndPatch(V35);
if (!bnConfig->isDebug)
removeAppTop();
if (ret)
newAppTop(COLOR_SALMON, SKINNY, "Setting up 3.4 unpatched... Error.");
newAppTop(COLOR_SALMON, SKINNY, "Setting up 3.5 unpatched... Error.");
else
newAppTop(COLOR_LIMEGREEN, SKINNY, "Setting up 3.4... Done.");
newAppTop(COLOR_LIMEGREEN, SKINNY, "Setting up 3.5... Done.");
updateUI();
}

Expand Down
8 changes: 4 additions & 4 deletions source/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ dbgKernelCacheInterface cacheInterface_NEW112 =
dbgKernelCacheInterface cacheInterface_NEW113 =
{
//for new 3ds 11.3
(void*)0XFFF27400,
(void*)0XFFF1E15C,
(void*)0XFFF1DE04,
(void*)0XFFF20498
(void*)0xFFF27400,
(void*)0xFFF1E15C,
(void*)0xFFF1DE04,
(void*)0xFFF20498
};

dbgKernelCacheInterface cacheInterface_NEW114 =
Expand Down
2 changes: 1 addition & 1 deletion source/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ typedef enum version_e
{
V32 = 0,
V33 = 1,
V34 = 2,
V35 = 2,
} version_t;

/*
Expand Down
18 changes: 9 additions & 9 deletions source/mainMenu.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern bootNtrConfig_t *bnConfig;

static button_t *V32Button;
static button_t *V33Button;
static button_t *V34Button;
static button_t *V35Button;
static sprite_t *desiredVersionSprite;
static sprite_t *tinyButtonBGSprite;
static sprite_t *pressExitSprite;
Expand All @@ -18,7 +18,7 @@ void selectVersion(u32 mode)
{
V32Button->disable(V32Button);
V33Button->disable(V33Button);
V34Button->disable(V34Button);
V35Button->disable(V35Button);
userTouch = true;
switch(mode)
{
Expand All @@ -29,7 +29,7 @@ void selectVersion(u32 mode)
bnConfig->versionToLaunch = V33;
break;
case 3:
bnConfig->versionToLaunch = V34;
bnConfig->versionToLaunch = V35;
break;
default:
break;
Expand All @@ -53,15 +53,15 @@ void initMainMenu(void)
V32Button = newButton(11.0f, 35.0f, selectVersion, 1, tinyButtonBGSprite, sprite);
newSpriteFromPNG(&sprite, "romfs:/sprites/textSprites/33Version.png");
V33Button = newButton(11.0f, 94.0f, selectVersion, 2, tinyButtonBGSprite, sprite);
newSpriteFromPNG(&sprite, "romfs:/sprites/textSprites/34Version.png");
V34Button = newButton(11.0f, 152.0f, selectVersion, 3, tinyButtonBGSprite, sprite);
newSpriteFromPNG(&sprite, "romfs:/sprites/textSprites/35Version.png");
V35Button = newButton(11.0f, 152.0f, selectVersion, 3, tinyButtonBGSprite, sprite);

V32Button->show(V32Button);
V33Button->show(V33Button);
V34Button->show(V34Button);
V35Button->show(V35Button);
addBottomObject(V32Button);
addBottomObject(V33Button);
addBottomObject(V34Button);
addBottomObject(V35Button);
}

newSpriteFromPNG(&pressExitSprite, "romfs:/sprites/textSprites/pressBExit.png");
Expand All @@ -78,7 +78,7 @@ void exitMainMenu(void)
{
destroyButton(V32Button);
destroyButton(V33Button);
destroyButton(V34Button);
destroyButton(V35Button);
deleteSprite(tinyButtonBGSprite);
deleteSprite(desiredVersionSprite);
}
Expand All @@ -91,7 +91,7 @@ static const char * versionString[] =
{
"3.2",
"3.3",
"3.4"
"3.5"
};

int mainMenu(void)
Expand Down
6 changes: 3 additions & 3 deletions source/ntr_launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ u32 loadNTRBin(void)
{
"ntr_3_2.bin",
"ntr_3_3.bin",
"ntr_3_4.bin",
"ntr_3_4u.bin"
"ntr_3_5.bin",
"ntr_3_5u.bin"
};

if (bnConfig->versionToLaunch == V32)
Expand All @@ -71,7 +71,7 @@ u32 loadNTRBin(void)
else
strJoin(path, bnConfig->config->binariesPath + 5, ntrVersionStrings[bnConfig->versionToLaunch]);

if (bnConfig->versionToLaunch == V34)
if (bnConfig->versionToLaunch == V35)
{
strJoin(ntrConfig->path, bnConfig->config->binariesPath + 5, ntrVersionStrings[bnConfig->versionToLaunch]);
#if EXTENDEDMODE
Expand Down
12 changes: 6 additions & 6 deletions source/pathPatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ static const char *outNtrVersionStrings[4] =
{
"ntr_3_2.bin",
"ntr_3_3.bin",
"ntr_3_4.bin",
"ntr_3_4u.bin"
"ntr_3_5.bin",
"ntr_3_5u.bin"
};

static void patchBinary(u8 *mem, int size)
Expand Down Expand Up @@ -136,7 +136,7 @@ Result loadAndPatch(version_t version)
binPath = bnConfig->config->binariesPath;
plgPath = bnConfig->config->pluginPath;

if (version == V34 && isNew3DS)
if (version == V35 && isNew3DS)
strJoin(inPath, "romfs:/", ntrVersionStrings[version + 1]);
else
strJoin(inPath, "romfs:/", ntrVersionStrings[version]);
Expand All @@ -149,13 +149,13 @@ Result loadAndPatch(version_t version)
{
strJoin(fixedPath[PLUGIN], plgPath, fixedName[PLUGIN]);

if (version != V34 || !unpatched)
if (version != V35 || !unpatched)
{
strJoin(outPath, binPath, outNtrVersionStrings[version]);
strJoin(fixedPath[BINARY], binPath, outNtrVersionStrings[version]);
strJoin(fixedPath[DEBUG], binPath, outNtrVersionStrings[version]);
}
else if (version == V34 && unpatched)
else if (version == V35 && unpatched)
{
strJoin(outPath, binPath, outNtrVersionStrings[3]);
strJoin(fixedPath[BINARY], binPath, outNtrVersionStrings[3]);
Expand Down Expand Up @@ -194,7 +194,7 @@ Result loadAndPatch(version_t version)
fclose(ntr);
free(mem);

if (version == V34)
if (version == V35)
unpatched++;

return(0);
Expand Down

0 comments on commit e742fc4

Please sign in to comment.