What steps will reproduce the problem?
1. Create a Lua script that hooks memory execution and prints register values
2. Open a Gameboy game
3. Open trace logger
4. Compare trace logger PC and A values to those reported by the script
5. Be disappointed because they don't match
Cause (numbers refer to line numbers in libgambatte/cpu.cpp):
The reported variables (PC_ and A_) are copied before emulating a number of
cycles (491 & 495) and not updated until emulation finishes (2834 & 2838). As
such, calling CPU::GetRegs (2842) during emulation causes the wrong values to
be reported.
Original issue reported on code.google.com by Scepheo on 20 Jan 2015 at 4:03
Original issue reported on code.google.com by
Scepheo
on 20 Jan 2015 at 4:03