Seite 209 von 340 ErsteErste ... 109 159 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 259 309 ... LetzteLetzte
Zeige Ergebnis 6.241 bis 6.270 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; Zitat von Archaemic Why modify file? Code: void load_file(const char *file) { int namelen = strlen(file) if(strcasecmp(file+namelen-4,".pbp")==0) { /*Load eboot*/; ...

  
  1. #6241
    QJ Gamer Green
    Points: 5.712, Level: 48
    Level completed: 81%, Points required for next Level: 38
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    USA SC/NC
    Beiträge
    699
    Points
    5.712
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Archaemic
    Why modify file?

    Code:
    void load_file(const char *file)
    {
        int namelen = strlen(file)
        if(strcasecmp(file+namelen-4,".pbp")==0)
        {
            /*Load eboot*/;
        }
    }
    My mistake. Thats a much better method than what I posted


    [CODE]Random Facts:
    irc://irc.malloc.us #wtf #**********
    [/CODE]

    [SIZE="6"][FONT="Century Gothic"][COLOR="Blue"][URL="http://forums.**********.net"]http://forums.**********.net[/URL][/COLOR][/FONT][/SIZE]

  2. #6242
    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

    Zitat Zitat von Archaemic
    Why modify file?

    Code:
    void load_file(const char *file)
    {
        int namelen = strlen(file)
        if(strcasecmp(file+namelen-4,".pbp")==0)
        {
            /*Load eboot*/;
        }
    }
    Argh, thats so simple... I was expecting something complex...

    Well anyway, I was using strrchr when I was crashing, I guess I'll take another look at using it.

    -Aura

    Ok, I have my code sort of working, I can drop down a directory as long as its not to the root, when I try and go from, say, ms0:/PSP to ms0: I get error 80010016 because its trying to access ms0:^û?.
    Geändert von Auraomega (08-26-2007 um 03:28 PM Uhr)
    Last.fm | Deviant Art | First working OS picture

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

  3. #6243
    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

    Sounds like you don't have a string properly terminated to me.
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  4. #6244
    Points: 3.139, Level: 34
    Level completed: 60%, Points required for next Level: 61
    Overall activity: 39,0%

    Registriert seit
    Aug 2007
    Beiträge
    31
    Points
    3.139
    Level
    34
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega

    Ok, I've got it all working well, except how to go down the directories, as in going from ms0:/PSP/GAME to ms0:/PSP, when using the .. option. Is there some sort of easy way of doing this, or do I have to do this manually?
    Back a while ago I wrote a simple memory stick file browser, its in the source code repository at psp-programming. It's not very well written or commented but maybe worth a look as it was capable of going up and down directories.

    Sounds like you don't have a string properly terminated to me.
    Yeah I agree, make sure the last character of the string is a null char.

  5. #6245
    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

    Sorry, I sorted that problem last night, but I've been having various problems with the net so I've not been able to change my post.

    Thanks anyway
    -Aura


    How would I go about loading an EBOOT or a prx, when I have no idea what memory its going to be in. I've tried using sceKernelLoadModule and starting it, but at that point I crash. When using the SDK version, I can't choose between kernel and user, it has to be one or the other and I was wondering if there was a simple solution to get around that?
    Geändert von Auraomega (08-27-2007 um 10:28 AM Uhr)
    Last.fm | Deviant Art | First working OS picture

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

  6. #6246
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    is it possible to write a function that when you set your psp in stand-by , it automaticly wake up after an hour or something?

  7. #6247
    QJ Gamer Green
    Points: 5.795, Level: 49
    Level completed: 23%, Points required for next Level: 155
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Cape Town, South Africa
    Beiträge
    714
    Points
    5.795
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Yes, not sure how though. Time Baby uses "Adrahils's alarm library", whatever that is.

  8. #6248
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    no time baby doesnt wake up , just tested it
    -= Double Post =-
    was wrong , you are suposed to press select to activate it
    Geändert von hallo007 (08-28-2007 um 08:46 AM Uhr) Grund: Automerged Doublepost

  9. #6249
    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

    Zitat Zitat von hallo007
    is it possible to write a function that when you set your psp in stand-by , it automaticly wake up after an hour or something?
    You could do a psudo stand-by...

    Disable all the buttons, turn off the screen, underclock the PSP, turn off the volume etc etc, then using the time library, add 1 hour to that and tell it to undo everything, clock the PSP at 222mhz again or what ever.

    If you want to be REALLY cleaver, I think you can also turn off the power LED, I'm not sure though as it always crashed when I attempted...

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

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

  10. #6250
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    or maybe he can ask where to find alarm library

  11. #6251
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    I dont want to make a alarm , I just looking to get the psp out of standby

  12. #6252
    QJ Gamer Bronze
    Points: 7.047, Level: 55
    Level completed: 49%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Beiträge
    144
    Points
    7.047
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von hallo007
    I dont want to make a alarm , I just looking to get the psp out of standby
    Well, the alarm is actually what wakes it up from standby and executes any piece of code you need straight after. My lib does not do the sound, but just calls TimeBaby's alarm function when the PSP wakes up at a given time.
    Adrahil - Software architect and specialist in Reverse Engineering.
    Spoiler for Guilt of a Dev:
    17:17 < InsertWittyName> Can't pin user error on a dev ;)
    17:18 < InsertWittyName> Lesson learnt on both sides I would say.
    17:18 < InsertWittyName> You learnt to treat the end-user as a retarded fish.
    17:18 < InsertWittyName> They learnt to read readme's ;)

    Spoiler for me:
    17:12 <+dot_blank> are you the long haired pimp ;)

  13. #6253
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    k , thnx


    This code should let the psp load the registry files from ms0:/ but it doesn't work
    Code:
     
    PSP_MODULE_INFO("test", 0x1000, 1, 1);        
    
    int mainThread(SceSize argc, void* argv)
    {
        sceIoUnassign("flash1:");
        sceIoAssign("flash1:","msstor0p1:","fatms0:",IOASSIGN_RDWR,NULL,0);
        
        sceKernelSleepThread();
        return 0;
        }
    
    int module_start(SceSize args, void *argp)
    {
    
        SceUID thid;
    
        thid = sceKernelCreateThread("MainThread", mainThread, 0x18, 0x1000, 0, NULL);
        if (thid >= 0) sceKernelStartThread(thid, args, argp);
    
        return 0;
        }
    
    int module_stop(void) 
    {
        return 0;
        }
    any suggestions?

  14. #6254
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Wink

    Zitat Zitat von hallo007
    I dont want to make a alarm , I just looking to get the psp out of standby
    lol you thought it was for alarms only :)

  15. #6255
    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, I need help (if you would, please)..

    This is my code:
    Code:
                cout << "What would you like to do?\n1: Make a teleport\n2: Make some text appear on screen\nSimply type in the number of the option you want and hit Enter!" << endl;
                cin >> menu;
                getchar();
    The first time I run the code, it will bring up one of the two menus if I put either 1 or 2 in.

    Now, if I then bring up the menu, output a code, and then try to type 1 or 2 again to bring up the menu, it simply closes my window :S

    Anyone help? (I'm running this on my PC, btw.)
    Atheist, because I just won't believe in what doesn't show itself to me.

  16. #6256
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    1. Post the full code.
    2. Learn how to use the debugger to source problems. The program may have crashed or there is a logic loop problem where an exit condition is given.

    http://www.gamedev.net/reference/art...rticle2322.asp

  17. #6257
    QJ Gamer Bronze
    Points: 8.665, Level: 62
    Level completed: 72%, Points required for next Level: 85
    Overall activity: 0%

    Registriert seit
    Mar 2007
    Beiträge
    758
    Points
    8.665
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    Why post computer C++ code on a PSP coding forum? There are plenty of big coding forums out there.
    Example:
    http://www.cpplc.net/forum/index.php

  18. #6258
    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

    Cus I <3 QJ. :P

    And it isn't that much of a difference when talking about my problem.
    Atheist, because I just won't believe in what doesn't show itself to me.

  19. #6259
    .info
    Points: 15.395, Level: 80
    Level completed: 9%, Points required for next Level: 455
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    ACT, Australia
    Beiträge
    1.674
    Points
    15.395
    Level
    80
    Downloads
    0
    Uploads
    0

    Standard

    I've just installed the PSPSDK and cygwin and successfully compiled a helloworld, but when i try to compile the PRX sample i get this error:
    Zitat Zitat von Error
    make: *** No rule to make target 'exports.o', needed by 'mymodule.elf'. Stop.
    EDIT: NVM, fixed it.
    Geändert von Yongobongo (08-29-2007 um 07:32 PM Uhr)

    http://www.yongobongo.com
    PSN - yongobongo

  20. #6260
    Points: 3.139, Level: 34
    Level completed: 60%, Points required for next Level: 61
    Overall activity: 39,0%

    Registriert seit
    Aug 2007
    Beiträge
    31
    Points
    3.139
    Level
    34
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Durka Durka Mahn
    Cus I <3 QJ. :P

    And it isn't that much of a difference when talking about my problem.
    People will be willing to help if you show a bit of code, without it no one will know what you prob is.

  21. #6261
    QJ Gamer Bronze
    Points: 7.047, Level: 55
    Level completed: 49%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Beiträge
    144
    Points
    7.047
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    hallo007: It does not work because the flash devices are blacklisted from reassignment.
    Adrahil - Software architect and specialist in Reverse Engineering.
    Spoiler for Guilt of a Dev:
    17:17 < InsertWittyName> Can't pin user error on a dev ;)
    17:18 < InsertWittyName> Lesson learnt on both sides I would say.
    17:18 < InsertWittyName> You learnt to treat the end-user as a retarded fish.
    17:18 < InsertWittyName> They learnt to read readme's ;)

    Spoiler for me:
    17:12 <+dot_blank> are you the long haired pimp ;)

  22. #6262
    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 decided to try learning how to hook functions today after putting it off for ages. I've been looking at the apiHook.c file from the PSPLink source, I'm no good at reading others source codes, and I don't think I understand any of it, or how any of it actually works.

    Is there any simple peices of code out there, in which all it does is hook a single function? If not, can someone do a "Hook for dummies" sort set of instructions for me, because there seems very limited help from what I've found on internet.

    Your perfect chance to treat me like a total moron and get thanked for it :ROFL:

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

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

  23. #6263
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    I need the argumetns for assign "disc0:/"
    Code:
    /** 
      * Assigns one IO device to another (I guess)
      * @param dev1 - The device name to assign.
      * @param dev2 - The block device to assign from.
      * @param dev3 - The filesystem device to mape the block device to dev1
      * @param mode - Read/Write mode. One of IoAssignPerms.
      * @param unk1 - Unknown, set to NULL.
      * @param unk2 - Unknown, set to 0.
      * @return < 0 on error.
      *
      * @par Example: Reassign flash0 in read/write mode.
      * @code 
      *	sceIoUnassign("flash0");
      * sceIoAssign("flash0", "lflash0:0,0", "flashfat0:", IOASSIGN_RDWR, NULL, 0);
      * @endcode
      * 
      */
    int sceIoAssign(const char *dev1, const char *dev2, const char *dev3, int mode, void* unk1, long unk2);
    what's dev2 and dev3 for disc0:/???

  24. #6264
    .info
    Points: 15.395, Level: 80
    Level completed: 9%, Points required for next Level: 455
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    ACT, Australia
    Beiträge
    1.674
    Points
    15.395
    Level
    80
    Downloads
    0
    Uploads
    0

    Standard

    Is it possible to blit images in the VSH?
    I'm trying to use
    Code:
    blitAlphaImageToScreen(0, 0, height, width, Image*, posX, posY);
    but it won't work in the VSH, it just shows a white box
    Or is there some way i should do it with the GU?
    Sorry if i sound nooby, i only started C a couple of days ago

    http://www.yongobongo.com
    PSN - yongobongo

  25. #6265
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    use pspjunkie's DSX

  26. #6266
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    that doesnt have function for image blitting

  27. #6267
    Avada Kedavra
    Points: 6.813, Level: 54
    Level completed: 32%, Points required for next Level: 137
    Overall activity: 0%

    Registriert seit
    May 2007
    Ort
    Spain
    Beiträge
    703
    Points
    6.813
    Level
    54
    Downloads
    0
    Uploads
    0

    Standard

    Vshblitter.

  28. #6268
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    it has a function for blitting image DATA , hasnt it?

  29. #6269
    QJ Gamer Green
    Points: 11.800, Level: 71
    Level completed: 38%, Points required for next Level: 250
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Ort
    Middle Europe
    Beiträge
    1.281
    Points
    11.800
    Level
    71
    Downloads
    0
    Uploads
    0

    Standard

    from read me:

    "At the current point in time,
    DSX has the ability to draw text to the screen and draw simple shapes."

  30. #6270
    Heroes never die
    Points: 8.645, Level: 62
    Level completed: 65%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    ...........
    Beiträge
    1.323
    Points
    8.645
    Level
    62
    Downloads
    0
    Uploads
    0

    Standard

    then I was wrong


 

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:15 PM Uhr.

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