X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2F32x.c;h=e945c8e2819e6f1ab7dc04dbaaf16a68b8580a82;hb=f6c49d38cbb965c502ca2af66d76e92f95acda7c;hp=323b0b65a669aa01b8ebd097bdc3cfe7a8b55e4b;hpb=e05b81fc5b3f640496795ced5d893ece4cc51c2d;p=picodrive.git diff --git a/pico/32x/32x.c b/pico/32x/32x.c index 323b0b6..e945c8e 100644 --- a/pico/32x/32x.c +++ b/pico/32x/32x.c @@ -165,6 +165,8 @@ static void p32x_start_blank(void) static __inline void run_m68k(int cyc) { + pprof_start(m68k); + #if defined(EMU_C68K) PicoCpuCM68k.cycles = cyc; CycloneRun(&PicoCpuCM68k); @@ -174,6 +176,8 @@ static __inline void run_m68k(int cyc) #elif defined(EMU_F68K) SekCycleCnt += fm68k_emulate(cyc+1, 0, 0); #endif + + pprof_end(m68k); } // ~1463.8, but due to cache misses and slow mem @@ -194,10 +198,18 @@ static __inline void run_m68k(int cyc) slice = SekCycleCnt - slice; /* real count from 68k */ \ if (SekCycleCnt < SekCycleAim) \ elprintf(EL_32X, "slice %d", slice); \ - if (!(Pico32x.emu_flags & (P32XF_SSH2POLL|P32XF_SSH2VPOLL))) \ + if (!(Pico32x.emu_flags & (P32XF_SSH2POLL|P32XF_SSH2VPOLL))) { \ + pprof_start(ssh2); \ sh2_execute(&ssh2, CYCLES_M68K2SH2(slice)); \ - if (!(Pico32x.emu_flags & (P32XF_MSH2POLL|P32XF_MSH2VPOLL))) \ + pprof_end(ssh2); \ + } \ + if (!(Pico32x.emu_flags & (P32XF_MSH2POLL|P32XF_MSH2VPOLL))) { \ + pprof_start(msh2); \ sh2_execute(&msh2, CYCLES_M68K2SH2(slice)); \ + pprof_end(msh2); \ + } \ + pprof_start(dummy); \ + pprof_end(dummy); \ } \ }