void psxShutdown() { psxMemShutdown(); psxBiosShutdown(); psxCpu->Shutdown(); SPUclose(); }
int32 psf_stop(void) { SPUclose(); free(c); return AO_SUCCESS; }
//#include <android/log.h> void psxShutdown() { //__android_log_print(ANDROID_LOG_VERBOSE, "SexyPSF", "SHUTDOWN"); fprintf(stderr, "SURE"); psxMemShutdown(); psxBiosShutdown(); psxCpu->Shutdown(); SPUclose(); }
int32 psf_command(int32 command, int32 parameter) { union cpuinfo mipsinfo; uint32 lengthMS, fadeMS; switch (command) { case COMMAND_RESTART: SPUclose(); memcpy(psx_ram, initial_ram, 2*1024*1024); memcpy(psx_scratch, initial_scratch, 0x400); mips_init(); mips_reset(NULL); psx_hw_init(); SPUinit(); SPUopen(); lengthMS = psfTimeToMS(c->inf_length); fadeMS = psfTimeToMS(c->inf_fade); if (lengthMS == 0) { lengthMS = ~0; } setlength(lengthMS, fadeMS); mipsinfo.i = initialPC; mips_set_info(CPUINFO_INT_PC, &mipsinfo); mipsinfo.i = initialSP; mips_set_info(CPUINFO_INT_REGISTER + MIPS_R29, &mipsinfo); mips_set_info(CPUINFO_INT_REGISTER + MIPS_R30, &mipsinfo); mipsinfo.i = initialGP; mips_set_info(CPUINFO_INT_REGISTER + MIPS_R28, &mipsinfo); mips_execute(5000); return AO_SUCCESS; } return AO_FAIL; }
long CALLBACK ZN_SPUclose(void) { long lret=SPUclose(); SPUshutdown(); return lret; }
int32_t spx_stop(void) { SPUclose(); return AO_SUCCESS; }