Hacking [Rel] Improved (hopefully) NTR streamer for N3DS (XL/LL)

flanter21

Active Member
Newcomer
Joined
Aug 21, 2017
Messages
34
Trophies
0
XP
540
Country
United Kingdom
Some new things to note (also thank you wow it was already so good and it just keeps blowing me away)
* frame pacing definitely does seem noticeably better to me but i’m still definitely getting weird frame rates like 80fps in kirby triple deluxe, 45fps in ocarina of time and 110fps on home menu unless i set priority factor to 0 (thus only streaming one screen). Is this expected?
* for whatever reason it seems opening the browser causes a consistent crash
* switching from a game with an ntr plugin loaded (tested with oot3d cheat plugin and pcalc on omega ruby) to another title causes the infinite 3ds logo bug
* after streaming for a while opening ntr menu on kirby triple deluxe causes the game to freeze with music still playing but you can close and relaunch the game to make it work again although the streaming will then stop and not be able to be relaunched
* cannot reconnect after changing settings much more frequently
* svccreatethread and copyremotememory errors on launching ntr sometimes
* performance significantly degrading after some time (possibly because of heat? is it possible to change between 2 and 3 cores?)

quality of life improvements perhaps?
*add 3ds IP address in remote play menu
*make updating bootntrselector automatically overwrite old version of ntr3.6hr instead of having to manually delete 3ds/bootntrselector to make the new version extract
*have nfc patch built into ntr menu?
*add bootntrselector hr edition to universal-db (if you want i can put the request in with your permission but there’s a pretty easy form on their website if you would rather yourself) or put cia separately from zip in releases so a qr code can be scanned with fbi to install it
 
Last edited by flanter21,

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
@Flanter

1. How are you checking the frame rate? In case of Snickerstream for example the fps displayed is for both screens combined. (So if top screen is at 30 fps, bottom at 15, it will display 45.) Chokistream will display fps separately for each screen.

2. Will investigate crash with web browser (don't have 3DS with me so it will be a couple of days.)

3. NTR cheat plugin problem seems to happen with 3.6.1 as well from my testing a couple of days ago, haven't yet figured out why..

4. Do you mean opening the NTR menu causes the game to freeze sometimes? Unfortunately I don't really know how the rest of NTR function (for one I don't even know how NTR hooks the network packet send method, I just know that it works somehow. cell9 did magic lol). Maybe I'll find a fix for this if lucky..

5. Does the stream stop or just can't connect to 3DS to update settings? I've noticed that some games, (ones that need NFC patching etc.), seem to stop NTR from being able to be connected at all, it will keep on steaming though usually.

6. Not sure why for now..

7. I can add an option to the menu to change encoding cores for sure. It could also be bug in my netcode causing packet drops or wrong data being sent. Will have to check to make sure.

For your other suggestions:

1. Displaying IP address should be doable.

2. Changing BootNTRSelector should be easier than NTR itself hopefully lol

3. NFC patch option should be doable.

4. Didn't know FBI has a URL from QR code feature, will look into it. For universal-db should the title ID be changed so that it's separate from the existing BootNTRSelector?

Thank you for the detailed report as always! And sorry I can't really do anything for a couple of days until I get back to my 3DS ha ha.
 

flanter21

Active Member
Newcomer
Joined
Aug 21, 2017
Messages
34
Trophies
0
XP
540
Country
United Kingdom
hi @zbash92

1. The way I am checking the frame rate is using kitkat slim (which uses ntrviewer) as my main use case is displaying 3ds games on a larger display. I tried chokistream but there is a delay of several seconds before the stream is shown as opposed to less than 0.1 seconds with snickerstream or kitkat slim.

5. I am not really sure as all the clients i’ve tried will relaunch the viewer window and fail to connect so i’m not sure if it freezes or not. However, I must note that this is not exclusive to nfc games as i’ve been able to replicate it on all the different applications and games i’ve tried.

7. The reason I said I think it’s because of heat is because the reduced frame rate persists on rebooting the 3ds. I am not really sure the cause of the framerste drop but the 3ds does become slightly warm. It drops to around 10-20 fps but as you said there may be a net code issue.

4. FBI’s QR code feature is actually very easy to use. All you have to do is use any QR code generator and generate a QR code to the link of the CIA, which in this case would simply be the direct download link on the github releases page. As for universal-db, I actually do not know. But upon checking the github issues I see there are translations and forks of FBI which use the same titleid as the original so I assume it’s fine if you don’t change it.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
Fixed the easy stuff for now. Can't figure out how to do the qr code though. (Could just be my 3DS' camera being wonky)

Still some crashes and hangs unfortunately.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
@Fishaman P

Not at all unfortunately.

Iirc NTR always need New 3DS anyway for streaming. And I added a check so it only launches on New 3DS only, since the changes are all streaming related.

For O3DS apparently HzMod or ChirunoMod work.
 

flanter21

Active Member
Newcomer
Joined
Aug 21, 2017
Messages
34
Trophies
0
XP
540
Country
United Kingdom
@zbash92 haven't tried the updated version yet but I used this to create this qr code which always will lead to the latest BootNTRSelector-PabloMK7-Banner.cia

I've attached the QR code and it at least works for me. PS specifically it leads to https://github(dot)com/xzn/ntr-hr/releases/latest/download/BootNTRSelector-PabloMK7-Banner.cia
 

Attachments

  • qr-code.png
    qr-code.png
    12.4 KB · Views: 17

flanter21

Active Member
Newcomer
Joined
Aug 21, 2017
Messages
34
Trophies
0
XP
540
Country
United Kingdom
latest version is very very smooth. Sometimes I get a thing where the remoteplay menu disappears but if i just press a button it appears. It's like how the menu would close itself when the system was hot (or randomly idk, either way that doesn't happen anymore). I find sometimes QoS defaults to 0.500 idk what caused it other than it always happened when I used chokistream with its default settings including 26 QoS. None of it is bothersome though.

However, I do note that the NFC patch, when used within a game, seems to force you into StreetPass mode even after you exit it. Maybe you could disable the use of the NFC patch inside a title or try to force wifi??? (the luma function to do so doesn't work). Changing quality and number of encoding cores also leads to a crash most of the time.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
Thanks for the report! I think the crash when quality/core count are changed from the menu is fixed.

Don't know what's going on with Chokistream though, I don't have any issues with QoS settings??
For NFC patch, the requested features are things I don't really know how to implement, sorry.. (I more or less took the implementation from kit-kat-slim, which works pretty much identically to snickerstream, except it has auto-detection of patching address, if those viewers' NFC patches has the same problem then I'm very clueless about fixing it since the patch itself is quite black magic to me..)

Menu disappearing seems to happen (less frequently) in 3.6.1 as well, including game freezing when staying in menu for too long. To be frank I haven't even figured out how NTR stops the game when its menu is opened..

Fixed in update (2024-01-03)
 
Last edited by zbash92,

duncedoof

Member
Newcomer
Joined
Jan 12, 2024
Messages
6
Trophies
0
Age
21
XP
31
Country
Mexico
I've never used the regular NTR streamer before. What does the fresh install on this look like? (I'm on boot9strap and Luma3DS)
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
@duncedoof
It works the same as the regular BootNTRSelector by Nanquitas. You can find a guide here:
https://wiki.hacks.guide/wiki/3DS:Wireless_streaming

@Flanter
I've fixed the game hanging on launch after a plugin is loaded, at least for some plugins that I've tried. Others would still cause a hang and I suspect it's because the way those plugins are written.. (I'm hoping that there's no compatibility issues with the way I made the fix)

EDIT:

So apparently I didn't test it on enough plugins, as it happens many plugins would crash if the plugin code is not in sys region memory. However I don't know how to make the launching of next game not hang on logo when sys region memory is used from game processes..

(Revert the change for now so plugins will load again. Note that if you use a cheat plugin expect the next game launch to hang, so you will need to restart your 3DS instead)

EDIT 2:

Turns out I don't entirely know what I'm doing. Fixed another regression.. This time it's certain games freezing when exiting NTR menu.
 
Last edited by zbash92,

K0rbo

Active Member
Newcomer
Joined
Jan 17, 2022
Messages
42
Trophies
0
Age
16
XP
191
Country
United States
Great work! Haven't tried it yet, but it looks like it could finally rival capture cards!

Update: Wow. you have gone far beyond my expectations for NTR streaming. Upgrade that to "Outstanding work."
 
Last edited by K0rbo,
  • Like
Reactions: duncedoof

PabloMK7

Red Yoshi! ^ω^
Developer
Joined
Feb 21, 2014
Messages
2,604
Trophies
2
Age
24
Location
Yoshi's Island
XP
5,027
Country
Spain
This looks promising!
You could have pinged me up and I would have updated BootNTR Selector to include it! In fact this could be rebranded as NTR v3.7 and be shipped with BootNTR Selector, if that's good for you. (Calling it with a version bump will get more people's attention)
Post automatically merged:

3. NTR cheat plugin problem seems to happen with 3.6.1 as well from my testing a couple of days ago, haven't yet figured out why..
This is because of a kernel bug that happens when allocating more pages to a process in an unexpected way, there is no way to fix it without extensive kernel patches. In fact, 3GX plugins get around it by using the custom Luma3DS `svcMapProcessMemoryUnsafe` syscall.
 
Last edited by PabloMK7,

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
@PabloMK7
Can Luma3DS' improved svcMapProcessMemoryEx be used to map memory in another process in sys region? I couldn't figure out why but some plugins would crash unless the the plugin code is run from sys region.
And how would svcMapProcessMemoryEx be used to map exec code in general? It's all very confusing to me sorry ..
(Alternatively, I guess, is how to free/unmap the memory when game process exit without crashing/hanging anything. Does using improved svc calls let the cleanup happens automatically without issues? I know very little about kernel hax and couldn't figure out where to hook cleanup code, or what should I do with the memory that was mapped from)

For including the modded NTR, it's quite buggy still (last couple of releases have been fixing regressions). I'm very happy about the offer though, once we decide this is ready enough I guess we can do it?..
 

PabloMK7

Red Yoshi! ^ω^
Developer
Joined
Feb 21, 2014
Messages
2,604
Trophies
2
Age
24
Location
Yoshi's Island
XP
5,027
Country
Spain
@PabloMK7
Can Luma3DS' improved svcMapProcessMemoryEx be used to map memory in another process in sys region? I couldn't figure out why but some plugins would crash unless the the plugin code is run from sys region.
And how would svcMapProcessMemoryEx be used to map exec code in general? It's all very confusing to me sorry ..
(Alternatively, I guess, is how to free/unmap the memory when game process exit without crashing/hanging anything. Does using improved svc calls let the cleanup happens automatically without issues? I know very little about kernel hax and couldn't figure out where to hook cleanup code, or what should I do with the memory that was mapped from)

For including the modded NTR, it's quite buggy still (last couple of releases have been fixing regressions). I'm very happy about the offer though, once we decide this is ready enough I guess we can do it?..
svcMapProcessMemoryEx can only map existing memory into another process. You should use svcControlMemoryUnsafe to map/unmap new regions. I'm not sure about why some plugins crash if they are mapped in sys region, tbh, I'm only familiar with the new 3GX system, and the memory details were made by Nanquitas, so I'm not sure. I wonder if it's related to memory not being contiguous.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
Hmm what are the checks removed for svcControlMemoryUnsafe? It seems I can use svcControlMemoryEx to alloc memory in sys region, so I'll try that.

If you don't mind me pestering you:

What are the perm of memory mapped by svcMapProcessMemoryEx? Does it mirror the source memory permission and content? And how is it different from, say, svcCreateMemoryBlock? I was trying to figure this out yesterday and couldn't find an answer..

Edit:
I meant plugins would crash if the code is not in sys region. And like you've said code can only be allocated in sys region in unconventional manner, leading to hangs

Upon further checking it seems being in loader's memory is what's needed. Mem region doesn't matter..
 
Last edited by zbash92,

PabloMK7

Red Yoshi! ^ω^
Developer
Joined
Feb 21, 2014
Messages
2,604
Trophies
2
Age
24
Location
Yoshi's Island
XP
5,027
Country
Spain
Hmm what are the checks removed for svcControlMemoryUnsafe? It seems I can use svcControlMemoryEx to alloc memory in sys region, so I'll try that.

If you don't mind me pestering you:

What are the perm of memory mapped by svcMapProcessMemoryEx? Does it mirror the source memory permission and content? And how is it different from, say, svcCreateMemoryBlock? I was trying to figure this out yesterday and couldn't find an answer..

Edit:
I meant plugins would crash if the code is not in sys region. And like you've said code can only be allocated in sys region in unconventional manner, leading to hangs
I'm not sure about the details of the svc sorry, maybe looking at the Luma3DS source can help (I didn't make any of those).

iirc, svcmapprocessmemoryex just maps as rwx.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
Too much assembly for me lmao.

In any case it actually seems like mem region doesn't matter, just need to be in loader's memory somehow (so svcControlMemoryEx with isLoader == true). Doesn't help with hangs though. Looks like will just need to put up with it for now..
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto