Sounds to me like lualib isn't in your path. Confirm that the above three files really are in your /usr/local/pspdev/psp/include/LuMo wrote: src/luaplayer.c:9:17: error: lua.h: No such file or directory
src/luaplayer.c:10:20: error: lualib.h: No such file or directory
src/luaplayer.c:11:21: error: lauxlib.h: No such file or directory
Lua player core development
Moderators: Shine, Insert_witty_name
seems that i updated just when you posted :)
yes, those files are located in the dir, NOW
following files are included:
yes, those files are located in the dir, NOW
following files are included:
- alloca.h
ar.h
argz.h
assert.h
ctype.h
dirent.h
envz.h
errno.h
fastmath.h
fcntl.h
files
getopt.h
grp.h
iconv.h
ieeefp.h
langinfo.h
lauxlib.h
limits.h
locale.h
lua.h
lualib.h
machine
malloc.h
math.h
mikmod.h
mmio.h
newlib.h
paths.h
png.h
pngconf.h
process.h
ptform.h
pthread.h
pwd.h
reent.h
regdef.h
search.h
setjmp.h
signal.h
stdio.h
stdlib.h
string.h
sys
tdefs.h
termios.h
time.h
timer.h
unctrl.h
unistd.h
utime.h
utmp.h
wchar.h
wctype.h
zconf.h
zlib.h
_ansi.h
_syslist.h
If you have compiled Lua before without Makefile.psp, there are old files compiled for your host system. Call a "make clean" and "make -f Makefile.psp clean" and then again a "make -f Makefile.psp" and "make -f Makefile.psp install".LuMo wrote:[UPDATE] Lua did not compile ok
had to force it:now i am getting new errors :/make -f Makefile.psp
make install -f Makefile.psp
Ah, there should be, Like a Net class or something.LuMo wrote:not yet
e.g. Net.startWifi() would start the wifi connection
You could have something to poll available connections like
Code: Select all
Net.connections Array
Net.connections[0][0] == "Home" // SSID {
Net.connections[0][1] == "10.0.0.3" // IP { Read-only as defined on PSP vmenu
Net.connections[0][1] == "10.0.0.1" // Gateway {
Net.pickConnection(0)
time = 0
notconnect = 0
data = ""
while Net.connected = false do
time = time + 1
if time > 200 then
notconnect = 1
break
end
end
if notconnect = 0 then
while Net.connected = true do
if Net.error = true do
screen:print(1,1,Net.LastError(),Color.new(255,255,255))
break
end
sock = Net.Socket.New("10.0.0.1", 80) // This halts the script while it connects, adds any error to sock.Errors array
while sock.connected = true
if sock.error = true do
screen:print(1,1,sock.LastError(),Color.new(255,255,255))
break
end
sock.get(data)
// Decide what to do with the socket data
sock.send("String")
end
end
end
I don't even know if you can define Classes in Lua lol
Proud Dvorak User
US 1.5 PSP (Original)
US 1.5 PSP (Original)
I promise, the reason that we don't have sockets in LuaPlayer isn't because we can't come up with an API...
When sockets in the toolchain is stable, luaplayer will get it.
When sockets in the toolchain is stable, luaplayer will get it.
Last edited by nevyn on Mon Oct 03, 2005 9:11 pm, edited 1 time in total.
They aren't what you'd call "stable" when it comes to the networking end. Also, they aren't using BSD sockets, but rather interface directly with the sce* functions.Zenurb wrote:Well PSPRadio and PSPWifiJukebox seems to work fine...LuMo wrote:the problem is not the lua end
its mainly cause the backend (c-side) is not stable yet (guessing!!)
greets
Why does LuaPlayer have to use BSD sockets?nevyn wrote:They aren't what you'd call "stable" when it comes to the networking end. Also, they aren't using BSD sockets, but rather interface directly with the sce* functions.Zenurb wrote:Well PSPRadio and PSPWifiJukebox seems to work fine...LuMo wrote:the problem is not the lua end
its mainly cause the backend (c-side) is not stable yet (guessing!!)
greets
LuaPlayer should map the sce socket functions, that way, people can get an understanding of them, and when they move onto C/C++ they will find it easier =)
Proud Dvorak User
US 1.5 PSP (Original)
US 1.5 PSP (Original)
Because BSD sockets is the de facto standard for networking. And because there's already a great network library written, and I hate to reinvent the wheel. And because "mapping the sce functions" makes the API damn ugly and non-user-friendly.
"..and when they move onto C/C++...": LuaPlayer isn't a first step of programming, so that newbies can start somewhere instead of C (although it can certainly be used that way). Rather, it's a rapid application development environment, perfectly suitable for "real programmers". Thus the language shouldn't be designed to help you progress onto C, but to make every part of the language/interface fast and simple to use.
Using BSD sockets allows it to be portable, as well, needing no extra code to port it to Win, Mac and Linux (or even, say, nintendo DS, when their bsd sockets stabilize)
"..and when they move onto C/C++...": LuaPlayer isn't a first step of programming, so that newbies can start somewhere instead of C (although it can certainly be used that way). Rather, it's a rapid application development environment, perfectly suitable for "real programmers". Thus the language shouldn't be designed to help you progress onto C, but to make every part of the language/interface fast and simple to use.
Using BSD sockets allows it to be portable, as well, needing no extra code to port it to Win, Mac and Linux (or even, say, nintendo DS, when their bsd sockets stabilize)
Good point. I just am impatient waiting for socket support in LuaPlayer.nevyn wrote:Because BSD sockets is the de facto standard for networking. And because there's already a great network library written, and I hate to reinvent the wheel. And because "mapping the sce functions" makes the API damn ugly and non-user-friendly.
"..and when they move onto C/C++...": LuaPlayer isn't a first step of programming, so that newbies can start somewhere instead of C (although it can certainly be used that way). Rather, it's a rapid application development environment, perfectly suitable for "real programmers". Thus the language shouldn't be designed to help you progress onto C, but to make every part of the language/interface fast and simple to use.
Using BSD sockets allows it to be portable, as well, needing no extra code to port it to Win, Mac and Linux (or even, say, nintendo DS, when their bsd sockets stabilize)
Is there a way to bundle your Lua scripts directly into the LuaPlayer Eboot and have bundled applications? *Is a noob*
Proud Dvorak User
US 1.5 PSP (Original)
US 1.5 PSP (Original)
I mean like, with python, you can embed the script directly into the interpeter and have one file which runs the interpreter which loads the code from a resource in itself, can you do that with LuaPlayer?LuMo wrote:you could add your code to the boot.lua, which will be included into the eboot (shine said something like that)
Proud Dvorak User
US 1.5 PSP (Original)
US 1.5 PSP (Original)
Cool =] My last question for now. I'm in college, and I'll tinker more when I get home.LuMo wrote:lots of questions hehe, you can compile luaplayer and include the script to the binary, but a.f.a.i.k. you are not able to include the resources
zip support (loading scripts and res. from a zip file) is planned to be done
greets
Proud Dvorak User
US 1.5 PSP (Original)
US 1.5 PSP (Original)
C-Side of LuaPlayer(windows)
well i tried to add a >>little<< function just to test if it works.
i copied the blit-function (to seperate files)
and compiled it, which worked without any errors!
i tested created an lua file to test the original code (so i did not **** something up)
test successful
after that i changed the line
this should give me exactly the same result as the one above (due just copying the function)
but luaplayer returns me the following error:
in the line where myblit is used!
i do not know what this means...
any ideas?
[EDIT] i just get the same error when i put the function in the same file (graphics.c and luagraphics.c)
thanks in advance
lumo
i copied the blit-function (to seperate files)
and compiled it, which worked without any errors!
i tested created an lua file to test the original code (so i did not **** something up)
Code: Select all
--load images
picture=Image.load('landscape.png')
backbuffer = Image.createEmpty(480, 272)
while not Controls.read():start() do
backbuffer:blit(0,0,picture,0,0,240,272,false)
backbuffer:blit(240,0,picture,240,0,240,272,false)
screen:blit(0,0,backbuffer,0,0,backbuffer:width(),backbuffer:height(),false)
screen.waitVblankStart()
screen.flip()
end
after that i changed the line
Code: Select all
backbuffer:blit(0,0,picture,0,0,240,272,false)
backbuffer:myblit(240,0,picture,240,0,240,272,false)
but luaplayer returns me the following error:
Code: Select all
loop in gettable
i do not know what this means...
any ideas?
[EDIT] i just get the same error when i put the function in the same file (graphics.c and luagraphics.c)
thanks in advance
lumo
What do you mean here exactly? I've been using PSP Radio last weekend for a fair bit, and I had no problems ... But I assume that you'll likely know something about the internals that I don't. ;)nevyn wrote:They aren't what you'd call "stable" when it comes to the networking end. Also, they aren't using BSD sockets, but rather interface directly with the sce* functions.Zenurb wrote:Well PSPRadio and PSPWifiJukebox seems to work fine...LuMo wrote:the problem is not the lua end
its mainly cause the backend (c-side) is not stable yet (guessing!!)
greets
Why do you want XML for config files? You can do it in Lua, if you need hierarchicly configs:haust wrote:Another request : would it be possible to add LuaExpat for xml support. I think it would be useful for data storing, config file and things like that....
Code: Select all
config = { a={1,2,b={3}}, c="Hallo"}
Tried connecting using DHCP? Seen what happens when a socket timeout? Those problems were fixed in the latest release, but that was like today, so I haven't had time to look at it.Arwin wrote:What do you mean here exactly? I've been using PSP Radio last weekend for a fair bit, and I had no problems ... But I assume that you'll likely know something about the internals that I don't. ;)
And it's still not socket.h. There's a guy, David Beyer, who's working on that, though.
Well, I should had say (sorry if my english is not correct) that I know Lua tables can be used for all kind of needs including config data. However I like separation between code and data. When I need to modify the core logic I change the source code, when I need to modify the visuals, audio, config, etc. I change the data files, but it's just me....Shine wrote:Why do you want XML for config files? You can do it in Lua, if you need hierarchicly configs:and the just a dofile to read the config. But if you really want to use XML, there is a very short pure Lua solution: http://lua-users.org/wiki/LuaXmlCode: Select all
config = { a={1,2,b={3}}, c="Hallo"}
Anyway it was just a request, I can live without it :)
vh.
You sound like a Java or C++ programmer :P
But I guess that's to be expected from someone who prepends all his member variables with m_ *shudder*
But seriously, why would you need a seperate config file format in a Lua app? I mean, the lua table constructor syntax is actually far more suited to the task than XML, and it will be faster to parse as well ;)
And why shouldn't you be able to seperate code and data just because the data is in Lua tables?
But I guess that's to be expected from someone who prepends all his member variables with m_ *shudder*
But seriously, why would you need a seperate config file format in a Lua app? I mean, the lua table constructor syntax is actually far more suited to the task than XML, and it will be faster to parse as well ;)
And why shouldn't you be able to seperate code and data just because the data is in Lua tables?
Separation of code and data is a good idea for bigger programs, but I don't see why you don't want to use tables for it. You have your main program, index.lua (or script.lua)haust wrote:However I like separation between code and data. When I need to modify the core logic I change the source code, when I need to modify the visuals, audio, config, etc. I change the data files
Code: Select all
dofile("level1.lua")
...
doSomethingWith(level.name, level.timeLimit)
Code: Select all
level = {
name = "The big one",
timeLimit = 12345
}
I apologize in advance if this would be better suited in a different thread.
I've ported the windows emulator to SDL. It should be possible to get it to run on a wide array of devices and other consoles. I did not port sound, nor (obviously) 3d.
I just took the src/emulator/windows/windows.c and ported the glut code to SDL, and took sound.c and made a set of stub functions.
[nevermind this part, bug fixed, see footnote]
AFAIK, there is only one bug that is not fixed at the moment. It seems that certain blitting functions do not work, and I am unsure why this is. For example:
- helloworld works
- clock, calculator, minesweeper works
- stars works
- fractal doesn't work
- snake - the background is there, but the snake itself does not show up.
I just did this in the past hour or two, so probably the fix will appear soon.. but if anyone knows what is going on offhand please let me know.
I'll pass the code onto whoever wants it once the bug is fixed.
Cheers,
Tom
Update: Bug fixed. i updated to the SVN source (I was using the 0.11 release) and it fixed it. Games appear to be completely playable (sans sound & 3d).
I've ported the windows emulator to SDL. It should be possible to get it to run on a wide array of devices and other consoles. I did not port sound, nor (obviously) 3d.
I just took the src/emulator/windows/windows.c and ported the glut code to SDL, and took sound.c and made a set of stub functions.
[nevermind this part, bug fixed, see footnote]
AFAIK, there is only one bug that is not fixed at the moment. It seems that certain blitting functions do not work, and I am unsure why this is. For example:
- helloworld works
- clock, calculator, minesweeper works
- stars works
- fractal doesn't work
- snake - the background is there, but the snake itself does not show up.
I just did this in the past hour or two, so probably the fix will appear soon.. but if anyone knows what is going on offhand please let me know.
I'll pass the code onto whoever wants it once the bug is fixed.
Cheers,
Tom
Update: Bug fixed. i updated to the SVN source (I was using the 0.11 release) and it fixed it. Games appear to be completely playable (sans sound & 3d).