Menu

#1223 Physical RS232 devices do not seem to work on OSX.

v3.6
open-need-info
dqh
None
MacOS X
RS232
2021-12-30
2020-05-02
idolpx
No

I set Serial 1 to "/dev/cu.SLAB_USBtoUART" which is a serial modem emulator device connected via usb and it does not respond in vice.

I was able to use the same device in Vice on a Windows 10 virtual machine (Parallels) on the same computer just fine.

I've tested both the latest GTK3 and SDL2 binaries (3.4 r37694) on MacOS X Mojave with the same results.

I can connect with a native terminal emulator and the device is functioning peroperly.

Discussion

  • idolpx

    idolpx - 2020-05-02

    I was using CCGMS Ultimate in Vice with default userport settings and baud set to 2400 baud to test.
    The serial device 1 was also set to 2400 baud and the physical device was set to 2400 baud using a native OSX terminal.

     
  • gpz

    gpz - 2020-05-02

    Isnt that program just for the 1541U2? Did you try with regular CCGMS?

     
  • gpz

    gpz - 2020-05-02
    • assigned_to: dqh
     
  • idolpx

    idolpx - 2020-05-03

    Same version of CCGMS worked fine in Vice on Windows 10. I did try StrikeTerm with the same results.

     
  • gpz

    gpz - 2020-05-03

    ok, fine. a bit strange though... since the unix code should work fine for osx too. perhaps its just a permission issue?

     
  • idolpx

    idolpx - 2020-05-04

    Yeah... that's what I thought so too but still had the issue when I ran vice as root.

     

    Last edit: idolpx 2020-05-04
  • idolpx

    idolpx - 2020-05-04

    I'm still investigating. If I find a solution before someone else I'll post it here.
    I'm trying to get things configured so I can compile it on my mac and step through it in a debug mode.

     
    • dqh

      dqh - 2020-05-04

      On 4/5/20 2:21 pm, idolpx wrote:

      I'm still investigating. If I find a solution before someone else I'll
      post it here.
      I'm trying to get things configured so I can compile it on my mac and
      step through it in a debug mode.

      Good plan, I do this all the time - hopefully you've found the building
      VICE with Xcode docs for doing exactly that.

      I'm currently the only active macOS maintainer so this is assigned to
      me, but I don't think I have any serial devices to test this with. I
      think I have a USB <-> serial thing in a box somewhere but nothing to
      plug it into.

      What are you using this for?

       
  • idolpx

    idolpx - 2020-05-04

    I'm using a WEMOS D1 MINI PRO flashed with the Zimodem firmware.

    https://www.cnx-software.com/2016/09/05/5-wemos-d1-mini-pro-esp8266-board-includes-16mb-flash/

    https://github.com/bozimmerman/Zimodem

    I've got it wired up to an edge card connector to use it with a real C64 attached to the user port.
    I figured it would be more comfortable writing some custom C64 software for it in Vice with it connected via usb though. That's when I discoved this issue. It works great in Vice on Windows 10 in a Paralells VM on this same macbook but would prefer to not have to run a C64 VM in a Windows VM. :D

    I will check out the Xcode docs. I'd be happy to help with what I can on the macOS side.

     
  • idolpx

    idolpx - 2020-05-12

    Well... I got things setup and was able to compile vice on my mac and now everything is working as expected. Not sure what fixed things but it is fine now. If I'm able to reproduce the issue again I'll follow up.

    I did notice that if I saved a snapshot of CCGMS with everything working then loaded it back up it the RS232 device would fail but that is a different but similar issue.

     
  • idolpx

    idolpx - 2020-05-12

    Ok... looks like it is the same issue. I was able to reproduce the prob.

    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.
    RS232DEV: Error - Attempted to get status of invalid fd -16385.

    That's what I'm getting in debug. And it's doing the same in Windows too now. If you load up CCGMS Ultimate from the .CRT file or from a .VSF snapshot it will throw this error. I don't think it's initializing the rs232 device properly. If I load it from the .D64 file it loads up and initializes the rs232 device and works.

    I'm using the files from the following URL to test.

    https://csdb.dk/release/?id=174485

    I'm still getting familiar with the code. So I'm not sure where the best place would be to call the reset or init of the rs232 device.

     
  • gpz

    gpz - 2020-05-12

    it would help if you'd post a command line (starting with -default) that allows to reproduce this issue.

    I am also not surprised it doesn't work when loading a snapshot... i wouldnt expect it to work either :) Using a .crt it should be no different than loading it from disk however. There was another bug report about rs232 being broken when using cartridges though, those are probably seperate bugs.

     
  • idolpx

    idolpx - 2020-05-15

    Ok... If I do the following everything works as expected, including loading from a .VSF snapshot.

    In "main_specific_reset" of "c64.c" comment out rs232drv_reset() and rsuser_reset().

    Then in "rsuser.c" comment out the "if (dtr && !new_dtr) {" in "rsuser_write_ctrl()".

    After that everything works great.

     

    Last edit: idolpx 2020-05-17
  • gpz

    gpz - 2021-10-26
    • status: open --> open-need-info
    • Category: x64sc --> RS232
     
  • gpz

    gpz - 2021-10-26

    There were some RS232 related fixes recently which may or may not solve this - please test again!

     

Log in to post a comment.