Menu

#609 problem with recieving data from physical RS232 port

v2.4
closed-fixed
nobody
None
Windows
RS232
2019-05-21
2015-02-23
gpz
No

as Adrian Fox reported on the ml, there is a problem with receiving data from a physical rs232 port. i've slightly updated his test program and put it here:

https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/RS232/

the program should work (and behave) the same on at least xvic and x64, which is the case apparently (it doesnt work on either), which hints on the problem being in the actual rs232 layer (rather than CIA/VIA)

The following BASIC program is working correctly on a real VIC-20
allowing two-way communication, over the bluetooth-serial adapter when
connected to the user port. However, when I operate the same program
under VICE, only transmit is working - no data is received

In VICE Menu: Settings|RS232 Settings|RS232 Settings... - I have all
four RS232 ports setup as follows:
\.\com3 <file: \\.\\com3=""> : baud=2400 parity=N data=8 stop=1
\.\com3 <file: \\.\\com3=""> : baud=2400 parity=N data=8 stop=1
\.\com3 <file: \\.\\com3=""> : baud=2400 parity=N data=8 stop=1
\.\com3 <file: \\.\\com3=""> : baud=2400 parity=N data=8 stop=1

In VICE Menu: Settings|RS232 Settings|RS232 Userport Settings...

[X] Enable RS232 user port emulation

Userport device [RS232 DEVICE 2]
Userport baud rate [2400]

Discussion

  • Greg King

    Greg King - 2015-03-22

    The Windows port of VICE emulates the RS-232 handshaking lines (the other ports totally ignore those lines). But, it won't even try to receive anything if the DTR and RTS lines aren't set to "true"! The ACIA emulation controls those lines; but, the user-port emulation doesn't do it. The broken code is in rs232dev_getc() [in "src/arch/win32/rs232dev.c"].

     
  • Greg King

    Greg King - 2017-05-24

    This patch fixes the issue. It removes the (unnecessary) tests that block reception.

     

    Last edit: Greg King 2017-08-13
  • Bo Zimmerman

    Bo Zimmerman - 2017-08-27

    Thanks Mr. King -- you have no idea the pain you saved me from.

     

    Last edit: Bo Zimmerman 2017-08-27
  • gpz

    gpz - 2017-10-23

    applied patch in r33955 - please retest

     
  • gpz

    gpz - 2018-05-18

    so we can close this?

     
  • Greg King

    Greg King - 2018-05-26

    I think that it can be closed. The SDL and GTK3 ports don't have the bug on Windows.

     
  • gpz

    gpz - 2018-05-26

    ok, lets see what happens :)

     
  • Al DeRosa

    Al DeRosa - 2019-05-21

    I know this is an old post and has been closed. Has this been fixed in the latest versions? 3.2 and 3.3?? Thanks for any info...

     
  • gpz

    gpz - 2019-05-21

    unless it broke again, it should work

     
  • Al DeRosa

    Al DeRosa - 2019-05-21

    Thank you for the info... :)

     

Log in to post a comment.