status update (rev 142) : arm7 print(), wifi, and time

12 views
Skip to first unread message

Salva Peiró

unread,
May 20, 2008, 8:11:19 AM5/20/08
to inferno-ds
Starting with rev 142 there's code to perform print() calls from the arm7.
Correctly speaking it's a simple sprint on the IPC memory,
after this the arm7 sends a fifo F7print message to notify the arm9
which in turn prints() the sprinted() string to the lcd.
It's meant to be a simple print, as the arm7 ram is 64Kb which should
include text+data+bss,
currently we're using around 30Kb (that's why it's simple and easy to
be excluded in the mkfile):
% ksize arm7/isds.p9
25992t + 512d + 1896b = 28400 arm7/isds.p9

I haven't seen this implemented on other homebrew projects,
which seems quite strange to me, as many of the devices of the ds are
exclusively controlled by the arm7:
wifi, rtc, audio, spi, ... being some examples, and it seems to me
very handy for the next steps: debugging.

Related to this, i've tossed (as a patch) some code from dslinux wifi
modified to compile on arm7/,
the main thing missing is to interface the arm7 wifi functions to the
arm9 using fifos/ipc.
I'll have a look to the inferno ports see what requirements are placed
to to write a working ethernds.c,
is there any simple ether*.c file i could start looking to get an idea
of what's needed?

i've found the cause of desmume getting stuck on fpi instructions: (see [1]),
the cause is that the emu doesn't generate a 'undefined instruction' exception,
instead it simply halts emulation so you have to press pause/execute
to resume execution.
I've put a patch [2] at downloads section that fixes this behaviour.

With this i can run `time`, which has some (real) calculations:

% time ls
chan
dev
dis
env
...
prog
usr
%g%l %g%r %g%t
%

I'd like to fix this as it would allow me to get some timings,
in order to see the effect of changes on performance.
This can be reproduced using desmume/bare ds with the .nds files
available for download

[1] inferno-ds with usable wm/wm under desmume (rev 62):
http://groups.google.com/group/inferno-ds/browse_thread/thread/2053198167d994aa
[2] http://inferno-ds.googlecode.com/files/desmume-undf.patch

--
salva

Salva Peiró

unread,
Jul 9, 2008, 3:24:07 PM7/9/08
to inferno-ds
On Tue, May 20, 2008 at 2:11 PM, Salva Peiró <saore...@gmail.com> wrote:
> Related to this, i've tossed (as a patch) some code from dslinux wifi
> modified to compile on arm7/,
> the main thing missing is to interface the arm7 wifi functions to the
> arm9 using fifos/ipc.
>
> I'll have a look to the inferno ports see what requirements are placed
> to to write a working ethernds.c,
> is there any simple ether*.c file i could start looking to get an idea
> of what's needed?
>

there's been some progress on this:
now there's some code to interface the arm7 wifi functions the from the arm9,
that is add the missing wifi fifo messages needed to communicate both cpus.

right now [rev 151] it's possible to perform wifi ap scans and read stats,
next steps will be: being able to associate to ap and tx/rx ethernet frames,
I hope the changes will be smooth as I'm keen to put my ds to
interesting things.

[rev 151] http://code.google.com/p/inferno-ds/source/detail?r=151
--
salva

Salva Peiró

unread,
Dec 6, 2008, 5:26:15 AM12/6/08
to inferno-ds
On Tue, May 20, 2008 at 1:11 PM, Salva Peiró <saore...@gmail.com> wrote:
> i've found the cause of desmume getting stuck on fpi instructions: (see [1]),
> the cause is that the emu doesn't generate a 'undefined instruction' exception,
> instead it simply halts emulation so you have to press pause/execute
> to resume execution.
> I've put a patch [2] at downloads section that fixes this behaviour.
>

the undefined instruction behaviour has been corrected in desmume:
http://desmume.svn.sourceforge.net/viewvc/desmume/trunk/desmume/src/arm_instructions.cpp?r1=1170&r2=1169&pathrev=1170

This means that the .nds images built of inferno-ds will run directly
on desmume,
including the .nds images in the downloads section:
http://code.google.com/p/inferno-ds/downloads

--
salva

Reply all
Reply to author
Forward
0 new messages