Sign in Join
Wiki copytemporary

Nintendo DS

Nintendo DS port

History

NDS port began and was created by Francesco Lombardi with the knowledge gained from the making of the GBA port. This endeavor is an extension of the original goals of the FPC 4 GBA project.

Status

Port notes

Nintendo DS can run executables made for ARM9 and/or ARM7 cpu. It is possible to switch between ARM9 and ARM7 by using

pascal
{$apptype arm9} 
and
{$apptype arm7}

That generates .nef.bin and .nlf.bin binaries. If not specified, fpc assumes arm9 as default apptype and, in this case, calls ndstool.exe (a tool you can find as part of devkitPro) in order to generate a patched binary with .nds extension. This file should work on your hardware/emulator. In case of an arm7/arm9 mixed program, it is necessary to compile separately arm7 and arm9 code, then convert the .nef.bin and .nlf.bin binaries with ndstool.exe in this way:

pascal
ndstool -c myprog.nds -9 myprog.nef.bin -7 myprog.nlf.bin

The current NDS port is tested and reported as working with the latest devkitPro arm-eabi binutils.

Why .nef and .nlf?

.nef means "not executable file" and it is the extension that no$gba debugger uses for loading arm9's synmbolic debug infos from. In the same way it loads arm7's debug infos from .nlf files.

What I need to start coding for Nintendo DS?

Documentation

(All these docs are aimed to C/C++ language)

Tools

Using Lazarus for Nintendo DS development

A fpc 2.4.0 based distribution of Lazarus is needed.

pascal
program Project1;
{$mode objfpc}
uses
  ctypes, nds9;

begin

end.

What works: Code completion and all code related features (tooltips, refactoring, ...)

What DOES NOT work: the debugger (use the debugger on the emulator); the LCL (you can't make applications in the visual way. The NDS coding is somewhat similar to console application programming)

Links


From the Free Pascal wiki, page "Nintendo DS", as it stood on 2020-02-21 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 1, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.