int main() { char rom_path[PATH_MAX]; printf("Starting NES4Vita by SMOKE"); vita2d_init(); while (1) { emu = new Nes_Emu(); file_choose( "cache0:/VitaDefilerClient/Documents", rom_path, "Choose a NES ROM:", supported_ext ); printf("Loading emulator.... %s", rom_path); run_emu(rom_path); delete emu; } vita2d_fini(); sceKernelExitProcess(0); return 0; }
int main() { char rom_path[PATH_MAX]; printf("\nRealBoy %s\n", "0.2.2"); sceCtrlSetSamplingMode(SCE_CTRL_MODE_ANALOG); vita2d_init(); vita2d_set_clear_color(RGBA8(0x40, 0x40, 0x40, 0xFF)); while (1) { strcpy(current_dir, "ux0:"); int ret = file_choose( current_dir, rom_path, "Choose a GB/GB Color/Super GB ROM:", supported_ext ); if (ret == -1) break; if ( (rom_file = fopen(rom_path, "r")) == NULL) { printf("\nError opening %s\n", rom_path); continue; } file_path = strndup(rom_path, 256); if (rom_file != NULL) { init_conf(); int ret_val; // value returned from emulation /* Start Virtual Machine */ ret_val = start_vm(); /* Error returned if file not valid */ if (ret_val == -1) { printf("File %s not a gb binary\n\n", rom_path); } } free(file_path); } vita2d_fini(); sceKernelExitProcess(0); return 0; }