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

PabloMK7

Red Yoshi! ^ω^
Developer
Joined
Feb 21, 2014
Messages
2,604
Trophies
2
Age
24
Location
Yoshi's Island
XP
5,032
Country
Spain
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..
If I were you I wouldn't bother, plgs are deprecated anyways and we had to deal with the hang issue since the very beginning.
 

zbash92

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

Fixing the hang turned out to be useful (at least in the case of just attaching to the game process, not necessarily with plugins), as the overlay callback is useful for timing screen captures so we don't have to keep doing memcmp in a loop (at least that's what I was doing anyway) to check for new frames. Maybe there's a GSPGPU event or something more reliable than NTR's existing memory pattern search (which is again, black magic to me..) but so far it's working.

The current latest version contains this change and will always inject to game process to use the overlay callback to time screen capture (it's quite hacky the way I implemented it and there seems to be new crashes, but when it works it works pretty well.) If overlay callback cannot be installed then the old method will be used.

By keeping loader mem usage to a minimum we can at least do this change and soft-reset in Pokemon games should still functions. (It used to be that attaching to a game process cause the next launch to hang regardless how it happens).


@Flanter

I've fixed a (rather serious) bug in my netcode that would cause busy loop on 3DS (instead of sleeping as intended). Hopefully there's no more random FPS drops.
 

flanter21

Active Member
Newcomer
Joined
Aug 21, 2017
Messages
35
Trophies
0
XP
543
Country
United Kingdom
@PabloMK7

Fixing the hang turned out to be useful (at least in the case of just attaching to the game process, not necessarily with plugins), as the overlay callback is useful for timing screen captures so we don't have to keep doing memcmp in a loop (at least that's what I was doing anyway) to check for new frames. Maybe there's a GSPGPU event or something more reliable than NTR's existing memory pattern search (which is again, black magic to me..) but so far it's working.

The current latest version contains this change and will always inject to game process to use the overlay callback to time screen capture (it's quite hacky the way I implemented it and there seems to be new crashes, but when it works it works pretty well.) If overlay callback cannot be installed then the old method will be used.

By keeping loader mem usage to a minimum we can at least do this change and soft-reset in Pokemon games should still functions. (It used to be that attaching to a game process cause the next launch to hang regardless how it happens).


@Flanter

I've fixed a (rather serious) bug in my netcode that would cause busy loop on 3DS (instead of sleeping as intended). Hopefully there's no more random FPS drops.
Sorry for the wait lol. I've actually done quite a bit of testing just today though, so I'll try list it clearly to make it easier to read.

  1. I haven't used it in a few days, but I think I am inclined to agree that the random stutters are mostly gone. It does happen though but for much shorter times and mostly at the start once or twice (in my testing) or if the system is really hot in which case its longer and more frequent.
  2. Maybe for the enable/disable loader mem it might be clearer to make it like loader mem = enabled/disabled. I am a native english speaker but it gets confusing when it says keep enabled for higher compatibility and says disable next to loader mem but thats just me.
  3. Another thing ig I was initially worried about was how hot the 3ds but according to the luma menu it only gets to around 33c max so I doubt its out of the design range. However, sometimes when its too hot, changing from 3 cores to 2 cores or even one leads to a significant performance boost. This does not happen every time but at least in my network environment it usually doesn't appear to cause fps drops. I really don't know but is it maybe thermal throttling? I feel it would be more extreme or noticable if it was but maybe the 3ds just doesn't run that hot idk i really don't know how it works on the 3ds.
  4. Random flickering on the right side of the bottom screen in chokistream. I have not been able to replicate this in ntrhrviewer or kitkatslim.
  5. When it goes into sleep and you reopen it it stays in streetpass mode. I understand that you don't know how the nfc patch works but I think it would be good to note this in a readme or on the bottom of the screen like the loadermem thing.
  6. The frameskip features have been the best addition to performance since you added multicore support. However, I noticed that a small number of games/apps seem to update the bottom screen even if nothing changes. Specifically snes9x and kirby triple deluxe (weirdly the issue isnt present in planet robobot). I doubt I'm not seeing properly or something, but that is of course a possibility.
  7. i think @PabloMK7 is right that mostly it won't be an issue if plg plugins don't work as most of them can easily become 3gx plugins however it seems the 3ds will crash when you use ntr-hr and the blank CTR-PF (0.7.4) plugin and open a game even when not streaming (it works without ntr loaded though). It might of course be ntr or lumas built in loader, but I'm inclined to believe it is the build of CTR-PF because I was able to launch pokereader and multipokemonframework (which is also CTR-PF 0.7.4) without a crash.
    1. the hang does still happen though after opening a different game even with 3gx plugins just like plg ones.
  8. I have been unable to test the nn (neural network?) features of ntrhrviewer since it crashes in wine and vmware and im using an m1 mac.
  9. I have haven't even had a slight issue with the menu. It's very stable now. Though, funnily enough the rosalina menu will only show on the stream if the hang has happened.
  10. Disconnecting and reconnecting when the framerate of one screen is 0 will make that screen black on the viewer application until it changes.
  11. Starting the stream while in snes9x means that you won't be able to see the screens running in the app unless you press the home but when you come back it'll freeze again. Closing out and relaunching causes the bottom screen to not display in any game or app. This issue occurs in chokistream but not kitkatslim.
  12. Also it seems that priorityfactor=0 to stop streaming one of the screens doesn't work anymore.
  13. While using mgba to play smbdx i noticed that there was this kind of wobble effect on lifts that didn't show up on the 3ds screen.



I don't use any special router settings or an exclusive hotspot just for ntr or anything so I really thank you that it is runs so smoothly even without any of that. It really is a game changer.

Edit: also the loadermem thing was actually really useful because when u disable it, it seems like the plugins just dont manage to load at all which is nifty because it would be annoying to go into a file browser and change things around to disable them manually so you can easily sr to your hearts content. Also using the frame count thing in pcalc and also trusty snes9x i see that have seen the latency stay very consistently at only 4 frames which is also a significant improvement.

edit 2:i added some more stuff above btw. But seriously my litmus test is super mario maker and ive been playing it on expert on the tv and i just cannot tell that theres lag and very very occasionally a stutter. and of course the 3ds resolution leaves stuff to be desired but eh what more could i ask. 3d games look quite good 2d games get jpeg'd to hell lol. i got a buttery smooth 60fps from the sm64 port and it seems possible to blj. none of this had noticable lag except in mario mario when it was hot and at 3 cores.
 
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
Thanks for the support!

@Flanter

2. Updated text

3. Could be network issues still. If there's no bug in the netcode then it's probably just interference like a microwave running.

4. This is likely due to bugs in my multi-threaded JPEG encoding code leading to last parts of the image being corrupt. It's quite likely annoying to fix (because multi-threading..)

(Edit: Made some attempts to fix this, should be better now it feels like)

5. 6.
No clue for now sorry..

7. Added a toggle to be CTRPF compatible at the small cost of not being able to use night shift and other overlay plugins (like the old FPS counter one that nobody uses I guess). This is needed because I implemented a hack that use the overlay callback hook to notify the encoding thread of new frames being available. That conflicts with CTRPF.

8. It's sort of working on Linux too (Edit: the NN vulkan thingy actually runs on an old Intel Iris iGPU under wine, albeit at less than 2 fps lmao)

10. 11. Should be fixed

12. Also fixed, I think

13. TODO I guess lol

Edit:

13. Now has a workaround in the Remote Play menu, seems fixed when using that option.

BTW: The loader mem option is not supposed to disable plugins. It changes where (or is it how?) memory are allocated so there will be less hang. It's game and plugin dependent if you will still get a hang or just crash outright when it's disabled.
 
Last edited by zbash92,

Geekfox

Member
Newcomer
Joined
Apr 25, 2022
Messages
5
Trophies
0
Age
41
Location
USA
XP
135
Country
United States
@zbash92
I'm amazed with the framerate and quality of this NTR streaming app! Thank you so much for your work on this!

I would like to use the Tab key to quickly move to the next/previous input fields in the UI, as well as using Alt+key presses to focus or toggle on the options. It would save a lot of seconds instead of using the mouse cursor. That's my only feature request.
 

nkTemp

Member
Newcomer
Joined
Jan 19, 2024
Messages
6
Trophies
0
Age
124
XP
13
Country
United States
Hey I'm having trouble using this for streaming 2 3dses at once. I know that the current build of snickerstream cant support patching NTR for the ntr_3_6.bin file so I followed instructions to patch the bin file internally with a hex editor to work with the 8002 port. But its still not working. as I'm getting the "could not connect to 3ds' message with snickerstream. Can someone give me instructions to have the most consistency booting up multiple 3dses with this update? Thank you.
Post automatically merged:

Hey I'm having trouble using this for streaming two 3dses at once. I know that the current build of snickerstream cant support patching NTR for the ntr_3_6.bin file so I followed instructions to patch the bin file internally with a hex editor to work with the 8002 port by changing the '1F 41' to '1F 42'. But its still not working. I'm getting the "could not connect to 3ds' message with snickerstream. Can someone give me instructions to have the most consistency booting up multiple 3dses with this update? Thank you.
 

zbash92

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

Welcome!

If you press X + Y after launching NTR, you'll open the NTR menu on 3DS, from there you can access the Remote Play menu where you can change the intended port of the viewer.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
Which CIA file are you using? In BootNTR do you see two 3.6 options? If so choose the bottom one. Otherwise you might not have the right file.
 
  • Like
Reactions: nkTemp

nkTemp

Member
Newcomer
Joined
Jan 19, 2024
Messages
6
Trophies
0
Age
124
XP
13
Country
United States
I'm using the latest build of NTR CFW 3.6.1and was using the 3.6 option but sure I'll try 3.6 HR
Post automatically merged:

Sorry I'm using this build 3.6 Modded 20240118-2 from xzn
 
Last edited by nkTemp,

queenbiscuit311

New Member
Newbie
Joined
Jan 7, 2024
Messages
2
Trophies
0
Age
18
XP
16
Country
United States
For some reason whenever I start a game with this cfw active i get a luma3ds Translation - Section exception. No matter what i do it always does it

Also the home screen streams at like 3 fps

edit: it would appear i was incorrect. it crashes on some games but some others work fine. so far ive tried kirby planet robobot, mario kart 7, kirby triple deluxe, pokemon y, captain toad, dark moon, and smash 3ds. only the last three worked
 
Last edited by queenbiscuit311,

zbash92

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

Are you using CTRPF plugins (including 3gx ones) by any chance? Some change I've made a while back made this version not work with those by default. If you press X + Y there's an option to change the behavior to make it work. (If this is causing problem I'll change the default behavior for future version)

For home menu streaming at 3 FPS, does it slow down you actual 3DS as well? Just wondering why that would happen..
 

Oso

Active Member
Newcomer
Joined
Apr 2, 2015
Messages
44
Trophies
0
Age
30
Location
France
XP
135
Country
France
Hello and thank you for all your hard work, it's great! I tried to stream the pokémon games but to get a video signal I absolutely have to connect to the internet in the game because the 3ds switches to streetpass mode in the background. Do I need to do anything in the options for it to work properly?

NFC patch disconnects my 3ds from the internet and i lost signal
 

lone_wolf323

Well-Known Member
Member
Joined
May 27, 2011
Messages
5,487
Trophies
2
XP
4,936
Country
Canada
Hello and thank you for all your hard work, it's great! I tried to stream the pokémon games but to get a video signal I absolutely have to connect to the internet in the game because the 3ds switches to streetpass mode in the background. Do I need to do anything in the options for it to work properly?

NFC patch disconnects my 3ds from the internet and i lost signal
the 3ds will switch to streetpass, thats normal. usually means you need a better wifi signal since its not staying connected to one
 

Oso

Active Member
Newcomer
Joined
Apr 2, 2015
Messages
44
Trophies
0
Age
30
Location
France
XP
135
Country
France
the 3ds will switch to streetpass, thats normal. usually means you need a better wifi signal since its not staying connected to one
my router is on my desk about 20 centimetres from the 3ds and I have an internet speed of 5Gb/s download and 1Gb/s upload, so I don't think that's the problem. Because all the pokémon games on 3ds with the old ntrviewer I had to patch something but I forgot so that the console's internet connection remains active once the game is launched.
 

flanter21

Active Member
Newcomer
Joined
Aug 21, 2017
Messages
35
Trophies
0
XP
543
Country
United Kingdom
Hello and thank you for all your hard work, it's great! I tried to stream the pokémon games but to get a video signal I absolutely have to connect to the internet in the game because the 3ds switches to streetpass mode in the background. Do I need to do anything in the options for it to work properly?

NFC patch disconnects my 3ds from the internet and i lost signal
use the nfc patch before opening the game.
 

zbash92

Well-Known Member
OP
Newcomer
Joined
Mar 2, 2022
Messages
46
Trophies
0
Age
32
Location
NB
XP
224
Country
Canada
Well I got all the features I wanted:

The viewer now has separate windows view mode.

The modded NTR now has sane compatible default. Really hope there's no more issue. (Still don't know how that person got 3 FPS in home menu though?)

Thanks for all the helps and testing \o/
 

StickyPuddingg

New Member
Newbie
Joined
Jan 22, 2024
Messages
1
Trophies
0
Age
18
XP
4
Country
United States
Incredible stuff, thank you for taking the time to work on this, ive already seen returning results. ALSO consider setting up a patreon! Im sure people would be happy to support you for your skills! Knowledge like yours is hard to come by in the 3DS community (these days)
 

zerofalcon

Well-Known Member
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,925
Country
Hello and thank you for all your hard work, it's great! I tried to stream the pokémon games but to get a video signal I absolutely have to connect to the internet in the game because the 3ds switches to streetpass mode in the background. Do I need to do anything in the options for it to work properly?

NFC patch disconnects my 3ds from the internet and i lost signal
You can use Luma's force connection to a specific (slot A B C) APN.

Thank you @zbash92 this is working great for me on windows (kitkatslim) and linux (cutentr). btw I tested using latest ntrview for Wii U but flickers and lags a lot while playing.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: @AncientBoi, https://youtu.be/N8pbnjvypQ0?feature=shared&t=958