Homebrew RAM dump

Rinnegatamante

Well-Known Member
Member
Joined
Nov 24, 2014
Messages
3,162
Trophies
2
Age
27
Location
Bologna
Website
rinnegatamante.it
XP
4,733
Country
Italy
You must do something like this:

Code:
void DumpRam(char* output,u32 base,u32 length){
    Handle fileHandle;
    u32 bytesWritten;
    u32 MAX_RAM_ADDRESS = (base + length); // Don't know if ninjhax accessible offsets starts from 0x0 but it can access only 64 MB RAM
    u32 i = base;
    FS_path filePath=FS_makePath(PATH_CHAR, output);
    FS_archive dump=(FS_archive){ARCH_SDMC, (FS_path){PATH_EMPTY, 1, (u8*)""}};
    FSUSER_OpenFileDirectly(NULL, &fileHandle, dump, filePath, FS_OPEN_CREATE | FS_OPEN_WRITE, FS_ATTRIBUTE_NONE);
    while (i <= MAX_RAM_ADDRESS){
        FSFILE_Write(fileHandle, &bytesWritten, (i-base), *(u8*)i, 1, FS_WRITE_FLUSH);
        i++;
    }
    FSFILE_Close(fileHandle);
    svcCloseHandle(fileHandle);
}
 

You may also like...

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: Damn