Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "spider.h"
- #include "fs.h"
- int uvl_entry()
- {
- FILE *fin = (void *)0x08F10000;
- unsigned int addr;
- int *buf = 0x18410000;
- int *read_len = 0x08F10020;
- int i;
- unsigned int offset;
- addr = 0x16800000;
- offset = 0;
- GSPGPU_FlushDataCache(addr, 0x10000);
- GX_SetTextureCopy(addr, buf, 0x10000, 0, 0, 0, 0, 8);
- GSPGPU_FlushDataCache(buf, 0x10000);
- svcSleepThread(0x400000LL);
- offset = 0;
- for (i = 0; i < 0x4000; i++)
- {
- if (buf[i] == 0x0028B7C3)
- {
- offset = addr + (i * 4);
- }
- }
- if (offset != 0)
- {
- IFile_Open(fin, L"dmc:/rom.gbc", FILE_R);
- fin->pos = 0x00;
- for (addr = offset; addr < (offset + 0x100000); addr += 0x10000)
- {
- IFile_Read(fin, read_len, buf, 0x10000);
- GSPGPU_FlushDataCache(buf, 0x10000);
- GX_SetTextureCopy(buf, addr, 0x10000, 0, 0, 0, 0, 8);
- GSPGPU_FlushDataCache(addr, 0x10000);
- svcSleepThread(0x400000LL);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement