PDA

View Full Version : Nintendo DS / Python 2.4 Port



wraggster
January 5th, 2006, 00:20
A port of Python to the Nintendo DS, heres the info:

I wanted to see what was involved in cross-compiling Python to the Nintendo DS. In order to do this, I first needed a method of input and output to link the cross-compiled Python static library to, as it is simple to take input pass it into Python and have the output go to stdout or stderr. So, the first step was to look around for example source code for graphical keyboards that displayed on the touchscreen and output clicked letters to the top screen. There were many versions available, but the one I chose to start with was "Extended Keyboard Example 4".

It turns out that libNDS already provides a console, replacing stdin and stdout to do so. And devkitARM provides the common libraries and compilation tools, including a version of libc, called newlib. So, I just tried to cross compile Python 2.4, addressed the few minor issues that popped up, then linked the static library that resulted to the keyboard source code and added the 3 lines of C code that simulated a simple Python interpreter.

http://www.disinterest.org/NDS/Python24.html