Hi all - I've been searching through and am just stuck on how to invoke the Lua emulator in cygwin.
I've installed the toolchain etc... and can get a lua hello world test script to run, but one that uses psp functions fails with:
$ lua script.lua
lua: script.lua:2: attempt to index global `Color' (a nil value)
stack traceback:
script.lua:2: in main chunk
[C]: ?
where the script contains :
$ cat script.lua
-- create a new Color object
green = Color.new(0, 255, 0)
-- show some text on offscreen
screen:print(200, 100, "Hello World!", green)
-- flip visible and offscreen
screen.flip()
-- wait forevever
while true do
screen.waitVblankStart()
end
I guess I need to include the PSP library that contains the Color function, but do not know how to do this.
Any help much appreciated !
Newbie - cygwin Lua emulator question.
Moderators: Shine, Insert_witty_name
you can't do it that way.
what you try is calling luaplayer-specific functions on normal lua release
you need to get luaplayer for windows
put it in a folder eg ~/luaplayerwindows
then enter this directory and put your script.lua in.
start the script by typing
./luaplayer.exe script.lua
thats it
greets
lumo
what you try is calling luaplayer-specific functions on normal lua release
you need to get luaplayer for windows
put it in a folder eg ~/luaplayerwindows
then enter this directory and put your script.lua in.
start the script by typing
./luaplayer.exe script.lua
thats it
greets
lumo
Thanks - that makes sense.
I've followed the instructions at http://wiki.ps2dev.org/psp:lua_player:compiling and got LuaPlayer source. When I try to compile I get the error for missing header file - tdefs.h (see below).
Can anyone help with another location for the source ?
wasted@Sun ~/source/LuaPlayer
$ make -f Makefile.windows
g++ -I. -I/include -I/sdk/include -I/include -Isrc -c -o src/luacontrols.o sr
c/luacontrols.cpp
In file included from src/luacontrols.cpp:2:
src/luaplayer.h:5:19: tdefs.h: No such file or directory
src/luacontrols.cpp:4:21: pspctrl.h: No such file or directory
I've followed the instructions at http://wiki.ps2dev.org/psp:lua_player:compiling and got LuaPlayer source. When I try to compile I get the error for missing header file - tdefs.h (see below).
Can anyone help with another location for the source ?
wasted@Sun ~/source/LuaPlayer
$ make -f Makefile.windows
g++ -I. -I/include -I/sdk/include -I/include -Isrc -c -o src/luacontrols.o sr
c/luacontrols.cpp
In file included from src/luacontrols.cpp:2:
src/luaplayer.h:5:19: tdefs.h: No such file or directory
src/luacontrols.cpp:4:21: pspctrl.h: No such file or directory
No I don't. I have :
PSPDEV=/usr/local/pspdev
Looking at http://wiki.ps2dev.org/psp:lua_player:compiling the only reference to pspsdk is in the block for making freetype:
cd freetype
sh autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
Do I need to start from this point ?
Thanks.
PSPDEV=/usr/local/pspdev
Looking at http://wiki.ps2dev.org/psp:lua_player:compiling the only reference to pspsdk is in the block for making freetype:
cd freetype
sh autogen.sh
LDFLAGS="-L`psp-config --pspsdk-path`/lib -lc -lpspuser" \
./configure --host psp --prefix=`psp-config --psp-prefix`
make
make install
Do I need to start from this point ?
Thanks.