Last active
October 13, 2023 14:09
-
-
Save pedro-javierf/b4de9cafabe44c0ab601bdb296a86e82 to your computer and use it in GitHub Desktop.
PSVita Ram Dump Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "fcntl.h" | |
#define VITA_RAM_SIZE 536870912 //512 megabytes | |
int main() | |
{ | |
int err1, err2, y,x; | |
//Open dump file | |
err1 = sceIoOpen("ramdump.dat", 0, "wb"); | |
if(!err1<0){return 1;} | |
//Create a pointer | |
unsigned char *mempointer = (unsigned char*)0x00000000; | |
unsigned char chunck[512]; //512 bytes | |
for(x=0; x<VITA_RAM_SIZE; x++) | |
{ | |
if(x==y){break;}//Dump completed | |
for(y=0; y<512; y++) | |
{//Wont really work with restricted memory addresses, but since we have kernel access It doesn't really mind | |
chunck[y]= (unsigned char)mempointer[x]; | |
x++; | |
} | |
err2 = sceIoWrite(err1, (const void *)chunck, 512); | |
} | |
sceIoClose(err1); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this doesnt work i tried compiling it i get a main.o file using gcc but if im doing it wrong please explain