29
Brewing the Nintendo DS from the comfort of the home, Part 2
0 Comments | Posted by Matthew Bowra-Dean in Personal Project
Well my first version of the dice roller has turned out to be very easy to produce. I initially wanted to stay away from any graphics code and devkitPro provides a good avenue for that in the form of a console that supports ANSI escape codes. A built-in on-screen keyboard can be used for user input and access to the SLOT-1 device’s filesystem is accessible through the standard C I/O functions (fopen, getc etc.).
Here’s a basic overview of the code:
(more…)
28
Brewing the Nintendo DS from the comfort of the home, Part 1
0 Comments | Posted by Matthew Bowra-Dean in Personal Project
A little while ago I was looking to start doing some hobbyist embedded programming. I’d fallen in love with the challenges embedded platforms present in software development thanks in part to both the course I did on hardware architecture and assembly language last trimester and the contract work I’ve been doing in the uni holidays.
Luckily for me the Nintendo DS has a fairly mature homebrew scene so back in April I bought the new DSi hoping all the eager software pirates out there would be quick to crack the firmware and enable the running of unofficial software on it. Unfortunately this hasn’t really happened but fortunately enough, a few DS SLOT-1 device manufacturers were able get versions of their devices out that would support DS homebrew on the DSi. None of the extra DSi features or power are available but it’s better than nothing.
So, on to the meat of the story. The Nintendo DS is a very capable little beast. It has two CPUs; an ARM7 clocked at 33MHz which is mainly used for interacting with the hardware; and an ARM9 clocked at 67MHz which does most of the processing grunt work. You also have 4MB of RAM to play with not including the VRAM and numerous caches. The DSi one ups all of this; doubling the clock speed of the processors and quadrupling the size of the RAM. Unfortunately this is unusable to homebrew developers at the moment as only the “DS mode” has been cracked meaning the clock speeds and available RAM are constrained to the DS’ capabilities.
Using the fantastic devkitPro toolchain I was quickly able to get a build environment up and going and through the tutorials here and here I was able to get a handle on the libnds library provided by devkit. So I’ve decided to start hacking on a dice roller. One of my loves in life is pen and paper roleplaying games and a recent game of Scion is beginning to get out of hand with the amount of 10-sided dice I am having to roll. In the interest of having something to waffle on about and impress random strangers on the internet with I am going to chronicle my attempts here (with BSD licensed source of course). Hopefully someone gets something out of this other than me.
Something that I have always been hesitant about learning in my travels as a computer science student has been the lowest of the low as far as programming interfaces go: assembly. It has long seemed like mysterious, obfuscated magic to me. While I am only a second year computer science student, I have a good many more than two years of experience in both high and low level languages and yet I’ve always been hesitant about going that one step lower than C.
Little did I realise until I started the relevant course at University that there is really no magic to it. Most of the concepts like memory layout and addressing, the stack, the heap and bit wrangling I’d already picked up in dealing with C. The existence of Registers and why all operations are done on them makes sense when thinking about the phsyical nature of the chip. It’s almost disappointing in a way, like a Magician revealing how he does his tricks.
Nothing to do with software today. I’d just like the opportunity to congratulate Chris on his marriage to the wonderful Rosanna this last Saturday. Hopefully you’ll forgive me for rickrolling you at your reception.
11
IJW Software and Open Source
3 Comments | Posted by Matthew Bowra-Dean in Open Source, Rants
As you may or may not be aware, IJW Software has released its major projects under the BSD License. There are a number of reasons behind this, both from a personal and business aspect.
I myself like the idea of open-source. The more vocal members of the community surrounding it however, I do not. Richard Stallman is a prime example. I respect the man for some of his ideas but not his unyielding fanaticism to those ideas. The Gnu Public License (GPL) seems to be freedom at the expense of others’ freedom with its viral like behaviour.
The Linux kernel and the Gnu user land seem to be stuck with ideas from the 80s and with so much division in everything from the distributions to the applications in the distributions, it all feels unfinished, lacks professional polish and lacks features that their ‘evil’ proprietary counterparts have had for years.
The insistence that the more extreme ‘freetards’ make that free and open-source software can not work with proprietary software cripples them. Me, I believe that people should be free to pay for proprietary software if they feel that it works better than free alternatives rather than being derided and even sued for it. Props to Linux Hater’s Blog, they sum this all up a lot better than I do.
So with my problems with the open-source community why would I support my colleagues in releasing our products as open-source software? Well for a start, we aren’t releasing under the horrendous GPL, instead under the truly free BSD License. People can use our code however they wish so long as they include attribution. Secondly, if we can generate interest and get people contributing back to our projects, they can improve them to the point where they will be superior to their competition which in our opinion has major shortcomings. As University students we don’t really have the time to put into to finishing these and make our money from consultancy and contracting anyway.
So in summary, we aren’t losing anything from opening our code up and have everything to gain. Hopefully others will find our products useful and will be able to get past the fact that “ZOMG it’s written in an evil proprietary language in an evil proprietary IDE and will only run on an evil proprietary operating system.”
Update 2009-10-02:
After several months of working with Linux and open-source software, I have come to realise that these views are inaccurate and misguided. There are certainly problems in the open-source community and I still stand by the fact that the community should try and work with proprietary software rather than against it, provided of course that software patents don’t hinder that. All that being said though, the majority of the open-source community has only the best in mind for software users and the GPL is there to reach a compromise between the user’s freedom and developer’s freedom. I’ll still continue to use the BSD license with my personal projects as I’d be very surprised if anyone found any commercial value in them.
14
New Zealand Copyright (New Technologies) Amendment Bill
3 Comments | Posted by Matthew Bowra-Dean in Rants
I didn’t really want to make my first post on such a subject but it is an important issue that needs to be addressed. The Copyright (New Technologies) Amendment Bill is the New Zealand Government’s answer to the notorious DMCA of the USA. It was passed back in April with only the Green Party and the Maori Party opposing it.
