Serious problems with SDL + PSPGL

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Serious problems with SDL + PSPGL

Post by danzel »

I have a codebase using SDL and PSPGL that previously worked on psp (around revision 1995 I would of last tested it).
I've since then updated my psptoolchain to the latest, with the latest libraries.

Since updating, SDL+PSPGL does not behave anywhere near as expected.

Example Image: (Left = PC. Right=PSP)
http://localhost.geek.nz/crap/wtfpsp.png
(Note: This isn't what the test app should show, this is a similar test showing the same problems)

Test App:
http://localhost.geek.nz/crap/testsdlgl.tar
Make -f Makefile.psp to build for psp, it is set up for 1.50 kernel.
To Build for OE add BUILD_PRX=1 to the makefile and
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(1024*16);
to test.cpp in the #ifdef PSP section.

I've tried reverting SDL and PSPGL to revision 1995 and rebuilding, that didn't fix it. So I'm currently assuming there is a deeper problem caused somewhere since I last built it successfully.
Notable changes in that time:
GCC 4.0.2 -> 4.1.0
newlib 1.13.0 -> 1.15.0

Anyone have any ideas or suggestions? Or even anyone else who is successfully using them together?

I'll try fully revert my toolchain back to r1995 for a test. That will take a while though.

I have tested pure pspgl using the ported nehe tutorials here:
http://forums.ps2dev.org/viewtopic.php?t=5835
I compiled and ran #6 and it worked perfectly.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

I think finding a working toolchain (e.g. fully rev 1995) that works would be most helpful, because then we can compare binary objects, variables & surfaces, etc, and try to figure out where the difference lies.
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

Building the toolchain takes so long zzzz.... (Building now)

One thing I've noticed is that the texture coord calls (glTexCoord2f) are being ignored, no matter what you set them to the same thing is rendered (even if you remove them).
The only difference is what parts of it are rendered, if you make the texture draw over the whole screen, you get this:
http://localhost.geek.nz/crap/wtfpsp2.png (GL_NEAREST filtering)
Whereas if you just render a subsection on the screen, only that area gets drawn (as in the previous image).
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

A full r1995 toolchain doesn't work either :'( (I'm fairly confident I have a full r1995 toolchain)

The other change I can think of between working and not working is that I've moved my PSP from 1.50 to OE firmware.
Running the code in GAME150 doesn't seem to make it work any different than running it under psplink (OE kernel) however.

Edit:
Have uploaded an OE-ified version of the code to:
http://localhost.geek.nz/crap/testsdlgloe.tar
danzel
Posts: 182
Joined: Fri Nov 04, 2005 11:03 pm

Post by danzel »

Yay, figured it out!

glEnable(GL_LINE_SMOOTH);

Remove that and everything is fine!
Using it when drawing lines/points is okay, but when drawing anything else they get messed up.
Sorry, the problem was my code all along! (As it usually is)
Now to figure out some other bits and I'll be sweet :D
Post Reply