3 #include "core/emucore.hpp"
4 #include "core/misc.hpp"
5 #include "core/movie.hpp"
6 #include "core/rom.hpp"
14 movie_logic::movie_logic() throw()
18 movie
& movie_logic::get_movie() throw()
23 long movie_logic::new_frame_starting(bool dont_poll
) throw(std::bad_alloc
, std::runtime_error
)
26 controller_frame c
= update_controls(false);
27 if(!mov
.readonly_mode()) {
31 if(c
.axis3(0, 0, 1)) {
32 long hi
= c
.axis3(0, 0, 2);
33 long lo
= c
.axis3(0, 0, 3);
34 mov
.commit_reset(hi
* 10000 + lo
);
38 return mov
.get_reset_status();
41 short movie_logic::input_poll(unsigned port
, unsigned dev
, unsigned id
) throw(std::bad_alloc
, std::runtime_error
)
43 if(!mov
.get_DRDY(port
, dev
, id
)) {
44 mov
.set_controls(update_controls(true));
47 int16_t in
= mov
.next_input(port
, dev
, id
);
48 //std::cerr << "BSNES asking for (" << port << "," << dev << "," << id << ") (frame "
49 // << mov.get_current_frame() << ") giving " << in << std::endl;