maziac / DeZogPlugin

Plugin to connect the CSpect emulator with DeZog.
MIT License
5 stars 1 forks source link

DeZog timeout when connecting to CSpect #3

Closed tomaz closed 3 years ago

tomaz commented 3 years ago

After upgrading to DeZog 2.0 and DeZogPlugin 2.0.0 I can no longer connect to CSpect (2.13.00) from VSCode. Also don't see any line mentioning plugin has started, which explains timeout, but am left clueless as to why exactly it doesn't work. I updated launch.json according to migration guide... Is there any way I can debug this?

maziac commented 3 years ago

After you start CSpect (like so): Bildschirmfoto 2021-01-05 um 09 45 54

you should see a line telling that the DeZog plugin was started: Bildschirmfoto 2021-01-05 um 09 46 07

If you can't see it the plugin has not started and (as you already mentioned) DeZog can't connect.

Please check that the plugin is really located in the CSpect root directory. Maybe you used a softlink and forgot to update the link.

tomaz commented 3 years ago

Thanks for quick reply! Install location is correct, tripple checked. I don't see any output whatsoever though in console though (not even CSpect start). But maybe that's how it works in Windows in general (PowerShell)

kborowinski commented 3 years ago

@tomaz On Windows you can't see the CSpect console output by default as CSpect starts new process. However you can use following trick to redirect the output to file:

image

tomaz commented 3 years ago

Thanks @kborowinski now I can see what the issue is - seems like for some reason port is already taken. Not sure why, but at least I have starting point for further debugging...

#CSpect Start
Next ROM enabled
Error loading ROM: Could not find file 'c:\Users\Tomaz\Documents\Projects\Retro\ZX\Tools\CSpect\enNextMf.rom'.
Dezog Plugin: v2.0.0.34763 started. DZRP v2.0.0.
Dezog Plugin: System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at DeZogPlugin.CSpectSocket.StartListening()
Joystick added: 0
Dezog Plugin: Terminated.
maziac commented 3 years ago

You can also specify a different port. But you need to do it in 2 places:

tomaz commented 3 years ago

Allright, changing port worked! Still not sure why 11000 was taken, it should be free, but then again, who knows... Thank you all for feedback! Closing this issue...