PDA

View Full Version : The beginnings of yet another Lua port for the DS



wraggster
April 25th, 2010, 19:46
News via http://fincs.drunkencoders.com/2010/04/22/the-beginnings-of-yet-another-lua-port-for-the-ds/


I’ve decided to make my own DS port of Lua because:

DSLua was abandoned (and uses PAlib).
Micro Lua DS was abandoned by the original developer.
Apparently noone noticed Lua defaults to the double floating point type (which is ridiculously slow on the DS due to its lack of a fp unit).
Lua is easy to learn and can be a friendly introduction to Nintendo DS homebrew programming.
Compiling an integer-only version of Lua for DS was really easy, and I got key and stylus support in a couple of minutes. Division and module operations are done using the hardware registers for performance. Here are some pictures:

(EDIT: There’s something wrong in the main page, please click on “Read more”. Can a mod fix this?)



Cute, isn’t it? Well, it still lacks support for almost everything, but something is better than nothing. Here is a list of planned things:

libnds lua bindings for background/sprite/VRAM functions
maxmod lua bindings
sleek object-based sockets API
good ol’ POKE and PEEK functions
memory buffers for use with the functions above
file loading to memory buffers
luaballs (archives containing Lua scripts and resources) with compression support
preparsed Lua scripts support in order to speed up the loading process
shell entirely written in Lua (with minimal C bootstrapping)
debugging over Wifi via the DBGp protocol
runtime version for converting Lua programs into standalone .nds files
PC runtime emulation layer for quick testing and easier debug
Don’t forget to post your thoughts here!