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

Symbitic

Member
OP
Newcomer
Joined
Apr 21, 2015
Messages
14
Trophies
0
Age
31
Location
Sterling, IL
Website
github.com
XP
99
Country
United States
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.
 

Suiginou

(null)
Member
Joined
Jun 26, 2012
Messages
565
Trophies
0
Location
pc + 8
XP
738
Country
Gambia, The
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.
 

Symbitic

Member
OP
Newcomer
Joined
Apr 21, 2015
Messages
14
Trophies
0
Age
31
Location
Sterling, IL
Website
github.com
XP
99
Country
United States
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.
 
  • Like
Reactions: WhoAmI?
D

Deleted User

Guest
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?
 

Normmatt

Former AKAIO Programmer
Member
Joined
Dec 14, 2004
Messages
2,161
Trophies
1
Age
33
Website
normmatt.com
XP
2,162
Country
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.
 

Symbitic

Member
OP
Newcomer
Joined
Apr 21, 2015
Messages
14
Trophies
0
Age
31
Location
Sterling, IL
Website
github.com
XP
99
Country
United States
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.
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,029
Country
United States
Integration with cmake, for one...which is pretty nice.
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?
 

Symbitic

Member
OP
Newcomer
Joined
Apr 21, 2015
Messages
14
Trophies
0
Age
31
Location
Sterling, IL
Website
github.com
XP
99
Country
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?


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).
 

elhobbs

Well-Known Member
Member
Joined
Jul 28, 2008
Messages
1,044
Trophies
1
XP
3,029
Country
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.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended