gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

ASM > Register bank switch. Why don't work ?

#11520 - simnav - Thu Oct 09, 2003 9:08 am

Hi to everybody !
I'm trying to write data to user bank registers when I'm in IRQ mode with this instruction:

ldmfd sp,{r1-r12}^

This should pop data from IRQ stack and store them in registers of USR mode. Is it wrong ? I ask you this because what happens with VisualBoy Emulator+Insignt debugger is that data are stored int IRQ bank and not in USR mode.
I don't think that is a emulator problem but is a error of mine, but where is the error ?

Thank you in advance.
simnav.

#11524 - torne - Thu Oct 09, 2003 1:25 pm

Your instruction is right with ref. to the ARM manual. The only thing I can think of is that your assembler is broken; is it Goldroad? If it is, then that's probably the issue. =)

Try disassembling the code to make sure it has been assembled correctly? I can't think of any reason at all why it wouldn't work. Maybe try another emulator (use No$GBA if your code is multiboot as no$ seems to match hardware much better than VBA in my experience, though VBA has improved drastically). I'll give it a shot myself sometime later when I'm tinkering with interrupt code.

#11530 - tepples - Thu Oct 09, 2003 3:26 pm

torne wrote:
use No$GBA

It's no longer available from the author except to those who already have both $2000 and a publishing deal.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#11543 - torne - Thu Oct 09, 2003 11:58 pm

It's around on the 'net, and he specifically said it was OK to keep distributing existing unregistered copies under the original licence terms. He's just not hosting it any more.

#11598 - simnav - Mon Oct 13, 2003 7:51 am

I've found no$gba emulator in free edition but it don't work as Visual Boy Advance. I think that it's a mistake of mine but I can understand what is it !!! Probably I had to abort my multitasking project on GBA !!!! @!#!

Hi.
Simnav.