TASEmulators / BizHawk

BizHawk is a multi-system emulator written in C#. BizHawk provides nice features for casual gamers such as full screen, and joypad support in addition to full rerecording and debugging tools for all system cores.
http://tasvideos.org/BizHawk.html
Other
2.21k stars 385 forks source link

NesHawk: Tracelogger shows a 32 bit address when a branch wraps around address $FFFF #3963

Closed 100thCoin closed 4 months ago

100thCoin commented 4 months ago

Summary

If a branch instruction wraps around, either from $FFzz to $00zz, or from $00zz to $FFzz, the tracelogger incorrectly shows the destination of the branch as more than a 16 bit value.

TraceloggerBugExample

Repro

I created a custom cartridge for the purposes of reproducing this bug, (for the screenshot shared above) The source code just writes 0xF0 and 0xEC at address $0009 and $000A to form a branch that underflows, then takes a branch from address $FFF5 that overflows.