floooh / v6502r

visual6502 remixed
297 stars 30 forks source link

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

Open Calindro opened 5 months ago

Calindro commented 5 months ago

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

floooh commented 5 months ago

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:

https://github.com/floooh/v6502r/blob/bcedbdd9269459f8b58989877b688d494cdf3018/src/sim.c#L121-L125

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