Subject: RE: [gbadev] Interrupt problem solved
It turns out I still had problems with my interrupt code. Seemingly calling
a wait vertical blank further up the call stack would cause problems. Here
is a fix for the earlier interrupt code...
vblank:
ldr a1, =g_test
mov r2, #1
str r2, [a1]
ldr r0, =Interrupt__Handler
bx r0
Instead of this:
stmfd sp!, {lr}
bl Interrupt__Handler
ldmfd sp!, {lr}
In addition to the assembler change, you need to reenable interrupts in your
C function. At the end use something like:
void Interrupt__Handler(void)
{
//Game__UpdateCritical(&g_Game);
IME = 0x0001;
}