gbdb,cpu,video: reduce number of calls to cycle functions
Instead of calling cpu_cycle() and video_cycle() once per emulated cycle, call cpu_cycle() once per emulated instruction. This should not have any obvious effects on the emulation (as currently written), because all of the memory reads and writes are done in the first "cycle" of the instruction. This patch results in a substantial performance gain (>100%, if I recall correctly).
This commit is contained in:
@@ -135,6 +135,6 @@ void lr35902_set_reg_8(struct lr35902_state *cpu,
|
||||
lr35902_regs_8 reg,
|
||||
uint8_t val);
|
||||
|
||||
void lr35902_cycle(struct lr35902_state *cpu);
|
||||
int lr35902_cycle(struct lr35902_state *cpu);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user