X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=Pico%2FPico%2FMemory.c;h=8c4674b59651549f8cb5a1a357edd2921e01cbe0;hb=4936aac1cac5db9c8a0bec2d743d05be5c799f1f;hp=ff2a15f6226e56852e8852b07fcd3ad3132e630b;hpb=fa22af4cafc6a87a3d9da07f377fc93e6a3bf55d;p=picodrive.git diff --git a/Pico/Pico/Memory.c b/Pico/Pico/Memory.c index ff2a15f..8c4674b 100644 --- a/Pico/Pico/Memory.c +++ b/Pico/Pico/Memory.c @@ -34,7 +34,7 @@ static u32 PicoReadPico8(u32 a) case 0x01: d = PicoPicohw.r1; break; case 0x03: d = PicoPad[0]&0x1f; // d-pad - d |= (PicoPad[0]&0x20) << 2; // red button -> C + d |= (PicoPad[0]&0x20) << 2; // pen push -> C d = ~d; break; @@ -110,7 +110,6 @@ end: // ----------------------------------------------------------------- // Write Ram - /* void dump(u16 w) { @@ -118,6 +117,7 @@ void dump(u16 w) char fname[32]; int num = PicoPicohw.r12 & 0xf; + w = (w << 8) | (w >> 8); sprintf(fname, "ldump%i.bin", num); if (f[num] == NULL) f[num] = fopen(fname, "wb"); @@ -159,7 +159,7 @@ static void PicoWritePico16(u32 a,u16 d) a&=0xfffffe; if ((a&0xfffff0)==0xc00000) { PicoVideoWrite(a,(u16)d); return; } // VDP -// if (a == 0x800010) dump(d); + //if (a == 0x800010) dump(d); if (a == 0x800010) { PicoPicohw.fifo_bytes += 2; @@ -262,5 +262,15 @@ PICO_INTERNAL void PicoMemSetupPico(void) pm68k_read_memory_pcr_16 = m68k_read_memory_pcrp_16; pm68k_read_memory_pcr_32 = m68k_read_memory_pcrp_32; #endif +#ifdef EMU_F68K + // use standard setup, only override handlers + PicoMemSetup(); + PicoCpuFM68k.read_byte =PicoReadPico8; + PicoCpuFM68k.read_word =PicoReadPico16; + PicoCpuFM68k.read_long =PicoReadPico32; + PicoCpuFM68k.write_byte=PicoWritePico8; + PicoCpuFM68k.write_word=PicoWritePico16; + PicoCpuFM68k.write_long=PicoWritePico32; +#endif }