From 27460ff717057e70fb4e5b9a1044142ce139f324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20St=C3=B6neberg?= Date: Tue, 17 Mar 2015 14:10:24 +0100 Subject: [PATCH] =?UTF-8?q?added=20command-line=20option=20-[no]dummywrite?= =?UTF-8?q?=20to=20create=20snaphots=20of=20each=20frame=20without=20writi?= =?UTF-8?q?ng=20them=20to=20a=20file=20[Oliver=20St=C3=B6neberg]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/emu/emuopts.c | 1 + src/emu/emuopts.h | 2 ++ src/emu/video.c | 4 +++- src/emu/video.h | 3 +++ 4 files changed, 9 insertions(+), 1 deletion(-) 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];