├── .gitignore ├── BootLoader ├── Makefile ├── load.ld └── source │ ├── clear_cache.arm9.s │ ├── clear_mem.s │ ├── common.h │ ├── crt0.arm9.s │ ├── encryption.c │ ├── encryption.h │ ├── key1.h │ ├── key2.h │ ├── launch_ds_crt0.s │ ├── main.arm7.c │ ├── main.arm9.c │ ├── miniConsole.h │ ├── modcrypt │ ├── aes.c │ ├── aes.h │ ├── bignum.c │ ├── bignum.h │ ├── bn_mul.h │ ├── config.h │ ├── crypto.c │ ├── crypto.h │ ├── dsi.c │ ├── dsi.h │ ├── f_xy.c │ ├── f_xy.h │ ├── padlock.h │ ├── u128_math.c │ └── u128_math.h │ ├── read_card.c │ ├── read_card.h │ ├── reset.arm7.s │ ├── reset.arm9.s │ ├── tonccpy.c │ └── tonccpy.h ├── CartFiles └── NTR_Launcher │ ├── Acekard2i.nds │ ├── ActionReplayDS.nds │ ├── CycloDS.nds │ ├── DSONEi.nds │ ├── DSTwo.nds │ ├── EZFlashV.nds │ ├── NCARD.nds │ ├── NTR_Launcher.ini │ ├── R4DS.nds │ ├── R4DS_Ultra.nds │ ├── R4iGold_Launcher.nds │ ├── R4iSDHC_Demon.nds │ ├── R4i_SDHC_AVRJ.nds │ └── TTDS.nds ├── License.txt ├── Makefile ├── README.md ├── arm7 ├── Makefile └── source │ └── main.c ├── arm9 ├── Makefile ├── audio │ ├── back.wav │ ├── dsboot.wav │ ├── dsiboot.wav │ ├── launch.wav │ ├── select.wav │ └── wrong.wav ├── common │ ├── audio.h │ ├── audio.twl.cpp │ ├── crc.h │ ├── crc.twl.c │ ├── defaultBanners.s │ ├── encryption.h │ ├── encryption.twl.c │ ├── inifile.h │ ├── inifile.twl.cpp │ ├── key1.h │ ├── key2.h │ ├── launcherData.h │ ├── nds_card.h │ ├── nds_card.twl.c │ ├── ndsheaderbanner.h │ ├── nitrofs.h │ ├── nitrofs.twl.c │ ├── read_card.h │ ├── read_card.twl.c │ ├── tonccpy.h │ └── tonccpy.itcm.c ├── graphics │ ├── Bot00.bmp │ ├── Bot01.bmp │ ├── Bot02.bmp │ ├── Bot02DE.bmp │ ├── Bot02ES.bmp │ ├── Bot02FR.bmp │ ├── Bot02IT.bmp │ ├── Bot02JA.bmp │ ├── Bot03.bmp │ ├── Bot03DE.bmp │ ├── Bot03ES.bmp │ ├── Bot03FR.bmp │ ├── Bot03IT.bmp │ ├── Bot03JA.bmp │ ├── Bot04.bmp │ ├── Bot04DE.bmp │ ├── Bot04ES.bmp │ ├── Bot04FR.bmp │ ├── Bot04IT.bmp │ ├── Bot04JA.bmp │ ├── Bot05.bmp │ ├── Bot05DE.bmp │ ├── Bot05ES.bmp │ ├── Bot05FR.bmp │ ├── Bot05IT.bmp │ ├── Bot05JA.bmp │ ├── Bot09.bmp │ ├── Bot10.bmp │ ├── BotDSi00.bmp │ ├── BotDSi01.bmp │ ├── BotDSi02.bmp │ ├── BotDSi03.bmp │ ├── BotDSi04.bmp │ ├── BotDSi05.bmp │ ├── BotDSi06.bmp │ ├── BotDSi07.bmp │ ├── BotDSi08.bmp │ ├── BotDSi09.bmp │ ├── BotDSi10.bmp │ ├── BotDSi11.bmp │ ├── CartPrompt01.bmp │ ├── CartPrompt01FR.bmp │ ├── CartPrompt01IT.bmp │ ├── CartPrompt02.bmp │ ├── CartPrompt02FR.bmp │ ├── CartPrompt02IT.bmp │ ├── CartPrompt03.bmp │ ├── CartPrompt03FR.bmp │ ├── CartPrompt03IT.bmp │ ├── CartPrompt04.bmp │ ├── CartPrompt04FR.bmp │ ├── CartPrompt04IT.bmp │ ├── CartPromptNoHS01.bmp │ ├── CartPromptNoHS02.bmp │ ├── CartPromptNoHS03.bmp │ ├── CartPromptNoHS04.bmp │ ├── DSi01.bmp │ ├── DSi02.bmp │ ├── DSi03.bmp │ ├── DSi04.bmp │ ├── DSi05.bmp │ ├── DSi06.bmp │ ├── DSi07.bmp │ ├── DSi08.bmp │ ├── DSi09.bmp │ ├── DSi10.bmp │ ├── DSi11.bmp │ ├── DSi12.bmp │ ├── DSi13.bmp │ ├── DSi14.bmp │ ├── DSi15.bmp │ ├── DSi16.bmp │ ├── DSi17.bmp │ ├── DSi18.bmp │ ├── DSi19.bmp │ ├── DSi20.bmp │ ├── DSi21.bmp │ ├── DSi22.bmp │ ├── DSi23.bmp │ ├── DSi24.bmp │ ├── DSi25.bmp │ ├── DSi26.bmp │ ├── DSi27.bmp │ ├── DSi28.bmp │ ├── DSi29.bmp │ ├── DSi30.bmp │ ├── DSi31.bmp │ ├── DSi32.bmp │ ├── DSi33.bmp │ ├── DSi34.bmp │ ├── DSi35.bmp │ ├── DSiCartPrompt01.bmp │ ├── DSiCartPrompt02.bmp │ ├── DSiCartPrompt03.bmp │ ├── DSiCartPrompt04.bmp │ ├── Top001.bmp │ ├── Top002.bmp │ ├── Top003.bmp │ ├── Top004.bmp │ ├── Top005.bmp │ ├── Top006.bmp │ ├── Top007.bmp │ ├── Top008.bmp │ ├── Top009.bmp │ ├── Top010.bmp │ ├── Top011.bmp │ ├── Top012.bmp │ ├── Top013.bmp │ ├── Top014.bmp │ ├── Top015.bmp │ ├── Top016.bmp │ ├── Top017.bmp │ ├── Top018.bmp │ ├── Top019.bmp │ ├── Top020.bmp │ ├── Top021.bmp │ ├── Top022.bmp │ ├── Top023.bmp │ ├── Top024.bmp │ ├── Top025.bmp │ ├── Top026.bmp │ ├── Top027.bmp │ ├── Top028.bmp │ ├── Top029.bmp │ ├── Top030.bmp │ ├── Top031.bmp │ ├── Top032.bmp │ ├── Top033.bmp │ ├── Top034.bmp │ ├── Top035.bmp │ ├── Top036.bmp │ ├── Top037.bmp │ ├── Top038.bmp │ ├── Top039.bmp │ ├── Top040.bmp │ ├── Top041.bmp │ ├── Top042.bmp │ ├── Top043.bmp │ ├── Top044.bmp │ ├── Top045.bmp │ ├── Top046.bmp │ ├── Top047.bmp │ ├── Top048.bmp │ ├── Top049.bmp │ ├── Top050.bmp │ ├── Top051.bmp │ ├── Top052.bmp │ ├── Top053.bmp │ ├── Top054.bmp │ ├── Top055.bmp │ ├── Top056.bmp │ ├── Top057.bmp │ ├── Top058.bmp │ ├── Top059.bmp │ ├── Top060.bmp │ ├── Top061.bmp │ ├── Top062.bmp │ ├── Top063.bmp │ ├── Top064.bmp │ ├── Top065.bmp │ ├── Top066.bmp │ ├── Top067.bmp │ ├── Top068.bmp │ ├── Top069.bmp │ ├── Top070.bmp │ ├── Top071.bmp │ ├── Top072.bmp │ ├── Top073.bmp │ ├── Top074.bmp │ ├── Top075.bmp │ ├── Top076.bmp │ ├── Top077.bmp │ ├── Top078.bmp │ ├── Top079.bmp │ ├── Top080.bmp │ ├── Top081.bmp │ ├── Top082.bmp │ ├── Top083.bmp │ ├── Top084.bmp │ ├── Top085.bmp │ ├── Top086.bmp │ ├── Top087.bmp │ ├── Top088.bmp │ ├── Top089.bmp │ ├── Top090.bmp │ ├── Top091.bmp │ ├── Top092.bmp │ ├── Top093.bmp │ ├── Top094.bmp │ ├── Top095.bmp │ ├── Top096.bmp │ ├── Top097.bmp │ ├── Top098.bmp │ ├── Top099.bmp │ ├── Top100.bmp │ ├── Top101.bmp │ ├── Top102.bmp │ ├── Top103.bmp │ ├── Top104.bmp │ ├── Top105.bmp │ ├── Top106.bmp │ ├── Top107.bmp │ ├── Top108.bmp │ ├── Top109.bmp │ ├── Top110.bmp │ ├── Top111.bmp │ ├── Top112.bmp │ ├── Top113.bmp │ ├── Top114.bmp │ ├── Top115.bmp │ ├── Top116.bmp │ ├── Top117.bmp │ ├── Top118.bmp │ ├── Top119.bmp │ ├── Top120.bmp │ ├── Top121.bmp │ ├── Top122.bmp │ ├── Top123.bmp │ ├── Top124.bmp │ ├── White.bmp │ ├── font.bmp │ ├── font6x8.bmp │ ├── hbmenu_banner.bmp │ ├── hbmenu_banner_cartSelected.bmp │ ├── hbmenu_banner_noCart.bmp │ ├── hbmenu_consolebg.bmp │ ├── loading.bmp │ ├── suberror00.bmp │ ├── suberror01.bmp │ ├── suberror02.bmp │ ├── suberror03.bmp │ ├── suberror04.bmp │ ├── suberror05.bmp │ ├── suberror06.bmp │ ├── toperror2_00.bmp │ ├── toperror2_01.bmp │ ├── toperror2_02.bmp │ ├── toperror2_03.bmp │ ├── toperror2_04.bmp │ ├── toperror2_05.bmp │ └── toperror2_06.bmp ├── hbmenu │ ├── args.h │ ├── args.twl.cpp │ ├── file_browse.h │ ├── file_browse.twl.cpp │ ├── hbmenu.h │ ├── hbmenu.twl.cpp │ ├── iconTitle.h │ ├── iconTitle.twl.cpp │ ├── nds_loader_arm9.c │ └── nds_loader_arm9.h ├── include │ ├── dsCardDefault.bin │ ├── dsCardInvalid.bin │ └── hbNoIcon.bin └── source │ ├── bootsplash.h │ ├── bootsplash.twl.cpp │ ├── debugConsole.h │ ├── debugConsole.twl.c │ ├── launch_engine.c │ ├── launch_engine.h │ └── main.cpp ├── icon.bmp └── ndsbootloader ├── .gitignore ├── Makefile ├── arm9code └── mpu_reset.s ├── load2.ld └── source ├── arm7clear.s ├── arm9clear.arm.c ├── arm9mpu_reset.s ├── biosCalls.s ├── boot.c ├── boot.h ├── card.h ├── disc_io.h ├── fat.c ├── fat.h ├── io_dldi.h ├── io_dldi.s ├── load_crt0.s ├── sdmmc.c ├── sdmmc.h ├── tonccpy.c └── tonccpy.h /.gitignore: -------------------------------------------------------------------------------- 1 | *.cmd 2 | *.app 3 | *.exe 4 | *.cia 5 | *.rar 6 | *.zip 7 | /*.nds 8 | *.app 9 | *.tmd 10 | *.o 11 | *.arm7 12 | Thumbs.db 13 | *.arm9 14 | *.elf 15 | *.d 16 | *.map 17 | title/ 18 | arm9/data/ 19 | arm7/build 20 | arm9/build/ 21 | arm9/data/load.bin 22 | BootLoader/build 23 | BootLoader/load.bin 24 | arm9/source/version.h 25 | desktop.ini 26 | data -------------------------------------------------------------------------------- /BootLoader/Makefile: -------------------------------------------------------------------------------- 1 | #--------------------------------------------------------------------------------- 2 | .SUFFIXES: 3 | #--------------------------------------------------------------------------------- 4 | ifeq ($(strip $(DEVKITARM)),) 5 | $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) 6 | endif 7 | 8 | -include $(DEVKITARM)/ds_rules 9 | 10 | #--------------------------------------------------------------------------------- 11 | # BUILD is the directory where object files & intermediate files will be placed 12 | # SOURCES is a list of directories containing source code 13 | # INCLUDES is a list of directories containing extra header files 14 | #--------------------------------------------------------------------------------- 15 | TARGET := load 16 | BUILD := build 17 | SOURCES := source source/patches source/modcrypt 18 | INCLUDES := build ../include source/modcrypt 19 | DATA := ../data 20 | SPECS := specs 21 | 22 | #--------------------------------------------------------------------------------- 23 | # options for code generation 24 | #--------------------------------------------------------------------------------- 25 | ARCH := -mthumb-interwork -march=armv4t -mtune=arm7tdmi 26 | 27 | CFLAGS := -g -Wall -Wextra -Werror -O2 \ 28 | -fomit-frame-pointer \ 29 | -ffast-math \ 30 | $(ARCH) 31 | 32 | CFLAGS += $(INCLUDE) -DARM7 33 | 34 | ASFLAGS := -g $(ARCH) $(INCLUDE) 35 | LDFLAGS := -nostartfiles -T $(TOPDIR)/load.ld -g $(ARCH) -Wl,-Map,$(TARGET).map 36 | 37 | LIBS := -lnds7 38 | 39 | #--------------------------------------------------------------------------------- 40 | # list of directories containing libraries, this must be the top level containing 41 | # include and lib 42 | #--------------------------------------------------------------------------------- 43 | LIBDIRS := $(LIBNDS) 44 | 45 | 46 | #--------------------------------------------------------------------------------- 47 | # no real need to edit anything past this point unless you need to add additional 48 | # rules for different file extensions 49 | #--------------------------------------------------------------------------------- 50 | ifneq ($(BUILD),$(notdir $(CURDIR))) 51 | #--------------------------------------------------------------------------------- 52 | 53 | export TOPDIR := $(CURDIR) 54 | export LOADBIN := $(CURDIR)/../data/$(TARGET).bin 55 | export LOADELF := $(CURDIR)/$(TARGET).elf 56 | export DEPSDIR := $(CURDIR)/$(BUILD) 57 | 58 | export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) 59 | 60 | export CC := $(PREFIX)gcc 61 | export CXX := $(PREFIX)g++ 62 | export AR := $(PREFIX)ar 63 | export OBJCOPY := $(PREFIX)objcopy 64 | 65 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) 66 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) 67 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) 68 | 69 | export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) 70 | 71 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ 72 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ 73 | -I$(CURDIR)/$(BUILD) 74 | 75 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) 76 | 77 | #--------------------------------------------------------------------------------- 78 | # use CC for linking standard C 79 | #--------------------------------------------------------------------------------- 80 | export LD := $(CC) 81 | #--------------------------------------------------------------------------------- 82 | 83 | .PHONY: $(BUILD) clean 84 | 85 | #--------------------------------------------------------------------------------- 86 | $(BUILD): 87 | @[ -d $@ ] || mkdir -p $@ 88 | @$(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile 89 | 90 | #--------------------------------------------------------------------------------- 91 | clean: 92 | @echo clean ... 93 | @rm -fr $(BUILD) *.elf 94 | 95 | 96 | #--------------------------------------------------------------------------------- 97 | else 98 | 99 | DEPENDS := $(OFILES:.o=.d) 100 | 101 | #--------------------------------------------------------------------------------- 102 | # main targets 103 | #--------------------------------------------------------------------------------- 104 | $(LOADBIN) : $(LOADELF) 105 | @$(OBJCOPY) -O binary $< $@ 106 | @echo built ... $(notdir $@) 107 | 108 | 109 | $(LOADELF) : $(OFILES) 110 | @echo linking $(notdir $@) 111 | @$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@ 112 | 113 | -include $(DEPENDS) 114 | 115 | 116 | #--------------------------------------------------------------------------------- 117 | %.bin.o : %.bin 118 | #--------------------------------------------------------------------------------- 119 | @echo $(notdir $<) 120 | $(bin2o) 121 | 122 | #--------------------------------------------------------------------------------------- 123 | endif 124 | #--------------------------------------------------------------------------------------- 125 | -------------------------------------------------------------------------------- /BootLoader/source/clear_cache.arm9.s: -------------------------------------------------------------------------------- 1 | @ NitroHax -- Cheat tool for the Nintendo DS 2 | @ Copyright (C) 2008 Michael "Chishm" Chisholm 3 | @ 4 | @ This program is free software: you can redistribute it and/or modify 5 | @ it under the terms of the GNU General Public License as published by 6 | @ the Free Software Foundation, either version 3 of the License, or 7 | @ (at your option) any later version. 8 | @ 9 | @ This program is distributed in the hope that it will be useful, 10 | @ but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | @ GNU General Public License for more details. 13 | @ 14 | @ You should have received a copy of the GNU General Public License 15 | @ along with this program. If not, see . 16 | 17 | @ Clears ICache and Dcache, and resets the protection units 18 | @ Originally written by Darkain, modified by Chishm 19 | 20 | #include 21 | 22 | .arm 23 | 24 | BEGIN_ASM_FUNC arm9_clearCache 25 | @ Clean and flush cache 26 | mov r1, #0 27 | outer_loop: 28 | mov r0, #0 29 | inner_loop: 30 | orr r2, r1, r0 31 | mcr p15, 0, r2, c7, c14, 2 32 | add r0, r0, #0x20 33 | cmp r0, #0x400 34 | bne inner_loop 35 | add r1, r1, #0x40000000 36 | cmp r1, #0x0 37 | bne outer_loop 38 | 39 | mov r3, #0 40 | mcr p15, 0, r3, c7, c5, 0 @ Flush ICache 41 | mcr p15, 0, r3, c7, c6, 0 @ Flush DCache 42 | mcr p15, 0, r3, c7, c10, 4 @ empty write buffer 43 | 44 | mcr p15, 0, r3, c3, c0, 0 @ disable write buffer (def = 0) 45 | 46 | mcr p15, 0, r3, c2, c0, 0 @ disable DTCM and protection unit 47 | 48 | mcr p15, 0, r3, c6, c0, 0 @ disable protection unit 0 (def = 0) 49 | mcr p15, 0, r3, c6, c1, 0 @ disable protection unit 1 (def = 0) 50 | mcr p15, 0, r3, c6, c2, 0 @ disable protection unit 2 (def = 0) 51 | mcr p15, 0, r3, c6, c3, 0 @ disable protection unit 3 (def = 0) 52 | mcr p15, 0, r3, c6, c4, 0 @ disable protection unit 4 (def = ?) 53 | mcr p15, 0, r3, c6, c5, 0 @ disable protection unit 5 (def = ?) 54 | mcr p15, 0, r3, c6, c6, 0 @ disable protection unit 6 (def = ?) 55 | mcr p15, 0, r3, c6, c7, 0 @ disable protection unit 7 (def = ?) 56 | 57 | mcr p15, 0, r3, c5, c0, 3 @ IAccess 58 | mcr p15, 0, r3, c5, c0, 2 @ DAccess 59 | 60 | mov r3, #0x00800000 61 | add r3, r3, #0x00A 62 | mcr p15, 0, r3, c9, c1, 0 @ DTCM base (def = 0x0080000A) ??? 63 | 64 | mov r3, #0x0000000C 65 | mcr p15, 0, r3, c9, c1, 1 @ ITCM base (def = 0x0000000C) ??? 66 | 67 | bx lr 68 | 69 | -------------------------------------------------------------------------------- /BootLoader/source/clear_mem.s: -------------------------------------------------------------------------------- 1 | @ NitroHax -- Cheat tool for the Nintendo DS 2 | @ Copyright (C) 2008 Michael "Chishm" Chisholm 3 | @ 4 | @ This program is free software: you can redistribute it and/or modify 5 | @ it under the terms of the GNU General Public License as published by 6 | @ the Free Software Foundation, either version 3 of the License, or 7 | @ (at your option) any later version. 8 | @ 9 | @ This program is distributed in the hope that it will be useful, 10 | @ but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | @ GNU General Public License for more details. 13 | @ 14 | @ You should have received a copy of the GNU General Public License 15 | @ along with this program. If not, see . 16 | 17 | @ void arm7_clearmem (void* loc, size_t len); 18 | @ Clears memory using an stmia loop 19 | 20 | #include 21 | 22 | .arm 23 | 24 | 25 | BEGIN_ASM_FUNC arm7_clearmem 26 | add r1, r0, r1 27 | stmfd sp!, {r4-r9} 28 | mov r2, #0 29 | mov r3, #0 30 | mov r4, #0 31 | mov r5, #0 32 | mov r6, #0 33 | mov r7, #0 34 | mov r8, #0 35 | mov r9, #0 36 | 37 | clearmem_loop: 38 | stmia r0!, {r2-r9} 39 | cmp r0, r1 40 | blt clearmem_loop 41 | 42 | ldmfd sp!, {r4-r9} 43 | bx lr 44 | 45 | -------------------------------------------------------------------------------- /BootLoader/source/crt0.arm9.s: -------------------------------------------------------------------------------- 1 | @--------------------------------------------------------------------------------- 2 | .global _arm9_start 3 | @--------------------------------------------------------------------------------- 4 | .align 4 5 | .arm 6 | @--------------------------------------------------------------------------------- 7 | _arm9_start: 8 | @--------------------------------------------------------------------------------- 9 | mov r0, #0x04000000 @ IME = 0; 10 | add r0, r0, #0x208 11 | strh r0, [r0] 12 | 13 | mov r0, #0x12 @ Switch to IRQ Mode 14 | msr cpsr, r0 15 | ldr sp, =__arm9_sp_irq @ Set IRQ stack 16 | 17 | mov r0, #0x13 @ Switch to SVC Mode 18 | msr cpsr, r0 19 | ldr sp, =__arm9_sp_svc @ Set SVC stack 20 | 21 | mov r0, #0x1F @ Switch to System Mode 22 | msr cpsr, r0 23 | ldr sp, =__arm9_sp_usr @ Set user stack 24 | 25 | ldr r0, =__arm9_bss_start @ Clear BSS section to 0x00 26 | ldr r1, =__arm9_bss_end 27 | sub r1, r1, r0 28 | bl ClearMem 29 | 30 | mov r0, #0 @ int argc 31 | mov r1, #0 @ char *argv[] 32 | ldr r3, =arm9_main 33 | bl _blx_r3_stub @ jump to user code 34 | 35 | @ If the user ever returns, restart 36 | b _arm9_start 37 | 38 | @--------------------------------------------------------------------------------- 39 | _blx_r3_stub: 40 | @--------------------------------------------------------------------------------- 41 | bx r3 42 | 43 | 44 | @--------------------------------------------------------------------------------- 45 | @ Clear memory to 0x00 if length != 0 46 | @ r0 = Start Address 47 | @ r1 = Length 48 | @--------------------------------------------------------------------------------- 49 | ClearMem: 50 | @--------------------------------------------------------------------------------- 51 | mov r2, #3 @ Round down to nearest word boundary 52 | add r1, r1, r2 @ Shouldn't be needed 53 | bics r1, r1, r2 @ Clear 2 LSB (and set Z) 54 | bxeq lr @ Quit if copy size is 0 55 | 56 | mov r2, #0 57 | ClrLoop: 58 | stmia r0!, {r2} 59 | subs r1, r1, #4 60 | bne ClrLoop 61 | bx lr 62 | 63 | -------------------------------------------------------------------------------- /BootLoader/source/encryption.c: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include "encryption.h" 21 | #include "key1.h" 22 | #include "key2.h" 23 | #include "tonccpy.h" 24 | 25 | #define KEYSIZE 0x1048 26 | 27 | static u32 keycode [3]; 28 | static u32 keybuf [KEYSIZE/sizeof(u32)]; 29 | 30 | void crypt_64bit_up (u32* ptr) { 31 | u32 x = ptr[1]; 32 | u32 y = ptr[0]; 33 | u32 z; 34 | int i; 35 | 36 | for (i = 0; i < 0x10; i++) { 37 | z = keybuf[i] ^ x; 38 | x = keybuf[0x012 + ((z>>24)&0xff)]; 39 | x = keybuf[0x112 + ((z>>16)&0xff)] + x; 40 | x = keybuf[0x212 + ((z>> 8)&0xff)] ^ x; 41 | x = keybuf[0x312 + ((z>> 0)&0xff)] + x; 42 | x = y ^ x; 43 | y = z; 44 | } 45 | 46 | ptr[0] = x ^ keybuf[0x10]; 47 | ptr[1] = y ^ keybuf[0x11]; 48 | } 49 | 50 | void crypt_64bit_down (u32* ptr) { 51 | u32 x = ptr[1]; 52 | u32 y = ptr[0]; 53 | u32 z; 54 | int i; 55 | 56 | for (i = 0x11; i > 0x01; i--) { 57 | z = keybuf[i] ^ x; 58 | x = keybuf[0x012 + ((z>>24)&0xff)]; 59 | x = keybuf[0x112 + ((z>>16)&0xff)] + x; 60 | x = keybuf[0x212 + ((z>> 8)&0xff)] ^ x; 61 | x = keybuf[0x312 + ((z>> 0)&0xff)] + x; 62 | x = y ^ x; 63 | y = z; 64 | } 65 | 66 | ptr[0] = x ^ keybuf[0x01]; 67 | ptr[1] = y ^ keybuf[0x00]; 68 | } 69 | 70 | static u32 bswap_32bit (u32 in) { 71 | u8 a,b,c,d; 72 | a = (u8)((in >> 0) & 0xff); 73 | b = (u8)((in >> 8) & 0xff); 74 | c = (u8)((in >> 16) & 0xff); 75 | d = (u8)((in >> 24) & 0xff); 76 | 77 | u32 out = (a << 24) | (b << 16) | (c << 8) | (d << 0); 78 | 79 | return out; 80 | } 81 | 82 | void apply_keycode (u32 modulo) { 83 | u32 scratch[2]; 84 | int i; 85 | modulo = modulo / sizeof(*keycode); 86 | 87 | crypt_64bit_up (&keycode[1]); 88 | crypt_64bit_up (&keycode[0]); 89 | toncset (scratch, 0, 8); 90 | 91 | for (i = 0; i < 0x12; i+=1) { 92 | keybuf[i] = keybuf[i] ^ bswap_32bit (keycode[i % modulo]); 93 | } 94 | for (i = 0; i < 0x412; i+=2) { 95 | crypt_64bit_up (scratch); 96 | keybuf[i] = scratch[1]; 97 | keybuf[i+1] = scratch[0]; 98 | } 99 | } 100 | 101 | void init_keycode (u32 idcode, u32 level, u32 modulo, int iCardDevice) { 102 | tonccpy ((u8*)keybuf, (iCardDevice ? gEncrDataTwl : gEncrData), KEYSIZE); 103 | keycode[0] = idcode; 104 | keycode[1] = idcode/2; 105 | keycode[2] = idcode*2; 106 | 107 | if (level >= 1) apply_keycode (modulo); // first apply (always) 108 | if (level >= 2) apply_keycode (modulo); // second apply (optional) 109 | keycode[1] = keycode[1] * 2; 110 | keycode[2] = keycode[2] / 2; 111 | if (level >= 3) apply_keycode (modulo); // third apply (optional) 112 | } 113 | -------------------------------------------------------------------------------- /BootLoader/source/encryption.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef ENCRYPTION_H 20 | #define ENCRYPTION_H 21 | 22 | #include 23 | void init_keycode (u32 idcode, u32 level, u32 modulo, int iCardDevice); 24 | void crypt_64bit_down (u32* ptr); 25 | void crypt_64bit_up (u32* ptr); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /BootLoader/source/launch_ds_crt0.s: -------------------------------------------------------------------------------- 1 | @--------------------------------------------------------------------------------- 2 | .section ".init" 3 | .global _start 4 | @--------------------------------------------------------------------------------- 5 | .align 4 6 | .arm 7 | @--------------------------------------------------------------------------------- 8 | _start: 9 | @--------------------------------------------------------------------------------- 10 | mov r0, #0x04000000 @ IME = 0; 11 | add r0, r0, #0x208 12 | strh r0, [r0] 13 | 14 | mov r0, #0x12 @ Switch to IRQ Mode 15 | msr cpsr, r0 16 | ldr sp, =__sp_irq @ Set IRQ stack 17 | 18 | mov r0, #0x13 @ Switch to SVC Mode 19 | msr cpsr, r0 20 | ldr sp, =__sp_svc @ Set SVC stack 21 | 22 | mov r0, #0x1F @ Switch to System Mode 23 | msr cpsr, r0 24 | ldr sp, =__sp_usr @ Set user stack 25 | 26 | ldr r0, =__bss_start @ Clear BSS section to 0x00 27 | ldr r1, =__bss_end 28 | sub r1, r1, r0 29 | bl ClearMem 30 | 31 | @ Load ARM9 region into main RAM 32 | ldr r1, =__arm9_source_start 33 | ldr r2, =__arm9_start 34 | ldr r3, =__arm9_source_end 35 | sub r3, r3, r1 36 | bl CopyMem 37 | 38 | @ Start ARM9 binary 39 | ldr r0, =0x02FFFE24 40 | ldr r1, =_arm9_start 41 | str r1, [r0] 42 | 43 | mov r0, #0 @ int argc 44 | mov r1, #0 @ char *argv[] 45 | ldr r3, =arm7_main 46 | bl _blx_r3_stub @ jump to user code 47 | 48 | @ If the user ever returns, restart 49 | b _start 50 | 51 | @--------------------------------------------------------------------------------- 52 | _blx_r3_stub: 53 | @--------------------------------------------------------------------------------- 54 | bx r3 55 | 56 | 57 | @--------------------------------------------------------------------------------- 58 | @ Clear memory to 0x00 if length != 0 59 | @ r0 = Start Address 60 | @ r1 = Length 61 | @--------------------------------------------------------------------------------- 62 | ClearMem: 63 | @--------------------------------------------------------------------------------- 64 | mov r2, #3 @ Round down to nearest word boundary 65 | add r1, r1, r2 @ Shouldn't be needed 66 | bics r1, r1, r2 @ Clear 2 LSB (and set Z) 67 | bxeq lr @ Quit if copy size is 0 68 | 69 | mov r2, #0 70 | ClrLoop: 71 | stmia r0!, {r2} 72 | subs r1, r1, #4 73 | bne ClrLoop 74 | bx lr 75 | 76 | @--------------------------------------------------------------------------------- 77 | @ Copy memory if length != 0 78 | @ r1 = Source Address 79 | @ r2 = Dest Address 80 | @ r4 = Dest Address + Length 81 | @--------------------------------------------------------------------------------- 82 | CopyMemCheck: 83 | @--------------------------------------------------------------------------------- 84 | sub r3, r4, r2 @ Is there any data to copy? 85 | @--------------------------------------------------------------------------------- 86 | @ Copy memory 87 | @ r1 = Source Address 88 | @ r2 = Dest Address 89 | @ r3 = Length 90 | @--------------------------------------------------------------------------------- 91 | CopyMem: 92 | @--------------------------------------------------------------------------------- 93 | mov r0, #3 @ These commands are used in cases where 94 | add r3, r3, r0 @ the length is not a multiple of 4, 95 | bics r3, r3, r0 @ even though it should be. 96 | bxeq lr @ Length is zero, so exit 97 | CIDLoop: 98 | ldmia r1!, {r0} 99 | stmia r2!, {r0} 100 | subs r3, r3, #4 101 | bne CIDLoop 102 | bx lr 103 | 104 | @--------------------------------------------------------------------------------- 105 | .align 106 | .pool 107 | .end 108 | @--------------------------------------------------------------------------------- 109 | -------------------------------------------------------------------------------- /BootLoader/source/miniConsole.h: -------------------------------------------------------------------------------- 1 | #define ARM9 2 | #undef ARM7 3 | 4 | #ifndef MINICONSOLE_H 5 | #define MINICONSOLE_H 6 | 7 | #include 8 | #include 9 | 10 | int windowX = 0; 11 | int windowY = 0; 12 | int windowWidth = 32; 13 | int windowHeight = 24; 14 | int consoleWidth = 32; 15 | int tabSize = 3; 16 | int cursorX = 0; 17 | int cursorY = 0; 18 | u16 fontCurPal = 1; 19 | u16* fontBgMap = BG_MAP_RAM_SUB(4); 20 | 21 | static void miniNewRow() { 22 | cursorY ++; 23 | if(cursorY >= windowHeight) { 24 | int rowCount; 25 | int colCount; 26 | cursorY --; 27 | for(rowCount = 0; rowCount < windowHeight - 1; rowCount++) 28 | for(colCount = 0; colCount < windowWidth; colCount++) 29 | fontBgMap[(colCount + windowX) + (rowCount + windowY) * consoleWidth] = 30 | fontBgMap[(colCount + windowX) + (rowCount + windowY + 1) * consoleWidth]; 31 | 32 | for(colCount = 0; colCount < windowWidth; colCount++) 33 | fontBgMap[(colCount + windowX) + (rowCount + windowY) * consoleWidth] = 34 | (' '); 35 | } 36 | } 37 | 38 | static void miniconsolePrintChar(char c) { 39 | if (c==0) return; 40 | if(fontBgMap == 0) return; 41 | if(cursorX >= windowWidth) { cursorX = 0; miniNewRow(); } 42 | switch(c) { 43 | case 8: 44 | cursorX--; 45 | if(cursorX < 0) { 46 | if(cursorY > 0) { 47 | cursorX = windowX - 1; 48 | cursorY--; 49 | } else { 50 | cursorX = 0; 51 | } 52 | } 53 | fontBgMap[cursorX + windowX + (cursorY + windowY) * consoleWidth] = (u16)c | fontCurPal << 12; 54 | break; 55 | case 9: 56 | cursorX += tabSize - ((cursorX)%(tabSize)); 57 | break; 58 | case 10: 59 | miniNewRow(); // fallthrough 60 | case 13: 61 | cursorX = 0; 62 | break; 63 | default: 64 | fontBgMap[cursorX + windowX + (cursorY + windowY) * consoleWidth] = (u16)c | fontCurPal << 12; 65 | ++cursorX; 66 | break; 67 | } 68 | } 69 | 70 | /*static void miniconsoleCls(char mode) { 71 | int i = 0; 72 | int colTemp,rowTemp; 73 | 74 | switch (mode) { 75 | case '[': 76 | case '0': 77 | { 78 | colTemp = cursorX ; 79 | rowTemp = cursorY ; 80 | 81 | while(i++ < ((windowHeight * windowWidth) - (rowTemp * consoleWidth + colTemp))) 82 | miniconsolePrintChar(' '); 83 | 84 | cursorX = colTemp; 85 | cursorY = rowTemp; 86 | break; 87 | } 88 | case '1': 89 | { 90 | colTemp = cursorX ; 91 | rowTemp = cursorY ; 92 | 93 | cursorY = 0; 94 | cursorX = 0; 95 | 96 | while (i++ < (rowTemp * windowWidth + colTemp)) 97 | miniconsolePrintChar(' '); 98 | 99 | cursorX = colTemp; 100 | cursorY = rowTemp; 101 | break; 102 | } 103 | case '2': 104 | { 105 | cursorY = 0; 106 | cursorX = 0; 107 | 108 | while(i++ < windowHeight * windowWidth) 109 | miniconsolePrintChar(' '); 110 | 111 | cursorY = 0; 112 | cursorX = 0; 113 | break; 114 | } 115 | } 116 | }*/ 117 | 118 | 119 | void miniconsoleSetWindow(int x, int y, int width, int height) { 120 | windowX = x; 121 | windowY = y; 122 | windowWidth = width; 123 | windowHeight = height; 124 | cursorX = 0; 125 | cursorY = 0; 126 | } 127 | 128 | void Print(char *str) { 129 | if (str == 0)return; 130 | while(*str)miniconsolePrintChar(*(str++)); 131 | } 132 | 133 | #endif // MINICONSOLE_ARM9_H 134 | 135 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/aes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file aes.h 3 | * 4 | * Copyright (C) 2006-2010, Brainspark B.V. 5 | * 6 | * This file is part of PolarSSL (http://www.polarssl.org) 7 | * Lead Maintainer: Paul Bakker 8 | * 9 | * All rights reserved. 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License along 22 | * with this program; if not, write to the Free Software Foundation, Inc., 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24 | */ 25 | #ifndef POLARSSL_AES_H 26 | #define POLARSSL_AES_H 27 | 28 | #define AES_ENCRYPT 1 29 | #define AES_DECRYPT 0 30 | 31 | #define POLARSSL_ERR_AES_INVALID_KEY_LENGTH -0x0800 32 | #define POLARSSL_ERR_AES_INVALID_INPUT_LENGTH -0x0810 33 | 34 | /** 35 | * \brief AES context structure 36 | */ 37 | typedef struct 38 | { 39 | int nr; /*!< number of rounds */ 40 | unsigned long *rk; /*!< AES round keys */ 41 | unsigned long buf[68]; /*!< unaligned data */ 42 | } 43 | aes_context; 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief AES key schedule (encryption) 51 | * 52 | * \param ctx AES context to be initialized 53 | * \param key encryption key 54 | * \param keysize must be 128, 192 or 256 55 | * 56 | * \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH 57 | */ 58 | int aes_setkey_enc( aes_context *ctx, const unsigned char *key, int keysize ); 59 | 60 | /** 61 | * \brief AES key schedule (decryption) 62 | * 63 | * \param ctx AES context to be initialized 64 | * \param key decryption key 65 | * \param keysize must be 128, 192 or 256 66 | * 67 | * \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH 68 | */ 69 | int aes_setkey_dec( aes_context *ctx, const unsigned char *key, int keysize ); 70 | 71 | /** 72 | * \brief AES-ECB block encryption/decryption 73 | * 74 | * \param ctx AES context 75 | * \param mode AES_ENCRYPT or AES_DECRYPT 76 | * \param input 16-byte input block 77 | * \param output 16-byte output block 78 | * 79 | * \return 0 if successful 80 | */ 81 | int aes_crypt_ecb( aes_context *ctx, 82 | int mode, 83 | const unsigned char input[16], 84 | unsigned char output[16] ); 85 | 86 | /** 87 | * \brief AES-CBC buffer encryption/decryption 88 | * Length should be a multiple of the block 89 | * size (16 bytes) 90 | * 91 | * \param ctx AES context 92 | * \param mode AES_ENCRYPT or AES_DECRYPT 93 | * \param length length of the input data 94 | * \param iv initialization vector (updated after use) 95 | * \param input buffer holding the input data 96 | * \param output buffer holding the output data 97 | * 98 | * \return 0 if successful, or POLARSSL_ERR_AES_INVALID_INPUT_LENGTH 99 | */ 100 | int aes_crypt_cbc( aes_context *ctx, 101 | int mode, 102 | int length, 103 | unsigned char iv[16], 104 | const unsigned char *input, 105 | unsigned char *output ); 106 | 107 | /** 108 | * \brief AES-CFB128 buffer encryption/decryption. 109 | * 110 | * \param ctx AES context 111 | * \param mode AES_ENCRYPT or AES_DECRYPT 112 | * \param length length of the input data 113 | * \param iv_off offset in IV (updated after use) 114 | * \param iv initialization vector (updated after use) 115 | * \param input buffer holding the input data 116 | * \param output buffer holding the output data 117 | * 118 | * \return 0 if successful 119 | */ 120 | int aes_crypt_cfb128( aes_context *ctx, 121 | int mode, 122 | int length, 123 | int *iv_off, 124 | unsigned char iv[16], 125 | const unsigned char *input, 126 | unsigned char *output ); 127 | 128 | /** 129 | * \brief Checkup routine 130 | * 131 | * \return 0 if successful, or 1 if the test failed 132 | */ 133 | int aes_self_test( int verbose ); 134 | 135 | #ifdef __cplusplus 136 | } 137 | #endif 138 | 139 | #endif /* aes.h */ 140 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/config.h: -------------------------------------------------------------------------------- 1 | 2 | #define MBEDTLS_BIGNUM_C 3 | #define POLARSSL_AES_C 4 | 5 | #define MBEDTLS_HAVE_ASM 6 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/crypto.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "crypto.h" 4 | #include "u128_math.h" 5 | #include "f_xy.h" 6 | #include "dsi.h" 7 | 8 | // more info: 9 | // https://github.com/Jimmy-Z/TWLbf/blob/master/dsi.c 10 | // https://github.com/Jimmy-Z/bfCL/blob/master/dsi.h 11 | // ported back to 32 bit for ARM9 12 | 13 | static dsi_context nand_ctx ; 14 | static dsi_context boot2_ctx ; 15 | static dsi_context es_ctx ; 16 | 17 | static uint8_t nand_ctr_iv[16]; 18 | static uint8_t boot2_ctr[16]; 19 | 20 | static void generate_key(uint8_t *generated_key, const uint32_t *console_id, const key_mode_t mode) 21 | { 22 | uint32_t key[4]; 23 | switch (mode) 24 | { 25 | case NAND: 26 | key[0] = console_id[0]; 27 | key[1] = console_id[0] ^ KEYSEED_DSI_NAND_0; 28 | key[2] = console_id[1] ^ KEYSEED_DSI_NAND_1; 29 | key[3] = console_id[1]; 30 | break; 31 | case NAND_3DS: 32 | key[0] = (console_id[0] ^ KEYSEED_3DS_NAND_0) | 0x80000000; 33 | key[1] = KEYSEED_3DS_NAND_1; 34 | key[2] = KEYSEED_3DS_NAND_2; 35 | key[3] = console_id[1] ^ KEYSEED_3DS_NAND_3; 36 | break; 37 | case ES: 38 | key[0] = KEYSEED_ES_0; 39 | key[1] = KEYSEED_ES_1; 40 | key[2] = console_id[1] ^ KEYSEED_ES_2; 41 | key[3] = console_id[0]; 42 | break; 43 | default: 44 | break; 45 | } 46 | u128_xor((uint8_t *)key, mode == ES ? DSi_ES_KEY_Y : DSi_NAND_KEY_Y); 47 | u128_add((uint8_t *)key, DSi_KEY_MAGIC); 48 | u128_lrot((uint8_t *)key, 42) ; 49 | memcpy(generated_key, key, 16) ; 50 | } 51 | 52 | int dsi_sha1_verify(const void *digest_verify, const void *data, unsigned len) 53 | { 54 | uint8_t digest[SHA1_LEN]; 55 | swiSHA1Calc(digest, data, len); 56 | return memcmp(digest, digest_verify, SHA1_LEN); 57 | } 58 | 59 | void dsi_crypt_init(const uint8_t *console_id_be, const uint8_t *emmc_cid, int is3DS) 60 | { 61 | uint32_t console_id[2]; 62 | GET_UINT32_BE(console_id[0], console_id_be, 4); 63 | GET_UINT32_BE(console_id[1], console_id_be, 0); 64 | 65 | uint8_t key[16]; 66 | generate_key(key, console_id, is3DS ? NAND_3DS : NAND); 67 | dsi_set_key(&nand_ctx, key) ; 68 | 69 | generate_key(key, console_id, ES); 70 | dsi_set_key(&es_ctx, key) ; 71 | 72 | dsi_set_key(&boot2_ctx, DSi_BOOT2_KEY) ; 73 | 74 | swiSHA1Calc(nand_ctr_iv, emmc_cid, 16); 75 | 76 | } 77 | 78 | // crypt one block, in/out must be aligned to 32 bit(restriction induced by xor_128) 79 | // offset as block offset, block as AES block 80 | void dsi_nand_crypt_1(uint8_t* out, const uint8_t* in, uint32_t offset) 81 | { 82 | uint8_t ctr[16] ; 83 | memcpy(ctr, nand_ctr_iv, sizeof(nand_ctr_iv)) ; 84 | u128_add32(ctr, offset); 85 | dsi_set_ctr(&nand_ctx, ctr) ; 86 | dsi_crypt_ctr(&nand_ctx, in, out, 16) ; 87 | } 88 | 89 | void dsi_nand_crypt(uint8_t* out, const uint8_t* in, uint32_t offset, unsigned count) 90 | { 91 | uint8_t ctr[16] ; 92 | memcpy(ctr, nand_ctr_iv, sizeof(nand_ctr_iv)) ; 93 | u128_add32(ctr, offset); 94 | for (unsigned i = 0; i < count; ++i) 95 | { 96 | dsi_set_ctr(&nand_ctx, ctr) ; 97 | dsi_crypt_ctr(&nand_ctx, in, out, 16) ; 98 | out += AES_BLOCK_SIZE; 99 | in += AES_BLOCK_SIZE; 100 | u128_add32(ctr, 1); 101 | } 102 | } 103 | 104 | void dsi_boot2_crypt_set_ctr(uint32_t size_r) 105 | { 106 | for (int i=0;i<4;i++) 107 | { 108 | boot2_ctr[i] = (size_r) >> (8*i) ; 109 | boot2_ctr[i+4] = (-size_r) >> (8*i) ; 110 | boot2_ctr[i+8] = (~size_r) >> (8*i) ; 111 | boot2_ctr[i+12] = 0 ; 112 | } 113 | } 114 | 115 | void dsi_boot2_crypt(uint8_t* out, const uint8_t* in, unsigned count) 116 | { 117 | for (unsigned i = 0; i < count; ++i) 118 | { 119 | dsi_set_ctr(&boot2_ctx, boot2_ctr) ; 120 | dsi_crypt_ctr(&boot2_ctx, in, out, 16) ; 121 | out += AES_BLOCK_SIZE; 122 | in += AES_BLOCK_SIZE; 123 | u128_add32(boot2_ctr, 1); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/crypto.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | /************************ Constants / Defines *********************************/ 10 | 11 | #define AES_BLOCK_SIZE 16 12 | #define SHA1_LEN 20 13 | 14 | #define KEYSEED_DSI_NAND_0 0x24ee6906 15 | #define KEYSEED_DSI_NAND_1 0xe65b601d 16 | 17 | #define KEYSEED_3DS_NAND_0 0xb358a6af 18 | #define KEYSEED_3DS_NAND_1 0x544e494e 19 | #define KEYSEED_3DS_NAND_2 0x4f444e45 20 | #define KEYSEED_3DS_NAND_3 0x08c267b7 21 | 22 | #define KEYSEED_ES_0 0x4e00004a 23 | #define KEYSEED_ES_1 0x4a00004e 24 | #define KEYSEED_ES_2 0xc80c4b72 25 | 26 | #define GET_UINT32_BE(n, b, i) \ 27 | ((uint8_t*)&(n))[0] = (b)[i + 3]; \ 28 | ((uint8_t*)&(n))[1] = (b)[i + 2]; \ 29 | ((uint8_t*)&(n))[2] = (b)[i + 1]; \ 30 | ((uint8_t*)&(n))[3] = (b)[i + 0] 31 | 32 | #define PUT_UINT32_BE(n, b, i) \ 33 | (b)[i + 0] = ((uint8_t*)&(n))[3]; \ 34 | (b)[i + 1] = ((uint8_t*)&(n))[2]; \ 35 | (b)[i + 2] = ((uint8_t*)&(n))[1]; \ 36 | (b)[i + 3] = ((uint8_t*)&(n))[0] 37 | 38 | 39 | typedef enum { 40 | ENCRYPT, 41 | DECRYPT 42 | } crypt_mode_t; 43 | 44 | typedef enum { 45 | NAND, 46 | NAND_3DS, 47 | ES 48 | } key_mode_t; 49 | 50 | 51 | // don't want to include nds.h just for this 52 | void swiSHA1Calc(void *digest, const void *buf, size_t len); 53 | 54 | int dsi_sha1_verify(const void *digest_verify, const void *data, unsigned len); 55 | 56 | void dsi_crypt_init(const uint8_t *console_id_be, const uint8_t *emmc_cid, int is3DS); 57 | 58 | void dsi_nand_crypt_1(uint8_t *out, const uint8_t* in, u32 offset); 59 | 60 | void dsi_nand_crypt(uint8_t *out, const uint8_t* in, u32 offset, unsigned count); 61 | 62 | int dsi_es_block_crypt(uint8_t *buf, unsigned buf_len, crypt_mode_t mode); 63 | 64 | void dsi_boot2_crypt_set_ctr(uint32_t size_r); 65 | 66 | void dsi_boot2_crypt(uint8_t* out, const uint8_t* in, unsigned count); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/dsi.h: -------------------------------------------------------------------------------- 1 | #ifndef _DSI_H_ 2 | #define _DSI_H_ 3 | 4 | #include "aes.h" 5 | 6 | typedef struct 7 | { 8 | unsigned char ctr[16]; 9 | unsigned char mac[16]; 10 | unsigned char S0[16]; 11 | unsigned int maclen; 12 | 13 | aes_context aes; 14 | } 15 | dsi_context; 16 | 17 | typedef struct 18 | { 19 | unsigned char key[16]; 20 | unsigned char nonce[12]; 21 | int randomnonce; 22 | } dsi_es_context; 23 | 24 | 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | void dsi_set_key( dsi_context* ctx, 31 | const unsigned char key[16] ); 32 | 33 | void dsi_add_ctr( dsi_context* ctx, 34 | unsigned int carry ); 35 | 36 | void dsi_set_ctr( dsi_context* ctx, 37 | const unsigned char ctr[16] ); 38 | 39 | void dsi_init_ctr( dsi_context* ctx, 40 | const unsigned char key[16], 41 | const unsigned char ctr[16]); 42 | 43 | void dsi_crypt_ctr( dsi_context* ctx, 44 | const void* in, 45 | void* out, 46 | unsigned int len); 47 | 48 | void dsi_crypt_ctr_block( dsi_context* ctx, 49 | const unsigned char input[16], 50 | unsigned char output[16] ); 51 | 52 | void dsi_init_ccm( dsi_context* ctx, 53 | unsigned char key[16], 54 | unsigned int maclength, 55 | unsigned int payloadlength, 56 | unsigned int assoclength, 57 | unsigned char nonce[12] ); 58 | 59 | void dsi_encrypt_ccm_block( dsi_context* ctx, 60 | unsigned char input[16], 61 | unsigned char output[16], 62 | unsigned char* mac ); 63 | 64 | void dsi_decrypt_ccm_block( dsi_context* ctx, 65 | unsigned char input[16], 66 | unsigned char output[16], 67 | unsigned char* mac ); 68 | 69 | 70 | void dsi_decrypt_ccm( dsi_context* ctx, 71 | unsigned char* input, 72 | unsigned char* output, 73 | unsigned int size, 74 | unsigned char* mac ); 75 | 76 | void dsi_encrypt_ccm( dsi_context* ctx, 77 | unsigned char* input, 78 | unsigned char* output, 79 | unsigned int size, 80 | unsigned char* mac ); 81 | 82 | void dsi_es_init( dsi_es_context* ctx, 83 | unsigned char key[16] ); 84 | 85 | void dsi_es_set_nonce( dsi_es_context* ctx, 86 | unsigned char nonce[12] ); 87 | 88 | void dsi_es_set_random_nonce( dsi_es_context* ctx ); 89 | 90 | int dsi_es_decrypt( dsi_es_context* ctx, 91 | unsigned char* buffer, 92 | unsigned char metablock[32], 93 | unsigned int size ); 94 | 95 | void dsi_es_encrypt( dsi_es_context* ctx, 96 | unsigned char* buffer, 97 | unsigned char metablock[32], 98 | unsigned int size ); 99 | 100 | #ifdef __cplusplus 101 | } 102 | #endif 103 | 104 | #endif // _DSI_H_ 105 | 106 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/f_xy.c: -------------------------------------------------------------------------------- 1 | /* f_xy.c 2 | * 3 | * This file was imported from godmode9i, but it is liely not the 4 | * original source. twltool uses the same file. 5 | * 6 | * If you happen to know whom to credit I'd love to add the name 7 | * 8 | * Refactored to reduce the pointer casts and remove the dependency 9 | * from tonccpy. 10 | */ 11 | 12 | #include 13 | #include 14 | #include "u128_math.h" 15 | 16 | 17 | /************************ Constants / Defines *********************************/ 18 | 19 | const uint8_t DSi_KEY_MAGIC[16] = { 0x79, 0x3e, 0x4f, 0x1a, 0x5f, 0x0f, 0x68, 0x2a, 20 | 0x58, 0x02, 0x59, 0x29, 0x4e, 0xfb, 0xfe, 0xff }; 21 | const uint8_t DSi_NAND_KEY_Y[16] = { 0x76, 0xdc, 0xb9, 0x0a, 0xd3, 0xc4, 0x4d, 0xbd, 22 | 0x1d, 0xdd, 0x2d, 0x20, 0x05, 0x00, 0xa0, 0xe1 }; 23 | const uint8_t DSi_ES_KEY_Y[16] = { 0xe5, 0xcc, 0x5a, 0x8b, 0x56, 0xd0, 0xc9,0x72, 24 | 0x9c, 0x17, 0xe8, 0xdc, 0x39, 0x12, 0x36, 0xa9 }; 25 | const uint8_t DSi_BOOT2_KEY[16] = { 0x98, 0xee, 0x80, 0x80, 0x00, 0x6c, 0xb4, 0xf6, 26 | 0x3a, 0xc2, 0x6e, 0x62, 0xf9, 0xec, 0x34, 0xad }; 27 | 28 | /************************ Functions *******************************************/ 29 | 30 | void F_XY(uint8_t *key, const uint8_t *key_x, const uint8_t *key_y) 31 | { 32 | uint8_t key_xy[16]; 33 | 34 | for (int i=0; i<16; i++) 35 | key_xy[i] = key_x[i] ^ key_y[i]; 36 | 37 | memcpy(key, DSi_KEY_MAGIC, sizeof(DSi_KEY_MAGIC)); 38 | 39 | u128_add(key, key_xy); 40 | u128_lrot(key, 42); 41 | } 42 | 43 | //F_XY_reverse does the reverse of F(X^Y): takes (normal)key, and does F in reverse to generate the original X^Y key_xy. 44 | void F_XY_reverse(const uint8_t *key, uint8_t *key_xy) 45 | { 46 | memcpy(key_xy, key, 16); 47 | u128_rrot(key_xy, 42); 48 | u128_sub(key_xy, DSi_KEY_MAGIC); 49 | } 50 | 51 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/f_xy.h: -------------------------------------------------------------------------------- 1 | /* f_xy.h 2 | * 3 | * This file was imported from godmode9i, but it is liely not the 4 | * original source. twltool uses the same file. 5 | * 6 | * If you happen to know whom to credit I'd love to add the name 7 | * 8 | * Refactored to reduce the pointer casts and remove the dependency 9 | * from tonccpy. 10 | */ 11 | 12 | #ifndef _H_F_XY 13 | #define _H_F_XY 14 | 15 | #ifdef __cplusplus 16 | extern "C" { 17 | #endif 18 | 19 | /************************ Constants / Defines *********************************/ 20 | 21 | extern const uint8_t DSi_KEY_MAGIC[16] ; 22 | extern const uint8_t DSi_NAND_KEY_Y[16] ; 23 | extern const uint8_t DSi_ES_KEY_Y[16] ; 24 | extern const uint8_t DSi_BOOT2_KEY[16] ; 25 | 26 | /************************ Function Protoypes **********************************/ 27 | 28 | void F_XY(uint8_t *key, const uint8_t *key_x, const uint8_t *key_y); 29 | void F_XY_reverse(const uint8_t *key, uint8_t *key_xy); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/padlock.h: -------------------------------------------------------------------------------- 1 | /** 2 | * \file padlock.h 3 | * 4 | * Copyright (C) 2006-2010, Brainspark B.V. 5 | * 6 | * This file is part of PolarSSL (http://www.polarssl.org) 7 | * Lead Maintainer: Paul Bakker 8 | * 9 | * All rights reserved. 10 | * 11 | * This program is free software; you can redistribute it and/or modify 12 | * it under the terms of the GNU General Public License as published by 13 | * the Free Software Foundation; either version 2 of the License, or 14 | * (at your option) any later version. 15 | * 16 | * This program is distributed in the hope that it will be useful, 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | * GNU General Public License for more details. 20 | * 21 | * You should have received a copy of the GNU General Public License along 22 | * with this program; if not, write to the Free Software Foundation, Inc., 23 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 24 | */ 25 | #ifndef POLARSSL_PADLOCK_H 26 | #define POLARSSL_PADLOCK_H 27 | 28 | #include "aes.h" 29 | 30 | #if defined(POLARSSL_HAVE_ASM) && defined(__GNUC__) && defined(__i386__) 31 | 32 | #ifndef POLARSSL_HAVE_X86 33 | #define POLARSSL_HAVE_X86 34 | #endif 35 | 36 | #define PADLOCK_RNG 0x000C 37 | #define PADLOCK_ACE 0x00C0 38 | #define PADLOCK_PHE 0x0C00 39 | #define PADLOCK_PMM 0x3000 40 | 41 | #define PADLOCK_ALIGN16(x) (unsigned long *) (16 + ((long) x & ~15)) 42 | 43 | #define POLARSSL_ERR_PADLOCK_DATA_MISALIGNED -0x08E0 44 | 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief PadLock detection routine 51 | * 52 | * \param The feature to detect 53 | * 54 | * \return 1 if CPU has support for the feature, 0 otherwise 55 | */ 56 | int padlock_supports( int feature ); 57 | 58 | /** 59 | * \brief PadLock AES-ECB block en(de)cryption 60 | * 61 | * \param ctx AES context 62 | * \param mode AES_ENCRYPT or AES_DECRYPT 63 | * \param input 16-byte input block 64 | * \param output 16-byte output block 65 | * 66 | * \return 0 if success, 1 if operation failed 67 | */ 68 | int padlock_xcryptecb( aes_context *ctx, 69 | int mode, 70 | const unsigned char input[16], 71 | unsigned char output[16] ); 72 | 73 | /** 74 | * \brief PadLock AES-CBC buffer en(de)cryption 75 | * 76 | * \param ctx AES context 77 | * \param mode AES_ENCRYPT or AES_DECRYPT 78 | * \param length length of the input data 79 | * \param iv initialization vector (updated after use) 80 | * \param input buffer holding the input data 81 | * \param output buffer holding the output data 82 | * 83 | * \return 0 if success, 1 if operation failed 84 | */ 85 | int padlock_xcryptcbc( aes_context *ctx, 86 | int mode, 87 | int length, 88 | unsigned char iv[16], 89 | const unsigned char *input, 90 | unsigned char *output ); 91 | 92 | #ifdef __cplusplus 93 | } 94 | #endif 95 | 96 | #endif /* HAVE_X86 */ 97 | 98 | #endif /* padlock.h */ 99 | -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/u128_math.c: -------------------------------------------------------------------------------- 1 | // u128_math 2 | 3 | #include "u128_math.h" 4 | #include 5 | 6 | // rotate a 128bit, little endian by shift bits in direction of increasing significance. 7 | void u128_lrot(uint8_t *num, uint32_t shift) 8 | { 9 | uint8_t tmp[16]; 10 | for (int i=0;i<16;i++) 11 | { 12 | // rot: rotate to more significant. 13 | // LSB is tmp[0], MSB is tmp[15] 14 | const uint32_t byteshift = shift / 8 ; 15 | const uint32_t bitshift = shift % 8; 16 | tmp[(i+byteshift) % 16] = (num[i] << bitshift) 17 | | ((num[(i+16-1) % 16] >> (8-bitshift)) & 0xff); 18 | } 19 | memcpy(num, tmp, 16) ; 20 | } 21 | 22 | // rotate a 128bit, little endian by shift bits in direction of decreasing significance. 23 | void u128_rrot(uint8_t *num, uint32_t shift) 24 | { 25 | uint8_t tmp[16]; 26 | for (int i=0;i<16;i++) 27 | { 28 | // rot: rotate to less significant. 29 | // LSB is tmp[0], MSB is tmp[15] 30 | const uint32_t byteshift = shift / 8 ; 31 | const uint32_t bitshift = shift % 8; 32 | tmp[i] = (num[(i+byteshift) % 16] >> bitshift) 33 | | ((num[(i+byteshift+1) % 16] << (8-bitshift)) & 0xff); 34 | } 35 | memcpy(num, tmp, 16) ; 36 | } 37 | 38 | // xor two 128bit, little endian values and store the result into the first 39 | void u128_xor(uint8_t *a, const uint8_t *b) 40 | { 41 | for (int i=0;i<16;i++) 42 | { 43 | a[i] = a[i] ^ b[i] ; 44 | } 45 | } 46 | 47 | // or two 128bit, little endian values and store the result into the first 48 | void u128_or(uint8_t *a, const uint8_t *b) 49 | { 50 | for (int i=0;i<16;i++) 51 | { 52 | a[i] = a[i] | b[i] ; 53 | } 54 | } 55 | 56 | // and two 128bit, little endian values and store the result into the first 57 | void u128_and(uint8_t *a, const uint8_t *b) 58 | { 59 | for (int i=0;i<16;i++) 60 | { 61 | a[i] = a[i] & b[i] ; 62 | } 63 | } 64 | 65 | 66 | // add two 128bit, little endian values and store the result into the first 67 | void u128_add(uint8_t *a, const uint8_t *b) 68 | { 69 | uint8_t carry = 0 ; 70 | for (int i=0;i<16;i++) 71 | { 72 | uint16_t sum = a[i] + b[i] + carry ; 73 | a[i] = sum & 0xff ; 74 | carry = sum >> 8 ; 75 | } 76 | } 77 | 78 | // add two 128bit, little endian values and store the result into the first 79 | void u128_add32(uint8_t *a, const uint32_t b) 80 | { 81 | uint8_t _b[16]; 82 | memset(_b, 0, sizeof(_b)) ; 83 | for (int i=0;i<4;i++) 84 | _b[i] = b >> (i*8) ; 85 | u128_add(a, _b); 86 | } 87 | 88 | // sub two 128bit, little endian values and store the result into the first 89 | void u128_sub(uint8_t *a, const uint8_t *b) 90 | { 91 | uint8_t carry = 0 ; 92 | for (int i=0;i<16;i++) 93 | { 94 | uint16_t sub = a[i] - b[i] - (carry & 1); 95 | a[i] = sub & 0xff ; 96 | carry = sub >> 8 ; 97 | } 98 | } 99 | 100 | void u128_swap(uint8_t *out, const uint8_t *in) 101 | { 102 | for (int i=0;i<16;i++) 103 | { 104 | out[15-i] = in[i]; 105 | } 106 | } -------------------------------------------------------------------------------- /BootLoader/source/modcrypt/u128_math.h: -------------------------------------------------------------------------------- 1 | // u128_math 2 | 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | // left rotate by (shift % 128) bits 10 | void u128_lrot(uint8_t *num, uint32_t shift) ; 11 | 12 | // right rotate by (shift % 128) bits 13 | void u128_rrot(uint8_t *num, uint32_t shift) ; 14 | 15 | // bitwise xor strored to a 16 | void u128_xor(uint8_t *a, const uint8_t *b) ; 17 | 18 | // bitwise or strored to a 19 | void u128_or(uint8_t *a, const uint8_t *b) ; 20 | 21 | // bitwise and strored to a 22 | void u128_and(uint8_t *a, const uint8_t *b) ; 23 | 24 | // add b to a and store in a 25 | void u128_add(uint8_t *a, const uint8_t *b) ; 26 | 27 | // add 32 bit value b to a and store in a 28 | void u128_add32(uint8_t *a, const uint32_t b) ; 29 | 30 | // substract b from a and store in a 31 | void u128_sub(uint8_t *a, const uint8_t *b) ; 32 | 33 | // swap byte order 34 | void u128_swap(uint8_t *out, const uint8_t *in) ; 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif -------------------------------------------------------------------------------- /BootLoader/source/reset.arm7.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2015 Dave Murphy (WinterMute) 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | .text 19 | .align 4 20 | 21 | .arm 22 | @--------------------------------------------------------------------------------- 23 | .global arm7_reset 24 | .type arm7_reset STT_FUNC 25 | @--------------------------------------------------------------------------------- 26 | arm7_reset: 27 | @--------------------------------------------------------------------------------- 28 | mrs r0, cpsr @ cpu interrupt disable 29 | orr r0, r0, #0x80 @ (set i flag) 30 | msr cpsr, r0 31 | 32 | ldr r0, =0x380FFFC @ irq vector 33 | mov r1, #0 34 | str r1, [r0] 35 | sub r0, r0, #4 @ IRQ1 Check Bits 36 | str r1, [r0] 37 | sub r0, r0, #4 @ IRQ2 Check Bits 38 | str r1, [r0] 39 | 40 | bic r0, r0, #0x7f 41 | 42 | msr cpsr_c, #0xd3 @ svc mode 43 | mov sp, r0 44 | sub r0, r0, #64 45 | msr cpsr_c, #0xd2 @ irq mode 46 | mov sp, r0 47 | sub r0, r0, #512 48 | msr cpsr_c, #0xdf @ system mode 49 | mov sp, r0 50 | 51 | mov r12, #0x04000000 52 | add r12, r12, #0x180 53 | 54 | @ while (ipcRecvState() != ARM9_RESET); 55 | mov r0, #2 56 | bl waitsync 57 | @ ipcSendState(ARM7_RESET) 58 | mov r0, #0x200 59 | strh r0, [r12] 60 | 61 | @ while(ipcRecvState() != ARM9_BOOT); 62 | mov r0, #0 63 | bl waitsync 64 | @ ipcSendState(ARM7_BOOT) 65 | strh r0, [r12] 66 | 67 | ldr r0,=0x2FFFE34 68 | 69 | ldr r0,[r0] 70 | bx r0 71 | 72 | .pool 73 | 74 | @--------------------------------------------------------------------------------- 75 | waitsync: 76 | @--------------------------------------------------------------------------------- 77 | ldrh r1, [r12] 78 | and r1, r1, #0x000f 79 | cmp r0, r1 80 | bne waitsync 81 | bx lr 82 | -------------------------------------------------------------------------------- /BootLoader/source/reset.arm9.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006 - 2015 Dave Murphy (WinterMute) 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | 19 | #include 20 | 21 | .text 22 | .align 4 23 | 24 | .arm 25 | 26 | .arch armv5te 27 | .cpu arm946e-s 28 | 29 | @--------------------------------------------------------------------------------- 30 | .global arm9_reset 31 | .type arm9_reset STT_FUNC 32 | @--------------------------------------------------------------------------------- 33 | arm9_reset: 34 | @--------------------------------------------------------------------------------- 35 | mrs r0, cpsr @ cpu interrupt disable 36 | orr r0, r0, #0x80 @ (set i flag) 37 | msr cpsr, r0 38 | 39 | @ Switch off MPU 40 | mrc p15, 0, r0, c1, c0, 0 41 | bic r0, r0, #PROTECT_ENABLE 42 | mcr p15, 0, r0, c1, c0, 0 43 | 44 | 45 | adr r12, mpu_initial_data 46 | ldmia r12, {r0-r10} 47 | 48 | mcr p15, 0, r0, c2, c0, 0 49 | mcr p15, 0, r0, c2, c0, 1 50 | mcr p15, 0, r1, c3, c0, 0 51 | mcr p15, 0, r2, c5, c0, 2 52 | mcr p15, 0, r3, c5, c0, 3 53 | mcr p15, 0, r4, c6, c0, 0 54 | mcr p15, 0, r5, c6, c1, 0 55 | mcr p15, 0, r6, c6, c3, 0 56 | mcr p15, 0, r7, c6, c4, 0 57 | mcr p15, 0, r8, c6, c6, 0 58 | mcr p15, 0, r9, c6, c7, 0 59 | mcr p15, 0, r10, c9, c1, 0 60 | 61 | mov r0, #0 62 | mcr p15, 0, r0, c6, c2, 0 @ PU Protection Unit Data/Unified Region 2 63 | mcr p15, 0, r0, c6, c5, 0 @ PU Protection Unit Data/Unified Region 5 64 | 65 | mrc p15, 0, r0, c9, c1, 0 @ DTCM 66 | mov r0, r0, lsr #12 @ base 67 | mov r0, r0, lsl #12 @ size 68 | add r0, r0, #0x4000 @ dtcm top 69 | 70 | sub r0, r0, #4 @ irq vector 71 | mov r1, #0 72 | str r1, [r0] 73 | sub r0, r0, #4 @ IRQ1 Check Bits 74 | str r1, [r0] 75 | 76 | bic r0, r0, #0x7f 77 | 78 | msr cpsr_c, #0xd3 @ svc mode 79 | mov sp, r0 80 | sub r0, r0, #64 81 | msr cpsr_c, #0xd2 @ irq mode 82 | mov sp, r0 83 | sub r0, r0, #4096 84 | msr cpsr_c, #0xdf @ system mode 85 | mov sp, r0 86 | 87 | mov r12, #0x04000000 88 | add r12, r12, #0x180 89 | 90 | @ ipcSendState(ARM9_RESET) 91 | mov r0, #0x200 92 | strh r0, [r12] 93 | @ while (ipcRecvState() != ARM7_RESET); 94 | mov r0, #2 95 | bl waitsync 96 | 97 | @ ipcSendState(ARM9_BOOT) 98 | mov r0, #0 99 | strh r0, [r12] 100 | @ while (ipcRecvState() != ARM7_BOOT); 101 | bl waitsync 102 | 103 | ldr r10, =0x2FFFE24 104 | ldr r2, [r10] 105 | 106 | @ Switch MPU to startup default 107 | ldr r0, =0x00012078 108 | mcr p15, 0, r0, c1, c0, 0 109 | 110 | bx r2 111 | 112 | .pool 113 | 114 | @--------------------------------------------------------------------------------- 115 | waitsync: 116 | @--------------------------------------------------------------------------------- 117 | ldrh r1, [r12] 118 | and r1, r1, #0x000f 119 | cmp r0, r1 120 | bne waitsync 121 | bx lr 122 | 123 | mpu_initial_data: 124 | .word 0x00000042 @ p15,0,c2,c0,0..1,r0 ;PU Cachability Bits for Data/Unified+Instruction Protection Region 125 | .word 0x00000002 @ p15,0,c3,c0,0,r1 ;PU Write-Bufferability Bits for Data Protection Regions 126 | .word 0x15111011 @ p15,0,c5,c0,2,r2 ;PU Extended Access Permission Data/Unified Protection Region 127 | .word 0x05100011 @ p15,0,c5,c0,3,r3 ;PU Extended Access Permission Instruction Protection Region 128 | .word 0x04000033 @ p15,0,c6,c0,0,r4 ;PU Protection Unit Data/Unified Region 0 129 | .word 0x0200002b @ p15,0,c6,c1,0,r5 ;PU Protection Unit Data/Unified Region 1 4MB 130 | .word 0x08000035 @ p15,0,c6,c3,0,r6 ;PU Protection Unit Data/Unified Region 3 131 | .word 0x0300001b @ p15,0,c6,c4,0,r7 ;PU Protection Unit Data/Unified Region 4 132 | .word 0xffff001d @ p15,0,c6,c6,0,r8 ;PU Protection Unit Data/Unified Region 6 133 | .word 0x02fff017 @ p15,0,c6,c7,0,r9 ;PU Protection Unit Data/Unified Region 7 4KB 134 | .word 0x0300000a @ p15,0,c9,c1,0,r10 ;TCM Data TCM Base and Virtual Size 135 | itcm_reset_code_end: -------------------------------------------------------------------------------- /BootLoader/source/tonccpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "tonccpy.h" 3 | //# tonccpy.c 4 | 5 | //! VRAM-safe cpy. 6 | /*! This version mimics memcpy in functionality, with 7 | the benefit of working for VRAM as well. It is also 8 | slightly faster than the original memcpy, but faster 9 | implementations can be made. 10 | \param dst Destination pointer. 11 | \param src Source pointer. 12 | \param size Fill-length in bytes. 13 | \note The pointers and size need not be word-aligned. 14 | */ 15 | void tonccpy(void *dst, const void *src, uint size) { 16 | 17 | if(size==0 || dst==NULL || src==NULL) { return; } 18 | 19 | uint count; 20 | u16 *dst16; // hword destination 21 | u8 *src8; // byte source 22 | 23 | // Ideal case: copy by 4x words. Leaves tail for later. 24 | if( ((u32)src|(u32)dst)%4==0 && size>=4) { 25 | u32 *src32= (u32*)src, *dst32= (u32*)dst; 26 | 27 | count= size/4; 28 | uint tmp= count&3; 29 | count /= 4; 30 | 31 | // Duff's Device, good friend! 32 | // Added fall through attribute to silance the compiler about this. ;) 33 | switch(tmp) { 34 | do { *dst32++ = *src32++; // fallthrough 35 | case 3: *dst32++ = *src32++; // fallthrough 36 | case 2: *dst32++ = *src32++; // fallthrough 37 | case 1: *dst32++ = *src32++; // fallthrough 38 | case 0: ;} while(count--); // fallthrough 39 | } 40 | 41 | // Check for tail 42 | size &= 3; 43 | if(size == 0) { return; } 44 | src8= (u8*)src32; 45 | dst16= (u16*)dst32; 46 | } else { 47 | // Unaligned. 48 | uint dstOfs= (u32)dst&1; 49 | src8= (u8*)src; 50 | dst16= (u16*)(dst-dstOfs); 51 | 52 | // Head: 1 byte. 53 | if(dstOfs != 0) { 54 | *dst16= (*dst16 & 0xFF) | *src8++<<8; 55 | dst16++; 56 | if(--size==0) { return; } 57 | } 58 | } 59 | 60 | // Unaligned main: copy by 2x byte. 61 | count= size/2; 62 | while(count--) { 63 | *dst16++ = src8[0] | src8[1]<<8; 64 | src8 += 2; 65 | } 66 | 67 | // Tail: 1 byte. 68 | if(size&1) { *dst16= (*dst16 &~ 0xFF) | *src8; } 69 | } 70 | //# toncset.c 71 | 72 | //! VRAM-safe memset, internal routine. 73 | /*! This version mimics memset in functionality, with 74 | the benefit of working for VRAM as well. It is also 75 | slightly faster than the original memset. 76 | \param dst Destination pointer. 77 | \param fill Word to fill with. 78 | \param size Fill-length in bytes. 79 | \note The \a dst pointer and \a size need not be 80 | word-aligned. In the case of unaligned fills, \a fill 81 | will be masked off to match the situation. 82 | */ 83 | void __toncset(void *dst, u32 fill, uint size) { 84 | if(size==0 || dst==NULL) { return; } 85 | 86 | uint left= (u32)dst&3; 87 | u32 *dst32= (u32*)(dst-left); 88 | u32 count, mask; 89 | 90 | // Unaligned head. 91 | if(left != 0) { 92 | // Adjust for very small stint. 93 | if(left+size<4) { 94 | mask= BIT_MASK(size*8)<<(left*8); 95 | *dst32= (*dst32 &~ mask) | (fill & mask); 96 | return; 97 | } 98 | 99 | mask= BIT_MASK(left*8); 100 | *dst32= (*dst32 & mask) | (fill&~mask); 101 | dst32++; 102 | size -= 4-left; 103 | } 104 | 105 | // Main stint. 106 | count= size/4; 107 | uint tmp= count&3; 108 | count /= 4; 109 | 110 | // Added fall through attribute to silance the compiler about this. ;) 111 | switch(tmp) { 112 | do { *dst32++ = fill; // fallthrough 113 | case 3: *dst32++ = fill; // fallthrough 114 | case 2: *dst32++ = fill; // fallthrough 115 | case 1: *dst32++ = fill; // fallthrough 116 | case 0: ;} while(count--); // fallthrough 117 | } 118 | 119 | // Tail 120 | size &= 3; 121 | if(size) { 122 | mask= BIT_MASK(size*8); 123 | *dst32= (*dst32 &~ mask) | (fill & mask); 124 | } 125 | } 126 | 127 | -------------------------------------------------------------------------------- /BootLoader/source/tonccpy.h: -------------------------------------------------------------------------------- 1 | //# Stuff you may not have yet. 2 | 3 | #ifndef TONCCPY_H 4 | #define TONCCPY_H 5 | 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | typedef unsigned int uint; 14 | #define BIT_MASK(len) ( (1<<(len))-1 ) 15 | static inline u32 quad8(u16 x) { x |= x<<8; return x | x<<16; } 16 | 17 | 18 | //# Declarations and inlines. 19 | 20 | void tonccpy(void *dst, const void *src, uint size); 21 | 22 | void __toncset(void *dst, u32 fill, uint size); 23 | static inline void toncset(void *dst, u8 src, uint size); 24 | static inline void toncset16(void *dst, u16 src, uint size); 25 | static inline void toncset32(void *dst, u32 src, uint size); 26 | 27 | 28 | //! VRAM-safe memset, byte version. Size in bytes. 29 | static inline void toncset(void *dst, u8 src, uint size) 30 | { __toncset(dst, quad8(src), size); } 31 | 32 | //! VRAM-safe memset, halfword version. Size in hwords. 33 | static inline void toncset16(void *dst, u16 src, uint size) 34 | { __toncset(dst, src|src<<16, size*2); } 35 | 36 | //! VRAM-safe memset, word version. Size in words. 37 | static inline void toncset32(void *dst, u32 src, uint size) 38 | { __toncset(dst, src, size*4); } 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif 44 | -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/Acekard2i.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/Acekard2i.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/ActionReplayDS.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/ActionReplayDS.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/CycloDS.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/CycloDS.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/DSONEi.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/DSONEi.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/DSTwo.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/DSTwo.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/EZFlashV.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/EZFlashV.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/NCARD.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/NCARD.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/NTR_Launcher.ini: -------------------------------------------------------------------------------- 1 | [NTRLAUNCHER] 2 | TWLMODE = 0 3 | TWLRAM = 0 4 | TWLVRAM = 0 5 | TWLCLOCK = 0 6 | SCFGUNLOCK = 0 7 | ANIMATEDSPLASH = 0 8 | NTRSPLASH = 0 9 | HEALTHSAFETYSPLASH = 1 10 | AUTOBOOT = 1 11 | DEBUGMODE = 0 12 | LANGUAGE = -1 13 | 14 | -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/R4DS.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/R4DS.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/R4DS_Ultra.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/R4DS_Ultra.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/R4iGold_Launcher.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/R4iGold_Launcher.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/R4iSDHC_Demon.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/R4iSDHC_Demon.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/R4i_SDHC_AVRJ.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/R4i_SDHC_AVRJ.nds -------------------------------------------------------------------------------- /CartFiles/NTR_Launcher/TTDS.nds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/CartFiles/NTR_Launcher/TTDS.nds -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #--------------------------------------------------------------------------------- 2 | .SUFFIXES: 3 | #--------------------------------------------------------------------------------- 4 | .SECONDARY: 5 | 6 | ifeq ($(strip $(DEVKITARM)),) 7 | $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) 8 | endif 9 | 10 | include $(DEVKITARM)/ds_rules 11 | 12 | export TARGET := NTR_Launcher 13 | export TOPDIR := $(CURDIR) 14 | 15 | export VERSION_MAJOR := 3 16 | export VERSION_MINOR := 2 17 | export VERSTRING := $(VERSION_MAJOR).$(VERSION_MINOR) 18 | 19 | # specify a directory which contains the nitro filesystem 20 | # this is relative to the Makefile 21 | NITRO_FILES := CartFiles 22 | 23 | .PHONY: bootloader ndsbootloader clean arm7/$(TARGET).elf arm9/$(TARGET).elf 24 | 25 | #--------------------------------------------------------------------------------- 26 | # main targets 27 | # -g KKGP 01 "NTR Launcher" -z 80040000 -u 00030004 -a 00000138 -p 0001 \ 28 | #--------------------------------------------------------------------------------- 29 | all: bootloader ndsbootloader $(TARGET).nds 30 | 31 | dist: all 32 | @mkdir -p debug 33 | @cp $(TARGET).arm7.elf debug/$(TARGET).arm7.elf 34 | @cp $(TARGET).arm9.elf debug/$(TARGET).arm9.elf 35 | 36 | $(TARGET).nds: $(TARGET).arm7 $(TARGET).arm9 37 | ndstool -c $(TARGET).nds -7 $(TARGET).arm7.elf -9 $(TARGET).arm9.elf \ 38 | -b $(CURDIR)/icon.bmp "NTR Launcher v$(VERSTRING);Slot-1 Launcher;Apache Thunder & RocketRobz" \ 39 | -g KKGP 01 "NTR Launcher" -z 80040407 -u 00030004 -a 00000138 -p 0001 \ 40 | -d $(NITRO_FILES) 41 | @cp $(TARGET).nds 00000000.app 42 | 43 | $(TARGET).arm7 : arm7/$(TARGET).elf 44 | cp arm7/$(TARGET).elf $(TARGET).arm7.elf 45 | $(TARGET).arm9 : arm9/$(TARGET).elf 46 | cp arm9/$(TARGET).elf $(TARGET).arm9.elf 47 | 48 | #--------------------------------------------------------------------------------- 49 | arm7/$(TARGET).elf: 50 | $(MAKE) -C arm7 51 | 52 | #--------------------------------------------------------------------------------- 53 | arm9/$(TARGET).elf: 54 | $(MAKE) -C arm9 55 | 56 | #--------------------------------------------------------------------------------- 57 | clean: 58 | @echo clean ... 59 | @rm -fr debug 60 | @rm -fr data 61 | @rm -fr $(BUILD) $(TARGET).elf $(TARGET).nds $(TARGET).nds.orig.nds 62 | @rm -fr $(TARGET).arm7 63 | @rm -fr $(TARGET).arm9 64 | @rm -fr $(TARGET).arm7.elf 65 | @rm -fr $(TARGET).arm9.elf 66 | @rm -fr 00000000.app 67 | @rm -fr $(TARGET).cia 68 | @$(MAKE) -C bootloader clean 69 | @$(MAKE) -C ndsbootloader clean 70 | @$(MAKE) -C arm9 clean 71 | @$(MAKE) -C arm7 clean 72 | 73 | data: 74 | @mkdir -p data 75 | 76 | bootloader: data 77 | @$(MAKE) -C bootloader 78 | 79 | ndsbootloader: data 80 | @$(MAKE) -C ndsbootloader 81 | 82 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | NTR Launcher - Apache Thunder 2 | Original code from NitroHax but with cheat engine/menu stripped out. 3 | 4 | Launcher side of NitroHax without the cheat engine. Nothing much else to say about it. :P 5 | 6 | The source to "Launch DS Cart" on FileTrip was never released. I rebuilt it after ahezard ported NitroHax to latest devkitarm. This project is GNU licensed so that original DS Launcher on File Trip should have included source anyways. 7 | That has been corrected here. :D 8 | 9 | Credits go to Chism for NitroHax which this source is based from and WinterMute for dslink source/reset code. -------------------------------------------------------------------------------- /arm9/audio/back.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/audio/back.wav -------------------------------------------------------------------------------- /arm9/audio/dsboot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/audio/dsboot.wav -------------------------------------------------------------------------------- /arm9/audio/dsiboot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/audio/dsiboot.wav -------------------------------------------------------------------------------- /arm9/audio/launch.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/audio/launch.wav -------------------------------------------------------------------------------- /arm9/audio/select.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/audio/select.wav -------------------------------------------------------------------------------- /arm9/audio/wrong.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/audio/wrong.wav -------------------------------------------------------------------------------- /arm9/common/audio.h: -------------------------------------------------------------------------------- 1 | #ifndef AUDIO_H 2 | #define AUDIO_H 3 | 4 | void InitAudio(void); 5 | 6 | void PlayBootJingle(void); 7 | void PlayBootJingleDSi(void); 8 | 9 | void PlayLaunchSFX(void); 10 | void PlayWrongSFX(void); 11 | void PlaySelectSFX(void); 12 | void PlayBackSFX(void); 13 | void PlayLaunchSFX(void); 14 | 15 | #endif // AUDIO_H 16 | 17 | -------------------------------------------------------------------------------- /arm9/common/audio.twl.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | #include "soundbank.h" 24 | #include "soundbank_bin.h" 25 | 26 | static mm_sound_effect dsboot; 27 | static mm_sound_effect dsiboot; 28 | static mm_sound_effect sfxBack; 29 | static mm_sound_effect sfxLaunch; 30 | static mm_sound_effect sfxSelect; 31 | static mm_sound_effect sfxWrong; 32 | 33 | static bool audioReady = false; 34 | 35 | void InitAudio() { 36 | mmInitDefaultMem((mm_addr)soundbank_bin); 37 | 38 | mmLoadEffect( SFX_DSBOOT ); 39 | mmLoadEffect( SFX_DSIBOOT ); 40 | mmLoadEffect( SFX_BACK ); 41 | mmLoadEffect( SFX_LAUNCH ); 42 | mmLoadEffect( SFX_SELECT ); 43 | mmLoadEffect( SFX_WRONG ); 44 | 45 | dsiboot = { 46 | { SFX_DSIBOOT } , // id 47 | (int)(1.0f * (1<<10)), // rate 48 | 0, // handle 49 | 255, // volume 50 | 128, // panning 51 | }; 52 | 53 | dsboot = { 54 | { SFX_DSBOOT } , // id 55 | (int)(1.0f * (1<<10)), // rate 56 | 0, // handle 57 | 255, // volume 58 | 128, // panning 59 | }; 60 | 61 | sfxBack = { 62 | { SFX_BACK } , // id 63 | (int)(1.0f * (1<<10)), // rate 64 | 0, // handle 65 | 255, // volume 66 | 128, // panning 67 | }; 68 | 69 | sfxLaunch = { 70 | { SFX_LAUNCH } , // id 71 | (int)(1.0f * (1<<10)), // rate 72 | 0, // handle 73 | 255, // volume 74 | 128, // panning 75 | }; 76 | 77 | sfxSelect = { 78 | { SFX_SELECT } , // id 79 | (int)(1.0f * (1<<10)), // rate 80 | 0, // handle 81 | 255, // volume 82 | 128, // panning 83 | }; 84 | 85 | sfxWrong = { 86 | { SFX_WRONG } , // id 87 | (int)(1.0f * (1<<10)), // rate 88 | 0, // handle 89 | 255, // volume 90 | 128, // panning 91 | }; 92 | audioReady = true; 93 | } 94 | 95 | void PlayBootJingle() { 96 | if (!audioReady)InitAudio(); 97 | mmEffectEx(&dsboot); 98 | } 99 | 100 | void PlayBootJingleDSi() { 101 | if (!audioReady)InitAudio(); 102 | mmEffectEx(&dsiboot); 103 | } 104 | 105 | void PlayLaunchSFX() { 106 | if (!audioReady)InitAudio(); 107 | mmEffectEx(&sfxLaunch); 108 | } 109 | 110 | void PlayWrongSFX() { 111 | if (!audioReady)InitAudio(); 112 | mmEffectEx(&sfxWrong); 113 | } 114 | 115 | void PlaySelectSFX() { 116 | if (!audioReady)InitAudio(); 117 | mmEffectEx(&sfxSelect); 118 | } 119 | 120 | void PlayBackSFX() { 121 | if (!audioReady)InitAudio(); 122 | mmEffectEx(&sfxBack); 123 | } 124 | 125 | -------------------------------------------------------------------------------- /arm9/common/crc.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef CRC_H 20 | #define CRC_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | #include 27 | #include 28 | 29 | uint32_t crc32(const char *buf, size_t size); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif // CRC_H 36 | 37 | -------------------------------------------------------------------------------- /arm9/common/crc.twl.c: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include "crc.h" 20 | 21 | /* 22 | * This code implements the AUTODIN II polynomial 23 | * The variable corresponding to the macro argument "crc" should 24 | * be an unsigned long. 25 | * Original code by Spencer Garrett 26 | */ 27 | 28 | #define _CRC32_(crc, ch) (crc = (crc >> 8) ^ crc32tab[(crc ^ (ch)) & 0xff]) 29 | 30 | /* generated using the AUTODIN II polynomial 31 | * x^32 + x^26 + x^23 + x^22 + x^16 + 32 | * x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + 1 33 | */ 34 | 35 | static const uint32_t crc32tab[256] = { 36 | 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 37 | 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 38 | 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 39 | 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 40 | 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 41 | 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 42 | 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 43 | 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 44 | 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 45 | 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 46 | 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 47 | 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 48 | 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 49 | 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 50 | 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 51 | 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 52 | 0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a, 53 | 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, 54 | 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 55 | 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, 56 | 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 57 | 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 58 | 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 59 | 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 60 | 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 61 | 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 62 | 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 63 | 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 64 | 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 65 | 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 66 | 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 67 | 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 68 | 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, 69 | 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 70 | 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, 71 | 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 72 | 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 73 | 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 74 | 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 75 | 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 76 | 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 77 | 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 78 | 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 79 | 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 80 | 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 81 | 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 82 | 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 83 | 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 84 | 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 85 | 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, 86 | 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 87 | 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 88 | 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 89 | 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 90 | 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 91 | 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 92 | 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 93 | 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 94 | 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 95 | 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 96 | 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 97 | 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 98 | 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 99 | 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d, 100 | }; 101 | 102 | uint32_t crc32(const char *buf, size_t size) 103 | { 104 | uint32_t crc = (uint32_t)~0; 105 | const char *p; 106 | size_t len, nr; 107 | 108 | len = 0; 109 | nr=size; 110 | for (len += nr, p = buf; nr--; ++p) 111 | { 112 | _CRC32_(crc, *p); 113 | } 114 | return ~crc; 115 | } 116 | 117 | -------------------------------------------------------------------------------- /arm9/common/defaultBanners.s: -------------------------------------------------------------------------------- 1 | .arm 2 | .global dsCardDefault_bin, dsCardInvalid_bin, hbNoIcon_bin 3 | 4 | dsCardDefault_bin: .incbin "../include/dsCardDefault.bin" 5 | dsCardInvalid_bin: .incbin "../include/dsCardInvalid.bin" 6 | hbNoIcon_bin: .incbin "../include/hbNoIcon.bin" 7 | 8 | -------------------------------------------------------------------------------- /arm9/common/encryption.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef ENCRYPTION_H 20 | #define ENCRYPTION_H 21 | 22 | #include 23 | void init_keycode (u32 idcode, u32 level, u32 modulo, int iCardDevice); 24 | void crypt_64bit_down (u32* ptr); 25 | void crypt_64bit_up (u32* ptr); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /arm9/common/encryption.twl.c: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include "encryption.h" 21 | #include "key1.h" 22 | #include "key2.h" 23 | #include "tonccpy.h" 24 | 25 | #define KEYSIZE 0x1048 26 | 27 | static u32 keycode [3]; 28 | static u32 keybuf [KEYSIZE/sizeof(u32)]; 29 | 30 | void crypt_64bit_up (u32* ptr) { 31 | u32 x = ptr[1]; 32 | u32 y = ptr[0]; 33 | u32 z; 34 | int i; 35 | 36 | for (i = 0; i < 0x10; i++) { 37 | z = keybuf[i] ^ x; 38 | x = keybuf[0x012 + ((z>>24)&0xff)]; 39 | x = keybuf[0x112 + ((z>>16)&0xff)] + x; 40 | x = keybuf[0x212 + ((z>> 8)&0xff)] ^ x; 41 | x = keybuf[0x312 + ((z>> 0)&0xff)] + x; 42 | x = y ^ x; 43 | y = z; 44 | } 45 | 46 | ptr[0] = x ^ keybuf[0x10]; 47 | ptr[1] = y ^ keybuf[0x11]; 48 | } 49 | 50 | void crypt_64bit_down (u32* ptr) { 51 | u32 x = ptr[1]; 52 | u32 y = ptr[0]; 53 | u32 z; 54 | int i; 55 | 56 | for (i = 0x11; i > 0x01; i--) { 57 | z = keybuf[i] ^ x; 58 | x = keybuf[0x012 + ((z>>24)&0xff)]; 59 | x = keybuf[0x112 + ((z>>16)&0xff)] + x; 60 | x = keybuf[0x212 + ((z>> 8)&0xff)] ^ x; 61 | x = keybuf[0x312 + ((z>> 0)&0xff)] + x; 62 | x = y ^ x; 63 | y = z; 64 | } 65 | 66 | ptr[0] = x ^ keybuf[0x01]; 67 | ptr[1] = y ^ keybuf[0x00]; 68 | } 69 | 70 | static u32 bswap_32bit (u32 in) { 71 | u8 a,b,c,d; 72 | a = (u8)((in >> 0) & 0xff); 73 | b = (u8)((in >> 8) & 0xff); 74 | c = (u8)((in >> 16) & 0xff); 75 | d = (u8)((in >> 24) & 0xff); 76 | 77 | u32 out = (a << 24) | (b << 16) | (c << 8) | (d << 0); 78 | 79 | return out; 80 | } 81 | 82 | void apply_keycode (u32 modulo) { 83 | u32 scratch[2]; 84 | int i; 85 | modulo = modulo / sizeof(*keycode); 86 | 87 | crypt_64bit_up (&keycode[1]); 88 | crypt_64bit_up (&keycode[0]); 89 | toncset (scratch, 0, 8); 90 | 91 | for (i = 0; i < 0x12; i+=1) { 92 | keybuf[i] = keybuf[i] ^ bswap_32bit (keycode[i % modulo]); 93 | } 94 | for (i = 0; i < 0x412; i+=2) { 95 | crypt_64bit_up (scratch); 96 | keybuf[i] = scratch[1]; 97 | keybuf[i+1] = scratch[0]; 98 | } 99 | } 100 | 101 | void init_keycode (u32 idcode, u32 level, u32 modulo, int iCardDevice) { 102 | tonccpy ((u8*)keybuf, (iCardDevice ? gEncrDataTwl : gEncrData), KEYSIZE); 103 | keycode[0] = idcode; 104 | keycode[1] = idcode/2; 105 | keycode[2] = idcode*2; 106 | 107 | if (level >= 1) apply_keycode (modulo); // first apply (always) 108 | if (level >= 2) apply_keycode (modulo); // second apply (optional) 109 | keycode[1] = keycode[1] * 2; 110 | keycode[2] = keycode[2] / 2; 111 | if (level >= 3) apply_keycode (modulo); // third apply (optional) 112 | } 113 | -------------------------------------------------------------------------------- /arm9/common/inifile.h: -------------------------------------------------------------------------------- 1 | /* 2 | inifile.h 3 | Copyright (C) 2007 Acekard, www.acekard.com 4 | Copyright (C) 2007-2009 somebody 5 | Copyright (C) 2009-2010 yellow wood goblin 6 | 7 | This program is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program. If not, see . 19 | */ 20 | 21 | #ifndef _INIFILE_H_ 22 | #define _INIFILE_H_ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | class CIniFile 29 | { 30 | public: 31 | CIniFile(); 32 | explicit CIniFile(const std::string& filename); 33 | virtual ~CIniFile(); 34 | 35 | public: 36 | bool LoadIniFile(const std::string& FileName); 37 | bool SaveIniFile(const std::string& FileName); 38 | bool SaveIniFileModified(const std::string& FileName); 39 | 40 | std::string GetString(const std::string& Section,const std::string& Item,const std::string& DefaultValue); 41 | void SetString(const std::string& Section,const std::string& Item,const std::string& Value); 42 | int GetInt(const std::string& Section,const std::string& Item,int DefaultValue); 43 | void SetInt(const std::string& Section,const std::string& Item,int Value); 44 | void GetStringVector(const std::string& Section,const std::string& Item,std::vector& strings,char delimiter=','); 45 | void SetStringVector(const std::string& Section,const std::string& Item,std::vector& strings,char delimiter=','); 46 | protected: 47 | std::string m_sFileName; 48 | typedef std::vector cStringArray; 49 | cStringArray m_FileContainer; 50 | bool m_bLastResult; 51 | bool m_bModified; 52 | bool m_bReadOnly; 53 | typedef std::map cSectionCache; 54 | cSectionCache m_Cache; 55 | 56 | bool InsertLine(size_t line,const std::string& str); 57 | bool ReplaceLine(size_t line,const std::string& str); 58 | 59 | void SetFileString(const std::string& Section,const std::string& Item,const std::string& Value); 60 | std::string GetFileString(const std::string& Section,const std::string& Item); 61 | 62 | std::string GetString(const std::string& Section,const std::string& Item); 63 | int GetInt(const std::string& Section,const std::string& Item); 64 | }; 65 | 66 | #endif // _INIFILE_H_ 67 | 68 | -------------------------------------------------------------------------------- /arm9/common/launcherData.h: -------------------------------------------------------------------------------- 1 | #ifndef LAUNCHERDATA_H 2 | #define LAUNCHERDATA_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #define CartHeaderCopy 0x02000000 9 | #define CartChipIDCopy 0x02000180 10 | 11 | #define LAUNCH_DATA 0x020007F0 12 | 13 | // #define InitialCartBannerOffset 0x02FFC068 14 | #define InitialCartHeaderTWL 0x02FFC000 // System Menu keeps cart's header here (if cart is present) on initial boot of any DSiWare! 15 | #define InitialCartHeader 0x02FFFA80 // System Menu keeps cart's header here (if cart is present) on initial boot of any DSiWare! 16 | #define InitialCartChipID 0x02FFFC00 // System Menu keeps cart's chip id here (if cart is present) on initial boot of any DSiWare! 17 | #define InitialCartBannerOffset 0x02FFFAE8 18 | 19 | typedef struct sLauncherSettings { 20 | u8 language; 21 | u8 scfgUnlock; 22 | u8 twlMode; 23 | u8 twlCLK; 24 | u8 twlRAM; 25 | u8 twlVRAM; 26 | u8 debugMode; 27 | u8 isTWLSRL; 28 | u32 cachedChipID; 29 | } tLauncherSettings; 30 | 31 | 32 | #ifdef __cplusplus 33 | } 34 | #endif 35 | 36 | #endif // LAUNCHERDATA_H 37 | 38 | -------------------------------------------------------------------------------- /arm9/common/nds_card.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef NDS_CARD_H 20 | #define NDS_CARD_H 21 | 22 | #include 23 | 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | void CardReset (bool properReset); 29 | 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif // NDS_CARD_H 36 | 37 | -------------------------------------------------------------------------------- /arm9/common/nds_card.twl.c: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include "nds_card.h" 22 | #include "read_card.h" 23 | 24 | void CardReset(bool properReset) { 25 | int i; 26 | sysSetCardOwner (BUS_OWNER_ARM9); // Allow arm9 to access NDS cart 27 | if (isDSiMode()) { 28 | // Reset card slot 29 | /*disableSlot1(); 30 | for (i = 0; i < 25; i++) { swiWaitForVBlank(); } 31 | enableSlot1(); 32 | for (i = 0; i < 15; i++) { swiWaitForVBlank(); }*/ 33 | ResetSlot(); 34 | 35 | if (!properReset) { 36 | // Dummy command sent after card reset 37 | cardParamCommand (CARD_CMD_DUMMY, 0, 38 | CARD_ACTIVATE | CARD_nRESET | CARD_CLK_SLOW | CARD_BLK_SIZE(1) | CARD_DELAY1(0x1FFF) | CARD_DELAY2(0x3F), 39 | NULL, 0); 40 | } 41 | } 42 | if (!isDSiMode() || properReset) { 43 | REG_ROMCTRL=0; 44 | REG_AUXSPICNT=0; 45 | for (i = 0; i < 10; i++) { swiWaitForVBlank(); } 46 | REG_AUXSPICNT=CARD_CR1_ENABLE|CARD_CR1_IRQ; 47 | REG_ROMCTRL=CARD_nRESET|CARD_SEC_SEED; 48 | while (REG_ROMCTRL&CARD_BUSY)swiWaitForVBlank(); 49 | cardReset(); 50 | while (REG_ROMCTRL&CARD_BUSY)swiWaitForVBlank(); 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /arm9/common/nitrofs.h: -------------------------------------------------------------------------------- 1 | /* 2 | nitrofs.h - eris's wai ossum nitro filesystem device driver header 3 | Based on information found at http://frangoassado.org/ds/rom_spec.txt and from the #dsdev ppls 4 | Kallisti (K) 2008-01-26 All rights reversed. 5 | 6 | 2008-05-19 v0.2 - New And Improved!! :DDD 7 | * fix'd the fseek SEEK_CUR issue (my fseek funct should not have returned a value :/) 8 | * also thx to wintermute's input realized: 9 | * if you dont give ndstool the -o wifilogo.bmp option it will run on emulators in gba mode 10 | * you then dont need the gba's LOADEROFFSET, so it was set to 0x000 11 | 12 | 2008-05-21 v0.3 - newer and more improved 13 | * fixed some issues with ftell() (again was fseek's fault u_u;;) 14 | * fixed possible error in detecting sc.gba files when using dldi 15 | * readded support for .gba files in addition to .nds emu 16 | * added stat() support for completedness :) 17 | 18 | 2008-05-30 v0.5.Turbo - major speed improvement 19 | * This version uses a single filehandle to access the .nds file when not in GBA mode 20 | improving the speed it takes to open a .nds file by around 106ms. This is great for 21 | situations requiring reading alot of seperate small files. However it does take a little 22 | bit longer when reading from multiple files simultainously 23 | (around 122ms over 10,327 0x100 byte reads between 2 files). 24 | 2008-06-09 25 | * Fixed bug with SEEK_END where it wouldnt utilize the submitted position.. 26 | (now can fseek(f,-128,SEEK_END) to read from end of file :D) 27 | 28 | 2008-06-18 v0.6.Turbo - . and .. :D 29 | * Today i have added full "." and ".." support. 30 | dirnext() will return . and .. first, and all relevent operations will 31 | support . and .. in pathnames. 32 | 33 | 2018-09-05 v0.9 - modernize devoptab (by RonnChyran) 34 | * Updated for libsysbase change in devkitARM r46 and above. 35 | */ 36 | 37 | #ifndef NITROFS_H 38 | #define NITROFS_H 39 | 40 | #include 41 | #include 42 | #include 43 | 44 | #ifdef __cplusplus 45 | extern "C" 46 | { 47 | #endif 48 | 49 | int nitroFSInit(const char *ndsfile); 50 | DIR_ITER *nitroFSDirOpen(struct _reent *r, DIR_ITER *dirState, const char *path); 51 | int nitroDirReset(struct _reent *r, DIR_ITER *dirState); 52 | int nitroFSDirNext(struct _reent *r, DIR_ITER *dirState, char *filename, struct stat *st); 53 | int nitroFSDirClose(struct _reent *r, DIR_ITER *dirState); 54 | int nitroFSOpen(struct _reent *r, void *fileStruct, const char *path, int flags, int mode); 55 | int nitroFSClose(struct _reent *r, void *fd); 56 | ssize_t nitroFSRead(struct _reent *r, void *fd, char *ptr, size_t len); 57 | off_t nitroFSSeek(struct _reent *r, void *fd, off_t pos, int dir); 58 | int nitroFSFstat(struct _reent *r, void *fd, struct stat *st); 59 | int nitroFSstat(struct _reent *r, const char *file, struct stat *st); 60 | int nitroFSChdir(struct _reent *r, const char *name); 61 | #define LOADERSTR "PASS" //look for this 62 | #define LOADERSTROFFSET 0xac 63 | #define LOADEROFFSET 0x0200 64 | #define FNTOFFSET 0x40 65 | #define FATOFFSET 0x48 66 | 67 | #define NITRONAMELENMAX 0x80 //max file name is 127 +1 for zero byte :D 68 | #define NITROMAXPATHLEN 0x100 //256 bytes enuff? 69 | 70 | #define NITROROOT 0xf000 //root entry_file_id 71 | #define NITRODIRMASK 0x0fff //remove leading 0xf 72 | 73 | #define NITROISDIR 0x80 //mask to indicate this name entry is a dir, other 7 bits = name length 74 | 75 | //Directory filename subtable entry structure 76 | struct ROM_FNTDir 77 | { 78 | u32 entry_start; 79 | u16 entry_file_id; 80 | u16 parent_id; 81 | }; 82 | 83 | //Yo, dis table is fat (describes the structures 84 | struct ROM_FAT 85 | { 86 | u32 top; //start of file in rom image 87 | u32 bottom; //end of file in rom image 88 | }; 89 | 90 | struct nitroFSStruct 91 | { 92 | off_t pos; //where in the file am i? 93 | off_t start; //where in the rom this file starts 94 | off_t end; //where in the rom this file ends 95 | }; 96 | 97 | struct nitroDIRStruct 98 | { 99 | off_t pos; //where in the file am i? 100 | off_t namepos; //ptr to next name to lookup in list 101 | struct ROM_FAT romfat; 102 | u16 entry_id; //which entry this is (for files only) incremented with each new file in dir? 103 | u16 dir_id; //which directory entry this is.. used ofc for dirs only 104 | u16 cur_dir_id; //which directory entry we are using 105 | u16 parent_id; //who is the parent of the current directory (this can be used to easily ../ ) 106 | u8 spc; //system path count.. used by dirnext, when 0=./ 1=../ >=2 actual dirs 107 | }; 108 | 109 | #ifdef __cplusplus 110 | } 111 | #endif 112 | 113 | #endif -------------------------------------------------------------------------------- /arm9/common/read_card.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef READ_CARD_H 20 | #define READ_CARD_H 21 | 22 | #include 23 | #include 24 | #include 25 | 26 | #include "ndsheaderbanner.h" 27 | 28 | #define CARD_NDS_HEADER_SIZE (0x200) 29 | #define CARD_SECURE_AREA_OFFSET (0x4000) 30 | #define CARD_SECURE_AREA_SIZE (0x4000) 31 | #define CARD_DATA_OFFSET (0x8000) 32 | #define CARD_DATA_BLOCK_SIZE (0x200) 33 | #define MODC_AREA_SIZE 0x4000 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | extern u32 cardNandRomEnd; 40 | extern u32 cardNandRwStart; 41 | 42 | void ResetSlot(); 43 | 44 | u32 cardInit (sNDSHeaderExt* ndsHeader); 45 | u32 cardInitShort(sNDSHeaderExt* ndsHeader); 46 | 47 | void cardRead (u32 src, void* dest, bool nandSave); 48 | void cardReadAlt (u32 src, void* dest, size_t size); 49 | 50 | u32 cardGetId (void); 51 | 52 | void cardWriteNand (void* src, u32 dest); 53 | 54 | #ifdef __cplusplus 55 | } 56 | #endif 57 | 58 | #endif // READ_CARD_H 59 | 60 | -------------------------------------------------------------------------------- /arm9/common/tonccpy.h: -------------------------------------------------------------------------------- 1 | //# Stuff you may not have yet. 2 | 3 | #ifndef TONCCPY_H 4 | #define TONCCPY_H 5 | 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | typedef unsigned int uint; 14 | #define BIT_MASK(len) ( (1<<(len))-1 ) 15 | static inline u32 quad8(u16 x) { x |= x<<8; return x | x<<16; } 16 | 17 | 18 | //# Declarations and inlines. 19 | 20 | void tonccpy(void *dst, const void *src, uint size); 21 | 22 | void __toncset(void *dst, u32 fill, uint size); 23 | static inline void toncset(void *dst, u8 src, uint size); 24 | static inline void toncset16(void *dst, u16 src, uint size); 25 | static inline void toncset32(void *dst, u32 src, uint size); 26 | 27 | 28 | //! VRAM-safe memset, byte version. Size in bytes. 29 | static inline void toncset(void *dst, u8 src, uint size) 30 | { __toncset(dst, quad8(src), size); } 31 | 32 | //! VRAM-safe memset, halfword version. Size in hwords. 33 | static inline void toncset16(void *dst, u16 src, uint size) 34 | { __toncset(dst, src|src<<16, size*2); } 35 | 36 | //! VRAM-safe memset, word version. Size in words. 37 | static inline void toncset32(void *dst, u32 src, uint size) 38 | { __toncset(dst, src, size*4); } 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif 44 | -------------------------------------------------------------------------------- /arm9/common/tonccpy.itcm.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "tonccpy.h" 3 | //# tonccpy.c 4 | 5 | //! VRAM-safe cpy. 6 | /*! This version mimics memcpy in functionality, with 7 | the benefit of working for VRAM as well. It is also 8 | slightly faster than the original memcpy, but faster 9 | implementations can be made. 10 | \param dst Destination pointer. 11 | \param src Source pointer. 12 | \param size Fill-length in bytes. 13 | \note The pointers and size need not be word-aligned. 14 | */ 15 | void tonccpy(void *dst, const void *src, uint size) { 16 | 17 | if(size==0 || dst==NULL || src==NULL) { return; } 18 | 19 | uint count; 20 | u16 *dst16; // hword destination 21 | u8 *src8; // byte source 22 | 23 | // Ideal case: copy by 4x words. Leaves tail for later. 24 | if( ((u32)src|(u32)dst)%4==0 && size>=4) { 25 | u32 *src32= (u32*)src, *dst32= (u32*)dst; 26 | 27 | count= size/4; 28 | uint tmp= count&3; 29 | count /= 4; 30 | 31 | // Duff's Device, good friend! 32 | // Added fall through attribute to silance the compiler about this. ;) 33 | switch(tmp) { 34 | do { *dst32++ = *src32++; // fallthrough 35 | case 3: *dst32++ = *src32++; // fallthrough 36 | case 2: *dst32++ = *src32++; // fallthrough 37 | case 1: *dst32++ = *src32++; // fallthrough 38 | case 0: ;} while(count--); // fallthrough 39 | } 40 | 41 | // Check for tail 42 | size &= 3; 43 | if(size == 0) { return; } 44 | src8= (u8*)src32; 45 | dst16= (u16*)dst32; 46 | } else { 47 | // Unaligned. 48 | uint dstOfs= (u32)dst&1; 49 | src8= (u8*)src; 50 | dst16= (u16*)(dst-dstOfs); 51 | 52 | // Head: 1 byte. 53 | if(dstOfs != 0) { 54 | *dst16= (*dst16 & 0xFF) | *src8++<<8; 55 | dst16++; 56 | if(--size==0) { return; } 57 | } 58 | } 59 | 60 | // Unaligned main: copy by 2x byte. 61 | count= size/2; 62 | while(count--) { 63 | *dst16++ = src8[0] | src8[1]<<8; 64 | src8 += 2; 65 | } 66 | 67 | // Tail: 1 byte. 68 | if(size&1) { *dst16= (*dst16 &~ 0xFF) | *src8; } 69 | } 70 | //# toncset.c 71 | 72 | //! VRAM-safe memset, internal routine. 73 | /*! This version mimics memset in functionality, with 74 | the benefit of working for VRAM as well. It is also 75 | slightly faster than the original memset. 76 | \param dst Destination pointer. 77 | \param fill Word to fill with. 78 | \param size Fill-length in bytes. 79 | \note The \a dst pointer and \a size need not be 80 | word-aligned. In the case of unaligned fills, \a fill 81 | will be masked off to match the situation. 82 | */ 83 | void __toncset(void *dst, u32 fill, uint size) { 84 | if(size==0 || dst==NULL) { return; } 85 | 86 | uint left= (u32)dst&3; 87 | u32 *dst32= (u32*)(dst-left); 88 | u32 count, mask; 89 | 90 | // Unaligned head. 91 | if(left != 0) { 92 | // Adjust for very small stint. 93 | if(left+size<4) { 94 | mask= BIT_MASK(size*8)<<(left*8); 95 | *dst32= (*dst32 &~ mask) | (fill & mask); 96 | return; 97 | } 98 | 99 | mask= BIT_MASK(left*8); 100 | *dst32= (*dst32 & mask) | (fill&~mask); 101 | dst32++; 102 | size -= 4-left; 103 | } 104 | 105 | // Main stint. 106 | count= size/4; 107 | uint tmp= count&3; 108 | count /= 4; 109 | 110 | // Added fall through attribute to silance the compiler about this. ;) 111 | switch(tmp) { 112 | do { *dst32++ = fill; // fallthrough 113 | case 3: *dst32++ = fill; // fallthrough 114 | case 2: *dst32++ = fill; // fallthrough 115 | case 1: *dst32++ = fill; // fallthrough 116 | case 0: ;} while(count--); // fallthrough 117 | } 118 | 119 | // Tail 120 | size &= 3; 121 | if(size) { 122 | mask= BIT_MASK(size*8); 123 | *dst32= (*dst32 &~ mask) | (fill & mask); 124 | } 125 | } 126 | 127 | -------------------------------------------------------------------------------- /arm9/graphics/Bot00.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot00.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot01.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot02.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot02DE.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot02DE.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot02ES.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot02ES.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot02FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot02FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot02IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot02IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot02JA.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot02JA.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot03.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot03DE.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot03DE.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot03ES.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot03ES.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot03FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot03FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot03IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot03IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot03JA.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot03JA.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot04.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot04DE.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot04DE.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot04ES.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot04ES.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot04FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot04FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot04IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot04IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot04JA.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot04JA.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot05.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot05.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot05DE.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot05DE.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot05ES.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot05ES.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot05FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot05FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot05IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot05IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot05JA.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot05JA.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot09.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot09.bmp -------------------------------------------------------------------------------- /arm9/graphics/Bot10.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Bot10.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi00.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi00.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi01.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi02.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi03.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi04.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi05.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi05.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi06.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi06.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi07.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi07.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi08.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi08.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi09.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi09.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi10.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi10.bmp -------------------------------------------------------------------------------- /arm9/graphics/BotDSi11.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/BotDSi11.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt01.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt01FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt01FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt01IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt01IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt02.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt02FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt02FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt02IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt02IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt03.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt03FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt03FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt03IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt03IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt04.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt04FR.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt04FR.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPrompt04IT.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPrompt04IT.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPromptNoHS01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPromptNoHS01.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPromptNoHS02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPromptNoHS02.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPromptNoHS03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPromptNoHS03.bmp -------------------------------------------------------------------------------- /arm9/graphics/CartPromptNoHS04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/CartPromptNoHS04.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi01.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi02.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi03.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi04.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi05.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi05.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi06.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi06.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi07.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi07.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi08.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi08.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi09.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi09.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi10.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi10.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi11.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi11.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi12.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi12.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi13.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi13.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi14.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi14.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi15.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi15.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi16.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi17.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi17.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi18.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi18.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi19.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi19.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi20.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi20.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi21.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi21.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi22.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi22.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi23.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi23.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi24.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi25.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi25.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi26.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi26.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi27.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi27.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi28.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi28.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi29.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi29.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi30.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi31.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi31.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi32.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi32.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi33.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi33.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi34.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi34.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSi35.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSi35.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSiCartPrompt01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSiCartPrompt01.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSiCartPrompt02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSiCartPrompt02.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSiCartPrompt03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSiCartPrompt03.bmp -------------------------------------------------------------------------------- /arm9/graphics/DSiCartPrompt04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/DSiCartPrompt04.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top001.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top001.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top002.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top002.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top003.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top003.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top004.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top004.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top005.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top005.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top006.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top006.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top007.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top007.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top008.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top008.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top009.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top009.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top010.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top010.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top011.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top011.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top012.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top012.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top013.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top013.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top014.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top014.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top015.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top015.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top016.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top016.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top017.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top017.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top018.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top018.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top019.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top019.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top020.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top020.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top021.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top021.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top022.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top022.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top023.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top023.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top024.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top024.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top025.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top025.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top026.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top026.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top027.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top027.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top028.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top028.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top029.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top029.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top030.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top030.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top031.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top031.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top032.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top032.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top033.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top033.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top034.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top034.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top035.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top035.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top036.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top036.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top037.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top037.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top038.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top038.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top039.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top039.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top040.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top040.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top041.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top041.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top042.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top042.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top043.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top043.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top044.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top044.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top045.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top045.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top046.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top046.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top047.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top047.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top048.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top048.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top049.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top049.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top050.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top050.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top051.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top051.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top052.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top052.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top053.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top053.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top054.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top054.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top055.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top055.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top056.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top056.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top057.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top057.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top058.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top058.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top059.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top059.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top060.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top060.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top061.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top061.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top062.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top062.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top063.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top063.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top064.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top064.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top065.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top065.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top066.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top066.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top067.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top067.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top068.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top068.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top069.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top069.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top070.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top070.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top071.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top071.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top072.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top072.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top073.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top073.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top074.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top074.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top075.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top075.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top076.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top076.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top077.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top077.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top078.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top078.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top079.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top079.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top080.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top080.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top081.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top081.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top082.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top082.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top083.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top083.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top084.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top084.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top085.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top085.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top086.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top086.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top087.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top087.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top088.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top088.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top089.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top089.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top090.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top090.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top091.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top091.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top092.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top092.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top093.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top093.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top094.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top094.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top095.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top095.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top096.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top096.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top097.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top097.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top098.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top098.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top099.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top099.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top100.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top100.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top101.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top101.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top102.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top102.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top103.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top103.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top104.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top104.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top105.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top105.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top106.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top106.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top107.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top107.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top108.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top108.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top109.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top109.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top110.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top110.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top111.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top111.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top112.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top112.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top113.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top113.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top114.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top114.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top115.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top115.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top116.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top116.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top117.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top117.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top118.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top118.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top119.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top119.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top120.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top120.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top121.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top121.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top122.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top122.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top123.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top123.bmp -------------------------------------------------------------------------------- /arm9/graphics/Top124.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/Top124.bmp -------------------------------------------------------------------------------- /arm9/graphics/White.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/White.bmp -------------------------------------------------------------------------------- /arm9/graphics/font.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/font.bmp -------------------------------------------------------------------------------- /arm9/graphics/font6x8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/font6x8.bmp -------------------------------------------------------------------------------- /arm9/graphics/hbmenu_banner.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/hbmenu_banner.bmp -------------------------------------------------------------------------------- /arm9/graphics/hbmenu_banner_cartSelected.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/hbmenu_banner_cartSelected.bmp -------------------------------------------------------------------------------- /arm9/graphics/hbmenu_banner_noCart.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/hbmenu_banner_noCart.bmp -------------------------------------------------------------------------------- /arm9/graphics/hbmenu_consolebg.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/hbmenu_consolebg.bmp -------------------------------------------------------------------------------- /arm9/graphics/loading.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/loading.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror00.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror00.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror01.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror02.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror03.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror04.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror05.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror05.bmp -------------------------------------------------------------------------------- /arm9/graphics/suberror06.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/suberror06.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_00.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_00.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_01.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_01.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_02.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_02.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_03.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_03.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_04.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_04.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_05.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_05.bmp -------------------------------------------------------------------------------- /arm9/graphics/toperror2_06.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/graphics/toperror2_06.bmp -------------------------------------------------------------------------------- /arm9/hbmenu/args.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | Copyright (C) 2005 - 2017 3 | Michael "Chishm" Chisholm 4 | Dave "WinterMute" Murphy 5 | Claudio "sverx" 6 | Michael "mtheall" Theall 7 | 8 | This program is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU General Public License 10 | as published by the Free Software Foundation; either version 2 11 | of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | 22 | ------------------------------------------------------------------*/ 23 | 24 | #ifndef ARGS_H 25 | #define ARGS_H 26 | 27 | #include 28 | #include 29 | 30 | /* Convert a file path of any type (e.g. .nds or .argv) into a path to the NDS 31 | * file to be opened. The returned path may be absolute or relative to the 32 | * current working directory. 33 | * Returns true on success, false on failure. 34 | */ 35 | bool argsNdsPath(const std::string& filePath, std::string& ndsPath); 36 | 37 | /* Convert a file path of any type into an argument array by filling the array 38 | * that is passed in. The first argument will be the full path to an NDS file. 39 | * Returns true on success, false on failure. 40 | */ 41 | bool argsFillArray(const std::string& filePath, std::vector& argarray); 42 | 43 | /* Return a list of all file extensions that can be browsed and opened. 44 | */ 45 | std::vector argsGetExtensionList(); 46 | 47 | #endif // ARGS_H 48 | -------------------------------------------------------------------------------- /arm9/hbmenu/file_browse.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | Copyright (C) 2005 - 2017 3 | Michael "Chishm" Chisholm 4 | Dave "WinterMute" Murphy 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | ------------------------------------------------------------------*/ 21 | 22 | #ifndef FILE_BROWSE_H 23 | #define FILE_BROWSE_H 24 | 25 | #include 26 | #include 27 | #include "read_card.h" 28 | #include "launcherData.h" 29 | 30 | 31 | extern bool cartInsertedOnBoot; 32 | extern sNDSHeaderExt ntrHeader; 33 | 34 | std::string browseForFile (const std::vector& extensionList, tLauncherSettings launchdata); 35 | 36 | 37 | #endif //FILE_BROWSE_H 38 | 39 | -------------------------------------------------------------------------------- /arm9/hbmenu/hbmenu.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | Copyright (C) 2005 - 2017 3 | Michael "Chishm" Chisholm 4 | Dave "WinterMute" Murphy 5 | Claudio "sverx" 6 | Michael "mtheall" Theall 7 | 8 | This program is free software; you can redistribute it and/or 9 | modify it under the terms of the GNU General Public License 10 | as published by the Free Software Foundation; either version 2 11 | of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License 19 | along with this program; if not, write to the Free Software 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 21 | 22 | ------------------------------------------------------------------*/ 23 | 24 | #ifndef HBMENU_H 25 | #define HBMENU_H 26 | 27 | #include "launcherData.h" 28 | 29 | void StartFileBrowser(tLauncherSettings launchdata, bool nitroFSMounted); 30 | 31 | #endif // HBMENU_H 32 | 33 | -------------------------------------------------------------------------------- /arm9/hbmenu/iconTitle.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | Copyright (C) 2005 - 2013 3 | Michael "Chishm" Chisholm 4 | Dave "WinterMute" Murphy 5 | Claudio "sverx" 6 | 7 | This program is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU General Public License 9 | as published by the Free Software Foundation; either version 2 10 | of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License 18 | along with this program; if not, write to the Free Software 19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 | 21 | ------------------------------------------------------------------*/ 22 | #include 23 | 24 | extern bool cartSelected; 25 | 26 | void clearCartIcon(bool clearBannerText); 27 | void ToggleBackground(bool noCart); 28 | void iconTitleInit (void); 29 | void iconTitleUpdate (int isdir, const std::string& name); 30 | void cartIconUpdate (u32 BannerOffset, bool readExistingBanner); 31 | -------------------------------------------------------------------------------- /arm9/hbmenu/nds_loader_arm9.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | Copyright (C) 2005 - 2010 3 | Michael "Chishm" Chisholm 4 | Dave "WinterMute" Murphy 5 | 6 | This program is free software; you can redistribute it and/or 7 | modify it under the terms of the GNU General Public License 8 | as published by the Free Software Foundation; either version 2 9 | of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program; if not, write to the Free Software 18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | 20 | ------------------------------------------------------------------*/ 21 | 22 | #ifndef NDS_LOADER_ARM9_H 23 | #define NDS_LOADER_ARM9_H 24 | 25 | #include "launcherData.h" 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | typedef enum { 32 | RUN_NDS_OK = 0, 33 | RUN_NDS_STAT_FAILED, 34 | RUN_NDS_GETCWD_FAILED, 35 | RUN_NDS_PATCH_DLDI_FAILED, 36 | } eRunNdsRetCode; 37 | 38 | #define LOAD_DEFAULT_NDS 0 39 | 40 | eRunNdsRetCode runNds (const void* loader, u32 loaderSize, u32 cluster, bool initDisc, bool dldiPatchNds, int argc, const char** argv, tLauncherSettings launchdata); 41 | 42 | eRunNdsRetCode runNdsFile (const char* filename, int argc, const char** argv, tLauncherSettings launchData); 43 | 44 | // bool installBootStub(bool havedsiSD); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif // NDS_LOADER_ARM7_H 51 | 52 | -------------------------------------------------------------------------------- /arm9/include/dsCardDefault.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/include/dsCardDefault.bin -------------------------------------------------------------------------------- /arm9/include/dsCardInvalid.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/include/dsCardInvalid.bin -------------------------------------------------------------------------------- /arm9/include/hbNoIcon.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/arm9/include/hbNoIcon.bin -------------------------------------------------------------------------------- /arm9/source/bootsplash.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef BOOTSPLASH_H 20 | #define BOOTSPLASH_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | // void vramcpy_ui (void* dest, const void* src, int size); 27 | void BootJingle (void); 28 | void BootJingleDSi (void); 29 | void BootSplashDSi (bool HealthandSafety_MSG, int language); 30 | void CartridgePrompt (void); 31 | void CartridgePromptDSi (void); 32 | void CartridgePromptNoHS (void); 33 | void BootSplashDS (bool HealthandSafety_MSG, int language); 34 | void FadeFX (void); 35 | void ErrorNoCard (void); 36 | void SimpleSplashInit(void); 37 | void BootSplashInit (bool UseNTRSplash, bool HealthandSafety_MSG, int language, bool DisplayErrorSplash); 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif // BOOTSPLASH_H 44 | 45 | -------------------------------------------------------------------------------- /arm9/source/debugConsole.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DEBUGCONSOLE_H 20 | #define DEBUGCONSOLE_H 21 | 22 | #ifdef __cplusplus 23 | extern "C" { 24 | #endif 25 | 26 | void InitConsole(void); 27 | 28 | #ifdef __cplusplus 29 | } 30 | #endif 31 | 32 | #endif 33 | 34 | -------------------------------------------------------------------------------- /arm9/source/debugConsole.twl.c: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | 21 | bool ConsoleInit = false; 22 | 23 | void InitConsole() { 24 | ConsoleInit = true; 25 | // Enable console 26 | videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE); 27 | vramSetBankC(VRAM_C_SUB_BG_0x06200000); 28 | REG_BG0CNT_SUB = BG_MAP_BASE(4) | BG_COLOR_16 | BG_TILE_BASE(6) | BG_PRIORITY(0); 29 | consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 4, 6, false, true); 30 | BG_PALETTE_SUB[0] = RGB15(31,31,31); 31 | BG_PALETTE_SUB[255] = RGB15(0,0,0); 32 | } 33 | 34 | -------------------------------------------------------------------------------- /arm9/source/launch_engine.c: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | #include "load_bin.h" 23 | #include "launch_engine.h" 24 | #include "debugConsole.h" 25 | #include "launcherData.h" 26 | 27 | #define LCDC_BANK_D (u16*)0x06860000 28 | 29 | 30 | void vramcpy (void* dst, const void* src, int len) { 31 | u16* dst16 = (u16*)dst; 32 | u16* src16 = (u16*)src; 33 | 34 | for ( ; len > 0; len -= 2) { *dst16++ = *src16++; } 35 | } 36 | 37 | extern void InitConsole(); 38 | 39 | extern bool ConsoleInit; 40 | 41 | 42 | ITCM_CODE static void SETSCFG(u8 twlMode, u8 twlVRAM, u8 twlRAM) { 43 | if (twlMode > 0) { 44 | // if (twlRAM > 0) { REG_SCFG_EXT = 0x82076100; } else { REG_SCFG_EXT = 0x82073100; } 45 | // if (twlRAM > 0) { REG_SCFG_EXT = 0x8207611F; } else { REG_SCFG_EXT = 0x8207311F; } 46 | // if (twlRAM > 0) { REG_SCFG_EXT = 0x8207711F; } else { REG_SCFG_EXT = 0x8207311F; } 47 | // REG_SCFG_EXT = 0x8207711F; 48 | REG_SCFG_EXT = 0x8307F100; 49 | REG_SCFG_RST = 1; 50 | } else { 51 | // if (twlRAM == 0) { REG_SCFG_EXT = 0x83002000; } else { REG_SCFG_EXT = 0x83006000; } 52 | // REG_SCFG_EXT = 0x83006000; 53 | REG_SCFG_EXT = 0x8300E000; 54 | } 55 | if (twlVRAM == 0)REG_SCFG_EXT &= ~(1UL << 13); 56 | if (twlRAM == 0)REG_SCFG_EXT &= ~(1UL << 14); 57 | if (twlRAM == 0)REG_SCFG_EXT &= ~(1UL << 15); 58 | for(int i = 0; i < 8; i++) { while(REG_VCOUNT!=191); while(REG_VCOUNT==191); } 59 | } 60 | 61 | 62 | void runLaunchEngine (tLauncherSettings launchdata) { 63 | // Always init console so bootloader's new console can display error codes if needed. 64 | if (!launchdata.debugMode || !ConsoleInit) { InitConsole(); } else { consoleClear(); } 65 | 66 | irqDisable(IRQ_ALL); 67 | // Direct CPU access to VRAM bank D 68 | VRAM_D_CR = (VRAM_ENABLE | VRAM_D_LCD); 69 | 70 | // Load the loader/patcher into the correct address 71 | vramcpy (LCDC_BANK_D, load_bin, load_bin_size); 72 | 73 | // Give the VRAM to the ARM7 74 | // nocashMessage("Give the VRAM to the ARM7"); 75 | VRAM_D_CR = VRAM_ENABLE | VRAM_D_ARM7_0x06020000; 76 | 77 | // Reset into a passme loop 78 | // nocashMessage("Reset into a passme loop"); 79 | REG_EXMEMCNT |= ARM7_OWNS_ROM | ARM7_OWNS_CARD; 80 | 81 | *(tLauncherSettings*)LAUNCH_DATA = launchdata; 82 | 83 | SETSCFG(launchdata.twlMode, launchdata.twlVRAM, launchdata.twlRAM); 84 | 85 | // Return to passme loop 86 | *(vu32*)0x02FFFFFC = 0; 87 | *(vu32*)0x02FFFE04 = (u32)0xE59FF018; // ldr pc, 0x02FFFE24 88 | *(vu32*)0x02FFFE24 = (u32)0x02FFFE04; // Set ARM9 Loop address --> resetARM9(0x02FFFE04); 89 | // Reset ARM7 90 | // nocashMessage("resetARM7"); 91 | resetARM7(0x06020000); 92 | // swi soft reset 93 | // nocashMessage("swiSoftReset"); 94 | swiSoftReset(); 95 | } 96 | 97 | -------------------------------------------------------------------------------- /arm9/source/launch_engine.h: -------------------------------------------------------------------------------- 1 | /* 2 | NitroHax -- Cheat tool for the Nintendo DS 3 | Copyright (C) 2008 Michael "Chishm" Chisholm 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef LAUNCH_ENGINE_H 20 | #define LAUNCH_ENGINE_H 21 | 22 | #include 23 | #include "launcherData.h" 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | void runLaunchEngine (tLauncherSettings launchdata); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | 35 | #endif // LAUNCH_ENGINE_H 36 | 37 | -------------------------------------------------------------------------------- /icon.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ApacheThunder/NTR_Launcher/1cf2bb93709266c896a362a072f3923b6676c0ef/icon.bmp -------------------------------------------------------------------------------- /ndsbootloader/.gitignore: -------------------------------------------------------------------------------- 1 | *build 2 | load.bin 3 | load.elf 4 | -------------------------------------------------------------------------------- /ndsbootloader/Makefile: -------------------------------------------------------------------------------- 1 | #--------------------------------------------------------------------------------- 2 | .SUFFIXES: 3 | #--------------------------------------------------------------------------------- 4 | ifeq ($(strip $(DEVKITARM)),) 5 | $(error "Please set DEVKITARM in your environment. export DEVKITARM=devkitARM) 6 | endif 7 | 8 | -include $(DEVKITARM)/ds_rules 9 | 10 | #--------------------------------------------------------------------------------- 11 | # BUILD is the directory where object files & intermediate files will be placed 12 | # SOURCES is a list of directories containing source code 13 | # INCLUDES is a list of directories containing extra header files 14 | #--------------------------------------------------------------------------------- 15 | TARGET := load2 16 | BUILD ?= build 17 | SOURCES := source source/patches 18 | INCLUDES := build ../include 19 | DATA := ../data 20 | SPECS := specs 21 | 22 | #--------------------------------------------------------------------------------- 23 | # options for code generation 24 | #--------------------------------------------------------------------------------- 25 | ARCH := -mthumb -mthumb-interwork 26 | 27 | CFLAGS := -g -Wall -Os \ 28 | -mcpu=arm7tdmi -mtune=arm7tdmi -fomit-frame-pointer \ 29 | -ffast-math \ 30 | $(ARCH) 31 | 32 | CFLAGS += $(INCLUDE) $(EXTRA_CFLAGS) -DARM7 -DNO_DLDI 33 | 34 | ASFLAGS := -g $(ARCH) $(EXTRA_CFLAGS) $(INCLUDE) 35 | LDFLAGS = -nostartfiles -T $(TOPDIR)/load2.ld -Wl,-g $(ARCH) -Wl,-Map,$(TARGET).map 36 | 37 | LIBS := 38 | 39 | #--------------------------------------------------------------------------------- 40 | # list of directories containing libraries, this must be the top level containing 41 | # include and lib 42 | #--------------------------------------------------------------------------------- 43 | LIBDIRS := $(LIBNDS) 44 | 45 | 46 | #--------------------------------------------------------------------------------- 47 | # no real need to edit anything past this point unless you need to add additional 48 | # rules for different file extensions 49 | #--------------------------------------------------------------------------------- 50 | ifneq ($(BUILD),$(notdir $(CURDIR))) 51 | #--------------------------------------------------------------------------------- 52 | 53 | export TOPDIR := $(CURDIR) 54 | export LOADBIN := $(CURDIR)/../data/$(TARGET).bin 55 | export LOADELF := $(CURDIR)/$(TARGET).elf 56 | export DEPSDIR := $(CURDIR)/$(BUILD) 57 | 58 | export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) 59 | 60 | export CC := $(PREFIX)gcc 61 | export CXX := $(PREFIX)g++ 62 | export AR := $(PREFIX)ar 63 | export OBJCOPY := $(PREFIX)objcopy 64 | 65 | CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) 66 | CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) 67 | SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) 68 | 69 | export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) 70 | 71 | export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ 72 | $(foreach dir,$(LIBDIRS),-I$(dir)/include) \ 73 | -I$(CURDIR)/$(BUILD) 74 | 75 | export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) 76 | 77 | #--------------------------------------------------------------------------------- 78 | # use CC for linking standard C 79 | #--------------------------------------------------------------------------------- 80 | export LD := $(CC) 81 | #--------------------------------------------------------------------------------- 82 | 83 | .PHONY: $(BUILD) clean 84 | 85 | #--------------------------------------------------------------------------------- 86 | $(BUILD): 87 | @[ -d $@ ] || mkdir -p $@ 88 | @$(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile 89 | 90 | #--------------------------------------------------------------------------------- 91 | clean: 92 | @echo clean ... 93 | @rm -fr $(BUILD) *.elf *.bin 94 | 95 | 96 | #--------------------------------------------------------------------------------- 97 | else 98 | 99 | DEPENDS := $(OFILES:.o=.d) 100 | 101 | #--------------------------------------------------------------------------------- 102 | # main targets 103 | #--------------------------------------------------------------------------------- 104 | $(LOADBIN) : $(LOADELF) 105 | @$(OBJCOPY) -O binary $< $@ 106 | @echo built ... $(notdir $@) 107 | 108 | 109 | $(LOADELF) : $(OFILES) 110 | @echo linking $(notdir $@) 111 | @$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@ 112 | 113 | arm9mpu_reset.o: mpu_reset.bin 114 | 115 | mpu_reset.bin: mpu_reset.elf 116 | $(OBJCOPY) -O binary $< $@ 117 | 118 | mpu_reset.elf: $(TOPDIR)/arm9code/mpu_reset.s 119 | $(CC) $(ASFLAGS) -Ttext=0 -x assembler-with-cpp -nostartfiles -nostdlib $< -o $@ 120 | 121 | -include $(DEPENDS) 122 | #--------------------------------------------------------------------------------------- 123 | endif 124 | #--------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /ndsbootloader/arm9code/mpu_reset.s: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2006 - 2015 Dave Murphy (WinterMute) 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | */ 18 | 19 | #include 20 | 21 | .text 22 | .align 4 23 | 24 | .arm 25 | 26 | .arch armv5te 27 | .cpu arm946e-s 28 | 29 | @--------------------------------------------------------------------------------- 30 | .global _start 31 | .type _start STT_FUNC 32 | @--------------------------------------------------------------------------------- 33 | _start: 34 | @--------------------------------------------------------------------------------- 35 | @ Switch off MPU 36 | mrc p15, 0, r0, c1, c0, 0 37 | bic r0, r0, #PROTECT_ENABLE 38 | mcr p15, 0, r0, c1, c0, 0 39 | 40 | 41 | adr r12, mpu_initial_data 42 | ldmia r12, {r0-r10} 43 | 44 | mcr p15, 0, r0, c2, c0, 0 45 | mcr p15, 0, r0, c2, c0, 1 46 | mcr p15, 0, r1, c3, c0, 0 47 | mcr p15, 0, r2, c5, c0, 2 48 | mcr p15, 0, r3, c5, c0, 3 49 | mcr p15, 0, r4, c6, c0, 0 50 | mcr p15, 0, r5, c6, c1, 0 51 | mcr p15, 0, r6, c6, c3, 0 52 | mcr p15, 0, r7, c6, c4, 0 53 | mcr p15, 0, r8, c6, c6, 0 54 | mcr p15, 0, r9, c6, c7, 0 55 | mcr p15, 0, r10, c9, c1, 0 56 | 57 | mov r0, #0 58 | mcr p15, 0, r0, c6, c2, 0 @ PU Protection Unit Data/Unified Region 2 59 | mcr p15, 0, r0, c6, c5, 0 @ PU Protection Unit Data/Unified Region 5 60 | 61 | mrc p15, 0, r0, c9, c1, 0 @ DTCM 62 | mov r0, r0, lsr #12 @ base 63 | mov r0, r0, lsl #12 @ size 64 | add r0, r0, #0x4000 @ dtcm top 65 | 66 | sub r0, r0, #4 @ irq vector 67 | mov r1, #0 68 | str r1, [r0] 69 | sub r0, r0, #4 @ IRQ1 Check Bits 70 | str r1, [r0] 71 | 72 | sub r0, r0, #128 73 | bic r0, r0, #7 74 | 75 | msr cpsr_c, #0xd3 @ svc mode 76 | mov sp, r0 77 | sub r0, r0, #128 78 | msr cpsr_c, #0xd2 @ irq mode 79 | mov sp, r0 80 | sub r0, r0, #128 81 | msr cpsr_c, #0xdf @ system mode 82 | mov sp, r0 83 | 84 | @ enable cache & tcm 85 | mrc p15, 0, r0, c1, c0, 0 86 | ldr r1,= ITCM_ENABLE | DTCM_ENABLE | ICACHE_ENABLE | DCACHE_ENABLE 87 | orr r0,r0,r1 88 | mcr p15, 0, r0, c1, c0, 0 89 | 90 | ldr r10, =0x2FFFE04 91 | ldr r0, =0xE59FF018 92 | str r0, [r10] 93 | add r1, r10, #0x20 94 | str r10, [r1] 95 | bx r10 96 | 97 | .pool 98 | 99 | mpu_initial_data: 100 | .word 0x00000042 @ p15,0,c2,c0,0..1,r0 ;PU Cachability Bits for Data/Unified+Instruction Protection Region 101 | .word 0x00000002 @ p15,0,c3,c0,0,r1 ;PU Write-Bufferability Bits for Data Protection Regions 102 | .word 0x15111011 @ p15,0,c5,c0,2,r2 ;PU Extended Access Permission Data/Unified Protection Region 103 | .word 0x05100011 @ p15,0,c5,c0,3,r3 ;PU Extended Access Permission Instruction Protection Region 104 | .word 0x04000033 @ p15,0,c6,c0,0,r4 ;PU Protection Unit Data/Unified Region 0 105 | .word 0x0200002b @ p15,0,c6,c1,0,r5 ;PU Protection Unit Data/Unified Region 1 4MB 106 | .word 0x08000035 @ p15,0,c6,c3,0,r6 ;PU Protection Unit Data/Unified Region 3 107 | .word 0x0300001b @ p15,0,c6,c4,0,r7 ;PU Protection Unit Data/Unified Region 4 108 | .word 0xffff001d @ p15,0,c6,c6,0,r8 ;PU Protection Unit Data/Unified Region 6 109 | .word 0x02fff017 @ p15,0,c6,c7,0,r9 ;PU Protection Unit Data/Unified Region 7 4KB 110 | .word 0x0300000a @ p15,0,c9,c1,0,r10 ;TCM Data TCM Base and Virtual Size 111 | -------------------------------------------------------------------------------- /ndsbootloader/source/arm7clear.s: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | 3 | Copyright (C) 2005 Michael "Chishm" Chisholm 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | If you use this code, please give due credit and email me about your 20 | project at chishm@hotmail.com 21 | ------------------------------------------------------------------*/ 22 | 23 | .arm 24 | .global arm7clearRAM 25 | .type arm7clearRAM STT_FUNC 26 | arm7clearRAM: 27 | 28 | push {r0-r9} 29 | // clear exclusive IWRAM 30 | // 0380:0000 to 0380:FFFF, total 64KiB 31 | mov r0, #0 32 | mov r1, #0 33 | mov r2, #0 34 | mov r3, #0 35 | mov r4, #0 36 | mov r5, #0 37 | mov r6, #0 38 | mov r7, #0 39 | mov r8, #0x03800000 40 | sub r8, #0x00008000 41 | mov r9, #0x03800000 42 | orr r9, r9, #0x10000 43 | clear_IWRAM_loop: 44 | stmia r8!, {r0, r1, r2, r3, r4, r5, r6, r7} 45 | cmp r8, r9 46 | blt clear_IWRAM_loop 47 | 48 | // clear most of EWRAM - except after RAM end - 0xc000, which has the bootstub 49 | mov r8, #0x02000000 50 | 51 | ldr r9,=0x4004008 52 | ldr r9,[r9] 53 | ands r9,r9,#0x8000 54 | bne dsi_mode 55 | 56 | mov r9, #0x02400000 57 | b ds_mode 58 | dsi_mode: 59 | mov r9, #0x03000000 60 | ds_mode: 61 | sub r9, #0x0000c000 62 | clear_EWRAM_loop: 63 | stmia r8!, {r0, r1, r2, r3, r4, r5, r6, r7} 64 | cmp r8, r9 65 | blt clear_EWRAM_loop 66 | 67 | pop {r0-r9} 68 | 69 | bx lr 70 | 71 | -------------------------------------------------------------------------------- /ndsbootloader/source/arm9clear.arm.c: -------------------------------------------------------------------------------- 1 | #define ARM9 2 | #undef ARM7 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #include "boot.h" 15 | 16 | /*------------------------------------------------------------------------- 17 | resetMemory2_ARM9 18 | Clears the ARM9's DMA channels and resets video memory 19 | Written by Darkain. 20 | Modified by Chishm: 21 | * Changed MultiNDS specific stuff 22 | --------------------------------------------------------------------------*/ 23 | void __attribute__ ((long_call)) __attribute__((naked)) __attribute__((noreturn)) resetMemory2_ARM9 (void) { 24 | register int i; 25 | 26 | //clear out ARM9 DMA channels 27 | for (i=0; i<4; i++) { 28 | DMA_CR(i) = 0; 29 | DMA_SRC(i) = 0; 30 | DMA_DEST(i) = 0; 31 | TIMER_CR(i) = 0; 32 | TIMER_DATA(i) = 0; 33 | } 34 | 35 | //set shared ram to ARM7 36 | WRAM_CR = 0x03; 37 | 38 | // Return to passme loop 39 | *((vu32*)0x02FFFE04) = (u32)0xE59FF018; // ldr pc, 0x02FFFE24 40 | *((vu32*)0x02FFFE24) = (u32)0x02FFFE04; // Set ARM9 Loop address 41 | 42 | asm volatile( 43 | "\tbx %0\n" 44 | : : "r" (0x02FFFE04) 45 | ); 46 | while(1); 47 | } 48 | 49 | /*------------------------------------------------------------------------- 50 | startBinary_ARM9 51 | Jumps to the ARM9 NDS binary in sync with the display and ARM7 52 | Written by Darkain. 53 | Modified by Chishm: 54 | * Removed MultiNDS specific stuff 55 | --------------------------------------------------------------------------*/ 56 | void __attribute__ ((long_call)) __attribute__((noreturn)) __attribute__((naked)) startBinary_ARM9 (void) { 57 | REG_IME=0; 58 | REG_EXMEMCNT = 0xE880; 59 | // set ARM9 load address to 0 and wait for it to change again 60 | ARM9_START_FLAG = 0; 61 | while(REG_VCOUNT!=191); 62 | while(REG_VCOUNT==191); 63 | while ( ARM9_START_FLAG != 1 ); 64 | VoidFn arm9code = *(VoidFn*)(0x2FFFE24); 65 | arm9code(); 66 | while(1); 67 | } 68 | 69 | -------------------------------------------------------------------------------- /ndsbootloader/source/arm9mpu_reset.s: -------------------------------------------------------------------------------- 1 | .arm 2 | .global mpu_reset, mpu_reset_end 3 | 4 | mpu_reset: 5 | .incbin "mpu_reset.bin" 6 | mpu_reset_end: 7 | -------------------------------------------------------------------------------- /ndsbootloader/source/card.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | 3 | Copyright (C) 2005 Michael "Chishm" Chisholm 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | If you use this code, please give due credit and email me about your 20 | project at chishm@hotmail.com 21 | ------------------------------------------------------------------*/ 22 | 23 | #ifndef CARD_H 24 | #define CARD_H 25 | 26 | #include "disc_io.h" 27 | #include "io_dldi.h" 28 | 29 | static inline bool CARD_StartUp (void) { 30 | return _io_dldi.fn_startup(); 31 | } 32 | 33 | static inline bool CARD_IsInserted (void) { 34 | return _io_dldi.fn_isInserted(); 35 | } 36 | 37 | static inline bool CARD_ReadSector (u32 sector, void *buffer) { 38 | return _io_dldi.fn_readSectors(sector, 1, buffer); 39 | } 40 | 41 | static inline bool CARD_ReadSectors (u32 sector, int count, void *buffer) { 42 | return _io_dldi.fn_readSectors(sector, count, buffer); 43 | } 44 | 45 | #endif // CARD_H 46 | -------------------------------------------------------------------------------- /ndsbootloader/source/disc_io.h: -------------------------------------------------------------------------------- 1 | /* 2 | disc_io.h 3 | Interface template for low level disc functions. 4 | 5 | Copyright (c) 2006 Michael "Chishm" Chisholm 6 | 7 | Redistribution and use in source and binary forms, with or without modification, 8 | are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation and/or 14 | other materials provided with the distribution. 15 | 3. The name of the author may not be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 19 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 20 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 23 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 26 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | 2006-07-11 - Chishm 29 | * Original release 30 | 31 | 2006-07-16 - Chishm 32 | * Renamed _CF_USE_DMA to _IO_USE_DMA 33 | * Renamed _CF_ALLOW_UNALIGNED to _IO_ALLOW_UNALIGNED 34 | */ 35 | 36 | #ifndef _DISC_IO_H 37 | #define _DISC_IO_H 38 | 39 | #include 40 | #define BYTES_PER_SECTOR 512 41 | 42 | //---------------------------------------------------------------------- 43 | // Customisable features 44 | 45 | // Use DMA to read the card, remove this line to use normal reads/writes 46 | // #define _IO_USE_DMA 47 | 48 | // Allow buffers not alligned to 16 bits when reading files. 49 | // Note that this will slow down access speed, so only use if you have to. 50 | // It is also incompatible with DMA 51 | #define _IO_ALLOW_UNALIGNED 52 | 53 | #if defined _IO_USE_DMA && defined _IO_ALLOW_UNALIGNED 54 | #error "You can't use both DMA and unaligned memory" 55 | #endif 56 | 57 | #define FEATURE_MEDIUM_CANREAD 0x00000001 58 | #define FEATURE_MEDIUM_CANWRITE 0x00000002 59 | #define FEATURE_SLOT_GBA 0x00000010 60 | #define FEATURE_SLOT_NDS 0x00000020 61 | 62 | typedef bool (* FN_MEDIUM_STARTUP)(void) ; 63 | typedef bool (* FN_MEDIUM_ISINSERTED)(void) ; 64 | typedef bool (* FN_MEDIUM_READSECTORS)(u32 sector, u32 numSectors, void* buffer) ; 65 | typedef bool (* FN_MEDIUM_WRITESECTORS)(u32 sector, u32 numSectors, const void* buffer) ; 66 | typedef bool (* FN_MEDIUM_CLEARSTATUS)(void) ; 67 | typedef bool (* FN_MEDIUM_SHUTDOWN)(void) ; 68 | 69 | struct IO_INTERFACE_STRUCT { 70 | unsigned long ioType ; 71 | unsigned long features ; 72 | FN_MEDIUM_STARTUP fn_startup ; 73 | FN_MEDIUM_ISINSERTED fn_isInserted ; 74 | FN_MEDIUM_READSECTORS fn_readSectors ; 75 | FN_MEDIUM_WRITESECTORS fn_writeSectors ; 76 | FN_MEDIUM_CLEARSTATUS fn_clearStatus ; 77 | FN_MEDIUM_SHUTDOWN fn_shutdown ; 78 | } ; 79 | 80 | typedef struct IO_INTERFACE_STRUCT IO_INTERFACE ; 81 | 82 | #endif // define _DISC_IO_H 83 | -------------------------------------------------------------------------------- /ndsbootloader/source/fat.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | fat.h 3 | 4 | NDS MP 5 | GBAMP NDS Firmware Hack Version 2.12 6 | An NDS aware firmware patch for the GBA Movie Player. 7 | By Michael Chisholm (Chishm) 8 | 9 | Filesystem code based on GBAMP_CF.c by Chishm (me). 10 | 11 | License: 12 | Copyright (C) 2005 Michael "Chishm" Chisholm 13 | 14 | This program is free software; you can redistribute it and/or 15 | modify it under the terms of the GNU General Public License 16 | as published by the Free Software Foundation; either version 2 17 | of the License, or (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with this program; if not, write to the Free Software 26 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 27 | 28 | If you use this code, please give due credit and email me about your 29 | project at chishm@hotmail.com 30 | ------------------------------------------------------------------*/ 31 | 32 | #ifndef FAT_H 33 | #define FAT_H 34 | 35 | #include 36 | 37 | #define CLUSTER_FREE 0x00000000 38 | #define CLUSTER_EOF 0x0FFFFFFF 39 | #define CLUSTER_FIRST 0x00000002 40 | 41 | bool FAT_InitFiles (bool initCard); 42 | u32 getBootFileCluster (const char* bootName); 43 | u32 fileRead (char* buffer, u32 cluster, u32 startOffset, u32 length); 44 | u32 FAT_ClustToSect (u32 cluster); 45 | 46 | #endif // FAT_H 47 | -------------------------------------------------------------------------------- /ndsbootloader/source/io_dldi.h: -------------------------------------------------------------------------------- 1 | /* 2 | io_dldi.h 3 | 4 | Reserved space for post-compilation adding of an extra driver 5 | 6 | Copyright (c) 2006 Michael "Chishm" Chisholm 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | 1. Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. 13 | 2. Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation and/or 15 | other materials provided with the distribution. 16 | 3. The name of the author may not be used to endorse or promote products derived 17 | from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 20 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 21 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE 22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 24 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 27 | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | 2006-12-22 - Chishm 30 | * Original release 31 | */ 32 | 33 | #ifndef IO_DLDI_H 34 | #define IO_DLDI_H 35 | 36 | // 'DLDD' 37 | #define DEVICE_TYPE_DLDD 0x49444C44 38 | 39 | #include "disc_io.h" 40 | 41 | // export interface 42 | extern IO_INTERFACE _io_dldi ; 43 | 44 | #endif // define IO_DLDI_H 45 | -------------------------------------------------------------------------------- /ndsbootloader/source/io_dldi.s: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------- 2 | 3 | Copyright (C) 2005 Michael "Chishm" Chisholm 4 | 5 | This program is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU General Public License 7 | as published by the Free Software Foundation; either version 2 8 | of the License, or (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program; if not, write to the Free Software 17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | 19 | If you use this code, please give due credit and email me about your 20 | project at chishm@hotmail.com 21 | ------------------------------------------------------------------*/ 22 | 23 | @--------------------------------------------------------------------------------- 24 | .align 4 25 | .arm 26 | .global _dldi_start 27 | .global _io_dldi 28 | @--------------------------------------------------------------------------------- 29 | .equ FEATURE_MEDIUM_CANREAD, 0x00000001 30 | .equ FEATURE_MEDIUM_CANWRITE, 0x00000002 31 | .equ FEATURE_SLOT_GBA, 0x00000010 32 | .equ FEATURE_SLOT_NDS, 0x00000020 33 | 34 | 35 | _dldi_start: 36 | #ifndef NO_DLDI 37 | 38 | @--------------------------------------------------------------------------------- 39 | @ Driver patch file standard header -- 32 bytes 40 | #ifdef STANDARD_DLDI 41 | .word 0xBF8DA5ED @ Magic number to identify this region 42 | #else 43 | .word 0xBF8DA5EE @ Magic number to identify this region 44 | #endif 45 | .asciz " Chishm" @ Identifying Magic string (8 bytes with null terminator) 46 | .byte 0x01 @ Version number 47 | .byte 0x0e @ 16KiB @ Log [base-2] of the size of this driver in bytes. 48 | .byte 0x00 @ Sections to fix 49 | .byte 0x0e @ 16KiB @ Log [base-2] of the allocated space in bytes. 50 | 51 | @--------------------------------------------------------------------------------- 52 | @ Text identifier - can be anything up to 47 chars + terminating null -- 32 bytes 53 | .align 4 54 | .asciz "Loader (No interface)" 55 | 56 | @--------------------------------------------------------------------------------- 57 | @ Offsets to important sections within the data -- 32 bytes 58 | .align 6 59 | .word _dldi_start @ data start 60 | .word _dldi_end @ data end 61 | .word 0x00000000 @ Interworking glue start -- Needs address fixing 62 | .word 0x00000000 @ Interworking glue end 63 | .word 0x00000000 @ GOT start -- Needs address fixing 64 | .word 0x00000000 @ GOT end 65 | .word 0x00000000 @ bss start -- Needs setting to zero 66 | .word 0x00000000 @ bss end 67 | @--------------------------------------------------------------------------------- 68 | @ IO_INTERFACE data -- 32 bytes 69 | _io_dldi: 70 | .ascii "DLDI" @ ioType 71 | .word 0x00000000 @ Features 72 | .word _DLDI_startup @ 73 | .word _DLDI_isInserted @ 74 | .word _DLDI_readSectors @ Function pointers to standard device driver functions 75 | .word _DLDI_writeSectors @ 76 | .word _DLDI_clearStatus @ 77 | .word _DLDI_shutdown @ 78 | 79 | 80 | @--------------------------------------------------------------------------------- 81 | 82 | _DLDI_startup: 83 | _DLDI_isInserted: 84 | _DLDI_readSectors: 85 | _DLDI_writeSectors: 86 | _DLDI_clearStatus: 87 | _DLDI_shutdown: 88 | mov r0, #0x00 @ Return false for every function 89 | bx lr 90 | 91 | 92 | 93 | @--------------------------------------------------------------------------------- 94 | .align 95 | .pool 96 | 97 | .space (_dldi_start + 16384) - . @ Fill to 16KiB 98 | 99 | _dldi_end: 100 | .end 101 | @--------------------------------------------------------------------------------- 102 | #else 103 | @--------------------------------------------------------------------------------- 104 | @ IO_INTERFACE data -- 32 bytes 105 | _io_dldi: 106 | .ascii "DLDI" @ ioType 107 | .word 0x00000000 @ Features 108 | .word _DLDI_startup @ 109 | .word _DLDI_isInserted @ 110 | .word _DLDI_readSectors @ Function pointers to standard device driver functions 111 | .word _DLDI_writeSectors @ 112 | .word _DLDI_clearStatus @ 113 | .word _DLDI_shutdown @ 114 | 115 | _DLDI_startup: 116 | _DLDI_isInserted: 117 | _DLDI_readSectors: 118 | _DLDI_writeSectors: 119 | _DLDI_clearStatus: 120 | _DLDI_shutdown: 121 | mov r0, #0x00 @ Return false for every function 122 | bx lr 123 | 124 | 125 | #endif 126 | -------------------------------------------------------------------------------- /ndsbootloader/source/tonccpy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "tonccpy.h" 3 | //# tonccpy.c 4 | 5 | //! VRAM-safe cpy. 6 | /*! This version mimics memcpy in functionality, with 7 | the benefit of working for VRAM as well. It is also 8 | slightly faster than the original memcpy, but faster 9 | implementations can be made. 10 | \param dst Destination pointer. 11 | \param src Source pointer. 12 | \param size Fill-length in bytes. 13 | \note The pointers and size need not be word-aligned. 14 | */ 15 | void tonccpy(void *dst, const void *src, uint size) { 16 | 17 | if(size==0 || dst==NULL || src==NULL) { return; } 18 | 19 | uint count; 20 | u16 *dst16; // hword destination 21 | u8 *src8; // byte source 22 | 23 | // Ideal case: copy by 4x words. Leaves tail for later. 24 | if( ((u32)src|(u32)dst)%4==0 && size>=4) { 25 | u32 *src32= (u32*)src, *dst32= (u32*)dst; 26 | 27 | count= size/4; 28 | uint tmp= count&3; 29 | count /= 4; 30 | 31 | // Duff's Device, good friend! 32 | // Added fall through attribute to silance the compiler about this. ;) 33 | switch(tmp) { 34 | do { *dst32++ = *src32++; // fallthrough 35 | case 3: *dst32++ = *src32++; // fallthrough 36 | case 2: *dst32++ = *src32++; // fallthrough 37 | case 1: *dst32++ = *src32++; // fallthrough 38 | case 0: ;} while(count--); // fallthrough 39 | } 40 | 41 | // Check for tail 42 | size &= 3; 43 | if(size == 0) { return; } 44 | src8= (u8*)src32; 45 | dst16= (u16*)dst32; 46 | } else { 47 | // Unaligned. 48 | uint dstOfs= (u32)dst&1; 49 | src8= (u8*)src; 50 | dst16= (u16*)(dst-dstOfs); 51 | 52 | // Head: 1 byte. 53 | if(dstOfs != 0) { 54 | *dst16= (*dst16 & 0xFF) | *src8++<<8; 55 | dst16++; 56 | if(--size==0) { return; } 57 | } 58 | } 59 | 60 | // Unaligned main: copy by 2x byte. 61 | count= size/2; 62 | while(count--) { 63 | *dst16++ = src8[0] | src8[1]<<8; 64 | src8 += 2; 65 | } 66 | 67 | // Tail: 1 byte. 68 | if(size&1) { *dst16= (*dst16 &~ 0xFF) | *src8; } 69 | } 70 | //# toncset.c 71 | 72 | //! VRAM-safe memset, internal routine. 73 | /*! This version mimics memset in functionality, with 74 | the benefit of working for VRAM as well. It is also 75 | slightly faster than the original memset. 76 | \param dst Destination pointer. 77 | \param fill Word to fill with. 78 | \param size Fill-length in bytes. 79 | \note The \a dst pointer and \a size need not be 80 | word-aligned. In the case of unaligned fills, \a fill 81 | will be masked off to match the situation. 82 | */ 83 | void __toncset(void *dst, u32 fill, uint size) { 84 | if(size==0 || dst==NULL) { return; } 85 | 86 | uint left= (u32)dst&3; 87 | u32 *dst32= (u32*)(dst-left); 88 | u32 count, mask; 89 | 90 | // Unaligned head. 91 | if(left != 0) { 92 | // Adjust for very small stint. 93 | if(left+size<4) { 94 | mask= BIT_MASK(size*8)<<(left*8); 95 | *dst32= (*dst32 &~ mask) | (fill & mask); 96 | return; 97 | } 98 | 99 | mask= BIT_MASK(left*8); 100 | *dst32= (*dst32 & mask) | (fill&~mask); 101 | dst32++; 102 | size -= 4-left; 103 | } 104 | 105 | // Main stint. 106 | count= size/4; 107 | uint tmp= count&3; 108 | count /= 4; 109 | 110 | // Added fall through attribute to silance the compiler about this. ;) 111 | switch(tmp) { 112 | do { *dst32++ = fill; // fallthrough 113 | case 3: *dst32++ = fill; // fallthrough 114 | case 2: *dst32++ = fill; // fallthrough 115 | case 1: *dst32++ = fill; // fallthrough 116 | case 0: ;} while(count--); // fallthrough 117 | } 118 | 119 | // Tail 120 | size &= 3; 121 | if(size) { 122 | mask= BIT_MASK(size*8); 123 | *dst32= (*dst32 &~ mask) | (fill & mask); 124 | } 125 | } 126 | 127 | -------------------------------------------------------------------------------- /ndsbootloader/source/tonccpy.h: -------------------------------------------------------------------------------- 1 | //# Stuff you may not have yet. 2 | 3 | #ifndef TONCCPY_H 4 | #define TONCCPY_H 5 | 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | #include 12 | 13 | typedef unsigned int uint; 14 | #define BIT_MASK(len) ( (1<<(len))-1 ) 15 | static inline u32 quad8(u16 x) { x |= x<<8; return x | x<<16; } 16 | 17 | 18 | //# Declarations and inlines. 19 | 20 | void tonccpy(void *dst, const void *src, uint size); 21 | 22 | void __toncset(void *dst, u32 fill, uint size); 23 | static inline void toncset(void *dst, u8 src, uint size); 24 | static inline void toncset16(void *dst, u16 src, uint size); 25 | static inline void toncset32(void *dst, u32 src, uint size); 26 | 27 | 28 | //! VRAM-safe memset, byte version. Size in bytes. 29 | static inline void toncset(void *dst, u8 src, uint size) 30 | { __toncset(dst, quad8(src), size); } 31 | 32 | //! VRAM-safe memset, halfword version. Size in hwords. 33 | static inline void toncset16(void *dst, u16 src, uint size) 34 | { __toncset(dst, src|src<<16, size*2); } 35 | 36 | //! VRAM-safe memset, word version. Size in words. 37 | static inline void toncset32(void *dst, u32 src, uint size) 38 | { __toncset(dst, src, size*4); } 39 | 40 | #ifdef __cplusplus 41 | } 42 | #endif 43 | #endif 44 | --------------------------------------------------------------------------------