P2 Hosted USB Keyboard/Mouse



  • Ah, thank you for your last post Roger -- I think that's the clue I needed to find the problem. I think this is a fastspin bug, and it comes up only in a very specific circumstance: when a Spin function which uses no member variables (VAR) calls coginit/cognew to run a Spin function which itself does access member variables (as mouseinit does in this case). By adding the "@usbA" you made the "start" method access a VAR, which fixed the problem. A similar result would have come from moving the usbstack array from DAT to VAR (which is a more common place for it, and the reason this bug hasn't shown up before -- most users of coginit either use a stack defined in VAR or set a cog variable in VAR).

    Here's a version of fastspin which has that particular issue fixed. I hope it'll fix your problem.

  • That looks to have resolved the issue, Eric. @rogloh
  • Thanks @ersmith and @garryj. I will take your word for it for now. That zip file only contained a windows binary of fastspin that I couldn't try out on my Mac. I can wait for the next release and use a workaround for now.
  • Barely worth mentioning, but I was surprised that this cheap old mouse didn't work.
    Same part number as this one: https://www.amazon.com/HP-MOFXUO-2-Button-Optical-537749-001/dp/B00I2YNG8E

    This is one that came with an HP computer bought new back in 2015.
    I think this might be the first one I tried that didn't work...

    This even older: Logitech MouseMan Dual Optical USB Mouse M-BL63B
    Seems to work just fine...
  • Roger,
    When Eric drops a binary like that, you can be pretty sure the master branch on Github is the same code. Just do a "git pull" then "make".

  • LOL. Is that a subtle hint for me to retest...evanh ? :wink: When I get a chance I can try to resurrect that USB gfx+mouse demo issue I had. I have a much newer fastspin anyway now since I decided to update the tools and resolve the loadp2 issue etc.
  • Ah, just misunderstood. :)
Sign In or Register to comment.