X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fpico_int.h;h=bba13c95059e87d379f6bb140d86602392c88b0e;hb=f8675e282e7aa72bc6ab0edbb1dada4395d1c44c;hp=d63657998ca77bae736de5e65025d16b7a85ff19;hpb=7eaa381224c5b50b90f39938be2e298a322b6f9f;p=picodrive.git diff --git a/pico/pico_int.h b/pico/pico_int.h index d636579..bba13c9 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -251,6 +251,7 @@ extern SH2 sh2s[2]; } \ } while (0) # define sh2_cycles_left(sh2) (sh2)->icount +# define sh2_burn_cycles(sh2, n) (sh2)->icount -= n # define sh2_pc(sh2) (sh2)->ppc #else # define sh2_end_run(sh2, after_) do { \ @@ -262,6 +263,7 @@ extern SH2 sh2s[2]; } \ } while (0) # define sh2_cycles_left(sh2) ((signed int)(sh2)->sr >> 12) +# define sh2_burn_cycles(sh2, n) (sh2)->sr -= ((n) << 12) # define sh2_pc(sh2) (sh2)->pc #endif @@ -281,6 +283,9 @@ extern SH2 sh2s[2]; #define sh2_set_vbr(c, v) \ { if (c) ssh2.vbr = v; else msh2.vbr = v; } +#define elprintf_sh2(sh2, w, f, ...) \ + elprintf(w,"%csh2 "f,(sh2)->is_slave?'s':'m',##__VA_ARGS__) + // --------------------------------------------------------- // main oscillator clock which controls timing