Permalink
Browse files

Merge pull request #9 from Reisyukaku/master

update
  • Loading branch information...
tiliarou committed Sep 4, 2018
2 parents cb5802f + 7a0446a commit 470b05da615e1a88136dd1d8011f6b5d619f34ec
Showing with 14 additions and 11 deletions.
  1. +1 −1 NX_Sysmodules
  2. +4 −1 README.md
  3. +3 −3 src/hwinit/util.c
  4. +2 −2 src/hwinit/util.h
  5. +4 −4 src/package.h
View
@@ -15,14 +15,17 @@ To compile with Docker, `chmod +x docker-build.sh` and run the shell script `./d
**Features:**
* Modularity (doesn't rely on or require any SD files to run; customize SD files to your liking)
* Loads all KIPs from `/ReiNX/sysmodules/` directory
* Optional custom kernel/secmon/warmboot
* FS patches on the fly (NCA verify/cmac and optional nogc)
* Exclusive ReiNX sysmodules with built in ES patches
* Exclusive ReiNX sysmodules
* ES patch in RXP patch format (used with custom loader.kip)
**Official thread:**
View
@@ -56,9 +56,9 @@ void exec_cfg(u32 *base, const cfg_op_t *ops, u32 num_ops)
base[ops[i].off] = ops[i].val;
}
uPtr memsearch(const u8 *startPos, u32 searchSize, const void *pattern, u32 patternSize) {
uPtr memsearch(void *startPos, size_t searchSize, void *pattern, size_t patternSize) {
if(!searchSize) return 0;
for (u8 *pos = (u8 *)startPos; pos <= startPos + searchSize - patternSize; pos++) {
for (u8 *pos = (u8*)startPos; pos <= (u8*)startPos + searchSize - patternSize; pos++) {
if (memcmp(pos, pattern, patternSize) == 0) return (uPtr)pos;
}
return 0;
@@ -70,7 +70,7 @@ uPtr getFreeSpace(void *start, size_t space, size_t searchSize) {
if(*(u8*)(start+i) == 0) {
for(int j=0;j<space;j++) {
if(*(u8*)(start+i+j) != 0) break;
if(j==space-1) return (uintptr_t)(start+i);
if(j==space-1) return (uPtr)(start+i);
}
}
}
View
@@ -34,8 +34,8 @@ u32 get_tmr_us();
void musleep(u32 milliseconds);
void usleep(u32 microseconds);
void exec_cfg(u32 *base, const cfg_op_t *ops, u32 num_ops);
uPtr memsearch(const u8 *startPos, u32 searchSize, const void *pattern, u32 patternSize);
uPtr memsearch(void *startPos, size_t searchSize, void *pattern, size_t patternSize);
uPtr getFreeSpace(void *start, size_t space, size_t searchSize);
u32 crc32c(const void *buf, u32 len);
#endif
#endif
View
@@ -331,17 +331,17 @@ static kernel_patch_t kern5[] = {
};
static kernel_patch_t kern6[] = {
{ SVC_VERIFY_DS, 0x47E98, _NOP(), NULL }, // Disable SVC verifications
{ DEBUG_MODE_EN, 0x52D40, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
{ SVC_VERIFY_DS, 0x47EA0, _NOP(), NULL }, // Disable SVC verifications
{ DEBUG_MODE_EN, 0x57548, _MOVZX(8, 1, 0), NULL }, // Enable Debug Patch
// Atmosphère kernel patches.
{ ATM_GEN_PATCH, ID_SND_OFF_600, _B(ID_SND_OFF_600, FREE_CODE_OFF_1ST_600), NULL}, // Send process id branch.
/*{ ATM_GEN_PATCH, ID_SND_OFF_600, _B(ID_SND_OFF_600, FREE_CODE_OFF_1ST_600), NULL}, // Send process id branch.
{ ATM_ARR_PATCH, FREE_CODE_OFF_1ST_600, sizeof(PRC_ID_SND_600) >> 2, PRC_ID_SND_600}, // Send process id code.
{ ATM_GEN_PATCH, FREE_CODE_OFF_1ST_600 + sizeof(PRC_ID_SND_600), // Branch back and skip 2 instructions.
_B(FREE_CODE_OFF_1ST_600 + sizeof(PRC_ID_SND_600), ID_SND_OFF_600 + 8), NULL},
{ ATM_GEN_PATCH, ID_RCV_OFF_600, _B(ID_RCV_OFF_600, FREE_CODE_OFF_2ND_600), NULL}, // Receive process id branch.
{ ATM_ARR_PATCH, FREE_CODE_OFF_2ND_600, sizeof(PRC_ID_RCV_600) >> 2, PRC_ID_RCV_600}, // Receive process id code.
{ ATM_GEN_PATCH, FREE_CODE_OFF_2ND_600 + sizeof(PRC_ID_RCV_600), // Branch back and skip 2 instructions.
_B(FREE_CODE_OFF_2ND_600 + sizeof(PRC_ID_RCV_600), ID_RCV_OFF_600 + 8), NULL},
_B(FREE_CODE_OFF_2ND_600 + sizeof(PRC_ID_RCV_600), ID_RCV_OFF_600 + 8), NULL},*/
{0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, (u32*)0xFFFFFFFF}
};

0 comments on commit 470b05d

Please sign in to comment.