Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

NDSPython

From GameBrew
NDSPython
Ndspython2.png
General
AuthorRichard Tew
TypeOther Apps
Version2007
LicenseMixed
Last Updated2007/01/28
Links
Download
Website
Source

This is a port of Stackless Python 2.5 for the Nintendo DS.

Installation

Download contains the following:

  • NDSPython25.zip - The NDS Python binaries.
  • NDSPython25-src.tar.bz2 - The NDS Python source code.
  • libpython25.zip - Precompiled static library for Stackless Python 2.5.

The precompiled rom has built in support for the compact flash Supercard.

If you want it to have support for your homebrew device, then you need to patch it with DLDI yourself.

To install, copy the NDSPython rom and the python folder to the root of your homebrew media.

User guide

None of the DS hardware is as yet supported (microphone, graphics, speakers and touchscreen).

All you can do is enter lines of Python code into the console through the touchscreen keyboard.

Changelog

Python 2.5 2007/01/28

  • Removed support for gba_nds_fat and installed support for libfat. Now you can get the rom to work on your homebrew device by using dlditool to inject the relevant driver into the rom.

Python 2.5 2007/01/08

  • Upgraded to Python 2.5 from Python 2.4.3.
  • Updated how the filesystem support was exposed to Python. This was needed because the hooks provided by devkitArm had changed.
  • Cleaned up the source code so that others can actually get it to compile. Important bits of information were left out of the Python 2.4.3 release because I did not remember them myself when I packaged it up. Now the whole compilation process is documented in a README file which is included with the source code.

Python 2.4.3 March 2006

Summarised:

  • Fixed lots of bugs which would prevent Python from finding modules on homebrew devices.
  • Is now, except for the Stackless aspects, bug free and usable to the extent a programming language can be without the DS hardware being exposed to it. So, this means it is in a good place for that to be the next thing worked on.

Detailed:

  • Identified and fixed a bug in chishm's FAT filesystem code which was breaking the finding of imported modules because of the way the zipimport module works. Fix has been submitted to chishm, but a fixed version of the code is included in the Python patches.
  • The use of AddDevice to hook into the newlib file functions had a bug in the hooked seek function, because it implemented the normal seek API instead of the lseek API (it needed to return the current file offset when called, so that the higher level code could know where in the file the underlying FAT code was).
  • Corrected the initial memory allocations so that the regions for the heap and the stack were given correctly and in usable amounts. I had no understanding of how this really worked in the initial release. As seen in the screenshot on the website, you can import the 'nds' module and have 'nds.meminfo()' display heap and stack information.
  • Moved the FAT code initialisation before the Python initialisation so that the modules could be found while Python was initialising.

External links

Advertising: