Valentines Day
Page 1 of 13 1234511 ... LastLast
Results 1 to 10 of 125

Thread: [Tutorial]The Quick + Easy Way To Start Developing in C/C++!!

                  
   
  1. #1
    DCEmu Coder dalejrrocks's Avatar
    Join Date
    Feb 2006
    Location
    Alabama
    Age
    28
    Posts
    240
    Rep Power
    48

    Thumbs up [Updated Tutorial]The Quick + Easy Way To Start Developing in C/C++!!

    *NOTE: Since this text is automatically formatted, there may be some spaces where they don't need to be or some other stuff. So if you see spacing like "controlle r", understand that i didn't do that on purpose and that it should be "controller".

    ###Changes on July 04, 2006##
    -Added Installing PSP Libs part.
    -Changed the .bat file code to improve performance, and fix some bugs.

    ###INTRODUCTION###

    For some months now, I have been wanting to start/try developing for the PSP in C/C++. I read some of the tutorials explaining how to set up and use mingw or cygwin. Most of the tutorials were complex, and required a lot of downloading of huge files. I have dial-up, so I couldnít really sit there all day and watch these files download. I am sure some others feel this way also. Anyways, I think that this may be one of the easiest and quickest(because of the small download sizes)ways to set up the PSPSDK, and the toolchain/compiler on a windows machine. So here we go:

    ###INSTALLATION###

    1.) Go download the precompiled windows toolchain/compiler + PSPSDK from:
    http://xorloser.com/PSPDevWin32.zip

    2.) Extract the .zip file somewhere on your hard-drive.

    3.) Launch the .exe file and go through the installation. You should install the package to X:\pspdev\ where X is the letter of your hard-drive. This directory is the default setting on the installer anyways.

    4.) Find your way to your x:\pspdev\ folder using the Windows Explorer. Create a new .bat file in that folder and name it whatever you want. I named mine start.bat. Next, make sure your .bat file includes the following code:

    Code:
    set PSPDEV=X:/pspdev
    set PATH=%PATH%;%PSPDEV%/bin
    set PSPSDK=X:/pspdev/psp/sdk
    cmd
    5.) Delete the pspdev.bat file from your x:\pspdev\ folder. The file that we created in step 4 configures the settings for your environment. You donít need the other pspdev.bat file that came with the package. Or you may keep it if you want. Thatís up to you. :icon_wink

    6.) Use the Windows search engine to search for a file called cygwin1.dll. Look at the file properties for all of the results and keep the newest one in x:\pspdev\bin\. Delete the other older files. I use the cygwin1.dll file with the build date of 2006-01-20 13:28 and it works great. If you donít delete the other files the compiler will get an error.

    7.) Now, you are done! Congrats, you have a working psptoolchain and PSPSDK along with the compilers installed on your computer.

    ###COMPILING AN EXAMPLE FILE###

    a.) Double-click your .bat file that you created in step 4 of the installation. It should start with the command prompt saying something like this:

    Code:
    C:\pspdev>set path=C:\Python24\.;C:\WINDOWS\SYSTEM32;C:\WINDOWS;C:\WINDOWS\SYSTEM32\WBEM;C:\WINDOWS\SYSTEM32\WSG32\;C:/pspdev/bin;C:/pspdev2/bin;c:\pspdev\bin
    
    
    C:\pspdev>set PSPSDK=C:\pspdev\psp\sdk
    
    C:\pspdev>cmd
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    
    C:\pspdev>
    Of course, instead of C it will show the letter of your drive.

    b.) Type cd psp\sdk\samples\controller\basic and hit enter to go to the x:\pspdev\psp\sdk\samples\controller\basic directory.
    You should get something like this:

    Code:
    C:\pspdev\psp\sdk\samples\controller\basic>
    c.) Type make and hit enter.
    You should get something like this in the command prompt and and eboot in the x:\pspdev\psp\sdk\samples\controller\basic folder:

    Code:
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall   -c -o main.o main.c
    psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall  -L. -LC:/pspdev/psp/sdk/l
    ib   main.o  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lp
    spnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -
    o controller_basic.elf
    psp-fixup-imports controller_basic.elf
    mksfo 'Basic controller sample' PARAM.SFO
    psp-strip controller_basic.elf -o controller_basic_strip.elf
    pack-pbp EBOOT.PBP PARAM.SFO NULL  \
            NULL NULL NULL  \
            NULL  controller_basic_strip.elf NULL
    rm -f controller_basic_strip.elf
    
    C:\pspdev\psp\sdk\samples\controller\basic>
    d.) Congratulations, you just compiled a working controller sample eboot. Iíve tested this on my 2.01 PSP through the GTA exploit and it worked fine.

    ###Installing PSP Libs###
    Now this is the very easy part. Go download my & Whazilla's PSP Development Library Installer. Get it Here. And the rest is pretty much self-explanatory. Make sure to read the readme in the package to get a detailed list of tested/untested libs, installation instructions, etc...

    ###Conclusion###
    So did you like this tutorial? This is my first tutorial. Any feedback/suggestions/problems is welcome. dalejrrocks@rambler.ru or nascar_sk8ing_technology@yahoo.com. Or PM me on the forums.

    Enjoy,
    Nick/dalejrrocks

  2. #2

  3. #3
    DCEmu Pro Cooe14's Avatar
    Join Date
    Mar 2006
    Location
    Hyrule
    Age
    27
    Posts
    860
    Rep Power
    0

    Default

    Nice new sig shadowprophet (and is that really you in your avatar?), and nice tutorial dalejrrocks.

  4. #4
    DCEmu Legend shadowprophet's Avatar
    Join Date
    May 2005
    Location
    IFeedOffYourFearS
    Age
    42
    Posts
    3,101
    Rep Power
    76

    Thumbs up yeah bro

    Thanx I love my new sig, and yes thats really me in my avatar lol
    Why would I sport somones elses image as my own avatar
    lol

  5. #5
    Now with Blast Processing! Kaiser's Avatar
    Join Date
    Jun 2005
    Location
    CANADA
    Age
    29
    Posts
    3,079
    Blog Entries
    3
    Rep Power
    50

    Default

    Nice Work

    Stickied

  6. #6
    DCEmu Coder dalejrrocks's Avatar
    Join Date
    Feb 2006
    Location
    Alabama
    Age
    28
    Posts
    240
    Rep Power
    48

    Default

    Sweet. Have you guys tried this? It works fine for me and everyone else as far as I know, except for two people on PSPUpdates. They keep getting some error. I think they typed the paths wrong.

    EDIT: They had some bad installs. They got it to work eventually, so the tutorial works. yay! lol

  7. #7
    DCEmu Newbie Matt2323's Avatar
    Join Date
    May 2006
    Posts
    10
    Rep Power
    0

    Default

    Whenever i open up my .bat files the cmd thing will pop but go away really fast. you know what the problem is? it even happens with the pspdev.bat that the package came with.

  8. #8
    DCEmu Coder dalejrrocks's Avatar
    Join Date
    Feb 2006
    Location
    Alabama
    Age
    28
    Posts
    240
    Rep Power
    48

    Default

    make sure that your .bat file has cmd at the end. the file that it came with doesn't. that's why the tutorial says to create your own .bat file.
    it should look like this if your drive letter is c:
    set path=%path%;C:\pspdev\bin
    set PSPSDK=C:\pspdev\psp\sdk
    cmd

  9. #9
    PSP User \/oid's Avatar
    Join Date
    May 2006
    Location
    south africa
    Age
    32
    Posts
    42
    Rep Power
    0

    Default

    thanks man!!it works gr8te.this is my start at writing homebrew.Sony be war3!

  10. #10
    DCEmu Newbie Matt2323's Avatar
    Join Date
    May 2006
    Posts
    10
    Rep Power
    0

    Default

    Quote Originally Posted by dalejrrocks
    make sure that your .bat file has cmd at the end. the file that it came with doesn't. that's why the tutorial says to create your own .bat file.
    it should look like this if your drive letter is c:
    set path=%path%;C:\pspdev\bin
    set PSPSDK=C:\pspdev\psp\sdk
    cmd
    O thanks that worked Rep+

Page 1 of 13 1234511 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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