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




 
Would you like to get all the newest Gaming News from
QJ.NET in your email each day?




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

Read about them now!

 


Page 1 of 2 1 2 LastLast
Results 1 to 30 of 56

How to program in D with the psptoolchain (with gdc)

This is a discussion on How to program in D with the psptoolchain (with gdc) within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I know I'm not the only one who tires of the difficulty of C, the clunkiness and ugliness of C++, ...

  
  1. #1
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Smile How to program in D with the psptoolchain (with gdc)

    I know I'm not the only one who tires of the difficulty of C, the clunkiness and ugliness of C++, and the general limitations of Lua, and desired a better language for PSP development--a language that ironically combines the speed of C, the OOP aspects of C++ or Java, and even some of the cool tricks of Lua, such as automatic garbage collection, anonymous functions, and nested functions. I am referring to the language known as D. I have studied that language for a while now that a stable release, 1.0, has come out, and I thought, I am not returning to PSP development unless I can use that.

    So I asked a simple question on D.GNU, the news list for the free software D compiler, about why I couldn't compile gdc along with the c and c++ compilers without errors, and surprisingly I received many answers and GDC was patched to support MIPS. Many others had interest in this and so here are the instructions that someone gave to compile the GNU D compiler (dgcc) with an already working psptoolchain install:


    Quote Originally Posted by Kostas
    > Thanks. How exactly do you compile libgphobos.a for the PSP? I tried it
    > but got errors about missing files. What directory should I be in and
    > what command do I type?

    Build instructions

    First of all I'm running OSX Leopard on a PowerPC, so what you need to
    do may vary, not by much on a Unix system but potentially a lot on Windows.

    I assume you have the latest and complete psp toolchain. If not I
    suggest you try downloading & installing a prebuilt one or preferably
    use the "psptoolchain" build scripts found on:
    svn://svn.ps2dev.org/psp/trunk/psptoolchain

    Ok, here we go:

    1. Make a temporary directory for your build
    mkdir pspd
    cd pspd

    2. Setup environment paths
    export PSPDEV=/the/path/where/the/pspsdk/is/already/installed
    export PATH=$PATH:$PSPDEV/bin

    # If your native compiler tools are in some extra non standard path
    # also export these variables.
    # In my case I use macports, installed on /opt/local
    export C_INCLUDE_PATH="/opt/local/include"
    export CPLUS_INCLUDE_PATH="/opt/local/include"
    export LIBRARY_PATH="/opt/local/lib"

    3. Download and unpack gcc
    wget --continue ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4....-4.1.0.tar.bz2

    tar -xvjf gcc-4.1.0.tar.bz2

    4. Download and apply psp toolchain patches to gcc
    svn export svn://svn.ps2dev.org/psp/trunk/psptoolchain/patches/gcc-4.1.0-PSP.patch
    cd gcc-4.1.0
    patch -p1 <../gcc-4.1.0-PSP.patch

    5. Download and setup gdc
    cd gcc
    # we now must be in directory ...../pspd/gcc-4.1.0/gcc

    # Checkout dgcc from svn
    svn co https://dgcc.svn.sourceforge.net/svnroot/dgcc/trunk/d

    cd ..

    # setup dgcc
    ./gcc/d/setup-gcc.sh --d-language-version=1

    5.5 Optional step, for those compiling GCC under Leopard/PowerPC. Apply a patch to fix some GCC compiler errors

    cd gcc/config/rs6000/
    wget "http://trac.macports.org/attachment/ticket/13191/gcc_patch?format=raw" -Oleopard_ppc.patch
    patch -p1 <leopard_ppc.patch
    cd ../../../


    6. Configure, build, and install gcc (gdc & libgphobos included)
    # Make a separate build subdirectory
    # we must be ...../pspd/gcc-4.1.0
    mkdir build-psp
    cd build-psp

    # Configure GCC
    ../configure --prefix="$PSPDEV" --target="psp" --enable-languages="c,d,c++" --with-newlib --enable-cxx-flags="-G0" --disable-libssp --enable-static --disable-shared

    # Compile GCC
    CFLAGS_FOR_TARGET="-G0" make

    # Install GCC
    make install

    And that should be enough to get a funcional GCC with D/libgphobos

    As far as my small libgphobos patch is concerned, I agree that it might not be necessary. However given the temperamental behaviour of the linker (especially when it comes to the order of the PSPSDK libraries) I removed the extra definition of main, to make sure that if no main is declared a linker error would be raised. At any rate it works fine without the change.

    Have fun !

    Kostas
    This gives a fully functional psp-gdc compiler and libgphobos.a, which contains the D standard library and runtime. But there are still some minor issues. The PSP_MODULE_INFO macro is a weird thing that expands to inline mips assembly and some strange struct thing, which may or may not be possible to do in D. So a C source file is needed for the "glue" and has PSP_MODULE_INFO. But the rest can be nice, plain D source files (.d).

    So here is an example of a project that can be compiled with the D compiler in the toolchain: http://rapidshare.com/files/13244035...xample.7z.html

    BUT: you must do one of either to get this to compile with make: manually compile the D file with "psp-gdc -c main.d" OR add this in line 201 of the $PSPDEV/psp/sdk/lib/build.mak file:
    Code:
    %.o: %.d
    	psp-gdc -c $< $(DFLAGS)
    (yes that is a tab before psp-gdc -c $<). The DFLAGS is an optional macro you could put in each project Makefile that contains d compile flags such as -I.
    OR just use this file http://rapidshare.com/files/133727628/build.mak.html as your $PSPDEV/psp/sdk/lib/build.mak file. Regardless, I just ask everyone compiling D on the PSP to add "-fversion=Psp" to their compile or DFLAGS options because we need some sort of version set for the PSP since neither version=Windows or version=Linux is set.

    I have many plans and ideas of some D programs I want to port, as long as I can either compile libgtango--the alternative, superior standard D library, or remove some tango dependencies from those projects. So far, we haven't had luck getting past running the configure script for trying to compile tango for psptoolchain. But the inferior stdlib Phobos is good enough for what PSP apps generally are (calling mostly sce* functions or using OSLib or SDL).

    EDIT: I'm using an archaic style makefile so for 3.xx users you might need to add this to the Makefile in the demo:
    Code:
    PSP_FW_VERSION=300
    But the 1.0 EBOOT worked for me and I am using 3.40 OE.

    Useful headers

    To make things easy, I have ported all of the pspsdk headers to D and they should work properly: http://rapidshare.com/files/13513325...psdkD.zip.html

    To use them, make sure the extracted pspsdk/ folder is in your psp-gdc include path (paths added with -Ipathname, e.g. -I/usr/local/include/myincludes or just put pspsdk/ in $PSPDEV/include/d/4.1.0/ ) and you need to link your applications to libpspsdkD.a for all functionality to work. To link it, just put the library in your project source folder, add -L. -lpspsdkD to your LIBS macro in the Makefile. or you can just drag and drop libpspsdkD.a into $PSPDEV/lib and use -lpspsdkD.

    If you want to use the Lua API with D applications, this package is all you need: http://rapidshare.com/files/133725027/dluaPsp.zip.html it contains both the D headers and a precompiled liblua51.a that makes sure the headers work without linker errors. I was going to port DMDScript but it is too heavily dependent on parts of Phobos that are not yet implemented on the Psp (but could easily be implemented). I had gotten it to compile but it crashed on trying to initialize... oh well, Lua is probably faster and better anyway.
    Last edited by the_darkside_986; 08-05-2008 at 02:56 PM. Reason: http://rapidshare.com/files/135133257/libpspsdkD.zip.html

  2. #2
    QJ Gamer Platinum
    Points: 57,528, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Dec 2005
    Location
    h0000000rj
    Posts
    12,869
    QJ Pts
    57,528
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    ... Wow.

    Not sure if I'll use this, but that's a great accomplishment. Nothing like opening up our options!
    [I fail @ life]

  3. #3
    NetGameOrb Maker
    Points: 6,138, Level: 50
    Level completed: 94%, Points required for next Level: 12
    Overall activity: 0%

    Join Date
    Jan 2008
    Location
    New York
    Posts
    683
    QJ Pts
    6,138
    Level
    50
    My Mood
    Cheerful
    Downloads
    2
    Uploads
    0

    Default

    thanks for the info, i didnt even knew D exsite and more for psp lol :)
    maybe i give it a try on monday to see how it is
    GameLive name changed to NetGameOrb, Project is now online in Beta stage. Everyone encourage to register so they get news about the project and ability to play the games with NetGameOrb Support online. More info on site.

    Stats Blog:http://netgameorb.blogspot.com/
    Website:http://www.netgameorb.com/

  4. #4
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    Yeah, I owe it all to the brilliant programmers on D.gnu at news.digitalmars.com. D, IMO, makes OOP programming easier without sacrificing speed. For more information on the language see http://www.digitalmars.com/d/1.0/index.html and http://en.wikipedia.org/wiki/D_(programming_language) .

    For a list of projects written in D that might be candidates for porting to the PSP now: http://www.dsource.org/projects/

    The Tango standard library is the most important one IMO. But for now I am happy just having the D language and garbage collector as an addition to the typical C functions I use in the psp sdk.

  5. #5
    QJ Gamer Green
    Points: 4,092, Level: 40
    Level completed: 72%, Points required for next Level: 58
    Overall activity: 0%

    Join Date
    Jul 2008
    Posts
    508
    QJ Pts
    4,092
    Level
    40
    Downloads
    0
    Uploads
    0

    Default

    If you upload the eboot one of us could test it for you. Honestly I've heard of D, and wanted to look into it, but remembered it couldn't work it psp. If this goes well, I'm most definitely looking into it, that's pretty damn gangster.

  6. #6
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    Both 1.5 and 1.0 EBOOT are contained in the example archive I posted a link to, but that's alright I finally got home and tested it, and it works :Punk:

    Now I just need to port the psp*.h files to D and I'll upload them afterwards.

    This is truly an exciting moment in PSP homebrew history (for me at least.)

  7. #7
    QJ Gamer Gold
    Points: 14,678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Join Date
    Nov 2006
    Posts
    1,523
    QJ Pts
    14,678
    Level
    78
    Downloads
    0
    Uploads
    0

    Thumbs up

    Whats garbage collection? I heard it many times but never bothered. May be this will be integrated with PSP Toolchain in the future :)

  8. #8
    QJ Gamer Green
    Points: 3,721, Level: 38
    Level completed: 48%, Points required for next Level: 79
    Overall activity: 0%

    Join Date
    Jan 2008
    Posts
    612
    QJ Pts
    3,721
    Level
    38
    Downloads
    0
    Uploads
    0

    Default

    Garbage collection frees the memory that you had used but then stopped using. Make a variable, set it to null, then collecting garbage gives the memory which had been allocated for that variable back to be used for other things.

  9. #9
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    Oh, by that I meant to say, "automatic garbage collection." In D, you can still manually allocate memory with new and delete, but the delete is optional--that is--if you don't delete it manually it will clean it up later sorta like in Lua (well more like Java actually). It can be very useful.

    I accidentally made a mistake in copying and pasting one of the instructions.
    Code:
    svn export
    svn://svn.ps2dev.org/psp/trunk/psptoolchain/patches/gcc-4.1.0-PSP.patch
    should be
    Code:
    svn export svn://svn.ps2dev.org/psp/trunk/psptoolchain/patches/gcc-4.1.0-PSP.patch
    (news reader program's fault). I would edit my first post but that feature doesn't seem to be working for me (Firefox 3.0.1 GNU/Linux). So it would be nice if a mod could edit that for me.

    Right now I am typing away at the keyboard trying to get all the pspsdk headers converted to D. I've got 3 done so far, but some macros won't be ported. The way of doing macros via templates in D is quite powerful but confusing and I still don't understand it fully. (D's template system completely blows away C++'s, IMO).

  10. #10
    QJ Gamer Bronze
    Points: 5,852, Level: 49
    Level completed: 51%, Points required for next Level: 98
    Overall activity: 0%

    Join Date
    Mar 2007
    Posts
    758
    QJ Pts
    5,852
    Level
    49
    Downloads
    0
    Uploads
    0

    Default

    This is voodoo, I was just getting really interested in D, and now this.
    Thanks for this.

  11. #11
    QJ Gamer Green
    Points: 4,092, Level: 40
    Level completed: 72%, Points required for next Level: 58
    Overall activity: 0%

    Join Date
    Jul 2008
    Posts
    508
    QJ Pts
    4,092
    Level
    40
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by the_darkside_986 View Post
    Oh, by that I meant to say, "automatic garbage collection." In D, you can still manually allocate memory with new and delete, but the delete is optional--that is--if you don't delete it manually it will clean it up later sorta like in Lua (well more like Java actually). It can be very useful.

    I accidentally made a mistake in copying and pasting one of the instructions.
    Code:
    svn export
    svn://svn.ps2dev.org/psp/trunk/psptoolchain/patches/gcc-4.1.0-PSP.patch
    should be
    Code:
    svn export svn://svn.ps2dev.org/psp/trunk/psptoolchain/patches/gcc-4.1.0-PSP.patch
    (news reader program's fault). I would edit my first post but that feature doesn't seem to be working for me (Firefox 3.0.1 GNU/Linux). So it would be nice if a mod could edit that for me.

    Right now I am typing away at the keyboard trying to get all the pspsdk headers converted to D. I've got 3 done so far, but some macros won't be ported. The way of doing macros via templates in D is quite powerful but confusing and I still don't understand it fully. (D's template system completely blows away C++'s, IMO).
    Change your theme to "Vb orig" for these forums. Anyways, NICE job on all of this.

  12. #12
    No longer a community member.
    Points: 46,662, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Dec 2005
    Posts
    22
    QJ Pts
    46,662
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    Well, you've inspired me to check out the D programming language now. This could be quite interesting.

    Thanks for all the work you have put/are putting into this!

  13. #13
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    Mostly the dgcc devs and whoever patched it for the PSP are to be thanked, but I assigned myself the task of converting all of the psp sdk *.h files into D... and so far I am 1/3 done but haven't tested any of them. This will take a while but will make things easier.

    Next I will try porting Die Critters Die (PSP) to D or port the MiniD scripting language core to PSP to provide a nice scripting language for PSP development with D. Sure, there are Lua headers for D but MiniD has the best D integration.

    Perhaps I could develop a "MiniD_Player" in the tradition of LuaPlayer, and it would have access to psp graphics and other useful libraries. The MiniD core itself is portable but its default bindings are too heavily tied to Tango lib, and we've only got Phobos lib working so far on the PSP, so that means I will have to write a custom MiniD stdlib for PSP usage.

  14. #14
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    I have updated the example program to use the PSP SDK headers that I converted to D today:
    http://rapidshare.com/files/13267030...mple2.zip.html

    So now, the C source file "glue" only contains PSP_MODULE_INFO, I was able to do the home key thread stuff in pure D. These headers are in a folder called pspsdk and to use them in your D projects, you either put the folder next to your main.d source file or put them in "$PSPDEV"/include/d/4.1.0 folder (e.g. /usr/local/pspdev/include/d/4.1.0).

    HOWEVER: not all of them have been tested and confirmed to compile. There is also an added file I wrote, "pspdconfig.d" that contains constants such as _PSP_FW_VERSION, which is set to 300 by default. If you need to target a different firmware in your makefile, don't forget to change this file accordingly. But 300 seems to be a standard target.

    Mods, perhaps we could get a D help thread? I would be willing to try to answer D questions and fix problems related to my psp sdk header package. I truly hope this amounts to something because I like the language.

  15. #15
    QJ Gamer Bronze
    Points: 5,826, Level: 49
    Level completed: 38%, Points required for next Level: 124
    Overall activity: 0%

    Join Date
    Aug 2007
    Location
    Everywhere
    Posts
    206
    QJ Pts
    5,826
    Level
    49
    Downloads
    0
    Uploads
    0

    Default

    So, this isn't like, being translated or anything, right?
    Kinda like how lua does...

    It still is being read as machine code? No down falls at all?

  16. #16
    QJ Gamer Bronze
    Points: 5,852, Level: 49
    Level completed: 51%, Points required for next Level: 98
    Overall activity: 0%

    Join Date
    Mar 2007
    Posts
    758
    QJ Pts
    5,852
    Level
    49
    Downloads
    0
    Uploads
    0

    Default

    Before a help thread, you should get make some tutorials maybe. Or at least make up a list of some that people could use to learn the language. Or, make a D help/discussion thread. I'm assuming that before this thread, not too many people have heard of D. Here is a tutorial that I know though:

    http://compsci.ca/v3/viewtopic.php?t=9518

    Very long.
    And if you're new to programming, don't start with D. There aren't really any forums/discussion groups. There are some news groups, but a forum like QJ, only for D, does not exist. ( Or is just too hard to find )

  17. #17
    QJ Gamer Gold
    Points: 14,678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Join Date
    Nov 2006
    Posts
    1,523
    QJ Pts
    14,678
    Level
    78
    Downloads
    0
    Uploads
    0

    Default

    I think it's time-consuming switching from C (totally ignorant of C++) to D :ROFL:

  18. #18
    QJ Gamer Gold
    Points: 14,678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Join Date
    Nov 2006
    Posts
    1,523
    QJ Pts
    14,678
    Level
    78
    Downloads
    0
    Uploads
    0

    Default

    I mean being able to make use of all functionality Encapsulation, Classes, something something... :)

  19. #19
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    D is a high level language that borrows some nice features from Java, C#, etc. but still compiles to plain machine code like C and C++.

    Yeah I'm working on some tutorials. I suppose I could start my porting these: http://www.psp-programming.com/tutorials/c to D. But for the image rendering stuff I am going to port my old EasyGU lib to object-oriented D. It is pure hell trying to port even parts of png.h to D. But I'll get it soon enough. And I'll make a D wrapper around mikmod instead of using mp3 (I hate mp3s personally, vorbis and mikmod FTW).

  20. #20
    QJ Gamer Gold
    Points: 14,678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Join Date
    Nov 2006
    Posts
    1,523
    QJ Pts
    14,678
    Level
    78
    Downloads
    0
    Uploads
    0

    Default

    Does #include <libname.h> still work?

    Or does are we only supposed to use

    import like java

  21. #21
    No longer a community member.
    Points: 46,662, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Dec 2005
    Posts
    22
    QJ Pts
    46,662
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by the_darkside_986 View Post
    D is a high level language that borrows some nice features from Java, C#, etc. but still compiles to plain machine code like C and C++.

    Yeah I'm working on some tutorials. I suppose I could start my porting these: http://www.psp-programming.com/tutorials/c to D. But for the image rendering stuff I am going to port my old EasyGU lib to object-oriented D. It is pure hell trying to port even parts of png.h to D. But I'll get it soon enough. And I'll make a D wrapper around mikmod instead of using mp3 (I hate mp3s personally, vorbis and mikmod FTW).
    Correct me if I'm wrong, but I seem to have read somewhere that SDL works with D. I don't know to what extent, and if it's hacked together or not because I haven't really had time to look at D yet. If this is true, would SDL work on the PSP with D as well? I know it already works with C/C++.

    Also, you mentioned something about a help thread for D here. If you start one up, I wouldn't mind sticking it later. If it starts to have a large following that is. :)

  22. #22
    QJ Gamer Bronze
    Points: 5,852, Level: 49
    Level completed: 51%, Points required for next Level: 98
    Overall activity: 0%

    Join Date
    Mar 2007
    Posts
    758
    QJ Pts
    5,852
    Level
    49
    Downloads
    0
    Uploads
    0

  23. #23
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    It is import, similar to Java. Luckily D is 100% ABI compatible with all C libraries. Converting C headers to D is straightforward. I do that all the time manually without any external tools. But here is more information about it:
    http://www.digitalmars.com/d/1.0/htomodule.html

    And here is more information about the language itself, until I get a decent tutorial written:
    http://www.digitalmars.com/d/1.0/lex.html

    Yes, SDL is a pure C library (not C++) so it works perfectly with D if the headers are converted. There is Derelict, but it is unusable on the PSP because it wants to load shared library files, not static linked stuff. If anyone wants, I will try to find or convert all the SDL*.h files to D for PSP usage. That is a good idea, and would be better than my hopeless attempt of messing with png.h.

  24. #24
    No longer a community member.
    Points: 46,662, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Dec 2005
    Posts
    22
    QJ Pts
    46,662
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by the_darkside_986 View Post
    ...

    Yes, SDL is a pure C library (not C++) so it works perfectly with D if the headers are converted. There is Derelict, but it is unusable on the PSP because it wants to load shared library files, not static linked stuff. If anyone wants, I will try to find or convert all the SDL*.h files to D for PSP usage. That is a good idea, and would be better than my hopeless attempt of messing with png.h.
    That would be awesome. I'm pretty sure that SDL_image needs libpng (and several other libraries), so would that need to be changed to D as well, or what? Sorry, I'm still new at... everything.

  25. #25
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    Only if SDL headers themselves depend on png.h would that be necessary. Right now I am making a minimalist png.h conversion to D. I hope that only the SDL implementation source contains direct png references. But regardless, some of Derelict's sources might be useful anyway.

    Also, I modified my $PSPDEV/psp/sdk/lib/build.mak Makefile to be more D-friendly: http://sauer.endoftheinternet.org/~f...0w86/build.mak

    This altered makefile should define a compile-time version string of Psp for conditional compile version(Psp) {} blocks in code. (In D, we have version blocks such as version(Windows) { int foo; } else version(Unix) { uint foo; } else... etc. But version strings can be anything and are defined at the command line with -fversion=Something.)

  26. #26
    No longer a community member.
    Points: 46,662, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Dec 2005
    Posts
    22
    QJ Pts
    46,662
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    What about these SDL ports?
    http://shinh.skr.jp/d/porting.html

  27. #27
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    Thanks for the link. I'd like to try those if I ever remember how to install SDL for the PSP. The svn browser seems to be down for pspdev.org

  28. #28
    No longer a community member.
    Points: 46,662, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Join Date
    Dec 2005
    Posts
    22
    QJ Pts
    46,662
    Level
    100
    Downloads
    0
    Uploads
    0

    Default

    There's two ways to install SDL for the PSP.

    The first, and easiest way,is to install psplibraries. It will install SDL, SDL_image, SDL_ttf, SDL_mixer, and SDL_gfx, along with their dependencies and other libs that I never took the time to care about.
    Code:
    	svn co svn://svn.ps2dev.org/psp/trunk/psplibraries psplibraries
    	cd psplibraries
    	./libraries.sh
    Or, you can manually checkout all of the dependencies and build them separately and then build SDL.

  29. #29
    QJ Gamer Bronze
    Points: 5,402, Level: 47
    Level completed: 26%, Points required for next Level: 148
    Overall activity: 0%

    Join Date
    Apr 2007
    Posts
    468
    QJ Pts
    5,402
    Level
    47
    Downloads
    0
    Uploads
    0

    Default

    its good to see a new, more capable language now available for the psp:) its time for me to start reading my "learn to tango with D" pdf

    good look with the project and hopefully this will get stickied

  30. #30
    Developer
    Points: 4,797, Level: 44
    Level completed: 24%, Points required for next Level: 153
    Overall activity: 0%

    Join Date
    Jul 2006
    Posts
    262
    QJ Pts
    4,797
    Level
    44
    Downloads
    0
    Uploads
    0

    Default

    I've been intending to buy that book someday, (not as an e-book though), but anyway, if we can get Tango to compile for the PSP, then I'll actually buy that book.

    Someone has helped me realize that my PSP converted headers are USELESS until I fix the compile errors and most importantly, build a static library out of each object. In fact, globals won't link properly without properly including the object files in the executable.

    I will post the updated headers and static library as soon as I complete it. Right now I'm still trying to figure out how to build a static library with PSP makefiles.
    Last edited by the_darkside_986; 07-27-2008 at 03:32 PM.


 
Page 1 of 2 1 2 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
  •  





All times are GMT -8. The time now is 02:34 AM.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2013, Caputo Media, LLC. All Rights Reserved. Cluster C2.
Contact Us | Free Flash Games | Ad Blockers Suck! Why?