Reply to thread
GBAtemp.net - The Independent Video Game Community
Search
Search titles only
By:
Search titles only
By:
Reply to thread
GBAtemp.net - The Independent Video Game Community
Home
Log in
Terms & Rules
Donate
Forums
New posts
Search forums
Groups
Public Events
New
New posts
New resources
New blog entries
New profile posts
New blog entry comments
New threadmarks
Latest activity
Cheats
Cheat Codes Add and Request group
The Legend of Zelda: Tears of the Kingdom cheat codes
Pokémon Legends: Arceus cheat codes
Xenoblade Chronicles 3 cheat codes
Fire Emblem Engage cheat codes
Request a cheat...
Tutorials
Nintendo Switch tutorials
Nintendo 3DS tutorials
Nintendo Wii U tutorials
Reviews
Overview
Official reviews
Downloads
Latest reviews
Search resources
Blogs
New entries
New comments
Blog list
Search blogs
Chat
Top chatters
Search
Search titles only
By:
Search titles only
By:
Log in
Register
New posts
Search forums
Log in
Register
Home
Forums
PC, Console & Handheld Discussions
Nintendo 3DS
How to retrieve icons for installed titles? [Homebrew dev. Question]
Menu
Install the app
Install
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="TurdPooCharger" data-source="post: 7768790" data-attributes="member: 439233"><p>Oh my bad. I read your first reply as in you were trying to retrieve information of an app that is already on 3DS. What you really meant is, you're looking for information on <strong>how</strong> a 3DS app (like FBI) displays information found on another 3DS app.</p><p></p><p>Edit : I am not a 3ds developer and have really primitive coding skills (ie, MATLAB scripting). However, I still would like to try to help you out. Those little icons in the CIA files of games and apps are smdh types. I was looking through the source code on how FBI displays that icon and this piece of code caught my attention.</p><p></p><p>In <a href="https://github.com/Steveice10/FBI/archive/2.4.14.zip" target="_blank">FBI-2.4.14.zip</a> > <strong>core</strong> folder > <strong>util.c</strong></p><p><strong></strong></p><p>[CODE]Result util_get_cia_file_smdh(SMDH* smdh, Handle handle) {</p><p> Result res = 0;</p><p></p><p> if(smdh != NULL) {</p><p> u32 bytesRead = 0;</p><p></p><p> u32 header[8];</p><p> if(R_SUCCEEDED(res = FSFILE_Read(handle, &bytesRead, 0, header, sizeof(header))) && bytesRead == sizeof(header)) {</p><p> u32 headerSize = (header[0] + 0x3F) & ~0x3F;</p><p> u32 certSize = (header[2] + 0x3F) & ~0x3F;</p><p> u32 ticketSize = (header[3] + 0x3F) & ~0x3F;</p><p> u32 tmdSize = (header[4] + 0x3F) & ~0x3F;</p><p> u32 metaSize = (header[5] + 0x3F) & ~0x3F;</p><p> u64 contentSize = ((header[6] | ((u64) header[7] << 32)) + 0x3F) & ~0x3F;</p><p></p><p> if(metaSize >= 0x3AC0) {</p><p> res = FSFILE_Read(handle, &bytesRead, headerSize + certSize + ticketSize + tmdSize + contentSize + 0x400, smdh, sizeof(SMDH));</p><p> } else {</p><p> res = R_FBI_BAD_DATA;</p><p> }</p><p> }</p><p> } else {</p><p> res = R_FBI_INVALID_ARGUMENT;</p><p> }</p><p></p><p> return res;</p><p>}[/CODE]</p><p></p><p>The reason why I think this piece is relevant is because there are other lines of util_get codes for file name, title ID, tmd, etc. I could not find other 'smdh' key word search that seemed relevant. Hope this can be adapted or provides a path in your search for icon display.</p><p></p><p>Edit #2: Also within that zip <strong>> ui > section > action > extractsmdh.c</strong></p></blockquote><p></p>
[QUOTE="TurdPooCharger, post: 7768790, member: 439233"] Oh my bad. I read your first reply as in you were trying to retrieve information of an app that is already on 3DS. What you really meant is, you're looking for information on [B]how[/B] a 3DS app (like FBI) displays information found on another 3DS app. Edit : I am not a 3ds developer and have really primitive coding skills (ie, MATLAB scripting). However, I still would like to try to help you out. Those little icons in the CIA files of games and apps are smdh types. I was looking through the source code on how FBI displays that icon and this piece of code caught my attention. In [URL='https://github.com/Steveice10/FBI/archive/2.4.14.zip']FBI-2.4.14.zip[/URL] > [B]core[/B] folder > [B]util.c [/B] [CODE]Result util_get_cia_file_smdh(SMDH* smdh, Handle handle) { Result res = 0; if(smdh != NULL) { u32 bytesRead = 0; u32 header[8]; if(R_SUCCEEDED(res = FSFILE_Read(handle, &bytesRead, 0, header, sizeof(header))) && bytesRead == sizeof(header)) { u32 headerSize = (header[0] + 0x3F) & ~0x3F; u32 certSize = (header[2] + 0x3F) & ~0x3F; u32 ticketSize = (header[3] + 0x3F) & ~0x3F; u32 tmdSize = (header[4] + 0x3F) & ~0x3F; u32 metaSize = (header[5] + 0x3F) & ~0x3F; u64 contentSize = ((header[6] | ((u64) header[7] << 32)) + 0x3F) & ~0x3F; if(metaSize >= 0x3AC0) { res = FSFILE_Read(handle, &bytesRead, headerSize + certSize + ticketSize + tmdSize + contentSize + 0x400, smdh, sizeof(SMDH)); } else { res = R_FBI_BAD_DATA; } } } else { res = R_FBI_INVALID_ARGUMENT; } return res; }[/CODE] The reason why I think this piece is relevant is because there are other lines of util_get codes for file name, title ID, tmd, etc. I could not find other 'smdh' key word search that seemed relevant. Hope this can be adapted or provides a path in your search for icon display. Edit #2: Also within that zip [B]> ui > section > action > extractsmdh.c[/B] [/QUOTE]
Insert quotes…
Verification
Post reply
Home
Forums
PC, Console & Handheld Discussions
Nintendo 3DS
How to retrieve icons for installed titles? [Homebrew dev. Question]
General chit-chat
Help
Users
Settings
Notifications
Miscellaneous
Inverse message direction
Display editor on top
Enable maximized mode
Display images as links
Hide bot messages
Hide statuses
Hide chatter list
Show messages from ignored users
Temporarily disable chat
Receive mention alerts
Sound notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Desktop notifications
Normal messages
Private messages
Whisper messages
Mention messages
Bot messages
Options
Options
View top chatters
No one is chatting at the moment.
@
Psionic Roshambo
:
Also what is this S20 Ultra crap... I want the S24 Ultra lol
Today at 5:47 PM
@
Psionic Roshambo
:
1TB edition...
Today at 5:49 PM
@
Psionic Roshambo
:
At least the 20 you can add MicroSD up to 1TB lol
Today at 5:49 PM
@
Sicklyboy
:
ohio
+1
Today at 6:03 PM
@
Psionic Roshambo
:
Nani?
Today at 6:11 PM
@
K3Nv2
:
Sieg heil
Today at 6:12 PM
@
Psionic Roshambo
:
Happy quanza lol
Today at 6:12 PM
@
Psionic Roshambo
:
Honda Mitsubishi Sony Sushi kun!
Today at 6:13 PM
@
K3Nv2
:
2 hours on this file transfer lol
+1
Today at 6:14 PM
@
K3Nv2
:
https://youtu.be/j3OhV1och50?si=7RFGXMYCwKgKIZ5G
the drake and Kendrick love story continues
Today at 6:18 PM
@
Arne214
:
hi guys, i installed some games using the WUP installer and in the settings the drive shows the games, but they are not visible on the Wii U menu. Can someone help? Thanks
Today at 6:26 PM
@
BakerMan
:
has anyone ever made a gbatemp slander video?
Today at 6:34 PM
@
K3Nv2
:
Why do that when they make bogus accounts
Today at 6:35 PM
@
K3Nv2
:
https://www.techradar.com/pro/scien...ly-good-energy-density-and-charges-in-seconds
Today at 6:43 PM
@
BakerMan
:
guys, should i comment "I'm leaving you" on some random ass community post on yt?
Today at 6:45 PM
@
Psionic Roshambo
:
That goat never loved you!
+1
Today at 6:48 PM
@
Psionic Roshambo
:
https://www.youtube.com/watch?v=DPqqmCE1M1U
Today at 6:49 PM
@
BakerMan
:
guys, i'm going to say smth different
+1
Today at 7:02 PM
@
BakerMan
:
"I'm cheating on you with your hamster's cousin's owner's dog's favorite tree"
+1
Today at 7:02 PM
@
Xdqwerty
:
good afternoon
Today at 7:28 PM
@
Psionic Roshambo
:
https://www.youtube.com/watch?v=yNNo_VJKuHA
+1
Today at 7:28 PM
@
Xdqwerty
:
@Psionic Roshambo
, thats not orange thats blue
+1
Today at 7:29 PM
@
BakerMan
:
hello there
37 minutes ago
@
Xdqwerty
:
@BakerMan
, hi
37 minutes ago
@
haddad
:
anyone online can help me with my new 2ds xl please?!!
https://gbatemp.net/threads/help-plastic-slider-button-stuck.655399/
33 minutes ago
Submit
@
haddad
:
anyone online can help me with my new 2ds xl please...
33 minutes ago
Chat
0