-
Notifications
You must be signed in to change notification settings - Fork 3
Home
This work introduces a concrete way to expose Nintendo DS hardware to Python; it uses the Pyrex extension language to produce valid libdns wrappers in form of Python modules. It has been built upon the original port of Stackless Python 2.5 port to Nintendo DS, by Richard Tew. It has been updated by Liu Zhenhai to build with the latest version of the toolchain.
Some sections of libnds have been wrapped, including framebuffer access, touchscreen reading, console emulation, irq handling and 3D functions.
Also see Project History for a summary of the changes before the project went under git.
- Download dspyenv.zip: this archive contains the complete environment required to run Python programs on the Nintendo DS;
- Unpack
dspyenv.zip, and copy the contents of the resultingdspyenvdirectory to the root of your homebrew storage; ensure that bothNDSPython.ndsand thepython/directory are at the root of your homebrew storage; - Start your Nintendo DS and run
NDSPython.nds: the filemain.pylocated in thepython/directory will be automatically launched.
While you wait for a tutorial, please check out these example scripts. To execute them, just save one of them as /python/main.py on your homebrew storage device, and execute /NDSPython.nds.
- 3D drawing (3D, touchscreen reading) - main_3d.py
- Paint (writing to framebuffer, touchscreen reading) - main_draw.py
- Showpic (load binary as image, D-pad reading) - main_showpic.py
- Stopwatch (timer handling) - main_stopwatch.py
- Crush (simple game using 3D and touchscreen) - main_crush.py
- Slides used during the talk at !PyCon Uno 2007 (Italian only!) - PyCon-DS.pdf
- Sources: checkout then build, following the README
Lorenzo Mancini [email protected]