1 #include "rockmacros.h"
14 * emu_reset is called to initialize the state of the emulated
15 * system. It should set cpu registers, hardware registers, etc. to
16 * their appropriate values at powerup time.
28 static void emu_step(void)
30 cpu_emulate(cpu
.lcdc
);
33 /* This mess needs to be moved to another module; it's just here to
34 * make things work in the mean time. */
37 int framesin
=0,frames
=0,timeten
=*rb
->current_tick
, timehun
=*rb
->current_tick
;
42 #ifdef HAVE_ADJUSTABLE_CPU_FREQ
52 while (R_LY
> 0 && R_LY
< 144)
57 if (options
.sound
|| !plugbuf
)
69 while (R_LY
> 0) /* wait for next frame */
78 if(*rb
->current_tick
-timeten
>=10)
80 timeten
=*rb
->current_tick
;
81 if(framesin
<6) options
.frameskip
++;
82 if(framesin
>6) options
.frameskip
--;
83 if(options
.frameskip
>options
.maxskip
) options
.frameskip
=options
.maxskip
;
84 if(options
.frameskip
<0) options
.frameskip
=0;
89 if(*rb
->current_tick
-timehun
>=100)
93 timehun
=*rb
->current_tick
;
97 #ifdef HAVE_ADJUSTABLE_CPU_FREQ