X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fpwm.c;h=defbf0db990cf9f96c5f56c57aa4d5cc1127118e;hb=10250ad2302851843f9b0990fed96d49db210755;hp=64d672238e0bf54ff6de5620baa657e2f7b0e50c;hpb=07e5dbab71684189f10227108c1e71e2d002a734;p=picodrive.git diff --git a/pico/32x/pwm.c b/pico/32x/pwm.c index 64d6722..defbf0d 100644 --- a/pico/32x/pwm.c +++ b/pico/32x/pwm.c @@ -47,7 +47,7 @@ void p32x_timers_recalc(void) } // PWM irq for every tm samples -void p32x_timers_do(int new_line) +void p32x_timers_do(int line_call) { int tm, cnt, i; @@ -55,17 +55,17 @@ void p32x_timers_do(int new_line) { tm = (Pico32x.regs[0x30 / 2] & 0x0f00) >> 8; if (tm != 0) { - if (new_line) + if (line_call) Pico32x.pwm_irq_sample_cnt += pwm_line_samples; if (Pico32x.pwm_irq_sample_cnt >= (tm << 16)) { Pico32x.pwm_irq_sample_cnt -= tm << 16; Pico32x.sh2irqs |= P32XI_PWM; - p32x_update_irls(); + p32x_update_irls(!line_call); } } } - if (!new_line) + if (!line_call) return; for (i = 0; i < 2; i++) { @@ -145,7 +145,6 @@ void p32x_pwm_write16(unsigned int a, unsigned int d) void p32x_pwm_update(int *buf32, int length, int stereo) { - extern int pwm_ptr; short *pwmb; int step; int p = 0;