13 static int framelen
= 16743;
14 static int framecount
;
16 rcvar_t emu_exports
[] =
18 RCV_INT("framelen", &framelen
),
19 RCV_INT("framecount", &framecount
),
36 * emu_reset is called to initialize the state of the emulated
37 * system. It should set cpu registers, hardware registers, etc. to
38 * their appropriate values at powerup time.
56 cpu_emulate(cpu
.lcdc
);
61 /* This mess needs to be moved to another module; it's just here to
62 * make things work in the mean time. */
68 void *timer
= sys_timer();
76 while (R_LY
> 0 && R_LY
< 144)
84 delay
= framelen
- sys_elapsed(timer
);
90 if (framecount
) { if (!--framecount
) die("finished\n"); }
95 while (R_LY
> 0) /* wait for next frame */