Homebrew Crowd Sourcing .text segment size

  • Thread starter Thread starter Mastak
  • Start date Start date
  • Views Views 2,602
  • Replies Replies 17
  • Likes Likes 5

Mastak

Well-Known Member
Member
Joined
Oct 17, 2015
Messages
139
Reaction score
63
Trophies
0
Age
36
XP
215
Country
United States
The .text segment is the part of a Title that contains executable code where homebrew code is copied into.
By finding titles with a larger .text segment more cool things are possible: Larger homebrews and dynamic recompilation (for faster emulation).

Your job is:
1. Run querymem from homebrew menu, you are prompted for a target title.
2. Select any title and press A
3. The homebrew launches and prints the size in Bytes/Megabytes
4. Post the title you launched and the size

If step 3 crashes (happens for some titles), goto 1 and select a different title.
Titles with less then 4 MB are not interesting, the more the better.

Besides bought stuff from the Shop also test cartridges please (the best would be of course some free app from the Shop)

I start:
Updated Youtube channel: 10 MB
Yoshis New Island: 6 MB

Not interesting:
System Settings: 1.41 MB
(Download play, Smash Bros Demo: Crash)
Face Raiders, AR games, Pokedex 3D: less then 3 MB
 

Attachments

Last edited by Mastak,
Holy crapsacks:
Monster Hunter 4U Demo: 11.07MB <-- Free, excellent target

Meh:
3D Sonic the Hedgehog: 5.30MB
Heroes of Ruin: 4.11MB
YouTube: 3.66MB

Uninteresting:
3D Galaxy Force II: 2.21MB
Code of Princess: 2.71MB
Crush3D: 1.45MB
Epic Mickey: Power of Illusion: 1.02MB
Ironfall Invasion: 2.06MB
Photos with Mario: 1.32MB
Pilotwings Resort: 1.80MB
Pokémon Shuffle: 1.81MB
Puzzle & Dragon Z Demo: crash
 
Monster Hunter 4U Special Demo: 11.07MB
Super Smash Bros. Demo: 10.12MB
Monster Hunter 3U: 10.00MB

Pokemon Rumble World: Crash
The Last Ranger: 2.93MB
Flipnote Studio 3D: Crash
Steamworld Dig: Crash

Steel Diver - Sub Wars: 2.32MB
Pokemon OmegaRuby: 4.48MB
 
Sorted from biggest to smallest (top to bottom):
Fantasy Life: 5.11 MB
Mario Kart 7: 4.86 MB
Mario Golf World Tour: 4.83 MB
Pokemon X: 4.23 MB
Pokemon Y: 4.23 MB
Shovel Knight: 2.87 MB
Paper Mario Sticker Star: 2.84 MB
Flipnote Studio 3D: 2.36MB
Steel Diver Sub Wars: 2.32 MB
Urban Trial Freestyle: 1.46 MB
Soccer Up 3D: 1.16 MB
The Legend of Zelda VC: 0.80 MB

Super Mario Bros VC: Crash (white screen on bottom)
Kirby Triple Deluxe: Crash (white screen on bottom)
Ocarina of Time 3D: Crash (white screen)
Pokemon Rumble World: Crash (white screen)
Tomodachi Life: Crash
Animal Crossing New Leaf: Crash
 
MH4U Demo seems to be the best out of the stuff we have found so far, however it just crashes when i try the full game. (cartridge)
 
Sorted from most to least and titles of interest are bolded:

The Legend of Zelda: A Link Between Worlds: 5.57 MB
The Legend of Zelda: Majora's Mask 3D: 5.11 MB
Pokemon ORAS Demo: 4.40 MB
Phoenix Wright Dual Destinies: 4.11 MB

The Legend of Zelda: Ocarina of Time 3D: 3.79 MB
Professor Layton vs Phoenix Wright: 2.16 MB
Cubic Ninja: 1.85 MB
Ace Attorney Trilogy: 1.33 MB

Virtue's Last Reward Demo: Crash (Top white screen)
EDGE: Crash (Top white screen)
VVVVVV: Crash (Bottom grey screen)
Pokemon Mystery Dungeon Gates to Infinity Demo: Crash
Starfox 64 3D: Crash
Super Smash Bros 3D: Crash
Metal Gear Solid 3D: Crash
 
Last edited by Pandaxclone2,
Which homebrew did you use to launch Smash Bros Demo and Monster Hunter 4 Demo?
They would be really excellent but both directly crash for me with Themehax :/
 
@Mastak, Themehax here. If I had to guess, I'd say you're on an original 3DS? svdt and the other save managers have issues running under these mixed-mode games (Old+New 3DS) when on an original model, while they work correctly on New 3DS; I figure this might be the same issue.
 
  • Like
Reactions: teampleb
Super Smash Bros Demo - 10.12Mb
Tomodachi Life Demo - 7.31Mb
Gates to Infinity Demo - 6.89Mb
The Legend of Zelda Link Between Worlds - 5.57Mb
Sonic Lost World Demo - 4.92Mb
Pokémon Alpha Sapphire - 4.48Mb
Bravely Default Demo - 4.27Mb

Tri Force Heroes Demo (crashes on red screen)
Fire Emblem Awakening Demo: (crashes on grey screen)
Sonic Boom (crashes on grey screen)
Pokémon Shuffle (crashes on grey screen)
P&DZ Special Demo (crashes on red screen)
 
My friend on another forum gave me his results while running querymem with his titles and he wanted me to share it here so:

(These are European region games)

Pokémon X: 4.23MB (4440064 bytes)
Pokémon Alpha Sapphire: 4.48MB (4694046 bytes)
Pokémon Rumble World (1.0) : 4.67MB (4898816 bytes)


Puzzle & Dragons Z + Puzzle & Dragons SMB: 1.20MB (12553376 bytes)
Persona Q: 3.79MB (3973120 bytes)
Professor Layton and the Azran Legacy: 2.60MB (2727936 bytes)
Fire Emblem Awakening: 3.36MB (3518464 bytes)
Fairune: 0.79 MB (823296 bytes)
Super Mario 3D Land: 2.63MB (2760704 bytes)
Super Mario Bros. Deluxe (GBC) : 0.65MB (684032 bytes)
IronFall Invasion (1.0) : 2.06MB (2158592 bytes)


Super Smash Bros. For 3DS: Unknown (top screen goes white-> black, bottom remains white)
The Legend of Zelda: A Link Between Worlds: Unknown (White Screen)
Sumico: Unknown (White Screen)
Gunman Clive 2: Unknown (Same symptoms as Smash 4)
Edge: Unknown (White Screen)
Monster Combine TD: Unknown (White Screen)
Talking Phrasebook: Unknown (White Screen)
 
Tested with all games I own

Pokemon X 4.23MB
Pokemon Alpha Sapphire 4.48MB
Mario & Luigi Dream Team 5.24MB
Smash Bros for Nintendo 3ds crashes
Mario Kart 7 4.86MB
Super Mario 3D land 2.63MB
Zelda OOT3D 3.79MB
Super Pokemon Rumble 3.79MB
 
This seems interesting. Would you mind sharing querymem's source code?

The code is super boring, the hb menu does most of the work (by launching a different title):

The 0x00100000 is documented at 3dbrew

(sorry, without indentation, wanted to add some coloring instead ;))


#include <cstring>
#include <cstdio>
#include <3ds.h>
#include <3ds/svc.h>

int main()
{
gfxInitDefault();
consoleInit(GFX_TOP, NULL);

MemInfo meminfo;
PageInfo pageinfo;
svcQueryMemory(&meminfo, &pageinfo, 0x00100000);
printf("%ld Byte\n%.2f MB\n", meminfo.size, (float)meminfo.size /1024.0/ 1024.0);

while (aptMainLoop())
{
gspWaitForVBlank();
hidScanInput();

u32 kDown = hidKeysDown();
if (kDown & KEY_START) break;

gfxFlushBuffers();
gfxSwapBuffers();
}

gfxExit();
return 0;

}
 
Last edited by Mastak,
The code is super boring, the hb menu does most of the work (by launching a different title):

The 0x00100000 is documented at 3dbrew

(sorry, without indentation, wanted to add some coloring instead ;))

Many thanks comrade! I'd been wondering how exactly the title select stuff worked and what exactly it did, this brings me That much closer!
 
Out of curiosity since this appears to have stopped, I assume this would allow extra memory for something so does anyone know of an application this could be used for? Or is it just checking what has the most memory?
 
The answer comes a bit late... sorry for the push:

@Pandaxclone2:
The main motivation for this was to find suitable target titles where to run the EasyRPG Player (newer topic with working port) in because all it's dependencies are quite huge (4.5 MB currently, with all audio libs linked in I expect 5 MB). I investigated this problem already half a year ago ^^
You don't really need 4.5 MB in this case because 3dsx files are splitted in executable code and data. Only the executable code size must fit in the ".text" segment.

Homebrew Launching works by taking over a target title and overwriting the executable memory (.text) and jumping to it. Additional free ".text" space could be also used to store generated code of JIT compilers to make emulation faster e.g.
You can also take over the currently inserted cartridge, if you insert one with enough .text space you can also launch larger homebrew without problems.

In the meanwhile this got basicly solved thanks to Nintendo. The updated youtube channel has 10 MB (!), so it is a great target title for everything :).

If anybody of you can't install for any reason the new youtube channel: Feel free to extend the list now with further posts ^^.
 
Last edited by Mastak,

Site & Scene News

Popular threads in this forum