17 static int framelen
= 16743;
18 static int framecount
;
20 rcvar_t emu_exports
[] =
22 RCV_INT("framelen", &framelen
, ""),
23 RCV_INT("framecount", &framecount
, ""),
40 * emu_reset is called to initialize the state of the emulated
41 * system. It should set cpu registers, hardware registers, etc. to
42 * their appropriate values at powerup time.
61 cpu_emulate(cpu
.lcdc
);
66 /* This mess needs to be moved to another module; it's just here to
67 * make things work in the mean time. */
73 void *timer
= sys_timer();
81 while (R_LY
> 0 && R_LY
< 144)
89 delay
= framelen
- sys_elapsed(timer
);
95 if (framecount
) { if (!--framecount
) die("finished\n"); }
100 while (R_LY
> 0) /* wait for next frame */