Is there a detailed guide on compiling your own DS build?

Subforum for discussion and help with ScummVM's Nintendo DS port

Moderator: ScummVM Team

Post Reply
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Is there a detailed guide on compiling your own DS build?

Post by marzipan »

I looked in the Wiki for guidance and it pointed to an old forum topic which didn't exactly go into enough detail on what commands to type in and what not. All it told me was that DevKitPro was needed.

I'm a novice when it comes to compiling source code so it would be great if a step-by-step guide could be found somewhere if possible. Thanks! :)
agentq
ScummVM Porter
Posts: 805
Joined: Wed Dec 21, 2005 4:29 pm
Location: London, UK

Post by agentq »

Have a look at this guide on the ScummVM DS site:
http://scummvm.drunkencoders.com/#sources
User avatar
88988
Posts: 4
Joined: Wed Dec 16, 2009 5:20 pm

Post by 88988 »

Hey

I've been looking into the backends/platform.ds folder in the svn repository using tortoisesvn and I've been looking for a place to type "make SCUM_BUILD=f. Been looking for a while now on where or how to enter this command but I've had no luck, any help would be greatly appreciated, thanks.
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

The directory you need to be in is "backends/platform/ds/".

Since your question was a bit vague, I am not sure whether this alone helps you -- just to make it clear, you need to change to this directory from within a shell / terminal / command line prompt ("cmd.exe" on Windows, I think). And you need to have cygwin installed, otherwise there won't be a "make" tool. And then you also need the DS SDK, of course (as explained on the page agentq linked to).
User avatar
88988
Posts: 4
Joined: Wed Dec 16, 2009 5:20 pm

Post by 88988 »

Thanks very much for the reply, I've been looking over the guide on the ds page for a while now, but I'm still unsure what the DS SDK is, could you perhaps elaborate on it
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Ah I am sorry -- I somehow thought Neil' explained this in his build instructions, but checking again now, I see he doesn't...

You need various things from DevKitPro. Searching this forum for DevKItPro may also reveal some helpful instructions.

I can't promise anything, but if I find the time I'll add a proper guide to our Wiki at http://wiki.scummvm.org/index.php/Compi ... intendo_DS
User avatar
88988
Posts: 4
Joined: Wed Dec 16, 2009 5:20 pm

Post by 88988 »

Ah I've checked the devpro out and it's far beyond my understanding. I think I'll have to wait for the guide in the wiki, if it is ever developed...

pity there aren't nighty builds of the ds scummvm
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

Well even though the wiki page now has instructions, I'm still struggling to get anything working right. I'm using DevKitPro's automated downloader/installer program for Windows and it installs what appears to be the latest DevKitARM, though the wiki seems to state that I need to use an older version, so the installer may not be all that helpful. I might have to do everything manually.


Besides, with a full DevKitPro environment setup, I still can't compile ScummVM 1.0.0 correctly. Even after commenting out the USE_MAD line, it stops during the compiling phase complaining of an error:

Code: Select all

MarzSyndrome@ ~/scummvm/backends/platform/ds
$ make SCUMM_BUILD=d
make[1]: Entering directory `/home/MarzSyndrome/scummvm/backends/platform/ds/arm
7'
main.o cartreset.o
cartreset.c
main.cpp
arm-eabi-g++ -MM -g -Wall -O2 -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer -ffast-math -mthumb-interwork -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/include -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/build -Iquote -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/../commoninclude -I/c/devkitPro/libnds/include -I/c/devkitPro/libnds/include/nds -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/build -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/libcartreset -DARM7 -fno-exceptions -fno-rtti -o main.d /
home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp
In file included from c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:42:c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/../commoninclude/NDS/scummvm_ipc.h:41: error: 'TransferSoundData' does not name a type
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp: In function 'void InterruptVBlank()':
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:505: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:507: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:507: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:507: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:507: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:507: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:507: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:510: error: 'struct sTransferSound' has no member named 'data'
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp: In function 'int main(int, char**)':
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm7/source/main.cpp:588: error: 'SOUND_CR' was not declared in this scope
make[2]: *** [main.o] Error 1
make[1]: *** [build] Error 2
make[1]: Leaving directory `/home/MarzSyndrome/scummvm/backends/platform/ds/arm7'
/bin/sh: svn: command not found
make[1]: Entering directory `/home/MarzSyndrome/scummvm/backends/platform/ds/arm9'
makefile:349: warning: overriding commands for target `clean'
/home/MarzSyndrome/scummvm/backends/platform/ds/../../../Makefile.common:73: warning: ignoring old commands for target `clean'
make -C ./scummvm-D -f ../makefile scummvm.nds
/bin/sh: svn: command not found
make[2]: Entering directory `/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/scummvm-D'
../makefile:349: warning: overriding commands for target `clean'
/home/MarzSyndrome/scummvm/backends/platform/ds/../../../Makefile.common:73: warning: ignoring old commands for target `clean'
icons.raw
keyboard.raw
keyboard_pal.raw
default_font.bin
8x8font_tga.raw
arm-eabi-as -mcpu=arm9tdmi -mthumb-interwork /home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/blitters_arm.s -o /home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/blitters_arm.o
mkdir -p /home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/.depsarm-eabi-g++ -Wp,-MMD,"/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/.deps/cdaudio.d",-MQ,"/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/cdaudio.o",-MP  -Os -mthumb -Wno-multichar -Wall -Wno-multichar -mcpu=arm9tdmi -mtune=arm9tdmi -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -mthumb-interwork -DUSE_ARM_COSTUME_ASM=1 -Wno-non-virtual-dtor -Wno-unknown-pragmas -Wno-reorder -fno-exceptions -fno-rtti -mthumb-interwork -ffunction-sections -fdata-sections -fno-strict-aliasing -DSCUMMVM_SVN_REVISION=\"\" -DDS_NON_SCUMM_BUILD-DDS_BUILD_D -D__DS__ -DNDS -DARM9 -DNONSTANDARD_PORT -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555 -DDISABLE_DOSBOX_OPL -DDISABLE_DEFAULT_SAVEFILEMANAGER -DARM -DREDUCE_MEMORY_USAGE -DENABLE_AGI=STATIC_PLUGIN -DENABLE_CINE=STATIC_PLUGIN -DENABLE_GOB=STATIC_PLUGIN -DDISABLE_SCALERS -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/scummvm-D -I/home/MarzSyndrome/scummvm/backends/platform/ds/../../.. -I/home/MarzSyndrome/scummvm/backends/platform/ds/../../../engines -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/data -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/../commoninclude -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/mad -I/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/libcartreset -I/c/devkitPro/libnds/include -include /home/MarzSyndrome/scummvm/backends/platform/ds/../../../common/scummsys.h -c /home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/cdaudio.cpp -o /home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/cdaudio.o
In file included from c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/dsmain.h:28,
                 from c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/cdaudio.cpp:26:
c:/devkitPro/msys/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/../commoninclude/NDS/scummvm_ipc.h:41: error: 'TransferSoundData' does not name a type
make[2]: *** [/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/source/cdaudio.o] Error 1
make[2]: Leaving directory `/home/MarzSyndrome/scummvm/backends/platform/ds/arm9/scummvm-D'
make[1]: *** [ndsall] Error 2
make[1]: Leaving directory `/home/MarzSyndrome/scummvm/backends/platform/ds/arm9'
make: *** [all] Error 2

MarzSyndrome@MINDLESS-02E4C5 ~/scummvm/backends/platform/ds
$
Hope that's all formatted correctly!

Wouldn't it be possible to make some kind of dummies' guide so I don't end up headdesking a lot over this compiling business? =[
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

marzipan wrote:Wouldn't it be possible to make some kind of dummies' guide so I don't end up headdesking a lot over this compiling business? =[
Of course it would be possible! It just would be a lot of work to do; especially a guide that would be of any use for Windows users, given that apparently all people working on the NDS port use a Unix based system. So far, it seems nobody has had any interest in spending this major effort.

Personally, I rather spend my time coding on ScummVM, then trying to figure out how to do serious work on Windows ;-).
marzipan
Posts: 301
Joined: Fri Nov 25, 2005 4:10 pm

Post by marzipan »

I see. Well, even installing all the individual devkitPro components manually (and setting the environment types manually) doesn't make a difference.

To agentq, or indeed anybody else: are you able to decipher the above log and let me know just what it is I'm missing or doing wrong? devKitPro installs libgba, libnds, maxmod, default_arm7, libmirko, libfat, libfilesystem and dswifi - does the DS port need anything else? Indeed, am I supposed to adjust "fstab" and "profile" at all? Will changing "USE_MAD = 1" to "USE_MAD = 0" work better than commenting the line out? If it helps also, I've tried using both the latest devkitARM and the version of devkitARM mentioned in the wiki (r24).

Thanks.
Post Reply