summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Oliver Stöneberg <oliverst@online.de>2015-03-17 14:10:24 +0100
committer Oliver Stöneberg <oliverst@online.de>2015-03-17 14:10:24 +0100
commit27460ff717057e70fb4e5b9a1044142ce139f324 (patch)
tree3b6bd7a22920cf4f39b1aece57001b6d71c7a75a
parent004c6ffa3738bb7a97e0fa6e90900002058fc446 (diff)
added command-line option -[no]dummywrite to create snaphots of each frame without writing them to a file [Oliver Stöneberg]
this is a dummy implementation of -aviwrite/-mngwrite and is used in testruns to detect e.g. palette issues. the dummy implementation greatly speed up testrun since it avoids the snapshot to file format conversions as well as the I/O operations
-rw-r--r--src/emu/emuopts.c1
-rw-r--r--src/emu/emuopts.h2
-rw-r--r--src/emu/video.c4
-rw-r--r--src/emu/video.h3
4 files changed, 9 insertions, 1 deletions
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index 0b3c785fd5d..7c1bd9560cb 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -68,6 +68,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_SNAPBILINEAR, "1", OPTION_BOOLEAN, "specify if the snapshot/movie should have bilinear filtering applied" },
{ OPTION_STATENAME, "%g", OPTION_STRING, "override of the default state subfolder naming; %g == gamename" },
{ OPTION_BURNIN, "0", OPTION_BOOLEAN, "create burn-in snapshots for each screen" },
+ { OPTION_DUMMYWRITE, "0", OPTION_BOOLEAN, "indicates if a snapshot should be created if each frame" },
// performance options
{ NULL, NULL, OPTION_HEADER, "CORE PERFORMANCE OPTIONS" },
diff --git a/src/emu/emuopts.h b/src/emu/emuopts.h
index 17deb586576..db71ccc5a7d 100644
--- a/src/emu/emuopts.h
+++ b/src/emu/emuopts.h
@@ -73,6 +73,7 @@ enum
#define OPTION_RECORD "record"
#define OPTION_MNGWRITE "mngwrite"
#define OPTION_AVIWRITE "aviwrite"
+#define OPTION_DUMMYWRITE "dummywrite"
#define OPTION_WAVWRITE "wavwrite"
#define OPTION_SNAPNAME "snapname"
#define OPTION_SNAPSIZE "snapsize"
@@ -241,6 +242,7 @@ public:
const char *record() const { return value(OPTION_RECORD); }
const char *mng_write() const { return value(OPTION_MNGWRITE); }
const char *avi_write() const { return value(OPTION_AVIWRITE); }
+ const char *dummy_write() const { return value(OPTION_DUMMYWRITE); }
const char *wav_write() const { return value(OPTION_WAVWRITE); }
const char *snap_name() const { return value(OPTION_SNAPNAME); }
const char *snap_size() const { return value(OPTION_SNAPSIZE); }
diff --git a/src/emu/video.c b/src/emu/video.c
index 2518bd101c0..13d2989704c 100644
--- a/src/emu/video.c
+++ b/src/emu/video.c
@@ -152,6 +152,8 @@ video_manager::video_manager(running_machine &machine)
filename = machine.options().avi_write();
if (filename[0] != 0)
begin_recording(filename, MF_AVI);
+
+ m_dummy_recording = machine.options().dummy_write();
// if no screens, create a periodic timer to drive updates
if (machine.first_screen() == NULL)
@@ -1232,7 +1234,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension)
void video_manager::record_frame()
{
// ignore if nothing to do
- if (m_mng_file == NULL && m_avi_file == NULL)
+ if (m_mng_file == NULL && m_avi_file == NULL && !m_dummy_recording)
return;
// start the profiler and get the current time
diff --git a/src/emu/video.h b/src/emu/video.h
index 5904b4c6c53..c5ca9c9e27b 100644
--- a/src/emu/video.h
+++ b/src/emu/video.h
@@ -176,6 +176,9 @@ private:
attotime m_avi_frame_period; // period of a single movie frame
attotime m_avi_next_frame_time; // time of next frame
UINT32 m_avi_frame; // current movie frame number
+
+ // movie recording - dummy
+ bool m_dummy_recording; // indicates if snapshot should be created of every frame
static const UINT8 s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS];