Closed simonowen closed 3 years ago
cpu.set_is_halted(false); cpu.set_iff1(false); cpu.set_pc(0); cpu.set_ir(0);
I think this misses resetting the decoder, so might run the first instruction as if it was DD/FD-prefixed. #29 hopefully nails it.
@simonowen Are we done with this?
Yes, I'm using it and it's working well -- thanks!
Many use cases are likely to want to perform a soft reset of the CPU core. Should there be a reset function to do the appropriate register/state initialisation?
I've been debugging a strange issue that caused the first reset to fail but a second one to succeed. I tracked it down to the CPU being halted (using
di;halt
) at the point of the reset. This was fixed by manually clearing the halted state in my own reset code.I'm now using:
Do you think that's enough to cover a reset, and could it be something I could call instead?