[HOW-TO] Assembling 3DS Homebrew for Gateway

Discussion in '3DS - Tutorials' started by Sylantemp, May 11, 2014.

May 11, 2014
  1. Sylantemp
    OP

    Newcomer Sylantemp Member

    Joined:
    Jul 20, 2012
    Messages:
    43
    Country:
    United States
    While the newest Gateway update brought two major features, the addition of homebrew support seemed rather unclear initially because of the lack of a method to actually assemble Gateway-compatible 3DS files. However, thanks to the work of 3DSGuy, we can effectively convert ELFs to 3DS files. While many developers will already be able to make use of this, this guide is intended to expand the options for 3DS homebrew by walking through how to compile ctrulib, a library for writing ARM11 homebrew, as well as going over the basics of compiling and running one of ctrulib's example programs.

    Note: I carried out this process on an Ubuntu 12.04 system. While these steps should theoretically apply for any desktop operating system, your results may vary. I'll try to make everything as universally helpful as possible.

    Step 1: Setting Up

    Warning: Spoilers inside!

    Step 2: Compiling ctrulib and homebrew

    Warning: Spoilers inside!

    Step 3: Converting the .elf into a .3ds
    Warning: Spoilers inside!

    I hope this guide is helpful to people in setting up ctrulib and and assembling homebrew for the new Gateway update. As a note on the ctrulib examples, so far arm11u is the only one I've had full success with, but it should be enough to get you started, and can be used as a base file for developing new homebrew or porting old homebrew to Gateway. I'm currently working on successfully compiling the "gpu" example, however some odd issues are coming up. If you think you can help with this process, feel free to respond to this thread or PM me about it.

    Anyway, I hope this guide helps some people get started in working with ctrulib and Gateway supported homebrew. Most of this information could be determined through trial and error or experience, but I wrote it out so you wouldn't have to. This is my first guide, so please leave feedback, and if I missed something or you have a question I'll try to respond quickly. Happy developing, and here's to seeing some amazing progress from the homebrew scene in the near future.
     


  2. Reecey

    Member Reecey Mario 64 (favorite game of all time)

    Joined:
    Mar 7, 2010
    Messages:
    3,851
    Location:
    At Home :)
    Country:
    United Kingdom
    Thats a great breakdown but would it just not be easier to wait for someone to develop Homebrew files to use for Gateway and just transfer your file on your M-SD card to use? or am I not understanding the process properly?
     
  3. Sylantemp
    OP

    Newcomer Sylantemp Member

    Joined:
    Jul 20, 2012
    Messages:
    43
    Country:
    United States

    The whole point of this guide is to help people develop homebrew for Gateway. Unless you mean files specifically meant for developers, in which case, I think this is the best we're going to get for a while. Either way, this guide is more or less only useful for developers, but they should be able to do a lot with it now that ctrulib is supported.
     
  4. Chrisssj2

    Member Chrisssj2 GBAtemp Maniac

    Joined:
    Feb 12, 2008
    Messages:
    1,132
    Country:
    Netherlands
    Do you think there would be homebrew capable for playing 720P or even 1080P movies or just regular anime episodes with multitudes of codecs?
    Only use I can think of for homebrew..
     
  5. Technicmaster0

    Member Technicmaster0 GBAtemp Addict

    Joined:
    Oct 22, 2011
    Messages:
    2,917
    Country:
    Germany
    You know that the 3DS' screen is not 1080P or 720P large?
    There are serveral uses for homebrew, like an organizer, many games etc.
     
  6. Chrisssj2

    Member Chrisssj2 GBAtemp Maniac

    Joined:
    Feb 12, 2008
    Messages:
    1,132
    Country:
    Netherlands
    Yes I know but maybe "downscaled" or whatever... because I have all my anime episodes and movies in 720p/1080P. Maybe some compatibility mode.
    Don't wanna search for "compatible formats for 100'es of episodes. I just prefer if it "works" don't care if its not the same quality.

    Organizer Elaborate please?
    Many games? Homebrew games u mean.. could u give me a few examples of worthwhile homebrew games u know of?
    And im not talking of simple tetris games no one cares about if u know what I Mean :P

    I did like doom homebrew project for DSTWO.
     
  7. Technicmaster0

    Member Technicmaster0 GBAtemp Addict

    Joined:
    Oct 22, 2011
    Messages:
    2,917
    Country:
    Germany
    1) Wat?

    2) Fireworlds, Eurotunnel, DSCraft, Everlasting, Scribble Jump, Warcraft Tower Defense etc.
     
  8. Rizzorules

    Member Rizzorules "What are you doing?" "Something unexpected."

    Joined:
    Aug 17, 2013
    Messages:
    905
    Country:
    Netherlands
    Do you think we can convert .nds into .3ds?
     
    Margen67 likes this.
  9. Technicmaster0

    Member Technicmaster0 GBAtemp Addict

    Joined:
    Oct 22, 2011
    Messages:
    2,917
    Country:
    Germany
    Maybe we can write a DS emulator or someday GW allows us to use the official virtualizator for the DS mode. But without source code, it won't be possible to convert .nds to .3ds (at least not without emulation).
     
    Margen67 likes this.
  10. cearp

    Member cearp the ticket master

    Joined:
    May 26, 2008
    Messages:
    7,257
    Country:
    Tuvalu
    surely it must be possible for gateway to allow us to load ds roms just the same as we load 3ds roms...
    of course, unless the experts give a definitive reason why we can't.
    i just expect that since we can already do it with ds flash cards, that, people don't care enough to put the time in.
     
  11. zhdarkstar

    Member zhdarkstar GBAtemp Advanced Fan

    Joined:
    Jan 30, 2008
    Messages:
    564
    Country:
    United States
    It might be a limitation of the exploit used. Since running a DS game (retail or rom) resets the exploit, they would need to implement a way for the DS rom to correctly recognize the DS Profile while running that either doesn't reset the exploit or reinstalls the exploit upon exit.
     
    Margen67 likes this.
  12. Sylantemp
    OP

    Newcomer Sylantemp Member

    Joined:
    Jul 20, 2012
    Messages:
    43
    Country:
    United States
    Just an update on the state of Ctrulib for Gateway, I'm working on compiling the gpu example program. The only real problem I've come across is successfully running a script that converts 3D models into a readable form; I've reached out to Smealum about this, so hopefully something will be ready today. While GPU control is possible without the example, I assume with the lack of documentation, a working example example would help people better understand 3D programming with ctrulib. With his permission, I'll try to release some (very slightly) modified files for getting the GPU demo working.
     
  13. Tikvah

    Newcomer Tikvah Newbie

    Joined:
    May 10, 2014
    Messages:
    7
    Location:
    תֵּל־אָבִיב
    Country:
    Israel
    When I try to compile ctrulib on ubuntu 14.04 I get this error? source/SOC.c:10:24: fatal error: sys/socket.h: No such file or directory. Any help?
     
  14. Sylantemp
    OP

    Newcomer Sylantemp Member

    Joined:
    Jul 20, 2012
    Messages:
    43
    Country:
    United States

    How did you install the ARM embedded systems toolkit? I use the alternate PPA which I included in the step 1, but I don't know if it fully supports 14.04 yet. Also, if you didn't use the alternate PPA, did you change the ctrulib makefile as necessary?
     
  15. Mariko

    Member Mariko GBAtemp Regular

    Joined:
    Oct 13, 2009
    Messages:
    178
    Country:
    Antarctica
    Why would you ever want to do that, though, especially since every Gateway cartridge comes with a DS mode flash cartridge? You can play virtually any game you want, and some good folks made an update, so that the blue cartridge can use the latest Wood firmware. Trying to get DS games to run on Gateway is nothing but a waste of time. Where do people get these ideas from, anyway? "Oh, I got this DS cartridge along with my Gateway, but having dozens of DS games on one cartridge, and dozens of 3DS games on another is sooo inconvenient ... "
     
  16. Tikvah

    Newcomer Tikvah Newbie

    Joined:
    May 10, 2014
    Messages:
    7
    Location:
    תֵּל־אָבִיב
    Country:
    Israel

    I didn't use alternate PPA I just downloaded it and extract it. I did change the makefile to point to the extracted toolkit. and now it seems to give me this error.
     
  17. Sylantemp
    OP

    Newcomer Sylantemp Member

    Joined:
    Jul 20, 2012
    Messages:
    43
    Country:
    United States

    Sorry, I misread. That error is actually from missing Devkitpro- the dswifi library, specifically. Make sure you've installed it correctly according to the guide, which should include having dswifi and adding DEVKITPRO to your execution environment.
     
  18. cearp

    Member cearp the ticket master

    Joined:
    May 26, 2008
    Messages:
    7,257
    Country:
    Tuvalu
    lol you make it sound like i'm crazy for suggesting it!
    the ds flash cart that comes with gateway is not great, there are better flashcards. i know basically every game works with it, that is not the point.
    gateway could add dsi rom support, make it so you can select ALL your games ds/3ds form the same selector, it would just be a nice addition. i'm sure there are some other features they could add to it, to make it the best all in one solution. not that i really mind, but it is nice that the games are selected from the 3ds menu, and not a gateway program that then boots you into the game, since then the play records and activity is updated nicely. a bit like when before wii usb loaders started supported the play log, it would just say that you have been in homebrew channel for 6 hours, lol
    it's a bit like having gamecube usb loading on wii, having your music on your phone instead of on a separate player, why did we even want multirom support? it's just convenience!
    that's why i would want to do that, since it is more convenient to have everything on one cart, it's hardly a weird idea.
     
  19. json

    Member json MUSCLEMAN

    Joined:
    Aug 9, 2013
    Messages:
    673
    Country:
    Bahamas, The
    Like posts mentioned above, running DS/DSi mode will wipe your NVRAM, so not gonna happen
     
  20. Sylantemp
    OP

    Newcomer Sylantemp Member

    Joined:
    Jul 20, 2012
    Messages:
    43
    Country:
    United States

    This is pretty much the only reason why. If, theoretically, Gateway were to implement a model that booted into Gateway mode on startup without the need of continuously launching the nickname exploit, then it would be a fair demand. However, the odds of that happening are slim to none, and implementing DS/DSi launching from the red card at this point would just render it (temporarily) useless after the first play.
     
    cearp likes this.

Share This Page