Build Your Own Arcade Controls Forum
Main => Main Forum => Topic started by: PL1 on January 23, 2017, 11:21:35 am
-
EDIT: This thread was split from the original thread here (http://forum.arcadecontrols.com/index.php/topic,153061.0.html).
Are you really the only guy working on updating the Kade software.
Nothing that ambitious.
I'm just trying to use the firmwares on different AVRs and maybe modify the source code so I can compile custom firmwares to work with them.
Right now, I'd be happy to figure out three things:
1. If the 32u4 is retro-compatible with 32u2 firmwares, which pin on the 32u2 corresponds to which pin on the 32u4?
I can probably find the answer using a gamepad hex and probing each pin on the Arduino Pro Micro. ;D
2. What source code file(s)/variable(s) to edit in order to assign which pin on the AVR handles an input.
i.e. Move KADESTICK firmware Button 1 from 32u4 pin 8 whch is only connected to an LED on the Pro Micro to 32u4 pin 31, an available digital input pin.
3. What source code file(s)/variable(s) to edit in order to change the keystroke for a given input.
i.e. Changing P1B1 from "CTRL" to something else.
And I looked at the github page and read for for over an hour on how micro processors programers. My official take away is I would have to do a lot more research before I could even begin to understand what needs to be done.
It is definitely a steep learning curve and we're both near the bottom of it.
If you have a page booked marked that would be a good place to start learning I would definitely take a long hard look.
Aside from the thread linked above, no idea what would be good/useful info. :dunno
Scott
-
1=https://www.arduino.cc/en/Hacking/PinMapping32u4
2=http://www.atmel.com/devices/ATMEGA32U2.aspx?tab=documents
#2 should get ever one interested up to speed real fast
#1 shows the pin diff
not that much in real time ?
more memory/faster/usb
arduino has it ide >fully down-loadable<
which is handy when u dump it into atmel ide
ed
-
1=https://www.arduino.cc/en/Hacking/PinMapping32u4
. . .
#1 shows the pin diff
Unless I'm missing something, that just matches Atmel's 32u4 pin labels to Arduino's 32u4 pin labels. (like a Thesaurus)
I'm trying to translate KADE's 32u2 pins/functions to 32u4 pins/functions. (like a Spanish/English Dictionary)
For example, KADE terminal A2 goes to 32u2 pin 6 which is labeled "(OC.0B/INT0) PD0" and that appears to match up with 32u4 pin 18 which is labeled "(OC0B/SCL/INT0) PD0".
Looks like it will be easy to cross-reference the pins, but the devil's in the details. >:D
KADE terminal A1 goes to 32u2 pin 5 which is labeled "(PCINT11/AIN2) PC2" and that appears to match up with 32u4 pin . . . nothing -- no "PCINT11", no "AIN2", no "PC2".
(https://www.avrprogrammers.com/images/devices/ATmega32U2-AU-pinout-700.png) (https://www.avrprogrammers.com/images/devices/ATmega32U4-MU-pinout.png)
Only 16 of the 24 KADE terminals appear to match up to a 32u4 pin. * Cue Meatloaf singing, "2 out of 3 ain't bad."
Terminal|Minimus label|32u2 Pin#|32u4 Pin#
A1 PC2 5 ??
A2 PD0 6 18
A3 PD1 7 19
A4 PD2 8 20
A5 PD3 9 21
A6 PD4 10 25?
A7 PD5 11 22
A8 PD6 12 26?
HWB PD7 13 33?
A9 PB0 14 8
A10 PB1 15 9
GND GND - -
B1 PB2 16 10
B2 PB3 17 11
B3 PB4 18 28
_4 PB5 19 29
B5 PB6 20 30
B6 PB7 21 12
B7 PC7 22 32?
B8 PC6 23 (29? 31?)
RST RST 24 13
B9 PC5 25 30?
B10 PC4 26 ??
V+ VCC - -
Am I missing something?
so where do i buy the kade again ? any had the email adres of the n american store ??
Sorry about the mixup, I thought you were going to send a Private Message (PM) to sharpfork (http://forum.arcadecontrols.com/index.php?action=profile;u=4715), degenatrons (http://forum.arcadecontrols.com/index.php?action=profile;u=34137), and bootsector (http://forum.arcadecontrols.com/index.php?action=profile;u=38139).
You can send them a PM by clicking the "send PM" link under the avatar on their user profile. ( ^ profile links)
i am yet to get a grip on "FLIP",but i will
Check out my FLIP tutorial here (http://forum.arcadecontrols.com/index.php/topic,134781.msg1421490.html#msg1421490). :cheers:
BTW, if you're programing an Arduino, ArduinoBuilder is REALLY easy to use, even with a finnicky board like the Pro Micro.
It would be GREAT to get KADE Loader working with more boards, but it's OK for now if we have to use FLIP or ArduinoBuilder to load hex files.
Either way, there will have to be changes to the firmwares to work with other AVRs since different pins are connected on different boards.
I'm just trying to ensure that at least one type of commonly-available AVR has firmwares/directions/pinouts for making encoders. ;D
but it needs to be like the kade easy to install and use for people like me who cant solders program etc
Yeah, that's called an I-PAC (http://www.ultimarc.com/ipac.html). :lol
Scott
-
if u want i will look in detail tonight.?
u are right devil is in details
unless i missed it #1 link on the lft hand side is a full compare
i will double chk
ed
-
i see the largest problem right now
which even i over-looked dah..
avr32u4 verus atmega 32 night and day
but do-able
ed
-
ok i remove the dah to me
>v0.1.4.4 22/02/2013
KADE board options renamed as:
KADE miniArcade (at90usb162)
KADE miniArcade (atmega32u2)
The beta Arduino board has been renamed as:
KADEuino (atmega328)<
^^^^^^
the board never built ? or never supported right ? or mis named ?
a few real answers here would help in your quest
ed
-
The beta Arduino board has been renamed as:
KADEuino (atmega328)<
^^^^^^
the board never built ? or never supported right ? or mis named ?
1. This board was never developed into a KADE encoder.
2. There is only one proof-of-concept firmware (LED BLINK TEST) that was made for this board. (Arduino Pro Mini)
LED BLINK TEST
This is a test firmware which will verify the two onboard LED’s (Red and Green) and the single onboard reset button.
To test, program the KADE with this firmware and connect to the device to a power supply or USB port. A Successful test will give the following results.
The green LED will remain on at all times.
The red onboard LED will flash quickly.
While the reset button is pressed the red LED will remain off.
Right, so all being well, you are ready to check out some seriously cool firmware for your KADE.
3. It's still supported in Loader. (see the "Board Options" pull-down in the left column)
4. The downside to the 328 is that it lacks on-board USB support.
Connect your Arduino Pro Mini device to a USB port via a serial programmer cable.
5. IIRC the 328 bootloader is similar to (or the same as?) the 32u4 bootloader so someone talented enough to update the code for Loader could probably add support for a 32u4 board relatively easily. ;D
6. Even if 32u4 board support is added to Loader, someone will need to write/adapt useful firmwares for that board. >:D
Scott
-
This is awesome. If you guys get an updated KADE to run on the Arduino Micro's I'll buy you all a beer :cheers:
-
ok
good i am on the same page
i had to reread a few things yesterday
u are on the right track,but imho the pins missing are re-asigined registers
i will double chk both handbooks and get back to u
338 +428 pages is alot to pull in so some speed reading is in order
ed
-
Hey guys,
what exactly does this kade thing do?
I mean, by all that effort you putting on reusing the existing firmware, it might be less effort just to rewrite it again?
Is it just a keyboard and joystick encoder? does it support analog inputs? what exactly is it capable of?
Regards
Stefan
-
Thanks Scott for the program :cheers:
-
what exactly does this kade thing do?
Depends on the exact model, but when most people refer to a KADE encoder, they are referring to the miniArcade/microArcade based on the Minimus AVR.
It's an AVR encoder project that has almost 20 easily-customizable firmwares for various controls/outputs.
Download the Loader program (there are several links in earlier posts) and check it out.
There are also spinoffs/prototypes like miniConsole+, KADE+, KADESTICK, and maxArcade that can handle analog input.
I mean, by all that effort you putting on reusing the existing firmware, it might be less effort just to rewrite it again?
Not if you aren't a coder. :lol
Right now, I'm just trying to figure out if (and how well) the current firmwares will cross over without a full rewrite.
If I can just change a few pin assignments and recompile the current firmwares for 32u4 then that would be a lot less work than a full rewrite and if Loader is updated to recognize and work with some 32u4 boards, the updated firmwares should be fairly easy to add.
On the other hand, there are lots of HID keyboard and HID joystick sketches/libraries, so a non-KADE version of those would be relatively easy to do.
Thanks Scott for the program :cheers:
Glad to assist. :cheers:
Scott
-
pl1
look this link over and see if it what u are looking for ?
https://www.mattairtech.com/index.php/development-boards/atmega32u4-usb-development-board-arduino-compatible.html (https://www.mattairtech.com/index.php/development-boards/atmega32u4-usb-development-board-arduino-compatible.html)
if so i will get a few in
it looks like i can dump the nessary code into it
ed
-
look this link over and see if it what u are looking for ?
https://www.mattairtech.com/index.php/development-boards/atmega32u4-usb-development-board-arduino-compatible.html (https://www.mattairtech.com/index.php/development-boards/atmega32u4-usb-development-board-arduino-compatible.html)
That's the board used in KADESTICK. ;D
I've got a spare one here with the "Atmel DFU" bootloader.
It's a great board, but some people will try to find a less expensive alternative.
Justin also carries a 32u2 board that would almost certainly be a good Minimus substitute. (HWB is a jumper :dunno)
https://www.mattairtech.com/index.php/atmega32u2-usb-development-board-arduino-compatible.html (https://www.mattairtech.com/index.php/atmega32u2-usb-development-board-arduino-compatible.html)
If you want to use the maxArcade firmwares in Loader get his AT90USB646 board. (got a maxArcade prototype here)
https://www.mattairtech.com/index.php/mt-db-u6.html (https://www.mattairtech.com/index.php/mt-db-u6.html)
Scott
-
thank-god i am on the same page
hwb on dev boards is to be a jumper (read back->>registers-flex<<)
ok i can order them from atmel
was just chking
i will how ever chk out your other links
thank-u...
i love dev boards
ed
-
well now i do believe i do understand a hell of alot more now
what i see (correct me if i am wrong please)
is the "kade-loader" made by kade group for setting the 32u2 for kade .hex files ?
not nessailry a "parts" shortage >as i have confirmed through atmel it is still a production device<,
i can even order samples :applaud:
if so we now can see the problem in hand
lack of or no support for kade in and of its-self
is this the correct thinking ?
to this i mean we cannot buy a "pre-boot-loaded-kade-32u2" ?
ed
-
Just to be sure that everyone reading this thread is using the same terms and understands what I'm trying to do, here is a glossary and overview.
AVR board - A microcontroller and supporting components (resistors, capacitors, crystal oscillators, etc) mounted on a PCB with solder connection points so you can connect outputs (like 5v for external LEDs) or control inputs. (buttons, analog joysticks, etc.)
An AVR board is a tiny computer that has a microcontroller, a bootloader (like a BIOS) and flash memory. (like the application software on your computer)
Different AVR boards have different microcontroller Input/Output (I/O) pins available to the user. For example, the Arduino Pro Micro and Arduino Micro use the same 32u4 microcontroller, but the Micro board has more I/O pins connected to the microcontroller.
(https://images-na.ssl-images-amazon.com/images/I/51qRBWBTJOL._SY355_.jpg) (https://images-na.ssl-images-amazon.com/images/I/61Xhy2E9uYL._SL1024_.jpg)
Microcontroller - The processor chip. Here is a list of the relevant ones and which KADE project they are used in.
- AT90USB162 - 16k of flash memory, only has digital I/O pins (not many boards still made using this MCU) miniArcade
- ATMega32u2 - 32k of flash memory, only has digital I/O pins (not many boards still made using this MCU) miniArcade
- ATMega32u4 - has digital and analog I/O pins (many boards are still made using this MCU) KADE+, KADESTICK, miniConsole+
- AT90USB646 - has digital and analog I/O pins (few boards are made using this MCU) maxArcade
- AT90USB1286 - has digital and analog I/O pins (few boards are made using this MCU) maxArcade
Bootloader - Acts like the BIOS in a computer and does two things.
- When the board is not in programming mode, it runs (boots) the hex firmware loaded into the flash memory.
- When the board is in programming mode, it loads the hex firmware from a programming application into the flash memory.
There are two main types of bootloaders that we will be working with.
- "CDC" is usually on Arduino boards.
- "Atnel DFU" is usually on other boards.
Some boards can use either bootloader, but may require a "pullup" resistor to keep the board from defaulting into programming mode.
Hex firmware - Like an application program on your computer, this hexadecimal file stored in flash memory tells the microcontroller what to do and when to do it.
KADE Loader - Software that allows you to easily customize and load hex firmwares onto supported AVR boards.
The most common AVR boards that Loader recognizes and supports are the Minimus AT90USB162 and the Minimus ATMega32u2. (miniArcade)
When the board is in programming mode, KADE Loader can command the bootloader to program a hex firmware into the board's flash memory.
Different bootloaders require different commands/procedures to do this.
Hex firmwares may work with some microcontrollers, but not with others -- for example, when Loader compiles/loads miniArcade firmwares, it uses commands and programming registers for the AT90USB162 microcontroller that also work with the ATMega32u2.
This works because the 32u2 is retro-compatible with AT90USB162 hex firmware commands/registers.
I don't remember the source for the sub-quote, but it appears that the 32u4 is retro-compatible with KADE miniArcade firmwares and that they should work with the Pro Micro.
Either use a Minimus AVR and the KADE firmware or Degenatrons mentioned that if you recompile the KADE source code for ATMega32u4, you can use this (http://www.ebay.co.uk/itm/360681719211) chinese board (looks like an inexpensive knockoff of the Sparkfun Pro Micro (https://www.sparkfun.com/products/11098)) since,
atmega32u4 IC is entirely compatible with the previous KADE firmwares whilst providing more pins + analog.
OBJECTIVES:
What I will not do: The Loader source code looks WAY more complicated/finnicky than the firmwares, so I will leave that to Code Monkeys that are much further evolved than this lowly Code Paramecium.
As I mentioned in the OP, here's what I'm trying to do with the KADE firmware source code:
I'm just trying to use the firmwares on different AVRs and maybe modify the source code so I can compile custom firmwares to work with them.
Right now, I'd be happy to figure out three things:
1. If the 32u4 is retro-compatible with 32u2 firmwares, which pin on the 32u2 corresponds to which pin on the 32u4?
I can probably find the answer using a gamepad hex and probing each pin on the Arduino Pro Micro. ;D
2. What source code file(s)/variable(s) to edit in order to assign which pin on the AVR handles an input.
i.e. Move KADESTICK firmware Button 1 from 32u4 pin 8 whch is only connected to an LED on the Pro Micro to 32u4 pin 31, an available digital input pin.
3. What source code file(s)/variable(s) to edit in order to change the keystroke for a given input.
i.e. Changing P1B1 from "CTRL" to something else.
Logical next step: Recompile a firmware for use on a 32u4 board.
1. Edit the MiniArcade MAME firmware's "Makefile".
- Change target to "KADE-MAME_32u4". (hex file filename)
- Change MCU to atmega32u4. (need to verify)
# Target file name (without extension).
TARGET = KADE-MAME
# List C source files here. (C dependencies are automatically generated.)
SRC = main.c usb_keyboard.c
# MCU name, you MUST set this to match the board you are using
# type "make clean" after changing this, so all files will be rebuilt
#
# NOTE - Stuff compiled for 16k will work on both!!
MCU = at90usb162 # Minimus AVR 16K
#MCU = atmega32u2 # Minimus AVR 32k
2. Use the procedures outlined in this post (http://kadevice.tk/forum/viewtopic.php?f=8&t=3134#p5135) to compile the source into a hex firmware file.
3. Load the firmware on a Pro Micro board.
4. Probe the pins and document what comes up on the keyboard tester utilty.
Scott
Note to self: Original KADESTICK thread (http://kadevice.tk/forum/viewtopic.php?f=19&t=2494) where the firmwares were developed.
(You must be a member of that private sub-forum to view the thread, so don't bother clicking on the link.)
-
ok
thk-u pl1
now i know and under-stand the confusion
here it is
when u say boot-loader...yes u can use 3 different 1's and OR any verinet there of >note OR<
i say this because the chip must be >pre-set-up< to accept a boot loader
or u get no usb as a input..u must do it "isp"
i confirmed this today with my eng buds at atmel
so if u do isp loading ? u can then "turn on the boot loader part"
it is in the flash believe it or not.
now from my understanding from what i have gleamed
through the channels of the know
is that the boot-loader code is linux ? is this right ?
because it appers to me all we need is to set the chip up to take kade stuff and away we go
now i say this because it is not just a matter of loading .hex code..i olny wish it was
u see when u load a kade .hex files it >the hex code< turns on certian registers and set ports a certian :ie in/out/pwm..etc
but the very basic "kade-loader code" was loaded first
now this is what i understand now,after 4 scant days at this
so in some short way here is the string
u buy a kade mini atmega board for game interface
it comes to pre loaded to take -->>loader through usb<<
u then go to kade site and get the nessary files to make your interface work with your setup
and or u write your own .hex file and load it via >usb< to your kade device.
is that the quist of it ?
if so i have a ton of answers for u
if not please point me
ed
-
ok
i knew this would not take long
quote :
>I got my miniArcade units today. Thank you very much, Kevin, for sending me an extra unit gratis! I appreciate it. While I haven't assembled the units yet, I was able to successfully compile and flash my modified firmware onto the AVR with dfu-programmer < end of quote
not my work
but pl1 i think u need to look at 1 of the forms u are in for that eact quote
so in my eyes that :code is to be looked at:
ed=digging
ed
-
You're getting WAY too far into the weeds, Ed.
Let's see what we can do with off-the-shelf hardware and minor firmware source code tweaks.
If the easy way doesn't work, we can look into complicated.
yes u can use 3 different 1's and OR any verinet there of >note OR<
i say this because the chip must be >pre-set-up< to accept a boot loader
or u get no usb as a input..u must do it "isp"
To keep things easy, I'm only considering boards that already have a CDC or Atmel DFU bootloader and can therefore load hex files via USB.
No need to mess with an ISP programmer.
the boot-loader code is linux ? is this right ?
Haven't looked. Don't know. Don't care.
Q: Which application do I use to load a hex file on a board with CDC/Atmel DFU bootloader?
A: For boards with CDC, use ArduinoBuilder. For boards with Atmel DFU, use FLIP.
For now, that is deep enough on bootloaders.
If we eventually run into problems, we can dig into this subject further.
>the hex code< turns on certian registers and set ports a certian :ie in/out/pwm..etc
True. When you run the firmware source code through the compiler, it generates the hex file.
When you transfer the hex file to the board, it sets up all the registers/inputs/outputs/digital/analog/PWM/etc. and it contains the program commands telling the MCU what to do.
quote :
>I got my miniArcade units today. Thank you very much, Kevin, for sending me an extra unit gratis! I appreciate it. While I haven't assembled the units yet, I was able to successfully compile and flash my modified firmware onto the AVR with dfu-programmer < end of quote
not my work
but pl1 i think u need to look at 1 of the forms u are in for that eact quote
so in my eyes that :code is to be looked at:
Yes. The quote reinforces that the KADE firmware source code is the place to focus.
Scott
-
yes that is what i thought
on just about all points
i need to wait for my boards now
before i can go any futher and virgin 32u2's
ed
-
Just finished testing the default KADESTICK 2-axis firmware on a knockoff Arduino Micro (https://www.amazon.com/Gowoops-Arduino-Leonardo-Controller-ATmega32u4/dp/B00J1X5B7Y/).
Everything worked as predicted.
- Analog inputs and buttons were on the expected pins.
- "Hat Down" is not available since 32u4 pin 22 is only tied to TXLED on the Micro board.
The next step is to modify the KADESTICK 4-axis source code and compile a HEX for the Micro and Pro Micro boards.
- Reassign a few input pins so all functions are available and in a logical layout.
- Change Z-axis to another axis to eliminate the scrolling problem.
Tried using just the SW yoke with the 4-axis firmware and noticed an obvious (in retrospect) but highly problematic side effect with the unused "Z-" and "Z Ro-" axes -- no wiper wire connected to the input = no voltage applied = they aren't centered.
The un-centered Z-axis (a.k.a. mouse scroll wheel) causes the MAMEUIFX menu (and probably many others) to constantly scroll. :angry: :dizzy: :lol
Anyone using an analog pedal, Warlords dials, Lunar Lander thruster, etc. with the Z-axis will have problems for the same reason.
For now, I am holding off on trying to convert the 32u2 KADE fimwares to 32u4 since it appears that someone else may have already done the most difficult work on that. (awaiting confirmation)
Scott
-
Anymore news on this? I can get my hands on the 32u4 board for under $10 locally.
-
Anymore news on this?
Are we there yet? (http://www.youtube.com/watch?v=18AzodTPG5U#)
::) :lol
Bruno is making great progress on the (completely rewritten in C++) miniArcade 2.0 Mapper program. :applaud:
In just the last week:
- We've worked out the issues with the analog inputs in the gamepad firmware. You can enable up to 5 analog axes.
- He's added a customizable keyboard firmware. You can select which keystroke will be on which port.
- I've documented the miniArcade 2.0 board layout to 32u4 pinout/ports and created a graphical cross-reference.
There are still a number of things to be added/tested/refined, but we're making measurable progress every day. ;D
Scott
-
KADE miniArcade 2.0 beta released.
http://forum.arcadecontrols.com/index.php/topic,154126.0.html (http://forum.arcadecontrols.com/index.php/topic,154126.0.html)
Scott