From 2399acd107d248bb222aead2a1be01b6b4d7311e Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 13 Oct 2020 23:19:47 +0300 Subject: [PATCH] add a hack for Decap Attack Should delay the pull-up affect instead, but probably nothing needs this whole thing anyway. --- pico/memory.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pico/memory.c b/pico/memory.c index aef3ee8e..65643cec 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -272,7 +272,12 @@ static NOINLINE u32 port_read(int i) u32 in, out; out = data_reg & ctrl_reg; - out |= 0x7f & ~ctrl_reg; // pull-ups + + // pull-ups: should be 0x7f, but Decap Attack has a bug where it temp. + // 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?). + out |= 0x3f & ~ctrl_reg; in = port_readers[i](i, out);