https://www.3dbrew.org/w/api.php?action=feedcontributions&user=Henke37&feedformat=atom
3dbrew - User contributions [en]
2024-03-29T06:54:21Z
User contributions
MediaWiki 1.35.8
https://www.3dbrew.org/w/index.php?title=News&diff=19026
News
2016-12-26T20:27:51Z
<p>Henke37: Preemptively add the lecture</p>
<hr />
<div><noinclude><br />
==Adding an item==<br />
* Log in to the wiki. Editing is disabled if you don't have an account.<br />
* Add the news event to the top of the list, using this format for the date: <tt><nowiki>'''</nowiki>{{#time: d F y}}<nowiki>''' </nowiki></tt>. Please include the application's creator, version number, and a link to a page on 3DBrew about the application. No external links please.<br />
* '''Move the last entry to the [[:News/Archive|news archive]]. There should be no more than 4 entries in the list.'''<br />
<br />
==Archives==<br />
For older news, see the [[:News/Archive|news archive]].<br />
<br />
=== News ===<br />
<!-- Add news below --></noinclude><br />
*'''27 December 2016''' [https://fahrplan.events.ccc.de/congress/2016/Fahrplan/events/8344.html Nintendo Hacking 2016] lecture at Chaos Communication Congress.<br />
*'''31 October 2016''' [[User:Yellows8|Yellows8]] released [https://github.com/yellows8/3ds_dsiwarehax_installer/releases 3ds_dsiwarehax_installer] v1.0. v1.1 was released on November 2nd.<br />
*'''24 October 2016''' Nintendo released system update [[11.2.0-35]].<br />
*'''4 October 2016''' An update for EUR version of VVVVVV was finally released (title was re-added to the eShop versionlist). Likewise for the USA version on the October 11th (this title was already listed in the versionlist however).<br />
*'''22 September 2016''' [[User:shinyquagsire23|Shiny Quagsire]] released an update to [https://smd.salthax.org/ supermysterychunkhax] with [[11.1.0-34]] support.</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Talk:ExeFS&diff=17800
Talk:ExeFS
2016-07-22T15:44:45Z
<p>Henke37: /* Code binary? */ new section</p>
<hr />
<div>== Code binary? ==<br />
<br />
What is the format of the "Code Binary"? Surely it's not a raw stream of ARM opcodes. There has to be data for the loader to work with!--[[User:Henke37|Henke37]] ([[User talk:Henke37|talk]]) 17:44, 22 July 2016 (CEST)</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Talk:CIA&diff=17799
Talk:CIA
2016-07-22T15:39:06Z
<p>Henke37: /* Content Index? */ new section</p>
<hr />
<div>== Old CIA Formats ==<br />
=== 24/06/2010 - CTR_SDK: 0_10 ===<br />
'''CIA Header'''<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! START<br />
! SIZE<br />
! DESCRIPTION<br />
|-<br />
| 0x00<br />
| 0x04 <br />
| Archive Header Size (Usually = 0x2020 bytes)<br />
|-<br />
| 0x04<br />
| 0x02<br />
| Type<br />
|-<br />
| 0x06<br />
| 0x02<br />
| Version<br />
|- <br />
| 0x08 <br />
| 0x04<br />
| Unused <br />
|-<br />
| 0x0C <br />
| 0x04<br />
| Unused<br />
|-<br />
| 0x10 <br />
| 0x04<br />
| Zero Filled Data (usually 0x200 bytes in length)<br />
|-<br />
| 0x14 <br />
| 0x04<br />
| Zero Filled Data (usually 0x200 bytes in length)<br />
|-<br />
| 0x18 <br />
| 0x08<br />
| APP file size<br />
|-<br />
| 0x20<br />
| 0x2000<br />
| Content Index <br />
|}<br />
<br />
The order of the sections in the CIA file:<br />
* Header<br />
* Zero Data*2<br />
* APP file data<br />
<br />
The APP data is cleartext. Only one executable supported.<br />
<br />
=== 06/07/2010 - CTR_SDK: 0_10_2 ===<br />
<br />
'''CIA Header'''<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! START<br />
! SIZE<br />
! DESCRIPTION<br />
|-<br />
| 0x00<br />
| 0x04 <br />
| Archive Header Size (Usually = 0x2020 bytes)<br />
|-<br />
| 0x04<br />
| 0x02<br />
| Type<br />
|-<br />
| 0x06<br />
| 0x02<br />
| Version<br />
|- <br />
| 0x08 <br />
| 0x04<br />
| Unused <br />
|-<br />
| 0x0C <br />
| 0x04<br />
| [[CommonETicket|Ticket]] size<br />
|-<br />
| 0x10 <br />
| 0x04<br />
| [[TMD]] file size<br />
|-<br />
| 0x14 <br />
| 0x04<br />
| Unused<br />
|-<br />
| 0x18 <br />
| 0x08<br />
| APP file size<br />
|-<br />
| 0x20<br />
| 0x2000<br />
| Content Index <br />
|}<br />
<br />
The order of the sections in the CIA file:<br />
* Header<br />
* Ticket<br />
* TMD<br />
* APP file data<br />
<br />
Very similar to the final CIA version(encryption, TMD, etc), except there is no embedded Certificate Chain.<br />
<br />
== Discussion ==<br />
Good work Lazymarek9614, Now 3dsexplorer on the svn is 0.73 (you can download it from the beta link) supports cia. --[[User:Elisherer|Elisherer]] 21:34, 10 November 2011 (CET)<br />
:@Elisherer where is that beta link?--[[User:3dsguy|3dsguy]] 02:39, 11 November 2011 (CET)<br />
::[[3DSExplorer]], bottom of the bage. --[[User:Elisherer|Elisherer]] 08:09, 11 November 2011 (CET)<br />
<br />
"Each section is cleartext for dev CIAs, for retail CIAs the APP data is encrypted."<br />
: Dev/Production CIA use the same specification. So I'm not sure what you mean by this. <br />
: The "ctrtool" on the CXI page already parses the CIA format, why re-invent the wheel?<br />
"CIA files can be created with the Nintendo 3DS SDK and installed on the 3DS test units by the Dev Menu."<br />
: Please keep the focus on documentation of the spec., we don't want to explain things from the perspective of SDK users- but for someone that knows (potentially) nothing about the 3DS. The SDK does not tell the whole story of most file formats, and most people don't need to know what the SDK can do for them but what they can do without the SDK. - [[User:Jl12|Jl12]]<br />
::: "Dev/Production CIA use the same specification. So I'm not sure what you mean by this. " I originally worded it that way on the page because both CIAs [[User:3dsguy|3dsguy]] uploaded had cleartext APP data, thus I wasn't sure if CTR-SDK had an option for encrypting the dev CIAs. I don't get why [[User:Elisherer|Elisherer]] re-implements about everything ctrtool already does either... --[[User:Yellows8|Yellows8]] 05:26, 12 November 2011 (CET)<br />
::: - Depending on which one it was, the link that was removed initially was a old presentation from e3. It's just out dated enough that the cia format probably hadn't been finalized. Anything before firmwares 0.10.0 - 0.11.0 neither use LZ compression nor encrypt (!) but - except the use of keys, the SDK now produces .cia with close to retail specs. [[User:Jl12|Jl12]]<br />
::::If you like working with the windows command line be my guest. I got more progress looking at the files with 3dsexplorer... (And i'm not re-inventing 3dsexplorer didn't support cia so I added it, I will continue fixing the structure to be as accurate it can be) --[[User:Elisherer|Elisherer]] 09:48, 12 November 2011 (CET)<br />
::::: - I was thinking more the wiki and the "documentation" of the structures then 3dsexplorer tool. (I thought this was based on binaries, though) [[User:Jl12|Jl12]]<br />
:::::I personaly like a command line tool more, but it's really annoying to have for each format another tool. Shall I create a new page for the certs and tickets?--[[User:Lazymarek9614|Lazymarek9614]] 15:06, 13 November 2011 (CET)<br />
::::::The format of the certs/tickets seem to be the same as before,(besides the new signature types already described on the TMD page) not really necessary to create pages for those.(Any info on what cert is used to sign what should be on a /sys/cert.sys page or so later IMO) [[User:Elisherer|Elisherer]], you're re-inventing the wheel aka re-implementing CXI/CIA code which ctrtool had for months, which is a waste of time IMO. --[[User:Yellows8|Yellows8]] 19:24, 13 November 2011 (CET)<br />
:::::::[[User:Yellows8|Yellows8]], I didn't write any new code for the CXI/CCI/TMD/CIA opening, I just copied it from the ctrtool (as I mentioned when I just written the app). The rest (which is the SAVE flash) became the prime goal of the app and with it I discovered a lot of new information. I try implementing most of the file structures we know so it would be more accessible to everyone (Hoping it would help solving more mysteries). I know that now it's not clear why 3dsexplorer opens these sort of file--[[User:Elisherer|Elisherer]] 00:11, 3 February 2012 (CET)s but with time more information will come and it will grow to extract more important information. I hope you understand. --[[User:Elisherer|Elisherer]] 20:27, 13 November 2011 (CET)<br />
::::::Sorry guys, this discussion doesn't really has anything to do with the CIA format. Please choose another page for this or stop it now. @ [[User:Yellows8|Yellows8]]: I think it's not important to create a new page for it too, only some links to the TMD format and wiibrew wiki are necessary.--[[User:Lazymarek9614|Lazymarek9614]] 20:44, 13 November 2011 (CET)<br />
:::::::Other than that TMD code, that CXI/CIA code looks nothing like the ctrtool code to me - but whatever. --[[User:Yellows8|Yellows8]] 22:07, 13 November 2011 (CET)<br />
<br />
: Maybe you guys would like a forum... it would be less clumsy or interefering to the wiki then plastering talk page with comments. Not to mention we could use pictures and attach files directly. I don't mind setting up something like that if it's actually going to be used. [[User:Jl12|Jl12]]<br />
::I think a forum is not a bad idea, but I also don't mind using the Talk page on the wiki aslong as it is relevant. Maybe [[User:Mha|Mha]] can take a look into setting up a forum on the 3dbrew host? --[[User:Neimod|Neimod]] 21:51, 18 November 2011 (CET)<br />
* http://n-dev.net <br />
[[User:Jl12|Jl12]]<br />
: I prefer having a forum running on the 3dbrew host and managed by the 3dbrew administrators. The forum link above is fine for now as a temporary measure. --[[User:Neimod|Neimod]] 04:48, 20 November 2011 (CET)<br />
<br />
Is there any reason it has to be on the 3dbrew host? If it's an issue of forum management I can just move your account(s) to the administrator group. Nobody's forced to use it, of course. [[User:Jl12|Jl12]]<br />
<br />
I agree with Neimod.--Matyapiro31 11:56, 20 November 2011 (CET)<br />
<br />
<br />
The link to [[User:Jl12|Jl12]]'s CIA example is broken (probably since the FBI took down MegaUpload). Could someone re-upload it somewhere else? Thanks! [[User:CHR15x94|CHR15x94]] 23:41, 2 February 2012 (CET)<br />
:Download it contents [http://sherer.co.il/3ds/cia/Sample%20Cia/ here]--[[User:Elisherer|Elisherer]] 00:11, 3 February 2012 (CET)<br />
<br />
== Content Index? ==<br />
<br />
What on earth is the "Content Index"? To me it sounds critical to understanding the contents chunk.--[[User:Henke37|Henke37]] ([[User talk:Henke37|talk]]) 17:39, 22 July 2016 (CEST)</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Exefs&diff=17798
Exefs
2016-07-22T15:09:21Z
<p>Henke37: Case redirect</p>
<hr />
<div>#REDIRECT [[ExeFS]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=AMPXI&diff=14532
AMPXI
2015-11-12T11:08:03Z
<p>Henke37: redir for service root name</p>
<hr />
<div>#REDIRECT [[Application Manager Services PXI]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=AM&diff=14531
AM
2015-11-12T11:06:55Z
<p>Henke37: redir for service root name</p>
<hr />
<div>#REDIRECT [[Application Manager Services]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Homebrew_Applications&diff=13354
Homebrew Applications
2015-09-25T23:31:54Z
<p>Henke37: add r3Ddragon</p>
<hr />
<div>==Installing==<br />
Applications are installed by copying the necessary files to the 3ds/ folder in the root of the SD-card. Most applications come with two files:<br />
* boot.3dsx: The executable.<br />
* icon.bin: The icon/metadata.<br />
<br />
The [[Homebrew Launcher]] will scan the sdcard for all .3dsx files, but will only display an icon for those who have one according to the format described above.<br />
<br />
==List==<br />
<br />
===Launcher===<br />
See [[Homebrew_Exploits|here]].<br />
<br />
===Applications===<br />
{| class="wikitable" border="1"<br />
! width="20%" | Name<br />
! width="50%" | Description<br />
! width="10%" | Author<br />
! width="10%" | Download<br />
! width="10%" | Open-Source<br />
! width="10%" | Last Updated<br />
|-<br />
| [https://github.com/yellows8/3ds_homemenu_extdatatool 3DS HomeMenu extdata Tool]<br />
| Tool for accessing the SD extdata which Home Menu uses. This essentially allows writing custom themes to extdata which get loaded at Home Menu startup.<br />
| [[User:yellows8|yellows8]]<br />
| [https://github.com/yellows8/3ds_homemenu_extdatatool/releases]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/markwinap/3DS_Nyan_Cat 3DS Nyan Cat]<br />
| 3DS Nyan Cat using LIBSF2D.<br />
| [[User:markwinap|markwinap]]<br />
| [https://www.dropbox.com/s/e400my3xm0zw74r/nyan_cat.zip?dl=0 Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/plutooo/ctrrpc ctrrpc]<br />
| A small and easily extensible RPC server/client written in C/Python. Allows you to quickly poke service-commands and syscalls over wifi from a Python shell on your PC. Useful during reverse-engineering.<br />
| [[User:plutooo|plutoo]]<br />
| N/A<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/yellows8/ctr-streaming-server ctr-streaming-server]<br />
| This is a server which runs on a 3DS, which receives audio/video for playback. This can also send [[HID_Shared_Memory|HID]] state to the client (see the README) when enabled. The included parse_hidstream tool can be used to parse that HID data to simulate keyboard/mouse input events, via Linux uinput.<br />
| [[User:yellows8|yellows8]]<br />
| N/A<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/DownloadMii/DownloadMii DownloadMii]<br />
| This is a WIP homebrew online store.<br />
| [[User:filfat|filfat]]<br />
| [https://www.downloadmii.com/download/#release Latest]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/linoma/fb43ds fb43ds]<br />
| This is a simple Facebook's chat client<br />
| [[User:linoma|linoma]]<br />
| [https://github.com/linoma/fb43ds Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/Steveice10/FBI FBI]<br />
| Open source CIA (un)installer.<br />
| [[User:Steveice10|Steveice10]]<br />
| [https://github.com/Steveice10/FBI/releases/ Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/iamevn/for-anyone-who-walks-a-lot for-anyone-who-walks-a-lot]<br />
| Tool to get past the 10 coin per day limit on earning Play Coins by walking.<br />
| [[User:iamevn|iamevn]]<br />
| [https://github.com/iamevn/for-anyone-who-walks-a-lot/releases Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/mtheall/ftbrony ftBRONY]<br />
| An FTP server.<br />
| [[User:mtheall|mtheall]]<br />
| N/A<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/iamevn/FTP-3DS FTP-3DS]<br />
| Fork of ftBRONY with a Nintendo theme.<br />
| [[User:iamevn|iamevn]]<br />
| [https://github.com/iamevn/FTP-3DS/releases Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/smealum/ftPONY ftPONY]<br />
| A basic FTP server, useful for testing new homebrew versions without swapping the SD card.<br />
| [[User:smea|smea]]<br />
| [https://mega.co.nz/#!nchBkL7B!T3vXnX4q8Uwp6APYYTDSZi2bkm25la-Qyz6j4CjsllI Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/zeta0134/3ds-homebrew-browser Homebrew Browser]<br />
| Download homebrew from the internet!<br />
| [[User:cromo|cromo]] [[User:zeta0134|zeta0134]]<br />
| [https://github.com/zeta0134/3ds-homebrew-browser/releases/tag/v0.1 Here]<br />
| Yes<br />
|<br />
|}<br />
<br />
===Games===<br />
{| class="wikitable" border="1"<br />
! width="20%" | Name<br />
! width="50%" | Description<br />
! width="10%" | Author<br />
! width="10%" | Download<br />
! width="10%" | Open-Source<br />
! width="10%" | Last Updated<br />
|-<br />
| [http://gbatemp.net/threads/release-100-boxes-2ds.384714/ 100 Boxes 2DS]<br />
| Simple puzzle game.<br />
| [[User:Cid2mizard|Cid2mizard]]<br />
| [http://3ds.nintendomax.com/Homebrews/Jeux/100Boxes2DS/100_Boxes_2DS.rar Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/MrJPGames/2048-3D 2048-3D]<br />
| "2048 was a big hit not so long ago, and I still see many people at my school playing it. So I thought it would be pretty cool to be able to play 2048 on the go on the 3DS."<br />
| [[User:MrJPGames|Jasper Peters]]<br />
| [https://github.com/MrJPGames/2048-3D/blob/master/2048-3D.3dsx?raw=true Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/smealum/3dscraft 3DSCraft]<br />
| Minecraft clone.<br />
| [https://twitter.com/smealum smea]<br />
| [http://smealum.github.io/3dscraft/downloads/3dscraft_141120.zip Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/UnsureSherlock/checkers3ds/tree/master checkers3ds]<br />
| A buggy ASCII checkers game<br />
| [[User:UnsureSherlock|UnsureSherlock]]<br />
| [http://www.filedropper.com/checkers3ds Here]<br />
| Yes<br />
|<br />
|-<br />
| [http://gbatemp.net/threads/release-hamsters-2ds.383457/ Hamsters 2DS]<br />
| A hamster breeding game in text mode.<br />
| [[User:Cid2mizard|Cid2mizard]]<br />
| [http://3ds.nintendomax.com/Homebrews/Jeux/Hamsters2DS/Hamsters_2DS.rar Here]<br />
| No<br />
|<br />
|-<br />
| [https://github.com/BHSPitMonkey/Helii3DS Helii]<br />
| Fly a helicopter through a 2D tunnel! Ported from the Wii.<br />
| [[User:BHSPitMonkey|BHSPitMonkey]]<br />
| [https://github.com/BHSPitMonkey/Helii3DS/releases/ Here]<br />
| [https://github.com/BHSPitMonkey/Helii3DS Yes]<br />
| 9/18/15<br />
|-<br />
| [http://gowengamedev.com/insectoid-defense/ Insectoid Defense]<br />
| A Sci-Fi Tower Defense game. This is merely a port of the Android/iOS/Windows Phone version.<br />
| [http://www.3dbrew.org/wiki/User:Sgowen sgowen]<br />
| [https://github.com/GowenGameDevOpenSource/insectoid-defense/releases/download/v1.0-all/insectoid-defense-3DS.zip Here]<br />
| [https://github.com/GowenGameDevOpenSource/insectoid-defense Yes]<br />
|<br />
|-<br />
| [https://gbatemp.net/threads/release-mastermind-3ds.394710/#post-5611660 Mastermind 3DS]<br />
| Mastermind on 3DS<br />
| [[User:MrJPGames|Jasper Peters]]<br />
| [https://github.com/MrJPGames/Mastermind-3DS/blob/master/Mastermind.zip?raw=true Here]<br />
| Yes<br />
|<br />
|-<br />
| [http://gbatemp.net/threads/release-minesweeper-2ds.384185/ Minesweeper 2DS]<br />
| Minesweeper clone.<br />
| [[User:Cid2mizard|Cid2mizard]]<br />
| [http://3ds.nintendomax.com/Homebrews/Jeux/Minesweeper2DS/Minesweeper_2DS.rar Here]<br />
| Yes<br />
|<br />
|-<br />
| [http://gbatemp.net/threads/release-paddle-puffle-3ds.392215/ Paddle Puffle 3DS]<br />
| A port of [http://puffles.gatuno.mx Paddle Puffle] for the 3DS.<br />
| Peanut42<br />
| [http://puffles.gatuno.mx/releases/paddlepuffle3ds.zip Here]<br />
| [https://github.com/gatuno/PaddlePuffle3DS Yes]<br />
|<br />
|-<br />
| [http://gbatemp.net/threads/release-pixel-swap-2ds.395749/ Pixel Swap 2DS]<br />
| Relaxing Puzzle game.<br />
| [[User:Cid2mizard|Cid2mizard]]<br />
| [http://3ds.nintendomax.com/Homebrews/Jeux/PixelSwap2DS/Pixel_Swap_2DS.rar Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/smealum/portal3DS Portal3DS]<br />
| An adaptation of [https://en.wikipedia.org/wiki/Portal_(video_game) Portal] for the 3DS.<br />
| [https://twitter.com/smealum smea]<br />
| N/A<br />
| [https://github.com/smealum/portal3DS Yes]<br />
|<br />
|-<br />
| [http://gowengamedev.com/tappy-plane/ Tappy Plane]<br />
| A Flappy Bird clone, but with a colorful plane. This is merely a port of the Android/iOS/Windows Phone version.<br />
| [http://www.3dbrew.org/wiki/User:Sgowen sgowen]<br />
| [https://github.com/GowenGameDevOpenSource/tappy-plane/releases/download/v1.0-all/tappy-plane-3DS.zip Here]<br />
| [https://github.com/GowenGameDevOpenSource/tappy-plane Yes]<br />
|<br />
|-<br />
| [http://gbatemp.net/threads/release-tilemap-2ds.386733/ TileMap 2DS]<br />
| Puzzle game.<br />
| [[User:Cid2mizard|Cid2mizard]]<br />
| [http://3ds.nintendomax.com/Homebrews/Jeux/TileMap2DS/TileMap_2DS.rar Here]<br />
| Yes<br />
|<br />
|-<br />
| [http://gbatemp.net/threads/release-tiles-2ds.385796/ Tiles 2DS]<br />
| Puzzle game, Lights Out Like.<br />
| [[User:Cid2mizard|Cid2mizard]]<br />
| [http://3ds.nintendomax.com/Homebrews/Jeux/Tiles2DS/Tiles_2DS.rar Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/Steveice10/WorldOf3DSand World of 3DSand]<br />
| World of Sand clone.<br />
| [[User:Steveice10|Steveice10]]<br />
| [https://github.com/Steveice10/WorldOf3DSand/releases/ Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/smealum/yeti3DS Yeti3DS]<br />
| A quick and dirty port of Derek Evans' Yeti3D software rendering engine.<br />
| [https://twitter.com/smealum smea]<br />
| N/A<br />
| Yes<br />
|<br />
|}<br />
<br />
===Emulators===<br />
{| class="wikitable" border="1"<br />
! width="20%" | Name<br />
! width="50%" | Description<br />
! width="10%" | Author<br />
! width="10%" | Download<br />
! width="10%" | Open-Source<br />
! width="10%" | Last Updated<br />
|-<br />
| [https://github.com/st4rk/3DNES 3DNES]<br />
| An NES emulator. (No longer being worked on)<br />
| St4rk<br />
| [http://filetrip.net/3ds-downloads/homebrew/dl-3dnes-1-2-f32931.html Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/StapleButter/blargSnes blargSnes]<br />
| A Super Nintendo emulator. A compatibility list can be found [http://wiki.gbatemp.net/wiki/BlargSnes_Compatibility_List here].<br />
| StapleButter<br />
| [http://kuribo64.net/get.php?id=fYRTHLeS0pR3DXFw Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/xerpi/CHIP-3DS CHIP-3DS]<br />
| A simple and slow CHIP-8 emulator.<br />
| xerpi<br />
| [https://www.mediafire.com/?y94yjhzf70fsfsi Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/shinyquagsire23/gpsp CitrAGB]<br />
| Yet another GBA emulator.<br />
| shinyquagsire23<br />
| [https://www.dropbox.com/s/sxb7x34u58g4zo2/3ds.3dsx?dl=0 Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/Steveice10/GameYob/ GameYob]<br />
| A Game Boy (Color) emulator. A compatibility list can be found [http://wiki.gbatemp.net/wiki/GameYob_3DS_Compatibility_List here].<br />
| Drenn/Steveice10<br />
| [https://github.com/Steveice10/GameYob/releases Here]<br />
| Yes<br />
|<br />
|-<br />
| [https://github.com/mrdanielps/r3Ddragon r3Ddragon]<br />
| A virtual boy emulator.<br />
| mrdanielps<br />
| [https://github.com/mrdanielps/r3Ddragon/releases/download/v0.85-preview.1/r3Ddragon.cia from github]<br />
| Yes<br />
| <br />
|}<br />
===Icon Packs===<br />
Icon Packs are SMDH Packs for homebrew apps<br />
{| class="wikitable" border="1"<br />
! width="20%" | Name<br />
! width="50%" | Description<br />
! width="10%" | Author<br />
! width="10%" | Download<br />
! width="10%" | Last Updated<br />
|-<br />
|Simplok<br />
|The first 3DS Icon pack.<br />
|link6155<br />
|[http://1drv.ms/1EJCq2e Download]<br />
| 7 September 2015<br />
|}<br />
===Demos===<br />
{| class="wikitable" border="1"<br />
! width="20%" | Name<br />
! width="50%" | Description<br />
! width="10%" | Author<br />
! width="10%" | Download<br />
! width="10%" | Open-Source<br />
! width="10%" | Last Updated<br />
|-<br />
| cubedemo<br />
| A short demo of Homebrew on 3ds with working sound.<br />
| [[User:plutoo|plutoo]]<br />
| [https://mega.co.nz/#!KUQFiQYA!pv8HDEyrmuX6Eyw2hW0opL7gf9Ztmjd9J5pPsvs_rD4 Here]<br />
| No<br />
|<br />
|-<br />
| Spine 2D<br />
| Demo of [http://esotericsoftware.com/ Spine] 2D skeletal animations<br />
| [[User:Cruel|Cruel]]<br />
| [https://mega.nz/#!Xg411B5R!kcVHP69Ilggmjh4q5OYmr2cFvf5UGdHWA98-_VttDTo 3DSX] [https://mega.nz/#!z8gxHSQb!H0as1A4wqYrdKBhXJwdYik7nPd_msXJhz5N1CeZm1Iw CIA]<br />
| No<br />
|<br />
|}</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Nintendo_OpenGL&diff=11167
Nintendo OpenGL
2014-12-15T18:05:19Z
<p>Henke37: mtheal told me to do it myself</p>
<hr />
<div>This page's goal is to describe parts of Nintendo's OpenGL implementation for the 3DS as we reverse engineer it to better understand how to use the PICA200.<br />
Some of the information on this page is specific to Steeldiver : Sub Wars. The reason for this is that it's a fairly graphics-heavy game that's available on the eShop for '''free''', so it seems like a good target for a community REing effort.<br />
<br />
== Rendering pipeline ==<br />
[[Image:Renderpipeline.png]]<br />
<br />
== Description ==<br />
<br />
The PICA200 is an opengl ES 1.1 compliant GPU manufactured by DMP. It comes loaded with a number of extensions that make it similar to an openGL ES 2.0 compliant GPU (ability to run programmable vertex/geometry shaders, for instance). Because of this, Nintendo wrapped GPU access into an openGL ES 2.0 implementation with some limitations. As the fragment stage of the pipeline is non-programmable, Nintendo instead gives developers the ability to configure a number of fragment-related values through glGetUniformLocation and glUniformXX. See below for the full list.<br />
<br />
== Shader program structure ==<br />
<br />
When uniform values are set (in shm_uniformfv/shm_uniformiv), they are attached to the current shader program and stored into the corresponding shader program structure. They are later written to the GPU command buffer in __shv_validateShaderValidator or equivalent.<br />
<br />
Shader program struct :<br />
{| class="wikitable" border="1"<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x000<br />
| 0x04<br />
| Value 0x0 ?<br />
|-<br />
| 0x004<br />
| 0x04<br />
| Program ID<br />
|-<br />
| 0x008<br />
| 0x04<br />
| Value -1 ?<br />
|-<br />
| 0x01C<br />
| 0x04<br />
| Pointer to program-specific uniform table<br />
|-<br />
| 0x020<br />
| 0x04<br />
| Total number of uniforms for program<br />
|-<br />
| 0x028<br />
| 0x04<br />
| Number of program-specific uniforms<br />
|-<br />
| 0x414<br />
| 0x04<br />
| Pointer to vertex shader struct<br />
|-<br />
| 0x64C<br />
| 0x04<br />
| Value for GPU register 0x0104<br />
|-<br />
| 0x7C0<br />
| 0x04<br />
| Bitfield containing dmp_FragmentLightSource[n].shadowed values<br />
|-<br />
| 0x7D8<br />
| 0x04<br />
| Bitfield containing dmp_FragmentLightSource[n].geomFactor0 / dmp_FragmentLightSource[n].geomFactor1 / dmp_FragmentLightSource[n].twoSideDiffuse values<br />
|-<br />
| 0xA20<br />
| 0x70*8<br />
| Table of structs for 8 dmp_FragmentLightSource<br />
|}<br />
<br />
dmp_FragmentLightSource struct:<br />
{| class="wikitable" border="1"<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x00<br />
| 0x01<br />
| dmp_FragmentLightSource[k].enabled<br />
|-<br />
| 0x04<br />
| 0x10<br />
| dmp_FragmentLightSource[k].ambient (float[4])<br />
|-<br />
| 0x14<br />
| 0x10<br />
| dmp_FragmentLightSource[k].diffuse (float[4])<br />
|-<br />
| 0x24<br />
| 0x10<br />
| dmp_FragmentLightSource[k].specular0 (float[4])<br />
|-<br />
| 0x34<br />
| 0x10<br />
| dmp_FragmentLightSource[k].specular1 (float[4])<br />
|-<br />
| 0x44<br />
| 0x10<br />
| dmp_FragmentLightSource[k].position (float[4])<br />
|-<br />
| 0x54<br />
| 0x10<br />
| dmp_FragmentLightSource[k].spotDirection (float[3])<br />
|-<br />
| 0x60<br />
| 0x04<br />
| dmp_FragmentLightSource[k].samplerSP (u32)<br />
|-<br />
| 0x64<br />
| 0x04<br />
| dmp_FragmentLightSource[k].distanceAttenuationBias (float)<br />
|-<br />
| 0x68<br />
| 0x04<br />
| dmp_FragmentLightSource[k].distanceAttenuationScale (float)<br />
|}<br />
<br />
vertex/geometry shader struct:<br />
{| class="wikitable" border="1"<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Pointer to shader code data<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Size of shader code (in words)<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Pointer to shader opdesc data<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Size of shader opdescs (in words)<br />
|}<br />
<br />
== Proposed REing methodology ==<br />
<br />
1. Choose a "uniform" you want to RE below<br />
<br />
2. Take note of its ID and type !<br />
<br />
3. Depending on whether its a float or not, go through the gigantic switches in shm_uniformfv or shm_uniformiv (non-float) based on the ID of your uniform (in the case of '''steeldiver: sub wars''' you can now just go directly to the handler as it's listed in the table below)<br />
<br />
4. Once you find the piece of code specific to your uniform, take note of how the values passed to shm_uniformfv/shm_uniformiv are written to the shader object<br />
<br />
5. Go through __shv_validateShaderValidator looking for where those fields written to in shm_uniformfv/shm_uniformiv are used and written to the GPU command buffer either directly or through __cb_writeRegs, __cb_multiWriteReg or __cb_fillRegs.<br />
<br />
6. Document findings on 3Dbrew ! (that's the most important step)<br />
<br />
== Fragment "uniform" list ==<br />
<br />
{| class="wikitable" border="1"<br />
! Uniform ID<br />
! Type<br />
! Name<br />
! Handler address (Steeldiver : Sub Wars)<br />
! Shader Program struct offset<br />
! GPU Register<br />
|- <br />
| 0x0<br />
| GL_BOOL<br />
| dmp_Texture[0].perspectiveShadow<br />
| 0x0012A504<br />
| ?<br />
| ?<br />
|- <br />
| 0x1<br />
| GL_FLOAT<br />
| dmp_Texture[0].shadowZBias<br />
| 0x00155584<br />
| 0xE44<br />
| ?<br />
|- <br />
| 0x2<br />
| GL_FLOAT<br />
| dmp_Texture[0].shadowZScale<br />
| 0x001556A0<br />
| 0xE48<br />
| ?<br />
|- <br />
| 0x3<br />
| GL_INT<br />
| dmp_Texture[0].samplerType<br />
| 0x0012A5D0<br />
| ?<br />
| ?<br />
|- <br />
| 0x4<br />
| GL_INT<br />
| dmp_Texture[1].samplerType<br />
| 0x0012A6F8<br />
| ?<br />
| ?<br />
|- <br />
| 0x5<br />
| GL_INT<br />
| dmp_Texture[2].samplerType<br />
| 0x0012A774<br />
| ?<br />
| ?<br />
|- <br />
| 0x6<br />
| GL_INT<br />
| dmp_Texture[3].samplerType<br />
| 0x0012A7F0<br />
| ?<br />
| ?<br />
|- <br />
| 0x7<br />
| GL_INT<br />
| dmp_Texture[2].texcoord<br />
| 0x0012A8B4<br />
| ?<br />
| ?<br />
|- <br />
| 0x8<br />
| GL_INT<br />
| dmp_Texture[3].texcoord<br />
| 0x0012A97C<br />
| ?<br />
| ?<br />
|- <br />
| 0x9<br />
| GL_INT<br />
| dmp_Texture[3].ptRgbMap<br />
| 0x0012AA54<br />
| ?<br />
| ?<br />
|- <br />
| 0xA<br />
| GL_INT<br />
| dmp_Texture[3].ptAlphaMap<br />
| 0x0012AB94<br />
| ?<br />
| ?<br />
|- <br />
| 0xB<br />
| GL_BOOL<br />
| dmp_Texture[3].ptAlphaSeparate<br />
| 0x0012ACD4<br />
| ?<br />
| ?<br />
|- <br />
| 0xC<br />
| GL_INT<br />
| dmp_Texture[3].ptClampU<br />
| 0x0012ADB8<br />
| ?<br />
| ?<br />
|- <br />
| 0xD<br />
| GL_INT<br />
| dmp_Texture[3].ptClampV<br />
| 0x0012AEC0<br />
| ?<br />
| ?<br />
|- <br />
| 0xE<br />
| GL_INT<br />
| dmp_Texture[3].ptShiftU<br />
| 0x0012AFD0<br />
| ?<br />
| ?<br />
|- <br />
| 0xF<br />
| GL_INT<br />
| dmp_Texture[3].ptShiftV<br />
| 0x0012B0A0<br />
| ?<br />
| ?<br />
|- <br />
| 0x10<br />
| GL_INT<br />
| dmp_Texture[3].ptMinFilter<br />
| 0x0012B168<br />
| ?<br />
| ?<br />
|- <br />
| 0x11<br />
| GL_INT<br />
| dmp_Texture[3].ptTexWidth<br />
| 0x0012B270<br />
| ?<br />
| ?<br />
|- <br />
| 0x12<br />
| GL_INT<br />
| dmp_Texture[3].ptTexOffset<br />
| 0x0012B334<br />
| ?<br />
| ?<br />
|- <br />
| 0x13<br />
| GL_FLOAT<br />
| dmp_Texture[3].ptTexBias<br />
| 0x001556B4<br />
| 0xE10<br />
| ?<br />
|- <br />
| 0x14<br />
| GL_BOOL<br />
| dmp_Texture[3].ptNoiseEnable<br />
| 0x0012B3E0<br />
| ?<br />
| ?<br />
|- <br />
| 0x15<br />
| GL_FLOAT_VEC3<br />
| dmp_Texture[3].ptNoiseU<br />
| 0x00155878<br />
| 0xE14<br />
| ?<br />
|- <br />
| 0x16<br />
| GL_FLOAT_VEC3<br />
| dmp_Texture[3].ptNoiseV<br />
| 0x00155A7C<br />
| 0xE20<br />
| ?<br />
|- <br />
| 0x17<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerRgbMap<br />
| 0x0012B4B0<br />
| 0xDF0<br />
| ?<br />
|- <br />
| 0x18<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerAlphaMap<br />
| 0x0012B4F4<br />
| 0xDF4<br />
| ?<br />
|- <br />
| 0x19<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerNoiseMap<br />
| 0x0012B540<br />
| 0xDF8<br />
| ?<br />
|- <br />
| 0x1A<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerR<br />
| 0x0012B58C<br />
| 0xDFC<br />
| ?<br />
|- <br />
| 0x1B<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerG<br />
| 0x0012B5D8<br />
| 0xE00<br />
| ?<br />
|- <br />
| 0x1C<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerB<br />
| 0x0012B624<br />
| 0xE04<br />
| ?<br />
|- <br />
| 0x1D<br />
| GL_SAMPLER_1D<br />
| dmp_Texture[3].ptSamplerA<br />
| 0x0012B670<br />
| 0xE08<br />
| ?<br />
|- <br />
| 0x1E<br />
| GL_INT<br />
| dmp_FragOperation.mode<br />
| 0x0012B6BC<br />
| 0xE38<br />
| ?<br />
|- <br />
| 0x1F<br />
| GL_FLOAT<br />
| dmp_FragOperation.penumbraScale<br />
| 0x00155C98<br />
| 0xE40<br />
| ?<br />
|- <br />
| 0x20<br />
| GL_FLOAT<br />
| dmp_FragOperation.penumbraBias<br />
| 0x00155D8C<br />
| 0xE3C<br />
| ?<br />
|- <br />
| 0x21<br />
| GL_FLOAT<br />
| dmp_FragOperation.wScale<br />
| 0x00155E9C<br />
| 0xE4C<br />
| ?<br />
|- <br />
| 0x22<br />
| GL_BOOL<br />
| dmp_FragOperation.enableClippingPlane<br />
| 0x0012EAEC<br />
| 0x568<br />
| ?<br />
|- <br />
| 0x23<br />
| GL_FLOAT_VEC4<br />
| dmp_FragOperation.clippingPlane<br />
| 0x00159474<br />
| 0xE50<br />
| ?<br />
|- <br />
| 0x24<br />
| GL_BOOL<br />
| dmp_FragOperation.enableAlphaTest<br />
| 0x0012EBAC<br />
| 0x64C<br />
| ?<br />
|- <br />
| 0x25<br />
| GL_INT<br />
| dmp_FragOperation.alphaTestFunc<br />
| 0x0012EC64<br />
| 0x64C<br />
| ?<br />
|- <br />
| 0x26<br />
| GL_FLOAT<br />
| dmp_FragOperation.alphaRefValue<br />
| 0x0015971C<br />
| 0x64C ?<br />
| ?<br />
|- <br />
| 0x27<br />
| GL_FLOAT_VEC3<br />
| dmp_Gas.lightXY<br />
| 0x001560EC<br />
| 0xE84<br />
| ?<br />
|- <br />
| 0x28<br />
| GL_FLOAT_VEC4<br />
| dmp_Gas.lightZ<br />
| 0x00156268<br />
| 0xE90<br />
| ?<br />
|- <br />
| 0x29<br />
| GL_FLOAT<br />
| dmp_Gas.deltaZ<br />
| 0x001564D4<br />
| 0xEA0<br />
| ?<br />
|- <br />
| 0x2A<br />
| GL_FLOAT<br />
| dmp_Gas.accMax<br />
| 0x001565C0<br />
| 0xEA4<br />
| ?<br />
|- <br />
| 0x2B<br />
| GL_BOOL<br />
| dmp_Gas.autoAcc<br />
| 0x0012B790<br />
| 0xE74<br />
| ?<br />
|- <br />
| 0x2C<br />
| GL_FLOAT<br />
| dmp_Gas.attenuation<br />
| 0x00156684<br />
| 0xEA8<br />
| ?<br />
|- <br />
| 0x2D<br />
| GL_INT<br />
| dmp_Gas.colorLutInput<br />
| 0x0012B7A4<br />
| 0x640<br />
| ?<br />
|- <br />
| 0x2E<br />
| GL_INT<br />
| dmp_Gas.shadingDensitySrc<br />
| 0x0012B854<br />
| 0x624<br />
| ?<br />
|- <br />
| 0x2F<br />
| GL_SAMPLER_1D<br />
| dmp_Gas.samplerTR<br />
| 0x0012B910<br />
| 0xE78<br />
| ?<br />
|- <br />
| 0x30<br />
| GL_SAMPLER_1D<br />
| dmp_Gas.samplerTG<br />
| 0x0012B95C<br />
| 0xE7C<br />
| ?<br />
|- <br />
| 0x31<br />
| GL_SAMPLER_1D<br />
| dmp_Gas.samplerTB<br />
| 0x0012B9A8<br />
| 0xE80<br />
| ?<br />
|- <br />
| 0x32<br />
| GL_BOOL<br />
| dmp_FragmentLighting.enabled<br />
| 0x0012B9F4<br />
| 0x590<br />
| ?<br />
|- <br />
| 0x33<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLighting.ambient<br />
| 0x00156744<br />
| 0xA10<br />
| ?<br />
|- <br />
| 0x34<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentMaterial.emission<br />
| 0x00156E1C<br />
| 0xDE0<br />
| ?<br />
|- <br />
| 0x35<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentMaterial.ambient<br />
| 0x0015696C<br />
| 0xDA0<br />
| ?<br />
|- <br />
| 0x36<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentMaterial.diffuse<br />
| 0x00157048<br />
| 0xDB0<br />
| ?<br />
|- <br />
| 0x37<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentMaterial.specular0<br />
| 0x001572E0<br />
| 0xDC0<br />
| ?<br />
|- <br />
| 0x38<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentMaterial.specular1<br />
| 0x0015756C<br />
| 0xDD0<br />
| ?<br />
|- <br />
| 0x39<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].enabled<br />
| 0x0012BD24<br />
| 0xA20+0*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x3A<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].enabled<br />
| 0x0012BD24<br />
| 0xA20+1*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x3B<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].enabled<br />
| 0x0012BD24<br />
| 0xA20+2*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x3C<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].enabled<br />
| 0x0012BD24<br />
| 0xA20+3*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x3D<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].enabled<br />
| 0x0012BD24<br />
| 0xA20+4*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x3E<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].enabled<br />
| 0x0012BD24<br />
| 0xA20+5*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x3F<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].enabled<br />
| 0x0012BD24<br />
| 0xA20+6*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x40<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].enabled<br />
| 0x0012BD24<br />
| 0xA20+7*0x70+0x00<br />
| 0x01C5<br />
|- <br />
| 0x41<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[0].ambient<br />
| 0x001579CC<br />
| 0xA20+0*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x42<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[1].ambient<br />
| 0x001579CC<br />
| 0xA20+1*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x43<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[2].ambient<br />
| 0x001579CC<br />
| 0xA20+2*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x44<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[3].ambient<br />
| 0x001579CC<br />
| 0xA20+3*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x45<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[4].ambient<br />
| 0x001579CC<br />
| 0xA20+4*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x46<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[5].ambient<br />
| 0x001579CC<br />
| 0xA20+5*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x47<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[6].ambient<br />
| 0x001579CC<br />
| 0xA20+6*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x48<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[7].ambient<br />
| 0x001579CC<br />
| 0xA20+7*0x70+0x04<br />
| 0x01C8 ?<br />
|- <br />
| 0x49<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[0].diffuse<br />
| 0x00157C10<br />
| 0xA20+0*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x4A<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[1].diffuse<br />
| 0x00157C10<br />
| 0xA20+1*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x4B<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[2].diffuse<br />
| 0x00157C10<br />
| 0xA20+2*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x4C<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[3].diffuse<br />
| 0x00157C10<br />
| 0xA20+3*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x4D<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[4].diffuse<br />
| 0x00157C10<br />
| 0xA20+4*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x4E<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[5].diffuse<br />
| 0x00157C10<br />
| 0xA20+5*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x4F<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[6].diffuse<br />
| 0x00157C10<br />
| 0xA20+6*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x50<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[7].diffuse<br />
| 0x00157C10<br />
| 0xA20+7*0x70+0x14<br />
| 0x01C8 ?<br />
|- <br />
| 0x51<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[0].specular0<br />
| 0x00157E5C<br />
| 0xA20+0*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x52<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[1].specular0<br />
| 0x00157E5C<br />
| 0xA20+1*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x53<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[2].specular0<br />
| 0x00157E5C<br />
| 0xA20+2*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x54<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[3].specular0<br />
| 0x00157E5C<br />
| 0xA20+3*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x55<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[4].specular0<br />
| 0x00157E5C<br />
| 0xA20+4*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x56<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[5].specular0<br />
| 0x00157E5C<br />
| 0xA20+5*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x57<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[6].specular0<br />
| 0x00157E5C<br />
| 0xA20+6*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x58<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[7].specular0<br />
| 0x00157E5C<br />
| 0xA20+7*0x70+0x24<br />
| 0x01C8 ?<br />
|- <br />
| 0x59<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[0].specular1<br />
| 0x001580B4<br />
| 0xA20+0*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x5A<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[1].specular1<br />
| 0x001580B4<br />
| 0xA20+1*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x5B<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[2].specular1<br />
| 0x001580B4<br />
| 0xA20+2*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x5C<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[3].specular1<br />
| 0x001580B4<br />
| 0xA20+3*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x5D<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[4].specular1<br />
| 0x001580B4<br />
| 0xA20+4*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x5E<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[5].specular1<br />
| 0x001580B4<br />
| 0xA20+5*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x5F<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[6].specular1<br />
| 0x001580B4<br />
| 0xA20+6*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x60<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[7].specular1<br />
| 0x001580B4<br />
| 0xA20+7*0x70+0x34<br />
| 0x01C8 ?<br />
|- <br />
| 0x61<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[0].position<br />
| 0x001584B0<br />
| 0xA20+0*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x62<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[1].position<br />
| 0x001584B0<br />
| 0xA20+1*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x63<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[2].position<br />
| 0x001584B0<br />
| 0xA20+2*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x64<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[3].position<br />
| 0x001584B0<br />
| 0xA20+3*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x65<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[4].position<br />
| 0x001584B0<br />
| 0xA20+4*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x66<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[5].position<br />
| 0x001584B0<br />
| 0xA20+5*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x67<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[6].position<br />
| 0x001584B0<br />
| 0xA20+6*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x68<br />
| GL_FLOAT_VEC4<br />
| dmp_FragmentLightSource[7].position<br />
| 0x001584B0<br />
| 0xA20+7*0x70+0x44<br />
| 0x01C8 ?<br />
|- <br />
| 0x69<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[0].spotDirection<br />
| 0x001587E4<br />
| 0xA20+0*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x6A<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[1].spotDirection<br />
| 0x001587E4<br />
| 0xA20+1*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x6B<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[2].spotDirection<br />
| 0x001587E4<br />
| 0xA20+2*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x6C<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[3].spotDirection<br />
| 0x001587E4<br />
| 0xA20+3*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x6D<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[4].spotDirection<br />
| 0x001587E4<br />
| 0xA20+4*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x6E<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[5].spotDirection<br />
| 0x001587E4<br />
| 0xA20+5*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x6F<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[6].spotDirection<br />
| 0x001587E4<br />
| 0xA20+6*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x70<br />
| GL_FLOAT_VEC3<br />
| dmp_FragmentLightSource[7].spotDirection<br />
| 0x001587E4<br />
| 0xA20+7*0x70+0x54<br />
| 0x01C8 ?<br />
|- <br />
| 0x71<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x72<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x73<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x74<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x75<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x76<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x77<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x78<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].shadowed<br />
| 0x0012C20C<br />
| 0x7C0<br />
| 0x01C8 ?<br />
|- <br />
| 0x79<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x7A<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x7B<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x7C<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x7D<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x7E<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x7F<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x80<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].geomFactor0<br />
| 0x0012C018<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x81<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x82<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x83<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x84<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x85<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x86<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x87<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x88<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].geomFactor1<br />
| 0x0012C114<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x89<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x8A<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x8B<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x8C<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x8D<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x8E<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x8F<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x90<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].twoSideDiffuse<br />
| 0x0012BF10<br />
| 0x7D8<br />
| 0x01C8 ?<br />
|- <br />
| 0x91<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[0].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+0*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x92<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[1].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+1*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x93<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[2].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+2*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x94<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[3].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+3*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x95<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[4].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+4*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x96<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[5].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+5*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x97<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[6].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+6*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x98<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[7].samplerSP<br />
| 0x0012C31C<br />
| 0xA20+7*0x70+0x60<br />
| 0x01C8 ?<br />
|- <br />
| 0x99<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0x9A<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0x9B<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0x9C<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0x9D<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0x9E<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0x9F<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xA0<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].spotEnabled<br />
| 0x0012C380<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xA1<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[0].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+0*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA2<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[1].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+1*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA3<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[2].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+2*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA4<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[3].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+3*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA5<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[4].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+4*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA6<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[5].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+5*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA7<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[6].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+6*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA8<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[7].distanceAttenuationBias<br />
| 0x00158AE8<br />
| 0xA20+7*0x70+0x64<br />
| 0x01C8 ?<br />
|- <br />
| 0xA9<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[0].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+0*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xAA<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[1].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+1*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xAB<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[2].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+2*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xAC<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[3].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+3*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xAD<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[4].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+4*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xAE<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[5].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+5*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xAF<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[6].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+6*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xB0<br />
| GL_FLOAT<br />
| dmp_FragmentLightSource[7].distanceAttenuationScale<br />
| 0x00158C44<br />
| 0xA20+7*0x70+0x68<br />
| 0x01C8 ?<br />
|- <br />
| 0xB1<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[0].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB2<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[1].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB3<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[2].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB4<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[3].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB5<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[4].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB6<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[5].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB7<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[6].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB8<br />
| GL_BOOL<br />
| dmp_FragmentLightSource[7].distanceAttenuationEnabled<br />
| 0x0012C4A0<br />
| ?<br />
| 0x01C8 ?<br />
|- <br />
| 0xB9<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[0].samplerDA<br />
| 0x0012C578<br />
| 0xA20+0*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xBA<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[1].samplerDA<br />
| 0x0012C578<br />
| 0xA20+1*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xBB<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[2].samplerDA<br />
| 0x0012C578<br />
| 0xA20+2*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xBC<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[3].samplerDA<br />
| 0x0012C578<br />
| 0xA20+3*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xBD<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[4].samplerDA<br />
| 0x0012C578<br />
| 0xA20+4*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xBE<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[5].samplerDA<br />
| 0x0012C578<br />
| 0xA20+5*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xBF<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[6].samplerDA<br />
| 0x0012C578<br />
| 0xA20+6*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xC0<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentLightSource[7].samplerDA<br />
| 0x0012C578<br />
| 0xA20+7*0x70+0x6C<br />
| 0x01C8 ?<br />
|- <br />
| 0xC1<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputD0<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC2<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputD1<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC3<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputSP<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC4<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputFR<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC5<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputRB<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC6<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputRG<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC7<br />
| GL_BOOL<br />
| dmp_LightEnv.absLutInputRR<br />
| 0x0012C5D8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC8<br />
| GL_INT<br />
| dmp_LightEnv.lutInputD0<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xC9<br />
| GL_INT<br />
| dmp_LightEnv.lutInputD1<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xCA<br />
| GL_INT<br />
| dmp_LightEnv.lutInputSP<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xCB<br />
| GL_INT<br />
| dmp_LightEnv.lutInputFR<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xCC<br />
| GL_INT<br />
| dmp_LightEnv.lutInputRB<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xCD<br />
| GL_INT<br />
| dmp_LightEnv.lutInputRG<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xCE<br />
| GL_INT<br />
| dmp_LightEnv.lutInputRR<br />
| 0x0012C6E8<br />
| ?<br />
| ?<br />
|- <br />
| 0xCF<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleD0<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD0<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleD1<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD1<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleSP<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD2<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleFR<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD3<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleRB<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD4<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleRG<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD5<br />
| GL_FLOAT<br />
| dmp_LightEnv.lutScaleRR<br />
| 0x00155404<br />
| ?<br />
| ?<br />
|- <br />
| 0xD6<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentMaterial.samplerD0<br />
| 0x0012C7D0<br />
| ?<br />
| ?<br />
|- <br />
| 0xD7<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentMaterial.samplerD1<br />
| 0x0012C7D0<br />
| ?<br />
| ?<br />
|- <br />
| 0xD8<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentMaterial.samplerFR<br />
| 0x0012C7D0<br />
| ?<br />
| ?<br />
|- <br />
| 0xD9<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentMaterial.samplerRB<br />
| 0x0012C7D0<br />
| ?<br />
| ?<br />
|- <br />
| 0xDA<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentMaterial.samplerRG<br />
| 0x0012C7D0<br />
| ?<br />
| ?<br />
|- <br />
| 0xDB<br />
| GL_SAMPLER_1D<br />
| dmp_FragmentMaterial.samplerRR<br />
| 0x0012C7D0<br />
| ?<br />
| ?<br />
|- <br />
| 0xDC<br />
| GL_INT<br />
| dmp_LightEnv.shadowSelector<br />
| 0x0012CE44<br />
| ?<br />
| ?<br />
|- <br />
| 0xDD<br />
| GL_INT<br />
| dmp_LightEnv.bumpSelector<br />
| 0x0012CD88<br />
| ?<br />
| ?<br />
|- <br />
| 0xDE<br />
| GL_INT<br />
| dmp_LightEnv.bumpMode<br />
| 0x0012D4B4<br />
| ?<br />
| ?<br />
|- <br />
| 0xDF<br />
| GL_BOOL<br />
| dmp_LightEnv.bumpRenorm<br />
| 0x0012D8A0<br />
| ?<br />
| ?<br />
|- <br />
| 0xE0<br />
| GL_INT<br />
| dmp_LightEnv.config<br />
| 0x0012D5E4<br />
| ?<br />
| ?<br />
|- <br />
| 0xE1<br />
| GL_BOOL<br />
| dmp_LightEnv.invertShadow<br />
| 0x0012CF04<br />
| ?<br />
| ?<br />
|- <br />
| 0xE2<br />
| GL_BOOL<br />
| dmp_LightEnv.shadowPrimary<br />
| 0x0012CFD4<br />
| ?<br />
| ?<br />
|- <br />
| 0xE3<br />
| GL_BOOL<br />
| dmp_LightEnv.shadowSecondary<br />
| 0x0012D1B8<br />
| ?<br />
| ?<br />
|- <br />
| 0xE4<br />
| GL_BOOL<br />
| dmp_LightEnv.shadowAlpha<br />
| 0x0012D350<br />
| ?<br />
| ?<br />
|- <br />
| 0xE5<br />
| GL_INT<br />
| dmp_LightEnv.fresnelSelector<br />
| 0x0012D720<br />
| ?<br />
| ?<br />
|- <br />
| 0xE6<br />
| GL_BOOL<br />
| dmp_LightEnv.clampHighlights<br />
| 0x0012D9B0<br />
| ?<br />
| ?<br />
|- <br />
| 0xE7<br />
| GL_BOOL<br />
| dmp_LightEnv.lutEnabledD0<br />
| 0x0012DA80<br />
| ?<br />
| ?<br />
|- <br />
| 0xE8<br />
| GL_BOOL<br />
| dmp_LightEnv.lutEnabledD1<br />
| 0x0012DB58<br />
| ?<br />
| ?<br />
|- <br />
| 0xE9<br />
| GL_BOOL<br />
| dmp_LightEnv.lutEnabledRefl<br />
| 0x0012C83C<br />
| ?<br />
| ?<br />
|- <br />
| 0xEA<br />
| GL_INT<br />
| dmp_TexEnv[0].combineRgb<br />
| 0x0012DC2C<br />
| ?<br />
| 0xC2<br />
|- <br />
| 0xEB<br />
| GL_INT<br />
| dmp_TexEnv[1].combineRgb<br />
| 0x0012DC2C<br />
| ?<br />
| 0xCA<br />
|- <br />
| 0xEC<br />
| GL_INT<br />
| dmp_TexEnv[2].combineRgb<br />
| 0x0012DC2C<br />
| ?<br />
| 0xD2<br />
|- <br />
| 0xED<br />
| GL_INT<br />
| dmp_TexEnv[3].combineRgb<br />
| 0x0012DC2C<br />
| ?<br />
| 0xDA<br />
|- <br />
| 0xEE<br />
| GL_INT<br />
| dmp_TexEnv[4].combineRgb<br />
| 0x0012DC2C<br />
| ?<br />
| 0xF2<br />
|- <br />
| 0xEF<br />
| GL_INT<br />
| dmp_TexEnv[5].combineRgb<br />
| 0x0012DC2C<br />
| ?<br />
| 0xFA<br />
|- <br />
| 0xF0<br />
| GL_INT<br />
| dmp_TexEnv[0].combineAlpha<br />
| 0x0012DD9C<br />
| ?<br />
| 0xC2<br />
|- <br />
| 0xF1<br />
| GL_INT<br />
| dmp_TexEnv[1].combineAlpha<br />
| 0x0012DD9C<br />
| ?<br />
| 0xCA<br />
|- <br />
| 0xF2<br />
| GL_INT<br />
| dmp_TexEnv[2].combineAlpha<br />
| 0x0012DD9C<br />
| ?<br />
| 0xD2<br />
|- <br />
| 0xF3<br />
| GL_INT<br />
| dmp_TexEnv[3].combineAlpha<br />
| 0x0012DD9C<br />
| ?<br />
| 0xDA<br />
|- <br />
| 0xF4<br />
| GL_INT<br />
| dmp_TexEnv[4].combineAlpha<br />
| 0x0012DD9C<br />
| ?<br />
| 0xF2<br />
|- <br />
| 0xF5<br />
| GL_INT<br />
| dmp_TexEnv[5].combineAlpha<br />
| 0x0012DD9C<br />
| ?<br />
| 0xFA<br />
|- <br />
| 0xF6<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[0].srcRgb<br />
| 0x0012DF08<br />
| ?<br />
| 0xC0<br />
|- <br />
| 0xF7<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[1].srcRgb<br />
| 0x0012DF08<br />
| ?<br />
| 0xC8<br />
|- <br />
| 0xF8<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[2].srcRgb<br />
| 0x0012DF08<br />
| ?<br />
| 0xD0<br />
|- <br />
| 0xF9<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[3].srcRgb<br />
| 0x0012DF08<br />
| ?<br />
| 0xD8<br />
|- <br />
| 0xFA<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[4].srcRgb<br />
| 0x0012DF08<br />
| ?<br />
| 0xF0<br />
|- <br />
| 0xFB<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[5].srcRgb<br />
| 0x0012DF08<br />
| ?<br />
| 0xF8<br />
|- <br />
| 0xFC<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[0].srcAlpha<br />
| 0x0012E0FC<br />
| ?<br />
| 0xC0<br />
|- <br />
| 0xFD<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[1].srcAlpha<br />
| 0x0012E0FC<br />
| ?<br />
| 0xC8<br />
|- <br />
| 0xFE<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[2].srcAlpha<br />
| 0x0012E0FC<br />
| ?<br />
| 0xD0<br />
|- <br />
| 0xFF<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[3].srcAlpha<br />
| 0x0012E0FC<br />
| ?<br />
| 0xD8<br />
|- <br />
| 0x100<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[4].srcAlpha<br />
| 0x0012E0FC<br />
| ?<br />
| 0xF0<br />
|- <br />
| 0x101<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[5].srcAlpha<br />
| 0x0012E0FC<br />
| ?<br />
| 0xF8<br />
|- <br />
| 0x102<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[0].operandRgb<br />
| 0x0012E2F0<br />
| ?<br />
| 0xC1<br />
|- <br />
| 0x103<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[1].operandRgb<br />
| 0x0012E2F0<br />
| ?<br />
| 0xC9<br />
|- <br />
| 0x104<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[2].operandRgb<br />
| 0x0012E2F0<br />
| ?<br />
| 0xD1<br />
|- <br />
| 0x105<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[3].operandRgb<br />
| 0x0012E2F0<br />
| ?<br />
| 0xD9<br />
|- <br />
| 0x106<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[4].operandRgb<br />
| 0x0012E2F0<br />
| ?<br />
| 0xF1<br />
|- <br />
| 0x107<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[5].operandRgb<br />
| 0x0012E2F0<br />
| ?<br />
| 0xF9<br />
|- <br />
| 0x108<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[0].operandAlpha<br />
| 0x0012E51C<br />
| ?<br />
| 0xC1<br />
|- <br />
| 0x109<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[1].operandAlpha<br />
| 0x0012E51C<br />
| ?<br />
| 0xC9<br />
|- <br />
| 0x10A<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[2].operandAlpha<br />
| 0x0012E51C<br />
| ?<br />
| 0xD1<br />
|- <br />
| 0x10B<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[3].operandAlpha<br />
| 0x0012E51C<br />
| ?<br />
| 0xD9<br />
|- <br />
| 0x10C<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[4].operandAlpha<br />
| 0x0012E51C<br />
| ?<br />
| 0xF1<br />
|- <br />
| 0x10D<br />
| GL_INT_VEC3<br />
| dmp_TexEnv[5].operandAlpha<br />
| 0x0012E51C<br />
| ?<br />
| 0xF9<br />
|- <br />
| 0x10E<br />
| GL_FLOAT<br />
| dmp_TexEnv[0].scaleRgb<br />
| 0x00155464<br />
| ?<br />
| ?<br />
|- <br />
| 0x10F<br />
| GL_FLOAT<br />
| dmp_TexEnv[1].scaleRgb<br />
| 0x00155464<br />
| ?<br />
| ?<br />
|- <br />
| 0x110<br />
| GL_FLOAT<br />
| dmp_TexEnv[2].scaleRgb<br />
| 0x00155464<br />
| ?<br />
| ?<br />
|- <br />
| 0x111<br />
| GL_FLOAT<br />
| dmp_TexEnv[3].scaleRgb<br />
| 0x00155464<br />
| ?<br />
| ?<br />
|- <br />
| 0x112<br />
| GL_FLOAT<br />
| dmp_TexEnv[4].scaleRgb<br />
| 0x00155464<br />
| ?<br />
| ?<br />
|- <br />
| 0x113<br />
| GL_FLOAT<br />
| dmp_TexEnv[5].scaleRgb<br />
| 0x00155464<br />
| ?<br />
| ?<br />
|- <br />
| 0x114<br />
| GL_FLOAT<br />
| dmp_TexEnv[0].scaleAlpha<br />
| 0x00158EDC<br />
| ?<br />
| ?<br />
|- <br />
| 0x115<br />
| GL_FLOAT<br />
| dmp_TexEnv[1].scaleAlpha<br />
| 0x00158EDC<br />
| ?<br />
| ?<br />
|- <br />
| 0x116<br />
| GL_FLOAT<br />
| dmp_TexEnv[2].scaleAlpha<br />
| 0x00158EDC<br />
| ?<br />
| ?<br />
|- <br />
| 0x117<br />
| GL_FLOAT<br />
| dmp_TexEnv[3].scaleAlpha<br />
| 0x00158EDC<br />
| ?<br />
| ?<br />
|- <br />
| 0x118<br />
| GL_FLOAT<br />
| dmp_TexEnv[4].scaleAlpha<br />
| 0x00158EDC<br />
| ?<br />
| ?<br />
|- <br />
| 0x119<br />
| GL_FLOAT<br />
| dmp_TexEnv[5].scaleAlpha<br />
| 0x00158EDC<br />
| ?<br />
| ?<br />
|- <br />
| 0x11A<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[0].constRgba<br />
| 0x00158FF4<br />
| ?<br />
| 0xC3<br />
|- <br />
| 0x11B<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[1].constRgba<br />
| 0x00158FF4<br />
| ?<br />
| 0xCB<br />
|- <br />
| 0x11C<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[2].constRgba<br />
| 0x00158FF4<br />
| ?<br />
| 0xD3<br />
|- <br />
| 0x11D<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[3].constRgba<br />
| 0x00158FF4<br />
| ?<br />
| 0xDB<br />
|- <br />
| 0x11E<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[4].constRgba<br />
| 0x00158FF4<br />
| ?<br />
| 0xF3<br />
|- <br />
| 0x11F<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[5].constRgba<br />
| 0x00158FF4<br />
| ?<br />
| 0xFB<br />
|- <br />
| 0x120<br />
| GL_FLOAT_VEC4<br />
| dmp_TexEnv[0].bufferColor<br />
| 0x001591C0<br />
| ?<br />
| ?<br />
|- <br />
| 0x121<br />
| GL_INT_VEC2<br />
| dmp_TexEnv[1].bufferInput<br />
| 0x0012E6D0<br />
| ?<br />
| ?<br />
|- <br />
| 0x122<br />
| GL_INT_VEC2<br />
| dmp_TexEnv[2].bufferInput<br />
| 0x0012E6D0<br />
| ?<br />
| ?<br />
|- <br />
| 0x123<br />
| GL_INT_VEC2<br />
| dmp_TexEnv[3].bufferInput<br />
| 0x0012E6D0<br />
| ?<br />
| ?<br />
|- <br />
| 0x124<br />
| GL_INT_VEC2<br />
| dmp_TexEnv[4].bufferInput<br />
| 0x0012E6D0<br />
| ?<br />
| ?<br />
|- <br />
| 0x125<br />
| GL_INT<br />
| dmp_Fog.mode<br />
| 0x0012E7F8<br />
| ?<br />
| ?<br />
|- <br />
| 0x126<br />
| GL_FLOAT_VEC3<br />
| dmp_Fog.color<br />
| 0x00159338<br />
| ?<br />
| ?<br />
|- <br />
| 0x127<br />
| GL_BOOL<br />
| dmp_Fog.zFlip<br />
| 0x0012E9DC<br />
| ?<br />
| ?<br />
|- <br />
| 0x128<br />
| GL_SAMPLER_1D<br />
| dmp_Fog.sampler<br />
| 0x0012EAA4<br />
| ?<br />
| ?<br />
|}<br />
<br />
On steeldiver's uniform handlers : R1 is a pointer to the current shader program object, R12 is a pointer to the data the uniform is being set to.</div>
Henke37
https://www.3dbrew.org/w/index.php?title=File:Renderpipeline.png&diff=11166
File:Renderpipeline.png
2014-12-15T18:04:13Z
<p>Henke37: The rendering pipeline on the gpu</p>
<hr />
<div>The rendering pipeline on the gpu</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Filesystem_services&diff=11158
Filesystem services
2014-12-14T15:02:40Z
<p>Henke37: Stub note goes in the description column</p>
<hr />
<div>[[Category:Services]]<br />
<br />
= Filesystem service "fs:USER" =<br />
You can at most have 32 FS archive handles.<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Available since system version <br />
! Description<br />
! scope="col" width="400" | Required [[NCCH/Extended_Header|exheader]] access info bitmask<br />
|-<br />
| 0x000100C6<br />
|?<br />
| Dummy1<br />
| None<br />
|-<br />
| 0x040100C4<br />
|?<br />
| Control<br />
| None<br />
|-<br />
| 0x08010002<br />
|?<br />
| [[FS:Initialize|Initialize]]<br />
| None<br />
|-<br />
| 0x080201C2<br />
|?<br />
| [[FS:OpenFile|OpenFile]]<br />
| None<br />
|-<br />
| 0x08030204<br />
|?<br />
| [[FS:OpenFileDirectly|OpenFileDirectly]]<br />
| None<br />
|-<br />
| 0x08040142<br />
|?<br />
| [[FS:DeleteFile|DeleteFile]]<br />
| None<br />
|-<br />
| 0x08050244<br />
|?<br />
| [[FS:RenameFile|RenameFile]]<br />
| None<br />
|-<br />
| 0x08060142<br />
|?<br />
| [[FS:DeleteDirectory|DeleteDirectory]]<br />
| None<br />
|-<br />
| 0x08070142<br />
|?<br />
| DeleteDirectoryRecursively<br />
| None<br />
|-<br />
| 0x08080202<br />
|?<br />
| [[FS:CreateFile|CreateFile]]<br />
| None<br />
|-<br />
| 0x08090182<br />
|?<br />
| [[FS:CreateDirectory|CreateDirectory]]<br />
| None<br />
|-<br />
| 0x080A0244<br />
|?<br />
| [[FS:RenameDirectory|RenameDirectory]]<br />
| None<br />
|-<br />
| 0x080B0102<br />
|?<br />
| [[FS:OpenDirectory|OpenDirectory]]<br />
| None<br />
|-<br />
| 0x080C00C2<br />
|?<br />
| [[FS:OpenArchive|OpenArchive]]<br />
| Each archive ID code has separate access info bitmasks, if it has any<br />
|-<br />
| 0x080D0144<br />
|?<br />
| ControlArchive<br />
| None<br />
|-<br />
| 0x080E0080<br />
|?<br />
| [[FS:CloseArchive|CloseArchive]]<br />
| None<br />
|-<br />
| 0x080F0180<br />
|?<br />
| FormatThisUserSaveData<br />
| None<br />
|-<br />
| 0x08100200<br />
|?<br />
| CreateSystemSaveData<br />
| 0x4, for when the input saveID doesn't match the exheader saveID<br />
|-<br />
| 0x08110040<br />
|?<br />
| DeleteSystemSaveData<br />
| 0x1004, for when the input saveID doesn't match the exheader saveID<br />
|-<br />
| 0x08120080<br />
|?<br />
| GetFreeBytes<br />
| None<br />
|-<br />
| 0x08130000<br />
|?<br />
| GetCardType<br />
| 0x1017<br />
|-<br />
| 0x08140000<br />
|?<br />
| [[FS:GetSdmcArchiveResource|GetSdmcArchiveResource]]<br />
| None<br />
|-<br />
| 0x08150000<br />
|?<br />
| [[FS:GetNandArchiveResource|GetNandArchiveResource]]<br />
| None<br />
|-<br />
| 0x08160000<br />
|?<br />
| GetSdmcFatfsError<br />
| 0x2<br />
|-<br />
| 0x08170000<br />
|?<br />
| [[FS:IsSdmcDetected|IsSdmcDetected]]<br />
| None<br />
|-<br />
| 0x08180000<br />
|?<br />
| [[FS:IsSdmcWritable|IsSdmcWritable]]<br />
| None<br />
|-<br />
| 0x08190042<br />
|?<br />
| GetSdmcCid<br />
| 0x2<br />
|-<br />
| 0x081A0042<br />
|?<br />
| GetNandCid<br />
| 0x2<br />
|-<br />
| 0x081B0000<br />
|?<br />
| GetSdmcSpeedInfo<br />
| 0x2<br />
|-<br />
| 0x081C0000<br />
|?<br />
| GetNandSpeedInfo<br />
| 0x2<br />
|-<br />
| 0x081D0042<br />
|?<br />
| GetSdmcLog<br />
| 0x2<br />
|-<br />
| 0x081E0042<br />
|?<br />
| GetNandLog<br />
| 0x2<br />
|-<br />
| 0x081F0000<br />
|?<br />
| ClearSdmcLog<br />
| 0x2<br />
|-<br />
| 0x08200000<br />
|?<br />
| ClearNandLog<br />
| 0x2<br />
|-<br />
| 0x08210000<br />
|?<br />
| CardSlotIsInserted<br />
| 0x1017<br />
|-<br />
| 0x08220000<br />
|?<br />
| CardSlotPowerOn<br />
| 0x2<br />
|-<br />
| 0x08230000<br />
|?<br />
| CardSlotPowerOff<br />
| 0x2<br />
|-<br />
| 0x08240000<br />
|?<br />
| CardSlotGetCardIFPowerStatus<br />
| 0x2<br />
|-<br />
| 0x08250040<br />
|?<br />
| CardNorDirectCommand<br />
| 0x2<br />
|-<br />
| 0x08260080<br />
|?<br />
| CardNorDirectCommandWithAddress<br />
| 0x2<br />
|-<br />
| 0x08270082<br />
|?<br />
| CardNorDirectRead<br />
| 0x2<br />
|-<br />
| 0x082800C2<br />
|?<br />
| CardNorDirectReadWithAddress<br />
| 0x2<br />
|-<br />
| 0x08290082<br />
|?<br />
| CardNorDirectWrite<br />
| 0x2<br />
|-<br />
| 0x082A00C2<br />
|?<br />
| CardNorDirectWriteWithAddress<br />
| 0x2<br />
|-<br />
| 0x082B00C2<br />
|?<br />
| CardNorDirectRead_4xIO<br />
| 0x2<br />
|-<br />
| 0x082C0082<br />
|?<br />
| CardNorDirectCpuWriteWithoutVerify<br />
| 0x2<br />
|-<br />
| 0x082D0040<br />
|?<br />
| CardNorDirectSectorEraseWithoutVerify<br />
| 0x2<br />
|-<br />
| 0x082E0040<br />
|?<br />
| [[FS:GetProductInfo|GetProductInfo]]<br />
| 0x1005<br />
|-<br />
| 0x082F0040<br />
|?<br />
| [[FS:GetProgramLaunchInfo|GetProgramLaunchInfo]]<br />
| 0x1005<br />
|-<br />
| 0x08300182<br />
|?<br />
| CreateExtSaveData<br />
| 0xC, for when the input extdataID doesn't match the exheader extdataID<br />
|-<br />
| 0x08310180<br />
|?<br />
| CreateSharedExtSaveData<br />
| 0x1005<br />
|-<br />
| 0x08320102<br />
|?<br />
| [[FS:ReadExtSaveDataIcon|ReadExtSaveDataIcon]]<br />
| 0x100D, for when the input extdataID doesn't match the exheader extdataID<br />
|-<br />
| 0x08330082<br />
|?<br />
| EnumerateExtSaveData<br />
| 0x1005<br />
|-<br />
| 0x08340082<br />
|?<br />
| EnumerateSharedExtSaveData<br />
| 0x1005<br />
|-<br />
| 0x08350080<br />
|?<br />
| DeleteExtSaveData<br />
| 0x100D, for when the input extdataID doesn't match the exheader extdataID<br />
|-<br />
| 0x08360080<br />
|?<br />
| DeleteSharedExtSaveData<br />
| 0x1005<br />
|-<br />
| 0x08370040<br />
|?<br />
| SetCardSpiBaudRate<br />
| 0x2<br />
|-<br />
| 0x08380040<br />
|?<br />
| SetCardSpiBusMode<br />
| 0x2<br />
|-<br />
| 0x08390000<br />
|?<br />
| SendInitializeInfoTo9<br />
| None<br />
|-<br />
| 0x083A0100<br />
|?<br />
| GetSpecialContentIndex<br />
| 0x1005<br />
|-<br />
| 0x083B00C2<br />
|?<br />
| GetLegacyRomHeader<br />
| 0x1015<br />
|-<br />
| 0x083C00C2<br />
|?<br />
| GetLegacyBannerData<br />
| 0x1015<br />
|-<br />
| 0x083D0100<br />
|?<br />
| CheckAuthorityToAccessExtSaveData<br />
| 0x44<br />
|-<br />
| 0x083E00C2<br />
|?<br />
| QueryTotalQuotaSize<br />
| None<br />
|-<br />
| 0x083F00C0<br />
|?<br />
| GetExtDataBlockSize<br />
| None<br />
|-<br />
| 0x08400040<br />
|?<br />
| AbnegateAccessRight<br />
|?<br />
|-<br />
| 0x08410000<br />
|?<br />
| DeleteSdmcRoot<br />
| 0x1005<br />
|-<br />
| 0x08420040<br />
|?<br />
| DeleteAllExtSaveDataOnNand<br />
| 0x1005<br />
|-<br />
| 0x08430000<br />
|?<br />
| [[FS:InitializeCtrFileSystem|InitializeCtrFileSystem]]<br />
| None<br />
|-<br />
| 0x08440000<br />
|?<br />
| CreateSeed<br />
| 0x2<br />
|-<br />
| 0x084500C2<br />
|?<br />
| GetFormatInfo<br />
|?<br />
|-<br />
| 0x08460102<br />
|?<br />
| GetLegacyRomHeader2<br />
| 0x1015<br />
|-<br />
| 0x08470180<br />
|?<br />
| FormatCtrCardUserSaveData<br />
| 0x6<br />
|-<br />
| 0x08480042<br />
|?<br />
| GetSdmcCtrRootPath<br />
| 0x100D<br />
|-<br />
| 0x08490040<br />
|?<br />
| GetArchiveResource<br />
|?<br />
|-<br />
| 0x084A0002<br />
|?<br />
| ExportIntegrityVerificationSeed<br />
| 0x4000<br />
|-<br />
| 0x084B0002<br />
|?<br />
| ImportIntegrityVerificationSeed<br />
| 0x4000<br />
|-<br />
| 0x084C0242<br />
|?<br />
| FormatSaveData<br />
| 0x6, in some cases this write isn't needed however<br />
|-<br />
| 0x084D0102<br />
|?<br />
| GetLegacySubBannerData<br />
| 0x1015<br />
|-<br />
| 0x084E0342<br />
|?<br />
| [[FS:UpdateSha256Context|UpdateSha256Context]]<br />
| 0x5<br />
|-<br />
| 0x084F0102<br />
|?<br />
| ReadSpecialFile<br />
| None<br />
|-<br />
| 0x08500040<br />
|?<br />
| GetSpecialFileSize<br />
| None<br />
|-<br />
| 0x08510242<br />
| [[3.0.0-5]]<br />
| CreateExtSaveData<br />
| Shared extdata: 0x101005. Regular extdata in certain cases: 0xC<br />
|-<br />
| 0x08520100<br />
| [[3.0.0-5]]<br />
| DeleteExtSaveData (u32 flags, u64 extdataID)<br />
| Shared extdata: 0x101005. Regular extdata in certain cases: 0x10100D<br />
|-<br />
| 0x08530142<br />
| [[3.0.0-5]]<br />
| ReadExtSaveDataIcon<br />
| 0x10100D (this doesn't apply in certain cases, however)<br />
|-<br />
| 0x085400C0<br />
| [[3.0.0-5]]<br />
| GetExtDataBlockSize?<br />
| 0x10100D (this doesn't apply in certain cases, however)<br />
|-<br />
| 0x08550102<br />
| [[3.0.0-5]]<br />
| EnumerateExtSaveData<br />
| 0x101005<br />
|-<br />
| 0x08560200<br />
| [[3.0.0-5]]<br />
| FsCreateSystemSaveData?<br />
| 0x4 (this doesn't apply in certain cases, however)<br />
|-<br />
| 0x08570080<br />
| [[3.0.0-5]]<br />
| DeleteSystemSaveData<br />
| 0x1004 (this doesn't apply in certain cases, however)<br />
|-<br />
| 0x08580000<br />
| [[3.0.0-5]]<br />
| [[FS:GetMovableSedHashedKeyYRandomData|GetMovableSedHashedKeyYRandomData]]<br />
| 0x2004<br />
|-<br />
| 0x08590200<br />
| [[3.0.0-5]]<br />
| SetMovableSedHashedKeyYRandomData?<br />
| 0x2004<br />
|-<br />
| 0x085A00C0<br />
| [[3.0.0-5]]<br />
| SetArchivePriority(u64 ID,u32 priority)<br />
| None<br />
|-<br />
| 0x085B0080<br />
| [[3.0.0-5]]<br />
| GetArchivePriority(u64 ID,u32 *priority)<br />
| None<br />
|-<br />
| 0x085C00C0<br />
| [[3.0.0-5]]<br />
| SetCtrCardLatencyParameter<br />
| 0xE<br />
|-<br />
| 0x085D0180<br />
| [[3.0.0-5]]<br />
|?<br />
| 0x100001<br />
|-<br />
| 0x085E0040<br />
| [[3.0.0-5]]<br />
| ResetCardCompatibilityParameter<br />
| 0xE<br />
|-<br />
| 0x085F0040<br />
| [[3.0.0-5]]<br />
| SwitchCleanupInvalidSaveData<br />
| 0x12004<br />
|-<br />
| 0x08600042<br />
| [[3.0.0-5]]<br />
| EnumerateSystemSaveData<br />
| 0x2004<br />
|-<br />
| 0x08610042<br />
| [[3.0.0-5]]<br />
| InitializeWithSdkVersion<br />
| None<br />
|-<br />
| 0x08620040<br />
| [[3.0.0-5]]<br />
| SetPriority<br />
| None<br />
|-<br />
| 0x08630000<br />
| [[3.0.0-5]]<br />
| GetPriority<br />
| None<br />
|-<br />
| 0x08640000<br />
| [[3.0.0-5]]<br />
| Obsoleted_4_0_GetNandInfo <br />
| Stubbed, this returns an error<br />
|-<br />
| 0x08650140<br />
| [[4.0.0-7]]<br />
| SetSaveDataSecureValue, this is used with [[Anti Savegame Restore]].<br />
| 0x121004 (in certain cases this doesn't apply, however)<br />
|-<br />
| 0x086600C0<br />
| [[4.0.0-7]]<br />
| GetSaveDataSecureValue, this is used with [[Anti Savegame Restore]].<br />
| 0x121004 (in certain cases this doesn't apply, however)<br />
|-<br />
| 0x086700C4<br />
| [[4.0.0-7]]<br />
| ControlSecureSave<br />
| 0x121004<br />
|-<br />
| 0x08680000<br />
| [[4.0.0-7]]<br />
| GetMediaType, This loads the u8 mediatype for the current application from already initialized state, this u8 was originally loaded from the same data used by [[FS:GetProgramLaunchInfo|GetProgramLaunchInfo]]. This then writes the u8 to response-word[2]. This is used with [[Anti Savegame Restore]]<br />
| None<br />
|-<br />
| 0x08690000<br />
| [[4.0.0-7]]<br />
| Obsoleted_4_0_GetNandEraseCount Stubbed, this returns an error.<br />
| None<br />
|-<br />
| 0x086A0082<br />
| [[4.0.0-7]]<br />
| ReadNandReport This is a wrapper for [[Filesystem_services_PXI|FSPXI]] command 0x00550082.<br />
| None<br />
|-<br />
| 0x086B00C2<br />
|?<br />
|?<br />
| 00121004<br />
|-<br />
| 0x086C00C2<br />
|?<br />
|?<br />
| 00121004<br />
|-<br />
| 0x086D0040<br />
|?<br />
|?<br />
| 00020004<br />
|-<br />
| 0x086E00C0<br />
|?<br />
|?<br />
|None?<br />
|-<br />
| 0x086F0040<br />
|?<br />
|?<br />
| 0xE<br />
|-<br />
| 0x087000C2<br />
|?<br />
|?<br />
|None?<br />
|-<br />
| 0x08710100<br />
|?<br />
|?<br />
| 0xC<br />
|-<br />
| 0x087201C0<br />
|?<br />
|?<br />
| 00080004<br />
|-<br />
| 0x087300C0<br />
|?<br />
|?<br />
| 00080004<br />
|-<br />
| 0x08740000<br />
|?<br />
|?<br />
| 00080004<br />
|-<br />
| 0x08750140<br />
|?<br />
|?<br />
|None?<br />
|-<br />
| 0x087600C0<br />
|?<br />
|?<br />
|None?<br />
|-<br />
| 0x08770100<br />
|?<br />
|?<br />
|?<br />
|-<br />
| 0x087800C0<br />
|?<br />
|?<br />
|?<br />
|}<br />
<br />
Note: The question marks from Dummy1 to GetSpecialFileSize on the "available since system version" field are mainly there because I think that most of these are necessary for the main system to function, so theoretically that would mean that since the creation of the 3DS these were available, or since launch if that makes more sense. But because of the peculiar nature of some of the functions, they will remain question marks until they can be confirmed 100%.<br />
<br />
When access rights are required for a command, at least one of the bits in the process access info specified in the above table for the command must be set. Error 0xD9004676 is returned when a process attempts to use a command which it doesn't have access rights for the command. The exheader access info field is all zero's for most applications. Note that the permissions listed in the above table is for system-version v2.x, therefore permission bit(s) added with newer FIRM may be missing from this.<br />
<br />
Each session for fs:USER has separate permissions, initially these are set to all zero's for new fs:USER sessions. The permissions/etc for fs:USER sessions are initialized via [[FS:Initialize]](loaded from the user process exheader).<br />
<br />
=File service=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x000100C6<br />
| Dummy1<br />
|-<br />
| 0x040100C4<br />
| Control<br />
|-<br />
| 0x08010100<br />
| OpenSubFile<br />
|-<br />
| 0x080200C2<br />
| [[FSFile:Read|Read]]<br />
|-<br />
| 0x08030102<br />
| [[FSFile:Write|Write]]<br />
|-<br />
| 0x08040000<br />
| [[FSFile:GetSize|GetSize]]<br />
|-<br />
| 0x08050080<br />
| [[FSFile:SetSize|SetSize]]<br />
|-<br />
| 0x08060000<br />
| GetAttributes<br />
|-<br />
| 0x08070040<br />
| SetAttributes<br />
|-<br />
| 0x08080000<br />
| [[FSFile:Close|Close]]<br />
|-<br />
| 0x08090000<br />
| Flush<br />
|-<br />
| 0x080A0040<br />
| SetPriority<br />
|-<br />
| 0x080B0000<br />
| GetPriority<br />
|-<br />
| 0x080C0000<br />
| OpenLinkFile<br />
|}<br />
<br />
=Directory service=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x000100C6<br />
| Dummy1<br />
|-<br />
| 0x040100C4<br />
| Control<br />
|-<br />
| 0x08010042<br />
| [[FSDir:Read|Read]]<br />
|-<br />
| 0x08020000<br />
| [[FSDir:Close|Close]]<br />
|}<br />
<br />
= Filesystem service "fs:LDR" =<br />
This service is identical to fs:USER, except [[FS:OpenArchive]] archive 0x2345678E can only be accessed with fs:LDR<br />
<br />
= ProgramRegistry service "fs:REG" =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Command Header<br />
! Description<br />
|-<br />
| 0x000100C6<br />
| Dummy1<br />
|-<br />
| 0x040103C0<br />
| Register<br />
|-<br />
| 0x04020040<br />
| Unregister<br />
|-<br />
| 0x040300C0<br />
| GetProgramInfo<br />
|-<br />
| 0x04040100<br />
| LoadProgram<br />
|-<br />
| 0x04050080<br />
| UnloadProgram<br />
|-<br />
| 0x04060080<br />
| CheckHostLoadId<br />
|}<br />
<br />
=Errors=<br />
See [[Filesystem_services_PXI]].</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Exheader&diff=10875
Exheader
2014-11-26T16:08:51Z
<p>Henke37: make the searchbar work on this slang too</p>
<hr />
<div>#REDIRECT [[NCCH/Extended Header]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=FS&diff=10369
FS
2014-10-30T22:10:49Z
<p>Henke37: Redirect for codename</p>
<hr />
<div>#REDIRECT [[Filesystem services]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=PTM:CheckNew3DS&diff=9881
PTM:CheckNew3DS
2014-09-20T11:28:48Z
<p>Henke37: removing stray "value" word</p>
<hr />
<div>=Request=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code [0x040A0000]<br />
|}<br />
<br />
=Response=<br />
{| class="wikitable" border="1"<br />
|-<br />
! Index Word<br />
! Description<br />
|-<br />
| 0<br />
| Header code<br />
|-<br />
| 1<br />
| Result code<br />
|-<br />
| 2<br />
| u8 output: 0 = original hardware, 1 = [[New 3DS]].<br />
|}<br />
<br />
=Description=<br />
Currently PTM module just writes 0 to the output u8. This command was added with [[8.0.0-18]].</div>
Henke37
https://www.3dbrew.org/w/index.php?title=8.0.0-18&diff=9653
8.0.0-18
2014-08-26T17:12:59Z
<p>Henke37: link the actual page title instead</p>
<hr />
<div>The 8.0.0-18 system update was released on July 7, 2014.<br />
<br />
== Change-log ==<br />
[http://en-americas-support.nintendo.com/app/answers/detail/a_id/231 Official] change-log:<br />
<br />
* Further improvements to overall system stability and other minor adjustments have been made to enhance the user experience.<br />
<br />
== System Titles ==<br />
eShop, [[NVer]], [[CVer]], and the [[Nintendo_Zone|NZone]] hotspots list were updated. The "masterkey.bin" [[CVer|file]] in the CVer RomFS was updated(different u32 value at offset 0x0 and different random data). The "cup_list" file was removed from the CVer RomFS as well.<br />
<br />
The 0004009B00012302 USA title(and the equivalent titleIDs for the other regions) was updated. "romfs:/300000.bin" was added, "romfs:/<Region>_<Language>/300000_msbt_LZ.bin" was added for all of the directories in the RomFS too(the msbt files contain messages involving eShop).<br />
<br />
All non-SAFE_MODE system modules were updated. The CTRSDK crt0 code was updated: code was added for using [[SVC|svcGetProcessInfo]] with type=20, the output value is written to a state field. Due to this change, any titles using this additional new code will not work on pre-v8.0 NATIVE_FIRM: this triggers a [[ErrDisp|fatal-error]], when ErrDisp was launched successfully to begin with. The CTRSDK LINEAR-memory vaddr->physaddr conversion code was basically replaced with code which uses the above field, however when the vaddr is within the memory for the [[NS]] SharedFont the conversion code can use either of the mappings(0x14000000/0x30000000).<br />
<br />
Certain modules had the actual module code updated as well, such as [[GSP_Services|GSP]] and [[IR_Services|IR]], and likely others. GSP and CSND modules were updated to support LINEAR addresses in the range 0x30000000-0x40000000.<br />
<br />
Note that unlike past CTRSDK versions(specifically CTRSDK v7.* for system-version v7.x), the CTRSDK version for system-version v8.x is v9.*.<br />
<br />
[[ErrDisp]], eShop mint applet(used for accessing eShop outside of the eShop application, like DLC), and SNOTE_AP were updated, these now use the v7.0 NCCH encryption. None of the other updated titles use the v7.0 NCCH encryption(besides the ones which use it already). Due to [[ErrDisp]] being updated, this likely breaks booting 8.0.0-18 on physical <=v4.x systems where the key-data for the v7.0 NCCH crypto wasn't initialized correctly.<br />
<br />
== [[FIRM]] ==<br />
<br />
NATIVE_FIRM was updated. The ARM9-kernel, [[FIRM|Process9]], the ARM11-kernel, and all of the ARM11 FIRM-modules were updated.<br />
<br />
Process9 had minor / various other changes, including gamecard-related code changes. Support for new exheader/accessdesc fields were [[NCCH/Extended_Header|implemented]]. [[Filesystem_services_PXI|FSPXI:GetSpecialContentIndex]] was updated to add support for a new value(unknown where the field for that originates). Process9 now uses VRAM size 0x600000 instead of 0x400000 for [[FIRM]](during FIRM launch) section address+size verification, and for the memory-clear code for the FIRM-launch panic function.<br />
<br />
The LINEAR memory region has been moved to virtual address 0x30000000, however in certain cases the 0x14000000 mapping is used instead for backwards-compatibility(see [[SVC|here]] and [[Memory_layout|here]]). When the v8.0 NATIVE_FIRM is running, any process which uses the new 0x30000000 LINEAR-memory mapping will not work with <v8.0 system-modules for LINEAR memory(such as GSP/CSND module).<br />
<br />
Most of the ARM11 FIRM-modules changes are likely minor. In pm-module, code was updated which handles programIDs/etc.<br />
<br />
ARM11 kernel changes(besides various other (minor) changes):<br />
* Multiple [[SVC|SVCs]] were stubbed(that is, these only return an error now).<br />
* The code for svcControlMemory was updated.<br />
* The code for svcGetProcessInfo was updated: previously a total of 9 type values were handled, this now handles a total of 24 type values.<br />
* The code for svcStartInterProcessDma was updated. When the DmaConfig userland->kernelmode data-copy fails(like when the DmaConfig address is not readable from userland), this SVC now returns an error. Certain fields in the DmaConfig structure are now validated.<br />
* The end-address for process [[Memory_layout|memory]] has been changed from virtual-address 0x20000000, to 0x40000000. Therefore, the L1 MMU table size for each process is now 0x1000-bytes, previously it was 0x800-bytes.<br />
* The [[KProcess]] structure was changed.<br />
* The privileged-mode memory layout was changed, see [[Memory_layout|here]].<br />
<br />
== See Also ==<br />
* System update [http://yls8.mtheall.com/ninupdates/reports.php?date=07-07-14_10-13-44&sys=ctr report]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=SVC&diff=9012
SVC
2014-05-02T16:01:42Z
<p>Henke37: a little break to mark the debug only half</p>
<hr />
<div>= System calls =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Id<br />
! NATIVE_FIRM ARM11 kernel notes<br />
! Enabled for the TWL_FIRM ARM11 kernel<br />
! Description<br />
|-<br />
| 0x01 <br />
| <br />
| No<br />
| Result ControlMemory(u32* outaddr, u32 addr0, u32 addr1, u32 size, u32 operation, u32 permissions) (outaddr is usually the same as the input addr0)<br />
|-<br />
| 0x02 <br />
| <br />
| No<br />
| Result QueryMemory(MemoryInfo* info, PageInfo* out, u32 Addr)<br />
|-<br />
| 0x03 <br />
| <br />
| No<br />
| void ExitProcess(void)<br />
|-<br />
| 0x04 <br />
| <br />
| No<br />
| Result GetProcessAffinityMask(u8* affinitymask, Handle process, s32 processorcount)<br />
|-<br />
| 0x05 <br />
| <br />
| No<br />
| Result SetProcessAffinityMask(Handle process, u8* affinitymask, s32 processorcount)<br />
|-<br />
| 0x06 <br />
| <br />
| No<br />
| Result GetProcessIdealProcessor(s32 *idealprocessor, Handle process)<br />
|-<br />
| 0x07 <br />
| <br />
| No<br />
| Result SetProcessIdealProcessor(Handle process, s32 idealprocessor)<br />
|-<br />
| 0x08 <br />
| <br />
| Yes<br />
| Result [[#CreateThread|CreateThread]](Handle* thread, func entrypoint, u32 arg, u32 stacktop, s32 threadpriority, s32 processorid)<br />
|-<br />
| 0x09 <br />
| <br />
| Yes<br />
| void ExitThread(void)<br />
|-<br />
| 0x0A <br />
| <br />
| Yes<br />
| void SleepThread(s64 nanoseconds)<br />
|-<br />
| 0x0B <br />
| <br />
| Yes<br />
| Result GetThreadPriority(s32* priority, Handle thread)<br />
|-<br />
| 0x0C <br />
| <br />
| Yes<br />
| Result SetThreadPriority(Handle thread, s32 priority)<br />
|-<br />
| 0x0D <br />
| <br />
| No<br />
| Result GetThreadAffinityMask(u8* affinitymask, Handle thread, s32 processorcount)<br />
|-<br />
| 0x0E <br />
| <br />
| No<br />
| Result SetThreadAffinityMask(Handle thread, u8* affinitymask, s32 processorcount)<br />
|-<br />
| 0x0F <br />
| <br />
| No<br />
| Result GetThreadIdealProcessor(s32* processorid, Handle thread)<br />
|-<br />
| 0x10 <br />
| <br />
| No<br />
| Result SetThreadIdealProcessor(Handle thread, s32 processorid)<br />
|-<br />
| 0x11 <br />
| <br />
| No<br />
| s32 GetCurrentProcessorNumber(void)<br />
|-<br />
| 0x12 <br />
| <br />
| No<br />
| Result Run(Handle process, StartupInfo* info) (This starts the main() thread. Buf+0 is main-thread priority, Buf+4 is main-thread stack-size.)<br />
|-<br />
| 0x13 <br />
| <br />
| Yes<br />
| Result CreateMutex(Handle* mutex, bool initialLocked)<br />
|-<br />
| 0x14 <br />
| <br />
| Yes<br />
| Result ReleaseMutex(Handle mutex)<br />
|-<br />
| 0x15 <br />
| <br />
| Yes<br />
| Result CreateSemaphore(Handle* semaphore, s32 initialCount, s32 maxCount)<br />
|-<br />
| 0x16 <br />
| <br />
| Yes<br />
| Result ReleaseSemaphore(s32* count, Handle semaphore, s32 releaseCount)<br />
|-<br />
| 0x17 <br />
| <br />
| Yes<br />
| Result CreateEvent(Handle* event, ResetType resettype)<br />
|-<br />
| 0x18 <br />
| <br />
| Yes<br />
| Result SignalEvent(Handle event)<br />
|-<br />
| 0x19 <br />
| <br />
| Yes<br />
| Result ClearEvent(Handle event)<br />
|-<br />
| 0x1A <br />
| <br />
| Yes<br />
| Result CreateTimer(Handle* timer, ResetType resettype)<br />
|-<br />
| 0x1B <br />
| <br />
| Yes<br />
| Result SetTimer(Handle timer, s64 initial, s64 interval)<br />
|-<br />
| 0x1C <br />
| <br />
| Yes<br />
| Result CancelTimer(Handle timer)<br />
|-<br />
| 0x1D <br />
| <br />
| Yes<br />
| Result ClearTimer(Handle timer)<br />
|-<br />
| 0x1E <br />
| <br />
| No<br />
| Result CreateMemoryBlock(Handle* memblock, u32 addr, u32 size, u32 mypermission, u32 otherpermission)<br />
|-<br />
| 0x1F <br />
| <br />
| No<br />
| Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission)<br />
|-<br />
| 0x20 <br />
| <br />
| No<br />
| Result UnmapMemoryBlock(Handle memblock, u32 addr)<br />
|-<br />
| 0x21 <br />
| <br />
| Yes<br />
| Result CreateAddressArbiter(Handle* arbiter)<br />
|-<br />
| 0x22 <br />
| <br />
| Yes<br />
| Result ArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 value)<br />
|-<br />
| 0x23 <br />
| <br />
| Yes<br />
| Result CloseHandle(Handle handle)<br />
|-<br />
| 0x24 <br />
| <br />
| Yes<br />
| Result WaitSynchronization1(Handle handle, s64 nanoseconds)<br />
|-<br />
| 0x25 <br />
| <br />
| Yes<br />
| Result WaitSynchronizationN(s32* out, Handle* handles, s32 handlecount, bool waitAll, s64 nanoseconds)<br />
|-<br />
| 0x26 <br />
| <br />
| No<br />
| Result SignalAndWait(s32* out, Handle signal, Handle* handles, s32 handleCount, bool waitAll, s64 nanoseconds)<br />
|-<br />
| 0x27 <br />
| <br />
| Yes<br />
| Result DuplicateHandle(Handle* out, Handle original)<br />
|-<br />
| 0x28 <br />
| <br />
| Yes<br />
| s64 GetSystemTick(void) (This returns the total CPU ticks elapsed since the CPU was powered-on)<br />
|-<br />
| 0x29 <br />
| <br />
| No<br />
| Result GetHandleInfo(s64* out, Handle handle, HandleInfoType type)<br />
|-<br />
| 0x2A <br />
| <br />
| Yes<br />
| Result GetSystemInfo(s64* out, SystemInfoType type, s32 param)<br />
|-<br />
| 0x2B <br />
| <br />
| Yes<br />
| Result GetProcessInfo(s64* out, Handle process, ProcessInfoType type)<br />
|-<br />
| 0x2C <br />
| <br />
| Yes<br />
| Result GetThreadInfo(s64* out, Handle thread, ThreadInfoType type)<br />
|-<br />
| 0x2D <br />
| <br />
| No<br />
| Result ConnectToPort(Handle* out, const char* portName)<br />
|-<br />
| 0x2E <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest1(Handle session)<br />
|-<br />
| 0x2F <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest2(Handle session)<br />
|-<br />
| 0x30 <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest3(Handle session)<br />
|-<br />
| 0x31 <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest4(Handle session)<br />
|-<br />
| 0x32 <br />
| <br />
| No<br />
| Result SendSyncRequest(Handle session)<br />
|-<br />
| 0x33 <br />
| <br />
| No<br />
| Result OpenProcess(Handle* process, u32 processId)<br />
|-<br />
| 0x34 <br />
| <br />
| No<br />
| Result OpenThread(Handle* thread, Handle process, u32 threadId)<br />
|-<br />
| 0x35 <br />
| <br />
| Yes<br />
| Result GetProcessId(u32* processId, Handle process)<br />
|-<br />
| 0x36 <br />
| <br />
| No<br />
| Result GetProcessIdOfThread(u32* processId, Handle thread)<br />
|-<br />
| 0x37 <br />
| <br />
| Yes<br />
| Result GetThreadId(u32* threadId, Handle thread)<br />
|-<br />
| 0x38 <br />
| <br />
| No<br />
| Result GetResourceLimit(Handle* resourceLimit, Handle process)<br />
|-<br />
| 0x39 <br />
| <br />
| No<br />
| Result GetResourceLimitLimitValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)<br />
|-<br />
| 0x3A <br />
| <br />
| No<br />
| Result GetResourceLimitCurrentValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)<br />
|-<br />
| 0x3B <br />
| <br />
| No<br />
| Result GetThreadContext(ThreadContext* context, Handle thread) (Stubbed)<br />
|-<br />
| 0x3C <br />
| <br />
| Yes<br />
| Break(BreakReason)<br />
|- style="border-top: double"<br />
| 0x3D <br />
| <br />
| Yes<br />
| OutputDebugString(void const, int) (Does nothing on non-debug units)<br />
|-<br />
| 0x3E <br />
| <br />
| No<br />
| ControlPerformanceCounter(unsigned long long, int, unsigned int, unsigned long long)<br />
|-<br />
| 0x47 <br />
| <br />
| No<br />
| Result CreatePort(Handle* portServer, Handle* portClient, const char* name, s32 maxSessions)<br />
|-<br />
| 0x48 <br />
| <br />
| No<br />
| Result CreateSessionToPort(Handle* session, Handle port)<br />
|-<br />
| 0x49 <br />
| <br />
| No<br />
| Result CreateSession(Handle* sessionServer, Handle* sessionClient)<br />
|-<br />
| 0x4A <br />
| <br />
| No<br />
| Result AcceptSession(Handle* session, Handle port)<br />
|-<br />
| 0x4B <br />
| <br />
| No<br />
| Result ReplyAndReceive1(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4C <br />
| <br />
| No<br />
| Result ReplyAndReceive2(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4D <br />
| <br />
| No<br />
| Result ReplyAndReceive3(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4E <br />
| <br />
| No<br />
| Result ReplyAndReceive4(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4F <br />
| <br />
| No<br />
| Result ReplyAndReceive(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)<br />
|-<br />
| 0x50 <br />
| <br />
| Yes<br />
| Result BindInterrupt(Interrupt name, Handle syncObject, s32 priority, bool isManualClear)<br />
|-<br />
| 0x51 <br />
| <br />
| Yes<br />
| Result UnbindInterrupt(Interrupt name, Handle syncObject)<br />
|-<br />
| 0x52 <br />
| <br />
| Yes<br />
| Result InvalidateProcessDataCache(Handle process, void* addr, u32 size)<br />
|-<br />
| 0x53 <br />
| <br />
| Yes<br />
| Result StoreProcessDataCache(Handle process, void const* addr, u32 size)<br />
|-<br />
| 0x54 <br />
| <br />
| Yes<br />
| Result FlushProcessDataCache(Handle process, void const* addr, u32 size)<br />
|-<br />
| 0x55 <br />
| <br />
| Yes<br />
| Result StartInterProcessDma(Handle* dma, Handle dstProcess, void* dst, Handle srcProcess, const void* src, u32 size, const DmaConfig& config )<br />
|-<br />
| 0x56 <br />
| <br />
| Yes<br />
| Result StopDma(Handle dma)<br />
|-<br />
| 0x57 <br />
| <br />
| Yes<br />
| Result GetDmaState(DmaState* state, Handle dma)<br />
|-<br />
| 0x58<br />
| <br />
| Yes<br />
| RestartDma(nn::Handle, void *, void const*, unsigned int, signed char)<br />
|-<br />
| 0x60 <br />
| <br />
| No<br />
| Result DebugActiveProcess(Handle* debug, u32 processID)<br />
|-<br />
| 0x61 <br />
| <br />
| No<br />
| Result BreakDebugProcess(Handle debug)<br />
|-<br />
| 0x62 <br />
| <br />
| No<br />
| Result TerminateDebugProcess(Handle debug)<br />
|-<br />
| 0x63 <br />
| <br />
| No<br />
| Result GetProcessDebugEvent(DebugEventInfo* info, Handle debug)<br />
|-<br />
| 0x64 <br />
| <br />
| No<br />
| Result ContinueDebugEvent(Handle debug, u32 flags)<br />
|-<br />
| 0x65 <br />
| <br />
| No<br />
| Result GetProcessList(s32* processCount, u32* processIds, s32 processIdMaxCount)<br />
|-<br />
| 0x66 <br />
| <br />
| No<br />
| Result GetThreadList(s32* threadCount, u32* threadIds, s32 threadIdMaxCount, Handle domain)<br />
|-<br />
| 0x67 <br />
| <br />
| No<br />
| Result GetDebugThreadContext(ThreadContext* context, Handle debug, u32 threadId, u32 controlFlags)<br />
|-<br />
| 0x68 <br />
| <br />
| No<br />
| Result SetDebugThreadContext(Handle debug, u32 threadId, ThreadContext* context, u32 controlFlags)<br />
|-<br />
| 0x69 <br />
| <br />
| No<br />
| Result QueryDebugProcessMemory(MemoryInfo* blockInfo, PageInfo* pageInfo, Handle process, u32 addr)<br />
|-<br />
| 0x6A <br />
| <br />
| No<br />
| Result ReadProcessMemory(void* buffer, Handle debug, u32 addr, u32 size)<br />
|-<br />
| 0x6B <br />
| <br />
| No<br />
| Result WriteProcessMemory(Handle debug, void const* buffer, u32 addr, u32 size)<br />
|-<br />
| 0x6C <br />
| <br />
| No<br />
| Result SetHardwareBreakPoint(s32 registerId, u32 control, u32 value)<br />
|-<br />
| 0x6D<br />
| <br />
| No<br />
| GetDebugThreadParam(long long *, int *, nn::Handle, unsigned int, nn::dmnt::DebugThreadParam) (Disabled on regular kernel)<br />
|-<br />
| 0x70<br />
| <br />
| No<br />
| ControlProcessMemory(Handle KProcess, unsigned int Addr0, unsigned int Addr1, unsigned int Size, unsigned int Type, unsigned int Permissions)<br />
|-<br />
| 0x71<br />
| <br />
| No<br />
| MapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)<br />
|-<br />
| 0x72<br />
| <br />
| No<br />
| UnmapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)<br />
|-<br />
| 0x73<br />
| <br />
| No<br />
| CreateProcess(Handle* HandleInfo_out, struct CreateProcessInfo, u32 code_ptr, u32 ro_ptr, u32 data_ptr)<br />
|-<br />
| 0x74<br />
| Stubbed<br />
| No<br />
| <br />
|-<br />
| 0x75<br />
| <br />
| No<br />
| SetupProcess(Handle* KProcess_out, Handle HandleInfo_in, u32 arm11kernelcaps_ptr, u32 arm11kernelcaps_num)<br />
|-<br />
| 0x76<br />
| <br />
| No<br />
| TerminateProcess(Handle)<br />
|-<br />
| 0x77<br />
| <br />
| No<br />
| (Handle KProcess, Handle KResourceLimit)<br />
|-<br />
| 0x78<br />
| <br />
| No<br />
| CreateResourceLimit(Handle *KResourceLimit)<br />
|-<br />
| 0x79<br />
| <br />
| No<br />
| ?<br />
|-<br />
| 0x7A<br />
| Stubbed beginning with [[2.0.0-2]]<br />
| Yes<br />
| ? (unsigned int Addr, unsigned int Size)<br />
|-<br />
| 0x7C<br />
| <br />
| Yes<br />
| KernelSetState(unsigned int Type, unsigned int Param0, unsigned int Param1, unsigned int Param2) (The Type determines the usage of each param)<br />
|-<br />
| 0x7D<br />
| <br />
| No<br />
| QueryProcessMemory(MemInfo *Info, unsigned int *Out, Handle KProcess, unsigned int Addr)<br />
|-<br />
| 0xFF<br />
| <br />
| Yes<br />
| Debug related (The Syscall access control mask doesn't apply for this SVC)<br />
|}<br />
<br />
== CreateThread ==<br />
R0=s32 threadpriority<br />
R1=func entrypoint<br />
R2=u32 arg<br />
R3=u32 stacktop<br />
R4=s32 processorid<br />
<br />
Result result=R0<br />
Handle* thread=R1<br />
<br />
This processorid is a bitmask for which processors the thread can be run on. Bit value zero enables thread execution for this CPUID, bit value one disables thread execution for this CPUID. Bit0-bit1 are for CPUID0-CPUID1.<br />
<br />
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.<br />
<br />
= Types and structures =<br />
<br />
== enum MemoryState ==<br />
{| class="wikitable" border="1"<br />
! Memory state flags<br />
! Bit<br />
|-<br />
| FREE<br />
| 0<br />
|-<br />
| RESERVED<br />
| 1<br />
|-<br />
| IO<br />
| 2<br />
|-<br />
| STATIC<br />
| 3<br />
|-<br />
| CODE<br />
| 4<br />
|-<br />
| PRIVATE<br />
| 5<br />
|-<br />
| SHARED<br />
| 6<br />
|-<br />
| CONTINUOUS<br />
| 7<br />
|-<br />
| ALIASED<br />
| 8<br />
|-<br />
| ALIAS<br />
| 9<br />
|-<br />
| ALIAS CODE<br />
| 10<br />
|-<br />
| LOCKED<br />
| 11<br />
|}<br />
<br />
== enum PageFlags ==<br />
{| class="wikitable" border="1"<br />
! Page flags<br />
! Bit<br />
|-<br />
| LOCKED<br />
| 0<br />
|-<br />
| CHANGED<br />
| 1<br />
|}<br />
<br />
== enum MemoryOperation ==<br />
<br />
{| class="wikitable" border="1"<br />
! Memory operation<br />
! Id<br />
|-<br />
| FREE<br />
| 1<br />
|-<br />
| RESERVE<br />
| 2<br />
|-<br />
| COMMIT<br />
| 3<br />
|-<br />
| MAP<br />
| 4<br />
|-<br />
| UNMAP<br />
| 5<br />
|-<br />
| PROTECT<br />
| 6<br />
|-<br />
| REGION APP<br />
| 0x100<br />
|-<br />
| REGION SYSTEM<br />
| 0x200<br />
|-<br />
| REGION BASE<br />
| 0x300<br />
|-<br />
| LINEAR<br />
| 0x10000<br />
|}<br />
<br />
The LINEAR memory-operation indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA(such as the [[GPU]]). Addr0+size for this must be within the 0x14000000-0x1C000000 range when Addr0 is non-zero(Addr1 must be zero), Addr0 isn't actually used by svcControlMemory for mapping memory since the kernel determines what vaddr to map. LINEAR memory is allocated in FCRAM the same way as any other virtual memory(like the regular process heap, etc).<br />
<br />
The input mem-region value for svcControlMemory is only used(when non-zero) when the PID is value 1, for the [[FIRM]] ARM11 "loader" module.<br />
<br />
== enum MemoryPermission ==<br />
<br />
{| class="wikitable" border="1"<br />
! Memory permission<br />
! Id<br />
|-<br />
| NONE<br />
| 0<br />
|-<br />
| READ<br />
| 1<br />
|-<br />
| WRITE<br />
| 2<br />
|-<br />
| READWRITE<br />
| 3<br />
|-<br />
| DONTCARE<br />
| 0x10000000<br />
|}<br />
<br />
<br />
== enum ResetType ==<br />
<br />
{| class="wikitable" border="1"<br />
! Reset type<br />
! Id<br />
|-<br />
| ONESHOT<br />
| 0<br />
|-<br />
| STICKY<br />
| 1<br />
|-<br />
| PULSE<br />
| 2<br />
|}<br />
<br />
== struct MemoryInfo ==<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| u32<br />
| Base address<br />
|-<br />
| u32<br />
| Size<br />
|-<br />
| u32<br />
| Permission<br />
|-<br />
| enum MemoryState<br />
| State<br />
|}<br />
<br />
== struct PageInfo ==<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| u32<br />
| Flags<br />
|}<br />
<br />
== struct StartupInfo ==<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| s32<br />
| Priority<br />
|-<br />
| u32<br />
| Stack size<br />
|-<br />
| s32<br />
| argc<br />
|-<br />
| s16*<br />
| argv<br />
|-<br />
| s16*<br />
| envp<br />
|}<br />
<br />
<br />
<br />
= Processes =<br />
Each process can only use SVCs which are enabled in the [[NCCH#CXI|exheader]] for this process. The ARM11 kernel SVC handler checks whether the SVC is enabled in the syscall access control mask stored on the SVC-mode stack, when the SVC isn't enabled a kernelpanic() is triggered. Each process has a separate SVC-mode stack, this stack and the syscall access mask stored here is initialized when the process is started. Applications normally only have access to SVCs <=0x3D, however not all SVCs <=0x3D are accessible to the application. The majority of the SVCs accessible to applications are unused by the application.<br />
<br />
Each process has a separate handle-table, the size of this table is stored in the exheader. The handles in a handle-table can't be used in the context of other processes, since those handles don't exist in other handle-tables.<br />
<br />
0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for the current KThread.<br />
<br />
Calling svcBreak on retail will only terminate the process which called this SVC.<br />
<br />
= Threads =<br />
For svcCreateThread the input address used for Entrypoint_Param and StackTop are normally the same, however these can be arbitrary. For the main thread the Entrypoint_Param is value 0.<br />
<br />
Using CloseHandle() with a KThread handle will terminate the specified thread.<br />
<br />
= Memory Mapping =<br />
ControlMemory and MapMemoryBlock can be used to map memory pages, these two SVCs only support mapping execute-never R/W pages. The input permissions parameter for these SVCs must be <=3, where value zero is used when un-mapping memory. Bitmask 0xf00 for ControlMemory parameter MemoryType is the memory-type, when this is zero the memory-type is loaded from the kernel flags stored in the exheader ARM11 kernel descriptors, for the process using the SVC. ControlMemory parameter MemoryType with value 0x10003 is used for mapping the GSP [[Memory_layout|heap]]. The low 8-bits are the type: 1 is for un-mapping memory, 3 for mapping memory. Type4 is used to mirror the RW memory at Addr1, to Addr0. Type4 will return an error if Addr1 is located in read-only memory. Addr1 is not used for type1 and type3.<br />
<br />
The ARM11 kernel does not allow processes to create shared memory blocks via svcCreateMemoryBlock, when the process memorytype(from the kernel flags stored in the exheader kernel descriptor) is the application memorytype, and when addr=0. It's unknown how the kernel handles addr=0 when the memorytype is not the application memorytype. When addr is non-zero, it must be located in memory which is already mapped.<br />
<br />
ControlProcessMemory maps memory in the specified process, this is the only SVC which allows mapping executable memory. Format of the permissions field for memory mapping SVCs: bit0=R, bit1=W, bit2=X. Type6 sets the Addr0 memory permissions to the input permissions, for already mapped memory. Type is the MemoryOperation enum, without the memory-type/memory-region. ControlProcessMemory only supports type4, type5, and type6. ControlProcessMemory does not support using the current KProcess handle alias.<br />
<br />
MapProcessMemory maps RW memory starting at address 0x00100000 in the specified KProcess, at the specified StartAddr in the current process. MapProcessMemory then maps 0x08000000 in the specified process, to StartAddr+0x7f00000 in the current process. UnmapProcessMemory unmaps the memory which was mapped by MapProcessMemory.<br />
<br />
= Debugging =<br />
DebugActiveProcess is used to attach to a process for debugging. This SVC can only be used when the target process' ARM11 descriptors stored in the exheader have the kernel flag for "Enable debug" set. Otherwise when that flag is clear, the kernel flags for the process using this SVC must have the "Force debug" flag set.<br />
<br />
= KernelSetState =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Type<br />
! Enabled for the NATIVE_FIRM ARM11 kernel<br />
! Enabled for the TWL_FIRM ARM11 kernel<br />
! Description<br />
|-<br />
| 0<br />
| Yes<br />
| No<br />
| This initializes the programID for launching [[FIRM]], then triggers launching [[FIRM]]. Param0 and Param2 are unused. Param1 is the programID-low, and the programID-high is 0x00040138.<br />
|-<br />
| 1<br />
| Yes<br />
| Yes<br />
| Unknown, does nothing with the TWL_FIRM ARM11 kernel.<br />
|-<br />
| 2<br />
| Yes<br />
| Yes<br />
| ?<br />
|-<br />
| 3<br />
| Yes<br />
| No<br />
| This used for initializing the 0x1000-byte buffer used by the launched [[FIRM]]. Param2 is unused. When Param0 is value 1, this buffer is copied to the beginning of FCRAM at 0xF0000000, and Param1 is unused. When Param0 is value 0, this kernel buffer is mapped to process address Param1.<br />
|-<br />
| 4<br />
| No<br />
| Yes<br />
| Param0-Param3 are unused. This unmaps(?) the following virtual memory by writing value physaddr(where physaddr base is 0x80000000) to the L1 MMU table entries: 0x00300000..0x04300000, 0x08000000..0x0FE00000, and 0x10000000..0xF8000000.<br />
|-<br />
| 5<br />
| Yes<br />
| Yes<br />
| ?<br />
|-<br />
| 6<br />
| Yes<br />
| No<br />
| Debug related?<br />
|-<br />
| 7<br />
| Yes<br />
| No<br />
| This triggers ARM11 kernel [[I2C]] code, Param0-Param3 are unused. This ARM11 kernel I2C code will never return. Device address 0x4a via the second I2C bus is used here. This triggers a hardware system reboot via poking an I2C MCU register: register address 0x20 is written to with value 4.<br />
|-<br />
| 8<br />
| Yes<br />
| No<br />
| Alternate unused FIRM launch code-path, with different [[PXI]] FIFO word constants.<br />
|-<br />
| 9<br />
| Yes, implemented at some point after system-version v4.5.<br />
| ?<br />
| Unknown<br />
|}<br />
<br />
= GetSystemInfo =<br />
{| class="wikitable" border="1"<br />
! SystemInfoType value<br />
! s32 param<br />
! Description<br />
|-<br />
| 0<br />
| 0<br />
| This writes the total used memory size in the following memory regions to out: APPLICATION, SYSTEM, and BASE.<br />
|-<br />
| 0<br />
| 1<br />
| This writes the total used memory size in the APPLICATION memory region to out.<br />
|-<br />
| 0<br />
| 2<br />
| This writes the total used memory size in the SYSTEM memory region to out.<br />
|-<br />
| 0<br />
| 3<br />
| This writes the total used memory size in the BASE memory region to out.<br />
|-<br />
| 26<br />
| Unused<br />
| This writes the total number of processes which were directly launched by the kernel, to out. For the NATIVE_FIRM/SAFE_MODE_FIRM ARM11 kernel, this is normally 5, for processes sm, fs, pm, loader, and pxi.<br />
|}<br />
<br />
= CreateProcess =<br />
struct CreateProcessInfo {<br />
// All addresses are given virtual for the process to be created.<br />
// All sizes/offsets are in given in 0x1000-pages.<br />
u8 codeset_name[8];<br />
u32 text_addr;<br />
u32 text_size;<br />
u32 ro_addr;<br />
u32 ro_size;<br />
u32 data_addr;<br />
u32 data_size;<br />
u32 ro_offset;<br />
u32 data_offset;<br />
u32 bss_size+data_size;<br />
u8 program_id[8];<br />
u32 hmm?[2];<br />
}<br />
<br />
= Kernel error-codes =<br />
{| class="wikitable" border="1"<br />
! Error-code value<br />
! Description<br />
|-<br />
| 0xC860180A<br />
| Not enough free memory available for memory allocation.<br />
|-<br />
| 0xC920181A<br />
| The session was closed due to the other process terminating / calling svcBreak.<br />
|-<br />
| 0xD8E007F7<br />
| This error indicates that the input handle used with the SVC does not exist in the process handle-table, or that the handle kernel object type does not match the type used by the SVC.<br />
|-<br />
| 0xD92007EA<br />
| This error is returned when a process attempts to use svcCreateMemoryBlock when the process memorytype is the application memorytype, and when addr=0.<br />
|-<br />
| 0xF8C007F4<br />
| Invalid type/param0-param3 input for svcKernelSetState.<br />
|}</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Extdata&diff=8945
Extdata
2014-04-22T20:51:15Z
<p>Henke37: Two more games.</p>
<hr />
<div>This page describes the format and encryption of extdata, "extra data" stored on [[SD_Filesystem|SD card]] and [[Flash_Filesystem|NAND]].<br />
At:<br />
* nand/data/<ID>/extdata/<ExtdataID-High><br />
* sdmc/Nintendo 3DS/<ID0>/<ID1>/extdata/<ExtdataID-High> <br />
<br />
(ExtdataID-High is always 00000000 for SD, and always 00048000 for NAND) Some titles can have Quota.dat stored in these directories. The directory-name for these directories is the ExtdataID-Low. Then there's a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.<br />
NAND stores the shared extdata and is structured exactly the same way, see [[Flash Filesystem]].<br />
<br />
Extdata image 00000001 contains a VSXE partition for the FST, the actual file data is stored in the subsequent extdata images.<br />
<br />
Regular apps can only mount SD extdata using the same extdataID which is stored in the [[NCCH#CXI|CXI]] exheader. Therefore, regular apps which have the exheader extdataID set to zero can't use extdata. This restriction doesn't apply for shared extdata with extdataID high bitmask 0x48000 stored on NAND. System apps with a certain access right can mount arbitrary extdata.<br />
All NAND extdata is shared extdata, while all SD extdata is normal extdata. Thus, normal extdata doesn't exist on NAND, and shared extdata doesn't exist on SD. The extdataID high excluding that bitmask is always zero for shared extdata.<br />
<br />
=== Encryption ===<br />
<br />
These files are [[AES|encrypted]] with AES-CTR, the keyslot is initialized by [[nand/private/movable.sed|movable.sed]]. The same keyslot is used for the NAND/SD extdata MAC. The NAND extdata images are stored in cleartext. The WCHAR LowPath "/extdata/<ExtdataIDHigh>/<ExtdataIDLow>/<PathToImage>" text path is hashed with SHA-256, including the WCHAR null-terminator. A separate hash is used for Quota.dat. The base CTR seems to be then generated by XORing the calculated hash: CTRword[i] = Hashword[i] ^ Hashword[4+i].<br />
<br />
The base CTR is fixed therefore the CTR never changes after each write. Thus it is possible to obtain some cleartext by XORing one file(like newly created extdata) with a newer file, where the newer file overwrote zeros in the original file with non-zero data.<br />
<br />
=== Format ===<br />
<br />
Extdata uses dual 'partitions' of IVFC hash trees to store data. The order of data in Extdata is as follows:<br />
<br />
* AES MAC<br />
* DIFF Header<br />
* Secondary DIFI Partition descriptor<br />
* Primary DIFI Partition descriptor<br />
* Secondary Partition IVFC Hash Tree<br />
* Primary Partition IVFC Hash Tree<br />
* DATA Partition (If applicable)<br />
<br />
Only one Partition is active at a given time, this is determined by the DIFF header. Normally the 'data' contained in extdata is stored at level4 of the IVFC hash tree, and hence there are two versions of the 'data' stored in the Extdata image (although only one is 'active'). However if DIFI flags[0] is set, this indicates it is a DATA partition and the 'data' is stored outside the IVFC hash tree, at a relative offset defined by the DIFI partition (in this case there will be only one version of the 'data' stored in the Extdata image).<br />
<br />
==== Chain Of Trust ====<br />
<br />
The chain of trust in extdata is as follows:<br />
<br />
* MAC verifies DIFF Header<br />
* DIFF Selects and verifies via Active DIFI partition descriptor<br />
* Active DIFI partition descriptor points to the location of active IVFC tree (and data if applicable), and provides the hash blob to verify Level 1 of the IVFC hash tree<br />
* Each IVFC level verifies the next level, until Level 4(data).<br />
<br />
=== Filesystem ===<br />
<br />
Title extdata contains a series of extdata images which comprise an independent file system. The first image (00000001) contains the VSXE (FST) partition, and subsequent images each containing a single file. Other extdata images, such as Quota.dat and [[Title Database|database extdata]], exist independent of a FS.<br />
<br />
==== VSXE ====<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Database Magic ("VSXE")<br />
|-<br />
| 0x4<br />
| 4<br />
| Magic Number (0x30000)<br />
|-<br />
| 0x8<br />
| 8<br />
| Data Table Offset<br />
|-<br />
| 0x10<br />
| 8<br />
| File Size, divided by the value at 0x18<br />
|-<br />
| 0x18<br />
| 8<br />
| Usually 0x1000<br />
|-<br />
| 0x20<br />
| 8<br />
| Unknown<br />
|-<br />
| 0x28<br />
| 4<br />
| 'Action' made on most recently mounted Extdata image<br />
|-<br />
| 0x2C<br />
| 4<br />
| Unknown<br />
|-<br />
| 0x30<br />
| 4<br />
| ID of most recently mounted Extdata image<br />
|-<br />
| 0x34<br />
| 4<br />
| Unknown<br />
|-<br />
| 0x38<br />
| 0x100<br />
| Mount path, from most recently mounted Extdata image<br />
|}<br />
<br />
Data Table:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x38<br />
| Unknown<br />
|-<br />
| 0x38<br />
| 8<br />
| Folder Table Offset<br />
|}<br />
<br />
===== Folder Table =====<br />
<br />
Header:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Equivalent to the Used Folder Entries + 1<br />
|-<br />
| 0x4<br />
| 4<br />
| Equivalent to the Maximum Folder Entries + 1<br />
|-<br />
| 0x8<br />
| 0x20<br />
| Unused<br />
|}<br />
<br />
Folder Entry:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Parent Folder Index<br />
|-<br />
| 0x4<br />
| 0x10<br />
| Folder Name (ASCII)<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Previous Folder's Index<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Last Folder Index Entry<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Last File Index Entry<br />
|-<br />
| 0x20<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Unknown<br />
|}<br />
* The folder id/index for the current entry is related to it's position in the Folder table. The folder table is accessed like an array of 0x28 byte chunks, with the header consuming index = 0, root directory at index = 1, and the subsequent folder entries following.<br />
<br />
===== File Table =====<br />
<br />
The location of the File table is calculated by aligning the end offset of the folder table to 0x1000 bytes.<br />
<br />
Header:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Equivalent to the Used File Entries + 1<br />
|-<br />
| 0x4<br />
| 4<br />
| Equivalent to the Maximum File Entries + 1<br />
|-<br />
| 0x8<br />
| 0x28<br />
| Unused<br />
|}<br />
<br />
Folder Entry:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Parent Folder Index<br />
|-<br />
| 0x4<br />
| 0x10<br />
| File Name (ASCII)<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Previous File's Index<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x20<br />
| 0x8<br />
| Unique Extdata ID<br />
|-<br />
| 0x28<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Unknown<br />
|}<br />
* The file id/index for the current entry is related to it's position in the File Table, much like the folder entries in the Folder Table. The file table is accessed like an array of 0x30 byte chunks, with the header consuming index = 0, and the subsequent file entries following. The relationship between the index value of the file entry, and the actual file name of the extdata image that contains it it = index+1. For instance icon (the only file in every extdata), comes right after the header, with an index value of '1', and the icon is stored in extdata image '00000002'.<br />
<br />
* The Unique Extdata ID, is the same value found in the DIFF header of the referenced extdata image for that file. The value changes most times the file in question is modified. When mounting an extdata image in the VSXE filesystem, if the file's extdata image doesn't have the expected Unique Extdata ID, it won't be mounted.<br />
<br />
==== VSXE Filesystem structure ====<br />
<br />
When extdata is created, these are *always* created regardless of whether the title actually uses them.<br />
<br />
* /icon This file contains the extdata [[SMDH|icon]] displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. This file can't be read directly, instead it is read via [[FS:ReadExtSaveDataIcon]].<br />
* /user/ Contains the title's actual extdata files.<br />
* /boss/ Can contain [[SpotPass]] content. SpotPass content can only be downloaded to this /boss directory.<br />
<br />
User extdata and SpotPass extdata use separate [[FS:OpenArchive|mount]] points at /user and /boss. Therefore one mount can't access the other directory, and also can't access /icon.(The title's SpotPass extdata can be mounted by the title itself, if it uses SpotPass)<br />
<br />
<br />
Other optional but notable directories include:<br />
* /user/ExBanner This directory can optionally store [[Extended_Banner| extended banners]]. When this is available, this banner is displayed instead of the [[CXI]] ExeFS banner. COMMON.bin stores the common exbanner, while <regionlang_code>.bin stores an optional separate region/language specific banner.(regionlang_code can be "JPN_JP", "USA_EN", etc)<br />
<br />
=== Extdata without an independent FS ===<br />
<br />
==== Quota.dat ====<br />
<br />
* This is contained in the Quota.dat extdata image.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Magic ("QUOT")<br />
|-<br />
| 0x4<br />
| 4<br />
| Magic Number (0x30000)<br />
|-<br />
| 0x8<br />
| 8<br />
| Unknown<br />
|-<br />
| 0x10<br />
| 0x38<br />
| Unknown<br />
|}<br />
It's unknown what this is used for.<br />
<br />
==== Database Extdata ====<br />
<br />
See [[Title Database|here]].<br />
<br />
=== SD Extdata ===<br />
Usually the ExtdataID low is in the format '00<Unique ID>'<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! JPN ExtdataID<br />
! USA ExtdataID<br />
! EUR ExtdataID<br />
! Description<br />
! Extdata images<br />
|-<br />
| 00000082<br />
| 0000008f<br />
| 00000098<br />
| [[Home Menu]] extdata, this contains home-menu savedata and cached icons for applications.<br />
| <br />
|-<br />
| 00000200<br />
| 00000210<br />
| 00000220<br />
| [[System_Settings|System Settings]] extdata added with [[2.0.0-2]].<br />
| <br />
|-<br />
| 00000207<br />
| 00000217<br />
| 00000227<br />
| [[Mii Maker]], contains an ExBanner<br />
| [https://dl.dropbox.com/u/20520664/extdata00000217.zip cleartext]<br />
|-<br />
| 00000208<br />
| 00000218<br />
| 00000228<br />
| Streetpass Mii Plaza<br />
| 11 mb big!<br />
|-<br />
| 00000209<br />
| 00000219<br />
| 00000229<br />
| [[eShop]]<br />
| <br />
|-<br />
| 0000020d<br />
| 0000021d<br />
| 0000022d<br />
| Face Raiders, likely contains an ExBanner<br />
| <br />
|-<br />
| 0000020b<br />
| 0000021b<br />
| 0000022b<br />
| Nintendo Zone<br />
| <br />
|-<br />
| ?<br />
| 000004aa<br />
| 000004ab<br />
| Nintendo Video Extra Data<br />
This is where the video files are stored, and [[Nintendo_Video|includes]] the thumbnail, the description, and possibly some checksum info in each video file stored in the extdata images. There are always 9 files within the subdirectory "00000000" of this folder, even without any videos downloaded. The files are "00000001" - "00000009", and "00000003" - "00000008" have the same filesize of 50.7 MB. It is possible to restore the older videos by overwriting all the files within this directory. Provided of course you have made a backup of the files before hand, by copying all the files within this directory to your computer. As far I'm aware its not possible to mix and match the files in order to get certain videos in one grouping, ie. having all 3 Zelda orchestral recordings in one group of 4 Nintendo videos.<br />
| <br />
|-<br />
|00000306<br />
|00000308<br />
|00000307<br />
|Mario Kart 7<br />
|<br />
|-<br />
| 0000030b<br />
| 0000030d<br />
| 0000030c<br />
| Nintendogs + Cats<br />
| <br />
|-<br />
| 00000326<br />
| 00000326<br />
| 00000326<br />
| Pokédex 3D<br />
| <br />
|-<br />
| 00000305<br />
| 0000032d<br />
| 0000033c<br />
| Super Street Fighter IV 3D<br />
| <br />
|-<br />
| 00000328<br />
| 00000358<br />
| 0000033b<br />
| Ridge Racer 3D<br />
| <br />
|-<br />
| ?<br />
| 0000034d<br />
| 00000402<br />
| Samurai Warriors Chronicles<br />
| <br />
|-<br />
| ?<br />
| 0000034f<br />
| 0000038a<br />
| Dead or Alive Dimensions<br />
| <br />
|-<br />
| 00000481<br />
| N/A<br />
| N/A<br />
| Monster Hunter Tri G (Download-Quests)<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000a86<br />
| Professor Layton and the Miracle Mask<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000c24<br />
| Denpa men<br />
| <br />
|-<br />
| 00000c73<br />
| 00000c73<br />
| 00000c73<br />
| Save Data Transfer Tool<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000d9a<br />
| Donkey Kong Country Returns 3d Trailer<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000f1e<br />
| Professor Layton and the Azran legacy<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00001005<br />
| Professor Layton vs Phoenix Wright: Ace Attorney<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000ea6<br />
| Etrian Odyssey IV<br />
| <br />
|}<br />
<br />
=== NAND Shared Extdata ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! ExtdataID<br />
! Description<br />
|-<br />
| 0xe0000000<br />
| Home Menu attempts to open this archive during boot, if [[FS:OpenArchive]] doesn't return an error Home Menu seems to then launch the [[System Transfer]] application. Home Menu doesn't actually use this archive at all except for checking whether it exists.<br />
|-<br />
| 0xf0000001<br />
| NAND JPEG/MPO files and phtcache.bin from the camera application are stored here. This also contains UploadData.dat.<br />
|-<br />
| 0xf0000002<br />
| NAND M4A files from the sound application are stored here<br />
|-<br />
| 0xf0000009<br />
| ?<br />
|-<br />
| 0xf000000b<br />
| Contains idb.dat, idbt.dat, gamecoin.dat, ubll.lst, CFL_DB.dat, and CFL_OldDB.dat. These files contain cleartext [[Mii_Maker|Miis]] and some data relating (including cached ICN data) to Play/Usage Records.<br />
|-<br />
| 0xf000000c<br />
| Contains bashotorya.dat and bashotorya2.dat.<br />
|-<br />
| 0xf000000d<br />
| ?<br />
|}<br />
<br />
==== Shared Extdata 0xf000000b gamecoin.dat ====<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Magic number: 0x4F00<br />
|-<br />
| 0x4<br />
| 0x2<br />
| Total Play Coins<br />
|-<br />
| 0x6<br />
| 0x2<br />
| Total Play Coins obtained on the date stored below. When the below date does not match the current date, this field is reset to zero, then the date(and other fields) are updated. Once this value is >=10, no more Play Coins can be obtained until the current date changes.<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Total step [[PTM:GetTotalStepCount|count]] at the time a new Play Coin was obtained.<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Step count for the day the last Play Coin was obtained, for that day's step count(same as the step count displayed by home-menu when this file was updated).<br />
|-<br />
| 0x10<br />
| 0x2<br />
| Year<br />
|-<br />
| 0x12<br />
| 0x1<br />
| Month<br />
|-<br />
| 0x13<br />
| 0x1<br />
| Day<br />
|}<br />
<br />
The above date stores the last time new Play Coin(s) were obtained. The contents of this file is updated by home-menu. [[PTM:GetTotalStepCount]] is not checked constantly, after home-menu boot this is only checked when waking from sleep-mode. Each time home-menu updates the contents of this file, home-menu will set the Play Coin total to 300 if it's higher than the 300 Play Coin limit.<br />
<br />
=== Tools ===<br />
<br />
* [https://github.com/ps3hen/ctr_toolkit/tree/master/extdata_tool extdata_tool] - Extract/verifies standalone extdata images and title extdata FS.</div>
Henke37
https://www.3dbrew.org/w/index.php?title=AR_Games&diff=8944
AR Games
2014-04-22T20:19:00Z
<p>Henke37: Another stock app.</p>
<hr />
<div>AR Games is one of the stock applications on retail units.<br />
<br />
It is a series of games that is based on using the AR cards that are bundled with all retail units.<br />
<br />
{{stub}}<br />
<br />
[[Category:Nintendo Software]]<br />
[[Category:Playcoin Software]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Activity_Log&diff=8943
Activity Log
2014-04-22T19:58:11Z
<p>Henke37: Another stock application.</p>
<hr />
<div>The activity log is a stock application that comes with retail units. The application allows you to review various statistics about the step counter and your gaming habits.<br />
<br />
The opening screen shows the total number of steps recorded as well as the total number of titles used.<br />
<br />
The application is split into two sections, the daily records and the software library.<br />
<br />
__TOC__<br />
<br />
== Daily Records ==<br />
<br />
The daily records have two submodes, graph view and list view. <br />
<br />
===Graph view===<br />
The daily records shows on a per hour basis how many steps you took and how much you played. You can group the data into larger time units, but the underlaying data is tracked per hour.<br />
<br />
You can also see the most popular title for the given time period.<br />
<br />
=== List view ===<br />
The list view is mainly about play times. It lists each title that you have played during the time period and how long in total.<br />
<br />
== Software Library ==<br />
The software library tracks all the applications that you have used on the system. It has an upper limit of 112 applications.<br />
<br />
The list shows the total time you have used an application, the number of times that you have launched it, when it was first launched and when it was last launched. It also calculates the mean usage time.<br />
<br />
=== Charts ===<br />
The charts submode allows you to sort the data using any of the previously mentioned statistics.<br />
<br />
[[Category:Nintendo Software]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Category:Stubs&diff=8942
Category:Stubs
2014-04-22T19:39:12Z
<p>Henke37: Created page with "Stubs are articles that have barely been started."</p>
<hr />
<div>Stubs are articles that have barely been started.</div>
Henke37
https://www.3dbrew.org/w/index.php?title=CIA&diff=8437
CIA
2014-01-21T13:40:12Z
<p>Henke37: better flow without the comma</p>
<hr />
<div>[[Category:File formats]]<br />
== Overview ==<br />
CIA stands for '''C'''TR '''I'''mportable '''A'''rchive. This format allows the installation titles to the 3DS. CIA files and titles on [[Title list|Nintendo's CDN]] contain identical data. As a consequence, valid CIA files can be generated from CDN content. This also means CIA files can contain anything that titles on Nintendo's CDN can contain. <br />
<br />
Under normal circumstances CIA files are used where downloading a title is impractical or not possible. Such as distributing a [[Download Play]] child, or installing forced Gamecard updates. Those CIA(s) are stored by the titles in question, in an auxiliary [[NCCH#CFA|CFA]] file.<br />
<br />
Development Units, are capable of manually installing CIA files via the [[3DS Development Unit Software#Dev Menu|Dev Menu]].<br />
<br />
A sample (developer) CIA can be downloaded [https://dl.dropbox.com/u/60710927/CTR/Sample/CIA.7z here] Credit: [[User:Jl12|Jl12]]. It includes a .cia file, with everything is decrypted/extracted. It also includes some screenshots, as well as a copy of the directory where the title was installed.<br />
<br />
== Format ==<br />
<br />
This is the current version of the CIA format, it was finalised in late 2010. (Older versions of the CIA format can be viewed on the [[Talk:CIA|Talk]] page)<br />
<br />
The CIA format has a similar structure to the [http://wiibrew.org/wiki/Wad WAD format].<br />
<br />
The file is represented in little-endian.<br />
<br />
The data is aligned in 64 byte blocks (if a content ends at the middle of the block, the next content will begin from a new block).<br />
<br />
=== CIA Header ===<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! START<br />
! SIZE<br />
! DESCRIPTION<br />
|-<br />
| 0x00<br />
| 0x04 <br />
| Archive Header Size (Usually = 0x2020 bytes)<br />
|-<br />
| 0x04<br />
| 0x02<br />
| Type<br />
|-<br />
| 0x06<br />
| 0x02<br />
| Version<br />
|- <br />
| 0x08 <br />
| 0x04<br />
| Certificate chain size <br />
|-<br />
| 0x0C <br />
| 0x04<br />
| [[Ticket]] size<br />
|-<br />
| 0x10 <br />
| 0x04<br />
| [[TMD]] file size<br />
|-<br />
| 0x14 <br />
| 0x04<br />
| Meta size (0 if no Meta data is present)<br />
|-<br />
| 0x18 <br />
| 0x08<br />
| Content size<br />
|-<br />
| 0x20<br />
| 0x2000<br />
| Content Index<br />
|}<br />
<br />
The order of the sections in the CIA file:<br />
* certificate chain<br />
* Ticket<br />
* TMD file data<br />
* APP file data<br />
* Meta file data (Not a necessary component) <br />
<br />
The APP data (NCCH/SRL) is encrypted, using 128-bit AES-CBC. The encryption uses the decrypted titlekey of the ticket, and the titleid padded with zeros as the IV. To get the decrypted titlekey, the titlekey stored in the ticket must be decrypted using 128-bit AES-CBC with the 3DS common key, and the same IV as mentioned previously.<br />
<br />
=== Certificate Chain ===<br />
<br />
There are three [[Certificates|certificates]] in this chain:<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! CERTIFICATE<br />
! SIGNATURE TYPE<br />
! RETAIL CERT NAME<br />
! DEBUG CERT NAME<br />
! DESCRIPTION<br />
|-<br />
| CA<br />
| RSA-4096<br />
| CA00000003<br />
| CA00000004<br />
| Used to verify the Ticket/TMD Certificates<br />
|-<br />
| Ticket<br />
| RSA-2048<br />
| XS0000000c<br />
| XS00000009<br />
| Used to verify the Ticket signature<br />
|-<br />
| TMD<br />
| RSA-2048<br />
| CP0000000b<br />
| CP0000000a<br />
| Used to verify the TMD signature<br />
|}<br />
<br />
The CA certificate is issued by 'Root', the public key for which is stored in NATIVE_FIRM.<br />
<br />
=== Meta ===<br />
<br />
The structure of this data is as follows:<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! START<br />
! SIZE<br />
! DESCRIPTION<br />
|-<br />
| 0x00<br />
| 0x180<br />
| Title ID dependency list - Taken from the application's [[NCCH#Extended Header|ExHeader]]<br />
|-<br />
| 0x180<br />
| 0x180<br />
| Reserved<br />
|-<br />
| 0x300<br />
| 0x4<br />
| Core Version<br />
|-<br />
| 0x304<br />
| 0xFC<br />
| Reserved<br />
|-<br />
| 0x400<br />
| 0x36C0<br />
| [[SMDH|Icon Data]](.ICN) - Taken from the application's [[ExeFS]]<br />
|}<br />
<br />
Obviously this section is not present in TWL CIA files, or any other CIA file which does not contain a [[NCCH#CXI|CXI]].<br />
<br />
== Tools ==<br />
<br />
* [https://github.com/3dshax/ctr/tree/master/ctrtool ctrtool] - Reading/Extraction of CIA files. This can only decrypt the title-key for development CIAs, since retail CIAs use the [[AES]] hardware key-scrambler for the common-key keyslot.<br />
<br />
* [https://github.com/ps3hen/ctr_toolkit/tree/master/make_cia make_cia] - Generating CIA files. Requires CommonKey and ticket/TMD RSA-2048 private exponents.<br />
<br />
* [https://github.com/ps3hen/ctr_toolkit/tree/master/make_cdn_cia make_cdn_cia] - (CMD)(Windows/Linux) Generates CIA files from CDN Content<br />
<br />
== Title Key Encryption ==<br />
<br />
The unencrypted Title Key is used to encrypt the data in a CIA. The encrypted Title Key of a CIA can be found at offset 0x1BF in a CIA's Ticket.<br />
Each Title Key is encrypted with AES-CBC to get the encrypted Title Key.<br />
<br />
To encrypt an unencrypted title key, you need:<br />
<br />
* Common key (as byte array)<br />
* Title ID (as ulong)<br />
* (and of course the unencrypted title key you want to encrypt) (as byte array)<br />
<br />
The title key encryption process starts by converting the ulong (Title ID) into a byte array using by retrieving the bytes of the Title ID using BitConverter.GetBytes().<br />
If the converted bytes (title ID) are in Little Endian, reverse those bytes. (in C# it would be Array.Reverse(byte_array_from_bitconverter))<br />
This process makes the Title Key encryption IV.<br />
<br />
Next, after you've gotten your Title Key's IV, you can start your cryptography transformation. Using AESManaged, where:<br />
<br />
Key = Common Key<br />
<br />
IV = the byte array found in the conversion process above<br />
<br />
Mode = CipherMode.CBC<br />
<br />
Create the encryptor (AesManaged.CreateEncryptor(key, iv)) where the key and IV are both the same as above.<br />
<br />
Then, create a CryptoStream and a MemoryStream. The Crypto stream should start with the arguments (memorystream, aes_transform_from_above, CryptoStreamMode.Write).<br />
<br />
Write to the CryptoStream where buffer=unencrypted_titlekey, offset=0, and count=the length of the unencrypted title key.<br />
<br />
Use FlushFinalBlock() on the CryptoStream.<br />
<br />
Finally, then, the encrypted title key will be available from your memory <br />
stream. (to output the calculated encrypted title key as a byte array, you can use memorystream.ToArray(), for example)<br />
<br />
Example function: (C#)<br />
<br />
<pre><br />
public static byte[] EncryptMyTitleKey(byte[] commonKey, byte[] titleKey, ulong titleId)<br />
{<br />
// Make encryption IV<br />
byte[] titleidasbytes = new byte[0x10];<br />
for (int i = 0; i < 0x10; i++)<br />
{<br />
titleidasbytes[i] = 0;<br />
}<br />
byte[] bitBytes = BitConverter.GetBytes(titleId);<br />
if (BitConverter.IsLittleEndian)<br />
{<br />
Array.Reverse(bitBytes);<br />
}<br />
bitBytes.CopyTo(titleidasbytes, 0);<br />
// Encrypt<br />
ICryptoTransform transform = new AesManaged { Key = commonKey, IV = titleidasbytes, Mode = CipherMode.CBC }.CreateEncryptor(commonKey, titleidasbytes);<br />
MemoryStream memstream = new MemoryStream();<br />
CryptoStream cryptostream = new CryptoStream(memstream, transform, CryptoStreamMode.Write);<br />
cryptostream.Write(titleKey, 0, titleKey.Length);<br />
cryptostream.FlushFinalBlock();<br />
return memstream.ToArray();<br />
}<br />
</pre></div>
Henke37
https://www.3dbrew.org/w/index.php?title=Extdata&diff=8436
Extdata
2014-01-21T13:25:54Z
<p>Henke37: another layton adventure, another extdata</p>
<hr />
<div>This page describes the format and encryption of extdata, "extra data" stored on [[SD_Filesystem|SD card]] and [[Flash_Filesystem|NAND]].<br />
At:<br />
* nand/data/<ID>/extdata/<ExtdataID-High><br />
* sdmc/Nintendo 3DS/<ID0>/<ID1>/extdata/<ExtdataID-High> <br />
<br />
(ExtdataID-High is always 00000000 for SD, and always 00048000 for NAND) Some titles can have Quota.dat stored in these directories. The directory-name for these directories is the ExtdataID-Low. Then there's a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.<br />
NAND stores the shared extdata and is structured exactly the same way, see [[Flash Filesystem]].<br />
<br />
Extdata image 00000001 contains a VSXE partition for the FST, the actual file data is stored in the subsequent extdata images.<br />
<br />
Regular apps can only mount SD extdata using the same extdataID which is stored in the [[NCCH#CXI|CXI]] exheader. Therefore, regular apps which have the exheader extdataID set to zero can't use extdata. This restriction doesn't apply for shared extdata with extdataID high bitmask 0x48000 stored on NAND. System apps with a certain access right can mount arbitrary extdata.<br />
All NAND extdata is shared extdata, while all SD extdata is normal extdata. Thus, normal extdata doesn't exist on NAND, and shared extdata doesn't exist on SD. The extdataID high excluding that bitmask is always zero for shared extdata.<br />
<br />
=== Encryption ===<br />
<br />
These files are [[AES|encrypted]] with AES-CTR, the keyslot is initialized by [[nand/private/movable.sed|movable.sed]]. The same keyslot is used for the NAND/SD extdata MAC. The NAND extdata images are stored in cleartext. The WCHAR LowPath "/extdata/<ExtdataIDHigh>/<ExtdataIDLow>/<PathToImage>" text path is hashed with SHA-256, including the WCHAR null-terminator. A separate hash is used for Quota.dat. The base CTR seems to be then generated by XORing the calculated hash: CTRword[i] = Hashword[i] ^ Hashword[4+i].<br />
<br />
The base CTR is fixed therefore the CTR never changes after each write. Thus it is possible to obtain some cleartext by XORing one file(like newly created extdata) with a newer file, where the newer file overwrote zeros in the original file with non-zero data.<br />
<br />
=== Format ===<br />
<br />
Extdata uses dual 'partitions' of IVFC hash trees to store data. The order of data in Extdata is as follows:<br />
<br />
* AES MAC<br />
* DIFF Header<br />
* Secondary DIFI Partition descriptor<br />
* Primary DIFI Partition descriptor<br />
* Secondary Partition IVFC Hash Tree<br />
* Primary Partition IVFC Hash Tree<br />
* DATA Partition (If applicable)<br />
<br />
Only one Partition is active at a given time, this is determined by the DIFF header. Normally the 'data' contained in extdata is stored at level4 of the IVFC hash tree, and hence there are two versions of the 'data' stored in the Extdata image (although only one is 'active'). However if DIFI flags[0] is set, this indicates it is a DATA partition and the 'data' is stored outside the IVFC hash tree, at a relative offset defined by the DIFI partition (in this case there will be only one version of the 'data' stored in the Extdata image).<br />
<br />
==== Chain Of Trust ====<br />
<br />
The chain of trust in extdata is as follows:<br />
<br />
* MAC verifies DIFF Header<br />
* DIFF Selects and verifies via Active DIFI partition descriptor<br />
* Active DIFI partition descriptor points to the location of active IVFC tree (and data if applicable), and provides the hash blob to verify Level 1 of the IVFC hash tree<br />
* Each IVFC level verifies the next level, until Level 4(data).<br />
<br />
=== Filesystem ===<br />
<br />
Title extdata contains a series of extdata images which comprise an independent file system. The first image (00000001) contains the VSXE (FST) partition, and subsequent images each containing a single file. Other extdata images, such as Quota.dat and [[Title Database|database extdata]], exist independent of a FS.<br />
<br />
==== VSXE ====<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Database Magic ("VSXE")<br />
|-<br />
| 0x4<br />
| 4<br />
| Magic Number (0x30000)<br />
|-<br />
| 0x8<br />
| 8<br />
| Data Table Offset<br />
|-<br />
| 0x10<br />
| 8<br />
| File Size, divided by the value at 0x18<br />
|-<br />
| 0x18<br />
| 8<br />
| Usually 0x1000<br />
|-<br />
| 0x20<br />
| 8<br />
| Unknown<br />
|-<br />
| 0x28<br />
| 4<br />
| 'Action' made on most recently mounted Extdata image<br />
|-<br />
| 0x2C<br />
| 4<br />
| Unknown<br />
|-<br />
| 0x30<br />
| 4<br />
| ID of most recently mounted Extdata image<br />
|-<br />
| 0x34<br />
| 4<br />
| Unknown<br />
|-<br />
| 0x38<br />
| 0x100<br />
| Mount path, from most recently mounted Extdata image<br />
|}<br />
<br />
Data Table:<br />
<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x38<br />
| Unknown<br />
|-<br />
| 0x38<br />
| 8<br />
| Folder Table Offset<br />
|}<br />
<br />
===== Folder Table =====<br />
<br />
Header:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Equivalent to the Used Folder Entries + 1<br />
|-<br />
| 0x4<br />
| 4<br />
| Equivalent to the Maximum Folder Entries + 1<br />
|-<br />
| 0x8<br />
| 0x20<br />
| Unused<br />
|}<br />
<br />
Folder Entry:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Parent Folder Index<br />
|-<br />
| 0x4<br />
| 0x10<br />
| Folder Name (ASCII)<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Previous Folder's Index<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Last Folder Index Entry<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Last File Index Entry<br />
|-<br />
| 0x20<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Unknown<br />
|}<br />
* The folder id/index for the current entry is related to it's position in the Folder table. The folder table is accessed like an array of 0x28 byte chunks, with the header consuming index = 0, root directory at index = 1, and the subsequent folder entries following.<br />
<br />
===== File Table =====<br />
<br />
The location of the File table is calculated by aligning the end offset of the folder table to 0x1000 bytes.<br />
<br />
Header:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Equivalent to the Used File Entries + 1<br />
|-<br />
| 0x4<br />
| 4<br />
| Equivalent to the Maximum File Entries + 1<br />
|-<br />
| 0x8<br />
| 0x28<br />
| Unused<br />
|}<br />
<br />
Folder Entry:<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Parent Folder Index<br />
|-<br />
| 0x4<br />
| 0x10<br />
| File Name (ASCII)<br />
|-<br />
| 0x14<br />
| 0x4<br />
| Previous File's Index<br />
|-<br />
| 0x18<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x1C<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x20<br />
| 0x8<br />
| Unique Extdata ID<br />
|-<br />
| 0x28<br />
| 0x4<br />
| Unknown<br />
|-<br />
| 0x2C<br />
| 0x4<br />
| Unknown<br />
|}<br />
* The file id/index for the current entry is related to it's position in the File Table, much like the folder entries in the Folder Table. The file table is accessed like an array of 0x30 byte chunks, with the header consuming index = 0, and the subsequent file entries following. The relationship between the index value of the file entry, and the actual file name of the extdata image that contains it it = index+1. For instance icon (the only file in every extdata), comes right after the header, with an index value of '1', and the icon is stored in extdata image '00000002'.<br />
<br />
* The Unique Extdata ID, is the same value found in the DIFF header of the referenced extdata image for that file. The value changes most times the file in question is modified. When mounting an extdata image in the VSXE filesystem, if the file's extdata image doesn't have the expected Unique Extdata ID, it won't be mounted.<br />
<br />
==== VSXE Filesystem structure ====<br />
<br />
When extdata is created, these are *always* created regardless of whether the title actually uses them.<br />
<br />
* /icon This file contains the extdata [[SMDH|icon]] displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. This file can't be read directly, instead it is read via [[FS:ReadExtSaveDataIcon]].<br />
* /user/ Contains the title's actual extdata files.<br />
* /boss/ Can contain [[SpotPass]] content. SpotPass content can only be downloaded to this /boss directory.<br />
<br />
User extdata and SpotPass extdata use separate [[FS:OpenArchive|mount]] points at /user and /boss. Therefore one mount can't access the other directory, and also can't access /icon.(The title's SpotPass extdata can be mounted by the title itself, if it uses SpotPass)<br />
<br />
<br />
Other optional but notable directories include:<br />
* /user/ExBanner This directory can optionally store [[Extended_Banner| extended banners]]. When this is available, this banner is displayed instead of the [[CXI]] ExeFS banner. COMMON.bin stores the common exbanner, while <regionlang_code>.bin stores an optional separate region/language specific banner.(regionlang_code can be "JPN_JP", "USA_EN", etc)<br />
<br />
=== Extdata without an independent FS ===<br />
<br />
==== Quota.dat ====<br />
<br />
* This is contained in the Quota.dat extdata image.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Magic ("QUOT")<br />
|-<br />
| 0x4<br />
| 4<br />
| Magic Number (0x30000)<br />
|-<br />
| 0x8<br />
| 8<br />
| Unknown<br />
|-<br />
| 0x10<br />
| 0x38<br />
| Unknown<br />
|}<br />
It's unknown what this is used for.<br />
<br />
==== Database Extdata ====<br />
<br />
See [[Title Database|here]].<br />
<br />
=== SD Extdata ===<br />
Usually the ExtdataID low is in the format '00<Unique ID>'<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! JPN ExtdataID<br />
! USA ExtdataID<br />
! EUR ExtdataID<br />
! Description<br />
! Extdata images<br />
|-<br />
| 00000082<br />
| 0000008f<br />
| 00000098<br />
| [[Home Menu]] extdata, this contains home-menu savedata and cached icons for applications.<br />
| <br />
|-<br />
| 00000200<br />
| 00000210<br />
| 00000220<br />
| [[System_Settings|System Settings]] extdata added with [[2.0.0-2]].<br />
| <br />
|-<br />
| 00000207<br />
| 00000217<br />
| 00000227<br />
| [[Mii Maker]], contains an ExBanner<br />
| [https://dl.dropbox.com/u/20520664/extdata00000217.zip cleartext]<br />
|-<br />
| 00000208<br />
| 00000218<br />
| 00000228<br />
| Streetpass Mii Plaza<br />
| 11 mb big!<br />
|-<br />
| 00000209<br />
| 00000219<br />
| 00000229<br />
| [[eShop]]<br />
| <br />
|-<br />
| 0000020d<br />
| 0000021d<br />
| 0000022d<br />
| Face Raiders, likely contains an ExBanner<br />
| <br />
|-<br />
| 0000020b<br />
| 0000021b<br />
| 0000022b<br />
| Nintendo Zone<br />
| <br />
|-<br />
| ?<br />
| 000004aa<br />
| 000004ab<br />
| Nintendo Video Extra Data<br />
This is where the video files are stored, and [[Nintendo_Video|includes]] the thumbnail, the description, and possibly some checksum info in each video file stored in the extdata images. There are always 9 files within the subdirectory "00000000" of this folder, even without any videos downloaded. The files are "00000001" - "00000009", and "00000003" - "00000008" have the same filesize of 50.7 MB. It is possible to restore the older videos by overwriting all the files within this directory. Provided of course you have made a backup of the files before hand, by copying all the files within this directory to your computer. As far I'm aware its not possible to mix and match the files in order to get certain videos in one grouping, ie. having all 3 Zelda orchestral recordings in one group of 4 Nintendo videos.<br />
| <br />
|-<br />
|00000306<br />
|00000308<br />
|00000307<br />
|Mario Kart 7<br />
|<br />
|-<br />
| 0000030b<br />
| 0000030d<br />
| 0000030c<br />
| Nintendogs + Cats<br />
| <br />
|-<br />
| 00000326<br />
| 00000326<br />
| 00000326<br />
| Pokédex 3D<br />
| <br />
|-<br />
| 00000305<br />
| 0000032d<br />
| 0000033c<br />
| Super Street Fighter IV 3D<br />
| <br />
|-<br />
| 00000328<br />
| 00000358<br />
| 0000033b<br />
| Ridge Racer 3D<br />
| <br />
|-<br />
| ?<br />
| 0000034d<br />
| 00000402<br />
| Samurai Warriors Chronicles<br />
| <br />
|-<br />
| ?<br />
| 0000034f<br />
| 0000038a<br />
| Dead or Alive Dimensions<br />
| <br />
|-<br />
| 00000481<br />
| N/A<br />
| N/A<br />
| Monster Hunter Tri G (Download-Quests)<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000a86<br />
| Professor Layton and the Miracle Mask<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000c24<br />
| Denpa men<br />
| <br />
|-<br />
| 00000c73<br />
| 00000c73<br />
| 00000c73<br />
| Save Data Transfer Tool<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000d9a<br />
| Donkey Kong Country Returns 3d Trailer<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000f1e<br />
| Professor Layton and the Azran legacy<br />
| <br />
|}<br />
<br />
=== NAND Shared Extdata ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! ExtdataID<br />
! Description<br />
|-<br />
| 0xf0000001<br />
| NAND JPEG/MPO files and phtcache.bin from the camera application are stored here. This also contains UploadData.dat.<br />
|-<br />
| 0xf0000002<br />
| NAND M4A files from the sound application are stored here<br />
|-<br />
| 0xf0000009<br />
| ?<br />
|-<br />
| 0xf000000b<br />
| Contains idb.dat, idbt.dat, gamecoin.dat, ubll.lst, CFL_DB.dat, and CFL_OldDB.dat. These files contain cleartext [[Mii_Maker|Miis]] and some data relating (including cached ICN data) to Play/Usage Records.<br />
|-<br />
| 0xf000000c<br />
| Contains bashotorya.dat and bashotorya2.dat.<br />
|-<br />
| 0xf000000d<br />
| ?<br />
|}<br />
<br />
==== Shared Extdata 0xf000000b gamecoin.dat ====<br />
{| class="wikitable" border="1"<br />
|-<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Magic number: 0x4F00<br />
|-<br />
| 0x4<br />
| 0x2<br />
| Total Play Coins<br />
|-<br />
| 0x6<br />
| 0x2<br />
| Total Play Coins obtained on the date stored below. When the below date does not match the current date, this field is reset to zero, then the date(and other fields) are updated. Once this value is >=10, no more Play Coins can be obtained until the current date changes.<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Total step [[PTM:GetTotalStepCount|count]] at the time a new Play Coin was obtained.<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Step count for the day the last Play Coin was obtained, for that day's step count(same as the step count displayed by home-menu when this file was updated).<br />
|-<br />
| 0x10<br />
| 0x2<br />
| Year<br />
|-<br />
| 0x12<br />
| 0x1<br />
| Month<br />
|-<br />
| 0x13<br />
| 0x1<br />
| Day<br />
|}<br />
<br />
The above date stores the last time new Play Coin(s) were obtained. The contents of this file is updated by home-menu. [[PTM:GetTotalStepCount]] is not checked constantly, after home-menu boot this is only checked when waking from sleep-mode. Each time home-menu updates the contents of this file, home-menu will set the Play Coin total to 300 if it's higher than the 300 Play Coin limit.<br />
<br />
=== Tools ===<br />
<br />
* [https://github.com/ps3hen/ctr_toolkit/tree/master/extdata_tool extdata_tool] - Extract/verifies standalone extdata images and title extdata FS.</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Glossary&diff=8405
Glossary
2014-01-19T02:47:26Z
<p>Henke37: </p>
<hr />
<div>A miniature dictionary for terms you may encounter on 3DSBrew.<br />
<br />
== C ==<br />
<br />
=== C ===<br />
<br />
A language homebrew developers program in. Also a programming language that is used to make everything from web browser to timers for your computer.<br />
<br />
=== C++ ===<br />
<br />
An object oriented language homebrew developers program in. Like its name suggests, C++ is essentially a step up from C.<br />
<br />
== D ==<br />
<br />
=== DSi ===<br />
<br />
A handheld console created by Nintendo. It is the second successor to the Nintendo DS, and the 6th generation portable Nintendo gaming system. It features two (larger) screens, two cameras, and an online shop system. The menu is also overhauled, now using similar channels as used on the Wii. It has a screen brightness that can be set to one step higher than the DS Lite.<br />
<br />
=== DS Lite ===<br />
<br />
The predecessor to the DSi. It came after the original DS PHAT and has a screen that can be set to 4x as bright as the DS PHAT.<br />
<br />
=== DS "PHAT" ===<br />
<br />
The original Nintendo DS. It ended up being the successor to the Game Boy, though Nintendo did not intend for this to happen. It added a touch screen.<br />
<br />
=== DSP ===<br />
<br />
Digital Signal Processor. The 3DS uses a DSP core to do the audio mixing instead of relaying on dedicated mixing hardware like the predecessor.<br />
<br />
=== DSiWare ===<br />
<br />
A platform started by Nintendo that allows developers to cheaply create and then sell original content at low prices (compared to the prices of brand new DSi games). All DSiWare games are available on the DSi Shop Channel on the main menu.<br />
<br />
=== Dump ===<br />
<br />
To extract the protected contents of something like a chip or NAND drive or disc which are otherwise inaccessible and/or incomprehensible under normal circumstances.<br />
<br />
=== DS Download Play ===<br />
<br />
Another application built into the Nintendo 3DS firmware. It is a place where people can download multiplayer games from another DS or 3DS. With those compatible games you are able to use only one game card while playing against several people.<br />
<br />
== E ==<br />
<br />
=== Exploit ===<br />
<br />
A clever circumvention of security allowing a user to perform tasks that are not normally permitted. Often several exploits will be employed in a series with the user gaining increased authority over a system at each step, the goal typically being complete access and control.<br />
<br />
== F ==<br />
<br />
=== FCRAM ===<br />
FCRAM (Fast Cycle RAM) is a new technology developed by the Fujitsu Corporation that approaches the problem of DRAM/Processor speed in a different way. It is one of the components of 3DS hardware.<br />
<br />
== G ==<br />
<br />
=== [[GX]] ===<br />
<br />
The graphics subsytem used on the 3DS.<br />
<br />
== H ==<br />
<br />
=== Hexadecimal (Hex) ===<br />
<br />
A term used to describe the base 16 number system, in which each digit represents four bits. After the digits 0-9, the letters A-F are used to represent the values 10-15. Hexadecimal is the preferred format for displaying binary data, as it is easy to mentally convert to/from binary and uses only 2 characters per byte.<br />
<br />
=== [[Home Menu]] ===<br />
<br />
The 3DS's main interface which appears after the health warning screen when the system is powered on. In the 3DS this is where all of your default and downloaded channels and games are.<br />
<br />
== I ==<br />
<br />
=== IRC ===<br />
<br />
Internet Relay Chat; that is, realtime text-based chat over the Internet.<br />
<br />
== M ==<br />
<br />
=== [[MPO]] ===<br />
<br />
Multi-Picture Object, This is the open-file-format used by Nintendo to make 3D images. It uses Exif tags and MP tags with JPG. You can read the MPO file like two JPG files stuck togather.<br />
<br />
== S ==<br />
<br />
=== SD Card ===<br />
<br />
A common type of memory card, used by the 3DS, digital cameras, music players, etc. Stands for Secure Digital. The standard SD card has a maximum capacity of 2 gigabytes (2048 Megabytes); however, some 4GB cards exist but are rare. These cards usually do not have great compatibility with non-SDHC products, even though they are not SDHC, so 2GB is the size you should use.<br />
<br />
=== SDHC ===<br />
<br />
Stands for Secure Digital High Capacity Card. A type of SD card with a higher storage capacity than normal SD cards. These are theoretically capable of holding up to 2 terabytes of space, but are politically limited by the current standards to 32 gigabytes.<br />
<br />
== T ==<br />
<br />
=== [[TMD]] ===<br />
<br />
See [[Title metadata]].<br />
<br />
=== Title ===<br />
<br />
A title is a 3DS Game on a card or in a 3DS. This includes the built-in channels and menus. A title is identified by a unique title ID, an 8 byte (4 character) long code used for title identification. All titles are encrypted for security purposes.<br />
<br />
=== [[Title metadata|Title Metadata]] ===<br />
<br />
A format used for storing metadata about a title and its installed contents, including which contents they consist of and their SHA1 hashes.</div>
Henke37
https://www.3dbrew.org/w/index.php?title=SVC&diff=8398
SVC
2014-01-13T22:00:05Z
<p>Henke37: Zeropad for uniform layout</p>
<hr />
<div>= System calls =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Id<br />
! NATIVE_FIRM ARM11 kernel notes<br />
! Enabled for the TWL_FIRM ARM11 kernel<br />
! Description<br />
|-<br />
| 0x01 <br />
| <br />
| No<br />
| Result ControlMemory(u32* outaddr, u32 addr0, u32 addr1, u32 size, u32 operation, u32 permissions) (outaddr is usually the same as the input addr0)<br />
|-<br />
| 0x02 <br />
| <br />
| No<br />
| Result QueryMemory(MemoryInfo* info, PageInfo* out, u32 Addr)<br />
|-<br />
| 0x03 <br />
| <br />
| No<br />
| void ExitProcess(void)<br />
|-<br />
| 0x04 <br />
| <br />
| No<br />
| Result GetProcessAffinityMask(u8* affinitymask, Handle process, s32 processorcount)<br />
|-<br />
| 0x05 <br />
| <br />
| No<br />
| Result SetProcessAffinityMask(Handle process, u8* affinitymask, s32 processorcount)<br />
|-<br />
| 0x06 <br />
| <br />
| No<br />
| Result GetProcessIdealProcessor(s32 *idealprocessor, Handle process)<br />
|-<br />
| 0x07 <br />
| <br />
| No<br />
| Result SetProcessIdealProcessor(Handle process, s32 idealprocessor)<br />
|-<br />
| 0x08 <br />
| <br />
| Yes<br />
| Result [[#CreateThread|CreateThread]](Handle* thread, func entrypoint, u32 arg, u32 stacktop, s32 threadpriority, s32 processorid)<br />
|-<br />
| 0x09 <br />
| <br />
| Yes<br />
| void ExitThread(void)<br />
|-<br />
| 0x0A <br />
| <br />
| Yes<br />
| void SleepThread(s64 nanoseconds)<br />
|-<br />
| 0x0B <br />
| <br />
| Yes<br />
| Result GetThreadPriority(s32* priority, Handle thread)<br />
|-<br />
| 0x0C <br />
| <br />
| Yes<br />
| Result SetThreadPriority(Handle thread, s32 priority)<br />
|-<br />
| 0x0D <br />
| <br />
| No<br />
| Result GetThreadAffinityMask(u8* affinitymask, Handle thread, s32 processorcount)<br />
|-<br />
| 0x0E <br />
| <br />
| No<br />
| Result SetThreadAffinityMask(Handle thread, u8* affinitymask, s32 processorcount)<br />
|-<br />
| 0x0F <br />
| <br />
| No<br />
| Result GetThreadIdealProcessor(s32* processorid, Handle thread)<br />
|-<br />
| 0x10 <br />
| <br />
| No<br />
| Result SetThreadIdealProcessor(Handle thread, s32 processorid)<br />
|-<br />
| 0x11 <br />
| <br />
| No<br />
| s32 GetCurrentProcessorNumber(void)<br />
|-<br />
| 0x12 <br />
| <br />
| No<br />
| Result Run(Handle process, StartupInfo* info) (This starts the main() thread. Buf+0 is main-thread priority, Buf+4 is main-thread stack-size.)<br />
|-<br />
| 0x13 <br />
| <br />
| Yes<br />
| Result CreateMutex(Handle* mutex, bool initialLocked)<br />
|-<br />
| 0x14 <br />
| <br />
| Yes<br />
| Result ReleaseMutex(Handle mutex)<br />
|-<br />
| 0x15 <br />
| <br />
| Yes<br />
| Result CreateSemaphore(Handle* semaphore, s32 initialCount, s32 maxCount)<br />
|-<br />
| 0x16 <br />
| <br />
| Yes<br />
| Result ReleaseSemaphore(s32* count, Handle semaphore, s32 releaseCount)<br />
|-<br />
| 0x17 <br />
| <br />
| Yes<br />
| Result CreateEvent(Handle* event, ResetType resettype)<br />
|-<br />
| 0x18 <br />
| <br />
| Yes<br />
| Result SignalEvent(Handle event)<br />
|-<br />
| 0x19 <br />
| <br />
| Yes<br />
| Result ClearEvent(Handle event)<br />
|-<br />
| 0x1A <br />
| <br />
| Yes<br />
| Result CreateTimer(Handle* timer, ResetType resettype)<br />
|-<br />
| 0x1B <br />
| <br />
| Yes<br />
| Result SetTimer(Handle timer, s64 initial, s64 interval)<br />
|-<br />
| 0x1C <br />
| <br />
| Yes<br />
| Result CancelTimer(Handle timer)<br />
|-<br />
| 0x1D <br />
| <br />
| Yes<br />
| Result ClearTimer(Handle timer)<br />
|-<br />
| 0x1E <br />
| <br />
| No<br />
| Result CreateMemoryBlock(Handle* memblock, u32 addr, u32 size, u32 mypermission, u32 otherpermission)<br />
|-<br />
| 0x1F <br />
| <br />
| No<br />
| Result MapMemoryBlock(Handle memblock, u32 addr, u32 mypermissions, u32 otherpermission)<br />
|-<br />
| 0x20 <br />
| <br />
| No<br />
| Result UnmapMemoryBlock(Handle memblock, u32 addr)<br />
|-<br />
| 0x21 <br />
| <br />
| Yes<br />
| Result CreateAddressArbiter(Handle* arbiter)<br />
|-<br />
| 0x22 <br />
| <br />
| Yes<br />
| Result ArbitrateAddress(Handle arbiter, u32 addr, ArbitrationType type, s32 value)<br />
|-<br />
| 0x23 <br />
| <br />
| Yes<br />
| Result CloseHandle(Handle handle)<br />
|-<br />
| 0x24 <br />
| <br />
| Yes<br />
| Result WaitSynchronization1(Handle handle, s64 nanoseconds)<br />
|-<br />
| 0x25 <br />
| <br />
| Yes<br />
| Result WaitSynchronizationN(s32* out, Handle* handles, s32 handlecount, bool waitAll, s64 nanoseconds)<br />
|-<br />
| 0x26 <br />
| <br />
| No<br />
| Result SignalAndWait(s32* out, Handle signal, Handle* handles, s32 handleCount, bool waitAll, s64 nanoseconds)<br />
|-<br />
| 0x27 <br />
| <br />
| Yes<br />
| Result DuplicateHandle(Handle* out, Handle original)<br />
|-<br />
| 0x28 <br />
| <br />
| Yes<br />
| s64 GetSystemTick(void) (This returns the total CPU ticks elapsed since the CPU was powered-on)<br />
|-<br />
| 0x29 <br />
| <br />
| No<br />
| Result GetHandleInfo(s64* out, Handle handle, HandleInfoType type)<br />
|-<br />
| 0x2A <br />
| <br />
| Yes<br />
| Result GetSystemInfo(s64* out, SystemInfoType type, s32 param)<br />
|-<br />
| 0x2B <br />
| <br />
| Yes<br />
| Result GetProcessInfo(s64* out, Handle process, ProcessInfoType type)<br />
|-<br />
| 0x2C <br />
| <br />
| Yes<br />
| Result GetThreadInfo(s64* out, Handle thread, ThreadInfoType type)<br />
|-<br />
| 0x2D <br />
| <br />
| No<br />
| Result ConnectToPort(Handle* out, const char* portName)<br />
|-<br />
| 0x2E <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest1(Handle session)<br />
|-<br />
| 0x2F <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest2(Handle session)<br />
|-<br />
| 0x30 <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest3(Handle session)<br />
|-<br />
| 0x31 <br />
| Stubbed<br />
| No<br />
| Result SendSyncRequest4(Handle session)<br />
|-<br />
| 0x32 <br />
| <br />
| No<br />
| Result SendSyncRequest(Handle session)<br />
|-<br />
| 0x33 <br />
| <br />
| No<br />
| Result OpenProcess(Handle* process, u32 processId)<br />
|-<br />
| 0x34 <br />
| <br />
| No<br />
| Result OpenThread(Handle* thread, Handle process, u32 threadId)<br />
|-<br />
| 0x35 <br />
| <br />
| Yes<br />
| Result GetProcessId(u32* processId, Handle process)<br />
|-<br />
| 0x36 <br />
| <br />
| No<br />
| Result GetProcessIdOfThread(u32* processId, Handle thread)<br />
|-<br />
| 0x37 <br />
| <br />
| Yes<br />
| Result GetThreadId(u32* threadId, Handle thread)<br />
|-<br />
| 0x38 <br />
| <br />
| No<br />
| Result GetResourceLimit(Handle* resourceLimit, Handle process)<br />
|-<br />
| 0x39 <br />
| <br />
| No<br />
| Result GetResourceLimitLimitValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)<br />
|-<br />
| 0x3A <br />
| <br />
| No<br />
| Result GetResourceLimitCurrentValues(s64* values, Handle resourceLimit, LimitableResource* names, s32 nameCount)<br />
|-<br />
| 0x3B <br />
| <br />
| No<br />
| Result GetThreadContext(ThreadContext* context, Handle thread) (Stubbed)<br />
|-<br />
| 0x3C <br />
| <br />
| Yes<br />
| Break(BreakReason)<br />
|-<br />
| 0x3D <br />
| <br />
| Yes<br />
| OutputDebugString(void const, int) (Does nothing on non-debug units)<br />
|-<br />
| 0x3E <br />
| <br />
| No<br />
| ControlPerformanceCounter(unsigned long long, int, unsigned int, unsigned long long)<br />
|-<br />
| 0x47 <br />
| <br />
| No<br />
| Result CreatePort(Handle* portServer, Handle* portClient, const char* name, s32 maxSessions)<br />
|-<br />
| 0x48 <br />
| <br />
| No<br />
| Result CreateSessionToPort(Handle* session, Handle port)<br />
|-<br />
| 0x49 <br />
| <br />
| No<br />
| Result CreateSession(Handle* sessionServer, Handle* sessionClient)<br />
|-<br />
| 0x4A <br />
| <br />
| No<br />
| Result AcceptSession(Handle* session, Handle port)<br />
|-<br />
| 0x4B <br />
| <br />
| No<br />
| Result ReplyAndReceive1(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4C <br />
| <br />
| No<br />
| Result ReplyAndReceive2(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4D <br />
| <br />
| No<br />
| Result ReplyAndReceive3(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4E <br />
| <br />
| No<br />
| Result ReplyAndReceive4(s32* index, Handle* handles, s32 handleCount, Handle replyTarget) (Stubbed)<br />
|-<br />
| 0x4F <br />
| <br />
| No<br />
| Result ReplyAndReceive(s32* index, Handle* handles, s32 handleCount, Handle replyTarget)<br />
|-<br />
| 0x50 <br />
| <br />
| Yes<br />
| Result BindInterrupt(Interrupt name, Handle syncObject, s32 priority, bool isManualClear)<br />
|-<br />
| 0x51 <br />
| <br />
| Yes<br />
| Result UnbindInterrupt(Interrupt name, Handle syncObject)<br />
|-<br />
| 0x52 <br />
| <br />
| Yes<br />
| Result InvalidateProcessDataCache(Handle process, void* addr, u32 size)<br />
|-<br />
| 0x53 <br />
| <br />
| Yes<br />
| Result StoreProcessDataCache(Handle process, void const* addr, u32 size)<br />
|-<br />
| 0x54 <br />
| <br />
| Yes<br />
| Result FlushProcessDataCache(Handle process, void const* addr, u32 size)<br />
|-<br />
| 0x55 <br />
| <br />
| Yes<br />
| Result StartInterProcessDma(Handle* dma, Handle dstProcess, void* dst, Handle srcProcess, const void* src, u32 size, const DmaConfig& config )<br />
|-<br />
| 0x56 <br />
| <br />
| Yes<br />
| Result StopDma(Handle dma)<br />
|-<br />
| 0x57 <br />
| <br />
| Yes<br />
| Result GetDmaState(DmaState* state, Handle dma)<br />
|-<br />
| 0x58<br />
| <br />
| Yes<br />
| RestartDma(nn::Handle, void *, void const*, unsigned int, signed char)<br />
|-<br />
| 0x60 <br />
| <br />
| No<br />
| Result DebugActiveProcess(Handle* debug, u32 processID)<br />
|-<br />
| 0x61 <br />
| <br />
| No<br />
| Result BreakDebugProcess(Handle debug)<br />
|-<br />
| 0x62 <br />
| <br />
| No<br />
| Result TerminateDebugProcess(Handle debug)<br />
|-<br />
| 0x63 <br />
| <br />
| No<br />
| Result GetProcessDebugEvent(DebugEventInfo* info, Handle debug)<br />
|-<br />
| 0x64 <br />
| <br />
| No<br />
| Result ContinueDebugEvent(Handle debug, u32 flags)<br />
|-<br />
| 0x65 <br />
| <br />
| No<br />
| Result GetProcessList(s32* processCount, u32* processIds, s32 processIdMaxCount)<br />
|-<br />
| 0x66 <br />
| <br />
| No<br />
| Result GetThreadList(s32* threadCount, u32* threadIds, s32 threadIdMaxCount, Handle domain)<br />
|-<br />
| 0x67 <br />
| <br />
| No<br />
| Result GetDebugThreadContext(ThreadContext* context, Handle debug, u32 threadId, u32 controlFlags)<br />
|-<br />
| 0x68 <br />
| <br />
| No<br />
| Result SetDebugThreadContext(Handle debug, u32 threadId, ThreadContext* context, u32 controlFlags)<br />
|-<br />
| 0x69 <br />
| <br />
| No<br />
| Result QueryDebugProcessMemory(MemoryInfo* blockInfo, PageInfo* pageInfo, Handle process, u32 addr)<br />
|-<br />
| 0x6A <br />
| <br />
| No<br />
| Result ReadProcessMemory(void* buffer, Handle debug, u32 addr, u32 size)<br />
|-<br />
| 0x6B <br />
| <br />
| No<br />
| Result WriteProcessMemory(Handle debug, void const* buffer, u32 addr, u32 size)<br />
|-<br />
| 0x6C <br />
| <br />
| No<br />
| Result SetHardwareBreakPoint(s32 registerId, u32 control, u32 value)<br />
|-<br />
| 0x6D<br />
| <br />
| No<br />
| GetDebugThreadParam(long long *, int *, nn::Handle, unsigned int, nn::dmnt::DebugThreadParam) (Disabled on regular kernel)<br />
|-<br />
| 0x70<br />
| <br />
| No<br />
| ControlProcessMemory(Handle KProcess, unsigned int Addr0, unsigned int Addr1, unsigned int Size, unsigned int Type, unsigned int Permissions)<br />
|-<br />
| 0x71<br />
| <br />
| No<br />
| MapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)<br />
|-<br />
| 0x72<br />
| <br />
| No<br />
| UnmapProcessMemory(Handle KProcess, unsigned int StartAddr, unsigned int EndAddr)<br />
|-<br />
| 0x73<br />
| <br />
| No<br />
| ?<br />
|-<br />
| 0x74<br />
| Stubbed<br />
| No<br />
| <br />
|-<br />
| 0x75<br />
| <br />
| No<br />
| ?<br />
|-<br />
| 0x76<br />
| <br />
| No<br />
| TerminateProcess(Handle)<br />
|-<br />
| 0x77<br />
| <br />
| No<br />
| (Handle KProcess, Handle KResourceLimit)<br />
|-<br />
| 0x78<br />
| <br />
| No<br />
| CreateResourceLimit(Handle *KResourceLimit)<br />
|-<br />
| 0x79<br />
| <br />
| No<br />
| ?<br />
|-<br />
| 0x7A<br />
| Stubbed beginning with [[2.0.0-2]]<br />
| Yes<br />
| ? (unsigned int Addr, unsigned int Size)<br />
|-<br />
| 0x7C<br />
| <br />
| Yes<br />
| KernelSetState(unsigned int Type, unsigned int Param0, unsigned int Param1, unsigned int Param2) (The Type determines the usage of each param)<br />
|-<br />
| 0x7D<br />
| <br />
| No<br />
| QueryProcessMemory(MemInfo *Info, unsigned int *Out, Handle KProcess, unsigned int Addr)<br />
|-<br />
| 0xFF<br />
| <br />
| Yes<br />
| Debug related (The Syscall access control mask doesn't apply for this SVC)<br />
|}<br />
<br />
== CreateThread ==<br />
R0=s32 threadpriority<br />
R1=func entrypoint<br />
R2=u32 arg<br />
R3=u32 stacktop<br />
R4=s32 processorid<br />
<br />
Result result=R0<br />
Handle* thread=R1<br />
<br />
This processorid is a bitmask for which processors the thread can be run on. Bit value zero enables thread execution for this CPUID, bit value one disables thread execution for this CPUID. Bit0-bit1 are for CPUID0-CPUID1.<br />
<br />
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.<br />
<br />
= Types and structures =<br />
<br />
== enum MemoryState ==<br />
{| class="wikitable" border="1"<br />
! Memory state flags<br />
! Bit<br />
|-<br />
| FREE<br />
| 0<br />
|-<br />
| RESERVED<br />
| 1<br />
|-<br />
| IO<br />
| 2<br />
|-<br />
| STATIC<br />
| 3<br />
|-<br />
| CODE<br />
| 4<br />
|-<br />
| PRIVATE<br />
| 5<br />
|-<br />
| SHARED<br />
| 6<br />
|-<br />
| CONTINUOUS<br />
| 7<br />
|-<br />
| ALIASED<br />
| 8<br />
|-<br />
| ALIAS<br />
| 9<br />
|-<br />
| ALIAS CODE<br />
| 10<br />
|-<br />
| LOCKED<br />
| 11<br />
|}<br />
<br />
== enum PageFlags ==<br />
{| class="wikitable" border="1"<br />
! Page flags<br />
! Bit<br />
|-<br />
| LOCKED<br />
| 0<br />
|-<br />
| CHANGED<br />
| 1<br />
|}<br />
<br />
== enum MemoryOperation ==<br />
<br />
{| class="wikitable" border="1"<br />
! Memory operation<br />
! Id<br />
|-<br />
| FREE<br />
| 1<br />
|-<br />
| RESERVE<br />
| 2<br />
|-<br />
| COMMIT<br />
| 3<br />
|-<br />
| MAP<br />
| 4<br />
|-<br />
| UNMAP<br />
| 5<br />
|-<br />
| PROTECT<br />
| 6<br />
|-<br />
| REGION APP<br />
| 0x100<br />
|-<br />
| REGION SYSTEM<br />
| 0x200<br />
|-<br />
| REGION BASE<br />
| 0x300<br />
|-<br />
| LINEAR<br />
| 0x1000<br />
|}<br />
<br />
The LINEAR memory-operation indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA(such as the [[GPU]]). Addr0+size for this must be within the 0x14000000-0x1C000000 range when Addr0 is non-zero(Addr1 must be zero), Addr0 isn't actually used by svcControlMemory for mapping memory since the kernel determines what vaddr to map. LINEAR memory is allocated in FCRAM the same way as any other virtual memory(like the regular process heap, etc).<br />
<br />
== enum MemoryPermission ==<br />
<br />
{| class="wikitable" border="1"<br />
! Memory permission<br />
! Id<br />
|-<br />
| NONE<br />
| 0<br />
|-<br />
| READ<br />
| 1<br />
|-<br />
| WRITE<br />
| 2<br />
|-<br />
| READWRITE<br />
| 3<br />
|-<br />
| DONTCARE<br />
| 0x10000000<br />
|}<br />
<br />
<br />
== enum ResetType ==<br />
<br />
{| class="wikitable" border="1"<br />
! Reset type<br />
! Id<br />
|-<br />
| ONESHOT<br />
| 0<br />
|-<br />
| STICKY<br />
| 1<br />
|-<br />
| PULSE<br />
| 2<br />
|}<br />
<br />
== struct MemoryInfo ==<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| u32<br />
| Base address<br />
|-<br />
| u32<br />
| Size<br />
|-<br />
| u32<br />
| Permission<br />
|-<br />
| enum MemoryState<br />
| State<br />
|}<br />
<br />
== struct PageInfo ==<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| u32<br />
| Flags<br />
|}<br />
<br />
== struct StartupInfo ==<br />
{| class="wikitable" border="1"<br />
! Type<br />
! Field<br />
|-<br />
| s32<br />
| Priority<br />
|-<br />
| u32<br />
| Stack size<br />
|-<br />
| s32<br />
| argc<br />
|-<br />
| s16*<br />
| argv<br />
|-<br />
| s16*<br />
| envp<br />
|}<br />
<br />
<br />
<br />
= Processes =<br />
Each process can only use SVCs which are enabled in the [[NCCH#CXI|exheader]] for this process. The ARM11 kernel SVC handler checks whether the SVC is enabled in the syscall access control mask stored on the SVC-mode stack, when the SVC isn't enabled a kernelpanic() is triggered. Each process has a separate SVC-mode stack, this stack and the syscall access mask stored here is initialized when the process is started. Applications normally only have access to SVCs <=0x3D, however not all SVCs <=0x3D are accessible to the application. The majority of the SVCs accessible to applications are unused by the application.<br />
<br />
Each process has a separate handle-table, the size of this table is stored in the exheader. The handles in a handle-table can't be used in the context of other processes, since those handles don't exist in other handle-tables.<br />
<br />
0xFFFF8001 is a handle alias for the current KProcess, and 0xFFFF8000 is a handle alias for the current KThread.<br />
<br />
Calling svcBreak on retail will only terminate the process which called this SVC.<br />
<br />
= Threads =<br />
For svcCreateThread the input address used for Entrypoint_Param and StackTop are normally the same, however these can be arbitrary. For the main thread the Entrypoint_Param is value 0.<br />
<br />
Using CloseHandle() with a KThread handle will terminate the specified thread.<br />
<br />
= Memory Mapping =<br />
ControlMemory and MapMemoryBlock can be used to map memory pages, these two SVCs only support mapping execute-never R/W pages. The input permissions parameter for these SVCs must be <=3, where value zero is used when un-mapping memory. Bitmask 0xf00 for ControlMemory parameter MemoryType is the memory-type, when this is zero the memory-type is loaded from the kernel flags stored in the exheader ARM11 kernel descriptors, for the process using the SVC. ControlMemory parameter MemoryType with value 0x10003 is used for mapping the GSP [[Memory_layout|heap]]. The low 8-bits are the type: 1 is for un-mapping memory, 3 for mapping memory. Type4 is used to mirror the RW memory at Addr1, to Addr0. Type4 will return an error if Addr1 is located in read-only memory. Addr1 is not used for type1 and type3.<br />
<br />
The ARM11 kernel does not allow processes to create shared memory blocks via svcCreateMemoryBlock, when the process memorytype(from the kernel flags stored in the exheader kernel descriptor) is the application memorytype, and when addr=0. It's unknown how the kernel handles addr=0 when the memorytype is not the application memorytype. When addr is non-zero, it must be located in memory which is already mapped.<br />
<br />
ControlProcessMemory maps memory in the specified process, this is the only SVC which allows mapping executable memory. Format of the permissions field for memory mapping SVCs: bit0=R, bit1=W, bit2=X. Type6 sets the Addr0 memory permissions to the input permissions, for already mapped memory. Type is the MemoryOperation enum, without the memory-type/memory-region. ControlProcessMemory only supports type4, type5, and type6. ControlProcessMemory does not support using the current KProcess handle alias.<br />
<br />
MapProcessMemory maps RW memory starting at address 0x00100000 in the specified KProcess, at the specified StartAddr in the current process. MapProcessMemory then maps 0x08000000 in the specified process, to StartAddr+0x7f00000 in the current process. UnmapProcessMemory unmaps the memory which was mapped by MapProcessMemory.<br />
<br />
= Debugging =<br />
DebugActiveProcess is used to attach to a process for debugging. This SVC can only be used when the target process' ARM11 descriptors stored in the exheader have the kernel flag for "Enable debug" set. Otherwise when that flag is clear, the kernel flags for the process using this SVC must have the "Force debug" flag set.<br />
<br />
= KernelSetState =<br />
{| class="wikitable" border="1"<br />
|-<br />
! Type<br />
! Enabled for the NATIVE_FIRM ARM11 kernel<br />
! Enabled for the TWL_FIRM ARM11 kernel<br />
! Description<br />
|-<br />
| 0<br />
| Yes<br />
| No<br />
| This initializes the programID for launching [[FIRM]], then triggers launching [[FIRM]]. Param0 and Param2 are unused. Param1 is the programID-low, and the programID-high is 0x00040138.<br />
|-<br />
| 1<br />
| Yes<br />
| Yes<br />
| Unknown, does nothing with the TWL_FIRM ARM11 kernel.<br />
|-<br />
| 2<br />
| Yes<br />
| Yes<br />
| ?<br />
|-<br />
| 3<br />
| Yes<br />
| No<br />
| This used for initializing the 0x1000-byte buffer used by the launched [[FIRM]]. Param2 is unused. When Param0 is value 1, this buffer is copied to the beginning of FCRAM at 0xF0000000, and Param1 is unused. When Param0 is value 0, this kernel buffer is mapped to process address Param1.<br />
|-<br />
| 4<br />
| No<br />
| Yes<br />
| Param0-Param3 are unused. This unmaps(?) the following virtual memory by writing value physaddr(where physaddr base is 0x80000000) to the L1 MMU table entries: 0x00300000..0x04300000, 0x08000000..0x0FE00000, and 0x10000000..0xF8000000.<br />
|-<br />
| 5<br />
| Yes<br />
| Yes<br />
| ?<br />
|-<br />
| 6<br />
| Yes<br />
| No<br />
| Debug related?<br />
|-<br />
| 7<br />
| Yes<br />
| No<br />
| This triggers ARM11 kernel [[I2C]] code, Param0-Param3 are unused. This ARM11 kernel I2C code will never return. Device address 0x4a via the second I2C bus is used here. This triggers a hardware system reboot via poking an I2C MCU register: register address 0x20 is written to with value 4.<br />
|-<br />
| 8<br />
| Yes<br />
| No<br />
| Alternate unused FIRM launch code-path, with different [[PXI]] FIFO word constants.<br />
|}<br />
<br />
= GetSystemInfo =<br />
Type0 value 26(Type1 is unused) writes the total number of processes which were directly launched by the kernel, to Output. For the NATIVE_FIRM/SAFE_MODE_FIRM ARM11 kernel, this is normally 5, for processes sm, fs, pm, loader, and pxi.<br />
<br />
= Kernel error-codes =<br />
{| class="wikitable" border="1"<br />
! Error-code value<br />
! Description<br />
|-<br />
| 0xD8E007F7<br />
| This error indicates that the input handle used with the SVC does not exist in the process handle-table, or that the handle kernel object type does not match the type used by the SVC.<br />
|-<br />
| 0xD92007EA<br />
| This error is returned when a process attempts to use svcCreateMemoryBlock when the process memorytype is the application memorytype, and when addr=0.<br />
|-<br />
| 0xF8C007F4<br />
| Invalid type/param0-param3 input for svcKernelSetState.<br />
|}</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Extdata&diff=5182
Extdata
2013-03-26T23:48:19Z
<p>Henke37: More titles I found on my system</p>
<hr />
<div>This page describes the format and encryption of extdata, "extra data" stored on [[SD_Filesystem|SD card]] and [[Flash_Filesystem|NAND]].<br />
At:<br />
* nand/data/<ID>/extdata/<ExtdataID-High><br />
* sdmc/Nintendo 3DS/<ID0>/<ID1>/extdata/<ExtdataID-High> <br />
<br />
(ExtdataID-High is always 00000000 for SD, and always 00048000 for NAND) Some titles can have Quota.dat stored in these directories. The directory-name for these directories is the ExtdataID-Low. Then there's a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.<br />
NAND stores the shared extdata and is structured exactly the same way, see [[Flash Filesystem]].<br />
<br />
Extdata image 00000001 contains a SAVE partition for the FST, the actual file data is stored in the following extdata images.<br />
<br />
Regular apps can only mount SD extdata using the same extdataID which is stored in the [[NCCH#CXI|CXI]] exheader. Therefore, regular apps which have the exheader extdataID set to zero can't use extdata. This restriction doesn't apply for shared extdata with extdataID high bitmask 0x48000 stored on NAND. System apps with a certain access right can mount arbitrary extdata.<br />
All NAND extdata is shared extdata, while all SD extdata is normal extdata. Thus, normal extdata doesn't exist on NAND, and shared extdata doesn't exist on SD. The extdataID high excluding that bitmask is always zero for shared extdata.<br />
<br />
=== Encryption ===<br />
<br />
These files are [[AES|encrypted]] with AES-CTR, the keyslot is initialized by [[nand/private/movable.sed|movable.sed]]. The same keyslot is used for the NAND/SD extdata MAC. The NAND extdata images are stored in cleartext. The WCHAR LowPath "/extdata/<ExtdataIDHigh>/<ExtdataIDLow>/<PathToImage>" text path is hashed with SHA-256, including the WCHAR null-terminator. A separate hash is used for Quota.dat. The base CTR seems to be then generated by XORing the calculated hash: CTRword[i] = Hashword[i] ^ Hashword[4+i].<br />
<br />
The base CTR is fixed therefore the CTR never changes after each write. Thus it is possible to obtain some cleartext by XORing one file(like newly created extdata) with a newer file, where the newer file overwrote zeros in the original file with non-zero data.<br />
<br />
=== Filesystem ===<br />
<br />
Most extdata uses the same FS as [[savegames]], except extdata uses [[Savegames|DIFF]] instead of DISA. However some extdata files are raw, without any FS.<br />
Quota.dat is an extdata image, however it's unknown what this is used for.<br />
<br />
'''QUOT'''<br />
<br />
* This is contained in the Quota.dat extdata image.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Magic ("QUOT")<br />
|-<br />
| 0x4<br />
| 4<br />
| Magic Number (0x30000)<br />
|-<br />
| 0x8<br />
| 8<br />
| Unknown<br />
|-<br />
| 0x10<br />
| 0x38<br />
| Unknown<br />
|}<br />
<br />
==== Filesystem structure ====<br />
<br />
When extdata is created, these are *always* created regardless of whether the title actually uses them.<br />
User extdata and SpotPass extdata use separate [[FS:OpenArchive|mount]] points at /user and /boss. Therefore one mount can't access the other directory, and also can't access /icon.(The title's SpotPass extdata can be mounted by the title itself, if it uses SpotPass)<br />
<br />
* /icon This file contains the extdata [[SMDH|icon]] displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. This file can't be read directly, instead it is read via [[FS:ReadExtSaveDataIcon]].<br />
* /user/ Contains the title's actual extdata files.<br />
* /boss/ Can contain [[SpotPass]] content. SpotPass content can only be downloaded to this /boss directory.<br />
<br />
* /user/ExBanner This directory can optionally store [[Extended_Banner| extended banners]]. When this is available, this banner is displayed instead of the [[CXI]] ExeFS banner. COMMON.bin stores the common exbanner, while <regionlang_code>.bin stores an optional separate region/language specific banner.(regionlang_code can be "JPN_JP", "USA_EN", etc)<br />
<br />
=== SD Extdata ===<br />
Usually the ExtdataID low is in the format '00<Unique ID>'<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! JPN ExtdataID<br />
! USA ExtdataID<br />
! EUR ExtdataID<br />
! Description<br />
! Extdata images<br />
|-<br />
| 00000082<br />
| 0000008f<br />
| 00000098<br />
| Homemenu extdata<br />
| <br />
|-<br />
| ?<br />
| 000004aa<br />
| 000004ab<br />
| Nintendo Video Extra Data<br />
This is where the video files are stored, and [[Nintendo_Video|includes]] the thumbnail, the description, and possibly some checksum info in each video file stored in the extdata images. There are always 9 files within the subdirectory "00000000" of this folder, even without any videos downloaded. The files are "00000001" - "00000009", and "00000003" - "00000008" have the same filesize of 50.7 MB. It is possible to restore the older videos by overwriting all the files within this directory. Provided of course you have made a backup of the files before hand, by copying all the files within this directory to your computer. As far I'm aware its not possible to mix and match the files in order to get certain videos in one grouping, ie. having all 3 Zelda orchestral recordings in one group of 4 Nintendo videos.<br />
| <br />
|-<br />
| 00000207<br />
| 00000217<br />
| 00000227<br />
| Mii Maker, contains an ExBanner<br />
| [https://dl.dropbox.com/u/20520664/extdata00000217.zip cleartext]<br />
|-<br />
| ?<br />
| ?<br />
| 00000228<br />
| Streetpass Mii Plaza<br />
| 11 mb big!<br />
|-<br />
| 0000020d<br />
| 0000021d<br />
| 0000022d<br />
| Face Raiders, likely contains an ExBanner<br />
| <br />
|-<br />
| 00000200<br />
| 00000210<br />
| 00000220<br />
| [[System_Settings|System Settings]] extdata added with [[2.0.0-2]].<br />
| <br />
|-<br />
| 00000209<br />
| 00000219<br />
| 00000229<br />
| eShop<br />
| <br />
|-<br />
|?<br />
|00000308<br />
|00000307<br />
|Mario Kart 7<br />
|<br />
|-<br />
| 0000030b<br />
| 0000030d<br />
| 0000030c<br />
| Nintendogs + Cats<br />
| <br />
|-<br />
| ?<br />
| 00000326<br />
| 00000326<br />
| Pokédex 3D<br />
| <br />
|-<br />
| 00000305<br />
| 0000032d<br />
| 0000033c<br />
| Super Street Fighter IV 3D<br />
| <br />
|-<br />
| 00000328<br />
| 00000358<br />
| 0000033b<br />
| Ridge Racer 3D<br />
| <br />
|-<br />
| ?<br />
| 0000034d<br />
| 00000402<br />
| Samurai Warriors Chronicles<br />
| <br />
|-<br />
| ?<br />
| 0000034f<br />
| 0000038a<br />
| Dead or Alive Dimensions<br />
| <br />
|-<br />
| 00000481<br />
| N/A<br />
| N/A<br />
| Monster Hunter Tri G (Download-Quests)<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000a86<br />
| Professor Layton and the Miracle Mask<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000c24<br />
| Denpa men<br />
| <br />
|-<br />
| ?<br />
| ?<br />
| 00000d9a<br />
| Donkey Kong Country Returns 3d Trialer<br />
|}<br />
<br />
=== NAND Shared Extdata ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! ExtdataID<br />
! Description<br />
|-<br />
| 0xf0000001<br />
| NAND JPEG/MPO files from the camera application are stored here<br />
|-<br />
| 0xf0000002<br />
| NAND M4A files from the sound application are stored here<br />
|-<br />
| 0xf0000009<br />
| Contains Miis and some data relating (including cached ICN data) to Play/Usage Records.<br />
|-<br />
| 0xf000000b<br />
| Contains idb.dat, idbt.dat, and gamecoin.dat<br />
|-<br />
| 0xf000000c<br />
| Contains bashotorya.dat<br />
|}</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Extdata&diff=4550
Extdata
2012-12-23T18:34:21Z
<p>Henke37: new ext data ids</p>
<hr />
<div>This page describes the format and encryption of extdata, "extra data" stored on [[SD_Filesystem|SD card]] and [[Flash_Filesystem|NAND]].<br />
At:<br />
* nand/data/<ID>/extdata/<ExtdataID-High><br />
* sdmc/Nintendo 3DS/<ID0>/<ID1>/extdata/<ExtdataID-High> <br />
<br />
(ExtdataID-High is always 00000000 for SD, and always 00048000 for NAND) Some titles can have Quota.dat stored in these directories. The directory-name for these directories is the ExtdataID-Low. Then there's a sub-directory 00000000, which contains the actual extdata. Size and number of files in this dir varies per title.<br />
NAND stores the shared extdata and is structured exactly the same way, see [[Flash Filesystem]].<br />
<br />
Extdata image 00000001 contains a SAVE partition for the FST, the actual file data is stored in the following extdata images.<br />
<br />
Regular apps can only mount SD extdata using the same extdataID which is stored in the [[NCCH#CXI|CXI]] exheader. Therefore, regular apps which have the exheader extdataID set to zero can't use extdata. This restriction doesn't apply for shared extdata with extdataID high bitmask 0x48000 stored on NAND. System apps with a certain access right can mount arbitrary extdata.<br />
All NAND extdata is shared extdata, while all SD extdata is normal extdata. Thus, normal extdata doesn't exist on NAND, and shared extdata doesn't exist on SD. The extdataID high excluding that bitmask is always zero for shared extdata.<br />
<br />
=== Encryption ===<br />
<br />
These files are [[AES|encrypted]] with AES-CTR, the keyslot is initialized by [[nand/private/movable.sed|movable.sed]]. The same keyslot is used for the NAND/SD extdata MAC. The NAND extdata images are stored in cleartext. The WCHAR LowPath "/extdata/<ExtdataIDHigh>/<ExtdataIDLow>/<PathToImage>" text path is hashed with SHA-256, including the WCHAR null-terminator. A separate hash is used for Quota.dat. The base CTR seems to be then generated by XORing the calculated hash: CTRword[i] = Hashword[i] ^ Hashword[4+i].<br />
<br />
The base CTR is fixed therefore the CTR never changes after each write. Thus it is possible to obtain some cleartext by XORing one file(like newly created extdata) with a newer file, where the newer file overwrote zeros in the original file with non-zero data.<br />
<br />
=== Filesystem ===<br />
<br />
Most extdata uses the same FS as [[savegames]], except extdata uses [[Savegames|DIFF]] instead of DISA. However some extdata files are raw, without any FS.<br />
Quota.dat is an extdata image, however it's unknown what this is used for.<br />
<br />
'''QUOT'''<br />
<br />
* This is contained in the Quota.dat extdata image.<br />
<br />
{| class="wikitable"<br />
|-<br />
! Start<br />
! Length<br />
! Description<br />
|-<br />
| 0x0<br />
| 4<br />
| Magic ("QUOT")<br />
|-<br />
| 0x4<br />
| 4<br />
| Magic Number (0x30000)<br />
|-<br />
| 0x8<br />
| 8<br />
| Unknown<br />
|-<br />
| 0x10<br />
| 0x38<br />
| Unknown<br />
|}<br />
<br />
==== Filesystem structure ====<br />
<br />
When extdata is created, these are *always* created regardless of whether the title actually uses them.<br />
User extdata and SpotPass extdata use separate [[FS:OpenArchive|mount]] points at /user and /boss. Therefore one mount can't access the other directory, and also can't access /icon.(The title's SpotPass extdata can be mounted by the title itself, if it uses SpotPass)<br />
<br />
* /icon This file contains the extdata [[SMDH|icon]] displayed in data management. This icon can only be written to by titles when creating extdata, titles would have to recreate extdata to change the icon. This file can't be read directly, instead it is read via [[FS:ReadExtSaveDataIcon]].<br />
* /user/ Contains the title's actual extdata files.<br />
* /boss/ Can contain [[SpotPass]] content. SpotPass content can only be downloaded to this /boss directory.<br />
<br />
* /user/ExBanner This directory can optionally store [[Extended_Banner| extended banners]]. When this is available, this banner is displayed instead of the [[CXI]] ExeFS banner. COMMON.bin stores the common exbanner, while <regionlang_code>.bin stores an optional separate region/language specific banner.(regionlang_code can be "JPN_JP", "USA_EN", etc)<br />
<br />
=== SD Extdata ===<br />
Usually the ExtdataID low is in the format '00<Unique ID>'<br />
<br />
{| class="wikitable" border="1"<br />
|-<br />
! JPN ExtdataID<br />
! USA ExtdataID<br />
! EUR ExtdataID<br />
! Description<br />
|-<br />
| 00000082<br />
| 0000008f<br />
| 00000098<br />
| Homemenu extdata<br />
|-<br />
| ?<br />
| 000004aa<br />
| 000004ab<br />
| Nintendo Video Extra Data<br />
This is where the video files are stored, and [[Nintendo_Video|includes]] the thumbnail, the description, and possibly some checksum info in each video file stored in the extdata images. There are always 9 files within the subdirectory "00000000" of this folder, even without any videos downloaded. The files are "00000001" - "00000009", and "00000003" - "00000008" have the same filesize of 50.7 MB. It is possible to restore the older videos by overwriting all the files within this directory. Provided of course you have made a backup of the files before hand, by copying all the files within this directory to your computer. As far I'm aware its not possible to mix and match the files in order to get certain videos in one grouping, ie. having all 3 Zelda orchestral recordings in one group of 4 Nintendo videos.<br />
|-<br />
| 00000207<br />
| 00000217<br />
| 00000227<br />
| Mii Maker, likely contains an ExBanner<br />
|-<br />
| 0000020d<br />
| 0000021d<br />
| 0000022d<br />
| Face Raiders, likely contains an ExBanner<br />
|-<br />
| 00000200<br />
| 00000210<br />
| 00000220<br />
| [[System_Settings|System Settings]] extdata added with [[2.0.0-2]].<br />
|-<br />
| 00000209<br />
| 00000219<br />
| 00000229<br />
| eShop<br />
|-<br />
| 0000030b<br />
| 0000030d<br />
| 0000030c<br />
| Nintendogs + Cats<br />
|-<br />
| ?<br />
| 00000326<br />
| 00000326<br />
| Pokédex 3D<br />
|-<br />
| 00000305<br />
| 0000032d<br />
| 0000033c<br />
| Super Street Fighter IV 3D<br />
|-<br />
| 00000328<br />
| 00000358<br />
| 0000033b<br />
| Ridge Racer 3D<br />
|-<br />
| ?<br />
| 0000034d<br />
| 00000402<br />
| Samurai Warriors Chronicles<br />
|-<br />
| ?<br />
| 0000034f<br />
| 0000038a<br />
| Dead or Alive Dimensions<br />
|-<br />
| 00000481<br />
| N/A<br />
| N/A<br />
| Monster Hunter Tri G (Download-Quests)<br />
|-<br />
| ?<br />
| ?<br />
| 00000a86<br />
| Professor Layton and the miracle mask<br />
|-<br />
| ?<br />
| ?<br />
| 00000c24<br />
| Denpa men<br />
|}<br />
<br />
=== NAND Shared Extdata ===<br />
{| class="wikitable" border="1"<br />
|-<br />
! ExtdataID<br />
! Description<br />
|-<br />
| 0xf0000001<br />
| NAND JPEG/MPO files from the camera application are stored here<br />
|-<br />
| 0xf0000002<br />
| NAND M4A files from the sound application are stored here<br />
|-<br />
| 0xf0000009<br />
| Contains Miis and some data relating (including cached ICN data) to Play/Usage Records.<br />
|-<br />
| 0xf000000b<br />
| Contains idb.dat, idbt.dat, and gamecoin.dat<br />
|-<br />
| 0xf000000c<br />
| Contains bashotorya.dat<br />
|}</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Nintendo_3DS_Sound&diff=4308
Nintendo 3DS Sound
2012-11-18T06:00:38Z
<p>Henke37: and another category</p>
<hr />
<div>Nintendo 3DS Sound is the music playing and audio recording application that is included with all retail consoles.<br />
<br />
It loads audio files from the sd card. It supports MP3 and AAC encoded audio files and supports m3u playlists.<br />
<br />
== Playlist file format==<br />
The application allows for user created playlists. They are stored on the SD card.<br />
<br />
{| class="wikitable" border="1"<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Magic bytes, 'O', 'V', 'A', 'F' or "FAVO" endian corrected.<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Always integer with value 16<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Seems static?<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Zero Padding<br />
|-<br />
| 0x10<br />
| 0x2<br />
| Varies?<br />
|-<br />
| 0x12<br />
| 0x2<br />
| Icon<br />
|-<br />
| 0x14<br />
| 0x2<br />
| Song file count<br />
|-<br />
| 0x20<br />
| 0x100<br />
| Playlist name stored in UTF-16<br />
|-<br />
| 0x120+n*size<br />
| 692<br />
| File name stored in UTF-16. Repeats for the rest of the file.<br />
|}<br />
<br />
[[Category:File formats]]<br />
[[Category:Nintendo Software]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Nintendo_3DS_Sound&diff=4307
Nintendo 3DS Sound
2012-11-18T05:59:33Z
<p>Henke37: other supported format</p>
<hr />
<div>Nintendo 3DS Sound is the music playing and audio recording application that is included with all retail consoles.<br />
<br />
It loads audio files from the sd card. It supports MP3 and AAC encoded audio files and supports m3u playlists.<br />
<br />
== Playlist file format==<br />
The application allows for user created playlists. They are stored on the SD card.<br />
<br />
{| class="wikitable" border="1"<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Magic bytes, 'O', 'V', 'A', 'F' or "FAVO" endian corrected.<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Always integer with value 16<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Seems static?<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Zero Padding<br />
|-<br />
| 0x10<br />
| 0x2<br />
| Varies?<br />
|-<br />
| 0x12<br />
| 0x2<br />
| Icon<br />
|-<br />
| 0x14<br />
| 0x2<br />
| Song file count<br />
|-<br />
| 0x20<br />
| 0x100<br />
| Playlist name stored in UTF-16<br />
|-<br />
| 0x120+n*size<br />
| 692<br />
| File name stored in UTF-16. Repeats for the rest of the file.<br />
|}<br />
<br />
[[Category:File formats]]</div>
Henke37
https://www.3dbrew.org/w/index.php?title=Nintendo_3DS_Sound&diff=4306
Nintendo 3DS Sound
2012-11-18T05:56:47Z
<p>Henke37: what little i could figure out by staring at the binary data</p>
<hr />
<div>Nintendo 3DS Sound is the music playing and audio recording application that is included with all retail consoles.<br />
<br />
It loads audio files from the sd card. It supports MP3 and XXX audio files and supports m3u playlists.<br />
<br />
== Playlist file format==<br />
The application allows for user created playlists. They are stored on the SD card.<br />
<br />
{| class="wikitable" border="1"<br />
! Offset<br />
! Size<br />
! Description<br />
|-<br />
| 0x0<br />
| 0x4<br />
| Magic bytes, 'O', 'V', 'A', 'F' or "FAVO" endian corrected.<br />
|-<br />
| 0x4<br />
| 0x4<br />
| Always integer with value 16<br />
|-<br />
| 0x8<br />
| 0x4<br />
| Seems static?<br />
|-<br />
| 0xC<br />
| 0x4<br />
| Zero Padding<br />
|-<br />
| 0x10<br />
| 0x2<br />
| Varies?<br />
|-<br />
| 0x12<br />
| 0x2<br />
| Icon<br />
|-<br />
| 0x14<br />
| 0x2<br />
| Song file count<br />
|-<br />
| 0x20<br />
| 0x100<br />
| Playlist name stored in UTF-16<br />
|-<br />
| 0x120+n*size<br />
| 692<br />
| File name stored in UTF-16. Repeats for the rest of the file.<br />
|}<br />
<br />
[[Category:File formats]]</div>
Henke37