tom-seddon / b2

BBC Micro emulator for Windows, OS X, and Linux
111 stars 12 forks source link

Request: Show 'cycles / time since last breakpoint' (in disassembly or breakpoints display) #171

Open VectorEyes opened 3 years ago

VectorEyes commented 3 years ago

When debugging cycle-accurate code it can be very useful to know how many 6502 cycles and also 'real time' (and possibly also CRTC cycles!) have elapsed between two bits of code executing. For example, it would be nice to confirm that a loop takes 128 'real world 2MHz' cycles by debugging it in B2, instead of carefully totting up the cycles for each instruction while you're editing the code. Especially helpful when you need to think about cycle-stretching etc.

One way to do this might be to have '2MHz cycles since last breakpoint' and '6502 cycles since last breakpoint' in an appropriate debug display panel. Perhaps each breakpoint could track how long it has been since it was hit and display in the breakpoints window? But really, anything that let you set a breakpoint, hit continue, and then know how long it had been since it was last hit, would work.

tom-seddon commented 2 months ago

See af30b15599ec8d13c263bb7522eceae4319200f1 and preceding commits