From: kub Date: Fri, 26 Nov 2021 19:33:26 +0000 (+0100) Subject: core, improve pad compatibility (6btn, mcd32x) X-Git-Tag: v2.00~403 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6890dcfafc1c00f9d1c12eb6ce61600d8229c8f3;p=picodrive.git core, improve pad compatibility (6btn, mcd32x) --- diff --git a/pico/memory.c b/pico/memory.c index 6bdbec39..85e2e377 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -240,9 +240,9 @@ static u32 read_pad_6btn(int i, u32 out_bits) } else if(phase == 3) { if (out_bits & 0x40) - return (pad & 0x30) | ((pad >> 8) & 0xf); // ?1CB MXYZ + value = (pad & 0x30) | ((pad >> 8) & 0xf); // ?1CB MXYZ else - return ((pad & 0xc0) >> 2) | 0x0f; // ?0SA 1111 + value = ((pad & 0xc0) >> 2) | 0x0f; // ?0SA 1111 goto out; } @@ -281,7 +281,7 @@ static NOINLINE u32 port_read(int i) // disables output before doing TH-low read, so don't emulate it for TH. // Decap Attack reportedly doesn't work on Nomad but works on must // other MD revisions (different pull-up strength?). - if (PicoIn.AHW & PAHW_32X) // don't do it on 32X, it breaks WWF Raw + if (PicoIn.AHW & (PAHW_32X|PAHW_MCD)) // don't do it on 32X, it breaks WWF Raw out |= 0x7f & ~ctrl_reg; else out |= 0x3f & ~ctrl_reg;