Lua Player for PSP

Discuss using and improving Lua and the Lua Player specific to the PSP.

Moderators: Shine, Insert_witty_name

Post Reply
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Lua Player for PSP

Post by Shine »

Lua Player, for 1.0 and 1.5 compiled. Copy the EBOOT.PBP on your PSP and edit the script.lua for your own great programs and games. The script will be compiled on-the-fly on the PSP, without any compiler on your PC, you just need a text editor! A PNG loader is integrated, so you can write your own games with it, by changing the script.lua and copying all your PNGs to the game directory. And important for newbies (and sometimes for me) : It doesn't crash (or at least it should not), but if you pass a null-pointer to a function, you'll get a nice error message, with the line in the script, which caused the error.
Last edited by Shine on Mon Dec 05, 2005 3:15 am, edited 7 times in total.
ector
Posts: 195
Joined: Thu May 12, 2005 10:22 pm

Post by ector »

Hehe, I had the same idea, though I ported LuaPlus, which has incredibly sweet integration with C++. You can do this:

Code: Select all

//C++:
int hello(float a, const char *instr)
{
  //do whatever
}

lua->RegisterDirect("hello", hello);
and then lua code can just call it:

Code: Select all

if hello(3.0,"yo") > 2 then
  -- do some lua
end
The opposite (calling Lua from C++) looks like this:

Code: Select all

LuaFunction<int> myluafunc&#40;lua, "myluafunc"&#41;;
myluafunc&#40;param1,param2&#41;;
I haven't actually written enough interfaces for it to be usable yet though.
Just making a little plug for LuaPlus here because few people seem to know about it, and it rocks ;)
liquid8d
Posts: 66
Joined: Thu Jun 30, 2005 6:29 am

Post by liquid8d »

freakin awesome :) thanks Shine... this will definitely help those of us that are not as skilled. Maybe my WoW scripting will come in handy now!

LiQuiD8d
emumaniac
Posts: 79
Joined: Sun May 08, 2005 12:22 am

Post by emumaniac »

Is this a proper release now or would you rather sites wait before posting the news :) ?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

emumaniac wrote:Is this a proper release now or would you rather sites wait before posting the news :) ?
This is a first beta version, but it is already useable and it is possible to write other games with it by just changing the Lua script, like Tetris, Pong, PacMan etc. (should take only a few hours for each game for an average programmer), so you can post the news, but perhaps the interface will change a bit, e.g. I think it is better to make the background image optional (now it is required) and I'll enhance the implementation, for example using the Gu-library for faster bit blitting. I'll release the final version next weekend, when some more feedback from users are available to improve and bugfix the current version (I don't know of any bugs in it, but I'm sure it is not bugfree).

In the final version perhaps there will be a Java implementation to run your scripts without changes on Windows, Mac and Linux.
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

Have you considered something like LuaSDL?

http://sourceforge.net/projects/luasdl/

Built with tolua, which isn't so bad.
DiabloTerrorGF
Posts: 64
Joined: Fri Jul 15, 2005 11:44 pm

Post by DiabloTerrorGF »

Nice, I was waiting for a JRE, but this could let me get done what I want to get done.
Kinsman
Posts: 15
Joined: Mon Jul 18, 2005 1:41 am
Location: Canada

Re: Lua for PSP, or: writing games the easy way without comp

Post by Kinsman »

Very cool. I was thinking about porting Javascript to the PSP myself, but this is just as good. :)

You probably have a lot of ideas about what you want to put in your library (sound, graphics, etc.), so I'll just suggest some less obvious things..

* Analog stick reading. I've seen some code in the forums or elsewhere that manages this..

* You should have a 'freeImage' command. (As well as a 'free' command for whatever else you want to load.)

* A timer that handles milliseconds. I checked the OS library for Lua, and it looks like the smallest time it can handle is seconds.

And also, when you release the final version, make sure you give it a general name like 'LUA Player' so we don't have a bunch of homebrew games all named 'Snake' :)

EDIT: If you check Section 3.8 of the "LUA 5.0 reference manual", you should find a section on 'userdata' objects. I think you can use them to avoid having to keep track of image handles - and, LUA will garbage collect image data for you.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: Lua for PSP, or: writing games the easy way without comp

Post by Shine »

Kinsman wrote:* Analog stick reading. I've seen some code in the forums or elsewhere that manages this..

* A timer that handles milliseconds. I checked the OS library for Lua, and it looks like the smallest time it can handle is seconds.

And also, when you release the final version, make sure you give it a general name like 'LUA Player' so we don't have a bunch of homebrew games all named 'Snake' :)

EDIT: If you check Section 3.8 of the "LUA 5.0 reference manual", you should find a section on 'userdata' objects. I think you can use them to avoid having to keep track of image handles - and, LUA will garbage collect image data for you.
Thanks, I'll add this and I'll change the image handling, if Lua helps with GC.
ector wrote:I had the same idea, though I ported LuaPlus, which has incredibly sweet integration with C++
The integration of functions looks nice, I assume this is some template metaprogramming magic. Perhaps I'll use it, if I want to use C++ for PSP.
rinco wrote: Have you considered something like LuaSDL?
Doesn't look like a production quality product. I've found another one: http://lua-users.org/wiki/LuaModuleLuaSdl, should be easy to use it.

I've seperated the project for Lua now, see this topic, so it can be used independently from my Snake game or a Lua player.
VgSlag
Posts: 43
Joined: Thu Jun 30, 2005 5:36 pm

Post by VgSlag »

Thanks for this, its great!

I've started with a tile engine:

http://www.flash-git.net/pspProg1.jpg
http://www.flash-git.net/pspProg2.jpg

I'll be stripping out the mario gfx and using my own eventually.

When I draw my character over the tiles it removes the tiles, is there a way round this? I've not done this before so please excuse my ignorance.

G
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

VgSlag wrote:When I draw my character over the tiles it removes the tiles, is there a way round this? I've not done this before so please excuse my ignorance.
Yes, use images with alpha channel and when moving, call fillBackground, with the position and size of your character and then again draw your character at the next position.

It's a bit a hack, the next version will provide an interface for multiple offscreen images and will be faster, so it should be possible to blit all images in every VSync, including the whole background.
VgSlag
Posts: 43
Joined: Thu Jun 30, 2005 5:36 pm

Post by VgSlag »

Cheers, thats fixed the BG looking messy when I move my character. I'm blitting my tiles to the"foreground" so redrawing the background isn't helping with my character making those dissapear.

Is there a better way of my doing that? Please excuse if my vernacular is all wrong and thanks for any help you can give.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

VgSlag wrote:Cheers, thats fixed the BG looking messy when I move my character. I'm blitting my tiles to the"foreground" so redrawing the background isn't helping with my character making those dissapear.
So you have to blit anything from bottom to top: background (with fillBackground), tiles and the character.

If there are many tiles, this can be slow, this is the reason why I plan to add multiple offscreen support: You have one offscreen image, in which you can blit the background and all tiles. This offscreen image is blitted to the display and the the character will be blitted on it. Or you can use multiple offscreens for parallax scrolling, like in good old jump-and-run games. I'll provide some samples with the new player, but I'll have more time at weekend to implement it.
VgSlag
Posts: 43
Joined: Thu Jun 30, 2005 5:36 pm

Post by VgSlag »

Ohhhh, I see!

Didn't realise it would work like that.

I'll just reblit the 4 tiles around the player ratehr than the whole map, that should work shouldn't it?

Thanks again!
tank
Posts: 4
Joined: Wed Jul 20, 2005 5:12 pm

I love it!

Post by tank »

Hey shine, great work on this.
To the person about the icon always being snake, just use PBP Unpacker and repack it with a new .SFO and new ICON0. Please keep this project going. It is a lot of fun.

here is my first psp lua demo:
- PSP 1.0 ( tested )
http://www.geocities.com/huntingdanimal ... psp1.0.zip
- PSP 1.5 ( untested )
http://www.geocities.com/huntingdanimal ... psp1.5.zip

let me know what you think.
qleyo
Posts: 21
Joined: Fri May 06, 2005 4:34 am
Location: Nottingham, UK
Contact:

Post by qleyo »

tank wrote: here is my first psp lua demo:
- PSP 1.0 ( tested )
http://www.geocities.com/huntingdanimal ... psp1.0.zip
- PSP 1.5 ( untested )
http://www.geocities.com/huntingdanimal ... psp1.5.zip

let me know what you think.
so do i just unpack the zip file and put in my PSP/GAME directory?

edit:tried that... error 80020001 the game could not be started...so i guess thats now how its done, on version 1.5
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

If Lua will support sound, I could write a bemani (=music style, like stepmania) for it. That'd be fun!

From the looks of it, all I'd need right now is that multiple frame-switch option and then playing an mp3 in the background. (especially the latter ;) and maybe some sound effects ...)
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

I'm trying to run Snake and Steel Demo on Windows XP using PSPe09b.

Neither games will load, giving me an error like this:
load C:\Documents and Settings\Administrator\Desktop\PSPfiles\PSPEmulator\pspe09b\pspe\ms0\PSP\GAME\SOFT2\EBOOT.PBP
PBP format
illegal address
PC = 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000
Fatal signal: Segmentation Fault (SDL Parachute Deployed)
Am I doing something wrong or is Lua player not supported by PSPe?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

Just to let you know I'm still working on this project: Preview of the PC Lua Player. The Snake game script works, but only image loading and blitting is implemented so far, I'll do the rest the next days, like joystick implementation with cursor keys, sound etc.
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

Excellent. I'm looking forward to analog stick and sound implimentation.

I've been digging up the source from my various Flash games and apps(just getting things prepped up and ready to dice into some lua scripting).
frogjy
Posts: 1
Joined: Wed Jul 20, 2005 2:29 pm

Post by frogjy »

why i can't download demo???

&#12506;&#12540;&#12472;&#12434;&#34920;&#31034;&#12391;&#12365;&#12414;&#12379;&#12435;
VgSlag
Posts: 43
Joined: Thu Jun 30, 2005 5:36 pm

Post by VgSlag »

Shine, something else that would be really useful would be the ability to rotate an image.

I've got a cool 4-5 player game you could play on psp but it needs to be able to rotate images.
DiabloTerrorGF
Posts: 64
Joined: Fri Jul 15, 2005 11:44 pm

Post by DiabloTerrorGF »

I was making a space invaders type game, but when doing a lot of action it slows down. Anyway to set the PSP to 333mhz when running our programs using LUA?
VgSlag
Posts: 43
Joined: Thu Jun 30, 2005 5:36 pm

Post by VgSlag »

Please excuse me for speaking for Shine but I've already asked this and he replied:
This will be solved with the new GU lib support, again this weekend. Now I'm blitting the images by software, which is really slow. Using the GU lib fom PSPSDK is as fast as 33 million polygons per second, so I think some million full-screen blits per second are possible.
LiquidIce
Posts: 55
Joined: Mon Apr 04, 2005 1:15 am
Contact:

Post by LiquidIce »

Hi Shine. I just wanted to post and say think you for providing this execelent development tool. It is going to be a lot easier for people to make quick games without having to know anything about compiling the toolchain.

It's something like this that sony should pick up sign with their key and put on a UMD with a nice graphics library. Then they give the ability to allow people to create their own games allowing homebrew to thrive without feeding into the piracy of their commercial games.

I'm looking forward to the PC player and the next release of Lua with GU lib. I have not ran into any major bugs, but it was difficult to understand some of the syntax. It helps to learn by example, and so far there are only 2 games out for this. I will be releasing the source code for my game when it's ready.

One thing that would speed up the development process is the ability for Lua to activate the USB on the PSP so you can modify the script while still in the game, then just hook the start button to restart the script when it's finished loading.

Thanks again!

Update: the SVN has a lua/doc directory with some good docs and examples. I also went to the bookstore and read a chapter in a book called "Programming Game AI by Example" by Mat Buckland. It was very helpful in understanding the way Lua works.

Armed with new knowledge, I still have questions.. is there any kind of hitTest in Lua? I want to do a hit test to see if one image intersects with another image on screen. In flash this is as simple as:
_root["bounce" + i].hitTest(_root.instanceName) //Checks to see if the bounce instance intersects the instanceName instance.
DiabloTerrorGF
Posts: 64
Joined: Fri Jul 15, 2005 11:44 pm

Post by DiabloTerrorGF »

VgSlag wrote:Please excuse me for speaking for Shine but I've already asked this and he replied:
This will be solved with the new GU lib support, again this weekend. Now I'm blitting the images by software, which is really slow. Using the GU lib fom PSPSDK is as fast as 33 million polygons per second, so I think some million full-screen blits per second are possible.
I tried putting nothing to the screen as of right now and it still slows down according to my score(it is an active counter, like when you get 300 points it raises your score 100 points every second for three seconds), it slows down when killin lots of enemies at once with special weapons and such.

And this is more like a Ikuruga or 1942 type clone... now...
bugkiller78
Posts: 5
Joined: Fri Jul 22, 2005 11:40 am

Install problem

Post by bugkiller78 »

hi guys,

I already installed PSPToolchain20050713 successfully. Now I'm installing the Lua by running "make" and get this error:

Code: Select all

make&#58; psp-config&#58; command not found
Makefile&#58;18&#58; /lib/build.mak&#58; No such file or directory
make&#58; *** No rule to make target '/lib/build.mak'. Stop.
This might be a dump question cuz I'm new to Unix-based programming. Anyway, thanks for your help!
LiquidIce
Posts: 55
Joined: Mon Apr 04, 2005 1:15 am
Contact:

Post by LiquidIce »

You will need to install both the toolchain and the pspsdk to compile this app. There are several threads in the PSPSDK forum which describe this process in great detail. Good Luck!

BTW, if all you want to do is make a Lua game, all you need to do is edit the script.lua file included in Shine's distribution. You do not need to compile anything to do this.

I'm waiting for Shine to release the next version of the player so I can finish my game. The way it runs right now is unplayable due to the speed of blitting multiple graphics at once, and the alpha issues i'm having for not filling the background correctly. Once I finish my game, I may attempt to add some quick networking code which will save and load high scores from a server.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Re: Install problem

Post by Arwin »

bugkiller78 wrote:hi guys,

I already installed PSPToolchain20050713 successfully. Now I'm installing the Lua by running "make" and get this error:

Code: Select all

make&#58; psp-config&#58; command not found
Makefile&#58;18&#58; /lib/build.mak&#58; No such file or directory
make&#58; *** No rule to make target '/lib/build.mak'. Stop.
This might be a dump question cuz I'm new to Unix-based programming. Anyway, thanks for your help!
you need to make sure you put the correct path settings and environment variables. What environment are you using? Unix? Dos? Cygwin?

I put the following lines in my bashrc (cygwin), taken from some instructions in the ps2dev forums and just replacing all the ps2s with psps:

export PSPDEV=/user/local/pspdev
export PSPSDK=$PSPDEV/pspsdk
export PATH=$PATH:$PSPDEV/bin:$PSPDEV/ee/bin:$PSPDEV/iop/bin:$PSPDEV/dvp/bin:$PSPSDK/bin
bugkiller78
Posts: 5
Joined: Fri Jul 22, 2005 11:40 am

Post by bugkiller78 »

hi Arwin,

Yes, it was all about the PATH. I added C:\cygwin\usr\local\pspdev\bin\ to my path and the installation worked. However, when I "make" the ./lua/sample/ I got some errors:

Code: Select all

$ make
psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -L/usr/local/pspdev/psp/sdk/lib   main.o -llua -lm -lpspdebug -lpsplibc -lpspkernel
 -o luatest.elf
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lobject.o&#41;&#58; In function `luaO_str2d'&#58;
lobject.c&#58;&#40;.text+0x1bc&#41;&#58; undefined reference to `_ctype_'
lobject.c&#58;&#40;.text+0x1c8&#41;&#58; undefined reference to `_ctype_'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lvm.o&#41;&#58; In function `luaV_strcmp'&#58;
lvm.c&#58;&#40;.text+0xa08&#41;&#58; undefined reference to `strcoll'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lauxlib.o&#41;&#58; In function `errfile'&#58;
lauxlib.c&#58;&#40;.text+0x1500&#41;&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lauxlib.o&#41;&#58; In function `luaL_loadfile'&#58;
lauxlib.c&#58;&#40;.text+0x15dc&#41;&#58; undefined reference to `_ctype_'
lauxlib.c&#58;&#40;.text+0x15e0&#41;&#58; undefined reference to `_ctype_'
lauxlib.c&#58;&#40;.text+0x15fc&#41;&#58; undefined reference to `_impure_ptr'
lauxlib.c&#58;&#40;.text+0x162c&#41;&#58; undefined reference to `_impure_ptr'
lauxlib.c&#58;&#40;.text+0x1600&#41;&#58; undefined reference to `_impure_ptr'
lauxlib.c&#58;&#40;.text+0x16c0&#41;&#58; undefined reference to `_impure_ptr'
lauxlib.c&#58;&#40;.text+0x1710&#41;&#58; undefined reference to `_impure_ptr'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lauxlib.o&#41;&#58;lauxlib.c&#58;&#40;.text+0x1714&#41;&#58; more undefined references to `_impure_ptr' follo
w
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lauxlib.o&#41;&#58; In function `luaL_loadfile'&#58;
lauxlib.c&#58;&#40;.text+0x1724&#41;&#58; undefined reference to `__srget'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lauxlib.o&#41;&#58; In function `aux_do'&#58;
lauxlib.c&#58;&#40;.text+0x17e0&#41;&#58; undefined reference to `_impure_ptr'
lauxlib.c&#58;&#40;.text+0x17e4&#41;&#58; undefined reference to `_impure_ptr'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lbaselib.o&#41;&#58; In function `luaB_print'&#58;
lbaselib.c&#58;&#40;.text+0x60&#41;&#58; undefined reference to `_impure_ptr'
lbaselib.c&#58;&#40;.text+0x84&#41;&#58; undefined reference to `_impure_ptr'
lbaselib.c&#58;&#40;.text+0xd4&#41;&#58; undefined reference to `_impure_ptr'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lbaselib.o&#41;&#58;lbaselib.c&#58;&#40;.text+0xd8&#41;&#58; more undefined references to `_impure_ptr' follo
w
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lbaselib.o&#41;&#58; In function `luaB_tonumber'&#58;
lbaselib.c&#58;&#40;.text+0x228&#41;&#58; undefined reference to `_ctype_'
lbaselib.c&#58;&#40;.text+0x234&#41;&#58; undefined reference to `_ctype_'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `pushresult'&#58;
liolib.c&#58;&#40;.text+0x2c&#41;&#58; undefined reference to `__errno'
liolib.c&#58;&#40;.text+0x54&#41;&#58; undefined reference to `__errno'
liolib.c&#58;&#40;.text+0x8c&#41;&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `aux_close'&#58;
liolib.c&#58;&#40;.text+0x320&#41;&#58; undefined reference to `_impure_ptr'
liolib.c&#58;&#40;.text+0x324&#41;&#58; undefined reference to `_impure_ptr'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `g_iofile'&#58;
liolib.c&#58;&#40;.text+0x758&#41;&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `io_lines'&#58;
liolib.c&#58;&#40;.text+0x968&#41;&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `g_read'&#58;
liolib.c&#58;&#40;.text+0xd90&#41;&#58; undefined reference to `fscanf'
liolib.c&#58;&#40;.text+0xde0&#41;&#58; undefined reference to `__srget'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `io_execute'&#58;
liolib.c&#58;&#40;.text+0x12b0&#41;&#58; undefined reference to `system'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `io_date'&#58;
liolib.c&#58;&#40;.text+0x166c&#41;&#58; undefined reference to `localtime'
liolib.c&#58;&#40;.text+0x16a4&#41;&#58; undefined reference to `strftime'
liolib.c&#58;&#40;.text+0x17e4&#41;&#58; undefined reference to `gmtime'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `io_time'&#58;
liolib.c&#58;&#40;.text+0x196c&#41;&#58; undefined reference to `mktime'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `io_difftime'&#58;
liolib.c&#58;&#40;.text+0x1a54&#41;&#58; undefined reference to `difftime'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `io_setloc'&#58;
liolib.c&#58;&#40;.text+0x1b18&#41;&#58; undefined reference to `setlocale'
liolib.c&#58;&#40;.text+0x1b64&#41;&#58; undefined reference to `setlocale'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;liolib.o&#41;&#58; In function `luaopen_io'&#58;
liolib.c&#58;&#40;.text+0x1c98&#41;&#58; undefined reference to `_impure_ptr'
liolib.c&#58;&#40;.text+0x1cb8&#41;&#58; undefined reference to `_impure_ptr'
liolib.c&#58;&#40;.text+0x1c80&#41;&#58; undefined reference to `_impure_ptr'
liolib.c&#58;&#40;.text+0x1cd8&#41;&#58; undefined reference to `_impure_ptr'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lstrlib.o&#41;&#58; In function `str_lower'&#58;
lstrlib.c&#58;&#40;.text+0x214&#41;&#58; undefined reference to `_ctype_'
lstrlib.c&#58;&#40;.text+0x218&#41;&#58; undefined reference to `_ctype_'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lstrlib.o&#41;&#58; In function `str_upper'&#58;
lstrlib.c&#58;&#40;.text+0x2f4&#41;&#58; undefined reference to `_ctype_'
lstrlib.c&#58;&#40;.text+0x2f8&#41;&#58; undefined reference to `_ctype_'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lstrlib.o&#41;&#58; In function `match_class'&#58;
lstrlib.c&#58;&#40;.text+0x80c&#41;&#58; undefined reference to `_ctype_'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/liblua.a&#40;lstrlib.o&#41;&#58;lstrlib.c&#58;&#40;.text+0x810&#41;&#58; more undefined references to `_ctype_' follow
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a&#40;s_ldexp.o&#41;&#58; In function `ldexp'&#58;
../../../../../newlib/libm/math/s_ldexp.c&#58;77&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a&#40;w_acos.o&#41;&#58; In function `acos'&#58;
../../../../../newlib/libm/math/w_acos.c&#58;111&#58; undefined reference to `__errno'
../../../../../newlib/libm/math/w_acos.c&#58;108&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a&#40;w_asin.o&#41;&#58; In function `asin'&#58;
../../../../../newlib/libm/math/w_asin.c&#58;114&#58; undefined reference to `__errno'
../../../../../newlib/libm/math/w_asin.c&#58;111&#58; undefined reference to `__errno'
/usr/local/pspdev/lib/gcc/psp/4.0.0/../../../../psp/lib/libm.a&#40;w_atan2.o&#41;&#58;../../../../../newlib/libm/math/w_atan2.c&#58;110&#58; more undefined references to
`__errno' follow
collect2&#58; ld returned 1 exit status
make&#58; *** &#91;luatest.elf&#93; Error 1

I'm using cygwin on WinXP. Any clue?

Thanks[/code]
Post Reply