Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "spider.h"
- #include "fs.h"
- int uvl_entry()
- {
- unsigned int startingAddress = 0x14000000;
- unsigned int dumpLength = 0x4000000;
- performMemoryDump(startingAddress, dumpLength);
- return 0;
- }
- performMemoryDump(unsigned int startingAddress, unsigned int dumpLength)
- {
- unsigned int addr = startingAddress;
- void *this = 0x08F10000;
- int *written = 0x08F01000;
- int *buf = 0x18410000;
- IFile_Open(this, L"dmc:/MemoryDump.bin", 6);
- svcSleepThread(0x400000LL);
- for (; addr < startingAddress + dumpLength; addr += 0x10000)
- {
- // Dumps a 0x10000 bytes of ram to sd card
- GSPGPU_FlushDataCache(addr, 0x10000);
- GX_SetTextureCopy(addr, buf, 0x10000, 0, 0, 0, 0, 8);
- GSPGPU_FlushDataCache(buf, 0x10000);
- svcSleepThread(0x400000LL);
- IFile_Write(this, written, buf, 0x10000);
- // Flashes mostly black screen on the bottom screen for a few frames, this is so I know the program is running and not frozen
- GSPGPU_FlushDataCache(0x18000000, 0x00038400);
- GX_SetTextureCopy(0x18000000, 0x1F48F000, 0x00038400, 0, 0, 0, 0, 8);
- svcSleepThread(0x400000LL);
- GSPGPU_FlushDataCache(0x18000000, 0x00038400);
- GX_SetTextureCopy(0x18000000, 0x1F4C7800, 0x00038400, 0, 0, 0, 0, 8);
- svcSleepThread(0x400000LL);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement