Hacking Official [Source Release] ReiNand CFW

  • Thread starter Thread starter Reisyukaku
  • Start date Start date
  • Views Views 987,756
  • Replies Replies 6,480
  • Likes Likes 115
You will hate yourself later. Because of newer game compatibility, you'll find yourself on emunand much more than sysnand. You really want all of your previous progress on emunand. When rxTools catches up, it'll be easy to swap them though. You just have to carefully swap movable.sed between the nands.

Ok, right, think i'll redo it just like @mashers posted a few posts down :), this way i'll keep everything.
It's not that it's my main n3ds console to play, that's still on 10.3 on i won't downgrade that, also have another o3ds with everything on.
This N3DS will mainly be used for emulator installed as cia stuff and ports (yes also for the few n3ds exlusive titles)
 
Vermont was so impressed with Rei's emunand, they named the state after him.

View attachment 35312
the way this works is a bit weird... someone pointed out to me that Nintendo Badge Arcade showed the version as "RX-E 1.3.0".

also.......
42lEx6Gm.jpg
 
  • Like
Reactions: klear and zoogie
Thanks... i am very interested to here the outcome

EDIT: are your nands unlinked ??

Patched agb_firm is NOT needed, for sysnand OR emunand. Holy shit.

Just install your DSiWare and GBA VC games to both sysnand and emunand (or keep your nands linked if you swing that way).
 
  • Like
Reactions: peteruk
Patched agb_firm is NOT needed, for sysnand OR emunand. Holy shit.

Just install your DSiWare and GBA VC games to both sysnand and emunand (or keep your nands linked if you swing that way).

WOW, that is awesome mate, what great news :D
 
I found out why this happens.

Code:
int strcomp(char* s1, char* s2, unsigned int size)
{
  for(int i = 0; i < size; i++)
  {
    if(s1 != s2) return 0;
  }
  return 1;
}

Code:
void patches(void)
{
  //Change version string
  for(int i = 0; i < 0x600000; i+=4)
  {
    if(strcomp((void*)0x27B00000 - i, (void*)L"Ver.", 4)) strcopy((void*)0x27B00000 - i, (void*)L"\uE024Rei", 4);
  }
}

Anyone see the problem? It's passing "Ver." to the strcomp function and telling it to check 4 bytes.
But "Ver." is an unicode string. The characters are actually two bytes in width! It should be checking 8 bytes of data. So in reality, it's only checking for "Ve".
The fix is simple. Modify the strcomp() function so that it behaves the same way as strcopy()
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size*2; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}

@Reisyukaku There you go :)
 
Last edited by The Real Jdbye,
I found out why this happens.





Anyone see the problem? It's passing "Ver." to the strcomp function and telling it to check 4 bytes.
But "Ver." is an unicode string. The characters are actually two bytes in width! It should be checking 8 bytes of data. So in reality, it's only checking for "Ve".
The fix is simple. Change the 4 to an 8.

@Reisyukaku There you go :)
Fuck it im brave, where is this at in the code and I'll test it myself
 
It's in thread.c

thanks, I assume both instances of the value 4 need to be updated?

specifically, it should read like so?

Code:
void patches(void){
    //Change version string
    for(int i = 0; i < 0x600000; i+=8){
        if(strcomp((void*)0x27B00000  - i, (void*)L"Ver.", 8)) strcopy((void*)0x27B00000 - i, (void*)L"\uE024Rei", 8);
    }
}
 
Fuck it im brave, where is this at in the code and I'll test it myself
https://github.com/Reisyukaku/ReiNand/blob/master/thread/source/thread.c#L71
You should only need to compile/replace arm9.bin

thanks, I assume both instances of the value 4 need to be updated?

specifically, it should read like so?

Code:
void patches(void){
    //Change version string
    for(int i = 0; i < 0x600000; i+=8){
        if(strcomp((void*)0x27B00000  - i, (void*)L"Ver.", 8)) strcopy((void*)0x27B00000 - i, (void*)L"\uE024Rei", 8);
    }
}
strcopy() is already correct so you don't need to change that.
The best fix would be to modify strcomp() so that it behaves the same as strcopy().
Change (in lib.c):
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}
To:
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size*2; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}
 
Last edited by The Real Jdbye,
thanks, I assume both instances of the value 4 need to be updated?

specifically, it should read like so?

Code:
void patches(void){
    //Change version string
    for(int i = 0; i < 0x600000; i+=8){
        if(strcomp((void*)0x27B00000  - i, (void*)L"Ver.", 8)) strcopy((void*)0x27B00000 - i, (void*)L"\uE024Rei", 8);
    }
}
Nah only the first "4", if you change the second 4 also you ONLY see .::Rei and no version number at all. haha (just tried both ways).
 
  • Like
Reactions: klear
https://github.com/Reisyukaku/ReiNand/blob/master/thread/source/thread.c#L71
You should only need to compile/replace arm9.bin


strcopy() is already correct so you don't need to change that.
The best fix would be to modify strcomp() so that it behaves the same as strcopy().
Change (in lib.c):
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}
To:
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size*2; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}


Ok, so just the first instance then? i+=4 to i+=8? Leave strcomp() and strcopy() alone?

--------------------- MERGED ---------------------------

https://github.com/Reisyukaku/ReiNand/blob/master/thread/source/thread.c#L71
You should only need to compile/replace arm9.bin


strcopy() is already correct so you don't need to change that.
The best fix would be to modify strcomp() so that it behaves the same as strcopy().
Change (in lib.c):
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}
To:
Code:
int strcomp(char* s1, char* s2, unsigned int size){
  for(int i = 0; i < size*2; i++){
    if(s1[i] != s2[i]) return 0;
  }
  return 1;
}
Yeah I see that now, wonder if there is a reason why strcomp doesn't double the size like strcopy does.
 

Site & Scene News

Popular threads in this forum