Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent state after step back to the beginning #21

Open
Calindro opened this issue Jan 11, 2024 · 1 comment
Open

Inconsistent state after step back to the beginning #21

Calindro opened this issue Jan 11, 2024 · 1 comment

Comments

@Calindro
Copy link

Calindro commented Jan 11, 2024

When stepping back to the beginning in visualz80r, there seems to be some inconsistency.

I hadn't seen the Reset button before so I stepped back to the beginning via the step back buttons instead. This has led to some kind of inconsistent state where all registers display as 0000 and all checkmarks get ticked. Then, after stepping 2 half-cycles, suddenly all values change at once.

Steps to reproduce:
Reset
Step half-cycle
Step back half-cycle

@floooh
Copy link
Owner

floooh commented Jan 28, 2024

Hmm, the step-back functionality is implemented by going back to a previous snapshot of the entire node state.

v6502r/src/trace.c

Lines 666 to 675 in bcedbdd

// load the previous trace item into the simulator and pop it from the trace log
bool trace_revert_to_previous(void) {
assert(trace.valid);
if (trace_num_items() < 1) {
return false;
}
load_item(trace_to_ring_index(1));
ring_pop();
return true;
}

Maybe there's some confusion when the step-back hits the first entry...

I won't have time to work on v6502r stuff anytime soon. But in any case many thanks for the bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants