C/C++ Programming Help Thread
This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; How much harder is it than mp3 decoding + streaming? Btw, i am looking for some lua examples. Thanks! ;)...
-
01-04-2008, 04:01 PM #7381QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
How much harder is it than mp3 decoding + streaming? Btw, i am looking for some lua examples. Thanks! ;)
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-04-2008, 04:02 PM #7382lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Its easier.
But it seems that you had so much trouble with MP3 so it may be hard to some extent.
-
01-04-2008, 04:13 PM #7383
How exactly does streaming work? Is it like you load a chunk of data, then trash that, and load a new chunk? Or are you continuously loading small parts?
[IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]
Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.
-
01-04-2008, 04:50 PM #7384QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Wikipedia helped me.
Zitat von Judas
http://en.wikipedia.org/wiki/Dynamic_data
http://en.wikipedia.org/wiki/Streaming_media
http://www.webopedia.com/TERM/s/streaming.html
Learn about those.
Edit: Ugh, i can't pass my own level in my game....should be a challenge for you guys when i release it. Anyways, is it smarter to use osl? I have a problem with including -lmikmod in my makefile so it never works for me.Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-04-2008, 05:25 PM #7385
Thanks. And I don't know about OSL, as I've only ever used the graphics library. To my understanding, they're both about the same speed, as neither use the hardware to render graphics. But OSL has some function pre-written to make it easier. (Correct me if I'm wrong)
Zitat von TMNT
[IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]
Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.
-
01-04-2008, 05:39 PM #7386QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Exactly, which is why i want to use OSL. Anyways, does anyone know what to do after the package installs here:
http://oslib.playeradvance.org./doku.php?id=day1
I can't understand a single word in the installer since its in French.
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-04-2008, 05:47 PM #7387lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Um, yea...Once you run the installer then everything else should be easy since the instructions on the site is in English :/
The installer is pretty straight forward and you should be able to know what it wants...I was able to and I don't know french.
Or you can just install it manually instead of installing cygwin, pspsdk and oslib...Since you already have the sdk and stuff set up your just making it harder when using the installer.
-
01-04-2008, 05:51 PM #7388QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
But mikmod doesn't work for me...also, my toolchain is really really out of date, and a lot of programs don't compile for me.
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-04-2008, 05:52 PM #7389lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Um, update sdk then install OSLib manually.
Heh, maybe thats why mikmod don't work for you either and I think that installer installs a older version anyways.
-
01-04-2008, 06:10 PM #7390QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
Can anyone help me out with step 3? Explain it a bit?
http://oslib.playeradvance.org./doku.php?id=day1Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-04-2008, 06:23 PM #7391lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
Dude, seriously, what don't you get on step 3? I went over it just now and I understand pefectly.
-
01-04-2008, 06:42 PM #7392QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
How do i make it work with my psp? I mean what's the point of step 3? To configure the program with cygwin? Why not use cygwin only?
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-04-2008, 08:33 PM #7393lol

- Registriert seit
- Aug 2006
- Ort
- Whittier, CA
- Beiträge
- 5.791
- Points
- 20.859
- Level
- 91
- Downloads
- 0
- Uploads
- 0
To make it work with your PSP you compile the program with cygwin :/
I don't know French but I do know English so I know that step 3 makes the eboot using VS...How can you not understand that?
-
01-04-2008, 09:13 PM #7394QJ Gamer Blue
- Registriert seit
- Sep 2006
- Ort
- Homebrewland, CA
- Beiträge
- 191
- Points
- 4.295
- Level
- 41
- Downloads
- 0
- Uploads
- 0
Hello, I'm having problems installing the psptoolchain on cygwin. If anyone could help I'm getting this error after running ./toolchain.sh:
Code:make[2]: Leaving directory `/tmp/pspdev/binutils-2.16.1/build-psp/bfd/po' make[2]: Entering directory `/tmp/pspdev/binutils-2.16.1/build-psp/bfd' make[3]: Entering directory `/tmp/pspdev/binutils-2.16.1/build-psp/bfd' make[3]: Nothing to be done for `install-exec-am'. /bin/sh ../../bfd/../mkinstalldirs /usr/local/pspdev/i686-pc-cygwin/psp/lib /bin/sh ../../bfd/../mkinstalldirs /usr/local/pspdev/i686-pc-cygwin/psp/include /bin/sh ./libtool --mode=install /usr/bin/install -c libbfd.la /usr/local/pspde v/i686-pc-cygwin/psp/lib/libbfd.la /usr/bin/install -c .libs/libbfd.lai /usr/local/pspdev/i686-pc-cygwin/psp/lib/li bbfd.la /usr/bin/install: cannot create regular file `/usr/local/pspdev/i686-pc-cygwin/p sp/lib/libbfd.la': Permission denied make[3]: *** [install_libbfd] Error 1 make[3]: Leaving directory `/tmp/pspdev/binutils-2.16.1/build-psp/bfd' make[2]: *** [install-am] Error 2 make[2]: Leaving directory `/tmp/pspdev/binutils-2.16.1/build-psp/bfd' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/tmp/pspdev/binutils-2.16.1/build-psp/bfd' make: *** [install-bfd] Error 2 ERROR INSTALLING BINUTILS
-
01-04-2008, 10:33 PM #7395QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
oh hi1:29:29 AM Junkie: 7394 <- lol he got permission errors in cygwin xD does it even check permissions?
1:29:44 AM Junkie: I don't have Mass Effect
1:29:48 AM Ryalla: lmao
1:29:54 AM Junkie: It's a bit too RPG-y for me
1:30:00 AM Ryalla: Check if he's using Vista.
1:30:10 AM Ryalla: Then tell him to give himself full access on the cygwin folder.
1:30:19 AM Ryalla: I've felt his pain...
1:30:23 AM Junkie: lol
1:30:28 AM Ryalla: Except worsely.
-
01-05-2008, 01:56 AM #7396QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
Grr, I still have a problem with my program.. It still only shows two or three of the little squares... I uploaded the source to my program to see if anyone can help
.
LinkWHA!?
-
01-05-2008, 05:21 AM #7397
In need of more..
I have been making an honest effort to Learn C and using it with the PSP.
I have an idea churning in my head, that I know is beyond my skill level, so I would like to ask advice and help on gaining the appropriate information.
I wonder if it is possible to have a menu in game, where the player can pick items to use. Not only picking the item, put also using the analog to set it on the screen, like setting up a row of tanks.
also where can I get info on programming AI. I want to make my sprites enter on the left side and move on to the right side. The tricky part is they have avoid all the objects (tanks) along the way, so they have to detect a potential collision and adjust course. So I assume fairly advance collision detection and AI.
(I did look at the sticky about tutorials on QJ, and the AI post is no longer linked and the sticky itself is outdated)
-
01-05-2008, 07:36 AM #7398
Those topics are universal to all programming languages, not just C for the PSP. The first you will learn as you learn more C, as it's not really too hard. As for AI, search google. You can't really have a specific example of AI, it's more of an idea. So you'll most likely find a tutorial that isn't language specific.
Zitat von fatmarley
[IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]
Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.
-
01-05-2008, 10:07 AM #7399Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
go to gamedev.net they have multitudes of articles on AI, ranging from theory to actual implementation.
--------------------------------------------------------------------------------------
-
01-05-2008, 01:55 PM #7400Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
hi i have started to port lua player 0.16 to 3.XX kernel i have changed the makefile and the main.cpp so that they run in user mode and i have uses prxtool to find out which commands i need to change by the nid address and comparing it to the codes from here http://silverspring.lan.st/1.5x/index.html i just wanted to know where i could find a user mode command that does the same thing - if there isn't one then i will either find a way of making the function work with more than one command or by simply deleting it
an example is sceKernelStdoutReopen
does anyone know where i can find replacement commands for the 1.50 ones to 3.xx ones thanks------ FaT3oYCG -----
AKA Craig, call me what you want to It's your preference.
My Website: http://www.modern-gamer.co.uk/
Currently working on:
(0) MediaGrab
(0) PGE Gears Of War - On hold (Very large project).
(0) PS???? -On Hold A tactical 2d side scrolling game involving AI and online multiplayer features. - Tile engine nearley finished (1 bug to fix).
-
01-05-2008, 02:23 PM #7401QJ Gamer Silver

- Registriert seit
- Oct 2006
- Ort
- Pimp'en in the US F#
- Beiträge
- 1.254
- Points
- 7.278
- Level
- 56
- Downloads
- 0
- Uploads
- 0
Actuelly Oslib is faster because it does utilize the Hardware for rendering, and like you said, it does make alot of things easier, like key handling, debugging, message outputs, drawing etc.
Zitat von Judas
NEWMy New BLOG!NEWThe Wentire Worls in two Sectors....When did I get dev statz?
Spoiler for my PSP homebrewReleases:Spoiler for Great Quotes:
-
01-05-2008, 04:18 PM #7402Your Fate is Grim...

- Registriert seit
- Oct 2005
- Beiträge
- 2.269
- Points
- 11.640
- Level
- 70
- Downloads
- 0
- Uploads
- 0
OSlib is to god as graphics.c is to a rock.
--------------------------------------------------------------------------------------
-
01-06-2008, 07:34 AM #7403I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
How can I use functions from modules in the flash, ones part of the firmware? I tried making a stub and linking it to my code, but I'm not sure I did it right, is there any examples of someone doing this? Also, are there any tools for reversing Sony modules, I've tried the one from ps2dev but it only works with non-Sony files. Finally, is there any way to either change the normal pspbtcnf.bin file in 3.7X or could I use sceKernelExitVSHVSH to load a predefined pspbtcnf.bin file?
Thanks.
-Aura
-
01-06-2008, 01:19 PM #7404QJ Gamer Silver

- Registriert seit
- May 2006
- Ort
- Behind you.
- Beiträge
- 1.814
- Points
- 10.921
- Level
- 69
- Downloads
- 0
- Uploads
- 0
OMG! I got oslib working!!!! Woohoooo!! This weekend has been very successful for me so far...:Jump:
Anyways, does anyone have a website where i can learn some oslib functions? I know that oslib 2.10 has docs, but those are outdated.
Calypso - Enjoy the excellent 2D space shooter:
http://dl.qj.net/Calypso-v1-PSP-Home...6542/catid/195
"Quoting yourself in your signature means you love to masterbate while looking at the mirror." -me (oh, wait...)
-
01-06-2008, 01:35 PM #7405
http://oslib.playeradvance.org/doku.php?id=home
Zitat von TMNT
-
01-07-2008, 01:19 AM #7406QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Hey guys, just need some help. Iv been trying to write to a file using the sce functions but iv got a problem. The program compiled fine and ran but whenever i tried to wright to a file nothing ever happend, i was just left with an empty file. I was pretty sure the problem was sceIoWrite() so i did a quick check with this:
...and sure enough it stuffed up at writing. Any help would be awesome, thanksCode:char file_data[32]; sprintf(file_data, "hello"); int file = sceIoOpen("ms0:/file.txt", PSP_O_RDONLY, 0777); if(file > 0)printf("File Opened\n"); if(file <= 0) { printf("Failed Opening File, Exitting"); sceKernelDelayThread(1000000); sceKernelExitGame(); } sceKernelDelayThread(1000000); int write = sceIoWrite(file, file_data, 10); if(write > 0)printf("Data Written to file\n\n"); if(write <= 0) { printf("Failed Writting to File, Exitting"); sceKernelDelayThread(1000000); sceKernelExitGame(); } sceKernelDelayThread(1000000); printf("Exitting Game..."); sceKernelDelayThread(1000000); sceKernelExitGame();
-
01-07-2008, 03:54 AM #7407QJ Gamer Blue
- Registriert seit
- Jul 2007
- Beiträge
- 296
- Points
- 3.795
- Level
- 38
- Downloads
- 0
- Uploads
- 0
Well, for starts you opened the file with the flag PSP_O_RDONLY....
Zitat von Xsjado7
-
01-07-2008, 04:56 AM #7408I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Yep, the only problem I can see in the code is you are opening it in read only mode (PSP_O_RDONLY), you'll need to open it in read/write mode, which I believe is in the header. If you still have some problems let me know and I'll send you over some code you can work from.
Oh, and does anyone know what the octal as the third agrument actually means? I think I read somewhere that it truncates the file, but is there a list somewhere in the SDK saying all the options?
-Aura
-
01-07-2008, 05:09 AM #7409QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
haha, my bad. i cant believe i missed that, im completely blind. thanks
-
01-07-2008, 05:18 AM #7410QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
It's the posix style umask of the file when it gets created. Ie 0777 = read/write/execute all and that shouldn't be changed really.
Zitat von Auraomega
http://en.wikipedia.org/wiki/UmaskRaphs board rules #31: Excessive use of punctuation is either a sign of a lesser ego or a small mind. Avoid it if you don't want to look like a total moron.
Raphs board rules #17: When you need to ask whether you are capable of doing something, you are not.
Raphs board rules #2: Exploits aren't found by changing version numbers, blindly merging data into a file or turning your PSP upside down.
Raphs board rules #1: If you have no clue how exploits work, don't come up with ideas about them.


LinkBack URL
About LinkBacks
Mit Zitat antworten


Hello everyone I am new here and I am glad to be part of this amazing community and I think there...
New to forum