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.
60 cpu_emulate(cpu
.lcdc
);
65 /* This mess needs to be moved to another module; it's just here to
66 * make things work in the mean time. */
72 void *timer
= sys_timer();
80 while (R_LY
> 0 && R_LY
< 144)
88 delay
= framelen
- sys_elapsed(timer
);
94 if (framecount
) { if (!--framecount
) die("finished\n"); }
99 while (R_LY
> 0) /* wait for next frame */