diff options
author | dillo <dillo> | 2004-08-15 12:13:53 +0000 |
---|---|---|
committer | dillo <dillo> | 2004-08-15 12:13:53 +0000 |
commit | 12a4468e7814859207953cce8c7b0e0e5c8e5b49 (patch) | |
tree | 58f3cc42ba83758de6b95854c78ec9e868f6e727 /emulators/gens/patches | |
parent | 9afa7d7479f00232555adefe79fc5274021f4f8b (diff) | |
download | pkgsrc-12a4468e7814859207953cce8c7b0e0e5c8e5b49.tar.gz |
Add support for playing back gmv movies (recording of previously
played game), based on
http://bisqwit.iki.fi/src/Gens212a-moviepatch-jyzero,bisqwit.gz
adapted to rc3 and cleaned up by me.
More information and movies can be found at
http://bisqwit.iki.fi/jutut/nesvideos/FrontPage.html
Bump PKGREVISION.
Diffstat (limited to 'emulators/gens/patches')
-rw-r--r-- | emulators/gens/patches/patch-aa | 2 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ab | 59 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ac | 2 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ad | 2 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ae | 2 | ||||
-rw-r--r-- | emulators/gens/patches/patch-af | 4 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ag | 4 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ah | 28 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ai | 2 | ||||
-rw-r--r-- | emulators/gens/patches/patch-aj | 114 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ak | 42 | ||||
-rw-r--r-- | emulators/gens/patches/patch-am | 25 | ||||
-rw-r--r-- | emulators/gens/patches/patch-an | 22 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ao | 35 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ap | 15 | ||||
-rw-r--r-- | emulators/gens/patches/patch-aq | 112 | ||||
-rw-r--r-- | emulators/gens/patches/patch-ar | 21 | ||||
-rw-r--r-- | emulators/gens/patches/patch-as | 52 |
18 files changed, 516 insertions, 27 deletions
diff --git a/emulators/gens/patches/patch-aa b/emulators/gens/patches/patch-aa index 0b1d78ecc95..bd6e38608ee 100644 --- a/emulators/gens/patches/patch-aa +++ b/emulators/gens/patches/patch-aa @@ -1,4 +1,4 @@ -$NetBSD: patch-aa,v 1.1.1.1 2004/07/26 18:23:22 dillo Exp $ +$NetBSD: patch-aa,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/Makefile.in.orig 2004-05-19 22:48:47.000000000 +0200 +++ src/gens/Makefile.in diff --git a/emulators/gens/patches/patch-ab b/emulators/gens/patches/patch-ab index e84b5c60f26..5e87d56e5a4 100644 --- a/emulators/gens/patches/patch-ab +++ b/emulators/gens/patches/patch-ab @@ -1,10 +1,38 @@ -$NetBSD: patch-ab,v 1.1.1.1 2004/07/26 18:23:23 dillo Exp $ +$NetBSD: patch-ab,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/gtkui/support.c.orig 2004-05-18 20:04:29.000000000 +0200 +++ src/gens/gtkui/support.c -@@ -783,12 +783,14 @@ addIsoFilter(GtkWidget* widget) +@@ -247,6 +247,7 @@ void + sync_gens_ui () + { + GtkWidget *vsync, *stretch, *sprite_limit, *perfect_synchro; ++ GtkWidget *play_movie; + GtkWidget *sram_size_0; + GtkWidget *sram_size[4]; + +@@ -277,6 +278,7 @@ sync_gens_ui () + stretch = lookup_widget (gens_window, "stretch"); + sprite_limit = lookup_widget (gens_window, "sprite_limit"); + perfect_synchro = lookup_widget (gens_window, "perfect_synchro"); ++ play_movie = lookup_widget(gens_window, "play_movie"); + + sram_size_0 = lookup_widget (gens_window, "none"); + sram_size[0] = lookup_widget (gens_window, "_8_kb"); +@@ -393,6 +395,8 @@ sync_gens_ui () + Sprite_Over); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (perfect_synchro), + SegaCD_Accurate); ++ gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (play_movie), ++ MoviePlaying); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (enable_sound), + Sound_Enable); + gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (stereo), +@@ -781,14 +785,16 @@ addIsoFilter(GtkWidget* widget) + { + GtkFileFilter* filter; // "SegaCD image file\0*.bin;*.iso;*.raw\0All files\0*.*\0\0" - const char* bin = "*.[bb][iI][nN]"; +- const char* bin = "*.[bb][iI][nN]"; ++ const char* bin = "*.[bB][iI][nN]"; const char* iso = "*.[iI][sS][oO]"; + const char* chd = "*.[cC][hH][dD]"; const char* raw = "*.[rR][aA][wW]"; @@ -17,7 +45,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2004/07/26 18:23:23 dillo Exp $ gtk_file_filter_add_pattern (filter, raw); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter); } -@@ -803,6 +805,7 @@ addRomsFilter(GtkWidget* widget) +@@ -803,6 +809,7 @@ addRomsFilter(GtkWidget* widget) const char* gen = "*.[gG][eE][nN]"; const char* _32x = "*.32[xX]"; const char* iso = "*.[iI][sS][oO]"; @@ -25,7 +53,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2004/07/26 18:23:23 dillo Exp $ const char* raw = "*.[rR][aA][wW]"; const char* zip = "*.[zZ][iI][pP]"; const char* gz ="*.[gG][zZ]"; -@@ -816,6 +819,7 @@ addRomsFilter(GtkWidget* widget) +@@ -816,6 +823,7 @@ addRomsFilter(GtkWidget* widget) gtk_file_filter_add_pattern (filter, gen); gtk_file_filter_add_pattern (filter, _32x); gtk_file_filter_add_pattern (filter, iso); @@ -33,7 +61,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2004/07/26 18:23:23 dillo Exp $ gtk_file_filter_add_pattern (filter, raw); gtk_file_filter_add_pattern (filter, zip); gtk_file_filter_add_pattern (filter, gz); -@@ -842,6 +846,7 @@ addRomsFilter(GtkWidget* widget) +@@ -842,6 +850,7 @@ addRomsFilter(GtkWidget* widget) filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, "SegaCD image"); gtk_file_filter_add_pattern (filter, iso); @@ -41,3 +69,22 @@ $NetBSD: patch-ab,v 1.1.1.1 2004/07/26 18:23:23 dillo Exp $ gtk_file_filter_add_pattern (filter, raw); gtk_file_filter_add_pattern (filter, bin); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter); +@@ -852,6 +861,18 @@ addRomsFilter(GtkWidget* widget) + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter); + } + ++void ++addGmvFilter(GtkWidget* widget) ++{ ++ GtkFileFilter* filter; ++ const char* gmv = "*.[gG][mM][vV]"; ++ ++ filter = gtk_file_filter_new (); ++ gtk_file_filter_set_name (filter, "gens movie file"); ++ gtk_file_filter_add_pattern (filter, gmv); ++ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (widget), filter); ++} ++ + GtkWidget* + create_file_chooser_dialog(const char* title, GtkFileChooserAction action) + { diff --git a/emulators/gens/patches/patch-ac b/emulators/gens/patches/patch-ac index f4cbadf9e79..355c7699f9b 100644 --- a/emulators/gens/patches/patch-ac +++ b/emulators/gens/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.1.1.1 2004/07/26 18:23:23 dillo Exp $ +$NetBSD: patch-ac,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/segacd/cd_aspi.c.orig 2004-05-18 22:34:00.000000000 +0200 +++ src/gens/segacd/cd_aspi.c diff --git a/emulators/gens/patches/patch-ad b/emulators/gens/patches/patch-ad index 094ada2d687..a72497da2b7 100644 --- a/emulators/gens/patches/patch-ad +++ b/emulators/gens/patches/patch-ad @@ -1,4 +1,4 @@ -$NetBSD: patch-ad,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-ad,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/segacd/cd_file.c.orig 2004-05-18 22:34:00.000000000 +0200 +++ src/gens/segacd/cd_file.c diff --git a/emulators/gens/patches/patch-ae b/emulators/gens/patches/patch-ae index ef7cba4e74e..0932f63e336 100644 --- a/emulators/gens/patches/patch-ae +++ b/emulators/gens/patches/patch-ae @@ -1,4 +1,4 @@ -$NetBSD: patch-ae,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-ae,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/segacd/cd_file.h.orig 2004-03-14 15:34:33.000000000 +0100 +++ src/gens/segacd/cd_file.h diff --git a/emulators/gens/patches/patch-af b/emulators/gens/patches/patch-af index 18500bba7f4..df10fec26bf 100644 --- a/emulators/gens/patches/patch-af +++ b/emulators/gens/patches/patch-af @@ -1,6 +1,6 @@ -$NetBSD: patch-af,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-af,v 1.2 2004/08/15 12:13:53 dillo Exp $ ---- src/gens/util/chd.c.orig 2004-06-25 19:55:16.000000000 +0200 +--- src/gens/util/chd.c.orig 2004-08-15 11:35:14.000000000 +0200 +++ src/gens/util/chd.c @@ -0,0 +1,400 @@ +/* diff --git a/emulators/gens/patches/patch-ag b/emulators/gens/patches/patch-ag index 07c28b62645..33da962b5c9 100644 --- a/emulators/gens/patches/patch-ag +++ b/emulators/gens/patches/patch-ag @@ -1,6 +1,6 @@ -$NetBSD: patch-ag,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-ag,v 1.2 2004/08/15 12:13:53 dillo Exp $ ---- src/gens/util/chd.h.orig 2004-06-25 19:55:16.000000000 +0200 +--- src/gens/util/chd.h.orig 2004-08-15 11:35:14.000000000 +0200 +++ src/gens/util/chd.h @@ -0,0 +1,94 @@ +#ifndef HAD_CHD_H diff --git a/emulators/gens/patches/patch-ah b/emulators/gens/patches/patch-ah index d333f9252a7..0ba4e635e86 100644 --- a/emulators/gens/patches/patch-ah +++ b/emulators/gens/patches/patch-ah @@ -1,4 +1,4 @@ -$NetBSD: patch-ah,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-ah,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/util/rom.c.orig 2004-05-18 22:33:59.000000000 +0200 +++ src/gens/util/rom.c @@ -38,14 +38,28 @@ $NetBSD: patch-ah,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ else { strcpy (zname, Name); -@@ -402,6 +417,10 @@ Get_Rom () - filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); +@@ -389,7 +404,7 @@ Get_Rom () + GtkWidget *widget; + gint res; + char Name[2048]; +- gchar *filename; ++ gchar *filename = NULL; + int sys; + + widget = +@@ -403,9 +418,12 @@ Get_Rom () } gtk_widget_destroy (widget); -+ if (res != GTK_RESPONSE_OK) + +- strncpy (Name, filename, 2048); +- g_free (filename); +- Free_Rom (Game); ++ if (filename) + { -+ return; ++ strncpy (Name, filename, 2048); ++ g_free (filename); ++ Free_Rom (Game); + } - strncpy (Name, filename, 2048); - g_free (filename); + sys = Detect_Format (Name); + diff --git a/emulators/gens/patches/patch-ai b/emulators/gens/patches/patch-ai index cfdfaa171b4..e7a66ab6d74 100644 --- a/emulators/gens/patches/patch-ai +++ b/emulators/gens/patches/patch-ai @@ -1,4 +1,4 @@ -$NetBSD: patch-ai,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-ai,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/util/unzip.h.orig 2004-03-14 15:33:14.000000000 +0100 +++ src/gens/util/unzip.h diff --git a/emulators/gens/patches/patch-aj b/emulators/gens/patches/patch-aj index 600dad1e217..5cc421e14f2 100644 --- a/emulators/gens/patches/patch-aj +++ b/emulators/gens/patches/patch-aj @@ -1,8 +1,32 @@ -$NetBSD: patch-aj,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ +$NetBSD: patch-aj,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/emulator/g_main.c.orig 2004-05-18 22:34:00.000000000 +0200 +++ src/gens/emulator/g_main.c -@@ -394,6 +394,13 @@ update_SDL_events () +@@ -55,6 +55,23 @@ int Intro_Style = 2; + int SegaCD_Accurate = 0; + int Kaillera_Client_Running = 0; + ++int NbRerecord=0; ++char MovieFileName[1024]; ++int MoviePlaying=0; ++int FrameCount=0; ++unsigned MovieLastFrame=0; ++ ++FILE *MovieFile; ++ ++struct type_MovieFrame ++{ ++ char P1; ++ char P2; ++ char PX; ++}; ++ ++struct type_MovieFrame *MovieData = NULL; ++ + static int Gens_Running = 0; + + void +@@ -394,6 +411,13 @@ update_SDL_events () break; @@ -16,7 +40,7 @@ $NetBSD: patch-aj,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ case SDLK_v: if (KMOD_CTRL & mod) { -@@ -429,14 +436,14 @@ update_SDL_events () +@@ -429,14 +453,14 @@ update_SDL_events () case SDL_JOYAXISMOTION: if (event.jaxis.axis < 2) { @@ -33,3 +57,87 @@ $NetBSD: patch-aj,v 1.1.1.1 2004/07/26 18:23:25 dillo Exp $ { joystate[0x100 * event.jaxis.which + ((event.jaxis.axis == 0) ? 0x4 : 0x2)] = 1; +@@ -850,3 +874,83 @@ Build_Language_String (void) + + return (0); + } ++ ++void PlayMovie() ++{ ++ if(MoviePlaying) { ++ StopMovie(); ++ return; ++ } ++ if(Change_File_L_MV(MovieFileName, State_Dir)==0) ++ return; ++ if (Genesis_Started) ++ { ++ Reset_Genesis(); ++ } ++ else if (_32X_Started) ++ { ++ Reset_32X(); ++ } ++ FrameCount=0; ++ if(LoadMovieFromFile(MovieFile,MovieFileName)==0) ++ return; ++ MESSAGE_NUM_L("Playing movie from start: %d rerecords","Playing movie from start: %d rerecords",NbRerecord,1500); ++ MoviePlaying=1; ++} ++ ++int LoadMovieFromFile(FILE *MovieFile,char* FileName) ++{ ++ MovieFile=fopen(FileName,"r+b"); ++ if(MovieFile==NULL) ++ { ++ MESSAGE_L("Error loading movie:disk error","Error loading movie:disk error", 2000); ++ return 0; ++ } ++ ++ fseek(MovieFile,0,SEEK_END); ++ MovieLastFrame=(ftell(MovieFile)-64)/3; ++ ++ MovieData = malloc(sizeof(struct type_MovieFrame)*MovieLastFrame); ++ if(!MovieData) ++ { ++ MESSAGE_L("Memory error allocating movie", "Memory error allocating movie", 2000); ++ return 0; ++ } ++ fseek(MovieFile,64,SEEK_SET); ++ ++ if(fread(MovieData, sizeof(*MovieData), MovieLastFrame, MovieFile) < MovieLastFrame) ++ { ++ MESSAGE_L("Error loading movie:file read","Error loading movie:file read", 2000); ++ return 0; ++ } ++ ++ fseek(MovieFile,16,SEEK_SET); ++ fread((char*)&NbRerecord,sizeof(NbRerecord),1,MovieFile); ++ ++ fclose(MovieFile); ++ MovieFile=NULL; ++ ++ return 1; ++} ++void ReadInMovie(unsigned frame, char *p1, char *p2, char *px) ++{ ++ if(frame>MovieLastFrame) ++ { ++ MESSAGE_NUM_L("Overflow error reading frame : %d","Overflow error reading frame : %d",frame,2000); ++ return; ++ } ++ *p1=MovieData[frame].P1; ++ *p2=MovieData[frame].P2; ++ *px=MovieData[frame].PX; ++} ++ ++void ++StopMovie(void) ++{ ++ if (!MoviePlaying) ++ return; ++ ++ MoviePlaying = 0; ++ free(MovieData); ++ MovieData = NULL; ++} diff --git a/emulators/gens/patches/patch-ak b/emulators/gens/patches/patch-ak index b4add7f97d9..57c601eaf11 100644 --- a/emulators/gens/patches/patch-ak +++ b/emulators/gens/patches/patch-ak @@ -1,8 +1,16 @@ -$NetBSD: patch-ak,v 1.1.1.1 2004/07/26 18:23:22 dillo Exp $ +$NetBSD: patch-ak,v 1.2 2004/08/15 12:13:53 dillo Exp $ --- src/gens/gtkui/glade/interface.c.orig 2004-05-19 21:49:28.000000000 +0200 +++ src/gens/gtkui/glade/interface.c -@@ -486,10 +486,13 @@ create_gens_window (void) +@@ -159,6 +159,7 @@ create_gens_window (void) + GtkWidget *reset_z80; + GtkWidget *separator8; + GtkWidget *perfect_synchro; ++ GtkWidget *play_movie; + GtkWidget *item8; + GtkWidget *image2798; + GtkWidget *item8_menu; +@@ -486,10 +487,13 @@ create_gens_window (void) gtk_container_add (GTK_CONTAINER (item15_menu), separator16); gtk_widget_set_sensitive (separator16, FALSE); @@ -17,3 +25,33 @@ $NetBSD: patch-ak,v 1.1.1.1 2004/07/26 18:23:22 dillo Exp $ image2789 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU); gtk_widget_set_name (image2789, "image2789"); +@@ -966,6 +970,11 @@ create_gens_window (void) + gtk_widget_show (perfect_synchro); + gtk_container_add (GTK_CONTAINER (menuitem3_menu), perfect_synchro); + ++ play_movie = gtk_check_menu_item_new_with_mnemonic ("Play Movie"); ++ gtk_widget_set_name (play_movie, "play_movie"); ++ gtk_widget_show (play_movie); ++ gtk_container_add (GTK_CONTAINER (menuitem3_menu), play_movie); ++ + item8 = gtk_image_menu_item_new_with_mnemonic ("Sound"); + gtk_widget_set_name (item8, "item8"); + gtk_widget_show (item8); +@@ -1498,6 +1507,9 @@ create_gens_window (void) + g_signal_connect ((gpointer) perfect_synchro, "activate", + G_CALLBACK (on_perfect_synchro_activate), + NULL); ++ g_signal_connect ((gpointer) play_movie, "activate", ++ G_CALLBACK (on_play_movie_activate), ++ NULL); + g_signal_connect ((gpointer) enable_sound, "activate", + G_CALLBACK (on_enable_sound_activate), + NULL); +@@ -1713,6 +1725,7 @@ create_gens_window (void) + GLADE_HOOKUP_OBJECT (gens_window, reset_z80, "reset_z80"); + GLADE_HOOKUP_OBJECT (gens_window, separator8, "separator8"); + GLADE_HOOKUP_OBJECT (gens_window, perfect_synchro, "perfect_synchro"); ++ GLADE_HOOKUP_OBJECT (gens_window, play_movie, "play_movie"); + GLADE_HOOKUP_OBJECT (gens_window, item8, "item8"); + GLADE_HOOKUP_OBJECT (gens_window, image2798, "image2798"); + GLADE_HOOKUP_OBJECT (gens_window, item8_menu, "item8_menu"); diff --git a/emulators/gens/patches/patch-am b/emulators/gens/patches/patch-am new file mode 100644 index 00000000000..ec864a4b887 --- /dev/null +++ b/emulators/gens/patches/patch-am @@ -0,0 +1,25 @@ +$NetBSD: patch-am,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/emulator/g_main.h.orig 2004-04-15 22:22:49.000000000 +0200 ++++ src/gens/emulator/g_main.h +@@ -21,6 +21,9 @@ extern int Country_Order[3]; + extern int Kaillera_Client_Running; + extern int Intro_Style; + extern int SegaCD_Accurate; ++extern int MoviePlaying; ++extern int FrameCount; ++extern unsigned MovieLastFrame; + extern int Active; + + extern POINT Window_Pos; +@@ -41,6 +44,10 @@ void SetWindowText(const char *text); + int Set_Render(int Full, int Num, int Force); + int Change_68K_Type(int hWnd, int Num, int Reset_SND); + //extern void Read_To_68K_Space(int adr); ++int LoadMovieFromFile(FILE *MovieFile,char* FileName); ++void PlayMovie(void); ++void StopMovie(void); ++void ReadInMovie(unsigned frame, char *p1, char *p2, char *px); + + void End_All(void); + void Sleep(int i); diff --git a/emulators/gens/patches/patch-an b/emulators/gens/patches/patch-an new file mode 100644 index 00000000000..5a9adb1f309 --- /dev/null +++ b/emulators/gens/patches/patch-an @@ -0,0 +1,22 @@ +$NetBSD: patch-an,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/emulator/gens.c.orig 2004-05-18 22:34:00.000000000 +0200 ++++ src/gens/emulator/gens.c +@@ -2424,7 +2424,7 @@ Init_SegaCD (char *iso_name) + Z80_Reset (); + Reset_VDP (); + LC89510_Reset (); +- Init_RS_GFX (); ++ //Init_RS_GFX (); /* XXX: why? */ + + if (CPU_Mode) + { +@@ -2545,7 +2545,7 @@ Reset_SegaCD () + Z80_Reset (); + LC89510_Reset (); + Reset_VDP (); +- Init_RS_GFX (); ++ //Init_RS_GFX (); /* XXX: why? */ + Reset_PCM (); + YM2612_Reset (); + diff --git a/emulators/gens/patches/patch-ao b/emulators/gens/patches/patch-ao new file mode 100644 index 00000000000..2b5d89da7a3 --- /dev/null +++ b/emulators/gens/patches/patch-ao @@ -0,0 +1,35 @@ +$NetBSD: patch-ao,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/gtkui/glade/callbacks.c.orig 2004-05-18 22:36:26.000000000 +0200 ++++ src/gens/gtkui/glade/callbacks.c +@@ -49,7 +49,10 @@ on_open_rom_activate ( + // if ((Check_If_Kaillera_Running())) return 0; + if (GYM_Playing) Stop_Play_GYM(); + if (Get_Rom() != -1) ++ { ++ StopMovie(); + sync_gens_ui(); ++ } + } + + +@@ -64,6 +67,7 @@ on_close_rom_activate ( + if (Full_Screen) Set_Render( 0, -1, 1); + } + Free_Rom(Game); ++ StopMovie(); + } + + +@@ -480,6 +484,11 @@ on_perfect_synchro_activate ( + {Change_SegaCD_Synchro();} + + void ++on_play_movie_activate (GtkMenuItem *menuitem, ++ gpointer user_data) ++{PlayMovie();} ++ ++void + on_enable_sound_activate (GtkMenuItem *menuitem, + gpointer user_data) + {Change_Sound();} diff --git a/emulators/gens/patches/patch-ap b/emulators/gens/patches/patch-ap new file mode 100644 index 00000000000..9cfa62e7214 --- /dev/null +++ b/emulators/gens/patches/patch-ap @@ -0,0 +1,15 @@ +$NetBSD: patch-ap,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/gtkui/glade/callbacks.h.orig 2004-03-14 15:33:41.000000000 +0100 ++++ src/gens/gtkui/glade/callbacks.h +@@ -93,6 +93,10 @@ on_vsync_activate ( + gpointer user_data); + + void ++on_play_movie_activate (GtkMenuItem *menuitem, ++ gpointer user_data); ++ ++void + on_stretch_activate (GtkMenuItem *menuitem, + gpointer user_data); + diff --git a/emulators/gens/patches/patch-aq b/emulators/gens/patches/patch-aq new file mode 100644 index 00000000000..36597893820 --- /dev/null +++ b/emulators/gens/patches/patch-aq @@ -0,0 +1,112 @@ +$NetBSD: patch-aq,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/sdllayer/g_sdldraw.c.orig 2004-08-15 11:46:04.000000000 +0200 ++++ src/gens/sdllayer/g_sdldraw.c +@@ -462,7 +462,11 @@ Update_Emulation (void) + Write_Sound_Buffer (NULL); + } + +- Update_Controllers (); ++ if (MoviePlaying) ++ MoviePlayingStuff(); ++ else ++ Update_Controllers(); ++ FrameCount++; + + if (Frame_Number++ < Frame_Skip) + { +@@ -487,7 +491,12 @@ Update_Emulation (void) + //{ + Write_Sound_Buffer (NULL); + //WP = (WP + 1) & (Sound_Segs - 1); +- Update_Controllers (); ++ if (MoviePlaying) ++ MoviePlayingStuff(); ++ else ++ Update_Controllers(); ++ FrameCount++; ++ + + //if (WP != RP) + //{ +@@ -518,13 +527,21 @@ Update_Emulation (void) + + for (; Frame_Number > 1; Frame_Number--) + { +- Update_Controllers (); ++ if (MoviePlaying) ++ MoviePlayingStuff(); ++ else ++ Update_Controllers(); ++ FrameCount++; + Update_Frame_Fast (); + } + + if (Frame_Number) + { +- Update_Controllers (); ++ if (MoviePlaying) ++ MoviePlayingStuff(); ++ else ++ Update_Controllers(); ++ FrameCount++; + Update_Frame (); + Flip (); + } +@@ -540,7 +557,12 @@ Update_Emulation (void) + int + Update_Emulation_One (void) + { +- Update_Controllers (); ++ if (MoviePlaying) ++ MoviePlayingStuff(); ++ else ++ Update_Controllers(); ++ FrameCount++; ++ + Update_Frame (); + Flip (); + +@@ -686,3 +708,42 @@ Take_Shot () + surface->h, surface->w * 2); + return 0; + } ++ ++void ++MoviePlayingStuff() ++{ ++ char PadData[3]; //Modif ++ ++ if(FrameCount >= MovieLastFrame) ++ { ++ MoviePlaying=0; ++ sprintf(Str_Tmp, "Movie finished", Current_State); ++ Put_Info(Str_Tmp, 2000); ++ return; ++ } ++ ReadInMovie(FrameCount,&PadData[0],&PadData[1],&PadData[2]); ++ Controller_1_Up=(PadData[0]&1); ++ Controller_1_Down=(PadData[0]&2)>>1; ++ Controller_1_Left=(PadData[0]&4)>>2; ++ Controller_1_Right=(PadData[0]&8)>>3; ++ Controller_1_A=(PadData[0]&16)>>4; ++ Controller_1_B=(PadData[0]&32)>>5; ++ Controller_1_C=(PadData[0]&64)>>6; ++ Controller_1_Start=(PadData[0]&128)>>7; ++ Controller_2_Up=(PadData[1]&1); ++ Controller_2_Down=(PadData[1]&2)>>1; ++ Controller_2_Left=(PadData[1]&4)>>2; ++ Controller_2_Right=(PadData[1]&8)>>3; ++ Controller_2_A=(PadData[1]&16)>>4; ++ Controller_2_B=(PadData[1]&32)>>5; ++ Controller_2_C=(PadData[1]&64)>>6; ++ Controller_2_Start=(PadData[1]&128)>>7; ++ Controller_1_X=(PadData[2]&1); ++ Controller_1_Y=(PadData[2]&2)>>1; ++ Controller_1_Z=(PadData[2]&4)>>2; ++ Controller_1_Mode=(PadData[2]&8)>>3; ++ Controller_2_X=(PadData[2]&16)>>4; ++ Controller_2_Y=(PadData[2]&32)>>5; ++ Controller_2_Z=(PadData[2]&64)>>6; ++ Controller_2_Mode=(PadData[2]&128)>>7; ++} diff --git a/emulators/gens/patches/patch-ar b/emulators/gens/patches/patch-ar new file mode 100644 index 00000000000..0880f97ce12 --- /dev/null +++ b/emulators/gens/patches/patch-ar @@ -0,0 +1,21 @@ +$NetBSD: patch-ar,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/sdllayer/g_sdldraw.h.orig 2004-03-14 15:34:21.000000000 +0100 ++++ src/gens/sdllayer/g_sdldraw.h +@@ -4,6 +4,8 @@ + #include <time.h> + #include <SDL.h> + ++#include "io.h" ++ + extern clock_t Last_Time; + extern clock_t New_Time; + extern clock_t Used_Time; +@@ -40,6 +42,7 @@ int Show_Genesis_Screen(void); + int Flip(void); + void Restore_Primary(void); + int Take_Shot(); ++void MoviePlayingStuff(); + void End_DDraw(void); + void Put_Info(char *,int); + extern SDL_Surface *surface; diff --git a/emulators/gens/patches/patch-as b/emulators/gens/patches/patch-as new file mode 100644 index 00000000000..61b8d44df2c --- /dev/null +++ b/emulators/gens/patches/patch-as @@ -0,0 +1,52 @@ +$NetBSD: patch-as,v 1.1 2004/08/15 12:13:53 dillo Exp $ + +--- src/gens/util/save.c.orig 2004-05-18 22:33:59.000000000 +0200 ++++ src/gens/util/save.c +@@ -101,8 +101,8 @@ Change_File_L (char *Dest, char *Dir) + + if (filename) + { +- g_free (filename); + strcpy (Dest, filename); ++ g_free (filename); + return 1; + } + return 0; +@@ -130,8 +130,37 @@ Change_File_L_CD (char *Dest, char *Dir) + + if (filename) + { ++ strcpy (Dest, filename); + g_free (filename); ++ return 1; ++ } ++ return 0; ++} ++ ++int ++Change_File_L_MV (char *Dest, char *Dir) ++{ ++ ++ gchar *filename = NULL; ++ GtkWidget *widget; ++ gint res; ++ widget = ++ create_file_chooser_dialog ("Load gens movie file", ++ GTK_FILE_CHOOSER_ACTION_OPEN); ++ addGmvFilter (widget); ++// fileselection_set_dir (fd.filesel, Rom_Dir); ++ /* addStateFilter (widget); */ ++ res = gtk_dialog_run (GTK_DIALOG (widget)); ++ if (res == GTK_RESPONSE_OK) ++ { ++ filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); ++ } ++ gtk_widget_destroy (widget); ++ ++ if (filename) ++ { + strcpy (Dest, filename); ++ g_free (filename); + return 1; + } + return 0; |