Skip to content

Instantly share code, notes, and snippets.

@pedro-javierf
Last active October 13, 2023 14:09
Show Gist options
  • Save pedro-javierf/b4de9cafabe44c0ab601bdb296a86e82 to your computer and use it in GitHub Desktop.
Save pedro-javierf/b4de9cafabe44c0ab601bdb296a86e82 to your computer and use it in GitHub Desktop.
PSVita Ram Dump Test
#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;
}
@modz2014
Copy link

modz2014 commented May 4, 2017

this doesnt work i tried compiling it i get a main.o file using gcc but if im doing it wrong please explain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment