Skip to content

Instantly share code, notes, and snippets.

@nathanpc
Created June 18, 2011 15:52
Show Gist options
  • Save nathanpc/1033206 to your computer and use it in GitHub Desktop.
Save nathanpc/1033206 to your computer and use it in GitHub Desktop.
Waiting For The VBlank Refresh At GameBoy Advance
ldr r0,=#0x4000006 @ VBlank memory address
waitVBlank:
ldrh r1, [r0] @ Loads the memory address to the r1 register
cmp r1, #161 @ Compare if the memory address have completed the VBlank
bne waitVBlank @ Loopback until r1 != 161
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment