Skip to content

Use VBlank interrupt for Unbricked frame timing#188

Open
goodnamenotbad wants to merge 1 commit into
gbdev:masterfrom
goodnamenotbad:codex/use-vblank-interrupt-unbricked
Open

Use VBlank interrupt for Unbricked frame timing#188
goodnamenotbad wants to merge 1 commit into
gbdev:masterfrom
goodnamenotbad:codex/use-vblank-interrupt-unbricked

Conversation

@goodnamenotbad
Copy link
Copy Markdown

Fixes #157.

This updates the Unbricked examples so frame timing/main loops wait on the VBlank interrupt instead of busy-polling rLY.

Notes:

  • Simple examples enable IE_VBLANK and use halt via WaitForVBlank.
  • Serial-link examples also keep serial interrupts enabled, so they use a wVBlankDone flag to ignore serial wakeups while waiting for VBlank.
  • Startup LCD-off waits still use rLY, since those are one-time initialization waits rather than frame timing/main-loop control.

Verification:

  • git diff --check
  • Built selected Unbricked examples with RGBDS v1.0.1 on Windows: objects, functions, input, collision, bricks, bcd, audio, title-screen, serial-link.

@quinnyo
Copy link
Copy Markdown
Contributor

quinnyo commented May 11, 2026

Wow, you arrived slightly too late #187
How could this, in 2026, possibly happen?

By the way, What are the chances!

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

2 participants