Running published NDS files on DS

7 views
Skip to first unread message

macrod

unread,
May 25, 2008, 9:52:36 PM5/25/08
to inferno-ds
I have a PassMe card that I was able to take ids-r98.nds from the
download section and run without any problem. Unfortunately, the
latest release (isds-r136.nds) in the downloads doesn't work and just
freezes. I don't have any mechanism to determine where it's failing
(at least none that I know about) so can't offer any more details.

My ultimate goal is to generate and run my own NDS file. Right now I'm
able to compile my own NDS file but it's failing similar to r136
mentioned above. Figured I should find out what's going on with this
"official" release file before further investigating my own build.

Any ideas?

I also tried the NDS file from Lab 87 from <http://www.caerwyn.com/ipn/
> and it also failed. Perhaps everyone is using a different PassMe
type card to run things? Actually, what is the preferred choice of
hardware / emulators used by the group? I'd like to hack around a
little and would be interested in learning about such tools (i.e.,
emulators, external serial ports for Acid, JTAG, etc.) since I'm new
to DS development.

Thanks.

Salva Peiró

unread,
May 26, 2008, 7:01:22 AM5/26/08
to infer...@googlegroups.com

for debugging the ds: print() is your friend,
i have the hope to improve this situation once wifi is working.

also as you've got one .nds (r98) which works and another .nds (r136)
which doesn't maybe you could use the method of bisection,
to track down exactly which exact revision between ]98,136[ introduced
changes [1]
which made the .nds file stop working on you homebrew cartridge.
About the cartridges we have used are: r4ds and dstt.

using an emulator can speed up development a bit;
as you can quickly check your changes/modifications, without reseting the ds.

The wiki [2] contains some information about the development,
technical background, ideas and the DSContrib lists some of the
emulators available.

hth

[1] http://code.google.com/p/inferno-ds/source/list
[2] http://code.google.com/p/inferno-ds/w/list
--
salva

Euangelion

unread,
May 27, 2008, 5:23:40 PM5/27/08
to inferno-ds
I'm using the PassMe card as well with the M3 microSD flash. On rev
104-136 while booting it bombs out in the code below in the dsinit.b
file using desmume emulator, it just locks up on start using the M3.
This happens when it tries to mount the file system, I recieve the
message unknown format. Seems prior to rev 103ish you changed the way
the file system is mounted. Any suggestions on properly mounting the
file system, do you just run the raw .nds file through emulators and
your flash or do you use some mounting parameters?



temporal workaround: use lfs("#T/ndsrom")
if(lfs("#T/ndsrom") >= 0){
# let's just take a closer look
sys->bind("/n/local/nvfs", "/nvfs", Sys->MREPL|Sys->MCREATE);
(rc, nil) := sys->stat("/n/local/dis/sh.dis");
if(rc >= 0)
localok = 1;
else
err("local file system unusable");
> salva- Hide quoted text -
>
> - Show quoted text -

Mark Rodriguez

unread,
May 27, 2008, 9:00:12 PM5/27/08
to infer...@googlegroups.com
I tried the emulator route and notice that r136 actually loads but
fails when mounting the local file system. The good news is that I'm
able to completely rebuild the the NDS file on my own, but I still
need to investigate more closely how the local file system is used. It
appears r136 generates a kfs that is 32MB in size and concatenated to
the generated NDS image while r98 did something similar but with a
different file system format (final image size ~3MB).

Having never run Inferno natively, I'm not familiar with its support
of local file systems, but it appears my load problem(s) are related
to this. I suspect once I figure out how to append a local file system
to the generated NDS image, I'll be up and running.

Regards.

--
Mark F Rodriguez

Salva Peiró

unread,
May 28, 2008, 6:33:59 AM5/28/08
to infer...@googlegroups.com
On Tue, May 27, 2008 at 11:23 PM, Euangelion <euange...@gmail.com> wrote:
>
> I'm using the PassMe card as well with the M3 microSD flash. On rev
> 104-136 while booting it bombs out in the code below in the dsinit.b
> file using desmume emulator, it just locks up on start using the M3.
>
> This happens when it tries to mount the file system, I recieve the
> message unknown format. Seems prior to rev 103ish you changed the way
> the file system is mounted. Any suggestions on properly mounting the
> file system, do you just run the raw .nds file through emulators and
> your flash or do you use some mounting parameters?
>
> temporal workaround: use lfs("#T/ndsrom")
> if(lfs("#T/ndsrom") >= 0){
> # let's just take a closer look
> sys->bind("/n/local/nvfs", "/nvfs", Sys->MREPL|Sys->MCREATE);
> (rc, nil) := sys->stat("/n/local/dis/sh.dis");
> if(rc >= 0)
> localok = 1;
> else
> err("local file system unusable");
> }
>
>

a few things about desmume:

- undefined instructions:
desmume doesn't implement correctly 'undefined exceptions',
this means that when it encounters a floating point instruction [0],
it won't generate a undefined instruction exception that we can trap
and emulate.

anyway you can still run the nds files, pausing & resuming the emulation twice.
you can also take a look at [1] which is a personal change i made to
fix desmume's behaviour.

- accessing nds rom (0x08000000) see devnds.c/^ndsinit()
i had the misconception that it was possible to access data appended
to the end of the .nds file,
this is only true for some specific slot2 homebrew devices [2].
This will work under desmume as it emulates those slot2 devices
but won't work on the most common slot1 devices (r4ds, dstt).

The proper way to access storage seems to be using the Chishm dldi interface
there's devdldi.c (work in progress) which provides i/o functions to
access to storage,
the functions are device dependent provided by the nds loader
by means of auto-patching (watch out!) the .nds file.

It would be also worth to take a look at the DSContrib wiki,
which now contains a section about reporting bugs.

[0] http://groups.google.com/group/inferno-ds/browse_thread/thread/2053198167d994aa
[1] http://inferno-ds.googlecode.com/files/desmume-undf.patch
[2] http://www.double.co.nz/nintendo_ds/nds_develop6.html

--
salva

Reply all
Reply to author
Forward
0 new messages