Page 2 of 6
Re: [Tutorial] Python PSP Programming
Posted: Tue Aug 28, 2012 3:42 pm
by bkuri
@Acid_Snake: Thanks for the tutorials. I was able to get pygame working under Linux and run all the samples. Unfortunately, every time I transfer my files to the PSP, the EBOOT file shows up as "corrupted data" under XMB. Could it be because of my firmware? (I am running 6.60ME 1.8). Any advice would be appreciated.
Secondly, is there a way to emulate the pad buttons and/or joystick when the apps are run outside of the PSP?
Thanks again, and keep up the good work!
Re: [Tutorial] Python PSP Programming
Posted: Wed Aug 29, 2012 11:10 am
by Acid_Snake
I'm using the exact same firmware as you and python works, the only thing I can recommend is to re-download the file.
As for the buttons, they are already emulated:
Cross --> Z
Circle --> S
Square --> A
Triangle --> W
Left trigger --> Q
Right trigger --> E
Start --> V
Select --> C
Up, Down, Left, Right --> Arrow keys
Re: [Tutorial] Python PSP Programming
Posted: Thu Aug 30, 2012 3:37 am
by 4ich
bkuri wrote:@Acid_Snake: Thanks for the tutorials. I was able to get pygame working under Linux and run all the samples. Unfortunately, every time I transfer my files to the PSP, the EBOOT file shows up as "corrupted data" under XMB. Could it be because of my firmware? (I am running 6.60ME 1.8). Any advice would be appreciated.
Secondly, is there a way to emulate the pad buttons and/or joystick when the apps are run outside of the PSP?
Thanks again, and keep up the good work!
did u "save disconnected" your psp ?
i had the same issue first time
Re: [Tutorial] Python PSP Programming
Posted: Thu Aug 30, 2012 10:50 am
by bkuri
Actually I tried multiple ways to send it... I tend to transfer files using PSP-FTPD, but that didn't work at first, so I tried everything from USB mode to even upgrading my CFW to 6.60 PRO-C, but nothing worked.
After quite a few tries I decided to ftp just the EBOOT file (not the entire folder) and it finally copied it correctly. No idea as to why this happened, but at least it's working now.

Re: [Tutorial] Python PSP Programming
Posted: Thu Aug 30, 2012 11:06 am
by bkuri
I made a few bitmap fonts based on the great EnvyCodeR in case someone wants them:
Size 14:
Size 16:
The size 14 looks ok but it's a bit small. The size 16 works great on my desktop but looks garbled on the PSP. Any idea as to why this could be?
Re: [Tutorial] Python PSP Programming
Posted: Thu Aug 30, 2012 11:37 am
by bkuri
Just made a size-18 version and I still get the same problem:
So I guess the limit is 14 for some random reason... Considering that the font.png provided in @Acid_Snake's sample is much bigger it makes things even more confusing.
BTW, these fonts obviously work better with dark backgrounds. If someone needs an inverted one I can get them done pretty quickly.
Re: [Tutorial] Python PSP Programming
Posted: Thu Aug 30, 2012 11:55 am
by Acid_Snake
I have a very good font file, I got it from spider solitaire.
Re: [Tutorial] Python PSP Programming
Posted: Mon Sep 17, 2012 2:57 pm
by svenn
I'm newb to python, but have some knowledge on other languages. So I attempted this tut, its nice. but these are some tips that might come in handy for windows users. (mostly obv stuff)
1) install python
http://www.python.org/download/ (Python 2.7.3 Windows Installer, works fine)
2) add envirment variabele "C:\Python27" to PATH (
http://www.windows7hacker.com/index.php ... -windows-7 )
3) install pygame
http://www.pygame.org/download.shtml (pygame-1.9.1.win32-py2.7.msi works fine)
4) open cmd, try python, close python "exit()", follow tutorial, run script as : python location/script.py
I felt it needed to be written like a baby-version
working my way through your tutorials Acid_Snake, thx !
Re: [Tutorial] Python PSP Programming
Posted: Mon Sep 24, 2012 3:52 am
by blacky94
hi,
i have a problem with the blit function, i try to draw a half-transparent image on a normal image, but when i try to run the script on my psp the half-transparent image isn't transparent, but it works fine when i run it on my pc.
here is the script:
image1 is not transparent (the bg) and image2 is a half-transparent box
Code: Select all
import psp2d
screen = psp2d.Screen()
CLEAR_COLOR = psp2d.Color(0,0,0)
image1 = psp2d.Image("image1.png")
image2 = psp2d.Image("image2.png")
while True:
screen.clear(CLEAR_COLOR)
screen.blit(image2)
screen.blit(image1)
screen.swap()
hope you can solve the prob
Re: [Tutorial] Python PSP Programming
Posted: Mon Sep 24, 2012 4:05 am
by qwikrazor87
You said that image1 is not transparent. Looking at your code I can see that image1 (not transparent) is covering image2 (transparent). So switch those two around and it should work.
Code: Select all
while True:
screen.clear(CLEAR_COLOR)
screen.blit(image1)
screen.blit(image2)
screen.swap()
That way the transparent image is on top of the non-transparent image.