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.
This commit is contained in:
parent
a6cc430409
commit
0271939835
20 changed files with 533 additions and 35 deletions
|
@ -1,8 +1,9 @@
|
|||
# $NetBSD: Makefile,v 1.1.1.1 2004/07/26 18:23:22 dillo Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2004/08/15 12:13:53 dillo Exp $
|
||||
#
|
||||
|
||||
DISTNAME= gens-rc3
|
||||
PKGNAME= gens-2.12rc3
|
||||
PKGREVISION= 1
|
||||
CATEGORIES= emulators
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gens/}
|
||||
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
$NetBSD: distinfo,v 1.1.1.1 2004/07/26 18:23:22 dillo Exp $
|
||||
$NetBSD: distinfo,v 1.2 2004/08/15 12:13:53 dillo Exp $
|
||||
|
||||
SHA1 (gens-rc3.tar.gz) = 6057564665007686c9ea8df364be3220499f9917
|
||||
Size (gens-rc3.tar.gz) = 658729 bytes
|
||||
SHA1 (patch-aa) = e6a4768963e9da1799b80e775f0637eb07b2ca5c
|
||||
SHA1 (patch-ab) = cb5e049b813016aec6cd7b4c67560953a04e5bc6
|
||||
SHA1 (patch-ab) = dd38b7ebcbadc0a3881397916c2444d4a2ac2e35
|
||||
SHA1 (patch-ac) = 7c3f17c59727365ff4cf11d1a5d1c3da19943872
|
||||
SHA1 (patch-ad) = dae2ad294272f18067a640d88286ddfeb7775aaf
|
||||
SHA1 (patch-ae) = 6902f4e2abd38b2dcd946309c1321a95c3ded2b4
|
||||
SHA1 (patch-af) = 5acae2a597166b3948a56bb24b712ea49d114c8d
|
||||
SHA1 (patch-ag) = d16015ffd9e2e2d33ed229dbaa41a18c44968f47
|
||||
SHA1 (patch-ah) = a72c19bb5a521f4c26604131ff4245be4968835d
|
||||
SHA1 (patch-af) = 6e641ec6c0ae7fad6997ce70b48d417e2ec7dfd7
|
||||
SHA1 (patch-ag) = a80a828b716e3b7e342fb52c583e18305be8c627
|
||||
SHA1 (patch-ah) = e8a6264b351c4a7fb3fb1bd4dd5a482dcef763ae
|
||||
SHA1 (patch-ai) = 596fe718e5c38091a06198413bcf29b3c668571f
|
||||
SHA1 (patch-aj) = 87d2f4001bf16469430d955d7e58ffe6316595af
|
||||
SHA1 (patch-ak) = 4b06340b3702dafea12d78841f379b5255a1a74f
|
||||
SHA1 (patch-aj) = 63b9832fde01884631923e16eb0f165815d0704f
|
||||
SHA1 (patch-ak) = fbf85318880857783cd98348af627b7c6e444382
|
||||
SHA1 (patch-am) = 3e49691329cdfaf60f89136d104ec5e87cd6e255
|
||||
SHA1 (patch-an) = 94a6a857238edbf3db0daea59400f5b13fc1ed2f
|
||||
SHA1 (patch-ao) = 04bbf581f156cf3f9f119295a00071f29c2b1ab7
|
||||
SHA1 (patch-ap) = 634fa5f851b06f09c0a511c65278c002944c29d4
|
||||
SHA1 (patch-aq) = af968fb3ce22aa147ac4b47d0739db45977eacf8
|
||||
SHA1 (patch-ar) = c97b6dfd255ca64f7a5efc02e2f6b0f4b39706ec
|
||||
SHA1 (patch-as) = 9ef67fd99afa9844127f5fbca9b8524e00864aee
|
||||
SHA1 (patch-at) = 37c78682d91516e0c757993ee29b61437f8e3496
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 @@
|
||||
+/*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
+}
|
||||
|
|
|
@ -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");
|
||||
|
|
25
emulators/gens/patches/patch-am
Normal file
25
emulators/gens/patches/patch-am
Normal file
|
@ -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);
|
22
emulators/gens/patches/patch-an
Normal file
22
emulators/gens/patches/patch-an
Normal file
|
@ -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 ();
|
||||
|
35
emulators/gens/patches/patch-ao
Normal file
35
emulators/gens/patches/patch-ao
Normal file
|
@ -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();}
|
15
emulators/gens/patches/patch-ap
Normal file
15
emulators/gens/patches/patch-ap
Normal file
|
@ -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);
|
||||
|
112
emulators/gens/patches/patch-aq
Normal file
112
emulators/gens/patches/patch-aq
Normal file
|
@ -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;
|
||||
+}
|
21
emulators/gens/patches/patch-ar
Normal file
21
emulators/gens/patches/patch-ar
Normal file
|
@ -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;
|
52
emulators/gens/patches/patch-as
Normal file
52
emulators/gens/patches/patch-as
Normal file
|
@ -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;
|
Loading…
Reference in a new issue