1 #ifndef _emustatus__hpp__included__
2 #define _emustatus__hpp__included__
8 #include "library/command.hpp"
9 #include "library/triplebuffer.hpp"
13 class voice_commentary
;
14 class emulator_runmode
;
18 class framerate_regulator
;
19 class controller_state
;
20 class multitrack_edit
;
24 class emulator_dispatch
;
28 const static int pause_none
; //pause: No pause.
29 const static int pause_normal
; //pause: Normal pause.
30 const static int pause_break
; //pause: Break pause.
31 const static uint64_t subframe_savepoint
; //subframe: Point of save.
32 const static uint64_t subframe_video
; //subframe: Point of video output.
35 bool movie_valid
; //The movie state variables are valid?
36 uint64_t curframe
; //Current frame number.
37 uint64_t length
; //Movie length.
38 uint64_t lag
; //Lag counter.
39 uint64_t subframe
; //Subframe number.
40 bool dumping
; //Video dump active.
41 unsigned speed
; //Speed%
42 bool saveslot_valid
; //Save slot number/info valid.
43 uint64_t saveslot
; //Save slot number.
44 std::u32string slotinfo
; //Save slot info.
45 bool branch_valid
; //Branch info valid?
46 std::u32string branch
; //Current branch.
47 bool mbranch_valid
; //Movie branch info valid?
48 std::u32string mbranch
; //Current movie branch.
49 std::u32string macros
; //Currently active macros.
50 int pause
; //Pause mode.
51 char mode
; //Movie mode: C:Corrupt, R:Readwrite, P:Readonly, F:Finished.
52 bool rtc_valid
; //RTC time valid?
53 std::u32string rtc
; //RTC time.
54 std::vector
<std::u32string
> inputs
; //Input display.
55 std::map
<std::string
, std::u32string
> mvars
; //Memory watches.
56 std::map
<std::string
, std::u32string
> lvars
; //Lua variables.
61 slotinfo_cache(movie_logic
& _mlogic
, command::group
& _cmd
);
62 std::string
get(const std::string
& _filename
);
63 void flush(const std::string
& _filename
);
66 std::map
<std::string
, std::string
> cache
;
69 command::_fnptr
<> flushcmd
;
75 status_updater(project_state
& _project
, movie_logic
& _mlogic
, voice_commentary
& _commentary
,
76 triplebuffer::triplebuffer
<_lsnes_status
>& _status
, emulator_runmode
& _runmode
, master_dumper
& _mdumper
,
77 save_jukebox
& _jukebox
, slotinfo_cache
& _slotcache
, framerate_regulator
& _framerate
,
78 controller_state
& _controls
, multitrack_edit
& _mteditor
, lua_state
& _lua2
, loaded_rom
& _rom
,
79 memwatch_set
& _mwatch
, emulator_dispatch
& _dispatch
);
82 project_state
& project
;
84 voice_commentary
& commentary
;
85 triplebuffer::triplebuffer
<_lsnes_status
>& status
;
86 emulator_runmode
& runmode
;
87 master_dumper
& mdumper
;
88 save_jukebox
& jukebox
;
89 slotinfo_cache
& slotcache
;
90 framerate_regulator
& framerate
;
91 controller_state
& controls
;
92 multitrack_edit
& mteditor
;
96 emulator_dispatch
& dispatch
;