X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fpico_int.h;h=7c890c5ac85f366b025f7fc96342c6e6eacdf51d;hb=c1931173ab49838b8e6f934b11de8ff0b8fbbcf3;hp=ca31ae0d879dbff8c00eceba9eb9c0db81e86a12;hpb=4d5dfee86139e1596228db111ce2f30c22c93ddd;p=picodrive.git diff --git a/pico/pico_int.h b/pico/pico_int.h index ca31ae0..7c890c5 100644 --- a/pico/pico_int.h +++ b/pico/pico_int.h @@ -240,7 +240,7 @@ extern SH2 sh2s[2]; #ifndef DRC_SH2 # define sh2_end_run(sh2, after_) do { \ if ((sh2)->icount > (after_)) { \ - (sh2)->cycles_timeslice -= (sh2)->icount; \ + (sh2)->cycles_timeslice -= (sh2)->icount - (after_); \ (sh2)->icount = after_; \ } \ } while (0) @@ -250,7 +250,7 @@ extern SH2 sh2s[2]; # define sh2_end_run(sh2, after_) do { \ int left_ = (signed int)(sh2)->sr >> 12; \ if (left_ > (after_)) { \ - (sh2)->cycles_timeslice -= left_; \ + (sh2)->cycles_timeslice -= left_ - (after_); \ (sh2)->sr &= 0xfff; \ (sh2)->sr |= (after_) << 12; \ } \ @@ -778,8 +778,10 @@ enum { extern int Pico32xDrawMode; // 32x/pwm.c -unsigned int p32x_pwm_read16(unsigned int a, unsigned int cycles); -void p32x_pwm_write16(unsigned int a, unsigned int d, unsigned int cycles); +unsigned int p32x_pwm_read16(unsigned int a, SH2 *sh2, + unsigned int m68k_cycles); +void p32x_pwm_write16(unsigned int a, unsigned int d, + SH2 *sh2, unsigned int m68k_cycles); void p32x_pwm_update(int *buf32, int length, int stereo); void p32x_pwm_ctl_changed(void); void p32x_pwm_schedule(unsigned int m68k_now);