MTCLib v1.01 Issue

April 25th, 2007
Posted in library, multi-threading, nds
No Comments »

Just a quick note. A user contacted me via the DSLinux forums with regards to a problem with the nds.c file included in MTCLib v1.01. It seems that the maintainer of MTCLib may have added in an additional piece of code to the file that was not necessary. This would be all well and good, if it didn’t cause a compilation error.

Anyway, if you’re one of the dedicated few using MTCLib, then I thought I’d let you all know it’s probably safe to comment out the function MTC_PlatformSynchronise, as it causes a compilation error while not actually being used by anything. From the looks of things, it has to do with multi-processing support, something the NDS release of MTCLib doesn’t handle…

Disappearing Comments…

April 5th, 2007
Posted in Uncategorized
1 Comment »

People have been commenting on the fact that their comments don’t appear. For some reason Wordpress wants me to moderate all comments. I’d rather switch it off, but I can’t seem to find any setting which allows me to.

If anyone has a tip, feel free to give it. Otherwise, comments usually appear after moderation…

Compiling GDC for devkitARM r20

March 22nd, 2007
Posted in D, compiler, nds
6 Comments »

As promised before, I am going to post instructions for getting GDC 0.22 to compile as part of devkitARM r20…

What you will need:

binutils-2.17.tar.bz2, gcc-core-4.1.1.tar.bz2, gcc-g++-4.1.1.tar.bz2, gdc-0.22-src.bz2 and newlib-1.15.0.tar.gz

Also, you will need to devkitARM r20 build scripts. I suggest you obtain the latest ones via the DKP SourceForge cvs…

Instructions:

1: Create a work directory and extract each file to it

2: Move the d folder and place it under gcc-4.1.1/gcc (So the path to it is: $(YOURFOLDER)/gcc-4.1.1/gcc/d)

3:  Go to the gcc-4.1.1/gcc/d and do the following:

*: Open Make-lang.in and search for D_GLUE_OBJS. Add prefix.o to the end of the list of objects. The object before it should be d/dt.glue.o. Save your changes.

*: Open setup-gcc.sh and comment out the line ”ln -s gcc/d/phobos libphobos || exit 1 ” and then comment out the line “patch -p1 < gcc/d/patch-toplev-${gcc_ver}.x || exit 1″. Save your changes.

4: Download the DKP Build Script  and extract the shell script in it to your work folder.

5: Edit the shell script, changing the –prefix=/home/adam/development/dkp entries to reflect the location of your own work directory. Save changes.

6: Run the shell script.

7: Let me know if you encounter any errors…

I have tested the above script using Mandriva 2007 and it worked fine. It should work find with MSys under Windows, but I have

yet to test this for myself.

EDIT: An update on the above…

5: Edit the shell script, changing the /home/adam/development/dkp entries to reflect the location of your own work directory. Save changes.

In other words, change all refs to the homepath, not just the –prefix one…

Finally, before things will work right, you will need to make sure the output directory ($(YOURDIR)/output/bin) is on your path in order to allow access to the compilers during compiliation…

EDIT:

Compilation seems to fail under OpenSuse 10.2, which uses GCC-4.1.2. I’m not quite sure why this is happening yet…

EDIT :

Worked out the above problem. The file dkp.sh, change ./gcc/d/setup-gcc.sh to sh ./gcc/d/setup-gcc.sh. This makes sure that the

GDMD patch script gets run. Also, at the moment I’m testing out GDC 0.23. Seems to be working fine, although the prefix.o patch to Make-lang.in is still necessary.

EDIT:

Yet another belated update. Some testing has revealed that the process outline above may produce faulty versions of the standard libraries used by various C applications, which in turn prevents them from compiling. The error in question looks like this:

linking gen_config.elf

/mnt/store2/Mandriva_BK/development/newdevkitPro/devkitARM/bin/../lib/gcc/arm-eabi/4.1.1/../../../../arm-eabi/lib/ds_arm9_crt0.o: In function `CIDLoop’:

ds_arm9_crt0.s:(.init+0×210): undefined reference to `__libc_init_array’

collect2: ld returned 1 exit status

make[1]: *** [/mnt/store2/Mandriva_BK/development/newdevkitPro/projects/gen_config/gen_config.elf] Error 1

make: *** [build] Error 2

A temporary fix for this involves copying the relevant C/C++ libraries from a working devkitARM r20 install. I’ll be looking into this problem to try and work out why the compile process is producing b0rked libraries…

An update…

March 16th, 2007
Posted in D, compiler, input, library, nds, quikkeys
4 Comments »

It’s been a while since I’ve done a proper update, so I figured I’d just let you all know what I have cooking. Keep in mind, of
course, that progress on the following is slow, since I recently started my new job. (My first real job too :-)

Digital Mars D for devkitARM:

If you keep an eye on the DKA mailing list or the GBADev forums then may have picked up on the fact that I’m working on getting the
D programming language working within DKA. This is proving to be an interesting project that has already born some fruit, but is not
quite ready just yet. So far I’ve managed to compile the GNU D front-end into DKA successfully. This process is actually quite simple
and I plan to release instructions on how to do so next week. What remains to be done within the scope of this project is to get
libphobos (The standard D runtime library) compiled for use with arm-eabi-gdmd. I’m also planning to take a look at Ares and Tango
and see whether either of them would be an option as well. The other major remaining facet of this project is the conversion of the
libnds and (maybe) libgba header files into D module definitions (This is very important, as it will allow devs to use D while retaining
the all-important functions provided by libnds, etc. Thank god D supports the C ABI is all I can say :-)

QuikKeys:

I was actually working on this before I started the previous project, but it’s taken something of a back-seat to the above. Nevertheless,
I’m still aiming to get it out the door sometime in the near future, since it’s mostly done anyway. As you might have already guessed,
Quikkeys is another input system library for the DS. It has been designed along similar lines to my QuikWriting library for the DS,
although there have been some architectural improvements (Which I plan to filter back to QuikWriting at some point). QuikKeys is an
input system for the DS that allows for the fast entry of text using only the buttons. It has been designed such that a maximum of 3
button presses is required to access any character, with the average being a mere 2 button presses. Anyway, hopefully I’ll be able
to get it out the door sometime soon and you can all test it out…

Template D Makefiles

February 6th, 2007
Posted in D
No Comments »

First post in a while, although it’s not strictly NDS-related.

Anyway, I’ll keep it short and sweet. The file linked to this post contains a number of template makefiles for use by programmers working with the D programming language. If, like me, you don’t like Bud then these are for you.

Also included is a makefile that can be used to compile the Derelict bindings library.

D Makefiles

EDIT: I’ve updated the Makefiles, removing a few minor problems and clarifying a few things.

One important note: These makefiles are intended for use with GNU Make. I don’t guarantee

compatibility with anything else. Anyway, the updated files are below:

D Template Makefiles

Incommunicado

December 31st, 2006
Posted in Uncategorized
No Comments »

On the off chance that anyone happens to wander by, I won’t be updating or posting on GBADev very frequently for a while, as I’m moving and will thus be rather busy with real-world stuff for a while…

MTCLib v1.01

December 27th, 2006
Posted in application, library, multi-threading, nds
No Comments »

A while ago I managed to get a fairly complete multi-threading library ported to the DS. This wasn’t actually as much work as it should have been for a number of reasons. The library itself was written in ANSI C90 and was intended for portability and embedded usage. It also already supported ARM7 processors via a different toolchain (SDT 2.51).

With some help I got MTCLib ported to the DS. It can be found here.

The GBADev thread can be found here.

Credit goes to Lawrence Rust for originally writing MTCLib. Lawrence also actually replied to my emails with regards to the port and was overall very helpful.

The port itself was mostly the work of Cearn, who wrote the external assembler code version of the inline SDT 2.51 assembler code, and masscat, who wrote the replacement TimerTicks() funtion and provided some useful advice. Also, sasq helped a great deal when it came to adjusting the Makefiles for the demo applications included with MTCLib.
I mostly just packaged up the various solutions provided by the above people in response to my request for help with the port.

Anyway, thanks to all of the above.

And yes, I know, this is old news, but I decided to make sure that this Dev-Scene blog provides comprehensive links to all of the NDS-related projects I’ve worked on, even the old ones…

libQWDS v1.2

December 24th, 2006
Posted in application, input, library, nds, quikwriting, touch-screen
No Comments »

Yet another minor update while I’m trying to get v2.0 ready for release. This version sees a few more fixed.

Primarily, a rather amusing and highly embarrasing bug in libQWDS itself was fixed. This bug was not actually affecting output in any way. Nevertheless, it was a case of erroneous logic, so I fixed it. Take a look at the qwdsgetzone() code in v1.1 and v1.2 to get a better idea of what’s changed :-)

I also fixed two character table bugs in QWDSTest, so now the demo should output all characters correctly.

Get it here…

libQWDS v1.1

December 22nd, 2006
Posted in application, input, library, nds, quikwriting, touch-screen
No Comments »

Just a minor update. I finished tidying up the libQWDS code a little and making a few minor changes.

The library now supports custom data types, so it can be compiled to use character tables of either 8,16,32 or 64 bits in length, per character.

Other than that, just some minor code changes here and there. See the Readme.txt file
for a Changelog and some extra details.

Get it here…

libLUADS v0.1

December 20th, 2006
Posted in LUA, application, library, nds
No Comments »

A while back I released by initial port of LUA in library form to the DS. That version was placed up at NDS Storage  under the section Other->Various along with a simple test application.

Since I plan to use this Dev-Scene blog as the primary release point for any NDS related development I do I’m uploading a ZIP file containing the initial
release of libLUADS and the test application.

Although I haven’t done much work on libLUADS lately I hope to be able to get some more stuff done on it in the New Year, although maybe not for a while.

In it’s present state libLUADS is mostly usable, though. The main problem areas are the various OS related functions, although some of the trace functions also seem to have issues.

The test application includes a number of sample LUA files, most of which work fine. Impressively enough, the Conways’ Game of Life LUA Script works fine, although it runs rather slowly (Possibly it uses floats, something I haven’t checked…)

Anyway, enjoy.

Here’s
the file…

The GBADev thread for libLUADS is here.