Seite 43 von 340 ErsteErste ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 93 143 ... LetzteLetzte
Zeige Ergebnis 1.261 bis 1.290 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 Insomniac197 You're getting your functions mixed up. sceKernelSleepThread() requires no arguments and puts the thread to sleep. sceKernelDelayThread(x) ...

  
  1. #1261
    QJ Gamer Platinum
    Points: 57.528, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    h0000000rj
    Beiträge
    12.867
    Points
    57.528
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Insomniac197
    You're getting your functions mixed up.

    sceKernelSleepThread() requires no arguments and puts the thread to sleep. sceKernelDelayThread(x) will delay the thread for x amount of microseconds (1000000 microseconds in a second).
    Ahh, good call. Thanks.


    [I fail @ life]

  2. #1262
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    Hi,
    Is there a way I can serialize and unserialize data in C (like in PHP)? I need to send artists and their albums via TCP to the PSP and I need a good format, maybe somebody has an idea for a good way to do that?

    Thank you,
    Luke

    PS: My father just told me something about 'records', are ther records in C?
    -= Double Post =-
    Ok, I have two ideas to serialize/unserialize, or short to transfer my data to the PSP:

    a) Proprietary format. pro: no data overhead, smaller, faster to read/unserialize |con: proprietary (but, what the hell), not readable by humans
    this would look like 5bytes for the num of artists, followed by the length of first artist(name), followed by the first artistname, followed by the number of albums, followed by legth of the first album, etc

    b) XML pro: readable, ?? con: overhead, more difficult / slower to read and make datastructures out of it

    What would yuo choose?

    PS: Id have to malloc a lot with either of the solutions, do you think that would be too slow? Is there a better solution?

    Issue 2:
    I think I'll be having RAM-issues when recieving like 511 artists and 500 albums, what do you think? How much RAM does the PSP have? Would you write the data to a file and then read from it (was that proper english?)? And: Is there probably a small Database for the PSP out there? That would be killer!

    Thank you if you can answer any of these questions or maybe have an idea how to solve any of this (or know how much RAM the PSP has)

    Luke
    Geändert von Lukeson (10-14-2006 um 08:00 AM Uhr) Grund: Automerged Doublepost

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

    I would just send the whole thing as a C string (using sprintf). Simple to do and much easier to debug.

  4. #1264
    QJ Gamer Blue
    Points: 4.511, Level: 42
    Level completed: 81%, Points required for next Level: 39
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Germany
    Beiträge
    216
    Points
    4.511
    Level
    42
    Downloads
    0
    Uploads
    0

    Standard

    What do you mean as a C string? Of course it's a string that I send, but it needs to be formatted so that I can make a data-structure out of it which I can use to navigate through the music
    -= Double Post =-
    WTF! I read the PSP only has 8 MB of RAM!?!!! That is bull****! My webcam has more RAM than this! I will need to store the artist- and album-data in a file. Is there really no way to serialize/unserialize data-structures? Or maybe a small lightweight DB for the PSP?
    Geändert von Lukeson (10-14-2006 um 08:38 AM Uhr) Grund: Automerged Doublepost

  5. #1265
    QJ Gamer Platinum
    Points: 57.528, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Dec 2005
    Ort
    h0000000rj
    Beiträge
    12.867
    Points
    57.528
    Level
    100
    Downloads
    0
    Uploads
    0

    Standard

    Not sure if it supports serialization without extra code... but at a quick glance I like PHP's serialization model, as bulky as it is. Check it out here.

    As for the lightweight DB... maybe store a hash map/table in a file. Dunno.
    [I fail @ life]

  6. #1266
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Uhhh... the PSP has 32MB of RAM of which 24MB are available to user-mode applications. That should be far enough for your needs (even 8MB should suffice). Read the wiki on ps2dev.org for more information on the PSP's specs.
    And sending data shouldn't get overcomplicated and stay as simple as possible unless you need to decypher the data in multiple applications (like just providing a server application). In your case, I'd just send the raw data connected by spacing chars (s.th. like '$' or '%' that isn't used inside normal text) and have a fixed order of data, e.g. first comes artist name, then the artists albums terminated by another special character, then the next artist etc. until one (or two) zero byte(s) is sent to terminate the whole list. Pretty much like your "propietary" format, just more or less readable and no need for the extra transfer of list lengths.

    PS: A list of ~500 artists with lets say ~30 albums on average and a album title length of ~50 average would take 750000 bytes, and still only 775000 bytes with each artists name also ~50 chars long on average (which is pretty exaggerated everywhere). That's still less than one MB, so I there really is not the smallest problem with RAM usage (even with overhead taken into account). You should learn to get an idea of the memory usage of your datas.
    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.

  7. #1267
    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

    The PSP has 32mb of RAM.
    I would just keep the whole thing simple. Lets say the data I want to send are:
    - Song name
    - Artist name
    - Track length

    I would construct a C string like:
    $SongName:Blah Name|ArtistName:More Blah Name|TrackLength:34

    $ designates the start of a new data record, | is the delimiter for a for the data member. The symbols can easily be replaced by non typable ASCII values. This then would be parsed by the reciever very easily.

    C string is a char array, I normally use C++ which has a string class as part of the STL.

  8. #1268
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    What do I need to get started developing on the psp. If you dont want to put links then thats kewl I just need the names.
    Like I think you need
    cygwin and the psp tool chain. Is that all?
    And cant I just use my compiler (Dev C++) or does it have to be cygwin? or is it just easier to use cygwin?
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  9. #1269
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von GuitarGod1134
    What do I need to get started developing on the psp. If you dont want to put links then thats kewl I just need the names.
    Like I think you need
    cygwin and the psp tool chain. Is that all?
    And cant I just use my compiler (Dev C++) or does it have to be cygwin? or is it just easier to use cygwin?
    Go to ps2dev.org forums, psp-software development section, read the sticky (Dev C++).
    Go to psp-programming forums, read the stickies (setting up cygwin+toolchain [might be covered in the ps2dev sticky already]).
    Good luck!
    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.

  10. #1270
    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

    Raphael - Looking at the Snakman source, what method was taken to convert an image into an unsigned char array? I saw this thing called BMP2C but I dunno if it's whatthey used.... I tried bin2c but it gave me an image 4 times smaller than original and very off color... Any help (if you're not annoy'd :O ...)?

    ...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. #1271
    Ponies and Unicorns
    Points: 5.778, Level: 49
    Level completed: 14%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Pelennor Fields
    Beiträge
    547
    Points
    5.778
    Level
    49
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Raphael
    Go to ps2dev.org forums, psp-software development section, read the sticky (Dev C++).
    Go to psp-programming forums, read the stickies (setting up cygwin+toolchain [might be covered in the ps2dev sticky already]).
    Good luck!
    Thanks man.
    If you play WoW come find me on DOOMHAMMER (US) I am Human mage lvl 64 Atrana is the name (dont ask for runs!)
    Gold donations are highly appreciated!

  12. #1272
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Raphael - Looking at the Snakman source, what method was taken to convert an image into an unsigned char array? I saw this thing called BMP2C but I dunno if it's whatthey used.... I tried bin2c but it gave me an image 4 times smaller than original and very off color... Any help (if you're not annoy'd :O ...)?
    Probably a RAW file converted using bin2o.

    The conversion is all done in the makefile. Quite a few of the SDK samples in /samples/gu/ use this method, check them out.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  13. #1273
    QJ Gamer Blue
    Points: 4.580, Level: 43
    Level completed: 15%, Points required for next Level: 170
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    145
    Points
    4.580
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    My Main:
    Code:
    ]#include <pspkernel.h>
    #include <pspdebug.h>
    #include <pspdisplay.h>
    #include <pspctrl.h>
    #include <pspiofilemgr.h>
    #include <pspgu.h>
    #include <png.h>
    #include <stdlib.h>
    #include <string.h>
    #include <pspaudio.h>
    #include <pspaudiolib.h>
    #include <psppower.h>
    #include <psprtc.h>
    extern "C"
    {
    #include "graphics.h"
    }
    #define RGB(r, g, b) ((r)|((g)<<8)|((b)<<16))
    
    PSP_MODULE_INFO("MailasProduct", 0, 1, 1);
    
    /* Exit callback */
    int exit_callback(int arg1, int arg2, void *common) {
              sceKernelExitGame();
              return 0;
    }
    
    /* Callback thread */
    int CallbackThread(SceSize args, void *argp) {
              int cbid;
    
              cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
              sceKernelRegisterExitCallback(cbid);
    
              sceKernelSleepThreadCB();
    
              return 0;
    }
    
    /* Sets up the callback thread and returns its thread id */
    int SetupCallbacks(void) {
              int thid = 0;
    
              thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
              if(thid >= 0) {
                        sceKernelStartThread(thid, 0, 0);
              }
    
              return thid;
    }
    
    //GLOBAL VARIABLES
    int main(void) {
        SetupCallbacks();
        initGraphics();
    
        SceCtrlData pad, lastpad;
    
        sceCtrlReadBufferPositive(&lastpad, 1);
        
        int MegaX = 27;
        int MegaY = 136;
        
        int ProtoX = 427;
        int ProtoY = 136;
       
        Image* MegaImage;
    MegaImage = loadImage("./Images/M_Plat.png");
    
        Image* ProtoImage;
    ProtoImage = loadImage("./Images/P_Plat.png");
    
        Image* PelletImage;
    PelletImage = loadImage("./Images/pellet.png");
    
    Image * Background;
    Background = loadImage("./Images/Back.png");
    
           while(1) {
          sceCtrlReadBufferPositive(&pad, 1);
    
          if(pad.Buttons != lastpad.Buttons) { // 1
          lastpad = pad;
          
    
          if(pad.Buttons & PSP_CTRL_UP)
          {
           MegaY-=3;                     
          }
          
          if(pad.Buttons & PSP_CTRL_DOWN)
          {
           MegaY+=3;                     
          }
          } // 2
          
          blitAlphaImageToScreen(0, 0, 480, 272, Background, 0, 0);
          blitAlphaImageToScreen(0, 0, 33, 26, MegaImage, MegaX, MegaY);
          blitAlphaImageToScreen(0, 0, 24, 25, ProtoImage, ProtoX, ProtoY);
          
           sceDisplayWaitVblankStart();
     flipScreen();
     return 0; /* Whether I put return 0 or 1 it still freezes */
          }
          }
    It compiles fine but when I press Up or Down My Megaman Sprite doesnt move and it freezes or something when i try to go back to the XMB (by pressing the Home button and accepting to "Yes")

  14. #1274
    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

    Remove the return call in the loop, return makes it basically quit out of hte current function and return whatever you secify (so anything using main's return value would get 1or0 or w/e you put it in..). Just place the return call OUT of the while loop. Note, you cant simply remove it as all integers return a value... main applies.
    -= Double Post =-
    Insomniac - But the unsgined char array can be seen within the snakman source, meaning it was converted and added manially... Does bin2o spit out the unsigned char array? And whats that link to using them (i know how) but it explained exactly how to get your image embedded... grr...
    Geändert von SG57 (10-14-2006 um 01:14 PM Uhr) Grund: Automerged Doublepost

    ...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


  15. #1275
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Ok SG57.

    Imagine your file is named image.raw, you link it in your OBJS line in the makefiles as image.o.

    You then have a line like this in your makefile:

    Code:
    image.o : image.raw
    	bin2o -i image.raw image.o image
    Then in your actual code you link to it like such:

    Code:
    extern unsigned char image_start[];
    Note the '_start'. bin2o will name the converted image like this.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  16. #1276
    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

    Insomniac - You're still not understanding me... Look at the snakeman source. Youll see a very large unsgined char array called background. They DIDNT use bin2o unless it has an option to export it into an unsigned char array. Im gonna try it though, but my own variation...

    ...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


  17. #1277
    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

    Zitat Zitat von SG57
    Insomniac - You're still not understanding me... Look at the snakeman source. Youll see a very large unsgined char array called background. They DIDNT use bin2o unless it has an option to export it into an unsigned char array. Im gonna try it though, but my own variation...
    That reminds me of the what you have to do with the GBA when I was (attempting) developing on it a few years back.

    It is basically taking the image and converting it to a cahr array as you said. Depending on what format you want the image in, it can be just one entry per pixel with each entry representing the RGB value. Or it can be the asscioated palette entry.

  18. #1278
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    I got a quick question for you guys; How do you implent a command into the makefile so it wont generate a param.sfo and a .elf file? just adding the regular rm- stuff doesn't seem to work.

  19. #1279
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Insomniac - You're still not understanding me... Look at the snakeman source. Youll see a very large unsgined char array called background. They DIDNT use bin2o unless it has an option to export it into an unsigned char array. Im gonna try it though, but my own variation...
    It's probably bin2c then.

    My way works without complicating your source code with the full array.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  20. #1280
    likes kittens....awww....
    Points: 6.975, Level: 55
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Detroit
    Beiträge
    628
    Points
    6.975
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Help..

  21. #1281
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    I got a quick question for you guys; How do you implent a command into the makefile so it wont generate a param.sfo and a .elf file? just adding the regular rm- stuff doesn't seem to work.
    Those files are generated by the build.mak file that you are including in your makefile.

    Simply don't include it, although rm should delete them if you are wanting to delete them.

    'make clean' should sort it too.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  22. #1282
    Developer
    Points: 10.075, Level: 67
    Level completed: 7%, Points required for next Level: 375
    Overall activity: 0%

    Registriert seit
    Sep 2005
    Ort
    Sweden
    Beiträge
    941
    Points
    10.075
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von psphacker12.
    Help..

    You know we can't help you unless you post the main.c file containing the errors...

    Insomniac197: If I add for example rm -f file.elf to the end of my makefile I get a missing sparator error when I try to complie. Any ideas?

  23. #1283
    likes kittens....awww....
    Points: 6.975, Level: 55
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Detroit
    Beiträge
    628
    Points
    6.975
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    You know we can't help you unless you post the main.c file containing the errors...
    .....
    Angehängte Dateien Angehängte Dateien

  24. #1284
    QJ Gamer Blue
    Points: 4.580, Level: 43
    Level completed: 15%, Points required for next Level: 170
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    145
    Points
    4.580
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard

    I removed it and it gave me an error.
    Well Im not sure how to put of the error since its extremely long in the batch file, but i put the return 0; like this:
    Code:
          blitAlphaImageToScreen(0, 0, 480, 272, Background, 0, 0);
          blitAlphaImageToScreen(0, 0, 33, 26, MegaImage, MegaX, MegaY);
          blitAlphaImageToScreen(0, 0, 24, 25, ProtoImage, ProtoX, ProtoY);
          
           sceDisplayWaitVblankStart();
     flipScreen();
    
          }
          }
     return 0; /* Whether I put return 0 or 1 it still freezes */
    It gave me an error now...

  25. #1285
    QJ Gamer Silver
    Points: 14.087, Level: 77
    Level completed: 10%, Points required for next Level: 363
    Overall activity: 0%

    Registriert seit
    Jan 2006
    Ort
    Germany
    Beiträge
    926
    Points
    14.087
    Level
    77
    Downloads
    0
    Uploads
    0

    Standard

    @SG57:
    snakman? Did I miss something? ... uhhhh... well could be, I hadn't much time lately to keep up with newest releases and stuff. I dunno what method was used and it's pretty much impossible to say unless you ask the one that converted it :P Actually it doesn't matter, just use the appropriate tool for your image format (bmp2c for .bmp files, bin2c for .raw files, etc.) and you're good. I suppose you tried to use bin2c with a non-raw file, therefore screwing the image up. bin2c only converts every byte from the file into an output array so if the file contains any header information that has nothing to do with the image data, or even the image is compressed, then bin2c will not work correctly. Thatswhy you need raw images, which only contain the pixels of the image in linear form.

    EDIT: Damn that thread moves too fast for me already... heh... I'm gettin' old.
    Regarding char array problematic - well, it doesn't matter whether your C-array is an unsigned char array or unsingned int array or whatever your tool outputs, because data is just data. char and int are just interpretations of this (same) data. So say you want to get your 16bit RGB image into a C array, but your bin2c outputs an unsigned char array. Well, just typecast that array into an unsigned short array and you have your 16bit image. The same works into any direction.
    Geändert von Raphael (10-14-2006 um 03:58 PM Uhr)
    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.

  26. #1286
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SodR
    Insomniac197: If I add for example rm -f file.elf to the end of my makefile I get a missing sparator error when I try to complie. Any ideas?
    You need to add something like this mate, at the end of the makefile:

    Code:
    noelf: kxploit
    	rm -f myfile.elf
    Then when you come to compile just put 'make noelf'.

    Note that the rm line is indented with a tab, this is required. You can add more lines after that if you wish to delete other files etc, these need a tab indent also.

    The 'kxploit' at the end I put in assuming you required it, you can change it to whatever you normally do or remove it altogether.
    -= Double Post =-
    Zitat Zitat von Gonrai
    I removed it and it gave me an error.
    Well Im not sure how to put of the error since its extremely long in the batch file, but i put the return 0; like this:
    Code:
          blitAlphaImageToScreen(0, 0, 480, 272, Background, 0, 0);
          blitAlphaImageToScreen(0, 0, 33, 26, MegaImage, MegaX, MegaY);
          blitAlphaImageToScreen(0, 0, 24, 25, ProtoImage, ProtoX, ProtoY);
          
           sceDisplayWaitVblankStart();
     flipScreen();
    
          }
          }
     return 0; /* Whether I put return 0 or 1 it still freezes */
    It gave me an error now...
    Code:
          blitAlphaImageToScreen(0, 0, 480, 272, Background, 0, 0);
          blitAlphaImageToScreen(0, 0, 33, 26, MegaImage, MegaX, MegaY);
          blitAlphaImageToScreen(0, 0, 24, 25, ProtoImage, ProtoX, ProtoY);
          
           sceDisplayWaitVblankStart();
     flipScreen();
    
          }
     return 0; /* Whether I put return 0 or 1 it still freezes */
          }
    Your return was in the wrong place, again.
    Geändert von Insomniac197 (10-14-2006 um 03:48 PM Uhr) Grund: Automerged Doublepost

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  27. #1287
    QJ Gamer Blue
    Points: 4.580, Level: 43
    Level completed: 15%, Points required for next Level: 170
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Beiträge
    145
    Points
    4.580
    Level
    43
    Downloads
    0
    Uploads
    0

    Standard uhh

    This is insane!!! I put it in the right place but now it still gives me an error, a HUGE error:
    Code:
    graphics.h:165: warning: 'fillScreenRect' initialized and declared 'extern'
    graphics.h:165: error: variable or field 'fillScreenRect' declared void
    graphics.h:165: error: 'Color' was not declared in this scope
    graphics.h:165: error: expected primary-expression before 'int'
    graphics.h:165: error: expected primary-expression before 'int'
    graphics.h:165: error: expected primary-expression before 'int'
    graphics.h:165: error: expected primary-expression before 'int'
    graphics.h:165: error: initializer expression list treated as compound expressi
    n
    graphics.h:175: warning: 'putPixelScreen' initialized and declared 'extern'
    graphics.h:175: error: variable or field 'putPixelScreen' declared void
    graphics.h:175: error: 'Color' was not declared in this scope
    graphics.h:175: error: expected primary-expression before 'int'
    graphics.h:175: error: expected primary-expression before 'int'
    graphics.h:175: error: initializer expression list treated as compound expressi
    n
    graphics.h:185: warning: 'putPixelImage' initialized and declared 'extern'
    graphics.h:185: error: variable or field 'putPixelImage' declared void
    graphics.h:185: error: 'Color' was not declared in this scope
    graphics.h:185: error: expected primary-expression before 'int'
    graphics.h:185: error: expected primary-expression before 'int'
    graphics.h:185: error: expected primary-expression before '*' token
    graphics.h:185: error: 'image' was not declared in this scope
    graphics.h:185: error: initializer expression list treated as compound expressi
    n
    graphics.h:195: error: 'Color' does not name a type
    graphics.h:205: error: 'Color' does not name a type
    graphics.h:215: error: 'u32' has not been declared
    graphics.h:226: error: 'u32' has not been declared
    graphics.h:239: error: 'Color' has not been declared
    graphics.h:266: error: 'Color' has not been declared
    graphics.h:278: error: 'Color' has not been declared
    graphics.h:285: error: expected initializer before '*' token
    graphics.h:292: error: expected initializer before '*' token
    main.cpp: In function 'int exit_callback(int, int, void*)':
    main.cpp:24: error: 'sceKernelExitGame' was not declared in this scope
    main.cpp: In function 'int CallbackThread(SceSize, void*)':
    main.cpp:32: error: 'sceKernelCreateCallback' was not declared in this scope
    main.cpp:33: error: 'sceKernelRegisterExitCallback' was not declared in this sc
    pe
    main.cpp:35: error: 'sceKernelSleepThreadCB' was not declared in this scope
    main.cpp: In function 'int SetupCallbacks()':
    main.cpp:44: error: 'sceKernelCreateThread' was not declared in this scope
    main.cpp:46: error: 'sceKernelStartThread' was not declared in this scope
    /usr/local/pspdev/psp/sdk/include/psptypes.h: At global scope:
    /usr/local/pspdev/psp/sdk/include/psptypes.h:73: warning: '_sb' defined but not
    used
    /usr/local/pspdev/psp/sdk/include/psptypes.h:74: warning: '_sh' defined but not
    used
    /usr/local/pspdev/psp/sdk/include/psptypes.h:75: warning: '_sw' defined but not
    used
    /usr/local/pspdev/psp/sdk/include/psptypes.h:76: warning: '_sd' defined but not
    used
    make: *** [main.o] Error 1
    -_-
    Geändert von Gonrai (10-14-2006 um 04:03 PM Uhr)

  28. #1288
    Developer
    Points: 4.318, Level: 41
    Level completed: 84%, Points required for next Level: 32
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    205
    Points
    4.318
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von psphacker12.
    Help..
    Well one of your problems is WeatherBug, which is adware and (last I heard) difficult to remove. Second, what's up with using that SBC Yahoo browser? I suppose it's better than IE.

    Zitat Zitat von Gonrai
    does anyone know how to fix my main.cpp file?? It just freezes and I even did what SG told me to do, I put the return 0; out of the loop, BUT IT GIVES ME ERRORS ON THE BATCH FILE.
    Did you see Insomniac's post?

  29. #1289
    likes kittens....awww....
    Points: 6.975, Level: 55
    Level completed: 13%, Points required for next Level: 175
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    Detroit
    Beiträge
    628
    Points
    6.975
    Level
    55
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von psphacker12.
    http://forums.qj.net/attachment.php?attachment id=5570&d=1160869113
    is anyone going to help?

  30. #1290
    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

    Errors only help when we have somewhat good view on your project... Either you have made the functions after when your trying to use them, not linking the library ,etc...

    ...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



 

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 .