| View previous topic :: View next topic |
| Author |
Message |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Thu Oct 20, 2005 8:19 pm Post subject: LUA support now available for firmware v2.0 |
|
|
Hi all.
Just a quick mention that, with Shine's help, I've built a user-mode version of LUAPlayer, and bundled it with the v2.0 EBOOT loader.
So now, you should be able to run LUA scripts on v2.0 firmware.
The support is a little flaky at the moment - quite a few scripts seem to crash or bomb out with a "script could not be found" error (which usually, in this case, means that an unsupported function was called).
The user mode player doesn't support USB functions, but apart from that should be fairly complete.
I'd really appreciate any feedback on which scripts work / don't work, and also ideally anything that those scripts have in common, so that I can fix it.
Thanks,
x
Fanj. |
|
| Back to top |
|
 |
LuMo
Joined: 21 Aug 2005 Posts: 410 Location: Austria
|
Posted: Thu Oct 20, 2005 8:27 pm Post subject: |
|
|
nice work
i do not own a 2.0 psp otherwise i would test for you
greets
lumo _________________ "Good artists copy, great artists steal."
Pablo Picasso
go2lumo.com |
|
| Back to top |
|
 |
KawaGeo
Joined: 27 Aug 2005 Posts: 191 Location: Calif Mountains
|
Posted: Fri Oct 21, 2005 5:27 am Post subject: |
|
|
I have a PSP with firmware 2.0 as well. Will test the eboot after I finish with my current project. It will be a few days to finish, hopefully. _________________ Geo Massar
Retired Engineer |
|
| Back to top |
|
 |
Arwin
Joined: 12 Jul 2005 Posts: 426
|
Posted: Fri Oct 21, 2005 8:08 pm Post subject: Re: LUA support now available for firmware v2.0 |
|
|
| Fanjita wrote: | | The support is a little flaky at the moment - quite a few scripts seem to crash or bomb out with a "script could not be found" error (which usually, in this case, means that an unsupported function was called). |
Wasn't Lua (re)written so that it can run in User mode completely?
I read that many problems with running eboots and such on 2.0 is handling the file locations. When debugging this I would recommend looking at how the offending lua script reads its data-files. |
|
| Back to top |
|
 |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Fri Oct 21, 2005 11:17 pm Post subject: Re: LUA support now available for firmware v2.0 |
|
|
| Arwin wrote: |
Wasn't Lua (re)written so that it can run in User mode completely?
|
Pretty much. USB support was removed (needs kernel-mode), and stdio handlers aren't set (again, kernel-mode) so printfs don't appear in the user-mode player.
This is the main reason why scripts fail with a cryptic "couldn't find script" error, because they're not displaying the root cause for script failure.
The LUA build I'm working with in development now shows the script errors more clearly, so I have a pretty good idea of what's going wrong.
| Arwin wrote: |
I read that many problems with running eboots and such on 2.0 is handling the file locations. When debugging this I would recommend looking at how the offending lua script reads its data-files. |
No, that's pretty much all fixed up now, and isn't a problem for LUA - the getcwd() and relative-path file functions all work fine.
What seems to be causing the most common script errors is failure during Image.load() after a few images have been loaded successfully. There's nothing unusual about the file locations or names in these cases.
My current theory is that the malloc heap is much much smaller in the 2.0 TIF exploit environment - at the point at which the loader starts up, the heap seems to be only around 2MB, which can easily be exhausted.
I think I either need to find a way to free up some heap memory, or else develop my own emulation of the kernel's memory management. |
|
| Back to top |
|
 |
Fanjita
Joined: 28 Sep 2005 Posts: 217
|
Posted: Mon Oct 24, 2005 11:15 pm Post subject: |
|
|
Well, I implemented a new memory manager in the v0.7 loader, and I know of only one LUA script (PBJ wars) that fails to run now in the user-mode player.
You can pick up the update from my website if you need it. |
|
| Back to top |
|
 |
KawaGeo
Joined: 27 Aug 2005 Posts: 191 Location: Calif Mountains
|
Posted: Tue Nov 08, 2005 1:55 am Post subject: |
|
|
I have tested some of homebrew programs on 2.0. Not so bad, so far. Tried my LED Timer which came with 0.11 version of LuaPlayer, the dial went wild. Isn't Timer class included in your current version? Maybe, it was due to kernel issue?
Thanks for your good work. _________________ Geo Massar
Retired Engineer |
|
| Back to top |
|
 |
MikeHaggar
Joined: 18 Jul 2005 Posts: 116
|
Posted: Tue Nov 08, 2005 3:30 am Post subject: |
|
|
| KawaGeo wrote: | I have tested some of homebrew programs on 2.0. Not so bad, so far. Tried my LED Timer which came with 0.11 version of LuaPlayer, the dial went wild. Isn't Timer class included in your current version? Maybe, it was due to kernel issue?
Thanks for your good work. |
From my mail:
Ok, I've found a bug in LuaPlayer for PSP 2.00.
The timer goes 1000 times faster then it should.
---CODE---
myTimer=Timer.new()
myTimer:start()
while true do
screen:clear()
screen:print(0,0,myTimer:time()/1000,Color.new(255,255,255))
screen.waitVblankStart()
screen.flip()
end
---CODE---
That code should display time in seconds, but it does milliseconds instead (notice that I've already divided by 1000, so it counts in seconds in the "normal" luaplayer 0.11)
Hope you can fix it. I really need a fixed version.
Fanjita reply:
Here's a response from Shine (author of LUAPlayer), seems that it's a known bug in the PSPSDK at the moment. He should be releasing a fix within the next week or so.
Shine reply:
in some version of the PSPSDK were the clock bug introduced again. Updating the PSPSDK would solve this, but at the moment this doesn't help, because there is another bug which caused a linker error, but I've wrote to ps2dev.org and mrbrown answered he fix this at weekend. Maybe then I'll release a user mode Lua Player 0.12, (with 3D support) too. |
|
| Back to top |
|
 |
|