deltabeard / Peanut-GB

A Game Boy (DMG) emulator single header library written in C99. Performance is prioritised over accuracy.
https://projects.deltabeard.com/peanutgb/
283 stars 40 forks source link

Fix TIMA Issue #43

Closed froggestspirit closed 4 years ago

froggestspirit commented 4 years ago

The test for cpu instruction timing failed. It turns out if the TAC is set to the fastest speed, TIMA can increment more than once with a single instruction. Changing the "if" to a "while" fixes this. It should not have to run the loop more than 2 times.

deltabeard commented 4 years ago

Thank you!