sprite animation testing
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
508B

  1. ;--------------------
  2. ; Video Subroutines
  3. ;--------------------
  4. SECTION "VBlank Int", ROM0[$40]
  5. ld a, 1
  6. ld [hVBlankFlag], a
  7. reti
  8. SECTION "Vid Subs", ROM0
  9. Wait_VBlank::
  10. ld hl, hVBlankFlag ; hl=pointer to vblank_flag
  11. .wait: ; wait...
  12. halt ; suspend CPU - wait for ANY interrupt
  13. nop
  14. xor a
  15. cp a,[hl] ; vblank flag still zero?
  16. jr z, .wait ; wait more if zero
  17. ld [hl],a ; set vblank_flag back to zero
  18. ret