If there's any documentation you could give me a pointer to I would appreciate that. Mainly to avoid wasting your time with my questions:)
There's no documentation outside of this thread and the relevant scripts
1) hostlua is a version of the lua standalone interpreter which is configured like CHDK lua (numbers are ints, various other CHDK specific hacks). See
http://www.lua.org/manual/5.1/manual.html#6 for information about the standalone interpreter
2) emu.lua is a lua script which provides many of the functions that CHDK provides, and has the ability run other lua scripts in this environment.
3) The idea is that you can test and debug some aspects of your script without loading it on the camera.
As described in the emu.lua file, you can execute it like this
lua.exe emu.lua <name of your chdk lua script>
If you want to provide menu variables (a, b c etc) to your script, you can put -a=<number> -b=<number> etc on the command line.