Emulator that runs as server?

You need an actual VIC.

Moderator: Moderators

Post Reply
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Emulator that runs as server?

Post by nippur72 »

I was wondering if there is an emulator that allows a VIC-20 program to run as a "server", e.g working with serial port on the VIC side but then have the I/O translated into TCP/IP or even HTTP.

Is there a similar thing?
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Emulator that runs as server?

Post by groepaz »

recent VICE? i haven't tried it myself, but iirc blacky made it so that RS232 can work over telnet
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Emulator that runs as server?

Post by nippur72 »

do you have a link? I cant find anything
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Emulator that runs as server?

Post by groepaz »

you can download nightly (windows) builds at http://vice.pokefinder.org ... if i recall correctly you just have to enter the remote IP into the "serial device" dialog. or perhaps it was the IP it should listen to, dont recall (i dont use this feature, nor the windows port)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Emulator that runs as server?

Post by nippur72 »

ok thanks! It seems to be an undocumented feature, because the manual talks about UNIX devices (/dev) but doesn't say anything about TCP ports. I guess one has to setup a server listening to that port?

BTW, I don't remeber what device #number is serial port on the vic... is it 4?
User avatar
Mike
Herr VC
Posts: 4816
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Emulator that runs as server?

Post by Mike »

RS232 listens to dev. #2.

Remember, that two 256 byte transmit/receive buffers are allocated with the OPEN command. If those buffer pointers haven't been set beforehand to an address outside the range available for BASIC, the buffers are placed at the end of BASIC memory, clearing all variables.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Emulator that runs as server?

Post by nippur72 »

I'm having trouble to make it work.

I made a node.js server that listens both TCP and UDP port, and run VICE with the following program:

Code: Select all

10 open 2,2
20 get#2,a$
30 print a$;".";
35 print#2,"x";
40 goto20
but nothing on the server happens, no UDP messages and no TCP incoming connections.

Any idea?
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Emulator that runs as server?

Post by groepaz »

you'll have to setup the baudrate for the port in the open statement.... cant tell how that works though, last time i did is 25+ years ago :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Emulator that runs as server?

Post by nippur72 »

I've found this code from C64 manual that should set 300 baud communication

Code: Select all

10 open 2,2,0,chr$(6)
20 get#2,a$
30 print a$;".";
35 print#2,"x";
40 goto20
I've enabled RS232 user port emulation at 300 baud, linked to a device that is "127.0.0.1:6464" (where my node.js application is listening) but it doesn't work :(

Don't know what other to try.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Emulator that runs as server?

Post by nippur72 »

Update! by chance I made it work. :D

Apparently, after the connection is broken an hard reset of the emulator is required. So all my good attempts were being done in vain.

Here is a simple echo server in node.js, sending back the "X" coming from the VIC:
screen.jpg
screen.jpg (96.78 KiB) Viewed 2339 times
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Emulator that runs as server?

Post by groepaz »

good to hear!

if you dont mind... write up a small howto, i'd be happy to include it in the documentation :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
nippur72
de Lagash
Posts: 574
Joined: Thu Sep 07, 2006 8:35 am

Re: Emulator that runs as server?

Post by nippur72 »

sure, once I figure out how to overcome the lost-connection problem I'll put a repo on github with the source code for the server and a small howto.
Post Reply