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
This commit is contained in:
Oliver Stöneberg 2015-03-17 14:10:24 +01:00
parent 004c6ffa37
commit 27460ff717
4 changed files with 9 additions and 1 deletions

View File

@ -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" },

View File

@ -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); }

View File

@ -153,6 +153,8 @@ video_manager::video_manager(running_machine &machine)
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

View File

@ -177,6 +177,9 @@ private:
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];
static const attoseconds_t ATTOSECONDS_PER_SPEED_UPDATE = ATTOSECONDS_PER_SECOND / 4;