bmc64 icon indicating copy to clipboard operation
bmc64 copied to clipboard

bmc64 does not work with Arduino ATmega32u4 joystick

Open mistepien opened this issue 3 years ago • 4 comments

bmc64 does not work with Arduino ATmega32u4 joystick based on that library: https://github.com/MHeironimus/ArduinoJoystickLibrary

That is very handy library and such joystick works with VICE in linux and windows without any problems

mistepien avatar Feb 06 '22 23:02 mistepien

If it isn’t supported by the Circle library, it won’t be supported in BMC, as that is what provides bare metal controller support. It indeed supports fewer devices than a full fledged operating system.

rhester72 avatar Feb 07 '22 00:02 rhester72

it's a pity, Arduino is a good way to make your own diy C64-like usb joystick.

mistepien avatar Feb 07 '22 00:02 mistepien

ATmega32u4 or that Joystick-library is not problem. Problem is Arduino IDE board-files. If you do adapter with default Arduino IDE, it makes it multiple usb-devices and first device is serial-device. You can check this in windows device manager when you plug and unplug atmega32u4. Without serial-device 32u4 is not programmable automatically and for Arduino IDE users it is importat that everything is easy. But serial device is problem with any device that searches only joysticks, like Circle library (BMC).

There is ways to not to use default Arduino IDE board-files:

  • Use Atmel Studio and LUFA usb-stack for programming
  • Use ready made Arduino IDE board-files for joystick-only device like https://github.com/dmadison/ArduinoXInput_AVR
  • Modify Arduino IDE board files yourself and remove serial-device and other devices (C:\Program Files (x86)\Arduino\hardware\arduino\avr)

My github pages:

  • https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/C64_joystick_atmelstudio
  • https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/XBox360_XInput

mcgurk avatar Feb 07 '22 09:02 mcgurk

I used that https://github.com/arduino/ArduinoCore-avr/commit/8e823d276f939d79b2d323fad675fb8442a718c2. And now there is no CDC device. But joystick still does not work. Just like before down/up and left/right are respectively -129/384 and 384/-129. These values are shown in "Monitor Raw USB 1 data" if I move the stick. Fire1 and Fire2 work fine. Fire1 is fire for C64 soft and Fire2 swaps joysticks. USB1 is detected as "0 hats, 2 axes". What should I do next?

mistepien avatar Feb 09 '22 14:02 mistepien