static void Emulate(EmulateSpecStruct *espec) { INPUT_Frame(); MDFNMP_ApplyPeriodicCheats(); /*if(unlikely(espec->VideoFormatChanged)) VDC_SetPixelFormat(espec->surface->format); //.Rshift, espec->surface->format.Gshift, espec->surface->format.Bshift); if(unlikely(espec->SoundFormatChanged)) { for(int y = 0; y < 2; y++) { sbuf[y].set_sample_rate(espec->SoundRate ? espec->SoundRate : 44100, 50); sbuf[y].clock_rate((long)(PCE_MASTER_CLOCK / 3)); sbuf[y].bass_freq(20); } }*/ int usedSubSurfaces = 0; vdcRunFunc(espec->surface, &espec->DisplayRect, espec->subSurface, IsHES ? 1 : espec->skip, usedSubSurfaces); if(!espec->skip && espec->commitVideo) MDFND_commitVideoFrame({espec->DisplayRect, espec->subSurface, usedSubSurfaces}); if(PCE_IsCD) { int32 dummy_ne; dummy_ne = PCECD_Run(HuCPU.timestamp * 3); } psg->EndFrame(HuCPU.timestamp / pce_overclocked); if(espec->SoundBuf) { for(int y = 0; y < 2; y++) { sbuf[y].end_frame(HuCPU.timestamp / pce_overclocked); espec->SoundBufSize = sbuf[y].read_samples(espec->SoundBuf + y, espec->SoundBufMaxSize, 1); } } espec->MasterCycles = HuCPU.timestamp * 3; INPUT_FixTS(); HuC6280_ResetTS(); if(PCE_IsCD) PCECD_ResetTS(); if(IsHES && !espec->skip) HES_Draw(espec->surface, &espec->DisplayRect, espec->SoundBuf, espec->SoundBufSize); }
static void Emulate(EmulateSpecStruct *espec) { INPUT_Frame(); MDFNMP_ApplyPeriodicCheats(); #if 0 { static bool firstcat = true; MDFN_PixelFormat nf; nf.bpp = 16; nf.colorspace = MDFN_COLORSPACE_RGB; nf.Rshift = 11; nf.Gshift = 5; nf.Bshift = 0; nf.Ashift = 16; nf.Rprec = 5; nf.Gprec = 6; nf.Bprec = 5; nf.Aprec = 8; espec->surface->SetFormat(nf, false); espec->VideoFormatChanged = firstcat; firstcat = false; } #endif #if 0 static bool firstcat = true; MDFN_PixelFormat tmp_pf; tmp_pf.Rshift = 0; tmp_pf.Gshift = 0; tmp_pf.Bshift = 0; tmp_pf.Ashift = 8; tmp_pf.Rprec = 6; tmp_pf.Gprec = 6; tmp_pf.Bprec = 6; tmp_pf.Aprec = 0; tmp_pf.bpp = 8; tmp_pf.colorspace = MDFN_COLORSPACE_RGB; espec->surface->SetFormat(tmp_pf, false); espec->VideoFormatChanged = firstcat; firstcat = false; #endif /*if(unlikely(espec->VideoFormatChanged)) VDC_SetPixelFormat(espec->surface->format); //.Rshift, espec->surface->format.Gshift, espec->surface->format.Bshift); if(unlikely(espec->SoundFormatChanged)) { for(int y = 0; y < 2; y++) { sbuf[y].set_sample_rate(espec->SoundRate ? espec->SoundRate : 44100, 50); sbuf[y].clock_rate((long)(PCE_MASTER_CLOCK / 3)); sbuf[y].bass_freq(10); } }*/ VDC_RunFrame(espec, IsHES); if(!espec->skip) MDFND_commitVideoFrame(espec); if(PCE_IsCD) { PCECD_Run(HuCPU.timestamp * 3); } psg->EndFrame(HuCPU.timestamp / pce_overclocked); if(espec->SoundBuf) { for(int y = 0; y < 2; y++) { sbuf[y].end_frame(HuCPU.timestamp / pce_overclocked); espec->SoundBufSize = sbuf[y].read_samples(espec->SoundBuf + y, espec->SoundBufMaxSize, 1); } } espec->MasterCycles = HuCPU.timestamp * 3; INPUT_FixTS(); HuC6280_ResetTS(); if(PCE_IsCD) PCECD_ResetTS(); if(IsHES && !espec->skip) HES_Draw(espec->surface, &espec->DisplayRect, espec->SoundBuf, espec->SoundBufSize); }