int main (void) { long i; init_timer(&data[6], &data[0]); init_power(); play_system_sound(0x4003, 1); clear_display(); for (i = -5; i <= 5; i++) { set_lcd_number(LCD_SIGNED, i % 5, LCD_DECIMAL_0); refresh_display(); wait_release(); wait_press(); } for (i = -5; i <= 5; i++) { set_lcd_number(LCD_SIGNED, i % -5, LCD_DECIMAL_0); refresh_display(); wait_release(); wait_press(); } shutdown_timer(); return 0; }
int main (void) { char playing; while (1) { init_timer(&data[6], &data[0]); init_power(); set_lcd_segment(0x3020); refresh_display(); play_system_sound(0x4003, 1); wait_release(); wait_press(); play_system_sound(0x4003, 0); do { get_sound_playing_flag(0x700c, &playing); } while (playing); clear_display(); refresh_display(); shutdown_timer(); shutdown_power(); } return 0; }
void USB_Connect() { USB_Enable(0, 1); wait_release(); wait_press(); wait_release(); USB_Disable(); }
unsigned usb_cb(u32 button, unsigned flags, void *data) { (void)button; (void)data; if(flags == BUTTON_RELEASE) { _draw_page(1); GUI_RefreshScreen(); USB_Enable(0, 1); wait_release(); wait_press(); wait_release(); USB_Disable(); _draw_page(0); } return 1; }
int main() { pspDebugScreenInit(); int devkit = sceKernelDevkitVersion(), cursor = 0; if(devkit != 0x06060010) Exit("This program supports only 6.60!"); printf("USB Mod Flasher\n\n"); setcolor(RED); printf("This Mod is only for the TN-V8 eCFW for the PS Vita!"); setcolor(WHITE); printf("\n\n\n\n\n\n\n\n\n\n\n\nCredits:\nXMB Mod by The Z\nInstaller Port by KanadeEngel\n\nSpecial Thanks to:\nfrostegater"); while(1) { if(cursor > 2) cursor = 0; else if(cursor < 0) cursor = 2; if(cursor == 0) setbcolor(GRAY); printfc(3, 4, " Install XMB Mod. "); setbcolor(BLACK); if(cursor == 1) setbcolor(GRAY); printfc(3, 5, " Restore Original Files. "); setbcolor(BLACK); if(cursor == 2) setbcolor(GRAY); printfc(3, 6, " Exit. "); setbcolor(BLACK); int i; for(i = 0; i < 4; i++) printfc(1, 4 + i, " "); setcolor(BLUE); printfc(1, 4 + cursor, ">"); unsigned int Buttons = wait_press(PSP_CTRL_CROSS | PSP_CTRL_UP | PSP_CTRL_DOWN); wait_release(PSP_CTRL_CROSS | PSP_CTRL_UP | PSP_CTRL_DOWN); SceCtrlData pad; sceCtrlReadBufferPositive(&pad, 1); if(Buttons & PSP_CTRL_CROSS) { if(cursor != 2) { setc(0, 9); if(assign_flash_zero() < 0) Exit("\n Error in 'flash0:/' assign."); { if(cursor == 0)//Install Mod Module { flash_file("flash0:/vsh/resource/topmenu_icon.rco", _660_install_X_icon, size__660_install_X_icon); } else if(cursor == 1)//Restore Original Module flash_file("flash0:/vsh/resource/topmenu_icon.rco", _660_original_X_icon, size__660_original_X_icon); } } else Exit(""); break; } else if(Buttons & PSP_CTRL_UP) cursor--; else if(Buttons & PSP_CTRL_DOWN) cursor++; } Exit("Done."); sceKernelExitGame(); return 0; }
int main (void) { char playing; short count = -10; int count2 = 0; int sound = 0; int i, j; unsigned char op = 0; char code; while (1) { init_timer(&data[6], &data[0]); init_power(); play_system_sound(0x4003, 1); #if 1 init_buttons(); clear_display(); #endif #if 0 *((volatile void **)0xfda2) = motor_control; while (1); #endif #if 0 while (1) { for (j = 0; j < 100; j++) { percent=j; set_lcd_number(0x3001, j, 0x3002); refresh_display(); for (i = 0; i < 1000; i++); } } #endif #if 0 while (1) { int i; *((short *)0xc000) = 0x0; #if 0 count2 += *((short *)0xfb7f); #endif for (i = 0; i < 1000; i++) { count++; } } #endif #if 0 while (1) { set_lcd_number(0x3017, count, 0x3002); refresh_display(); count ++; #if 1 wait_release(); wait_press(); #endif } #endif #if 1 count = 1; while (1) { set_lcd_number(0x301f, count, 0x3002); refresh_display(); count ++; wait_release(); wait_press(); } #endif #if 0 set_lcd_number(0x301f, 0xffff, 0x3002); refresh_display(); wait_release(); wait_press(); break; #endif #if 0 play_system_sound(0x4003, 0); do { get_sound_playing_flag(0x700c, &playing); } while (playing); clear_display(); refresh_display(); shutdown_power(); #endif } return 0; }