Seite 282 von 340 ErsteErste ... 182 232 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 332 ... LetzteLetzte
Zeige Ergebnis 8.431 bis 8.460 von 10174

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; i'm not doing this with the psp, at least not at first anyways...

  
  1. #8431
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    i'm not doing this with the psp, at least not at first anyways


    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  2. #8432
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    while (something) { /*nothing here*/ };
    someother statement;
    I donot exactly understand the purpose of empty semicolon ended while loop

  3. #8433
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    quick question on drawing an circle...which i think i may have realized a faster way as i write this.....anyways

    currently the way i'm drawing a circle is:
    Code:
    #include <oslib/oslib.h>
    #include <math.h>
    #define PI (first several digits go here)
    
    void DrawPixel(float x, float y, osl_color color){
    
    oslDrawFillRect(x, y , x+1, y+1, color);
    }
    
    void DrawCircle(int x, int y, int radius, osl_color){
    for(int i=0;i<360;i++){
    float tx = x + sinf(i*(PI/180))*radius);
    float ty = y - cosf(i*(PI/180))*radius);
    DrawPixel(tx, ty, color)
    }
    }
    ^^now than for one or two circles not bad however a multitude of circles and u see a huge slowdown

    i've changed the function

    Code:
    void DrawCircle(int x, int y, int radius, osl_color){
    for(int i=0;i<360;i++){
    float tx = x + sinf(i*(PI/180))*radius);
    float ty = y - cosf(i*(PI/180))*radius);
    DrawPixel(tx, ty, color)
    }
    }
    to

    Code:
    void DrawCircle(int x, int y, int radius, osl_color){
    for(int i=0;i<360;i+=30){
    float tx = x + sinf(i*(PI/180))*radius);
    float ty = y - cosf(i*(PI/180))*radius);
    DrawPixel(tx, ty, color)
    }
    }
    so that does show a major increase in speed but not the best

    would it be faster and this is the idea i just thought of to:

    draw the circle to an empty image than just displaying the image?

    thanks every1
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  4. #8434
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Mr305
    Code:
    while (something) { /*nothing here*/ };
    someother statement;
    I donot exactly understand the purpose of empty semicolon ended while loop
    They're doing it wrong.
    Code:
    while (something_that_affects_state);
    Perfectly valid, even if kinda hard to read at times.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  5. #8435
    QJ Gamer Blue
    Points: 5.183, Level: 46
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    Dec 2006
    Beiträge
    330
    Points
    5.183
    Level
    46
    Downloads
    0
    Uploads
    0

    Standard

    OK this is not for PSP, I am learning C++ still but have hit a problem with random numbers. I am using Dev C++, with begining ++ Game Programming (this uses Dev C++). The program is meant to be like a dice when rolled, a random number is produced and then modulised by 6 to make it a dice number. However when I run this I only get 6 everytime I run the program. Here is the code.

    Code:
    #include <cstdlib>
    #include <iostream>
    #include <ctime>
    
    using namespace std;
    
    int randomnumber = rand(); //generates a random number
    int die = (randomnumber % 6) + 1; //get a number between 1 and 6
    
    int main()
    {
    srand(time(0)); //seed a random number based on current time
    cout << "You got a " << die << endl;
    cin.get();
    return 0;
    }

  6. #8436
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    slicer - Please format your code, your how old now? (in all seriousness)

    Anyways, ya something like hwat you said might be better considering your slow down is due to those 2 calculations * 360 times * number of circles to draw. This will only run those 2 calculations once then just scale the image to the radius specified.

    Example:
    Code:
    OSL_IMAGE *pEllipse = NULL; // internally used, don't directly use this anywhere
    
    // run this function anywhere just once before drawing hte circle (usually the loading resources part of a game)
    void Initialize()
    {
      if (pEllipse != NULL)
        oslDeleteImage(pEllipse);
    
      // create image
      pEllipse = oslCreateImage (512, 512, OSL_IN_VRAM, OSL_PF_8888)
      oslAssert(pEllipse);
    
      // clear to alpha
      oslClearImage(pEllipse, RGBA(0, 0, 0, 255));
    
      // set the draw buffer to the new image
      oslSetDrawBuffer(pEllipse);
    
      // draw the circle on it, radius = 1/2 dimensions
      for (int i = 0; i < 360; i++)
      {
        int tmpX = oslCosi(i, 256) + 256; // why you don't use OSlib's math functions i dont know...
        int tmpY = oslSini(i, 256) + 256; // these use the VFPU, takes the angle as a degree and multiplies it by the magnitude and returns an integer
        // does all the stuff you were doing but faster and more readable ;)
        oslDrawFillRect(tmpX, tmpY, tmpX + 1, tmpY + 1, RGB(255,255,255)); // draw it white
      }
    
      // set the draw buffer back to the default
      oslSetDrawBuffer(OSL_DEFAULT_BUFFER);
    }
    
    void DrawCircle(int x, int y, int radiusX, int radiusY, OSL_COLOR color)
    {
      pEllipse->x = x - radiusX; // set the position of the image
      pEllipse->y = y - radiusY; // "
      pEllipse->stretchX = radiusX * 2; // set the width of the ellipsoid
      pEllipse->stretchY = radiusY * 2; // set the height "
    
      // store the current params
      OSL_ALPHA_PARAMS *currentParameters = NULL;
    
      oslGetAlphaEx(currentParameters);
    
      // now we set a filter to convert the white part of the ellipsoid image
      // (the circle part) to the color passed
      oslSetAlpha(OSL_FX_ALPHA | OSL_FX_COLOR, color);
    
      oslDrawImage(pEllipse); // draw it
    
      // back to normal
      oslSetAlphaEx(currentParameters);
    }
    Haven't tested it however it should work. If it doesn't tell me the outcome, i have a few other filtering techniques to color it to the desired color....

    Also, take a look here:
    http://www.psp-hacks.com/forums/viewtopic.php?id=140324

    leejames - It should always return 6 (well any value at that, just the same each time). Your initializing 'randomnumber' to a random number before setting a random seed. Try something like this (btw format your code or i'll have your head ;))
    Code:
    #include <cstdlib>
    #include <iostream>
    #include <ctime>
    
    using namespace std;
    
    int randomnumber = 0;
    int die = 0;
    
    int main()
    {
      srand(time(0));
    
      randomnumber = rand();
      die = (randomnumber % 6) + 1;
    
      cout << "You got a " << die << endl;
      cin.get();
    
      return 0;
    }
    That'll work. However I recommend you avoid global variables where possible, not initialize variables to desired values, assign them later to desired values (that was your main problem here) and format your code (a lot of people don't like having to take the time and format your code then look for a problem so format before hand).
    Geändert von SG57 (04-20-2008 um 09:43 PM Uhr)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  7. #8437
    QJ Gamer Green
    Points: 13.529, Level: 75
    Level completed: 70%, Points required for next Level: 121
    Overall activity: 0%

    Registriert seit
    Oct 2005
    Ort
    Phoenix
    Beiträge
    208
    Points
    13.529
    Level
    75
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von leejames04
    OK this is not for PSP, I am learning C++ still but have hit a problem with random numbers. I am using Dev C++, with begining ++ Game Programming (this uses Dev C++). The program is meant to be like a dice when rolled, a random number is produced and then modulised by 6 to make it a dice number. However when I run this I only get 6 everytime I run the program. Here is the code.

    Code:
    #include <cstdlib>
    #include <iostream>
    #include <ctime>
    
    using namespace std;
    
    int randomnumber = rand(); //generates a random number
    int die = (randomnumber % 6) + 1; //get a number between 1 and 6
    
    int main()
    {
    srand(time(0)); //seed a random number based on current time
    cout << "You got a " << die << endl;
    cin.get();
    return 0;
    }
    Try this:

    Code:
    #include <cstdlib>
    #include <iostream>
    #include <ctime>
    
    using namespace std;
    
    int main()
    {
         srand((unsigned)time(0)); //seed a random number based on current time
    
         int randomnumber = rand(); //generates a random number
         int die = (randomnumber % 6) + 1; //get a number between 1 and 6
    
         cout << "You got a " << die << endl;
         cin.get();
         return 0;
    }
    Try not to use globals unless absolutely neccessary, and seed before you randomize.

  8. #8438
    OMFG
    Points: 19.453, Level: 88
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Toronto
    Beiträge
    2.814
    Points
    19.453
    Level
    88
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Slasher
    How come no matter what I do, I can't seem to get the psp slim tv-out working?

    I've included the stub "pspDveManager.S" and have created a 'dummy' function within my main.cpp "int pspDveMgrSetVideoOut(int, int, int, int, int, int, int);", just like the sample did.

    It compiles the code fine, but once it hits the finalization of the compiling I get, 'Undefined Reference to pspDveMgrSetVideoOut(int, int, int, int, int, int, int)' @ line 330 which is the line where I declared that function.

    What else do I do? I don't understand how the sample works but my code doesn't?


    (The sample is at http://dl.qj.net/Fullscreen-TV-out-f...4864/catid/151)
    Re-post.
    Anyone successfully get this working? How can I get it working?


    EDIT: nvm I figured it out
    Code:
    #ifdef __cplusplus
    extern "C" {
    #endif
    
    int pspDveMgrCheckVideoOut();
    int pspDveMgrSetVideoOut(int u, int mode, int width, int height, int x, int y, int z);
    
    #ifdef __cplusplus
    }
    #endif
    Geändert von Slasher (04-21-2008 um 07:06 AM Uhr)

  9. #8439
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    sry sg57 i'm so used to hitting tab to increase by a few spaces that when trying to type formated code here....well anyways, thanks that'll defiantly give me speed up i think i'm ganna re-write pixel attack anyways since my coding style has changed so much since the time that i wrote it anyways thanks a million this well rly help me=-)

    plus i wanna try a few physic's tricks that i've learned to make it look far better

    also i didn't use the oslcos and sin commands because they've given back undesired results before so i find going with sinf and cosf to give me the results i'm looking for
    Geändert von slicer4ever (04-21-2008 um 01:49 PM Uhr)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  10. #8440
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    What do you mean undesired results lol

    They take an angle in degrees and the radius size/magnitude. Returns the integer value of the sin/cos of that angle * the radius size/magnitude. It uses the vfpu for the calculations as well so a lot of calls to it should make a significant difference between math.h sinf/cosf and oslib's oslCos and oslSin...

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  11. #8441
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    yes i fully understand what the function does, however i have experianced problems with the two commands which were remedied when i replaced them with cos and sin, also at this point such a small increase in speed isn't really necessary, especially with such a speed up that the command above gives me
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  12. #8442
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Post your old usage of oslCos/Sin and I can almost guarantee a flaw in your usage of it, And hey if it's possible to optimize readability-wise and performance wise, why not? ;)

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  13. #8443
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    your just an optimization whore=-) not a bad thing of course

    i'll see if i can find the project but idk if i still have it on my computer, if i remeber correctly it was in my celestial cunning projects however they've gone through so many updates that idk if i have the original problem any longer but i'll look to see if i can find it
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  14. #8444
    Points: 2.584, Level: 30
    Level completed: 90%, Points required for next Level: 16
    Overall activity: 0%

    Registriert seit
    Apr 2008
    Beiträge
    9
    Points
    2.584
    Level
    30
    Downloads
    0
    Uploads
    0

    Standard

    i need some help, this is my first post (yay) and i dont know how to get the time off the psp's internal clock, a n00b problem i know. i try to use time.h but cygwin doesnt like it... yay first post.
    hmm... since its so late over ther (im in aus) i'll log back in tomorrow after school and see if anything has happened
    Geändert von Sangheili (04-22-2008 um 11:53 PM Uhr)

  15. #8445
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    I'm having a problem using a function to load a pbp file as a module. I've been given the stub for the function and got everything work up to the point where I actually try and load the file, at which point I get 0x800200D9, which after searching on Google, I've found to be an error with the file I'm loading.

    The functions I'm using are in an exported file which is loading fine by the looks of things, but seeing as the application I'm trying to load (BookR) is working fine normally, I'm more than a tad confused about what is causing the error to pop up?

    Any assistance what so ever is welcome, this really has me stumped.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  16. #8446
    OMFG
    Points: 19.453, Level: 88
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Toronto
    Beiträge
    2.814
    Points
    19.453
    Level
    88
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    I'm having a problem using a function to load a pbp file as a module. I've been given the stub for the function and got everything work up to the point where I actually try and load the file, at which point I get 0x800200D9, which after searching on Google, I've found to be an error with the file I'm loading.

    The functions I'm using are in an exported file which is loading fine by the looks of things, but seeing as the application I'm trying to load (BookR) is working fine normally, I'm more than a tad confused about what is causing the error to pop up?

    Any assistance what so ever is welcome, this really has me stumped.

    -Aura
    Hopefully this helps. It loads an elf (the eboot.pbp in the non % folder for kxploited apps).
    There's alot of unneeded stuff such as the unloading of the prx loader (which is meant to load this prx), and patching the sceKernelExitGame function, and a few other things.
    int run_elf(char * elfPath) is what you should be looking at.

    http://slasher.team-duck.com/development/loader.zip

    I think your problem lies in that you can't load actual eboots as a module, you need to load the elf. (I may be wrong on this, I'm just assuming)

    Furthermore, if you're trying to load BookR such as the way irshell does it(Uses BookR to look at txt files, etc), then it's something entirely different. You must pass arguments onto the eboot. I'm not 100% sure this is how irshell does it, but I'm pretty sure.
    Ex)
    Code:
    int	runPBP(char * fileName)
    {
    	char load_path[256];
    	sprintf(load_path, "ms0:/PSP/GAME/test.txt");
    
    	char args[256];
    	sprintf(args, "%s", load_path);
    
    	struct SceKernelLoadExecParam execParam;
    
    	execParam.size = sizeof(execParam);
    	execParam.argp = args;
    	execParam.args = strlen(args) + 1;
    	execParam.key = NULL;
    
    	if (sceKernelLoadExec(fileName, &execParam) < 0)
    		return -1;
    
    	return 1;
    }
    The program that is loaded, 'fileName'; can then recieve the arg that you passed onto it, "ms0:/PSP/GAME/test.txt",
    through argv.
    Code:
    int main(int argc, char** argv)
    {
    Anyways, let me know if this helps
    Geändert von Slasher (04-23-2008 um 10:21 AM Uhr)

  17. #8447
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Well, 7-Points sent me the stubs for a sceKernelLoadModuleForLoa dExecVSHMs2 which is the function I've been trying to get working.

    Stub for the functions:
    Code:
    	.set noreorder
    
    #include "pspstub.s"
    
    	STUB_START "ModuleMgrForKernel",0x40090000,0x00030005
    	STUB_FUNC  0x6723BBFF,sceKernelLoadModuleForLoadExecVSHMs1
    	STUB_FUNC  0x49C5B9E1,sceKernelLoadModuleForLoadExecVSHMs2
    	STUB_FUNC  0xF07E1A2F,sceKernelLoadModuleForLoadExecVSHMs4
    	STUB_END
    My kernel module seems to be fine until I attempt to use the above function, which is when it breaks down.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  18. #8448
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Might I add that 0x800200D9, an error I know well, means that the PSP ran out of memory? Check the size of your heap and stack to make sure there's enough room for the ELF.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  19. #8449
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Well, I made sure that all memory was free, I reduced my heaps down to the default (32 or 64kb, can't remember) and tried, same error. Plus, according to the link I posted above, it refers to not being able to load due to an error if the file, not just that I'm out of free space?

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  20. #8450
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    http://psp.jim.sh/pspsdk-doc/pspkerror_8h.html
    SCE_KERNEL_ERROR_MEMBLOCK _ALLOC_FAILED = 0x800200d9
    So I guess it's not strictly running out of memory, so much as that it can't allocate the memory for one reason or another.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  21. #8451
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Could it be because I'm loading from a kernel module? I doubt that would be the cause seeing as it won't run in user mode, but best to ask.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  22. #8452
    QJ Gamer Silver
    Points: 6.763, Level: 54
    Level completed: 7%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    413
    Points
    6.763
    Level
    54
    Downloads
    0
    Uploads
    0

    Standard

    Hey I was wondering if anyone knew how to find all files in a folder? I'm thinking of making an app that will need this and wonder if there are functions already out there like this for the psp..

    Thanks in advance.
    Atheist, because I just won't believe in what doesn't show itself to me.

  23. #8453
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    research up on dirent.h library that's helped me in the past, their may be a library specific to the psp however i've not needed it if their is, someone correct me please, durka, if your still confused after some research on it hit me with a pm=-)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  24. #8454
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    Using dirents, namely sceIoDopen (I think, havn't actually got my code on me to refer to). If you need a bit of help drop me a PM and I'll knock you up some code when I get a chance.

    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  25. #8455
    OMFG
    Points: 19.453, Level: 88
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Toronto
    Beiträge
    2.814
    Points
    19.453
    Level
    88
    Downloads
    0
    Uploads
    0

    Standard

    You can also check out the filebrowser example @ my site, http://slasher.team-duck.com . That might help.

  26. #8456
    QJ Gamer Silver
    Points: 6.763, Level: 54
    Level completed: 7%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    413
    Points
    6.763
    Level
    54
    Downloads
    0
    Uploads
    0

    Standard

    Wow man great example, this will help me loads.

    Exactly what is needed (what headers) to use this? I don't want to include stuff I don't need.
    Atheist, because I just won't believe in what doesn't show itself to me.

  27. #8457
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    dirent.h for the POSIX version, pspiofilemgr.h for the PSP version (it's included by some files, so it might already be included)
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  28. #8458
    QJ Gamer Silver
    Points: 6.763, Level: 54
    Level completed: 7%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    413
    Points
    6.763
    Level
    54
    Downloads
    0
    Uploads
    0

    Standard

    Alright thanks.

    One more question. What size (px by px) is a single character on the standard PSP font? I'm making a simple textbox class that will be able to print according to how many characters wide you want it to be, so I need their sizes.
    Atheist, because I just won't believe in what doesn't show itself to me.

  29. #8459
    QJ Gamer Gold
    Points: 17.453, Level: 84
    Level completed: 21%, Points required for next Level: 397
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    everywhere
    Beiträge
    3.526
    Points
    17.453
    Level
    84
    Downloads
    1
    Uploads
    0

    Standard

    see your pm for my response=-)
    1. Failed....again...
    2. http://slicer.gibbocool.com/ stay updated on all my projects
    3. it'll be 5 years in june, that's nearly 1/4 of my life on this planet that i've visited these forums, what a ride it has been

  30. #8460
    QJ Gamer Green
    Points: 3.415, Level: 36
    Level completed: 44%, Points required for next Level: 85
    Overall activity: 6,0%

    Registriert seit
    Jan 2008
    Beiträge
    64
    Points
    3.415
    Level
    36
    My Mood
    Aggressive
    Downloads
    0
    Uploads
    0

    Post Load an eboot with a prx without exit the first

    Hello everyone,
    I want to know how I can do if I load an eboot with a prx to not quit the first eboot loaded before.
    It is posible because Irshell can do this ^^

    Here the code to load an eboot:

    Code:
    void execEboot(char *target)
    {
       u8 vshmain_args[0x400];
       struct SceKernelLoadExecVSHParam param;
       memset(vshmain_args, 0, sizeof(vshmain_args));
       vshmain_args[0x40] = 1;
       vshmain_args[0x280] = 1;
       vshmain_args[0x284] = 3;
       vshmain_args[0x286] = 5;
       memset(&param, 0, sizeof(param));
       param.size = sizeof(param);
       param.args = strlen(target) + 1;
       param.argp = target;
       param.key = "game";
       param.vshmain_args_size = sizeof(vshmain_args);
       param.vshmain_args = vshmain_args;
       sctrlKernelLoadExecVSHMs2(target, &param);
    }
    I thanks everyone who help me^^

    I apologize for my bad english because I am french^^


 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:27 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .