<?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=TuxSH</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=TuxSH"/>
	<link rel="alternate" type="text/html" href="https://www.3dbrew.org/wiki/Special:Contributions/TuxSH"/>
	<updated>2026-04-22T16:18:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=23490</id>
		<title>QTM Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=23490"/>
		<updated>2025-05-13T18:53:04Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* QTM system service &amp;quot;qtm:s&amp;quot; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
QTM is the [[New_3DS]] system module in charge of handling head tracking. A maximum of three (only two until [[9.3.0-21]]) sessions for *all* QTM services combined.&lt;br /&gt;
&lt;br /&gt;
Head tracking is not usable when any other process is using any of the cameras, QTM returns error 0xC8A18008 for this.&lt;br /&gt;
&lt;br /&gt;
QTM only tracks the position of the user&#039;s two eyes, but does not track the area they are focusing at. Hence, &amp;quot;eye-tracking&amp;quot; is sometimes used to refer to this feature on 3DS, even though it means something else outside the 3DS hacking scene.&lt;br /&gt;
&lt;br /&gt;
Refer to this libctru commit for more details: https://github.com/devkitPro/libctru/commit/8e55cdf05d1f2c07f350ec678d0f0d6a7a2df214&lt;br /&gt;
&lt;br /&gt;
=QTM services=&lt;br /&gt;
&lt;br /&gt;
= QTM user service &amp;quot;qtm:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010080 || GetRawTrackingDataEx&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020080 || GetTrackingDataEx&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000 || EnableManualIrLedControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000 || DisableManualIrLedControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040 || SetIrLedStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000 || IsCurrentAppBlacklisted&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= QTM system service &amp;quot;qtm:s&amp;quot; =&lt;br /&gt;
&amp;quot;qtm:s&amp;quot; has access to all &amp;quot;qtm:u&amp;quot; commands and more:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x04010040 || SetCentralBarrierPosition&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020000 || GetCameraLux&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030000 || EnableAutoBarrierControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x04040000 || DisableAutoBarrierControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x04050040 || SetBarrierPosition&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060000 || GetCurrentBarrierPosition&lt;br /&gt;
|-&lt;br /&gt;
| 0x04070040 || SetIrLedStatusOverride&lt;br /&gt;
|-&lt;br /&gt;
| 0x040801C0 || SetCalibrationData&lt;br /&gt;
|-&lt;br /&gt;
| 0x04090000 || GetQtmStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A0040 || SetQtmStatus&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= QTM service &amp;quot;qtm:sp&amp;quot; =&lt;br /&gt;
qtm:sp has access to all &amp;quot;qtm:u&amp;quot;, &amp;quot;qtm:s&amp;quot; commands and more:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010040 || NotifyTopLcdModeChange&lt;br /&gt;
|-&lt;br /&gt;
| 0x08020000 || NotifyTopLcdPowerOn&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030000 || IsExpanderInUse&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040000 || NotifyTopLcdPowerOff&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
GSP always keeps an handle to this service open. NS sometimes uses this service (to blacklist some internal test applications, see [[NS_CFA]]), but when it does it opens then immediately closes the session thereafter.&lt;br /&gt;
&lt;br /&gt;
= QTM &amp;quot;hardware check&amp;quot; service &amp;quot;qtm:c&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000 || StartHardwareCheck&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000 || StopHardwareCheck&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030040 || SetBarrierPattern&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000 || WaitAndCheckExpanderWorking&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040 || SetIrLedStatusOverride&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The commands for this service are separate from all the other services documented above.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=3DS_Virtual_Console&amp;diff=23004</id>
		<title>3DS Virtual Console</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=3DS_Virtual_Console&amp;diff=23004"/>
		<updated>2025-01-05T22:54:12Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Fix confusion about CAA descriptor type&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are several types of VC titles: NES/GB/GBC VC titles, SNES VC titles, GameGear VC titles and GBA VC titles.&lt;br /&gt;
Except for GBA VC, the games are ran using emulators.&lt;br /&gt;
&lt;br /&gt;
=NES/GB/GBC VC=&lt;br /&gt;
An emulator application + VC ROM in the NCCH [[RomFS]] (among other things in the RomFS).&lt;br /&gt;
&lt;br /&gt;
The original emulator builds include support for all these three platforms, not specific to just the included ROM platform. However, releases intended for NES games have a red menu, optional switching between the two controllers, a different X button mapping (B instead of menu), optional [[Download Play]] support, and [http://s27.postimg.org/60v4yuw8z/IMG_20140921_001103.jpg a never used multi-rom support]; while Game Boy versions have a green theme and optional 3D border.&lt;br /&gt;
&lt;br /&gt;
Early builds (of Ambassador NES games at least) did not support savestates.&lt;br /&gt;
&lt;br /&gt;
The emulator officially used for Pokemon games removes savestate support in favor of a Link Cable &amp;quot;implementation&amp;quot; involving hooking the games&#039; network functions according to the patch files. ([https://gbatemp.net/attachments/vc-wireless-link-patch-documentation-txt.72966/ Partial documentation of the patch format])&lt;br /&gt;
&lt;br /&gt;
This emulator includes GBA support, however the GBA emulation for this this is somewhat slow. This was presumably implemented before AGB_FIRM was.&lt;br /&gt;
&lt;br /&gt;
Unlike Wii VC, the 3DS VC ROMs for NES use [http://pastebin.com/KLeWt2W3 the &amp;quot;TNES&amp;quot; header].&lt;br /&gt;
&lt;br /&gt;
==RomFS==&lt;br /&gt;
* &amp;quot;rom:/rom/&amp;quot; This directory contains the ROM file(s). Filenames used under here don&#039;t matter: the filename is determined by the emulator app by doing a directory read.&lt;br /&gt;
* &amp;quot;rom:/shaders/&amp;quot; This directory contains GPU shaders used by the emulator app: .shbin, .csdr, and .obj.&lt;br /&gt;
* &amp;quot;rom:/VCM/&amp;quot; This directory contains graphics, audio, and text used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/agb.bin&amp;quot; GBA BIOS.&lt;br /&gt;
* &amp;quot;rom:/buildtime.txt&amp;quot; Emulator app build timestamp.&lt;br /&gt;
* &amp;quot;rom:/config.ini&amp;quot; Emulator configuration .ini, contains sections for all supported 3DS VC platforms.&lt;br /&gt;
* &amp;quot;rom:/&amp;lt;rom_name&amp;gt;.patch&amp;quot; rom_name = filename from the rom directory. This .ini contains patches for the ROM.&lt;br /&gt;
* &amp;quot;rom:/shader.shbin&amp;quot; GPU shader.&lt;br /&gt;
&lt;br /&gt;
==Savedata==&lt;br /&gt;
The savedata can contain:&lt;br /&gt;
* &amp;quot;rsm1.dat&amp;quot;: Same format as the below rsm2.dat. Probably used for the &amp;quot;restore-point&amp;quot;.&lt;br /&gt;
* &amp;quot;rsm2.dat&amp;quot;: Current emulator save-state, for storing/loading state at VC-title launch/exit.&lt;br /&gt;
* &amp;quot;sav.dat&amp;quot;: The actual savedata used by the emulated ROM.&lt;br /&gt;
* &amp;quot;SecureValue&amp;quot;: The random number used by [[Anti Savegame Restore]]. No known version of the emulator implements both savestates and secure value.&lt;br /&gt;
Overwriting sav.dat with 0xFF-bytes doesn&#039;t have any affect on the actual emulator. Doing that with most of the rsm*.dat data doesn&#039;t crash anything.&lt;br /&gt;
&lt;br /&gt;
=SNES VC=&lt;br /&gt;
An emulator application + VC ROM in the NCCH [[RomFS]] (among other things in the RomFS).&lt;br /&gt;
SNES VC titles are New 3DS exclusive.&lt;br /&gt;
&lt;br /&gt;
==RomFS==&lt;br /&gt;
* &amp;quot;rom:/ErrorMessage/&amp;quot; This directory contains text used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/shader/&amp;quot; This directory contains .shbin GPU shaders used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/VCM/&amp;quot; This directory contains text used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/caravel.bcsar&amp;quot; This file contains audio used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/ctrl_change.arc&amp;quot; This file contains graphics used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/data.bin&amp;quot; This file contains the ROM and other data. See below for documentation.&lt;br /&gt;
* &amp;quot;rom:/ErrorMessage.arc&amp;quot; This file contains graphics used by the emulator app.&lt;br /&gt;
* &amp;quot;rom:/KTR-XXXX.icn&amp;quot; Copy of the SMDH of the game.&lt;br /&gt;
* &amp;quot;rom:/shader.shbin&amp;quot; GPU shader.&lt;br /&gt;
* &amp;quot;rom:/nnfont_RectDrawerShader.shbin&amp;quot; GPU shader.&lt;br /&gt;
* &amp;quot;rom:/VCM.arc&amp;quot; This file contains graphics used by the emulator app.&lt;br /&gt;
&lt;br /&gt;
===data.bin structure===&lt;br /&gt;
The file begins with a header (all values are little-endian):&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  START&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x00000100&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x4&lt;br /&gt;
| File size&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x00000030&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x00000050&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x4&lt;br /&gt;
| Start of the ROM (always 0x00000060 in official VC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x4&lt;br /&gt;
| End of the ROM&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x4&lt;br /&gt;
| Start of the footer region (presumably an index for the PCM audio samples). Matches end of file/file size if PCM data is missing&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| Start of decompressed SDD-1 graphics data region. Matches end of file/file size if no SDD-1 chip is present&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x8&lt;br /&gt;
| Product ID (KTR-XXXX), determines filenames in savedata&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x1&lt;br /&gt;
| Emulation speed in FPS (always 0x3C in official VC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x31&lt;br /&gt;
| 0x3&lt;br /&gt;
| ROM size&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x1&lt;br /&gt;
| Always 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x35&lt;br /&gt;
| 0x3&lt;br /&gt;
| Size of the converted PCM audio samples region (starting after ROM). 0 if PCM data is missing&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x1&lt;br /&gt;
| Always 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| 0x2&lt;br /&gt;
| Footer region size. 0 if PCM data is missing&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| 0x2&lt;br /&gt;
| Always 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D&lt;br /&gt;
| 0x2&lt;br /&gt;
| Preset ID (varies for each game). A full list of know Preset IDs (shared by WiiU/SNESC/Switch SNES emulators) can be found [https://docs.google.com/spreadsheets/d/1PbIPVA4NpFEXs1zk249aR3FSuBTY3r-ajpTq3dP3GnQ here]&lt;br /&gt;
|-&lt;br /&gt;
| 0x3F&lt;br /&gt;
| 0x1&lt;br /&gt;
| Always 0x2&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x1&lt;br /&gt;
| Sound volume&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| 0x1&lt;br /&gt;
| ROM type (0x15 == HiROM/0x14 == LoROM)&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| 0xE&lt;br /&gt;
| Always 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x00000003&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x00000001&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| 0x8&lt;br /&gt;
| Always 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The 0x60 header is followed by the SNES ROM, often altered to replace audio samples with pointers to external PCM audio files converted from the game, presumably to speed up emulation (these pointers can be found by looking for &amp;quot;PCMF&amp;quot; in the ROM, as seen on [https://github.com/Plombo/vcromclaim/blob/master/snesrestore.py Wii VC]).&lt;br /&gt;
The ROM is then optionally followed by the PCM audio files, by the SDD-1 decompressed graphics data (the emulator doesn&#039;t properly emulate the chip, presumably because of hardware constraints) and by a footer which appears to be an index for the PCM audio data.&lt;br /&gt;
There are no separate setting fields for individual cart features, and it appears that the emulator has &amp;quot;game presets&amp;quot; stored in its own code, which determine the game-specific settings (such as the expansion chip, and presumably the presence of SRAM), selectable via the preset ID in the header. Each official VC release has [https://docs.google.com/spreadsheets/d/1PbIPVA4NpFEXs1zk249aR3FSuBTY3r-ajpTq3dP3GnQ/edit#gid=490971147 a different preset ID]. The supported SNES expansion chips are: DSP1, C4 and DSP2.  &lt;br /&gt;
&lt;br /&gt;
A similar structure can be found on the Wii U, SNES Classic and Switch Mini emulator [https://gist.github.com/anpage/c1085055db0242ea3c7558dab56712a5]&lt;br /&gt;
&lt;br /&gt;
==Savedata==&lt;br /&gt;
The savedata contains:&lt;br /&gt;
* &amp;quot;KTR-XXXX.cfg&amp;quot;: Appears to contain the &amp;quot;preset ID&amp;quot; and possibly more game/save information.&lt;br /&gt;
* &amp;quot;KTR-XXXX.vea&amp;quot;: Current emulator save-state, for storing/loading state at VC-title launch/exit.&lt;br /&gt;
* &amp;quot;KTR-XXXX.ves&amp;quot;: The actual savedata used by the emulated ROM.&lt;br /&gt;
&lt;br /&gt;
Filenames are determined in the ROM header.&lt;br /&gt;
&lt;br /&gt;
=GBA VC=&lt;br /&gt;
GBA VC is run by [[FIRM|AGB_FIRM]]. RomFS isn&#039;t used for GBA VC titles, but can be found empty within GBA VC titles. The NCCH [[ExeFS]] contains the same files as a normal application. The [[ExeFS]]:/.code contains the GBA VC ROM followed by a 0x360 byte long footer.&lt;br /&gt;
&lt;br /&gt;
===Footer===&lt;br /&gt;
All values in the GBA VC footer and related structures are little-endian.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  START&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| 0x4&lt;br /&gt;
| Magic &#039;.CAA&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x4&lt;br /&gt;
| Must be 1&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x4&lt;br /&gt;
| Offset to array of config descriptors&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Number of config descriptors &amp;lt;&amp;lt; 4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Config descriptor====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  START&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
| Entry type. 0 is the ROM itself (without the CAA stuff) and offset must be 0 (otherwise fails w/ result 0xC900464F). 1 is ROM metadata, see below&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| Offset to entry data&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
| Size of entry data (unused by the function that parses this, which hardcodes the config size (0x324) to memcpy for type 1)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4&lt;br /&gt;
| Padding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====AGB ROM metadata====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  START&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x000&lt;br /&gt;
|  0x4&lt;br /&gt;
|  Padding&lt;br /&gt;
|-&lt;br /&gt;
|  0x004&lt;br /&gt;
|  0x4&lt;br /&gt;
|  GBA ROM Filesize&lt;br /&gt;
|-&lt;br /&gt;
| 0x008&lt;br /&gt;
| 0x4&lt;br /&gt;
| Save type (see below for supported values and [[ARM7_Registers#ARM7_SAVE_MODE|here]] for details)&lt;br /&gt;
|-&lt;br /&gt;
|  0x00C&lt;br /&gt;
|  0x2&lt;br /&gt;
|  Padding (set to FF FF usually?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00E&lt;br /&gt;
| 0x2&lt;br /&gt;
| Sleep mode button combo (utilizes the same bit masks as the [[HID_Registers#HID_PAD|HID_PAD register]], with flipped bits).&amp;lt;br/&amp;gt;If the GBA title supports a button-combo based sleep mode and it&#039;s set here, Agbbg spoofs this combo when closing the 3DS&#039; lid to enter proper sleep mode.&lt;br /&gt;
|-&lt;br /&gt;
| 0x010&lt;br /&gt;
| 0x10&lt;br /&gt;
| Flash and EEPROM configuration (see the target registers [[ARM7_Registers|here]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x020&lt;br /&gt;
| 0x4&lt;br /&gt;
| &amp;quot;Accumulated&amp;quot; interframe alpha blending (01-FF, lower values equal more &amp;quot;ghosting&amp;quot;). Uses previous *output* instead of previous input &lt;br /&gt;
|-&lt;br /&gt;
| 0x024&lt;br /&gt;
| 0x300&lt;br /&gt;
| Video LUT (black to full, rgbrgbrgb...)?,&amp;lt;br/&amp;gt;three different types of this data have been observed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Save types:&lt;br /&gt;
* 0x0: EEPROM 8k for &amp;lt; 256 Mbit titles&lt;br /&gt;
* 0x1: EEPROM 8k for 256 Mbit titles&lt;br /&gt;
* 0x2: EEPROM 64k for &amp;lt; 256 Mbit titles&lt;br /&gt;
* 0x3: EEPROM 64k for 256 Mbit titles&lt;br /&gt;
* 0x4: Flash 512k (Atmel, ID: 0x3D1F) + RTC&lt;br /&gt;
* 0x5: Flash 512k (Atmel, ID: 0x3D1F)&lt;br /&gt;
* 0x6: Flash 512k (SST, ID: 0xD4BF) + RTC&lt;br /&gt;
* 0x7: Flash 512k (SST, ID: 0xD4BF)&lt;br /&gt;
* 0x8: Flash 512k (Panasonic, ID: 0x1B32) + RTC&lt;br /&gt;
* 0x9: Flash 512k (Panasonic, ID: 0x1B32)&lt;br /&gt;
* 0xA: Flash 1Mbit (Macronix, ID: 0x09C2) + RTC&lt;br /&gt;
* 0xB: Flash 1Mbit (Macronix, ID: 0x09C2)&lt;br /&gt;
* 0xC: Flash 1Mbit (Sanyo, ID: 0x1362) + RTC&lt;br /&gt;
* 0xD: Flash 1Mbit (Sanyo, ID: 0x1362)&lt;br /&gt;
* 0xE: SRAM/FRAM 256k&lt;br /&gt;
&lt;br /&gt;
Everything above 0xE results in no save chip and nothing being saved to NAND.&lt;br /&gt;
&lt;br /&gt;
===NAND Savegame===&lt;br /&gt;
AGB_FIRM saves its active save memory to NAND on exit, this is then immediately picked up by NATIVE_FIRM on reboot by checking [[CONFIG_Registers#CFG_BOOTENV|CFG_BOOTENV]]. From there, this is verified and copied out to SD (also see below). The savegame format is as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  START&lt;br /&gt;
!  SIZE&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  0x0&lt;br /&gt;
|  0x4&lt;br /&gt;
|  Magic (&#039;.SAV&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| Always 0xFF&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x10&lt;br /&gt;
| AES-CMAC of the SHA256 hash of 0x30..0x200 + the entire save itself, keyslot 0x24, keyY from process9 .rodata&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x10&lt;br /&gt;
| Always 0xFF&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x1&lt;br /&gt;
|-&lt;br /&gt;
| 0x34&lt;br /&gt;
| 0x4&lt;br /&gt;
| Number of times saved (unused?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x8&lt;br /&gt;
| AGB TitleID&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x10&lt;br /&gt;
| SD card CID from the console the save was made on (verified on load)&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0x4&lt;br /&gt;
| Save start addr (always 0x200)&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| 0x4&lt;br /&gt;
| Save size&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| 0x8&lt;br /&gt;
| Always 0xFF (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0x4&lt;br /&gt;
| See [[ARM7_Registers|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| 0x4&lt;br /&gt;
| See [[ARM7_Registers|here]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| 0x198&lt;br /&gt;
| Always 0xFF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===NAND Savegame on SD===&lt;br /&gt;
A NAND savegame copied to the SD by process9 is identical to its counterpart on the NAND partition, save for the CMAC. For SD copies on retail units, the CMAC is recalculated as the AES-CMAC of the (SHA256 hash of (&amp;quot;CTR-SIGN&amp;quot; + AGB TitleID (little endian) + SHA256 hash of (&amp;quot;CTR-SAV0&amp;quot; + SHA256 hash of (0x30..0x200 + the entire save itself)))), using keyslot 0x30 set up with the keyY from movable.sed. For SD copies on devkit units, the CMAC is recalculated using the SHA256 hash of 0x30..0x200 + the entire save itself, using a different key from process9 .rodata.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GSPGPU:ImportDisplayCaptureInfo&amp;diff=23001</id>
		<title>GSPGPU:ImportDisplayCaptureInfo</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GSPGPU:ImportDisplayCaptureInfo&amp;diff=23001"/>
		<updated>2025-01-02T18:00:22Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00180000]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00180240]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| Capture info for the top screen&lt;br /&gt;
|-&lt;br /&gt;
| 6-9&lt;br /&gt;
| Capture info for the bottom screen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Capture info=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Left framebuffer VA&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Right framebuffer VA (top screen only)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| [[GPU/External_Registers#Framebuffer_format|Format]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| [[GPU/External_Registers#LCD_Source_Framebuffer_Setup|Stride]] (offset 0x90)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
This returns the current framebuffer state. The returned framebuffer addresses are for the new framebuffers (the ones that will be displayed next frame, after VBlank) for the process with GPU rights.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GSPGPU:ImportDisplayCaptureInfo&amp;diff=23000</id>
		<title>GSPGPU:ImportDisplayCaptureInfo</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GSPGPU:ImportDisplayCaptureInfo&amp;diff=23000"/>
		<updated>2025-01-02T17:56:00Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00180000]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00180240]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| Capture info for the top screen&lt;br /&gt;
|-&lt;br /&gt;
| 6-9&lt;br /&gt;
| Capture info for the bottom screen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Capture info=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Left framebuffer VA&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Right framebuffer VA (top screen only)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| [[GPU/External_Registers#Framebuffer_format|Format]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| [[GPU/External_Registers#LCD_Source_Framebuffer_Setup|Stride]] (offset 0x90)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
This returns the current framebuffer state. The returned framebuffer addresses are for the new framebuffers (the ones that will be drawn next VSync) for the process with GPU rights.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GSPGPU:ImportDisplayCaptureInfo&amp;diff=22999</id>
		<title>GSPGPU:ImportDisplayCaptureInfo</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GSPGPU:ImportDisplayCaptureInfo&amp;diff=22999"/>
		<updated>2025-01-02T17:52:19Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00180000]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00180240]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|-&lt;br /&gt;
| 2-5&lt;br /&gt;
| Capture info for the top screen&lt;br /&gt;
|-&lt;br /&gt;
| 6-9&lt;br /&gt;
| Capture info for the bottom screen&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Capture info=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Left framebuffer VA&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Right framebuffer VA (top screen only)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| [[GPU/External_Registers#Framebuffer_format|Format]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| [[GPU/External_Registers#LCD_Source_Framebuffer_Setup|Stride]] (offset 0x90)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
This returns the current framebuffer state. The returned framebuffer addresses are for the currently active framebuffers (or the ones presented in FB info sharedmem if fb entry has bit0 set) for the process with GPU rights.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GSPGPU:SetAxiConfigQoSMode&amp;diff=22998</id>
		<title>GSPGPU:SetAxiConfigQoSMode</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GSPGPU:SetAxiConfigQoSMode&amp;diff=22998"/>
		<updated>2025-01-01T12:48:43Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00100040]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Quality of service&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Quality of service=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 2-0&lt;br /&gt;
| [https://developer.arm.com/documentation/ddi0422/d/programmers-model/programmable-quality-of-service--progqos-/qos-tidemark-register Tidemark]&lt;br /&gt;
|-&lt;br /&gt;
| 15-8&lt;br /&gt;
| [https://developer.arm.com/documentation/ddi0422/d/programmers-model/programmable-quality-of-service--progqos-/qos-access-control-register Access control]&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
&lt;br /&gt;
This is used to program the QoS (Quality of Service). Tidemark is the maximum allowed number of transactions initiated but not completed with FCRAM, after which next transactions will be limited to certain masters. Access control sets which masters have this privilege. For more info, see [https://developer.arm.com/documentation/ddi0422/d/introduction/about-the-high-performance-matrix CoreLink™ NIC-301 r1p2].&lt;br /&gt;
&lt;br /&gt;
Old systems have a total of 7 masters (guesses are ARM11, ARM9, GPU, DSP, CDMA, CSND, AHB); new systems have 3 additional masters (likely NewCDMA and L2 controller, and N3DS-GPU (enabled by [[CONFIG11_Registers#CFG11_GPU_N3DS_CNT|CFG11_GPU_N3DS_CNT]])).&lt;br /&gt;
&lt;br /&gt;
GSP limits the maximum value of tidemark to 7; meanwhile, the maximum value for access control is 2^N-1, 1 bit for each slave interface, where N = number of slave interfaces.&lt;br /&gt;
&lt;br /&gt;
New GSP forces SI7 (corresponding to N3DS-GPU) to be always set.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GSP_Services&amp;diff=22997</id>
		<title>GSP Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GSP_Services&amp;diff=22997"/>
		<updated>2025-01-01T11:40:38Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__&lt;br /&gt;
{{Anchor|GSPGPU}}{{Anchor|gsp::Gpu}}&lt;br /&gt;
= GSP service &amp;quot;gsp::Gpu&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;
!  GSP rights required&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010082&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| [[GSPGPU:WriteHWRegs|WriteHWRegs]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020084&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| [[GSPGPU:WriteHWRegsWithMask|WriteHWRegsWithMask]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030082&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| [[GSPGPU:WriteHWRegRepeat|WriteHWRegRepeat]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040080&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| [[GSPGPU:ReadHWRegs|ReadHWRegs]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050200&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| [[GSPGPU:SetBufferSwap|SetBufferSwap]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060082&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| SetCommandList (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000700C2&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| RequestDma (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080082&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:FlushDataCache|FlushDataCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090082&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:InvalidateDataCache|InvalidateDataCache]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0044&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| RegisterInterruptEvents (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0040&lt;br /&gt;
| &lt;br /&gt;
| Usually not (see below)&lt;br /&gt;
| [[GSPGPU:SetLcdForceBlack|SetLcdForceBlack]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0000&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:TriggerCmdReqQueue|TriggerCmdReqQueue]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0140&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| SetDisplayTransfer (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0180&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| SetTextureCopy (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0200&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| SetMemoryFill (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100040&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:SetAxiConfigQoSMode|SetAxiConfigQoSMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110040&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:SetPerfLogMode|SetPerfLogMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120000&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:GetPerfLog|GetPerfLog]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00130042&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:RegisterInterruptRelayQueue|RegisterInterruptRelayQueue]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00140000&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:UnregisterInterruptRelayQueue|UnregisterInterruptRelayQueue]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00150002&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:TryAcquireRight|TryAcquireRight]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00160042&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:AcquireRight|AcquireRight]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00170000&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:ReleaseRight|ReleaseRight]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00180000&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:ImportDisplayCaptureInfo|ImportDisplayCaptureInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00190000&lt;br /&gt;
| &lt;br /&gt;
| See below&lt;br /&gt;
| [[GSPGPU:SaveVramSysArea|SaveVramSysArea]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001A0000&lt;br /&gt;
| &lt;br /&gt;
| See below&lt;br /&gt;
| [[GSPGPU:RestoreVramSysArea|RestoreVramSysArea]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001B0000&lt;br /&gt;
| &lt;br /&gt;
| Yes&lt;br /&gt;
| [[GSPGPU:ResetGpuCore|ResetGpuCore]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001C0040&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:SetLedForceOff|SetLedForceOff]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001D0040&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| SetTestCommand (Stubbed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x001E0080&lt;br /&gt;
| &lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:SetInternalPriorities|SetInternalPriorities]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x001F0082&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| No&lt;br /&gt;
| [[GSPGPU:StoreDataCache|StoreDataCache]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The GSP module starts a thread for handling commands for each service session, a maximum of 4 processes can use this service at once. Official applications have an optional code-path which [[GSPGPU:WriteHWRegs|writes]] to registers during initialization, this is normally not used however.&lt;br /&gt;
&lt;br /&gt;
If a process has forcefully acquired rights (ErrDisp), attempting [[GSPGPU:SetLcdForceBlack|unset LCDs black-fill]] from another process will fail.&lt;br /&gt;
Saving/restoring VRAM requires bit0 of process [[GSPGPU:RegisterInterruptRelayQueue|flags]] to be set.&lt;br /&gt;
&lt;br /&gt;
{{Anchor|GSPLCD}}{{Anchor|gsp::Lcd}}&lt;br /&gt;
= GSP service &amp;quot;gsp::Lcd&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;
| 0x00010040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:EnableABL|EnableABL]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:DisableABL|DisableABL]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030080&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetRSLut|SetRSLut]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000400C0&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetRSParams|SetRSParams]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050140&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetABLArea|SetABLArea]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060140&lt;br /&gt;
| &lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070080&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetInertia|SetInertia]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000800C0&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetDitherMode|SetDitherMode]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090140&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetDitherParams|SetDitherParams]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0080&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetBrightnessRaw|SetBrightnessRaw]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0080&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetBrightness|SetBrightness]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:ReloadConfig|ReloadConfig]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:RestoreConfig|RestoreConfig]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:GetPowerState|GetPowerState]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:PowerOnAllBacklights|PowerOnAllBacklights]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:PowerOffAllBacklights|PowerOffAllBacklights]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:PowerOnBacklight|PowerOnBacklight]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:PowerOffBacklight|PowerOffBacklight]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00130040&lt;br /&gt;
| &lt;br /&gt;
| [[GSPLCD:SetLedForceOff|SetLedForceOff]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00140000&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| [[GSPLCD:GetVendor|GetVendor]] New3DS-only, stubbed on Old3DS: This only returns an error. Uninitialized data(not set by this command itself) is also written to u8 cmdreply_word[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00150040&lt;br /&gt;
| [[8.0.0-18]]&lt;br /&gt;
| [[GSPLCD:GetBrightness|GetBrightness]] New3DS-only, stubbed on Old3DS: This only returns an error. Uninitialized data(not set by this command itself) is also written to u32 cmdreply_word[2].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unlike gsp::Gpu, GSP module does not start a separate thread for handling these service commands.&lt;br /&gt;
&lt;br /&gt;
= Version history =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Version&lt;br /&gt;
!  Changes&lt;br /&gt;
|-&lt;br /&gt;
| [[8.0.0-18|v8196]]&lt;br /&gt;
| Support for the new LINEAR memory region was implemented(for cache commands and vaddr-&amp;gt;physaddr conversion). Support for the new process-mem 0x1E800000 region(however the GPU can&#039;t actually access this memory) was added for vaddr-&amp;gt;physaddr conversion. Originally GSP module ignored vaddr-&amp;gt;physaddr conversion errors(like with vaddrs outside of the handled ranges) and just wrote physaddr value0 to the GPU registers, however now GSP module returns an error for that instead(see [[GSP_Shared_Memory#Command_Buffer_Header|here]] regarding errors being written to GSP shared-mem). New services commands were added too, see above.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=New3DS=&lt;br /&gt;
There&#039;s separate GSP-module titles for Old3DS and New3DS. PTM CheckNew3DS is only used by the New3DS title, for copying that flag into a state field. Elsewhere that field is checked for running additional code only on New3DS, for processing various state / using [[QTM_Services|QTM]] commands.&lt;br /&gt;
&lt;br /&gt;
[[Category:Services]]&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GSPGPU:SetInternalPriorities&amp;diff=22996</id>
		<title>GSPGPU:SetInternalPriorities</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GSPGPU:SetInternalPriorities&amp;diff=22996"/>
		<updated>2024-12-31T23:43:38Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x001E0080]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Session thread priority&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Command queue priority for this session&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Description=&lt;br /&gt;
Sets the priority for the thread handling incoming GSPGPU commands, and the priority for the command queue reader thread when the current session has acquired GPU rights. Both values must be &amp;lt; 0x40.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=22657</id>
		<title>QTM Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=22657"/>
		<updated>2024-09-17T16:43:06Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: QTM documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
QTM is the [[New_3DS]] system module in charge of handling head tracking. A maximum of three (only two until [[9.3.0-21]]) sessions for *all* QTM services combined.&lt;br /&gt;
&lt;br /&gt;
Head tracking is not usable when any other process is using any of the cameras, QTM returns error 0xC8A18008 for this.&lt;br /&gt;
&lt;br /&gt;
QTM only tracks the position of the user&#039;s two eyes, but does not track the area they are focusing at. Hence, &amp;quot;eye-tracking&amp;quot; is sometimes used to refer to this feature on 3DS, even though it means something else outside the 3DS hacking scene.&lt;br /&gt;
&lt;br /&gt;
Refer to this libctru commit for more details: https://github.com/devkitPro/libctru/commit/8e55cdf05d1f2c07f350ec678d0f0d6a7a2df214&lt;br /&gt;
&lt;br /&gt;
=QTM services=&lt;br /&gt;
&lt;br /&gt;
= QTM user service &amp;quot;qtm:u&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010080 || GetRawTrackingDataEx&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020080 || GetTrackingDataEx&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000 || EnableManualIrLedControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000 || DisableManualIrLedControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040 || SetIrLedStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000 || IsCurrentAppBlacklisted&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= QTM system service &amp;quot;qtm:s&amp;quot; =&lt;br /&gt;
&amp;quot;qtm:s&amp;quot; has access to all &amp;quot;qtm:u&amp;quot; commands and more:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x04010040 || SetCentralBarrierPosition&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020000 || GetCameraLuminance&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030000 || EnableAutoBarrierControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x04040000 || DisableAutoBarrierControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x04050040 || SetBarrierPosition&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060000 || GetCurrentBarrierPosition&lt;br /&gt;
|-&lt;br /&gt;
| 0x04070040 || SetIrLedStatusOverride&lt;br /&gt;
|-&lt;br /&gt;
| 0x040801C0 || SetCalibrationData&lt;br /&gt;
|-&lt;br /&gt;
| 0x04090000 || GetQtmStatus&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A0040 || SetQtmStatus&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= QTM service &amp;quot;qtm:sp&amp;quot; =&lt;br /&gt;
qtm:sp has access to all &amp;quot;qtm:u&amp;quot;, &amp;quot;qtm:s&amp;quot; commands and more:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010040 || NotifyTopLcdModeChange&lt;br /&gt;
|-&lt;br /&gt;
| 0x08020000 || NotifyTopLcdPowerOn&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030000 || IsExpanderInUse&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040000 || NotifyTopLcdPowerOff&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
GSP always keeps an handle to this service open. NS sometimes uses this service (to blacklist some internal test applications, see [[NS_CFA]]), but when it does it opens then immediately closes the session thereafter.&lt;br /&gt;
&lt;br /&gt;
= QTM &amp;quot;hardware check&amp;quot; service &amp;quot;qtm:c&amp;quot; =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000 || StartHardwareCheck&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000 || StopHardwareCheck&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030040 || SetBarrierPattern&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000 || WaitAndCheckExpanderWorking&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040 || SetIrLedStatusOverride&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The commands for this service are separate from all the other services documented above.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=22656</id>
		<title>FirmwareNews</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=FirmwareNews&amp;diff=22656"/>
		<updated>2024-09-17T16:10:13Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;As of this writing, the latest firmware is &#039;&#039;&#039;[[11.17.0-50]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
See [[Homebrew Exploits|here]] regarding running homebrew.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Software-based full system control exploits are known and publicly available for system versions up to and including [[11.17.0-50]], while [[Bootloader#Non-NAND_FIRM_boot|ntrboothax]] allows for ARM9 arbitrary code execution on any 3DS-family console regardless of system firmware version (or even its presence at all).&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NS_CFA&amp;diff=22624</id>
		<title>NS CFA</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NS_CFA&amp;diff=22624"/>
		<updated>2024-09-12T17:33:40Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Parse kv and qtm blacklist&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This pages describes the content of the [[NCCH#CFA|CFA]](titleID 0004001B00010702) RomFS used by NS.&lt;br /&gt;
&lt;br /&gt;
==key.bin and value.bin==&lt;br /&gt;
Originally the filesize for key.bin was 12-bytes, with the [[6.0.0-11]] title-version this is now 48-bytes.&lt;br /&gt;
&lt;br /&gt;
Originally the filesize for value.bin was 8-bytes, with the [[6.0.0-11]] title-version this is now 32-bytes.&lt;br /&gt;
&lt;br /&gt;
The two files form a KV-store of compatibility parameters, as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! TitleId !! Name !! Flags&lt;br /&gt;
|-&lt;br /&gt;
| 0004000000032800 || Ridge Racer 3D (JPN) || Card latency parameter 0x47E000, override level 0&lt;br /&gt;
|-&lt;br /&gt;
| 0004000000033400 || Zelda no Densetsu: Toki no Ocarina 3D (JPN) || Use only 4KB pages&lt;br /&gt;
|-&lt;br /&gt;
| 0004000000033500 || The Legend of Zelda: Ocarina of Time 3D (USA) || Use only 4KB pages&lt;br /&gt;
|-&lt;br /&gt;
| 0004000000033600 || The Legend of Zelda: Ocarina of Time 3D (EUR) || Use only 4KB pages&lt;br /&gt;
|-&lt;br /&gt;
| 0004000000033B00 || Ridge Racer 3D (EUR) || Card latency parameter 0x47E000, override level 0&lt;br /&gt;
|-&lt;br /&gt;
| 0004000000035800 || Ridge Racer 3D (USA) || Card latency parameter 0x47E000, override level 0&lt;br /&gt;
|-&lt;br /&gt;
| 000400000008F800 || The Legend of Zelda: Ocarina of Time 3D (KOR) || Use only 4KB pages&lt;br /&gt;
|-&lt;br /&gt;
| 000400000008F900 || The Legend of Zelda: Ocarina of Time 3D (CHN) || Use only 4KB pages&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to https://gist.github.com/TuxSH/11da5baae53e80f466829bbab6be6373#file-parse_kv-py for more details.&lt;br /&gt;
&lt;br /&gt;
==ctr_backup_black_list==&lt;br /&gt;
This file added with [[6.0.0-11]] contains the uniqueID blacklist for [[SD Savedata Backups]].&lt;br /&gt;
&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;
| 0x4&lt;br /&gt;
| Total entries, this is value 93 for the [[6.0.0-11]] title-version.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| All-zero&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Totalentries*4&lt;br /&gt;
| Entries, each entry is a word in the following format: &amp;lt;nowiki&amp;gt;0x100000 |&amp;lt;/nowiki&amp;gt; [[Title_list|title_UniqueID]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==qtm_black_list==&lt;br /&gt;
This file was added with title version v4096, for [[9.0.0-20]]/[[8.1.0-0_New3DS]]. This is used when launching applications, on New3DS.&lt;br /&gt;
&lt;br /&gt;
The applications in the &amp;quot;blacklist&amp;quot; seem to only be Nintendo-internal (?) test applications, going from the unique IDs (unique ID is (tid &amp;gt;&amp;gt; 8) &amp;amp; 0xFFFFF). Camera mode (unsure) corresponds to stubbed cam command id 0x00410040:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! UID !! Flags&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8087 || QTM disabled, camera mode 0 [stubbed]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8088 || Camera mode 1 [stubbed]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8089 || QTM disabled (2), camera mode 1 [stubbed]&lt;br /&gt;
|-&lt;br /&gt;
| 0xF8090 || Camera mode 0 [stubbed], [[APT:GetApplicationRunningMode|report app mode as O3DS]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Refer to https://gist.github.com/TuxSH/11da5baae53e80f466829bbab6be6373#file-parse_qtm_blacklist-py for more details&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=22618</id>
		<title>QTM Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=22618"/>
		<updated>2024-09-05T21:44:19Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
QTM is the [[New_3DS]] system module in charge of handling head tracking. A maximum of three (only two until [[9.3.0-21]]) sessions can be opened for each QTM service.&lt;br /&gt;
&lt;br /&gt;
Head tracking is not usable when any other process is using any of the cameras, QTM returns error 0xC8A18008 for this.&lt;br /&gt;
&lt;br /&gt;
=QTM services=&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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010080&lt;br /&gt;
| [[QTM:GetHeadtrackingInfoRaw|GetHeadtrackingInfoRaw]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020080&lt;br /&gt;
| [[QTM:GetHeadtrackingInfo|GetHeadtrackingInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000&lt;br /&gt;
| Writes an output u8 to cmdreply[2].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The commands under this section are available for all QTM services except for &amp;quot;qtm:c&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= QTM user service &amp;quot;qtm:u&amp;quot; =&lt;br /&gt;
The commands available for this are exactly the same as the commands listed under the &amp;quot;QTM services&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
= QTM system service &amp;quot;qtm: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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x04010040&lt;br /&gt;
| (float input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020000&lt;br /&gt;
| Writes float output to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04040000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04050040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060000&lt;br /&gt;
| Writes an u8 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x04070040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x040801C0&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04090000&lt;br /&gt;
| Writes an u8 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A0040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See also the &amp;quot;QTM services&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
= QTM service &amp;quot;qtm:sp&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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010040&lt;br /&gt;
| (u8 input) Internally compared with 2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08020000&lt;br /&gt;
| Writes 1 to a flag&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030040&lt;br /&gt;
| Returns a byte loaded from a flag&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040000&lt;br /&gt;
| Writes 1 to a flag&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This service has all of the commands listed under the &amp;quot;QTM services&amp;quot; section and the &amp;quot;qtm:s&amp;quot; section, in addition to the above commands.&lt;br /&gt;
&lt;br /&gt;
This service is used by [[NS]] and [[GSP_Services|GSP]]-module, hence no other processes can use this service until [[9.3.0-21]].&lt;br /&gt;
&lt;br /&gt;
= QTM callibration service &amp;quot;qtm:c&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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| InitializeHardwareCheck (sets 0x1EB63410, 0x1EB6342B, 0x1EB6340A to 1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| ? (sets 0x1EB6342B, 0x1EB6340A to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030040&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| Writes an output u8 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040&lt;br /&gt;
| SetIrLedCheck (u8 input)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The commands for this service are separate from the commands under the &amp;quot;QTM services&amp;quot; section.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=22617</id>
		<title>QTM Services</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=QTM_Services&amp;diff=22617"/>
		<updated>2024-09-05T21:42:33Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Services]]&lt;br /&gt;
&lt;br /&gt;
QTM is the [[New_3DS]] system module in charge of handling head tracking. A maximum of three (only two until [[9.3.0-21]]) sessions can be opened for each QTM service.&lt;br /&gt;
&lt;br /&gt;
Head tracking is not usable when any other process is using any of the cameras, QTM returns error 0xC8A18008 for this.&lt;br /&gt;
&lt;br /&gt;
=QTM services=&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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010080&lt;br /&gt;
| [[QTM:GetHeadtrackingInfoRaw|GetHeadtrackingInfoRaw]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020080&lt;br /&gt;
| [[QTM:GetHeadtrackingInfo|GetHeadtrackingInfo]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000&lt;br /&gt;
| Writes an output u8 to cmdreply[2].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The commands under this section are available for all QTM services except for &amp;quot;qtm:c&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= QTM user service &amp;quot;qtm:u&amp;quot; =&lt;br /&gt;
The commands available for this are exactly the same as the commands listed under the &amp;quot;QTM services&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
= QTM system service &amp;quot;qtm: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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x04010040&lt;br /&gt;
| (float input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04020000&lt;br /&gt;
| Writes float output to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x04030000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04040000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04050040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04060000&lt;br /&gt;
| Writes an u8 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x04070040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|-&lt;br /&gt;
| 0x040801C0&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04090000&lt;br /&gt;
| Writes an u8 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x040A0040&lt;br /&gt;
| (u8 input)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See also the &amp;quot;QTM services&amp;quot; section.&lt;br /&gt;
&lt;br /&gt;
= QTM service &amp;quot;qtm:sp&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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x08010040&lt;br /&gt;
| (u8 input) Internally compared with 2&lt;br /&gt;
|-&lt;br /&gt;
| 0x08020000&lt;br /&gt;
| Writes 1 to a flag&lt;br /&gt;
|-&lt;br /&gt;
| 0x08030040&lt;br /&gt;
| Returns a byte loaded from a flag&lt;br /&gt;
|-&lt;br /&gt;
| 0x08040000&lt;br /&gt;
| Writes 1 to a flag&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This service has all of the commands listed under the &amp;quot;QTM services&amp;quot; section and the &amp;quot;qtm:s&amp;quot; section, in addition to the above commands.&lt;br /&gt;
&lt;br /&gt;
This service is used by [[NS]] and [[GSP_Services|GSP]]-module, hence no other processes can use this service.&lt;br /&gt;
&lt;br /&gt;
= QTM callibration service &amp;quot;qtm:c&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;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| InitializeHardwareCheck (sets 0x1EB63410, 0x1EB6342B, 0x1EB6340A to 1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| ? (sets 0x1EB6342B, 0x1EB6340A to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030040&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| Writes an output u8 to cmdreply[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040&lt;br /&gt;
| SetIrLedCheck (u8 input)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The commands for this service are separate from the commands under the &amp;quot;QTM services&amp;quot; section.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Legacy_FIRM_PXI&amp;diff=22585</id>
		<title>Legacy FIRM PXI</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Legacy_FIRM_PXI&amp;diff=22585"/>
		<updated>2024-06-21T20:24:38Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the PXI commands for TWL_FIRM/AGB_FIRM.&lt;br /&gt;
&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;
| 0x0001....&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| Shuts down LgyP9, puts ARM9 into a &amp;lt;code&amp;gt;while(1) svcSleepThread(1*1000*1000);&amp;lt;/code&amp;gt; loop at the end of &amp;lt;code&amp;gt;main()&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020080&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| PrepareArm9ForTwl(u64 application_titleID) This launches the specified TWL title.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030080&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| PrepareArm9ForAgb(u64 application_titleID) This launches the specified GBA VC title. On success, returns u64 GBA VC title exeFS .code length in cmdbuf[2].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040080 / 0x00040000&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| Process9 will eventually wait for the ARM11 to send this command after PrepareArm9ForTwl/PrepareArm9ForAgb is called, see [[FIRM|here]]. The input parameters should be 0 and 0x00040000 as this is a nested message of which the ITCM code consumes the first half. Returns 0 after going into AGB mode&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050040&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| (u8 unk) Does some lowlevel sd/emmc register setting (different for unk=0 and unk=1). If unk=1, sets a flag, code ran during the pxi main-func loop detects this and calls &amp;lt;code&amp;gt;svcKernelSetState(2,0)&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0006....&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| (DateTime datetimetoset,u8 shouldRead) - Sets the P9 date/time (calling the same function used by cmd 0xA for this), then reads (if shouldRead is not 0) or writes (if shouldRead is 0) ARM7_RTC_LO/HI registers to or from agbsave_in_ram+0x60. AgbBg doesn&#039;t appear to use this command at all.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0007....&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| Returns u8, IsSdCardInserted maybe?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0008....&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| Stubbed, returns 0xE0C0EC03...&lt;br /&gt;
|-&lt;br /&gt;
| 0x0009....&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| Stubbed, returns 0xE0C0EC03...&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A....&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| Sets Process9&#039;s internal date/time, see below.&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0240&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| This is used for TWL initialization, prior to using command 0x00020080. Arguments: u8 &amp;lt;2 if card, else 3&amp;gt;, u8 &amp;lt;bit 1 from firmlaunchparams+0x460&amp;gt;, u64 tid, u8 bannerHmac[0x14]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0800&lt;br /&gt;
| [[1.0.0-0]]&lt;br /&gt;
| This writes the input 0x80-byte ASCII data to [[Flash_Filesystem|nand:/rw/sys/lgy.log]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This PXI service seems to be based on [[Development Services PXI]]. Commands 0x8 and 0x9 in both are stubbed with the same function (returns 0xE0C0EC03), commands that seem useless under NATIVE_FIRM have a purpose on legacy FIRMs (command 0xC does some &amp;quot;unnecessary copying to stack&amp;quot; on NATIVE_FIRM, but this same copy (0x80-bytes) is used to write to lgy.log on legacy FIRMs), and commands that are essential (and only useful) on legacy FIRMs (0x2 and 0x3) are stubbed completely on NATIVE_FIRM.&lt;br /&gt;
&lt;br /&gt;
=Command 0x2=&lt;br /&gt;
This does the following:&lt;br /&gt;
* Waits for an u8 state field to become non-zero.&lt;br /&gt;
* Clears DSi memory, etc.&lt;br /&gt;
* Loads the DS(i) application specified by the command request titleID. If this fails, it immediately returns the error for this.&lt;br /&gt;
* Initializes the DSi memory at 0x02fe7000 and 0x02fffc00.&lt;br /&gt;
* Loads the TWL launcher located at physical address [[Memory_layout|0x27C00000]], which was written there by the TwlBg ARM11 process.&lt;br /&gt;
* Loads the TWL bootloader, see [[FIRM|here]].&lt;br /&gt;
* Initializes DSi memory/keys, [[IO_Registers|0x10018000]] registers, etc.&lt;br /&gt;
* Writes value 0x3 to [[CONFIG_Registers|REG_BOOTENV]], and value 0x1 to an u8 state field.&lt;br /&gt;
* Uses [[SVC|svcSignalEvent]], then returns.&lt;br /&gt;
&lt;br /&gt;
=Command 0xA=&lt;br /&gt;
This takes 3 arguments, which are the following structure packed into 12 bytes (no padding):&lt;br /&gt;
 s32 year;&lt;br /&gt;
 s8 month;&lt;br /&gt;
 s8 day;&lt;br /&gt;
 s8 day_of_week; // Sunday = 0, up to Saturday = 6&lt;br /&gt;
 s8 hour;&lt;br /&gt;
 s8 minute;&lt;br /&gt;
 s8 second;&lt;br /&gt;
 s16 ms;&lt;br /&gt;
This should be the current date/time (AgbBg seems to get it from MCU); it&#039;s converted from this structure into milliseconds, and saved into .data. Another .data variable is set from svcGetSystemTick by this command, and another function in (LGY) P9 essentially does &amp;lt;code&amp;gt;return date_time_set_from_this_command + ticks_to_ms(svcGetSystemTick() - systemtick_from_this_command);&amp;lt;/code&amp;gt; to get the current date&amp;amp;time.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=I2C_Registers&amp;diff=22580</id>
		<title>I2C Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=I2C_Registers&amp;diff=22580"/>
		<updated>2024-06-13T15:17:54Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C1_DATA&lt;br /&gt;
| 0x10161000&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#I2C_CNT|I2C1_CNT]]&lt;br /&gt;
| 0x10161001&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C1_CNTEX&lt;br /&gt;
| 0x10161002&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C1_SCL&lt;br /&gt;
| 0x10161004&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C2_DATA&lt;br /&gt;
| 0x10144000&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#I2C_CNT|I2C2_CNT]]&lt;br /&gt;
| 0x10144001&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C2_CNTEX&lt;br /&gt;
| 0x10144002&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C2_SCL&lt;br /&gt;
| 0x10144004&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C3_DATA&lt;br /&gt;
| 0x10148000&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#I2C_CNT|I2C3_CNT]]&lt;br /&gt;
| 0x10148001&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C3_CNTEX&lt;br /&gt;
| 0x10148002&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C3_SCL&lt;br /&gt;
| 0x10148004&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== I2C_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Stop (0=No, 1=Stop/last byte)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Start (0=No, 1=Start/first byte)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Pause (0=Transfer Data, 1=Pause after Error, used with/after Stop)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Ack Flag         (0=Error, 1=Okay)  (For DataRead: W, for DataWrite: R)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Data Direction   (0=Write, 1=Read)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Interrupt Enable (0=Disable, 1=Enable)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Start/busy       (0=Ready, 1=Start/busy)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== I2C_CNTEX ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| ? Set to 2 normally.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== I2C_SCL ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0-5&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 8-12&lt;br /&gt;
| ? Set to 5 normally.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= I2C Devices =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!   [[I2C_Registers|Device id]]&lt;br /&gt;
!   Device bus id&lt;br /&gt;
!   Device Write Address&lt;br /&gt;
!   Accessible via I2C [[I2C_Services|service]]&lt;br /&gt;
!   Device description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 0x4a&lt;br /&gt;
| &amp;quot;i2c::MCU&amp;quot;&lt;br /&gt;
| Power management?(same device addr as the DSi power-management)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0x7a&lt;br /&gt;
| &amp;quot;i2c::CAM&amp;quot;&lt;br /&gt;
| Camera0?(same dev-addr as DSi cam0)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1&lt;br /&gt;
| 0x78&lt;br /&gt;
| &amp;quot;i2c::CAM&amp;quot;&lt;br /&gt;
| Camera1?(same dev-addr as DSi cam1)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 2&lt;br /&gt;
| 0x4a&lt;br /&gt;
| &amp;quot;i2c::MCU&amp;quot;&lt;br /&gt;
| MCU&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 0x78&lt;br /&gt;
| &amp;quot;i2c::CAM&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 2&lt;br /&gt;
| 0x2c&lt;br /&gt;
| &amp;quot;i2c::LCD&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 2&lt;br /&gt;
| 0x2e&lt;br /&gt;
| &amp;quot;i2c::LCD&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 2&lt;br /&gt;
| 0x40&lt;br /&gt;
| &amp;quot;i2c::DEB&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 2&lt;br /&gt;
| 0x44&lt;br /&gt;
| &amp;quot;i2c::DEB&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 3&lt;br /&gt;
| 0xa6&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| Gyroscope. The device table in I2C-module had the device address changed from 0xA6 to 0xD6 with [[8.0.0-18]].&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 3&lt;br /&gt;
| 0xd0&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| Gyroscope (old3DS)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 3&lt;br /&gt;
| 0xd2&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| Gyroscope (2DS, new3DSXL, new2DSXL)&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 3&lt;br /&gt;
| 0xa4&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| DebugPad (slightly modified [https://wiibrew.org/wiki/Wiimote/Extension_Controllers/Classic_Controller_Pro Wii Classic Controller Pro])&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 3&lt;br /&gt;
| 0x9a&lt;br /&gt;
| &amp;quot;i2c::IR&amp;quot;&lt;br /&gt;
| IR&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| 3&lt;br /&gt;
| 0xa0&lt;br /&gt;
| &amp;quot;i2c::EEP&amp;quot;&lt;br /&gt;
| HWCAL EEPROM ([[Hardware_calibration#Header|only present on dev units where SHA256 is used for HWCAL verification]])&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 2&lt;br /&gt;
| 0xee&lt;br /&gt;
| &amp;quot;i2c::NFC&amp;quot;&lt;br /&gt;
| New3DS-only [[NFC_Services|NFC]]&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 1&lt;br /&gt;
| 0x40&lt;br /&gt;
| &amp;quot;i2c::QTM&amp;quot;&lt;br /&gt;
| New3DS-only [[QTM_Services|QTM]]&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 3&lt;br /&gt;
| 0x54&lt;br /&gt;
| &amp;quot;i2c::IR&amp;quot;&lt;br /&gt;
| Used by IR-module starting with [[8.0.0-18]], for New3DS-only HID via &amp;quot;ir:rst&amp;quot;. This deviceid doesn&#039;t seem to be supported by i2c module on [[8.0.0-18]](actual support was later added in New3DS i2c module).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notice&#039;&#039;&#039;: These device addresses are used for writing to the respective device, for reading bit0 must be set (see I2C protocol). Thus, the actual device address is &amp;gt;&amp;gt; 1.&lt;br /&gt;
&lt;br /&gt;
== Device 3 ==&lt;br /&gt;
  ro = read-only (writing is no-op)&lt;br /&gt;
  rw = read-write&lt;br /&gt;
  wo = write-only (reading will yield 00, FF, or unpredictable data)&lt;br /&gt;
&lt;br /&gt;
  d* = dynamic register (explaination below this table)&lt;br /&gt;
  s* = shared register (explaination below this table)&lt;br /&gt;
  ds = dynamic shared (explaination below this table)&lt;br /&gt;
&lt;br /&gt;
Reading or writing multiple bytes from/to single-byte registers increments the register ID along with it. For example reading two bytes from reg 0x00 reads regs 0x00 and 0x01.&lt;br /&gt;
&lt;br /&gt;
This is not the case for multibyte regs (0x29, 0x2D, 0x4F, 0x61 and 0x7F), plus reg 0x60.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  REGISTER&lt;br /&gt;
!  WIDTH&lt;br /&gt;
!  INFO&lt;br /&gt;
!  DESCRIPTION &lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Version high&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Version low&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| d&lt;br /&gt;
| rw&lt;br /&gt;
| For bit0 and 1 values, writing will mask away/&amp;quot;acknowledge&amp;quot; the event, set to 3 by mcuMainLoop on reset if reset source is Watchdog&lt;br /&gt;
  bit0: RTC clock value got reset to defaults&lt;br /&gt;
  bit1: Watchdog reset happened&lt;br /&gt;
  bit5: TWL MCU reg: volume mode (0: 8-step, 1: 32-step)&lt;br /&gt;
  bit6: TWL MCU reg: NTR (0) vs TWL mode (1)&lt;br /&gt;
  bit7: TWL MCU reg: Uses NAND&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| ds&lt;br /&gt;
| rw&lt;br /&gt;
| Top screen Vcom&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| ds&lt;br /&gt;
| rw&lt;br /&gt;
| Bottom screen Vcom&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
- 0x07&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Danger zone - [[MCU_Services#MCU_firmware_versions|MCU unlock sequence]] is written here.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Raw 3D slider position&lt;br /&gt;
|-&lt;br /&gt;
| 0x09&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Volume slider state (0x00 - 0x3F)&lt;br /&gt;
This is the same value returned by [[MCUHWC:GetSoundVolume|MCUHWC:GetSoundVolume]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Battery temperature (in Celcius?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Battery percentage&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Battery percentage, fractional part (seems to have a resolution of around 0.1% according to tests)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| System voltage&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Flags: bit7-5 are read via [[MCU_Services|mcu::GPU]]. The rest of them are read via [[MCU_Services|mcu::RTC]].&lt;br /&gt;
  bit1: ShellState&lt;br /&gt;
  bit3: AdapterState&lt;br /&gt;
  bit4: BatteryChargeState&lt;br /&gt;
  bit5: Bottom screen backlight on&lt;br /&gt;
  bit6: Top screen backlight on&lt;br /&gt;
  bit7: LCD panel voltage on&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
- 0x13&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Received interrupt bitmask, see register 0x18 for possible values  &lt;br /&gt;
If no interrupt was received this register is 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Unused and unwritable byte :(&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
- 0x17&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused and unreferenced free RAM! Good for userdata.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
- 0x1B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Interrupt mask for register 0x10 (0=enabled,1=disabled)&lt;br /&gt;
  bit00: Power button press (for 27 &amp;quot;ticks&amp;quot;)&lt;br /&gt;
  bit01: Power button held (for 375 &amp;quot;ticks&amp;quot;; the 3DS turns off regardless after a fixed time)&lt;br /&gt;
  bit02: HOME button press (for 5 &amp;quot;ticks&amp;quot;)&lt;br /&gt;
  bit03: HOME button release&lt;br /&gt;
  bit04: WiFi switch button&lt;br /&gt;
  bit05: Shell close&lt;br /&gt;
  bit06: Shell open&lt;br /&gt;
  bit07: Fatal hardware condition([[Services#Notifications|?]]) (sent when the MCU gets reset by the Watchdog timer)&lt;br /&gt;
  bit08: Charger removed&lt;br /&gt;
  bit09: Charger plugged in&lt;br /&gt;
  bit10: RTC alarm (when some conditions are met it&#039;s sent when the current day and month and year matches the current RTC time)&lt;br /&gt;
  bit11: Accelerometer I2C read/write done [https://github.com/profi200/libn3ds/blob/083c8ffa3f56a49802fa74b6afe45a96820f0439/include/arm11/drivers/mcu_regmap.h#L124]&lt;br /&gt;
  bit12: HID update&lt;br /&gt;
  bit13: Battery percentage status change (triggered at 10%, 5%, and 0% while discharging)&lt;br /&gt;
  bit14: Battery stopped charging (independent of charger state)&lt;br /&gt;
  bit15: Battery started charging&lt;br /&gt;
Nonmaskable(?) interrupts&lt;br /&gt;
  bit16: ???&lt;br /&gt;
  bit17: ??? (opposite even for bit16)&lt;br /&gt;
  bit22: Volume slider position change&lt;br /&gt;
  bit23: ??? Register 0x0E update&lt;br /&gt;
  bit24: GPU off&lt;br /&gt;
  bit25: GPU on&lt;br /&gt;
  bit26: bottom backlight off&lt;br /&gt;
  bit27: bottom backlight on&lt;br /&gt;
  bit28: top backlight off&lt;br /&gt;
  bit29: top backlight on&lt;br /&gt;
  bit30: bit set by mcu sysmodule&lt;br /&gt;
  bit31: bit set by mcu sysmodule&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
- 0x1F&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused and unreferenced free RAM! Good for userdata.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| System power control:&lt;br /&gt;
  bit0: power off&lt;br /&gt;
  bit1: full reboot (unused). Discards things like [[CONFIG9_Registers#CFG9_BOOTENV|CFG9_BOOTENV]]&lt;br /&gt;
    - Asserts RESET1 via PMIC command (?) (deasserts nRESET1). This could be the reset that controls some CFG9 registers&lt;br /&gt;
    - Asserts RESET2 (P0.1 = 0, PM0.1 = 0 (output)) (deasserts nRESET2)&lt;br /&gt;
    - Asserts FCRAM_RESET (P3.0 = 0) (deasserts nFCRAM_RESET)&lt;br /&gt;
  bit2: normal reboot. Preserves [[CONFIG9_Registers#CFG9_BOOTENV|CFG9_BOOTENV]], etc.&lt;br /&gt;
    - Asserts RESET2 (P0.1 = 0, PM0.1 = 0)&lt;br /&gt;
    - If in NTR emulation mode (see reg 0x02), asserts FCRAM_RESET (P3.0 = 0)&lt;br /&gt;
    - Resets TWL MCU i2c registers&lt;br /&gt;
  bit3: FCRAM reset (present in by LgyBg. Unused because a system reboot does the same thing &amp;amp; a PDN reg also possibly implements this function)&lt;br /&gt;
    - Asserts FCRAM_RESET (P3.0 = 0)&lt;br /&gt;
  bit4: signal that sleep mode is about to be entered (used by PTM)&lt;br /&gt;
Bit 4 sets a bit at a RAM address which seems to control the watcdog timer state, then this bit is immediately unmasked. This field has a bitmask of 0x0F.&lt;br /&gt;
&lt;br /&gt;
If any of the reset bits is set, the MCU waits for 5ms, then deasserts RESET1 (via PMIC), RESET2 (PM0.1 = 1 (input)) and FCRAM_RESET (P3.0 = 1), and reinitializes some other various registers after a 100ms delay.&lt;br /&gt;
|-&lt;br /&gt;
| 0x21&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| Used in legacy mode to signal events for TWL MCU &amp;quot;emulation&amp;quot; (written to REG[0x5D])? Software then asserts the TWL MCU IRQ pin via [[#LGY_GPIOEMU_MASK|Legacy I/O registers]].&lt;br /&gt;
  bit0: Signal TWL POWER button click&lt;br /&gt;
  bit1: Signal TWL reset&lt;br /&gt;
  bit2: Signal TWL power off&lt;br /&gt;
  bit3: Signal TWL battery low&lt;br /&gt;
  bit4: Signal TWL battery empty&lt;br /&gt;
  bit5: Signal TWL volume button click&lt;br /&gt;
|-&lt;br /&gt;
| 0x22&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| Used to turn on or turn off LCD-related boost circuits. Bits 5:2 can be read back so see whether backlight setting is in progress or not, however bits 1:0 get cleared as soon as the request gets acknowledged.&lt;br /&gt;
  bit0: LCD panel voltage off&lt;br /&gt;
  bit1: LCD panel voltage on&lt;br /&gt;
  bit2: Bottom screen backlight off&lt;br /&gt;
  bit3: Bottom screen backlight on&lt;br /&gt;
  bit4: Top screen backlight off&lt;br /&gt;
  bit5: Top screen backlight on&lt;br /&gt;
&lt;br /&gt;
Bits 4 and 5 have no effect on a 2DS because the backlight source is the bottom screen.&lt;br /&gt;
The rest of the bits are masked away.&lt;br /&gt;
|-&lt;br /&gt;
| 0x23&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| Writing 0x72 (&#039;r&#039;) resets the MCU, but this is stubbed on retail?&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Watchdog timer. This must be set *before* the timer is triggered, otherwise the old value is used. Value zero disables the watchdog.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x27&lt;br /&gt;
| sd&lt;br /&gt;
| rw&lt;br /&gt;
| Raw volume slider state&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Brightness of the WiFi/Power LED&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| sd(5)&lt;br /&gt;
| rw&lt;br /&gt;
| Power mode indicator state (read-write)&lt;br /&gt;
  1 = forced default blue&lt;br /&gt;
  2 = sleep mode animation&lt;br /&gt;
  3 = &amp;quot;power off&amp;quot; mode&lt;br /&gt;
  4 = disable blue power LED and turn on red power LED&lt;br /&gt;
  5 = disable red power LED and turn on blue power LED&lt;br /&gt;
  6 = animate blue power LED off and flash red power LED&lt;br /&gt;
  anything else = automatic mode&lt;br /&gt;
The other 4 bytes (32bits) affect the pattern of the red power LED (write only)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| WiFi LED state, non-0 value turns on the WiFi LED, 4 bits wide&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Camera LED state, 4bits wide,&lt;br /&gt;
  0, 3, 6-0xF = off&lt;br /&gt;
  1 = slowly blinking&lt;br /&gt;
  2 = constantly on&lt;br /&gt;
  3 = &amp;quot;TWL&amp;quot; mode&lt;br /&gt;
  4 = flash once&lt;br /&gt;
  5 = delay before changing to 2&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| 3D LED state, 4 bits wide&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| 0x64&lt;br /&gt;
| wo&lt;br /&gt;
| This is used for [[MCURTC:SetInfoLEDPattern|controlling]] the notification LED (see [[MCURTC:SetInfoLEDPatternHeader]] as well), when this register is written. It&#039;s possible to write data here with size less than 0x64, and only that portion of the pattern data will get overwritten. Reading from this register only returns zeroes, so it&#039;s considered write-only. Writing past the size of this register seems to do nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| This [[MCURTC:GetInfoLEDStatus|returns]] the notification LED status when read (1 means new cycle started)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F&lt;br /&gt;
| s&lt;br /&gt;
| wo?&lt;br /&gt;
| ??? The write function for this register is stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
- 0x36&lt;br /&gt;
| ds&lt;br /&gt;
| rw&lt;br /&gt;
| RTC time (system clock). 7 bytes are read from this. The upper nibble of each byte encodes 10s (BCD), so each byte is post-processed with (byte &amp;amp; 0xF) + (10 * (byte &amp;gt;&amp;gt; 4)).&lt;br /&gt;
  byte 0: seconds&lt;br /&gt;
  byte 1: minutes&lt;br /&gt;
  byte 2: hours&lt;br /&gt;
  byte 3: current week (unused)&lt;br /&gt;
  byte 4: days&lt;br /&gt;
  byte 5: months&lt;br /&gt;
  byte 6: years&lt;br /&gt;
|-&lt;br /&gt;
| 0x37&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| RTC time byte 7: leap year counter / &amp;quot;watch error correction&amp;quot; register (unused in code)&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
- 0x3C&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| RTC alarm registers&lt;br /&gt;
  byte 0: minutes&lt;br /&gt;
  byte 1: hours&lt;br /&gt;
  byte 2: day&lt;br /&gt;
  byte 3: month&lt;br /&gt;
  byte 4: year&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Could be used on extremely old MCU_FIRM versions to upload [[MCU_Services#MCU_firmware_versions|MCU firmware]] if reg 0xF == 0 and reg 0x10 == 1 (presumably major and minor version fields for mcufw 0.1 which largely predates factory firm). &lt;br /&gt;
|-&lt;br /&gt;
| 0x3D&lt;br /&gt;
0x3E&lt;br /&gt;
| ds&lt;br /&gt;
| ro&lt;br /&gt;
| RTC tick counter / &amp;quot;ITMC&amp;quot; (when resets to 0 the seconds increase)&lt;br /&gt;
Only reading 0x3D will update the in-RAM value&lt;br /&gt;
|-&lt;br /&gt;
| 0x3F&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| 2 bits&lt;br /&gt;
  bit0: Asserts RESET1 (P0.0 = 0, PM0.0 = 0 (output)) but does NOT deassert it (wtf?). This seems to kill the entire SoC: is it because it doesn&#039;t deassert it, or does it not deassert it because the SoC hangs anyway? This is the pin that controls some security-critical regs like CFG9_BOOTENV!&lt;br /&gt;
  bit1: turns on a prohibited bit in an RTC Control register and turns P12 into an output&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Tilt sensor sampling mode. Bits 0 and 1 control the mode. If bits 0 or 1 are set then the tilt sensor is enabled and sampled.&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Index selector for register 0x44&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused???, accelometer related&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ???, pedoometer related(?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
- 0x4A&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Tilt sensor 3D rotation from the 12bit ADC, left shifted 4 to fit in a 16bit signed short, relative to the 3DS bottom screen&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  AXIS&lt;br /&gt;
!  V=0x00&lt;br /&gt;
!  V=0x40&lt;br /&gt;
!  V=0xC0 &lt;br /&gt;
|-&lt;br /&gt;
| X (left/right)&lt;br /&gt;
| held up vertically&lt;br /&gt;
| rotated left 90° like a steering wheel&lt;br /&gt;
| rotated right 90° like a steering wheel&lt;br /&gt;
|-&lt;br /&gt;
| Y (forwards/backwards)&lt;br /&gt;
| laid flat on the desk with the screen facing up&lt;br /&gt;
| held up vertically&lt;br /&gt;
| held up vertically with screen facing upside-down&lt;br /&gt;
|-&lt;br /&gt;
| Z (???)&lt;br /&gt;
| ???&lt;br /&gt;
| ???&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| PedometerStepCount (for the current day)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
0x4D&lt;br /&gt;
| ??&lt;br /&gt;
| ??&lt;br /&gt;
| ??&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| d&lt;br /&gt;
| rw&lt;br /&gt;
| ??? this = (0xFFE9E &amp;amp; 1) ? 0x10 : 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| d(6)&lt;br /&gt;
| ro&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
- 0x57&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Register-mapped ADC register&lt;br /&gt;
DSP volume slider 0% volume offset (setting this to 0xFF will esentially mute the DSP as it&#039;s the volume slider&#039;s maximum raw value)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Register-mapped ADC register&lt;br /&gt;
DSP volume slider 100% volume offset (setting both this and the above to 0 will disable the volume slider with 100% volume, setting this to a lower value than the above will make the volume slider have only 2 states; on and off)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| s&lt;br /&gt;
| ro/rw&lt;br /&gt;
| Invalid, do not use! On newer MCU_FIRM versions this is unused, but on older MCU_FIRM versions this is a read-only counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
- 0x5F&lt;br /&gt;
| s&lt;br /&gt;
| - &lt;br /&gt;
| These registers are out of bounds (0xFFC00 and up), they don&#039;t exist, writing is no-op, reading will yield FFs.&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| d&lt;br /&gt;
| rw&lt;br /&gt;
| Free register bank address (index) select&lt;br /&gt;
Selects the index to read from in the free register bank, up to 200. Used in conjunction with reg 0x61.&lt;br /&gt;
&lt;br /&gt;
  byte 0: bit0 = &amp;quot;WirelessDisabled&amp;quot;, bit1 = &amp;quot;SoftwareClosed&amp;quot;, bit2 = &amp;quot;PowerOffInitiated&amp;quot;, bit3 = &amp;quot;LgyNativeResolution&amp;quot;, bit4 = &amp;quot;LegacyJumpProhibited&amp;quot;&lt;br /&gt;
  byte 1: Legacy LCD data&lt;br /&gt;
  bytes 2 and 3: Local Friend Code counter&lt;br /&gt;
  bytes 4 and 5: UUID clock sequence&lt;br /&gt;
  bytes 6 and 7: Unused&lt;br /&gt;
  bytes 8 to 175: Playtime data for legacy titles&lt;br /&gt;
  bytes 176 to 188: Temporary playtime data in case console doesn&#039;t shut down gracefully, updated every 5 minutes&lt;br /&gt;
  bytes 188 to 199: Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x61&lt;br /&gt;
| d(200)&lt;br /&gt;
| rw&lt;br /&gt;
| Free register bank, data is read from/written to here.&lt;br /&gt;
&lt;br /&gt;
Accessing N bytes of this register increments the selected index by N.&lt;br /&gt;
|-&lt;br /&gt;
| 0x62 - 0x7E&lt;br /&gt;
| s&lt;br /&gt;
| -&lt;br /&gt;
| These registers don&#039;t exist, writing is no-op, reading will yield FFs.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7F&lt;br /&gt;
| d(9-0x13)&lt;br /&gt;
| ro&lt;br /&gt;
| Various system state information (debug pointer table)&lt;br /&gt;
  byte 0x00: Console type, see [[Configuration_Memory#MCU_HW_INFO|here]]&lt;br /&gt;
  byte 0x01: PMIC vendor code&lt;br /&gt;
  byte 0x02: Battery vendor code&lt;br /&gt;
  byte 0x03: MGIC version (major?)&lt;br /&gt;
  byte 0x04: MGIC version (minor?)&lt;br /&gt;
  byte 0x05: RCOMP(?)&lt;br /&gt;
  byte 0x06: battery related? (seems to decrease while charging and increase while discharging)&lt;br /&gt;
  byte 0x09: system model (see [[Cfg:GetSystemModel#System_Model_Values|Cfg:GetSystemModel]] for values)&lt;br /&gt;
  byte 0x0A: Red Power LED mode (0 = off, 1 = on)&lt;br /&gt;
  byte 0x0B: Blue Power LED intensity  (0x00 - 0xFF)&lt;br /&gt;
  byte 0x0D: RGB LED red intensity&lt;br /&gt;
  byte 0x0E: RGB LED green intensity&lt;br /&gt;
  byte 0x0F: RGB LED blue intensity&lt;br /&gt;
  byte 0x11: WiFi LED brightness&lt;br /&gt;
  byte 0x12: raw button states?&lt;br /&gt;
    bit0: unset while Power button is held&lt;br /&gt;
    bit1: unset while HOME button is held&lt;br /&gt;
    bit2: unset while WiFi slider is held&lt;br /&gt;
    bit5: unset while the charging LED is active&lt;br /&gt;
    bit6: unset while charger is plugged in&lt;br /&gt;
&lt;br /&gt;
On MCU_FIRM major version 1 the size of this is 9, reading past the 9th byte will yield AA instead of FF.&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
- 0xFF&lt;br /&gt;
| s&lt;br /&gt;
| -&lt;br /&gt;
| These registers don&#039;t exist, writing is no-op, reading will yield FFs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Shared register: the letter &amp;quot;s&amp;quot;  means that the given register is in a &amp;quot;shared register pool&amp;quot;, meaning the resgister is in the register pool in RAM at address &amp;lt;code&amp;gt;0xFFBA4 + registernumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Dynamic register: these registers aren&#039;t in the shared pool, they just &amp;quot;pretend&amp;quot; to be there. These registers often don&#039;t retain their set value, change rapidly, or control various hardware.&lt;br /&gt;
&lt;br /&gt;
Non-shared (dynamic) register: it&#039;s a register whose contents separate from the shared register pool. Messing with these registers will not affect the shared register pool at all.&lt;br /&gt;
&lt;br /&gt;
On old versions of MCU_FIRM none of the invalid registers are masked away by the read handler function, but are still read-only. Newer MCU_FIRM versions return the hardcoded value FF instead.&lt;br /&gt;
&lt;br /&gt;
== Device 5 &amp;amp; 6 ==&lt;br /&gt;
These are the chip-on-glass display controllers, also known as I2CLCD.&lt;br /&gt;
&lt;br /&gt;
=== Shared registers ===&lt;br /&gt;
These registers are the same across all known I2CLCD controllers (except Controller ID 0x00).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Display enable&lt;br /&gt;
| 0x11&lt;br /&gt;
| Values:&lt;br /&gt;
&lt;br /&gt;
  - 0x00 - screen off, slow burn-in&lt;br /&gt;
  - 0x01 - screen off, fast burn-in&lt;br /&gt;
  - 0x10 - screen on, color input used&lt;br /&gt;
  - 0x11 - screen on, color input not used, High-Z (display turns black or white depending on interface config)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| Read address&lt;br /&gt;
| &lt;br /&gt;
| Write to this register to set the read address.&lt;br /&gt;
&lt;br /&gt;
Reading from I2CLCD is non-standard. When you read, it returns pairs of the currently read address, and then the data byte at that address. The read address auto-increments.&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| Checksum? trigger&lt;br /&gt;
| 0x01&lt;br /&gt;
| When transitioning bit0 from 0 to 1, it seems to trigger some sort of checksum calcuation. Broken on controller 0x01, where it&#039;s oneshot.&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| ???&lt;br /&gt;
| 0x03 (all) /&lt;br /&gt;
0x07 (2DS)&lt;br /&gt;
| Unknown. When toggling 0x54 bit0 from 0 to 1, this register gets changed to 0x01 (all) / 0x05 (2DS).&lt;br /&gt;
&lt;br /&gt;
This register is sometimes seen with a value of 0x02 at initialization time on the top screen.&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| Checksum?&lt;br /&gt;
| &lt;br /&gt;
| Unknown. Read-writable with no effect (old3DS) / read-only (all).&lt;br /&gt;
&lt;br /&gt;
A random value is written here when 0x54 bit0 is changed from 0 to 1. Constantly updates with a seemingly random value, except on Controller ID 0x01, where it&#039;s oneshot/bugged.&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| ???&lt;br /&gt;
| 0x01&lt;br /&gt;
| Unknown. 0x00 is written here during init. Seems to have no effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x61&lt;br /&gt;
| Register checksum&lt;br /&gt;
| &lt;br /&gt;
| Some - but not all - register values are combined using an unknown algorithm into this register.  &lt;br /&gt;
It&#039;s unknown which registers influence this value, as some registers which influence this value are read-only.&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| ???&lt;br /&gt;
| 0x01&lt;br /&gt;
| Unknown, does nothing on known controllers. During init, gsp waits for this to become 0x01.&lt;br /&gt;
|-&lt;br /&gt;
| 0xFE&lt;br /&gt;
| ???&lt;br /&gt;
| &lt;br /&gt;
| Unknown, does nothing. 0xAA is written here during init.&lt;br /&gt;
|-&lt;br /&gt;
| 0xFF&lt;br /&gt;
| Controller ID&lt;br /&gt;
| &lt;br /&gt;
| Upper 4bits is manufacturer. Lower 4bits is unknown, most likely revision, possibly encoded as a Johnson counter. The fields are encoded this way, most likely for the register checksum feature.&lt;br /&gt;
&lt;br /&gt;
Manufacturers:&lt;br /&gt;
  - 0x0 - SHARP (LTPS(?) TN), old I2CLCD, found in old3DS (non-XL) only&lt;br /&gt;
  - 0x1 - JDI (LTPS IPS), found in select new3DS and new3DSXL consoles&lt;br /&gt;
  - 0xC - SHARP (LTPS(?) TN), new I2CLCD&lt;br /&gt;
  - 0xE - SHARP (TFT), found in 2DS only&lt;br /&gt;
&lt;br /&gt;
Known IDs:&lt;br /&gt;
  - 0xC7 - new3DS, new3DSXL, new2DSXL, and some select newer old3DSXL&lt;br /&gt;
  - 0xC3 - older old3DSXL&lt;br /&gt;
  - 0xE1 - 2DS&lt;br /&gt;
    - LQ050B1LW10B&lt;br /&gt;
      - LQ = normal TFT&lt;br /&gt;
      - 050 = panel 5 inches diagonal&lt;br /&gt;
      - B = &amp;quot;other&amp;quot; display format&lt;br /&gt;
      - 1 = transmissive (backlight-compatible)&lt;br /&gt;
      - L = LVDS&lt;br /&gt;
      - W = *unknown coating type*&lt;br /&gt;
      - 10 = model number&lt;br /&gt;
      - B = *unknown suffix*&lt;br /&gt;
  - 0x10 - some select new3DS and new3DSXL with IPS screens&lt;br /&gt;
  - 0x01 - old3DS&lt;br /&gt;
    - LS035T7LE38P (top screen)&lt;br /&gt;
      - LS = TFT (LTPS or SI-TFT ?)&lt;br /&gt;
      - 035 = panel 3.5 inches diagonal&lt;br /&gt;
      - T = &amp;quot;other 16:9&amp;quot; (even though the panel is 16:10 in physical size, or 32:10 in terms of pixel count)&lt;br /&gt;
      - 7 = *unknown backing type*&lt;br /&gt;
      - L = LVDS&lt;br /&gt;
      - E = *unknown coating type*&lt;br /&gt;
      - 38 = model number&lt;br /&gt;
      - P = *unknow suffix*&lt;br /&gt;
    - LS030Q7DW48P (bottom screen)&lt;br /&gt;
      - LS = TFT (LTPS or SI-TFT ?)&lt;br /&gt;
      - 030 = panel 3 inches diagonal&lt;br /&gt;
      - Q = QVGA (320x240)&lt;br /&gt;
      - 7 = *unknown backing type*&lt;br /&gt;
      - D = parallel RGB (unspecified, but it&#039;s known to be RGB888 for this display)&lt;br /&gt;
      - W = *unknown coating type*&lt;br /&gt;
      - 48 = model number&lt;br /&gt;
      - P = *unknow suffix*&lt;br /&gt;
  - 0x00 - no controller, or dead (I2CLCD always ACKs reads, but returns 00 if dead)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0x00 ===&lt;br /&gt;
This Controller ID is fully unknown, and the only reason we know about its existance is due to gsp having special handling code for it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| ???&lt;br /&gt;
| &lt;br /&gt;
| Unknown. Write 0x10 to initialize.&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| ???&lt;br /&gt;
| &lt;br /&gt;
| Unknown. Write 0x01 to initialize.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0x01 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Interface config&lt;br /&gt;
| 0xF7&lt;br /&gt;
| Regonfigures the input pins and pin behavior of the controller.&lt;br /&gt;
&lt;br /&gt;
 bit0 - color value invert (D = ~D, or D = 255 - D)&lt;br /&gt;
 bit1 - color format remap (D7:D2 &amp;lt;-- D5:D0, that is left shift color data by 2)&lt;br /&gt;
 bit2 - ???&lt;br /&gt;
 bit4 - ???&lt;br /&gt;
 bit5 - ???&lt;br /&gt;
 bit6 - ???&lt;br /&gt;
 bit7 - DS-style undriven screen (it will be white instead of black, see shared register 0x01)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Image config&lt;br /&gt;
| 0x7F&lt;br /&gt;
| Image filters and pixel clock control.&lt;br /&gt;
&lt;br /&gt;
 bit0 - Horizontal Flip (scan from right to left)&lt;br /&gt;
 bit1 - red-blue swap&lt;br /&gt;
 bit2 - ???&lt;br /&gt;
 bit3 - ???&lt;br /&gt;
 bit4 - ???&lt;br /&gt;
 bit5 - ???&lt;br /&gt;
 bit6 - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| ???&lt;br /&gt;
| 0x0F&lt;br /&gt;
| Unknown, bit0 enables registers 0x12 to 0x19 to control some analog timing controls to the display panel itself.&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| ???&lt;br /&gt;
| 0x11&lt;br /&gt;
| Unknown. Has no effect on bottom screen. On the top screen, bit4 blanks out the display (LVDS disable?).&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| ???&lt;br /&gt;
| 0x73&lt;br /&gt;
| Unknown. While other bits seem to have no effect, bit0 kills the controller until a power cycle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0xC3 ===&lt;br /&gt;
Basically the same as Controller ID 0xC7.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0xC7 ===&lt;br /&gt;
This is the most common non-old3DS display controller. Quite overclockable.&lt;br /&gt;
&lt;br /&gt;
Note: on the 0xC7 controller unlocking the factory controls at register 0x03 glitches out most of the standard controls (like registers 0x50 to 0x56), so use with caution.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Factory key 2&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock a second set of factory controls.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAF&lt;br /&gt;
| Factory key&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock factory controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Factory mode registers for unlock register 0x03:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Image control?&lt;br /&gt;
| 0xD7&lt;br /&gt;
| Most bits are unknown.&lt;br /&gt;
&lt;br /&gt;
 bit0 - color invert&lt;br /&gt;
 bit1 - slight gamma increase&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Image transform?&lt;br /&gt;
| 0x7F&lt;br /&gt;
| Mostly unknown.&lt;br /&gt;
 bit0 - Invert horizontal scan direction (0 = left to right, 1 = right to left)&lt;br /&gt;
 bit1 - red-blue swap&lt;br /&gt;
 bit2 - Invert vertical scan direction (0 = top to bottom, 1 = bottom to top)&lt;br /&gt;
 bit3 - Invert the order of each scanline pair (might be needed if bit2 is toggled)&lt;br /&gt;
 bit4 - Enable interlaced signal (use bit3 to swap fields)&lt;br /&gt;
 bit5 - ???&lt;br /&gt;
 bit6 - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x70-0x83&lt;br /&gt;
| Color curve red&lt;br /&gt;
| rowspan=3 | &lt;br /&gt;
| rowspan=3 | These registers are used for fine-tuning the analog driving curve of the screen&lt;br /&gt;
&lt;br /&gt;
Positive:&lt;br /&gt;
 - byte 00 (0xFF) - ???&lt;br /&gt;
 - byte 01 (0xFF) - ???&lt;br /&gt;
 - byte 02 (0x3F) - ???&lt;br /&gt;
 - byte 03 (0x3F) - ???&lt;br /&gt;
 - byte 04 (0x3F) - ???&lt;br /&gt;
 - byte 05 (0x3F) - ???&lt;br /&gt;
 - byte 06 (0x3F) - ???&lt;br /&gt;
 - byte 07 (0x3F) - ???&lt;br /&gt;
 - byte 08 (0x3F) - ???&lt;br /&gt;
 - byte 09 (0x3F) - ???&lt;br /&gt;
 &lt;br /&gt;
Negative:&lt;br /&gt;
 - byte 10 (0xFF) - ???&lt;br /&gt;
 - byte 11 (0xFF) - ???&lt;br /&gt;
 - byte 12 (0x3F) - ???&lt;br /&gt;
 - byte 13 (0x3F) - ???&lt;br /&gt;
 - byte 14 (0x3F) - ???&lt;br /&gt;
 - byte 15 (0x3F) - ???&lt;br /&gt;
 - byte 16 (0x3F) - ???&lt;br /&gt;
 - byte 17 (0x3F) - ???&lt;br /&gt;
 - byte 18 (0x3F) - ???&lt;br /&gt;
 - byte 19 (0x3F) - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x84-0x97&lt;br /&gt;
| Color curve green&lt;br /&gt;
|-&lt;br /&gt;
| 0x98-0xAB&lt;br /&gt;
| Color curve blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0xE1 ===&lt;br /&gt;
This controller is designed to drive a split panel. As such, the factory controls have been slightly altered to accomodate this.&lt;br /&gt;
&lt;br /&gt;
This is the only I2CLCD which responds on both I2CLCD addresses. The dominant screen is the bottom one.&lt;br /&gt;
&lt;br /&gt;
Most registers are similar to controller 0xC7, but there are some differences due to the split shared panel nature.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Factory key 2&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock a 2nd set of factory controls.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAF&lt;br /&gt;
| Factory key&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock factory controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Factory mode registers for unlock register 0x03:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Image control?&lt;br /&gt;
| 0xD7&lt;br /&gt;
| Most bits are unknown. This applies to the whole display panel.&lt;br /&gt;
&lt;br /&gt;
 bit0 - color invert&lt;br /&gt;
 bit1 - slight gamma increase&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Image transform&lt;br /&gt;
| 0x33&lt;br /&gt;
| &lt;br /&gt;
 bit0 - top half horizontal flip&lt;br /&gt;
 bit1 - top half red-blue swap&lt;br /&gt;
 bit4 - bottom half horizontal flip&lt;br /&gt;
 bit5 - bottom half red-blue swap&lt;br /&gt;
|-&lt;br /&gt;
| 0x70-0x83&lt;br /&gt;
| Analog curve top&lt;br /&gt;
| rowspan=2 | &lt;br /&gt;
| rowspan=2 | Consists of two unknown curve values. Seems to be nonstandard.&lt;br /&gt;
&lt;br /&gt;
Pair 1:&lt;br /&gt;
 byte 00 (0xFF) - ???&lt;br /&gt;
 byte 01 (0xFF) - ???&lt;br /&gt;
 byte 02 (0xFF) - ???&lt;br /&gt;
 byte 03 (0xFF) - ???&lt;br /&gt;
 byte 04 (0x3F) - ???&lt;br /&gt;
 byte 05 (0x3F) - ???&lt;br /&gt;
 byte 06 (0x3F) - ???&lt;br /&gt;
 byte 07 (0x3F) - ???&lt;br /&gt;
 byte 08 (0x3F) - ???&lt;br /&gt;
 byte 09 (0x3F) - ???&lt;br /&gt;
&lt;br /&gt;
Part 2:&lt;br /&gt;
 byte 10 (0xFF) - ???&lt;br /&gt;
 byte 11 (0xFF) - ???&lt;br /&gt;
 byte 12 (0xFF) - ???&lt;br /&gt;
 byte 13 (0xFF) - ???&lt;br /&gt;
 byte 14 (0x3F) - ???&lt;br /&gt;
 byte 15 (0x3F) - ???&lt;br /&gt;
 byte 16 (0x3F) - ???&lt;br /&gt;
 byte 17 (0x3F) - ???&lt;br /&gt;
 byte 18 (0x3F) - ???&lt;br /&gt;
 byte 19 (0x3F) - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x84-0x97&lt;br /&gt;
| Analog curve bottom&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0x10 ===&lt;br /&gt;
JDI IPS controller.&lt;br /&gt;
&lt;br /&gt;
Warning: on the JDI controller, unlocking any of the factory mode registers overshadows some other registers, so don&#039;t write to &amp;quot;standard&amp;quot; locations (other than register 0x40) before locking factory mode back!&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Factory key 2&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock advanced IPS curve controls.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAF&lt;br /&gt;
| Factory key&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock factory controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Factory mode registers unlocked by register 0xAF:&lt;br /&gt;
* 0x41 - 0x4F&lt;br /&gt;
* 0x58 - 0x5F&lt;br /&gt;
* 0x67 - 0x6F&lt;br /&gt;
* 0xD0 - 0xEF&lt;br /&gt;
* unknown...&lt;br /&gt;
&lt;br /&gt;
Factory mode registers unlocked by register 0x03:&lt;br /&gt;
* 0x04 - 0x0F&lt;br /&gt;
* unknown...&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x70-0x7F&lt;br /&gt;
| Driving curve 1-1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x80-0x8F&lt;br /&gt;
| Driving curve 1-2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x90-0x9F&lt;br /&gt;
| Driving curve 2-1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0xA0-0xAF&lt;br /&gt;
| Driving curve 2-2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0xB0-0xBF&lt;br /&gt;
| Driving curve 3-1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0xC0-0xCF&lt;br /&gt;
| Driving curve 3-2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Device 10 ==&lt;br /&gt;
See the datasheet linked to on the [[Hardware]] page for reference.&lt;br /&gt;
&lt;br /&gt;
== Device 11 ==&lt;br /&gt;
See the datasheet linked to on the [[Hardware]] page for reference.&lt;br /&gt;
&lt;br /&gt;
== Device 12 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  REGISTER&lt;br /&gt;
!  WIDTH&lt;br /&gt;
!  DESCRIPTION &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 21&lt;br /&gt;
| DebugPad state.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a [https://wiibrew.org/wiki/Wiimote/Extension_Controllers/Classic_Controller_Pro Wii Classic Controller Pro] which was slightly modified to have an encrypted device type of 0xF0 [https://wiibrew.org/wiki/Wiimote/Extension_Controllers#The_New_Way instead of 0xFD].&lt;br /&gt;
&lt;br /&gt;
See [[HID_Shared_Memory#Offset_0x238|here]] for the HID shared memory report format.&lt;br /&gt;
&lt;br /&gt;
== Device 13 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Raw I2C register address&lt;br /&gt;
!  Internal register address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x40&lt;br /&gt;
| RHR / THR (data receive/send FIFO)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| IER&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| FCR/IIR&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| LCR&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| MCR&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x1&lt;br /&gt;
| LSR&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| MSR/TCR&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| SPR/TLR&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| TXLVL&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| RXLVL&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x1&lt;br /&gt;
| IODir&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x1&lt;br /&gt;
| IOState&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x1&lt;br /&gt;
| IoIntEna&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x1&lt;br /&gt;
| reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| 0xE&lt;br /&gt;
| 0x1&lt;br /&gt;
| IOControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x78&lt;br /&gt;
| 0xF&lt;br /&gt;
| 0x1&lt;br /&gt;
| EFCR&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See the [http://www.alldatasheet.net/datasheet-pdf/pdf/347838/NXP/SC16IS750IBS.html datasheet] linked to on the [[Hardware]] page for reference. From that datasheet, for the structure of the I2C register address u8: &amp;quot;Bit 0 is not used, bits 2:1 select the channel, bits 6:3 select one of the UART internal registers. Bit 7 is not used with the I2C-bus interface, but it is used by the SPI interface to indicate a read or a write operation.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Device 14 ==&lt;br /&gt;
&lt;br /&gt;
Used by [[Config_Services|Cfg]]-sysmodule via the i2c::EEP service. This is presumably EEPROM going by the service name.&lt;br /&gt;
&lt;br /&gt;
The Cfg-module code which loads the [[Flash_Filesystem|CCAL]](nandro:/sys/{HWCAL0.dat/HWCAL1.dat}) file from NAND will load it from I2C instead, if a certain state flag is non-zero. Likewise for the function which writes CCAL to NAND. HMAC/hash verification after loading is skipped when the CCAL was loaded from I2C.&lt;br /&gt;
&lt;br /&gt;
== Device 15 ==&lt;br /&gt;
This the New3DS [[NFC_Services|NFC]] controller &amp;quot;I2C&amp;quot; interface. This device is accessed via the WriteDeviceRaw/ReadDeviceRaw I2C service [[I2C_Services|commands]].&lt;br /&gt;
&lt;br /&gt;
Since the *Raw commands are used with this, this device has no I2C registers. Instead, raw data is transfered after the I2C device is selected. Hence, WriteDeviceRaw is used for sending commands to the controller, while ReadDeviceRaw is for receiving responses from the controller. Certain commands may return multiple command responses.&lt;br /&gt;
&lt;br /&gt;
Command request / response structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Normally 0x10?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Command source / destination.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| CmdID&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Payload size.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Following the above header is the payload data(when payload size is non-zero), with the size specified in the header. The command response payload is usually at least 1-byte, where that byte appears to be normally 0x0. For command requests the payload data is the command parameters.&lt;br /&gt;
&lt;br /&gt;
For command requests sent to the NFC tag itself, Cmd[1]=0x0 and CmdID=0x0. The command request payload data here is the actual command request data for the NFC tag, starting with the CmdID u8 at payload+0.&lt;br /&gt;
&lt;br /&gt;
During NFC module startup, a certain command is sent to the controller which eventually(after various cmd-reply headers etc) returns the following the payload after the first byte in the payload:&lt;br /&gt;
 000000: 44 65 63 20 32 32 20 32 30 31 32 31 34 3a 35 33  Dec 22 201214:53 &lt;br /&gt;
 000010: 3a 35 30 01 05 0d 46 05 1b 79 20 07 32 30 37 39  :50...F..y .2079&lt;br /&gt;
 000020: 31 42 35                                         1B5&lt;br /&gt;
&lt;br /&gt;
Or that is: &amp;quot;Dec 22 201214:53:50&amp;lt;binary&amp;gt;20791B5&amp;quot;. Therefore, this appears to return the part-number of the NFC controller(other command request(s) / response(s) use this part-number value too).&lt;br /&gt;
&lt;br /&gt;
=== NFC controller commands  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  CmdRequest[1]&lt;br /&gt;
!  CmdID&lt;br /&gt;
!  Payload data for parameters&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| 0x2F&lt;br /&gt;
| Firmware image for this chunk, size varies.&lt;br /&gt;
| This is used during NFC module startup to upload the firmware image to the NFC controller. This is used repeatedly to upload multiple chunks of the image.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Device 17 ==&lt;br /&gt;
&lt;br /&gt;
(Stub)&lt;br /&gt;
&lt;br /&gt;
Used by New 3DS for ZL, ZR, C stick&lt;br /&gt;
&lt;br /&gt;
This device do not use registers. After writing the address, read the next several bytes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Fixed 0x80&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Buttons (ZL = 0x4, ZR = 0x2)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=I2C_Registers&amp;diff=22579</id>
		<title>I2C Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=I2C_Registers&amp;diff=22579"/>
		<updated>2024-06-12T17:31:16Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C1_DATA&lt;br /&gt;
| 0x10161000&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#I2C_CNT|I2C1_CNT]]&lt;br /&gt;
| 0x10161001&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C1_CNTEX&lt;br /&gt;
| 0x10161002&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C1_SCL&lt;br /&gt;
| 0x10161004&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 1 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C2_DATA&lt;br /&gt;
| 0x10144000&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#I2C_CNT|I2C2_CNT]]&lt;br /&gt;
| 0x10144001&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C2_CNTEX&lt;br /&gt;
| 0x10144002&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C2_SCL&lt;br /&gt;
| 0x10144004&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 2 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C3_DATA&lt;br /&gt;
| 0x10148000&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#I2C_CNT|I2C3_CNT]]&lt;br /&gt;
| 0x10148001&lt;br /&gt;
| 1&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C3_CNTEX&lt;br /&gt;
| 0x10148002&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| I2C3_SCL&lt;br /&gt;
| 0x10148004&lt;br /&gt;
| 2&lt;br /&gt;
| I2C bus 3 devices&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== I2C_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Stop (0=No, 1=Stop/last byte)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Start (0=No, 1=Start/first byte)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Pause (0=Transfer Data, 1=Pause after Error, used with/after Stop)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Ack Flag         (0=Error, 1=Okay)  (For DataRead: W, for DataWrite: R)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Data Direction   (0=Write, 1=Read)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Interrupt Enable (0=Disable, 1=Enable)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Start/busy       (0=Ready, 1=Start/busy)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== I2C_CNTEX ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| ? Set to 2 normally.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== I2C_SCL ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
| 0-5&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 8-12&lt;br /&gt;
| ? Set to 5 normally.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= I2C Devices =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!   [[I2C_Registers|Device id]]&lt;br /&gt;
!   Device bus id&lt;br /&gt;
!   Device Write Address&lt;br /&gt;
!   Accessible via I2C [[I2C_Services|service]]&lt;br /&gt;
!   Device description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| 0x4a&lt;br /&gt;
| &amp;quot;i2c::MCU&amp;quot;&lt;br /&gt;
| Power management?(same device addr as the DSi power-management)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 0x7a&lt;br /&gt;
| &amp;quot;i2c::CAM&amp;quot;&lt;br /&gt;
| Camera0?(same dev-addr as DSi cam0)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 1&lt;br /&gt;
| 0x78&lt;br /&gt;
| &amp;quot;i2c::CAM&amp;quot;&lt;br /&gt;
| Camera1?(same dev-addr as DSi cam1)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 2&lt;br /&gt;
| 0x4a&lt;br /&gt;
| &amp;quot;i2c::MCU&amp;quot;&lt;br /&gt;
| MCU&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 2&lt;br /&gt;
| 0x78&lt;br /&gt;
| &amp;quot;i2c::CAM&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 2&lt;br /&gt;
| 0x2c&lt;br /&gt;
| &amp;quot;i2c::LCD&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 2&lt;br /&gt;
| 0x2e&lt;br /&gt;
| &amp;quot;i2c::LCD&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 2&lt;br /&gt;
| 0x40&lt;br /&gt;
| &amp;quot;i2c::DEB&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 2&lt;br /&gt;
| 0x44&lt;br /&gt;
| &amp;quot;i2c::DEB&amp;quot;&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 3&lt;br /&gt;
| 0xa6&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| Gyroscope. The device table in I2C-module had the device address changed from 0xA6 to 0xD6 with [[8.0.0-18]].&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 3&lt;br /&gt;
| 0xd0&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| Gyroscope (old3DS)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 3&lt;br /&gt;
| 0xd2&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| Gyroscope (2DS, new3DSXL, new2DSXL)&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| 3&lt;br /&gt;
| 0xa4&lt;br /&gt;
| &amp;quot;i2c::HID&amp;quot;&lt;br /&gt;
| DebugPad (slightly modified [https://wiibrew.org/wiki/Wiimote/Extension_Controllers/Classic_Controller_Pro Wii Classic Controller Pro])&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| 3&lt;br /&gt;
| 0x9a&lt;br /&gt;
| &amp;quot;i2c::IR&amp;quot;&lt;br /&gt;
| IR&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| 3&lt;br /&gt;
| 0xa0&lt;br /&gt;
| &amp;quot;i2c::EEP&amp;quot;&lt;br /&gt;
| HWCAL EEPROM ([[Hardware_calibration#Header|only present on dev units where SHA256 is used for HWCAL verification]])&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 2&lt;br /&gt;
| 0xee&lt;br /&gt;
| &amp;quot;i2c::NFC&amp;quot;&lt;br /&gt;
| New3DS-only [[NFC_Services|NFC]]&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| 1&lt;br /&gt;
| 0x40&lt;br /&gt;
| &amp;quot;i2c::QTM&amp;quot;&lt;br /&gt;
| New3DS-only [[QTM_Services|QTM]]&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| 3&lt;br /&gt;
| 0x54&lt;br /&gt;
| &amp;quot;i2c::IR&amp;quot;&lt;br /&gt;
| Used by IR-module starting with [[8.0.0-18]], for New3DS-only HID via &amp;quot;ir:rst&amp;quot;. This deviceid doesn&#039;t seem to be supported by i2c module on [[8.0.0-18]](actual support was later added in New3DS i2c module).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Notice&#039;&#039;&#039;: These device addresses are used for writing to the respective device, for reading bit0 must be set (see I2C protocol). Thus, the actual device address is &amp;gt;&amp;gt; 1.&lt;br /&gt;
&lt;br /&gt;
== Device 3 ==&lt;br /&gt;
  ro = read-only (writing is no-op)&lt;br /&gt;
  rw = read-write&lt;br /&gt;
  wo = write-only (reading will yield 00, FF, or unpredictable data)&lt;br /&gt;
&lt;br /&gt;
  d* = dynamic register (explaination below this table)&lt;br /&gt;
  s* = shared register (explaination below this table)&lt;br /&gt;
  ds = dynamic shared (explaination below this table)&lt;br /&gt;
&lt;br /&gt;
Reading or writing multiple bytes from/to single-byte registers increments the register ID along with it. For example reading two bytes from reg 0x00 reads regs 0x00 and 0x01.&lt;br /&gt;
&lt;br /&gt;
This is not the case for multibyte regs (0x29, 0x2D, 0x4F, 0x61 and 0x7F), plus reg 0x60.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  REGISTER&lt;br /&gt;
!  WIDTH&lt;br /&gt;
!  INFO&lt;br /&gt;
!  DESCRIPTION &lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Version high&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Version low&lt;br /&gt;
|-&lt;br /&gt;
| 0x02&lt;br /&gt;
| d&lt;br /&gt;
| rw&lt;br /&gt;
| For bit0 and 1 values, writing will mask away/&amp;quot;acknowledge&amp;quot; the event, set to 3 by mcuMainLoop on reset if reset source is Watchdog&lt;br /&gt;
  bit0: RTC clock value got reset to defaults&lt;br /&gt;
  bit1: Watchdog reset happened&lt;br /&gt;
  bit5: TWL MCU reg: volume mode (0: 8-step, 1: 32-step)&lt;br /&gt;
  bit6: TWL MCU reg: NTR (0) vs TWL mode (1)&lt;br /&gt;
  bit7: TWL MCU reg: Uses NAND&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| ds&lt;br /&gt;
| rw&lt;br /&gt;
| Top screen Vcom&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| ds&lt;br /&gt;
| rw&lt;br /&gt;
| Bottom screen Vcom&lt;br /&gt;
|-&lt;br /&gt;
| 0x05&lt;br /&gt;
- 0x07&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Danger zone - [[MCU_Services#MCU_firmware_versions|MCU unlock sequence]] is written here.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Raw 3D slider position&lt;br /&gt;
|-&lt;br /&gt;
| 0x09&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Volume slider state (0x00 - 0x3F)&lt;br /&gt;
This is the same value returned by [[MCUHWC:GetSoundVolume|MCUHWC:GetSoundVolume]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Battery temperature (in Celcius?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Battery percentage&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Battery percentage, fractional part (seems to have a resolution of around 0.1% according to tests)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| System voltage&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Flags: bit7-5 are read via [[MCU_Services|mcu::GPU]]. The rest of them are read via [[MCU_Services|mcu::RTC]].&lt;br /&gt;
  bit1: ShellState&lt;br /&gt;
  bit3: AdapterState&lt;br /&gt;
  bit4: BatteryChargeState&lt;br /&gt;
  bit5: Bottom screen backlight on&lt;br /&gt;
  bit6: Top screen backlight on&lt;br /&gt;
  bit7: LCD panel voltage on&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
- 0x13&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Received interrupt bitmask, see register 0x18 for possible values  &lt;br /&gt;
If no interrupt was received this register is 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Unused and unwritable byte :(&lt;br /&gt;
|-&lt;br /&gt;
| 0x15&lt;br /&gt;
- 0x17&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused and unreferenced free RAM! Good for userdata.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
- 0x1B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Interrupt mask for register 0x10 (0=enabled,1=disabled)&lt;br /&gt;
  bit00: Power button press (for 27 &amp;quot;ticks&amp;quot;)&lt;br /&gt;
  bit01: Power button held (for 375 &amp;quot;ticks&amp;quot;; the 3DS turns off regardless after a fixed time)&lt;br /&gt;
  bit02: HOME button press (for 5 &amp;quot;ticks&amp;quot;)&lt;br /&gt;
  bit03: HOME button release&lt;br /&gt;
  bit04: WiFi switch button&lt;br /&gt;
  bit05: Shell close&lt;br /&gt;
  bit06: Shell open&lt;br /&gt;
  bit07: Fatal hardware condition([[Services#Notifications|?]]) (sent when the MCU gets reset by the Watchdog timer)&lt;br /&gt;
  bit08: Charger removed&lt;br /&gt;
  bit09: Charger plugged in&lt;br /&gt;
  bit10: RTC alarm (when some conditions are met it&#039;s sent when the current day and month and year matches the current RTC time)&lt;br /&gt;
  bit11: Accelerometer I2C read/write done [https://github.com/profi200/libn3ds/blob/083c8ffa3f56a49802fa74b6afe45a96820f0439/include/arm11/drivers/mcu_regmap.h#L124]&lt;br /&gt;
  bit12: HID update&lt;br /&gt;
  bit13: Battery percentage status change (triggered at 10%, 5%, and 0% while discharging)&lt;br /&gt;
  bit14: Battery stopped charging (independent of charger state)&lt;br /&gt;
  bit15: Battery started charging&lt;br /&gt;
Nonmaskable(?) interrupts&lt;br /&gt;
  bit16: ???&lt;br /&gt;
  bit17: ??? (opposite even for bit16)&lt;br /&gt;
  bit22: Volume slider position change&lt;br /&gt;
  bit23: ??? Register 0x0E update&lt;br /&gt;
  bit24: GPU off&lt;br /&gt;
  bit25: GPU on&lt;br /&gt;
  bit26: bottom backlight off&lt;br /&gt;
  bit27: bottom backlight on&lt;br /&gt;
  bit28: top backlight off&lt;br /&gt;
  bit29: top backlight on&lt;br /&gt;
  bit30: bit set by mcu sysmodule&lt;br /&gt;
  bit31: bit set by mcu sysmodule&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
- 0x1F&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused and unreferenced free RAM! Good for userdata.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| System power control:&lt;br /&gt;
  bit0: power off&lt;br /&gt;
  bit1: full reboot (unused). Discards things like [[CONFIG9_Registers#CFG9_BOOTENV|CFG9_BOOTENV]]&lt;br /&gt;
    - Asserts RESET1 via PMIC command (?) (deasserts nRESET1). This could be the reset that controls some CFG9 registers&lt;br /&gt;
    - Asserts RESET2 (P0.1 = 0, PM0.1 = 0 (output)) (deasserts nRESET2)&lt;br /&gt;
    - Asserts FCRAM_RESET (P3.0 = 0) (deasserts nFCRAM_RESET)&lt;br /&gt;
  bit2: normal reboot. Preserves [[CONFIG9_Registers#CFG9_BOOTENV|CFG9_BOOTENV]], etc.&lt;br /&gt;
    - Asserts RESET2 (P0.1 = 0, PM0.1 = 0)&lt;br /&gt;
    - If in NTR emulation mode (see reg 0x02), asserts FCRAM_RESET (P3.0 = 0)&lt;br /&gt;
    - Resets TWL MCU i2c registers&lt;br /&gt;
  bit3: FCRAM reset (present in by LgyBg. Unused because a system reboot does the same thing &amp;amp; a PDN reg also possibly implements this function)&lt;br /&gt;
    - Asserts FCRAM_RESET (P3.0 = 0)&lt;br /&gt;
  bit4: signal that sleep mode is about to be entered (used by PTM)&lt;br /&gt;
Bit 4 sets a bit at a RAM address which seems to control the watcdog timer state, then this bit is immediately unmasked. This field has a bitmask of 0x0F.&lt;br /&gt;
&lt;br /&gt;
If any of the reset bits is set, the MCU waits for 5ms, then deasserts RESET1 (via PMIC), RESET2 (PM0.1 = 1 (input)) and FCRAM_RESET (P3.0 = 1), and reinitializes some other various registers after a 100ms delay.&lt;br /&gt;
|-&lt;br /&gt;
| 0x21&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| Used in legacy mode to signal events for TWL MCU &amp;quot;emulation&amp;quot; (written to REG[0x5D])? Software then asserts the TWL MCU IRQ pin via [[#LGY_GPIOEMU_MASK|Legacy I/O registers]].&lt;br /&gt;
  bit0: Signal TWL POWER button click&lt;br /&gt;
  bit1: Signal TWL reset&lt;br /&gt;
  bit2: Signal TWL power off&lt;br /&gt;
  bit3: Signal TWL battery low&lt;br /&gt;
  bit4: Signal TWL battery empty&lt;br /&gt;
  bit5: Signal TWL volume button click&lt;br /&gt;
|-&lt;br /&gt;
| 0x22&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| Used to turn on or turn off LCD-related boost circuits. Bits 5:2 can be read back so see whether backlight setting is in progress or not, however bits 1:0 get cleared as soon as the request gets acknowledged.&lt;br /&gt;
  bit0: LCD panel voltage off&lt;br /&gt;
  bit1: LCD panel voltage on&lt;br /&gt;
  bit2: Bottom screen backlight off&lt;br /&gt;
  bit3: Bottom screen backlight on&lt;br /&gt;
  bit4: Top screen backlight off&lt;br /&gt;
  bit5: Top screen backlight on&lt;br /&gt;
&lt;br /&gt;
Bits 4 and 5 have no effect on a 2DS because the backlight source is the bottom screen.&lt;br /&gt;
The rest of the bits are masked away.&lt;br /&gt;
|-&lt;br /&gt;
| 0x23&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| Writing 0x72 (&#039;r&#039;) resets the MCU, but this is stubbed on retail?&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Watchdog timer. This must be set *before* the timer is triggered, otherwise the old value is used. Value zero disables the watchdog.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x27&lt;br /&gt;
| sd&lt;br /&gt;
| rw&lt;br /&gt;
| Raw volume slider state&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Brightness of the WiFi/Power LED&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| sd(5)&lt;br /&gt;
| rw&lt;br /&gt;
| Power mode indicator state (read-write)&lt;br /&gt;
  1 = forced default blue&lt;br /&gt;
  2 = sleep mode animation&lt;br /&gt;
  3 = &amp;quot;power off&amp;quot; mode&lt;br /&gt;
  4 = disable blue power LED and turn on red power LED&lt;br /&gt;
  5 = disable red power LED and turn on blue power LED&lt;br /&gt;
  6 = animate blue power LED off and flash red power LED&lt;br /&gt;
  anything else = automatic mode&lt;br /&gt;
The other 4 bytes (32bits) affect the pattern of the red power LED (write only)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| WiFi LED state, non-0 value turns on the WiFi LED, 4 bits wide&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Camera LED state, 4bits wide,&lt;br /&gt;
  0, 3, 6-0xF = off&lt;br /&gt;
  1 = slowly blinking&lt;br /&gt;
  2 = constantly on&lt;br /&gt;
  3 = &amp;quot;TWL&amp;quot; mode&lt;br /&gt;
  4 = flash once&lt;br /&gt;
  5 = delay before changing to 2&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| 3D LED state, 4 bits wide&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| 0x64&lt;br /&gt;
| wo&lt;br /&gt;
| This is used for [[MCURTC:SetInfoLEDPattern|controlling]] the notification LED (see [[MCURTC:SetInfoLEDPatternHeader]] as well), when this register is written. It&#039;s possible to write data here with size less than 0x64, and only that portion of the pattern data will get overwritten. Reading from this register only returns zeroes, so it&#039;s considered write-only. Writing past the size of this register seems to do nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| This [[MCURTC:GetInfoLEDStatus|returns]] the notification LED status when read (1 means new cycle started)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2F&lt;br /&gt;
| s&lt;br /&gt;
| wo?&lt;br /&gt;
| ??? The write function for this register is stubbed.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
- 0x36&lt;br /&gt;
| ds&lt;br /&gt;
| rw&lt;br /&gt;
| RTC time (system clock). 7 bytes are read from this. The upper nibble of each byte encodes 10s (BCD), so each byte is post-processed with (byte &amp;amp; 0xF) + (10 * (byte &amp;gt;&amp;gt; 4)).&lt;br /&gt;
  byte 0: seconds&lt;br /&gt;
  byte 1: minutes&lt;br /&gt;
  byte 2: hours&lt;br /&gt;
  byte 3: current week (unused)&lt;br /&gt;
  byte 4: days&lt;br /&gt;
  byte 5: months&lt;br /&gt;
  byte 6: years&lt;br /&gt;
|-&lt;br /&gt;
| 0x37&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| RTC time byte 7: leap year counter / &amp;quot;watch error correction&amp;quot; register (unused in code)&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
- 0x3C&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| RTC alarm registers&lt;br /&gt;
  byte 0: minutes&lt;br /&gt;
  byte 1: hours&lt;br /&gt;
  byte 2: day&lt;br /&gt;
  byte 3: month&lt;br /&gt;
  byte 4: year&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Could be used on extremely old MCU_FIRM versions to upload [[MCU_Services#MCU_firmware_versions|MCU firmware]] if reg 0xF == 0 and reg 0x10 == 1 (presumably major and minor version fields for mcufw 0.1 which largely predates factory firm). &lt;br /&gt;
|-&lt;br /&gt;
| 0x3D&lt;br /&gt;
0x3E&lt;br /&gt;
| ds&lt;br /&gt;
| ro&lt;br /&gt;
| RTC tick counter / &amp;quot;ITMC&amp;quot; (when resets to 0 the seconds increase)&lt;br /&gt;
Only reading 0x3D will update the in-RAM value&lt;br /&gt;
|-&lt;br /&gt;
| 0x3F&lt;br /&gt;
| d&lt;br /&gt;
| wo&lt;br /&gt;
| 2 bits&lt;br /&gt;
  bit0: Asserts RESET1 (P0.0 = 0, PM0.0 = 0 (output)) but does NOT deassert it (wtf?). This seems to kill the entire SoC: is it because it doesn&#039;t deassert it, or does it not deassert it because the SoC hangs anyway? This is the pin that controls some security-critical regs like CFG9_BOOTENV!&lt;br /&gt;
  bit1: turns on a prohibited bit in an RTC Control register and turns P12 into an output&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Tilt sensor sampling mode. Bits 0 and 1 control the mode. If bits 0 or 1 are set then the tilt sensor is enabled and sampled.&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Index selector for register 0x44&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Unused???, accelometer related&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ???, pedoometer related(?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
- 0x4A&lt;br /&gt;
| s&lt;br /&gt;
| ro&lt;br /&gt;
| Tilt sensor 3D rotation from the 12bit ADC, left shifted 4 to fit in a 16bit signed short, relative to the 3DS bottom screen&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  AXIS&lt;br /&gt;
!  V=0x00&lt;br /&gt;
!  V=0x40&lt;br /&gt;
!  V=0xC0 &lt;br /&gt;
|-&lt;br /&gt;
| X (left/right)&lt;br /&gt;
| held up vertically&lt;br /&gt;
| rotated left 90° like a steering wheel&lt;br /&gt;
| rotated right 90° like a steering wheel&lt;br /&gt;
|-&lt;br /&gt;
| Y (forwards/backwards)&lt;br /&gt;
| laid flat on the desk with the screen facing up&lt;br /&gt;
| held up vertically&lt;br /&gt;
| held up vertically with screen facing upside-down&lt;br /&gt;
|-&lt;br /&gt;
| Z (???)&lt;br /&gt;
| ???&lt;br /&gt;
| ???&lt;br /&gt;
| ???&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| PedometerStepCount (for the current day)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
0x4D&lt;br /&gt;
| ??&lt;br /&gt;
| ??&lt;br /&gt;
| ??&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| d&lt;br /&gt;
| rw&lt;br /&gt;
| ??? this = (0xFFE9E &amp;amp; 1) ? 0x10 : 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| d(6)&lt;br /&gt;
| ro&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
- 0x57&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Register-mapped ADC register&lt;br /&gt;
DSP volume slider 0% volume offset (setting this to 0xFF will esentially mute the DSP as it&#039;s the volume slider&#039;s maximum raw value)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| s&lt;br /&gt;
| rw&lt;br /&gt;
| Register-mapped ADC register&lt;br /&gt;
DSP volume slider 100% volume offset (setting both this and the above to 0 will disable the volume slider with 100% volume, setting this to a lower value than the above will make the volume slider have only 2 states; on and off)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| s&lt;br /&gt;
| ro/rw&lt;br /&gt;
| Invalid, do not use! On newer MCU_FIRM versions this is unused, but on older MCU_FIRM versions this is a read-only counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
- 0x5F&lt;br /&gt;
| s&lt;br /&gt;
| - &lt;br /&gt;
| These registers are out of bounds (0xFFC00 and up), they don&#039;t exist, writing is no-op, reading will yield FFs.&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| d&lt;br /&gt;
| rw&lt;br /&gt;
| Free register bank address (index) select&lt;br /&gt;
Selects the index to read from in the free register bank, up to 200. Used in conjunction with reg 0x61.&lt;br /&gt;
&lt;br /&gt;
  byte 0: bit0 = &amp;quot;WirelessDisabled&amp;quot;, bit1 = &amp;quot;SoftwareClosed&amp;quot;, bit2 = &amp;quot;PowerOffInitiated&amp;quot;, bit3 = &amp;quot;LgyNativeResolution&amp;quot;, bit4 = &amp;quot;LegacyJumpProhibited&amp;quot;&lt;br /&gt;
  byte 1: Legacy LCD data&lt;br /&gt;
  bytes 2 and 3: Local Friend Code counter&lt;br /&gt;
  bytes 4 and 5: UUID clock sequence&lt;br /&gt;
  bytes 6 and 7: Unused&lt;br /&gt;
  bytes 8 to 175: Playtime data for legacy titles&lt;br /&gt;
  bytes 176 to 188: Temporary playtime data in case console doesn&#039;t shut down gracefully, updated every 5 minutes&lt;br /&gt;
  bytes 188 to 199: Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x61&lt;br /&gt;
| d(200)&lt;br /&gt;
| rw&lt;br /&gt;
| Free register bank, data is read from/written to here.&lt;br /&gt;
&lt;br /&gt;
Accessing N bytes of this register increments the selected index by N.&lt;br /&gt;
|-&lt;br /&gt;
| 0x62 - 0x7E&lt;br /&gt;
| s&lt;br /&gt;
| -&lt;br /&gt;
| These registers don&#039;t exist, writing is no-op, reading will yield FFs.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7F&lt;br /&gt;
| d(9-0x13)&lt;br /&gt;
| ro&lt;br /&gt;
| Various system state information (debug pointer table)&lt;br /&gt;
  byte 0x00: Console type, see [[Configuration_Memory#MCU_HW_INFO|here]]&lt;br /&gt;
  byte 0x01: PMIC vendor code&lt;br /&gt;
  byte 0x02: Battery vendor code&lt;br /&gt;
  byte 0x03: MGIC version (major?)&lt;br /&gt;
  byte 0x04: MGIC version (minor?)&lt;br /&gt;
  byte 0x05: RCOMP(?)&lt;br /&gt;
  byte 0x06: battery related? (seems to decrease while charging and increase while discharging)&lt;br /&gt;
  byte 0x09: system model (see [[Cfg:GetSystemModel#System_Model_Values|Cfg:GetSystemModel]] for values)&lt;br /&gt;
  byte 0x0A: Red Power LED mode (0 = off, 1 = on)&lt;br /&gt;
  byte 0x0B: Blue Power LED intensity  (0x00 - 0xFF)&lt;br /&gt;
  byte 0x0D: RGB LED red intensity&lt;br /&gt;
  byte 0x0E: RGB LED green intensity&lt;br /&gt;
  byte 0x0F: RGB LED blue intensity&lt;br /&gt;
  byte 0x11: WiFi LED brightness&lt;br /&gt;
  byte 0x12: always 0?&lt;br /&gt;
&lt;br /&gt;
On MCU_FIRM major version 1 the size of this is 9, reading past the 9th byte will yield AA instead of FF.&lt;br /&gt;
|-&lt;br /&gt;
| 0x80&lt;br /&gt;
- 0xFF&lt;br /&gt;
| s&lt;br /&gt;
| -&lt;br /&gt;
| These registers don&#039;t exist, writing is no-op, reading will yield FFs.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Shared register: the letter &amp;quot;s&amp;quot;  means that the given register is in a &amp;quot;shared register pool&amp;quot;, meaning the resgister is in the register pool in RAM at address &amp;lt;code&amp;gt;0xFFBA4 + registernumber&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Dynamic register: these registers aren&#039;t in the shared pool, they just &amp;quot;pretend&amp;quot; to be there. These registers often don&#039;t retain their set value, change rapidly, or control various hardware.&lt;br /&gt;
&lt;br /&gt;
Non-shared (dynamic) register: it&#039;s a register whose contents separate from the shared register pool. Messing with these registers will not affect the shared register pool at all.&lt;br /&gt;
&lt;br /&gt;
On old versions of MCU_FIRM none of the invalid registers are masked away by the read handler function, but are still read-only. Newer MCU_FIRM versions return the hardcoded value FF instead.&lt;br /&gt;
&lt;br /&gt;
== Device 5 &amp;amp; 6 ==&lt;br /&gt;
These are the chip-on-glass display controllers, also known as I2CLCD.&lt;br /&gt;
&lt;br /&gt;
=== Shared registers ===&lt;br /&gt;
These registers are the same across all known I2CLCD controllers (except Controller ID 0x00).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Display enable&lt;br /&gt;
| 0x11&lt;br /&gt;
| Values:&lt;br /&gt;
&lt;br /&gt;
  - 0x00 - screen off, slow burn-in&lt;br /&gt;
  - 0x01 - screen off, fast burn-in&lt;br /&gt;
  - 0x10 - screen on, color input used&lt;br /&gt;
  - 0x11 - screen on, color input not used, High-Z (display turns black or white depending on interface config)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| Read address&lt;br /&gt;
| &lt;br /&gt;
| Write to this register to set the read address.&lt;br /&gt;
&lt;br /&gt;
Reading from I2CLCD is non-standard. When you read, it returns pairs of the currently read address, and then the data byte at that address. The read address auto-increments.&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| Checksum? trigger&lt;br /&gt;
| 0x01&lt;br /&gt;
| When transitioning bit0 from 0 to 1, it seems to trigger some sort of checksum calcuation. Broken on controller 0x01, where it&#039;s oneshot.&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| ???&lt;br /&gt;
| 0x03 (all) /&lt;br /&gt;
0x07 (2DS)&lt;br /&gt;
| Unknown. When toggling 0x54 bit0 from 0 to 1, this register gets changed to 0x01 (all) / 0x05 (2DS).&lt;br /&gt;
&lt;br /&gt;
This register is sometimes seen with a value of 0x02 at initialization time on the top screen.&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| Checksum?&lt;br /&gt;
| &lt;br /&gt;
| Unknown. Read-writable with no effect (old3DS) / read-only (all).&lt;br /&gt;
&lt;br /&gt;
A random value is written here when 0x54 bit0 is changed from 0 to 1. Constantly updates with a seemingly random value, except on Controller ID 0x01, where it&#039;s oneshot/bugged.&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| ???&lt;br /&gt;
| 0x01&lt;br /&gt;
| Unknown. 0x00 is written here during init. Seems to have no effect.&lt;br /&gt;
|-&lt;br /&gt;
| 0x61&lt;br /&gt;
| Register checksum&lt;br /&gt;
| &lt;br /&gt;
| Some - but not all - register values are combined using an unknown algorithm into this register.  &lt;br /&gt;
It&#039;s unknown which registers influence this value, as some registers which influence this value are read-only.&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| ???&lt;br /&gt;
| 0x01&lt;br /&gt;
| Unknown, does nothing on known controllers. During init, gsp waits for this to become 0x01.&lt;br /&gt;
|-&lt;br /&gt;
| 0xFE&lt;br /&gt;
| ???&lt;br /&gt;
| &lt;br /&gt;
| Unknown, does nothing. 0xAA is written here during init.&lt;br /&gt;
|-&lt;br /&gt;
| 0xFF&lt;br /&gt;
| Controller ID&lt;br /&gt;
| &lt;br /&gt;
| Upper 4bits is manufacturer. Lower 4bits is unknown, most likely revision, possibly encoded as a Johnson counter. The fields are encoded this way, most likely for the register checksum feature.&lt;br /&gt;
&lt;br /&gt;
Manufacturers:&lt;br /&gt;
  - 0x0 - SHARP (LTPS(?) TN), old I2CLCD, found in old3DS (non-XL) only&lt;br /&gt;
  - 0x1 - JDI (LTPS IPS), found in select new3DS and new3DSXL consoles&lt;br /&gt;
  - 0xC - SHARP (LTPS(?) TN), new I2CLCD&lt;br /&gt;
  - 0xE - SHARP (TFT), found in 2DS only&lt;br /&gt;
&lt;br /&gt;
Known IDs:&lt;br /&gt;
  - 0xC7 - new3DS, new3DSXL, new2DSXL, and some select newer old3DSXL&lt;br /&gt;
  - 0xC3 - older old3DSXL&lt;br /&gt;
  - 0xE1 - 2DS&lt;br /&gt;
    - LQ050B1LW10B&lt;br /&gt;
      - LQ = normal TFT&lt;br /&gt;
      - 050 = panel 5 inches diagonal&lt;br /&gt;
      - B = &amp;quot;other&amp;quot; display format&lt;br /&gt;
      - 1 = transmissive (backlight-compatible)&lt;br /&gt;
      - L = LVDS&lt;br /&gt;
      - W = *unknown coating type*&lt;br /&gt;
      - 10 = model number&lt;br /&gt;
      - B = *unknown suffix*&lt;br /&gt;
  - 0x10 - some select new3DS and new3DSXL with IPS screens&lt;br /&gt;
  - 0x01 - old3DS&lt;br /&gt;
    - LS035T7LE38P (top screen)&lt;br /&gt;
      - LS = TFT (LTPS or SI-TFT ?)&lt;br /&gt;
      - 035 = panel 3.5 inches diagonal&lt;br /&gt;
      - T = &amp;quot;other 16:9&amp;quot; (even though the panel is 16:10 in physical size, or 32:10 in terms of pixel count)&lt;br /&gt;
      - 7 = *unknown backing type*&lt;br /&gt;
      - L = LVDS&lt;br /&gt;
      - E = *unknown coating type*&lt;br /&gt;
      - 38 = model number&lt;br /&gt;
      - P = *unknow suffix*&lt;br /&gt;
    - LS030Q7DW48P (bottom screen)&lt;br /&gt;
      - LS = TFT (LTPS or SI-TFT ?)&lt;br /&gt;
      - 030 = panel 3 inches diagonal&lt;br /&gt;
      - Q = QVGA (320x240)&lt;br /&gt;
      - 7 = *unknown backing type*&lt;br /&gt;
      - D = parallel RGB (unspecified, but it&#039;s known to be RGB888 for this display)&lt;br /&gt;
      - W = *unknown coating type*&lt;br /&gt;
      - 48 = model number&lt;br /&gt;
      - P = *unknow suffix*&lt;br /&gt;
  - 0x00 - no controller, or dead (I2CLCD always ACKs reads, but returns 00 if dead)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0x00 ===&lt;br /&gt;
This Controller ID is fully unknown, and the only reason we know about its existance is due to gsp having special handling code for it.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| ???&lt;br /&gt;
| &lt;br /&gt;
| Unknown. Write 0x10 to initialize.&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| ???&lt;br /&gt;
| &lt;br /&gt;
| Unknown. Write 0x01 to initialize.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0x01 ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Interface config&lt;br /&gt;
| 0xF7&lt;br /&gt;
| Regonfigures the input pins and pin behavior of the controller.&lt;br /&gt;
&lt;br /&gt;
 bit0 - color value invert (D = ~D, or D = 255 - D)&lt;br /&gt;
 bit1 - color format remap (D7:D2 &amp;lt;-- D5:D0, that is left shift color data by 2)&lt;br /&gt;
 bit2 - ???&lt;br /&gt;
 bit4 - ???&lt;br /&gt;
 bit5 - ???&lt;br /&gt;
 bit6 - ???&lt;br /&gt;
 bit7 - DS-style undriven screen (it will be white instead of black, see shared register 0x01)&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Image config&lt;br /&gt;
| 0x7F&lt;br /&gt;
| Image filters and pixel clock control.&lt;br /&gt;
&lt;br /&gt;
 bit0 - Horizontal Flip (scan from right to left)&lt;br /&gt;
 bit1 - red-blue swap&lt;br /&gt;
 bit2 - ???&lt;br /&gt;
 bit3 - ???&lt;br /&gt;
 bit4 - ???&lt;br /&gt;
 bit5 - ???&lt;br /&gt;
 bit6 - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| ???&lt;br /&gt;
| 0x0F&lt;br /&gt;
| Unknown, bit0 enables registers 0x12 to 0x19 to control some analog timing controls to the display panel itself.&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| ???&lt;br /&gt;
| 0x11&lt;br /&gt;
| Unknown. Has no effect on bottom screen. On the top screen, bit4 blanks out the display (LVDS disable?).&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| ???&lt;br /&gt;
| 0x73&lt;br /&gt;
| Unknown. While other bits seem to have no effect, bit0 kills the controller until a power cycle.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0xC3 ===&lt;br /&gt;
Basically the same as Controller ID 0xC7.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0xC7 ===&lt;br /&gt;
This is the most common non-old3DS display controller. Quite overclockable.&lt;br /&gt;
&lt;br /&gt;
Note: on the 0xC7 controller unlocking the factory controls at register 0x03 glitches out most of the standard controls (like registers 0x50 to 0x56), so use with caution.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Factory key 2&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock a second set of factory controls.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAF&lt;br /&gt;
| Factory key&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock factory controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Factory mode registers for unlock register 0x03:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Image control?&lt;br /&gt;
| 0xD7&lt;br /&gt;
| Most bits are unknown.&lt;br /&gt;
&lt;br /&gt;
 bit0 - color invert&lt;br /&gt;
 bit1 - slight gamma increase&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Image transform?&lt;br /&gt;
| 0x7F&lt;br /&gt;
| Mostly unknown.&lt;br /&gt;
 bit0 - Invert horizontal scan direction (0 = left to right, 1 = right to left)&lt;br /&gt;
 bit1 - red-blue swap&lt;br /&gt;
 bit2 - Invert vertical scan direction (0 = top to bottom, 1 = bottom to top)&lt;br /&gt;
 bit3 - Invert the order of each scanline pair (might be needed if bit2 is toggled)&lt;br /&gt;
 bit4 - Enable interlaced signal (use bit3 to swap fields)&lt;br /&gt;
 bit5 - ???&lt;br /&gt;
 bit6 - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x70-0x83&lt;br /&gt;
| Color curve red&lt;br /&gt;
| rowspan=3 | &lt;br /&gt;
| rowspan=3 | These registers are used for fine-tuning the analog driving curve of the screen&lt;br /&gt;
&lt;br /&gt;
Positive:&lt;br /&gt;
 - byte 00 (0xFF) - ???&lt;br /&gt;
 - byte 01 (0xFF) - ???&lt;br /&gt;
 - byte 02 (0x3F) - ???&lt;br /&gt;
 - byte 03 (0x3F) - ???&lt;br /&gt;
 - byte 04 (0x3F) - ???&lt;br /&gt;
 - byte 05 (0x3F) - ???&lt;br /&gt;
 - byte 06 (0x3F) - ???&lt;br /&gt;
 - byte 07 (0x3F) - ???&lt;br /&gt;
 - byte 08 (0x3F) - ???&lt;br /&gt;
 - byte 09 (0x3F) - ???&lt;br /&gt;
 &lt;br /&gt;
Negative:&lt;br /&gt;
 - byte 10 (0xFF) - ???&lt;br /&gt;
 - byte 11 (0xFF) - ???&lt;br /&gt;
 - byte 12 (0x3F) - ???&lt;br /&gt;
 - byte 13 (0x3F) - ???&lt;br /&gt;
 - byte 14 (0x3F) - ???&lt;br /&gt;
 - byte 15 (0x3F) - ???&lt;br /&gt;
 - byte 16 (0x3F) - ???&lt;br /&gt;
 - byte 17 (0x3F) - ???&lt;br /&gt;
 - byte 18 (0x3F) - ???&lt;br /&gt;
 - byte 19 (0x3F) - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x84-0x97&lt;br /&gt;
| Color curve green&lt;br /&gt;
|-&lt;br /&gt;
| 0x98-0xAB&lt;br /&gt;
| Color curve blue&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0xE1 ===&lt;br /&gt;
This controller is designed to drive a split panel. As such, the factory controls have been slightly altered to accomodate this.&lt;br /&gt;
&lt;br /&gt;
This is the only I2CLCD which responds on both I2CLCD addresses. The dominant screen is the bottom one.&lt;br /&gt;
&lt;br /&gt;
Most registers are similar to controller 0xC7, but there are some differences due to the split shared panel nature.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Factory key 2&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock a 2nd set of factory controls.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAF&lt;br /&gt;
| Factory key&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock factory controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Factory mode registers for unlock register 0x03:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Image control?&lt;br /&gt;
| 0xD7&lt;br /&gt;
| Most bits are unknown. This applies to the whole display panel.&lt;br /&gt;
&lt;br /&gt;
 bit0 - color invert&lt;br /&gt;
 bit1 - slight gamma increase&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| Image transform&lt;br /&gt;
| 0x33&lt;br /&gt;
| &lt;br /&gt;
 bit0 - top half horizontal flip&lt;br /&gt;
 bit1 - top half red-blue swap&lt;br /&gt;
 bit4 - bottom half horizontal flip&lt;br /&gt;
 bit5 - bottom half red-blue swap&lt;br /&gt;
|-&lt;br /&gt;
| 0x70-0x83&lt;br /&gt;
| Analog curve top&lt;br /&gt;
| rowspan=2 | &lt;br /&gt;
| rowspan=2 | Consists of two unknown curve values. Seems to be nonstandard.&lt;br /&gt;
&lt;br /&gt;
Pair 1:&lt;br /&gt;
 byte 00 (0xFF) - ???&lt;br /&gt;
 byte 01 (0xFF) - ???&lt;br /&gt;
 byte 02 (0xFF) - ???&lt;br /&gt;
 byte 03 (0xFF) - ???&lt;br /&gt;
 byte 04 (0x3F) - ???&lt;br /&gt;
 byte 05 (0x3F) - ???&lt;br /&gt;
 byte 06 (0x3F) - ???&lt;br /&gt;
 byte 07 (0x3F) - ???&lt;br /&gt;
 byte 08 (0x3F) - ???&lt;br /&gt;
 byte 09 (0x3F) - ???&lt;br /&gt;
&lt;br /&gt;
Part 2:&lt;br /&gt;
 byte 10 (0xFF) - ???&lt;br /&gt;
 byte 11 (0xFF) - ???&lt;br /&gt;
 byte 12 (0xFF) - ???&lt;br /&gt;
 byte 13 (0xFF) - ???&lt;br /&gt;
 byte 14 (0x3F) - ???&lt;br /&gt;
 byte 15 (0x3F) - ???&lt;br /&gt;
 byte 16 (0x3F) - ???&lt;br /&gt;
 byte 17 (0x3F) - ???&lt;br /&gt;
 byte 18 (0x3F) - ???&lt;br /&gt;
 byte 19 (0x3F) - ???&lt;br /&gt;
|-&lt;br /&gt;
| 0x84-0x97&lt;br /&gt;
| Analog curve bottom&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Custom registers for controller 0x10 ===&lt;br /&gt;
JDI IPS controller.&lt;br /&gt;
&lt;br /&gt;
Warning: on the JDI controller, unlocking any of the factory mode registers overshadows some other registers, so don&#039;t write to &amp;quot;standard&amp;quot; locations (other than register 0x40) before locking factory mode back!&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x03&lt;br /&gt;
| Factory key 2&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock advanced IPS curve controls.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAF&lt;br /&gt;
| Factory key&lt;br /&gt;
| &lt;br /&gt;
| Write 0xAA here to unlock factory controls.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Factory mode registers unlocked by register 0xAF:&lt;br /&gt;
* 0x41 - 0x4F&lt;br /&gt;
* 0x58 - 0x5F&lt;br /&gt;
* 0x67 - 0x6F&lt;br /&gt;
* 0xD0 - 0xEF&lt;br /&gt;
* unknown...&lt;br /&gt;
&lt;br /&gt;
Factory mode registers unlocked by register 0x03:&lt;br /&gt;
* 0x04 - 0x0F&lt;br /&gt;
* unknown...&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Register&lt;br /&gt;
!  Name&lt;br /&gt;
!  Valid bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x70-0x7F&lt;br /&gt;
| Driving curve 1-1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x80-0x8F&lt;br /&gt;
| Driving curve 1-2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x90-0x9F&lt;br /&gt;
| Driving curve 2-1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0xA0-0xAF&lt;br /&gt;
| Driving curve 2-2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0xB0-0xBF&lt;br /&gt;
| Driving curve 3-1&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0xC0-0xCF&lt;br /&gt;
| Driving curve 3-2&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Device 10 ==&lt;br /&gt;
See the datasheet linked to on the [[Hardware]] page for reference.&lt;br /&gt;
&lt;br /&gt;
== Device 11 ==&lt;br /&gt;
See the datasheet linked to on the [[Hardware]] page for reference.&lt;br /&gt;
&lt;br /&gt;
== Device 12 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  REGISTER&lt;br /&gt;
!  WIDTH&lt;br /&gt;
!  DESCRIPTION &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 21&lt;br /&gt;
| DebugPad state.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This is a [https://wiibrew.org/wiki/Wiimote/Extension_Controllers/Classic_Controller_Pro Wii Classic Controller Pro] which was slightly modified to have an encrypted device type of 0xF0 [https://wiibrew.org/wiki/Wiimote/Extension_Controllers#The_New_Way instead of 0xFD].&lt;br /&gt;
&lt;br /&gt;
See [[HID_Shared_Memory#Offset_0x238|here]] for the HID shared memory report format.&lt;br /&gt;
&lt;br /&gt;
== Device 13 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Raw I2C register address&lt;br /&gt;
!  Internal register address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description &lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x40&lt;br /&gt;
| RHR / THR (data receive/send FIFO)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| IER&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| FCR/IIR&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| LCR&lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x1&lt;br /&gt;
| MCR&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x5&lt;br /&gt;
| 0x1&lt;br /&gt;
| LSR&lt;br /&gt;
|-&lt;br /&gt;
| 0x30&lt;br /&gt;
| 0x6&lt;br /&gt;
| 0x1&lt;br /&gt;
| MSR/TCR&lt;br /&gt;
|-&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0x7&lt;br /&gt;
| 0x1&lt;br /&gt;
| SPR/TLR&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x1&lt;br /&gt;
| TXLVL&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| 0x9&lt;br /&gt;
| 0x1&lt;br /&gt;
| RXLVL&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x1&lt;br /&gt;
| IODir&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| 0xB&lt;br /&gt;
| 0x1&lt;br /&gt;
| IOState&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x1&lt;br /&gt;
| IoIntEna&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x1&lt;br /&gt;
| reserved&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| 0xE&lt;br /&gt;
| 0x1&lt;br /&gt;
| IOControl&lt;br /&gt;
|-&lt;br /&gt;
| 0x78&lt;br /&gt;
| 0xF&lt;br /&gt;
| 0x1&lt;br /&gt;
| EFCR&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
See the [http://www.alldatasheet.net/datasheet-pdf/pdf/347838/NXP/SC16IS750IBS.html datasheet] linked to on the [[Hardware]] page for reference. From that datasheet, for the structure of the I2C register address u8: &amp;quot;Bit 0 is not used, bits 2:1 select the channel, bits 6:3 select one of the UART internal registers. Bit 7 is not used with the I2C-bus interface, but it is used by the SPI interface to indicate a read or a write operation.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Device 14 ==&lt;br /&gt;
&lt;br /&gt;
Used by [[Config_Services|Cfg]]-sysmodule via the i2c::EEP service. This is presumably EEPROM going by the service name.&lt;br /&gt;
&lt;br /&gt;
The Cfg-module code which loads the [[Flash_Filesystem|CCAL]](nandro:/sys/{HWCAL0.dat/HWCAL1.dat}) file from NAND will load it from I2C instead, if a certain state flag is non-zero. Likewise for the function which writes CCAL to NAND. HMAC/hash verification after loading is skipped when the CCAL was loaded from I2C.&lt;br /&gt;
&lt;br /&gt;
== Device 15 ==&lt;br /&gt;
This the New3DS [[NFC_Services|NFC]] controller &amp;quot;I2C&amp;quot; interface. This device is accessed via the WriteDeviceRaw/ReadDeviceRaw I2C service [[I2C_Services|commands]].&lt;br /&gt;
&lt;br /&gt;
Since the *Raw commands are used with this, this device has no I2C registers. Instead, raw data is transfered after the I2C device is selected. Hence, WriteDeviceRaw is used for sending commands to the controller, while ReadDeviceRaw is for receiving responses from the controller. Certain commands may return multiple command responses.&lt;br /&gt;
&lt;br /&gt;
Command request / response structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x1&lt;br /&gt;
| Normally 0x10?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Command source / destination.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| CmdID&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Payload size.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Following the above header is the payload data(when payload size is non-zero), with the size specified in the header. The command response payload is usually at least 1-byte, where that byte appears to be normally 0x0. For command requests the payload data is the command parameters.&lt;br /&gt;
&lt;br /&gt;
For command requests sent to the NFC tag itself, Cmd[1]=0x0 and CmdID=0x0. The command request payload data here is the actual command request data for the NFC tag, starting with the CmdID u8 at payload+0.&lt;br /&gt;
&lt;br /&gt;
During NFC module startup, a certain command is sent to the controller which eventually(after various cmd-reply headers etc) returns the following the payload after the first byte in the payload:&lt;br /&gt;
 000000: 44 65 63 20 32 32 20 32 30 31 32 31 34 3a 35 33  Dec 22 201214:53 &lt;br /&gt;
 000010: 3a 35 30 01 05 0d 46 05 1b 79 20 07 32 30 37 39  :50...F..y .2079&lt;br /&gt;
 000020: 31 42 35                                         1B5&lt;br /&gt;
&lt;br /&gt;
Or that is: &amp;quot;Dec 22 201214:53:50&amp;lt;binary&amp;gt;20791B5&amp;quot;. Therefore, this appears to return the part-number of the NFC controller(other command request(s) / response(s) use this part-number value too).&lt;br /&gt;
&lt;br /&gt;
=== NFC controller commands  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  CmdRequest[1]&lt;br /&gt;
!  CmdID&lt;br /&gt;
!  Payload data for parameters&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x2E&lt;br /&gt;
| 0x2F&lt;br /&gt;
| Firmware image for this chunk, size varies.&lt;br /&gt;
| This is used during NFC module startup to upload the firmware image to the NFC controller. This is used repeatedly to upload multiple chunks of the image.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Device 17 ==&lt;br /&gt;
&lt;br /&gt;
(Stub)&lt;br /&gt;
&lt;br /&gt;
Used by New 3DS for ZL, ZR, C stick&lt;br /&gt;
&lt;br /&gt;
This device do not use registers. After writing the address, read the next several bytes.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| Fixed 0x80&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| Buttons (ZL = 0x4, ZR = 0x2)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Config_Savegame&amp;diff=22575</id>
		<title>Config Savegame</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Config_Savegame&amp;diff=22575"/>
		<updated>2024-06-04T21:27:55Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* Configuration blocks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the format of the [[Config_Services|Cfg]] [[System_SaveData|NAND]] savegame. These blocks can be accessed with the Cfg service commands.&lt;br /&gt;
&lt;br /&gt;
==Structure of save-file &amp;quot;/config&amp;quot;==&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;
| 0x2&lt;br /&gt;
| Total entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x2&lt;br /&gt;
| Data entries offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4558&lt;br /&gt;
| Block entries&lt;br /&gt;
|-&lt;br /&gt;
| 0x455C&lt;br /&gt;
| &lt;br /&gt;
| Data for the entries&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The filesize for this /config file is 0x8000-bytes.&lt;br /&gt;
&lt;br /&gt;
==Configuration block entry ==&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;
| 0x4&lt;br /&gt;
| BlkID&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
| Offset to the data for this block when size is &amp;gt;4, otherwise this word is the data for this block&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x2&lt;br /&gt;
| Size&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| 0x2&lt;br /&gt;
| Access Flags&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Access Flags===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Bit Mask&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| User Readable (cfg:u)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| System Writable (cfg:s / cfg:i)&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| System Readable (cfg:s / cfg:i)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Config blocks will typically either use 0xC for system readable/writable or 0xE for all 3.&lt;br /&gt;
&lt;br /&gt;
==Configuration blocks==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  BlkID&lt;br /&gt;
!  Size&lt;br /&gt;
!  Access Flags&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xC&lt;br /&gt;
| Config savegame version?&lt;br /&gt;
|-&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#RTC|RTC compensation value]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00020000&lt;br /&gt;
| 0x134&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#CDC|Codec]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030000&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| Leap Year Counter (read By PTM)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030001&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xE&lt;br /&gt;
| User time offset (read by CECD): displayed timestamp - rtc timestamp&lt;br /&gt;
|-&lt;br /&gt;
| 0x00030002&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xC&lt;br /&gt;
| Settings time offset: newly set timestamp - rtc timestamp&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040000&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#Touch|Touch calibration]] (read by HID)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040001&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0xC&lt;br /&gt;
| Analog Stick Calibration Param?(read by HID)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040002&lt;br /&gt;
| 0x12&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#Gyro|Gyroscope]] (read by HID)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040003&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#Accel|Accelerometer]] (read by HID)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00040004&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#CStick|CStick calibration data]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050000&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#Screen_flicker|Screen flicker]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050001&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xC&lt;br /&gt;
| Backlight controls (u8 ABL_powersave_enable, u8 brightness_level) (read by GSP)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050002&lt;br /&gt;
| 0x38&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#BLPWM|Backlight PWM]] (read by GSP)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050003&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#ABL|Power saving mode (ABL) calibration]] (read by GSP)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050004&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#ABL|Power saving mode (ABL) calibration]] (for legacy FIRM)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050005&lt;br /&gt;
| 0x20&lt;br /&gt;
| 0xE&lt;br /&gt;
| Stereo display settings (HWCAL block 0x470)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050006&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#ULCD_delay|3D switching delay]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050007&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050008&lt;br /&gt;
| 0x10C&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#ABL_extra|Power saving mode (ABL) extra config]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00050009&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xC&lt;br /&gt;
| new3DS only(?) backlight control (5th byte: auto-brightness enable)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00060000&lt;br /&gt;
| 0x96&lt;br /&gt;
| 0xC&lt;br /&gt;
| ??? (HWCAL block 0x500)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070000&lt;br /&gt;
| 0x214&lt;br /&gt;
| 0xE&lt;br /&gt;
| [[Hardware_calibration#3D_filters|3D filters]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070001&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xE&lt;br /&gt;
| Sound output mode (mono=0, stereo=1, surround=2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00070002&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xE&lt;br /&gt;
| [[Hardware_calibration#Microphone_echo_cancel|Microphone echo cancellation params]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| 0xC00&lt;br /&gt;
| 0xC&lt;br /&gt;
| WiFi configuration slot 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080001&lt;br /&gt;
| 0xC00&lt;br /&gt;
| 0xC&lt;br /&gt;
| WiFi configuration slot 1&lt;br /&gt;
|-&lt;br /&gt;
| 0x00080002&lt;br /&gt;
| 0xC00&lt;br /&gt;
| 0xC&lt;br /&gt;
| WiFi configuration slot 2&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090000&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xE&lt;br /&gt;
| This contains a u64 ID, used by processes using [[NWMUDS:InitializeWithVersion]]. The first word is the same as [[CfgS:GetLocalFriendCodeSeed|LocalFriendCodeSeed]], while the latter is a separate word.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090001&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xE&lt;br /&gt;
| Same content as 0x0009000? This console-unique u64 is used by [[Cfg:GenHashConsoleUnique|GenHashConsoleUnique]]. It is generated by &amp;lt;code&amp;gt;((0x3FFFFFFFF) &amp;amp; LocalFriendCodeSeed) | (random16 &amp;lt;&amp;lt; 48))&amp;lt;/code&amp;gt;, where random16 is generated by [[PSPXI:GenerateRandomBytes|GenerateRandomBytes]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00090002&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| The first two bytes are the same random16 used in 0x00090001. The second two bytes are zeros.&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0000&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 0xE&lt;br /&gt;
| [[#User Name Block 0x000A0000|User Name]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0001&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xE&lt;br /&gt;
| Birthday (u8 month, u8 day)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000A0002&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xE&lt;br /&gt;
| Language&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| CountryInfo&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0001&lt;br /&gt;
| 0x800&lt;br /&gt;
| 0xE&lt;br /&gt;
| Country name in UTF-16, every 0x80-bytes is an entry for each language, in the order of the Language table below (not all entries are set)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0002&lt;br /&gt;
| 0x800&lt;br /&gt;
| 0xE&lt;br /&gt;
| State name in UTF-16, every 0x80-bytes is an entry for each language&lt;br /&gt;
|-&lt;br /&gt;
| 0x000B0003&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| Coordinates. A pair of s16 represents latitude and longitude, respectively. One need to multiply both value by 180/32768 to get coordinates in degrees&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0000&lt;br /&gt;
| 0xC0&lt;br /&gt;
| 0xE&lt;br /&gt;
| [[#Parental Control Settings Block 0x000C0000|Parental Controls - Main data]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0001&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0xE&lt;br /&gt;
| COPPACS restriction data&lt;br /&gt;
|-&lt;br /&gt;
| 0x000C0002&lt;br /&gt;
| 0x200&lt;br /&gt;
| 0xE&lt;br /&gt;
| [[#Parental Control Settings Block 0x000C0002|Parental Controls - Registered e-Mail address and custom secret question]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x000D0000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| u16 at offset 0x0: [[SMDH#EULA_Version|EULA Version]] which was agreed to. u16 @ 0x02: latest version&lt;br /&gt;
|-&lt;br /&gt;
| 0x000E0000&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xE&lt;br /&gt;
| ? (related to SpotPass options in Internet Settings?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0000&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0xC&lt;br /&gt;
| Debug configuration, read by [[NS]] on dev-units: on startup, NS does &amp;lt;code&amp;gt;svcKernelSetState(6, 1, (u64)debug_flags &amp;amp; 1); &lt;br /&gt;
svcKernelSetState(6, 2, (u64)debug_flags &amp;amp; 2);&amp;lt;/code&amp;gt; (see [[SVC#KernelSetState|here]]) where &amp;lt;code&amp;gt;debug_flags&amp;lt;/code&amp;gt; is the u32 located at offset 0xC in this struct. Then it compares the u32 from +8 in this config-block with the [[Configuration_Memory#APPMEMTYPE|APPMEMTYPE]]. When those don&#039;t match NS starts a FIRM-launch (with the same FIRM titleID as the currently running one) to boot into a FIRM with the APPMEMTYPE value from this config-block. The byte at offset 0x0 is related to the memtype as well.&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0001&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xC&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0003&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| Home Menu button disable&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0004&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| The first u8 is the System-Model [[Cfg:GetSystemModel|value]], the last 3-bytes are unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0005&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| The first u8 indicates whether network updates are enabled (however, NIM only checks this flag with developer [[Configuration_Memory#ENVINFO|ENVINFO]]).&lt;br /&gt;
|-&lt;br /&gt;
| 0x000F0006&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0xC&lt;br /&gt;
| In NIM, taken as a (hopefully null terminated) string used for the &amp;quot;X-Device-Token&amp;quot; http header field for NPNS url.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0xC&lt;br /&gt;
| TWL EULA info ({bool agreed; u8 agreedVersion})&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100001&lt;br /&gt;
| 0x94&lt;br /&gt;
| 0xC&lt;br /&gt;
| Stores Parental Restrictions PIN/Secret Answer and other info for TWL mode&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100002&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| TWL country code&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100003&lt;br /&gt;
| 0x10&lt;br /&gt;
| 0xC&lt;br /&gt;
| TWL movable unique ID, used for DSiWare exports&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| The low u16 indicates whether the system setup is required, such as when the system is booted for the first time or after doing a [[System Settings|System Format]]: 0 = setup required, non-zero = no setup required&lt;br /&gt;
|-&lt;br /&gt;
| 0x00110001&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xC&lt;br /&gt;
| TitleID of the menu to launch, used by [[NS]] on dev units (this block can be edited on dev units with [[3DS Development Unit Software#Config|Config]])&lt;br /&gt;
|-&lt;br /&gt;
| 0x00120000&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xC&lt;br /&gt;
| Volume Slider Bounds (Read by HID and PTM)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00130000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| If response is 0x100 then debug mode is enabled.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00150000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| Clock Sequence (u16) used for generating UUIDs in [[ACT_Services|ACT]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00150001&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0xC&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x00150002&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| In NIM, taken as an u32, using the low u16, casted to a char, and turned lower case for the making of the url for NPNS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00160000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| Unknown, first byte is used by config service-cmd [[Config_Services|0x00070040]]. (Unknown whether the last 3-bytes are used)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00170000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xE&lt;br /&gt;
| Miiverse (OLV) access key&lt;br /&gt;
|-&lt;br /&gt;
| 0x00180000&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0xC&lt;br /&gt;
| QTM Infrared LED related, can be 0 or 1&lt;br /&gt;
|-&lt;br /&gt;
| 0x00180001&lt;br /&gt;
| 0x18&lt;br /&gt;
| 0xC&lt;br /&gt;
| [[Hardware_calibration#QTM|QTM calibration data]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x00190000&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0xC&lt;br /&gt;
| Unknown. NFC-module checks for value1/non-value1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The developer unit TID block only exists on developer units.&lt;br /&gt;
&lt;br /&gt;
===Stereo Display Settings===&lt;br /&gt;
All values are hard-coded in cfg module.&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;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 4&lt;br /&gt;
| 62.0f&lt;br /&gt;
|assumed pupillary distance in mm?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 4&lt;br /&gt;
| 289.0f&lt;br /&gt;
|assumed distance in mm between player&#039;s eyes and upper screen?&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| 4&lt;br /&gt;
| 76.80f&lt;br /&gt;
|width in mm of (old) 3DS upper screen (doesn&#039;t vary for different models?)&lt;br /&gt;
|-&lt;br /&gt;
| 0xC&lt;br /&gt;
| 4&lt;br /&gt;
| 46.08f&lt;br /&gt;
|height in mm of (old) 3DS upper screen (doesn&#039;t vary for different models?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| 4&lt;br /&gt;
| 10.0f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 4&lt;br /&gt;
| 5.0f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| 4&lt;br /&gt;
| 55.58f&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| 4&lt;br /&gt;
| 21.57f&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Languages===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| JP&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| EN&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| FR&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| DE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| IT&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| ES&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| ZH&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| KO&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| NL&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| PT&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| RU&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| TW&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===CountryInfo===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Byte&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
|?&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| State/Province code.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Country code, same as DSi/Wii country codes. Value 0xFF is invalid.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===User Name Block 0x000A0000===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Byte&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00-0x15&lt;br /&gt;
| User name (UTF-16)&lt;br /&gt;
|-&lt;br /&gt;
| 0x16-0x17&lt;br /&gt;
| u16 NGWord flag to denote that the user name is inappropriate&lt;br /&gt;
|-&lt;br /&gt;
| 0x18-0x1B&lt;br /&gt;
| u32 NGWord version the username was last checked with. If this value is less than the u32 stored in the NGWord CFA &amp;quot;romfs:/version.dat&amp;quot;, the system then checks the username string with the bad-word list CFA again, then updates this field with the value from the CFA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
While the user name is NULL-terminated, the terminator is not applied when the user name is 10 characters long, which leads to online access breaking (002-0109) and buffer overflows when the user name is retrieved, even in DS games.&lt;br /&gt;
&lt;br /&gt;
===WiFi Slot Structure===&lt;br /&gt;
&lt;br /&gt;
====Network structure====&lt;br /&gt;
This is used twice in the actual WiFi slot 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;
| 0x1&lt;br /&gt;
| Whether the network was set or not?&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| 0x1&lt;br /&gt;
| Whether to use this network strucutre to connect?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x1&lt;br /&gt;
| Whether this structure is the first (0) or the second (1) in the larger WiFi slot structure?&lt;br /&gt;
|-&lt;br /&gt;
| 0x3&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x20&lt;br /&gt;
| SSID of the network, without a trailing nullbyte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| 0x1&lt;br /&gt;
| Length of the SSID.&lt;br /&gt;
|-&lt;br /&gt;
| 0x25&lt;br /&gt;
| 0x1&lt;br /&gt;
| [[Nintendo_Zone#Beacon_payload_format|AP crypto key type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x26&lt;br /&gt;
| 0x2&lt;br /&gt;
| Padding ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| 0x40&lt;br /&gt;
| Plaintext of the passphrase of the network, without a trailing nullbyte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| 0x20&lt;br /&gt;
| PBKDF2 of the passphrase and SSID (http://jorisvr.nl/wpapsk.html).&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Actual 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;
| 0x2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x2&lt;br /&gt;
| 0x2&lt;br /&gt;
| [https://github.com/lammertb/libcrc/blob/v2.0/src/crc16.c#L43-L76 CRC-16 checksum] of the next 0x410 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x88&lt;br /&gt;
| First network structure. Only set if the network was set &amp;quot;normally&amp;quot;, or was the last to be set using WPS during the session.&lt;br /&gt;
|-&lt;br /&gt;
| 0x8C&lt;br /&gt;
| 0x20&lt;br /&gt;
| Padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAC&lt;br /&gt;
| 0x88&lt;br /&gt;
| Second network structure. Only set if the network was set using WPS, otherwise 0-filled.&lt;br /&gt;
|-&lt;br /&gt;
| 0x134&lt;br /&gt;
| 0x20C&lt;br /&gt;
| Padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x340&lt;br /&gt;
| 0x1&lt;br /&gt;
| Whether to automatically get the IP address (use DHCP) or not, defaults to 1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x341&lt;br /&gt;
| 0x1&lt;br /&gt;
| Whether to automatically get the DNS or not, defaults to 1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x342&lt;br /&gt;
| 0x2&lt;br /&gt;
| Padding ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x344&lt;br /&gt;
| 0x4&lt;br /&gt;
| IP address, to use if 0x340 is false.&lt;br /&gt;
|-&lt;br /&gt;
| 0x348&lt;br /&gt;
| 0x4&lt;br /&gt;
| IP address of the gateway, to use if 0x340 is false.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34C&lt;br /&gt;
| 0x4&lt;br /&gt;
| Subnetwork mask, to use if 0x340 is false.&lt;br /&gt;
|-&lt;br /&gt;
| 0x350&lt;br /&gt;
| 0x4&lt;br /&gt;
| IP address of the primary DNS , to use if 0x341 is false.&lt;br /&gt;
|-&lt;br /&gt;
| 0x354&lt;br /&gt;
| 0x4&lt;br /&gt;
| IP address of the secondary DNS, to use if 0x341 is false.&lt;br /&gt;
|-&lt;br /&gt;
| 0x358&lt;br /&gt;
| 0x4&lt;br /&gt;
| Always 0x01050000 ? Only set if the network was the last to be set during the session.&lt;br /&gt;
|-&lt;br /&gt;
| 0x35C&lt;br /&gt;
| 0x4&lt;br /&gt;
| IP address to use. Only set if the network was the last to be set during the session.&lt;br /&gt;
|-&lt;br /&gt;
| 0x360&lt;br /&gt;
| 0x6&lt;br /&gt;
| MAC address of the AP. Only set if the network was the last to be set during the session.&lt;br /&gt;
|-&lt;br /&gt;
| 0x366&lt;br /&gt;
| 0x1&lt;br /&gt;
| Channel. Only set if the network was the last to be set during the session.&lt;br /&gt;
|-&lt;br /&gt;
| 0x367&lt;br /&gt;
| 0x1&lt;br /&gt;
| Padding ? Only set if the network was the last to be set during the session.&lt;br /&gt;
|-&lt;br /&gt;
| 0x368&lt;br /&gt;
| 0x1&lt;br /&gt;
| Whether to use a proxy or not, defaults to 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x369&lt;br /&gt;
| 0x1&lt;br /&gt;
| Whether to use a basic authentication for the proxy, defaults to 0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x36A&lt;br /&gt;
| 0x2&lt;br /&gt;
| Port to use for the proxy, defaults to 1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x36C&lt;br /&gt;
| 0x30&lt;br /&gt;
| URL/address of the proxy, including a trailing nullbyte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x39C&lt;br /&gt;
| 0x34&lt;br /&gt;
| Padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3D0&lt;br /&gt;
| 0x20&lt;br /&gt;
| Username to use for basic authentication, including a trailing nullbyte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3F0&lt;br /&gt;
| 0x20&lt;br /&gt;
| Password to use for basic authentication, including a trailing nullbyte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x410&lt;br /&gt;
| 0x2&lt;br /&gt;
| Padding ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x412&lt;br /&gt;
| 0x2&lt;br /&gt;
| MTU value, defaults to 1400 and ranges between 576 and 1500, inclusive.&lt;br /&gt;
|-&lt;br /&gt;
| 0x414&lt;br /&gt;
| 0x7EC&lt;br /&gt;
| Padding.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===LCD display config===&lt;br /&gt;
There seems to be some sort of LCD display configuration stored in this cfg. When using the cfg-save from an Old3DS on a New3DS without formatting the cfg first, the bottom-screen display is somewhat off(which is fixed by formatting the cfg-save).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Parental Control Settings Block 0x00100001===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Byte&lt;br /&gt;
!  Size in bytes&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0xD&lt;br /&gt;
| Unknown.&lt;br /&gt;
|-&lt;br /&gt;
| 0xD&lt;br /&gt;
| 0x4&lt;br /&gt;
| PIN&lt;br /&gt;
|-&lt;br /&gt;
| 0x11&lt;br /&gt;
| 0x40&lt;br /&gt;
| Secret Answer (UTF-16)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Parental Control Settings Block 0x000C0000===&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;
| 0x00&lt;br /&gt;
| 0x04&lt;br /&gt;
| [[#Parental Control Restriction Bitmask|Parental Control Restriction Bitmask]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| 0x04&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| 0x01&lt;br /&gt;
| Rating system used for configuration&lt;br /&gt;
|-&lt;br /&gt;
| 0x09&lt;br /&gt;
| 0x01&lt;br /&gt;
| Maximum allowed age (20 = No restriction)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A&lt;br /&gt;
| 0x01&lt;br /&gt;
| Secret Question Type (0-5: Pre-defined, 6: Custom)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B&lt;br /&gt;
| 0x01&lt;br /&gt;
| Unknown&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| 0x08&lt;br /&gt;
| Parental Controls PIN code (with NULL-termination, although restricted to 4 digits)&lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| 0x44&lt;br /&gt;
| Secret Answer (UTF-16)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Parental Control Restriction Bitmask====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bit&lt;br /&gt;
! Restriction name&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Global Parental Controls Enable&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Internet Browser&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Display of 3D Images (disabled on 2DS)&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Sharing Images/Audio/Video/Long Text Data&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Online Interaction&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| StreetPass&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Friend Registration&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| DS Download Play&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Nintendo 3DS Shopping Services (eShop / EC Applet)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| View Distributed Videos&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Miiverse (View)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Miiverse (Post)&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| &amp;quot;Child Online Privacy Protection&amp;quot; (see [[Cfg:GetRegionCanadaUSA|CFG:IsCoppacsSupported]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Parental Control Settings Block 0x000C0002===&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;
| 0x0000&lt;br /&gt;
| 0x0001&lt;br /&gt;
| Boolean, whether an e-Mail has been registered&lt;br /&gt;
|-&lt;br /&gt;
| 0x0001&lt;br /&gt;
| 0x0101&lt;br /&gt;
| Registered e-Mail address (Plaintext)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0102&lt;br /&gt;
| 0x0068&lt;br /&gt;
| Custom Secret Question (UTF-16)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Multi-threading&amp;diff=22315</id>
		<title>Multi-threading</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Multi-threading&amp;diff=22315"/>
		<updated>2023-08-19T08:45:48Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents all kernel functionality for managing multiple processes and threads as well as handling synchronization between them.&lt;br /&gt;
&lt;br /&gt;
= Processes =&lt;br /&gt;
&lt;br /&gt;
Each process is given an array of [[NCCH/Extended_Header#ARM11_Kernel_Capabilities|kernel capability descriptors]] upon creation (see CreateProcess). Official software forwards the descriptors specified in the [[NCCH#Extended_Header|NCCH exheader]].&lt;br /&gt;
&lt;br /&gt;
Any process can only use SVCs which are enabled in its kernel capability descriptors. This is enforced by the ARM11 kernel SVC handler by checking the syscall access control mask stored on the SVC-mode stack. If the SVC isn&#039;t enabled, a kernelpanic() is triggered. Each process has a separate SVC-mode stack; this stack and the syscall access mask stored here are initialized when the process is started. Applications normally only have access to SVCs &amp;lt;=0x3D, however not all SVCs &amp;lt;=0x3D are accessible to the application. The majority of the SVCs accessible to applications are unused by the application.&lt;br /&gt;
&lt;br /&gt;
Each process has a separate handle-table, the size of which is stored in the kernel capability descriptor. The handles in a handle-table can&#039;t be used in the context of other processes, since those handles don&#039;t exist in other handle-tables.&lt;br /&gt;
&lt;br /&gt;
0xFFFF8001 is a handle alias for the current process.&lt;br /&gt;
&lt;br /&gt;
Calling svcBreak on retail will only terminate the process which called this SVC.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== CreateCodeSet ===&lt;br /&gt;
(behavior unconfirmed)&lt;br /&gt;
&lt;br /&gt;
Allocates memory for a process according to the given CodeSetInfo contents and copies the segment data from the given memory locations to the allocated memory.&lt;br /&gt;
&lt;br /&gt;
=== CreateProcess ===&lt;br /&gt;
(behavior unconfirmed)&lt;br /&gt;
&lt;br /&gt;
Sets up a process using the segments managed by the given CodeSet handle.&lt;br /&gt;
&lt;br /&gt;
This system call furthermore processes the [[NCCH/Extended_Header#ARM11_Kernel_Capabilities|kernel capabilities]] from the [[NCCH/Extended_Header|ExHeader]], hence setting up virtual address mappings, CPU clock frequency/L2 cache configuration, and other things.&lt;br /&gt;
&lt;br /&gt;
=== Run ===&lt;br /&gt;
(behavior unconfirmed)&lt;br /&gt;
&lt;br /&gt;
Sets up the main process thread and appends it to the scheduler queue.&lt;br /&gt;
&lt;br /&gt;
The argc, argv, and envp fields from the given StartupInfo structure are ignored.&lt;br /&gt;
&lt;br /&gt;
== struct CodeSetInfo ==&lt;br /&gt;
All addresses are given virtual for the process to be created.&lt;br /&gt;
All sizes are given in 0x1000-pages.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Type&lt;br /&gt;
!  Field&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| Codeset Name&lt;br /&gt;
|-&lt;br /&gt;
| u16&lt;br /&gt;
| Unknown, this is written to field 0x5A of KCodeSet&lt;br /&gt;
|-&lt;br /&gt;
| u16&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .text addr&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .text size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata start&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| .rodata size&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| RW addr (.data + .bss)&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| RW size (.data + .bss)&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Total .text pages&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Total .rodata pages&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Total RW pages (.data + .bss)&lt;br /&gt;
|-&lt;br /&gt;
| u32&lt;br /&gt;
| Unknown/padding&lt;br /&gt;
|-&lt;br /&gt;
| u8[8]&lt;br /&gt;
| Program ID&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Threads =&lt;br /&gt;
&lt;br /&gt;
For Kernel implementation details, see [[KThread]].&lt;br /&gt;
&lt;br /&gt;
Though it is possible to run multi-threaded programs, running those on different cores is not possible &amp;quot;as-is&amp;quot;. One core is always dedicated to the OS, hence you will never get 100% of both cores.&lt;br /&gt;
&lt;br /&gt;
Using CloseHandle() with a KThread handle will terminate the specified thread only if the reference count reaches 0.&lt;br /&gt;
&lt;br /&gt;
Lower priority values give the thread higher priority. For userland apps, priorities between 0x18 and 0x3F are allowed. The priority of the app&#039;s main thread seems to be 0x30.&lt;br /&gt;
&lt;br /&gt;
The [[Glossary#appcore|appcore]] thread scheduler, in typical real-time operating system fashion, implements a simple preemptive algorithm based around multiple thread priority levels. This algorithm guarantees that the currently executing thread is always the highest priority runnable thread (also known as SCHED_FIFO). In other words, a thread will be interrupted (preempted) if and only if a higher priority thread is woken up, by means of an event (i.e. svcSendSyncRequest) or similar. Contrary to typical desktop operating systems, no timeslice-based scheduling is performed, which means that if a thread uses up all available CPU time (for example if it enters an endless loop), all other threads with equal or lower priority that run on the same CPU core won&#039;t get a chance to run. Yielding to other threads is otherwise done by means of synchronization primitives (thread sleep, mutex, address arbiter, etc.). Address arbiters can be used to implement process-local synchronization primitives.&lt;br /&gt;
&lt;br /&gt;
0xFFFF8000 is a handle alias for the currently active thread.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== CreateThread ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x08&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result CreateThread(Handle* thread, func entrypoint, u32 arg, u32 stacktop, s32 threadpriority, s32 processorid);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Configuration&#039;&#039;&#039;&lt;br /&gt;
 R0=s32 threadpriority&lt;br /&gt;
 R1=func entrypoint&lt;br /&gt;
 R2=u32 arg&lt;br /&gt;
 R3=u32 stacktop&lt;br /&gt;
 R4=s32 processorid&lt;br /&gt;
&lt;br /&gt;
 Result result=R0&lt;br /&gt;
 Handle* thread=R1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Details&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Creates a new thread in the current process which will begin execution at the given entrypoint. The SP CPU register will be initialized to stacktop, while r0 will be initialized to the given arg.&lt;br /&gt;
&lt;br /&gt;
The input address used for Entrypoint_Param and StackTop are normally the same, but they may be chosen arbitrarily. For the main thread (created in svcRun), the Entrypoint_Param is value 0.&lt;br /&gt;
&lt;br /&gt;
The stacktop must be aligned to 0x8-bytes, otherwise when not aligned to 0x8-bytes the ARM11 kernel clears the low 3-bits of the stacktop address.&lt;br /&gt;
&lt;br /&gt;
The processorid parameter specifies which processor the thread can run on. Non-negative values correspond to a specific CPU. (e.g. 0 for the Appcore and 1 for the Syscore on Old3DS. On New3DS, IDs 2 and 3 are also valid, referring to the 2 additional CPU cores) Special value -1 means all CPUs, and -2 means the default CPU for the process (Read from the [[NCCH/Extended Header|Exheader]], usually 0 for applications, 1 for system services). Games usually create threads using -2.&lt;br /&gt;
&lt;br /&gt;
The thread priority value must be in the range 0x0..0x3F. Otherwise, error 0xE0E01BFD is returned.&lt;br /&gt;
&lt;br /&gt;
With the Old3DS kernel, the s32 processorid must be &amp;lt;=2 (for the processorid validation check in the kernel). With the New3DS kernel, the processorid validation check requires processorid to be less than or equal to &amp;lt;total cores(MPCore &amp;quot;SCU Configuration Register&amp;quot; CPU number value + 1)&amp;gt;, and a number of additional constraints apply: When processorid==0x2 and the process is not a BASE mem-region process, exheader kernel-flags bitmask 0x2000 must be set (otherwise error 0xD9001BEA is returned). When processorid==0x3 and the process is not a BASE mem-region process, error 0xD9001BEA is returned. These are the only restriction checks done by the kernel for processorid.&lt;br /&gt;
&lt;br /&gt;
=== ExitThread  ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x09&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 void ExitThread(void);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Details&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Makes the currently running thread exit. When a thread exits, all mutex objects it owns are released and made available to other threads.&lt;br /&gt;
&lt;br /&gt;
=== SleepThread  ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x0A&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 void SleepThread(s64 nanoseconds);&lt;br /&gt;
&lt;br /&gt;
=== GetThreadPriority ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x0B&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetThreadPriority(s32* priority, Handle thread);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;asm&#039;&#039;&#039;&lt;br /&gt;
 .global svcGetThreadPriority&lt;br /&gt;
 .type svcGetThreadPriority, %function&lt;br /&gt;
 svcGetThreadPriority:&lt;br /&gt;
 	str r0, [sp, #-0x4]!&lt;br /&gt;
 	svc 0x0B&lt;br /&gt;
 	ldr r3, [sp], #4&lt;br /&gt;
 	str r1, [r3]&lt;br /&gt;
 	bx  lr&lt;br /&gt;
&lt;br /&gt;
=== SetThreadPriority ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x0C&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result SetThreadPriority(Handle thread, s32 priority);&lt;br /&gt;
&lt;br /&gt;
=== OpenThread ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x34&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result OpenThread(Handle* thread, Handle process, u32 threadId);&lt;br /&gt;
&lt;br /&gt;
=== GetProcessIdOfThread ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x36&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetProcessIdOfThread(u32* processId, Handle thread);&lt;br /&gt;
&lt;br /&gt;
=== GetThreadId ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x37&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetThreadId(u32* threadId, Handle thread);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Details&#039;&#039;&#039;&lt;br /&gt;
It seems that only the thread itself or one of its parent can get the ID. Calling this on the handle of a sibling or parent seems to always yield the ID 0.&lt;br /&gt;
&lt;br /&gt;
=== GetThreadInfo ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x2C&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetThreadInfo(s64* out, Handle thread, ThreadInfoType type);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039; Details &#039;&#039;&#039;&lt;br /&gt;
This requests always return an error when called, it only checks if the handle is a thread or not. &lt;br /&gt;
Hence, it will return 0xD8E007ED (BAD_ENUM) if the Handle is a Thread Handle, 0xD8E007F7 (BAD_HANDLE) if it isn&#039;t.&lt;br /&gt;
&lt;br /&gt;
=== GetThreadContext ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x3B&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetThreadContext(ThreadContext* context, Handle thread);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Details&#039;&#039;&#039;&lt;br /&gt;
Stubbed?&lt;br /&gt;
&lt;br /&gt;
== Core affinity == &lt;br /&gt;
&lt;br /&gt;
The cores are numbered from 0 to 1 for Old 3DS and 0 to 3 for the new 3DS.&lt;br /&gt;
&lt;br /&gt;
=== GetThreadAffinityMask ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x0D&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetThreadAffinityMask(u8* affinitymask, Handle thread, s32 processorcount);&lt;br /&gt;
&lt;br /&gt;
=== SetThreadAffinityMask ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x0E&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result SetThreadAffinityMask(Handle thread, u8* affinitymask, s32 processorcount);&lt;br /&gt;
&lt;br /&gt;
=== GetThreadIdealProcessor ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x0F&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Signature&#039;&#039;&#039;&lt;br /&gt;
 Result GetThreadIdealProcessor(s32* processorid, Handle thread);&lt;br /&gt;
&lt;br /&gt;
=== SetThreadIdealProcessor ===&lt;br /&gt;
&#039;&#039;&#039;svc&#039;&#039;&#039; : 0x10&lt;br /&gt;
&lt;br /&gt;
=== APT:SetApplicationCpuTimeLimit ===&lt;br /&gt;
&lt;br /&gt;
See [[APT:SetApplicationCpuTimeLimit]].&lt;br /&gt;
&lt;br /&gt;
You are not able to use the system core (core1) by default. You have to first assign the amount of time dedicated to the system.&lt;br /&gt;
The value is in percent, the higher it is, the more the system will be available for your application. &lt;br /&gt;
&lt;br /&gt;
For example if you set this value to 25%, it means that your application will be able to use 25% of the system core at most, even if you never issue system calls.&lt;br /&gt;
&lt;br /&gt;
If you set the value to a non-zero value, you will not be able to set it back to 0%.&lt;br /&gt;
Keep in mind that if your application is heavily dependant on the system, setting a high value for your application might yield poorer performance than if you had set a low value.&lt;br /&gt;
&lt;br /&gt;
=== APT:GetApplicationCpuTimeLimit ===&lt;br /&gt;
&lt;br /&gt;
See [[APT:GetApplicationCpuTimeLimit]].&lt;br /&gt;
&lt;br /&gt;
== Debug == &lt;br /&gt;
&lt;br /&gt;
=== GetThreadList ===&lt;br /&gt;
&lt;br /&gt;
=== GetDebugThreadContext ===&lt;br /&gt;
&lt;br /&gt;
=== SetDebugThreadContext ===&lt;br /&gt;
&lt;br /&gt;
=== GetDebugThreadParam ===&lt;br /&gt;
&lt;br /&gt;
= Synchronization =&lt;br /&gt;
&lt;br /&gt;
Synchronization can be performed via WaitSynchronization on any handles deriving from [[KSynchronizationObject]]. The semantic meaning of the call depends on the particular object type referred to by the given handle:&lt;br /&gt;
&lt;br /&gt;
* KClientPort: Wakes if max sessions not reached (free session available)&lt;br /&gt;
* KClientSession: Always false?&lt;br /&gt;
* KDebug: Waits until a debug event is signaled (the user should then use svcGetProcessDebugEvent to get the debug event info)&lt;br /&gt;
* KDmaObject: ???&lt;br /&gt;
* KEvent: Waits until the event is signaled&lt;br /&gt;
* KMutex: Acquires a lock on the mutex (blocks until this succeeds)&lt;br /&gt;
* KProcess: Waits until the process exits/is terminated&lt;br /&gt;
* KSemaphore: This consumes a value from the semaphore count, if possible, otherwise continues to wait&lt;br /&gt;
* KServerPort: Waits for a new client connection, upon which svcAcceptSession is ready to be called&lt;br /&gt;
* KServerSession: Waits for an IPC command to be submitted to the server process&lt;br /&gt;
* KThread: Waits until the thread terminates&lt;br /&gt;
* KTimer: Wakes when timer activates (this also clears the timer if it is oneshot)&lt;br /&gt;
&lt;br /&gt;
Most synchronization systems seem to have both a &amp;quot;normal&amp;quot; and &amp;quot;light-weight&amp;quot; version&lt;br /&gt;
&lt;br /&gt;
== Mutex ==&lt;br /&gt;
&lt;br /&gt;
For Kernel implementation details, see [[KMutex]]&lt;br /&gt;
&lt;br /&gt;
===  CreateMutex ===&lt;br /&gt;
&lt;br /&gt;
/!\ It seems that the mutex will not be available once the thread that created it is destroyed &lt;br /&gt;
&lt;br /&gt;
=== ReleaseMutex ===&lt;br /&gt;
&lt;br /&gt;
== Semaphore ==&lt;br /&gt;
&lt;br /&gt;
== Event ==&lt;br /&gt;
&lt;br /&gt;
== Address Arbiters ==&lt;br /&gt;
&lt;br /&gt;
Address arbiters are a low-level primitive to implement synchronization based on a counter stored at some user-specified virtual memory address. Address arbiters are used to put the current thread to sleep until the counter is signaled. Both of these tasks are implemented in ArbitrateAddress.&lt;br /&gt;
&lt;br /&gt;
Address arbiters are implemented by [[KAddressArbiter]].&lt;br /&gt;
&lt;br /&gt;
===CreateAddressArbiter===&lt;br /&gt;
 Result CreateAddressArbiter(Handle* arbiter)&lt;br /&gt;
&lt;br /&gt;
Creates an address arbiter handle for use with ArbitrateAddress.&lt;br /&gt;
&lt;br /&gt;
=== ArbitrateAddress ===&lt;br /&gt;
 Result ArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 value, s64 nanoseconds)&lt;br /&gt;
&lt;br /&gt;
if &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; is SIGNAL, the ArbitrateAddress call will resume up to &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; of the threads waiting on &amp;lt;code&amp;gt;addr&amp;lt;/code&amp;gt; using an arbiter, starting with the highest-priority threads. If &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt; is negative, all of these threads are released. &amp;lt;code&amp;gt;nanoseconds&amp;lt;/code&amp;gt; remains unused in this mode.&lt;br /&gt;
&lt;br /&gt;
The other modes are used to (conditionally) put the current thread to sleep based on the memory word at virtual address &amp;lt;code&amp;gt;addr&amp;lt;/code&amp;gt; until another thread signals that address using ArbitrateAddress with the &amp;lt;code&amp;gt;type&amp;lt;/code&amp;gt; SIGNAL. WAIT_IF_LESS_THAN will put the current thread to sleep if that word is smaller than &amp;lt;code&amp;gt;value&amp;lt;/code&amp;gt;. DECREMENT_AND_WAIT_IF_LESS_THAN will furthermore decrement the memory value before the comparison. WAIT_IF_LESS_THAN_TIMEOUT and DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT will do the same as their counterparts, but will have thread execution resume if &amp;lt;code&amp;gt;nanoseconds&amp;lt;/code&amp;gt; nanoseconds pass without &amp;lt;code&amp;gt;addr&amp;lt;/code&amp;gt; being signaled.&lt;br /&gt;
&lt;br /&gt;
=== enum ArbitrationType ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address arbitration type&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| SIGNAL&lt;br /&gt;
| 0&lt;br /&gt;
|-&lt;br /&gt;
| WAIT_IF_LESS_THAN&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| DECREMENT_AND_WAIT_IF_LESS_THAN&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| WAIT_IF_LESS_THAN_TIMEOUT&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT&lt;br /&gt;
| 4&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NCCH/Extended_Header&amp;diff=22295</id>
		<title>NCCH/Extended Header</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NCCH/Extended_Header&amp;diff=22295"/>
		<updated>2023-08-09T16:09:12Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* ARM11 Kernel Capabilities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page documents the format of the &#039;&#039;&#039;NCCH Extended Header&#039;&#039;&#039;, or &#039;&#039;&#039;exheader&#039;&#039;&#039; for short.&lt;br /&gt;
&lt;br /&gt;
The exheader has two sections:&lt;br /&gt;
&lt;br /&gt;
* The actual exheader data, containing System Control Info (SCI) and Access Control Info (ACI);&lt;br /&gt;
* A signed copy of NCCH HDR public key, and exheader ACI. This version of the ACI is used as limitation to the actual ACI.&lt;br /&gt;
&lt;br /&gt;
== Main Structure ==&lt;br /&gt;
All values are little endian unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
See also: [https://github.com/3DSGuy/Project_CTR/blob/20f708450b9c6e7f64eafa6c2a8eeb25a630c69a/ctrtool/exheader.h]&lt;br /&gt;
&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x200&amp;lt;/code&amp;gt;&lt;br /&gt;
| SCI&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x200&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x200&amp;lt;/code&amp;gt;&lt;br /&gt;
| ACI&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x400&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; signature (RSA-2048-SHA256)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x500&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;&lt;br /&gt;
| NCCH HDR RSA-2048 public key&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x600&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x200&amp;lt;/code&amp;gt;&lt;br /&gt;
| ACI (for limitation of first ACI)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; signature covers the NCCH HDR public key and second ACI. The &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; public key is initialised by the boot ROM.&lt;br /&gt;
&lt;br /&gt;
When loading the exheader, [[FIRM|Process9]] compares the exheader data with the data in the &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; (note that not everything is compared here). When these don&#039;t match, an error is returned. The Process9 code handling this validation was updated with [[6.0.0-11|v6.0]]; the only change in this function seems to be the check for the &amp;quot;Ideal processor&amp;quot; field.&lt;br /&gt;
&lt;br /&gt;
== System Control Info ==&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| Application title (default is &amp;quot;CtrApp&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x5&amp;lt;/code&amp;gt;&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0xD&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Flag (bit 0: &amp;lt;code&amp;gt;CompressExefsCode&amp;lt;/code&amp;gt;, bit 1: &amp;lt;code&amp;gt;SDApplication&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0xE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Remaster version&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0xC&amp;lt;/code&amp;gt;&lt;br /&gt;
| Text code set info&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1C&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Stack size&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0xC&amp;lt;/code&amp;gt;&lt;br /&gt;
| Read-only code set info&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x2C&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0xC&amp;lt;/code&amp;gt;&lt;br /&gt;
| Data code set info&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x3C&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x4&amp;lt;/code&amp;gt;&lt;br /&gt;
| BSS size&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x180&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;48*8&amp;lt;/code&amp;gt;)&lt;br /&gt;
| Dependency [[Title list#00040130 - System Modules|module]] (program ID) list&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1C0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;SystemInfo&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Most of these fields are used in [[LOADER:LoadProcess]].&lt;br /&gt;
&lt;br /&gt;
=== Code Set Info ===&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Address&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x4&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Physical region size (in page-multiples)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Size (in bytes)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== System Info ===&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;SaveData&amp;lt;/code&amp;gt; Size&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| Jump ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt;&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Access Control Info ==&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x170&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#ARM11 Local System Capabilities|ARM11 local system capabilities]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x170&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x80&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#ARM11 Kernel Capabilities|ARM11 kernel capabilities]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1F0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#ARM9 Access Control|ARM9 access control]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ARM11 Local System Capabilities ===&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| Program ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Core version (The Title ID low of the required [[FIRM]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0xC&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x2&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#Flag1|Flag1]] and [[#Flag2|Flag2]] (both implemented starting from [[8.0.0-18]]).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0xE&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#Flag0|Flag0]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0xF&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Priority&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;16*2&amp;lt;/code&amp;gt;)&lt;br /&gt;
| Resource limit descriptors. The first byte here controls the maximum allowed [[PMApp:SetAppResourceLimit|&amp;lt;code&amp;gt;CpuTime&amp;lt;/code&amp;gt;]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x30&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#Storage Info|Storage info]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x50&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;32*8&amp;lt;/code&amp;gt;)&lt;br /&gt;
| [[#Service Access Control|Service access control]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x150&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;2*8&amp;lt;/code&amp;gt;)&lt;br /&gt;
| Extended service access control, support for this was implemented with [[9.3.0-21|9.3.0-X]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x160&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0xF&amp;lt;/code&amp;gt;&lt;br /&gt;
| Reserved&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x16F&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Resource limit category. (0 = &amp;lt;code&amp;gt;APPLICATION&amp;lt;/code&amp;gt;, 1 = &amp;lt;code&amp;gt;SYS_APPLET&amp;lt;/code&amp;gt;, 2 = &amp;lt;code&amp;gt;LIB_APPLET&amp;lt;/code&amp;gt;, 3 = &amp;lt;code&amp;gt;OTHER&amp;lt;/code&amp;gt; (sysmodules running under the BASE memregion))&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Flag0 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bits&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0-1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Ideal processor&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2-3&amp;lt;/code&amp;gt;&lt;br /&gt;
| Affinity mask&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4-7&amp;lt;/code&amp;gt;&lt;br /&gt;
| Old3DS system mode&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Old3DS System Mode =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Prod&amp;lt;/code&amp;gt; (64MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Undefined&amp;lt;/code&amp;gt; (unusable)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Dev1&amp;lt;/code&amp;gt; (96MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Dev2&amp;lt;/code&amp;gt; (80MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Dev3&amp;lt;/code&amp;gt; (72MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Dev4&amp;lt;/code&amp;gt; (32MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;6-7&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Undefined&amp;lt;/code&amp;gt; Same as &amp;lt;code&amp;gt;Prod&amp;lt;/code&amp;gt;?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the exheader data, the ideal processor field is a bit-index, while in the &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; the ideal processor field is a bitmask. When the bit specified by the exheader field is not set in the &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; field, an error is returned.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;if((1 &amp;lt;&amp;lt; exheaderval) &amp;amp; accessdescval == 0) return error&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
During a FIRM-launch when a &amp;lt;code&amp;gt;TitleInfo&amp;lt;/code&amp;gt; structure was specified, the field at offset [[FIRM#FIRM_Launch_Parameters|0x400]] in the FIRM-launch parameters is set to the SystemMode of the specified title, however in some cases other values are written there. With [[8.0.0-18]] NS will now check the output of [[PTM|PTMSYSM]] command &amp;lt;code&amp;gt;0x040A0000&amp;lt;/code&amp;gt;, when the output is non-zero and a certain NS state field is value-zero, the following is executed otherwise this is skipped. With that check passed on [[8.0.0-18]], NS will then check (&amp;lt;code&amp;gt;Flag2 &amp;amp; 0xF&amp;lt;/code&amp;gt;). When that is &amp;lt;code&amp;gt;value2&amp;lt;/code&amp;gt;, the output value (used for the FIRM-launcher parameter field mentioned above) is set to &amp;lt;code&amp;gt;value7&amp;lt;/code&amp;gt;. Otherwise, when that value is non-zero, the output value is set to 6.&lt;br /&gt;
&lt;br /&gt;
==== Flag1 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bits&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;EnableL2Cache&amp;lt;/code&amp;gt; (Unknown what this actually does, New3DS-only presumably)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;cpuspeed_804MHz&amp;lt;/code&amp;gt; (Default &amp;quot;cpuspeed&amp;quot; when not set)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2-7&amp;lt;/code&amp;gt;&lt;br /&gt;
| Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In order for the exheader to have any of the above new bits set, the &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; must have the corresponding bit set, otherwise the invalid-exheader error is returned.&lt;br /&gt;
&lt;br /&gt;
Homebrew which runs under a title which has the above &amp;lt;code&amp;gt;cpuspeed&amp;lt;/code&amp;gt; flag set, runs much faster on New3DS. It&#039;s unknown how exactly the system handles these flags.&lt;br /&gt;
&lt;br /&gt;
When launching titles / perhaps other things with [[APT]], [[NS]] uses [[PTMSYSM:ConfigureNew3DSCPU]] with data which originally came from these flags; NS does this regardless of what the running 3DS system is. However, due to a bug(?) in NS the value sent to that command is always either 0x0 or 0x3. When calculating that value, the code only ever uses the cpuspeed field, not the cache field: code to actually load and check the value of the cache field appears to be missing.&lt;br /&gt;
&lt;br /&gt;
==== Flag2 ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bit&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0-3&amp;lt;/code&amp;gt;&lt;br /&gt;
| New3DS system mode&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4-7&amp;lt;/code&amp;gt;&lt;br /&gt;
| Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== New3DS System Mode =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Legacy&amp;lt;/code&amp;gt; (use Old3DS system mode)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Prod&amp;lt;/code&amp;gt; (124MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Dev1&amp;lt;/code&amp;gt; (178MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Dev2&amp;lt;/code&amp;gt; (124MB of usable application memory)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4-7&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Undefined&amp;lt;/code&amp;gt; Same as &amp;lt;code&amp;gt;Prod&amp;lt;/code&amp;gt;?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When in &amp;lt;code&amp;gt;Legacy&amp;lt;/code&amp;gt; mode, the actual memory layout is the same as in &amp;lt;code&amp;gt;New3DS Prod&amp;lt;/code&amp;gt;, except the available application memory as reported to the application is reduced to the Old3DS size.&lt;br /&gt;
&lt;br /&gt;
The exheader value for the New3DS system mode value must be ≤ to the &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; value, otherwise the invalid-exheader error is returned.&lt;br /&gt;
&lt;br /&gt;
==== Storage Info ====&lt;br /&gt;
Used in [[FSReg:Register]].&lt;br /&gt;
&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;&lt;br /&gt;
| Extdata ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;&lt;br /&gt;
| System savedata IDs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;&lt;br /&gt;
| Storage accessible unique IDs&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x18&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt;&lt;br /&gt;
| Filesystem access info&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x1F&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Other attributes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
File System Access Info:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bit and bitmask&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Category system application&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Category hardware check&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Category filesystem tool&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x8&amp;lt;/code&amp;gt;&lt;br /&gt;
| Debug&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| TWL card backup&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x20&amp;lt;/code&amp;gt;&lt;br /&gt;
| TWL NAND data&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x40&amp;lt;/code&amp;gt;&lt;br /&gt;
| BOSS&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x80&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[FS:OpenArchive|&amp;lt;code&amp;gt;sdmc:/&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;&lt;br /&gt;
| Core&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;9&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x200&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[Flash Filesystem|&amp;lt;code&amp;gt;nand:/ro/&amp;lt;/code&amp;gt;]] (Read Only)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x400&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[Flash Filesystem|&amp;lt;code&amp;gt;nand:/rw/&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;11&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x800&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[Flash Filesystem|&amp;lt;code&amp;gt;nand:/ro/&amp;lt;/code&amp;gt;]] (Write Access)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x1000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Category system settings&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;13&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x2000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Cardboard&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;14&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x4000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Export/Import IVS&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x8000&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[FS:OpenArchive|&amp;lt;code&amp;gt;sdmc:/&amp;lt;/code&amp;gt;]] (Write-only)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x10000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Switch cleanup (Introduced in [[3.0.0-5|3.0.0]]?) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;17&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x20000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Savedata move (Introduced in [[5.0.0-11|5.0.0]]) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;18&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x40000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Shop (Introduced in [[5.0.0-11|5.0.0]]) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;19&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x80000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Shell (Introduced in [[5.0.0-11|5.0.0]]) &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;20&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x100000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Category home menu (Introduced in [[6.0.0-11|6.0.0]])&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;21&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;0x200000&amp;lt;/code&amp;gt;&lt;br /&gt;
| Seed DB. Introduced in [[9.6.0-24|9.6.0-X]] [[FIRM]]. [[Home Menu]] has this bit set starting with [[9.6.0-24|9.6.0-X]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Other Attributes====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bit&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| Not use ROMFS&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use Extended savedata access.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When Bit1 is set, the &amp;quot;Extdata ID&amp;quot; and &amp;quot;Storage Accessable Unique IDs&amp;quot; regions are used to store a total of 6 &amp;quot;Accessible Save IDs&amp;quot;. Introduced in [[6.0.0-11|6.0.0]].&lt;br /&gt;
&lt;br /&gt;
==== Service Access Control ====&lt;br /&gt;
This is the list of [[Services_API|services]] which the process is allowed to access, this is registered with the [[Services|services]] manager. Each service listed in the exheader must be listed in the &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt;, otherwise the invalid exheader error is returned. The order of the services for exheader/&amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; doesn&#039;t matter. The &amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; can list services which are not in the exheader, but normally the service-access-control data for exheader/&amp;lt;code&amp;gt;AccessDesc&amp;lt;/code&amp;gt; are exactly the same.&lt;br /&gt;
&lt;br /&gt;
This list is submitted to [[SRVPM:RegisterProcess]].&lt;br /&gt;
&lt;br /&gt;
=== ARM11 Kernel Capabilities ===&lt;br /&gt;
The kernel capability descriptors are passed to [[SVC|svcCreateProcess]].&lt;br /&gt;
&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x70&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;28*4&amp;lt;/code&amp;gt;)&lt;br /&gt;
| Descriptors&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0x70&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;0x10&amp;lt;/code&amp;gt;&lt;br /&gt;
| Reserved&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
There are different descriptor types, determined by the number of leading ones in the binary value representation of bits 20-31. The different types are laid out as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Pattern of bits 20-31&lt;br /&gt;
! Type&lt;br /&gt;
! Fields&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b1110xxxxxxxx&amp;lt;/code&amp;gt;&lt;br /&gt;
| Interrupt info&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b11110xxxxxxx&amp;lt;/code&amp;gt;&lt;br /&gt;
| System call mask&lt;br /&gt;
| Bits 24-26: System call mask table index; Bits 0-23: mask&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b1111110xxxxx&amp;lt;/code&amp;gt;&lt;br /&gt;
| Kernel release version&lt;br /&gt;
| Bits 8-15: Major version; Bits 0-7: Minor version&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b11111110xxxx&amp;lt;/code&amp;gt;&lt;br /&gt;
| Handle table size&lt;br /&gt;
| Bits 0-18: size&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b111111110xxx&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[#ARM11_Kernel_Flags|Kernel flags]]&lt;br /&gt;
| See below&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b11111111100x&amp;lt;/code&amp;gt;&lt;br /&gt;
| Map IO/static address range&lt;br /&gt;
| Describes a memory mapping like the 0b111111111110 descriptor, but an entire range rather than a single page is mapped. Another 0b11111111100x descriptor must follow this one to denote the (exclusive) end of the address range to map. Bit20 on the first descriptor: map read-only (otherwise RW), bit20 on the second descriptor: map static (cacheable, otherwise IO if the bit is not set)  &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0b111111111110&amp;lt;/code&amp;gt;&lt;br /&gt;
| Map IO memory page&lt;br /&gt;
| Bits 0-19: page index to map (virtual address &amp;gt;&amp;gt; 12; the physical address is determined per-page according to [[Memory layout]]); Bit 20: Map read-only (otherwise read-write)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ARM11 Kernel Flags ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bit&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| Allow debug&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Force debug&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Allow non-alphanum&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
| Shared page writing&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Privilege priority&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;&lt;br /&gt;
| Allow &amp;lt;code&amp;gt;main()&amp;lt;/code&amp;gt; args&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
| Shared device memory&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt;&lt;br /&gt;
| Runnable on sleep&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;8-11&amp;lt;/code&amp;gt;&lt;br /&gt;
| Memory type (1: application, 2: system, 3: base)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;12&amp;lt;/code&amp;gt;&lt;br /&gt;
| [[Memory_layout#NATIVE_FIRM.2FSAFE_MODE_FIRM_Userland_Memory|Special memory]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;13&amp;lt;/code&amp;gt;&lt;br /&gt;
| Process has access to CPU core 2 (New3DS only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ARM9 Access Control ===&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;
| &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;15&amp;lt;/code&amp;gt;&lt;br /&gt;
| Descriptors&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0xF&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| ARM9 Descriptor Version. Originally this value had to be ≥ 2. Starting with [[9.3.0-21|9.3.0-X]] this value has to be either value 2 or value 3.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Descriptors:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Bit&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
| Mount [[Flash Filesystem|&amp;lt;code&amp;gt;nand:/&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&lt;br /&gt;
| Mount [[Flash Filesystem|&amp;lt;code&amp;gt;nand:/ro/&amp;lt;/code&amp;gt;]] (Write Access)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Mount [[Flash Filesystem|&amp;lt;code&amp;gt;twln:/&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
| Mount [[Flash Filesystem|&amp;lt;code&amp;gt;wnand:/&amp;lt;/code&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt;&lt;br /&gt;
| Mount card SPI&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;5&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use SDIF3&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt;&lt;br /&gt;
| Create seed&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;7&amp;lt;/code&amp;gt;&lt;br /&gt;
| Use card SPI&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt;&lt;br /&gt;
| SD application (Not checked)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;9&amp;lt;/code&amp;gt;&lt;br /&gt;
| Mount [[SD Filesystem|sdmc:/]] (Write Access)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ERR:SetUserString&amp;diff=22045</id>
		<title>ERR:SetUserString</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ERR:SetUserString&amp;diff=22045"/>
		<updated>2023-01-10T20:56:06Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Data is actually copied to static buffer, I believe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Request=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code [0x00020042]&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Size&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| (Size &amp;lt;&amp;lt; 14) &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; 2&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| char*, String&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Response=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Index Word&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Header code&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Result code&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=11.16.0-48&amp;diff=21953</id>
		<title>11.16.0-48</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=11.16.0-48&amp;diff=21953"/>
		<updated>2022-08-30T14:06:49Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: rip smpwn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Old3DS+New3DS 11.16.0-48 system update was released on August 30, 2022 (UTC). This Old3DS update was released for the following regions: USA, EUR, JPN, CHN, KOR, and TWN. This New3DS update was released for the following regions: USA, EUR, JPN, CHN, KOR, and TWN.&lt;br /&gt;
&lt;br /&gt;
Security flaws fixed: &amp;lt;fill this in manually later, see the updatedetails page from the ninupdates-report page(s) once available for now&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This update does NOT break Luma3DS.&lt;br /&gt;
&lt;br /&gt;
==Change-log==&lt;br /&gt;
[https://en-americas-support.nintendo.com/app/answers/detail/a_id/231/~/system-menu-update-history Official] USA change-log:&lt;br /&gt;
*   &lt;br /&gt;
*    Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.&lt;br /&gt;
*    &lt;br /&gt;
*   &lt;br /&gt;
&lt;br /&gt;
==System Titles==&lt;br /&gt;
The following was updated: NVer/CVer, eShop, friends-sysmodule, NATIVE_FIRM, mint, Web browser Data (title 0004001B00018002). EULA was also updated only for JPN.&lt;br /&gt;
&lt;br /&gt;
The following changed in the RomFs for 0004001B00018002:&lt;br /&gt;
* &amp;quot;/js/cave.js differ&amp;quot; updated&lt;br /&gt;
* &amp;quot;/js/cave.min.js&amp;quot; updated&lt;br /&gt;
* &amp;quot;/json/&amp;quot;: The &amp;quot;message_&amp;quot; files for localization were updated.&lt;br /&gt;
* &amp;quot;/version.txt&amp;quot; updated&lt;br /&gt;
&lt;br /&gt;
===FIRM===&lt;br /&gt;
Besides the usual changes (version bumps / anti-downgrade list), the only other change was updating sm.&lt;br /&gt;
&lt;br /&gt;
The changes in SM added bound checks to RegisterService and RegisterPort, thereby fixing smpwn (the only other change was removing an unused field in a structure).&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
System update report(s):&lt;br /&gt;
* [https://yls8.mtheall.com/ninupdates/reports.php?date=2022-08-30_00-00-33&amp;amp;sys=ctr]&lt;br /&gt;
* [https://yls8.mtheall.com/ninupdates/reports.php?date=2022-08-30_00-00-41&amp;amp;sys=ktr]&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CONFIG9_Registers&amp;diff=21831</id>
		<title>CONFIG9 Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CONFIG9_Registers&amp;diff=21831"/>
		<updated>2022-03-20T16:13:31Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: xdma config&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_SYSPROT9|CFG9_SYSPROT9]]&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 1&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_SYSPROT11|CFG9_SYSPROT11]]&lt;br /&gt;
| 0x10000001&lt;br /&gt;
| 1&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_RST11|CFG9_RST11]]&lt;br /&gt;
| 0x10000002&lt;br /&gt;
| 1&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| CFG9_DEBUGCTL&lt;br /&gt;
| 0x10000004&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_XDMA_CNT|CFG9_XDMA_CNT]]&lt;br /&gt;
| 0x10000008&lt;br /&gt;
| 1&lt;br /&gt;
| Boot9, Process9, TwlProcess9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_CARDCTL|CFG9_CARDCTL]]&lt;br /&gt;
| 0x1000000C&lt;br /&gt;
| 2&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_CARDSTATUS|CFG9_CARDSTATUS]]&lt;br /&gt;
| 0x10000010&lt;br /&gt;
| 1&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| CFG9_CARDCYCLES0&lt;br /&gt;
| 0x10000012&lt;br /&gt;
| 2&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| CFG9_CARDCYCLES1&lt;br /&gt;
| 0x10000014&lt;br /&gt;
| 2&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_SDMMCCTL|CFG9_SDMMCCTL]]&lt;br /&gt;
| 0x10000020&lt;br /&gt;
| 2&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10000100&lt;br /&gt;
| 2&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG9_EXTMEMCNT9|CFG9_EXTMEMCNT9]]&lt;br /&gt;
| 0x10000200&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_MPCORECFG|CFG9_MPCORECFG]]&lt;br /&gt;
| 0x10000FFC&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_BOOTENV|CFG9_BOOTENV]]&lt;br /&gt;
| 0x10010000&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_UNITINFO|CFG9_UNITINFO]]&lt;br /&gt;
| 0x10010010&lt;br /&gt;
| 1&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG9_TWLUNITINFO|CFG9_TWLUNITINFO]]&lt;br /&gt;
| 0x10010014&lt;br /&gt;
| 1&lt;br /&gt;
| Process9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_SYSPROT9 ==&lt;br /&gt;
CFG9_SYSPROT9 is used to permanently disable certain security-sensitive ARM9 memory areas until the next hard reset.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Disables ARM9 [[Memory_layout|bootrom]](+0x8000) when set to 1, and enables access to [[Memory_layout|FCRAM]]. Cannot be cleared to 0 once set to 1.&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Disables [[OTP_Registers|OTP area]] when set to 1. Cannot be cleared to 0 once set to 1.&lt;br /&gt;
| NewKernel9Loader, Process9&lt;br /&gt;
|-&lt;br /&gt;
| 31-2&lt;br /&gt;
| Not used&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On Old 3DS, NATIVE_FIRM reads CFG9_SYSPROT9 to know whether it has previously initialized the TWL console-unique keys using the OTP data.  After setting the TWL console-unique keys, NATIVE_FIRM sets CFG9_SYSPROT9 bit 1 to disable the OTP area.  In subsequent FIRM launches prior to the next reset, NATIVE_FIRM will see that the OTP area is disabled, and skip this step.&lt;br /&gt;
&lt;br /&gt;
On New 3DS, the above is instead done by the [[FIRM#New_3DS_FIRM|Kernel9 loader]].  In addition to using the OTP data for initializing the TWL console-unique keys, the Kernel9 loader will generate the decryption key for NATIVE_FIRM.  The final keyslot for NATIVE_FIRM is preserved, so that at a non-reset FIRM launch, the keyslot can be reused, since the OTP would then be inaccessible.&lt;br /&gt;
&lt;br /&gt;
== CFG9_SYSPROT11 ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Disables ARM11 [[Memory_layout|bootrom]](+0x8000) when set to 1, and enables access to [[Memory_layout|FCRAM]]. Cannot be cleared to 0 once set to 1.&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| 31-1&lt;br /&gt;
| Not used&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_RST11 ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Presumably takes ARM11 out of reset. Cannot be set to 1 once it has been cleared.&lt;br /&gt;
| Boot9&lt;br /&gt;
|-&lt;br /&gt;
| 31-1&lt;br /&gt;
| Not used&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_XDMA_CNT ==&lt;br /&gt;
&lt;br /&gt;
Write 1 to enable XDMA for the device, 0 to disable. Always enabled for CTRCARD (ids 0 and 1), NTRCARD (id 8), and SHA (id 6 for infifo and 7 for outfifo).&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| SDIO controller 1 (eMMC and usually SD card; XDMA device ID: 2)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| SDIO controller 3 (SD card if configured so; ID: 3)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| AES Input FIFO (ID: 4)&lt;br /&gt;
| Boot9, Process9, TwlProcess9&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| AES Output FIFO (ID: 5)&lt;br /&gt;
| Boot9, Process9, TwlProcess9&lt;br /&gt;
|-&lt;br /&gt;
| 31-4&lt;br /&gt;
| Reserved&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_CARDCTL ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 1-0&lt;br /&gt;
| Gamecard active controller select (0=NTRCARD, 1=?, 2=CTRCARD0, 3=CTRCARD1)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 1 = Switch to [[SPICARD_Registers|SPICARD]] interface (savegames).&lt;br /&gt;
| Process9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Depending on the gamecard controller that has been selected, one of the following gamecard registers will become active:&lt;br /&gt;
* Selecting NTRCARD will activate the register space at [[NTRCARD|0x10164000]].&lt;br /&gt;
* Selecting CTRCARD0 will activate the register space at [[CTRCARD|0x10004000]].&lt;br /&gt;
* Selecting CTRCARD1 will activate the register space at [[CTRCARD|0x10005000]].&lt;br /&gt;
&lt;br /&gt;
== CFG9_CARDSTATUS ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Cartridge-slot empty (0=inserted, 1=empty)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 3-2&lt;br /&gt;
| ?&lt;br /&gt;
| Process9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_SDMMCCTL ==&lt;br /&gt;
This register controls power of multiple ports/controllers and allows to map controller 3 to ARM9 or ARM11. The SD card can be accessed on ARM11 by setting bit 8 and clearing bit 9.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Controller 1/3 port 0 power (SD card) (1=off)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Controller 1 port 1 power (eMMC) (1=off)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Controller 2 port 0 power (WiFi SDIO) (1=off)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Controller 3 port 1 power? Set at cold boot.&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 4-5&lt;br /&gt;
| Unused.&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Wifi port related? Pull up? Set at cold boot.&lt;br /&gt;
| -&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Controller 3 mapping (0=ARM9 0x10007000, 1=ARM11 0x10100000)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SD card controller select (0=0x10007000/0x10100000, 1=0x10006000)&lt;br /&gt;
| Process9&lt;br /&gt;
|-&lt;br /&gt;
| 10-15&lt;br /&gt;
| Unused.&lt;br /&gt;
| -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_EXTMEMCNT9 ==&lt;br /&gt;
This register is New3DS-only.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Hide extended ARM9 memory (0=hidden, 1=shown)&lt;br /&gt;
| Kernel9 (New3DS)&lt;br /&gt;
|-&lt;br /&gt;
| 31-1&lt;br /&gt;
| Reserved&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG9_MPCORECFG ==&lt;br /&gt;
Identical to [[PDN#PDN_MPCORE_CFG|PDN_MPCORE_CFG]].&lt;br /&gt;
&lt;br /&gt;
== CFG9_BOOTENV ==&lt;br /&gt;
This register is used to determine what the previous running FIRM was. Its value is kept following an MCU reboot. Its initial value (on a cold boot) is 0. NATIVE_FIRM [[Development_Services_PXI|sets it to 1]] on shutdown/FIRM launch. [[Legacy_FIRM_PXI|LGY FIRM]] writes value 3 here when launching a TWL title, and writes value 7 when launching an AGB title.&lt;br /&gt;
&lt;br /&gt;
NATIVE_FIRM will only launch titles if this is not value 0, and will only save the [[Flash_Filesystem|AGB_FIRM savegame]] to SD if this is value 7.&lt;br /&gt;
&lt;br /&gt;
== CFG9_UNITINFO ==&lt;br /&gt;
This 8-bit register is value zero for retail, non-zero for dev/debug units.&lt;br /&gt;
&lt;br /&gt;
== CFG9_TWLUNITINFO ==&lt;br /&gt;
In the console-unique TWL key-init/etc function the ARM9 copies the u8 value from REG_UNITINFO to this register.&lt;br /&gt;
&lt;br /&gt;
This is also used by TWL_FIRM Process9.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=NDMA_Registers&amp;diff=21618</id>
		<title>NDMA Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=NDMA_Registers&amp;diff=21618"/>
		<updated>2021-11-10T20:48:54Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Add device to device modes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;3DS NDMA has 8 channels. The first 0x100-bytes of this IO mem is mirrored at 0x10002100, repeated every 0x100-bytes until the end of the 0x1000-byte IO mem. NDMA can access the Arm9 bootrom, including the protected part before it is locked out.&lt;br /&gt;
&lt;br /&gt;
= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_GLOBAL_CNT|NDMA_GLOBAL_CNT]]&lt;br /&gt;
|  0x10002000&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_SRC_ADDR|NDMA_SRC_ADDR]](n)&lt;br /&gt;
|  0x10002004 + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_DST_ADDR|NDMA_DST_ADDR]](n)&lt;br /&gt;
|  0x10002008 + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_TRANSFER_CNT|NDMA_TRANSFER_CNT]](n)&lt;br /&gt;
|  0x1000200c + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_WRITE_CNT|NDMA_WRITE_CNT]](n)&lt;br /&gt;
|  0x10002010 + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_BLOCK_CNT|NDMA_BLOCK_CNT]](n)&lt;br /&gt;
|  0x10002014 + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_FILL_DATA|NDMA_FILL_DATA]](n)&lt;br /&gt;
|  0x10002018 + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
|  [[#NDMA_CNT|NDMA_CNT]](n)&lt;br /&gt;
|  0x1000201C + (n*0x1c)&lt;br /&gt;
|  4&lt;br /&gt;
|  Boot9, Kernel9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NDMA_GLOBAL_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  0&lt;br /&gt;
|  Global enable?&lt;br /&gt;
|-&lt;br /&gt;
|  19-16&lt;br /&gt;
|  Cycle selection.&lt;br /&gt;
|-&lt;br /&gt;
|  31&lt;br /&gt;
|  DMA arbitration method. 0=Fixed method, 1=Round robin&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NDMA_SRC_ADDR ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  31-0&lt;br /&gt;
|  Source data address. Must be multiple of 4.&lt;br /&gt;
|}&lt;br /&gt;
Like old DMA, NDMA_SRC_ADDR is copied to internal registers when written to.&lt;br /&gt;
&lt;br /&gt;
== NDMA_DST_ADDR ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  BIT&lt;br /&gt;
!  DESCRIPTION&lt;br /&gt;
|-&lt;br /&gt;
|  31-0&lt;br /&gt;
|  Destination data address. Must be multiple of 4.&lt;br /&gt;
|}&lt;br /&gt;
Like old DMA, NDMA_DST_ADDR is copied to internal registers when written to.&lt;br /&gt;
&lt;br /&gt;
== NDMA_TRANSFER_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  27-0&lt;br /&gt;
|  Total number of words transferred.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NDMA_WRITE_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  23-0&lt;br /&gt;
|  Number of words to transfer.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NDMA_BLOCK_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  15-0&lt;br /&gt;
|  Interval timer.&lt;br /&gt;
|-&lt;br /&gt;
|  17-16&lt;br /&gt;
|  Prescaler. 0=System freq, 1=1/4th freq, 2=1/16th freq, 3=1/64th freq.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NDMA_FILL_DATA ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  31-0&lt;br /&gt;
|  Fill data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== NDMA_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
|  4-0&lt;br /&gt;
|  Device to device startup mode&lt;br /&gt;
|-&lt;br /&gt;
|  11-10&lt;br /&gt;
|  Destination address update method. 0=Increment, 1=Decrement, 2=Fixed.&lt;br /&gt;
|-&lt;br /&gt;
|  12&lt;br /&gt;
|  Destination address reload flag.&lt;br /&gt;
|-&lt;br /&gt;
|  14-13&lt;br /&gt;
|  Source address update method. 0=Increment, 1=Decrement, 2=Fixed, 3=No address (for filling)&lt;br /&gt;
|-&lt;br /&gt;
|  15&lt;br /&gt;
|  Source address reload flag.&lt;br /&gt;
|-&lt;br /&gt;
|  19-16&lt;br /&gt;
|  Block transfer word count = (1&amp;lt;&amp;lt;x) words.&lt;br /&gt;
|-&lt;br /&gt;
|  27-24&lt;br /&gt;
|  Startup mode.&lt;br /&gt;
|-&lt;br /&gt;
|  28&lt;br /&gt;
|  Immediate mode.&lt;br /&gt;
|-&lt;br /&gt;
|  29&lt;br /&gt;
|  Repeating mode.&lt;br /&gt;
|-&lt;br /&gt;
|  30&lt;br /&gt;
|  IRQ enable&lt;br /&gt;
|-&lt;br /&gt;
|  31&lt;br /&gt;
|  Enable/busy flag.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Startup modes (4-0) ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| TIMER0&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| TIMER1&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| TIMER2&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| TIMER3&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| CTRCARD0&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| CTRCARD1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| SDIO1&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SDIO3&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| AES in ([[AES_Registers#AES_WRFIFO.2FAES_RDFIFO|WRFIFO]])&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| AES out ([[AES_Registers#AES_WRFIFO.2FAES_RDFIFO|RDFIFO]])&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| SHA in ([[SHA_Registers#SHA_FIFO|INFIFO]])&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| SHA out ([[SHA_Registers#SHA_FIFO|INFIFO]], source data readback mode)&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| NTRCARD&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Device to device (subclassed by bits 4-0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Device to device startup modes (4-0) ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| CTRCARD0 -&amp;gt; AES&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| CTRCARD1 -&amp;gt; AES&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| AES -&amp;gt; CTRCARD0&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| AES -&amp;gt; CTRCARD1&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| CTRCARD0 -&amp;gt; SHA&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| CTRCARD1 -&amp;gt; SHA&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| SHA -&amp;gt; CTRCARD0&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| SHA -&amp;gt; CTRCARD1&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| SDIO1 -&amp;gt; AES&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| SDIO3 -&amp;gt; AES&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| AES -&amp;gt; SDIO1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| AES -&amp;gt; SDIO3&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| SDIO1 -&amp;gt; SHA&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| SDIO3 -&amp;gt; SHA&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| SHA -&amp;gt; SDIO1&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| SHA -&amp;gt; SDIO3&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| AES -&amp;gt; SHA&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| SHA -&amp;gt; AES&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Block transfers ==&lt;br /&gt;
First, a word is always 32 bits. Second, the block transfer specified in NDMA_CNT is the smallest atom of data that will be transferred in a burst. The bus is monopolized until this block is transferred, without splitting up.&lt;br /&gt;
&lt;br /&gt;
The next block transfer will happen after the specified time in the NDMA_BLOCK_CNT interval timer, until done.&lt;br /&gt;
&lt;br /&gt;
== Immediate mode ==&lt;br /&gt;
Transfers the words specified in NDMA_WRITE_CNT immediately following block transfer rules. NDMA_TRANSFER_CNT and repeating mode are ignored.&lt;br /&gt;
&lt;br /&gt;
== Repeating mode ==&lt;br /&gt;
Transfers the words specified in NDMA_WRITE_CNT following the startup mode event. NDMA_TRANSFER_CNT is ignored.&lt;br /&gt;
&lt;br /&gt;
== No immediate and no repeating mode ==&lt;br /&gt;
Transfers the words specified in NDMA_WRITE_CNT for each startup event, and gets disabled when the total number of words in NDMA_TRANSFER_CNT are transferred.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=RSA_Registers&amp;diff=21481</id>
		<title>RSA Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=RSA_Registers&amp;diff=21481"/>
		<updated>2021-02-05T22:34:10Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* RSA_SLOTCNT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
The RSA module is essentially a hardware-accelerated modular exponentiation engine. It is specially optimized for RSA applications, so its behavior can be incoherent when RSA&#039;s invariants are broken.&lt;br /&gt;
&lt;br /&gt;
=== Observed edge cases ===&lt;br /&gt;
* if 2 divides mod, output == 0&lt;br /&gt;
&lt;br /&gt;
= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_CNT|RSA_CNT]]&lt;br /&gt;
| 0x1000B000&lt;br /&gt;
| 0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| RSA_?&lt;br /&gt;
| 0x1000B0F0&lt;br /&gt;
| 0x04&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_SLOT|RSA_SLOT]]0&lt;br /&gt;
| 0x1000B100&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_SLOT|RSA_SLOT]]1&lt;br /&gt;
| 0x1000B110&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_SLOT|RSA_SLOT]]2&lt;br /&gt;
| 0x1000B120&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_SLOT|RSA_SLOT]]3&lt;br /&gt;
| 0x1000B130&lt;br /&gt;
| 0x10&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_EXPFIFO|RSA_EXPFIFO]]&lt;br /&gt;
| 0x1000B200&lt;br /&gt;
| 0x100 (can handle u32 writes to any aligned position in the FIFO)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_MOD|RSA_MOD]]&lt;br /&gt;
| 0x1000B400&lt;br /&gt;
| 0x100&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#RSA_TXT|RSA_TXT]]&lt;br /&gt;
| 0x1000B800&lt;br /&gt;
| 0x100&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RSA_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Start (1=Enable/Busy, 0=Idle)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enable (1=enable, 0=disable)&lt;br /&gt;
|-&lt;br /&gt;
| 4-7&lt;br /&gt;
| Keyslot (Bit6-7 don&#039;t actually affect the keyslot)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Endianness (1=Little endian, 0=Big endian). Affects RSA_EXPFIFO, RSA_MOD, and RSA_TXT.&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Word order (1=Normal order, 0=Reversed order). Affects RSA_MOD and RSA_TXT.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RSA_SLOT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| [[#RSA_SLOTCNT|RSA_SLOTCNT]]&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x4&lt;br /&gt;
|-&lt;br /&gt;
| [[#RSA_SLOTSIZE|RSA_SLOTSIZE]]&lt;br /&gt;
| 0x4&lt;br /&gt;
| 0x4&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| 0x8&lt;br /&gt;
| 0x4&lt;br /&gt;
|-&lt;br /&gt;
| ?&lt;br /&gt;
| 0xC&lt;br /&gt;
| 0x4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== RSA_SLOTCNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Key status (1=Key has been set, 0=Key has not been set yet)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Key write-protect, this bit is RW. (0 = no protection, 1 = protected)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Key read-protect, this bit is RW. (0 = no protection, 1 = protected)&lt;br /&gt;
|-&lt;br /&gt;
| 30-3&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| Key slot protect. Makes all other bits in this reg read-only until reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Before writing RSA_EXPFIFO/RSA_MOD, bit0 here should be cleared when bit31 is already clear. Otherwise, the ARM9 will hang when attempting to write to RSA_EXPFIFO.&lt;br /&gt;
&lt;br /&gt;
== RSA_SLOTSIZE ==&lt;br /&gt;
This contains the RSA size for this slot, in words. Normally this is 0x40 for RSA-2048.&lt;br /&gt;
&lt;br /&gt;
== RSA_EXPFIFO ==&lt;br /&gt;
The 0x100-byte private or public exponent is written to this write-only FIFO.&lt;br /&gt;
&lt;br /&gt;
== RSA_MOD ==&lt;br /&gt;
The RSA key modulus for the selected keyslot can be written here. When writing the RSA modulus, the modulus must align with the end of the register area.&lt;br /&gt;
&lt;br /&gt;
Writing to RSA_MOD does not change the exponent written with RSA_EXPFIFO.  An attack based on the [[wikipedia:Pohlig-Hellman algorithm|Pohlig-Hellman algorithm]] exists to &amp;quot;read&amp;quot; the contents of RSA_EXPFIFO as a result (see [[3DS System Flaws#Hardware|3DS System Flaws]]).&lt;br /&gt;
&lt;br /&gt;
== RSA_TXT ==&lt;br /&gt;
The RSA signature can be written here, and the data read from here is the message. When writing the RSA signature, the signature must be prepended with zeroes until it is a multiple of 8 bytes, and the end of the signature must align with the end of the register area.&lt;br /&gt;
&lt;br /&gt;
The PKCS message padding must be manually checked by software, as hardware will only do raw RSA operations.&lt;br /&gt;
&lt;br /&gt;
== Keyslots usage ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Keyslot&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Arbitrary&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| [[NCCH#CXI|CXI]] access desc (following the exheader)&lt;br /&gt;
|-&lt;br /&gt;
| 2-3&lt;br /&gt;
| Initialized by the ARM9 bootrom, but not used by any of the [[FIRM]]s. It&#039;s unknown what the ARM9 bootrom uses these for, if anything.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=IO_Registers&amp;diff=21480</id>
		<title>IO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=IO_Registers&amp;diff=21480"/>
		<updated>2021-02-04T21:08:51Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Old3DS&lt;br /&gt;
! A9/A11&lt;br /&gt;
! Category&lt;br /&gt;
! Physaddr&lt;br /&gt;
! Used by&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[CONFIG9 Registers]]&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[IRQ Registers]]&lt;br /&gt;
| 0x10001000&lt;br /&gt;
| Boot9, Process9, Kernel9&lt;br /&gt;
| ARM9 Interrupt Masking&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[NDMA Registers]]&lt;br /&gt;
| 0x10002000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
| AHB DMA Engine&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[TIMER Registers]]&lt;br /&gt;
| 0x10003000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[CTRCARD Registers]]&lt;br /&gt;
| 0x10004000 / 0x10005000&lt;br /&gt;
| Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[EMMC Registers]]&lt;br /&gt;
| 0x10006000 / 0x10007000&lt;br /&gt;
| Boot9, Process9, NewKernel9Loader&lt;br /&gt;
| SD(IO) controller 1 and 3. 3 is normally mapped to ARM11.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[PXI Registers]]&lt;br /&gt;
| 0x10008000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[AES Registers]]&lt;br /&gt;
| 0x10009000&lt;br /&gt;
| Boot9, Process9, NewKernel9Loader&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[SHA Registers]]&lt;br /&gt;
| 0x1000A000&lt;br /&gt;
| Boot9, Process9, NewKernel9Loader&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[RSA Registers]]&lt;br /&gt;
| 0x1000B000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[Corelink DMA Engines|XDMA Registers]]&lt;br /&gt;
| 0x1000C000&lt;br /&gt;
| Boot9, Kernel9&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.subset.primecell.system/index.html CoreLink™ DMA-330 r0p0] (AXI busmaster, two channels, uses 32-bit bus width instead of 64).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[SPICARD Registers]]&lt;br /&gt;
| 0x1000D800&lt;br /&gt;
| Process9&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[CONFIG Registers]]&lt;br /&gt;
| 0x10010000&lt;br /&gt;
| Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| PRNG Registers&lt;br /&gt;
| 0x10011000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
| Used as entropy-source for seeding random number generators.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[OTP Registers]]&lt;br /&gt;
| 0x10012000&lt;br /&gt;
| Boot9, Kernel9, NewKernel9Loader&lt;br /&gt;
| Top secret.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[ARM7|ARM7 Registers]]&lt;br /&gt;
| 0x10018000&lt;br /&gt;
| TwlProcess9&lt;br /&gt;
| Used to setup the ARM7 core for AGB/TWL&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| TMIO SD(IO) controller 3&lt;br /&gt;
| 0x10100000&lt;br /&gt;
| &lt;br /&gt;
| NWM references this controller but doesn&#039;t have access to it.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[HASH Registers]]&lt;br /&gt;
| 0x10101000&lt;br /&gt;
| [[Filesystem services]]&lt;br /&gt;
| These registers function the same as the [[SHA Registers]], with the exception of the FIFO being located at 0x10301000.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[Y2R Registers]]&lt;br /&gt;
| 0x10102000&lt;br /&gt;
| [[Camera Services]]&lt;br /&gt;
| y2r&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[CSND Registers]]&lt;br /&gt;
| 0x10103000&lt;br /&gt;
| TwlBg, [[Codec Services]], [[CSND Services]], [[DSP Services]]&lt;br /&gt;
| Sound hardware.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MTX_Registers|LgyFb bottom screen]]&lt;br /&gt;
| 0x10110000&lt;br /&gt;
| TwlBg&lt;br /&gt;
| IO registers used to access legacy output framebuffer, as well as configure the upscaling filter.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MTX_Registers|LgyFb top screen]]&lt;br /&gt;
| 0x10111000&lt;br /&gt;
| TwlBg&lt;br /&gt;
| IO registers used to access legacy output framebuffer, as well as configure the upscaling filter.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[Camera Registers]] &lt;br /&gt;
| 0x10120000&lt;br /&gt;
| [[Camera Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[Camera Registers]]&lt;br /&gt;
| 0x10121000&lt;br /&gt;
| [[Camera Services]]&lt;br /&gt;
| Mirror of 0x10120000?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[WIFI Registers]]&lt;br /&gt;
| 0x10122000&lt;br /&gt;
| [[NWM Services]]&lt;br /&gt;
| WIFI SDIO bus registers&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10123000&lt;br /&gt;
| [[NWM Services]]&lt;br /&gt;
| WIFI?&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10130000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10131000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10132000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| &lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[CONFIG11 Registers]]&lt;br /&gt;
| 0x10140000&lt;br /&gt;
| Process9, Boot11, Kernel11, TwlBg, [[DSP Services]], [[NWM Services]], [[SPI Services]]&lt;br /&gt;
| System configuration. &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[PDN Registers]]&lt;br /&gt;
| 0x10141000&lt;br /&gt;
| Process9, Boot11, Kernel11, TwlBg, [[Codec Services]], [[NWM Services]], [[SPI Services]], [[PDN Services]]&lt;br /&gt;
| Power management&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[SPI Registers]]&lt;br /&gt;
| 0x10142000&lt;br /&gt;
| TwlBg, [[SPI Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[SPI Registers]]&lt;br /&gt;
| 0x10143000&lt;br /&gt;
| TwlBg, dmnt Module&lt;br /&gt;
| Debugger related?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2C Registers]]&lt;br /&gt;
| 0x10144000&lt;br /&gt;
| Boot11, Kernel11, TwlBg, [[I2C Services]]&lt;br /&gt;
| 3DS I2C interface (MCU + Cameras + LCD)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2S Registers]]&lt;br /&gt;
| 0x10145000&lt;br /&gt;
| TwlBg, AgbBg, [[Codec Services]]&lt;br /&gt;
| Sound input/output lines&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[HID Registers]]&lt;br /&gt;
| 0x10146000&lt;br /&gt;
| Boot9, Boot11, Kernel11, TwlBg, [[HID Services]], dlp Services&lt;br /&gt;
| See [[PAD]].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[GPIO Registers]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| Boot11, TwlBg, [[GPIO Services]], [[DSP Services]](v0)&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2C Registers]]&lt;br /&gt;
| 0x10148000&lt;br /&gt;
| TwlBg, [[I2C Services]]&lt;br /&gt;
| 3DS I2C interface (Gyro + IR)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[SPI Registers]]&lt;br /&gt;
| 0x10160000&lt;br /&gt;
| Boot9, TwlBg, [[SPI Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2C Registers]]&lt;br /&gt;
| 0x10161000&lt;br /&gt;
| Boot11, TwlBg, [[I2C Services]]&lt;br /&gt;
| TWL I2C interface (MCU + Cameras)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MIC Registers]]&lt;br /&gt;
| 0x10162000&lt;br /&gt;
| [[MIC Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[PXI Registers]]&lt;br /&gt;
| 0x10163000&lt;br /&gt;
| Boot11, Kernel11, TwlBg, [[PXI Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[NTRCARD Registers]]&lt;br /&gt;
| 0x10164000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10165000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10170000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI Registers, see [http://problemkaputt.de/gbatek.htm#dswirelesscommunications GBATek].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10171000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI Registers (mirror)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|?&lt;br /&gt;
| 0x10172000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Unused?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|?&lt;br /&gt;
| 0x10173000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Unused?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10174000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI RAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10175000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI RAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10176000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Registers (mirror)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10177000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Registers (mirror)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10178000 - 0x10180000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI WS1 Region&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[Corelink DMA Engines|CDMA]]&lt;br /&gt;
| 0x10200000&lt;br /&gt;
| Boot11, Kernel11&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.subset.primecell.system/index.html CoreLink™ DMA-330 r0p0] (eight channels). Only used by bootrom on New3DS.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| FCRAM configuration&lt;br /&gt;
| 0x10201000&lt;br /&gt;
| TwlBg, Kernel11 (dead code)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[LCD Registers]]&lt;br /&gt;
| 0x10202000&lt;br /&gt;
| TwlBg, Kernel11, [[GSP Services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[DSP Registers]]&lt;br /&gt;
| 0x10203000&lt;br /&gt;
| [[DSP Services]]&lt;br /&gt;
| see the &amp;quot;DSi XpertTeak&amp;quot; section in [http://problemkaputt.de/gba.htm no$gba] help.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10204000&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11&lt;br /&gt;
| [[Corelink DMA Engines|CDMA]]&lt;br /&gt;
| 0x10206000&lt;br /&gt;
| NewKernel11&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.ddi0424d/index.html CoreLink™ DMA-330 r1p2] (eight channels). This is the DMA engine actually being used by the New3DS ARM11 kernel.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10207000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| New 3DS only?&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| AXI&lt;br /&gt;
| 0x1020F000&lt;br /&gt;
| TwlBg, [[GSP Services]]&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.ddi0422a/CHDGHIID.html CoreLink™ NIC-301 r1p0].&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| AHB (or AXI?) FIFOs region&lt;br /&gt;
| 0x10300000-0x10340000&lt;br /&gt;
|&lt;br /&gt;
| Pages present in this region correspond to the same respective devices in the 0x10100000-0x10140000 region but don&#039;t hold the same registers. They hold the FIFOs instead: the HASH FIFO register is located at 0x10301000. The LgyFb scaler data FIFO are located at 0x10310000 (top) and 0x10311000 (bot), etc. Needed for DMA.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[GPU/External_Registers|GPU Registers]]&lt;br /&gt;
| 0x10400000&lt;br /&gt;
| Boot11, Kernel11, [[GSP Services]]&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
IO registers starting at physical address 0x10200000 are not accessible from the ARM9 (which includes all LCD/GPU registers). It seems IO registers below physical address 0x10100000 are not accessible from the ARM11 bus.&lt;br /&gt;
&lt;br /&gt;
ARM11 kernel virtual address mappings for these registers varies for different builds. For ARM11 user mode applications you have:&lt;br /&gt;
 physaddr = virtaddr - 0x1EC00000 + 0x10100000&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21479</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21479"/>
		<updated>2021-02-04T20:38:53Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* Private Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Kernel11 to sync cores in crt0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Boot11 and Kernel11 to kickstart Core1/2/3, and by Kernel11 to sync cores in crt0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter. Also used by Kernel11 during crt0 to sync up.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened (GPIO1_2 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed (GPIO1_2 rising edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touch Screen pressed (GPIO1_1 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones inserted (GPIO2_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| TWL depop circuit (GPIO2_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick interrupt (GPIO3_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA interrupt (active-low) (GPIO3_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro interrupt (GPIO3_2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output) (GPIO3_3)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA TX-RC (output) (GPIO3_4)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA RXD (GPIO3_5)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output1 (?) (GPIO3_6)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output2 (?) (GPIO3_7)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones button/half-inserted (active-low) (GPIO3_8)&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU interrupt (GPIO3_9)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC interrupt (?) (GPIO3_10)&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| QTM output (?) (GPIO3_11)&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21478</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21478"/>
		<updated>2021-02-04T19:52:04Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Kernel11 to sync cores in crt0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Boot11 and Kernel11 to kickstart Core1/2/3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened (GPIO1_2 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed (GPIO1_2 rising edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touch Screen pressed (GPIO1_1 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones inserted (GPIO2_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| TWL depop circuit (GPIO2_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick interrupt (GPIO3_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA interrupt (active-low) (GPIO3_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro interrupt (GPIO3_2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output) (GPIO3_3)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA TX-RC (output) (GPIO3_4)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA RXD (GPIO3_5)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output1 (?) (GPIO3_6)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output2 (?) (GPIO3_7)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones button/half-inserted (active-low) (GPIO3_8)&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU interrupt (GPIO3_9)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC interrupt (?) (GPIO3_10)&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| QTM output (?) (GPIO3_11)&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=IO_Registers&amp;diff=21475</id>
		<title>IO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=IO_Registers&amp;diff=21475"/>
		<updated>2021-01-30T15:14:13Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Overview =&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Old3DS&lt;br /&gt;
! A9/A11&lt;br /&gt;
! Category&lt;br /&gt;
! Physaddr&lt;br /&gt;
! Used by&lt;br /&gt;
! Comments&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[CONFIG9 Registers]]&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[IRQ Registers]]&lt;br /&gt;
| 0x10001000&lt;br /&gt;
| Boot9, Process9, Kernel9&lt;br /&gt;
| ARM9 Interrupt Masking&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[NDMA Registers]]&lt;br /&gt;
| 0x10002000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
| AHB DMA Engine&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[TIMER Registers]]&lt;br /&gt;
| 0x10003000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[CTRCARD Registers]]&lt;br /&gt;
| 0x10004000 / 0x10005000&lt;br /&gt;
| Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[EMMC Registers]]&lt;br /&gt;
| 0x10006000 / 0x10007000&lt;br /&gt;
| Boot9, Process9, NewKernel9Loader&lt;br /&gt;
| SD(IO) controller 1 and 3. 3 is normally mapped to ARM11.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[PXI Registers]]&lt;br /&gt;
| 0x10008000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[AES Registers]]&lt;br /&gt;
| 0x10009000&lt;br /&gt;
| Boot9, Process9, NewKernel9Loader&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[SHA Registers]]&lt;br /&gt;
| 0x1000A000&lt;br /&gt;
| Boot9, Process9, NewKernel9Loader&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[RSA Registers]]&lt;br /&gt;
| 0x1000B000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[Corelink DMA Engines|XDMA Registers]]&lt;br /&gt;
| 0x1000C000&lt;br /&gt;
| Boot9, Kernel9&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.subset.primecell.system/index.html CoreLink™ DMA-330 r0p0] (AXI busmaster, two channels, uses 32-bit bus width instead of 64).&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[SPICARD Registers]]&lt;br /&gt;
| 0x1000D800&lt;br /&gt;
| Process9&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[CONFIG Registers]]&lt;br /&gt;
| 0x10010000&lt;br /&gt;
| Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| PRNG Registers&lt;br /&gt;
| 0x10011000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
| Used as entropy-source for seeding random number generators.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[OTP Registers]]&lt;br /&gt;
| 0x10012000&lt;br /&gt;
| Boot9, Kernel9, NewKernel9Loader&lt;br /&gt;
| Top secret.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A9&lt;br /&gt;
| [[ARM7|ARM7 Registers]]&lt;br /&gt;
| 0x10018000&lt;br /&gt;
| TwlProcess9&lt;br /&gt;
| Used to setup the ARM7 core for AGB/TWL&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| TMIO SD(IO) controller 3&lt;br /&gt;
| 0x10100000&lt;br /&gt;
| &lt;br /&gt;
| NWM references this controller but doesn&#039;t have access to it.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[HASH Registers]]&lt;br /&gt;
| 0x10101000&lt;br /&gt;
| [[Filesystem services]]&lt;br /&gt;
| These registers function the same as the [[SHA Registers]], with the exception of the FIFO being located at 0x10301000.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[Y2R Registers]]&lt;br /&gt;
| 0x10102000&lt;br /&gt;
| [[Camera Services]]&lt;br /&gt;
| y2r&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[CSND Registers]]&lt;br /&gt;
| 0x10103000&lt;br /&gt;
| TwlBg, [[Codec Services]], [[CSND Services]], [[DSP Services]]&lt;br /&gt;
| Sound hardware.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MTX_Registers|LgyFb bottom screen]]&lt;br /&gt;
| 0x10110000&lt;br /&gt;
| TwlBg&lt;br /&gt;
| IO registers used to access legacy output framebuffer, as well as configure the upscaling filter.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MTX_Registers|LgyFb top screen]]&lt;br /&gt;
| 0x10111000&lt;br /&gt;
| TwlBg&lt;br /&gt;
| IO registers used to access legacy output framebuffer, as well as configure the upscaling filter.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[Camera Registers]] &lt;br /&gt;
| 0x10120000&lt;br /&gt;
| [[Camera Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[Camera Registers]]&lt;br /&gt;
| 0x10121000&lt;br /&gt;
| [[Camera Services]]&lt;br /&gt;
| Mirror of 0x10120000?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[WIFI Registers]]&lt;br /&gt;
| 0x10122000&lt;br /&gt;
| [[NWM Services]]&lt;br /&gt;
| WIFI SDIO bus registers&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10123000&lt;br /&gt;
| [[NWM Services]]&lt;br /&gt;
| WIFI?&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10130000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10131000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10132000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| &lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[CONFIG11 Registers]]&lt;br /&gt;
| 0x10140000&lt;br /&gt;
| Process9, Boot11, Kernel11, TwlBg, [[DSP Services]], [[NWM Services]], [[SPI Services]]&lt;br /&gt;
| System configuration. &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[PDN Registers]]&lt;br /&gt;
| 0x10141000&lt;br /&gt;
| Process9, Boot11, Kernel11, TwlBg, [[Codec Services]], [[NWM Services]], [[SPI Services]], [[PDN Services]]&lt;br /&gt;
| Power management&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[SPI Registers]]&lt;br /&gt;
| 0x10142000&lt;br /&gt;
| TwlBg, [[SPI Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[SPI Registers]]&lt;br /&gt;
| 0x10143000&lt;br /&gt;
| TwlBg, dmnt Module&lt;br /&gt;
| Debugger related?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2C Registers]]&lt;br /&gt;
| 0x10144000&lt;br /&gt;
| Boot11, Kernel11, TwlBg, [[I2C Services]]&lt;br /&gt;
| 3DS I2C interface (MCU + Cameras + LCD)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2S Registers]]&lt;br /&gt;
| 0x10145000&lt;br /&gt;
| TwlBg, AgbBg, [[Codec Services]]&lt;br /&gt;
| Sound input/output lines&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[HID Registers]]&lt;br /&gt;
| 0x10146000&lt;br /&gt;
| Boot9, Boot11, Kernel11, TwlBg, [[HID Services]], dlp Services&lt;br /&gt;
| See [[PAD]].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[GPIO Registers]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| Boot11, TwlBg, [[GPIO Services]], [[DSP Services]](v0)&lt;br /&gt;
| &lt;br /&gt;
|- &lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2C Registers]]&lt;br /&gt;
| 0x10148000&lt;br /&gt;
| TwlBg, [[I2C Services]]&lt;br /&gt;
| 3DS I2C interface (Gyro + IR)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[SPI Registers]]&lt;br /&gt;
| 0x10160000&lt;br /&gt;
| Boot9, TwlBg, [[SPI Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[I2C Registers]]&lt;br /&gt;
| 0x10161000&lt;br /&gt;
| Boot11, TwlBg, [[I2C Services]]&lt;br /&gt;
| TWL I2C interface (MCU + Cameras)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MIC Registers]]&lt;br /&gt;
| 0x10162000&lt;br /&gt;
| [[MIC Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[PXI Registers]]&lt;br /&gt;
| 0x10163000&lt;br /&gt;
| Boot11, Kernel11, TwlBg, [[PXI Services]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[NTRCARD Registers]]&lt;br /&gt;
| 0x10164000&lt;br /&gt;
| Boot9, Process9&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10165000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10170000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI Registers, see [http://problemkaputt.de/gbatek.htm#dswirelesscommunications GBATek].&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10171000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI Registers (mirror)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|?&lt;br /&gt;
| 0x10172000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Unused?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|?&lt;br /&gt;
| 0x10173000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Unused?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10174000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI RAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10175000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI RAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10176000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Registers (mirror)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
|  [[MP Registers]]&lt;br /&gt;
| 0x10177000&lt;br /&gt;
|?&lt;br /&gt;
| NTR WIFI Registers (mirror)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11/A9&lt;br /&gt;
| [[MP Registers]]&lt;br /&gt;
| 0x10178000 - 0x10180000&lt;br /&gt;
| [[MP Services]]&lt;br /&gt;
| NTR WIFI WS1 Region&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[Corelink DMA Engines|CDMA]]&lt;br /&gt;
| 0x10200000&lt;br /&gt;
| Boot11, Kernel11&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.subset.primecell.system/index.html CoreLink™ DMA-330 r0p0] (eight channels). Only used by bootrom on New3DS.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| FCRAM configuration&lt;br /&gt;
| 0x10201000&lt;br /&gt;
| TwlBg, Kernel11 (dead code)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[LCD Registers]]&lt;br /&gt;
| 0x10202000&lt;br /&gt;
| TwlBg, Kernel11, [[GSP Services]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[DSP Registers]]&lt;br /&gt;
| 0x10203000&lt;br /&gt;
| [[DSP Services]]&lt;br /&gt;
| see the &amp;quot;DSi XpertTeak&amp;quot; section in [http://problemkaputt.de/gba.htm no$gba] help.&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10204000&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|  style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11&lt;br /&gt;
| [[Corelink DMA Engines|CDMA]]&lt;br /&gt;
| 0x10206000&lt;br /&gt;
| NewKernel11&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.ddi0424d/index.html CoreLink™ DMA-330 r1p2] (eight channels). This is the DMA engine actually being used by the New3DS ARM11 kernel.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| A11&lt;br /&gt;
| [[MVD Registers]]&lt;br /&gt;
| 0x10207000&lt;br /&gt;
| [[MVD Services]]&lt;br /&gt;
| New 3DS only?&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| AXI&lt;br /&gt;
| 0x1020F000&lt;br /&gt;
| TwlBg, [[GSP Services]]&lt;br /&gt;
| [http://infocenter.arm.com/help/topic/com.arm.doc.ddi0422a/CHDGHIID.html CoreLink™ NIC-301 r1p0].&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| DMA region&lt;br /&gt;
| 0x10300000-0x10400000&lt;br /&gt;
|&lt;br /&gt;
| CDMA wants these addresses. Most pages in this region correspond to the same respective pages in the 0x10100000-0x10200000 region. The HASH FIFO register is located at 0x10301000 only. The LgyFb scaler data FIFO are located at 0x10310000 (top) and 0x10311000 (bot) only. &lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| A11&lt;br /&gt;
| [[GPU/External_Registers|GPU Registers]]&lt;br /&gt;
| 0x10400000&lt;br /&gt;
| Boot11, Kernel11, [[GSP Services]]&lt;br /&gt;
||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
IO registers starting at physical address 0x10200000 are not accessible from the ARM9 (which includes all LCD/GPU registers). It seems IO registers below physical address 0x10100000 are not accessible from the ARM11 bus.&lt;br /&gt;
&lt;br /&gt;
ARM11 kernel virtual address mappings for these registers varies for different builds. For ARM11 user mode applications you have:&lt;br /&gt;
 physaddr = virtaddr - 0x1EC00000 + 0x10100000&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=IRQ_Registers&amp;diff=21474</id>
		<title>IRQ Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=IRQ_Registers&amp;diff=21474"/>
		<updated>2021-01-29T15:20:20Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* IRQ_IF */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#IRQ_IE|IRQ_IE]]&lt;br /&gt;
| 0x10001000&lt;br /&gt;
| 4&lt;br /&gt;
| Boot9, Kernel9&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#IRQ_IF|IRQ_IF]]&lt;br /&gt;
| 0x10001004&lt;br /&gt;
| 4&lt;br /&gt;
| Boot9, Kernel9&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==IRQ_IE==&lt;br /&gt;
Bitfield with enabled interrupts. See below for the IRQ&amp;lt;-&amp;gt;bit mapping.&lt;br /&gt;
&lt;br /&gt;
==IRQ_IF==&lt;br /&gt;
Bitfield with pending interrupts. See below for the IRQ&amp;lt;-&amp;gt;bit mapping.&lt;br /&gt;
&lt;br /&gt;
Returns the pending interrupt bits on read, clears them on write (writing 0-bits has no effect).&lt;br /&gt;
&lt;br /&gt;
== Interrupts ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| DMAC_1_0&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| DMAC_1_1&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| DMAC_1_2&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| DMAC_1_3&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| DMAC_1_4&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| DMAC_1_5&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| DMAC_1_6&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| DMAC_1_7&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| TIMER_0&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| TIMER_1&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| TIMER_2&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| TIMER_3&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| PXI_SYNC&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| PXI_NOT_FULL&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| PXI_NOT_EMPTY&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| AES&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| SDIO_1&lt;br /&gt;
|-&lt;br /&gt;
| 17&lt;br /&gt;
| SDIO_1_ASYNC&lt;br /&gt;
|-&lt;br /&gt;
| 18&lt;br /&gt;
| SDIO_3&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| SDIO_3_ASYNC&lt;br /&gt;
|-&lt;br /&gt;
| 20&lt;br /&gt;
| DEBUG_RECV&lt;br /&gt;
|-&lt;br /&gt;
| 21&lt;br /&gt;
| DEBUG_SEND&lt;br /&gt;
|-&lt;br /&gt;
| 22&lt;br /&gt;
| [[RSA]]&lt;br /&gt;
|-&lt;br /&gt;
| 23&lt;br /&gt;
| CTR_CARD_1&lt;br /&gt;
|-&lt;br /&gt;
| 24&lt;br /&gt;
| CTR_CARD_2&lt;br /&gt;
|-&lt;br /&gt;
| 25&lt;br /&gt;
| CGC&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| CGC_DET&lt;br /&gt;
|-&lt;br /&gt;
| 27&lt;br /&gt;
| DS_CARD&lt;br /&gt;
|-&lt;br /&gt;
| 28&lt;br /&gt;
| DMAC_2&lt;br /&gt;
|-&lt;br /&gt;
| 29&lt;br /&gt;
| DMAC_2_ABORT&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=Memory_layout&amp;diff=21472</id>
		<title>Memory layout</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=Memory_layout&amp;diff=21472"/>
		<updated>2021-01-27T21:04:52Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* ARM11 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Physical Memory =&lt;br /&gt;
&lt;br /&gt;
== ARM11 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Old 3DS&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x00000000&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Bootrom (super secret code/data @ 0x8000)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Bootrom mirror&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x10000000&lt;br /&gt;
|?&lt;br /&gt;
| [[IO]] memory&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x17E00000&lt;br /&gt;
| 0x00002000&lt;br /&gt;
| MPCore private memory region&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 0x17E10000&lt;br /&gt;
| 0x00001000&lt;br /&gt;
| L2C-310 r3p3 Level 2 Cache Controller (2MB)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x18000000&lt;br /&gt;
| 0x00600000&lt;br /&gt;
| VRAM (divided in two areas VRAM A and B, four banks in total)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 0x1F000000&lt;br /&gt;
| 0x00400000&lt;br /&gt;
| [[New_3DS]] additional memory&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| DSP memory&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x1FF80000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| AXI WRAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| FCRAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 0x28000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| [[New_3DS]] FCRAM extension&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0xFFFF0000&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Bootrom mirror&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===0x17E10000===&lt;br /&gt;
The 32-bit register at &amp;lt;code&amp;gt;0x17E10000&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt; only has bit 0 set when, on New 3DS, [[PTMSYSM:ConfigureNew3DSCPU]] was used with bit 1 set for the input value (the L2 cache flag). All other bits in this register are normally all-zero. Therefore, bit 0 set = new cache hardware enabled, bit 0 clear = new cache hardware disabled. This bit is how the ARM11 kernel checks whether the additional cache hardware is enabled).&lt;br /&gt;
&lt;br /&gt;
To enable the additional cache hardware, the following is used by the ARM11 kernel:&lt;br /&gt;
* Sets bit 0 in 32-bit register &amp;lt;code&amp;gt;0x17E10000&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To disable the additional cache hardware, the following is used by the ARM11 kernel:&lt;br /&gt;
* Writes value &amp;lt;code&amp;gt;0xFFFF&amp;lt;/code&amp;gt; to 32-bit register &amp;lt;code&amp;gt;0x17E10000&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;0x77C&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Waits for bit 0 in 32-bit register &amp;lt;code&amp;gt;0x17E10000&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;0x730&amp;lt;/code&amp;gt; to become clear.&lt;br /&gt;
* Writes value &amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt; to 32-bit register &amp;lt;code&amp;gt;0x17E10000&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;0x0&amp;lt;/code&amp;gt;.&lt;br /&gt;
* Clears bit 0 in 32-bit register &amp;lt;code&amp;gt;0x17E10000&amp;lt;/code&amp;gt;+&amp;lt;code&amp;gt;0x100&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;code&amp;gt;0x1F000000&amp;lt;/code&amp;gt; ([[New 3DS]] only) ===&lt;br /&gt;
This area is used by [[QTM Services]] and Kernel11,starting at offset &amp;lt;code&amp;gt;0x200000&amp;lt;/code&amp;gt;, size &amp;lt;code&amp;gt;0x180000&amp;lt;/code&amp;gt;. This area is not accessible to the GPU on the old 3DS. The old 3DS and New 3DS GSP module has &amp;lt;code&amp;gt;vaddr-&amp;amp;gt;physaddr&amp;lt;/code&amp;gt; conversion code for this entire region. On the New 3DS, only the first &amp;lt;code&amp;gt;0x200000&amp;lt;/code&amp;gt; bytes (half of this memory) are accessible to the GPU.&lt;br /&gt;
&lt;br /&gt;
== ARM9 ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Old 3DS&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x00000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| Instruction TCM, repeating each 0x8000 bytes.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x01FF8000&lt;br /&gt;
| 0x00008000&lt;br /&gt;
| Instruction TCM (Accessed by the kernel and process by this address)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x07FF8000&lt;br /&gt;
| 0x00008000&lt;br /&gt;
| Instruction TCM (Accessed by bootrom by this address)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| ARM9-only internal memory (ARM7&#039;s internal regions are mapped here as well)&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 0x08100000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| [[New_3DS]] ARM9-only extension, only enabled when a certain [[CONFIG_Registers|CONFIG]] register is set.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| [[IO]] memory&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x18000000&lt;br /&gt;
| 0x00600000&lt;br /&gt;
| VRAM (divided in two banks, VRAM and VRAMB) &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| DSP memory&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x1FF80000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| AXI WRAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| FCRAM&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 0x28000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| [[New_3DS]] FCRAM extension&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0xFFF00000&lt;br /&gt;
| 0x00004000&lt;br /&gt;
| Data TCM (Mapped during bootrom). Enabled at the time Boot9 jumps to FIRM, however Kernel9+arm9loader disables it.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0xFFFF0000&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| Bootrom, the main region is at +0x8000, which is disabled during system boot.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==ARM9 MPU Regions==&lt;br /&gt;
For the below instruction permissions: RO = memory is executable, while None = not-executable.&lt;br /&gt;
&lt;br /&gt;
===NATIVE_FIRM/SAFE_MODE_FIRM ARM9 kernel===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Region&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Privileged-mode data permissions&lt;br /&gt;
!  User-mode data permissions&lt;br /&gt;
!  Privileged-mode instruction permissions&lt;br /&gt;
!  User-mode instruction permissions&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0xFFFF0000&lt;br /&gt;
| 32KB/0x8000&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x01FF8000&lt;br /&gt;
| 32KB/0x8000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 1MB/0x100000. &amp;gt;=[[8.0.0-18|8.0.0-X]]: 2MB/0x200000.&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 128KB/0x20000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x10100000&lt;br /&gt;
| 512KB/0x80000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 128MB/0x8000000. &amp;gt;=[[8.0.0-18|8.0.0-X]]: 256MB/0x10000000.&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 128KB/0x20000&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x08020000&lt;br /&gt;
| &amp;lt;[[3.0.0-5]]: 64KB/0x10000. &amp;gt;=[[3.0.0-5]]: 32KB/0x8000.&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above is the MPU region settings setup by the ARM9-kernel in the crt0.&lt;br /&gt;
&lt;br /&gt;
The New3DS ARM9-kernel MPU region settings are the same as the Old3DS MPU region settings for &amp;gt;=[[8.0.0-18|8.0.0-X]].&lt;br /&gt;
&lt;br /&gt;
At the start of the Process9 function executed in kernel-mode via svc7b during firm-launching, it changes some MPU region settings. At the end of that function, before it uses the ARM9/ARM11 entrypoint fields, it disables MPU.&lt;br /&gt;
&lt;br /&gt;
===New3DS [[FIRM|ARM9-loader]]===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Region&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Privileged-mode data permissions&lt;br /&gt;
!  User-mode data permissions&lt;br /&gt;
!  Privileged-mode instruction permissions&lt;br /&gt;
!  User-mode instruction permissions&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0xFFFF0000&lt;br /&gt;
| 32KB/0x8000&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x01FF8000&lt;br /&gt;
| 32KB/0x8000&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 2MB/0x200000&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 128KB/0x20000&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
MPU regions 4-7 are disabled. Note that the entire ARM9-loader runs in SVC-mode.&lt;br /&gt;
&lt;br /&gt;
===TWL_FIRM/AGB_FIRM ARM9 kernel===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Region&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Privileged-mode data permissions&lt;br /&gt;
!  User-mode data permissions&lt;br /&gt;
!  Privileged-mode instruction permissions&lt;br /&gt;
!  User-mode instruction permissions&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0xFFFF0000&lt;br /&gt;
| 32KB/0x8000&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x01FF8000&lt;br /&gt;
| 32KB/0x8000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 1MB/0x100000. New3DS: 2MB/0x200000.&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 2MB/0x200000.&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 512KB/0x80000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 128MB/0x8000000. New3DS: 256MB/0x10000000.&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| &amp;lt;[[3.0.0-5|3.0.0-X]]: 256KB/0x40000. &amp;gt;=[[3.0.0-5|3.0.0-X]]: 128KB/0x20000&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| RO&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x08080000&lt;br /&gt;
| 128KB/0x20000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===[[Bootloader|Boot9]]===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Region&lt;br /&gt;
!  Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Privileged-mode data permissions&lt;br /&gt;
!  User-mode data permissions&lt;br /&gt;
!  Privileged-mode instruction permissions&lt;br /&gt;
!  User-mode instruction permissions&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 0x00000400&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0xFFF00000&lt;br /&gt;
| 0x00004000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x07FF8000&lt;br /&gt;
| 0x00008000&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0xFFFF0000&lt;br /&gt;
| 0x00010000&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
| RO&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x1FFFE000&lt;br /&gt;
| 0x00000800&lt;br /&gt;
| RW&lt;br /&gt;
| RW&lt;br /&gt;
| None&lt;br /&gt;
| None&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Instruction cachable bits = 0x40(only enabled for region6).&lt;br /&gt;
* Data cachable bits = 0x44(only enabled for region2 and region6).&lt;br /&gt;
* Data bufferable bits = 0x44(only enabled for region2 and region6).&lt;br /&gt;
&lt;br /&gt;
These are the same for both Old3DS/New3DS.&lt;br /&gt;
&lt;br /&gt;
==ARM9 ITCM==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  ITCM mirror address&lt;br /&gt;
!  ITCM bootrom mirror address&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FF8000&lt;br /&gt;
| &lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x3700&lt;br /&gt;
| Uninitialized memory.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFB700&lt;br /&gt;
| 0x07FFB700&lt;br /&gt;
| 0x3700&lt;br /&gt;
| 0x100&lt;br /&gt;
| The unprotected ARM9-bootrom code copies code from unprotected bootrom to 0x07FFB700(ITCM mirror) size 0x100, then calls the code at 0x07FFB700. The code located here is the code used for disabling access to the bootroms.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFB800&lt;br /&gt;
| &lt;br /&gt;
| 0x3800&lt;br /&gt;
| 0x100&lt;br /&gt;
| This is the first 0x90 bytes of [[OTP_Registers#Plaintext_OTP|plaintext OTP]] when OTP hash verification is successful. The remaining 0x70 bytes are cleared.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFB880&lt;br /&gt;
| &lt;br /&gt;
| 0x3890&lt;br /&gt;
| 0x70&lt;br /&gt;
| This is all zeros; boot ROM does not reveal the console-specific keys or the OTP hash in ITCM.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFB900&lt;br /&gt;
| &lt;br /&gt;
| 0x3900&lt;br /&gt;
| 0x200&lt;br /&gt;
| This is the 0x200-bytes from NAND sector0.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFBB00&lt;br /&gt;
| &lt;br /&gt;
| 0x3B00&lt;br /&gt;
| 0x200&lt;br /&gt;
| This is the 0x200-bytes from the plaintext FIRM header for the FIRM which was loaded by [[Bootloader|Boot9]]. This is the only location Boot9 uses for storing the loaded FIRM headers internally, it&#039;s not stored anywhere else.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFBD00&lt;br /&gt;
| &lt;br /&gt;
| 0x3D00&lt;br /&gt;
| 0x100&lt;br /&gt;
| This is the RSA-2048 modulus for [[RSA_Registers|RSA]]-engine slot0 set by bootrom.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFBE00&lt;br /&gt;
| &lt;br /&gt;
| 0x3E00&lt;br /&gt;
| 0x100&lt;br /&gt;
| This is the RSA-2048 modulus for RSA-engine slot1 set by bootrom.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFBF00&lt;br /&gt;
| &lt;br /&gt;
| 0x3F00&lt;br /&gt;
| 0x100&lt;br /&gt;
| This is the RSA-2048 modulus for RSA-engine slot2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFC000&lt;br /&gt;
| &lt;br /&gt;
| 0x4000&lt;br /&gt;
| 0x100&lt;br /&gt;
| This is the RSA-2048 modulus for RSA-engine slot3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFC100&lt;br /&gt;
| &lt;br /&gt;
| 0x4100&lt;br /&gt;
| 0x800&lt;br /&gt;
| These are RSA-2048 keys: 4 slots, each slot is 0x200-bytes. Slot+0 is the modulus, slot+0x100 is the private exponent. This can be confirmed by RSA-decrypting a message into a signature, then RSA-encrypting the signature back into a message, and comparing the original message with the output from the last operation.&lt;br /&gt;
&lt;br /&gt;
[[FIRM]] doesn&#039;t seem to ever use these. None of these are related to RSA-keyslot0 used for v6.0/v7.0 key generation. These moduli are separate from all other moduli used elsewhere.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFC900&lt;br /&gt;
| 0x07FFC900&lt;br /&gt;
| 0x4900&lt;br /&gt;
| 0x400&lt;br /&gt;
| The unprotected ARM9-bootrom copies data to 0x07FFC900(mirror of 0x01FFC900) size 0x400. This data is copied from AXI WRAM, initialized by ARM11-bootrom(the addr used for the src is determined by [[CONFIG_Registers|REG_UNITINFO]]). These are RSA moduli: retailsrcptr = 0x1FFFD000, devsrvptr = 0x1FFFD400.&lt;br /&gt;
* The first 0x100-bytes here is the RSA-2048 modulus for the CFA NCCH header, and for the gamecard NCSD header.&lt;br /&gt;
* 0x01FFCA00 is the RSA-2048 modulus for the CXI accessdesc signature, written to rsaengine keyslot1 by NATIVE_FIRM.&lt;br /&gt;
* 0x01FFCB00 size 0x200 is unknown, probably RSA related, these aren&#039;t used by [[FIRM]](these are not console-unique).&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFCD00&lt;br /&gt;
| &lt;br /&gt;
| 0x4D00&lt;br /&gt;
| 0x80&lt;br /&gt;
| Unknown, not used by [[FIRM]]. This isn&#039;t console-unique.&lt;br /&gt;
The first 0x10-bytes are checked by the v6.0/v7.0 NATIVE_FIRM keyinit function, when non-zero it clears this block and continues to do the key generation. Otherwise when this block was already all-zero, it immediately returns. This memclear was probably an attempt at destroying the RSA slot0 modulus, that missed (exactly 0x1000-bytes away). Even though they &amp;quot;failed&amp;quot; here, one would still need to derive the private exponent, which would require obtaining a ciphertext and plaintext.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFCD80&lt;br /&gt;
| &lt;br /&gt;
| 0x4D80&lt;br /&gt;
| 0x64&lt;br /&gt;
| 0x01FFCD84 size 0x10-bytes is the NAND CID(the 0x64-byte region at 0x01FFCD80 is initialized by Process9 + ARM9-bootrom). The u32 at 0x01FFCDC4 is the total number of NAND sectors, read from a MMC command.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFCDE4&lt;br /&gt;
| &lt;br /&gt;
| 0x4DE4&lt;br /&gt;
| 0x21C&lt;br /&gt;
| Uninitialized memory.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFD000&lt;br /&gt;
| 0x07FFD000&lt;br /&gt;
| 0x5000&lt;br /&gt;
| 0x2470&lt;br /&gt;
| The unprotected ARM9-bootrom copies 0x1FFFA000(AXIWRAM mem initialized by ARM11-bootrom) size 0x2470 to 0x07FFD000(mirror of 0x01FFD000). This block contains DSi keys.&lt;br /&gt;
* 0x01FFD000 is the RSA-1024 modulus for the retail System Menu&lt;br /&gt;
* 0x01FFD080 is the RSA-1024 modulus for DSi Wifi firmware and DSi Sound&lt;br /&gt;
* 0x01FFD100 is the RSA-1024 modulus for base DSi apps (Settings, Shop, etc.)&lt;br /&gt;
* 0x01FFD180 is the RSA-1024 modulus for DSiWare and RSA-signed cartridge headers&lt;br /&gt;
* 0x01FFD210 is the keyY for per-console-encrypted ES blocks&lt;br /&gt;
* 0x01FFD220 is the keyY for fixed-keyX ES blocks&lt;br /&gt;
* 0x01FFD300 is the DSi common (normal)key&lt;br /&gt;
* 0x01FFD350 is a normalkey set on keyslot 0x02, and is likely only used during boot&lt;br /&gt;
* 0x01FFD380 is the keyslot 0x00 keyX and the first half of the retail keyX for modcrypt crypto &amp;quot;Nintendo&amp;quot;&lt;br /&gt;
* 0x01FFD398 is the keyX used for &#039;Tad&#039; crypto, usually in keyslot 0x02 &amp;quot;Nintendo DS&amp;quot;, ..&lt;br /&gt;
* 0x01FFD3A8 is set as the middle two words of keyslot 0x03&#039;s keyX, before being overwritten &amp;quot;NINTENDO&amp;quot;&lt;br /&gt;
* 0x01FFD3BC is the keyY for keyslot 0x01, see below&lt;br /&gt;
* 0x01FFD3C8 is the fixed keyY used for eMMC partition crypto on retail DSi, see below (keyslot 0x03)&lt;br /&gt;
* 0x01FFD3E0 is the 0x1048-byte Blowfish data for DSi cart crypto&lt;br /&gt;
* 0x01FFE428 is the 0x1048-byte Blowfish data for DS cart crypto&lt;br /&gt;
On the 3DS, keyslots 0x01 and 0x03 have the last word set as 0xE1A00005 instead of the next word in ITCM. This is consistent with retail DSis.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFF470&lt;br /&gt;
| &lt;br /&gt;
| 0x7470&lt;br /&gt;
| 0xB90&lt;br /&gt;
| Uninitialized memory.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01FFFC00&lt;br /&gt;
|&lt;br /&gt;
| 0x7C00&lt;br /&gt;
| 0x100&lt;br /&gt;
| Starting with [[9.5.0-22|9.5.0-X]] is the FIRM header used during FIRM-launching.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Memory map by firmware=&lt;br /&gt;
* [[Virtual address mapping FW0B]]&lt;br /&gt;
* [[Virtual address mapping FW1F]]&lt;br /&gt;
* [[Virtual address mapping FW25]]&lt;br /&gt;
* [[Virtual address mapping FW2E]]&lt;br /&gt;
* [[Virtual address mapping FW37]]&lt;br /&gt;
* [[Virtual address mapping FW38‎]]&lt;br /&gt;
* [[Virtual address mapping FW3F]]&lt;br /&gt;
* FW49([[9.6.0-24|9.6.0-X]]) and [[10.0.0-27|10.0.0-X]] ARM11-kernel vmem mapping is identical to FW40([[9.5.0-22|9.5.0-X]]).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Virtual address mapping TWLFIRM04]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[Virtual address mapping New3DS v8.1]]&lt;br /&gt;
* [[Virtual address mapping New3DS v9.0]]&lt;br /&gt;
* [[Virtual address mapping New3DS v9.2]]&lt;br /&gt;
* [[Virtual address mapping New3DS v11.1]]&lt;br /&gt;
&lt;br /&gt;
=ARM11 Detailed physical memory map=&lt;br /&gt;
 18000000 - 18600000: VRAM&lt;br /&gt;
 &lt;br /&gt;
 1FF80000 - 1FFAB000: Kernel code&lt;br /&gt;
 1FFAB000 - 1FFF0000: SlabHeap [temporarily contains boot processes]&lt;br /&gt;
 1FFF0000 - 1FFF1000: ?&lt;br /&gt;
 1FFF1000 - 1FFF2000: ?&lt;br /&gt;
 1FFF2000 - 1FFF3000: ?&lt;br /&gt;
 1FFF3000 - 1FFF4000: ?&lt;br /&gt;
 1FFF4000 - 1FFF5000: Exception vectors&lt;br /&gt;
 1FFF5000 - 1FFF5800: Unused?&lt;br /&gt;
 1FFF5800 - 1FFF5C00: 256-entry L2 MMU table for VA FF4xx000&lt;br /&gt;
 1FFF5C00 - 1FFF6000: 256-entry L2 MMU table for VA FF5xx000&lt;br /&gt;
 1FFF6000 - 1FFF6400: 256-entry L2 MMU table for VA FF6xx000&lt;br /&gt;
 1FFF6400 - 1FFF6800: 256-entry L2 MMU table for VA FF7xx000&lt;br /&gt;
 1FFF6800 - 1FFF6C00: 256-entry L2 MMU table for VA FF8xx000&lt;br /&gt;
 1FFF6C00 - 1FFF7000: 256-entry L2 MMU table for VA FF9xx000&lt;br /&gt;
 1FFF7000 - 1FFF7400: 256-entry L2 MMU table for VA FFAxx000&lt;br /&gt;
 1FFF7400 - 1FFF7800: 256-entry L2 MMU table for VA FFBxx000&lt;br /&gt;
 1FFF7800 - 1FFF7C00: MMU table but unused?&lt;br /&gt;
 1FFF7C00 - 1FFF8000: 256-entry L2 MMU table for VA FFFxx000 &lt;br /&gt;
 1FFF8000 - 1FFFC000: 4096-entry L1 MMU table for VA xxx00000 (CPU 0)&lt;br /&gt;
 1FFFC000 - 20000000: 4096-entry L1 MMU table for VA xxx00000 (CPU 1)&lt;br /&gt;
 20000000 - 28000000: Main memory&lt;br /&gt;
&lt;br /&gt;
The entire FCRAM is cleared during NATIVE_FIRM boot. This is done by the ARM11 kernel in order by region as it initializes after loading [[FIRM]] launch parameters from FCRAM.&lt;br /&gt;
&lt;br /&gt;
== FCRAM memory-regions layout ==&lt;br /&gt;
FCRAM is partitioned into three regions of memory (APPLICATION, SYSTEM, and BASE). Most applications can only allocate memory from one of these regions (which is encoded in the [[NCCH/Extended_Header#ARM11_Kernel_Flags|process kernel flags]]). There is a fixed set of possible size of each memory region, determined by the APPMEMTYPE value in [[Configuration_Memory#APPMEMTYPE|configuration memory]] (which in turn is set up according to the [[FIRM#FIRM_Launch_Parameters|firmware launch parameters]]).&lt;br /&gt;
&lt;br /&gt;
Support for APPMEMTYPEs 6 and 7 (and 8?) was implemented in [[NS]] with [[8.0.0-18]]. These configurations are only supported in the [[New_3DS]] ARM11-kernel, and are in fact the only ones supported there at all. Applications only get access to the larger memory regions when this is specified in their [[NCCH/Extended Header#New3DS System Mode|extended header]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  APPMEMTYPE&lt;br /&gt;
!  APPLICATION starting address (relative to FCRAM)&lt;br /&gt;
!  APPLICATION region size&lt;br /&gt;
!  SYSTEM starting address (relative to FCRAM)&lt;br /&gt;
!  SYSTEM region size&lt;br /&gt;
!  BASE starting address (relative to FCRAM)&lt;br /&gt;
!  BASE region size&lt;br /&gt;
|-&lt;br /&gt;
| 0 (default with regular 3DS kernel, used when the type is not 2-5)&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x04000000(64MB)&lt;br /&gt;
| 0x04000000&lt;br /&gt;
| 0x02C00000&lt;br /&gt;
| 0x06C00000&lt;br /&gt;
| 0x01400000&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x06000000(96MB)&lt;br /&gt;
| 0x06000000&lt;br /&gt;
| 0x00C00000&lt;br /&gt;
| 0x06C00000&lt;br /&gt;
| 0x01400000&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x05000000(80MB)&lt;br /&gt;
| 0x05000000&lt;br /&gt;
| 0x01C00000&lt;br /&gt;
| 0x06C00000&lt;br /&gt;
| 0x01400000&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x04800000(72MB)&lt;br /&gt;
| 0x04800000&lt;br /&gt;
| 0x02400000&lt;br /&gt;
| 0x06C00000&lt;br /&gt;
| 0x01400000&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x02000000(32MB)&lt;br /&gt;
| 0x02000000&lt;br /&gt;
| 0x04C00000&lt;br /&gt;
| 0x06C00000&lt;br /&gt;
| 0x01400000&lt;br /&gt;
|-&lt;br /&gt;
| 6 and 8 (6 is the default on New3DS. With [[New_3DS]] kernel this is the type used when the value is neither 7 nor 8)&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x07C00000(124MB)&lt;br /&gt;
| 0x07C00000&lt;br /&gt;
| 0x06400000&lt;br /&gt;
| 0x0E000000&lt;br /&gt;
| 0x02000000&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x0B200000(178MB)&lt;br /&gt;
| 0x0B200000&lt;br /&gt;
| 0x02E00000&lt;br /&gt;
| 0x0E000000&lt;br /&gt;
| 0x02000000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The SYSTEM mem-region size is calculated with: size = FCRAMTOTALSIZE - (APPLICATION_MEMREGIONSIZE + BASE_MEMREGIONSIZE).&lt;br /&gt;
&lt;br /&gt;
All memory allocated by the kernel itself for kernel use is located under BASE. Most system-modules run under the BASE memregion too.&lt;br /&gt;
&lt;br /&gt;
Free/used memory on [[4.5.0-10]] with Home Menu / Internet Browser, with the default APPMEMTYPE on retail:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Region&lt;br /&gt;
!  Base address relative to FCRAM+0&lt;br /&gt;
!  Region size&lt;br /&gt;
!  Used memory once [[Home Menu]] finishes loading for system boot, on [[4.5.0-10]]&lt;br /&gt;
!  Used memory with [[Internet Browser]] running instead of [[Home Menu]], on [[4.5.0-10]]&lt;br /&gt;
!  Free memory once [[Home Menu]] finishes loading for system boot, on [[4.5.0-10]]&lt;br /&gt;
!  Free memory with [[Internet Browser]] running instead of [[Home Menu]], on [[4.5.0-10]]&lt;br /&gt;
|-&lt;br /&gt;
| APPLICATION&lt;br /&gt;
| 0x0&lt;br /&gt;
| 0x04000000&lt;br /&gt;
| 0x0&lt;br /&gt;
| &lt;br /&gt;
| 0x04000000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| SYSTEM&lt;br /&gt;
| 0x04000000&lt;br /&gt;
| 0x02C00000&lt;br /&gt;
| 0x01488000&lt;br /&gt;
| 0x02A50000&lt;br /&gt;
| 0x01778000&lt;br /&gt;
| 0x001B0000&lt;br /&gt;
|-&lt;br /&gt;
| BASE&lt;br /&gt;
| 0x06C00000&lt;br /&gt;
| 0x01400000&lt;br /&gt;
| 0x01202000&lt;br /&gt;
| 0x01236000&lt;br /&gt;
| 0x001FE000&lt;br /&gt;
| 0x001CA000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=ARM11 Detailed virtual memory map=&lt;br /&gt;
(valid only for FW0B, see [[#Memory map by firmware|Memory map by firmware]] for subsequent versions)&lt;br /&gt;
&lt;br /&gt;
 E8000000 - E8600000: mapped VRAM (18000000 - 18600000)&lt;br /&gt;
 &lt;br /&gt;
 EFF00000 - F0000000: mapped Internal memory (1FF00000 - 20000000)&lt;br /&gt;
 F0000000 - F8000000: mapped Main memory&lt;br /&gt;
 &lt;br /&gt;
 FF401000 - FF402000: mapped ? (27FC7000 - 27FC8000)&lt;br /&gt;
 &lt;br /&gt;
 FF403000 - FF404000: mapped ? (27FC2000 - 27FC3000)&lt;br /&gt;
 &lt;br /&gt;
 FF405000 - FF406000: mapped ? (27FBB000 - 27FBC000)&lt;br /&gt;
 &lt;br /&gt;
 FF407000 - FF408000: mapped ? (27FB3000 - 27FB4000)&lt;br /&gt;
 &lt;br /&gt;
 FF409000 - FF40A000: mapped ? (27F8E000 - 27F8F000)&lt;br /&gt;
 &lt;br /&gt;
 FFF00000 - FFF45000: mapped SlabHeap &lt;br /&gt;
 &lt;br /&gt;
 FFF60000 - FFF8B000: mapped Kernel code&lt;br /&gt;
 &lt;br /&gt;
 FFFCC000 - FFFCD000: mapped IO [[I2C|I2C]] second bus (10144000 - 10145000)&lt;br /&gt;
 &lt;br /&gt;
 FFFCE000 - FFFCF000: mapped IO PDC([[LCD]]) (10400000 - 10401000)&lt;br /&gt;
 &lt;br /&gt;
 FFFD0000 - FFFD1000: mapped IO PDN (10141000 - 10142000)&lt;br /&gt;
 &lt;br /&gt;
 FFFD2000 - FFFD3000: mapped IO PXI (10163000 - 10164000)&lt;br /&gt;
 &lt;br /&gt;
 FFFD4000 - FFFD5000: mapped IO PAD (10146000 - 10147000)&lt;br /&gt;
 &lt;br /&gt;
 FFFD6000 - FFFD7000: mapped IO LCD (10202000 - 10203000)&lt;br /&gt;
 &lt;br /&gt;
 FFFD8000 - FFFD9000: mapped IO DSP (10140000 - 10141000)&lt;br /&gt;
 &lt;br /&gt;
 FFFDA000 - FFFDB000: mapped IO XDMA (10200000 - 10201000)&lt;br /&gt;
 &lt;br /&gt;
 FFFDC000 - FFFE0000: mapped ? (1FFF8000 - 1FFFC000)&lt;br /&gt;
 &lt;br /&gt;
 FFFE1000 - FFFE2000: mapped ? (1FFF0000 - 1FFF1000)&lt;br /&gt;
 &lt;br /&gt;
 FFFE3000 - FFFE4000: mapped ? (1FFF2000 - 1FFF3000)&lt;br /&gt;
 &lt;br /&gt;
 FFFE5000 - FFFE9000: mapped L1 MMU table for VA xxx00000&lt;br /&gt;
 &lt;br /&gt;
 FFFEA000 - FFFEB000: mapped ? (1FFF1000 - 1FFF2000)&lt;br /&gt;
 &lt;br /&gt;
 FFFEC000 - FFFED000: mapped ? (1FFF3000 - 1FFF4000)&lt;br /&gt;
 &lt;br /&gt;
 FFFEE000 - FFFF0000: mapped IO IRQ (17E00000 - 17E02000)&lt;br /&gt;
 &lt;br /&gt;
 FFFF0000 - FFFF1000: mapped Exception vectors&lt;br /&gt;
 &lt;br /&gt;
 FFFF2000 - FFFF6000: mapped L1 MMU table for VA xxx00000&lt;br /&gt;
 &lt;br /&gt;
 FFFF7000 - FFFF8000: mapped ? (1FFF1000 - 1FFF2000)&lt;br /&gt;
 &lt;br /&gt;
 FFFF9000 - FFFFA000: mapped ? (1FFF3000 - 1FFF4000)&lt;br /&gt;
 &lt;br /&gt;
 FFFFB000 - FFFFE000: mapped L2 MMU tables (1FFF5000 - 1FFF8000)&lt;br /&gt;
&lt;br /&gt;
==0xFF4XX000==&lt;br /&gt;
Each [[KThread|thread]] is allocated a 0x1000-byte page in this region for the [[KThreadContext|thread context]]: the first page at 0xFF401000 is for the first created thread, 0xFF403000 for the second thread. This region is used to store the SVC-mode stack for the thread, and thread context data used for context switching. When the IRQ handler, prefetch/data abort handlers, and undefined instruction handler are entered where the SPSR-mode=user, these handlers then store LR+SPSR for the current mode on the SVC-mode stack, then these handlers switch to SVC-mode.&lt;br /&gt;
&lt;br /&gt;
This page does not contain a dedicated block for storing R0-PC(etc). For user-mode, the user-mode regs are instead saved on the SVC-mode stack when IRQs such as timers for context switching are triggered.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For NATIVE_FIRM the memory pages for this region are located in FCRAM, however for TWL_FIRM these are located in AXI WRAM. For TWL_FIRM v6704 the first thread&#039;s page for this region is located at physical address 0x1FF93000, the next one at 0x1FF92000, etc.&lt;br /&gt;
&lt;br /&gt;
== IO Process virtual addressing equivalence ==&lt;br /&gt;
It seems an IO register&#039;s process virtual address can be calculated by adding 0xEB00000 to its physical address. However for kernel mappings there is no fixed address equivalence.&lt;br /&gt;
&lt;br /&gt;
=ARM11 User-land memory regions=&lt;br /&gt;
==NATIVE_FIRM/SAFE_MODE_FIRM Userland Memory==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Virtual Address Base&lt;br /&gt;
!  Physical Address Base&lt;br /&gt;
!  Region Max Size&lt;br /&gt;
!  Address-range available for svcMapMemoryBlock&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000 / 0x14000000&lt;br /&gt;
| &lt;br /&gt;
| 0x03F00000&lt;br /&gt;
| No&lt;br /&gt;
| The [[ExeFS]]:/.code is loaded here, executables must be loaded to the 0x00100000 region when the exheader &amp;quot;special memory&amp;quot; flag is clear. The 0x03F00000-byte size restriction only applies when this flag is clear. Executables are usually loaded to 0x14000000 when the exheader &amp;quot;special memory&amp;quot; flag is set, however this address can be arbitrary.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04000000&lt;br /&gt;
| ?&lt;br /&gt;
| ?&lt;br /&gt;
| No&lt;br /&gt;
| Used for mapping buffers during IPC, see [[IPC Command Structure]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| Main stack physaddr - &amp;lt;heap size for the allocated vaddr 0x08000000 memory&amp;gt;&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| Yes&lt;br /&gt;
| Heap mapped by [[SVC|ControlMemory]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10000000-StackSize&lt;br /&gt;
| .bss physical address - total stack pages&lt;br /&gt;
| StackSize from process exheader&lt;br /&gt;
| &lt;br /&gt;
| Stack for the main-thread, initialized by the ARM11 kernel. The StackSize from the exheader is usually 0x4000, therefore the stack-bottom is usually 0x0FFFC000. The stack for the other threads is normally located in the process .data section however this can be arbitrary.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10000000&lt;br /&gt;
| &lt;br /&gt;
| 0x04000000&lt;br /&gt;
| Yes&lt;br /&gt;
| [[SVC|Shared]] memory&lt;br /&gt;
|-&lt;br /&gt;
| 0x14000000&lt;br /&gt;
| FCRAM+0&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| No&lt;br /&gt;
| Can be mapped by [[SVC|ControlMemory]], this is used for processes&#039; [[SVC|LINEAR]]/GSP heap.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E800000&lt;br /&gt;
| 0x1F000000&lt;br /&gt;
| 0x00400000&lt;br /&gt;
| No&lt;br /&gt;
| [[New_3DS]] additional memory, access to this is specified by the exheader. Added with [[8.0.0-18]], see above section regarding this memory.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1EC00000&lt;br /&gt;
| 0x10100000&lt;br /&gt;
| 0x00400000&lt;br /&gt;
| No&lt;br /&gt;
| [[IO]] registers, the mapped IO pages which each process can access is specified in the [[NCCH/Extended_Header|exheader]]. (Applications normally don&#039;t have access to registers in this range)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F000000&lt;br /&gt;
| 0x18000000&lt;br /&gt;
| 0x00600000&lt;br /&gt;
| No&lt;br /&gt;
| VRAM, access to this is specified by the exheader.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| No&lt;br /&gt;
| DSP memory, access to this is specified by the exheader.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1FF80000&lt;br /&gt;
| FCRAM memory page allocated by the ARM11 kernel.&lt;br /&gt;
| 0x1000&lt;br /&gt;
| No&lt;br /&gt;
| [[Configuration Memory]], all processes have read-only access to this.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1FF81000&lt;br /&gt;
| FCRAM memory page allocated by the ARM11 kernel.&lt;br /&gt;
| 0x1000&lt;br /&gt;
| No&lt;br /&gt;
| [[Configuration Memory|Shared]] page, all processes have read-access to this. Write access to this is specified by the exheader &amp;quot;Shared page writing&amp;quot; kernel flag.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1FF82000&lt;br /&gt;
| Dynamically taken from the BASE region of FCRAM&lt;br /&gt;
| Number of threads * 0x1000 / 8&lt;br /&gt;
| No&lt;br /&gt;
| [[Thread Local Storage]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x30000000&lt;br /&gt;
| FCRAM+0&lt;br /&gt;
| 0x08000000(Old3DS) / 0x10000000([[New_3DS]])&lt;br /&gt;
| No&lt;br /&gt;
| This LINEAR memory mapping was added with [[8.0.0-18]], see [[SVC#enum_MemoryOperation|here]]. This replaces the original 0x14000000 mapping, for system(memory-region=BASE)/newer titles. The Old3DS kernel uses size 0x08000000 for LINEAR-memory address range checks, while the New3DS kernel uses size 0x10000000 for those range checks. Old3DS/New3DS system-module code doing vaddr-&amp;gt;phys-addr conversion uses size 0x10000000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20000000 / 0x40000000&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| This is the end-address of userland memory, memory under this address is process-unique. Memory starting at this address is only accessible in privileged-mode. This address was changed from 0x20000000 to 0x40000000 with [[8.0.0-18]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
All executable pages are read-only, and data pages have the execute-never permission set. Normally .text from the loaded ExeFS:/.code is the only mapped executable memory. Executable [[RO Services|CROs]] can be loaded into memory, once loaded the CRO .text section memory page permissions are changed via [[SVC|ControlProcessMemory]] from RW- to R-X. The address and size of each ExeFS:/.code section is stored in the exheader, the permissions for each section is: .text R-X, .rodata R--, .data RW-, and .bss RW-. The loaded .code is mapped to the addresses specified in the exheader by the ARM11 kernel. The stack permissions is initialized by the ARM11 kernel: RW-. The heap permissions is normally RW-.&lt;br /&gt;
&lt;br /&gt;
All userland memory is mapped with RW permissions for privileged-mode. However, normally the ARM11 kernel only uses userland read/write instructions(or checks that the memory can be written from userland first) for accessing memory specified by [[SVC|SVCs]].&lt;br /&gt;
&lt;br /&gt;
Processes can&#039;t directly access memory for other processes. When service [[Services API|commands]] are used, the kernel maps memory in the destination process for input/output buffers, where the addresses in the command received by the process is replaced by this mapped memory. When this is an input buffer, the buffer data is copied to the mapped memory. When this is an output buffer, the data stored in the mapped memory is copied to the destination buffer specified in the command.&lt;br /&gt;
&lt;br /&gt;
The physical address which memory for the application memory-type is mapped to begins at FCRAM+0, the total memory allocated for this memory-type is stored in [[Configuration_Memory]]. Applications&#039; .text + .rodata + .data under the application memory-type is mapped at FCRAM + APPMEMALLOC - (aligned page-size for .text + .rodata + .data). The application .bss is mapped at CODEADDR - .bss size aligned down to the page size.&lt;br /&gt;
&lt;br /&gt;
==TWL_FIRM Userland Memory==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Virtual Address Base&lt;br /&gt;
!  Physical Address Base&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| 0x1FFAB000 (with newer TWL_FIRM such as v6704 this is located at 0x1FFAC000)&lt;br /&gt;
| 0x00055000&lt;br /&gt;
| Code + .(ro)data copied from the process 0x00300000 region is located here(.bss is located here as well).&lt;br /&gt;
|-&lt;br /&gt;
| 0x00155000&lt;br /&gt;
| 0x18555000&lt;br /&gt;
| 0x000AB000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00200000&lt;br /&gt;
| 0x18500000&lt;br /&gt;
| 0x00100000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x00300000&lt;br /&gt;
| 0x24000000&lt;br /&gt;
| 0x04000000&lt;br /&gt;
| The beginning of the ARM11 process .text is located here.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 0x07E00000&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x1EC00000&lt;br /&gt;
| 0x10100000&lt;br /&gt;
| 0x00400000&lt;br /&gt;
| [[IO]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x1F000000&lt;br /&gt;
| 0x18000000&lt;br /&gt;
| 0x00600000&lt;br /&gt;
| VRAM&lt;br /&gt;
|-&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 0x1FF00000&lt;br /&gt;
| 0x00080000&lt;br /&gt;
| This is mapped to the DSP memory.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The above regions are mapped by the ARM11 kernel. Later when the ARM11 process uses [[SVC|svcKernelSetState]] with type4, the kernel unmaps(?) the following regions: 0x00300000..0x04300000, 0x08000000..0x0FE00000, and 0x10000000..0xF8000000.&lt;br /&gt;
&lt;br /&gt;
=== Detailed TWL_FIRM ARM11 Memory ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Process Virtual Address&lt;br /&gt;
!  Physical Address&lt;br /&gt;
!  Size&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x08000000&lt;br /&gt;
| 0x20000000&lt;br /&gt;
| 0x01000000*4&lt;br /&gt;
| DS(i) 0x02000000 RAM. Vaddr = (DSRAMOffset*4) + 0x08000000, where DSRAMOffset is DSRAMAddr-0x02000000.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0FC00000&lt;br /&gt;
| 0x27C00000&lt;br /&gt;
| &lt;br /&gt;
| Loaded SRL binary, initially the dev DSi launcher SRL is located here(copied here by the ARM11 process).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0FD00000&lt;br /&gt;
| 0x27D00000&lt;br /&gt;
| &lt;br /&gt;
| The data located here is copied to here by the ARM11 process. The data located here is a TWL NAND [http://dsibrew.org/wiki/Bootloader bootloader] image, using the same format+encryption/verification methods as the DSi NAND bootloader(stage2). The keyX for this bootloader keyslot is initially set to the retail DSi key-data, however when TWL_FIRM is launched this keyX key-data is replaced with a separate keyX. TWL_FIRM can use either the retail DSi bootloader RSA-1024 modulus, or a seperate modulus: normally only the latter is used(the former is only used when loading the image from FS instead of FCRAM). When using the image from FCRAM(default code-path), TWL_FIRM will not calculate+check the hashes for the bootloader code binaries(this is done when loading from FS however).&lt;br /&gt;
|-&lt;br /&gt;
| 0x0FDF7000&lt;br /&gt;
| 0x27DF7000&lt;br /&gt;
| 0x1000&lt;br /&gt;
| SRL header&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= System memory details  =&lt;br /&gt;
 0xFFFF9000 Pointer to the current KThread instance&lt;br /&gt;
 0xFFFF9004 Pointer to the current KProcess instance&lt;br /&gt;
 0xFFFF9008 Pointer to the current KScheduler instance&lt;br /&gt;
 0xFFFF900C Pointer to the current KSchedulableInterruptEventLinkedList instance&lt;br /&gt;
 0xFFFF9010 Pointer to the last KThread to encounter an exception&lt;br /&gt;
&lt;br /&gt;
 0x8000040 Pointer to the current KThread instance on the ARM9&lt;br /&gt;
 0x8000044 Pointer to the current KProcess instance on the ARM9&lt;br /&gt;
 0x8000048 Pointer to the current KScheduler instance on the ARM9&lt;br /&gt;
&lt;br /&gt;
= VRAM Map While Running System Applets =&lt;br /&gt;
*0x1E6000-0x22C500 -- top screen 3D left framebuffer 0(240x400x3) (The &amp;quot;3D right first-framebuf&amp;quot; addr stored in the LCD register is set to this, when the 3D is set to &amp;quot;off&amp;quot;)&lt;br /&gt;
*0x22C800-0x272D00 -- top screen 3D right framebuffer 0(240x400x3)&lt;br /&gt;
*0x273000-0x2B9500 -- top screen 3D left framebuffer 1(240x400x3)&lt;br /&gt;
*0x2B9800-0x2FFD00 -- top screen 3D right framebuffer 1(240x400x3)&lt;br /&gt;
*0x48F000-0x4C7400 -- bottom screen framebuffer 0(240x320x3)&lt;br /&gt;
*0x4C7800-0x4FF800 -- bottom screen framebuffer 1(240x320x3)&lt;br /&gt;
&lt;br /&gt;
These LCD framebuffer addresses are not changed by the system when launching regular applications, the application itself handles that if needed. These VRAM framebuffers are cleared when launching regular applications.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21471</id>
		<title>PDN Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21471"/>
		<updated>2021-01-26T23:32:28Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* PDN_LGR_CPU_CNT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Register table=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_SLEEP_CNT|PDN_SLEEP_CNT]]&lt;br /&gt;
| 0x10141000&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]]&lt;br /&gt;
| 0x10141008&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_REASON|PDN_WAKE_REASON]]&lt;br /&gt;
| 0x1014100C&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], TwlBg, [[PDN Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_MODE|LGY_MODE]]&lt;br /&gt;
| 0x10141100&lt;br /&gt;
| 2&lt;br /&gt;
| TwlProcess9, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_SLEEP_CNT|LGY_SLEEP_CNT]]&lt;br /&gt;
| 0x10141104&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_IRQ_ENABLE|LGY_IRQ_ENABLE]]&lt;br /&gt;
| 0x10141108&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_PAD_CNT|LGY_PAD_CNT]]&lt;br /&gt;
| 0x1014110A&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]]&lt;br /&gt;
| 0x10141110&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]]&lt;br /&gt;
| 0x10141112&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_MASK|LGY_GPIOEMU_MASK]]&lt;br /&gt;
| 0x10141114&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]]&lt;br /&gt;
| 0x10141116&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_MASK|LGY_CARDDETECTEMU_MASK]]&lt;br /&gt;
| 0x10141118&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]]&lt;br /&gt;
| 0x10141119&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| LGY_?&lt;br /&gt;
| 0x10141120&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_GPU_CNT|PDN_GPU_CNT]]&lt;br /&gt;
| 0x10141200&lt;br /&gt;
| 4&lt;br /&gt;
| Boot11, Kernel11, [[PDN Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_VRAM_CNT|PDN_VRAM_CNT]]&lt;br /&gt;
| 0x10141204&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_LCD_CNT|PDN_LCD_CNT]]&lt;br /&gt;
| 0x10141208&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_FCRAM_CNT|PDN_FCRAM_CNT]]&lt;br /&gt;
| 0x10141210&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_I2S_CNT|PDN_I2S_CNT]]&lt;br /&gt;
| 0x10141220&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, TwlBg, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_CAMERA_CNT|PDN_CAMERA_CNT]]&lt;br /&gt;
| 0x10141224&lt;br /&gt;
| 1&lt;br /&gt;
| [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_DSP_CNT|PDN_DSP_CNT]]&lt;br /&gt;
| 0x10141230&lt;br /&gt;
| 1&lt;br /&gt;
| Process9, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_MVD_CNT|PDN_MVD_CNT]]&lt;br /&gt;
| 0x10141240&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_SOCMODE|PDN_LGR_SOCMODE]]&lt;br /&gt;
| 0x10141300&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CNT|PDN_LGR_CNT]]&lt;br /&gt;
| 0x10141304&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;&lt;br /&gt;
| 0x10141310&lt;br /&gt;
| 1*4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Sleep registers=&lt;br /&gt;
==PDN_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1 = Enter sleep mode&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = VRAM is powered down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 powers down VRAM (it&#039;s unclear whether bit15 is power-down or self-refresh mode) by first disabling the 8 banks using [[GPU/External_Registers#Map|GX register 0x10400030]], then by disabling the GPU clock using [[#PDN_GPU_CNT|PDN_GPU_CNT]] bit 16 and finally writes to and polls this register.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_ENABLE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Shell opened&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Headphones not plugged in&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| WiFi (?)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Shell GPIO (?)&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| [[I2C_Registers#Device_3|MCU interrupt]]&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Touch screen pressed&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| CTR gamecard inserted/removed&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
List in progress.&lt;br /&gt;
&lt;br /&gt;
This is a OR list of wake triggers that will wake up the console from sleep and raise IRQ 0x58.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_REASON==&lt;br /&gt;
Same layout as [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]].&lt;br /&gt;
&lt;br /&gt;
This is a OR list of the wake triggers that actually woke up the console.&lt;br /&gt;
&lt;br /&gt;
For each bit, write 1 to acknowledge, and 0 to clear (?).&lt;br /&gt;
&lt;br /&gt;
=Legacy registers=&lt;br /&gt;
==LGY_MODE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Read only legacy mode set on reg 0x10018000.&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = enable legacy mode.&lt;br /&gt;
|}&lt;br /&gt;
To boot into DSi or GBA mode first set register 0x10018000 to the desired mode and setup LgyFb. Then disable FCRAM by clearing bit 0 in reg 0x10201000, writing 0 to PDN_FCRAM_CNT followed by 1 and waiting for bit 2 to clear.&lt;br /&gt;
&lt;br /&gt;
The very last 3DS-mode register poke the [[FIRM|TWL_FIRM]] Process9 does before it gets switched into TWL-mode, is writing 0x8000 to this register. Before writing this register, TWL Process9 waits for ARM7 to change the value of this register. The Process9 code for this runs from ITCM, since switching into TWL-mode includes remapping all ARM9 physical memory.&lt;br /&gt;
&lt;br /&gt;
==LGY_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Write 1 to wakeup GBA mode.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Sleep state/ack. 1 when GBA mode entered sleep. Write 1 to ack.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = IRQ enable (IRQ 0x59)&lt;br /&gt;
|}&lt;br /&gt;
When a GBA game enters sleep mode and bit 15 is 1, IRQ 0x59 fires and bit 1 is set. Bit 1 must be acknowledged/written together with bit 0 otherwise GBA mode wakes up from sleep early sometimes.&lt;br /&gt;
&lt;br /&gt;
==LGY_IRQ_ENABLE==&lt;br /&gt;
[[ARM11_Interrupts|Arm11 interrupt]] enable bits for legacy interrupts, same bit layout as the GPIOEMU regs below.&lt;br /&gt;
&lt;br /&gt;
==LGY_PAD_CNT==&lt;br /&gt;
Also named &amp;quot;KEYCNT&amp;quot; on certain other DS(i)/GBA documentations.&lt;br /&gt;
The value of this register is copied to [[HID_Registers|HID_PAD_CNT]] when GBA mode enters sleep.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_MASK==&lt;br /&gt;
Set bits will use the corresponding values from [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] instead of allowing the hardware to read it from [[HID_Registers#HID_PAD|HID_PAD]].&lt;br /&gt;
&lt;br /&gt;
This is set to 0x1FFF (all buttons and the debug key) and [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] is set to 0 when the &amp;quot;Close this software and return to HOME Menu?&amp;quot; dialog is shown to prevent the button presses from propagating to the DS/GBA CPU.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_PAD==&lt;br /&gt;
Works the same way as [[HID_Registers#HID_PAD|HID_PAD]], but the values set here are only replaced in the HID_PAD seen by the DS/GBA CPU when the corresponding bits in [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]] are set.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
This is used to trigger things like the TWL MCU interrupt in TWL mode.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
Bit0 signals cartridge removal.&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
=Clock and reset registers=&lt;br /&gt;
==PDN_GPU_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| GPU main block + VRAM + LCD reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| PSC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Geoshader block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Rasterization block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| PPF block reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| PDC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| PDC related reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 7-15&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Clock enable for all blocks, VRAM and LCD. 1 = enable.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN uses a 12 ARM11 cycle delay to deassert reset.&lt;br /&gt;
&lt;br /&gt;
==PDN_VRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models: while it is used in tandem with PDN_GPU_CNT.bit16 in Boot11 screeninit code, Kernel11 only uses PDN_GPU_CNT.bit16 to power-off VRAM before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_LCD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models, only to be used in Boot11, as PDN_GPU_CNT.bit16 also drives the LCD clock.&lt;br /&gt;
&lt;br /&gt;
==PDN_FCRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Acknowledge clock request. Gets set or unset when toggling bit 1.&lt;br /&gt;
|}&lt;br /&gt;
Twl-/AgbBg use this to disable FCRAM for the GBA rom in GBA mode or DSi main RAM in DSi mode. AgbBg clears bit 0 in reg 0x10201000 before touching this reg.&lt;br /&gt;
&lt;br /&gt;
Kernel11 uses it to put the FCRAM in self-refresh mode (clock disable) before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_I2S_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| I2S1 Clock (maybe?) 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| I2S2 Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I2S1 clock enable bit seems to be unimplemented. Maybe it&#039;s because DSP clock enable drives it?&lt;br /&gt;
&lt;br /&gt;
==PDN_CAMERA_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==PDN_DSP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN services holds reset for 0x30 Arm11 cycles.&lt;br /&gt;
&lt;br /&gt;
==PDN_MVD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to be used by anything, but does have a clear effect on the hardware.&lt;br /&gt;
&lt;br /&gt;
The reset value for this register is 1 (out-of-reset at boot).&lt;br /&gt;
&lt;br /&gt;
=N3DS SoC (LGR) registers=&lt;br /&gt;
== PDN_LGR_SOCMODE ==&lt;br /&gt;
This is used for configuring the New3DS ARM11 CPU clock-rate. This register is New3DS-only: reading from here on Old3DS always returns all-zeros even when one tried writing data here prior to the read.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-2&lt;br /&gt;
| SoC mode.&lt;br /&gt;
Possible values:&lt;br /&gt;
  0=CTR+256MHz&lt;br /&gt;
  1=LGR2+256MHz, 5=LGR2+804MHz&lt;br /&gt;
  2=LGR1+256MHz, 3=LGR1+536MHz&lt;br /&gt;
&lt;br /&gt;
N3DS modes (LGR1/LGR2) enable the New 3DS FCRAM extension and are needed to access N3DS-only devices.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DS&lt;br /&gt;
* LGR1: N3DS prototype, 4 cores (originally 2), no L2C&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, has L2C&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Interrupt status (read) / clear (write)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All currently powered-on cores must be (and remain) in WFI state to trigger the SoC mode switch.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Kernel code suggests that devices that support LGR1 but not LGR2 only had 2 cores. All cores (the number of which can be read from MPCORE SCU registers) are usable in LGR1 mode.&lt;br /&gt;
&lt;br /&gt;
On firmlaunch, the kernel sets the mode to O3DS.&lt;br /&gt;
&lt;br /&gt;
[[SVC#KernelSetState|svcKernelSetState]] type10, only implemented on New3DS, uses this register. This piece of code choses the mode matching the input Param0 bit0 state (1 for higher clock), using the state of [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] to determine which mode is the best (which is always LGR2 on all released New 3DS units).&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enables the N3DS extramem block&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Enables the L2C block (LGR2 only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 sets this to 0x101 when bit 2 in [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] (LGR2 supported) is set otherwise 1.&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt; ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Power request: 0 = power off, 1 = power on&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Handshake bit&lt;br /&gt;
Needs to be set before powering on the core. It is meant to be cleared by software on the powered-on core, to signal itself.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Power status: 0 = off, 1 = on&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Core present?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Only usable for core2 and core3. Core 0 and 1 have a fixed, read-only value of 0x30 for this register.&lt;br /&gt;
&lt;br /&gt;
* On power-on, software should switch the affected core to Normal Mode on the SCU&lt;br /&gt;
* On power-off, software &#039;&#039;&#039;must&#039;&#039;&#039; switch the affected core to Powered Off mode on the SCU (otherwise the core won&#039;t go off)&lt;br /&gt;
&lt;br /&gt;
The normal Arm11 bootrom checks cpuid and hangs if cpuid &amp;gt;= 2. This is a problem when booting the 2 additional New3DS Arm11 MPCores. NewKernel11 solves this by using a hardware feature to overlay the bootrom with a configurable branch to a kernel function. This overlay feature was added with the New3DS.&lt;br /&gt;
&lt;br /&gt;
The overlay should be enabled by setting bit0 in [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_CNT|CFG11_BOOTROM_OVERLAY_CNT]] and configured by setting the entrypoint address to [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]].&lt;br /&gt;
&lt;br /&gt;
The overlay overrides all &#039;&#039;instruction&#039;&#039; reads from phyiscal addresses 0xFFFF0000-0xFFFF1000 and 0x10000-0x11000 to the following (figured out by using low exception vectors and configuring the b11 veeners accordingly):&lt;br /&gt;
  ldr pc, [pc, #(0x20 - 8)]&lt;br /&gt;
&lt;br /&gt;
and all &#039;&#039;data&#039;&#039; reads from the same ranges to [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]].&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21470</id>
		<title>PDN Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21470"/>
		<updated>2021-01-26T23:31:14Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Credits: nocash for figuring out the instruction overlay /* PDN_LGR_CPU_CNT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Register table=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_SLEEP_CNT|PDN_SLEEP_CNT]]&lt;br /&gt;
| 0x10141000&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]]&lt;br /&gt;
| 0x10141008&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_REASON|PDN_WAKE_REASON]]&lt;br /&gt;
| 0x1014100C&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], TwlBg, [[PDN Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_MODE|LGY_MODE]]&lt;br /&gt;
| 0x10141100&lt;br /&gt;
| 2&lt;br /&gt;
| TwlProcess9, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_SLEEP_CNT|LGY_SLEEP_CNT]]&lt;br /&gt;
| 0x10141104&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_IRQ_ENABLE|LGY_IRQ_ENABLE]]&lt;br /&gt;
| 0x10141108&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_PAD_CNT|LGY_PAD_CNT]]&lt;br /&gt;
| 0x1014110A&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]]&lt;br /&gt;
| 0x10141110&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]]&lt;br /&gt;
| 0x10141112&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_MASK|LGY_GPIOEMU_MASK]]&lt;br /&gt;
| 0x10141114&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]]&lt;br /&gt;
| 0x10141116&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_MASK|LGY_CARDDETECTEMU_MASK]]&lt;br /&gt;
| 0x10141118&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]]&lt;br /&gt;
| 0x10141119&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| LGY_?&lt;br /&gt;
| 0x10141120&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_GPU_CNT|PDN_GPU_CNT]]&lt;br /&gt;
| 0x10141200&lt;br /&gt;
| 4&lt;br /&gt;
| Boot11, Kernel11, [[PDN Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_VRAM_CNT|PDN_VRAM_CNT]]&lt;br /&gt;
| 0x10141204&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_LCD_CNT|PDN_LCD_CNT]]&lt;br /&gt;
| 0x10141208&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_FCRAM_CNT|PDN_FCRAM_CNT]]&lt;br /&gt;
| 0x10141210&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_I2S_CNT|PDN_I2S_CNT]]&lt;br /&gt;
| 0x10141220&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, TwlBg, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_CAMERA_CNT|PDN_CAMERA_CNT]]&lt;br /&gt;
| 0x10141224&lt;br /&gt;
| 1&lt;br /&gt;
| [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_DSP_CNT|PDN_DSP_CNT]]&lt;br /&gt;
| 0x10141230&lt;br /&gt;
| 1&lt;br /&gt;
| Process9, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_MVD_CNT|PDN_MVD_CNT]]&lt;br /&gt;
| 0x10141240&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_SOCMODE|PDN_LGR_SOCMODE]]&lt;br /&gt;
| 0x10141300&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CNT|PDN_LGR_CNT]]&lt;br /&gt;
| 0x10141304&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;&lt;br /&gt;
| 0x10141310&lt;br /&gt;
| 1*4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Sleep registers=&lt;br /&gt;
==PDN_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1 = Enter sleep mode&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = VRAM is powered down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 powers down VRAM (it&#039;s unclear whether bit15 is power-down or self-refresh mode) by first disabling the 8 banks using [[GPU/External_Registers#Map|GX register 0x10400030]], then by disabling the GPU clock using [[#PDN_GPU_CNT|PDN_GPU_CNT]] bit 16 and finally writes to and polls this register.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_ENABLE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Shell opened&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Headphones not plugged in&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| WiFi (?)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Shell GPIO (?)&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| [[I2C_Registers#Device_3|MCU interrupt]]&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Touch screen pressed&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| CTR gamecard inserted/removed&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
List in progress.&lt;br /&gt;
&lt;br /&gt;
This is a OR list of wake triggers that will wake up the console from sleep and raise IRQ 0x58.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_REASON==&lt;br /&gt;
Same layout as [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]].&lt;br /&gt;
&lt;br /&gt;
This is a OR list of the wake triggers that actually woke up the console.&lt;br /&gt;
&lt;br /&gt;
For each bit, write 1 to acknowledge, and 0 to clear (?).&lt;br /&gt;
&lt;br /&gt;
=Legacy registers=&lt;br /&gt;
==LGY_MODE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Read only legacy mode set on reg 0x10018000.&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = enable legacy mode.&lt;br /&gt;
|}&lt;br /&gt;
To boot into DSi or GBA mode first set register 0x10018000 to the desired mode and setup LgyFb. Then disable FCRAM by clearing bit 0 in reg 0x10201000, writing 0 to PDN_FCRAM_CNT followed by 1 and waiting for bit 2 to clear.&lt;br /&gt;
&lt;br /&gt;
The very last 3DS-mode register poke the [[FIRM|TWL_FIRM]] Process9 does before it gets switched into TWL-mode, is writing 0x8000 to this register. Before writing this register, TWL Process9 waits for ARM7 to change the value of this register. The Process9 code for this runs from ITCM, since switching into TWL-mode includes remapping all ARM9 physical memory.&lt;br /&gt;
&lt;br /&gt;
==LGY_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Write 1 to wakeup GBA mode.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Sleep state/ack. 1 when GBA mode entered sleep. Write 1 to ack.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = IRQ enable (IRQ 0x59)&lt;br /&gt;
|}&lt;br /&gt;
When a GBA game enters sleep mode and bit 15 is 1, IRQ 0x59 fires and bit 1 is set. Bit 1 must be acknowledged/written together with bit 0 otherwise GBA mode wakes up from sleep early sometimes.&lt;br /&gt;
&lt;br /&gt;
==LGY_IRQ_ENABLE==&lt;br /&gt;
[[ARM11_Interrupts|Arm11 interrupt]] enable bits for legacy interrupts, same bit layout as the GPIOEMU regs below.&lt;br /&gt;
&lt;br /&gt;
==LGY_PAD_CNT==&lt;br /&gt;
Also named &amp;quot;KEYCNT&amp;quot; on certain other DS(i)/GBA documentations.&lt;br /&gt;
The value of this register is copied to [[HID_Registers|HID_PAD_CNT]] when GBA mode enters sleep.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_MASK==&lt;br /&gt;
Set bits will use the corresponding values from [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] instead of allowing the hardware to read it from [[HID_Registers#HID_PAD|HID_PAD]].&lt;br /&gt;
&lt;br /&gt;
This is set to 0x1FFF (all buttons and the debug key) and [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] is set to 0 when the &amp;quot;Close this software and return to HOME Menu?&amp;quot; dialog is shown to prevent the button presses from propagating to the DS/GBA CPU.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_PAD==&lt;br /&gt;
Works the same way as [[HID_Registers#HID_PAD|HID_PAD]], but the values set here are only replaced in the HID_PAD seen by the DS/GBA CPU when the corresponding bits in [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]] are set.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
This is used to trigger things like the TWL MCU interrupt in TWL mode.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
Bit0 signals cartridge removal.&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
=Clock and reset registers=&lt;br /&gt;
==PDN_GPU_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| GPU main block + VRAM + LCD reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| PSC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Geoshader block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Rasterization block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| PPF block reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| PDC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| PDC related reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 7-15&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Clock enable for all blocks, VRAM and LCD. 1 = enable.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN uses a 12 ARM11 cycle delay to deassert reset.&lt;br /&gt;
&lt;br /&gt;
==PDN_VRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models: while it is used in tandem with PDN_GPU_CNT.bit16 in Boot11 screeninit code, Kernel11 only uses PDN_GPU_CNT.bit16 to power-off VRAM before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_LCD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models, only to be used in Boot11, as PDN_GPU_CNT.bit16 also drives the LCD clock.&lt;br /&gt;
&lt;br /&gt;
==PDN_FCRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Acknowledge clock request. Gets set or unset when toggling bit 1.&lt;br /&gt;
|}&lt;br /&gt;
Twl-/AgbBg use this to disable FCRAM for the GBA rom in GBA mode or DSi main RAM in DSi mode. AgbBg clears bit 0 in reg 0x10201000 before touching this reg.&lt;br /&gt;
&lt;br /&gt;
Kernel11 uses it to put the FCRAM in self-refresh mode (clock disable) before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_I2S_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| I2S1 Clock (maybe?) 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| I2S2 Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I2S1 clock enable bit seems to be unimplemented. Maybe it&#039;s because DSP clock enable drives it?&lt;br /&gt;
&lt;br /&gt;
==PDN_CAMERA_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==PDN_DSP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN services holds reset for 0x30 Arm11 cycles.&lt;br /&gt;
&lt;br /&gt;
==PDN_MVD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to be used by anything, but does have a clear effect on the hardware.&lt;br /&gt;
&lt;br /&gt;
The reset value for this register is 1 (out-of-reset at boot).&lt;br /&gt;
&lt;br /&gt;
=N3DS SoC (LGR) registers=&lt;br /&gt;
== PDN_LGR_SOCMODE ==&lt;br /&gt;
This is used for configuring the New3DS ARM11 CPU clock-rate. This register is New3DS-only: reading from here on Old3DS always returns all-zeros even when one tried writing data here prior to the read.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-2&lt;br /&gt;
| SoC mode.&lt;br /&gt;
Possible values:&lt;br /&gt;
  0=CTR+256MHz&lt;br /&gt;
  1=LGR2+256MHz, 5=LGR2+804MHz&lt;br /&gt;
  2=LGR1+256MHz, 3=LGR1+536MHz&lt;br /&gt;
&lt;br /&gt;
N3DS modes (LGR1/LGR2) enable the New 3DS FCRAM extension and are needed to access N3DS-only devices.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DS&lt;br /&gt;
* LGR1: N3DS prototype, 4 cores (originally 2), no L2C&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, has L2C&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Interrupt status (read) / clear (write)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All currently powered-on cores must be (and remain) in WFI state to trigger the SoC mode switch.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Kernel code suggests that devices that support LGR1 but not LGR2 only had 2 cores. All cores (the number of which can be read from MPCORE SCU registers) are usable in LGR1 mode.&lt;br /&gt;
&lt;br /&gt;
On firmlaunch, the kernel sets the mode to O3DS.&lt;br /&gt;
&lt;br /&gt;
[[SVC#KernelSetState|svcKernelSetState]] type10, only implemented on New3DS, uses this register. This piece of code choses the mode matching the input Param0 bit0 state (1 for higher clock), using the state of [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] to determine which mode is the best (which is always LGR2 on all released New 3DS units).&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enables the N3DS extramem block&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Enables the L2C block (LGR2 only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 sets this to 0x101 when bit 2 in [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] (LGR2 supported) is set otherwise 1.&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt; ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Power request: 0 = power off, 1 = power on&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Handshake bit&lt;br /&gt;
Needs to be set before powering on the core. It is meant to be cleared by software on the powered-on core, to signal itself.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Power status: 0 = off, 1 = on&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Core present?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Only usable for core2 and core3. Core 0 and 1 have a fixed, read-only value of 0x30 for this register.&lt;br /&gt;
&lt;br /&gt;
* On power-on, software should switch the affected core to Normal Mode on the SCU&lt;br /&gt;
* On power-off, software &#039;&#039;&#039;must&#039;&#039;&#039; switch the affected core to Powered Off mode on the SCU (otherwise the core won&#039;t go off)&lt;br /&gt;
&lt;br /&gt;
The normal Arm11 bootrom checks cpuid and hangs if cpuid &amp;gt;= 2. This is a problem when booting the 2 additional New3DS Arm11 MPCores. NewKernel11 solves this by using a hardware feature to overlay the bootrom with a configurable branch to a kernel function. This overlay feature was added with the New3DS.&lt;br /&gt;
&lt;br /&gt;
The overlay should be enabled by setting bit0 in [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_CNT|CFG11_BOOTROM_OVERLAY_CNT]] and configured by setting the entrypoint address to [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]].&lt;br /&gt;
&lt;br /&gt;
The overlays overrides all &#039;&#039;instruction&#039;&#039; reads from phyiscal addresses 0xFFFF0000-0xFFFF1000 and 0x10000-0x11000 to the following (figured out by using low exception vectors and configuring the b11 veeners accordingly):&lt;br /&gt;
  ldr pc, [pc, #(0x20 - 8)]&lt;br /&gt;
&lt;br /&gt;
and all &#039;&#039;data&#039;&#039; reads from the same ranges to [[CONFIG11_Registers#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]].&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21469</id>
		<title>PDN Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21469"/>
		<updated>2021-01-26T23:02:16Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* PDN_LGR_SOCMODE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Register table=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_SLEEP_CNT|PDN_SLEEP_CNT]]&lt;br /&gt;
| 0x10141000&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]]&lt;br /&gt;
| 0x10141008&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_REASON|PDN_WAKE_REASON]]&lt;br /&gt;
| 0x1014100C&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], TwlBg, [[PDN Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_MODE|LGY_MODE]]&lt;br /&gt;
| 0x10141100&lt;br /&gt;
| 2&lt;br /&gt;
| TwlProcess9, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_SLEEP_CNT|LGY_SLEEP_CNT]]&lt;br /&gt;
| 0x10141104&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_IRQ_ENABLE|LGY_IRQ_ENABLE]]&lt;br /&gt;
| 0x10141108&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_PAD_CNT|LGY_PAD_CNT]]&lt;br /&gt;
| 0x1014110A&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]]&lt;br /&gt;
| 0x10141110&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]]&lt;br /&gt;
| 0x10141112&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_MASK|LGY_GPIOEMU_MASK]]&lt;br /&gt;
| 0x10141114&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]]&lt;br /&gt;
| 0x10141116&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_MASK|LGY_CARDDETECTEMU_MASK]]&lt;br /&gt;
| 0x10141118&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]]&lt;br /&gt;
| 0x10141119&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| LGY_?&lt;br /&gt;
| 0x10141120&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_GPU_CNT|PDN_GPU_CNT]]&lt;br /&gt;
| 0x10141200&lt;br /&gt;
| 4&lt;br /&gt;
| Boot11, Kernel11, [[PDN Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_VRAM_CNT|PDN_VRAM_CNT]]&lt;br /&gt;
| 0x10141204&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_LCD_CNT|PDN_LCD_CNT]]&lt;br /&gt;
| 0x10141208&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_FCRAM_CNT|PDN_FCRAM_CNT]]&lt;br /&gt;
| 0x10141210&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_I2S_CNT|PDN_I2S_CNT]]&lt;br /&gt;
| 0x10141220&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, TwlBg, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_CAMERA_CNT|PDN_CAMERA_CNT]]&lt;br /&gt;
| 0x10141224&lt;br /&gt;
| 1&lt;br /&gt;
| [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_DSP_CNT|PDN_DSP_CNT]]&lt;br /&gt;
| 0x10141230&lt;br /&gt;
| 1&lt;br /&gt;
| Process9, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_MVD_CNT|PDN_MVD_CNT]]&lt;br /&gt;
| 0x10141240&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_SOCMODE|PDN_LGR_SOCMODE]]&lt;br /&gt;
| 0x10141300&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CNT|PDN_LGR_CNT]]&lt;br /&gt;
| 0x10141304&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;&lt;br /&gt;
| 0x10141310&lt;br /&gt;
| 1*4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Sleep registers=&lt;br /&gt;
==PDN_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1 = Enter sleep mode&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = VRAM is powered down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 powers down VRAM (it&#039;s unclear whether bit15 is power-down or self-refresh mode) by first disabling the 8 banks using [[GPU/External_Registers#Map|GX register 0x10400030]], then by disabling the GPU clock using [[#PDN_GPU_CNT|PDN_GPU_CNT]] bit 16 and finally writes to and polls this register.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_ENABLE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Shell opened&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Headphones not plugged in&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| WiFi (?)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Shell GPIO (?)&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| [[I2C_Registers#Device_3|MCU interrupt]]&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Touch screen pressed&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| CTR gamecard inserted/removed&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
List in progress.&lt;br /&gt;
&lt;br /&gt;
This is a OR list of wake triggers that will wake up the console from sleep and raise IRQ 0x58.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_REASON==&lt;br /&gt;
Same layout as [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]].&lt;br /&gt;
&lt;br /&gt;
This is a OR list of the wake triggers that actually woke up the console.&lt;br /&gt;
&lt;br /&gt;
For each bit, write 1 to acknowledge, and 0 to clear (?).&lt;br /&gt;
&lt;br /&gt;
=Legacy registers=&lt;br /&gt;
==LGY_MODE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Read only legacy mode set on reg 0x10018000.&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = enable legacy mode.&lt;br /&gt;
|}&lt;br /&gt;
To boot into DSi or GBA mode first set register 0x10018000 to the desired mode and setup LgyFb. Then disable FCRAM by clearing bit 0 in reg 0x10201000, writing 0 to PDN_FCRAM_CNT followed by 1 and waiting for bit 2 to clear.&lt;br /&gt;
&lt;br /&gt;
The very last 3DS-mode register poke the [[FIRM|TWL_FIRM]] Process9 does before it gets switched into TWL-mode, is writing 0x8000 to this register. Before writing this register, TWL Process9 waits for ARM7 to change the value of this register. The Process9 code for this runs from ITCM, since switching into TWL-mode includes remapping all ARM9 physical memory.&lt;br /&gt;
&lt;br /&gt;
==LGY_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Write 1 to wakeup GBA mode.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Sleep state/ack. 1 when GBA mode entered sleep. Write 1 to ack.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = IRQ enable (IRQ 0x59)&lt;br /&gt;
|}&lt;br /&gt;
When a GBA game enters sleep mode and bit 15 is 1, IRQ 0x59 fires and bit 1 is set. Bit 1 must be acknowledged/written together with bit 0 otherwise GBA mode wakes up from sleep early sometimes.&lt;br /&gt;
&lt;br /&gt;
==LGY_IRQ_ENABLE==&lt;br /&gt;
[[ARM11_Interrupts|Arm11 interrupt]] enable bits for legacy interrupts, same bit layout as the GPIOEMU regs below.&lt;br /&gt;
&lt;br /&gt;
==LGY_PAD_CNT==&lt;br /&gt;
Also named &amp;quot;KEYCNT&amp;quot; on certain other DS(i)/GBA documentations.&lt;br /&gt;
The value of this register is copied to [[HID_Registers|HID_PAD_CNT]] when GBA mode enters sleep.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_MASK==&lt;br /&gt;
Set bits will use the corresponding values from [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] instead of allowing the hardware to read it from [[HID_Registers#HID_PAD|HID_PAD]].&lt;br /&gt;
&lt;br /&gt;
This is set to 0x1FFF (all buttons and the debug key) and [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] is set to 0 when the &amp;quot;Close this software and return to HOME Menu?&amp;quot; dialog is shown to prevent the button presses from propagating to the DS/GBA CPU.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_PAD==&lt;br /&gt;
Works the same way as [[HID_Registers#HID_PAD|HID_PAD]], but the values set here are only replaced in the HID_PAD seen by the DS/GBA CPU when the corresponding bits in [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]] are set.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
This is used to trigger things like the TWL MCU interrupt in TWL mode.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
Bit0 signals cartridge removal.&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
=Clock and reset registers=&lt;br /&gt;
==PDN_GPU_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| GPU main block + VRAM + LCD reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| PSC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Geoshader block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Rasterization block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| PPF block reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| PDC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| PDC related reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 7-15&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Clock enable for all blocks, VRAM and LCD. 1 = enable.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN uses a 12 ARM11 cycle delay to deassert reset.&lt;br /&gt;
&lt;br /&gt;
==PDN_VRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models: while it is used in tandem with PDN_GPU_CNT.bit16 in Boot11 screeninit code, Kernel11 only uses PDN_GPU_CNT.bit16 to power-off VRAM before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_LCD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models, only to be used in Boot11, as PDN_GPU_CNT.bit16 also drives the LCD clock.&lt;br /&gt;
&lt;br /&gt;
==PDN_FCRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Acknowledge clock request. Gets set or unset when toggling bit 1.&lt;br /&gt;
|}&lt;br /&gt;
Twl-/AgbBg use this to disable FCRAM for the GBA rom in GBA mode or DSi main RAM in DSi mode. AgbBg clears bit 0 in reg 0x10201000 before touching this reg.&lt;br /&gt;
&lt;br /&gt;
Kernel11 uses it to put the FCRAM in self-refresh mode (clock disable) before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_I2S_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| I2S1 Clock (maybe?) 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| I2S2 Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I2S1 clock enable bit seems to be unimplemented. Maybe it&#039;s because DSP clock enable drives it?&lt;br /&gt;
&lt;br /&gt;
==PDN_CAMERA_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==PDN_DSP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN services holds reset for 0x30 Arm11 cycles.&lt;br /&gt;
&lt;br /&gt;
==PDN_MVD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to be used by anything, but does have a clear effect on the hardware.&lt;br /&gt;
&lt;br /&gt;
The reset value for this register is 1 (out-of-reset at boot).&lt;br /&gt;
&lt;br /&gt;
=N3DS SoC (LGR) registers=&lt;br /&gt;
== PDN_LGR_SOCMODE ==&lt;br /&gt;
This is used for configuring the New3DS ARM11 CPU clock-rate. This register is New3DS-only: reading from here on Old3DS always returns all-zeros even when one tried writing data here prior to the read.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-2&lt;br /&gt;
| SoC mode.&lt;br /&gt;
Possible values:&lt;br /&gt;
  0=CTR+256MHz&lt;br /&gt;
  1=LGR2+256MHz, 5=LGR2+804MHz&lt;br /&gt;
  2=LGR1+256MHz, 3=LGR1+536MHz&lt;br /&gt;
&lt;br /&gt;
N3DS modes (LGR1/LGR2) enable the New 3DS FCRAM extension and are needed to access N3DS-only devices.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DS&lt;br /&gt;
* LGR1: N3DS prototype, 4 cores (originally 2), no L2C&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, has L2C&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Interrupt status (read) / clear (write)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;All currently powered-on cores must be (and remain) in WFI state to trigger the SoC mode switch.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Kernel code suggests that devices that support LGR1 but not LGR2 only had 2 cores. All cores (the number of which can be read from MPCORE SCU registers) are usable in LGR1 mode.&lt;br /&gt;
&lt;br /&gt;
On firmlaunch, the kernel sets the mode to O3DS.&lt;br /&gt;
&lt;br /&gt;
[[SVC#KernelSetState|svcKernelSetState]] type10, only implemented on New3DS, uses this register. This piece of code choses the mode matching the input Param0 bit0 state (1 for higher clock), using the state of [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] to determine which mode is the best (which is always LGR2 on all released New 3DS units).&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enables the N3DS extramem block&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Enables the L2C block (LGR2 only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 sets this to 0x101 when bit 2 in [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] (LGR2 supported) is set otherwise 1.&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt; ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| nRESET, 0 = reset. Also enable the bootrom instruction overlay.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable bootrom data overlay&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Reset operation in progress&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Always 1?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Only usable for core2 and core3.&lt;br /&gt;
&lt;br /&gt;
The normal Arm11 bootrom checks cpuid and hangs if cpuid &amp;gt;= 2. This is a problem when booting the 2 additional New3DS Arm11 MPCores. NewKernel11 solves this by using a hardware feature to overlay the bootrom with a configurable branch to a kernel function. This overlay feature was added with the New3DS.&lt;br /&gt;
&lt;br /&gt;
Bit1 in register above enables a bootrom data-override for physical addresses 0xFFFF0000-0xFFFF1000 and 0x10000-0x11000. All _data reads_ made to those regions now read the 32-bit value provided in [[CONFIG11 Registers #CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]].&lt;br /&gt;
&lt;br /&gt;
Bit0 sets the core out of reset and enables a bootrom instruction-overlay which means that _instruction reads_ made to the bootrom region are overridden. We have not been able to dump what instructions are actually placed at bootrom by this switch (because reading the area only yields data-reads). Jumping randomly into the 0xFFFF0000-0xFFFF1000 region works fine and jumps to the value provided by the data overlay [[CONFIG11 Registers #CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]. Thus we may predict that the entire bootrom region is filled by:&lt;br /&gt;
ldr pc, [pc]&lt;br /&gt;
&lt;br /&gt;
Or equivalent. However, jumping to some high addresses such as 0xFFFF0FF0+ will crash the core. This may be explained by prefetching in the Arm pipeline, and might help us identify what instructions are placed by the instruction-overlay.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CONFIG11_Registers&amp;diff=21468</id>
		<title>CONFIG11 Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CONFIG11_Registers&amp;diff=21468"/>
		<updated>2021-01-26T22:56:42Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* CFG11_SOCINFO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SHAREDWRAM_32K_CODE|CFG11_SHAREDWRAM_32K_CODE]]&amp;lt;0-7&amp;gt;&lt;br /&gt;
| 0x10140000&lt;br /&gt;
| 1*8&lt;br /&gt;
| Boot11, Process9, [[DSP Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SHAREDWRAM_32K_DATA|CFG11_SHAREDWRAM_32K_DATA]]&amp;lt;0-7&amp;gt;&lt;br /&gt;
| 0x10140008&lt;br /&gt;
| 1*8&lt;br /&gt;
| Boot11, Process9, [[DSP Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_NULLPAGE_CNT|CFG11_NULLPAGE_CNT]]&lt;br /&gt;
| 0x10140100&lt;br /&gt;
| 4&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_FIQ_MASK|CFG11_FIQ_MASK]]&lt;br /&gt;
| 0x10140104&lt;br /&gt;
| 1&lt;br /&gt;
| Kernel11.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Debug related bitfield?&lt;br /&gt;
Observed: 0b1100(N3DS)/0b0000(O3DS)&lt;br /&gt;
| 0x10140105&lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_CDMA_CNT|CFG_CDMA_CNT]]&lt;br /&gt;
| 0x1014010C&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_GPUPROT|CFG11_GPUPROT]]&lt;br /&gt;
| 0x10140140&lt;br /&gt;
| 4&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_WIFICNT|CFG11_WIFICNT]]&lt;br /&gt;
| 0x10140180&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg, [[NWM Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SPI_CNT|CFG11_SPI_CNT]]&lt;br /&gt;
| 0x101401C0&lt;br /&gt;
| 2&lt;br /&gt;
| [[SPI Services]], TwlBg&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140200&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_GPU_N3DS_CNT|CFG11_GPU_N3DS_CNT]]&lt;br /&gt;
| 0x10140400&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_CDMA_PERIPHERALS|CFG11_CDMA_PERIPHERALS]]&lt;br /&gt;
| 0x10140410&lt;br /&gt;
| 4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_BOOTROM_OVERLAY_CNT|CFG11_BOOTROM_OVERLAY_CNT]]&lt;br /&gt;
| 0x10140420&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]&lt;br /&gt;
| 0x10140424&lt;br /&gt;
| 4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140428&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SOCINFO|CFG11_SOCINFO]]&lt;br /&gt;
| 0x10140FFC&lt;br /&gt;
| 2&lt;br /&gt;
| Boot11, Kernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SHAREDWRAM_32K_CODE ==&lt;br /&gt;
Used for mapping 32K chunks of shared WRAM for DSP data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Master (0=ARM9?, 1=ARM11?, 2 or 3=DSP/code)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| Offset (0..7) (slot 0..7) (LSB of address in 32Kbyte units)&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| Not used (0)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Enable (0=Disable, 1=Enable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SHAREDWRAM_32K_DATA ==&lt;br /&gt;
Used for mapping 32K chunks of shared WRAM for DSP data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Master (0=ARM9?, 1=ARM11?, 2 or 3=DSP/data)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| Offset (0..7) (slot 0..7) (LSB of address in 32Kbyte units)&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| Not used (0)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Enable (0=Disable, 1=Enable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_NULLPAGE_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Trap all &#039;&#039;data&#039;&#039; accesses to physmem addresses 0x0000 to 0x1000&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The reset value of this register is 0x10000.&lt;br /&gt;
&lt;br /&gt;
== CFG11_FIQ_MASK ==&lt;br /&gt;
Write bit N to mask FIQ interrutps on core N? (judging from what Kernel11 does -- it only ever configures FIQ for core1)&lt;br /&gt;
&lt;br /&gt;
Reset value: 0xF&lt;br /&gt;
&lt;br /&gt;
== CFG11_CDMA_CNT ==&lt;br /&gt;
Write 1 to enable, to disable.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable Microphone DMA (CDMA 0x00)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable NTRCARD DMA on Arm11 side (CDMA 0x01)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| WiFi. Enabled during kernel init since 11.4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SPI_CNT ==&lt;br /&gt;
When the corresponding bit is 0, the bus has to be accessed using the DS SPI registers. Otherwise it has to be accessed using the 3DS SPI registers.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable [[SPI Registers]] 0x10160800.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable [[SPI Registers]] 0x10142800.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Enable [[SPI Registers]] 0x10143800.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_GPU_N3DS_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable N3DS mode? (enables access to the extra N3DS FCRAM banks, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Texture related? (observing texture glitches when disabling this bit)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_CDMA_PERIPHERALS ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-17&lt;br /&gt;
| CDMA Peripheral 0x00-0x11 data request target (0=Old CDMA, 1=New CDMA)&lt;br /&gt;
|-&lt;br /&gt;
| 18-31&lt;br /&gt;
| Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_BOOTROM_OVERLAY_CNT ==&lt;br /&gt;
Bit0: Enable bootrom overlay functionality.&lt;br /&gt;
&lt;br /&gt;
== CFG11_BOOTROM_OVERLAY_VAL ==&lt;br /&gt;
The 32-bit value to overlay data-reads to bootrom with. See [[PDN Registers#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== CFG11_SOCINFO ==&lt;br /&gt;
Read-only register. Identifies the maximum mode-switching capabilities of the SoC.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DS&lt;br /&gt;
* LGR1: N3DS prototype, 4 cores (orginally 2), up to 535MHz, no L2C (see below)&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, up to 804MHz, has L2C&lt;br /&gt;
&lt;br /&gt;
Kernel code suggests that devices that support LGR1 but not LGR2 only had 2 cores. All cores (the number of which can be read from MPCORE SCU registers) are usable in LGR1 mode.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| CTR mode (1 on all 3DSes)&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LGR1 (1 on all N3DSes, orginally 2 cores, and 2x clockrate)&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| LGR2 (1 on all released N3DSes, 4 cores and 3x clockrate)&lt;br /&gt;
| Kernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CFG11_GPUPROT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 3-0&lt;br /&gt;
| Old FCRAM DMA cutoff size, 0 = no protection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 7-4&lt;br /&gt;
| New FCRAM DMA cutoff size, 0 = no protection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 8&lt;br /&gt;
| AXIWRAM protection, 0 = accessible.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 10-9&lt;br /&gt;
| QTM DMA cutoff size&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 31-11&lt;br /&gt;
| Zeroes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the old FCRAM DMA cutoff, it protects starting from 0x28000000-(0x800000*x) until end of FCRAM. There is no way to protect the first 0x800000-bytes.&lt;br /&gt;
&lt;br /&gt;
For the new FCRAM DMA cutoff, it protects starting from 0x30000000-(0x800000*x) until end of FCRAM. When the old FCRAM cutoff is set to non-zero, the first 0x800000-bytes bytes of new FCRAM are protected.&lt;br /&gt;
&lt;br /&gt;
On New3DS the old+new FCRAM cutoff can be used at the same time, however this isn&#039;t done officially.&lt;br /&gt;
&lt;br /&gt;
For the QTM DMA cutoff, it protects starting from 0x1F400000-(0x100000*x) until end of QTM mem.&lt;br /&gt;
&lt;br /&gt;
On cold boot this reg is set to 0.&lt;br /&gt;
&lt;br /&gt;
When this register is set to value 0, the GPU can access the entire FCRAM, AXIWRAM, and on New3DS all QTM-mem.&lt;br /&gt;
&lt;br /&gt;
[[SVC|Initialized]] during kernel boot, and used with [[SVC]] 0x59 which was implemented with [[11.3.0-36|v11.3]].&lt;br /&gt;
&lt;br /&gt;
==CFG11_WIFICNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0&lt;br /&gt;
| Enable wifi subsystem&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21467</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21467"/>
		<updated>2021-01-24T22:36:28Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO pins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO3_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
Only GPIO2 and GPIO3 pins have their interrupts configurable. Active low pins should be configured as &amp;quot;falling edge&amp;quot;, and output ports shouldn&#039;t have interrupts enabled at all.&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| Debug button (?) (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63 (falling edge)&lt;br /&gt;
| Touch Screen (active low, 0 = screen pressed)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60 (falling edge)&lt;br /&gt;
0x62 (rising edge)&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| TWL depop circuit (?) (active-low)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| WiFi mode/freq. select (0 = CTR, 1 = MP (DS WiFi))&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA interrupt (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| IrDA TX-RC (output)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| IrDA RXD (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| NFC output1 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| NFC output2 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| Headphones button/half-inserted (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| QTM output (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| WiFi enable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21466</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21466"/>
		<updated>2021-01-24T22:35:08Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO3_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
Only GPIO2 and GPIO3 pins have their interrupts configurable. Active low pins should be configured as &amp;quot;falling edge&amp;quot;, and output ports shouldn&#039;t have interrupts enabled at all.&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| Debug button (?) (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63 (falling edge)&lt;br /&gt;
| Touch Screen (active low, 0 = screen pressed)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60 (falling edge)&lt;br /&gt;
0x62 (rising edge)&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| TWL depop circuit (?) (active-low)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA interrupt (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| IrDA TX-RC (output)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| IrDA RXD (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| NFC output1 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| NFC output2 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| Headphones button/half-inserted (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| QTM output (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21465</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21465"/>
		<updated>2021-01-24T21:20:32Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* Hardware Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Boot11 and Kernel11 to kickstart Core1/2/3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened (GPIO1_2 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed (GPIO1_2 rising edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touch Screen pressed (GPIO1_1 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones inserted (GPIO2_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| TWL depop circuit (GPIO2_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick interrupt (GPIO3_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA interrupt (active-low) (GPIO3_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro interrupt (GPIO3_2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output) (GPIO3_3)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA TX-RC (output) (GPIO3_4)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA RXD (GPIO3_5)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output1 (?) (GPIO3_6)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output2 (?) (GPIO3_7)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones button/half-inserted (active-low) (GPIO3_8)&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU interrupt (GPIO3_9)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC interrupt (?) (GPIO3_10)&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| QTM output (?) (GPIO3_11)&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21464</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21464"/>
		<updated>2021-01-24T21:19:12Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO pins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
Only GPIO2 and GPIO3 pins have their interrupts configurable. Active low pins should be configured as &amp;quot;falling edge&amp;quot;, and output ports shouldn&#039;t have interrupts enabled at all.&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| Debug button (?) (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63 (falling edge)&lt;br /&gt;
| Touch Screen (active low, 0 = screen pressed)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60 (falling edge)&lt;br /&gt;
0x62 (rising edge)&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| TWL depop circuit (?) (active-low)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA interrupt (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| IrDA TX-RC (output)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| IrDA RXD (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| NFC output1 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| NFC output2 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| Headphones button/half-inserted (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| QTM output (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21463</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21463"/>
		<updated>2021-01-24T21:14:40Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: More GPIOs /* Hardware Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Boot11 and Kernel11 to kickstart Core1/2/3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened (GPIO1_2 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed (GPIO1_2 rising edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touch Pen Down (GPIO1_1 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones inserted (GPIO2_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| TWL depop circuit (GPIO2_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick interrupt (GPIO3_0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA interrupt (active-low) (GPIO3_1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro interrupt (GPIO3_2)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output) (GPIO3_3)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA TX-RC (output) (GPIO3_4)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA RXD (GPIO3_5)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output1 (?) (GPIO3_6)&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC output2 (?) (GPIO3_7)&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphones button/half-inserted (active-low) (GPIO3_8)&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU interrupt (GPIO3_9)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC interrupt (?) (GPIO3_10)&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| QTM output (?) (GPIO3_11)&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21462</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21462"/>
		<updated>2021-01-24T21:09:55Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO pins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
Only GPIO2 and GPIO3 pins have their interrupts configurable. Active low pins should be configured as &amp;quot;falling edge&amp;quot;, and output ports shouldn&#039;t have interrupts enabled at all.&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| Debug button (?) (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63 (falling edge)&lt;br /&gt;
| Touch Pen down (active low, 0 = screen pressed)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60 (falling edge)&lt;br /&gt;
0x62 (rising edge)&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| TWL depop circuit (?) (active-low)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA interrupt (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| IrDA TX-RC (output)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| IrDA RXD (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| NFC output1 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| NFC output2 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| Headphones button/half-inserted (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| QTM output (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21461</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21461"/>
		<updated>2021-01-24T18:32:10Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO pins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
Only GPIO2 and GPIO3 pins have their interrupts configurable. Active low pins should be configured as &amp;quot;falling edge&amp;quot;, and output ports shouldn&#039;t have interrupts enabled at all.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| Debug button (?) (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63 (falling edge)&lt;br /&gt;
| Touch Pen down (active low, 0 = screen pressed)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60 (falling edge)&lt;br /&gt;
0x62 (rising edge)&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones detected (CODEC)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| TWL depop circuit (?) (CODEC, active-low)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA interrupt (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| C-stick &amp;quot;stop&amp;quot; (output)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| IrDA TX-RC (output)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| IrDA RXD (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| NFC output1 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| NFC output2 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| Headphones inserted (active-low)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| QTM output (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21460</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21460"/>
		<updated>2021-01-24T15:47:13Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO pins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| GPIO1_0 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63 (falling edge) &lt;br /&gt;
| Touch Pen up&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60 (falling edge)&lt;br /&gt;
0x62 (rising edge)&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| GPIO2_1 (?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| GPIO3_3 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| GPIO3_4 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| GPIO3_5 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| GPIO3_6 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| GPIO3_7 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| GPIO3_8 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| GPIO3_11 (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21459</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21459"/>
		<updated>2021-01-24T15:45:28Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* Hardware Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Boot11 and Kernel11 to kickstart Core1/2/3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened (GPIO1_2 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed (GPIO1_2 rising edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touch Pen Down (GPIO1_1 falling edge)&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphone jack plugged in/out&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO2_1&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_3&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_4&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_5&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_6&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_7&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_8&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU (HOME/POWER pressed/released or WiFi switch pressed, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| GPIO3_11&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CONFIG11_Registers&amp;diff=21458</id>
		<title>CONFIG11 Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CONFIG11_Registers&amp;diff=21458"/>
		<updated>2021-01-23T16:09:00Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: nullpage_cnt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SHAREDWRAM_32K_CODE|CFG11_SHAREDWRAM_32K_CODE]]&amp;lt;0-7&amp;gt;&lt;br /&gt;
| 0x10140000&lt;br /&gt;
| 1*8&lt;br /&gt;
| Boot11, Process9, [[DSP Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SHAREDWRAM_32K_DATA|CFG11_SHAREDWRAM_32K_DATA]]&amp;lt;0-7&amp;gt;&lt;br /&gt;
| 0x10140008&lt;br /&gt;
| 1*8&lt;br /&gt;
| Boot11, Process9, [[DSP Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_NULLPAGE_CNT|CFG11_NULLPAGE_CNT]]&lt;br /&gt;
| 0x10140100&lt;br /&gt;
| 4&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_FIQ_MASK|CFG11_FIQ_MASK]]&lt;br /&gt;
| 0x10140104&lt;br /&gt;
| 1&lt;br /&gt;
| Kernel11.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Debug related bitfield?&lt;br /&gt;
Observed: 0b1100(N3DS)/0b0000(O3DS)&lt;br /&gt;
| 0x10140105&lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_CDMA_CNT|CFG_CDMA_CNT]]&lt;br /&gt;
| 0x1014010C&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_GPUPROT|CFG11_GPUPROT]]&lt;br /&gt;
| 0x10140140&lt;br /&gt;
| 4&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_WIFICNT|CFG11_WIFICNT]]&lt;br /&gt;
| 0x10140180&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg, [[NWM Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SPI_CNT|CFG11_SPI_CNT]]&lt;br /&gt;
| 0x101401C0&lt;br /&gt;
| 2&lt;br /&gt;
| [[SPI Services]], TwlBg&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140200&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_GPU_N3DS_CNT|CFG11_GPU_N3DS_CNT]]&lt;br /&gt;
| 0x10140400&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_CDMA_PERIPHERALS|CFG11_CDMA_PERIPHERALS]]&lt;br /&gt;
| 0x10140410&lt;br /&gt;
| 4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_BOOTROM_OVERLAY_CNT|CFG11_BOOTROM_OVERLAY_CNT]]&lt;br /&gt;
| 0x10140420&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]&lt;br /&gt;
| 0x10140424&lt;br /&gt;
| 4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140428&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SOCINFO|CFG11_SOCINFO]]&lt;br /&gt;
| 0x10140FFC&lt;br /&gt;
| 2&lt;br /&gt;
| Boot11, Kernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SHAREDWRAM_32K_CODE ==&lt;br /&gt;
Used for mapping 32K chunks of shared WRAM for DSP data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Master (0=ARM9?, 1=ARM11?, 2 or 3=DSP/code)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| Offset (0..7) (slot 0..7) (LSB of address in 32Kbyte units)&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| Not used (0)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Enable (0=Disable, 1=Enable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SHAREDWRAM_32K_DATA ==&lt;br /&gt;
Used for mapping 32K chunks of shared WRAM for DSP data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Master (0=ARM9?, 1=ARM11?, 2 or 3=DSP/data)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| Offset (0..7) (slot 0..7) (LSB of address in 32Kbyte units)&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| Not used (0)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Enable (0=Disable, 1=Enable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_NULLPAGE_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Trap all &#039;&#039;data&#039;&#039; accesses to physmem addresses 0x0000 to 0x1000&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Unknown&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The reset value of this register is 0x10000.&lt;br /&gt;
&lt;br /&gt;
== CFG11_FIQ_MASK ==&lt;br /&gt;
Write bit N to mask FIQ interrutps on core N? (judging from what Kernel11 does -- it only ever configures FIQ for core1)&lt;br /&gt;
&lt;br /&gt;
Reset value: 0xF&lt;br /&gt;
&lt;br /&gt;
== CFG11_CDMA_CNT ==&lt;br /&gt;
Write 1 to enable, to disable.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable Microphone DMA (CDMA 0x00)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable NTRCARD DMA on Arm11 side (CDMA 0x01)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| WiFi. Enabled during kernel init since 11.4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SPI_CNT ==&lt;br /&gt;
When the corresponding bit is 0, the bus has to be accessed using the DS SPI registers. Otherwise it has to be accessed using the 3DS SPI registers.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable [[SPI Registers]] 0x10160800.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable [[SPI Registers]] 0x10142800.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Enable [[SPI Registers]] 0x10143800.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_GPU_N3DS_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable N3DS mode? (enables access to the extra N3DS FCRAM banks, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Texture related? (observing texture glitches when disabling this bit)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_CDMA_PERIPHERALS ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-17&lt;br /&gt;
| CDMA Peripheral 0x00-0x11 data request target (0=Old CDMA, 1=New CDMA)&lt;br /&gt;
|-&lt;br /&gt;
| 18-31&lt;br /&gt;
| Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_BOOTROM_OVERLAY_CNT ==&lt;br /&gt;
Bit0: Enable bootrom overlay functionality.&lt;br /&gt;
&lt;br /&gt;
== CFG11_BOOTROM_OVERLAY_VAL ==&lt;br /&gt;
The 32-bit value to overlay data-reads to bootrom with. See [[PDN Registers#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== CFG11_SOCINFO ==&lt;br /&gt;
Read-only register. Identifies the maximum mode-switching capabilities of the SoC.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DS&lt;br /&gt;
* LGR1: N3DS prototype, 2 cores, no L2C&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, has L2C&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| CTR mode (1 on all 3DSes)&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LGR1 (1 on all N3DSes, orginally 2 cores, and 2x clockrate)&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| LGR2 (1 on all released N3DSes, 4 cores and 3x clockrate)&lt;br /&gt;
| Kernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CFG11_GPUPROT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 3-0&lt;br /&gt;
| Old FCRAM DMA cutoff size, 0 = no protection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 7-4&lt;br /&gt;
| New FCRAM DMA cutoff size, 0 = no protection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 8&lt;br /&gt;
| AXIWRAM protection, 0 = accessible.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 10-9&lt;br /&gt;
| QTM DMA cutoff size&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 31-11&lt;br /&gt;
| Zeroes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the old FCRAM DMA cutoff, it protects starting from 0x28000000-(0x800000*x) until end of FCRAM. There is no way to protect the first 0x800000-bytes.&lt;br /&gt;
&lt;br /&gt;
For the new FCRAM DMA cutoff, it protects starting from 0x30000000-(0x800000*x) until end of FCRAM. When the old FCRAM cutoff is set to non-zero, the first 0x800000-bytes bytes of new FCRAM are protected.&lt;br /&gt;
&lt;br /&gt;
On New3DS the old+new FCRAM cutoff can be used at the same time, however this isn&#039;t done officially.&lt;br /&gt;
&lt;br /&gt;
For the QTM DMA cutoff, it protects starting from 0x1F400000-(0x100000*x) until end of QTM mem.&lt;br /&gt;
&lt;br /&gt;
On cold boot this reg is set to 0.&lt;br /&gt;
&lt;br /&gt;
When this register is set to value 0, the GPU can access the entire FCRAM, AXIWRAM, and on New3DS all QTM-mem.&lt;br /&gt;
&lt;br /&gt;
[[SVC|Initialized]] during kernel boot, and used with [[SVC]] 0x59 which was implemented with [[11.3.0-36|v11.3]].&lt;br /&gt;
&lt;br /&gt;
==CFG11_WIFICNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0&lt;br /&gt;
| Enable wifi subsystem&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=CONFIG11_Registers&amp;diff=21457</id>
		<title>CONFIG11 Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=CONFIG11_Registers&amp;diff=21457"/>
		<updated>2021-01-23T15:28:39Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* CFG11_SOCINFO */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SHAREDWRAM_32K_CODE|CFG11_SHAREDWRAM_32K_CODE]]&amp;lt;0-7&amp;gt;&lt;br /&gt;
| 0x10140000&lt;br /&gt;
| 1*8&lt;br /&gt;
| Boot11, Process9, [[DSP Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SHAREDWRAM_32K_DATA|CFG11_SHAREDWRAM_32K_DATA]]&amp;lt;0-7&amp;gt;&lt;br /&gt;
| 0x10140008&lt;br /&gt;
| 1*8&lt;br /&gt;
| Boot11, Process9, [[DSP Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140100&lt;br /&gt;
| 4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_FIQ_MASK|CFG11_FIQ_MASK]]&lt;br /&gt;
| 0x10140104&lt;br /&gt;
| 1&lt;br /&gt;
| Kernel11.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| Debug related bitfield?&lt;br /&gt;
Observed: 0b1100(N3DS)/0b0000(O3DS)&lt;br /&gt;
| 0x10140105&lt;br /&gt;
| 1&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_CDMA_CNT|CFG_CDMA_CNT]]&lt;br /&gt;
| 0x1014010C&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_GPUPROT|CFG11_GPUPROT]]&lt;br /&gt;
| 0x10140140&lt;br /&gt;
| 4&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_WIFICNT|CFG11_WIFICNT]]&lt;br /&gt;
| 0x10140180&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg, [[NWM Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SPI_CNT|CFG11_SPI_CNT]]&lt;br /&gt;
| 0x101401C0&lt;br /&gt;
| 2&lt;br /&gt;
| [[SPI Services]], TwlBg&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140200&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_GPU_N3DS_CNT|CFG11_GPU_N3DS_CNT]]&lt;br /&gt;
| 0x10140400&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_CDMA_PERIPHERALS|CFG11_CDMA_PERIPHERALS]]&lt;br /&gt;
| 0x10140410&lt;br /&gt;
| 4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_BOOTROM_OVERLAY_CNT|CFG11_BOOTROM_OVERLAY_CNT]]&lt;br /&gt;
| 0x10140420&lt;br /&gt;
| 1&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]&lt;br /&gt;
| 0x10140424&lt;br /&gt;
| 4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| ?&lt;br /&gt;
| 0x10140428&lt;br /&gt;
| 4&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#CFG11_SOCINFO|CFG11_SOCINFO]]&lt;br /&gt;
| 0x10140FFC&lt;br /&gt;
| 2&lt;br /&gt;
| Boot11, Kernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SHAREDWRAM_32K_CODE ==&lt;br /&gt;
Used for mapping 32K chunks of shared WRAM for DSP data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Master (0=ARM9?, 1=ARM11?, 2 or 3=DSP/code)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| Offset (0..7) (slot 0..7) (LSB of address in 32Kbyte units)&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| Not used (0)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Enable (0=Disable, 1=Enable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SHAREDWRAM_32K_DATA ==&lt;br /&gt;
Used for mapping 32K chunks of shared WRAM for DSP data.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Master (0=ARM9?, 1=ARM11?, 2 or 3=DSP/data)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| Offset (0..7) (slot 0..7) (LSB of address in 32Kbyte units)&lt;br /&gt;
|-&lt;br /&gt;
| 5-6&lt;br /&gt;
| Not used (0)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Enable (0=Disable, 1=Enable)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_FIQ_MASK ==&lt;br /&gt;
Write bit N to mask FIQ interrutps on core N? (judging from what Kernel11 does -- it only ever configures FIQ for core1)&lt;br /&gt;
&lt;br /&gt;
Reset value: 0xF&lt;br /&gt;
&lt;br /&gt;
== CFG11_CDMA_CNT ==&lt;br /&gt;
Write 1 to enable, to disable.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable Microphone DMA (CDMA 0x00)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable NTRCARD DMA on Arm11 side (CDMA 0x01)&lt;br /&gt;
|-&lt;br /&gt;
| 2-4&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| WiFi. Enabled during kernel init since 11.4.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_SPI_CNT ==&lt;br /&gt;
When the corresponding bit is 0, the bus has to be accessed using the DS SPI registers. Otherwise it has to be accessed using the 3DS SPI registers.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable [[SPI Registers]] 0x10160800.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable [[SPI Registers]] 0x10142800.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Enable [[SPI Registers]] 0x10143800.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_GPU_N3DS_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enable N3DS mode? (enables access to the extra N3DS FCRAM banks, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Texture related? (observing texture glitches when disabling this bit)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_CDMA_PERIPHERALS ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-17&lt;br /&gt;
| CDMA Peripheral 0x00-0x11 data request target (0=Old CDMA, 1=New CDMA)&lt;br /&gt;
|-&lt;br /&gt;
| 18-31&lt;br /&gt;
| Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== CFG11_BOOTROM_OVERLAY_CNT ==&lt;br /&gt;
Bit0: Enable bootrom overlay functionality.&lt;br /&gt;
&lt;br /&gt;
== CFG11_BOOTROM_OVERLAY_VAL ==&lt;br /&gt;
The 32-bit value to overlay data-reads to bootrom with. See [[PDN Registers#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== CFG11_SOCINFO ==&lt;br /&gt;
Read-only register. Identifies the maximum mode-switching capabilities of the SoC.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DS&lt;br /&gt;
* LGR1: N3DS prototype, 2 cores, no L2C&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, has L2C&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| CTR mode (1 on all 3DSes)&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| LGR1 (1 on all N3DSes, orginally 2 cores, and 2x clockrate)&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| LGR2 (1 on all released N3DSes, 4 cores and 3x clockrate)&lt;br /&gt;
| Kernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==CFG11_GPUPROT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 3-0&lt;br /&gt;
| Old FCRAM DMA cutoff size, 0 = no protection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 7-4&lt;br /&gt;
| New FCRAM DMA cutoff size, 0 = no protection.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 8&lt;br /&gt;
| AXIWRAM protection, 0 = accessible.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| 10-9&lt;br /&gt;
| QTM DMA cutoff size&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 31-11&lt;br /&gt;
| Zeroes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For the old FCRAM DMA cutoff, it protects starting from 0x28000000-(0x800000*x) until end of FCRAM. There is no way to protect the first 0x800000-bytes.&lt;br /&gt;
&lt;br /&gt;
For the new FCRAM DMA cutoff, it protects starting from 0x30000000-(0x800000*x) until end of FCRAM. When the old FCRAM cutoff is set to non-zero, the first 0x800000-bytes bytes of new FCRAM are protected.&lt;br /&gt;
&lt;br /&gt;
On New3DS the old+new FCRAM cutoff can be used at the same time, however this isn&#039;t done officially.&lt;br /&gt;
&lt;br /&gt;
For the QTM DMA cutoff, it protects starting from 0x1F400000-(0x100000*x) until end of QTM mem.&lt;br /&gt;
&lt;br /&gt;
On cold boot this reg is set to 0.&lt;br /&gt;
&lt;br /&gt;
When this register is set to value 0, the GPU can access the entire FCRAM, AXIWRAM, and on New3DS all QTM-mem.&lt;br /&gt;
&lt;br /&gt;
[[SVC|Initialized]] during kernel boot, and used with [[SVC]] 0x59 which was implemented with [[11.3.0-36|v11.3]].&lt;br /&gt;
&lt;br /&gt;
==CFG11_WIFICNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| 0&lt;br /&gt;
| Enable wifi subsystem&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21456</id>
		<title>PDN Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=PDN_Registers&amp;diff=21456"/>
		<updated>2021-01-22T19:34:22Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Cleanup /*PDN_LGR_SOCMODE*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Register table=&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Used by&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_SLEEP_CNT|PDN_SLEEP_CNT]]&lt;br /&gt;
| 0x10141000&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]]&lt;br /&gt;
| 0x10141008&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_WAKE_REASON|PDN_WAKE_REASON]]&lt;br /&gt;
| 0x1014100C&lt;br /&gt;
| 4&lt;br /&gt;
| [[PTM Services]], TwlBg, [[PDN Services]]&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_MODE|LGY_MODE]]&lt;br /&gt;
| 0x10141100&lt;br /&gt;
| 2&lt;br /&gt;
| TwlProcess9, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_SLEEP_CNT|LGY_SLEEP_CNT]]&lt;br /&gt;
| 0x10141104&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_IRQ_ENABLE|LGY_IRQ_ENABLE]]&lt;br /&gt;
| 0x10141108&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_PAD_CNT|LGY_PAD_CNT]]&lt;br /&gt;
| 0x1014110A&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]]&lt;br /&gt;
| 0x10141110&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]]&lt;br /&gt;
| 0x10141112&lt;br /&gt;
| 2&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_MASK|LGY_GPIOEMU_MASK]]&lt;br /&gt;
| 0x10141114&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]]&lt;br /&gt;
| 0x10141116&lt;br /&gt;
| 2&lt;br /&gt;
| [[Codec Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_MASK|LGY_CARDDETECTEMU_MASK]]&lt;br /&gt;
| 0x10141118&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]]&lt;br /&gt;
| 0x10141119&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| LGY_?&lt;br /&gt;
| 0x10141120&lt;br /&gt;
| 1&lt;br /&gt;
| TwlBg&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_GPU_CNT|PDN_GPU_CNT]]&lt;br /&gt;
| 0x10141200&lt;br /&gt;
| 4&lt;br /&gt;
| Boot11, Kernel11, [[PDN Services]], TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_VRAM_CNT|PDN_VRAM_CNT]]&lt;br /&gt;
| 0x10141204&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_LCD_CNT|PDN_LCD_CNT]]&lt;br /&gt;
| 0x10141208&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_FCRAM_CNT|PDN_FCRAM_CNT]]&lt;br /&gt;
| 0x10141210&lt;br /&gt;
| 2&lt;br /&gt;
| Kernel11, TwlBg&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_I2S_CNT|PDN_I2S_CNT]]&lt;br /&gt;
| 0x10141220&lt;br /&gt;
| 1&lt;br /&gt;
| Boot11, TwlBg, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_CAMERA_CNT|PDN_CAMERA_CNT]]&lt;br /&gt;
| 0x10141224&lt;br /&gt;
| 1&lt;br /&gt;
| [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#PDN_DSP_CNT|PDN_DSP_CNT]]&lt;br /&gt;
| 0x10141230&lt;br /&gt;
| 1&lt;br /&gt;
| Process9, [[PDN Services]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_MVD_CNT|PDN_MVD_CNT]]&lt;br /&gt;
| 0x10141240&lt;br /&gt;
| 1&lt;br /&gt;
|&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_SOCMODE|PDN_LGR_SOCMODE]]&lt;br /&gt;
| 0x10141300&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CNT|PDN_LGR_CNT]]&lt;br /&gt;
| 0x10141304&lt;br /&gt;
| 2&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: red&amp;quot; | No&lt;br /&gt;
| [[#PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt;|PDN_LGR_CPU_CNT]]&amp;lt;0-3&amp;gt;&lt;br /&gt;
| 0x10141310&lt;br /&gt;
| 1*4&lt;br /&gt;
| NewKernel11&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Sleep registers=&lt;br /&gt;
==PDN_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| 1 = Enter sleep mode&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = VRAM is powered down&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 powers down VRAM (it&#039;s unclear whether bit15 is power-down or self-refresh mode) by first disabling the 8 banks using [[GPU/External_Registers#Map|GX register 0x10400030]], then by disabling the GPU clock using [[#PDN_GPU_CNT|PDN_GPU_CNT]] bit 16 and finally writes to and polls this register.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_ENABLE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Shell opened&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Headphones not plugged in&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| WiFi (?)&lt;br /&gt;
|-&lt;br /&gt;
| 19&lt;br /&gt;
| Shell GPIO (?)&lt;br /&gt;
|-&lt;br /&gt;
| 26&lt;br /&gt;
| [[I2C_Registers#Device_3|MCU interrupt]]&lt;br /&gt;
|-&lt;br /&gt;
| 30&lt;br /&gt;
| Touch screen pressed&lt;br /&gt;
|-&lt;br /&gt;
| 31&lt;br /&gt;
| CTR gamecard inserted/removed&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
List in progress.&lt;br /&gt;
&lt;br /&gt;
This is a OR list of wake triggers that will wake up the console from sleep and raise IRQ 0x58.&lt;br /&gt;
&lt;br /&gt;
==PDN_WAKE_REASON==&lt;br /&gt;
Same layout as [[#PDN_WAKE_ENABLE|PDN_WAKE_ENABLE]].&lt;br /&gt;
&lt;br /&gt;
This is a OR list of the wake triggers that actually woke up the console.&lt;br /&gt;
&lt;br /&gt;
For each bit, write 1 to acknowledge, and 0 to clear (?).&lt;br /&gt;
&lt;br /&gt;
=Legacy registers=&lt;br /&gt;
==LGY_MODE==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-1&lt;br /&gt;
| Read only legacy mode set on reg 0x10018000.&lt;br /&gt;
|-&lt;br /&gt;
| 2-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = enable legacy mode.&lt;br /&gt;
|}&lt;br /&gt;
To boot into DSi or GBA mode first set register 0x10018000 to the desired mode and setup LgyFb. Then disable FCRAM by clearing bit 0 in reg 0x10201000, writing 0 to PDN_FCRAM_CNT followed by 1 and waiting for bit 2 to clear.&lt;br /&gt;
&lt;br /&gt;
The very last 3DS-mode register poke the [[FIRM|TWL_FIRM]] Process9 does before it gets switched into TWL-mode, is writing 0x8000 to this register. Before writing this register, TWL Process9 waits for ARM7 to change the value of this register. The Process9 code for this runs from ITCM, since switching into TWL-mode includes remapping all ARM9 physical memory.&lt;br /&gt;
&lt;br /&gt;
==LGY_SLEEP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Write 1 to wakeup GBA mode.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Sleep state/ack. 1 when GBA mode entered sleep. Write 1 to ack.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| ?&lt;br /&gt;
|-&lt;br /&gt;
| 3-14&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| 1 = IRQ enable (IRQ 0x59)&lt;br /&gt;
|}&lt;br /&gt;
When a GBA game enters sleep mode and bit 15 is 1, IRQ 0x59 fires and bit 1 is set. Bit 1 must be acknowledged/written together with bit 0 otherwise GBA mode wakes up from sleep early sometimes.&lt;br /&gt;
&lt;br /&gt;
==LGY_IRQ_ENABLE==&lt;br /&gt;
[[ARM11_Interrupts|Arm11 interrupt]] enable bits for legacy interrupts, same bit layout as the GPIOEMU regs below.&lt;br /&gt;
&lt;br /&gt;
==LGY_PAD_CNT==&lt;br /&gt;
Also named &amp;quot;KEYCNT&amp;quot; on certain other DS(i)/GBA documentations.&lt;br /&gt;
The value of this register is copied to [[HID_Registers|HID_PAD_CNT]] when GBA mode enters sleep.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_MASK==&lt;br /&gt;
Set bits will use the corresponding values from [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] instead of allowing the hardware to read it from [[HID_Registers#HID_PAD|HID_PAD]].&lt;br /&gt;
&lt;br /&gt;
This is set to 0x1FFF (all buttons and the debug key) and [[#LGY_HIDEMU_PAD|LGY_HIDEMU_PAD]] is set to 0 when the &amp;quot;Close this software and return to HOME Menu?&amp;quot; dialog is shown to prevent the button presses from propagating to the DS/GBA CPU.&lt;br /&gt;
&lt;br /&gt;
==LGY_HIDEMU_PAD==&lt;br /&gt;
Works the same way as [[HID_Registers#HID_PAD|HID_PAD]], but the values set here are only replaced in the HID_PAD seen by the DS/GBA CPU when the corresponding bits in [[#LGY_HIDEMU_MASK|LGY_HIDEMU_MASK]] are set.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_GPIOEMU_DATA|LGY_GPIOEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
This is used to trigger things like the TWL MCU interrupt in TWL mode.&lt;br /&gt;
&lt;br /&gt;
==LGY_GPIOEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_MASK==&lt;br /&gt;
Set bits will read bits from [[#LGY_CARDDETECTEMU_DATA|LGY_CARDDETECTEMU_DATA]] (override).&lt;br /&gt;
&lt;br /&gt;
Bit0 signals cartridge removal.&lt;br /&gt;
&lt;br /&gt;
==LGY_CARDDETECTEMU_DATA==&lt;br /&gt;
See above&lt;br /&gt;
&lt;br /&gt;
=Clock and reset registers=&lt;br /&gt;
==PDN_GPU_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| GPU main block + VRAM + LCD reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| PSC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Geoshader block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Rasterization block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| PPF block reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| PDC block reset? 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| PDC related reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 7-15&lt;br /&gt;
| Unused.&lt;br /&gt;
|-&lt;br /&gt;
| 16&lt;br /&gt;
| Clock enable for all blocks, VRAM and LCD. 1 = enable.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN uses a 12 ARM11 cycle delay to deassert reset.&lt;br /&gt;
&lt;br /&gt;
==PDN_VRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models: while it is used in tandem with PDN_GPU_CNT.bit16 in Boot11 screeninit code, Kernel11 only uses PDN_GPU_CNT.bit16 to power-off VRAM before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_LCD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This register seems to be unimplemented in released models, only to be used in Boot11, as PDN_GPU_CNT.bit16 also drives the LCD clock.&lt;br /&gt;
&lt;br /&gt;
==PDN_FCRAM_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Acknowledge clock request. Gets set or unset when toggling bit 1.&lt;br /&gt;
|}&lt;br /&gt;
Twl-/AgbBg use this to disable FCRAM for the GBA rom in GBA mode or DSi main RAM in DSi mode. AgbBg clears bit 0 in reg 0x10201000 before touching this reg.&lt;br /&gt;
&lt;br /&gt;
Kernel11 uses it to put the FCRAM in self-refresh mode (clock disable) before going to sleep.&lt;br /&gt;
&lt;br /&gt;
==PDN_I2S_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| I2S1 Clock (maybe?) 1 = enable, 0 = disable&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| I2S2 Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
I2S1 clock enable bit seems to be unimplemented. Maybe it&#039;s because DSP clock enable drives it?&lt;br /&gt;
&lt;br /&gt;
==PDN_CAMERA_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==PDN_DSP_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Clock. 1 = enable, 0 = disable&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
PDN services holds reset for 0x30 Arm11 cycles.&lt;br /&gt;
&lt;br /&gt;
==PDN_MVD_CNT==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Reset. 0 = reset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This doesn&#039;t seem to be used by anything, but does have a clear effect on the hardware.&lt;br /&gt;
&lt;br /&gt;
The reset value for this register is 1 (out-of-reset at boot).&lt;br /&gt;
&lt;br /&gt;
=N3DS SoC (LGR) registers=&lt;br /&gt;
== PDN_LGR_SOCMODE ==&lt;br /&gt;
This is used for configuring the New3DS ARM11 CPU clock-rate. This register is New3DS-only: reading from here on Old3DS always returns all-zeros even when one tried writing data here prior to the read.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0-2&lt;br /&gt;
| SoC mode.&lt;br /&gt;
Possible values:&lt;br /&gt;
  0=CTR+256MHz&lt;br /&gt;
  1=LGR2+256MHz, 5=LGR2+804MHz&lt;br /&gt;
  2=LGR1+256MHz, 3=LGR1+536MHz&lt;br /&gt;
&lt;br /&gt;
N3DS modes (LGR1/LGR2) enable the New 3DS FCRAM extension and are needed to access N3DS-only devices.&lt;br /&gt;
&lt;br /&gt;
* CTR: O3DSS&lt;br /&gt;
* LGR1: N3DS prototype, 2 cores, no L2C&lt;br /&gt;
* LGR2: retail N3DS, 4 cores, has L2C&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| Busy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
On firmlaunch, the kernel sets the mode to O3DS.&lt;br /&gt;
&lt;br /&gt;
[[SVC#KernelSetState|svcKernelSetState]] type10, only implemented on New3DS, uses this register. This piece of code choses the mode matching the input Param0 bit0 state (1 for higher clock), using the state of [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] to determine which mode is the best (which is always LGR2 on all released New 3DS units).&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CNT ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Enables the N3DS extramem block&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Enables the L2C block (LGR2 only)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Kernel11 sets this to 0x101 when bit 2 in [[CONFIG11 Registers#CFG11_SOCINFO|CFG11_SOCINFO]] (LGR2 supported) is set otherwise 1.&lt;br /&gt;
&lt;br /&gt;
== PDN_LGR_CPU_CNT&amp;lt;0-3&amp;gt; ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bits&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| nRESET, 0 = reset. Also enable the bootrom instruction overlay.&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Enable bootrom data overlay&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Reset operation in progress&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Always 1?&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Only usable for core2 and core3.&lt;br /&gt;
&lt;br /&gt;
The normal Arm11 bootrom checks cpuid and hangs if cpuid &amp;gt;= 2. This is a problem when booting the 2 additional New3DS Arm11 MPCores. NewKernel11 solves this by using a hardware feature to overlay the bootrom with a configurable branch to a kernel function. This overlay feature was added with the New3DS.&lt;br /&gt;
&lt;br /&gt;
Bit1 in register above enables a bootrom data-override for physical addresses 0xFFFF0000-0xFFFF1000 and 0x10000-0x11000. All _data reads_ made to those regions now read the 32-bit value provided in [[CONFIG11 Registers #CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]].&lt;br /&gt;
&lt;br /&gt;
Bit0 sets the core out of reset and enables a bootrom instruction-overlay which means that _instruction reads_ made to the bootrom region are overridden. We have not been able to dump what instructions are actually placed at bootrom by this switch (because reading the area only yields data-reads). Jumping randomly into the 0xFFFF0000-0xFFFF1000 region works fine and jumps to the value provided by the data overlay [[CONFIG11 Registers #CFG11_BOOTROM_OVERLAY_VAL|CFG11_BOOTROM_OVERLAY_VAL]]. Thus we may predict that the entire bootrom region is filled by:&lt;br /&gt;
ldr pc, [pc]&lt;br /&gt;
&lt;br /&gt;
Or equivalent. However, jumping to some high addresses such as 0xFFFF0FF0+ will crash the core. This may be explained by prefetching in the Arm pipeline, and might help us identify what instructions are placed by the instruction-overlay.&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21452</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21452"/>
		<updated>2021-01-21T17:54:20Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* Private Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by Boot11 and Kernel11 to kickstart Core1/2/3.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touchscreen Pen Down&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphone jack plugged in/out&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO2_1&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_3&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_4&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_5&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_6&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_7&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_8&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU (HOME/POWER pressed/released or WiFi switch pressed, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| GPIO3_11&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21451</id>
		<title>ARM11 Interrupts</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=ARM11_Interrupts&amp;diff=21451"/>
		<updated>2021-01-21T17:48:43Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* Hardware Interrupts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Interrupts ==&lt;br /&gt;
&lt;br /&gt;
Interrupt priority is 0-0xF. A priority of 0xF means that the interrupt is disabled.&lt;br /&gt;
&lt;br /&gt;
= Private Interrupts =&lt;br /&gt;
&lt;br /&gt;
Each CPU core has 32 software interrupts that are private and belong to that core.  These interrupts are numbers 0-0x1F for each core.  The hardware interrupts are not core-specific and start at interrupt ID 0x20.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Used by BOOT11 to kickstart Core1.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2-0x3&lt;br /&gt;
| &lt;br /&gt;
| MPCore software-interrupt. Seem to be unused.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used to manage the performance counter.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Does apparently nothing.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Extensively used by [[SVC|KernelSetState]] (and contains most of the actual code of the latter).&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. See [[KCacheMaintenanceInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x8&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used for scheduling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore software-interrupt. Used when handling exceptions that require termination of a thread or a process, and in some cases by svcSetDebugThreadContext, to store VFP registers in the thread&#039;s register storage.&lt;br /&gt;
|-&lt;br /&gt;
| 0xA&lt;br /&gt;
| Kernel&lt;br /&gt;
| TLB operations interrupt, see [[KTLBOperationsInterruptEvent]]&lt;br /&gt;
|-&lt;br /&gt;
| 0xB-0xE&lt;br /&gt;
|&lt;br /&gt;
| MPCore software-interrupt. Not configured.&lt;br /&gt;
|-&lt;br /&gt;
| 0xF&lt;br /&gt;
| dmnt/debugger&lt;br /&gt;
| MPCore software-interrupt. Used to abstract FIQ (debug). This interrupt is never sent to core2 nor core3 on N3DS.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1D&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore timer.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| Kernel&lt;br /&gt;
| MPCore watchdog - set when the watchdog counter reaches 0 in timer mode, causes interrupt 30 to set as pending.  Only set on core 1 as core 1&#039;s timer is used for everything.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Hardware Interrupts =&lt;br /&gt;
&lt;br /&gt;
There are 0x60 hardware interrupts starting at 0x20 and continuing up to 0x7F.  These are not private and are accessible from any core.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  IRQ&lt;br /&gt;
!  Listener&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| ?&lt;br /&gt;
| SPI bus 2 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x28&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC0&lt;br /&gt;
|-&lt;br /&gt;
| 0x29&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PSC1&lt;br /&gt;
|-&lt;br /&gt;
| 0x2A&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC0 (VBlank0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2B&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PDC1 (VBlank1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| PPF&lt;br /&gt;
|-&lt;br /&gt;
| 0x2D&lt;br /&gt;
| gsp, TwlBg&lt;br /&gt;
| P3D&lt;br /&gt;
|-&lt;br /&gt;
| 0x30-0x38&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Event 0..8 (9 separate IRQ lines)&lt;br /&gt;
|-&lt;br /&gt;
| 0x39&lt;br /&gt;
| Kernel&lt;br /&gt;
| Old CDMA Faulting (eg. CCR=0, or event&amp;gt;15)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3A&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Event 0..31 (shared IRQ line)&lt;br /&gt;
|-&lt;br /&gt;
| 0x3B&lt;br /&gt;
| Kernel&lt;br /&gt;
| New CDMA Faulting (eg. CCR=0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x41&lt;br /&gt;
| nwm&lt;br /&gt;
| WIFI SDIO Controller IRQ pin @ 0x10122000&lt;br /&gt;
|-&lt;br /&gt;
| 0x42&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x43&lt;br /&gt;
| nwm_dev?&lt;br /&gt;
| Debug WIFI SDIO Controller @ 0x10100000 ?&lt;br /&gt;
|-&lt;br /&gt;
| 0x44&lt;br /&gt;
| ?&lt;br /&gt;
| NTRCARD (maybe?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x45&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_0 (First RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x46&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| L2B_1 (Second RGB-to-RGBA Converter)&lt;br /&gt;
|-&lt;br /&gt;
| 0x48&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 0 (DSi cameras)&lt;br /&gt;
|-&lt;br /&gt;
| 0x49&lt;br /&gt;
| camera&lt;br /&gt;
| Camera Bus 1 (left-eye)&lt;br /&gt;
|-&lt;br /&gt;
| 0x4A&lt;br /&gt;
| dsp&lt;br /&gt;
| General interrupt from DSP, including semaphore and command/reply registers status change&lt;br /&gt;
|-&lt;br /&gt;
| 0x4B&lt;br /&gt;
| camera&lt;br /&gt;
| Y2R Conversion Finished&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_0 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4D&lt;br /&gt;
| TwlBg&lt;br /&gt;
| LGYFB_1 Legacy GBA/NDS Video&lt;br /&gt;
|-&lt;br /&gt;
| 0x4E&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| Y2R2 End Event&lt;br /&gt;
|-&lt;br /&gt;
| 0x4F&lt;br /&gt;
| mvd (New3DS)&lt;br /&gt;
| MVD general interrupt?&lt;br /&gt;
|-&lt;br /&gt;
| 0x50&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync (bit 29 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x51&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Sync 2 (bit 30 from Arm9&#039;s PXI_SYNC)&lt;br /&gt;
|-&lt;br /&gt;
| 0x52&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Send Fifo Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x53&lt;br /&gt;
| pxi, TwlBg&lt;br /&gt;
| Receive Fifo Not Empty&lt;br /&gt;
|-&lt;br /&gt;
| 0x54&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus0 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x55&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus1 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x56&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 3 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x57&lt;br /&gt;
| spi, TwlBg&lt;br /&gt;
| SPI bus 1 interrupt status update&lt;br /&gt;
|-&lt;br /&gt;
| 0x58&lt;br /&gt;
| Kernel&lt;br /&gt;
| PDN (wake event or SoC mode changed)&lt;br /&gt;
|-&lt;br /&gt;
| 0x59&lt;br /&gt;
| TwlBg&lt;br /&gt;
| PDN Legacy Sleep&lt;br /&gt;
|-&lt;br /&gt;
| 0x5A&lt;br /&gt;
| mic&lt;br /&gt;
| General microphone interrupt (?)&lt;br /&gt;
|-&lt;br /&gt;
| 0x5B&lt;br /&gt;
| -&lt;br /&gt;
| [[HID_Registers#HID_PAD_CNT|HID_PAD_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C&lt;br /&gt;
| i2c, TwlBg&lt;br /&gt;
| I2C Bus2 work done&lt;br /&gt;
|-&lt;br /&gt;
| 0x5F&lt;br /&gt;
| mp&lt;br /&gt;
| DS WiFi registers&lt;br /&gt;
|-&lt;br /&gt;
| 0x60&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell opened&lt;br /&gt;
|-&lt;br /&gt;
| 0x62&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-&lt;br /&gt;
| 0x63&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Touchscreen Pen Down&lt;br /&gt;
|-&lt;br /&gt;
| 0x64&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Headphone jack plugged in/out&lt;br /&gt;
|-&lt;br /&gt;
| 0x66&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO2_1&lt;br /&gt;
|-&lt;br /&gt;
| 0x68&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| C-stick Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x69&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| IrDA Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x6A&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| Gyro Interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 0x6B&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_3&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_4&lt;br /&gt;
|-&lt;br /&gt;
| 0x6D&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_5&lt;br /&gt;
|-&lt;br /&gt;
| 0x6E&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_6&lt;br /&gt;
|-&lt;br /&gt;
| 0x6F&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_7&lt;br /&gt;
|-&lt;br /&gt;
| 0x70&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| GPIO3_8&lt;br /&gt;
|-&lt;br /&gt;
| 0x71&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| MCU (HOME/POWER pressed/released or WiFi switch pressed, etc.)&lt;br /&gt;
|-&lt;br /&gt;
| 0x72&lt;br /&gt;
| gpio, TwlBg&lt;br /&gt;
| NFC&lt;br /&gt;
|-&lt;br /&gt;
| 0x73&lt;br /&gt;
| TwlBg&lt;br /&gt;
| GPIO3_11&lt;br /&gt;
|-&lt;br /&gt;
| 0x74&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard related&lt;br /&gt;
|-&lt;br /&gt;
| 0x75&lt;br /&gt;
| ?&lt;br /&gt;
| Gamecard inserted&lt;br /&gt;
|-&lt;br /&gt;
| 0x76&lt;br /&gt;
| -&lt;br /&gt;
| L2C&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 to 0x7B&lt;br /&gt;
| Kernel&lt;br /&gt;
| Core 0-3 Performance monitor counter (any) overflow&lt;br /&gt;
|-&lt;br /&gt;
| 0x7A to 0x82 (PDN_MPCORE_CFG bit2 set) or&lt;br /&gt;
0x7C to 0x84 (bit2 clear)&lt;br /&gt;
| Kernel&lt;br /&gt;
| Other PMU interrupts (line may not exist at all)&lt;br /&gt;
|}&lt;br /&gt;
(interrupts from 0x80 and up can&#039;t be mapped in available builds of the kernel)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are 2 tables in the Arm11 kernel: the first has 32 * 2(or 32 * 4) 8-byte entries. This table is for the private interrupts that belong to each core.  The data for each interrupt can be found by doing table_base + (core_num * 0x100) + (intr_num * 8).  The second table is for public hardware interrupts and the data for each interrupt can be retrieved by doing table_base + (intr_num * 8).&lt;br /&gt;
&lt;br /&gt;
The Arm11 kernel configures interrupts the following way (it seems the GPIO IRQ layout doesn&#039;t match released 3DS models):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;Interrupts 0x00 to 0x1F: edge-triggered, N-N&lt;br /&gt;
Interrupt 0x20: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x21: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x22: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x23: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x24: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x25: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x28: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x29: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x2d: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x30: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x31: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x32: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x33: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x34: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x35: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x36: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x37: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x38: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x39: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x3b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x40: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x41: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x42: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x43: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x44: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x45: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x46: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x48: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x49: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x4f: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x50: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x51: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x52: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x53: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x54: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x55: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x56: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x57: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x58: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x59: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x5f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x60: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x61: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x64: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x65: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x66: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x68: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x69: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6a: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6b: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6c: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6d: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6e: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x6f: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x70: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x71: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x72: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x73: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x74: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x75: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x76: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x77: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x78: edge-triggered, 1-N&lt;br /&gt;
Interrupt 0x79: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7a: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7b: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7c: level-sensitive, 1-N&lt;br /&gt;
Interrupt 0x7d: level-sensitive, 1-N&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= InterruptData =&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;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| [[KBaseInterruptEvent]] *&lt;br /&gt;
| Pointer to the KBaseInterruptEvent object for this interrupt &lt;br /&gt;
|-&lt;br /&gt;
| 0x4&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt will be disabled by the IRQ handler as soon as it is acknowledged.&lt;br /&gt;
Ignored for FIQ: the FIQ handler always sets bit2 of [[PDN_Registers#PDN_FIQ_CNT|PDN_FIQ_CNT]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x5&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt is disabled&lt;br /&gt;
|-&lt;br /&gt;
| 0x6&lt;br /&gt;
| u8&lt;br /&gt;
| Interrupt priority&lt;br /&gt;
|-&lt;br /&gt;
| 0x7&lt;br /&gt;
| u8&lt;br /&gt;
| Unused, alignment&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Interrupt Table (New3DS) =&lt;br /&gt;
(0xFFF318F4 in 10.3)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Offset&lt;br /&gt;
!  Type&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x0&lt;br /&gt;
| InterruptData[224]&lt;br /&gt;
| Data for all hardware and software interrupts&lt;br /&gt;
|-&lt;br /&gt;
| 0x700&lt;br /&gt;
| [[KObjectMutex]]&lt;br /&gt;
| Mutex&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21449</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21449"/>
		<updated>2021-01-20T22:52:45Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: /* GPIO pins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
[[GPIO Services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| GPIO1_0 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63&lt;br /&gt;
| Touch Pen down&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| GPIO2_1 (?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| GPIO3_3 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| GPIO3_4 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| GPIO3_5 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| GPIO3_6 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| GPIO3_7 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| GPIO3_8 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| GPIO3_11 (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
	<entry>
		<id>https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21448</id>
		<title>GPIO Registers</title>
		<link rel="alternate" type="text/html" href="https://www.3dbrew.org/w/index.php?title=GPIO_Registers&amp;diff=21448"/>
		<updated>2021-01-20T22:51:34Z</updated>

		<summary type="html">&lt;p&gt;TuxSH: Rewrite page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Registers =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Old3DS&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO1_DATA]]&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO2_DATA]]&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO2_DIR]]&lt;br /&gt;
| 0x10147011&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO2_INTCFG]]&lt;br /&gt;
| 0x10147012&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO2_INTEN]]&lt;br /&gt;
| 0x10147013&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA|GPIO3_DATA]]&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DIR|GPIO3_DIR]]&lt;br /&gt;
| 0x10147022&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTCFG|GPIO3_INTCFG]]&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_INTEN|GPIO3_INTEN]]&lt;br /&gt;
| 0x10147026&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;background: green&amp;quot; | Yes&lt;br /&gt;
| [[#GPIOn_DATA2|GPIO2_DATA2]]&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 2&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Name&lt;br /&gt;
!  Address&lt;br /&gt;
!  Width&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| [[#RTC_CNT_(0x10147100)|RTC_CNT]]&lt;br /&gt;
| 0x10147100&lt;br /&gt;
| 2&lt;br /&gt;
| Control register&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT1&lt;br /&gt;
| 0x10147110&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 1 (command 0). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_STAT2&lt;br /&gt;
| 0x10147111&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc status register 2 (command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_CLKADJ&lt;br /&gt;
| 0x10147112&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc clock adjustment register (command 6). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FREE&lt;br /&gt;
| 0x10147113&lt;br /&gt;
| 1&lt;br /&gt;
| The free general purpose rtc register (command 7). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME1&lt;br /&gt;
| 0x10147120&lt;br /&gt;
| 4&lt;br /&gt;
| Byte-wise bit-swapped (bit7 is bit0, etc.) BCD RTC (byte0 = seconds, byte1 = minutes, byte2 = hours, byte3 = day of week)&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_TIME2&lt;br /&gt;
| 0x10147124&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Day, month and year all byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM1&lt;br /&gt;
| 0x10147130&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 1 (command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMTIM2&lt;br /&gt;
| 0x10147134&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc alarm time register 2 (command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_COUNT&lt;br /&gt;
| 0x10147140&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi counter register (ex command 0). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT1&lt;br /&gt;
| 0x10147150&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 1 (ex command 1). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_FOUT2&lt;br /&gt;
| 0x10147151&lt;br /&gt;
| 1&lt;br /&gt;
| Rtc dsi fout register 2 (ex command 2). Bitswapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT1&lt;br /&gt;
| 0x10147160&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 1 (ex command 4). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
| RTC_REG_ALRMDAT2&lt;br /&gt;
| 0x10147164&lt;br /&gt;
| 4 (3?)&lt;br /&gt;
| Rtc dsi alarm date register 2 (ex command 5). Byte-wise bit-swapped&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Descriptions =&lt;br /&gt;
&lt;br /&gt;
== GPIO ==&lt;br /&gt;
=== GPIO pins ===&lt;br /&gt;
&lt;br /&gt;
[[GPIO services]] bitmasks use this table, in that order:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  IRQ ID&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| ?&lt;br /&gt;
| GPIO1_0 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x63&lt;br /&gt;
| Touch Pen down&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x60&lt;br /&gt;
| Shell closed&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x64&lt;br /&gt;
| Headphones inserted&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x66&lt;br /&gt;
| GPIO2_1 (?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO2_DATA2_0 (wifi related?)&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| 0&lt;br /&gt;
| 0x68&lt;br /&gt;
| C-stick&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| 0x69&lt;br /&gt;
| IrDA&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| 0x6A&lt;br /&gt;
| Gyro&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| 0x6B&lt;br /&gt;
| GPIO3_3 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| 0x6C&lt;br /&gt;
| GPIO3_4 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| 0x6D&lt;br /&gt;
| GPIO3_5 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| 0x6E&lt;br /&gt;
| GPIO3_6 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| 0x6F&lt;br /&gt;
| GPIO3_7 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| 0x70&lt;br /&gt;
| GPIO3_8 (?)&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| 0x71&lt;br /&gt;
| MCU&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| 0x72&lt;br /&gt;
| NFC&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| 0x73&lt;br /&gt;
| GPIO3_11 (?)&lt;br /&gt;
|-&lt;br /&gt;
|-style=&amp;quot;border-top: double&amp;quot;&lt;br /&gt;
| DATA2.0&lt;br /&gt;
| -&lt;br /&gt;
| GPIO3_DATA2_0 (wifi related?)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA ===&lt;br /&gt;
Pin values, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DIR ===&lt;br /&gt;
Pin directions for GPIO2 and GPIO3, one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Input&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Output&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTCFG ===&lt;br /&gt;
Interrupt configuration for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Falling edge&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Rising edge&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_INTEN ===&lt;br /&gt;
Interrupt enable bits for GPIO2 and GPIO3 pins (not the extra ones), one bit per pin.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Value&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Interrupt disabled&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Interrupt enabled&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GPIOn_DATA2 ===&lt;br /&gt;
Extra pins for GPIO2 and GPIO3 (one bit each). These two pins, in total, are not bound to any IRQ and are not configurable.&lt;br /&gt;
&lt;br /&gt;
=== Default values ===&lt;br /&gt;
After bootrom initialization, these are the values of the registers:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Address&lt;br /&gt;
!  Value&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147000&lt;br /&gt;
| 0x0003&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147010&lt;br /&gt;
| 0x00000002&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147014&lt;br /&gt;
| 0x0000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147020&lt;br /&gt;
| 0x00000DFB&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147024&lt;br /&gt;
| 0x00000000&lt;br /&gt;
|-&lt;br /&gt;
| 0x10147028&lt;br /&gt;
| 0x0000&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Legacy RTC ==&lt;br /&gt;
=== RTC_CNT (0x10147100) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!  Bit&lt;br /&gt;
!  Description&lt;br /&gt;
|-&lt;br /&gt;
| 0&lt;br /&gt;
| Latch STAT1&lt;br /&gt;
|-&lt;br /&gt;
| 1&lt;br /&gt;
| Latch STAT2&lt;br /&gt;
|-&lt;br /&gt;
| 2&lt;br /&gt;
| Latch CLKADJ&lt;br /&gt;
|-&lt;br /&gt;
| 3&lt;br /&gt;
| Latch FREE&lt;br /&gt;
|-&lt;br /&gt;
| 4&lt;br /&gt;
| Latch TIME&lt;br /&gt;
|-&lt;br /&gt;
| 5&lt;br /&gt;
| Latch ALRMTIM1&lt;br /&gt;
|-&lt;br /&gt;
| 6&lt;br /&gt;
| Latch ALRMTIM2&lt;br /&gt;
|-&lt;br /&gt;
| 7&lt;br /&gt;
| Latch COUNT&lt;br /&gt;
|-&lt;br /&gt;
| 8&lt;br /&gt;
| Latch FOUT1&lt;br /&gt;
|-&lt;br /&gt;
| 9&lt;br /&gt;
| Latch FOUT2&lt;br /&gt;
|-&lt;br /&gt;
| 10&lt;br /&gt;
| Latch ALRMDAT1&lt;br /&gt;
|-&lt;br /&gt;
| 11&lt;br /&gt;
| Latch ALRMDAT2&lt;br /&gt;
|-&lt;br /&gt;
| 12&lt;br /&gt;
| ARM7 Busy? This may be chipselect&lt;br /&gt;
|-&lt;br /&gt;
| 13&lt;br /&gt;
| ARM7 write command received? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 14&lt;br /&gt;
| ARM7 read command recieved? (writing 1 clears it seems)&lt;br /&gt;
|-&lt;br /&gt;
| 15&lt;br /&gt;
| DS SIO SI pin (rtc irq pin)&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>TuxSH</name></author>
	</entry>
</feed>