SECTION "LCD controller status interrupt", ROM0[$0048]
|
|
;; HACK!!!!!!!!!!!!!
|
|
;; there's some sort of bug in the emulator which needs to be fixed,
|
|
;; which screws up the program counter immediately after it exits a halt.
|
|
;; this nop protects against that for now.
|
|
nop
|
|
jp isr_wrapper
|
|
|
|
SECTION "vblank", ROM0[$40]
|
|
|
|
handle_vblank:
|
|
reti
|
|
|
|
SECTION "interrupt routines", ROM0
|
|
|
|
_interrupts_disable::
|
|
di
|
|
ret
|
|
|
|
_interrupts_enable::
|
|
ei
|
|
ret
|
|
|
|
SECTION "hUGE ISR", ROM0
|
|
|
|
isr_wrapper:
|
|
ld a, [_game_state]
|
|
cp 0
|
|
jr nz, .done
|
|
push af
|
|
push hl
|
|
push bc
|
|
push de
|
|
call hUGE_dosound
|
|
pop de
|
|
pop bc
|
|
pop hl
|
|
pop af
|
|
.done:
|
|
reti
|