Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

NTRLDR 3DS: Difference between revisions

From GameBrew
No edit summary
m (Text replacement - "Category:Other 3DS homebrew applications" to "")
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox-3DS-Homebrews
{{Infobox 3DS Homebrews
| title = NTRLDR
|title=NTRLDR
| image = https://dlhb.gamebrew.org/3dshomebrew/NTRLDR.jpg|250px
|image=Ntrldr2.png
| type = System Tools
|description=DS firmware on the 3DS.
| version=Unknown
|author=dr1ft/UTP, compiled by zacchi4k
| lastupdated = 2018/03/07
|lastupdated=2019/01/17
| licence = Mixed
|type=Other Apps
| author = dr1ft
|version=2019
| website = https://gbatemp.net/threads/release-ntrldr-ds-firmware-on-the-3ds.497852/
|license=Mixed
| download = https://dlhb.gamebrew.org/3dshomebrew/NTRLDR.rar
|download=https://dlhb.gamebrew.org/3dshomebrews/ntrldr.7z
| source =
|website=https://gbatemp.net/threads/release-ntrldr-ds-firmware-on-the-3ds.497852/post-8239817
|source=https://github.com/zacchi4k/ntrldr
}}
}}
<youtube>izljcyvozig</youtube>
NTRLDR is a homebrew that sets up NVRAM and chainloads firmware.nds on the 3DS.


Hello!
It patches the NVRAM to make it be seen as valid by NDS firmware and bootstraps firmware.nds from the root of the filesystem. If it detects that the system is running in TWL mode, it will (try) to switch into NTR mode before loading. This is more of a novelty and it cannot boot NDS cartriges (you can read some of the technial details [[NTRLDR_3DS#User guide|below]]).
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 <span style="text-decoration: line-through">be in the root of the partition</span> '''/_nds/ntrldr'''
'''Note:''' Do not use it on iQue NDS. Also not recommended to use it on NDS and DSi system, as it directly writes to flash/NVRAM which can brick your console.  


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). <span style="text-decoration: underline">It will almost certainly brick an iQue NDS.
==Installation==
</span>
'''Note:''' You will need to obtain your own firmware.nds in order to run this application.
<span style="font-size: 22px"><span style="color: #ff0000"><span style="text-decoration: underline">'''''YOU CANNOT BOOT NDS CARTRIDGES WITH THIS'''''</span></span></span>


Here's a tiny little demonstration:
Put ntrldr.nds to the nds folder of your SD card.


<div class="iframe">
Place firmware.nds to /_nds/ntrldr/ and run it via [[TWiLight_Menu%2B%2B|TWiLight Menu++]].


<div id="player">
==User guide==
===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 to NTR mode switching===
The NDS firmware does not know how to deal with the extra features provided by TWL mode (obviously).


</div>
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 [https://github.com/strdr1ft/ntrldr/blob/master/bootloader/source/boot.c#L414 here]) so that the firmware can understand the touch screen.
<div class="player-unavailable">


= An error occurred. =
The TSC values is found by going through [https://github.com/ahezard/nds-bootstrap/blob/f2c30c9aaa03fa0a33a1177fcb62f3eb462ca63e/arm7/source/main.c this code] and trying different combinations of values until finding the correct ones.


<div class="submessage">
==Compatibility==
Tested by the author under an NTR-mode flashcart (CycloDS iEvolution) and under TWL-mode nds-hb-menu (3DS SD). Also tested on N3DS.


Unable to execute JavaScript.
It is warned not to use it on iQue NDS, iQue ones have a differently sized NVRAM so writing to the same offsets will write in the middle of a bunch of code and destroy the firmware.


</div>
==Credits==
Thanks to:
* devkitPro Team (toolchain, libraries, .nds loader code).
* Martin Korth (GBATEK).
* Loopy/olimar (created firmware.nds).
* Everyone in the NDS and 3DS scenes.


</div>
==External links==
 
* GitHub - https://github.com/strdr1ft/ntrldr
</div>
* GitHub - https://github.com/zacchi4k/ntrldr
 
* GBAtemp - https://gbatemp.net/threads/release-ntrldr-ds-firmware-on-the-3ds.497852
 
 
<div class="ToggleTriggerAnchor bbCodeSpoilerContainer">
 
<span>Spoiler: <span class="SpoilerTitle">Technical details</span></span>
<div class="SpoilerTarget bbCodeSpoilerText">
 
'''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-&gt;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 [https://github.com/strdr1ft/ntrldr/blob/master/bootloader/source/boot.c#L414 here]) so that the firmware can understand the touch screen. I found the TSC values by going through [https://github.com/ahezard/nds-bootstrap/blob/f2c30c9aaa03fa0a33a1177fcb62f3eb462ca63e/arm7/source/main.c this code] and trying different combinations of values until I found the right ones.
 
</div>
 
</div>
 
'''''<span style="text-decoration: underline">DOWNLOAD</span>''''': 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.
<div class="messageTextEndMarker">
 
 
</div>

Latest revision as of 04:22, 6 Mayıs 2024

NTRLDR
Ntrldr2.png
General
Authordr1ft/UTP, compiled by zacchi4k
TypeOther Apps
Version2019
LicenseMixed
Last Updated2019/01/17
Links
Download
Website
Source

NTRLDR is a homebrew that sets up NVRAM and chainloads firmware.nds on the 3DS.

It patches the NVRAM to make it be seen as valid by NDS firmware and bootstraps firmware.nds from the root of the filesystem. If it detects that the system is running in TWL mode, it will (try) to switch into NTR mode before loading. This is more of a novelty and it cannot boot NDS cartriges (you can read some of the technial details below).

Note: Do not use it on iQue NDS. Also not recommended to use it on NDS and DSi system, as it directly writes to flash/NVRAM which can brick your console.

Installation

Note: You will need to obtain your own firmware.nds in order to run this application.

Put ntrldr.nds to the nds folder of your SD card.

Place firmware.nds to /_nds/ntrldr/ and run it via TWiLight Menu++.

User guide

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 to 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.

The TSC values is found by going through this code and trying different combinations of values until finding the correct ones.

Compatibility

Tested by the author under an NTR-mode flashcart (CycloDS iEvolution) and under TWL-mode nds-hb-menu (3DS SD). Also tested on N3DS.

It is warned not to use it on iQue NDS, iQue ones have a differently sized NVRAM so writing to the same offsets will write in the middle of a bunch of code and destroy the firmware.

Credits

Thanks to:

  • devkitPro Team (toolchain, libraries, .nds loader code).
  • Martin Korth (GBATEK).
  • Loopy/olimar (created firmware.nds).
  • Everyone in the NDS and 3DS scenes.

External links

Advertising: