How is the speed of LUA on nSpire, especially on the CX versions?
TI's implementation of Lua is purely interpreted. As such, it is several times to hundreds of times slower than native code (C, C++ if it's carefully written, and ASM). See, for example, what LuaJIT can yield (which is great for computation-heavy code, but still won't beat native code): http://luajit.org/performance_arm.html
. Lua is tolerable on the Nspire only because the processor is a 200+ MHz ARM9 executing an instruction in one or two clocks.
Note that besides being purely interpreted, TI's implementation of Lua is stripped down, and two-way incompatible with standard implementations of Lua, in significant ways:
* it doesn't have io.* functions (=> no file and stream I/O), os.* (=> no execute) functions, and IIRC coroutines (but I could be wrong on that third point);
* it has a whole event-driven framework for getting keypresses, redrawing stuff, etc., which is not fundamentally bad;
* it has a proprietary, space-inefficient "TI.Image" image format.
Porting complex Lua programs from other platforms, and to other platforms, is harder as a result of this.
Would it be fast enough for me to be able to develop a smooth running platform game like Megaman/Mario/Metroid at a decent speed?
I seriously doubt it. Pixel-precise scrolling with clipping is CPU-intensive. Tilemap engines had much better be done in native code.
Or would that only be possible through ndless and C?
I think so. However, there's no Ndless for the CX. There may be one in the next few months, but the first OS version released after it would close the hole(s) anyway, and TI built a mechanism to make it more likely that people upgrade their OS: backwards-incompatible documents...
And, is there any functional emulators out that can emulate the CX?
No, there aren't. Reverse-engineering of the partially encrypted boot2 made it clear that emulating the CX properly requires a boot1 dump (which is software copyrighted by TI and cannot be legally redistributed by third parties, so each person would have to dump their calculator's boot1)... and dumping the boot1 requires Ndless for CX, which doesn't exist at the time of this writing.
The Casio Prizm is somewhat less powerful than the Nspire CX, and doesn't have a CAS, but is much more open to development.