So, I'm the owner of nds now (yeah, I know it's an old thing, but I got it 3 times cheaper
).
And I was intented to check cross-compile capabilities of CT.
I went to the
Nintendo DS - Free Pascal Wiki
and started a new project. Nothing special, just a template - I've copied this from the page above.
program Project1;
{$mode objfpc}
uses
ctypes, nds9;
begin
end.
Then there goes this:
From the menu Project->Project options...->Compiler options select "NoGUI" as LCL widget type
Never found where to set this one though.
Move on Compiler options->Code then select "arm" as Target CPU and "nds" as Target OS
Done.
Move on Compiler options->Other then check "Use additional Compiler Config file", writing the config file of your nds compiler (maybe something like c:\lazarus\fpc\2.4.0\bin\arm-nds\fpc.cfg). Lazarus will complain about some conflicting names, but just do ok and all will be fine
Never found where it is. Tried to search, but in "C:\codetyphon\fpc\bin" dir there's no "arm-nds" folder. And "C:\codetyphon\bin\bincross\win32-arm-nds" does not contain "fpc.cfg". So, what should I do?
From the menu Run->Run parameters...->Local->Host Application select your emulator with full path (something like c:\desmume\desmume.exe)
Okay, I've got Desmuse (and No$GBA too) and typed path to the first one.
Put $ProjPath()\$NameOnly($ProjFile()).nds on "Command line parameters" field
Done.
What should I do to compile this empty project for the NDS target?
P.S.
Here
the author claimed he has an example for nds programming, but I found only GBA one. Do not really want to mess up with c++ (I understand it's syntax, but it's weird for me to use something different than dots to separate methods, so it's allways frustrating)