Hacking NTRCFW 3.4 Preview1(Support video output on New 3DS)

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,315
Trophies
4
Location
Space
XP
13,893
Country
Norway
Hmm, I seem to have trouble with this too.

I have my Windows Firewall disabled (running Windows 10) and I type in the IP/port given in FTP-3ds, using the latest NTR and bootntr.cia in aureinand with the 10.2 NTR firmware.bin from FIRMS.7z

I launch NTR Debugger and Viewer as admin and then I type the connect('3dsip',port) and remoteplay() functions after enabling NTR Debug, but it doesn't seem to work properly (the syntax is correct, but it won't let me in)

Incidentally, trying to connect() while FTP-3ds is running seems to work just moments after sending the command, but remoteplay() doesn't work. Does this mean that NTR CFW itself is failing to host the server properly, or am I doing something wrong?

Here's the debugger log:

//This is where I hosted with FTP-3DS, NTR Debug Enabled
> connect('[redacted]', 5000)
null
Server connected.
Server disconnected.

//This is where I was sitting on my home menu, NTR Debug Enabled
> connect('[redacted]', 5000)
No connection could be made because the target machine actively refused it [redacted]:5000
at System.Net.Sockets.TcpClient.Connect(String hostname, Int32 port)
at ntrclient.NtrClient.connectToServer()
at ntrclient.ScriptHelper.connect(String host, Int32 port)
at Microsoft.Scripting.Interpreter.ActionCallInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at ntrclient.CmdWindow.runCmd(String cmd)
> remoteplay()
Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at ntrclient.NtrClient.sendPacket(UInt32 type, UInt32 cmd, UInt32[] args, UInt32 dataLen)
at ntrclient.NtrClient.sendEmptyPacket(UInt32 cmd, UInt32 arg0, UInt32 arg1, UInt32 arg2)
at ntrclient.ScriptHelper.remoteplay()
at Microsoft.Scripting.Interpreter.ActionCallInstruction`1.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at ntrclient.CmdWindow.runCmd(String cmd)
Wrong port. You should be using 8000.

I seem to be having issues with this. When I run the remoteplay command it fails.

Here's the console output:

Code:
NTR debugger by cell9

import sys;sys.path.append('.\python\Lib')
null
for n in [n for n in dir(nc) if not n.startswith('')]: globals()[n] = getattr(nc,n)

null
Commands available:
repr([n for n in dir(nc) if not n.startswith('')])
['attachprocess', 'bpadd', 'bpdis', 'bpena', 'connect', 'data', 'disconnect', 'listprocess', 'listthread', 'memlayout', 'queryhandle', 'reload', 'remoteplay', 'resume', 'sayhello', 'sendfile', 'write']
connect('192.168.1.52', 8000)
null
Server connected.
remoteplay()
null
Will be disconnected in 10 seconds to enhance performance.
cpu was locked on 804MHz, L2 Enabled
starting remoteplay...
buf: 07001000, size: 00022000
remotePC: 001231d0
disconnect()
null
Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall.
Server disconnected.

No idea what it means but streaming doesn't work.
That looks normal. It's the exact same output I was getting when it was working. You ran the viewer before starting remoteplay() right?

Can somebody make a how-to for dummy? I'm stuck at putting the port and setting the fakeproxy (?).
Port is 8000, FakeProxy isn't needed unless you're connecting the 3DS to a hotspot with no internet access, from what I could gather from the readme PDF, it's needed to prevent the 3DS from automatically disconnecting from such networks when it doesn't find a valid internet connection.

Also how is everyone else getting these such good fps but I get like 5-7
Depends on the game, and the quality of your wifi signal/wifi saturation by other clients. I got around 7-12 FPS in 3D games. Boxboy was a stable-ish 60 FPS though. Look at the output in the console, quality should be 90%+ if your wifi is good (according to the PDF readme), low quality means a lot of dropped frames and you will get a lower FPS. If quality is already 90%+ then you are getting the most out of it that you can with that game.
 
Last edited by The Real Jdbye,

TeconMoon

Well-Known Member
Member
Joined
Aug 7, 2007
Messages
749
Trophies
1
XP
2,614
Country
United States
Wow very cool! The top screen is great, the bottom screen isn't but this is a great proof of concept. Could even be used for streaming without a capture board if you routed the audio through a line in and delayed the audio to compensate for the video delay. Can't wait to see where this goes :D
 

CrispyYoshi

Well-Known Member
Member
Joined
Mar 20, 2010
Messages
1,542
Trophies
1
XP
1,145
Country
United States
Wrong port. You should be using 8000.


That looks normal. It's the exact same output I was getting when it was working. You ran the viewer before starting remoteplay() right?


Port is 8000, FakeProxy isn't needed unless you're connecting the 3DS to a hotspot with no internet access, from what I could gather from the readme PDF, it's needed to prevent the 3DS from automatically disconnecting from such networks when it doesn't find a valid internet connection.


Depends on the game, and the quality of your wifi signal/wifi saturation by other clients. I got around 7-12 FPS in 3D games. Boxboy was a stable-ish 60 FPS though. Look at the output in the console, quality should be 90%+ if your wifi is good (according to the PDF readme), low quality means a lot of dropped frames and you will get a lower FPS. If quality is already 90%+ then you are getting the most out of it that you can with that game.
HOLY MOLY that fixed my problem, thank you! Working perfectly, I'll have to test this more when I'm not using a crappy dorm internet.
 

The Real Jdbye

*is birb*
Member
Joined
Mar 17, 2010
Messages
23,315
Trophies
4
Location
Space
XP
13,893
Country
Norway
I don't want to use an old firmware if it can be helped, I was planning on attempting a port.
Using an old firmware.bin won't make a difference to anything else, it's only an issue when new firmware updates have changes that make them incompatible with old FIRM. ntr.bin which is the component that needs to be updated for newer FIRM is closed source, so there's not much anyone can do about it until cell9 adds support.
 

gudenau

Largely ignored
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,398
Country
United States
Using an old firmware.bin won't make a difference to anything else, it's only an issue when new firmware updates have changes that make them incompatible with old FIRM. ntr.bin which is the component that needs to be updated for newer FIRM is closed source, so there's not much anyone can do about it until cell9 adds support.
If I recall correctly ntr.bin is just a binary blob that gets loaded into the home menu's process, marked as RWX and executed. Should be fairly easy to update, as things go at least. Maybe I'll end up knowing how it works, making my own version. We will see.
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,431
Trophies
3
Age
36
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
6,800
Country
United States
Ok I just discovered that video streaming for the Pokemon games do work. You just have to have the game connect to the internet. Then the video stream comes back. I don't know why this is, but it resolves black screen issue with Pokemon Alpha Sapphire. I assume this fix applies to the other games to. Ocarina of Time doesn't have internet features....So I can't get that one to stream. But hey the pokemon games work now. :P
 

Apache Thunder

I have cameras in your head!
Member
Joined
Oct 7, 2007
Messages
4,431
Trophies
3
Age
36
Location
Levelland, Texas
Website
www.mariopc.co.nr
XP
6,800
Country
United States
I did try using a USB Wifi adapter in adhoc mode via an app like Connectify. The performace was notably worse despite being less then 2 feet away from my 3DS. I quickly switched back to having my 3DS connect to the router in the other room. It gets a little choppy, but looks to be good enough that once a more stable release comes out, I may still seen an improvement in performance in the next release. It looks very promising.

I hope a "proper" method of screen selection is implemented. Sure I can set scaling of bottom screen to 0 for example to only stream top screen. But I feel like NTRViewer is still streaming both screens despite one screen being sized to zero, so no performance benefit to using the -b 0 setting.

I think having video streaming togglable in the NTR menu on 3DS would be best. It's kinda of clunky trying to do it via NTR Debugger and the client exe. Why not enable "remoteplay" via a menu option on the 3DS? Seems like a better solution. Ability to display current IP would help a lot too. Though NTRViewer seems able to find the 3DS automatically so if remoteplay can be toggled from the 3DS instead, this will become much more user friendly.

Also, BootNTR cia hangs at "patching svc check" on my 9.2 emunand. I don't know why this happens. It's true 9.2 too since Aureinand is configured to use 9.0 FIRM with my 9.2 emunand. So it's practically the same as if it was 9.2 sysnand.

(I'm using Arm9LoaderHax by the way)

Has anyone gotten this release to work on 9.2 n3DS?
 
Last edited by Apache Thunder,

pdapanda

Well-Known Member
Member
Joined
Nov 19, 2014
Messages
730
Trophies
0
Age
32
XP
1,161
Country
Switzerland
It is already mentioned in the PDF, some games will disconnect wifi before booting automately,
to avoid this, imput write(0x0105AE4, (0x70, 0x47), pid=0x1a) before open your game.
(with this patch, you might have trouble with reconnecting to the router)
 
  • Like
Reactions: keyra

NekoMichi

Retro Collector
Member
Joined
Jun 4, 2015
Messages
1,441
Trophies
1
Location
Minus World
Website
www.youtube.com
XP
2,982
Country
I discovered something about the Pokémon games - The 3DS will stay connected to the router when you launch something like Pokémon X, but as soon as you hit Continue, the streaming stops working. At this point, my 3DS also disappeared from the router's "connected devices" list, however it reappears and streaming continues when I return to the Home Menu. I'm presuming that since Pokémon has a near-range console-to-console wireless feature, the 3DS automatically disconnects from any routers during gameplay and reconnects when gameplay ends. This might be a problem for streaming Pokémon games.

*reads previous posts*
Never mind, looks like it was already discovered...
 
Last edited by NekoMichi,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    as to you
  • K3Nv2 @ K3Nv2:
    How do you know if the night will be good when you're asleep
  • BakerMan @ BakerMan:
    because i didn't say i was asleep
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
    The Real Jdbye @ The Real Jdbye: never had that i don't think