X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fdebug.c;h=26ec8628e0c033b88c91927051125184c0d2a63f;hb=4ea707e1e38b7ca204a5012f617018d0ea5eced2;hp=d81cf45a706314905c6070451348dcf114fd7ca3;hpb=6ccf5504a8feff61b89ceac71b669e7c5218ca8e;p=picodrive.git diff --git a/pico/debug.c b/pico/debug.c index d81cf45..26ec862 100644 --- a/pico/debug.c +++ b/pico/debug.c @@ -59,6 +59,36 @@ char *PDebugMain(void) return dstr; } +char *PDebug32x(void) +{ + char *dstrp = dstr; + unsigned short *r; + int i; + + r = Pico32x.regs; + sprintf(dstrp, "regs:\n"); MVP; + for (i = 0; i < 0x40/2; i += 8) { + sprintf(dstrp, "%02x: %04x %04x %04x %04x %04x %04x %04x %04x\n", + i*2, r[i+0], r[i+1], r[i+2], r[i+3], r[i+4], r[i+5], r[i+6], r[i+7]); MVP; + } + + i = 0; + r = Pico32x.vdp_regs; + sprintf(dstrp, "VDP regs:\n"); MVP; + sprintf(dstrp, "%02x: %04x %04x %04x %04x %04x %04x %04x %04x\n", + i*2, r[i+0], r[i+1], r[i+2], r[i+3], r[i+4], r[i+5], r[i+6], r[i+7]); MVP; + + sprintf(dstrp, " mSH2 sSH2\n"); MVP; + sprintf(dstrp, "PC,SR %08x, %03x %08x, %03x\n", sh2_pc(0), sh2_sr(0), sh2_pc(1), sh2_sr(1)); MVP; + for (i = 0; i < 16/2; i++) { + sprintf(dstrp, "R%d,%2d %08x,%08x %08x,%08x\n", i, i + 8, + sh2_reg(0,i), sh2_reg(0,i+8), sh2_reg(1,i), sh2_reg(1,i+8)); MVP; + } + sprintf(dstrp, "gb,vb %08x,%08x %08x,%08x\n", sh2_gbr(0), sh2_vbr(0), sh2_gbr(1), sh2_vbr(1)); + + return dstr; +} + char *PDebugSpriteList(void) { struct PicoVideo *pvid=&Pico.video; @@ -298,6 +328,14 @@ void PDebugDumpMem(void) dump_ram_noswab(Pico_mcd->pcm_ram,"dumps/pcm_ram.bin"); dump_ram_noswab(Pico_mcd->bram, "dumps/bram.bin"); } + + if (PicoAHW & PAHW_32X) + { + dump_ram(Pico32xMem->sdram, "dumps/sdram.bin"); + dump_ram(Pico32xMem->dram[0], "dumps/dram0.bin"); + dump_ram(Pico32xMem->dram[1], "dumps/dram1.bin"); + dump_ram(Pico32xMem->pal, "dumps/pal32x.bin"); + } } void PDebugZ80Frame(void)