lol its in c
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.

40 lines
690 B

2 years ago
2 years ago
  1. SECTION "LCD controller status interrupt", ROM0[$0048]
  2. ;; HACK!!!!!!!!!!!!!
  3. ;; there's some sort of bug in the emulator which needs to be fixed,
  4. ;; which screws up the program counter immediately after it exits a halt.
  5. ;; this nop protects against that for now.
  6. nop
  7. jp isr_wrapper
  8. SECTION "vblank", ROM0[$40]
  9. handle_vblank:
  10. reti
  11. SECTION "interrupt routines", ROM0
  12. _interrupts_disable::
  13. di
  14. ret
  15. _interrupts_enable::
  16. ei
  17. ret
  18. SECTION "hUGE ISR", ROM0
  19. isr_wrapper:
  20. ld a, [_game_state]
  21. cp 0
  22. jr nz, .done
  23. push af
  24. push hl
  25. push bc
  26. push de
  27. call hUGE_dosound
  28. pop de
  29. pop bc
  30. pop hl
  31. pop af
  32. .done:
  33. reti