Homebrew [RELEASE] NTRLDR - DS firmware on the 3DS

dr1ft

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2018
Messages
53
Trophies
0
Location
?????
Website
dr1ft.xyz
XP
245
Country
United States
Hello!
I've been very intrigued as to why the old firmware.nds file failed to load properly under the 3DS. After almost a week of research and experimentation, I took my first dive into writing homebrew as a means to solve this problem. It's not particularly useful, but I learned a lot and it's a neat little novelty.

I've tested NTRLDR heavily under an NTR-mode flashcart (CycloDS iEvolution) and under TWL-mode nds-hb-menu (3DS SD). It does not seem to run under TWLoader/nds-bootstrap. firmware.nds is expected to be in the root of the partition /_nds/ntrldr

I do not recommend running this on an NDS or DSi system. It probably won't hurt anything, but it directly writes to flash/NVRAM (which is dangerous) and there's no real reason to (unless you are using SudokuHax or something). It will almost certainly brick an iQue NDS.

YOU CANNOT BOOT NDS CARTRIDGES WITH THIS

Here's a tiny little demonstration:


NVRAM patching
The reason that firmware.nds traditionally fails on the 3DS is because for some reason NVRAM reports one of the bits in the flag bytes of user settings as a 1, when the DS firmware expects that bit to be a 0. We can write to NVRAM, but every time NTR mode is restarted this bit becomes a 1 again. As such, all we need to do to allow firmware.nds to boot is to flip that bit and correct the checksums in the user settings just prior to chainloading firmware.nds.

TWL->NTR mode switching
The NDS firmware does not know how to deal with the extra features provided by TWL mode (obviously). The DMA register REG_SCFG_ROM is set to 0x703 to keep the firmware from crashing (this seems to cause the system to disable several TWL features) and writes are made to the TSC to switch it into NDS compatibility mode (see here) so that the firmware can understand the touch screen. I found the TSC values by going through this code and trying different combinations of values until I found the right ones.

DOWNLOAD: https://github.com/strdr1ft/ntrldr
I can't supply firmware.nds, but it's not too hard to find if you're interested in trying this.
 
Last edited by dr1ft,
D

Deleted User

Guest
Hello!
I've been very intrigued as to why the old firmware.nds file failed to load properly under the 3DS. After almost a week of research and experimentation, I took my first dive into writing homebrew as a means to solve this problem. It's not particularly useful, but I learned a lot and it's a neat little novelty.

I've only tested NTRLDR on a flashcart on my CFW'd O3DS. I don't know if it works on TWLoader. If someone tests it and finds that it does, let me know.
firmware.nds is expected to be in the root of the partition.
Oh, and don't run this on DSi or NDS, and backup your NVRAM! I've played with it enough that I feel confident in its safety, but it has the potential to disable TWL mode on the 3DS and even worse on NDS and DSi!!

Here's a tiny little demonstration:


The reason that firmware.nds traditionally fails on the 3DS is because for some reason NVRAM reports one of the bits in the flag bytes of user settings as a 1, when the DS firmware expects that bit to be a 0. We can write to NVRAM, but every time NTR mode is restarted this bit becomes a 1 again. As such, all we need to do to allow firmware.nds to boot is to flip that bit and correct the checksums in the user settings just prior to chainloading firmware.nds.

NTRLDR: hxxps://mega.nz/#!KQhTEKaC!fSddkDujotraSc-lycJYu6VNbie_v6eXCGWQnq6aFQI (I can't post hyperlinks)
I can't supply firmware.nds, but it's not too hard to find if you're interested in trying this.

Liking the great work
 

Dante2405

Well-Known Member
Member
Joined
Jul 17, 2017
Messages
133
Trophies
0
Age
78
XP
785
Country
Australia
When in the homebrew, can we launch a DS game if it's in the slot?
Could it be launch as a .cia?

Great work!
 

dr1ft

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2018
Messages
53
Trophies
0
Location
?????
Website
dr1ft.xyz
XP
245
Country
United States
UPDATE: it loads perfectly from hb-menu installed as a CIA but I've had poor luck with getting nds-bootstrap to work on my 3DS in general
 

RocketRobz

Stylish TWiLight Hero
Developer
Joined
Oct 1, 2010
Messages
16,640
Trophies
3
Age
24
XP
21,099
Country
United States
UPDATE: it loads perfectly from hb-menu installed as a CIA but I've had poor luck with getting nds-bootstrap to work on my 3DS in general
It doesn't work from TWLoader, because it always uses nds-bootstrap to boot homebrew. Try running it from SRLoader.
 

dr1ft

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2018
Messages
53
Trophies
0
Location
?????
Website
dr1ft.xyz
XP
245
Country
United States
OK, it actually doesn't like being booted from hb-menu.
It boots but struggles with being in DSi mode .-.

Touch screen doesn't work, sound is messed up, and making any menu selections triggers a crash.
 
Last edited by dr1ft,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: @Wholesome, welcome