Call for samples

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

Moderators: cheriff, TyRaNiD

mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Call for samples

Post by mrbrown »

As you've probably noticed there are a whopping two samples in PSPSDK currently, sdktest and chp's libgu cube sample. This is unacceptable.

We'd like for the community to submit sample code they think should be included in PSPSDK. Here's the type of code we're looking for:
  • Each sample should demonstrate one feature or concept. It's OK to have a small amount of support code that may be reused across samples, but a sample shouldn't implement a library.
  • Samples should only comprise one or two source files, and two is stretching it.
  • Samples must clearly describe their function, and any code surrounding the sample's function must be adequately documented. It's OK to include a README if you feel it's necessary.
  • Samples must build using PSPSDK's build.mak (just see the other samples for details on how it's used, or ask).
You shouldn't worry too much about which category your sample belongs to - we'll figure that out as we go along. Oh, and I think we can do with only one file browser sample :). Try to be original, and concise.

Have fun!
donour
Posts: 9
Joined: Thu Jun 30, 2005 11:18 am

Post by donour »

EDIT: request withdrawn. That was bad form. Sorry folks.

d
Last edited by donour on Thu Jun 30, 2005 11:58 pm, edited 1 time in total.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

donour wrote:Sorry if this is not the appropriate location to place this, but and audio sample would be great. :)

d
No, don't put requests in here. Only links to working samples.

Thanks!
donour
Posts: 9
Joined: Thu Jun 30, 2005 11:18 am

Post by donour »

I've written an control/input demo. I'll email it to you directly.

d
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

A program which plays the soundtrack of the movie "Le fabuleux destin d'Amélie Poulain" (by Yann Tiersen) with 3 channels, ADSR envelope simulation and a calculated sawtooth waveform.

source
compiled (34 kB unpacked)
rinco
Posts: 255
Joined: Fri Jan 21, 2005 2:12 pm
Location: Canberra, Australia

Post by rinco »

Sony Integrated Remote Control System (SIRCS), stubbed, sampled and submitted.

It can turn on a slim PS2, and play/pause the DVD controls.
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

I don't have write access to SVN repository, but see this topic for an IrDA communication between two PSPs, should be added to the samples.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Shine wrote:I don't have write access to SVN repository, but see this topic for an IrDA communication between two PSPs, should be added to the samples.
It's in now, thanks.
mu5
Posts: 3
Joined: Thu Jul 14, 2005 12:34 am

Post by mu5 »

Ive just got the PSPSDK installed and working :)

I am looking for a new version of hello world that has exit capability.

Also, some basic I/O for the buttons would be great :)
User avatar
Agoln
Posts: 326
Joined: Wed Jun 08, 2005 3:14 am
Location: Fort Wayne, IN

Post by Agoln »

mu5 wrote:Ive just got the PSPSDK installed and working :)

I am looking for a new version of hello world that has exit capability.

Also, some basic I/O for the buttons would be great :)
You have already asked about this in a different thread, and if you look at the 3rd post in this thread, you can see that mrbrown specifically says:
mrbrown wrote:No, don't put requests in here. Only links to working samples.
Please avoid redundent posts and keep threads on-topic.

*edit*
There are working I/O and exit samples in the current SDK, please get a copy of subversion, checkout the SDK and get crackin with that.

http://wiki.pspdev.org/psp:programming_faq
Lego of my Ago!
User avatar
jpadams
Posts: 23
Joined: Sat Jul 02, 2005 1:59 pm
Location: Los Angeles
Contact:

wav loader

Post by jpadams »

i have a working .wav loader sample built with the SDK
based from Nem's code . cleaned up a lot

www.deadsoul.com/psp/wavloader.zip

Updated to fix the looping sample bug

cheers
- Deadsoul
Last edited by jpadams on Tue Jul 19, 2005 5:00 am, edited 3 times in total.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Post it anywhere, and we'll put it in.
Arwin
Posts: 426
Joined: Tue Jul 12, 2005 7:00 pm

Post by Arwin »

mu5 wrote:Ive just got the PSPSDK installed and working :)

I am looking for a new version of hello world that has exit capability.
I made that yesterday: http://www.niwra.nl/psp/code/hellopsp_src.rar
ReJ
Posts: 25
Joined: Sun Apr 04, 2004 12:32 am
Location: Lithuania, Vilnius
Contact:

Post by ReJ »

I've made a sample demonstrating GU environment mapping: http://rej.50megs.com/psp/envmap
Last edited by ReJ on Sat Jul 23, 2005 10:49 pm, edited 1 time in total.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

I put it in the sdk, thx.
ReJ
Posts: 25
Joined: Sun Apr 04, 2004 12:32 am
Location: Lithuania, Vilnius
Contact:

Post by ReJ »

I've wrote another small sample demonstrating rendering to offscreen texture: http://rej.50megs.com/psp/rendertarget
chp
Posts: 313
Joined: Wed Jun 23, 2004 7:16 am

Post by chp »

ReJ wrote:I've wrote another small sample demonstrating rendering to offscreen texture: http://rej.50megs.com/psp/rendertarget
I looked through it, and from what I can see, you're calling sceGuDrawBuffer() outside of sceGuStart()/sceGuFinish(). This is BAD. sceGuDrawBuffer() pushes registers onto the command-list, and if it works for you, it's just dumb luck, really.

Instead, wrap the whole thing like this:

sceGuStart(GU_DIRECT,list);
sceGuDrawBufferList(GU_PSM_4444,(void*)renderTarget,offscreenTexture.stride);
// ... render to rendertarget ...
sceGuDrawBuffer(GU_PSM_4444,(void*)frameBuffer,BUF_WIDTH);
// ... render to main buffer ...
sceGuFinish();

sceGuDrawBufferList() works just as sceGuDrawBuffer(), except it does not store the information about the buffer in the context. (It also does not change the zbuffer pointer, but that should still be the same anyway)

I'll take a go at your sample and see if I can make it work the "proper" way.

EDIT: Ok, sample submitted. I tweaked the code to use sceGuDrawBufferList() instead of sceGuDrawBuffer(), which removed the issues with black screen when called from within sceGuStart/sceGuFinish. I'll look into why it acted up like that, and if it can be remedied.
GE Dominator
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

cpp?

Post by Thanhda »

just wondering is there any c++ examples available in the sdk yet? if so where might it be?
There are 10 types of people in the world: Those who understand binary, and those who don't...
ReJ
Posts: 25
Joined: Sun Apr 04, 2004 12:32 am
Location: Lithuania, Vilnius
Contact:

Post by ReJ »

chp wrote: I'll take a go at your sample and see if I can make it work the "proper" way.

EDIT: Ok, sample submitted. I tweaked the code to use sceGuDrawBufferList() instead of sceGuDrawBuffer(), which removed the issues with black screen when called from within sceGuStart/sceGuFinish. I'll look into why it acted up like that, and if it can be remedied.
Thanks for fixing the sample.

I was using sceGuDrawBuffer() within sceGuStart/sceGuFinish and it was working iirc with sdk approximately 3 weeks old. However, when I wrote the sample for the recent sdk it was behaving strangely, so I put it outside :) (I managed to completely miss the sceGuDrawBufferList() function).
User avatar
jpadams
Posts: 23
Joined: Sat Jul 02, 2005 1:59 pm
Location: Los Angeles
Contact:

Post by jpadams »

updated and fixed the wav loading sample
http://www.deadsoul.com/psp/wavloader.zip
now loads the samples that JJpeerless reported as broken
looping works
still not in SVN :)
ReJ
Posts: 25
Joined: Sun Apr 04, 2004 12:32 am
Location: Lithuania, Vilnius
Contact:

Post by ReJ »

I did one more sample demonstrating simple shadowmapping using GU texture projection functionality (and rendering to offscreen buffer).

http://rej.50megs.com/psp/shadowmap/
User avatar
jpadams
Posts: 23
Joined: Sat Jul 02, 2005 1:59 pm
Location: Los Angeles
Contact:

Post by jpadams »

jpadams wrote:updated and fixed the wav loading sample
http://www.deadsoul.com/psp/wavloader.zip
now loads the samples that JJpeerless reported as broken
looping works
still not in SVN :)
i've moved this and other psp projects to http://labs.wonderbyte.com
and removed it from deadsoul.com

thanks
MrMr[iCE]
Posts: 43
Joined: Mon Oct 03, 2005 4:55 pm

Post by MrMr[iCE] »

This is a useful tool when you need a rapid compile/load/run cycle on the psp. This sample activates the usb port and reloads itself via KernelLoadExec when you hit the Start button.

http://bradburn.net/mr.mr/files/usbdevshell.zip
ReJ
Posts: 25
Joined: Sun Apr 04, 2004 12:32 am
Location: Lithuania, Vilnius
Contact:

Post by ReJ »

Modified sample demonstrating GE signals usage with libgu API.
http://rej.50megs.com/psp/libgu_signals/
Art
Posts: 642
Joined: Wed Nov 09, 2005 8:01 am

Post by Art »

I've moved this and other psp projects to http://labs.wonderbyte.com
and removed it from deadsoul.com
All three links are dead :( Is it available anywhere else without updating my sdk?
weltall
Posts: 310
Joined: Fri Feb 20, 2004 1:56 am
Contact:

Post by weltall »

you could access svn and download from there for example http://svn.ps2dev.org anyway if the sdk is old don't expect that all samples builds fine
Psilocybeing
Posts: 3
Joined: Thu May 04, 2006 7:26 am

Re: wav loader

Post by Psilocybeing »

jpadams wrote:i have a working .wav loader sample built with the SDK
based from Nem's code . cleaned up a lot

www.deadsoul.com/psp/wavloader.zip

Updated to fix the looping sample bug

cheers
- Deadsoul
I'm looking to get a copy of your wavloader example, and even after a lengthy traul through multiple forums/google I've been unable to find a copy of it. It has also been removed from both of your sites. I was wondering if you, or anyone else reading this has a copy of the example source code, as it would come in very handy for a project I'm working on currently.

Thanks,
James
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

Now the viewport bug has been fixed thought I'd post an orthographic sample.

http://insomniac.0x89.org/ortho.c

http://insomniac.0x89.org/Makefile
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

Insert_witty_name wrote:Now the viewport bug has been fixed thought I'd post an orthographic sample.
Thanks; added to pspsdk in rev 2085.
Insert_witty_name
Posts: 376
Joined: Wed May 10, 2006 11:31 pm

Post by Insert_witty_name »

GU sample to illustrate using display lists.

This shows a speed increase of approximately 10%.

http://insomniac.0x89.org/displaylist.c

http://insomniac.0x89.org/Makefile
Post Reply