| View previous topic :: View next topic |
| Author |
Message |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Mon Nov 14, 2005 1:17 am Post subject: [ANN] Python for PSP |
|
|
is ready, and the PSP modules are somewhat usable. Downloads and documentation here:
http://fraca7.free.fr/pythonpsp/ |
|
| Back to top |
|
 |
flaxum
Joined: 13 Oct 2005 Posts: 4
|
Posted: Mon Nov 14, 2005 4:16 am Post subject: |
|
|
Thanks a lot!
This is absolutely amazing!
(No more mindless compiling to write a simple program!) |
|
| Back to top |
|
 |
Radleb
Joined: 14 Nov 2005 Posts: 1
|
Posted: Mon Nov 14, 2005 10:03 am Post subject: |
|
|
If u had ported Python Languaje to PSP could you do the same with PHP?
Since both are scripting languaje, and sometimes even share some sintaxis.
Could be posible to port PHP now?
Cya!
Radleb |
|
| Back to top |
|
 |
sherpya

Joined: 03 Oct 2005 Posts: 61
|
Posted: Mon Nov 14, 2005 9:28 pm Post subject: |
|
|
| php is not as good as python as standalone language, it's mainly used for web applications, an intresting stuff can be porting spidermonkey js engine, I've yet made a js shell with addons command for win32/unix, I may look for a psp port, I can re-use python psp module and convert it for use with js |
|
| Back to top |
|
 |
stinkymeat
Joined: 18 Oct 2005 Posts: 10
|
Posted: Tue Nov 15, 2005 8:59 am Post subject: |
|
|
| Woo! Yay! Good work! |
|
| Back to top |
|
 |
benob
Joined: 16 Nov 2005 Posts: 1
|
Posted: Wed Nov 16, 2005 6:36 am Post subject: psp python idea |
|
|
| why not porting pygame to python/psp. this lib is a frontend to sdl and is growing in popularity : there are more and more games created with it. (http://www.pygame.org) |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Fri Nov 18, 2005 1:57 am Post subject: |
|
|
| I've thought about porting pygame, but I wonder if it's not a bit heavy, compared to an ad hoc API... Maybe I'll give it a try anyway. |
|
| Back to top |
|
 |
stinkymeat
Joined: 18 Oct 2005 Posts: 10
|
Posted: Sun Nov 20, 2005 2:28 am Post subject: |
|
|
| According to psp2d module transform can be applied to images and pretty much anything (the way i understand it) what about screen. Is it like opengl where you move the scene, or do you move the screen or all the elements - docs say taht image transform is slow and screen uses hardware accl... |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
Posted: Sun Nov 20, 2005 6:45 am Post subject: |
|
|
Transformations are a half-assed attempt to generalize pixel-based effects on an image, or the screen. Since they operate pixel by pixel and each pixel may be affected arbitrarily through a user-defined callback, there is no way it can be hardware accelerated. It's only intended to pre-calculate some sophisticated visual effects.
As a matter of fact, I don't even know if this class will make it in the final release, I'm not sure it's actually of any use in practice :)
I'll update the wiki tomorrow with detailed information and examples of the stuff that is not covered int the tutorial, including tranformations. |
|
| Back to top |
|
 |
stinkymeat
Joined: 18 Oct 2005 Posts: 10
|
Posted: Sun Nov 20, 2005 10:07 am Post subject: |
|
|
| Good stuff, nice to see that you are committed to a project :D |
|
| Back to top |
|
 |
rinco
Joined: 21 Jan 2005 Posts: 255 Location: Canberra, Australia
|
Posted: Sat Jan 14, 2006 3:46 pm Post subject: |
|
|
Any hints on how to build Python? I put together this command line but I just get errors:
| Quote: | CXX=psp-g++ LDFLAGS="-L`psp-config --pspsdk-path`/lib -lstdc++ -lpsplibc -lpspkernel -lpspuser" ./configure --host=psp --prefix=`psp-config --psp-prefix`
...
psp-gcc -c -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -DPy_BUILD_CORE -o Modules/python.o Modules/python.c
psp-gcc: unrecognized option '-no-cpp-precomp'
cc1: error: unrecognized command line option "-Wno-long-double"
make: *** [Modules/python.o] Error 1
|
|
|
| Back to top |
|
 |
jimparis
Joined: 10 Jun 2005 Posts: 1179 Location: Boston
|
|
| Back to top |
|
 |
mstrhelix
Joined: 10 Feb 2006 Posts: 7
|
Posted: Fri Feb 10, 2006 11:34 am Post subject: |
|
|
| Ok i just recently d-loaded the python interpreter for PSP and i want to contribute to the scene but I cannot seem to find anywhere a PSP2D module that is for PSP. I cannot compile one but would like to develope in Python. can anyone please post a link or tell me where to get it. I went to the PSP Python wiki and looked all over with no luck for d-load anything but source code. |
|
| Back to top |
|
 |
Elric
Joined: 16 Feb 2007 Posts: 2
|
Posted: Fri Feb 16, 2007 5:25 am Post subject: |
|
|
I know that the psp-python site is down temporarily for construction, but has anyone mirrored the old site or made files available for doing development in the interim while the "official" site is down?
I'd like to try some PSP development and python would be my preferred language. Based on googling and searching here, it seems like the port was pretty stable/usable before the site went down.
Thanks for any info/ideas!! :) |
|
| Back to top |
|
 |
Jai_Guru
Joined: 13 Aug 2006 Posts: 12
|
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Fri Feb 16, 2007 10:37 am Post subject: |
|
|
| Elric wrote: | I know that the psp-python site is down temporarily for construction, but has anyone mirrored the old site or made files available for doing development in the interim while the "official" site is down?
I'd like to try some PSP development and python would be my preferred language. Based on googling and searching here, it seems like the port was pretty stable/usable before the site went down.
Thanks for any info/ideas!! :) |
Well, I'm glad I got the stuff when I did (Jan 11, 2007). Hopefully it isn't down long.
I play the solitaire game that was on that site quite often. It's definately stable. |
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Fri Feb 16, 2007 11:39 pm Post subject: |
|
|
Hi!
| J.F. wrote: | | I play the solitaire game that was on that site quite often. It's definately stable. |
The last release fixed a memory leak in fonts, but broke drawing fonts over images....but it's stable. :)
Ciaooo
Sakya |
|
| Back to top |
|
 |
Elric
Joined: 16 Feb 2007 Posts: 2
|
Posted: Sat Feb 17, 2007 2:38 am Post subject: |
|
|
| sakya wrote: | Hi!
| J.F. wrote: | | I play the solitaire game that was on that site quite often. It's definately stable. |
The last release fixed a memory leak in fonts, but broke drawing fonts over images....but it's stable. :)
Ciaooo
Sakya |
Anyone have a pointer to a spot where the last stable build can be downloaded while the main site is down? Thanks! |
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Sat Feb 17, 2007 2:46 am Post subject: |
|
|
Hi!
| Elric wrote: | | Anyone have a pointer to a spot where the last stable build can be downloaded while the main site is down? Thanks! |
You can download from here the latest eboot with a test script that shows the font bug. :)
It's not the "original" release...I've only converted it for FW 1.50 and added the icon.
http://www.MegaShare.com/112221
Ciaooo
Sakya |
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
|
| Back to top |
|
 |
fraca7
Joined: 03 Oct 2005 Posts: 21 Location: Paris
|
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Sun Feb 18, 2007 12:04 am Post subject: |
|
|
Hi! :)
| fraca7 wrote: | | I just fixed the font drawing bug. Binary release at the usual place: |
Wow, many thanks! :)
Downloading now.
Ciaooo
Sakya |
|
| Back to top |
|
 |
sakya
Joined: 28 Apr 2006 Posts: 190
|
Posted: Sun Feb 18, 2007 8:17 pm Post subject: |
|
|
Hi!
I think I found some bugs in this release.
Check this script:
| Code: | import thread
import psp2d
import pspnet
from time import time, sleep
from pspos import freemem, getclock, setclock, getbus, setbus, battery
msg = ""
clock = getclock()
def newThread(pNumber):
global msg
msg = "Started thread " + str(pNumber)
sleep(2)
msg = "Finished thread " + str(pNumber)
def connectionCB(state):
global msg
msg = "STATE: " + str(state)
#Main:
screen = psp2d.Screen()
font = psp2d.Font('font.png')
background_image = psp2d.Image(480,272)
background_image.clear(psp2d.Color(0,0,0))
oldPad = None
number = 0
padTime = None
while True:
screen.blit(background_image, 0, 0, background_image.width, background_image.height, 0, 0)
font.drawText(screen, 20, 120, "CLOCK SET TO: " + str(clock))
font.drawText(screen, 20, 140, "TIME: " + str(time()))
font.drawText(screen, 20, 160, "MESSAGE: " + msg)
newText = "MEM: " + str(freemem() / 1024) + "kb CPU:" + str(getclock()) + "Mhz BUS:" + str(getbus()) + "Mhz BATT:" + str(battery()[3]) + "%"
font.drawText(screen, 0, 0, newText)
screen.swap()
pad = psp2d.Controller()
if pad != oldPad \
and not padTime or time() - padTime >= 0.2:
padTime = time()
if pad.cross:
number += 1
thread.start_new_thread(newThread, (number,))
elif pad.circle:
msg = "Connecting"
pspnet.connectToAPCTL(2, connectionCB)
elif pad.r and clock < 333:
clock += 1
setclock(clock)
elif pad.l and clock > 0:
clock -= 1
setclock(clock)
oldPad = pad
|
1.When you start a new thread (press X) the main thread hangs waiting for the child thread to finish.
2.Sometimes when the script starts the video is corrupted. Launching the application with the wifi switch on seems to fix this problem. Avoiding to import pspnet seems to fix this problem. I think it's the function to check the wlan switch. I had the same problem trying to add this function on my own.
Many thanks for your work.
Ciaooo
Sakya |
|
| Back to top |
|
 |
|