Got CIA and 3DS building working

If I rename the .3ds to a .cxi citra runs it, so I guess that's working?
I don't have any way to test either of them properly though.
Hopefully they work.
The .rsf is from a template provided by daxtsu.
This commit is contained in:
Poke 2015-11-12 20:55:03 +10:30
parent b245090593
commit 63268cd32e
7 changed files with 113 additions and 368 deletions

3
.gitignore vendored
View file

@ -1,9 +1,6 @@
3DS/build/ 3DS/build/
3DS/*.elf 3DS/*.elf
3DS/*stripped.elf 3DS/*stripped.elf
3DS/*.smdh
3DS/*.3ds
3DS/*.cia
PC/build/ PC/build/
*.pnproj *.pnproj
*.pnps *.pnps

BIN
3DS/3DSController.3ds Normal file

Binary file not shown.

BIN
3DS/3DSController.cia Normal file

Binary file not shown.

BIN
3DS/3DSController.smdh Normal file

Binary file not shown.

View file

@ -150,7 +150,7 @@ endif
$(OUTPUT).3dsx : $(OUTPUT).elf $(OUTPUT).3dsx : $(OUTPUT).elf
$(OUTPUT).3ds : $(OUTPUT)stripped.elf $(OUTPUT).3ds : $(OUTPUT)stripped.elf
makerom -f cci -o $(OUTPUT).3ds -rsf "$(TOPDIR)/cxi/gw_workaround.rsf" -target d -exefslogo -elf $(OUTPUT)stripped.elf -icon "$(TOPDIR)/cxi/icon.icn" -banner "$(TOPDIR)/cxi/banner.bnr" makerom -f cci -o $(OUTPUT).3ds -rsf "$(TOPDIR)/cxi/build_cia.rsf" -target t -exefslogo -elf $(OUTPUT)stripped.elf -icon "$(TOPDIR)/cxi/icon.icn" -banner "$(TOPDIR)/cxi/banner.bnr"
$(OUTPUT).cia : $(OUTPUT)stripped.elf $(OUTPUT).cia : $(OUTPUT)stripped.elf
makerom -f cia -o $(OUTPUT).cia -elf $(OUTPUT)stripped.elf -rsf "$(TOPDIR)/cxi/build_cia.rsf" -icon "$(TOPDIR)/cxi/icon.icn" -banner "$(TOPDIR)/cxi/banner.bnr" -exefslogo -target t makerom -f cia -o $(OUTPUT).cia -elf $(OUTPUT)stripped.elf -rsf "$(TOPDIR)/cxi/build_cia.rsf" -icon "$(TOPDIR)/cxi/icon.icn" -banner "$(TOPDIR)/cxi/banner.bnr" -exefslogo -target t

View file

@ -1,97 +1,70 @@
BasicInfo: BasicInfo:
Title : "3DS Controller" Title : "3DS Controller"
CompanyCode : "00"
ProductCode : "CTR-N-3DSC" ProductCode : "CTR-N-3DSC"
ContentType : Application # Application / SystemUpdate / Manual / Child / Trial
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
Rom: RomFs:
# Specifies the root path of the file system to include in the ROM. # Specifies the root path of the read only file system to include in the ROM.
# HostRoot : "$(ROMFS_ROOT)" RootPath : "$(ROMFS_ROOT)"
TitleInfo: TitleInfo:
UniqueId : 0xf0fc2 # This was/is the first real homebrew app. I hope this TID range is not used by any retail game/app. Category : Application
Category : Application # Application / SystemApplication / Applet / Firmware / Base / DlpChild / Demo / Contents / SystemContents / SharedContents / AddOnContents / Patch / AutoUpdateContents UniqueId : 0xf0fc2
CardInfo:
MediaSize : 512MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB / 8GB / 16GB / 32GB
MediaType : Card1 # Card1 / Card2
CardDevice : NorFlash # NorFlash / None
Option: Option:
UseOnSD : true # true if App is to be installed to SD UseOnSD : true # true if App is to be installed to SD
EnableCompress : true # Compresses exefs code
FreeProductCode : true # Removes limitations on ProductCode FreeProductCode : true # Removes limitations on ProductCode
EnableCrypt : false # Enables encryption for NCCH and CIA
MediaFootPadding : false # If true CCI files are created with padding MediaFootPadding : false # If true CCI files are created with padding
EnableCrypt : false # Enables encryption for NCCH and CIA
ExeFs: # these are the program segments from the ELF, check your elf for the appropriate segment names EnableCompress : true # Compresses where applicable (currently only exefs:/.code)
ReadOnly:
- .rodata
- RO
ReadWrite:
- .data
- RO
Text:
- .init
- .text
- STUP_ENTRY
PlainRegion: # only used with SDK ELFs
# - .module_id
AccessControlInfo: AccessControlInfo:
# UseOtherVariationSaveData : true CoreVersion : 2
# UseExtSaveData : true
# ExtSaveDataId: 0xffffffff # Exheader Format Version
# SystemSaveDataId1: 0x220 DescVersion : 2
# SystemSaveDataId2: 0x00040010
# OtherUserSaveDataId1: 0x220 # Minimum Required Kernel Version (below is for 4.5.0)
# OtherUserSaveDataId2: 0x330 ReleaseKernelMajor : "02"
# OtherUserSaveDataId3: 0x440 ReleaseKernelMinor : "33"
# UseExtendedSaveDataAccessControl: true
# AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606] # ExtData
UseExtSaveData : false # enables ExtData
#ExtSaveDataId : 0x300 # only set this when the ID is different to the UniqueId
# FS:USER Archive Access Permissions
# Uncomment as required
FileSystemAccess: FileSystemAccess:
# - CategorySystemApplication #- CategorySystemApplication
# - CategoryHardwareCheck #- CategoryHardwareCheck
# - CategoryFileSystemTool - CategoryFileSystemTool
- Debug #- Debug
# - TwlCardBackup #- TwlCardBackup
# - TwlNandData #- TwlNandData
# - Boss #- Boss
- DirectSdmc - DirectSdmc
# - Core #- Core
# - CtrNandRo #- CtrNandRo
# - CtrNandRw #- CtrNandRw
# - CtrNandRoWrite #- CtrNandRoWrite
# - CategorySystemSettings #- CategorySystemSettings
# - CardBoard #- CardBoard
# - ExportImportIvs #- ExportImportIvs
# - DirectSdmcWrite #- DirectSdmcWrite
# - SwitchCleanup #- SwitchCleanup
# - SaveDataMove #- SaveDataMove
# - Shop #- Shop
# - Shell #- Shell
# - CategoryHomeMenu #- CategoryHomeMenu
IoAccessControl:
# - FsMountNand # Process Settings
# - FsMountNandRoWrite MemoryType : Application # Application/System/Base
# - FsMountTwln SystemMode : 64MB # 64MB(Default)/96MB/80MB/72MB/32MB
# - FsMountWnand
# - FsMountCardSpi
# - UseSdif3
# - CreateSeed
# - UseCardSpi
IdealProcessor : 0 IdealProcessor : 0
AffinityMask : 1 AffinityMask : 1
Priority : 16 Priority : 16
MaxCpu : 0x9E # Default MaxCpu : 0x9E # Default
HandleTableSize : 0x200
DisableDebug : true DisableDebug : true
EnableForceDebug : false EnableForceDebug : false
CanWriteSharedPage : true CanWriteSharedPage : true
@ -101,21 +74,23 @@ AccessControlInfo:
CanShareDeviceMemory : true CanShareDeviceMemory : true
RunnableOnSleep : false RunnableOnSleep : false
SpecialMemoryArrange : true SpecialMemoryArrange : true
CoreVersion : 2 # New3DS Exclusive Process Settings
DescVersion : 2 SystemModeExt : Legacy # Legacy(Default)/124MB/178MB Legacy:Use Old3DS SystemMode
CpuSpeed : 804MHz # 256MHz(Default)/804MHz
ReleaseKernelMajor : "02" EnableL2Cache : true # false(default)/true
ReleaseKernelMinor : "33" CanAccessCore2 : true
MemoryType : Application # Application / System / Base
HandleTableSize: 512 # Virtual Address Mappings
IORegisterMapping: IORegisterMapping:
- 1ff50000-1ff57fff - 1ff00000-1ff7ffff # DSP memory
- 1ff70000-1ff77fff
MemoryMapping: MemoryMapping:
- 1f000000-1f5fffff:r - 1f000000-1f5fffff:r # VRAM
# Accessible SVCs, <Name>:<ID>
SystemCallAccess: SystemCallAccess:
ArbitrateAddress: 34 ArbitrateAddress: 34
Backdoor: 123
Break: 60 Break: 60
CancelTimer: 28 CancelTimer: 28
ClearEvent: 25 ClearEvent: 25
@ -123,6 +98,7 @@ AccessControlInfo:
CloseHandle: 35 CloseHandle: 35
ConnectToPort: 45 ConnectToPort: 45
ControlMemory: 1 ControlMemory: 1
ControlProcessMemory: 112
CreateAddressArbiter: 33 CreateAddressArbiter: 33
CreateEvent: 23 CreateEvent: 23
CreateMemoryBlock: 30 CreateMemoryBlock: 30
@ -166,25 +142,28 @@ AccessControlInfo:
UnmapMemoryBlock: 32 UnmapMemoryBlock: 32
WaitSynchronization1: 36 WaitSynchronization1: 36
WaitSynchronizationN: 37 WaitSynchronizationN: 37
InterruptNumbers:
ServiceAccessControl: # Service List
# Maximum 34 services (32 if firmware is prior to 9.6.0)
ServiceAccessControl:
- APT:U - APT:U
- $hioFIO
- $hostio0
- $hostio1
- ac:u - ac:u
- am:net
- boss:U - boss:U
- cam:u - cam:u
- cecd:u - cecd:u
- cfg:nor
- cfg:u - cfg:u
- dlp:FKCL - csnd:SND
- dlp:SRVR
- dsp::DSP - dsp::DSP
- frd:u - frd:u
- fs:USER - fs:USER
- gsp::Gpu - gsp::Gpu
- hid:USER - hid:USER
- http:C - http:C
- ir:rst
- ir:u
- ir:USER
- mic:u - mic:u
- ndm:u - ndm:u
- news:u - news:u
@ -194,43 +173,47 @@ AccessControlInfo:
- soc:U - soc:U
- ssl:C - ssl:C
- y2r:u - y2r:u
- ldr:ro
- ir:USER
- ir:rst
SystemControlInfo: SystemControlInfo:
SaveDataSize: 0KB # It doesn't use any save data. SaveDataSize: 0KB # Change if the app uses savedata
RemasterVersion: 2 RemasterVersion: 2
StackSize: 0x40000 StackSize: 0x40000
# JumpId: 0
# Modules that run services listed above should be included below
# Maximum 48 dependencies
# <module name>:<module titleid>
Dependency: Dependency:
ac: 0x0004013000002402L ac: 0x0004013000002402
am: 0x0004013000001502L act: 0x0004013000003802
boss: 0x0004013000003402L am: 0x0004013000001502
camera: 0x0004013000001602L boss: 0x0004013000003402
cecd: 0x0004013000002602L camera: 0x0004013000001602
cfg: 0x0004013000001702L cecd: 0x0004013000002602
codec: 0x0004013000001802L cfg: 0x0004013000001702
csnd: 0x0004013000002702L codec: 0x0004013000001802
dlp: 0x0004013000002802L csnd: 0x0004013000002702
dsp: 0x0004013000001a02L dlp: 0x0004013000002802
friends: 0x0004013000003202L dsp: 0x0004013000001a02
gpio: 0x0004013000001b02L friends: 0x0004013000003202
gsp: 0x0004013000001c02L gpio: 0x0004013000001b02
hid: 0x0004013000001d02L gsp: 0x0004013000001c02
http: 0x0004013000002902L hid: 0x0004013000001d02
i2c: 0x0004013000001e02L http: 0x0004013000002902
ir: 0x0004013000003302L i2c: 0x0004013000001e02
mcu: 0x0004013000001f02L ir: 0x0004013000003302
mic: 0x0004013000002002L mcu: 0x0004013000001f02
ndm: 0x0004013000002b02L mic: 0x0004013000002002
news: 0x0004013000003502L ndm: 0x0004013000002b02
nim: 0x0004013000002c02L news: 0x0004013000003502
nwm: 0x0004013000002d02L nfc: 0x0004013000004002
pdn: 0x0004013000002102L nim: 0x0004013000002c02
ps: 0x0004013000003102L nwm: 0x0004013000002d02
ptm: 0x0004013000002202L pdn: 0x0004013000002102
ro: 0x0004013000003702L ps: 0x0004013000003102
socket: 0x0004013000002e02L ptm: 0x0004013000002202
spi: 0x0004013000002302L qtm: 0x0004013020004202
ssl: 0x0004013000002f02L ro: 0x0004013000003702
socket: 0x0004013000002e02
spi: 0x0004013000002302
ssl: 0x0004013000002f02

View file

@ -1,235 +0,0 @@
BasicInfo:
Title : "3DS Controller"
CompanyCode : "00"
ProductCode : "CTR-N-3DSC"
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 : 0xf0fc2
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
- ir:rst
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
lAGBw2nQ4izXhhuLaU3w8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APz/////////////////////////////////////////////
////////////////////////////////////////AAAAAAAAAAAAAAAAAAAA
AAADAAAAAAAAAAAAAAAAAAI=