-#if 1\r
- static char dstr[1024];\r
- unsigned char *reg=Pico.video.reg, r;\r
-\r
- // dump some info\r
- sprintf(dstr, "mode set 1: %02x\n", (r=reg[0]));\r
- sprintf(dstr, "%sdisplay_disable: %i, M3: %i, palette: %i, ?, hints: %i\n\n", dstr, bit(r,0), bit(r,1), bit(r,2), bit(r,4));\r
- sprintf(dstr, "%smode set 2: %02x\n", dstr, (r=reg[1]));\r
- sprintf(dstr, "%sSMS/genesis: %i, pal: %i, dma: %i, vints: %i, disp: %i, TMS9918: %i\n\n",dstr, bit(r,2), bit(r,3), bit(r,4), bit(r,5), bit(r,6), bit(r,7));\r
- sprintf(dstr, "%smode set 3: %02x\n", dstr, (r=reg[0xB]));\r
- sprintf(dstr, "%sLSCR: %i, HSCR: %i, 2cell vscroll: %i, IE2: %i\n\n", dstr, bit(r,0), bit(r,1), bit(r,2), bit(r,3));\r
- sprintf(dstr, "%smode set 4: %02x\n", dstr, (r=reg[0xC]));\r
- sprintf(dstr, "%sinterlace: %i%i; cells: %i; shadow: %i\n\n", dstr, bit(r,2), bit(r,1), (r&0x80) ? 40 : 32, bit(r,3));\r
- sprintf(dstr, "%sscroll size: w: %i; h: %i\n\n", dstr, reg[0x10]&3, (reg[0x10]&0x30)>>4);\r
- sprintf(dstr, "%sSRAM: det: %i; eeprom: %i\n", dstr, bit(Pico.m.sram_reg, 4), bit(Pico.m.sram_reg, 2));\r
- sprintf(dstr, "%sCPU state: PC: %06x cycles: %i\n", dstr, SekPc, SekCyclesDoneT());\r
-#ifdef EMU_C68K\r
- for(r=0; r < 8; r++)\r
- sprintf(dstr, "%sd%i=%08x, a%i=%08x\n", dstr, r, PicoCpu.d[r], r, PicoCpu.a[r]);\r
-#endif\r
- z80_debug(dstr);\r
-\r
-#else\r
- struct PicoVideo *pvid=&Pico.video;\r
- int table=0;\r
- int i,u,n,link=0;\r
- static char dstr[1024*8];\r
- dstr[0] = 0;\r
-\r
- table=pvid->reg[5]&0x7f;\r
- if (pvid->reg[12]&1) table&=0x7e; // Lowest bit 0 in 40-cell mode\r
- table<<=8; // Get sprite table address/2\r
-\r
- for (i=u=n=0; u < 80 && n < 20; u++)\r