int
uvl_entry ()
{
unsigned int addr;
void *this = 0x08F10000;
int *written = 0x08F01000;
int *buf = 0x18410000;
int *read_len = 0x08F10020;
int i;
addr = 0x168002AC;
GSPGPU_FlushDataCache(addr, 65535);
GX_SetTextureCopy(addr, buf, 65535, 0, 0, 0, 0, 8);
GSPGPU_FlushDataCache(buf, 65535);
IFile_Open(this, L"dmc:/rom.nes", 65535);
*((int *)this + 1) = 0x00000000; //Fseek to 0
IFile_Read(this, read_len, buf, 65535);
svcSleepThread (0x400000LL);
GSPGPU_FlushDataCache(buf, 65535);
GX_SetTextureCopy(buf, addr, 65535, 0, 0, 0, 0, 8);
GSPGPU_FlushDataCache(addr, 65535);
//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);
return 0;
}