Hello,
an update on the topic.
I am still researching the way to make two emulated VIC20s to communicate through the emulated RS232.
After experimenting a while with
tcpser, I understood this tool is not what I need to accomplish my goal - mostly because tcpser is designed to work, or to be seen, as a MODEM and party because of too few examples/docs on uses different than accessing BBSes. When correctly configured, tcpser replies OK when you type AT to it, and its purpose - if I understood it correctly - is simply to emulate a modem and incapsulating modem communication inside tcp/ip to let you connect to a BBS via the Internet exactly as you would on a modem-operated landline call.
My many attempts of making two VICs to mutually speak/listen (using their own tcpser of course) has failed.
Clearly tcpser is not designed for this task, plus has all the modem emulation stuff which is not required, plus I cannot find enough documentation on it. For example it has a nice -D direct connection option, too bad I cannot find any docs where they say how to use it.
So, I bounced back on Google and found this nifty program:
netcat, available for windows:
https://joncraton.org/blog/46/netcat-for-windows/
My aim is firstly to see what exactly comes out from the WinVICE window and especially if it's good enough to do something with it.
Now, if you open a windows command shell and run netcat by typing:
nc -l -p 25232 -o out.txt
then you have
netcat listening on port 25232 and echoing everything it receives.
I could then fiddle with communication parameters inside the emulated VIC and bingo!
I saw that, inside WinVice, by opening the communication channel with the following combinations:
OPEN 2,2,0,CHR$(8)+CHR$(0) - for RS232 emulated at 1200 baud
OPEN 2,2,0,CHR$(138)+CHR$(0) - for RS232 emulated at 2400 baud
both produce a crystal clean output as received by the netcat program!
The contents of the out.txt will be exactly what you typed inside the emulated VIC, with its ASCII CR (decimal 13) at the end of each line.
So, the emulated vic correctly sends data out of the window and I can now capture and use it from inside a C program.
Now, the next step would be that of modifying that netcat, making it echo that received chars on another port specified by me (say, 25233) where I will have the second emulated VIC listening.
My final goal is not only to allow existing software to work also on emulated VIC20s (there's a nice diskette I shared at
https://vic20reloaded.com/networking-vic-20/ with 2 distributed games and 1 chat program) - I would like to have the chance to use emulated VICs to comfortably develop new software.
If someone is familiar with C and wants to help me in the task, that would be really appreciated!