Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
the "new" operator...   Message List  
Reply | Forward Message #6746 of 15019 |
Interrupt problem solved (more info...)

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;
}





Wed Sep 5, 2001 3:36 am

gimbel@...
Send Email Send Email

Forward
Message #6746 of 15019 |
Expand Messages Author Sort by Date

Hi, I'm a newbie gba programmer. I have just had some knowledge about gba hardware and now I'm trying to write sample C++ programmes to learn about gba...
Galip
galip_kartoglu@...
Send Email
Aug 21, 2001
11:10 am

Hi, ro-base = read-only base address rw-base = read-write base address These addresses directly set internal variables, in turn, these internal variables are...
Vince 0x0f
vince_0x0f@...
Send Email
Aug 21, 2001
2:33 pm

well, the "-ro base" defines where the "ReadOnly" area starts and "-rw base" is where the "ReadWrite" starts, this just informs the compiler where to store...
Daniel Rogowsky
hpram99@...
Send Email
Aug 23, 2001
11:57 pm

Hi, I'm trying to process my interrupts through a C handler. I can successfully setup an interrupt and my C handler is called. The problem is that my function...
Gimbel Baxter
gimbel@...
Send Email
Aug 24, 2001
3:44 am

For anyone else having problems... My crt0.s started as "crt0.S v1.25 by Jeff Frohwein". I'm sure this code works in its original form, however I could not get...
Gimbel Baxter
gimbel@...
Send Email
Aug 26, 2001
12:14 am

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...
Gimbel Baxter
gimbel@...
Send Email
Sep 5, 2001
3:55 am

... successfully ... my ... the ... freezes ... VBlank). ... locks, after ... a "normal" sub-routine should exit with MOV PC, R14 BUT an interrupthandler...
ph0x@...
Send Email
Aug 26, 2001
4:02 pm

Hello ph0x, pfh> a "normal" sub-routine should exit with MOV PC, R14 pfh> BUT an interrupthandler should exit with SUBS PC,R14_irq,#4 pfh> thus adding the...
groepaz
groepaz@...
Send Email
Aug 26, 2001
7:08 pm

The bios code already does what you suggest, i.e. returns with SUBS PC,R14_irq,#4, so therefore my code does not need to do that. If you look at my most recent...
Gimbel Baxter
gimbel@...
Send Email
Aug 26, 2001
7:08 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help