You could take a look to my gba and/or nds port. I have resolved issues like that, so you could save alot of time