Built a UnityForN3DS Demo -> crashes on (N)3DS before 3DS Boot Logo

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by xXDungeon_CrawlerXx, Jul 8, 2016.

  1. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    Hey Guys,

    I tried to build a Example Demo with UnityForN3DS but everytime I try to boot it on N3DS, it crashes before the 3DS Boot Logo shows up.
    I really don't know why :/

    Build Settings I used
    Player Settings I used

    After I built the Game for (N)3DS, I got a .cci-file.
    It is dev-encrypted so I used Decrypt9 "NCCH/NCSD Decryptor" to decrypt the cci-file.
    Decrypting worked fine. exheader, exefs and romfs are decrypted
    ExeFS and RomFS

    I converted the decrypted CCI with "makerom -ccitocia".
    Cia creation was successful. So I installed it with DevMenu on my N3DS with A9LH, AuReiNAND-CFW and EmuNAND with Firmware 11.0.
    Installation worked, too.
    But when I try to start it (through HomeMenu or DevMenu), it crashes before the 3DS Boot Logo shows up.
    Error Message (used one from the Internet, too lazy to make one of mine but it's still the same message)

    Does anyone know why it won't work?
    Would upload the cci because I made it by myself but I'm not sure if this is allowed on GBATemp.
     
    Last edited by xXDungeon_CrawlerXx, Jul 8, 2016
  2. zoogie

    zoogie simple pimp tool

    Member
    6,329
    7,998
    Nov 30, 2014
    United States
    -cci2cia or it's cousin always produce junk.

    That error is likely caused by cci2cia not bothering to switch the onSD flag. It's really poorly done, you're going to need a proper .rsf
     
    Last edited by zoogie, Jul 8, 2016
  3. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    Hm :/ Where can I get a proper .rsf for something like this?
    And how can I convert the cci to a cia then?
     
    Last edited by xXDungeon_CrawlerXx, Jul 8, 2016
  4. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    Okay, found a old tool I used a year ago or two, called "3ds_to_cia_v2.00".

    I used the following RSF-File
    Code:
    BasicInfo:
      Title                   : "DisaHome" # 0x0 exheader.bin
      CompanyCode             : "00" # 0x1110 game.3ds
      ProductCode             : "CTR-P-UT2D" # 0x1150 game.3ds
      ContentType             : Application
      Logo                    : Nintendo
    
    TitleInfo:
      UniqueId                : 0x0000dc93 # 0x1108 game.3ds in little endian
      Category                : Application
    
    CardInfo:
      MediaType               : Card1 # Card1 / Card2
    
    Option:
      UseOnSD                 : true
      FreeProductCode         : true # Removes limitations on ProductCode
      EnableCrypt             : false # Enables encryption for NCCH and CIA
      MediaFootPadding        : true # If true CCI files are created with padding
      EnableCompress          : true # Compresses exefs code
    
    AccessControlInfo:
      ExtSaveDataId: 0x0000dc93 # same as UniqueId
      SystemSaveDataId1: 0x00000000 # plaintext exheader
      SystemSaveDataId2: 0x00000000 # plaintext exheader
      OtherUserSaveDataId1: 0x00000 # plaintext exheader
      OtherUserSaveDataId2: 0x00000 # plaintext exheader
      OtherUserSaveDataId3: 0x00000 # plaintext exheader
      UseOtherVariationSaveData : false
    
    SystemControlInfo:
      SaveDataSize: 1M # plaintext exheader / 0x1C0 exheader.bin
      RemasterVersion: 0000 # 0xE exheader.bin
      StackSize: 0x00000000 # 0x1C exheader.bin
    
    ExeFs: # these are the program segments from the ELF, check your elf for the appropriate segment names
      ReadOnly:
      - .rodata
      - RO
      ReadWrite:
      - .data
      - RO
      Text:
      - .init
      - .text
      - STUP_ENTRY
    PlainRegion: # only used with SDK ELFs
    - .module_id
    AccessControlInfo:
      #UseExtSaveData : true
      #UseOtherVariationSaveData : false
      #ExtSaveDataId: 0xff40a
      #SystemSaveDataId1: 0x00000000
      #SystemSaveDataId2: 0x00000000
      #OtherUserSaveDataId1: 0x00000
      #OtherUserSaveDataId2: 0x00000
      #OtherUserSaveDataId3: 0x00000
      FileSystemAccess:
      - CategorySystemApplication
      - CategoryFileSystemTool
      - Debug
      #- TwlCardBackup
      #- TwlNandData
      #- Boss
      - DirectSdmc
      - SaveDataMove
      IdealProcessor                : 0
      AffinityMask                  : 1
      Priority                      : 16
      MaxCpu                        : 0x9E # Default
      DisableDebug                  : true
      EnableForceDebug              : false
      CanWriteSharedPage            : false
      CanUsePrivilegedPriority      : false
      CanUseNonAlphabetAndNumber    : false
      PermitMainFunctionArgument    : false
      CanShareDeviceMemory          : false
      RunnableOnSleep              : false
      SpecialMemoryArrange          : false
      CoreVersion                  : 2
      DescVersion                  : 2
      ReleaseKernelMajor            : "02"
      ReleaseKernelMinor            : "33"
      MemoryType                    : Application # Application / System / Base
      HandleTableSize: 512
      IORegisterMapping:
      - 1ff50000-1ff57fff
      - 1ff70000-1ff77fff
      MemoryMapping:
      - 1f000000-1f5fffff:r
      SystemCallAccess:
        ArbitrateAddress: 34
        Break: 60
        CancelTimer: 28
        ClearEvent: 25
        ClearTimer: 29
        CloseHandle: 35
        ConnectToPort: 45
        ControlMemory: 1
        CreateAddressArbiter: 33
        CreateEvent: 23
        CreateMemoryBlock: 30
        CreateMutex: 19
        CreateSemaphore: 21
        CreateThread: 8
        CreateTimer: 26
        DuplicateHandle: 39
        ExitProcess: 3
        ExitThread: 9
        GetCurrentProcessorNumber: 17
        GetHandleInfo: 41
        GetProcessId: 53
        GetProcessIdOfThread: 54
        GetProcessIdealProcessor: 6
        GetProcessInfo: 43
        GetResourceLimit: 56
        GetResourceLimitCurrentValues: 58
        GetResourceLimitLimitValues: 57
        GetSystemInfo: 42
        GetSystemTick: 40
        GetThreadContext: 59
        GetThreadId: 55
        GetThreadIdealProcessor: 15
        GetThreadInfo: 44
        GetThreadPriority: 11
        MapMemoryBlock: 31
        OutputDebugString: 61
        QueryMemory: 2
        ReleaseMutex: 20
        ReleaseSemaphore: 22
        SendSyncRequest1: 46
        SendSyncRequest2: 47
        SendSyncRequest3: 48
        SendSyncRequest4: 49
        SendSyncRequest: 50
        SetThreadPriority: 12
        SetTimer: 27
        SignalEvent: 24
        SleepThread: 10
        UnmapMemoryBlock: 32
        WaitSynchronization1: 36
        WaitSynchronizationN: 37
      InterruptNumbers:
      ServiceAccessControl:
      - APT:U
      - $hioFIO
      - $hostio0
      - $hostio1
      - ac:u
      - boss:U
      - cam:u
      - cecd:u
      - cfg:u
      - dlp:FKCL
      - dlp:SRVR
      - dsp::DSP
      - frd:u
      - fs:USER
      - gsp::Gpu
      - hid:USER
      - http:C
      - mic:u
      - ndm:u
      - news:u
      - nwm::UDS
      - ptm:u
      - pxi:dev
      - soc:U
      - ssl:C
      - y2r:u
      - ldr:ro
      - am:app
      - am:u
      - pm:app
      - ns:s
    SystemControlInfo:
      #SaveDataSize: 512KB
      #RemasterVersion: 5
      #StackSize: 0x40000
      #JumpId: 0
      Dependency:
        ac: 0x0004013000002402L
        am: 0x0004013000001502L
        boss: 0x0004013000003402L
        camera: 0x0004013000001602L
        cecd: 0x0004013000002602L
        cfg: 0x0004013000001702L
        codec: 0x0004013000001802L
        csnd: 0x0004013000002702L
        dlp: 0x0004013000002802L
        dsp: 0x0004013000001a02L
        friends: 0x0004013000003202L
        gpio: 0x0004013000001b02L
        gsp: 0x0004013000001c02L
        hid: 0x0004013000001d02L
        http: 0x0004013000002902L
        i2c: 0x0004013000001e02L
        ir: 0x0004013000003302L
        mcu: 0x0004013000001f02L
        mic: 0x0004013000002002L
        ndm: 0x0004013000002b02L
        news: 0x0004013000003502L
        nim: 0x0004013000002c02L
        nwm: 0x0004013000002d02L
        pdn: 0x0004013000002102L
        ps: 0x0004013000003102L
        ptm: 0x0004013000002202L
        ro: 0x0004013000003702L
        socket: 0x0004013000002e02L
        spi: 0x0004013000002302L
        ssl: 0x0004013000002f02L
    RomInfo:
    Warning: Spoilers inside!



    I made a step forward but now it hangs on the 3DS Boot Logo. Any Idea?

    Btw. The CCI-FIle had a Size of 22.620kb, the created cia has a filesize of 14.181kb. Is that okay? I think it's because of compression
     
    Last edited by xXDungeon_CrawlerXx, Jul 8, 2016
  5. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,457
    5,928
    Apr 20, 2015
    United States
    Tigard, OR
    plugging my own tools ;p

    for 3DS/CCI -> CIA, you can use my script: https://github.com/ihaveamac/3dsconv/releases
    no RSF files or anything weird are used. try seeing if your converted CIA works after that. make sure makerom is in your PATH, or the same folder on Windows
     
    xXDungeon_CrawlerXx likes this.
  6. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,042
    2,488
    Nov 15, 2014
    France
    Albi
    You can't try to use 3DS Simple CIA Converter in te encrypted .3ds and turn it in CIA?

    If the CIA is not too big, send me it, I can try for the fun
     
  7. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    encrypted .3ds? just have a encrypted .cci^^
    Will try this
     
  8. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,042
    2,488
    Nov 15, 2014
    France
    Albi
    CCI are 3DS, just the extension change
     
  9. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,457
    5,928
    Apr 20, 2015
    United States
    Tigard, OR
    note, ".cci" is the same as ".3ds". CCI is the technical term that nobody uses but devs.
     
  10. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    So I just need to rename .cci to .3ds? O.o
     
  11. Asia81

    Asia81 In my Ecchi World <3

    Member
    5,042
    2,488
    Nov 15, 2014
    France
    Albi
    yes
     
  12. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    DUDE!
    DUUUUUUUUDE!

    Your tool works great! Thank you a lot <3
     
    zoogie and ihaveamac like this.
  13. zoogie

    zoogie simple pimp tool

    Member
    6,329
    7,998
    Nov 30, 2014
    United States
    The .code on these unity builds are enormous. Dwarfs even the youtube browser. lol
     
    ihaveamac likes this.
  14. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    hahaha, yes :D
     
    zoogie likes this.
  15. SirBeethoven

    SirBeethoven 3.145.... something. E=mc2

    Member
    1,808
    552
    Nov 26, 2015
    United States
    Are you using Luma3DS dev with dev patch selected?
     
  16. Voxel

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,197
    5,888
    Jun 27, 2015
    United Kingdom
    England, UK
    Question... does Unity usually hang on "Run IL2CPP" for a very long time or something? Because it's taking a lot of time for some reason...
     
  17. Gow supremo

    Gow supremo I am playing my 2ds

    Member
    240
    12
    Jan 24, 2016
    Spain
    In the earth
    Good, good program.
     
  18. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    dunno what this means, I guess this is the part where the code.bin will be created.

    I'm glad that I'm able to run Unity-Projects on my 3DS now.
     
  19. Voxel

    Voxel Fable Junkie

    Member
    GBAtemp Patron
    Voxel is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    5,197
    5,888
    Jun 27, 2015
    United Kingdom
    England, UK
    Same! I actually got that problem solved by just being patient lol, and my projects are running beautifully! :D
     
  20. xXDungeon_CrawlerXx
    OP

    xXDungeon_CrawlerXx GBAtemp Maniac

    Member
    1,195
    527
    Jul 29, 2015
    Liverpool
    wanna show me your Stickmagician?
    Wanna try it :D (PM pls)