| View previous topic :: View next topic |
| Author |
Message |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sat Apr 15, 2006 10:14 am Post subject: lua on PSP (not lua player !) |
|
|
hi,
i have to read my own lua script without using the excellent (but too complete in my case) luaplayer
any ideas ?
i had a look inside the lua player samples but the lua lib files (header and lib) are not present...
thanks in advance ! |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
Posted: Sat Apr 15, 2006 8:13 pm Post subject: |
|
|
Check out http://www.lua.org and download the source, and the docs.
Hope this helps,
Pete |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sat Apr 15, 2006 8:45 pm Post subject: |
|
|
yes i can indeed compile all by myself but just wanted to know if anybody had already compiled and created the lua libraries for the psp toolchain ?
it's just to not waste my time if it available somewhere ..
thanks ! |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sat Apr 15, 2006 10:29 pm Post subject: |
|
|
| great !! thanks a lot ! |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sat Apr 15, 2006 10:38 pm Post subject: |
|
|
it looks to contain what i'm looking for but i don't see any download button !??
i must be missing something ! :) |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sun Apr 16, 2006 4:04 am Post subject: |
|
|
great it seems to work except i don't have the permission !? :-(
i've the following error :
svn: Can't connect to host 'syn.ps2dev.org': Connection refused
any ideas ? |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
Posted: Sun Apr 16, 2006 4:29 am Post subject: |
|
|
You've typed "syn.ps2dev.org" there - is that a typo?
The line I gave should work - it worked for me, I tested it before posting.
Pete |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sun Apr 16, 2006 8:04 am Post subject: |
|
|
yep you right, just a little error in what i've typed
now it's ok
thanks a lot !! |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
Posted: Sun Apr 16, 2006 8:21 am Post subject: |
|
|
You're welcome.
Pete |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sun Apr 16, 2006 10:59 am Post subject: |
|
|
ok now i can compile and test the lua sample
i've modified it and everything works perfectly
so i've tried to put some lua stuff in my own code
but when i try to link with lua libs : -llualib -llua (like in the lua sample !)
i've the following errors :
| Code: |
Performing Makefile project actions
Makefile (30) : warning: overriding commands for target `kxploit'
c:/cygwin/usr/local/pspdev/psp/sdk/lib/build.mak (137) : warning: ignoring old commands for target `kxploit'
rm -f nXviewer.elf nXviewer.o _libs/callbacks.o _libs/vram.o PARAM.SFO EBOOT.PBP EBOOT.PBP
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o nXviewer.o nXviewer.c
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o _libs/callbacks.o _libs/callbacks.c
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o _libs/vram.o _libs/vram.c
C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc -I. -Ic:/cygwin/usr/local/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -Lc:/cygwin/usr/local/pspdev/psp/sdk/lib nXviewer.o _libs/callbacks.o _libs/vram.o -lpspgum -lpspgu -lm -lpspusb -lpspusbstor -llualib -llua -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o nXviewer.elf
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_tan':
lmathlib.c:(.text+0xd0): undefined reference to `tanf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_asin':
lmathlib.c:(.text+0x110): undefined reference to `asinf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_acos':
lmathlib.c:(.text+0x150): undefined reference to `acosf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_atan':
lmathlib.c:(.text+0x190): undefined reference to `atanf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_atan2':
lmathlib.c:(.text+0x1e8): undefined reference to `atan2f'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_ceil':
lmathlib.c:(.text+0x22c): undefined reference to `ceilf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_mod':
lmathlib.c:(.text+0x2c4): undefined reference to `fmodf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_sqrt':
lmathlib.c:(.text+0x31c): undefined reference to `sqrtf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_pow':
lmathlib.c:(.text+0x378): undefined reference to `powf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_log':
lmathlib.c:(.text+0x3bc): undefined reference to `logf'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_log10':
lmathlib.c:(.text+0x3fc): undefined reference to `log10f'
/usr/local/pspdev/lib/gcc/psp/4.0.2/../../../../psp/lib/liblualib.a(lmathlib.o): In function `math_exp':
lmathlib.c:(.text+0x43c): undefined reference to `expf'
collect2: ld returned 1 exit status
psp-fixup-imports nXviewer.elf
Error, could not find file nXviewer.elf
mksfo 'nXviewer' PARAM.SFO
psp-strip nXviewer.elf -o nXviewer_strip.elf
psp-strip: 'nXviewer.elf': No such file
pack-pbp EBOOT.PBP PARAM.SFO NULL \ NULL NULL NULL \ NULL nXviewer_strip.elf NULL
ERROR: Could not open the file. (nXviewer_strip.elf)
make: *** [EBOOT.PBP] Error 255
|
i've searched for the maths functions asked but nothing (except this from lua package) contains these !!!
i really don't understand how the lua sample can link !
there's somthing strange here !!
any ideas welcome !
here is the makefile i use :
| Code: |
TARGET = nXviewer
OBJS = nXviewer.o _libs/callbacks.o _libs/vram.o
INCDIR =
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS= -lpspgum -lpspgu -lm -lpspusb -lpspusbstor -llualib -llua
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = nXviewer
PSPSDK=c:/cygwin/usr/local/pspdev/psp/sdk#$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
ifneq ($VS_PATH),)
CC = C:/cygwin/usr/local/pspdev/bin/vs-psp-gcc
CXX = C:/cygwin/usr/local/pspdev/bin/vs-psp-g++
endif
XTARGET = $(shell echo $(TARGET)000000 | cut -b1-6)
KXDIR = $(TARGET)
KXDUMMY = $(TARGET)%
kxploit: $(TARGET).elf $(PSP_EBOOT_SFO)
mkdir -p "$(KXDIR)"
$(STRIP) $(TARGET).elf -o $(KXDIR)/$(PSP_EBOOT)
mkdir -p "$(KXDUMMY)"
$(PACK_PBP) "$(KXDUMMY)/$(PSP_EBOOT)" $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) NULL $(PSP_EBOOT_PSAR)
cp -r $(KXDIR) $(PSP_MOUNT)/PSP/GAME/
cp -r $(KXDUMMY) $(PSP_MOUNT)/PSP/GAME/
|
if someone could tell be wich library contains theses maths functions i could check my sdk and update if needed
but that doesn"t explain how the lua sample can link !! ??? |
|
| Back to top |
|
 |
zoret
Joined: 19 Mar 2006 Posts: 22
|
Posted: Sun Apr 16, 2006 11:15 am Post subject: |
|
|
ok i've just found it !
the lua libs need the lm lib so i have to put this lib at the end of the libs list
i've simply modified my makefile :
LIBS= -lpspgum -lpspgu -lpspusb -lpspusbstor -llualib -llua -lm
the linker is rather dumb...
nevermind, now it works !! |
|
| Back to top |
|
 |
PeterM
Joined: 31 Dec 2005 Posts: 125 Location: Edinburgh, UK
|
Posted: Mon Apr 17, 2006 2:50 am Post subject: |
|
|
Glad it works now - yes, the fact that order is important in linking really is a pain sometimes.
I wonder if this feature actually has any practical use... |
|
| Back to top |
|
 |
|