From: kub Date: Wed, 19 May 2021 17:14:45 +0000 (+0200) Subject: 32x, minor improvement for poll detection X-Git-Tag: v2.00~524 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=341b0ccbad30cc06264b77ce0baa692e12be48a2;p=picodrive.git 32x, minor improvement for poll detection --- diff --git a/pico/32x/memory.c b/pico/32x/memory.c index 8cd1c198..4cf683c6 100644 --- a/pico/32x/memory.c +++ b/pico/32x/memory.c @@ -511,7 +511,7 @@ static void p32x_reg_write8(u32 a, u32 d) case 0x2d: case 0x2e: case 0x2f: - if (REG8IN16(r, a) != d) { + if (REG8IN16(r, a) != (u8)d) { unsigned int cycles = SekCyclesDone(); if (CYCLES_GT(cycles - msh2.m68krcycles_done, 64)) @@ -608,7 +608,7 @@ static void p32x_reg_write16(u32 a, u32 d) case 0x2a/2: case 0x2c/2: case 0x2e/2: - if (r[a / 2] != d) { + if (r[a / 2] != (u16)d) { unsigned int cycles = SekCyclesDone(); if (CYCLES_GT(cycles - msh2.m68krcycles_done, 64)) @@ -823,7 +823,7 @@ static void p32x_sh2reg_write8(u32 a, u32 d, SH2 *sh2) return; case 0x05: // H count d &= 0xff; - if (Pico32x.sh2_regs[4 / 2] != d) { + if (Pico32x.sh2_regs[4 / 2] != (u8)d) { unsigned int cycles = sh2_cycles_done_m68k(sh2); Pico32x.sh2_regs[4 / 2] = d; p32x_sh2_poll_event(sh2->other_sh2, SH2_STATE_CPOLL, cycles); @@ -848,7 +848,7 @@ static void p32x_sh2reg_write8(u32 a, u32 d, SH2 *sh2) case 0x2d: case 0x2e: case 0x2f: - if (REG8IN16(r, a) != d) { + if (REG8IN16(r, a) != (u8)d) { unsigned int cycles = sh2_cycles_done_m68k(sh2); REG8IN16(r, a) = d; @@ -941,7 +941,7 @@ static void p32x_sh2reg_write16(u32 a, u32 d, SH2 *sh2) case 0x2a/2: case 0x2c/2: case 0x2e/2: - if (Pico32x.regs[a / 2] != d) { + if (Pico32x.regs[a / 2] != (u16)d) { unsigned int cycles = sh2_cycles_done_m68k(sh2); Pico32x.regs[a / 2] = d;