void gsKit_remove_vsync_handler(int callback_id) { DIntr(); DisableIntc(kINTC_VBLANK_START); RemoveIntcHandler(2, callback_id); EIntr(); }
void gsKit_remove_hsync_handler(int callback_id) { DIntr(); // Mask HSync interrupt GsPutIMR(GsGetIMR() | 0x0400); DisableIntc(INTC_GS); RemoveIntcHandler(INTC_GS, callback_id); EIntr(); }
void gsKit_remove_vsync_handler(int callback_id) { DIntr(); // Mask VSync interrupt GsPutIMR(GsGetIMR() | 0x0800); DisableIntc(INTC_VBLANK_S); RemoveIntcHandler(INTC_VBLANK_S, callback_id); EIntr(); }
/* Timer End */ void TimerEnd(void) { *T0_MODE = 0x0000; if (TimerInterruptID >= 0){ DisableIntc(9); RemoveIntcHandler(9, TimerInterruptID); TimerInterruptID = -1; } TimerInterruptCount = 0; }
void gsKit_remove_vsync_handler(int callback_id) { DIntr(); DisableIntc(2); RemoveIntcHandler(2, callback_id); EIntr(); }
SDLThread::~SDLThread() { T0_MODE = 0; // Deshabilito antes de tocar nada DisableIntc(INTC_TIM0); if (tim0_handler_id >= 0) { RemoveIntcHandler(INTC_TIM0, tim0_handler_id); tim0_handler_id = -1; } end(); }
void SDL_SYS_TimerQuit(void) { *T1_MODE = 0; // Deshabilito antes de tocar nada DisableIntc(INTC_TIM1); if (tim1_handler_id >= 0) { RemoveIntcHandler(INTC_TIM1, tim1_handler_id); tim1_handler_id = -1; } }
void _ps2sdk_time_deinit(void) { *T_MODE = 0x0000; // Stop the timer if (s_intrOverflowID >= 0) { DisableIntc(kINTC_TIMER1); RemoveIntcHandler(kINTC_TIMER1, s_intrOverflowID); s_intrOverflowID = -1; } s_intrOverflowCount = 0; }
void MFSystem_DeinitModulePlatformSpecific() { // Stop the timer *T1_MODE = 0x0000; // Disable the interrupt if (s_tnInterruptID >= 0) { DisableIntc(kINTC_TIMER1); RemoveIntcHandler(kINTC_TIMER1, s_tnInterruptID); s_tnInterruptID = -1; } s_tnInterruptCount = 0; }
/** Writes gmon.out dump file and stops profiling Called from atexit() handler; will dump out a host:gmon.out file with all collected information. */ static void cleanup() { FILE *fp; int i; struct gmonhdr hdr; if (gp.state != GMON_PROF_ON) { /* profiling was disabled anyway */ return; } /* disable profiling before we make plenty of libc calls */ gp.state = GMON_PROF_OFF; /* kill timer */ DisableIntc(INTC_TIM); if (gp.timer > 0) { RemoveIntcHandler(INTC_TIM, gp.timer); } fp = fopen("host:gmon.out", "wb"); hdr.lpc = gp.lowpc; hdr.hpc = gp.highpc; hdr.ncnt = sizeof(hdr) + (sizeof(unsigned int) * gp.nsamples); hdr.version = GMONVERSION; hdr.profrate = 1000; /* 1000 hz = 1ms */ hdr.resv[0] = 0; hdr.resv[1] = 0; hdr.resv[2] = 0; fwrite(&hdr, 1, sizeof(hdr), fp); fwrite(gp.samples, gp.nsamples, sizeof(unsigned int), fp); for (i=0; i<gp.narcs; i++) { if (gp.arcs[i].count > 0) { fwrite(gp.arcs + i, sizeof(struct rawarc), 1, fp); } } fclose(fp); }