Hacking rxTools -with Pasta- CFW Theme Thread

  • Thread starter Thread starter JJTapia19
  • Start date Start date
  • Views Views 87,267
  • Replies Replies 147
  • Likes Likes 19
Rxtools (and Pasta) code runs on arm9, on which we can't use touch hid. That's why there's no tactil support, only phisical keys are used.

P.S. First versions of pasta had tactil support because the gui was running in arm11, not in arm9 ;)
Why have you switched to ARM9? :(
 
Rxtools (and Pasta) code runs on arm9, on which we can't use touch hid. That's why there's no tactil support, only phisical keys are used.

P.S. First versions of pasta had tactil support because the gui was running in arm11, not in arm9 ;)
Ah ok !!! I understand now ^^
Why have you switched to ARM9? :(
No arm11 exploit past 4.X ?
 
Why have you switched to ARM9? :(
Because in this way we have the 1 code for every entrypoint, instead of having to write the arm11 code for each entrypoint...

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

Ah ok !!! I understand now ^^

No arm11 exploit past 4.X ?
Ninjhax uses an userland arm11 exploit, brahma/bootstrap/klibhax uses and arm11 kernel exploit. We have arm11 and arm9 code execution from 4.5 to 9.2, 9.3+ is arm11 userland only
 
Because in this way we have the 1 code for every entrypoint, instead of having to write the arm11 code for each entrypoint...

Ninjhax uses an userland arm11 exploit, brahma/bootstrap/klibhax uses and arm11 kernel exploit. We have arm11 and arm9 code execution from 4.5 to 9.2, 9.3+ is arm11 userland only

So with the mset entrypoint (ds profile) you can use arm11 userland too ?
 
Because in this way we have the 1 code for every entrypoint, instead of having to write the arm11 code for each entrypoint...

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


Ninjhax uses an userland arm11 exploit, brahma/bootstrap/klibhax uses and arm11 kernel exploit. We have arm11 and arm9 code execution from 4.5 to 9.2, 9.3+ is arm11 userland only
I guess it's not possible to exploit arm11 from arm9, is it?
 
Mset exploit starts in arm11!
So it's a kernel exploit ? Even after 4.X.
Cfw patches and other rxtools features needs to be loaded in arm9. Why should we do arm11->arm9->arm11->arm9? Also, we can't get back to arm11 from arm9 without a soft reboot (or firmlaunch)
Too much work for just tactil support ^^ And the cfw takes more time to boot I guess ?
 
So it's a kernel exploit ?

Too much work for just tactil support ^^ And the cfw takes more time to boot I guess ?
Latest mset exploit start from arm11, gets arm11 kernel access and it escalates to arm9 throught firmlaunchax.

It's not possible to go from arm9 to arm11, so the arm9 part has to be the last stage of the cfw boot...
 
  • Like
Reactions: nastys and pakrett
Latest mset exploit start from arm11, gets arm11 kernel access and it escalates to arm9 throught firmlaunchax.

It's not possible to go from arm9 to arm11, so the arm9 part has to be the last stage of the cfw boot...
Thank you alot for the explanation ! Plus it's pretty cool
shades.gif
 
  • Like
Reactions: AlbertoSONIC
Latest mset exploit start from arm11, gets arm11 kernel access and it escalates to arm9 throught firmlaunchax.

It's not possible to go from arm9 to arm11, so the arm9 part has to be the last stage of the cfw boot...
Is it possible at least to show 3D images? It would be cool to have 3D themes :D
Also, if a theme doesn't have the second image, the program could load the first image in the second buffer (thus showing it in 2D).
 
Rxtools (and Pasta) code runs on arm9, on which we can't use touch hid. That's why there's no tactil support, only phisical keys are used.

P.S. First versions of pasta had tactil support because the gui was running in arm11, not in arm9 ;)
If I recall correctly, for early ARM9 HB, someone figured out how to get some basic tactile input working in a block-breaker style homebrew. It seems L/R addresses were figured out, but I'm not sure if they ever figured U/D addresses. Might be something to look into if you're feeling keen, haha

Is it possible at least to show 3D images? It would be cool to have 3D themes :D
Also, if a theme doesn't have the second image, the program could load the first image in the second buffer (thus showing it in 2D).

Fixed 3D has been done (On/Off, no variable slider) in ARM9 before as well, so I can't see it being impossible by any means.
 
  • Like
Reactions: AlbertoSONIC
Is it possible at least to show 3D images? It would be cool to have 3D themes :D
Also, if a theme doesn't have the second image, the program could load the first image in the second buffer (thus showing it in 2D).
We can easily add 3D support since we already draw the TOP image on Left and Right framebuffers. We just have to draw different (slighlty moved) images on left and right to see a 3d effect, but it would work only if the 3d was on before booting the entrypoint.
 
We can easily add 3D support since we already draw the TOP image on Left and Right framebuffers. We just have to draw different (slighlty moved) images on left and right to see a 3d effect, but it would work only if the 3d was on before booting the entrypoint.
Really? :lol:
Where, exactly? In main.c, lines 94 and 112, right?
Schermata del 2015-07-17 23:23:00.png

EDIT: I forgot about the DrawTopSplash(str). It's there where I should look at, isn't it?
EDIT: I think I found it: it's in draw.c.
 
Last edited by nastys,
Really? [emoji38]
Where, exactly? In main.c, lines 94 and 112, right?

EDIT: I forgot about the DrawTopSplash(str). It's there where I should look at, isn't it?
EDIT: I think I found it: it's in draw.c.
Yep, DrawTopSplash draws the top splash. As of now, the code draws a framebuffer (left or right, i don't remember) and it copies it to the other one. We could remove the "copy" code (from u32 * fb1 to the closing bracket of the "for" below) , change the function to get 2 args (void DrawTopSplash(char* path_left, char* path_right) ) and duplicate the image drawing code to draw 1 image on TOP_SCREEN and the other one on TOP_SCREEN2 and here you go!
 
  • Like
Reactions: nastys
Yep, DrawTopSplash draws the top splash. As of now, the code draws a framebuffer (left or right, i don't remember) and it copies it to the other one. We could remove the "copy" code (from u32 * fb1 to the closing bracket of the "for" below) , change the function to get 2 args (void DrawTopSplash(char* path_left, char* path_right) ) and duplicate the image drawing code to draw 1 image on TOP_SCREEN and the other one on TOP_SCREEN2 and here you go!
Is there a way to check if the second file exists and, if it doesn't, use the first?
 
Is there a way to check if the second file exists and, if not, use the first?
Yeah of course:

//TOP_SCREEN drawing code
....

//TOP_SCREEN2 drawing code
File Splash;
if(FileOpen(&Splash, path_right, 0))
{
//If exists, draw it!
...
FileClose(&Splash);
}
else
{
//If it doesn't exist, use the copying code!
...
}
 
Yeah of course:

//TOP_SCREEN drawing code
....

//TOP_SCREEN2 drawing code
File Splash;
if(FileOpen(&Splash, path_right, 0))
{
//If exists, draw it!
...
FileClose(&Splash);
}
else
{
//If it doesn't exist, use the copying code!
...
}
I think that's everything I need to know, now I'll try. Thanks ;)
 
Yeah of course:

//TOP_SCREEN drawing code
....

//TOP_SCREEN2 drawing code
File Splash;
if(FileOpen(&Splash, path_right, 0))
{
//If exists, draw it!
...
FileClose(&Splash);
}
else
{
//If it doesn't exist, use the copying code!
...
}
I did it! But unfortunately, this is not backwards compatible with 2D themes. It seems this piece of code doesn't actually check if BOTH files actually exist:
Code:
  if (FileOpen(&SplashL, splash_fileL, 0)&&FileOpen(&SplashR, splash_fileR, 0))
   {
     //Load the spash image
     bin_size = 0;
     while ((n = FileRead(&SplashL, (void*)((u32)TOP_SCREEN + bin_size), 0x100000, bin_size)) > 0) {
       bin_size += n;
     }
     FileClose(&SplashL);
     bin_size = 0;
     while ((n = FileRead(&SplashR, (void*)((u32)TOP_SCREEN2 + bin_size), 0x100000, bin_size)) > 0) {
       bin_size += n;
     }
     FileClose(&SplashR);
   }
   else if (FileOpen(&SplashL, splash_fileL, 0)&&FileOpen(&Splash, splash_fileR, 0))
   {
     //Load the spash image
     bin_size = 0;
     while ((n = FileRead(&Splash, (void*)((u32)TOP_SCREEN + bin_size), 0x100000, bin_size)) > 0) {
       bin_size += n;
     }
     u32 *fb1 = (u32*)TOP_SCREEN;
     u32 *fb2 = (u32*)TOP_SCREEN2;
     for (n = 0; n < bin_size; n += 4){
       *fb2++ = *fb1++;
     }
     FileClose(&Splash);
   }
   else DrawString(BOT_SCREEN, " MISSING THEME FILES!  ", 0, SCREEN_HEIGHT - FONT_SIZE, RED, BLACK);
3D themes work, but if a 2D theme is selected it won't refresh the top screen :(
Full source (of the changed files) and test images attached:
Edit: nevermind...
Edit2: fixed. Changes and test images attached. I'll test and upload it to GitHub ;)
 

Attachments

Last edited by nastys,
I did it! But unfortunately, this is not backwards compatible with 2D themes. It seems this piece of code doesn't actually check if BOTH files actually exist:
Code:
  if (FileOpen(&SplashL, splash_fileL, 0)&&FileOpen(&SplashR, splash_fileR, 0))
   {
     //Load the spash image
     bin_size = 0;
     while ((n = FileRead(&SplashL, (void*)((u32)TOP_SCREEN + bin_size), 0x100000, bin_size)) > 0) {
       bin_size += n;
     }
     FileClose(&SplashL);
     bin_size = 0;
     while ((n = FileRead(&SplashR, (void*)((u32)TOP_SCREEN2 + bin_size), 0x100000, bin_size)) > 0) {
       bin_size += n;
     }
     FileClose(&SplashR);
   }
   else if (FileOpen(&SplashL, splash_fileL, 0)&&FileOpen(&Splash, splash_fileR, 0))
   {
     //Load the spash image
     bin_size = 0;
     while ((n = FileRead(&Splash, (void*)((u32)TOP_SCREEN + bin_size), 0x100000, bin_size)) > 0) {
       bin_size += n;
     }
     u32 *fb1 = (u32*)TOP_SCREEN;
     u32 *fb2 = (u32*)TOP_SCREEN2;
     for (n = 0; n < bin_size; n += 4){
       *fb2++ = *fb1++;
     }
     FileClose(&Splash);
   }
   else DrawString(BOT_SCREEN, " MISSING THEME FILES!  ", 0, SCREEN_HEIGHT - FONT_SIZE, RED, BLACK);
3D themes work, but if a 2D theme is selected it won't refresh the top screen :(
Full source (of the changed files) and test images attached:
Edit: nevermind...
Edit2: fixed. Changes and test images attached. I'll test and upload it to GitHub ;)
So it does work?
 

Site & Scene News

Popular threads in this forum