Skip to content

Implement HALT wakeup interrupt foundation#5

Merged
Sakery merged 5 commits into
mainfrom
feat/interrupt-foundation
May 16, 2026
Merged

Implement HALT wakeup interrupt foundation#5
Sakery merged 5 commits into
mainfrom
feat/interrupt-foundation

Conversation

@Sakery
Copy link
Copy Markdown
Owner

@Sakery Sakery commented May 16, 2026

Summary

Introduce a minimal interrupt wakeup foundation for the Z88 emulator.

This PR improves Z80 HALT behavior by allowing the CPU to wake from HALT when an interrupt request is received and interrupts are enabled.

The implementation intentionally avoids full Z80 interrupt mode handling for now and focuses on a small, safe, incremental foundation.

Changes

  • Implement proper HALT state handling
  • Add interrupt request mechanism to Cpu
  • Add minimal HALT wakeup path
  • Introduce CpuSnapshot-based state inspection
  • Improve CPU observability for future testing
  • Rewrite README with detailed technical documentation
  • Refine trace integration in z88headless

Current behavior

OZ now:

  • boots successfully
  • initializes BLINK
  • enters HALT idle loop
  • wakes correctly from simulated interrupt events
  • re-enters idle loop coherently

Notes

This is intentionally not a full interrupt implementation yet:

  • no IM1/IM2 support
  • no interrupt vectors
  • no stack push sequence
  • no hardware interrupt devices yet

The goal is to establish a stable behavioral foundation for future timer and hardware interrupt work.

Your Name and others added 5 commits May 16, 2026 11:01
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
@Sakery Sakery merged commit fa0312f into main May 16, 2026
2 checks passed
@Sakery Sakery deleted the feat/interrupt-foundation branch May 16, 2026 09:44
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

Successfully merging this pull request may close these issues.

1 participant