Giter VIP home page Giter VIP logo

Comments (19)

mcgurk avatar mcgurk commented on August 13, 2024 1

Here is config file to map joystick movement to keyboard buttons as in your screenshot:
https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/blob/master/C64_keyboard/C64_joystick.sc

Your connected pins may be different, so check your pins from here:
https://github.com/mcgurk/Arduino-USB-HID-RetroJoystickAdapter/tree/master/C64_keyboard#pins-i-used
or
http://kookye.com/wp-content/uploads/2016/02/Pinout-ProMicro.jpg

I assumed that GND from joysticks are connected to Arduino GND. Soarer firmware activates internal pullup resistors for input pins and checks when pin goes to GND.

from bmc64.

randyrossi avatar randyrossi commented on August 13, 2024

Very cool! I will add a link to this project's README in the keyboard section next release. Thanks!

from bmc64.

Mantics68 avatar Mantics68 commented on August 13, 2024

Hello, Mcgurk have a .hex for program PRO MICRO? Thank you.

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

Soarer_Controller_v1.20_beta4_atmega32u4.hex is for Arduino Pro Micro. It is in Soarer controller firmware package (Soarer_Controller_v1.20_beta4.zip) which is instructed to download in part "Firmware/Flashing" of my README.md.

from bmc64.

Mantics68 avatar Mantics68 commented on August 13, 2024

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

Problem is that I can't get those five shifted GFX-chars with any keyboard. I don't know what keypresses should be sent to get those buttons shifted. Can you get any how with any keyboard e.g. cross-symbol of plus-button?

from bmc64.

Mantics68 avatar Mantics68 commented on August 13, 2024

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

This 5 key shifting problem is only with BMC64

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

When I got "idea" to make C64-keyboard, I thought making my own adapter from Arduino Pro Micro and Arduino IDE. Then I found some readymade Arduino IDE Sketch (could be your github page). Then I remembered that Soarer has made configurable keyboard controller firmware. There is couple of advantages over Arduino IDE. Soarer firmware is not made with Arduino IDE so Arduino Pro Micro shows only as real USB-keyboard and not serial adaptor + keyboard. Some devices doesn't like "double USB devices", so Soarer firmware is more compatible. But maybe most important thing is that it is fully configurable with keyboard matrix pins, macros etc. without modifying code, recompiling and reflashing.

from bmc64.

Mantics68 avatar Mantics68 commented on August 13, 2024

from bmc64.

CemTezcan avatar CemTezcan commented on August 13, 2024

Amazing because other arduino keyboard approaches doesn't recognized by the BMC64. I made a simple circuit to parallel a C64 keyboard.

Important thing is you need to add resistors if you connect the c64 keyboard both on c64 motherboard and BMC64 usb input. Otherwise characters are scrambled on key presses. Also video port must be disconnected (it's really strange).
Also note that:
-Use at your own risk-
There are people that warns about the risk about using the devices at same time and/or single use. Because the powered one of the emulator or computer may leak voltage to the OFF one. I just powered up both sides for 3 hours and there is no parasite on the AV output, wrong loading on real disks or tapes happened. Only when both of them are ON at the same time, just arduino sent some random joystick commands to the c64. Which means voltage leak is happening.
-Use at your own risk-

Check my post about that:
https://www.facebook.com/Blockmind/posts/10219813430594876

from bmc64.

hpingel avatar hpingel commented on August 13, 2024

Too bad that there is no source code available for the Soarer Controller Firmware. I currently have built a C64USBKey (https://github.com/dabonetn/C64USBKey) and it is working on Linux, Windows, etc. but sadly not with BMC64. I would have liked to compare the sources to see what C64USBKey does wrong.

Picture example: https://www.forum64.de/index.php?thread/87674-c64usbkey-c64-usb-keyboard-mit-arduino-pro-micro-oder-teensy-lc/&postID=1398737#post1398737

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

C64USBKey uses Arduino IDE so it is not pure USB HID keyboard-device. Arduino IDE makes Arduino as multiple USB-devices serial port being first. Simple USB-implementation doesn't see that Arduino device is also keyboard. Aduino IDE libraries could be modified to remove serial port and changing keyboard being first device, but better way is just not use Arduino IDE (or Arduino IDE libraries).

I recommend to use Soarer Controller Firmware. Is there any reason to use C64USBKey?

from bmc64.

hpingel avatar hpingel commented on August 13, 2024

Thank you for your explanations. I will try to learn if it is possible to replace the standard bootloader on the Arduino Pro Micro in a way that that there will be no two devices enumerated.

My reason for C64USBKey is simply: It was a project I came across and I built it with the two joystick ports attached (back when I was still playing with Combian). So because it is already soldered and I am lazy I wanted to try to use it with BCM64.

At some point in the future I might build your suggestion when I find time.

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

If you do keyboard and joystick adapter with one single Arduino, I think it doesn't work in same reasons.

With Soarer firmware you can assign all pins freely so no resoldering needed, if you already have working C64USBKey.

Even two joysticks in one Arduino is sometimes problematic. In Windows it works, but Linux detects Arduino Pro Micro as one joystick even when it is two joystick-devices without USB quirks (or changing VID/PID). So Arduino Pro Micro cannot be used as two joystick adapter which works in every situation.

from bmc64.

hpingel avatar hpingel commented on August 13, 2024

C64USBKey supports 2 joysticks and simply converts the joystick signals to keypresses. The host doesn't know about the joysticks:
https://www.forum64.de/index.php?thread/87674-c64usbkey-c64-usb-keyboard-mit-arduino-pro-micro-oder-teensy-lc/&postID=1373991#post1373991

from bmc64.

mcgurk avatar mcgurk commented on August 13, 2024

Oh I see. You can do same thing easily with Soarer firmware just by modifying config file. Soarer firmware doesn't care if there is hooked up keyboard matrix or joysticks.

There is multiple advantages in Soarer firmware over Arduino IDE:
-Lower latency -> Arduino IDE libraries have lot of useless stuff and interrupts to have just simple keyboard.
-Real single keyboard HID-device -> works virtually with anything that uses USB keyboard.
-No constant recompiling, reflashing and reseting -> all settings (including macros) can be done on the fly and comes active immediately. Doesn't need Arduino IDE or avrdude to be installed after first flashing.

from bmc64.

K-rnivoro avatar K-rnivoro commented on August 13, 2024

I've made the same using QMK Firmware instead of Soarer's. It's much more powerful, allowing some clever combination, for example Control key is TAB if you tap it, but is actually Control if you hold it. I've also used Teensy++2 so more pins available allowing to connect also the joysticks.
And for the best part, different layouts for "PC" use, than "BMC-64" use, so perfect keyboard emulation.
2018-06-07 19 04 25

from bmc64.

hpingel avatar hpingel commented on August 13, 2024

FYI: In the meantime, Dabone has added config files for the soarer firmware to his project C64USBKey: https://github.com/dabonetn/C64USBKey

from bmc64.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.