[Beta] OpenCTR - Alt SDK for 3DS, with CMake!

Discussion in '3DS - Homebrew Development and Emulators' started by Symbitic, Apr 21, 2015.

  1. Symbitic
    OP

    Symbitic Newbie

    Newcomer
    4
    8
    Apr 21, 2015
    United States
    Sterling, IL
    Hello <INSERT NAME OF READER>,

    This is my first release on GBATemp, so I'm a noob. My social skills are lackluster, at best. With that being said: Welcome to OpenCTR.

    OpenCTR is a free, open-source, and cross-platform SDK for developing homebrew for the Nintendo 3DS. I created it as a fork from devkitARM and ctrulib. OpenCTR is NOT meant to replace either devkitARM or ctrulib. It merely offers an alternative for anyone who wants one.

    The most distinguishing feature of OpenCTR is the use of CMake.

    You read that right, OpenCTR uses CMake!

    OpenCTR uses CMake to compile its tools, its libraries (including 3DS libraries), and even to build the toolchain!

    OpenCTR is still in beta, and not at all ready for people to use it for creating homebrew. I thought I would just post this now so I could start gathering feedback.

    OpenCTR includes libctr, my own custom written library for creating Nintendo 3DS homebrew. I freely admit that almost everything in libctr comes from ctrulib. The difference is in how it is intended to be used. I like to think that I made libctr follow software principles like Encapsulation, Separation-of-concerns, Component organization, a Property-based API, Decoupling, and Cohesion. Which is another reason I'm posting this, so people can review libctr and hopefully send me suggestions.

    OpenCTR is on GitHub at https://github.com/OpenCTR.

    The OpenCTR SDK source code is at https://github.com/OpenCTR/OpenCTR.

    The libctr source code is at https://github.com/OpenCTR/libctr.

    The OpenCTR documentation is at https://openctr.github.io/.

    Credits:
    - Smealum: for ctrulib, and for hacking the Nintendo 3DS in the first place
    - Dave Murphy - for creating devkitARM, whose buildscripts form much of the inspiration for the OpenCTR CMake build script.

    Full credits for OpenCTR are listed at https://openctr.github.io/Credits.html.
     
    I pwned U!, Margen67, keyra and 4 others like this.
  2. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    1,500
    812
    Feb 2, 2014
    United States
    Cool. Seems like it will be a rather large undertaking, but having more options out there is always nice
     
  3. Suiginou

    Suiginou (null)

    Member
    565
    588
    Jun 26, 2012
    Gambia, The
    pc + 8
    I understand that you really want to use CMake, but did you really have to throw out ctrulib, which contains a tremendous amount of work already?

    On that note, however, the READMEs look quite professional so far.

    Additionally, though I frown at the CMake version requirement being that high, given that Debian ships with something considerably older, but that cannot be helped. That's more than made up for with the GPL requirement, though I have my doubts you'll have an easy time in courts, considering the nature of the code you're dealing with.
     
  4. Symbitic
    OP

    Symbitic Newbie

    Newcomer
    4
    8
    Apr 21, 2015
    United States
    Sterling, IL
    Suiginou


    I won't deny you have some very valid points.

    As far as ctrulib goes, I'm planning on adding a option to OpenCTR to allow downloading ctrulib instead of libctr. I just need to finish some of the CMake logic and decide if I need to patch or just do extra configs. I made libctr as an alternative to ctrulib. It is meant to follow some different goals, so I always expected people to prefer it over libctr.

    As far as high version of CMake goes: I put 3.0.0 as the min because that was/is what I am testing with. If you change everything to 2.8 or lower, and everything works fine, LMK and I'll lower it in the mainstream. If otherwise, CMake.org hosts prebuilt binaries for i386 and x86_64 linux. You can just download them, unpack it to a separate directory, add it to your PATH, and you'll end up with CMake 3.0 without breaking your package manager.

    And for the GPL concern, I actually noted that on the OpenCTR website. I licensed everything in OpenCTR (including libctr) under the GPL to encourage EVERY user to make their source code available. I noted that, as a college student, it was very unlikely I would even want to pursue any violations in court. I just used the GPL so that there could be no mistaking what I hoped for.
     
    WhoAmI? likes this.
  5. Steveice10

    Steveice10 GBAtemp Maniac

    Member
    1,102
    1,655
    Jul 19, 2009
    United States
    I'm all for alternative libraries and SDKs since they give developers a wide range of options, but is yet another executable format really necessary? We already have three (not including plain ELF), why yet another?
     
  6. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    1,500
    812
    Feb 2, 2014
    United States
    ..and what do we use to load said new executables?
     
  7. Normmatt

    Normmatt Former AKAIO Programmer

    Member
    2,142
    544
    Dec 14, 2004
    New Zealand
    This is all rebranded stuff: ctrulib (smea, others), devkitarm (wintermute).

    You can't just slap your name on those and claim them are yours...

    EDIT: apparently you do give credits but not on the actual project's on github thus the above confusion. Please fix the project pages up to avoid this in the future.
     
  8. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    782
    292
    Jul 28, 2008
    United States
    I do not understand the point of a rebranded devkitarm and ctrulib. Does this provide anything new?
     
  9. Symbitic
    OP

    Symbitic Newbie

    Newcomer
    4
    8
    Apr 21, 2015
    United States
    Sterling, IL
    Normmatt

    You were right. I thought I included a CREDITS section in all my READMEs. Added an list of per-project credits, and a link to credits in openctr docs.


    I originally planned on making ctrx just a rebranded 3dsx (and I SPECIFICALLY mentioned so), for no other reason that Bash/Win32/C-Headers don't like it when anything begins with a numeric. Since it seamed to be causing a bit of confusion, I'm just going to remove all references to ctrx and state explicitly: OpenCTR uses 3dsx.
     
  10. dubbz82

    dubbz82 GBAtemp Advanced Maniac

    Member
    1,500
    812
    Feb 2, 2014
    United States


    Integration with cmake, for one...which is pretty nice.
     
  11. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    782
    292
    Jul 28, 2008
    United States
    I can see how someone might want that, but does that really need a rebranded devkitarm? I have seen other 3ds projects using cmake that use devkitarm without needing to do anything special. wouldn't it make more sense to contribute any needed changes to support this to devkitarm rather then make something new. are there any actual changes from devkitarm?
     
  12. Symbitic
    OP

    Symbitic Newbie

    Newcomer
    4
    8
    Apr 21, 2015
    United States
    Sterling, IL

    Mind posting some links to other 3ds projects that use CMake? The only other ones i've seen were just PC tools. Getting CMake to (always) cross-compile is tricky, which is actually a big reason why I can't add this to devkitARM. Another reason is because libraries and tools are much easier to integrate with CMake when they themselves are build by CMake (the EXPORT() command installs all the info needed for other projects to use your current one).
     
  13. elhobbs

    elhobbs GBAtemp Advanced Fan

    Member
    782
    292
    Jul 28, 2008
    United States
    Generally speaking I know nothing about cmake. I only know of one project that builds for the 3ds using cmake and it is not mine or open source. when I said it did nothing special - I really have no idea. I did not see the benefit for the added hassle.
     
  14. pikatsu

    pikatsu GBAtemp Advanced Fan

    Member
    722
    125
    Apr 16, 2014
    Argentina
    Can anyone upload compiled versions?