Lua Player for PSP

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

Moderators: Shine, Insert_witty_name

Post Reply
MikeHaggar
Posts: 116
Joined: Mon Jul 18, 2005 2:20 am

Post by MikeHaggar »

http://haggar.pocketheaven.com/LUA TextReader 0.1.zip <- Small and crap text viewing program.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

The luaplayer.org site was down again. Looks like all Lisp subprocesses were hanging, because some connection error occured, at least I saw this after I loged into the Lisp process, because there were a stack trace and an error message with a prompt waiting for input, if I would like to abort the error. I've installed Apache, until I found the real problem, so there should be no problems any more for the next time, until I install the Lisp server again :-)
SnowSurfer
Posts: 21
Joined: Fri Jul 08, 2005 2:59 am

Post by SnowSurfer »

shine thanks for the window tester, back to work on my lua game :)
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

Shine, thanks for all your work on Lua. I have a feeling LuaPlayer is going to bring PSP homebrew to a new level.

Are you still working a Mac OSx version of the player?
nevyn
Posts: 136
Joined: Sun Jul 31, 2005 5:05 pm
Location: Sweden
Contact:

Post by nevyn »

Evil Inside wrote:Are you still working a Mac OSx version of the player?
I'm onto that...
F34R
Posts: 29
Joined: Thu Jul 28, 2005 1:11 pm

Post by F34R »

I moved onto something a little bit easier for me to understand. Just outputting text on the screen depending on which button was pressed.

I also made functions for each sentence. I know this is easy for a lot of you, but I am trying to learn.

I didnt have a problem displaying different sentences for each button. How would I go about deleting the previous sentence that was printed out.

here is my short and simple code lol...

Code: Select all

green = Color.new&#40;0,255,0&#41;
blue = Color.new&#40;5,179,252&#41;

-- Define function for printing question to off screen
function printing&#40;&#41;
	screen&#58;print&#40;100,100,"Press X to display text...", green&#41;
end

-- Define function for printing response to offscreen
function viewing&#40;&#41;
	screen&#58;print&#40;100,110,"JUST A SIMPLE TEST...", blue&#41;
end

-- Main loop
while true do

	printing&#40;&#41;
	pad = Controls.read&#40;&#41;
	if pad&#58;cross&#40;&#41; then
		viewing&#40;&#41;
	elseif pad&#58;start&#40;&#41; then
		break
	end

screen.waitVblankStart&#40;&#41;
screen.flip&#40;&#41;

end
What would I do to remove the first sentence when the button is pressed ?
emumaniac
Posts: 79
Joined: Sun May 08, 2005 12:22 am

Post by emumaniac »

Dark Killer --> http://forums.ps2dev.org/viewtopic.php?t=3029 has released KaboomPSP, hes on a crappy freeserver so its mirrored here and a v1.0 eboot addedd --> http://psp-news.dcemu.co.uk/kaboompsp.shtml
nevyn
Posts: 136
Joined: Sun Jul 31, 2005 5:05 pm
Location: Sweden
Contact:

Post by nevyn »

emumaniac wrote:Dark Killer --> http://forums.ps2dev.org/viewtopic.php?t=3029 has released KaboomPSP, hes on a crappy freeserver so its mirrored here and a v1.0 eboot addedd --> http://psp-news.dcemu.co.uk/kaboompsp.shtml
Dude, I've already told you. Lua games should not be bundled with an eboot.
MikeHaggar
Posts: 116
Joined: Mon Jul 18, 2005 2:20 am

Post by MikeHaggar »

F34R wrote:What would I do to remove the first sentence when the button is pressed ?
Use screen:clear
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

nevyn wrote:
Evil Inside wrote:Are you still working a Mac OSx version of the player?
I'm onto that...
Excellent.

I'm dying to get started on a few game ideas I have, but the LuaPlayer, my PSP and Mac OSx don't really play together well. I'm having a lot of problems using LuaPlayer's USB feature and my Lua scripts have been getting corrupted.

So I eagerly await the Mac LuaPlayer so I get started on some titles.

In the meantime, I'm been putting together some backgrounds, titles and character graphics. If anyone wants to collaborate on a project and needs some graphics, email me: evil_inside70 @ yahoo dot com.

Here's a few graphic someone might find useful:
Image
Image
Last edited by Evil Inside on Thu Aug 18, 2005 11:33 pm, edited 1 time in total.
Soban
Posts: 14
Joined: Sat Aug 06, 2005 12:08 pm

Post by Soban »

I hate Lua's implicit pointer usage so much. Is there any way to get something like this to print on the screen:

Code: Select all

white = Color.new&#40;255,255,255&#41;
function myblit&#40;myimage&#41;
 myimage&#58;print&#40;0,0,"yay!",white&#41;
end
myblit&#40;screen&#41;
while  1 do screen.waitVblankStart&#40;&#41; end
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

Soban wrote:I hate Lua's implicit pointer usage so much. Is there any way to get something like this to print on the screen:
Please read the tutorial:
There are two screen buffers: one offscreen buffer and one visible screen buffer. All drawing functions goes to the offscreen buffer. This means your print is not visible until you call screen.flip(), which exchanges the offscreen buffer and the visisble screen buffer. This is known as double-buffering. It is implemented as page-flipping (see the wikipedia entry for an explanation), this is the reason for the name "flip".
Soban
Posts: 14
Joined: Sat Aug 06, 2005 12:08 pm

Post by Soban »

I'll be damned. I got so used to just using print and having the screen flipped at the end of the loop I forgot to do it. Thanks.
nevyn
Posts: 136
Joined: Sun Jul 31, 2005 5:05 pm
Location: Sweden
Contact:

Post by nevyn »

Evil Inside wrote:I'm dying to get started on a few game ideas I have, but the LuaPlayer, my PSP and Mac OSx don't really play together well. I'm having a lot of problems using LuaPlayer's USB feature and my Lua scripts have been getting corrupted.
If you're on a Mac, do NOT FORGET to unmount the PSP from Finder before shutting down disk mode! EXTREMELY important, as Mac buffers reads and writes. You /should/ be getting a big fat nasty warning about it every time you do it, though...
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

nevyn wrote:
Evil Inside wrote:I'm dying to get started on a few game ideas I have, but the LuaPlayer, my PSP and Mac OSx don't really play together well. I'm having a lot of problems using LuaPlayer's USB feature and my Lua scripts have been getting corrupted.
If you're on a Mac, do NOT FORGET to unmount the PSP from Finder before shutting down disk mode! EXTREMELY important, as Mac buffers reads and writes. You /should/ be getting a big fat nasty warning about it every time you do it, though...
I usually do unmount it first, but sometimes I forget and get the warning.

I now have a problem in where the PSP does not show up in the top corner window of Finder like the rest of the mounted drives so I have to navigate to it manually and sometimes the memory stick's folders don't show up.
F34R
Posts: 29
Joined: Thu Jul 28, 2005 1:11 pm

Post by F34R »

MikeHaggar wrote:
F34R wrote:What would I do to remove the first sentence when the button is pressed ?
Use screen:clear
tried that... and it only clears the screen while the button is pushed... let me try a few other things...
MSX
Posts: 12
Joined: Wed Jul 06, 2005 2:16 pm

Post by MSX »

F34R wrote:
MikeHaggar wrote:
F34R wrote:What would I do to remove the first sentence when the button is pressed ?
Use screen:clear
tried that... and it only clears the screen while the button is pushed... let me try a few other things...
Try adding screen:clear() to the beginning of each button if statement like this:

Code: Select all

green = Color.new&#40;0, 255, 0&#41;
pad = Controls.read&#40;&#41;

while true do

	if pad&#58;up&#40;&#41; then
		screen&#58;clear&#40;&#41;
		screen&#58;print&#40;1, 1, "You pressed up!", green&#41;
	end

	if pad&#58;down&#40;&#41; then
		screen&#58;clear&#40;&#41;
		screen&#58;print&#40;1, 10, "You pressed down!", green&#41;
	end

screen.waitVblankStart&#40;&#41;
screen.flip&#40;&#41;

end
Soban
Posts: 14
Joined: Sat Aug 06, 2005 12:08 pm

Post by Soban »

My Lua IDE is almost notepad now : ). It'll be there tomorrow, but I might not have internet access to post it.

Current features include:
-cut/copy/paste
-reads and writes unix and windows files (I think...)
-literal find
-new/open/save
-multiple windows (and you can have multiple windows of a single file)
-uses Lua for config files, so you can easily add features to it.

If I don't post it tomorrow you can expect it this weekend with even more stuff like:
-customizable syntax highlighting
-autotabbing
-find and replace with gfind pattern matching
-function definition lookup (push a button on a function name to jump to -the spot it's defined)
-documentation!

I'm also planning on adding an interactive debugger with all sorts of cool features, but I can't give a time estimate on that.
MikeHaggar
Posts: 116
Joined: Mon Jul 18, 2005 2:20 am

Post by MikeHaggar »

Soban wrote:My Lua IDE is almost notepad now : ). It'll be there tomorrow, but I might not have internet access to post it.

Current features include:
-cut/copy/paste
-reads and writes unix and windows files (I think...)
-literal find
-new/open/save
-multiple windows (and you can have multiple windows of a single file)
-uses Lua for config files, so you can easily add features to it.

If I don't post it tomorrow you can expect it this weekend with even more stuff like:
-customizable syntax highlighting
-autotabbing
-find and replace with gfind pattern matching
-function definition lookup (push a button on a function name to jump to -the spot it's defined)
-documentation!

I'm also planning on adding an interactive debugger with all sorts of cool features, but I can't give a time estimate on that.

Oooh! Sounds good! Me wants ;)
dragula96
Posts: 21
Joined: Fri Jun 17, 2005 4:46 pm

SUPER TURBO TURKEY PUNCHER.....3 (PSP) end caps

Post by dragula96 »

helo, this is what you'v all been waiting for, this is the reason you all bught a PSP and the wait is almost over for.....

SUPER TURBO TURKEY PUNCHER 3 PSP edition.

Image

This Summer, "The streets will flow with the blood of the non belivers"

now you can take the Arcade smash hit to the streets!

UPDATE: Now available for download here:
http://www.megaupload.com/?d=20JD4CX6
mirror provided by emumaniac:
http://psp-news.dcemu.co.uk/turkeypuncher.shtml
or at pspupdates here:
http://files.pspupdates.com/cgi-bin/cfi ... ,0,12,1085
source is messy but it gets the job done.

this is pretty much done unless someone finds a way to keep the music looping forever (see readme.txt).

--- have fun and by all means let me know what you guys think.
Last edited by dragula96 on Thu Aug 18, 2005 1:49 pm, edited 6 times in total.
indianajonesilm
Posts: 15
Joined: Tue Feb 08, 2005 6:36 pm

Re: SUPER TURBO TURKEY PUNCHER.....3 (PSP) end caps

Post by indianajonesilm »

dragula96 wrote:all it needs now is sound, if anyone can help me make lua player compatable wav files out of mp3s please post here.
Hehehe, here you go:
http://webpages.charter.net/aldanafx/st ... ey_wav.zip
dragula96
Posts: 21
Joined: Fri Jun 17, 2005 4:46 pm

THANK YOU SO MUCH!

Post by dragula96 »

thanx, i just finished codeing the sounds in. works great.

can you please let me know what the specifications are for the wav files and what program you use to convert mp3s or ogg files to compatable wav files, so i can keep develuping such "SMASH HITS" :p
Last edited by dragula96 on Thu Aug 18, 2005 9:38 am, edited 1 time in total.
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

Nice.

Post a link here if you can, I'd like to give it a try.
Dark Killer
Posts: 32
Joined: Tue Jan 25, 2005 3:10 am

Post by Dark Killer »

I would just like to request two small features for v0.8 of luaplayer:

1. the ability to execute pbp and elf files. (or even just pbp would be ok.)
2. ability to set the psp's processor speed.

thanks again for your huge contribution to this scene shine :)
LiquidIce
Posts: 55
Joined: Mon Apr 04, 2005 1:15 am
Contact:

Post by LiquidIce »

Great work on the Lua player guys! The new features are slick. *thank you* for the USB support, it has made such a huge difference in development time.

I am wondering if there are any plans to include network support in a future of Lua player. Something along the lines of this:

network.listwifi() //lists all wifi profiles names & wifiId
network.isConnected()
network.connect(wifiId)
network.disconnect()

socket.open(ipaddress:port)
socket.send(message)
socket.readIncomingBuffer()
socket.clearIncomingBuffer()
socket.close()

another possible implementation is similar to what flash does with sendAndLoad() where you specify an http url and you can do an http post to a URL and get back a response from the server. Parse the response and do something useful with the new variables. This can be used to talk to server side scripts like, PSP, ASP, Python, etc, etc...

I have many uses for this including an internet community topscores system for Lua games and for communicating with other IP-enabled devices such as Xboxes, MythTV, any anything else with an ethernet port.

So far I've been able to scrape together some working code to do some of the above things using the wifi examples provided by PspPet. I would imagine, the access point connection process could be part of Lua player, only giving you access to the socket functions after a conection has been made. The VNC port for PSP had a nice wifi selector screen. I'm not quite sure how I can implement the PSP SDK networking code as a Lua function, and the code is pretty ugly anyway (but it works).

I'm intrested to hear comments on how others feel a network connectivity interface can be made inside Lua, and curious to where this feature stands on the 'wishlist' for Lua Player.

Keep up the great work!
indianajonesilm
Posts: 15
Joined: Tue Feb 08, 2005 6:36 pm

Re: THANK YOU SO MUCH!

Post by indianajonesilm »

dragula96 wrote:can you please let me know what the specifications are for the wav files and what program you use to convert mp3s or ogg files to compatable wav files, so i can keep develuping such "SMASH HITS" :p
I tried using Steinberg Wavelab 5 for making wav files, but it seems that it creates files that are incompatible with Lua (maybe because of weird headers). So I ended up using the free sound editor that comes with Nero and that worked. It converts the ogg files directly to wav, and the ogg files were already mono, 16 bit, 22Hz.
nevyn
Posts: 136
Joined: Sun Jul 31, 2005 5:05 pm
Location: Sweden
Contact:

Post by nevyn »

You can also use QuickTime (www.quicktime.com) to export any sound format to WAV. (You'll need Pro though, but I'm sure you can find a serial somewhere...)

LiquidIce: YES, networking is coming to LuaPlayer, which you would have known if you had searched the forum or even just read the scrollback, you're like the tenth person asking.
Nils
Posts: 16
Joined: Wed Aug 03, 2005 2:27 pm

Post by Nils »

:) Great, network :)

Shine's mandelbrot script turned me on, so here my fractal tree demo :
Image

Left of right to generate a new tree.
Get the source here.

I love lua !
Puzzle Bobble - The arcade port!
Evil Inside
Posts: 17
Joined: Thu Jul 21, 2005 4:42 am

Post by Evil Inside »

Here's a title I'm working on for the Controls:

Image

Can anyone use this?

Any feedback?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Re: THANK YOU SO MUCH!

Post by Shine »

indianajonesilm wrote: I tried using Steinberg Wavelab 5 for making wav files, but it seems that it creates files that are incompatible with Lua
There was a bug in mikmodlib, I've fixed it. Version 0.8 can be downloaded from http://www.luaplayer.org

Another changes in this version: it doesn't crash on PNG load failures any more and after restart the screen is cleared.
Dark Killer wrote:I would just like to request two small features for v0.8 of luaplayer:

1. the ability to execute pbp and elf files. (or even just pbp would be ok.)
2. ability to set the psp's processor speed.
Lua Player scripts should be safe. Loading elf or pbp files can compromise the PSP system security (deleting the PSP flash, viruses etc.) and setting the speed could damage the PSP, so I don't implement it.
Post Reply