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

How to exit halted state (using python interface)? #65

Open
mortenjc opened this issue Dec 2, 2024 · 2 comments
Open

How to exit halted state (using python interface)? #65

mortenjc opened this issue Dec 2, 2024 · 2 comments

Comments

@mortenjc
Copy link

mortenjc commented Dec 2, 2024

Hi

I am working on yet another old microcomputer from the 70s. It uses the halt instruction to
wait for interrupts.

I try to fake the interrupt by storing the current PC on the and then adjust the PC to point to the
interrupt address.

This does not seem to work. Presumable the emulator needs to be informed to leave the halt
state?

Is there any example for how to fake an interrupt (to simulate external hardware)?

Cheers

Morten

@kosarev
Copy link
Owner

kosarev commented Dec 2, 2024

Hi Morten, a1fc0e2 makes the Z80Machine.halted field writable, so now it should be possible to exit the halted mode by setting the field to be false. The commit adds an example that does exactly that.

@mortenjc
Copy link
Author

mortenjc commented Dec 3, 2024

Hey,

That was quick.

It seems to work fine!

Thanks
Morten

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

No branches or pull requests

2 participants