maximum code/data size for homebrew loader

Discussion in '3DS - Homebrew Development and Emulators' started by elhobbs, Nov 1, 2015.

  1. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    762
    284
    Jul 28, 2008
    United States
    Does anyone know if there is a maximum code or data size for for loading homebrew. I am working on a project with a fair amount of code and data and it is hanging at the red screen when loading. this occurs on both hax 1.1b and 2.5
    Code:
    $ arm-none-eabi-size.exe
       text    data     bss     dec 
    2061296   42008 8955572 11058876
    I am using std::map as well - I thought I saw a thread that mentioned issues with this but I cant seem to find it. if someone knows the issue then a link would be appreciated. thank you.
     
  2. TheCruel

    TheCruel Developer

    Banned
    1,351
    2,882
    Dec 6, 2013
    United States
    There are limits, and the limits can be overcome by specifying a target process in xml descriptor which uses a comparable amount of code.

    I checked a sizable 3ds elf of mine:

    Code:
       text      data       bss       dec       hex
    2379656     25712     83088    2488456    25f888   
    Your bss is huge lol

    Btw, I use std::map as well as vector, queue, and such STL containers. I'm not aware of any problem with these.
     
    Last edited by TheCruel, Nov 1, 2015
  3. pdapanda

    pdapanda GBAtemp Advanced Fan

    Member
    709
    241
    Nov 19, 2014
    Switzerland
    Why not ask smea?
     
  4. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    762
    284
    Jul 28, 2008
    United States
    good to know. Do you have any any info on the xml descriptor format or an example I could use as a reference?

    — Posts automatically merged - Please don't double post! —

    what is the best way to do that?
     
  5. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,491
    3,878
    Jun 9, 2007
    If you want to pick a title to launch under, you can do this:

    Code:
    <targets selectable="false">
    <title mediatype="1">000400000015D800</title>
    <title mediatype="1">000400000015B100</title>
    </targets>
    
    Mediatypes (correct me if I'm wrong, going off the top of my head):
    0 = NAND
    1 = SD
    2 = Gamecard

    Set selectable to true if you want the user to be able to pick, ala Save Manager/SVDT.

    If you want to ask hax 2.x for specific services:

    Code:
    <services autodetect="false">
    <request priority="1">soc:U</request>
    </services>
    
     
    Last edited by daxtsu, Nov 1, 2015
  6. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    762
    284
    Jul 28, 2008
    United States
    ok, I feel like this creating more questions. sorry if I am being dense - but, how do I go about choosing a title id and why would I need to specify more than one?
     
  7. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,491
    3,878
    Jun 9, 2007
    If you specify titleids in the XML, the hax payload will automatically pick whichever one is applicable (so if you have the European ironfall on your system, in this example's case, it'll pick that one). Specifying more than one lets you cover multiple regions of the same game/app. For example, in my wifi toggle app, I used an XML file for a while that had every region's MSET's titleids in it so that it would automatically pick the correct one to launch as.
     
  8. TheCruel

    TheCruel Developer

    Banned
    1,351
    2,882
    Dec 6, 2013
    United States
    Btw, The </title> should be </request>. I think this used to work, but has since changed and this flawed xml no longer works, it caused me pain before smea mentioned it.
     
    daxtsu likes this.
  9. daxtsu

    daxtsu GBAtemp Guru

    Member
    5,491
    3,878
    Jun 9, 2007
    Thanks for the correction, I yanked it off Github from Rinnegatamante's one issue.
     
  10. elhobbs
    OP

    elhobbs GBAtemp Advanced Fan

    Member
    762
    284
    Jul 28, 2008
    United States
    ok - sadly, I think I need someone to spoon feed the answer to me. how do I go about picking a title to run under that will satisfy my code/data memory requirements?
     
  11. GBAFail

    GBAFail Smell my finger.

    Member
    491
    190
    Oct 26, 2015
    United States
    Uranus
    The monster hunter 4U special demo has the most executable memory available. Please note it can only be used to run homebrew on n3DS because it uses the extended memory mode. :D