static int gp2x_old_gamma = 100;\r
static unsigned char *movie_data = NULL;\r
static int movie_size = 0;\r
-static int frame_count = 0;\r
+int frame_count = 0;\r
unsigned char *framebuff = 0; // temporary buffer for alt renderer\r
int state_slot = 0;\r
\r
if(movie_data[0x14] == '6')\r
PicoOpt |= 0x20; // 6 button pad\r
else PicoOpt &= ~0x20;\r
+ PicoOpt |= 0x40; // accurate timing\r
if(movie_data[0xF] >= 'A') {\r
- //Pico.m.pal = movie_data[0x16] >> 7;\r
+ if(movie_data[0x16] & 0x80) {\r
+ PicoRegionOverride = 8;\r
+ } else {\r
+ PicoRegionOverride = 4;\r
+ }\r
+ PicoReset(0);\r
// TODO: bits 6 & 5\r
}\r
- strcpy(noticeMsg, "MOVIE LOADED");\r
+ movie_data[0x18+30] = 0;\r
+ sprintf(noticeMsg, "MOVIE: %s", (char *) &movie_data[0x18]);\r
}\r
else\r
{\r
updateKeys();\r
PicoFrame();\r
\r
+#if 0\r
+ // debug\r
+ {\r
+ static unsigned char oldscr[320*240*2];\r
+ FILE *f; char name[128]; int i;\r
+ for (i = 0; i < 320*240*2; i++)\r
+ if(oldscr[i] != ((unsigned char *)gp2x_screen)[i]) break;\r
+ if (i < 320*240*2)\r
+ {\r
+ for (i = 0; i < 320*240*2; i++)\r
+ oldscr[i] = ((unsigned char *)gp2x_screen)[i];\r
+ sprintf(name, "%05i.raw", frame_count);\r
+ f = fopen(name, "wb");\r
+ if (!f) { printf("!f\n"); exit(1); }\r
+ fwrite(gp2x_screen, 1, 320*240*2, f);\r
+ fclose(f);\r
+ }\r
+ }\r
+#endif\r
+\r
// check time\r
gettimeofday(&tval, 0);\r
if(thissec != tval.tv_sec) tval.tv_usec+=1000000;\r