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 > Interprocessor communication

#162530 - RobinWatts - Thu Sep 04, 2008 12:44 pm

Hi all,

Am I right in thinking that only the ARM9 can write to files etc?

I've got my profiler working nicely on the ARM9, and it struck me that the same code would probably work perfectly on the ARM7 too - but that the ARM7 wouldn't be able to write it's data out.

So, maybe when I kick the profiler off on the ARM9, I should somehow communicate to the ARM7 to get it to run some code too, and likewise to transfer the data back at the end...

Does that sound feasible? Any pointers for docs or example code for this sort of thing?

Thanks,

Robin

#162535 - hacker013 - Thu Sep 04, 2008 4:46 pm

use FIFO. There is a FIFO library out but that is lib is complicated. But you can also make your own.
_________________
Website / Blog

Let the nds be with you.

#162537 - chuckstudios - Thu Sep 04, 2008 5:24 pm

hacker013 wrote:
use FIFO. There is a FIFO library out but that is lib is complicated. But you can also make your own.


If he wrote his own profiler, I doubt he'll find a FIFO library complicated. This is the only result for 'FIFO' in the first page of search results that looked useful.

#162545 - RobinWatts - Thu Sep 04, 2008 7:44 pm

hacker013 wrote:
use FIFO. There is a FIFO library out but that is lib is complicated. But you can also make your own.


My profiler is specific to libnds (it uses the functions in there to setup interrupts etc). The idea is that a user should have to make the minimum number of changes possible to their source to use the profiler. (Currently it's a call to start it at the beginning of the arm9 main, and a call to stop it at the end).

(If atexit worked, I could avoid having to have the stop call).

Ideally I'd like to extend it to profile the arm7 too, but as that can't write to disc, it'd need to communicate to the arm9. Given that this communication is required, it'd be nicest if starting/stopping the profiler on the arm9 started/stopped it automatically on the arm7.

As such I was hoping there might be some interprocessor communication built into libnds that I could piggy back on so it would work without upsetting any existing arm7 <-> arm9 communications.

If libnds doesn't have a standard inbuilt way of communicating that I can piggy back onto without requiring any changes to the arm7 or arm9 source that I'm profiling, then it seems like I'm going to have to think about alternative ways to achieve this.

Thanks,

Robin

#162552 - hacker013 - Thu Sep 04, 2008 8:47 pm

you can also use IPC
_________________
Website / Blog

Let the nds be with you.