Skip to content
This repository was archived by the owner on Jan 11, 2021. It is now read-only.

Commit 0d87fb5

Browse files
committed
mode3
1 parent 5677e95 commit 0d87fb5

14 files changed

+526
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Please send us the result.txt along with your console's firmware version (both e
1717

1818
# Latest Build
1919

20-
https://github.com/44670/BootNTR/raw/master/output/BootNTR.cia
20+
https://github.com/44670/BootNTR/raw/master/release/BootNTR.cia

build-all.bat

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
call build-mode3.bat
2+
3+
call build-mode0.bat
4+

build-mode0.bat

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
copy template-cia-0.rsf template-cia.rsf
2+
cd resources
3+
copy AppInfo-0 AppInfo
4+
cd ..
5+
make clean
6+
7+
make
8+
9+
copy output\*.cia release\
10+
pause

build-mode3.bat

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
copy template-cia-3.rsf template-cia.rsf
2+
cd resources
3+
copy AppInfo-3 AppInfo
4+
cd ..
5+
make clean
6+
7+
make
8+
9+
copy output\*.cia release\
10+
pause

output/BootNTR.cia

0 Bytes
Binary file not shown.

output/BootNTR.elf

-76 Bytes
Binary file not shown.

release/BootNTR-Mode3.cia

554 KB
Binary file not shown.

release/BootNTR.cia

554 KB
Binary file not shown.

resources/AppInfo-0

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
APP_TITLE = BootNTR
2+
APP_DESCRIPTION = NTR CFW Loader.
3+
APP_AUTHOR = BootNTR
4+
APP_PRODUCT_CODE = CTR-P-BNTR
5+
APP_UNIQUE_ID = 0xb000

resources/AppInfo-3

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
APP_TITLE = BootNTR-Mode3
2+
APP_DESCRIPTION = NTR CFW Loader.
3+
APP_AUTHOR = BootNTR
4+
APP_PRODUCT_CODE = CTR-P-BNTU
5+
APP_UNIQUE_ID = 0xb003

source/main.c

+5-9
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ Result bnInitParamsByHomeMenu() {
298298
}
299299
svc_closeHandle(hProcess);
300300
t = *(u32*)(tmpBuffer);
301-
printf("0x0020000 in HomeMenu: %08x\n", t);
301+
printf("0x00200000 in HomeMenu: %08x\n", t);
302302
if (t == 0xe59f80f4) {
303303
// new3ds 9.2.0
304304
ntrConfig->HomeMenuVersion = SYSTEM_VERSION(9, 2, 0);;
@@ -697,25 +697,21 @@ int main() {
697697
bnConfig = &g_bnConfig;
698698
ret = bnBootNTR();
699699
if (ret == 0) {
700-
printf("NTR CFW loaded successfully\nExiting...\n(Hold SELECT to prevent auto-exit) \n");
700+
printf("NTR CFW loaded successfully\n");
701701
svcSleepThread(1000000000);
702702
isSuccess = 1;
703703
} else {
704-
printf("bnBootNTR failed, press START to exit.\n");
704+
printf("bnBootNTR failed\n");
705705
}
706+
printf("Press Home button to return to the menu.\n");
706707

707708
// Main loop
708709
while (aptMainLoop())
709710
{
710711
hidScanInput();
711712

712713
u32 kDown = hidKeysDown();
713-
if (kDown & KEY_SELECT) {
714-
isSuccess = 0;
715-
}
716-
if (isSuccess) {
717-
break;
718-
}
714+
719715
if (kDown & KEY_START) {
720716
break; // break in order to return to hbmenu
721717
}

template-cia-0.rsf

+242
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
BasicInfo:
2+
Title : "$(APP_TITLE)"
3+
CompanyCode : "00"
4+
ProductCode : "$(APP_PRODUCT_CODE)"
5+
ContentType : Application
6+
Logo : Nintendo # Nintendo / Licensed / Distributed / iQue / iQueForSystem
7+
8+
TitleInfo:
9+
UniqueId : $(APP_UNIQUE_ID)
10+
Category : Application
11+
12+
CardInfo:
13+
MediaSize : 128MB # 128MB / 256MB / 512MB / 1GB / 2GB / 4GB / 8GB / 16GB / 32GB
14+
MediaType : Card1 # Card1 / Card2
15+
CardDevice : None # NorFlash(Pick this if you use savedata) / None
16+
17+
Option:
18+
UseOnSD : true # true if App is to be installed to SD
19+
FreeProductCode : true # Removes limitations on ProductCode
20+
MediaFootPadding : false # If true CCI files are created with padding
21+
EnableCrypt : false # Enables encryption for NCCH and CIA
22+
EnableCompress : true # Compresses exefs code
23+
24+
ExeFs: # these are the program segments from the ELF, check your elf for the appropriate segment names
25+
ReadOnly:
26+
- .rodata
27+
- RO
28+
ReadWrite:
29+
- .data
30+
- RO
31+
Text:
32+
- .init
33+
- .text
34+
- STUP_ENTRY
35+
36+
PlainRegion: # only used with SDK ELFs
37+
#- .module_id
38+
39+
#Rom:
40+
# Specifies the root path of the file system to include in the ROM.
41+
# HostRoot : "romfs"
42+
43+
AccessControlInfo:
44+
# UseOtherVariationSaveData : true
45+
# UseExtSaveData : true
46+
# ExtSaveDataId: 0xffffffff
47+
# SystemSaveDataId1: 0x220
48+
# SystemSaveDataId2: 0x00040010
49+
# OtherUserSaveDataId1: 0x220
50+
# OtherUserSaveDataId2: 0x330
51+
# OtherUserSaveDataId3: 0x440
52+
# UseExtendedSaveDataAccessControl: true
53+
# AccessibleSaveDataIds: [0x101, 0x202, 0x303, 0x404, 0x505, 0x606]
54+
FileSystemAccess:
55+
# - CategorySystemApplication
56+
# - CategoryHardwareCheck
57+
- CategoryFileSystemTool
58+
- Debug
59+
# - TwlCardBackup
60+
# - TwlNandData
61+
# - Boss
62+
- DirectSdmc
63+
# - Core
64+
# - CtrNandRo
65+
# - CtrNandRw
66+
# - CtrNandRoWrite
67+
# - CategorySystemSettings
68+
# - CardBoard
69+
# - ExportImportIvs
70+
- DirectSdmcWrite
71+
# - SwitchCleanup
72+
# - SaveDataMove
73+
# - Shop
74+
# - Shell
75+
# - CategoryHomeMenu
76+
IoAccessControl:
77+
# - FsMountNand
78+
# - FsMountNandRoWrite
79+
# - FsMountTwln
80+
# - FsMountWnand
81+
# - FsMountCardSpi
82+
# - UseSdif3
83+
# - CreateSeed
84+
# - UseCardSpi
85+
86+
IdealProcessor : 0
87+
AffinityMask : 1
88+
89+
Priority : 16
90+
91+
MaxCpu : 0x9E # Default
92+
93+
DisableDebug : true
94+
EnableForceDebug : false
95+
CanWriteSharedPage : true
96+
CanUsePrivilegedPriority : false
97+
CanUseNonAlphabetAndNumber : true
98+
PermitMainFunctionArgument : true
99+
CanShareDeviceMemory : true
100+
RunnableOnSleep : false
101+
SpecialMemoryArrange : true
102+
103+
CoreVersion : 2
104+
DescVersion : 2
105+
106+
ReleaseKernelMajor : "02"
107+
ReleaseKernelMinor : "33"
108+
MemoryType : Application # Application / System / Base
109+
HandleTableSize: 512
110+
IORegisterMapping:
111+
- 1ff50000-1ff57fff
112+
- 1ff70000-1ff77fff
113+
MemoryMapping:
114+
- 1f000000-1f5fffff:r
115+
SystemCallAccess:
116+
ArbitrateAddress: 34
117+
Break: 60
118+
CancelTimer: 28
119+
ClearEvent: 25
120+
ClearTimer: 29
121+
CloseHandle: 35
122+
ConnectToPort: 45
123+
ControlMemory: 1
124+
CreateAddressArbiter: 33
125+
CreateEvent: 23
126+
CreateMemoryBlock: 30
127+
CreateMutex: 19
128+
CreateSemaphore: 21
129+
CreateThread: 8
130+
CreateTimer: 26
131+
DuplicateHandle: 39
132+
ExitProcess: 3
133+
ExitThread: 9
134+
GetCurrentProcessorNumber: 17
135+
GetHandleInfo: 41
136+
GetProcessId: 53
137+
GetProcessIdOfThread: 54
138+
GetProcessIdealProcessor: 6
139+
GetProcessInfo: 43
140+
GetResourceLimit: 56
141+
GetResourceLimitCurrentValues: 58
142+
GetResourceLimitLimitValues: 57
143+
GetSystemInfo: 42
144+
GetSystemTick: 40
145+
GetThreadContext: 59
146+
GetThreadId: 55
147+
GetThreadIdealProcessor: 15
148+
GetThreadInfo: 44
149+
GetThreadPriority: 11
150+
MapMemoryBlock: 31
151+
OutputDebugString: 61
152+
QueryMemory: 2
153+
ReleaseMutex: 20
154+
ReleaseSemaphore: 22
155+
SendSyncRequest1: 46
156+
SendSyncRequest2: 47
157+
SendSyncRequest3: 48
158+
SendSyncRequest4: 49
159+
SendSyncRequest: 50
160+
SetThreadPriority: 12
161+
SetTimer: 27
162+
SignalEvent: 24
163+
SleepThread: 10
164+
UnmapMemoryBlock: 32
165+
WaitSynchronization1: 36
166+
WaitSynchronizationN: 37
167+
Backdoor: 123
168+
controlProcessMemory: 112
169+
StartInterProcessDma: 85
170+
FlushProcessDataCache: 84
171+
InvalidateProcessDataCache: 82
172+
GetDmaState: 87
173+
OpenProcess: 51
174+
InterruptNumbers:
175+
ServiceAccessControl:
176+
- APT:U
177+
- $hioFIO
178+
- $hostio0
179+
- $hostio1
180+
- ac:u
181+
- boss:U
182+
- cam:u
183+
- cecd:u
184+
- cfg:u
185+
- dlp:FKCL
186+
- dlp:SRVR
187+
- dsp::DSP
188+
- frd:u
189+
- fs:USER
190+
- gsp::Gpu
191+
- hid:USER
192+
- http:C
193+
- ir:u
194+
- mic:u
195+
- ndm:u
196+
- news:u
197+
- nwm::UDS
198+
- ptm:u
199+
- pxi:dev
200+
- soc:U
201+
- ssl:C
202+
- y2r:u
203+
- am:u
204+
- cfg:nor
205+
- csnd:SND
206+
207+
SystemControlInfo:
208+
SaveDataSize: 0KB # It doesn't use any save data.
209+
RemasterVersion: 2
210+
StackSize: 0x40000
211+
# JumpId: 0
212+
Dependency:
213+
ac: 0x0004013000002402L
214+
am: 0x0004013000001502L
215+
boss: 0x0004013000003402L
216+
camera: 0x0004013000001602L
217+
cecd: 0x0004013000002602L
218+
cfg: 0x0004013000001702L
219+
codec: 0x0004013000001802L
220+
csnd: 0x0004013000002702L
221+
dlp: 0x0004013000002802L
222+
dsp: 0x0004013000001a02L
223+
friends: 0x0004013000003202L
224+
gpio: 0x0004013000001b02L
225+
gsp: 0x0004013000001c02L
226+
hid: 0x0004013000001d02L
227+
http: 0x0004013000002902L
228+
i2c: 0x0004013000001e02L
229+
ir: 0x0004013000003302L
230+
mcu: 0x0004013000001f02L
231+
mic: 0x0004013000002002L
232+
ndm: 0x0004013000002b02L
233+
news: 0x0004013000003502L
234+
nim: 0x0004013000002c02L
235+
nwm: 0x0004013000002d02L
236+
pdn: 0x0004013000002102L
237+
ps: 0x0004013000003102L
238+
ptm: 0x0004013000002202L
239+
ro: 0x0004013000003702L
240+
socket: 0x0004013000002e02L
241+
spi: 0x0004013000002302L
242+
ssl: 0x0004013000002f02L

0 commit comments

Comments
 (0)