Add on_snoop Lua callback
[lsnes.git] / framerate.hpp
blob60351ffbad14eb1577c1f2d13c8cf61fa329a888
1 #ifndef _framerate__hpp__included__
2 #define _framerate__hpp__included__
4 #include <cstdint>
6 /**
7 * \brief Nominal framerate of NTSC SNES.
8 */
9 #define FRAMERATE_SNES_NTSC (10738636.0/178683.0)
10 /**
11 * \brief Nominal framerate of PAL SNES.
13 #define FRAMERATE_SNES_PAL (322445.0/6448.0)
15 /**
16 * \brief Set the nominal framerate
18 * Sets the nominal frame rate. Framerate limiting tries to maintain the nominal framerate when there is no other
19 * explict framerate to maintain.
21 void set_nominal_framerate(double fps) throw();
23 /**
24 * \brief Get the current realized framerate.
26 * Returns the current realized framerate.
28 * \return The framerate the system is currently archiving.
30 double get_framerate() throw();
32 /**
33 * \brief ACK frame start.
35 * Acknowledge frame start for timing purposes.
37 * \param msec Current time.
39 void ack_frame_tick(uint64_t msec) throw();
41 /**
42 * \brief Obtain how long to wait for next frame.
44 * Computes the number of milliseconds to wait for next frame.
46 * \param msec Current time.
47 * \return Number of more milliseconds to wait.
49 uint64_t to_wait_frame(uint64_t msec) throw();
51 #endif