Hacking [Realease] ReiNand Cfw

  • Thread starter Thread starter NaviLoz101
  • Start date Start date
  • Views Views 299,379
  • Replies Replies 1,259
  • Likes Likes 22
Status
Not open for further replies.
Guess I'll post cheat sheets here too for those interested. http://pastebin.com/7P5SYsjQ
Thanks for your hard work. Are you still working on finding a way to N3DS emunand? Have that stuck or something else?
You know there are too many people hoping for a emunand for N3DS.. (Ha What i have is an O3DS JPN, now running rx with mset. so I don't really care about it too much.)

BTW Sorry for unable to access pastebin now. All pages from pastebin shows "stolen content" (GAE) so I think I'm blocked (so do most of others in China - even connection reset).
 
Thanks for your hard work. Are you still working on finding a way to N3DS emunand? Have that stuck or something else?
You know there are too many people hoping for a emunand for N3DS.. (Ha What i have is an O3DS JPN, now running rx with mset. so I don't really care about it too much.)

BTW Sorry for unable to access pastebin now. All pages from pastebin shows "stolen content" (GAE) so I think I'm blocked (so do most of others in China - even connection reset).
Here you go
  1. #include "lib.h"
  2. #include "FS.h"
  3. #include <wchar.h>
  4. #include <stdio.h>

  5. #define VRAM (unsigned char*)0x18000000
  6. #define FCRAM (unsigned char*)0x20000000
  7. #define ARM9_RAM (unsigned char*)0x8000000
  8. #define TOP_FRAME 0
  9. #define BOT_FRAME 1

  10. unsigned char handle[32];
  11. unsigned char bmpHead[] = {
  12. 0x42, 0x4D, 0x36, 0x65, 0x04, 0x00, 0x00, 0x00,
  13. 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00,
  14. 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xF0, 0x00,
  15. 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00,
  16. 0x00, 0x00, 0x00, 0x65, 0x04, 0x00, 0x00, 0x00,
  17. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  18. 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
  19. };

  20. void memdump(wchar_t* filename, unsigned char* buf, unsigned int size){
  21. unsigned int br = 0;
  22. memset(&handle, 0, 32);
  23. fopen9(&handle, filename, 6);
  24. fwrite9(&handle, &br, buf, size);
  25. fclose9(&handle);
  26. for(int i = 0; i < 0x46500; i++) *(VRAM+0x1E6000 + i) = 0xFF;
  27. }

  28. void transpose (void * dst, const void * src, unsigned dim1, unsigned dim2, unsigned item_length) {
  29. char * ptr_write;
  30. const char * ptr_read;
  31. unsigned x, y, z;
  32. for (x = 0; x < dim1; x ++) for (y = 0; y < dim2; y ++) {
  33. ptr_write = ((char *) dst) + item_length * (y * dim1 + x);
  34. ptr_read = ((const char *) src) + item_length * (x * dim2 + y);
  35. for (z = 0; z < item_length; z ++) *(ptr_write ++) = *(ptr_read ++);
  36. }
  37. }

  38. void screenShot(int frame){
  39. unsigned int br;
  40. short width = frame == 0 ? 400 : 320;
  41. short height = 240;
  42. int frameOff = frame == 0 ? 0x300000 : 0; //0x1E6000 : 0x48F000; //<- Defaults
  43. int length = frame == 0 ? 0x46500 : 0x38400;
  44. memset(&handle, 0, 32);
  45. fopen9(&handle, frame == 0 ? L"sdmc:/screen_top.bmp" : L"sdmc:/screen_bot.bmp", 6);
  46. transpose(FCRAM+0xF80000, VRAM+frameOff, width, height, 3);
  47. bmpHead[18] = frame == 0 ? 0x90 : 0x40;
  48. fwrite9(&handle, &br, bmpHead, 0x36);
  49. fwrite9(&handle, &br, FCRAM+0xF80000, length);
  50. fclose9(&handle);
  51. for(int i = 0; i < length; i++) *(VRAM+frameOff + i) = 0xFF;
  52. }

  53. void myThread(){
  54. while(1){
  55. if(getHID() & BUTTON_SELECT){
  56. screenShot(TOP_FRAME);
  57. screenShot(BOT_FRAME);
  58. }
  59. if(getHID() & BUTTON_START) memdump(L"sdmc:/VRAM.bin", VRAM, 0x00600000);
  60. }
  61. __asm("SVC 0x09");
  62. }

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

Thanks for your hard work. Are you still working on finding a way to N3DS emunand? Have that stuck or something else?
You know there are too many people hoping for a emunand for N3DS.. (Ha What i have is an O3DS JPN, now running rx with mset. so I don't really care about it too much.)

BTW Sorry for unable to access pastebin now. All pages from pastebin shows "stolen content" (GAE) so I think I'm blocked (so do most of others in China - even connection reset).
@Syphurith you might want to look into using
https://www.torproject.org/ for stuff that is blocked by your ISP or country (its hella slow though)
 
  • Like
Reactions: Syphurith
Here you go. -- Snip --
Thanks for your help. Looks quite similar as RxTools (the familar MyThread, lol).
Seems to be doing BMP buffer writing in "transpose". Wait i remember that BMP is row by row (bottom to top) and column by column (left to right).
The code itself could be optimized sometime later. Still happy to see those stuff.

Thank you Xenon. Still, TOR is also polluted here, ORZ. So I think i would wait for its being open-sourced oneday with patience.
 
Thanks for your help. Looks quite similar as RxTools (the familar MyThread, lol).
Seems to be doing BMP buffer writing in "transpose". Wait i remember that BMP is row by row (bottom to top) and column by column (left to right).
The code itself could be optimized sometime later. Still happy to see those stuff.

Thank you Xenon. Still, TOR is also polluted here, ORZ. So I think i would wait for its being open-sourced oneday with patience.
Orz I tried :/
 
  • Like
Reactions: Syphurith
Don't tell me that is really upside-down. I mean the BMP file generated from screen shots.
Eh.. Also the screen buffer should be B,G,R that not the same as BMP's R,G,B.
>>Trying to take a closer look at the code. yup
Do you think this would ever result in screen recording?
Or at the very least tiny GIF's?
 
Have you gotten past the v9.2 SysNAND barrier? Has anyone? I assume the answer is no because of the ninjhax requirement. Will it be possible with the limited form of ninjhax for past v9.2 being work on?
 
Do you think this would ever result in screen recording?
Or at the very least tiny GIF's?
To avoid R,G,B order you can modify the BMP header (see those BMP565 format images) with a little research.
Just for the code you showed to me. I think the result BMP might be upside-down, unless the header is crafted carefully.
I used to copy those data in such a way (not C!):
A = dst + (WIDTH)*(LINE-1)*(PIXELSIZE);
for (HEIGHT: max to min) {
for (WIDTH) A<=B; A++,B++.
if (A == LINEEND){A -= 2*LINESIZE; LINEEND = A + LINESIZE; }}
For GIFs sorry i don't know its internals.
 
Last edited by Syphurith,
Thanks for your hard work. Are you still working on finding a way to N3DS emunand? Have that stuck or something else?
You know there are too many people hoping for a emunand for N3DS.. (Ha What i have is an O3DS JPN, now running rx with mset. so I don't really care about it too much.)

BTW Sorry for unable to access pastebin now. All pages from pastebin shows "stolen content" (GAE) so I think I'm blocked (so do most of others in China - even connection reset).
I'll try to get it to work with that soon, although it's not as easy as just switching firm files, lol
 
  • Like
Reactions: Syphurith and Vappy
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum