forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Newbie - cygwin Lua emulator question.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
wasted



Joined: 19 Feb 2006
Posts: 6

PostPosted: Sun Feb 19, 2006 9:15 am    Post subject: Newbie - cygwin Lua emulator question. Reply with quote

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 !
Back to top
View user's profile Send private message
wasted



Joined: 19 Feb 2006
Posts: 6

PostPosted: Mon Feb 20, 2006 8:41 pm    Post subject: Reply with quote

Am I asking for something that cannot be done ?
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Tue Feb 21, 2006 5:18 am    Post subject: Reply with quote

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
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
wasted



Joined: 19 Feb 2006
Posts: 6

PostPosted: Sat Feb 25, 2006 10:07 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Sat Feb 25, 2006 10:42 pm    Post subject: Reply with quote

do you have pspsdk path set?
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
wasted



Joined: 19 Feb 2006
Posts: 6

PostPosted: Thu Mar 02, 2006 7:30 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Thu Mar 02, 2006 7:33 am    Post subject: Reply with quote

if you want to compile the whole thingy i got a script for you (which SHOULD do all the stuff)
if you want it, let me know and i mail it to you, please give me feedback as if its working fine... i can release it!

greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
wasted



Joined: 19 Feb 2006
Posts: 6

PostPosted: Fri Mar 03, 2006 7:15 am    Post subject: Reply with quote

Yes please ! Do I need to add my email add to my profile ?
Back to top
View user's profile Send private message
LuMo



Joined: 21 Aug 2005
Posts: 410
Location: Austria

PostPosted: Fri Mar 03, 2006 10:17 pm    Post subject: Reply with quote

you can PM me your email too ;)

greets
lumo
_________________
"Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group