ROM Hack [Release] 3DS_CTR_Decryptor-VOiD

  • Thread starter Thread starter Relys
  • Start date Start date
  • Views Views 649,172
  • Replies Replies 2,226
  • Likes Likes 30
I think I might be doing something wrong here, but can't be sure.
Rebuilt with
Code:
makerom -f cci -o test.3ds -rsf gw.rsf -target d -exefslogo -code code -logo logo.bin -icon icon -banner banner -exheader exheader.bin -romfs romfs.bin -content manual.cfa:1
I get a game card removed error. I might have slightly changed the RomFS here, but I'm pretty sure it's clean. Everything is decrypted except the manual (which is untouched) and the logo (which is straight out of 3DS explorer). I might have to screw around with the exefslogo option a bit or look into the exheader file (once decrypted I ended up with all 0s somehow, so that may or may not be correct - it's probably the issue).

Yeah, lol. I feel stupid. Let me try with just the exh fixed and the -desc option

How did you get the .code and the other stuff that is supposed to be located on exefs?
 
How did you get the .code and the other stuff that is supposed to be located on exefs?
I just got them manually with a hex editor. exefs is documented well on 3Dbrew.

Thinking about it, I shouldn't specify -exefslogo if the logo was separate, should I?
 
I just got them manually with a hex editor. exefs is documented well on 3Dbrew.

Thinking about it, I shouldn't specify -exefslogo if the logo was separate, should I?

I think you should, since it's a SDK 5.X thing. I also extracted it looking at 3dbrew, it was a fucking pain sorting out everything... by the way, the .code file may be compressed, it must be descompressed if necessary using 3dsexplorer.
 
I think you should, since it's a SDK 5.X thing. I also extracted it looking at 3dbrew, it was a fucking pain sorting out everything... by the way, the .code file may be compressed, it must be descompressed if necessary using 3dsexplorer.
That might be the case actually, I really can't piece all the little pieces together yet, but at least it can show up.
So far it's just been a lot of trial and error to do this.
 
I just got them manually with a hex editor. exefs is documented well on 3Dbrew.

Thinking about it, I shouldn't specify -exefslogo if the logo was separate, should I?
guys, i think i cracked it.

so extract exefs parts with ctrtool with this command:
Code:
ctrtool --exefsdir=. --decompresscode -t exefs exefs.bin

then use this command with makerom to make the 3ds file:
Code:
makerom.exe -f cci -target d -rsf gw.rsf -o test.3ds -exheader exheader.bin -code code.bin -icon icon.bin -banner banner.bin -romfs romfs.bin

haven't been able to use modded romfs tho :/

edit: i just realized ctrtool was recently updated, i attached my compile
 

Attachments

guys, i think i cracked it.

so extract exefs parts with ctrtool with this command:
Code:
ctrtool --exefsdir=. --decompresscode -t exefs exefs.bin

then use this command with makerom to make the 3ds file:
Code:
makerom.exe -f cci -target d -rsf gw.rsf -o test.3ds -exheader exheader.bin -code code.bin -icon icon.bin -banner banner.bin -romfs romfs.bin

haven't been able to use modded romfs tho :/
You make this look easy. Thanks, though. I'll try this out.
 
guys, i think i cracked it.

so extract exefs parts with ctrtool with this command:
Code:
ctrtool --exefsdir=. --decompresscode -t exefs exefs.bin

then use this command with makerom to make the 3ds file:
Code:
makerom.exe -f cci -target d -rsf gw.rsf -o test.3ds -exheader exheader.bin -code code.bin -icon icon.bin -banner banner.bin -romfs romfs.bin

haven't been able to use modded romfs tho :/

edit: i just realized ctrtool was recently updated, i attached my compile

Can you share your gw.rsf with me? I'm getting this error:

[CCI ERROR] 'CardDevice: NorFlash' can only be used with save-data sizes: 128K & 512K
[RESULT] Failed to build CCI
 
Can you share your gw.rsf with me? I'm getting this error:

[CCI ERROR] 'CardDevice: NorFlash' can only be used with save-data sizes: 128K & 512K
[RESULT] Failed to build CCI

You'll have to modify the rsf. It's pretty well commented in the file (open it in a text editor)
 
You'll have to modify the rsf. It's pretty well commented in the file (open it in a text editor)

I'm asking for a reason, you know? Weird enough, it works if I build a cxi file first, then the cci, but building the cci straight away gives me this error.
 
I'm asking for a reason, you know? Weird enough, it works if I build a cxi file first, then the cci, but building the cci straight away gives me this error.
Weird. Are you sure that the savedata size is 128 or 512 K in the rsf. Perhaps you could upload yours?
 
Weird. Are you sure that the savedata size is 128 or 512 K in the rsf. Perhaps you could upload yours?

Code:
BasicInfo:
  Title                   : "Custom Title"
  CompanyCode             : "00"
  ProductCode             : "CTR-P-CSTM"
  ContentType             : Application # Application / SystemUpdate / Manual / Child / Trial
  Logo                    : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
 
Rom:
  # Specifies the root path of the file system to include in the ROM.
  #HostRoot                : "$(ROMFS_ROOT)"
 
 
TitleInfo:
  UniqueId                : 0x7850
  Category                : Application # Application / SystemApplication / Applet / Firmware / Base / DlpChild / Demo / Contents / SystemContents / SharedContents / AddOnContents / Patch / AutoUpdateContents
 
CardInfo:
  MediaSize               : 1GB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB
  MediaType               : Card1 # Card1 / Card2
  CardDevice              : NorFlash # NorFlash / None
  
 
Option:
  #UseOnSD                 : true # true if App is to be #installed to SD
  EnableCompress          : true # Compresses exefs code
  FreeProductCode         : true # Removes limitations on ProductCode
  EnableCrypt             : true # Enables encryption for NCCH and CIA
  MediaFootPadding        : false # If true CCI files are created with padding
 
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:
  #UseOtherVariationSaveData : true
  #UseExtSaveData : true
  #ExtSaveDataId: 0xffffffff
  #SystemSaveDataId1: 0x220
  #SystemSaveDataId2: 0x00040010
  #OtherUserSaveDataId1: 0x220
  #OtherUserSaveDataId2: 0x330
  #OtherUserSaveDataId3: 0x440
  #UseExtendedSaveDataAccessControl: true
  #AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
  #FileSystemAccess:
   #- CategorySystemApplication
   #- CategoryHardwareCheck
   #- CategoryFileSystemTool
   #- Debug
   #- TwlCardBackup
   #- TwlNandData
   #- Boss
   #- DirectSdmc
   #- Core
   #- CtrNandRo
   #- CtrNandRw
   #- CtrNandRoWrite
   #- CategorySystemSettings
   #- CardBoard
   #- ExportImportIvs
   #- DirectSdmcWrite
   #- SwitchCleanup
   #- SaveDataMove
   #- Shop
   #- Shell
   #- CategoryHomeMenu
  #IoAccessControl:
   #- FsMountNand
   #- FsMountNandRoWrite
   #- FsMountTwln
   #- FsMountWnand
   #- FsMountCardSpi
   #- UseSdif3
   #- CreateSeed
   #- UseCardSpi
   
SystemControlInfo:
  SaveDataSize: 512KB
  RemasterVersion: 0
  StackSize: 0x100000
  #JumpId: 0
 
# DO NOT EDIT BELOW HERE OR PROGRAMS WILL NOT LAUNCH (most likely)
 
AccessControlInfo:
  FileSystemAccess:
   - Debug
   - DirectSdmc
   - DirectSdmcWrite
   
  IdealProcessor                : 0
  AffinityMask                  : 1
  
  Priority                      : 16
   
  MaxCpu                        : 0x9E # Default
  
  CoreVersion                   : 2
  DescVersion                   : 2
  
  ReleaseKernelMajor            : "02"
  ReleaseKernelMinor            : "33" 
  MemoryType                    : Application
  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
   - ir:USER
  
   
SystemControlInfo:
  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
CommonHeaderKey: 
  D: |
    jL2yO86eUQnYbXIrzgFVMm7FVze0LglZ2f5g+c42hWoEdnb5BOotaMQPBfqt
    aUyAEmzQPaoi/4l4V+hTJRXQfthVRqIEx27B84l8LA6Tl5Fy9PaQaQ+4yRfP
    g6ylH2l0EikrIVjy2uMlFgl0QJCrG+QGKHftxhaGCifdAwFNmiZuyJ/TmktZ
    0RCb66lYcr2h/p2G7SnpKUliS9h9KnpmG+UEgVYQUK+4SCfByUa9PxYGpT0E
    nw1UcRz0gsBmdOqcgzwnAd9vVqgb42hVn6uQZyAl+j1RKiMWywZarazIR/k5
    Lmr4+groimSEa+3ajyoIho9WaWTDmFU3mkhA2tUDIQ==
  Exponent: |
    AQAB
  Modulus: |
    zwCcsyCgMkdlieCgQMVXA6X2jmb1ICjup0Q+jk/AydPkOgsx7I/MjUymFEkU
    vgXBtCKtzh3NKXtFFuW51tJ60GPOabLKuG0Qm5li+UXALrWhzWuvd5vv2FZI
    dTQCbrq/MFS/M02xNtwqzWiBjE/LwqIdbrDAAvX4HGy0ydaQJ1DKYeQeph5D
    lAGBw2nQ4izXhhuLaU3w8VQkIJHdhxIKI5gJY/20AGkG0vHD553Mh5kBINrWp
    CRYmmJS8DCYbAiQtKbkeUfzHViGTZuj6PwaY8Mv39PGO47a++pt45IUyCEs4/
    LjMS72cyfo8tU4twRGp76SFGYejYj3wGC1f/POQw==
  Signature: |
    BOPR0jL0BOV5Zx502BuPbOvi/hvOq5ID8Dz1MQfOjkey6FKP/6cb4f9YXpm6c
    ZCHAZLo0GduKdMepiKPUq1rsbbAxkRdQdjOOusEWoxNA58x3E4373tCAhlqM2
    DvuQERrIIQ/XnYLV9C3uw4efZwhFqog1jvVyoEHpuvs8xnYtGbsKQ8FrgLwXv
    pOZYy9cSgq+jqLy2D9IxiowPcbq2cRlbW9d2xlUfpq0AohyuXQhpxn7d9RUor
    9veoARRAdxRJK12EpcSoEM1LhTRYdJnSRCY3x3p6YIV3c+l1sWvaQwKt0sZ/U
    8TTDx2gb9g7r/+U9icneu/zlqUpSkexCS009Q==
  Descriptor: |
    AP///wAABAACAAAAAAAFGJ4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIAAAAAAAABBUFQ6VQAAACRo
    aW9GSU8AJGhvc3RpbzAkaG9zdGlvMWFjOnUAAAAAYm9zczpVAABjYW06dQAA
    AGNlY2Q6dQAAY2ZnOnUAAABkbHA6RktDTGRscDpTUlZSZHNwOjpEU1BmcmQ6
    dQAAAGZzOlVTRVIAZ3NwOjpHcHVoaWQ6VVNFUmh0dHA6QwAAbWljOnUAAABu
    ZG06dQAAAG5ld3M6dQAAbndtOjpVRFNwdG06dQAAAHB4aTpkZXYAc29jOlUA
    AABzc2w6QwAAAHkycjp1AAAAbGRyOnJvAABpcjpVU0VSAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAABOn/rw/7//8ec/APIA8JH/APaR/1D/gf9Y/4H/cP+B/3j/gf8B
    AQD/AAIA/iECAPz/////////////////////////////////////////////
    ////////////////////////////////////////AAAAAAAAAAAAAAAAAAAA
    AAADAAAAAAAAAAAAAAAAAAI=
 
Code:
BasicInfo:
  Title                  : "Custom Title"
  CompanyCode            : "00"
  ProductCode            : "CTR-P-CSTM"
  ContentType            : Application # Application / SystemUpdate / Manual / Child / Trial
  Logo                    : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
 
Rom:
  # Specifies the root path of the file system to include in the ROM.
  #HostRoot                : "$(ROMFS_ROOT)"
 
 
TitleInfo:
  UniqueId                : 0x7850
  Category                : Application # Application / SystemApplication / Applet / Firmware / Base / DlpChild / Demo / Contents / SystemContents / SharedContents / AddOnContents / Patch / AutoUpdateContents
 
CardInfo:
  MediaSize              : 1GB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB
  MediaType              : Card1 # Card1 / Card2
  CardDevice              : NorFlash # NorFlash / None
 
 
Option:
  #UseOnSD                : true # true if App is to be #installed to SD
  EnableCompress          : true # Compresses exefs code
  FreeProductCode        : true # Removes limitations on ProductCode
  EnableCrypt            : true # Enables encryption for NCCH and CIA
  MediaFootPadding        : false # If true CCI files are created with padding
 
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:
  #UseOtherVariationSaveData : true
  #UseExtSaveData : true
  #ExtSaveDataId: 0xffffffff
  #SystemSaveDataId1: 0x220
  #SystemSaveDataId2: 0x00040010
  #OtherUserSaveDataId1: 0x220
  #OtherUserSaveDataId2: 0x330
  #OtherUserSaveDataId3: 0x440
  #UseExtendedSaveDataAccessControl: true
  #AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
  #FileSystemAccess:
  #- CategorySystemApplication
  #- CategoryHardwareCheck
  #- CategoryFileSystemTool
  #- Debug
  #- TwlCardBackup
  #- TwlNandData
  #- Boss
  #- DirectSdmc
  #- Core
  #- CtrNandRo
  #- CtrNandRw
  #- CtrNandRoWrite
  #- CategorySystemSettings
  #- CardBoard
  #- ExportImportIvs
  #- DirectSdmcWrite
  #- SwitchCleanup
  #- SaveDataMove
  #- Shop
  #- Shell
  #- CategoryHomeMenu
  #IoAccessControl:
  #- FsMountNand
  #- FsMountNandRoWrite
  #- FsMountTwln
  #- FsMountWnand
  #- FsMountCardSpi
  #- UseSdif3
  #- CreateSeed
  #- UseCardSpi
 
SystemControlInfo:
  SaveDataSize: 512KB
  RemasterVersion: 0
  StackSize: 0x100000
  #JumpId: 0
 
# DO NOT EDIT BELOW HERE OR PROGRAMS WILL NOT LAUNCH (most likely)
 
AccessControlInfo:
  FileSystemAccess:
  - Debug
  - DirectSdmc
  - DirectSdmcWrite
 
  IdealProcessor                : 0
  AffinityMask                  : 1
 
  Priority                      : 16
 
  MaxCpu                        : 0x9E # Default
 
  CoreVersion                  : 2
  DescVersion                  : 2
 
  ReleaseKernelMajor            : "02"
  ReleaseKernelMinor            : "33"
  MemoryType                    : Application
  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
  - ir:USER
 
 
SystemControlInfo:
  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
CommonHeaderKey:
  D: |
    jL2yO86eUQnYbXIrzgFVMm7FVze0LglZ2f5g+c42hWoEdnb5BOotaMQPBfqt
    aUyAEmzQPaoi/4l4V+hTJRXQfthVRqIEx27B84l8LA6Tl5Fy9PaQaQ+4yRfP
    g6ylH2l0EikrIVjy2uMlFgl0QJCrG+QGKHftxhaGCifdAwFNmiZuyJ/TmktZ
    0RCb66lYcr2h/p2G7SnpKUliS9h9KnpmG+UEgVYQUK+4SCfByUa9PxYGpT0E
    nw1UcRz0gsBmdOqcgzwnAd9vVqgb42hVn6uQZyAl+j1RKiMWywZarazIR/k5
    Lmr4+groimSEa+3ajyoIho9WaWTDmFU3mkhA2tUDIQ==
  Exponent: |
    AQAB
  Modulus: |
    zwCcsyCgMkdlieCgQMVXA6X2jmb1ICjup0Q+jk/AydPkOgsx7I/MjUymFEkU
    vgXBtCKtzh3NKXtFFuW51tJ60GPOabLKuG0Qm5li+UXALrWhzWuvd5vv2FZI
    dTQCbrq/MFS/M02xNtwqzWiBjE/LwqIdbrDAAvX4HGy0ydaQJ1DKYeQeph5D
    lAGBw2nQ4izXhhuLaU3w8VQkIJHdhxIKI5gJY/20AGkG0vHD553Mh5kBINrWp
    CRYmmJS8DCYbAiQtKbkeUfzHViGTZuj6PwaY8Mv39PGO47a++pt45IUyCEs4/
    LjMS72cyfo8tU4twRGp76SFGYejYj3wGC1f/POQw==
  Signature: |
    BOPR0jL0BOV5Zx502BuPbOvi/hvOq5ID8Dz1MQfOjkey6FKP/6cb4f9YXpm6c
    ZCHAZLo0GduKdMepiKPUq1rsbbAxkRdQdjOOusEWoxNA58x3E4373tCAhlqM2
    DvuQERrIIQ/XnYLV9C3uw4efZwhFqog1jvVyoEHpuvs8xnYtGbsKQ8FrgLwXv
    pOZYy9cSgq+jqLy2D9IxiowPcbq2cRlbW9d2xlUfpq0AohyuXQhpxn7d9RUor
    9veoARRAdxRJK12EpcSoEM1LhTRYdJnSRCY3x3p6YIV3c+l1sWvaQwKt0sZ/U
    8TTDx2gb9g7r/+U9icneu/zlqUpSkexCS009Q==
  Descriptor: |
    AP///wAABAACAAAAAAAFGJ4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIAAAAAAAABBUFQ6VQAAACRo
    aW9GSU8AJGhvc3RpbzAkaG9zdGlvMWFjOnUAAAAAYm9zczpVAABjYW06dQAA
    AGNlY2Q6dQAAY2ZnOnUAAABkbHA6RktDTGRscDpTUlZSZHNwOjpEU1BmcmQ6
    dQAAAGZzOlVTRVIAZ3NwOjpHcHVoaWQ6VVNFUmh0dHA6QwAAbWljOnUAAABu
    ZG06dQAAAG5ld3M6dQAAbndtOjpVRFNwdG06dQAAAHB4aTpkZXYAc29jOlUA
    AABzc2w6QwAAAHkycjp1AAAAbGRyOnJvAABpcjpVU0VSAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAABOn/rw/7//8ec/APIA8JH/APaR/1D/gf9Y/4H/cP+B/3j/gf8B
    AQD/AAIA/iECAPz/////////////////////////////////////////////
    ////////////////////////////////////////AAAAAAAAAAAAAAAAAAAA
    AAADAAAAAAAAAAAAAAAAAAI=
Hmm.... definitely not the same as mine. I might have an older version or something though.
Here's what I downloaded.
Code:
BasicInfo:
  Title                  : "CtrApp"
  CompanyCode            : "00"
  ProductCode            : "CTR-P-CTAP"
  ContentType            : Application
  Logo                    : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
 
Rom:
  # Specifies the root path of the file system to include in the ROM.
  #HostRoot                : "romfs"
 
 
TitleInfo:
  UniqueId                : 0x1337
  Category                : Application
 
CardInfo:
  MediaSize              : 128MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB
  MediaType              : Card1 # Card1 / Card2
  CardDevice              : NorFlash # NorFlash(Pick this if you use savedata) / None
 
 
Option:
  FreeProductCode        : true # Removes limitations on ProductCode
  MediaFootPadding        : false # If true CCI files are created with padding
  EnableCrypt            : true # Enables encryption for NCCH and CIA
  EnableCompress          : true # Compresses exefs code
 
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
  #ExtSaveDataId: 0xff3ff
  #UseExtendedSaveDataAccessControl: true
  #AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
 
SystemControlInfo:
  SaveDataSize: 128KB
  RemasterVersion: 0
  StackSize: 0x40000
 
# DO NOT EDIT BELOW HERE OR PROGRAMS WILL NOT LAUNCH (most likely)
 
AccessControlInfo:
  FileSystemAccess:
  - Debug
  - DirectSdmc
  - DirectSdmcWrite
 
  IdealProcessor                : 0
  AffinityMask                  : 1
 
  Priority                      : 16
 
  MaxCpu                        : 0x9E # Default
 
  CoreVersion                  : 2
  DescVersion                  : 2
 
  ReleaseKernelMajor            : "02"
  ReleaseKernelMinor            : "33"
  MemoryType                    : Application
  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
  - ir:USER
 
 
SystemControlInfo:
  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
CommonHeaderKey:
  D: |
    jL2yO86eUQnYbXIrzgFVMm7FVze0LglZ2f5g+c42hWoEdnb5BOotaMQPBfqt
    aUyAEmzQPaoi/4l4V+hTJRXQfthVRqIEx27B84l8LA6Tl5Fy9PaQaQ+4yRfP
    g6ylH2l0EikrIVjy2uMlFgl0QJCrG+QGKHftxhaGCifdAwFNmiZuyJ/TmktZ
    0RCb66lYcr2h/p2G7SnpKUliS9h9KnpmG+UEgVYQUK+4SCfByUa9PxYGpT0E
    nw1UcRz0gsBmdOqcgzwnAd9vVqgb42hVn6uQZyAl+j1RKiMWywZarazIR/k5
    Lmr4+groimSEa+3ajyoIho9WaWTDmFU3mkhA2tUDIQ==
  Exponent: |
    AQAB
  Modulus: |
    zwCcsyCgMkdlieCgQMVXA6X2jmb1ICjup0Q+jk/AydPkOgsx7I/MjUymFEkU
    vgXBtCKtzh3NKXtFFuW51tJ60GPOabLKuG0Qm5li+UXALrWhzWuvd5vv2FZI
    dTQCbrq/MFS/M02xNtwqzWiBjE/LwqIdbrDAAvX4HGy0ydaQJ1DKYeQeph5D
    lAGBw2nQ4izXhhuLaU3w8VQkIJHdhxIKI5gJY/20AGkG0vHD553Mh5kBINrWp
    CRYmmJS8DCYbAiQtKbkeUfzHViGTZuj6PwaY8Mv39PGO47a++pt45IUyCEs4/
    LjMS72cyfo8tU4twRGp76SFGYejYj3wGC1f/POQw==
  Signature: |
    BOPR0jL0BOV5Zx502BuPbOvi/hvOq5ID8Dz1MQfOjkey6FKP/6cb4f9YXpm6c
    ZCHAZLo0GduKdMepiKPUq1rsbbAxkRdQdjOOusEWoxNA58x3E4373tCAhlqM2
    DvuQERrIIQ/XnYLV9C3uw4efZwhFqog1jvVyoEHpuvs8xnYtGbsKQ8FrgLwXv
    pOZYy9cSgq+jqLy2D9IxiowPcbq2cRlbW9d2xlUfpq0AohyuXQhpxn7d9RUor
    9veoARRAdxRJK12EpcSoEM1LhTRYdJnSRCY3x3p6YIV3c+l1sWvaQwKt0sZ/U
    8TTDx2gb9g7r/+U9icneu/zlqUpSkexCS009Q==
  Descriptor: |
    AP///wAABAACAAAAAAAFGJ4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiIAAAAAAAABBUFQ6VQAAACRo
    aW9GSU8AJGhvc3RpbzAkaG9zdGlvMWFjOnUAAAAAYm9zczpVAABjYW06dQAA
    AGNlY2Q6dQAAY2ZnOnUAAABkbHA6RktDTGRscDpTUlZSZHNwOjpEU1BmcmQ6
    dQAAAGZzOlVTRVIAZ3NwOjpHcHVoaWQ6VVNFUmh0dHA6QwAAbWljOnUAAABu
    ZG06dQAAAG5ld3M6dQAAbndtOjpVRFNwdG06dQAAAHB4aTpkZXYAc29jOlUA
    AABzc2w6QwAAAHkycjp1AAAAbGRyOnJvAABpcjpVU0VSAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAABOn/rw/7//8ec/APIA8JH/APaR/1D/gf9Y/4H/cP+B/3j/gf8B
    AQD/AAIA/iECAPz/////////////////////////////////////////////
    ////////////////////////////////////////AAAAAAAAAAAAAAAAAAAA
    AAADAAAAAAAAAAAAAAAAAAI=
 
Well, there goes my first attempt of compiling a ROM. I can choose it from GW's menu but it won't load into the 3DS' menu for some reason... geez...

These are the inputs I have been trying to use; all of them without success (leading to the same result).

1. (.code, icon and banner were ripped from ExeFS manually)
makerom.exe -f cci -o output.3ds -code .code -desc SDApp:1.0.0 -rsf rom.rsf -target d -exefslogo -icon icon -banner banner -romfs ModDecryptedRomFS.bin -exheader exheader.bin

2.
makerom.exe -f cci -o output.3ds -rsf rom.rsf -target d -exefslogo -icon icon -banner banner
-romfs ModDecryptedRomFS.bin

3. (banner.icn and banner.bnr were taken from the files contained in the romfs)
makerom.exe -f cci -o output.3ds -rsf rom.rsf -target d -exefslogo -icon banner.icn -banner banner.bnr -romfs ModDecryptedRomFS.bin

4. (this time, icon.bin and banner.bin were borrowed from a functional homebrew application)
makerom.exe -f cci -o output.3ds -rsf rom.rsf -target d -exefslogo -icon icon.bin -banner banner.bin -romfs ModDecryptedRomFS.bin
how were you able to decrypt the exefs? if I use ctrtool on the decrypted exefs it says unknown file
and how do you get the .rsf file?
 
how were you able to decrypt the exefs? if I use ctrtool on the decrypted exefs it says unknown file
and how do you get the .rsf file?

Sorry to disappoint you, but I have listened to all of the streams from the audio rip, and no luck.
 
how were you able to decrypt the exefs? if I use ctrtool on the decrypted exefs it says unknown file
and how do you get the .rsf file?

I did it manually, but now I know the actual commands for it...
ctrtool --exefsdir=. --decompresscode -t exefs exefs.bin
 
guys, i think i cracked it.

so extract exefs parts with ctrtool with this command:
Code:
ctrtool --exefsdir=. --decompresscode -t exefs exefs.bin

then use this command with makerom to make the 3ds file:
Code:
makerom.exe -f cci -target d -rsf gw.rsf -o test.3ds -exheader exheader.bin -code code.bin -icon icon.bin -banner banner.bin -romfs romfs.bin

haven't been able to use modded romfs tho :/

edit: i just realized ctrtool was recently updated, i attached my compile

Thanks, which branch of ctrtool are you building from?

nm found it https://github.com/3DSGuy/Project_CTR
 
I did it manually, but now I know the actual commands for it...
ctrtool --exefsdir=. --decompresscode -t exefs exefs.bin

well that command doesn't work for me, I am going to give another ctrtool a try. May i ask how you did it manually?
 
well that command doesn't work for me, I am going to give another ctrtool a try. May i ask how you did it manually?

It is a pain in the ass, but if you wanna try...
Code:
                        --offset--- ----size---
2E 63 6F 64 65 00 00 00 00 00 00 00 94 2F 03 00    .code.......”/..
62 61 6E 6E 65 72 00 00 00 30 03 00 88 29 01 00    banner...0..ˆ)..
69 63 6F 6E 00 00 00 00 00 5A 04 00 C0 36 00 00    icon.....Z..À6..

This part is read like everything is read in the east (from right to left)...

This is the header of an exefs file. In the plain text, you can see that the last bytes represent the name of the file.

The first 4 bytes of every line represent the size of the file and must be read from right to left. For example, .code's size is 32F94.

From the fifth byte to the eighth is the offset value. You must add 0x200 to every of these values. In this (and in any) case, the offset where the .code file starts would be 00+200=200
 
If it is true you guys can actually try to edit the game roms, what you just need is to edit the decrypted rom, recalculate the sha256 hashes in the ncch header and xor back the files in the rom with the xorpads.


Could hashes be the source of this problem that I posted about a while ago?

http://gbatemp.net/threads/how-do-i...nu-bgm-without-getting-a-black-screen.365093/

(I know that it is not quite on topic, but it might be somewhat related.)

Any help will be greatly appreciated!
 
  • Like
Reactions: The Cringe

Site & Scene News

Popular threads in this forum