Skip to content

Commit

Permalink
A real support of last NFIRM thanks to @aurora Wright
Browse files Browse the repository at this point in the history
  • Loading branch information
Nanquitas committed Oct 25, 2016
1 parent b3fe3c5 commit 8c51658
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ROMFS := $(TOPDIR)/romfs/romfsBuilt
ROMFS3DSX := $(TOPDIR)/romfs
INCLUDES := $(SOURCES) include
ICON := resources/icon.png
BANNER := $(TOPDIR)/resources/FONZD_banner.bnr
#BANNER := $(TOPDIR)/resources/PabloMK7_banner.bnr
#BANNER := $(TOPDIR)/resources/FONZD_banner.bnr
BANNER := $(TOPDIR)/resources/PabloMK7_banner.bnr
CITRA_D := "C:/Users/Nath/Desktop/citra"

#---------------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions source/firmware.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "main.h"
#include "config.h"

extern ntrConfig_t *ntrConfig;
extern bootNtrConfig_t *bnConfig;
extern u8 *tmpBuffer;
extern char *g_error;
extern ntrConfig_t *ntrConfig;
extern bootNtrConfig_t *bnConfig;
extern u8 *tmpBuffer;
extern char *g_error;

Result bnInitParamsByFirmware(void)
{
Expand Down
34 changes: 28 additions & 6 deletions source/kernel.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "main.h"
#include "config.h"

extern ntrConfig_t *ntrConfig;
extern bootNtrConfig_t *bnConfig;
extern u8 *tmpBuffer;
extern char *g_error;
extern ntrConfig_t *ntrConfig;
extern bootNtrConfig_t *bnConfig;
extern u8 *tmpBuffer;
extern char *g_error;

typedef struct
{
Expand Down Expand Up @@ -77,6 +77,15 @@ dbgKernelCacheInterface cacheInterface_NEW111 =
(void*)0xFFF202A8
};

dbgKernelCacheInterface cacheInterface_NEW112 =
{
//for new 3ds 11.2
(void*)0xFFF26210,
(void*)0xFFF1DF8C,
(void*)0xFFF1DC34,
(void*)0xFFF202C8
};

dbgKernelCacheInterface cacheInterface_Old90 =
{
//for old 3ds 9.0
Expand Down Expand Up @@ -113,6 +122,15 @@ dbgKernelCacheInterface cacheInterface_Old111 =
(void*)0xFFF1FCCC
};

dbgKernelCacheInterface cacheInterface_Old112 =
{
//for old 3ds 11.2
(void*)0xFFF255C8,
(void*)0xFFF1D7F4,
(void*)0xFFF1D58C,
(void*)0xFFF1FCEC
};

void kernelCallback(void)
{
u32 svc_patch_addr = bnConfig->SvcPatchAddr;
Expand All @@ -134,8 +152,10 @@ void kernelCallback(void)
cache = &cacheInterface_NEW102;
else if (firmVersion == SYSTEM_VERSION(11, 0, 0))
cache = &cacheInterface_NEW110;
else if (firmVersion == SYSTEM_VERSION(11, 1, 0) || firmVersion == SYSTEM_VERSION(11, 2, 0))
else if (firmVersion == SYSTEM_VERSION(11, 1, 0))
cache = &cacheInterface_NEW111;
else if (firmVersion == SYSTEM_VERSION(11, 2, 0))
cache = &cacheInterface_NEW112;
}
else
{
Expand All @@ -145,8 +165,10 @@ void kernelCallback(void)
cache = &cacheInterface_Old96;
else if (firmVersion == SYSTEM_VERSION(11, 0, 0))
cache = &cacheInterface_Old110;
else if (firmVersion == SYSTEM_VERSION(11, 1, 0) || firmVersion == SYSTEM_VERSION(11, 2, 0))
else if (firmVersion == SYSTEM_VERSION(11, 1, 0))
cache = &cacheInterface_Old111;
else if (firmVersion == SYSTEM_VERSION(11, 2, 0))
cache = &cacheInterface_Old112;
}
*(int *)(svc_patch_addr + 8) = 0xE1A00000; //NOP
*(int *)(svc_patch_addr) = 0xE1A00000; //NOP
Expand Down
6 changes: 3 additions & 3 deletions source/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#include "mysvcs.h"

#define APP_VERSION_MAJOR 2
#define APP_VERSION_MINOR 2
#define APP_VERSION_MINOR 3
#define TIMER 2
#define CIA_VERSION "BootNTRSelector-FONZD-Banner.cia"
//#define CIA_VERSION "BootNTRSelector-PabloMK7-Banner.cia"
//#define CIA_VERSION "BootNTRSelector-FONZD-Banner.cia"
#define CIA_VERSION "BootNTRSelector-PabloMK7-Banner.cia"

#define check_prim(result, err) if ((result) != 0) {g_primary_error = err; \
goto error; }
Expand Down

0 comments on commit 8c51658

Please sign in to comment.