boytacean
boytacean copied to clipboard
Improve timing accuracy
Summary
- handle highest priority interrupt in CPU
- allow multiple mode transitions in PPU clock
- add regression tests for interrupt priority and long PPU clocks
Testing
-
cargo test
https://chatgpt.com/codex/tasks/task_e_684386833a308328af8ff1a47d939c72
Summary by CodeRabbit
-
Bug Fixes
- Improved interrupt handling to prioritize and service the highest priority interrupt when multiple interrupts occur simultaneously.
- Enhanced PPU timing to allow multiple mode transitions within a single update, ensuring accurate scanline and mode updates.
-
New Features
- Added support for HBlank DMA transfer.
-
Tests
- Added tests to verify interrupt prioritization and PPU behavior with large cycle counts.