Previous 199869 Revisions Next

r36457 Tuesday 17th March, 2015 at 13:10:24 UTC by Oliver Stöneberg
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
[src/emu]emuopts.c emuopts.h video.c video.h

trunk/src/emu/emuopts.c
r244968r244969
6868   { OPTION_SNAPBILINEAR,                               "1",         OPTION_BOOLEAN,    "specify if the snapshot/movie should have bilinear filtering applied" },
6969   { OPTION_STATENAME,                                  "%g",        OPTION_STRING,     "override of the default state subfolder naming; %g == gamename" },
7070   { OPTION_BURNIN,                                     "0",         OPTION_BOOLEAN,    "create burn-in snapshots for each screen" },
71   { OPTION_DUMMYWRITE,                                 "0",         OPTION_BOOLEAN,    "indicates if a snapshot should be created if each frame" },
7172
7273   // performance options
7374   { NULL,                                              NULL,        OPTION_HEADER,     "CORE PERFORMANCE OPTIONS" },
trunk/src/emu/emuopts.h
r244968r244969
7373#define OPTION_RECORD               "record"
7474#define OPTION_MNGWRITE             "mngwrite"
7575#define OPTION_AVIWRITE             "aviwrite"
76#define OPTION_DUMMYWRITE           "dummywrite"
7677#define OPTION_WAVWRITE             "wavwrite"
7778#define OPTION_SNAPNAME             "snapname"
7879#define OPTION_SNAPSIZE             "snapsize"
r244968r244969
241242   const char *record() const { return value(OPTION_RECORD); }
242243   const char *mng_write() const { return value(OPTION_MNGWRITE); }
243244   const char *avi_write() const { return value(OPTION_AVIWRITE); }
245   const char *dummy_write() const { return value(OPTION_DUMMYWRITE); }
244246   const char *wav_write() const { return value(OPTION_WAVWRITE); }
245247   const char *snap_name() const { return value(OPTION_SNAPNAME); }
246248   const char *snap_size() const { return value(OPTION_SNAPSIZE); }
trunk/src/emu/video.c
r244968r244969
152152   filename = machine.options().avi_write();
153153   if (filename[0] != 0)
154154      begin_recording(filename, MF_AVI);
155   
156   m_dummy_recording = machine.options().dummy_write();
155157
156158   // if no screens, create a periodic timer to drive updates
157159   if (machine.first_screen() == NULL)
r244968r244969
12321234void video_manager::record_frame()
12331235{
12341236   // ignore if nothing to do
1235   if (m_mng_file == NULL && m_avi_file == NULL)
1237   if (m_mng_file == NULL && m_avi_file == NULL && !m_dummy_recording)
12361238      return;
12371239
12381240   // start the profiler and get the current time
trunk/src/emu/video.h
r244968r244969
176176   attotime            m_avi_frame_period;         // period of a single movie frame
177177   attotime            m_avi_next_frame_time;      // time of next frame
178178   UINT32              m_avi_frame;                // current movie frame number
179   
180   // movie recording - dummy
181   bool            m_dummy_recording;         // indicates if snapshot should be created of every frame
179182
180183   static const UINT8      s_skiptable[FRAMESKIP_LEVELS][FRAMESKIP_LEVELS];
181184


Previous 199869 Revisions Next


© 1997-2024 The MAME Team