Skip to content

Add VBlank interrupt lesson#189

Open
renatomoraesp wants to merge 1 commit into
gbdev:masterfrom
renatomoraesp:bounty-157-vblank-interrupt-lesson
Open

Add VBlank interrupt lesson#189
renatomoraesp wants to merge 1 commit into
gbdev:masterfrom
renatomoraesp:bounty-157-vblank-interrupt-lesson

Conversation

@renatomoraesp
Copy link
Copy Markdown

What changed

  • Added a new Part II lesson, "VBlank Interrupts".
  • Added an Unbricked example that uses a VBlank interrupt handler at $0040.
  • Replaced the main-loop scanline busy-wait with a WaitForVBlank routine that sleeps with halt until the VBlank interrupt sets a flag.

Fixes #157

Testing

  • git diff --check
  • rg -n "[ \\t]+$" src/SUMMARY.md src/part2/vblank-interrupts.md unbricked/vblank-interrupts/main.asm unbricked/vblank-interrupts/build.sh unbricked/vblank-interrupts/hardware.inc
  • docker run --rm --platform linux/amd64 --mount "type=bind,source=$(pwd),target=/workspace" -w /workspace/unbricked/vblank-interrupts ghcr.io/gbdev/rgbds:v1.0.1 bash build.sh
  • Ran the project mdBook build in Docker. The custom and HTML backends rendered the new page; the final optional linkcheck backend failed because the project image did not include mdbook-linkcheck.

Notes

This introduces interrupt-based frame timing but does not add shadow OAM or OAM DMA yet; the lesson calls that out as a follow-up step.

The implementation was AI-assisted and human-reviewed.

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.

Unbricked doesn't use the VBlank interrupt

1 participant