MicroLua DS Source
MicroLua brings Lua on the Nintendo DS for easy programming
Brought to you by:
reylak
MICROLUA 4.7.1 ============== > By the MicroLua's forum members, from the original project by Risike > README file by Reylak ****************************************************************** I-..... Package content II-.... How to compile III-... About the Embedded File System (EFS) IV-.... General informations V-..... Links VI-.... Credits and other background informations ****************************************************************** I- Package content ------------------ This package contains the following files and directories: * 'Fat': this is exactly how _the root of the cartridge_ would look like, that is to say it contains the 'lua' folder * 'lua': _the sources of Lua_, with many files modified to be run on NDS, and many other things about compiling Lua * 'src': the source files * 'ds': MicroLua sources that are coded in C (because some are coded in Lua in the file 'Fat/libs/libs.lua') * 'source': this directory contains _the main C file of MicroLua_, which will create the final binary * 'Compile All.bat' and 'Compile DS.bat': main files that _ease compilation under Windows environment_; the latter only compiles the 'source' folder, while the first also recreates the Lua library; they use the `make` command just as Linux users do * 'Makefile': the main Makefile * 'logo.bmp' and 'logo\_wifi.bmp': logos to be used for the binary * 'README': the file you are reading right now; you have all my gratitude for this! * 'COPYING': this file describes how MicroLua is distributed. II- How to compile ------------------ I'm too lazy to write here the instructions, so I will simply give you the link to the right page on our SourceForge's wiki: <https://sourceforge.net/p/microlua/wiki/Compile/> III- About the Embedded File System (EFS) ----------------------------------------- As soon as you create a folder called 'efsroot' in this main directory, _its content will be included into MicroLua's binary_ and this latter will be patched to use it. Thus you can have a hidden file system inside the binary to store resources, saves, etc. Using the EFS slightly changes the behaviour of MicroLua on startup: MicroLua _will look for its main directory_, first on Fat, and then on EFS. So, assuming there is not 'lua' directory on the µSD, if you have correctly put a 'lua' folder in 'efsroot' before the compilation, MicroLua will use this folder. Thus, _by replacing 'shell.lua' by the 'index.lua' of your project_ (or at least tweaking MicroLua so it boots your own script), you get **your own NDS binary**! By the way, if you want to _change the icon_, you only have to replace the corresponding BMP files. I want however warn you that this way **is NOT recommended**. Not that it doesn't work well (it does), but whenever a user has several µLua scripts it is far more convenient for him to keep only one MicroLua interpretor instead of a dozen. So please privilegiate sharing your scripts directly than a fat, heavy, ugly NDS binary. IV- General informations ------------------------ The sources of MicroLua are placed in _three folders_: 'Fat/lua/', 'source' and 'lua/src/ds'. Yes, this is not great, and we once planned to put everything in the same place ('source'). If you intend to work on MicroLua, you will probably modify the files that are in these places: * 'Fat/lua/': this folder contains the _shell_ (the first Lua script the user will see) and the file _'libs.lua' which implements some libraries_ coded in Lua * 'source': in this folder, _the file 'main.c' is the one which produces the final binary_; there is also the source of EFSLib in it * 'lua/src/ds': this is the part of MicroLua which is _directly embedded into the lualib_ (our implementation of Lua); almost everything for MicroLua is in there Hint for Windows users: there are two '.bat' files about compiling. 'Compile DS.bat' is intended to compile only the files that are in 'source', when 'Compile All.bat' will also compile the files in 'lua/src/ds'. In any case, these two files use the `make` command so you can go Linux-style by using `make` in a console. Once you have made your improvements, please make sure that _the files you are about to commit are the good ones_. I mean, before doing some mass file adding in your commit, check that there are no useless files like 'MicroLua.nds', only keep the sources. I will not make other advices about managing your work, please just be sure that what you did will work fine. V- Links -------- * <http://www.microlua.xooit.fr>: **main MicroLua site** (actually this is a forum), the active community will help you progress and share your scripts; probably THE place you should check everyday * <https://sourceforge.net/p/microlua/>: **MicroLua's project hosting**; if you want to have the real last MicroLua release, go check it! There is also a good Wiki with tons of informations * <https://sourceforge.net/p/microlua/wiki/GeneralLinks/>: a page full of general links about MicroLua and Lua * <https://sourceforge.net/p/microlua/wiki/Tutorials/>: this page gathers some tutorials * <https://sourceforge.net/p/microlua/wiki/DevLinks/>: you have there some links for the developers * <http://www.lua.org>: **the official Lua website**; you can find here all the informations relative to the language, this will probably be useful to you if you intend to make some homebrews with uLua unless you already know by heart the language VI- Credits and other background informations --------------------------------------------- All the thanks will first go to **Risike**, the true owner of the project, the Creator, our God (let's stop here), as the project originally comes from him. He released the first version of MicroLua in 2008, and maintained it until 2009 (v3.0). At this point, he stated that he didn't want to continue this project and released it open source. But we, **the community**, took care of it, and continued the work. MicroLua sources are of course available. People who must be thanked are _Papymouge_, at least for his great job on Wifi, Nifi, its shell... actually for too many things; _Ced-le-pingouin_, for working on the compilation process and for his great **MLS**, _Grahack_ which have so many good (or not) ideas on how to drive uLua, _Ghuntar_, _thomh@ck_, _thermo__nono_, _geeker_ and myself _Reylak_, for this soooo beautiful README file ;) And last but not least, _all the community_ for creating such magnificent homebrews and supporting us! One last thing about uLua: some people confuse MicroLua with Lua. _Lua is a language_, basically used on computers either as a stand-alone or as a plugin engine. uLua is meant to be **an adaptation of Lua for the Nintendo DS**. So please, MicroLua is NOT a language; LUA is the language; we have a detailed explanation here: <https://sourceforge.net/p/microlua/wiki/Lua/>. That's all, folks. I now just have to thank also you for downloading the sources and maybe improving MicroLua! I hope this way you will enjoy much more MicroLua! > Reylak