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 > is printf available for arm7?

#129753 - Noda - Sat May 26, 2007 2:22 am

Hi,

is there a simple way to output text on the arm7?
I tried to init the console system via the arm9, then using printf() on the arm7, it compiles fines but doesn't show the text output of the arm7 :/

Is there a simple solution to this?

Thanks a lot!

BTW, how to transfer a simple data (like a single pointer) from arm9 to arm7? is there libnds function to do that? (I didn't find any...)

#129758 - relpats_eht - Sat May 26, 2007 4:04 am

As far as I know, printf does not work on the ARM7, as the ARM7 does not have access to VRAM; however, there is a VRAM mode which allows it to be read by the ARM7, but I do not recall it offhand. GBATek seems to be down right now, so providing further assistance in that subject would be outside the realms of my laziness.

There is no single libnds function to transfer data between the ARM9 and ARM7, to do this, you will either need to use FIFO, of which there are numerous materials to aid you, or you will need to write the data to a location in the RAM shared between the two processors.

[edit]
I found a mirror
VRAM configurations, note ARM7
RAM maps, note shared
FIFO (only definitions, not explanation)
_________________
- relpats_eht

#129768 - Noda - Sat May 26, 2007 11:07 am

Thanks a lot, but that means arm7 doesn't have access to 4Mb of RAM, so?
If that's the case, it sucks :(
I don't understand very the arm7 memory map, because on dstek the main 4mb of RAM seems available to arm7, where is located the working RAM of the arm7? when I do a malloc on arm7, is the heap located on the main 4Mb or in a special working ram?

Sorry to ask but I don't understand well that part of the arm7...

#129770 - Lick - Sat May 26, 2007 12:17 pm

Main RAM = 4MB
Video RAM = xxxKB

Only the ARM9 can access the VRAM (with exceptions though). Both processors can access the Main RAM, but it is recommended to use the FIFO for inter-processor communication.
DevKitARM has probably been configured to make 'malloc' calls on the ARM7 to make use of the WRAM. Normally all of the WRAM is given to the ARM7.

relpats_eht: I mirrored it as well, with a shorter url and gzip compression!
_________________
http://licklick.wordpress.com

#129865 - silent_code - Mon May 28, 2007 2:31 pm

i can't help you much here, but afaik there are two extra 64kb memory areas that can be switched between 7 and 9. check gbatek for that.
good luck!