The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new buzz from Dashhacks in your email each day?




Want to learn more about the team who brings you the Dash Hacks news?

Read about them now!

 


Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 32

Thread: PSP Programming Language?

  
  1. #11
    Vertana is offline -Hacks Newbie
    Join Date
    Jun 2009
    Posts
    4
    Rep Power
    0

    Red face

    Do you know why C++ won't work on Phat PSP? I was hoping eventually I could make features that would auto detect the PSP version and adjust memory usage accordingly. If I went for C++ would there be things I could not do on PSP that I could do with C? (Just preparing for roadblocks ahead)

  2. #12
    MTN's Avatar
    MTN
    MTN is offline Programmer -Hacks Enthusiast
    Join Date
    Jan 2009
    Location
    Unknown
    Posts
    497
    Rep Power
    5

    Talking

    Do you know why C++ won't work on Phat PSP?
    C++ doesnt work on any psp , not just phat ... except lte(a game engine) that uses C++ but i dont know how , check out its site if you wanna find out ... and you can detect PSP version and adjust memory ... but you have to do it in C with psp sdk's Functions .

    -"OOh! sceGuClear?! Sounds exciting! I wanna stick my dick in it!" Stinkee2
    -DO NOT choose "install alongside other OS" when installing ubuntu 10.04 or higher

  3. #13
    pspjoke's Avatar
    pspjoke is offline Programmer -Hacks Guru
    Join Date
    Mar 2008
    Location
    U.S.
    Posts
    1,814
    Rep Power
    9

    Default

    Quote Originally Posted by MTN View Post
    C++ doesnt work on any psp , not just phat ... except lte(a game engine) that uses C++ but i dont know how , check out its site if you wanna find out ... and you can detect PSP version and adjust memory ... but you have to do it in C with psp sdk's Functions .
    C++ does work on the any psp... and not just for lte.
    i use C++ to code for the psp.
    if you can't get your code to compile or run, your doing something wrong.

  4. #14
    MTN's Avatar
    MTN
    MTN is offline Programmer -Hacks Enthusiast
    Join Date
    Jan 2009
    Location
    Unknown
    Posts
    497
    Rep Power
    5

    Default

    you mean you can use oop for you psp programs ?

    -"OOh! sceGuClear?! Sounds exciting! I wanna stick my dick in it!" Stinkee2
    -DO NOT choose "install alongside other OS" when installing ubuntu 10.04 or higher

  5. #15
    pspjoke's Avatar
    pspjoke is offline Programmer -Hacks Guru
    Join Date
    Mar 2008
    Location
    U.S.
    Posts
    1,814
    Rep Power
    9

    Default

    Quote Originally Posted by MTN View Post
    you mean you can use oop for you psp programs ?
    i mean i can use the programming language C++ that is a object oriented programing language.

    so yea.

    im sure most of the other devs here use C++ as well. not saying that asa fact, but im pretty sure. i suppose you could just ask them so...

    all other devs that happen to read this, please post what language you use primarily for the psp.

  6. #16
    MTN's Avatar
    MTN
    MTN is offline Programmer -Hacks Enthusiast
    Join Date
    Jan 2009
    Location
    Unknown
    Posts
    497
    Rep Power
    5

    Default

    how ???? ??? even if i write "object obj;" it gives me an error . i use minpspw. i havent seen anywhere in psp-hacks or psp-programming tutz. all the types such as OSL_FONT , OSL_IMAGE ,SceKernelLoadExecVSHParam are structs . i havent seen any object any where , could you post a oop hello world program please ?

    -"OOh! sceGuClear?! Sounds exciting! I wanna stick my dick in it!" Stinkee2
    -DO NOT choose "install alongside other OS" when installing ubuntu 10.04 or higher

  7. #17
    SG57's Avatar
    SG57 is offline Homebrew Idol 2 Winner -Hacks Guru
    Join Date
    Apr 2007
    Location
    Washington
    Posts
    1,599
    Rep Power
    8

    Default

    Yes you may use C++ with the psptoolchain. Make sure your source file extension is '.cpp' and you add '-lstdc++' to your LIBS line in your makefile.

    eg:
    main.cpp
    Code:
    class cObject
    {
      private:
        int x;
      
      public:
        cObject(const int i) : x(i) {}
        ~cObject();
    
        void print()
        {
          std::cout << "X = " << x << std::endl;
        }
    };
    
    int main()
    {
      cObject myObj(5);
      cObject *ptrObj = new cObject(5);
    
      myObj.print();
      ptrObj->print();
    
      return 0;
    }
    Makefile
    Code:
    ... blah blah ...
    
    LIBS = ... -lstdc++ ...
    
    ... blah blah ...

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

    Projects

  8. #18
    shadow-niga's Avatar
    shadow-niga is offline -Hacks Neophyte
    Join Date
    Jun 2009
    Location
    northwich
    Posts
    65
    Rep Power
    4

    Smile

    im trying to learn how to code, i need the internet on my pc though for some things such as downloading (all websites with download countdowns dont work on psp internet, SG57 could you maybe look at my thread called "help me!" and see if you can help?

  9. #19
    MTN's Avatar
    MTN
    MTN is offline Programmer -Hacks Enthusiast
    Join Date
    Jan 2009
    Location
    Unknown
    Posts
    497
    Rep Power
    5

    Default

    shit $%#$ @%%@#&* ahhhhhhh .then im sorry for posting bull shit and thanks for info. what about module information and exit call back ... ?
    EDIT :
    returned error :
    Code:
    main.cpp (13) : error: 'cout' is not a member of 'std'
    main.cpp (13) : error: 'endl' is not a member of 'std'
    Last edited by MTN; 07-01-2009 at 06:01 AM.

    -"OOh! sceGuClear?! Sounds exciting! I wanna stick my dick in it!" Stinkee2
    -DO NOT choose "install alongside other OS" when installing ubuntu 10.04 or higher

  10. #20
    pspjoke's Avatar
    pspjoke is offline Programmer -Hacks Guru
    Join Date
    Mar 2008
    Location
    U.S.
    Posts
    1,814
    Rep Power
    9

    Default

    Quote Originally Posted by MTN View Post
    shit $%#$ @%%@#&* ahhhhhhh .then im sorry for posting bull shit and thanks for info. what about module information and exit call back ... ?
    EDIT :
    returned error :
    Code:
    main.cpp (13) : error: 'cout' is not a member of 'std'
    main.cpp (13) : error: 'endl' is not a member of 'std'

    to print to the psp's debug screen, you have to first initialize it.
    pspDebugScreenInit();

    iirc thats the function, then to print to it you call
    pspDebugScreenPrintf();

    which most people #define it as printf
    so you can use it like the old C function.

    cout and endl are for printing to the console screen on platforms that support it. the psp doesn't altho if you recode the pspsdk then you could add it in im sure..

    anyway it takes arguments in the format.

    pspDebugScreenPrintf(char*,...) iirc

    so the string to print and the format specifiers.

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •