-// This is part of Pico Library\r
+// PicoDrive\r
\r
// (c) Copyright 2004 Dave, All rights reserved.\r
-// (c) Copyright 2006 notaz, All rights reserved.\r
+// (c) Copyright 2006-2008 notaz, All rights reserved.\r
// Free for non-commercial use.\r
\r
// For commercial use, separate licencing terms must be obtained.\r
\r
void (*PicoWriteSound)(int len) = NULL; // called at the best time to send sound buffer (PsndOut) to hardware\r
void (*PicoResetHook)(void) = NULL;\r
-void (*PicoLineHook)(int count) = NULL;\r
+void (*PicoLineHook)(void) = NULL;\r
\r
// to be called once on emu init\r
void PicoInit(void)\r
#elif defined(EMU_M68K)\r
SekCycleCnt+=m68k_execute(cyc_do);\r
#elif defined(EMU_F68K)\r
- SekCycleCnt+=fm68k_emulate(cyc_do+1, 0);\r
+ SekCycleCnt+=fm68k_emulate(cyc_do+1, 0, 0);\r
#endif\r
}\r
\r
}\r
\r
\r
+// TODO: rm from Sek.c+asm too\r
int idle_hit_counter = 0;\r
\r
void PicoFrame(void)\r
{\r
-#if 0\r
+#if 1\r
if ((Pico.m.frame_count&0x3f) == 0) {\r
elprintf(EL_STATUS, "ihits: %i", idle_hit_counter);\r
idle_hit_counter = 0;\r
static char dstr[1024];\r
struct PicoVideo *pv=&Pico.video;\r
unsigned char *reg=pv->reg, r;\r
+ extern int HighPreSpr[];\r
+ int i, sprites_lo, sprites_hi;\r
char *dstrp;\r
\r
+ sprites_lo = sprites_hi = 0;\r
+ for (i = 0; HighPreSpr[i] != 0; i+=2)\r
+ if (HighPreSpr[i+1] & 0x8000)\r
+ sprites_hi++;\r
+ else sprites_lo++;\r
+\r
dstrp = dstr;\r
- sprintf(dstrp, "mode set 1: %02x\n", (r=reg[0])); dstrp+=strlen(dstrp);\r
+ sprintf(dstrp, "mode set 1: %02x spr lo: %2i, spr hi: %2i\n", (r=reg[0]), sprites_lo, sprites_hi);\r
+ dstrp+=strlen(dstrp);\r
sprintf(dstrp, "display_disable: %i, M3: %i, palette: %i, ?, hints: %i\n", bit(r,0), bit(r,1), bit(r,2), bit(r,4));\r
dstrp+=strlen(dstrp);\r
- sprintf(dstrp, "mode set 2: %02x\n", (r=reg[1])); dstrp+=strlen(dstrp);\r
+ sprintf(dstrp, "mode set 2: %02x hcnt: %i\n", (r=reg[1]), pv->reg[10]); dstrp+=strlen(dstrp);\r
sprintf(dstrp, "SMS/gen: %i, pal: %i, dma: %i, vints: %i, disp: %i, TMS: %i\n", bit(r,2), bit(r,3), bit(r,4),\r
bit(r,5), bit(r,6), bit(r,7)); dstrp+=strlen(dstrp);\r
sprintf(dstrp, "mode set 3: %02x\n", (r=reg[0xB])); dstrp+=strlen(dstrp);\r