Connect to a PC

Discuss game and other programming topics not specifically covered in another forum

Moderator: Programming Moderators

User avatar
Maziac
Posts: 110
Joined: Sun Jul 09, 2017 5:56 am

Re: Connect to a PC

Postby Maziac » Mon Jan 06, 2020 6:54 pm

No, I'm not Chris Kirby ;-)

I did write it on Visual Studio on macos. But I guess the sources are very similar. You find it here: https://github.com/maziac/cspect-plugin-uart-socket
I think it should build on Windows as well.

Will try also on Windows myself, tomorrow.

User avatar
Maziac
Posts: 110
Joined: Sun Jul 09, 2017 5:56 am

Re: Connect to a PC

Postby Maziac » Mon Jan 06, 2020 8:30 pm

I tried the UARTLogger on macOS and added a few Console.WriteLines at Init, Write and Read.
Init gets called, Read and Write not.

I also tried to run the plugins on Windows (compiled on Windows) but I don't get any output there from both plugins.
Not even from Init. I started them from the command shell. I guess Console.WriteLine is going somewhere, but I don't know where.
So on Windows I don't know if the Read and Write gets called.

User avatar
Maziac
Posts: 110
Joined: Sun Jul 09, 2017 5:56 am

Re: Connect to a PC

Postby Maziac » Mon Jan 06, 2020 8:47 pm

Do you maybe have a Z80 test program (a new file) for me that writes (or reads) to the UART?
Just to double check that the problem is not at this end.

User avatar
SevenFFF
Posts: 565
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Connect to a PC

Postby SevenFFF » Mon Jan 06, 2020 9:25 pm

It seems like Read and Write only work when you supply -nextrom with -mmc pointing to an SD image file. I reported it to Mike.

I’ve been testing all my plugins with -nextrom, so I didn’t notice the problem until now.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins

User avatar
Maziac
Posts: 110
Joined: Sun Jul 09, 2017 5:56 am

Re: Connect to a PC

Postby Maziac » Mon Jan 06, 2020 9:40 pm

Still no success. Could you send the complete command line you use to start CSpect?

User avatar
SevenFFF
Posts: 565
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Connect to a PC

Postby SevenFFF » Mon Jan 06, 2020 9:45 pm

Code: Select all

C:\spec\CSpect2_12_1\CSpect.exe -w2 -zxnext -nextrom -exit -brk -tv -com="COM5:115200" -mmc=..\cspect-next-2gb.img
I'm using the -com argument because I have a real ESP plugged into COM5 via a USB adaptor. If you omit that, CSpect will emulate an ESP. UART logging should work either way.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins

User avatar
SevenFFF
Posts: 565
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Connect to a PC

Postby SevenFFF » Mon Jan 06, 2020 9:47 pm

Mike has reproduced the issue now.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins

User avatar
Maziac
Posts: 110
Joined: Sun Jul 09, 2017 5:56 am

Re: Connect to a PC

Postby Maziac » Mon Jan 06, 2020 9:57 pm

That's good.

With your command line I get a crash on macOS:

Code: Select all

mono CSpect.exe  -sound -w2 -zxnext -nextrom -exit -brk -tv -mmc=../cspect-next-2gb.img ../../asm/dbg-uart-if/dbg-uart-if.nex     
Next ROM enabled
UartSocket plugin started.
UartSocket: Waiting for a connection on port 11000 (localhost)...
UartSocket ports registered.
WARNING: The Carbon driver has not been ported to 64bits, and very few parts of Windows.Forms will work properly, or at all

=================================================================
	Native Crash Reporting
=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

=================================================================
	Native stacktrace:
=================================================================
	 (No frames) 


=================================================================
	Telemetry Dumper:
=================================================================
Pkilling 0x70000541d000 from 0x107ee5dc0
Pkilling 0x700004f8b000 from 0x107ee5dc0
Entering thread summarizer pause from 0x107ee5dc0
Finished thread summarizer pause from 0x107ee5dc0.

User avatar
SevenFFF
Posts: 565
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Connect to a PC

Postby SevenFFF » Mon Jan 06, 2020 10:58 pm

I'm not sure what causes that crash, as I've never used CSpect on anything but Windows yet. I may get a change to try it on linux in the next few days, but I have no MacOS machines.

It's unlikely to be related to Windows.Forms, despite what it says, because he avoids using Windows.Forms for anything apart from dialog box that shows when you hit F2 to load a file from the host file system. Mono crash logs are rarely helpful!

Hopefully once Mike releases the new version you can carry on using your old command line, and things will start working.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins

User avatar
SevenFFF
Posts: 565
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Connect to a PC

Postby SevenFFF » Mon Jan 06, 2020 11:41 pm

Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins


Who is online

Users browsing this forum: No registered users and 2 guests