Skip to content

Instantly share code, notes, and snippets.

@hexkyz
Created February 11, 2017 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hexkyz/b5a5615d4d15ed4602fee426e3b17750 to your computer and use it in GitHub Desktop.
Save hexkyz/b5a5615d4d15ed4602fee426e3b17750 to your computer and use it in GitHub Desktop.
// Set shared memory region
sub_40D284()
{
// Do some Sysroot stuff
...
// Gets address 0x00400000 from Sysroot
u32 **phys_addr_ptr;
u32 *mem_addr = SceSysrootForKernel_C8C8C321(0x100);
// Translate to physical
sceKernelGetPaddr(mem_addr, phys_addr_ptr);
// Call SMC 0x101
sub_40CE04(*phys_addr_ptr, 0x5000);
// Cleanup?
SceSysrootForKernel_AE55B7CC();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment