Version History
Frequently asked questions:


  What is GBALua?
  What isn't GBALua?
  What consits GBALua of?
  What is GBA?
  What is Lua?
  I'm new to Lua, where to find more info?
  Who are you anyway?
  Disclaimer and stuff

GBALua runttime errors

  My Lua-code doesn't start, why?

GBALua tool problems

  How do I export 16 color images to use in mode 0
  How do I export 256 color images to use in mode 4

General [top]

What is GBALua? [top]

GBALua is a development environment that enables users to develop applications for GBA using Lua or a mixture of both Lua and C/C++. This environment is mainly intended for two types of users groups. First group is the beginner programmers that have none or limited C/C++/Asm knowledge but still would like the try creating some simple gba stuff. The other group is those that would like to use it as an simple and quick prototyping environment on the GBA.

What isn't GBALua? [top]

Just to set things straight I would like to point out that GBALua is *NOT* primary intended to be used in timecritical applications. So I would not like to recive mails like "GBALua suxx, I hate you and I think Asm roxx" or "Do you really think anybody hardcore asm gurus would like to use GBALua?", because it was never intended for asm gurus in the first place.

What consists GBALua of? [top]

So what does GBALua consists of? Basicly it is a a very striped version of the lua package that can be found on, and some functions to access the GBA hardware in a proper manner.

That's just about it. Offcourse there are some more things like documentation, samplecode and a couple of tools aswell. Everything is written by me ( except the following:

The Lua core. (Striped and modified slightly to suite the GBA better) - by Waldemar Celes, Roberto Ierusalimschy, and Luiz Henrique de Figueiredo at TeCGraf, PUC-Rio in Brazil.

The LuaC tool. TeCGraf, PUC-Rio in Brazil.

crt0.S v1.27 and linkerscript v1.3 by the mighty Jeff Frohwein.

What is GBA? [top]

The GBA is short for Gameboy Advance, a portable gameingsystem developed by Nintendo. Gameboy Advance is a trademark of Nintendo of America Inc.

What is Lua? [top]

Lua is a great scripting language owned and maintained by TeCGraf. However, Lua is free to use and can easily be implented into almost any C/C++ environment and offers decent speed and less overhead than many other scripting languages around. Note that the version of Lua that comes with GBALua is a striped and slightly modified version in order to suite the GBA better. More info about Lua can be found at

I'm new to Lua, where to find more info? [top]

There is plenty of info linked from

Who are you anyway? [top]

My name is Danjel Rydén, or dan for short. Sometimes I use my alias SuperIke. I am 23 years old an live in Stockholm, Sweden. When I'm not developing GBALua or any other of my small pet-projects, i work at a company called Netbaby World.

Disclaimer and stuff [top]

GBALua is free and non-proprietary. It can be used for both academic and commercial purposes at absolutely no cost. There re no royalties or GNU-like "copyleft" restrictions. GBALua is public domain. If you use GBALua in some project it would be nice if you gave some credit, like mention it in some readme file or put a link to the GBALua site. Everything in the package is free to do whatever with. I take no responsibility for anything that might happend in assosiation with it.

GBALua runttime errors [top]

My Lua-code doesn't start, why? [top]

Offcourse there could be several things that causes this error. I've been trying to add helpfull messages whenever an error has occured. If one of these messages appears on the screen, read them closely to get a hint of what went wrong. If you don't even get an error-message it's even more troublesome to find the error. First try to add an assert first thing in your lua main( ) function, like this:

  function main( )
    assert(1,"Gotten here, luacode started allright")

If the string you sent with the assert then the problem probably resides within your lua code. If you don't see the string, i'm not sure what could be the problem, the biggest chance is that is has to do with the appending of data by GBALuaAppend and the automatic registering of symbols in the begining of the program. If you can send the project to me I can have a look at it. If you by some chance can't send me the project, maybe you can make a small example project the replicates the problem and send to me at

GBALua Tool Problems [top]

How do I export 16 color images to use in mode 0? [top]

PCX2Agb -b -ot filename.pcx

This will produce 3 files namned: FILENAME_TILES.bin, FILENAME_PALETTE.bin FILENAME_MAP.bin

How do I export 256 color images to use in mode 4? [top]

PCX2Agb -c256 -b -eb -nm filename.pcx

This will produce 2 files namned: FILENAME_TILES.bin, FILENAME_PALETTE.bin

Hosted by: