<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thejsa</id>
	<title>3dbrew - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.3dbrew.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Thejsa"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/Thejsa"/>
	<updated>2026-04-07T03:40:25Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=18658</id>
		<title>Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=18658"/>
		<updated>2016-11-28T16:50:20Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: /* Windows */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup =&lt;br /&gt;
* Install [http://devkitpro.org/ devkitARM]. If it&#039;s already installed, update it.&lt;br /&gt;
** On Windows, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].&lt;br /&gt;
** On Unix-like platforms such as Linux/macOS, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download Perl script]. Make sure you also select libctru and the 3ds examples when installing.&lt;br /&gt;
* Depending on the kind of homebrew you want to develop, you may be interested in installing and using additional libraries and tools which don&#039;t ship alongside devkitARM/libctru. A list of them can be found in [[Homebrew Libraries and Tools]].&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
devkitPro provides Win32-native precompiled versions of devkitARM which can be run directly on Windows.&lt;br /&gt;
* [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ download the latest version of the graphical installer] from SourceForge and run it, following the instructions as you go.&lt;br /&gt;
* An Internet connection is required.&lt;br /&gt;
* You will want to make sure devkitARM is selected during the installation process to develop for the 3DS (and also the DS and GBA) - you can also install devkitPPC (for GameCube/Wii development) and devkitPSP (for PlayStation Portable development) if you wish.&lt;br /&gt;
* Once the installer has finished, launch MSYS from:&lt;br /&gt;
** Windows 7 and earlier: Start -&amp;gt; All Programs -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 8 and 8.1: Right click on the Start screen and select &#039;All Apps&#039;. You should find MSYS there.&lt;br /&gt;
** Windows 10 (pre-Anniversary Update): Start -&amp;gt; All Apps -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 10 (post-Anniversary Update): Start -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
&lt;br /&gt;
Alternatively starting with Windows 10 Anniversary Update (Version 1607), the [https://msdn.microsoft.com/en-us/commandline/wsl/install_guide Windows Subsystem for Linux (WSL)] may also be used to run the Linux version of devkitARM. Due to the fact that GCC was originally designed for Unix-like platforms its use may yield performance and convenience improvements. For instructions on how to set up devkitARM under WSL refer to the &#039;&#039;Unix-like platforms&#039;&#039; section. For WSL installation instructions, see the linked MSDN page.&lt;br /&gt;
&lt;br /&gt;
==Unix-like platforms==&lt;br /&gt;
Currently devkitPro provides precompiled versions of devkitARM for the following Unix-like platforms: Linux (x86/x64), macOS (universal binary). Note that Linux x64 binaries are usable under WSL.&lt;br /&gt;
&lt;br /&gt;
* First, you need to install curl so the installer can download the devkitARM packages, and you should also install Git - you&#039;ll need it to update ctrulib or share your code on GitHub, among many other things.&lt;br /&gt;
&lt;br /&gt;
* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:&lt;br /&gt;
** Debian/Ubuntu/Linux Mint/WSL: &amp;lt;code&amp;gt;sudo apt-get install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** Fedora/CentOS/RHEL: &amp;lt;code&amp;gt;sudo yum install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** openSUSE: &amp;lt;code&amp;gt;sudo zypper install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** macOS: Download Git from [http://git-scm.com/download/mac] and install it. Curl is included with the OS.&lt;br /&gt;
&lt;br /&gt;
* Next, we need to download, make executable and run the devkitARM updater (don&#039;t worry, the updater is also the installer.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -L https://raw.githubusercontent.com/devkitPro/installer/master/perl/devkitARMupdate.pl -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
sudo ./devkitARMupdate.pl /opt/devkitpro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally, we need to tell your shell where to find the devkitARM binaries.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;export DEVKITPRO=/opt/devkitpro&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export DEVKITARM=/opt/devkitpro/devkitARM&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export PATH=$PATH:/opt/devkitpro/devkitARM/bin&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building the examples =&lt;br /&gt;
3DS examples are still being created; however, there are a growing number of examples available from the [https://github.com/devkitPro/3ds-examples devkitPro/3ds-examples GitHub repository].&lt;br /&gt;
There are now too many to list here in detail, so go ahead and browse them.&lt;br /&gt;
&lt;br /&gt;
* To download these, if you installed Git (as you will have if you followed the above instructions), simply type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git&amp;lt;/code&amp;gt; into your shell in the directory you wish to store the 3ds-examples folder in.&lt;br /&gt;
** To overwrite the (almost certainly outdated) examples installed by the devkitPro updater, type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git $DEVKITPRO/examples/3ds&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These can be built from the command line.&lt;br /&gt;
&lt;br /&gt;
To start a new homebrew project from the &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; shell, simply type the following (replacing &amp;lt;code&amp;gt;&#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&amp;lt;/code&amp;gt; with the place you would like your project to be stored, with &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; meaning your HOME directory):&lt;br /&gt;
 cp -r $DEVKITPRO/examples/3ds/templates/application &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
 cd &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To compile it, type &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in the project directory.&lt;br /&gt;
To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: &amp;lt;code&amp;gt;$DEVKITARM/bin/3dslink -a &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; &#039;&#039;&#039;my3dsproject&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;, replacing &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; with your 3DS&#039;s IP address (displayed in the network loader screen) and &#039;&#039;&#039;my3dsproject&#039;&#039;&#039; with the name of the folder your project is in (ie. the folder you have the source folder in and the README file.)&lt;br /&gt;
Don&#039;t type the full path, just the last segment - eg. for &amp;lt;code&amp;gt;C:\a\b\&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;&amp;lt;/code&amp;gt;, you would type &amp;lt;code&amp;gt;&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If all goes well, you&#039;ll soon see your application running on your 3DS.&lt;br /&gt;
&lt;br /&gt;
==Building the examples on Linux with Netbeans==&lt;br /&gt;
* Go to File-&amp;gt;New Project...&lt;br /&gt;
* Select C/C++ Project with existing code&lt;br /&gt;
* Navigate to the examples directory and select the folder for the project you want to build; eg.    /home/vtsingaras/3ds/examples/app_launch&lt;br /&gt;
* Leave Configuration Mode to &#039;Automatic&#039; and click &#039;Finish&#039;.&lt;br /&gt;
* It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top:&lt;br /&gt;
&amp;lt;pre&amp;gt;export DEVKITPRO=/opt/devkitpro&lt;br /&gt;
export DEVKITARM=/opt/devkitpro/devkitARM&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Right-click the project and go to Properties-&amp;gt;Code Assistance and click C Compiler.&lt;br /&gt;
* In include directories enter &lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/devkitpro/devkitARM/include;/opt/devkitpro/ctrulib/libctru/include&amp;lt;/pre&amp;gt;&lt;br /&gt;
adjusting again for your devkitPro path.&lt;br /&gt;
* Do the same for &#039;C++ Compiler&#039;.&lt;br /&gt;
* Go to &#039;Run&#039; and click &#039;Clean and Build Project&#039;.&lt;br /&gt;
* Now right-click on the project and select Code Assistance-&amp;gt;Reparse Project.&lt;br /&gt;
&lt;br /&gt;
Now you can use Netbeans&#039; code completion feature and build your project from the Run menu.&lt;br /&gt;
&lt;br /&gt;
= Building homebrew for distribution =&lt;br /&gt;
To build your homebrew, open a Bash shell as described above, browse to the folder of the homebrew you wish to compile, and run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file (the homebrew executable itself) together with a .smdh file (the icon).&lt;br /&gt;
** The Homebrew Launcher can only run homebrew in the 3DSX format, and can only display SMDH icons.&lt;br /&gt;
&lt;br /&gt;
* To build a CCI (.3ds) file, you need to strip the .elf file and use makerom on it (with the provided RSF file):&lt;br /&gt;
 arm-none-eabi-strip &#039;&#039;&#039;[ELF file]&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o &#039;&#039;&#039;[.3ds file]&#039;&#039;&#039; -rsf &#039;&#039;&#039;[RSF file]&#039;&#039;&#039; -target t -exefslogo -elf &#039;&#039;&#039;[ELF file]&#039;&#039;&#039; -icon &#039;&#039;&#039;[icon file]&#039;&#039;&#039; -banner &#039;&#039;&#039;[banner file]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
&#039;&#039;&#039;I get the &amp;quot;Please set DEVKITARM in your environment.&amp;quot; error.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Use the following command before installing [http://askubuntu.com/questions/573070/problem-setting-up-environment-for-make-command-execution]:&lt;br /&gt;
 sudo chown $USER /opt/devkitpro/ -R&lt;br /&gt;
 echo &amp;quot;export DEVKITPRO=&amp;quot;/opt/devkitpro/&amp;quot; &amp;gt;&amp;gt; ~/.profile&lt;br /&gt;
 echo &amp;quot;export DEVKITARM=&amp;quot;/opt/devkitpro/devkitARM/&amp;quot; &amp;gt;&amp;gt; ~/.profile&lt;br /&gt;
 source ~/.profile&lt;br /&gt;
For WSL users, you need to close the Bash shell, then reopen it for WSL to reload all of the variables from a clean state.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Unable to load source code when debugging using the provided GDB. It says, &amp;quot;No source files available&amp;quot;.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When after loading your ELF file, make sure to set a breakpoint at main(), then continue. The GDB will refresh with your source code.&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NFC_Services&amp;diff=18250</id>
		<title>NFC Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NFC_Services&amp;diff=18250"/>
		<updated>2016-09-19T18:11:49Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: /* NFC service &amp;quot;nfc:p&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The New3DS NFC module was added with [[8.1.0-0_New3DS]]. The Old3DS NFC module was added with [[9.3.0-21|9.3.0-X]].&lt;br /&gt;
&lt;br /&gt;
On New3DS NFC module uses the [[I2C_Registers|NFC]] hardware via the [[I2C_Services|i2c::NFC]] and [[GPIO_Services|gpio:NFC]] services. On Old3DS NFC module communicates with a NFC peripheral via IR with the IRUSER service.&lt;br /&gt;
&lt;br /&gt;
A total of 6 sessions can be open simultaneously for all of these services combined.&lt;br /&gt;
&lt;br /&gt;
=NFC services=&lt;br /&gt;
==NFC user service &amp;quot;nfc:u&amp;quot;==&lt;br /&gt;
This is the NFC service used by regular applications, for the NFP API.&lt;br /&gt;
&lt;br /&gt;
This was first seen in the Super Smash Bros eShop demo (only in the exheader, the demo doesn&#039;t actually use it), but at that time no system-module was available for NFC on CDN. The first regular application to use this service was Super Smash Bros, with the v1.0.5 game-update, which used the new 9.3.0-X command set.&lt;br /&gt;
&lt;br /&gt;
==NFC management service &amp;quot;nfc:m&amp;quot;==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Available since system-version&lt;br /&gt;
!  Name&lt;br /&gt;
!  Input&lt;br /&gt;
!  Output&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x040100C2&lt;br /&gt;
| Unknown, &amp;lt;[[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| u32 unknownA, u32 unknownB, u32 unknownC, u32 (sizeof(*buffer) &amp;lt;&amp;lt; 14 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 0x402), void * buffer&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA[16]&lt;br /&gt;
| Output seems to be a struct&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA[41]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04040A40&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| [[NFCM:SetAmiiboSettings|SetAmiiboSettings]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04070000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x04080000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x040C0000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ?&lt;br /&gt;
| None&lt;br /&gt;
| s32 result&lt;br /&gt;
| Among other things, this will eventually call the savedata writing code referenced in the below savedata section.&lt;br /&gt;
|-&lt;br /&gt;
| 0x040D0000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x040E0000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA, u32 unknownB&lt;br /&gt;
| Again, amiibo applet ignores value unknownA.&lt;br /&gt;
|-&lt;br /&gt;
| 0x040F0000&lt;br /&gt;
| [[9.3.0-21|9.3.0-X]]&lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA, u32 unknownB&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is used by the [[amiibo Settings]] applet. This service has the above commands, in addition to the command-set listed below.&lt;br /&gt;
&lt;br /&gt;
==NFC development service &amp;quot;nfc:dev&amp;quot;==&lt;br /&gt;
This service seems to be intended for use only on dev-units(or at least some of the command(s)).&lt;br /&gt;
&lt;br /&gt;
Unlike the New3DS NFC-module, at least some of these commands are stubbed in the Old3DS NFC-module(only returns an error).&lt;br /&gt;
&lt;br /&gt;
==NFC service &amp;quot;nfc:p&amp;quot;==&lt;br /&gt;
This service is used by the mint library-applet, starting with [[9.3.0-21]]. This service was added to the mint service-access-control list with [[9.0.0-20]].&lt;br /&gt;
Presumably used for NFC card payments in JPN [[eShop]].&lt;br /&gt;
&lt;br /&gt;
==NFC service &amp;quot;nfc:r&amp;quot;==&lt;br /&gt;
This service has no known use.&lt;br /&gt;
&lt;br /&gt;
==NFC service &amp;quot;nfc:s&amp;quot;==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command header&lt;br /&gt;
!  Available since system-version&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00230000&lt;br /&gt;
| &lt;br /&gt;
| This writes the following command request data to [[I2C_Registers|I2C]], without reading any response: 10 20 00 01 01.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00240000&lt;br /&gt;
| &lt;br /&gt;
| This writes the following command request data to [[I2C_Registers|I2C]], without reading any response: 10 40 00 03 00 0F 01.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This service has no known use.&lt;br /&gt;
&lt;br /&gt;
Unlike the New3DS NFC-module, at least some of these commands are stubbed in the Old3DS NFC-module(only returns an error).&lt;br /&gt;
&lt;br /&gt;
=&amp;quot;nfc:u&amp;quot; and &amp;quot;nfc:m&amp;quot; command set=&lt;br /&gt;
There are at least two different revisions of the NFC module. First version was introduced on New3DS only with firmware [[8.1.0-0_New3DS]]. Second version made its appearance with [[9.3.0-21|9.3.0-X]], on both Old3DS and New3DS.&lt;br /&gt;
&lt;br /&gt;
These two versions are not interchangeable and not compatible, since the newer version uses a different command set and has no implemented commands from the older version. This does not introduce compatibility problems since no retail software used the NFC module, before the system titles added with [[9.3.0-21]] which use NFC.&lt;br /&gt;
&lt;br /&gt;
==9.3.0-X==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Command Header&lt;br /&gt;
!  Available since system-version&lt;br /&gt;
!  Name&lt;br /&gt;
!  Input&lt;br /&gt;
!  Output&lt;br /&gt;
!  Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010040&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:Initialize|Initialize]]&lt;br /&gt;
| u8 inputval&lt;br /&gt;
| s32 result&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00020040&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:Shutdown|Shutdown]]&lt;br /&gt;
| u8 inputval&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:StartCommunication|StartCommunication]]&lt;br /&gt;
| void&lt;br /&gt;
| s32 result&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:StopCommunication|StopCommunication]]&lt;br /&gt;
| void&lt;br /&gt;
| s32 result&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:StartTagScanning|StartTagScanning]]&lt;br /&gt;
| u16 inval&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:StopTagScanning|StopTagScanning]]&lt;br /&gt;
| void&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:LoadAmiiboData|LoadAmiiboData]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:ResetTagScanState|ResetTagScanState]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090002&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:UpdateStoredAmiiboData|UpdateStoredAmiiboData]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0000&lt;br /&gt;
| &lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0000&lt;br /&gt;
| &lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA, u32 unknownB&lt;br /&gt;
| amiibo applet ignores value unknownA. It doesn&#039;t even read it from the command buffer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0000&lt;br /&gt;
| &lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA, u32 unknownB&lt;br /&gt;
| amiibo applet also ignores value unknownA for this command.&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:GetTagState|GetTagState]]&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u8 outval&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:CommunicationGetStatus|CommunicationGetStatus]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| &lt;br /&gt;
| ???&lt;br /&gt;
| void&lt;br /&gt;
| s32 result, u32 unknownA[24]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:GetTagInfo|GetTagInfo]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:CommunicationGetResult|CommunicationGetResult]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00130040&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:OpenAppData|OpenAppData]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00140384&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:InitializeWriteAppData|InitializeWriteAppData]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00150040&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:ReadAppData|ReadAppData]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00160242&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:WriteAppData|WriteAppData]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00170000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:GetAmiiboSettings|GetAmiiboSettings]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00180000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:GetAmiiboConfig|GetAmiiboConfig]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00190000&lt;br /&gt;
| &lt;br /&gt;
| [[NFC:GetAppDataInitStruct|GetAppDataInitStruct]]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x001A0000&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| No additional output.&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x001B0000&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| None&lt;br /&gt;
| 0x36-byte output structure starting at cmdreply[2].&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x001C0040&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| u8 inputval&lt;br /&gt;
| No additional output.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x001D0040&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| u32 inputval&lt;br /&gt;
| No additional output.&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0040&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| &lt;br /&gt;
| u8 inputval&lt;br /&gt;
| u8 outval at cmdreply[2].&lt;br /&gt;
| ?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Pre-9.3.0-X==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Pre-9.3.0-X command header&lt;br /&gt;
!  Command header starting with 9.3.0-X&lt;br /&gt;
!  Available since system-version&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| Initialize&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| Shutdown&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| GetNFCState. This writes an output u8 to cmdreply[2]: 0 = not initialized, 1 = just initialized, 5 = data transfer ready, ...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| 0x000B0000&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| This writes an output handle to cmdreply[3].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| 0x000C0000&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| This writes an output handle to cmdreply[3].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060040&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| The user process must setup the output-buffer hdr+ptr data @ TLS+0x180 when using this. cmdreply[2] = actual output data size?&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080100&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (&amp;lt;0x10-bytes starting at cmdreq[1]&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| The user process must setup the output-buffer hdr+ptr data @ TLS+0x180 when using this.&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0042&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u32 size, ((Size&amp;lt;&amp;lt;14) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 2), inbufptr)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0044&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u32 size, 0x20, &amp;lt;procid set by kernel&amp;gt;, ((Size&amp;lt;&amp;lt;14) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 0x402), inbufptr)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0040&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u16 in)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x000F00C2&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u32 unk0, u32 unk1, u32 unk2, ((Size&amp;lt;&amp;lt;14) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 0x802), inbufptr)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100040&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u32 in)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110040&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u32 in)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120040&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| (u32 in)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00130000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| Writes an output u32 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00140000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| This writes an output 0x30-byte struct starting at cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00150000&lt;br /&gt;
| 0x00110000&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| This writes an output 0x2C-byte struct starting at cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00160000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00170000&lt;br /&gt;
| ?&lt;br /&gt;
| [[8.1.0-0_New3DS]]&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=NFC services error codes=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Error-code&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0xc8a17600&lt;br /&gt;
| The current NFC tag [[NFC:GetTagState|state]], or other NFC state, is invalid with the NFC command which was used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=NFC module savedata=&lt;br /&gt;
* &amp;quot;/nfp_backup.dat&amp;quot; This contains raw data from the [[Amiibo]] NFC data pages. The filesize is 0x001fbd20-bytes. Certain service cmds will trigger writing to this savedata. This entire file is read during [[amiibo Settings]] startup, it&#039;s unknown what command(s) actually triggers that. It seems the Amiibo data here is updated each time the Amiibo NFC data is updated, and read each time the Amiibo NFC data is read. Data is written into this savedata when the Amiibo was never scanned on this system before. The data here is probably also updated when the scanned Amiibo NFC data doesn&#039;t match the data stored here.&lt;br /&gt;
&lt;br /&gt;
During NFC writing, the NFC data being written can become corrupted if the Amiibo figure is moved outside of range during writing. When this happens, this nfp_backup data can be used to restore a previous version of that data prior to the last failed write.&lt;br /&gt;
&lt;br /&gt;
==nfp_backup.dat structure==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x20&lt;br /&gt;
| Header&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x800&lt;br /&gt;
| Amiibo data table header&lt;br /&gt;
|-&lt;br /&gt;
| 0x7D20&lt;br /&gt;
| 0x21C&lt;br /&gt;
| The NFC data for the first stored Amiibo is located here. This is the entire raw data from all 0x87 NFC data pages.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Header structure===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| Unknown, normally the following data? &amp;quot;00 00 02 00 02 00 00 00&amp;quot; (as little-endian u32s: 0x20000, 0x2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x14&lt;br /&gt;
| Unknown, normally all-zero?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Unknown. CRC32 / checksum maybe?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Amiibo data table header===&lt;br /&gt;
This is an array with 0x40(?) entries, where the size of each entry is 0x20-bytes. Entry structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x8&lt;br /&gt;
| First 8-bytes from [[Amiibo]] NFC serial-number.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x3&lt;br /&gt;
| Unknown, normally zero?&lt;br /&gt;
|-&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x2&lt;br /&gt;
| u16 little-endian date value for when this Amiibo was initially written into this savedata, with the same format from [[Amiibo|here]].&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0xF&lt;br /&gt;
| Unknown, normally zero?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Unknown. CRC32 / checksum maybe?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=NFC module versions=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  System version&lt;br /&gt;
!  New3DS title-version&lt;br /&gt;
!  Old3DS title-version&lt;br /&gt;
!  Changes&lt;br /&gt;
|-&lt;br /&gt;
| [[9.6.0-24|9.6.0-X]]&lt;br /&gt;
| v4102&lt;br /&gt;
| v4106&lt;br /&gt;
| New3DS and Old3DS: the only changes regarding new commands is that new commands were added for the nfcu/nfcm command-set and new commands for an unknown cmd-handler were added. It&#039;s unknown if there&#039;s other changes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Errors=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Error code&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8A17600&lt;br /&gt;
| This is returned when the current state is invalid for this command.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8A17620&lt;br /&gt;
| This is returned by [[NFC:OpenAppData]] when the appdata is uninitialized since [[NFC:InitializeWriteAppData]] wasn&#039;t used previously.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8A17628&lt;br /&gt;
| This is returned by [[NFC:GetAmiiboSettings]] when the amiibo wasn&#039;t setup by the amiibo Settings applet.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8A17638&lt;br /&gt;
| This is returned by [[NFC:OpenAppData]] when the input AppID doesn&#039;t match the actual Amiibo AppID.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8C1760C&lt;br /&gt;
| Returned for HMAC-hash mismatch(data corruption), with HMAC-calculation input_buffer_size=0x34.&lt;br /&gt;
|-&lt;br /&gt;
| 0xC8A17618&lt;br /&gt;
| HMAC-hash mismatch with input_buffer_size=0x1DF(see [[Amiibo|here]]).&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Talk:Setting_up_Development_Environment&amp;diff=17891</id>
		<title>Talk:Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Talk:Setting_up_Development_Environment&amp;diff=17891"/>
		<updated>2016-08-05T06:45:46Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;strike&amp;gt;Should we have instructions for setting up the WSL? --[[User:Thejsa|Thejsa]] ([[User talk:Thejsa|talk]]) 10:39, 5 August 2016 (CEST)&amp;lt;/strike&amp;gt;&lt;br /&gt;
* This is redundant now we have the MSDN link. Added note about not requiring Windows Insider status. --[[User:Thejsa|Thejsa]] ([[User talk:Thejsa|talk]]) 10:45, 5 August 2016 (CEST)&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=17890</id>
		<title>Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=17890"/>
		<updated>2016-08-05T06:43:11Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Add note that you don&amp;#039;t actually have to be a Windows Insider to use WSL.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup =&lt;br /&gt;
* Install [http://devkitpro.org/ devkitARM]. If it&#039;s already installed, update it.&lt;br /&gt;
** On Windows, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].&lt;br /&gt;
** On Unix-like platforms such as Linux/macOS, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download Perl script]. Make sure you also select libctru and the 3ds examples when installing.&lt;br /&gt;
* Depending on the kind of homebrew you want to develop, you may be interested in installing and using additional libraries and tools which don&#039;t ship alongside devkitARM/libctru. A list of them can be found in [[Homebrew Libraries and Tools]].&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
devkitPro provides Win32-native precompiled versions of devkitARM which can be run directly on Windows.&lt;br /&gt;
* [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ download the latest version of the graphical installer] from SourceForge and run it, following the instructions as you go.&lt;br /&gt;
* An Internet connection is required.&lt;br /&gt;
* You will want to make sure devkitARM is selected during the installation process to develop for the 3DS (and also the DS and GBA) - you can also install devkitPPC (for GameCube/Wii development) and devkitPSP (for PlayStation Portable development) if you wish.&lt;br /&gt;
* Once the installer has finished, launch MSYS from:&lt;br /&gt;
** Windows 7 and earlier: Start -&amp;gt; All Programs -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 8 and 8.1: Right click on the Start screen and select &#039;All Apps&#039;. You should find MSYS there.&lt;br /&gt;
** Windows 10 (pre-Anniversary Update): Start -&amp;gt; All Apps -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 10 (post-Anniversary Update): Start -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
&lt;br /&gt;
Alternatively starting with Windows 10 Anniversary Update (Version 1607), the [https://msdn.microsoft.com/en-us/commandline/wsl/install_guide Windows Subsystem for Linux (WSL)] may also be used to run the Linux version of devkitARM. Due to the fact that GCC was originally designed for Unix-like platforms its use may yield performance and convenience improvements. For instructions on how to set up devkitARM under WSL refer to the &#039;&#039;Unix-like platforms&#039;&#039; section. For WSL installation instructions, see the MSDN page linked just above, but ignore the part about having to be a Windows Insider; as long as you have the Anniversary Update or later it will work just fine.&lt;br /&gt;
&lt;br /&gt;
==Unix-like platforms==&lt;br /&gt;
Currently devkitPro provides precompiled versions of devkitARM for the following Unix-like platforms: Linux (x86/x64), macOS (universal binary). Note that Linux x64 binaries are usable under WSL.&lt;br /&gt;
&lt;br /&gt;
* First, you need to install curl so the installer can download the devkitARM packages, and you should also install Git - you&#039;ll need it to update ctrulib or share your code on GitHub, among many other things.&lt;br /&gt;
&lt;br /&gt;
* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:&lt;br /&gt;
** Debian/Ubuntu/Linux Mint/WSL: &amp;lt;code&amp;gt;sudo apt-get install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** Fedora/CentOS/RHEL: &amp;lt;code&amp;gt;sudo yum install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** openSUSE: &amp;lt;code&amp;gt;sudo zypper install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** macOS: Download Git from [http://git-scm.com/download/mac] and install it. Curl is included with the OS.&lt;br /&gt;
&lt;br /&gt;
* Next, we need to download, make executable and run the devkitARM updater (don&#039;t worry, the updater is also the installer.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -L http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
sudo ./devkitARMupdate.pl /opt/devkitpro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally, we need to tell your shell where to find the devkitARM binaries.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;export DEVKITPRO=/opt/devkitpro&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export DEVKITARM=/opt/devkitpro/devkitARM&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export PATH=$PATH:/opt/devkitpro/devkitARM/bin&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building the examples =&lt;br /&gt;
3DS examples are still being created; however, there are a growing number of examples available from the [https://github.com/devkitPro/3ds-examples devkitPro/3ds-examples GitHub repository].&lt;br /&gt;
There are now too many to list here in detail, so go ahead and browse them.&lt;br /&gt;
&lt;br /&gt;
* To download these, if you installed Git (as you will have if you followed the above instructions), simply type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git&amp;lt;/code&amp;gt; into your shell in the directory you wish to store the 3ds-examples folder in.&lt;br /&gt;
** To overwrite the (almost certainly outdated) examples installed by the devkitPro updater, type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git $DEVKITPRO/examples/3ds&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These can be built from the command line.&lt;br /&gt;
&lt;br /&gt;
To start a new homebrew project from the &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; shell, simply type the following (replacing &amp;lt;code&amp;gt;&#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&amp;lt;/code&amp;gt; with the place you would like your project to be stored, with &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; meaning your HOME directory):&lt;br /&gt;
 cp -r $DEVKITPRO/examples/3ds/templates/application &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
 cd &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To compile it, type &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in the project directory.&lt;br /&gt;
To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: &amp;lt;code&amp;gt;$DEVKITARM/bin/3dslink -a &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; &#039;&#039;&#039;my3dsproject&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;, replacing &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; with your 3DS&#039;s IP address (displayed in the network loader screen) and &#039;&#039;&#039;my3dsproject&#039;&#039;&#039; with the name of the folder your project is in (ie. the folder you have the source folder in and the README file.)&lt;br /&gt;
Don&#039;t type the full path, just the last segment - eg. for &amp;lt;code&amp;gt;C:\a\b\&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;&amp;lt;/code&amp;gt;, you would type &amp;lt;code&amp;gt;&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If all goes well, you&#039;ll soon see your application running on your 3DS.&lt;br /&gt;
&lt;br /&gt;
==Building the examples on Linux with Netbeans==&lt;br /&gt;
* Go to File-&amp;gt;New Project...&lt;br /&gt;
* Select C/C++ Project with existing code&lt;br /&gt;
* Navigate to the examples directory and select the folder for the project you want to build; eg.    /home/vtsingaras/3ds/examples/app_launch&lt;br /&gt;
* Leave Configuration Mode to &#039;Automatic&#039; and click &#039;Finish&#039;.&lt;br /&gt;
* It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top:&lt;br /&gt;
&amp;lt;pre&amp;gt;export DEVKITPRO=/opt/devkitpro&lt;br /&gt;
export DEVKITARM=/opt/devkitpro/devkitARM&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Right-click the project and go to Properties-&amp;gt;Code Assistance and click C Compiler.&lt;br /&gt;
* In include directories enter &lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/devkitpro/devkitARM/include;/opt/devkitpro/ctrulib/libctru/include&amp;lt;/pre&amp;gt;&lt;br /&gt;
adjusting again for your devkitPro path.&lt;br /&gt;
* Do the same for &#039;C++ Compiler&#039;.&lt;br /&gt;
* Go to &#039;Run&#039; and click &#039;Clean and Build Project&#039;.&lt;br /&gt;
* Now right-click on the project and select Code Assistance-&amp;gt;Reparse Project.&lt;br /&gt;
&lt;br /&gt;
Now you can use Netbeans&#039; code completion feature and build your project from the Run menu.&lt;br /&gt;
&lt;br /&gt;
= Building homebrew for distribution =&lt;br /&gt;
To build your homebrew, open a Bash shell as described above, browse to the folder of the homebrew you wish to compile, and run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file (the homebrew executable itself) together with a .smdh file (the icon).&lt;br /&gt;
** The Homebrew Launcher can only run homebrew in the 3DSX format, and can only display SMDH icons.&lt;br /&gt;
&lt;br /&gt;
* To build a CCI (.3ds) file, you need to strip the .elf file and use makerom on it (with the provided RSF file):&lt;br /&gt;
 arm-none-eabi-strip &#039;&#039;&#039;[ELF file]&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o &#039;&#039;&#039;[.3ds file]&#039;&#039;&#039; -rsf &#039;&#039;&#039;[RSF file]&#039;&#039;&#039; -target t -exefslogo -elf &#039;&#039;&#039;[ELF file]&#039;&#039;&#039; -icon &#039;&#039;&#039;[icon file]&#039;&#039;&#039; -banner &#039;&#039;&#039;[banner file]&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Talk:Setting_up_Development_Environment&amp;diff=17889</id>
		<title>Talk:Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Talk:Setting_up_Development_Environment&amp;diff=17889"/>
		<updated>2016-08-05T06:39:21Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Created page with &amp;quot;Should we have instructions for setting up the WSL? --~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Should we have instructions for setting up the WSL? --[[User:Thejsa|Thejsa]] ([[User talk:Thejsa|talk]]) 10:39, 5 August 2016 (CEST)&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=User:Thejsa&amp;diff=17887</id>
		<title>User:Thejsa</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=User:Thejsa&amp;diff=17887"/>
		<updated>2016-08-04T22:31:45Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Create.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Independent web dev, plays with 3DS homebrew and web apps.&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Friend_code&amp;diff=17886</id>
		<title>Friend code</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Friend_code&amp;diff=17886"/>
		<updated>2016-08-04T22:30:51Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Add my FC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a list of friend codes of different users.&lt;br /&gt;
&lt;br /&gt;
Remember to [http://3dbrew.org/w/index.php?title=Friend_code&amp;amp;action=watch watch this article] if you wish to get notified when someone modifies the list.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;20%&amp;quot; | User !! width=&amp;quot;15%&amp;quot; | IrcNick !! width=&amp;quot;20%&amp;quot; | Friend code !! width=&amp;quot;10%&amp;quot; |Region !! width=&amp;quot;30%&amp;quot; |Comment here !! Mii image&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Thejsa|thejsa]]  || thejsa / jsa_ || 5043-5145-7887 || EUR (UK, N3DS) || My body is ready - ready to Sm4sh, race on MK7 and write homebrew!  ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:SynRxn|SynRxn]]  || ||0962-9776-8195 ||USA ||Let&#039;s pwn the 3DS! ||[[File:SynRxn.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
| z2442 ||  || &amp;lt;nowiki&amp;gt;4554-0595-5890&amp;lt;/nowiki&amp;gt; || USA || hack the 3ds yes! || &lt;br /&gt;
|-&lt;br /&gt;
|[[User:ClassicToxin|ClassicToxin]]  || || 1864-8732-8338 ||AUS ||Add me can/will probably play any game with you if you like ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Allnewryan1|Allnewryan1]]  || ||   0001-4540-5587 || USA || Looking to help the devs, add me and send me a message when you find crashes || &lt;br /&gt;
|-&lt;br /&gt;
| Crediar  || ||   2535-3625-3742 || Europe || None || &lt;br /&gt;
|-&lt;br /&gt;
| [[User:Skyneo|Skyneo]] || Skyneo || 1950-8547-6804 || Europe (France) || Young beginner dev dreaming of making a Nintendo game. My hair is anarchy. || [[File:SkyneoMii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
| Kazuma  || ||   2277-6646-9164 || Europe || None ||&lt;br /&gt;
|-&lt;br /&gt;
| SaltyPancakes  || ||   0044-2836-4738 || Europe || None || &lt;br /&gt;
|-&lt;br /&gt;
| Inspectah  || ||   3909-7495-9525 || Europe || None ||&lt;br /&gt;
|-&lt;br /&gt;
| XanLoves  || ||   3995-6523-2805 || Europe || None || &lt;br /&gt;
|-&lt;br /&gt;
| muhkuh2005  || ||   2449-4689-9707 || Europe || Germanfag ||&lt;br /&gt;
|-&lt;br /&gt;
| RHOPKINS13  || ||   4854-6450-1577 || USA || None || [[File:RHOPKINS13_Mii.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| fishuyo  || ||   2535-3630-0678 || USA || None ||&lt;br /&gt;
|-&lt;br /&gt;
| marcosxd  || ||   0216-0901-5448 || Mexico || Crediar add me please, I already added you :) ||&lt;br /&gt;
|-&lt;br /&gt;
| Mafril  || ||   5112-3460-1421 || USA || None || [[File:Mafril_Mii.JPG]]&lt;br /&gt;
|-&lt;br /&gt;
| Epicdude  || ||0130-1922-3022 ||USA || None ||&lt;br /&gt;
|-&lt;br /&gt;
| David  || ||3553-9962-0973 ||USA ||Add me ||&lt;br /&gt;
|-&lt;br /&gt;
| Muzer  || || 3136-6762-5385 || Europe || I have added everyone on this list who has a valid friend code (David and marcosxd don&#039;t) - so please add me if you get the chance. || [[File:Muzer_Mii.jpg|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Schumi|Schumi]]  || || 1934-1000-7068 || Germany (Europe) || add and write with me ;) ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Rikku2000|Rikku2000]]  || ||   EUR: 1461-6425-0347 JPN: 1375-8084-1845 || Germany || Write me on 3DS Letterbox ||[[File:Rikku2000_Mii.JPG|100px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Elisherer|Elisherer]]  || elisherer ||0001-3489-0550 ||USA ||None ||[[File:Elisherer_Mii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|Liam87  || ||2664-2361-9358 ||England ||Add me please, i have added everyone on here, thank you ||&lt;br /&gt;
|-&lt;br /&gt;
|Luishane  || ||1289-8459-2533 ||Venezuela ||Add me...thanks ||&lt;br /&gt;
|-&lt;br /&gt;
|Immortal_no1  || ||0516-7257-0011 ||UK ||Add me and PM me on gbatemp.net with yours or e-mail me on  &amp;quot;immortal_no1@hotmail.com&amp;quot; ||&lt;br /&gt;
|-&lt;br /&gt;
|CrimsonΣ (CrimsonSigma)  || ||5284-1673-1864 ||Brazil ||Add me ||&lt;br /&gt;
|-&lt;br /&gt;
|E-Chan  || ||2062-9187-2394 ||Spain ||Add me please~! Im up for online gaming of any sorts and discussing the scene! ||&lt;br /&gt;
|-&lt;br /&gt;
|Lazymarek9614  || ||1590-4676-4678 ||Europe ||Online gaming SSF IV 3D, I try to add everyone here! ||&lt;br /&gt;
|-&lt;br /&gt;
|FireFly  || ||4554-0352-3499 ||Europe || None ||&lt;br /&gt;
|-&lt;br /&gt;
|Hikari06  || ||5241-1966-6545 ||Europe || I added everyone, please add me :)  ||[[File:HIKARI06MII.jpg|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|UpSilon_Project  || ||1848-1843-3651 ||France (Europe) || UpSilon from the UpSilon Project ||&lt;br /&gt;
|-&lt;br /&gt;
|CVosler  || ||4554-0499-6731 ||USA || I added everyone. You can also email me your code after you add me &amp;quot;cvosler@hotmail.com&amp;quot; ||[[File:Chip.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:CHR15x94|CHR15x94]]  || ||0688-5814-3517 ||Canada (USA) || Feel free to add me. I&#039;ll add anyone. If you need to contact me, message me on 3DBrew, or through one of my contacts on my 3DBrew profile. ||[[File:CHR15x94_-_Mii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:DarkWork0|DarkWork0]]  || ||1075-0737-9684 ||USA ||Add me and email me your friends code: darkwork0@gmail.com  I&#039;ll add anyone who adds me! ||[[File:HNI_0006.JPG‎|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Aliak11|Aliak11]]  || ||1160-9718-1643 ||USA ||Add me and email me your friends code: atthegulf@gmail.com ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:capt.danny|capt.danny]]  || ||4339:2914:5427 ||USA||Added everyone. Email fcs to danny9ds@gmail.com ||&lt;br /&gt;
|-&lt;br /&gt;
||[[user:jordan|jordan]]|| ||0473-8413-4597||USA||added all.||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Stopwatch8|Stopwatch8]]  || Stopwatch8 ||2449-4811-6942 ||USA || I have added everyone here. I would be happy if I were added as well! I just like to see what titles everyone plays. :)  ||[[File:Stopwatch8.JPG|120px]] &lt;br /&gt;
|-&lt;br /&gt;
| [[User:mr_seeker|mr_seeker]]  || ||3909-7860-3744 ||EUR ||Add me, find me, streetpass me! ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:missou|missou]]  || missou ||1762-3951-0686 ||EUR || I have added everyone...and everyone can add me!  ||[[File:MissouMii.JPG|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:GuyInDogSuit|GuyInDogSuit]]  ||  ||4957-2209-2798 ||USA || I have added everyone except David and marcosxd (invalid codes), and everyone can add me in return.  ||[[File:GuyInDogSuit.jpg|120px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[User:NintendoFan|NintendoFan]]  || ||2492-4592-1206 ||USA ||None ||&lt;br /&gt;
|-&lt;br /&gt;
|[[User:Rllns05|Rllns05]]  || ||0190-1796-8987 ||USA ||Add me, I won&#039;t Bite. ||[[File:Rllns05.JPG|120px]]&lt;br /&gt;
|-&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=News&amp;diff=17885</id>
		<title>News</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=News&amp;diff=17885"/>
		<updated>2016-08-04T22:18:43Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Correct spelling of &amp;#039;entries&amp;#039;.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
==Adding an item==&lt;br /&gt;
* Log in to the wiki. Editing is disabled if you don&#039;t have an account.&lt;br /&gt;
* Add the news event to the top of the list, using this format for the date: &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;&#039;&#039;&#039;&amp;lt;/nowiki&amp;gt;{{#time: d F y}}&amp;lt;nowiki&amp;gt;&#039;&#039;&#039; &amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;. Please include the application&#039;s creator, version number, and a link to a page on 3DBrew about the application. No external links please.&lt;br /&gt;
* &#039;&#039;&#039;Move the last entry to the [[:News/Archive|news archive]]. There should be no more than 4 entries in the list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Archives==&lt;br /&gt;
For older news, see the [[:News/Archive|news archive]].&lt;br /&gt;
&lt;br /&gt;
=== News ===&lt;br /&gt;
&amp;lt;!-- Add news below --&amp;gt;&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;29 July 16&#039;&#039;&#039; [[User:Yellows8|Yellows8]] released [https://github.com/yellows8/stickerhax stickerhax], which supports &amp;lt;=[[11.0.0-33]].&lt;br /&gt;
*&#039;&#039;&#039;27 July 16&#039;&#039;&#039; [[User:Yellows8|Yellows8]] released new browserhax(see changelog [[browserhax|here]]) and menuhax [https://github.com/yellows8/3ds_homemenuhax/releases v3.0], all of these now support [[11.0.0-33]].&lt;br /&gt;
*&#039;&#039;&#039;26 July 16&#039;&#039;&#039; Various JPN-only eShop app updates were released. This includes JPN SmileBASIC: the update-title was removed from versionlist, and the main-title was updated. Updating an already installed version of the game will currently update to 3.3.1. Uninstalling and redownloading will give you 3.3.2. [https://plutooo.github.io/smilehax/ smilehax] was fixed in [http://smilebasic.com/debug/ 3.3.2].&lt;br /&gt;
*&#039;&#039;&#039;22 July 16&#039;&#039;&#039; [[User:Dazzozo|Dazzozo]] released [https://citizens.salthax.org/ humblehax v2], supporting the Citizens of Earth update released on the eShop 3 days ago.&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Main_Page/Welcome&amp;diff=17884</id>
		<title>Main Page/Welcome</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Main_Page/Welcome&amp;diff=17884"/>
		<updated>2016-08-04T22:17:04Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Minor, pedantic, English-nerd tweaks to wording.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Main page box|Welcome!|Main Page/Welcome}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin: -.3em -1em -1em -1em;&amp;quot;&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; bgcolor=&amp;quot;#fff&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2px&amp;quot; cellspacing=&amp;quot;2px&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#e7eef6&amp;quot;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; | &#039;&#039;&#039;What is Homebrew?&#039;&#039;&#039;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot;| &#039;&#039;&#039;How do I run homebrew?&#039;&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;background: #F5FAFF;&amp;quot;&lt;br /&gt;
| [http://en.wikipedia.org/wiki/Homebrew_(video_games) Homebrew] is a popular term used for applications that are created and executed on a video game console by hackers, programmers, developers, and consumers. &lt;br /&gt;
| Keep an eye out on the [[Homebrew Exploits]] page for a list of available exploits and their respective requirements.&lt;br /&gt;
|}&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; bgcolor=&amp;quot;#fff&amp;quot; border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;2px&amp;quot; cellspacing=&amp;quot;2px&amp;quot; style=&amp;quot;margin:auto;&amp;quot;&lt;br /&gt;
|- align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#e7eef6&amp;quot;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot; | &#039;&#039;&#039;How do I develop homebrew?&#039;&#039;&#039;&lt;br /&gt;
! width=&amp;quot;50%&amp;quot;| &#039;&#039;&#039;What homebrew can I run?&#039;&#039;&#039;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;background: #F5FAFF;&amp;quot;&lt;br /&gt;
| See the [[Setting up Development Environment‎]] page for a guide on how to get started with homebrew development for the 3DS. The toolchain supports Windows, Linux, and Mac OS X.&lt;br /&gt;
| See the [[Homebrew Applications]] page for a partial list of homebrew applications/games that can be downloaded and installed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
{{box-footer-empty}}&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=17883</id>
		<title>Setting up Development Environment</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Setting_up_Development_Environment&amp;diff=17883"/>
		<updated>2016-08-04T22:13:02Z</updated>

		<summary type="html">&lt;p&gt;Thejsa: Rewrite pretty much everything - add Windows 10 WSL instructions, describe Win32 installation, add instructions for non-Debian Linuxes and OS X, rewrite Examples section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Setup =&lt;br /&gt;
* Install [http://devkitpro.org/ devkitARM]. If it&#039;s already installed, update it.&lt;br /&gt;
** On Windows, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ graphical installer].&lt;br /&gt;
** On Linux / Mac OS X / Win10 WSL, there&#039;s a [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download Perl script]. Make sure you also select libctru and the 3ds examples when installing.&lt;br /&gt;
* Depending on the kind of homebrew you want to develop, you may be interested in installing and using additional libraries and tools which don&#039;t ship alongside devkitARM/libctru. A list of them can be found in [[Homebrew Libraries and Tools]].&lt;br /&gt;
&lt;br /&gt;
==Windows 10==&lt;br /&gt;
On Windows 10, if you have installed the Anniversary Update you can use the Windows Subsystem for Linux.&lt;br /&gt;
This is essentially a version of the command line portion of Ubuntu Linux running within Windows 10, under the Windows 10 kernel.&lt;br /&gt;
It replaces msys, and being built in to the Windows 10 kernel, it is faster.&lt;br /&gt;
&lt;br /&gt;
This is advantageous to use as most of the development tools were originally written for Linux (eg. GCC (compiler), 3dsxtool, etc) and run better than on Windows.&lt;br /&gt;
&lt;br /&gt;
Note that you can still use the standard Windows tools instead. However, if you wish to use the WSL, follow these instructions:&lt;br /&gt;
&lt;br /&gt;
* First, check that you have the Anniversary Update installed. To do this, hit Win+R to open the Run box, type &amp;lt;code&amp;gt;winver&amp;lt;/code&amp;gt;, and hit OK. If you have Windows 10 version 1607 or higher, you&#039;re good to go.&lt;br /&gt;
&lt;br /&gt;
Screenshot: https://i.imgur.com/01bFYYN.png (image uploading is broken on 3Dbrew)&lt;br /&gt;
&lt;br /&gt;
* Next, open the Settings and enter Update and Security -&amp;gt; For developers.&lt;br /&gt;
&lt;br /&gt;
* Switch to Developer Mode, and reboot.&lt;br /&gt;
&lt;br /&gt;
* Next, hit Start and search for &#039;features&#039;, and select &#039;Turn Windows features on or off&#039;.&lt;br /&gt;
&lt;br /&gt;
* Scroll down until you find &#039;Windows Subsystem for Linux&#039; - tick the box to enable it, and hit OK. Reboot again.&lt;br /&gt;
&lt;br /&gt;
* Finally, To do this, hit Win+R to open the Run box, type &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;, and hit OK.&lt;br /&gt;
** Hit &#039;y&#039; when it asks you to download the Linux binaries. This shouldn&#039;t take long; on a 5Mbps connection, it took about 3 minutes, but YMMV (Your Mileage May Vary).&lt;br /&gt;
&lt;br /&gt;
* Now follow the Linux / Ubuntu instructions to install devkitARM - you can open the &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; shell by hitting Start and running the &#039;Bash on Ubuntu on Windows&#039; application, opening a Command Prompt / PowerShell window and typing &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;, or hitting Win+R to open the Run box and typing &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Windows==&lt;br /&gt;
If you don&#039;t have Windows 10, or don&#039;t wish to use the WSL, then you can use the native Win32 tools instead.&lt;br /&gt;
* [http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/ download the latest version of the graphical installer] from SourceForge and run it, following the instructions as you go.&lt;br /&gt;
* An Internet connection is required.&lt;br /&gt;
* You will want to make sure devkitARM is selected during the installation process to develop for the 3DS (and also the DS and GBA) - you can also install devkitPPC (for GameCube/Wii development) and devkitPSP (for PlayStation Portable development) if you wish.&lt;br /&gt;
* Once the installer has finished, launch MSYS from:&lt;br /&gt;
** Windows 7 and earlier: Start -&amp;gt; All Programs -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 8 and 8.1: Right click on the Start screen and select &#039;All Apps&#039;. You should find MSYS there.&lt;br /&gt;
** Windows 10 (pre-Anniversary Update): Start -&amp;gt; All Apps -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
** Windows 10 (post-Anniversary Update): Start -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
&lt;br /&gt;
==Linux / Mac OS X==&lt;br /&gt;
* First, you need to install curl so the installer can download the devkitARM packages, and you should also install Git - you&#039;ll need it to update ctrulib or share your code on GitHub, among many other things.&lt;br /&gt;
&lt;br /&gt;
* Find your way into a shell (eg. by opening a Terminal window), and follow the instructions for your OS:&lt;br /&gt;
** Debian/Ubuntu/Linux Mint: &amp;lt;code&amp;gt;sudo apt-get install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** Fedora/CentOS/RHEL: &amp;lt;code&amp;gt;sudo yum install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** openSUSE: &amp;lt;code&amp;gt;sudo zypper install git curl&amp;lt;/code&amp;gt;&lt;br /&gt;
** Mac OS X: Download Git from [http://git-scm.com/download/mac] and install it. Curl is included with the OS.&lt;br /&gt;
&lt;br /&gt;
* Next, we need to download, make executable and run the devkitARM updater (don&#039;t worry, the updater is also the installer.)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -L http://sourceforge.net/projects/devkitpro/files/Automated%20Installer/devkitARMupdate.pl/download -o devkitARMupdate.pl&lt;br /&gt;
chmod +x ./devkitARMupdate.pl&lt;br /&gt;
sudo ./devkitARMupdate.pl /opt/devkitpro&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Finally, we need to tell your shell where to find the devkitARM binaries.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo &amp;quot;export DEVKITPRO=/opt/devkitpro&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export DEVKITARM=/opt/devkitpro/devkitARM&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
echo &amp;quot;export PATH=$PATH:/opt/devkitpro/devkitARM/bin&amp;quot; &amp;gt;&amp;gt; ~/.bashrc&lt;br /&gt;
source ~/.bashrc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Building the examples =&lt;br /&gt;
3DS examples are still being created; however, there are a growing number of examples available from the [https://github.com/devkitPro/3ds-examples devkitPro/3ds-examples GitHub repository].&lt;br /&gt;
There are now too many to list here in detail, so go ahead and browse them.&lt;br /&gt;
&lt;br /&gt;
* To download these, if you installed Git (as you will have if you followed the above instructions), simply type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git&amp;lt;/code&amp;gt; into your shell in the directory you wish to store the 3ds-examples folder in.&lt;br /&gt;
** To overwrite the (almost certainly outdated) examples installed by the devkitPro updater, type &amp;lt;code&amp;gt;git clone https://github.com/devkitPro/3ds-examples.git $DEVKITPRO/examples/3ds&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
These can be built from the command line - open a Bash shell by following these instructions:&lt;br /&gt;
* Windows:&lt;br /&gt;
** Windows 10:&lt;br /&gt;
*** Anniversary Update and later:&lt;br /&gt;
**** Windows Subsystem for Linux: Choose from any of these options:&lt;br /&gt;
***** Hit Start and run the &#039;Bash on Ubuntu on Windows&#039; application.&lt;br /&gt;
***** Open a Command Prompt / PowerShell window and type &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
***** Hit Win+R to open the Run box and type &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt;.&lt;br /&gt;
**** Msys: Start -&amp;gt; devkitPro -&amp;gt; MSYS&lt;br /&gt;
*** Pre-Anniversary Update: Start -&amp;gt; All Apps -&amp;gt; devkitPro -&amp;gt; MSYS.&lt;br /&gt;
** Windows 8 and 8.1: Right click on the Start screen and select &#039;All Apps&#039;. You should find MSYS there.&lt;br /&gt;
** Windows 7 and earlier: Start -&amp;gt; All Programs -&amp;gt; devkitPro -&amp;gt; MSYS.&lt;br /&gt;
&lt;br /&gt;
To start a new homebrew project from the &amp;lt;code&amp;gt;bash&amp;lt;/code&amp;gt; shell, simply type the following (replacing &amp;lt;code&amp;gt;&#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&amp;lt;/code&amp;gt; with the place you would like your project to be stored, with &amp;lt;code&amp;gt;~&amp;lt;/code&amp;gt; meaning your HOME directory):&lt;br /&gt;
 cp -r $DEVKITPRO/examples/3ds/templates/application &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
 cd &#039;&#039;&#039;~/projects/my3dsproject&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To compile it, type &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in the project directory.&lt;br /&gt;
To run it on your 3DS, start the Homebrew Launcher, press Y to open the network loader, then on your PC type: &amp;lt;code&amp;gt;$DEVKITARM/bin/3dslink -a &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; &#039;&#039;&#039;my3dsproject&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;, replacing &#039;&#039;&#039;192.168.X.X&#039;&#039;&#039; with your 3DS&#039;s IP address (displayed in the network loader screen) and &#039;&#039;&#039;my3dsproject&#039;&#039;&#039; with the name of the folder your project is in (ie. the folder you have the source folder in and the README file.)&lt;br /&gt;
Don&#039;t type the full path, just the last segment - eg. for &amp;lt;code&amp;gt;C:\a\b\&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;&amp;lt;/code&amp;gt;, you would type &amp;lt;code&amp;gt;&#039;&#039;&#039;verygood3dsapp&#039;&#039;&#039;.3dsx&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If all goes well, you&#039;ll soon see your application running on your 3DS.&lt;br /&gt;
&lt;br /&gt;
==Building the examples on Linux with Netbeans==&lt;br /&gt;
* Go to File-&amp;gt;New Project...&lt;br /&gt;
* Select C/C++ Project with existing code&lt;br /&gt;
* Navigate to the examples directory and select the folder for the project you want to build; eg.    /home/vtsingaras/3ds/examples/app_launch&lt;br /&gt;
* Leave Configuration Mode to &#039;Automatic&#039; and click &#039;Finish&#039;.&lt;br /&gt;
* It will fail to build. Now edit Makefile and insert these two lines, adjusting for your devkitpro path, at the top:&lt;br /&gt;
&amp;lt;pre&amp;gt;export DEVKITPRO=/opt/devkitpro&lt;br /&gt;
export DEVKITARM=/opt/devkitpro/devkitARM&amp;lt;/pre&amp;gt;&lt;br /&gt;
* Right-click the project and go to Properties-&amp;gt;Code Assistance and click C Compiler.&lt;br /&gt;
* In include directories enter &lt;br /&gt;
&amp;lt;pre&amp;gt;/opt/devkitpro/devkitARM/include;/opt/devkitpro/ctrulib/libctru/include&amp;lt;/pre&amp;gt;&lt;br /&gt;
adjusting again for your devkitPro path.&lt;br /&gt;
* Do the same for &#039;C++ Compiler&#039;.&lt;br /&gt;
* Go to &#039;Run&#039; and click &#039;Clean and Build Project&#039;.&lt;br /&gt;
* Now right-click on the project and select Code Assistance-&amp;gt;Reparse Project.&lt;br /&gt;
&lt;br /&gt;
Now you can use Netbeans&#039; code completion feature and build your project from the Run menu.&lt;br /&gt;
&lt;br /&gt;
= Building homebrew for distribution =&lt;br /&gt;
To build your homebrew, open a Bash shell as described above, browse to the folder of the homebrew you wish to compile, and run &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* This will build a .elf file and a .3dsx file (the homebrew executable itself) together with a .smdh file (the icon).&lt;br /&gt;
** The Homebrew Launcher can only run homebrew in the 3DSX format, and can only display SMDH icons.&lt;br /&gt;
&lt;br /&gt;
* To build a CCI (.3ds) file, you need to strip the .elf file and use makerom on it (with the provided RSF file):&lt;br /&gt;
 arm-none-eabi-strip &#039;&#039;&#039;[ELF file]&#039;&#039;&#039;&lt;br /&gt;
 makerom -f cci -o &#039;&#039;&#039;[.3ds file]&#039;&#039;&#039; -rsf &#039;&#039;&#039;[RSF file]&#039;&#039;&#039; -target t -exefslogo -elf &#039;&#039;&#039;[ELF file]&#039;&#039;&#039; -icon &#039;&#039;&#039;[icon file]&#039;&#039;&#039; -banner &#039;&#039;&#039;[banner file]&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Thejsa</name></author>
	</entry>
</feed>