mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
trying to add movie support
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@3 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
cc68a136aa
commit
4f67228034
6 changed files with 215 additions and 107 deletions
|
@ -55,7 +55,7 @@ static int combo_keys = 0, combo_acts = 0; // keys and actions which need button
|
|||
static int gp2x_old_gamma = 100;
|
||||
static unsigned char *movie_data = NULL;
|
||||
static int movie_size = 0;
|
||||
static int frame_count = 0;
|
||||
int frame_count = 0;
|
||||
unsigned char *framebuff = 0; // temporary buffer for alt renderer
|
||||
int state_slot = 0;
|
||||
|
||||
|
@ -219,11 +219,18 @@ int emu_ReloadRom(void)
|
|||
if(movie_data[0x14] == '6')
|
||||
PicoOpt |= 0x20; // 6 button pad
|
||||
else PicoOpt &= ~0x20;
|
||||
PicoOpt |= 0x40; // accurate timing
|
||||
if(movie_data[0xF] >= 'A') {
|
||||
//Pico.m.pal = movie_data[0x16] >> 7;
|
||||
if(movie_data[0x16] & 0x80) {
|
||||
PicoRegionOverride = 8;
|
||||
} else {
|
||||
PicoRegionOverride = 4;
|
||||
}
|
||||
PicoReset(0);
|
||||
// TODO: bits 6 & 5
|
||||
}
|
||||
strcpy(noticeMsg, "MOVIE LOADED");
|
||||
movie_data[0x18+30] = 0;
|
||||
sprintf(noticeMsg, "MOVIE: %s", (char *) &movie_data[0x18]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -988,6 +995,26 @@ void emu_Loop(void)
|
|||
updateKeys();
|
||||
PicoFrame();
|
||||
|
||||
#if 0
|
||||
// debug
|
||||
{
|
||||
static unsigned char oldscr[320*240*2];
|
||||
FILE *f; char name[128]; int i;
|
||||
for (i = 0; i < 320*240*2; i++)
|
||||
if(oldscr[i] != ((unsigned char *)gp2x_screen)[i]) break;
|
||||
if (i < 320*240*2)
|
||||
{
|
||||
for (i = 0; i < 320*240*2; i++)
|
||||
oldscr[i] = ((unsigned char *)gp2x_screen)[i];
|
||||
sprintf(name, "%05i.raw", frame_count);
|
||||
f = fopen(name, "wb");
|
||||
if (!f) { printf("!f\n"); exit(1); }
|
||||
fwrite(gp2x_screen, 1, 320*240*2, f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// check time
|
||||
gettimeofday(&tval, 0);
|
||||
if(thissec != tval.tv_sec) tval.tv_usec+=1000000;
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
// pico.c
|
||||
#define CAN_HANDLE_240_LINES 1
|
||||
|
||||
#define dprintf(f,...) printf(f"\n",##__VA_ARGS__)
|
||||
extern int frame_count;
|
||||
|
||||
#define dprintf(f,...) printf("%05i: " f "\n",frame_count,##__VA_ARGS__)
|
||||
//#define dprintf(x...)
|
||||
|
||||
#endif //PORT_CONFIG_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue