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.

DS development > Who can give an example showing communication between CPUS?

#74748 - swzte - Tue Mar 07, 2006 8:09 am

AS we all know, DS has two CPUs(one is ARM7 and the other is ARM9).Who can talk something about the communication?The follow is my way, but it doesn't work well?

I allocate two memories(256 bytes each) at 0x027ff000, one for ARM9 writing and the other for ARM7 writing.
First , when KEY_A is pressed, ARM9 change the record at 0x027ff000.

ARM7 is waiting for VBlank_interrupt.When ARM7 enters VBlank_interrupt, ARM7 check the record at 0x027ff000. If the record changes ,ARM7 change the record at 0x027ff100.

Second, when KEY_B is pressed, ARM9 read the record at 0x027ff100.

I press KEY_A and KEY_B,but the record at 0x027ff100 is always the same.Namely, ARM7 never change the record at 0x027ff100. Anything wrong with my program? Who can give some advice?
Thanks a lot!