17 static int framelen
= 16743;
18 static int framecount
;
21 rcvar_t emu_exports
[] =
23 RCV_INT("framelen", &framelen
, ""),
24 RCV_INT("framecount", &framecount
, ""),
30 void emu_pause(int dopause
) {
34 int emu_paused(void) {
45 * emu_reset is called to initialize the state of the emulated
46 * system. It should set cpu registers, hardware registers, etc. to
47 * their appropriate values at powerup time.
66 cpu_emulate(cpu
.lcdc
);
71 /* This mess needs to be moved to another module; it's just here to
72 * make things work in the mean time. */
78 void *timer
= sys_timer();
86 while (R_LY
> 0 && R_LY
< 144)
94 delay
= framelen
- sys_elapsed(timer
);
101 if (framecount
) { if (!--framecount
) die("finished\n"); }
102 if (!(R_LCDC
& 0x80))
105 while (R_LY
> 0) /* wait for next frame */