Lua Player version 0.14

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 version 0.14

Post by Shine »

On http://www.luaplayer.org you can get the new version 0.14. Now Lua Player has IrDA support, see the new IrDA-example in the Applications directory for a communication between 2 PSPs.

The changelog:

- IrDA support [Shine]
- Windows Emulator [sweetlilmre]
sceIoD* functionality added for System.listDirectory().
sceGuClearColor and sceGuClear implemented.
flicker reduction via GL / PSP drawing sync
attempt to improve sound sync by yeilding in glutIdleFunc() func.
- possible signed bug for timer fixed [Shine]

There is still a bug with the Timer functions. Looks like the clock() PSPSDK function doesn't work, I'll check this for the next version.
Last edited by Shine on Sun Dec 04, 2005 3:19 am, edited 1 time in total.
ka
Posts: 5
Joined: Wed Nov 23, 2005 12:24 pm

Post by ka »

It looks like the timer fix did the trick for all of my code :) thanks a ton!

On another note, I have a friend who is having some issue with memory usage that didn't exist in version .11. We noticed that the pixel format is now true color as of .12. Are all .createEmpty images being saved as full 24bit even if they are created as solid black? If so that could explain his sudden errors in code when using .12, .13 or .14 of luaplayer.
ka
Posts: 5
Joined: Wed Nov 23, 2005 12:24 pm

Post by ka »

Dang. I've also just noticed that the timer doesn't fire at 1000 ticks a second. Any idea what the new rate is? Or is that the bug you mentioned above? :)

Regards,
-Ka
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Sweet! I just compiled version .11 with IrDa! It was pretty easy, though...

The problem I had wasnt IrDa though, but timer. The timer works in .11, and Im compiling .11, but my version was maybe .20kb bigger! I dont know why!
Anyway, I just added '/1000' after the CLOCK_TICKS or whatever. It works now.

Shine, if you, or anyone has the 'real' .11 source, please post it. Thanks.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

youresam wrote:Sweet! I just compiled version .11 with IrDa! It was pretty easy, though...
The problem is not the Lua Player source, but the PSPSDK clock() function. I've created a simple C project with just one main.c, which prints the clock and sometimes (depends on the system time, I think) it is wrong, like creating random values. Maybe you have compiled it with an older version of the PSPSDK, where the clock() function works. Currently I'm updating my toolchain to the latest SVN version to see, if it is perhaps a problem of my local installation. If not, I'll post the problem to the PSPSDK forum.
ka wrote:Are all .createEmpty images being saved as full 24bit even if they are created as solid black? If so that could explain his sudden errors in code when using .12, .13 or .14 of luaplayer.
Yes, but if you want a solid black rectangle, fillRect would be better :-)
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Shine wrote:
youresam wrote:Sweet! I just compiled version .11 with IrDa! It was pretty easy, though...
The problem is not the Lua Player source, but the PSPSDK clock() function. I've created a simple C project with just one main.c, which prints the clock and sometimes (depends on the system time, I think) it is wrong, like creating random values. Maybe you have compiled it with an older version of the PSPSDK, where the clock() function works. Currently I'm updating my toolchain to the latest SVN version to see, if it is perhaps a problem of my local installation. If not, I'll post the problem to the PSPSDK forum.
No, I have a very new version... I just reinstalled the whole SDK maybe 5 weeks ago. But what I dont get is that when I compile it, the size is bigger, yet its the same source...
Also, I just found out that when I try to quit, it freezes then crashes...

The problem is that I want my programs to go the same speed, full color cuts the speed in half. But at the same time, I want all the new features.

EDIT, alright, I'm updating my toolchain to 11/16 at the moment.
EDIT2, toolchain's done installing. I re-compiled it, now it doesnt crash on exit.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

youresam wrote: No, I have a very new version... I just reinstalled the whole SDK maybe 5 weeks ago.
This is ages for the PSPSDK :-)

But the problem occurs in normal C programs, too, see my posting at http://forums.ps2dev.org/viewtopic.php?p=29622
youresam wrote:Also, I just found out that when I try to quit, it freezes then crashes...
This would be a new problem. Can you reproduce it with the latest PSPSDK? Rember to recompile all libraries, too, when updating the toolchain.
youresam wrote: The problem is that I want my programs to go the same speed, full color cuts the speed in half. But at the same time, I want all the new features.
I've heard this now many times, perhaps I'll include a pixel mode switching command in a future version of Lua Player. Should be easy to include it in the new object oriented graphics library (which fraca7 developed for the Python port) with some C++ template and inheritance magic.
youresam wrote: EDIT, alright, I'm updating my toolchain to 11/16 at the moment.
EDIT2, toolchain's done installing. I re-compiled it, now it doesnt crash on exit.
Do you mean from november 16? Then it would be 10 days old, you should update it from SVN.
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Shine wrote:Do you mean from november 16? Then it would be 10 days old, you should update it from SVN.
I did. 11/16 is what it said.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

youresam wrote:
Shine wrote:Do you mean from november 16? Then it would be 10 days old, you should update it from SVN.
I did. 11/16 is what it said.
Latest SVN version is 1490. The clock bug is fixed now in the PSPSDK and will be fixed in 0.15, when I release the new version, which will be compiled with the latest PSPSDK.
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Shine wrote: Latest SVN version is 1490. The clock bug is fixed now in the PSPSDK and will be fixed in 0.15, when I release the new version, which will be compiled with the latest PSPSDK.
Whatever the latest version is from yesterday....I have it from SVN.

And, I still have to say /1000 twice..
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

youresam wrote: And, I still have to say /1000 twice..
Then perhaps you didn't update the newlib. What says "psp-gcc --version"? If it is not 4.0.2 then you should try to checkout psptoolchain and compile everything with ./toolchain.sh.
youresam
Posts: 87
Joined: Sun Nov 06, 2005 1:43 am

Post by youresam »

Shine wrote:
youresam wrote: And, I still have to say /1000 twice..
Then perhaps you didn't update the newlib. What says "psp-gcc --version"? If it is not 4.0.2 then you should try to checkout psptoolchain and compile everything with ./toolchain.sh.
I dont want to spend another day re-compiling the SDK. I mean, at the time I did, .11 was out. So.... I guess I'm doing something wrong with other libs?
dkla
Posts: 21
Joined: Mon Oct 17, 2005 6:55 pm

Post by dkla »

Shine wrote:The problem is not the Lua Player source, but the PSPSDK clock() function. I've created a simple C project with just one main.c, which prints the clock and sometimes (depends on the system time, I think) it is wrong, like creating random values. Maybe you have compiled it with an older version of the PSPSDK, where the clock() function works. Currently I'm updating my toolchain to the latest SVN version to see, if it is perhaps a problem of my local installation. If not, I'll post the problem to the PSPSDK forum.
Would you like some sample code in Lua to test this? I can strip out the Timer code in my game and make it a test case for you... :)
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

dkla wrote:Would you like some sample code in Lua to test this? I can strip out the Timer code in my game and make it a test case for you... :)
Thanks, but I've already fixed it. You can download a preview of 0.15 for 1.5 firmware at http://www.luaplayer.org/LuaPlayer-0.15-preview.zip
chaos
Posts: 135
Joined: Sun Apr 10, 2005 5:05 pm

Post by chaos »

" - outgoing wlan socket support (based on PspPet's "WiFi Multi-Test .03") [Shine]"

awesome :)
Chaosmachine Studios: High Quality Homebrew.
Post Reply