#include <mygba.h> // HAM header #include <hel.h> // HEL header u8 g_NewFrame=TRUE; // VBL function void VblFunc(void) { g_NewFrame=TRUE; } int main(void) { // Init HAM, setup bg mode, integrated textsystem // and start vbl interrupt ham_Init(); ham_SetBgMode(0); ham_InitText(0); ham_SetTextCol(1, 0); ham_StartIntHandler(INT_TYPE_VBL, (void*)VblFunc); // Initialize HEL's pad system hel_PadInit(); while(1) { if(g_NewFrame) { // Read currect pad state hel_PadReadState(); // Check pad button if(hel_Pad.Held.A) ham_DrawText(2, 2, "A button held "); else ham_DrawText(2, 2, "Press a button"); g_NewFrame=FALSE; } } return 0; }
ADD_LIBS += $(GCCARM)/lib/libhel.a