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

Freeze when WAIT line is asserted and Step to next instruction is clicked #22

Open
Calindro opened this issue Jan 11, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Calindro
Copy link

When the WAIT line is asserted and the "Step to next instruction" button is clicked, the whole application freezes.

@floooh
Copy link
Owner

floooh commented Jan 16, 2024

Ouch yeah, that's because I do something really stupid here which ends up as an infinite loop if the CPU doesn't make progress:

v6502r/src/sim.c

Lines 121 to 125 in bcedbdd

do {
prev_m1 = cpu_readM1(sim.cpu_state);
sim_step(1);
cur_m1 = cpu_readM1(sim.cpu_state);
} while (!(prev_m1 && !cur_m1)); // M1 pin is active-low!

Thanks for catching that, it will be a while until I get around fixing the issue though, I'm currently deep in other things.

@floooh floooh self-assigned this Jan 16, 2024
@floooh floooh added the bug Something isn't working label Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants