Author Topic: Taking a screenshot from a SceShell plugin  (Read 913 times)

Offline teakhanirons

  • Refugee
  • **
  • Posts: 72
  • Saki did nothing wrong.
    • View Profile
Taking a screenshot from a SceShell plugin
« on: June 01, 2020, 10:50:41 PM »
I had problems using the newly added SceScreenshot from DolceSDK from a SceShell (main) plugin when they worked fine in other apps. dots-tb told me to look into how shell handled the button combo. Then Princess suggested using taihen_min from sysident to use it.

sysident taihen_min.c implementation of module_get_offset is located here.

The offset is 0x14a928 on 3.60-3.61 retail firmwares. Going by cuevavirus's SceShell differences by firmware documentation, it's safe to assume that you'll have to find it yourself on other firmwares by comparing the code on that offset on 3.60-3.61 retail firmwares.

Here's a sample module_get_offset:
Code: [Select]
tai_module_info_t tai_info;
tai_info.size = sizeof(tai_module_info_t);
int ret = taiGetModuleInfo("SceShell", &tai_info);
if (ret < 0) return SCE_KERNEL_START_SUCCESS;

int (*shellShot)(void); // you define it (this may need to be global)

module_get_offset(tai_info.modid, 0, 0x14a928 | 1, &shellShot); // you fill it / point it

sceSysmoduleLoadModule(SCE_SYSMODULE_SCREEN_SHOT); // you load screenshot module
shellShot(); // you use the function
sceSysmoduleUnloadModule(SCE_SYSMODULE_SCREEN_SHOT); // you unload the screenshot module
Life Pro Tip: Fry rice before steaming it to enrichen its taste.

Offline FMudanyali

  • Hot Pockets
  • End User
  • *****
  • Posts: 30
    • View Profile
    • My personal website
Re: Taking a screenshot from a SceShell plugin
« Reply #1 on: September 29, 2020, 12:02:31 PM »
3.65 CEX offset: 0x14a980
3.65 REX (Testkit) offset: 0x142db4
« Last Edit: November 01, 2020, 03:48:52 PM by fmudanyali »
!! I love the forums !!

Offline FMudanyali

  • Hot Pockets
  • End User
  • *****
  • Posts: 30
    • View Profile
    • My personal website
Re: Taking a screenshot from a SceShell plugin
« Reply #2 on: November 01, 2020, 12:51:56 PM »
3.60 REX (Testkit) offset: 0x142d5c
« Last Edit: November 01, 2020, 03:48:57 PM by fmudanyali »
!! I love the forums !!