X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fmemory.c;h=a46760da6097717d30add0c284f709906ad36564;hb=HEAD;hp=c633c89b255fb7217304d6777fb2f28f288dc164;hpb=6311a3baf533d4a034e51dfe38e8cb213a1bf442;p=picodrive.git diff --git a/pico/memory.c b/pico/memory.c index c633c89..a46760d 100644 --- a/pico/memory.c +++ b/pico/memory.c @@ -270,7 +270,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); @@ -832,10 +837,10 @@ PICO_INTERNAL void PicoMemSetup(void) int i; // by default, point everything to first 64k of ROM for (i = 0; i < M68K_FETCHBANK1 * 0xe0 / 0x100; i++) - PicoCpuFM68k.Fetch[i] = (unsigned long)Pico.rom - (i<<(24-FAMEC_FETCHBITS)); + PicoCpuFM68k.Fetch[i] = (uptr)Pico.rom - (i<<(24-FAMEC_FETCHBITS)); // now real ROM for (i = 0; i < M68K_FETCHBANK1 && (i<<(24-FAMEC_FETCHBITS)) < Pico.romsize; i++) - PicoCpuFM68k.Fetch[i] = (unsigned long)Pico.rom; + PicoCpuFM68k.Fetch[i] = (uptr)Pico.rom; // RAM already set } #endif