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; Zitat von Blackbelttcon ill pm you Where is the example data? -= Double Post =- 1. Use the right headers: ...
-
12-18-2007, 02:55 AM #7141QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Where is the example data?
Zitat von Blackbelttcon
-= Double Post =-
1. Use the right headers:
2. Use example code that is given to you:Code:#include <windows.h> #include <iostream> #include <cstdio> #include <cstdlib> #include <string> #include <fstream> #include <cstdlib>
Code:// Opens name { ifstream OpenFile("name.conn"); if( !OpenFile ) { cerr << "Error opening file" << endl; return -1; } string tempString = ""; while ( OpenFile >> tempString ) { name += tempString; } }
Geändert von yaustar (12-18-2007 um 03:46 AM Uhr) Grund: Automerged Doublepost
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
12-18-2007, 04:16 AM #7142QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
So can anyone help me out with my problem? I'd rather stay using pspctrl.h than change. Thanks
-
12-18-2007, 04:25 AM #7143QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
You asked for an alternative to pspCtrl, not on a way to do what you want with still using it :P But anyway, the solution is very easy and taking a look at the source of any engine that handles it would suffice.
Zitat von Xsjado7
Here's code from my current working code:
static SceCtrlData pad, oldPad;
static unsigned int pressed_buttons, released_buttons, held_buttons;
void update()
{
oldPad = pad;
sceCtrlPeekBufferPositive (&pad, 1);
held_buttons = pad.Buttons;
pressed_buttons = pad.Buttons & ~oldPad.Buttons;
released_buttons = ~pad.Buttons & oldPad.Buttons;
}
bool pressed( unsigned int buttons )
{
return ((pressed_buttons & buttons) == buttons);
}
bool released( unsigned int buttons )
{
return ((released_buttons & buttons) == buttons);
}
bool held( unsigned int buttons )
{
return ((held_buttons & buttons) == buttons);
}
Raphs 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.
-
12-18-2007, 04:40 AM #7144QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Lol, i meant i was wondering if there was an alternative to the function PSP_CTRL, not the lib. Anyways, thanks for that Raphael. I had a look through OSLib but couldnt find it
-
12-18-2007, 12:49 PM #7145
Zitat von yaustar
this works perfectly except, the name is repeated twice.
it comes out namename
-
12-18-2007, 01:14 PM #7146QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
how do i fix this stupid error?
Spoiler for stupid error:
its huge, i included #include </usr/include/sys/stat.h> because the tutorial said to
!
WHA!?
-
12-18-2007, 01:19 PM #7147Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
You cant include something that isn't there. You may have to download the header and put it there.
-
12-18-2007, 01:21 PM #7148QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
where do i find the header? (im on ubuntu)
WHA!?
-
12-18-2007, 01:27 PM #7149It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Try adding CFLAGS+=-I/usr/include in your makefile
Actually, that might not be a good idea. Remove the /usr/include/ from the include so it's just sys/stat.hpəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
12-18-2007, 01:32 PM #7150QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
nope, that doesn't help:
game.c:5:43: error: /sys/stat.h: No such file or directoryWHA!?
-
12-18-2007, 01:50 PM #7151
Code:{ ifstream OpenFile("name.conn"); if( !OpenFile ) { cerr << "Error opening file" << endl; return -1; } string tempString = ""; while ( OpenFile >> tempString ) { name += tempString; } }
the variable name repeats twice in the text, like namename
how do i change that
-
12-18-2007, 02:19 PM #7152It's good to be free...

- Registriert seit
- Feb 2007
- Beiträge
- 2.440
- Points
- 10.420
- Level
- 67
- Downloads
- 0
- Uploads
- 0
Remove the leading slash.
Zitat von BigSanFrey
pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ
-
12-18-2007, 02:38 PM #7153QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
It doesn't. I checked the compiled code you gave. Check what is in your .conn files. Check your print output code. Debug and use breakpoints to see what values are being stored.
Zitat von Blackbelttcon
[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
12-18-2007, 02:52 PM #7154
the .conn files are fine, just one name, the debug was fine also just one value, and here is my input code ( i dont no what you mean by the print output code)
Code:{ ofstream SaveFile("name.conn"); SaveFile << name <<endl; SaveFile.close(); }
-
12-18-2007, 02:55 PM #7155QJ Gamer Silver
- Registriert seit
- Feb 2007
- Ort
- Melbourne, Australia
- Beiträge
- 1.773
- Points
- 8.717
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
thanks that helped :)
Zitat von Archaemic
WHA!?
-
12-18-2007, 03:15 PM #7156QJ Gamer Silver

- Registriert seit
- Jun 2006
- Ort
- UK
- Beiträge
- 2.326
- Points
- 10.263
- Level
- 67
- Downloads
- 0
- Uploads
- 0
If what you say is true then it is IMPOSSIBLE for it to output twice unless you are specifically doing it by:
Zitat von Blackbelttcon
Without seeing your code again, a rough guess is that you are reading the file twice somewhere and appending the original string twice.Code:cout << name << name << endl;
OR that you have a typo and reusing the same variable twice for two different .conn files.
Repost your current code PUBLICALLY here (and properly formatted).[Blog] [Portfolio]
[Homebrew Illuminati - Serious Homebrew Development Forums]
[I want to make Homebrew FAQ] [How I broke into the Games Industry]
[Programming Book List] [Programming Article List]
-
12-18-2007, 04:28 PM #7157
alright here you go.
Code:#include <windows.h> #include <iostream.h> #include <stdio.h> #include <stdlib.h> #include <string> #include <fstream> #include <fstream.h> #include <cstdlib> #include <cstdio> using namespace std; int main () { int x; string name; string pass; string password; string gender; string race; int choice1; int helpchoice; cout << "Hello and welcome to System Wars" << endl; // Main Screen cout << " 0= Start Game " << endl; cout << " 1= new player " << endl; cout << " 2= info " << endl; cin >> x ; // new player if (x == 1) { cout << "You have chosen to be a new player"<< endl; Sleep (500); cout << "NOTE!!! YOU CANNOT HAVE MORE THEN ONE PLAYER. IF YOUR CREATE A NEW ONE YOUR OLD ONE WILL BE OVERRIDDEN."<< endl; Sleep (500); cout << "Please enter your name." << endl; cin >> name; cout << "your name is " << name <<endl; cout << name << " you need a password. please type your password below." <<endl; cin >> pass; cout << "Is your password " << pass <<endl; cout << "yes=1" <<endl; cout << "no=2" <<endl; cin >> choice1; if (choice1 == 1) { cout << "Please pick your gender."<<endl; cout << " Male" <<endl; cout << "Female" <<endl; cin >> gender ; Sleep (500); cout << "Ok Now pick your race. " <<endl; cout << "Human " << gender <<endl; cout << gender << " Aroeza " <<endl; cin >>race; cout<< " You are now a " << gender << " " << race << " please wait while your information is saving." <<endl; Sleep (2000); //saves all your things to file { ofstream SaveFile("name.conn"); SaveFile << name <<endl; SaveFile.close(); }{ ofstream SaveFile("pass.conn"); SaveFile << pass <<endl; SaveFile.close(); }{ ofstream SaveFile("race.conn"); SaveFile << race <<endl; SaveFile.close(); }{ ofstream SaveFile("gender.conn"); SaveFile << gender <<endl; SaveFile.close(); } cout << " Saving Successful. Please Restart the game." <<endl; system ("PAUSE"); } // ends file saving // wrong password start else { cout << " The please enter your password again." <<endl; cin >> pass; cout << " Your new password is " << pass <<endl; system ("PAUSE"); cout << " Lets begin. What is your gender." <<endl; cout << "Male." <<endl; cout << "Female." <<endl; cin >> gender; Sleep (500); cout << " Ok Now pick your race. " <<endl; cout << "Human " << gender <<endl; cout << gender << " Aroeza " <<endl; cin >>race ; Sleep (500); cout << " You are now a " << race << " " << gender <<endl; cout << " Please type your username one last time." <<endl; cin >> name; cout << " Please wait while your information is saving." <<endl; Sleep (1000);-= Double Post =-Code://starts saving for a second time. { ofstream SaveFile("pass.conn"); SaveFile << pass <<endl; SaveFile.close(); }{ ofstream SaveFile("race.conn"); SaveFile << race <<endl; SaveFile.close(); }{ ofstream SaveFile("gender.conn"); SaveFile << gender <<endl; SaveFile.close(); } cout << " Information is all save please restart the game." <<endl; system ("PAUSE"); } // ends files saving } // ends the choice1==2 command // start game else if (x ==0) { cout << "Welcome to System Wars" << endl; Sleep (1000); cout << " ___________________" <<endl; cout << "l System Wars l" <<endl; cout << "l Has l" <<endl; cout << "l Begun l" <<endl; cout << "l___________________l" << endl; system ("PAUSE"); // Opens name { ifstream OpenFile("name.conn"); if( !OpenFile ) { cerr << "Error opening file" << endl; return -1; } string loadname= ""; while ( OpenFile >> name) { name += name; } } // Opens pass { ifstream OpenFile("pass.conn"); if( !OpenFile ) { cerr << "Error opening file" << endl; return -1; } string loadpass = ""; while ( OpenFile >> pass) { pass+= pass; } } // Opens race { ifstream OpenFile("race.conn"); if( !OpenFile ) { cerr << "Error opening file" << endl; return -1; } string loadrace = ""; while ( OpenFile >> race) { race += race; } } // Opens gender { ifstream OpenFile("gender.conn"); if( !OpenFile ) { cerr << "Error opening file" << endl; return -1; } string loadgender = ""; while ( OpenFile >> gender) { gender += gender; } } // finishs opening. //starts the game cout << name << " Welcome to the Planet Wars. Your journy will begin soon. " <<endl; Sleep (1000); cout << name << " since you are a human you will start in sector CONN." <<endl; system ("PAUSE"); } // info about game else if (x ==2) { cout << " ___________________" <<endl; cout << "l System Wars l" <<endl; cout << "l Help l" <<endl; cout << "l l" <<endl; cout << "l___________________l" << endl; cout << " This is the help menu." <<endl; Sleep (1000); cout << " 1- easy start" <<endl; cout << " 2- Author" <<endl; cin >> helpchoice; if (helpchoice==1) cout << " To start off you need to restart the game, and go to new player." <<endl; Sleep (1000); cout << " Type in your Username, Password, confirm your password, type in your race, and your gender." <<endl; Sleep (1000); cout << " Next restart the game, and go to start game." <<endl; Sleep (1000); cout << " You will now be ready to Play System Wars." <<endl; Sleep (1000); system ("PAUSE"); } else { cout << "Please restart the game " <<endl; } }
sorry for not putting it in a spoiler it errored my firefox everytime i tryed to paste the code.Geändert von Blackbelttcon (12-18-2007 um 04:30 PM Uhr) Grund: Automerged Doublepost
-
12-18-2007, 05:40 PM #7158I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Just a quick question about PSPLink, I've upgraded to 3.52M33, and the shell isn't printing information back to me anymore, this has started to become an issue and I was wondering if there was a fix and/or if higher firmwares printed info on the shell again.
And I've been messing around with sceKernelLoadExec, and it appears that it won't work in 3.XX kernel, which is most likely to be the reason why I'm having problems, because my app runs in 3.XX, is there any way I can get sceKernelLoadExec to work in 3.XX without switching kernel? (I want to make this Slim friendly).
Thanks.
-Aura
-
12-18-2007, 05:46 PM #7159QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
LOL, and you wonder why it prints the name twice?while ( OpenFile >> name)
{
name += name;
}
@Auraomega: You need to use the release_oe build of PSPLink and put it in the game folder, running it in 3.xx kernel OR use the normal release build of PSPLink and put in the game150 folder.Raphs 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.
-
12-18-2007, 06:08 PM #7160
no all that does is takes the name variable from the text file, and makes it a variable to use for the program.
i could change that to
while ( OpenFile >> username)
{
username += name;
}
-= Double Post =-
but thanx thoughGeändert von Blackbelttcon (12-18-2007 um 06:09 PM Uhr) Grund: Automerged Doublepost
-
12-18-2007, 06:17 PM #7161QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Are you serious about what you just said? Dude.... read the exact code that yaustar has given you, then look at what you really used. Now think about why your code will produce double output. Really think about it.
If you don't get it, read up on what the += operator does on strings here: http://www.cplusplus.com/reference/s...perator+=.html
If you still don't get it.... I'm sorry but then you are beyond help.Raphs 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.
-
12-18-2007, 06:22 PM #7162I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Thats what I've been doing, I'm using the release_oe version, but I still get the same problem of nothing coming up on the shell. When I run in 1.50 kernel it works fine though.
Zitat von Raphael
-Aura
-
12-18-2007, 06:23 PM #7163QJ Gamer Bronze

- Registriert seit
- Aug 2007
- Ort
- Australia
- Beiträge
- 659
- Points
- 8.045
- Level
- 60
- Downloads
- 0
- Uploads
- 0
Hey, sorry for all these questions i have been posting lately, I was just wondering how i would go about doing something with a 1/3 - 2/3 - 1/2 and so on chance. Would having a variable that counted up and down from, say, 1 to 300 and did something like:
work the same/well enough. It's for my AI. Any help would be greatly appreciated, thanksCode:if(variable > 200) { do code } if(variable < 200) { do other code }
-
12-18-2007, 06:30 PM #7164
EDIT: Nevermind, I see what you're saying. And yes, your code will work.
Zitat von Xsjado7
[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.
-
12-18-2007, 06:49 PM #7165
- Registriert seit
- Dec 2007
- Beiträge
- 1
- Points
- 2.804
- Level
- 32
- Downloads
- 0
- Uploads
- 0
Hello World
im beggining today to start to learn programming for my psp and trying to make the hello world program but when i try to make the file with cygwin it says the following
main.c:4: error: expected declarationspecifiers or '...' before string constan
t
main.c:4: error: expected declarationspecifiers or '...' before numeric constan
t
main.c:4: error: expected declarationspecifiers or '...' before numeric constan
t
main.c:4: error: expected declarationspecifiers or '...' before numeric constan
t
main.c:4: warning: data definition has no type or storage class
main.c:4: warning: type defaults to 'int' in declaration of 'PSP_MODULE_INF'
make: *** [main.o] Error 1
pls help.
im using CSP 3.1
Update: I got it to workGeändert von lecreus (12-18-2007 um 07:36 PM Uhr)
-
12-19-2007, 05:37 AM #7166Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
PSP_MODULE_INF should be PSP_MODULE_INFO
nvm i saw you got it to work
-
12-19-2007, 11:48 AM #7167Developer and Tutor.
- Registriert seit
- Jul 2007
- Ort
- Widnes, England
- Beiträge
- 1.649
- Points
- 8.736
- Level
- 62
- My Mood
-
- Downloads
- 0
- Uploads
- 0
hmm i figured out why i couldn't install lib mad properly
there is a problem with the make install function
but i know how to get around that, what i need to know is why do i get this error when i type make
and how can i fix it here is an extract from the synth.c file where the error appearsCode:[email protected]@craigs_computer ~/libmad $ make make -C src make[1]: Entering directory `/home/[email protected]/libmad/src' psp-gcc -I. -I/usr/local/pspdev/psp/sdk/include -DHAVE_CONFIG_H -DHAVE_SYS_TYPES _H -DHAVE_ERRNO_H -DHAVE_UNISTD_H -DHAVE_FCNTL_H -I/usr/local/pspdev/psp/sdk/inc lude/sys/ -I../include -D_PSP_FW_VERSION=150 -c -o synth.o synth.c synth.c: In function 'synth_full': synth.c:570: warning: assignment from incompatible pointer type synth.c: In function 'synth_half': synth.c:707: warning: assignment from incompatible pointer type psp-ar cru ../lib/libmad.a bit.o decoder.o fixed.o frame.o huffman.o layer12.o l ayer3.o stream.o synth.o timer.o version.o psp-ranlib ../lib/libmad.a make[1]: Leaving directory `/home/[email protected]/libmad/src'
start line = 558
end line = 826
i highlighted the lines of the error in boldCode:void synth_full(struct mad_synth *synth, struct mad_frame const *frame, unsigned int nch, unsigned int ns) { unsigned int phase, ch, s, sb, pe, po; mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; mad_fixed_t const (*sbsample)[36][32]; register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8]; register mad_fixed_t const (*Dptr)[32], *ptr; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; for (ch = 0; ch < nch; ++ch) { sbsample = &frame->sbsample[ch]; filter = &synth->filter[ch]; phase = synth->phase; pcm1 = synth->pcm.samples[ch]; for (s = 0; s < ns; ++s) { dct32((*sbsample)[s], phase >> 1, (*filter)[0][phase & 1], (*filter)[1][phase & 1]); pe = phase & ~1; po = ((phase - 1) & 0xf) | 1; /* calculate 32 samples */ fe = &(*filter)[0][ phase & 1][0]; fx = &(*filter)[0][~phase & 1][0]; fo = &(*filter)[1][~phase & 1][0]; Dptr = &D[0]; ptr = *Dptr + po; ML0(hi, lo, (*fx)[0], ptr[ 0]); MLA(hi, lo, (*fx)[1], ptr[14]); MLA(hi, lo, (*fx)[2], ptr[12]); MLA(hi, lo, (*fx)[3], ptr[10]); MLA(hi, lo, (*fx)[4], ptr[ 8]); MLA(hi, lo, (*fx)[5], ptr[ 6]); MLA(hi, lo, (*fx)[6], ptr[ 4]); MLA(hi, lo, (*fx)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[0], ptr[ 0]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[7], ptr[ 2]); *pcm1++ = SHIFT(MLZ(hi, lo)); pcm2 = pcm1 + 30; for (sb = 1; sb < 16; ++sb) { ++fe; ++Dptr; /* D[32 - sb][i] == -D[sb][31 - i] */ ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[7], ptr[ 2]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[0], ptr[ 0]); *pcm1++ = SHIFT(MLZ(hi, lo)); ptr = *Dptr - pe; ML0(hi, lo, (*fe)[0], ptr[31 - 16]); MLA(hi, lo, (*fe)[1], ptr[31 - 14]); MLA(hi, lo, (*fe)[2], ptr[31 - 12]); MLA(hi, lo, (*fe)[3], ptr[31 - 10]); MLA(hi, lo, (*fe)[4], ptr[31 - 8]); MLA(hi, lo, (*fe)[5], ptr[31 - 6]); MLA(hi, lo, (*fe)[6], ptr[31 - 4]); MLA(hi, lo, (*fe)[7], ptr[31 - 2]); ptr = *Dptr - po; MLA(hi, lo, (*fo)[7], ptr[31 - 2]); MLA(hi, lo, (*fo)[6], ptr[31 - 4]); MLA(hi, lo, (*fo)[5], ptr[31 - 6]); MLA(hi, lo, (*fo)[4], ptr[31 - 8]); MLA(hi, lo, (*fo)[3], ptr[31 - 10]); MLA(hi, lo, (*fo)[2], ptr[31 - 12]); MLA(hi, lo, (*fo)[1], ptr[31 - 14]); MLA(hi, lo, (*fo)[0], ptr[31 - 16]); *pcm2-- = SHIFT(MLZ(hi, lo)); ++fo; } ++Dptr; ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); *pcm1 = SHIFT(-MLZ(hi, lo)); pcm1 += 16; phase = (phase + 1) % 16; } } } # endif /* * NAME: synth->half() * DESCRIPTION: perform half frequency PCM synthesis */ static void synth_half(struct mad_synth *synth, struct mad_frame const *frame, unsigned int nch, unsigned int ns) { unsigned int phase, ch, s, sb, pe, po; mad_fixed_t *pcm1, *pcm2, (*filter)[2][2][16][8]; mad_fixed_t const (*sbsample)[36][32]; register mad_fixed_t (*fe)[8], (*fx)[8], (*fo)[8]; register mad_fixed_t const (*Dptr)[32], *ptr; register mad_fixed64hi_t hi; register mad_fixed64lo_t lo; for (ch = 0; ch < nch; ++ch) { sbsample = &frame->sbsample[ch]; filter = &synth->filter[ch]; phase = synth->phase; pcm1 = synth->pcm.samples[ch]; for (s = 0; s < ns; ++s) { dct32((*sbsample)[s], phase >> 1, (*filter)[0][phase & 1], (*filter)[1][phase & 1]); pe = phase & ~1; po = ((phase - 1) & 0xf) | 1; /* calculate 16 samples */ fe = &(*filter)[0][ phase & 1][0]; fx = &(*filter)[0][~phase & 1][0]; fo = &(*filter)[1][~phase & 1][0]; Dptr = &D[0]; ptr = *Dptr + po; ML0(hi, lo, (*fx)[0], ptr[ 0]); MLA(hi, lo, (*fx)[1], ptr[14]); MLA(hi, lo, (*fx)[2], ptr[12]); MLA(hi, lo, (*fx)[3], ptr[10]); MLA(hi, lo, (*fx)[4], ptr[ 8]); MLA(hi, lo, (*fx)[5], ptr[ 6]); MLA(hi, lo, (*fx)[6], ptr[ 4]); MLA(hi, lo, (*fx)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[0], ptr[ 0]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[7], ptr[ 2]); *pcm1++ = SHIFT(MLZ(hi, lo)); pcm2 = pcm1 + 14; for (sb = 1; sb < 16; ++sb) { ++fe; ++Dptr; /* D[32 - sb][i] == -D[sb][31 - i] */ if (!(sb & 1)) { ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); MLN(hi, lo); ptr = *Dptr + pe; MLA(hi, lo, (*fe)[7], ptr[ 2]); MLA(hi, lo, (*fe)[6], ptr[ 4]); MLA(hi, lo, (*fe)[5], ptr[ 6]); MLA(hi, lo, (*fe)[4], ptr[ 8]); MLA(hi, lo, (*fe)[3], ptr[10]); MLA(hi, lo, (*fe)[2], ptr[12]); MLA(hi, lo, (*fe)[1], ptr[14]); MLA(hi, lo, (*fe)[0], ptr[ 0]); *pcm1++ = SHIFT(MLZ(hi, lo)); ptr = *Dptr - po; ML0(hi, lo, (*fo)[7], ptr[31 - 2]); MLA(hi, lo, (*fo)[6], ptr[31 - 4]); MLA(hi, lo, (*fo)[5], ptr[31 - 6]); MLA(hi, lo, (*fo)[4], ptr[31 - 8]); MLA(hi, lo, (*fo)[3], ptr[31 - 10]); MLA(hi, lo, (*fo)[2], ptr[31 - 12]); MLA(hi, lo, (*fo)[1], ptr[31 - 14]); MLA(hi, lo, (*fo)[0], ptr[31 - 16]); ptr = *Dptr - pe; MLA(hi, lo, (*fe)[0], ptr[31 - 16]); MLA(hi, lo, (*fe)[1], ptr[31 - 14]); MLA(hi, lo, (*fe)[2], ptr[31 - 12]); MLA(hi, lo, (*fe)[3], ptr[31 - 10]); MLA(hi, lo, (*fe)[4], ptr[31 - 8]); MLA(hi, lo, (*fe)[5], ptr[31 - 6]); MLA(hi, lo, (*fe)[6], ptr[31 - 4]); MLA(hi, lo, (*fe)[7], ptr[31 - 2]); *pcm2-- = SHIFT(MLZ(hi, lo)); } ++fo; } ++Dptr; ptr = *Dptr + po; ML0(hi, lo, (*fo)[0], ptr[ 0]); MLA(hi, lo, (*fo)[1], ptr[14]); MLA(hi, lo, (*fo)[2], ptr[12]); MLA(hi, lo, (*fo)[3], ptr[10]); MLA(hi, lo, (*fo)[4], ptr[ 8]); MLA(hi, lo, (*fo)[5], ptr[ 6]); MLA(hi, lo, (*fo)[6], ptr[ 4]); MLA(hi, lo, (*fo)[7], ptr[ 2]); *pcm1 = SHIFT(-MLZ(hi, lo)); pcm1 += 8; phase = (phase + 1) % 16; } } }
any help appreciated
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).
-
12-19-2007, 12:27 PM #7168Banned for LIFE
- Registriert seit
- Oct 2006
- Ort
- East London, England
- Beiträge
- 2
- Points
- 18.744
- Level
- 86
- Downloads
- 0
- Uploads
- 0
This may sound random but can somebody link me to chip 8 emulator source code that involves no sdl please ?
-
12-19-2007, 12:29 PM #7169I'm back!

- Registriert seit
- Feb 2007
- Ort
- England
- Beiträge
- 902
- Points
- 8.236
- Level
- 61
- Downloads
- 0
- Uploads
- 0
Is it possible to use sceKernelLoadExec in 3.XX, and if so can someone post an example as I can't get it to work. Also, I'm still seeing nothing in PSPLink, even though I'm running the PSPLink from release_oe, if anyone can link me to a compiled working version I'd be grateful.
Thanks.
-Aura
-
12-19-2007, 12:38 PM #7170QJ Gamer Silver

- Registriert seit
- Jan 2006
- Ort
- Germany
- Beiträge
- 926
- Points
- 14.087
- Level
- 77
- Downloads
- 0
- Uploads
- 0
Then just use the normal release build and put it into the game150 folder.
Zitat von Auraomega
Raphs 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