예제 #1
0
파일: thread.c 프로젝트: Greafox/Cosmo3DS
void fileReadWrite(void *buf, void *path, int size, char rw){
    unsigned int br = 0;
    memset(&handle, 0, 32);
    fopen9(&handle, path, 6);
    if(rw == 0) fread9(&handle, &br, buf, size);
    else fwrite9(&handle, &br, buf, size);
    fclose9(&handle);
}
예제 #2
0
파일: thread.c 프로젝트: meowy/ReiNand
void memdump(void* filename, void* buf, unsigned int size){
	unsigned int br = 0;
    memset(&handle, 0, 32);
	fopen9(&handle, filename, 6);
	fwrite9(&handle, &br, buf, size);
	fclose9(&handle);
	memset(VRAM+0x1E6000, 0xFF, 0x46500);
}
예제 #3
0
파일: myThread.c 프로젝트: wangyu-/rxTools
void memdump(wchar_t* filename, unsigned char* buf, unsigned int size){
	unsigned int br;
	for(int i = 0; i < 0x600000; i++){
		*(VRAM + i) = 0x77;			//Grey flush : Start Dumping
	}
	memset(&handle, 0, 32);
	fopen9(&handle, filename, 6);
	fwrite9(&handle, &br, buf, size);
	fclose9(&handle);
	for(int i = 0; i < 0x600000; i++){
		*(VRAM + i) = 0xFF;			//White flush : Finished Dumping
	}
}
예제 #4
0
파일: thread.c 프로젝트: meowy/ReiNand
void screenShot(int frame){
    unsigned int br;
    short width = frame == 0 ? 400 : 320;
    short height = 240;
    int frameOff = frame == 0 ? 0x1E6000 : 0x48F000;  //<- Defaults
    int length = frame == 0 ? 0x46500 : 0x38400;
    memset(&handle, 0, 32);
	fopen9(&handle, frame == 0 ? L"sdmc:/screen_top.bmp" : L"sdmc:/screen_bot.bmp", 6);
    transpose(FCRAM+0xF80000, VRAM+frameOff, width, height, 3);
    bmpHead[18] = frame == 0 ? 0x90 : 0x40;
    fwrite9(&handle, &br, bmpHead, 0x36);
    fwrite9(&handle, &br, FCRAM+0xF80000, length);
    fclose9(&handle);
    memset(VRAM+frameOff, 0xFF, 0x46500);
}