Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 35

Thread: SDL Examples for NDS porting

  1. #11

    SDL Examples for NDS porting

    Quote Originally Posted by savage
    Ooops only just found this thread. Sounds like excellent stuff!! It would be nice to release v1.0 with preliminary NDS support. Please let me know if there are any other changes required to sdl.pas or any of the other sdl_*.pas files.
    Here is a quick list of changes I made in order to compile it:

    :arrow: NDS needs "uses types;" only
    :arrow: libSDL.a depends from libnds9.a and some other gcc libs:
    [pascal]{$IFDEF NDS}
    SDLLibName = 'libSDL.a';
    {$]
    :arrow: I have commented out all SDL_mutex and thread parts
    :arrow: All external funcs are declared as:
    [pascal]
    function SDL_Init( flags : UInt32 ) : Integer;
    cdecl; external {$IFNDEF NDS}{$IFDEF __GPC__}name 'SDL_Init'{$ELSE} SDLLibName{$ENDIF __GPC__}{$ENDIF NDS};
    [/pascal]

    That's all
    As I said, it compiles fine but I dont' know if it works too
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  2. #12

    SDL Examples for NDS porting

    That would be soooo cool if it works on the NDS as well. From what I have seen there is an OpenGL API layer as well, my new engine could have a NDS kernel and then pretty much work after that...

    Are the .a files like the library files on Windows, or are they more like Dll's? I always get comfused when linking to those.

    Also I thought there were some license implications regarding linking to the libraries in SDL rather than using the DLL. I could be wrong though.
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  3. #13

    SDL Examples for NDS porting

    [quote="technomage"]That would be soooo cool if it works on the NDS as well. From what I have seen there is an OpenGL API layer as well, my new engine could have a NDS kernel and then pretty much work after that...

    Are the .a files like the library files on Windows, or are they more like Dll's? I always get comfused when ]

    AFAIK the .a files are statically linked to the executable. What about these license issues?
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  4. #14

    SDL Examples for NDS porting

    the license of sdl is explained here: http://www.libsdl.org/license-lgpl.php
    seems you are ok with distributing their license together with a link to their site. In my opinion using lgpl directly you should also distribute the source of your own application but they do not state that on their site. E.g. read the last line.
    http://3das.noeska.com - create adventure games without programming

  5. #15

    SDL Examples for NDS porting

    This is correct and the reason why FPC uses a modified LGPL. Well, you don't need to provide source code, but ensure people can use all freedoms on the LGPL part of the program, that is replace it with their own version. In general this means dynamic linking, not possible on NDS. Perhaps providing object files would satisfy as well, but in general, LGPL means all statically linked programs need their source code available.

  6. #16
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    SDL Examples for NDS porting

    If thats the case then that would mean that commercial development is out. Well with SDL anyway...
    Jason McMillen
    Pascal Game Development
    Co-Founder





  7. #17

    SDL Examples for NDS porting

    Maybe we can write a sdl like library? As i think most sourcecode will be unuseable. Or is using the same naming for the commands enough te let i fall under the sdl lgpl license? We could release the result under a modified lgpl license allowing what we want. Also we could contact the people behind sdl and ask them what we want is agreeable with them. As reading their last line of their explanation of lgpl could mean we could just use the lib and compile it in, but we should provide a link to their site then, or i could be misreading that last line.
    http://3das.noeska.com - create adventure games without programming

  8. #18
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    SDL Examples for NDS porting

    I think we'd need to clarify the exact terms and definitions with the SDL people in regards to NDS compiling. I doubt that they really had commercial console development in mind at the time of it's creation, but they may see reason to make a way or at least an exception for legitimate console compilation.

    As far as making a library... thats not a bad idea... I doubt that naming conventions would hold us to any of SDL's licensing restrictions as the entire make-up of functionality beneath is totally different.

    It kind of cancels out being able to include it with JEDI-SDL as it would really have nothing to do with SDL at all except that the function calls are the same to match the game's code.

    We could simply describe the project as 'a bridging unit for JEDI-SDL to NDS porting.' A list of SDL compatibility functions would need to be created in the documentation as well.


    I'd see what the SDL people have to say before starting it up though.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  9. #19

    SDL Examples for NDS porting

    Anyone got the compiled versions of the SDL , SDL_Image and accosiated libraries for the DS :?: I'm trying to see if I can port my code over to the DS and I have most stuff working, but I just can't compile the SDL libraries...

    Or are there any instructions on how to compile the lib's on a Windows box for the DS?
    <A HREF="http://www.myhpf.co.uk/banner.asp?friend=139328">
    <br /><IMG SRC="http://www.myhpf.co.uk/banners/60x468.gif" BORDER="0">
    <br /></A>

  10. #20

    SDL Examples for NDS porting

    Quote Originally Posted by technomage
    Anyone got the compiled versions of the SDL , SDL_Image and accosiated libraries for the DS :?: I'm trying to see if I can port my code over to the DS and I have most stuff working, but I just can't compile the SDL libraries...

    Or are there any instructions on how to compile the lib's on a Windows box for the DS?
    As far as I have seen, sdl for nds does not compile with devkitPro r20. With dkP r19 you need to modify a little bit makefile.ds. If you want, I can send it to you (for some strange reason I can put it here between code tags :shock
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

Page 2 of 4 FirstFirst 1234 LastLast

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
  •