X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2F32x%2Fmemory.c;h=ae0ec10dad4a4ed9e0004ab3cb1deb9eaadd94d3;hb=a7f82a776aaceee318707827f5aa074d0f0a2bb7;hp=1e07e7d5d558d95c69250129d3197d15d2c864db;hpb=da77daa962a65116b81149fdc9c2374d22d72dd0;p=picodrive.git diff --git a/pico/32x/memory.c b/pico/32x/memory.c index 1e07e7d..ae0ec10 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -252,7 +252,7 @@ static u32 p32x_reg_read16(u32 a) } if ((a & 0x30) == 0x30) - return p32x_pwm_read16(a); + return p32x_pwm_read16(a, SekCyclesDoneT() * 3); out: return Pico32x.regs[a / 2]; @@ -385,7 +385,7 @@ static void p32x_reg_write16(u32 a, u32 d) } // PWM else if ((a & 0x30) == 0x30) { - p32x_pwm_write16(a, d); + p32x_pwm_write16(a, d, SekCyclesDoneT() * 3); return; } @@ -495,7 +495,7 @@ static u32 p32x_sh2reg_read16(u32 a, int cpuid) return r[a / 2]; } if ((a & 0x30) == 0x30) { - return p32x_pwm_read16(a); + return p32x_pwm_read16(a, sh2_cycles_done_t(&sh2s[cpuid])); } return 0; @@ -571,7 +571,7 @@ static void p32x_sh2reg_write16(u32 a, u32 d, int cpuid) } // PWM else if ((a & 0x30) == 0x30) { - p32x_pwm_write16(a, d); + p32x_pwm_write16(a, d, sh2_cycles_done_t(&sh2s[cpuid])); return; }